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. |