Commit a4403827 authored by Brian Wellington's avatar Brian Wellington

MOre calls to DESTROYLOCK

parent 6714319d
......@@ -15,11 +15,12 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: mutexblock.c,v 1.11 2000/08/26 01:23:16 bwelling Exp $ */
/* $Id: mutexblock.c,v 1.12 2000/08/26 01:31:48 bwelling Exp $ */
#include <config.h>
#include <isc/mutexblock.h>
#include <isc/util.h>
isc_result_t
isc_mutexblock_init(isc_mutex_t *block, unsigned int count) {
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: ratelimiter.c,v 1.16 2000/08/01 01:29:42 tale Exp $ */
/* $Id: ratelimiter.c,v 1.17 2000/08/26 01:31:49 bwelling Exp $ */
#include <config.h>
......@@ -97,7 +97,7 @@ isc_ratelimiter_create(isc_mem_t *mctx, isc_timermgr_t *timermgr,
return (ISC_R_SUCCESS);
free_mutex:
isc_mutex_destroy(&rl->lock);
DESTROYLOCK(&rl->lock);
free_mem:
isc_mem_put(mctx, rl, sizeof(*rl));
return (result);
......@@ -239,7 +239,7 @@ ratelimiter_shutdowncomplete(isc_task_t *task, isc_event_t *event) {
static void
ratelimiter_free(isc_ratelimiter_t *rl) {
isc_mutex_destroy(&rl->lock);
DESTROYLOCK(&rl->lock);
isc_mem_put(rl->mctx, rl, sizeof(*rl));
}
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rwlock.c,v 1.23 2000/08/24 23:26:13 bwelling Exp $ */
/* $Id: rwlock.c,v 1.24 2000/08/26 01:31:50 bwelling Exp $ */
#include <config.h>
......@@ -231,5 +231,5 @@ isc_rwlock_destroy(isc_rwlock_t *rwl) {
rwl->magic = 0;
(void)isc_condition_destroy(&rwl->readable);
(void)isc_condition_destroy(&rwl->writeable);
(void)isc_mutex_destroy(&rwl->lock);
DESTROYLOCK(&rwl->lock);
}
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: task.c,v 1.70 2000/08/24 01:40:46 gson Exp $ */
/* $Id: task.c,v 1.71 2000/08/26 01:31:51 bwelling Exp $ */
/*
* Principal Author: Bob Halley
......@@ -140,7 +140,7 @@ task_finished(isc_task_t *task) {
}
UNLOCK(&manager->lock);
(void)isc_mutex_destroy(&task->lock);
DESTROYLOCK(&task->lock);
task->magic = 0;
isc_mem_put(manager->mctx, task, sizeof *task);
}
......@@ -190,7 +190,7 @@ isc_task_create(isc_taskmgr_t *manager, unsigned int quantum,
UNLOCK(&manager->lock);
if (exiting) {
isc_mutex_destroy(&task->lock);
DESTROYLOCK(&task->lock);
isc_mem_put(manager->mctx, task, sizeof *task);
return (ISC_R_SHUTTINGDOWN);
}
......@@ -920,7 +920,7 @@ manager_free(isc_taskmgr_t *manager) {
isc_mem_t *mctx;
(void)isc_condition_destroy(&manager->work_available);
(void)isc_mutex_destroy(&manager->lock);
DESTROYLOCK(&manager->lock);
isc_mem_put(manager->mctx, manager->threads,
manager->workers * sizeof (isc_thread_t));
manager->magic = 0;
......@@ -969,7 +969,7 @@ isc_taskmgr_create(isc_mem_t *mctx, unsigned int workers,
INIT_LIST(manager->tasks);
INIT_LIST(manager->ready_tasks);
if (isc_condition_init(&manager->work_available) != ISC_R_SUCCESS) {
(void)isc_mutex_destroy(&manager->lock);
DESTROYLOCK(&manager->lock);
isc_mem_put(mctx, threads, workers * sizeof (isc_thread_t));
isc_mem_put(mctx, manager, sizeof *manager);
UNEXPECTED_ERROR(__FILE__, __LINE__,
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: app.c,v 1.24 2000/08/25 18:58:35 bwelling Exp $ */
/* $Id: app.c,v 1.25 2000/08/26 01:31:53 bwelling Exp $ */
#include <config.h>
......@@ -452,5 +452,5 @@ isc_app_finish(void) {
* Finish an ISC library application.
*/
(void)isc_mutex_destroy(&lock);
DESTROYLOCK(&lock);
}
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: entropy.c,v 1.48 2000/08/26 01:10:54 bwelling Exp $ */
/* $Id: entropy.c,v 1.49 2000/08/26 01:31:54 bwelling Exp $ */
#include <config.h>
......@@ -914,7 +914,7 @@ destroy(isc_entropy_t **entp) {
UNLOCK(&ent->lock);
(void)isc_mutex_destroy(&ent->lock);
DESTROYLOCK(&ent->lock);
memset(ent, 0, sizeof(isc_entropy_t));
isc_mem_put(mctx, ent, sizeof(isc_entropy_t));
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: socket.c,v 1.159 2000/08/25 22:07:52 bwelling Exp $ */
/* $Id: socket.c,v 1.160 2000/08/26 01:31:56 bwelling Exp $ */
#include <config.h>
......@@ -1116,7 +1116,7 @@ free_socket(isc_socket_t **socketp) {
sock->magic = 0;
(void)isc_mutex_destroy(&sock->lock);
DESTROYLOCK(&sock->lock);
#ifdef USE_CMSG
isc_mem_put(sock->manager->mctx, sock->cmsg, sock->cmsglen);
......@@ -2015,7 +2015,7 @@ isc_socketmgr_create(isc_mem_t *mctx, isc_socketmgr_t **managerp) {
}
if (isc_condition_init(&manager->shutdown_ok) != ISC_R_SUCCESS) {
(void)isc_mutex_destroy(&manager->lock);
DESTROYLOCK(&manager->lock);
isc_mem_put(mctx, manager, sizeof *manager);
UNEXPECTED_ERROR(__FILE__, __LINE__,
"isc_condition_init() failed");
......@@ -2027,7 +2027,7 @@ isc_socketmgr_create(isc_mem_t *mctx, isc_socketmgr_t **managerp) {
* select/poll loop when something internal needs to be done.
*/
if (pipe(manager->pipe_fds) != 0) {
(void)isc_mutex_destroy(&manager->lock);
DESTROYLOCK(&manager->lock);
isc_mem_put(mctx, manager, sizeof *manager);
UNEXPECTED_ERROR(__FILE__, __LINE__,
"pipe() failed: %s",
......@@ -2055,7 +2055,7 @@ isc_socketmgr_create(isc_mem_t *mctx, isc_socketmgr_t **managerp) {
*/
if (isc_thread_create(watcher, manager, &manager->watcher) !=
ISC_R_SUCCESS) {
(void)isc_mutex_destroy(&manager->lock);
DESTROYLOCK(&manager->lock);
isc_mem_put(mctx, manager, sizeof *manager);
UNEXPECTED_ERROR(__FILE__, __LINE__,
"isc_thread_create() failed");
......@@ -2121,7 +2121,7 @@ isc_socketmgr_destroy(isc_socketmgr_t **managerp) {
close(i);
(void)isc_condition_destroy(&manager->shutdown_ok);
(void)isc_mutex_destroy(&manager->lock);
DESTROYLOCK(&manager->lock);
manager->magic = 0;
mctx= manager->mctx;
isc_mem_put(mctx, manager, sizeof *manager);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment