aboutsummaryrefslogtreecommitdiff
path: root/libcc1
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@dacore.com>2020-07-07 02:47:53 -0300
committerOlivier Hainque <hainque@adacore.com>2020-10-14 19:24:45 +0000
commit8f8cba46b89ad16bac2ce58d554c25b54b0e7c7f (patch)
tree22bfa60b5c9cd8ccd75d45a53d2c14caffe1f037 /libcc1
parent93103603fd66a9fcf3ea2d8b52657e4b2496f544 (diff)
downloadgcc-8f8cba46b89ad16bac2ce58d554c25b54b0e7c7f.zip
gcc-8f8cba46b89ad16bac2ce58d554c25b54b0e7c7f.tar.gz
gcc-8f8cba46b89ad16bac2ce58d554c25b54b0e7c7f.tar.bz2
Rework the condition variables support for VxWorks
This change reworks the condition variables support for VxWorks to address the very legit points raised by Rasmus in https://gcc.gnu.org/pipermail/gcc/2020-May/232524.html While some of the issues were taken care of by the use of semFlush, a few others were indeed calling for adjustments. We first considered resorting to the condvarLib library available in VxWorks7. Unfortunately, it is vx7 only and we wanted something working for at least vx 6.9 as well. It also turned out requiring the use of recursive mutexes for condVarWait, which seemed unnecessarily constraining. Instead, this change corrects the sequencing logic in a few places and leverages the semExchange API to ensure the key atomicity requirement on cond_wait operations. 2020-10-14 Alexandre Oliva <oliva@adacore.com> libgcc/ * config/gthr-vxworks-thread.c: Include stdlib.h. (tls_delete_hook): Prototype it. (__gthread_cond_signal): Return early if no waiters. Consume signal in case the semaphore got full. Use semInfoGet instead of kernel-mode-only semInfo. (__gthread_cond_timedwait): Use semExchange. Always take the mutex again before returning. * config/gthr-vxworks-cond.c (__ghtread_cond_wait): Likewise.
Diffstat (limited to 'libcc1')
0 files changed, 0 insertions, 0 deletions