Changeset 79

Show
Ignore:
Timestamp:
06/27/10 08:15:56 (23 months ago)
Author:
jc.lefebvre
Message:

Corrected a bug in the Thread_PThread class which occurred when a thread already owned the thread's mutex while an another tried to send a signal to it (this is exactly the same bug as the one from Thread_Win previously).

Location:
trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/nCore/Thread_PThread.cpp

    r67 r79  
    163163  // acquire mutex 
    164164  eMutexState = m_Mutex.TryAcquire(); 
    165   if((eMutexState != ThreadMutex::MUTEX_OK) && (eMutexState != ThreadMutex::MUTEX_ALREADYLOCKED)) 
     165  if((eMutexState == ThreadMutex::MUTEX_ALREADYLOCKED) || (eMutexState != ThreadMutex::MUTEX_OK)) 
    166166  { 
    167167    if(bJustTry) 
     
    173173    { 
    174174      eMutexState = m_Mutex.Acquire(); 
    175       if((eMutexState != ThreadMutex::MUTEX_OK) && (eMutexState != ThreadMutex::MUTEX_ALREADYLOCKED)) 
     175      if(eMutexState != ThreadMutex::MUTEX_OK) 
    176176        XTHROWEXCODE(EXCODE_MUTEX_NOTACQUIRED); 
    177  
    178       XASSERT(eMutexState == ThreadMutex::MUTEX_OK); 
    179177    } 
    180178  } 
  • trunk/src/nCore/_nCoreInternal.h

    r78 r79  
    4444//--------------------------------------------------------------------------- 
    4545#define NCORE_BRAND_NAME            "nCore" 
    46 #define NCORE_BRAND_VERSION_STRING  "5.06.0226" // keep this value Version3() compatible ! 
     46#define NCORE_BRAND_VERSION_STRING  "5.06.0229" // keep this value Version3() compatible ! 
    4747#define NCORE_BRAND_WEBLINK         "http://ncore.jcl.name/" 
    4848#define NCORE_BRAND_AUTHOR          "Jean-Charles Lefebvre <jcl@jcl.name>"