Rev 2089 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2089 | Rev 2106 | ||
---|---|---|---|
Line 40... | Line 40... | ||
40 | #include <genarch/mm/page_ht.h> |
40 | #include <genarch/mm/page_ht.h> |
41 | #include <genarch/mm/page_pt.h> |
41 | #include <genarch/mm/page_pt.h> |
42 | 42 | ||
43 | /** Kernel-side futex structure. */ |
43 | /** Kernel-side futex structure. */ |
44 | typedef struct { |
44 | typedef struct { |
45 | uintptr_t paddr; /**< Physical address of the status variable. */ |
45 | /** Physical address of the status variable. */ |
- | 46 | uintptr_t paddr; |
|
46 | waitq_t wq; /**< Wait queue for threads waiting for futex availability. */ |
47 | /** Wait queue for threads waiting for futex availability. */ |
- | 48 | waitq_t wq; |
|
47 | link_t ht_link; /**< Futex hash table link. */ |
49 | /** Futex hash table link. */ |
- | 50 | link_t ht_link; |
|
48 | count_t refcount; /**< Number of tasks that reference this futex. */ |
51 | /** Number of tasks that reference this futex. */ |
- | 52 | count_t refcount; |
|
49 | } futex_t; |
53 | } futex_t; |
50 | 54 | ||
51 | extern void futex_init(void); |
55 | extern void futex_init(void); |
52 | extern unative_t sys_futex_sleep_timeout(uintptr_t uaddr, uint32_t usec, int flags); |
56 | extern unative_t sys_futex_sleep_timeout(uintptr_t uaddr, uint32_t usec, |
- | 57 | int flags); |
|
53 | extern unative_t sys_futex_wakeup(uintptr_t uaddr); |
58 | extern unative_t sys_futex_wakeup(uintptr_t uaddr); |
54 | 59 | ||
55 | extern void futex_cleanup(void); |
60 | extern void futex_cleanup(void); |
56 | 61 | ||
57 | #endif |
62 | #endif |