[RTEMS Project] #2674: CORE spinlock implementation is next to be useless

RTEMS trac trac at rtems.org
Tue Mar 22 13:27:50 UTC 2016


#2674: CORE spinlock implementation is next to be useless
-----------------------------+------------------
 Reporter:  sebastian.huber  |      Owner:
     Type:  defect           |     Status:  new
 Priority:  normal           |  Milestone:  4.12
Component:  cpukit           |    Version:  4.10
 Severity:  normal           |   Keywords:
-----------------------------+------------------
 Lets assume we have two tasks A and B. Task A acquires a CORE spinlock.
 Now B somehow executes and tries to acquire the same CORE spinlock, then
 no progress can be made.

 Alternative implementation:

 Disable thread dispatching and interrupts while owning the spinlock.
 Forbid blocking calls while owning the spinlock.

 Drawback: The test cases of the Linux Test Project would fail:

 https://github.com/linux-test-
 project/ltp/blob/master/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-2.c

 Optimization: User provided storage space for pthread_spin_t. In line with
 POSIX:

 "Only the object referenced by lock may be used for performing
 synchronization."

 http://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_spin_destroy.html

--
Ticket URL: <http://devel.rtems.org/ticket/2674>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list