| 36 | } |
| 37 | |
| 38 | int main(void) |
| 39 | { |
| 40 | int cpu_flags1; |
| 41 | int cpu_flags2; |
| 42 | int ret; |
| 43 | pthread_t thread1; |
| 44 | pthread_t thread2; |
| 45 | |
| 46 | if ((ret = pthread_create(&thread1, NULL, thread_main, &cpu_flags1))) { |
| 47 | fprintf(stderr, "pthread_create failed: %s.\n", strerror(ret)); |
| 48 | return 1; |
| 49 | } |
| 50 | if ((ret = pthread_create(&thread2, NULL, thread_main, &cpu_flags2))) { |
| 51 | fprintf(stderr, "pthread_create failed: %s.\n", strerror(ret)); |
| 52 | return 1; |
| 53 | } |
| 54 | pthread_join(thread1, NULL); |
| 55 | pthread_join(thread2, NULL); |
| 56 | |
| 57 | if (cpu_flags1 < 0) |
| 58 | return 2; |
| 59 | if (cpu_flags2 < 0) |
| 60 | return 2; |
| 61 | if (cpu_flags1 != cpu_flags2) |
| 62 | return 3; |
| 63 | |
| 64 | return 0; |
| 65 | } |
nothing calls this directly
no test coverage detected