Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linuxkpi/common/src/linux_kthread.c
Show First 20 Lines • Show All 159 Lines • ▼ Show 20 Lines | if (linux_kthread_should_stop_task(task) != 0) { | ||||
/* let kthread_stop() free data */ | /* let kthread_stop() free data */ | ||||
td->td_lkpi_task = NULL; | td->td_lkpi_task = NULL; | ||||
/* wakeup kthread_stop() */ | /* wakeup kthread_stop() */ | ||||
complete(&task->exited); | complete(&task->exited); | ||||
} | } | ||||
kthread_exit(); | kthread_exit(); | ||||
} | } | ||||
void | |||||
lkpi_kthread_work_fn(void *context, int pending __unused) | |||||
{ | |||||
struct kthread_work *work = context; | |||||
work->func(work); | |||||
} | |||||
void | |||||
lkpi_kthread_worker_init_fn(void *context, int pending __unused) | |||||
{ | |||||
struct kthread_worker *worker = context; | |||||
worker->task = current; | |||||
} |