A problem using pthread_mutex to implement epicsMutex is that pthreads does not
provide a pthread_mutex_lock with a timeout. Thus the only way I see to
implement epicsMutexLockWithTimeout is to do something like
timeleft = timeout;
while(timeleft>0.0) {
if(pthread_mutex_trylock(...)==success) break;
epicsThreadSleep(shortTime);
timeleft -= shortTime;
}
I am not bsure this is a good idea. What do you think?
Marty
- Replies:
- RE: POSIX recursive mutex Jeff Hill
- Navigate by Date:
- Prev:
RE: 3.14 Gateway Performance Kenneth Evans, Jr.
- Next:
RE: POSIX recursive mutex Jeff Hill
- Index:
<2002>
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
- Navigate by Thread:
- Prev:
Re: R3.15 and dbd files Andrew Johnson
- Next:
RE: POSIX recursive mutex Jeff Hill
- Index:
<2002>
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
|