Hi folks,
One more bug found. SysRequestMutexSem doesn't work if a timeout
parameter is given.

if (usleep(SEM_WAIT_PERIOD * 1000)) {
                timeout -= SEM_WAIT_PERIOD;
}


usleep returns 0 if ok and -1 if an error occured. Therefore the if
branch will never been reached, and thus timeout will never been
decremented.


if (usleep(SEM_WAIT_PERIOD * 1000) == 0) {
                timeout -= SEM_WAIT_PERIOD;
}

should do. 

I don't know if the case that usleep returns -1 has to be taken care of?
Perhaps this is an really unlikely case.


-- 
Manfred

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to