[PATCH] Self-contained pthread_spinlock_t for RTEMS
Corinna Vinschen
vinschen@redhat.com
Thu Nov 24 15:59:00 GMT 2016
On Nov 24 10:58, Sebastian Huber wrote:
> 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
Patch applied.
Thanks,
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20161124/4f48a052/attachment.sig>
More information about the Newlib
mailing list