Changeset 109 in libcf for trunk/src/cf_thread.c
- Timestamp:
- 06/04/13 14:25:10 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/cf_thread.c
r85 r109 65 65 */ 66 66 int 67 CF_Thread_Create (CF_Thread* threadID,68 69 void* arg)67 CF_Thread_CreateCtx (CF_Thread_Ctx * threadID, 68 CF_Thread_Function callback, 69 void * arg) 70 70 { 71 71 int result = 0; … … 106 106 *threadID = (THREAD_TYPE *) calloc (sizeof (THREAD_TYPE), 1); 107 107 if (*threadID == NULL) 108 return CF_ERROR_THREAD_ ALLOC;108 return CF_ERROR_THREAD_CREATE_CTX; 109 109 110 110 result = pthread_create ((THREAD_TYPE *) *threadID, attr, f, arg); 111 111 if (result) 112 112 { 113 CF_Thread_ Release(threadID);113 CF_Thread_DestroyCtx (threadID); 114 114 return CF_ERROR_THREAD_CREATE; 115 115 } … … 129 129 */ 130 130 int 131 CF_Thread_ Release (CF_Thread* threadID)131 CF_Thread_DestroyCtx (CF_Thread_Ctx * threadID) 132 132 { 133 133 ASSERT_THREAD (*threadID); … … 144 144 */ 145 145 int 146 CF_Thread_Join (CF_Thread * threadID)146 CF_Thread_Join (CF_Thread_Ctx * threadID) 147 147 { 148 148 ASSERT_THREAD (*threadID); … … 168 168 */ 169 169 int 170 CF_Mutex_Create (CF_Mutex * mutex)170 CF_Mutex_CreateCtx (CF_Mutex_Ctx * mutex) 171 171 { 172 172 int result = 0; … … 197 197 */ 198 198 int 199 CF_Mutex_Destory (CF_Mutex * mutex)199 CF_Mutex_DestoryCtx (CF_Mutex_Ctx * mutex) 200 200 { 201 201 ASSERT_MUTEX (*mutex); … … 216 216 */ 217 217 int 218 CF_Mutex_Lock (CF_Mutex * mutex)218 CF_Mutex_Lock (CF_Mutex_Ctx * mutex) 219 219 { 220 220 ASSERT_MUTEX (*mutex); … … 237 237 */ 238 238 int 239 CF_Mutex_Unlock (CF_Mutex * mutex)239 CF_Mutex_Unlock (CF_Mutex_Ctx * mutex) 240 240 { 241 241 ASSERT_MUTEX (*mutex);
Note:
See TracChangeset
for help on using the changeset viewer.