Changeset 142 in libcf
- Timestamp:
- 07/19/13 10:46:16 (11 years ago)
- Location:
- trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/cf_debug.c
r136 r142 281 281 * 282 282 * \param ctx 디버그 컨텍스트 283 *284 * \see CF_DEBUG_DESTROY_CTX285 283 */ 286 284 static int … … 306 304 * 307 305 * \return 성공 시, CF_Debug_Ctx 형태의 컨텍스트; 실패 시, NULL 308 * \see CF_DEBUG_CREATE_CTX 306 * 307 * \param ctx 디버그 컨텍스트 309 308 */ 310 309 static int … … 343 342 * 344 343 * \return 성공 시, CF_OK; 실패 시, 오류 코드 345 *346 * \see CF_Debug_Finalize347 344 */ 348 345 int … … 380 377 * \param func 함수 이름 381 378 * \param line 라인 넘버 382 *383 * \see CF_Debug_LeaveFunction384 379 */ 385 380 int … … 403 398 * 404 399 * \return 성공 시, CF_OK; 실패 시, 오류 코드 405 *406 * \see CF_Debug_EnterFunction407 400 */ 408 401 int -
trunk/src/cf_log.c
r137 r142 246 246 * 247 247 * \param ctx 로그 컨텍스트 248 *249 * \see CF_Log_UnsetMultiThread250 248 */ 251 249 static int … … 268 266 * 269 267 * \param ctx 로그 컨텍스트 270 *271 * \see CF_Log_SetMultiThread272 268 */ 273 269 static int … … 474 470 * 475 471 * \remarks 반드시 먼저 초기화 해야하며, 초기화 시에 주어진 번호보다 작은 아이디 넘버를 사용 476 *477 * \see CF_LOG_OPEN, CF_Log_CreateCtx478 472 */ 479 473 static int … … 498 492 * 499 493 * \remarks 아이디 넘버에 해당하는 컨텍스트가 해제되므로 주의 500 *501 * \see CF_LOG_CLOSE, CF_Log_DestroyCtx502 494 */ 503 495 static int -
trunk/src/cf_mutex.c
r128 r142 29 29 MUTEX_TYPE mid; 30 30 } CF_MUTEX_CTX; 31 32 static int33 CF_Mutex_Local_Close (MUTEX_TYPE mid)34 {35 #if defined(_WIN32) || defined(_WIN64)36 if (mid == NULL)37 return CF_ERROR_MUTEX_INVALID_ARGS;38 39 CloseHandle (mid);40 #else41 pthread_mutex_destroy (&mid);42 #endif43 44 return CF_OK;45 }46 31 47 32 /** … … 105 90 ASSERT_MUTEX_CTX (ctx); 106 91 107 CF_Mutex_Local_Close (context->mid); 92 #if defined(_WIN32) || defined(_WIN64) 93 if (context->mid == NULL) 94 return CF_ERROR_MUTEX_INVALID_ARGS; 95 96 CloseHandle (context->mid); 97 #else 98 pthread_mutex_destroy (&context->mid); 99 #endif 100 108 101 free (context); 109 102 -
trunk/src/cf_socket.c
r128 r142 484 484 * 485 485 * \param sock 서버 소켓 486 *487 * \see CF_Socket_HostInfo488 486 */ 489 487 int -
trunk/src/cf_thread.c
r128 r142 15 15 # include <process.h> 16 16 # define THREAD_TYPE HANDLE 17 # define MUTEX_TYPE HANDLE18 17 # define THREAD_RETURN unsigned long /**< 스레드 워커 함수 반환 형 */ 19 18 # define THREAD_CALL __stdcall … … 21 20 # include <pthread.h> 22 21 # define THREAD_TYPE pthread_t 23 # define MUTEX_TYPE pthread_mutex_t24 22 # define THREAD_RETURN void * /**< 스레드 워커 함수 반환 형 */ 25 23 # define THREAD_CALL … … 38 36 void * arg; 39 37 } CF_THREAD_CTX; 40 41 static int42 CF_Thread_Local_Close (THREAD_TYPE tid)43 {44 #if defined(_WIN32) || defined(_WIN64)45 if (tid == NULL)46 return CF_ERROR_THREAD_INVALID_ARGS;47 48 CloseHandle (tid);49 #endif50 51 return CF_OK;52 }53 38 54 39 /** … … 159 144 ASSERT_THREAD_CTX (ctx); 160 145 161 CF_Thread_Local_Close (context->tid); 146 #if defined(_WIN32) || defined(_WIN64) 147 if (context->tid == NULL) 148 return CF_ERROR_THREAD_INVALID_ARGS; 149 150 CloseHandle (context->tid); 151 #endif 162 152 free (context); 163 153
Note:
See TracChangeset
for help on using the changeset viewer.