summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3ab86be)
raw | patch | inline | side by side (parent: 3ab86be)
author | vwan@ti.com <vwan@ti.com> | |
Thu, 23 Apr 2015 19:18:33 +0000 (12:18 -0700) | ||
committer | Robert Tivy <rtivy@ti.com> | |
Fri, 24 Apr 2015 20:40:35 +0000 (13:40 -0700) |
pthread_mutex_destroy() is not called at various places in the code base where
pthread_mutex_init() is used to initialize a mutex. We are now adding the
necessary calls to pthread_mutex_destroy().
This addresses SDOCM00114783.
Signed-off-by: VW <vwan@ti.com>
pthread_mutex_init() is used to initialize a mutex. We are now adding the
necessary calls to pthread_mutex_destroy().
This addresses SDOCM00114783.
Signed-off-by: VW <vwan@ti.com>
index 11d6284c0bfc48f4ee4a0dbfc1fa3171d29788aa..6cdd10ae5c0fd72c5a444c2755fa0660bd26dc43 100644 (file)
/*
- * Copyright (c) 2013-2014, Texas Instruments Incorporated
+ * Copyright (c) 2013-2015, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Int GateMutex_delete(GateMutex_Handle * handle)
{
+ GateMutex_Object * obj = (GateMutex_Object *)*handle;
+
if (handle == NULL) {
return GateMutex_E_INVALIDARG;
}
if (*handle == NULL) {
return GateMutex_E_INVALIDARG;
}
+ pthread_mutex_destroy(&(obj->mutex));
free(*handle);
*handle = NULL;
diff --git a/qnx/src/api/MessageQ.c b/qnx/src/api/MessageQ.c
index b303293f4924c2ab64656cbe2a13fec5159465a4..2895cc22889d9798d849bdbbbe91c1d469f19eae 100644 (file)
--- a/qnx/src/api/MessageQ.c
+++ b/qnx/src/api/MessageQ.c
Int status;
MessageQDrv_CmdArgs cmdArgs;
+ pthread_mutex_destroy(&(MessageQ_module->gate));
+
status = MessageQDrv_ioctl (CMD_MESSAGEQ_DESTROY, &cmdArgs);
if (status < 0) {
PRINTVERBOSE1("MessageQ_destroy: API (through IOCTL) failed, \
index 32608ab367e33f84a50e55f78c1d2544f62c358b..145b0cb16e07216e257ddfc538dbcf39cc1b54ca 100644 (file)
Int GateMutex_delete(GateMutex_Handle * handle)
{
+ GateMutex_Object * obj = (GateMutex_Object *)*handle;
+
if (handle == NULL) {
return GateMutex_E_INVALIDARG;
}
if (*handle == NULL) {
return GateMutex_E_INVALIDARG;
}
+ pthread_mutex_destroy(&(obj->mutex));
free(*handle);
*handle = NULL;
diff --git a/qnx/src/ipc3x_dev/ti/syslink/build/Qnx/resmgr/syslink_main.c b/qnx/src/ipc3x_dev/ti/syslink/build/Qnx/resmgr/syslink_main.c
index 3f24b246ac6f44484ce2f83058a955db41f1ed47..388bea3378cbceaf610b9136761ca9120442d3fe 100644 (file)
Osal_printf("IPC: deinit_slave_devices failed %d", status);
}
+ pthread_mutex_destroy(&dev->lock);
+ pthread_mutex_destroy(&dev->firmwareLock);
+
return(status);
}
diff --git a/qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/transports/virtio/VirtQueue.c b/qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/transports/virtio/VirtQueue.c
index 54074f060133639934e9a81050069133e13e1816..c226c9820af4bedb4cdadb990a5eb32eed834063 100644 (file)
VirtQueue_Object * obj = (VirtQueue_Object *)(*vq);
/* Store the VirtQueue locally */
queueRegistry[obj->procId][obj->id%2] = NULL;
+
+ /* Destroy mutex */
+ pthread_mutex_destroy(&obj->mutex);
+
Memory_free(NULL, obj, sizeof(VirtQueue_Object));
*vq = NULL;
numQueues--;
diff --git a/qnx/src/ipc3x_dev/ti/syslink/utils/hlos/knl/NameServer_daemon.c b/qnx/src/ipc3x_dev/ti/syslink/utils/hlos/knl/NameServer_daemon.c
index 03c1a4f4bf48248d989460915512d9a76e02e407..3159feea17216b95a0daaff94ddd081cd1520134 100644 (file)
CIRCLEQ_destruct(&(*handle)->nameList);
+ pthread_mutex_destroy(&(*handle)->gate);
+
free((*handle));
(*handle) = NULL;
}