> Linus: do you prefer a solution like the one I've appended, or an
> optional semaphore? Personally, I like the semaphore idea, as it's
> more flexible.
We had to decrement the semaphore (actually, it was an usecount for
this region of code) at the beginning of bdflush and kflushd, which
would not be very flexible.
I think some wrapper function in the non-init sections would be the
thing to do, as it could be architecture-independent and could be
useful as it allowed to let the functions now called by kernel_thread
to return (look into drivers/scsi/host.c for an example).
> - pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
> + pid = kernel_thread2(do_linuxrc, "/linuxrc", SIGCHLD);
This is not necessary, as we wait for the thread to finish anyway.
> if (pid>0)
> while (pid != wait(&i));
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/