|
AquilaOS documentation
How it works, and its code
|
Go to the source code of this file.
Functions | |
| int | kthread_create (const char *name, void(*fn)(void *), void *arg, struct thread **ref) |
| Makes a kernel thread, and makes it ready to run. | |
Variables | |
| struct proc * | kproc |
| int kthread_create | ( | const char * | name, |
| void(* | fn )(void *), | ||
| void * | arg, | ||
| struct thread ** | ref ) |
Makes a kernel thread, and makes it ready to run.
| name | the thread's name, as ps shows it ("[net]") |
| fn | the function it runs, which must never return |
| arg | the argument fn is called with |
| ref | if not NULL, set to the new thread |
Definition at line 71 of file kthread.c.
References thread::arch, arch_kthread_create(), thread::karg, thread::kentry, kfree(), kproc, kproc_init(), kthread_create(), kthread_start(), thread::name, NULL, RUNNABLE, sched_thread_ready(), thread::spawned, thread::state, thread_new(), and proc::threads.
Referenced by kthread_create(), and netif_register().
|
extern |
Definition at line 23 of file kthread.c.
Referenced by kproc_init(), kthread_create(), signal_interrupts(), signal_send(), and signal_to().