[PATCH v2] rtems: Fix no protocol mutex release

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Jun 3 13:44:10 UTC 2016


On 03/06/16 15:40, Joel Sherrill wrote:
> My concern is that this will break existing programs that used them for
> condition synchronization.

These applications are broken since you can obtain the 
RTEMS_BINARY_SEMAPHORE recursively.

>
> This just requires us to be vigilant to answer questions when things
> break.

Yes.

>
> On Fri, Jun 3, 2016 at 8:37 AM, Sebastian Huber 
> <sebastian.huber at embedded-brains.de 
> <mailto:sebastian.huber at embedded-brains.de>> wrote:
>
>     The Classic binary semaphores without a locking protocol
>     (RTEMS_BINARY_SEMAPHORE) could be released by everyone, e.g. in
>     contrast
>     to the POSIX mutexes (all variants) or the Classic binary
>     semphores with
>     priority inheritance or ceiling there was no owner check in the
>     release
>     path.
>
>     This behaviour was a bit unexpected and not documented.  Add an owner
>     check to the release path.  Update sptests/sp42 accordingly.
>
>     This change has nothing to do with the simple binary semaphores
>     (RTEMS_SIMPLE_BINARY_SEMAPHORE) which have no owner at all.
>
>     Update #2725
>

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.




More information about the devel mailing list