diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-11-24 10:58:35 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2016-11-24 16:57:51 +0100 |
commit | 724e21493ab48794336f3d97152aeaa1fe3adbee (patch) | |
tree | f38547278c44613b886805ea3898c2f0c2ce99f4 /newlib/libc/sys/rtems/crt0.c | |
parent | 1c545411720f11190e43eca59c0931402f5f62f8 (diff) | |
download | cygnal-724e21493ab48794336f3d97152aeaa1fe3adbee.tar.gz cygnal-724e21493ab48794336f3d97152aeaa1fe3adbee.tar.bz2 cygnal-724e21493ab48794336f3d97152aeaa1fe3adbee.zip |
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>
Diffstat (limited to 'newlib/libc/sys/rtems/crt0.c')
0 files changed, 0 insertions, 0 deletions