Experimental Physics and Industrial Control System
|
Hi folks,
Today I did some tests regarding "clean" shutdown of an IOC and found
some unsatisfying results. There seems to be no clean way of destroying
events, mutexes, or message queues, because they all cannot be destroyed
as long as there are threads waiting on them. At least that is the case
on Linux.
Example: One thread is waiting on an event. Whenever it gets signaled,
it does some work on hardware.
At exit I have do shutdown the hardware cleanly. After this time no
thread must try to use it any more. Also I better don't simply kill the
work thread while it is accessing the hardware. (And I probably do not
know all the threads involved). So I prefer to terminate while the
thread has noting to do, i.e. while it is waiting on the event.
I had expected that when I destroy the queue, all pending threads would
wake up and receive an error. This is not the case. Instead I found that
destroying the event failed with "Device or resource busy"
The same is true for mutexes as I tested. Also message queues cannot be
released like this.
Is this a bug or simply "unsupported"?
Any idea what I can do?
Dirk
- Replies:
- Re: cleaning up at exit and waiting threads Eric Norum
- Navigate by Date:
- Prev:
Channel Access in Erlang paper at ICALEPCS 2013 Dennis Nicklaus
- Next:
Re: cleaning up at exit and waiting threads Eric Norum
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
<2013>
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Channel Access in Erlang paper at ICALEPCS 2013 Dennis Nicklaus
- Next:
Re: cleaning up at exit and waiting threads Eric Norum
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
<2013>
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|
ANJ, 20 Apr 2015 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|