Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linuxkpi/common/src/linux_current.c
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | if (mm == NULL) { | ||||
return (ENOMEM); | return (ENOMEM); | ||||
} | } | ||||
/* setup new task structure */ | /* setup new task structure */ | ||||
atomic_set(&ts->kthread_flags, 0); | atomic_set(&ts->kthread_flags, 0); | ||||
ts->task_thread = td; | ts->task_thread = td; | ||||
ts->comm = td->td_name; | ts->comm = td->td_name; | ||||
ts->pid = td->td_tid; | ts->pid = td->td_tid; | ||||
ts->group_leader = ts; | |||||
atomic_set(&ts->usage, 1); | atomic_set(&ts->usage, 1); | ||||
atomic_set(&ts->state, TASK_RUNNING); | atomic_set(&ts->state, TASK_RUNNING); | ||||
init_completion(&ts->parked); | init_completion(&ts->parked); | ||||
init_completion(&ts->exited); | init_completion(&ts->exited); | ||||
proc = td->td_proc; | proc = td->td_proc; | ||||
/* check if another thread already has a mm_struct */ | /* check if another thread already has a mm_struct */ | ||||
▲ Show 20 Lines • Show All 188 Lines • Show Last 20 Lines |