EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: epicsEvent (posix implementation) bug ?
From: Till Straumann <[email protected]>
To: [email protected]
Cc: [email protected]
Date: Mon, 31 Jan 2011 09:30:48 -0600
On 01/31/2011 03:16 AM, [email protected] wrote:
Removing the thread wakeup FIFO and sharing the wakeup event is
essential for correct scheduling behaviour otherwise a low priority
thread can block a high priority thread on a message queue read even
with priority inheritance enabled.

Of course. But that would change the current semantics (which I
don't necessarily like) from a FIFO to a priority based policy  -
which I also think would be preferable - in addition you need
less resources and do away with the issue that started this
thread. So it's kind of a 'win-win' situation.

t.

EpicsEvent will also need patching to
enable PTHREAD_PRIO_INHERIT, the code is present in EpicsMutex but
EpicsEvent initializes a pthread_mutex directly. I'll nominate this as a
job for the codeathon.

-----Original Message-----
From: [email protected] [mailto:tech-talk-
[email protected]] On Behalf Of Till Straumann
Sent: 29 January 2011 01:57
To: EPICS Techtalk
Subject: epicsEvent (posix implementation) bug ?

If multiple threads block on the same event then the current
implementation (posix) may spuriously wake up more than one thread as
a
result of epicsEventSignal().

This is because the underlying
pthread_cond_signal()/pthread_cond_wait()
explicitly have these same semantics.

IMO it would be a good idea to change epicsEventWait and
epicsEventWaitWithTimeout so that they handle this possible case (and
yield the same semantics as the RTEMS and vxWorks variants).

-- Till




References:
epicsEvent (posix implementation) bug ? Till Straumann
RE: epicsEvent (posix implementation) bug ? james.rowland

Navigate by Date:
Prev: RE: epicsEvent (posix implementation) bug ? james.rowland
Next: Re: epicsEvent (posix implementation) bug ? Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: epicsEvent (posix implementation) bug ? james.rowland
Next: Re: epicsEvent (posix implementation) bug ? Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·