*** 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: thread_fork | Section: 9 | Source: OpenBSD | File: thread_fork.9
THREAD_FORK(9) FreeBSD Kernel Developer's Manual THREAD_FORK(9) NAME thread_fork - create a new thread inside a process SYNOPSIS #include <sys/types.h> #include <sys/proc.h> int thread_fork(struct proc *p1, void *stack, void *tcb, pid_t *tidptr, register_t *retval); DESCRIPTION thread_fork() creates a new thread out of p1, which should be the current thread. This function is used to implement the __tfork(3) system call. stack, which must not be NULL, will be used as the initial value of the new thread's stack pointer. If tcb is not NULL, it will be used as the initial address of the new thread's TCB (thread control block). If tidptr is not NULL, the TID of the new thread will be copied out there on success. This is guaranteed to be done before the new thread is started. On successful completion the TID of the new thread will be stored in *retval. RETURN VALUES Upon successful completion of the operation, thread_fork() returns 0. Otherwise, the following error values are returned: [EAGAIN] The system limit on the total number of threads would be exceeded. [ENOMEM] There is insufficient swap space for the new thread. [EINVAL] The stack argument was NULL. SEE ALSO __get_tcb(2), fork(2), __tfork(3), tfind(9) HISTORY The thread_fork() function appeared in OpenBSD 6.1. FreeBSD 14.1-RELEASE-p8 February 15, 2017 FreeBSD 14.1-RELEASE-p8

Navigation Options