Subversion Repositories shark

Rev

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