From be7b071e9e99c4958acfa0f9c8dab79cd30d2176 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Tue, 30 Oct 2018 09:33:04 +0100 Subject: [PATCH] libgcc: properly destroy mutexes on VxWorks Just as one needs run-time initialization of mutexes, one needs to destroy them properly to allow the OS to release resources associated with the semaphore. From-SVN: r265616 --- libgcc/ChangeLog | 4 ++++ libgcc/config/gthr-vxworks.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 44fe7327ca4..1be4f87fe65 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,7 @@ +2018-10-30 Rasmus Villemoes + + * config/gthr-vxworks.h (__gthread_mutex_destroy): Call semDelete. + 2018-10-25 Martin Liska PR other/87735 diff --git a/libgcc/config/gthr-vxworks.h b/libgcc/config/gthr-vxworks.h index e43253b01c7..e974aa79368 100644 --- a/libgcc/config/gthr-vxworks.h +++ b/libgcc/config/gthr-vxworks.h @@ -63,8 +63,9 @@ __gthread_mutex_init_function (__gthread_mutex_t *mutex) } static inline int -__gthread_mutex_destroy (__gthread_mutex_t * UNUSED(mutex)) +__gthread_mutex_destroy (__gthread_mutex_t *mutex) { + semDelete(*mutex); return 0; }