return success < 0 ? 0 : 1;
}
+long get_thread_ident _P0()
+{
+ if (!initialized)
+ init_thread();
+}
+
static void do_exit_thread _P1(no_cleanup, int no_cleanup)
{
dprintf(("exit_thread called\n"));
return success < 0 ? 0 : 1;
}
+long get_thread_ident _P0()
+{
+ if (!initialized)
+ init_thread();
+}
+
static void do_exit_thread _P1(no_cleanup, int no_cleanup)
{
dprintf(("exit_thread called\n"));
int start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg)
{
thread_t tid;
- int success = 0; /* init not needed when SOLARIS_THREADS and */
- /* C_THREADS implemented properly */
-
+ int success;
dprintf(("start_new_thread called\n"));
if (!initialized)
init_thread();
return success < 0 ? 0 : 1;
}
+long get_thread_ident _P0()
+{
+ thread_t tid;
+ if (!initialized)
+ init_thread();
+ if (lwp_self(&tid) < 0)
+ return -1;
+ return tid.thread_id;
+}
+
static void do_exit_thread _P1(no_cleanup, int no_cleanup)
{
dprintf(("exit_thread called\n"));
static int local_initialized = 0;
#endif /* SGI_THREADS and USE_DL */
pthread_t th;
- int success = 0; /* init not needed when SOLARIS_THREADS and */
- /* C_THREADS implemented properly */
-
+ int success;
dprintf(("start_new_thread called\n"));
if (!initialized)
init_thread();
return success < 0 ? 0 : 1;
}
+long get_thread_ident _P0()
+{
+ if (!initialized)
+ init_thread();
+ return (long) pthread_self();
+}
+
static void do_exit_thread _P1(no_cleanup, int no_cleanup)
{
dprintf(("exit_thread called\n"));
return success < 0 ? 0 : 1;
}
+long get_thread_ident _P0()
+{
+ return getpid();
+}
+
static void do_exit_thread _P1(no_cleanup, int no_cleanup)
{
dprintf(("exit_thread called\n"));
return success < 0 ? 0 : 1;
}
+long get_thread_ident _P0()
+{
+ if (!initialized)
+ init_thread();
+ return thr_self();
+}
+
static void do_exit_thread _P1(no_cleanup, int no_cleanup)
{
dprintf(("exit_thread called\n"));