Changes between Initial Version and Version 1 of Ticket #44062, comment 60
- Timestamp:
- Jun 30, 2014, 5:53:02 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #44062, comment 60
initial v1 33 33 #include <pthread.h> 34 34 #include <stdio.h> 35 #include <unistd.h> 35 36 36 37 #define NUM_THREADS 5 … … 39 40 40 41 void * test_thread(void *arg) { 41 return &value; 42 printf("%p\n", &value); 43 sleep(1); 44 return NULL; 42 45 } 43 46 … … 51 54 52 55 for(i=0; i < 5; i++) { 53 void *loc; 54 pthread_join(thread[i], &loc); 55 printf("%p\n", loc); 56 pthread_join(thread[i], NULL); 56 57 } 57 58 … … 62 63 63 64 $ ./a.out 64 0x7f c7b3d0011865 0x7f c7b3e0011866 0x7f c7b3f0011867 0x7f c7b3d0011868 0x7f c7b3c03b2865 0x7fafd84000e8 66 0x7fafd8403b18 67 0x7fafd8403c38 68 0x7fafd8403d58 69 0x7fafd8403e78 69 70 }}}