aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.threads/schedlock.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2007-09-17 15:38:05 +0000
committerDaniel Jacobowitz <drow@false.org>2007-09-17 15:38:05 +0000
commit18ecae383162b8c1be40030cddd69f12d718c689 (patch)
treee1e055f7aa4c4f513383fa7e888ff949207b64eb /gdb/testsuite/gdb.threads/schedlock.c
parenteff4f95e29ab873b801945b3e6478089b0c1a934 (diff)
downloadgdb-18ecae383162b8c1be40030cddd69f12d718c689.zip
gdb-18ecae383162b8c1be40030cddd69f12d718c689.tar.gz
gdb-18ecae383162b8c1be40030cddd69f12d718c689.tar.bz2
* schedlock.c (NUM): Change to 1.
(main): Use args[0] for the main thread. * schedlock.exp: Only expect two threads. Only issue one pass or fail regardless of the number of threads.
Diffstat (limited to 'gdb/testsuite/gdb.threads/schedlock.c')
-rw-r--r--gdb/testsuite/gdb.threads/schedlock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/testsuite/gdb.threads/schedlock.c b/gdb/testsuite/gdb.threads/schedlock.c
index c1b9069..b364dd4 100644
--- a/gdb/testsuite/gdb.threads/schedlock.c
+++ b/gdb/testsuite/gdb.threads/schedlock.c
@@ -22,7 +22,7 @@
void *thread_function(void *arg); /* Pointer to function executed by each thread */
-#define NUM 5
+#define NUM 1
unsigned int args[NUM+1];
@@ -32,7 +32,7 @@ int main() {
void *thread_result;
long i;
- for (i = 0; i < NUM; i++)
+ for (i = 1; i <= NUM; i++)
{
args[i] = 1;
res = pthread_create(&threads[i],
@@ -42,8 +42,8 @@ int main() {
}
/* schedlock.exp: last thread start. */
- args[i] = 1;
- thread_function ((void *) i);
+ args[0] = 1;
+ thread_function ((void *) 0);
exit(EXIT_SUCCESS);
}