| 61 | when the threads are cancelled */ |
| 62 | |
| 63 | void print_it(void *arg) |
| 64 | { |
| 65 | int *try = (int *) arg; |
| 66 | pthread_t tid; |
| 67 | |
| 68 | /* Get the calling thread's ID */ |
| 69 | tid = pthread_self(); |
| 70 | |
| 71 | /* Print where the thread was in its search when it was cancelled */ |
| 72 | printf("Thread %lx was canceled on its %d try.\n", tid, *try); |
| 73 | } |
| 74 | |
| 75 | /* This is the search routine that is executed in each thread */ |
| 76 |
nothing calls this directly
no test coverage detected