diff options
author | rsc <devnull@localhost> | 2004-12-27 00:13:48 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2004-12-27 00:13:48 +0000 |
commit | e1dc7e4511d4644060d4904dcae50808d966fff7 (patch) | |
tree | f2e33a457ee10672e40b659826ccd1a649f9ca19 /src/libthread/thread.c | |
parent | 43db87f1fcb51065ef50beae9da8b6310ccf1cae (diff) | |
download | plan9port-e1dc7e4511d4644060d4904dcae50808d966fff7.tar.gz plan9port-e1dc7e4511d4644060d4904dcae50808d966fff7.tar.bz2 plan9port-e1dc7e4511d4644060d4904dcae50808d966fff7.zip |
signal handling, add prototype for pthreadinit
Diffstat (limited to 'src/libthread/thread.c')
-rw-r--r-- | src/libthread/thread.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/libthread/thread.c b/src/libthread/thread.c index 69895181..9a42b9e8 100644 --- a/src/libthread/thread.c +++ b/src/libthread/thread.c @@ -190,7 +190,7 @@ scheduler(void *v) p = v; setproc(p); - print("s %p %d\n", p, gettid()); + // print("s %p %d\n", p, gettid()); p->tid = pthread_self(); pthread_detach(p->tid); lock(&p->lock); @@ -503,6 +503,13 @@ threadmainstart(void *v) threadmain(threadargc, threadargv); } +extern Jmp *(*_notejmpbuf)(void); +static Jmp* +threadnotejmp(void) +{ + return &proc()->sigjmp; +} + int main(int argc, char **argv) { @@ -524,8 +531,9 @@ main(int argc, char **argv) _wunlock = threadwunlock; _rsleep = threadrsleep; _rwakeup = threadrwakeup; + _notejmpbuf = threadnotejmp; - pthreadinit(); + _pthreadinit(); p = procalloc(); if(mainstacksize == 0) mainstacksize = 65536; |