Changeset 122 in libcf for trunk/src/cf_log.c
- Timestamp:
- 06/12/13 11:05:07 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/cf_log.c
r119 r122 52 52 return CF_ERROR_LOG_NOT_MAPPED_ID 53 53 54 #define LOCK_LOG_CTX(__ctx) CF_Mutex_Lock ( &__ctx->mutex)55 #define UNLOCK_LOG_CTX(__ctx) CF_Mutex_Unlock ( &__ctx->mutex)54 #define LOCK_LOG_CTX(__ctx) CF_Mutex_Lock (__ctx->mutex) 55 #define UNLOCK_LOG_CTX(__ctx) CF_Mutex_Unlock (__ctx->mutex) 56 56 57 57 #define LOG_BUFFER_DEFAULT_SIZE 128 * 1024 … … 76 76 77 77 /** 로그 컨텍스트 (CF_Log_Ctx의 구현) */ 78 typedef struct __cf_log_ctx__ { 78 typedef struct __cf_log_ctx__ 79 { 79 80 char path[NAME_LENGTH + 1]; 80 81 int fd; … … 85 86 } CF_LOG_CTX; 86 87 87 typedef struct __cf_log_array__ { 88 typedef struct __cf_log_array__ 89 { 88 90 CF_Log_Ctx * ctxPool; 89 91 int ctxSize; … … 278 280 ASSERT_CTX (ctx); 279 281 280 if (CF_Mutex_DestoryCtx ( &context->mutex) < 0)282 if (CF_Mutex_DestoryCtx (context->mutex) < 0) 281 283 return CF_ERROR_LOG_UNSET_MULTITHREAD; 284 285 context->mutex = NULL; 282 286 283 287 return CF_OK; … … 370 374 CF_File_Close (context->fd); 371 375 372 CF_Mutex_DestoryCtx ( &context->mutex);376 CF_Mutex_DestoryCtx (context->mutex); 373 377 context->mutex = NULL; 374 378 … … 381 385 * \return 성공 시, 로그 컨텍스트; 실패 시, NULL 382 386 * 387 * \param ctx 로그 컨텍스트 주소 383 388 * \param path 로그 파일 경로 384 389 * \param memsize 로그 버퍼 크기 385 * \param ctx 로그 컨텍스트 받을 주소386 390 * 387 391 * \see CF_LOG_DEFAULT_BUFFER, CF_LOG_NO_BUFFER 388 392 */ 389 393 static int 390 CF_Log_CreateCtx ( const char * path,391 const int memsize,392 CF_Log_Ctx * ctx)394 CF_Log_CreateCtx (CF_Log_Ctx * ctx, 395 const char * path, 396 const int memsize) 393 397 { 394 398 int result = 0; … … 580 584 CF_Log_Ctx ctx = NULL; 581 585 582 result = CF_Log_CreateCtx ( path, memsize, &ctx);586 result = CF_Log_CreateCtx (&ctx, path, memsize); 583 587 if (result < 0) 584 588 return result;
Note:
See TracChangeset
for help on using the changeset viewer.