Changeset 149 in libcf
- Timestamp:
- 08/05/13 17:20:57 (11 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/cf_list.c
r128 r149 38 38 CF_NODE * front; 39 39 CF_NODE * rear; 40 } CF_LIST_C TX;40 } CF_LIST_CONTEXT; 41 41 42 42 /** … … 50 50 CF_List_CreateCtx (CF_List_Ctx * ctx) 51 51 { 52 CF_LIST_C TX* context = NULL;52 CF_LIST_CONTEXT * context = NULL; 53 53 54 54 ASSERT_ARGS (ctx == NULL); 55 55 56 context = (CF_LIST_C TX *) calloc (sizeof (CF_LIST_CTX), 1);56 context = (CF_LIST_CONTEXT *) calloc (sizeof (CF_LIST_CONTEXT), 1); 57 57 if (context == NULL) 58 58 return CF_ERROR_DS_CREATE_CTX; … … 73 73 CF_List_DestroyCtx (CF_List_Ctx ctx) 74 74 { 75 CF_LIST_C TX * context = (CF_LIST_CTX*) ctx;75 CF_LIST_CONTEXT * context = (CF_LIST_CONTEXT *) ctx; 76 76 77 77 ASSERT_CTX (ctx); … … 96 96 CF_Traverser * traverser) 97 97 { 98 CF_LIST_C TX * context = (CF_LIST_CTX*) ctx;98 CF_LIST_CONTEXT * context = (CF_LIST_CONTEXT *) ctx; 99 99 100 100 ASSERT_CTX (ctx); … … 118 118 CF_Traverser * traverser) 119 119 { 120 CF_LIST_C TX * context = (CF_LIST_CTX*) ctx;120 CF_LIST_CONTEXT * context = (CF_LIST_CONTEXT *) ctx; 121 121 122 122 ASSERT_CTX (ctx); … … 149 149 const void * element) 150 150 { 151 CF_LIST_C TX * context = (CF_LIST_CTX*) ctx;151 CF_LIST_CONTEXT * context = (CF_LIST_CONTEXT *) ctx; 152 152 CF_NODE * node = NULL; 153 153 CF_NODE * newnode = NULL; … … 220 220 CF_Traverser * traverser) 221 221 { 222 CF_LIST_C TX * context = (CF_LIST_CTX*) ctx;222 CF_LIST_CONTEXT * context = (CF_LIST_CONTEXT *) ctx; 223 223 CF_NODE * node = NULL; 224 224 … … 356 356 CF_List_GetSize (CF_List_Ctx ctx) 357 357 { 358 CF_LIST_C TX * context = (CF_LIST_CTX*) ctx;358 CF_LIST_CONTEXT * context = (CF_LIST_CONTEXT *) ctx; 359 359 360 360 ASSERT_CTX (ctx); -
trunk/src/cf_log.c
r147 r149 82 82 size_t length; /* data length in current */ 83 83 CF_Mutex_Ctx mutex; 84 } CF_LOG_C TX;84 } CF_LOG_CONTEXT; 85 85 86 86 typedef struct __cf_log_array__ … … 182 182 183 183 static int 184 CF_Log_Local_Flush (CF_LOG_C TX* ctx)184 CF_Log_Local_Flush (CF_LOG_CONTEXT * ctx) 185 185 { 186 186 if (CF_File_Write (ctx->fd, ctx->buffer, ctx->length) < 0) … … 204 204 */ 205 205 /* static */int 206 CF_Log_Local_Push (CF_LOG_C TX* ctx,207 const char * buffer,208 const size_t demandSize)206 CF_Log_Local_Push (CF_LOG_CONTEXT * ctx, 207 const char * buffer, 208 const size_t demandSize) 209 209 { 210 210 int result = CF_OK; … … 250 250 CF_Log_SetMultiThread (CF_Log_Ctx ctx) 251 251 { 252 CF_LOG_C TX * context = (CF_LOG_CTX*) ctx;252 CF_LOG_CONTEXT * context = (CF_LOG_CONTEXT *) ctx; 253 253 254 254 ASSERT_CTX (ctx); … … 270 270 CF_Log_UnsetMultiThread (CF_Log_Ctx ctx) 271 271 { 272 CF_LOG_C TX * context = (CF_LOG_CTX*) ctx;272 CF_LOG_CONTEXT * context = (CF_LOG_CONTEXT *) ctx; 273 273 274 274 ASSERT_CTX (ctx); … … 299 299 { 300 300 #define BUF_LEN 16 * 1024 301 CF_LOG_C TX * context = (CF_LOG_CTX*) ctx;301 CF_LOG_CONTEXT * context = (CF_LOG_CONTEXT *) ctx; 302 302 char buffer[BUF_LEN + 1] = {0x00,}; 303 303 char datetime[LOG_DATETIME_LENGTH + 1] = {0x00,}; … … 353 353 CF_Log_FlushCtx (CF_Log_Ctx ctx) 354 354 { 355 CF_LOG_C TX * context = (CF_LOG_CTX*) ctx;355 CF_LOG_CONTEXT * context = (CF_LOG_CONTEXT *) ctx; 356 356 int result = 0; 357 357 … … 375 375 CF_Log_DestroyCtx (CF_Log_Ctx ctx) 376 376 { 377 CF_LOG_C TX * context = (CF_LOG_CTX*) ctx;377 CF_LOG_CONTEXT * context = (CF_LOG_CONTEXT *) ctx; 378 378 379 379 ASSERT_CTX (ctx); … … 417 417 : memsize; 418 418 419 CF_LOG_C TX* context = NULL;419 CF_LOG_CONTEXT * context = NULL; 420 420 421 421 if (path == NULL) … … 424 424 TRY 425 425 { 426 context = (CF_LOG_C TX *) calloc (sizeof (CF_LOG_CTX), 1);426 context = (CF_LOG_CONTEXT *) calloc (sizeof (CF_LOG_CONTEXT), 1); 427 427 if (context == NULL) 428 428 { -
trunk/src/cf_mutex.c
r142 r149 28 28 { 29 29 MUTEX_TYPE mid; 30 } CF_MUTEX_C TX;30 } CF_MUTEX_CONTEXT; 31 31 32 32 /** … … 42 42 int result = 0; 43 43 44 CF_MUTEX_C TX* context = NULL;44 CF_MUTEX_CONTEXT * context = NULL; 45 45 46 context = (CF_MUTEX_C TX *) calloc (sizeof (CF_MUTEX_CTX), 1);46 context = (CF_MUTEX_CONTEXT *) calloc (sizeof (CF_MUTEX_CONTEXT), 1); 47 47 if (context == NULL) 48 48 return CF_ERROR_MUTEX_CREATE_CTX; … … 86 86 CF_Mutex_DestoryCtx (CF_Mutex_Ctx ctx) 87 87 { 88 CF_MUTEX_C TX* context = ctx;88 CF_MUTEX_CONTEXT * context = ctx; 89 89 90 90 ASSERT_MUTEX_CTX (ctx); … … 114 114 CF_Mutex_Lock (CF_Mutex_Ctx ctx) 115 115 { 116 CF_MUTEX_C TX* context = ctx;116 CF_MUTEX_CONTEXT * context = ctx; 117 117 118 118 ASSERT_MUTEX_CTX (ctx); … … 137 137 CF_Mutex_Unlock (CF_Mutex_Ctx ctx) 138 138 { 139 CF_MUTEX_C TX* context = ctx;139 CF_MUTEX_CONTEXT * context = ctx; 140 140 141 141 ASSERT_MUTEX_CTX (ctx); -
trunk/src/cf_thread.c
r142 r149 35 35 THREAD_WORKER callback; 36 36 void * arg; 37 } CF_THREAD_C TX;37 } CF_THREAD_CONTEXT; 38 38 39 39 /** … … 51 51 void * arg) 52 52 { 53 CF_THREAD_C TX* context = NULL;53 CF_THREAD_CONTEXT * context = NULL; 54 54 55 context = (CF_THREAD_C TX *) calloc (sizeof (CF_THREAD_CTX), 1);55 context = (CF_THREAD_CONTEXT *) calloc (sizeof (CF_THREAD_CONTEXT), 1); 56 56 if (context == NULL) 57 57 return CF_ERROR_THREAD_CREATE_CTX; … … 86 86 int result = 0; 87 87 88 CF_THREAD_C TX * context = (CF_THREAD_CTX*) ctx;88 CF_THREAD_CONTEXT * context = (CF_THREAD_CONTEXT *) ctx; 89 89 90 90 ASSERT_THREAD_CTX (ctx); … … 140 140 CF_Thread_DestroyCtx (CF_Thread_Ctx ctx) 141 141 { 142 CF_THREAD_C TX * context = (CF_THREAD_CTX*) ctx;142 CF_THREAD_CONTEXT * context = (CF_THREAD_CONTEXT *) ctx; 143 143 144 144 ASSERT_THREAD_CTX (ctx); … … 165 165 CF_Thread_Join (CF_Thread_Ctx ctx) 166 166 { 167 CF_THREAD_C TX * context = (CF_THREAD_CTX*) ctx;167 CF_THREAD_CONTEXT * context = (CF_THREAD_CONTEXT *) ctx; 168 168 169 169 char status[16] = {0x00,};
Note:
See TracChangeset
for help on using the changeset viewer.