Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: gdb/testsuite/gdb.threads/manythreads.c

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* Manythreads test program. 1 /* Manythreads test program.
2 Copyright 2004, 2006-2012 Free Software Foundation, Inc. 2 Copyright 2004-2013 Free Software Foundation, Inc.
3 3
4 Written by Jeff Johnston <jjohnstn@redhat.com> 4 Written by Jeff Johnston <jjohnstn@redhat.com>
5 Contributed by Red Hat 5 Contributed by Red Hat
6 6
7 This file is part of GDB. 7 This file is part of GDB.
8 8
9 This program is free software; you can redistribute it and/or modify 9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by 10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or 11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version. 12 (at your option) any later version.
13 13
14 This program is distributed in the hope that it will be useful, 14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details. 17 GNU General Public License for more details.
18 18
19 You should have received a copy of the GNU General Public License 19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
21 21
22 #include <pthread.h> 22 #include <pthread.h>
23 #ifdef DEBUG
23 #include <stdio.h> 24 #include <stdio.h>
25 #endif
24 #include <limits.h> 26 #include <limits.h>
25 27
26 void * 28 void *
27 thread_function (void *arg) 29 thread_function (void *arg)
28 { 30 {
29 int x = * (int *) arg; 31 int x = * (int *) arg;
30 32
33 #ifdef DEBUG
31 printf ("Thread <%d> executing\n", x); 34 printf ("Thread <%d> executing\n", x);
35 #endif /* DEBUG */
32 36
33 return NULL; 37 return NULL;
34 } 38 }
35 39
36 int 40 int
37 main (int argc, char **argv) 41 main (int argc, char **argv)
38 { 42 {
39 pthread_attr_t attr; 43 pthread_attr_t attr;
40 pthread_t threads[256]; 44 pthread_t threads[256];
41 int args[256]; 45 int args[256];
(...skipping 18 matching lines...) Expand all
60 for (j = 0; j < 256; ++j) 64 for (j = 0; j < 256; ++j)
61 { 65 {
62 pthread_join (threads[j], NULL); 66 pthread_join (threads[j], NULL);
63 } 67 }
64 } 68 }
65 69
66 pthread_attr_destroy (&attr); 70 pthread_attr_destroy (&attr);
67 71
68 return 0; 72 return 0;
69 } 73 }
OLDNEW
« no previous file with comments | « gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp ('k') | gdb/testsuite/gdb.threads/manythreads.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698