Re: [PATCH] Self-contained pthread_spinlock_t for RTEMS

2016-11-17 Thread Sebastian Huber
This is a Newlib patch. There are some open questions. Should we allow nesting? Which degree of error checks vs. performance do we want? How do we deal with lock profiling? Is it all right to forbid blocking calls inside the pthread spinlock critical section? Do we want to support trylock (

[PATCH] Self-contained pthread_spinlock_t for RTEMS

2016-11-17 Thread Sebastian Huber
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 ad