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

RTEMS trac trac at rtems.org
Wed Nov 23 11:55:03 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           |  Resolution:
 Keywords:                   |

Comment (by Sebastian Huber <sebastian.huber@…>):

 In [changeset:"c42be504c92d76d2e06d0fc8ebd05fc913376d2d/rtems"]:
 #!CommitTicketReference repository="rtems"
 posix: Add self-contained pthread spinlock

 Turn pthread_spinlock_t into a self-contained object.  On uni-processor
 configurations, interrupts are disabled in the lock/trylock operations
 and the previous interrupt status is restored in the corresponding
 unlock operations.  On SMP configurations, a ticket lock is a acquired
 and released in addition.

 The self-contained pthread_spinlock_t object is defined by Newlib in

 typedef struct {
   struct _Ticket_lock_Control _lock;
   __uint32_t                  _interrupt_state;
 } pthread_spinlock_t;

 This implementation is simple and efficient.  However, this test case of
 the Linux Test Project would fail due to call of printf() and sleep()
 during spin lock ownership:


 There is only limited support for profiling on SMP configurations.

 Delete CORE spinlock implementation.

 Update #2674.

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

More information about the bugs mailing list