| 71 | } |
| 72 | |
| 73 | void CreateThread(int i) { |
| 74 | pthread_attr_t attr; |
| 75 | pthread_attr_init(&attr); |
| 76 | pthread_attr_setstacksize(&attr, 4*1024); |
| 77 | int rc = pthread_create(&thread[i], &attr, ThreadMain, 0); |
| 78 | if (rc != 0 || thread[i] == 0) { |
| 79 | printf("Failed to create thread!\n"); |
| 80 | } |
| 81 | pthread_attr_destroy(&attr); |
| 82 | } |
| 83 | |
| 84 | int main() { |
| 85 | printf("Workers: %d\n", WORKERS); |
no test coverage detected