Experimental Physics and Industrial Control System
|
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
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
- 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
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
|
ANJ, 02 Feb 2012 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
·
Download
·
Search
·
IRMIS
·
Talk
·
Documents
·
Links
·
Licensing
·
|