diff options
author | rsc <devnull@localhost> | 2006-01-27 05:51:54 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2006-01-27 05:51:54 +0000 |
commit | c54b8b69ede9d92e802baa1163d9cd734b034fb4 (patch) | |
tree | 7b36e7792b73a8ed5c8f2373a346efa5b1735d5f /src/libthread | |
parent | bc5d57712754818a2320a385afbf1c0c9558a4b3 (diff) | |
download | plan9port-c54b8b69ede9d92e802baa1163d9cd734b034fb4.tar.gz plan9port-c54b8b69ede9d92e802baa1163d9cd734b034fb4.tar.bz2 plan9port-c54b8b69ede9d92e802baa1163d9cd734b034fb4.zip |
bsd
Diffstat (limited to 'src/libthread')
-rw-r--r-- | src/libthread/386-ucontext.h | 2 | ||||
-rw-r--r-- | src/libthread/BSD.c | 2 | ||||
-rw-r--r-- | src/libthread/OpenBSD-386-asm.s | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/src/libthread/386-ucontext.h b/src/libthread/386-ucontext.h index 57fd1bd8..00af62aa 100644 --- a/src/libthread/386-ucontext.h +++ b/src/libthread/386-ucontext.h @@ -5,6 +5,8 @@ typedef struct ucontext ucontext_t; extern int swapcontext(ucontext_t*, ucontext_t*); extern void makecontext(ucontext_t*, void(*)(), int, ...); +extern int getmcontext(mcontext_t*); +extern void setmcontext(mcontetx_t*); /*- * Copyright (c) 1999 Marcel Moolenaar diff --git a/src/libthread/BSD.c b/src/libthread/BSD.c index fdbc712a..b9e8888e 100644 --- a/src/libthread/BSD.c +++ b/src/libthread/BSD.c @@ -33,7 +33,7 @@ _threadlock(Lock *l, int block, ulong pc) for(i=0; i<1000; i++){ if(!_tas(&l->held)) return 1; - sched_yield(); + sleep(0); } /* increasingly slow */ for(i=0; i<10; i++){ diff --git a/src/libthread/OpenBSD-386-asm.s b/src/libthread/OpenBSD-386-asm.s index 7ffb413c..1a59436f 100644 --- a/src/libthread/OpenBSD-386-asm.s +++ b/src/libthread/OpenBSD-386-asm.s @@ -96,4 +96,5 @@ ENTRY(rfork_thread) movl %ebp, %esp popl %ebp PIC_PROLOGUE - jmp PIC_PLT(_C_LABEL(__cerror))
\ No newline at end of file + jmp PIC_PLT(_C_LABEL(__cerror)) + |