Changeset 125 in libcf for trunk/test/thread.c


Ignore:
Timestamp:
06/12/13 13:44:25 (11 years ago)
Author:
cheese
Message:

#1 fix mutex bugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/thread.c

    r122 r125  
    1010
    1111int worker (void * arg) {
    12     if (CF_Mutex_Lock (&globalMutex) < 0) { // for critical section
     12    if (CF_Mutex_Lock (globalMutex) < 0) { // for critical section
    1313        // error
    1414    }
     
    1616    fprintf (stderr, "here is critical section !\n");
    1717
    18     if (CF_Mutex_Unlock (&globalMutex) < 0) { // for critical section
     18    if (CF_Mutex_Unlock (globalMutex) < 0) { // for critical section
    1919        // error
    2020    }
Note: See TracChangeset for help on using the changeset viewer.