Changeset View
Changeset View
Standalone View
Standalone View
head/sys/compat/linuxkpi/common/src/linux_kthread.c
Show First 20 Lines • Show All 136 Lines • ▼ Show 20 Lines | linux_kthread_setup_and_run(struct thread *td, linux_task_fn_t *task_fn, void *arg) | ||||
task->task_fn = task_fn; | task->task_fn = task_fn; | ||||
task->task_data = arg; | task->task_data = arg; | ||||
thread_lock(td); | thread_lock(td); | ||||
/* make sure the scheduler priority is raised */ | /* make sure the scheduler priority is raised */ | ||||
sched_prio(td, PI_SWI(SWI_NET)); | sched_prio(td, PI_SWI(SWI_NET)); | ||||
/* put thread into run-queue */ | /* put thread into run-queue */ | ||||
sched_add(td, SRQ_BORING); | sched_add(td, SRQ_BORING); | ||||
thread_unlock(td); | |||||
return (task); | return (task); | ||||
} | } | ||||
void | void | ||||
linux_kthread_fn(void *arg __unused) | linux_kthread_fn(void *arg __unused) | ||||
{ | { | ||||
struct task_struct *task = current; | struct task_struct *task = current; | ||||
Show All 15 Lines |