Index: gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c |
diff --git a/gdb/testsuite/gdb.multi/watchpoint-multi.c b/gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c |
similarity index 71% |
copy from gdb/testsuite/gdb.multi/watchpoint-multi.c |
copy to gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c |
index 51697b0b3e34a1dc7725c281b247de4bb49575b5..85fb2dd3e8c6f83a2774bdfa821db32b62460d83 100644 |
--- a/gdb/testsuite/gdb.multi/watchpoint-multi.c |
+++ b/gdb/testsuite/gdb.threads/dlopen-libpthread-lib.c |
@@ -1,6 +1,6 @@ |
/* This testcase is part of GDB, the GNU debugger. |
- Copyright 2012 Free Software Foundation, Inc. |
+ Copyright 2011-2013 Free Software Foundation, Inc. |
This program is free software; you can redistribute it and/or modify |
it under the terms of the GNU General Public License as published by |
@@ -18,34 +18,23 @@ |
#include <pthread.h> |
#include <assert.h> |
-static volatile int a, b, c; |
- |
-static void |
-marker_exit (void) |
-{ |
- a = 1; |
-} |
- |
static void * |
-start (void *arg) |
+tfunc (void *arg) |
{ |
- b = 2; |
- c = 3; |
+ void (*notifyp) (void) = arg; |
- return NULL; |
+ notifyp (); |
} |
-int |
-main (void) |
+void |
+f (void (*notifyp) (void)) |
{ |
- pthread_t thread; |
+ pthread_t t; |
int i; |
- i = pthread_create (&thread, NULL, start, NULL); |
- assert (i == 0); |
- i = pthread_join (thread, NULL); |
+ i = pthread_create (&t, NULL, tfunc, notifyp); |
assert (i == 0); |
- marker_exit (); |
- return 0; |
+ i = pthread_join (t, NULL); |
+ assert (i == 0); |
} |