- Make world doesn't build the modules any more.
- Mention the buildkernel/installkernel targets as common used targets.
- LINT has gone, NOTES is new but cannot be built. It is a pure reference
file. However, I still mentioned LINT but pointed out the difference
between the ancient LINT and the new NOTES. This should avoid confusion.
- crypto/ subdir isn't export controlled any more.
Could you please enable my "state top" patches in the FreeBSD distribution.
I developped the stuff under FreeBSD, so it must be good there :-)
Here is a patch (relative to the RELENG_4 branch).
Thanks,
Frank
pid_t rfork_thread(int forkflags, void *stack, int (*func)(void *arg),
void *arg);
A new process is created, presumably using RFMEM shared address space.
The child process switches to the supplied stack, which is set up with a
function call frame. The function is called with the supplied arguement.
If the function returns, the return value will be used with _exit(2).
was not fun and I am not entirely certain of the correctness, but it seems
to work. (in fact, side by side testing of this code vs the x86 version
turned up hidden bugs in the x86 code).
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. :-/
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.