/kernel/trunk/generic/include/synch/waitq.h |
---|
54,10 → 54,11 |
#define waitq_sleep(wq) \ |
waitq_sleep_timeout((wq),SYNCH_NO_TIMEOUT,SYNCH_BLOCKING) |
extern void waitq_interrupted_sleep(void *data); |
extern void waitq_initialize(waitq_t *wq); |
extern int waitq_sleep_timeout(waitq_t *wq, __u32 usec, int nonblocking); |
extern void waitq_wakeup(waitq_t *wq, bool all); |
extern void _waitq_wakeup_unsafe(waitq_t *wq, bool all); |
extern void waitq_interrupt_sleep(thread_t *t); |
#endif |
/kernel/trunk/generic/include/synch/synch.h |
---|
35,11 → 35,10 |
#define ESYNCH_WOULD_BLOCK 1 /**< Could not satisfy the request without going to sleep. */ |
#define ESYNCH_TIMEOUT 2 /**< Timeout occurred. */ |
#define ESYNCH_INTERRUPTED 4 /**< Sleep was interrupted. */ |
#define ESYNCH_OK_ATOMIC 8 /**< Operation succeeded without sleeping. */ |
#define ESYNCH_OK_BLOCKED 16 /**< Operation succeeded and did sleep. */ |
#define ESYNCH_OK_ATOMIC 4 /**< Operation succeeded without sleeping. */ |
#define ESYNCH_OK_BLOCKED 8 /**< Operation succeeded and did sleep. */ |
#define SYNCH_FAILED(rc) ((rc) & (ESYNCH_WOULD_BLOCK | ESYNCH_TIMEOUT | ESYNCH_INTERRUPTED)) |
#define SYNCH_FAILED(rc) ((rc) & (ESYNCH_WOULD_BLOCK | ESYNCH_TIMEOUT)) |
#define SYNCH_OK(rc) ((rc) & (ESYNCH_OK_ATOMIC | ESYNCH_OK_BLOCKED)) |
#endif |
/kernel/trunk/generic/include/proc/thread.h |
---|
80,12 → 80,8 |
void (* thread_code)(void *); /**< Function implementing the thread. */ |
void *thread_arg; /**< Argument passed to thread_code() function. */ |
/** From here, the stored context is restored when the thread is scheduled. */ |
context_t saved_context; |
/** From here, the stored timeout context is restored when sleep times out. */ |
context_t sleep_timeout_context; |
/** From here, the stored interruption context is restored when sleep is interrupted. */ |
context_t sleep_interruption_context; |
context_t saved_context; /**< From here, the stored context is restored when the thread is scheduled. */ |
context_t sleep_timeout_context; /**< From here, the stored failover context is restored when sleep times out. */ |
waitq_t *sleep_queue; /**< Wait queue in which this thread sleeps. */ |
timeout_t sleep_timeout; /**< Timeout used for timeoutable sleeping. */ |