make -> mk

remove clumsy stack hack.
fix exec.
fix nthreads maintenance.
fix threadexitsall not to kill self.
add sun support.
This commit is contained in:
rsc
2003-11-23 18:18:00 +00:00
parent b7e6f4150f
commit cd7ddc9b5f
10 changed files with 105 additions and 116 deletions

View File

@@ -1,5 +1,5 @@
#include "threadimpl.h"
#include <signal.h>
#include "threadimpl.h"
typedef struct Mainarg Mainarg;
struct Mainarg
@@ -74,7 +74,13 @@ _threadsignalpasser(void)
int
_schedfork(Proc *p)
{
return ffork(RFMEM|RFNOWAIT, _schedinit, p);
int pid;
lock(&p->lock);
pid = ffork(RFMEM|RFNOWAIT, _schedinit, p);
p->pid = pid;
unlock(&p->lock);
return pid;
}
void