Changeset View
Changeset View
Standalone View
Standalone View
head/lib/libthr/thread/thr_detach.c
Show All 32 Lines | |||||
#include "namespace.h" | #include "namespace.h" | ||||
#include <sys/types.h> | #include <sys/types.h> | ||||
#include <errno.h> | #include <errno.h> | ||||
#include <pthread.h> | #include <pthread.h> | ||||
#include "un-namespace.h" | #include "un-namespace.h" | ||||
#include "thr_private.h" | #include "thr_private.h" | ||||
__weak_reference(_pthread_detach, pthread_detach); | __weak_reference(_thr_detach, pthread_detach); | ||||
__weak_reference(_thr_detach, _pthread_detach); | |||||
int | int | ||||
_pthread_detach(pthread_t pthread) | _thr_detach(pthread_t pthread) | ||||
{ | { | ||||
struct pthread *curthread = _get_curthread(); | struct pthread *curthread = _get_curthread(); | ||||
int rval; | int rval; | ||||
if (pthread == NULL) | if (pthread == NULL) | ||||
return (EINVAL); | return (EINVAL); | ||||
if ((rval = _thr_find_thread(curthread, pthread, | if ((rval = _thr_find_thread(curthread, pthread, | ||||
Show All 17 Lines |