summaryrefslogtreecommitdiffstats
path: root/lib/libc/amd64
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2000-07-29 07:14:04 +0000
committerpeter <peter@FreeBSD.org>2000-07-29 07:14:04 +0000
commit6a75b120d26bc19be2c1603edb4fbfdc4b30f2a8 (patch)
tree2527ee7d4d460805ebd914733e4057ebb5567705 /lib/libc/amd64
parent7588cd1d2a1eaa6ec1813de0ea097c7de9759ae4 (diff)
downloadFreeBSD-src-6a75b120d26bc19be2c1603edb4fbfdc4b30f2a8.zip
FreeBSD-src-6a75b120d26bc19be2c1603edb4fbfdc4b30f2a8.tar.gz
rfork(2) wrapper for simple rfork-style threads. I have lost count of
the number of times I have given this to people and got asked: why isn't it in libc? It is impossible to do this without assembler glue to reset the stack for the new child process. int rfork_thread(flags, stack_addr, start_fnc, start_arg) int flags; Flags to rfork system call. See rfork(2). void *stack_addr; Top of stack for thread. int (*start_fnc)(void *); Address of thread function to call in child. void *start_arg; Argument to pass to the thread function in child. This is deliberately not documented or prototyped in includes until the corresponding alpha version is written.
Diffstat (limited to 'lib/libc/amd64')
-rw-r--r--lib/libc/amd64/gen/Makefile.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/amd64/gen/Makefile.inc b/lib/libc/amd64/gen/Makefile.inc
index f2506fd..66b0759 100644
--- a/lib/libc/amd64/gen/Makefile.inc
+++ b/lib/libc/amd64/gen/Makefile.inc
@@ -2,4 +2,4 @@
# $FreeBSD$
SRCS+= _setjmp.S alloca.S fabs.S frexp.c infinity.c isinf.c ldexp.c modf.S \
- setjmp.S sigsetjmp.S
+ rfork_thread.S setjmp.S sigsetjmp.S
OpenPOWER on IntegriCloud