libthread: run first thread in proc on system stack

For pthread systems that are fussy about which stack is used,
this makes sure that threadmain runs on a system stack.
If you only use proccreate (never threadcreate), all threads run
on system stacks.
This commit is contained in:
Russ Cox 2020-01-08 22:47:51 -05:00
parent e0c4896ed4
commit 0158bceec7
4 changed files with 55 additions and 17 deletions

View file

@ -187,7 +187,6 @@ struct Proc
};
#define proc() _threadproc()
#define setproc(p) _threadsetproc(p)
extern Proc *_threadprocs;
extern Lock _threadprocslock;