diff options
Diffstat (limited to 'lib/libthr/thread/thr_detach.c')
-rw-r--r-- | lib/libthr/thread/thr_detach.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libthr/thread/thr_detach.c b/lib/libthr/thread/thr_detach.c index 23e985f..6161e86 100644 --- a/lib/libthr/thread/thr_detach.c +++ b/lib/libthr/thread/thr_detach.c @@ -44,10 +44,10 @@ _pthread_detach(pthread_t pthread) if (pthread == NULL || pthread->magic != PTHREAD_MAGIC) return (EINVAL); - _SPINLOCK(&pthread->lock); + THR_LOCK(&pthread->lock); if (pthread->attr.flags & PTHREAD_DETACHED) { - _SPINUNLOCK(&pthread->lock); + THR_UNLOCK(&pthread->lock); return (EINVAL); } @@ -73,7 +73,7 @@ _pthread_detach(pthread_t pthread) _thread_critical_exit(joiner); } - _SPINUNLOCK(&pthread->lock); + THR_UNLOCK(&pthread->lock); return (0); } |