summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxspin02/psxspin02.scn (unfollow)
Commit message (Collapse)AuthorFilesLines
2016-11-23posix: Add self-contained pthread spinlockSebastian Huber1-8/+0
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 <sys/_pthreadtypes.h>. 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: https://github.com/linux-test-project/ltp/blob/master/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-2.c There is only limited support for profiling on SMP configurations. Delete CORE spinlock implementation. Update #2674.
2009-07-202009-07-19 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-0/+8
* Makefile.am, configure.ac: Add psxspin02 to exercise case where trylock is unable to obtain the spinlock and that attempting to unlock a spinlock from a thread which did not lock it works as expected. * psxspin02/.cvsignore, psxspin02/Makefile.am, psxspin02/main.c, psxspin02/psxspin02.doc, psxspin02/psxspin02.scn, psxspin02/test.c: New files.