Subversion Repositories shark

Rev

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