aboutsummaryrefslogtreecommitdiff
path: root/libgcc/config/gthr-vxworks.h
diff options
context:
space:
mode:
authorRasmus Villemoes <rv@rasmusvillemoes.dk>2018-10-30 09:33:04 +0100
committerRasmus Villemoes <villemoes@gcc.gnu.org>2018-10-30 08:33:04 +0000
commitbe7b071e9e99c4958acfa0f9c8dab79cd30d2176 (patch)
tree075a8292791c3ff502fef97aeace1d1d8e574c58 /libgcc/config/gthr-vxworks.h
parent9eeb0b97a6196416821d304816469cbe830d2027 (diff)
downloadgcc-be7b071e9e99c4958acfa0f9c8dab79cd30d2176.zip
gcc-be7b071e9e99c4958acfa0f9c8dab79cd30d2176.tar.gz
gcc-be7b071e9e99c4958acfa0f9c8dab79cd30d2176.tar.bz2
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
Diffstat (limited to 'libgcc/config/gthr-vxworks.h')
-rw-r--r--libgcc/config/gthr-vxworks.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libgcc/config/gthr-vxworks.h b/libgcc/config/gthr-vxworks.h
index e43253b..e974aa7 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;
}