#2719 closed defect (fixed)

pthread_spin_unlock() returns wrong error status in case the lock is unlocked

Reported by: Sebastian Huber Owned by: Sebastian Huber <sebastian.huber@…>
Priority: normal Milestone: 4.11
Component: unspecified Version: 4.10
Severity: normal Keywords:
Cc: Blocked By:


POSIX recommends the following:

"If an implementation detects that the value specified by the lock argument to pthread_spin_unlock() refers to a spin lock object for which the current thread does not hold the lock, it is recommended that the function should fail and report an [EPERM] error."


In case the lock is unlocked, then there is no owner, thus the executing thread is not the owner of the lock.

Change History (3)

comment:1 Changed on May 25, 2016 at 10:45:43 AM by Sebastian Huber <sebastian.huber@…>

Owner: set to Sebastian Huber <sebastian.huber@…>
Resolution: fixed
Status: newclosed

In 9ec7d492b951efec32520bff7106e21e16e9c74d/rtems:

posix: Fix pthread_spin_unlock() error status

Close #2719.

comment:2 Changed on May 25, 2016 at 10:48:17 AM by Sebastian Huber <sebastian.huber@…>

In 3f72dda6ee518d3ea04341ad4df079ecb1895ef7/rtems:

posix: Fix pthread_spin_unlock() error status

Update #2719.

comment:3 Changed on May 25, 2016 at 10:49:19 AM by Sebastian Huber

Note: See TracTickets for help on using tickets.