Catching the return of main function before it deallocates resources
- by EpsilonVector
I'm trying to implement user threads in Linux kernel 2.4, and I ran into something problematic and unexpected.
Background: a thread basically executes a single function and dies, except that when I call thread_create for the first time it must turn main() into a thread as well (by default it is not a thread until the first call, which is also…