about summary refs log tree commit diff
path: root/linuxthreads/Examples/ex3.c
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads/Examples/ex3.c')
-rw-r--r--linuxthreads/Examples/ex3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linuxthreads/Examples/ex3.c b/linuxthreads/Examples/ex3.c
index 8005200eff..b80b323a33 100644
--- a/linuxthreads/Examples/ex3.c
+++ b/linuxthreads/Examples/ex3.c
@@ -35,7 +35,7 @@ int main(int argc, char ** argv)
 
   /* Create the searching threads */
   for (started=0; started<NUM_THREADS; started++)
-    pthread_create(&threads[started], NULL, search, (void *)pid);
+    pthread_create(&threads[started], NULL, search, (void *) (long int) pid);
 
   /* Wait for (join) all the searching threads */
   for (i=0; i<NUM_THREADS; i++)
@@ -66,7 +66,7 @@ void print_it(void *arg)
 
 void *search(void *arg)
 {
-  int num = (int) arg;
+  int num = (long int) arg;
   int i, j, ntries;
   pthread_t tid;