# | Line 34 | Line 34 | |
---|---|---|
34 | #include <unistd.h> | |
35 | #include <signal.h> | |
36 | #include <pthread.h> | |
37 | – | #include <semaphore.h> |
37 | ||
38 | ||
39 | /* Thread stack size */ | |
# | Line 50 | Line 49 | extern int test_and_set(int *var, int va | |
49 | extern int __clone(int (*fn)(void *), void *, int, void *); | |
50 | ||
51 | /* struct sem_t */ | |
52 | + | typedef struct { |
53 | + | struct _pthread_fastlock __sem_lock; |
54 | + | int __sem_value; |
55 | + | _pthread_descr __sem_waiting; |
56 | + | } sem_t; |
57 | + | |
58 | + | #define SEM_VALUE_MAX 64 |
59 | #define status __status | |
60 | #define spinlock __spinlock | |
61 | #define sem_lock __sem_lock |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |