4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-30 11:00:41 +08:00
Sebastian Huber 724e21493a Self-contained pthread_spinlock_t for RTEMS
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.

See also:

https://devel.rtems.org/ticket/2674

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:

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

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-11-24 16:57:51 +01:00
..
2016-07-04 17:13:55 +01:00
2016-04-15 14:51:39 +02:00
2016-07-04 14:17:10 +01:00
2016-07-04 17:13:55 +01:00