| 48 | } |
| 49 | |
| 50 | int main(int argc, char* argv[]) |
| 51 | { |
| 52 | pthread_t thread[2]; |
| 53 | |
| 54 | for (int i = 0; i < sizeof(thread)/sizeof(thread[0]); i++) { |
| 55 | int ret = pthread_create(&thread[i], NULL, &fillTable, NULL); |
| 56 | if (ret) { |
| 57 | fprintf(stderr, "Failed to create thread %d: %d\n", i, ret); |
| 58 | return 1; |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | for (int i = 0; i < sizeof(thread)/sizeof(thread[0]); i++) { |
| 63 | int ret = pthread_join(thread[i], NULL); |
| 64 | if (ret != 0) { |
| 65 | fprintf(stderr, "Failed to join thread %d: %d\n", i, ret); |
| 66 | return 1; |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | return 0; |
| 71 | } |
nothing calls this directly
no outgoing calls
no test coverage detected