Kernel threads are system light-weight processes: cloned from process 0 (the
swapper), sharing its memory map and limits, but with a copy of its file
descriptor table. They don't receive broadcast nor group signals and they
can't be swapped.
Any process can call
create a kernel thread. The new process starts up executing
, it is filled with the address of the
new process. name
is used to name the
A kernel thread will terminate by calling
(), with exit code
Since the system has to be up and running for creating new processes, device
drivers that want to create kernel threads early (e.g., at attach time) may
() instead. The
system will call back the function func
when it can create threads, so
it is up to func
() at that point.
Upon successful completion,
returns 0. Otherwise, the following error values are returned:
- The limit on the total number of system processes would be exceeded.
There is currently no way to use ecode
sensible purpose from