From owner-cvs-all Sat Jul 29 0:14: 8 2000 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 1E62837BA2E; Sat, 29 Jul 2000 00:14:06 -0700 (PDT) (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id AAA13726; Sat, 29 Jul 2000 00:14:05 -0700 (PDT) (envelope-from peter@FreeBSD.org) Message-Id: <200007290714.AAA13726@freefall.freebsd.org> From: Peter Wemm Date: Sat, 29 Jul 2000 00:14:05 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/lib/libc/i386/gen rfork_thread.S Makefile.inc X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG peter 2000/07/29 00:14:05 PDT Modified files: lib/libc/i386/gen Makefile.inc Added files: lib/libc/i386/gen rfork_thread.S Log: 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. Revision Changes Path 1.11 +2 -2 src/lib/libc/i386/gen/Makefile.inc To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message