Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linuxkpi/common/src/linux_schedule.c
Show First 20 Lines • Show All 182 Lines • ▼ Show 20 Lines | |||||
int | int | ||||
default_wake_function(wait_queue_t *wq, unsigned int state, int flags, | default_wake_function(wait_queue_t *wq, unsigned int state, int flags, | ||||
void *key __unused) | void *key __unused) | ||||
{ | { | ||||
return (wake_up_task(wq->private, state)); | return (wake_up_task(wq->private, state)); | ||||
} | } | ||||
void | void | ||||
linux_init_wait_entry(wait_queue_t *wait, int flags) | |||||
{ | |||||
wait->flags = flags; | |||||
wait->private = current; | |||||
wait->func = autoremove_wake_function; | |||||
INIT_LIST_HEAD(&wait->task_list); | |||||
} | |||||
void | |||||
linux_wake_up(wait_queue_head_t *wqh, unsigned int state, int nr, bool locked) | linux_wake_up(wait_queue_head_t *wqh, unsigned int state, int nr, bool locked) | ||||
{ | { | ||||
wait_queue_t *pos, *next; | wait_queue_t *pos, *next; | ||||
if (!locked) | if (!locked) | ||||
spin_lock(&wqh->lock); | spin_lock(&wqh->lock); | ||||
list_for_each_entry_safe(pos, next, &wqh->task_list, task_list) { | list_for_each_entry_safe(pos, next, &wqh->task_list, task_list) { | ||||
if (pos->func == NULL) { | if (pos->func == NULL) { | ||||
▲ Show 20 Lines • Show All 223 Lines • Show Last 20 Lines |