]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/testsuite/gdb.threads/pthreads.c
Update years in copyright notice for the GDB files.
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.threads / pthreads.c
index 3b31eb4b1c6e9eb4d1f7cd2e77f18c1dc9fbd716..8b2862e0cdfb88cf6baee01d9b0c3d8a41f498b2 100644 (file)
@@ -1,5 +1,5 @@
 /* Pthreads test program.
-   Copyright 1996, 2002, 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
+   Copyright 1996-2013 Free Software Foundation, Inc.
 
    Written by Fred Fish of Cygnus Support
    Contributed by Cygnus Support
@@ -72,10 +72,10 @@ thread1 (void *arg)
   int i;
   int z = 0;
 
-  if (verbose) printf ("thread1 (%0x) ; pid = %d\n", arg, getpid ());
+  if (verbose) printf ("thread1 (%0lx) ; pid = %d\n", (long) arg, getpid ());
   for (i=1; i <= 10000000; i++)
     {
-      if (verbose) printf("thread1 %d\n", pthread_self ());
+      if (verbose) printf("thread1 %ld\n", (long) pthread_self ());
       z += i;
       common_routine (1);
       sleep(1);
@@ -89,10 +89,10 @@ thread2 (void * arg)
   int i;
   int k = 0;
 
-  if (verbose) printf ("thread2 (%0x) ; pid = %d\n", arg, getpid ());
+  if (verbose) printf ("thread2 (%0lx) ; pid = %d\n", (long) arg, getpid ());
   for (i=1; i <= 10000000; i++)
     {
-      if (verbose) printf("thread2 %d\n", pthread_self ());
+      if (verbose) printf("thread2 %ld\n", (long) pthread_self ());
       k += i;
       common_routine (2);
       sleep(1);
@@ -145,7 +145,7 @@ main(argc, argv)
       perror ("pthread_create 1");
       exit (1);
     }
-  if (verbose) printf ("Made thread %d\n", tid1);
+  if (verbose) printf ("Made thread %ld\n", (long) tid1);
   sleep (1);
 
   if (pthread_create (&tid2, PTHREAD_CREATE_NULL_ARG2, thread2, (void *) 0xdeadbeef))
@@ -153,13 +153,13 @@ main(argc, argv)
       perror ("pthread_create 2");
       exit (1);
     }
-  if (verbose) printf("Made thread %d\n", tid2);
+  if (verbose) printf("Made thread %ld\n", (long) tid2);
 
   sleep (1);
 
   for (j = 1; j <= 10000000; j++)
     {
-      if (verbose) printf("top %d\n", pthread_self ());
+      if (verbose) printf("top %ld\n", (long) pthread_self ());
       common_routine (0);
       sleep(1);
       t += j;