Changeset 122 in libcf for trunk/test/log.c
- Timestamp:
- 06/12/13 11:05:07 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/log.c
r121 r122 85 85 for (i = 0 ; i < 10 ; i++) 86 86 { 87 if (CF_Thread_Create (&tid[i], test_log_mt, &i) < 0)87 if (CF_Thread_CreateCtx (&tid[i], test_log_mt, &i) < 0) 88 88 { 89 89 CF_DEBUG_PRINT (stderr, "failed to create %dth thread\n", i); … … 94 94 for (i = 0 ; i < 10 ; i++) 95 95 { 96 if (CF_Thread_Join (&tid[i]) < 0) 96 if (CF_Thread_Start (tid[i]) < 0) 97 { 98 CF_DEBUG_PRINT (stderr, "failed to start %dth thread\n", i); 99 return -3; 100 } 101 } 102 103 for (i = 0 ; i < 10 ; i++) 104 { 105 if (CF_Thread_Join (tid[i]) < 0) 97 106 CF_DEBUG_PRINT (stderr, "failed to join %dth thread\n", i); 98 if (CF_Thread_DestroyCtx ( &tid[i]) < 0)107 if (CF_Thread_DestroyCtx (tid[i]) < 0) 99 108 CF_DEBUG_PRINT (stderr, "failed to release %dth thread\n", i); 100 109 } 101 110 102 if (CF_Mutex_DestoryCtx ( &globalMutex) < 0) {111 if (CF_Mutex_DestoryCtx (globalMutex) < 0) { 103 112 // error 104 113 }
Note:
See TracChangeset
for help on using the changeset viewer.