--- src/lib/libthread_xu/thread/thr_sem.c 2005/03/15 11:24:23 1.2 +++ src/lib/libthread_xu/thread/thr_sem.c 2005/03/29 19:26:20 1.3 @@ -32,6 +32,9 @@ */ #include + +#include + #include #include #include @@ -180,7 +183,7 @@ _sem_wait(sem_t *sem) if (sem_check_validity(sem) != 0) return (-1); - curthread = _get_curthread(); + curthread = tls_get_curthread(); _pthread_testcancel(); do { while ((val = (*sem)->count) > 0) { @@ -205,7 +208,7 @@ _sem_timedwait(sem_t * __restrict sem, s if (sem_check_validity(sem) != 0) return (-1); - curthread = _get_curthread(); + curthread = tls_get_curthread(); /* * The timeout argument is only supposed to