20834570c475cf98db96cc610d72bdda9d2b7593
[reactos.git] / posix / include / sys / types.h
1 /* $Id: types.h,v 1.3 2002/03/22 01:26:28 hyperion Exp $
2 */
3 /*
4 * sys/types.h
5 *
6 * data types. Conforming to the Single UNIX(r) Specification Version 2,
7 * System Interface & Headers Issue 5
8 *
9 * This file is part of the ReactOS Operating System.
10 *
11 * Contributors:
12 * Created by KJK::Hyperion <noog@libero.it>
13 *
14 * THIS SOFTWARE IS NOT COPYRIGHTED
15 *
16 * This source code is offered for use in the public domain. You may
17 * use, modify or distribute it freely.
18 *
19 * This code is distributed in the hope that it will be useful but
20 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
21 * DISCLAMED. This includes but is not limited to warranties of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23 *
24 */
25 #ifndef __SYS_TYPES_H_INCLUDED__
26 #define __SYS_TYPES_H_INCLUDED__
27
28 /* INCLUDES */
29
30 /* OBJECTS */
31
32 /* TYPES */
33 /* FIXME: all these types need to be checked */
34 typedef unsigned long int blkcnt_t; /* Used for file block counts */
35 typedef unsigned long int blksize_t; /* Used for block sizes */
36 typedef long long clock_t; /* Used for system times in clock ticks or CLOCKS_PER_SEC */
37 typedef int clockid_t; /* Used for clock ID type in the clock and timer functions. */
38 typedef unsigned long int dev_t; /* Used for device IDs. */
39 typedef unsigned long int fsblkcnt_t; /* Used for file system block counts */
40 typedef unsigned long int fsfilcnt_t; /* Used for file system file counts */
41 typedef unsigned long int gid_t; /* Used for group IDs. */
42 typedef int id_t; /* Used as a general identifier; can be used to contain at least a
43 pid_t, uid_t or a gid_t. */
44 typedef unsigned long int ino_t; /* Used for file serial numbers. */
45 typedef int key_t; /* Used for interprocess communication. */
46 typedef unsigned long int mode_t; /* Used for some file attributes. */
47 typedef unsigned long int nlink_t; /* Used for link counts. */
48 typedef long off_t; /* Used for file sizes. */
49 typedef long int pid_t; /* Used for process IDs and process group IDs. */
50
51 /* pthread types */
52 typedef void * pthread_cond_t; /* Used for condition variables. */
53 typedef void * pthread_condattr_t; /* Used to identify a condition attribute object. */
54 typedef void * pthread_key_t; /* Used for thread-specific data keys. */
55 typedef void * pthread_attr_t; /* Used to identify a thread attribute object. */
56
57 typedef void * pthread_mutex_t;
58 typedef void * pthread_mutexattr_t;
59
60 typedef void * pthread_once_t; /* Used for dynamic package initialisation. */
61 typedef void * pthread_rwlock_t; /* Used for read-write locks. */
62 typedef void * pthread_rwlockattr_t; /* Used for read-write lock attributes. */
63 typedef unsigned long int pthread_t; /* Used to identify a thread. */
64
65 typedef unsigned int size_t; /* Used for sizes of objects. */
66 typedef signed int ssize_t; /* Used for a count of bytes or an error indication. */
67 typedef long long suseconds_t; /* Used for time in microseconds */
68 typedef long int time_t; /* Used for time in seconds. */
69 typedef void * timer_t; /* Used for timer ID returned by timer_create(). */
70 typedef int uid_t; /* Used for user IDs. */
71 typedef unsigned long long useconds_t; /* Used for time in microseconds. */
72
73 /*
74 additional types for sockets and streams - for compatibility with Microsoft POSIX
75 */
76 typedef unsigned char u_char;
77 typedef unsigned short int u_short;
78 typedef unsigned short int ushort;
79 typedef unsigned int u_int;
80 typedef unsigned long int u_long;
81
82 typedef unsigned int uint;
83 typedef unsigned long ulong;
84 typedef unsigned char unchar;
85
86 typedef char *caddr_t;
87 typedef int key_t;
88
89 /* CONSTANTS */
90
91 /* PROTOTYPES */
92
93 /* MACROS */
94 /* for compatibility with Microsoft POSIX */
95 #define _CRTAPI1 __cdecl
96 #define _CRTAPI2 __cdecl
97
98 #endif /* __SYS_TYPES_H_INCLUDED__ */
99
100 /* EOF */
101