pth_create_chain.stderr.exp \
pth_create_chain.stderr.exp-ppc \
pth_create_chain.vgtest \
+ pth_create_glibc_2_0.stderr.exp \
+ pth_create_glibc_2_0.vgtest \
pth_detached.stderr.exp \
pth_detached.stdout.exp \
pth_detached.vgtest \
check_PROGRAMS += matinv pth_barrier pth_barrier_race pth_barrier_reinit
endif
+if HAVE_PTHREAD_CREATE_GLIBC_2_0
+check_PROGRAMS += pth_create_glibc_2_0
+endif
+
if HAVE_PTHREAD_SPINLOCK
check_PROGRAMS += pth_spinlock
endif
--- /dev/null
+/* Test program that invokes pthread_create@GLIBC_2.0(). */
+
+
+#include <pthread.h>
+#include <stdio.h>
+
+
+extern int pthread_create_glibc_2_0(pthread_t*, const pthread_attr_t*,
+ void *(*)(void*), void*);
+
+__asm__(".symver pthread_create_glibc_2_0, pthread_create@GLIBC_2.0");
+
+
+static void* thread_func(void *arg)
+{
+ fprintf(stderr, "The thread.\n");
+ return 0;
+}
+
+int main(int argc, char** argv)
+{
+ int result;
+ pthread_t thr;
+
+ result = (*pthread_create_glibc_2_0)(&thr, 0, thread_func, 0);
+ if (result != 0)
+ {
+ fprintf(stderr, "pthread_create() failed.\n");
+ return 1;
+ }
+ pthread_join(thr, 0);
+ fprintf(stderr, "Finished.\n");
+ return 0;
+}