1 /** Test whether DRD recognizes LinuxThreads as LinuxThreads and NPTL as
11 static pid_t s_main_thread_pid
;
14 void* thread_func(void* arg
)
16 if (s_main_thread_pid
== getpid())
18 write(STDOUT_FILENO
, "NPTL or non-Linux POSIX threads implementation detected.\n", 57);
22 write(STDOUT_FILENO
, "Detected LinuxThreads as POSIX threads implementation.\n", 55);
27 int main(int argc
, char** argv
)
31 s_main_thread_pid
= getpid();
32 pthread_create(&threadid
, 0, thread_func
, 0);
33 pthread_join(threadid
, 0);