bsd
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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++){
|
||||
|
||||
@@ -96,4 +96,5 @@ ENTRY(rfork_thread)
|
||||
movl %ebp, %esp
|
||||
popl %ebp
|
||||
PIC_PROLOGUE
|
||||
jmp PIC_PLT(_C_LABEL(__cerror))
|
||||
jmp PIC_PLT(_C_LABEL(__cerror))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user