pthread: Allow new threads in forked children
authorBarret Rhoden <brho@cs.berkeley.edu>
Mon, 9 Jul 2018 20:20:23 +0000 (16:20 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 9 Jul 2018 20:20:23 +0000 (16:20 -0400)
commita6f5d77deac91a8d5544c05bd379ab207f1b7578
tree559506e57d2a59638b75517b7dff95409db6268e
parent94fd376914eea7ba30ceab9d6034f75bdf46e87f
pthread: Allow new threads in forked children

Previously, after forking, a child could not use threads at all.  Any
threads other than thread0 were ignored.  Now, older threads will still be
ignored, but new threads will run.

fork() must still be called from thread0 and while the process is an SCP.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
user/pthread/pthread.c
user/pthread/pthread.h