View Single Post

   
  #8 (permalink)  
Old 02-13-2008, 02:25 PM
Ian Collins
 
Posts: n/a
Default Re: Posix mutex working in Linux but not Solaris

Andrew Gabriel wrote:
> Cheng <cheng.stillsea@gmail.com> writes:
>
>> void
>> posixMutex::lock()
>> {
>> if (m_dontLock)
>> return;
>>
>> threadID thisthreadID = getThisThreadID();
>>
>> if (isProcessLocked() && lockedBy() == thisthreadID)
>> {
>> m_state.m_lockCount++;

>
> What? It's fiddling around inside the mutex.
> How did you even get this to compile on Solaris?
>


Look again, here he fiddles with m_state

>> int retVal = pthread_mutex_lock(&m_mutex);


here he locks m_mutex.

--
Ian Collins.
Reply With Quote