Subversion Repositories shark

Rev

Rev 2 | Rev 80 | 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
 ------------
24
 CVS :        $Id: types.h,v 1.1.1.1 2002-03-29 14:12:51 pj Exp $
25
 
26
 File:        $File$
27
 Revision:    $Revision: 1.1.1.1 $
28
 Last update: $Date: 2002-03-29 14:12:51 $
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>
69
 
70
__DJ_dev_t
71
#undef __DJ_dev_t
72
#define __DJ_dev_t
73
 
74
__DJ_ino_t
75
#undef __DJ_ino_t
76
#define __DJ_ino_t
77
 
78
__DJ_mode_t
79
#undef __DJ_mode_t
80
#define __DJ_mode_t
81
 
82
__DJ_nlink_t
83
#undef __DJ_nlink_t
84
#define __DJ_nlink_t
85
 
86
__DJ_gid_t
87
#undef __DJ_gid_t
88
#define __DJ_gid_t
89
 
90
__DJ_off_t
91
#undef __DJ_off_t
92
#define __DJ_off_t
93
 
94
__DJ_pid_t
95
#undef __DJ_pid_t
96
#define __DJ_pid_t
97
 
98
__DJ_uid_t
99
#undef __DJ_uid_t
100
#define __DJ_uid_t
101
 
102
// for sched_param
103
#include <sched.h>
104
 
105
typedef struct {
106
  // This fields are specified by the posix standard, 13.4.1
107
  int contentionscope;
108
  int inheritsched;
109
  int schedpolicy;
110
  struct sched_param schedparam;
111
 
112
  // This are in 16.2.1.2
113
  size_t stacksize;
114
  void *stackaddr;
115
  int detachstate;
116
 
117
} pthread_attr_t;
118
 
119
typedef struct {
120
  // This are in 13.6.1.2
121
  int protocol;
122
  int prioceiling;
123
} pthread_mutexattr_t;
124
 
125
typedef mutex_t pthread_mutex_t;
126
 
127
typedef int pthread_once_t;
128
 
129
typedef PID pthread_t;
130
 
131
typedef task_key_t pthread_key_t;
132
 
133
typedef int pthread_condattr_t;
134
 
135
typedef cond_t pthread_cond_t;
136
 
137
#ifndef _POSIX_SOURCE
138
 
139
/* Allow including program to override.  */
140
#ifndef FD_SETSIZE
141
#define FD_SETSIZE 256
142
#endif
143
 
144
typedef struct fd_set {
145
  unsigned char fd_bits [((FD_SETSIZE) + 7) / 8];
146
} fd_set;
147
 
148
#define FD_SET(n, p)    ((p)->fd_bits[(n) / 8] |= (1 << ((n) & 7)))
149
#define FD_CLR(n, p)    ((p)->fd_bits[(n) / 8] &= ~(1 << ((n) & 7)))
150
#define FD_ISSET(n, p)  ((p)->fd_bits[(n) / 8] & (1 << ((n) & 7)))
151
#define FD_ZERO(p)      memset ((void *)(p), 0, sizeof (*(p)))
152
 
153
#endif /* !_POSIX_SOURCE */
154
 
155
#ifdef __cplusplus
156
}
157
#endif
158
 
159
/* -- */
160
 
161
typedef __u_quad_t u_quad_t;
162
typedef __quad_t   quad_t;
163
 
164
#endif /* !__dj_include_sys_types_h_ */
165