Changeset View
Changeset View
Standalone View
Standalone View
head/lib/libthr/thread/thr_main_np.c
Show All 31 Lines | |||||
#include "namespace.h" | #include "namespace.h" | ||||
#include <pthread.h> | #include <pthread.h> | ||||
#include <pthread_np.h> | #include <pthread_np.h> | ||||
#include "un-namespace.h" | #include "un-namespace.h" | ||||
#include "thr_private.h" | #include "thr_private.h" | ||||
__weak_reference(_pthread_main_np, pthread_main_np); | __weak_reference(_thr_main_np, pthread_main_np); | ||||
__weak_reference(_thr_main_np, _pthread_main_np); | |||||
/* | /* | ||||
* Provide the equivalent to Solaris thr_main() function. | * Provide the equivalent to Solaris thr_main() function. | ||||
*/ | */ | ||||
int | int | ||||
_pthread_main_np(void) | _thr_main_np(void) | ||||
{ | { | ||||
if (!_thr_initial) | if (!_thr_initial) | ||||
return (-1); | return (-1); | ||||
else | else | ||||
return (_pthread_equal(_pthread_self(), _thr_initial) ? 1 : 0); | return (_pthread_equal(_pthread_self(), _thr_initial) ? 1 : 0); | ||||
} | } |