| 41 | }; |
| 42 | |
| 43 | TEST(ErasureCodeShec, thread) |
| 44 | { |
| 45 | TestParam param1, param2, param3, param4, param5; |
| 46 | param1.k = "6"; |
| 47 | param1.m = "4"; |
| 48 | param1.c = "3"; |
| 49 | param1.w = "8"; |
| 50 | |
| 51 | param2.k = "4"; |
| 52 | param2.m = "3"; |
| 53 | param2.c = "2"; |
| 54 | param2.w = "16"; |
| 55 | |
| 56 | param3.k = "10"; |
| 57 | param3.m = "8"; |
| 58 | param3.c = "4"; |
| 59 | param3.w = "32"; |
| 60 | |
| 61 | param4.k = "5"; |
| 62 | param4.m = "5"; |
| 63 | param4.c = "5"; |
| 64 | param4.w = "8"; |
| 65 | |
| 66 | param5.k = "9"; |
| 67 | param5.m = "9"; |
| 68 | param5.c = "6"; |
| 69 | param5.w = "16"; |
| 70 | |
| 71 | pthread_t tid1, tid2, tid3, tid4, tid5; |
| 72 | pthread_create(&tid1, NULL, thread1, (void*) ¶m1); |
| 73 | std::cout << "thread1 start " << std::endl; |
| 74 | pthread_create(&tid2, NULL, thread1, (void*) ¶m2); |
| 75 | std::cout << "thread2 start " << std::endl; |
| 76 | pthread_create(&tid3, NULL, thread1, (void*) ¶m3); |
| 77 | std::cout << "thread3 start " << std::endl; |
| 78 | pthread_create(&tid4, NULL, thread1, (void*) ¶m4); |
| 79 | std::cout << "thread4 start " << std::endl; |
| 80 | pthread_create(&tid5, NULL, thread1, (void*) ¶m5); |
| 81 | std::cout << "thread5 start " << std::endl; |
| 82 | |
| 83 | pthread_join(tid1, NULL); |
| 84 | pthread_join(tid2, NULL); |
| 85 | pthread_join(tid3, NULL); |
| 86 | pthread_join(tid4, NULL); |
| 87 | pthread_join(tid5, NULL); |
| 88 | } |
| 89 | |
| 90 | IGNORE_DEPRECATED |
| 91 | void* thread1(void* pParam) |
nothing calls this directly
no test coverage detected