KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
_pthreadtypes.h
Go to the documentation of this file.
1/* KallistiOS ##version##
2
3 sys/_pthreadtypes.h
4 Copyright (C) 2023, 2024 Lawrence Sebald
5
6*/
7
8#ifndef __SYS_PTHREADTYPES_H
9#define __SYS_PTHREADTYPES_H
10
11#include <sys/cdefs.h>
12__BEGIN_DECLS
13
14#include <kos/cond.h>
15#include <kos/mutex.h>
16#include <kos/rwsem.h>
17
18typedef unsigned long int pthread_t;
19
24
25typedef struct pthread_rwlockattr_t {
26 /* Empty */
27 char _unused;
29
30#ifndef __PTHREAD_HAVE_CONDATTR_TYPE
31#define __PTHREAD_HAVE_CONDATTR_TYPE 1
32#define __PTHREAD_CONDATTR_SIZE 16
33
38
39#undef __PTHREAD_CONDATTR_SIZE
40#endif /* !__PTHREAD_HAVE_CONDATTR_TYPE */
41
42typedef struct pthread_barrierattr_t {
43 /* Empty */
44 char _unused;
46
47/* The following types have no public elements. Their implementation is hidden
48 from the public header. */
49
50#ifndef __PTHREAD_HAVE_ATTR_TYPE
51#define __PTHREAD_HAVE_ATTR_TYPE 1
52#define __PTHREAD_ATTR_SIZE 32
53
54typedef union pthread_attr_t {
56 long int __align;
58
59#undef __PTHREAD_ATTR_SIZE
60#endif /* !__PTHREAD_HAVE_ATTR_TYPE */
61
62#ifndef __PTHREAD_HAVE_MUTEX_TYPE
63#define __PTHREAD_HAVE_MUTEX_TYPE 1
64#define __PTHREAD_MUTEX_SIZE 32
65
71
72#undef __PTHREAD_MUTEX_SIZE
73#endif /* !__pthread_have_mutex_type */
74
75#ifndef __PTHREAD_HAVE_COND_TYPE
76#define __PTHREAD_HAVE_COND_TYPE 1
77#define __PTHREAD_COND_SIZE 16
78
84
85#undef __PTHREAD_COND_SIZE
86#endif /* !__PTHREAD_HAVE_COND_TYPE */
87
88#ifndef __PTHREAD_HAVE_RWLOCK_TYPE
89#define __PTHREAD_HAVE_RWLOCK_TYPE 1
90#define __PTHREAD_RWLOCK_SIZE 32
91
97
98#undef __PTHREAD_RWLOCK_SIZE
99#endif /* !__PTHREAD_HAVE_RWLOCK_TYPE */
100
101#ifndef __PTHREAD_HAVE_BARRIER_TYPE
102#define __PTHREAD_HAVE_BARRIER_TYPE 1
103#define __PTHREAD_BARRIER_SIZE 64
104
109
110#undef __PTHREAD_BARRIER_SIZE
111#endif /* !__PTHREAD_HAVE_BARRIER_TYPE */
112
113__END_DECLS
114
115#endif /* !__SYS_PTHREADTYPES_H */
#define __PTHREAD_MUTEX_SIZE
Definition _pthreadtypes.h:64
#define __PTHREAD_ATTR_SIZE
Definition _pthreadtypes.h:52
unsigned long int pthread_t
Definition _pthreadtypes.h:18
#define __PTHREAD_BARRIER_SIZE
Definition _pthreadtypes.h:103
#define __PTHREAD_CONDATTR_SIZE
Definition _pthreadtypes.h:32
#define __PTHREAD_COND_SIZE
Definition _pthreadtypes.h:77
#define __PTHREAD_RWLOCK_SIZE
Definition _pthreadtypes.h:90
Condition variables.
Mutual exclusion locks.
Definition for a reader/writer semaphore.
Condition variable.
Definition cond.h:60
Mutual exclusion lock type.
Definition mutex.h:56
Definition _pthreadtypes.h:42
char _unused
Definition _pthreadtypes.h:44
Definition _pthreadtypes.h:20
int mtype
Definition _pthreadtypes.h:21
int robust
Definition _pthreadtypes.h:22
Definition _pthreadtypes.h:25
char _unused
Definition _pthreadtypes.h:27
Reader/writer semaphore structure.
Definition rwsem.h:57
Definition _pthreadtypes.h:54
unsigned char __data[__PTHREAD_ATTR_SIZE]
Definition _pthreadtypes.h:55
long int __align
Definition _pthreadtypes.h:56
Definition _pthreadtypes.h:105
unsigned char __data[__PTHREAD_BARRIER_SIZE]
Definition _pthreadtypes.h:106
long int __align
Definition _pthreadtypes.h:107
Definition _pthreadtypes.h:79
condvar_t cond
Definition _pthreadtypes.h:80
long int __align
Definition _pthreadtypes.h:82
unsigned char __data[__PTHREAD_COND_SIZE]
Definition _pthreadtypes.h:81
Definition _pthreadtypes.h:34
long int __align
Definition _pthreadtypes.h:36
unsigned char __data[__PTHREAD_CONDATTR_SIZE]
Definition _pthreadtypes.h:35
Definition _pthreadtypes.h:66
unsigned char __data[__PTHREAD_MUTEX_SIZE]
Definition _pthreadtypes.h:68
long int __align
Definition _pthreadtypes.h:69
mutex_t mutex
Definition _pthreadtypes.h:67
Definition _pthreadtypes.h:92
unsigned char __data[__PTHREAD_RWLOCK_SIZE]
Definition _pthreadtypes.h:94
rw_semaphore_t rwsem
Definition _pthreadtypes.h:93
long int __align
Definition _pthreadtypes.h:95