summaryrefslogtreecommitdiffstats
path: root/lib/libc/i386/gen/rfork_thread.S
Commit message (Collapse)AuthorAgeFilesLines
* Standardize on our SCM ID style.obrien2002-03-231-2/+3
|
* Use 'mov' instead of 'lea' for setting the syscall number in %eax as thatjhb2001-11-271-3/+3
| | | | | | is clearer about what we are actually doing. Requested by: bde
* Fix some rather interesting bugs that managed to not turn up in variouspeter2000-07-291-5/+5
| | | | | | | | | | | testing and real-life applications: 1) If you returned from the thread function, you got a segv instead of calling _exit() with your return code. 2) clean up some bogus stack management. There was also an underflow on function return. 3) when making syscalls, the kernel is expecting to have to leave space for the function's return address. We need to duplicate this. It was an accident that the rfork syscall actually worked here. :-/
* rfork(2) wrapper for simple rfork-style threads. I have lost count ofpeter2000-07-291-0/+112
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.
OpenPOWER on IntegriCloud