diff options
Diffstat (limited to 'lib/libthr/arch/i386/i386/_setcurthread.c')
-rw-r--r-- | lib/libthr/arch/i386/i386/_setcurthread.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libthr/arch/i386/i386/_setcurthread.c b/lib/libthr/arch/i386/i386/_setcurthread.c index 69a5e8f..0483120 100644 --- a/lib/libthr/arch/i386/i386/_setcurthread.c +++ b/lib/libthr/arch/i386/i386/_setcurthread.c @@ -75,13 +75,15 @@ ldt_init(void) void _retire_thread(void *entry) { - _SPINLOCK(&ldt_lock); + pthread_t thr = curthread; + + _spinlock_pthread(thr, &ldt_lock); if (ldt_free == NULL) *(void **)entry = NULL; else *(void **)entry = *ldt_free; ldt_free = entry; - _SPINUNLOCK(&ldt_lock); + _spinunlock_pthread(thr, &ldt_lock); } void * |