*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: kthread | Section: 9 | Source: OpenBSD | File: kthread.9
KTHREAD(9) FreeBSD Kernel Developer's Manual KTHREAD(9) NAME kthread_create, kthread_exit, kthread_create_deferred - kernel threads SYNOPSIS #include <sys/kthread.h> int kthread_create(void (*func)(void *), void *arg, struct proc **newpp, const char *name); void kthread_exit(int ecode); void kthread_create_deferred(void (*func)(void *), void *arg); DESCRIPTION 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 kthread_create() to create a kernel thread. The new process starts up executing func with argument arg. If newpp is not NULL, it is filled with the address of the new process. name is used to name the process. A kernel thread will terminate by calling kthread_exit(), with exit code ecode. 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 use kthread_create_deferred() instead. The system will call back the function func with argument arg when it can create threads, so it is up to func to call kthread_create() at that point. RETURN VALUES Upon successful completion, kthread_create() returns 0. Otherwise, the following error values are returned: [EAGAIN] The limit on the total number of system processes would be exceeded. SEE ALSO fork1(9) BUGS There is currently no way to use ecode to any sensible purpose from kthread_exit(). FreeBSD 14.1-RELEASE-p8 November 18, 2013 FreeBSD 14.1-RELEASE-p8

Navigation Options