forked from Imagelibrary/rtems
SMP: Optimize ticket lock implementation
This reverts the relevant part of commit
da06fe948c. The acquire/release order is
superfluous for the next ticket increment. The mutual exclusion is
guaranteed by the acquire load from and release store to the next
serving atomic variable.
This commit is contained in:
@@ -277,7 +277,7 @@ static inline void _SMP_ticket_lock_Do_acquire(
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
my_ticket =
|
my_ticket =
|
||||||
_Atomic_Fetch_add_uint( &lock->next_ticket, 1U, ATOMIC_ORDER_ACQ_REL );
|
_Atomic_Fetch_add_uint( &lock->next_ticket, 1U, ATOMIC_ORDER_RELAXED );
|
||||||
|
|
||||||
#if defined( RTEMS_PROFILING )
|
#if defined( RTEMS_PROFILING )
|
||||||
now_serving =
|
now_serving =
|
||||||
|
|||||||
Reference in New Issue
Block a user