Changeset 21 in libcf for trunk/src/cf_thread.c


Ignore:
Timestamp:
02/01/13 17:46:09 (11 years ago)
Author:
cheese
Message:

#1 add test code for multi-threading, socket and multi-threaded logging

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/cf_thread.c

    r8 r21  
    2727
    2828int
    29 CF_CLOSE_CTX (void * ctx)
     29CF_Thread_Local_Close (void * ctx)
    3030{
    3131#ifdef _WIN32
     
    6767    CHECK_INVALID_THREAD (*threadID);
    6868
    69     CF_CLOSE_CTX (*threadID);
     69    CF_Thread_Local_Close (*threadID);
    7070
    7171    return CF_OK;
     
    8080    WaitForSingleObject ((THREAD_TYPE) *threadID, INFINITE);
    8181#else
    82     int status;
    83     pthread_join (*((THREAD_TYPE *) *threadID), (void *)&status);
     82    int status = 0;
     83    pthread_join (*((THREAD_TYPE *) *threadID), &status);
    8484#endif
    8585
     
    114114    CHECK_INVALID_MUTEX (*mutex);
    115115
    116     CF_CLOSE_CTX (*mutex);
     116    CF_Thread_Local_Close (*mutex);
    117117
    118118    return CF_OK;
Note: See TracChangeset for help on using the changeset viewer.