+2003-03-14 Ulrich Drepper <drepper@redhat.com>
+
+ * tst-fork4.c: Use test-skeleton.c.
+
2003-03-14 Roland McGrath <roland@redhat.com>
* init.c: Fix typo "#eli" for "#else".
2003-03-14 Ulrich Drepper <drepper@redhat.com>
+ * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
+ * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
+
* pthread_create.c (start_thread): setjmp is expected to return 0.
* sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
}})
+/* Call the user-provided thread function. */
+#define CALL_THREAD_FCT(descr) \
+ ({ void *__res; \
+ int __ignore1, __ignore2; \
+ asm volatile ("subl $12, %%esp\n\t" \
+ "pushl %%gs:%P4\n\t" \
+ "call *%%gs:%P3\n\t" \
+ "addl $16, %%esp" \
+ : "=a" (__res), "=c" (__ignore1), "=d" (__ignore2) \
+ : "i" (offsetof (struct pthread, start_routine)), \
+ "i" (offsetof (struct pthread, arg))); \
+ __res; })
+
+
#endif /* __ASSEMBLER__ */
#endif /* tls.h */
#include <sys/types.h>
#include <sys/wait.h>
-int
-main (void)
+
+static int
+do_test (void)
{
pthread_t me = pthread_self ();
return 1;
}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"