Rev 2071 | Rev 2089 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2071 | Rev 2085 | ||
---|---|---|---|
Line 38... | Line 38... | ||
38 | #include <arch/types.h> |
38 | #include <arch/types.h> |
39 | #include <typedefs.h> |
39 | #include <typedefs.h> |
40 | #include <synch/waitq.h> |
40 | #include <synch/waitq.h> |
41 | #include <synch/synch.h> |
41 | #include <synch/synch.h> |
42 | 42 | ||
43 | struct semaphore |
43 | typedef struct { |
44 | { |
- | |
45 | waitq_t wq; |
44 | waitq_t wq; |
46 | }; |
45 | } semaphore_t; |
47 | 46 | ||
48 | #define semaphore_down(s) \ |
47 | #define semaphore_down(s) \ |
49 | _semaphore_down_timeout((s),SYNCH_NO_TIMEOUT,SYNCH_FLAGS_NONE) |
48 | _semaphore_down_timeout((s),SYNCH_NO_TIMEOUT,SYNCH_FLAGS_NONE) |
50 | #define semaphore_trydown(s) \ |
49 | #define semaphore_trydown(s) \ |
51 | _semaphore_down_timeout((s),SYNCH_NO_TIMEOUT,SYNCH_FLAGS_NON_BLOCKING) |
50 | _semaphore_down_timeout((s),SYNCH_NO_TIMEOUT,SYNCH_FLAGS_NON_BLOCKING) |