Subversion Repositories shark

Rev

Rev 3 | Rev 82 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 pj 1
/*
2
 * Project: S.Ha.R.K.
3
 *
4
 * Coordinators:
5
 *   Giorgio Buttazzo    <giorgio@sssup.it>
6
 *   Paolo Gai           <pj@gandalf.sssup.it>
7
 *
8
 * Authors     :
9
 *   Paolo Gai           <pj@gandalf.sssup.it>
10
 *   Massimiliano Giorgi <massy@gandalf.sssup.it>
11
 *   Luca Abeni          <luca@gandalf.sssup.it>
12
 *   (see the web pages for full authors list)
13
 *
14
 * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
15
 *
16
 * http://www.sssup.it
17
 * http://retis.sssup.it
18
 * http://shark.sssup.it
19
 */
20
 
21
 
22
/**
23
 ------------
80 pj 24
 CVS :        $Id: types.h,v 1.2 2003-03-13 13:41:04 pj Exp $
2 pj 25
 
26
 File:        $File$
80 pj 27
 Revision:    $Revision: 1.2 $
28
 Last update: $Date: 2003-03-13 13:41:04 $
2 pj 29
 ------------
30
 
31
**/
32
 
33
/*
34
 * Copyright (C) 2000 Paolo Gai
35
 *
36
 * This program is free software; you can redistribute it and/or modify
37
 * it under the terms of the GNU General Public License as published by
38
 * the Free Software Foundation; either version 2 of the License, or
39
 * (at your option) any later version.
40
 *
41
 * This program is distributed in the hope that it will be useful,
42
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
43
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
44
 * GNU General Public License for more details.
45
 *
46
 * You should have received a copy of the GNU General Public License
47
 * along with this program; if not, write to the Free Software
48
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
49
 *
50
 */
51
 
52
/* Copyright (C) 1997 DJ Delorie, see COPYING.DJ for details */
53
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
54
 
55
#ifndef __SYS_TYPES_H__
56
#define __SYS_TYPES_H__
57
 
58
#include <features.h>
59
 
60
#ifdef __cplusplus
61
extern "C" {
62
#endif
63
 
64
#include <kernel/types.h>
65
#include <kernel/descr.h>
66
 
67
#include <bits/types.h>
68
#include <sys/htypes.h>
80 pj 69
#include "ll/sys/cdefs.h"
70
 
71
__BEGIN_DECLS
2 pj 72
 
73
__DJ_dev_t
74
#undef __DJ_dev_t
75
#define __DJ_dev_t
76
 
77
__DJ_ino_t
78
#undef __DJ_ino_t
79
#define __DJ_ino_t
80
 
81
__DJ_mode_t
82
#undef __DJ_mode_t
83
#define __DJ_mode_t
84
 
85
__DJ_nlink_t
86
#undef __DJ_nlink_t
87
#define __DJ_nlink_t
88
 
89
__DJ_gid_t
90
#undef __DJ_gid_t
91
#define __DJ_gid_t
92
 
93
__DJ_off_t
94
#undef __DJ_off_t
95
#define __DJ_off_t
96
 
97
__DJ_pid_t
98
#undef __DJ_pid_t
99
#define __DJ_pid_t
100
 
101
__DJ_uid_t
102
#undef __DJ_uid_t
103
#define __DJ_uid_t
104
 
105
// for sched_param
106
#include <sched.h>
107
 
108
typedef struct {
109
  // This fields are specified by the posix standard, 13.4.1
110
  int contentionscope;
111
  int inheritsched;
112
  int schedpolicy;
113
  struct sched_param schedparam;
114
 
115
  // This are in 16.2.1.2
116
  size_t stacksize;
117
  void *stackaddr;
118
  int detachstate;
119
 
120
} pthread_attr_t;
121
 
122
typedef struct {
123
  // This are in 13.6.1.2
124
  int protocol;
125
  int prioceiling;
126
} pthread_mutexattr_t;
127
 
128
typedef mutex_t pthread_mutex_t;
129
 
130
typedef int pthread_once_t;
131
 
132
typedef PID pthread_t;
133
 
134
typedef task_key_t pthread_key_t;
135
 
136
typedef int pthread_condattr_t;
137
 
138
typedef cond_t pthread_cond_t;
139
 
140
#ifndef _POSIX_SOURCE
141
 
142
/* Allow including program to override.  */
143
#ifndef FD_SETSIZE
144
#define FD_SETSIZE 256
145
#endif
146
 
147
typedef struct fd_set {
148
  unsigned char fd_bits [((FD_SETSIZE) + 7) / 8];
149
} fd_set;
150
 
151
#define FD_SET(n, p)    ((p)->fd_bits[(n) / 8] |= (1 << ((n) & 7)))
152
#define FD_CLR(n, p)    ((p)->fd_bits[(n) / 8] &= ~(1 << ((n) & 7)))
153
#define FD_ISSET(n, p)  ((p)->fd_bits[(n) / 8] & (1 << ((n) & 7)))
154
#define FD_ZERO(p)      memset ((void *)(p), 0, sizeof (*(p)))
155
 
156
#endif /* !_POSIX_SOURCE */
157
 
158
#ifdef __cplusplus
159
}
160
#endif
161
 
162
/* -- */
163
 
164
typedef __u_quad_t u_quad_t;
165
typedef __quad_t   quad_t;
166
 
80 pj 167
__END_DECLS
2 pj 168
#endif /* !__dj_include_sys_types_h_ */
169