Commit fa9a4071 authored by Brian Wellington's avatar Brian Wellington
Browse files

Last set of DESTROYLOCK changes

parent 5e387b9c
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dighost.c,v 1.116 2000/08/17 01:23:42 gson Exp $ */
/* $Id: dighost.c,v 1.117 2000/08/26 01:42:24 bwelling Exp $ */
/*
* Notice to programmers: Do not use this code as an example of how to
......@@ -2469,7 +2469,7 @@ destroy_libs(void) {
isc_entropy_detach(&entp);
}
isc_mutex_destroy(&lookup_lock);
DESTROYLOCK(&lookup_lock);
if (isc_mem_debugging != 0)
isc_mem_stats(mctx, stderr);
if (mctx != NULL)
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: nslookup.c,v 1.35 2000/08/15 18:44:05 gson Exp $ */
/* $Id: nslookup.c,v 1.36 2000/08/26 01:42:25 bwelling Exp $ */
#include <config.h>
......@@ -894,7 +894,7 @@ main(int argc, char **argv) {
puts("");
debug("done, and starting to shut down");
destroy_libs();
isc_mutex_destroy(&lock);
DESTROYLOCK(&lock);
isc_condition_destroy(&cond);
if (taskmgr != NULL) {
debug("freeing taskmgr");
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: interfacemgr.c,v 1.48 2000/08/01 01:11:40 tale Exp $ */
/* $Id: interfacemgr.c,v 1.49 2000/08/26 01:42:26 bwelling Exp $ */
#include <config.h>
......@@ -118,7 +118,7 @@ ns_interfacemgr_destroy(ns_interfacemgr_t *mgr) {
dns_aclenv_destroy(&mgr->aclenv);
ns_listenlist_detach(&mgr->listenon4);
ns_listenlist_detach(&mgr->listenon6);
isc_mutex_destroy(&mgr->lock);
DESTROYLOCK(&mgr->lock);
mgr->magic = 0;
isc_mem_put(mgr->mctx, mgr, sizeof *mgr);
}
......@@ -225,7 +225,7 @@ ns_interface_create(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr,
return (ISC_R_SUCCESS);
task_create_failure:
isc_mutex_destroy(&ifp->lock);
DESTROYLOCK(&ifp->lock);
lock_create_failure:
ifp->magic = 0;
isc_mem_put(mgr->mctx, ifp, sizeof(*ifp));
......@@ -373,7 +373,7 @@ ns_interface_destroy(ns_interface_t *ifp) {
}
isc_task_detach(&ifp->task);
isc_mutex_destroy(&ifp->lock);
DESTROYLOCK(&ifp->lock);
ns_interfacemgr_detach(&ifp->mgr);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: nsupdate.c,v 1.43 2000/08/10 02:32:14 tale Exp $ */
/* $Id: nsupdate.c,v 1.44 2000/08/26 01:42:28 bwelling Exp $ */
#include <config.h>
......@@ -1437,7 +1437,7 @@ main(int argc, char **argv) {
} while (1);
fprintf(stdout, "\n");
isc_mutex_destroy(&lock);
DESTROYLOCK(&lock);
isc_condition_destroy(&cond);
cleanup();
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: timer.c,v 1.54 2000/08/01 01:29:53 tale Exp $ */
/* $Id: timer.c,v 1.55 2000/08/26 01:42:29 bwelling Exp $ */
#include <config.h>
......@@ -208,7 +208,7 @@ destroy(isc_timer_t *timer) {
UNLOCK(&manager->lock);
isc_task_detach(&timer->task);
(void)isc_mutex_destroy(&timer->lock);
DESTROYLOCK(&timer->lock);
timer->magic = 0;
isc_mem_put(manager->mctx, timer, sizeof *timer);
}
......@@ -322,7 +322,7 @@ isc_timer_create(isc_timermgr_t *manager, isc_timertype_t type,
if (result != ISC_R_SUCCESS) {
timer->magic = 0;
(void)isc_mutex_destroy(&timer->lock);
DESTROYLOCK(&timer->lock);
isc_task_detach(&timer->task);
isc_mem_put(manager->mctx, timer, sizeof *timer);
return (result);
......@@ -663,7 +663,7 @@ isc_timermgr_create(isc_mem_t *mctx, isc_timermgr_t **managerp) {
return (ISC_R_UNEXPECTED);
}
if (isc_condition_init(&manager->wakeup) != ISC_R_SUCCESS) {
(void)isc_mutex_destroy(&manager->lock);
DESTROYLOCK(&manager->lock);
isc_heap_destroy(&manager->heap);
isc_mem_put(mctx, manager, sizeof *manager);
UNEXPECTED_ERROR(__FILE__, __LINE__,
......@@ -675,7 +675,7 @@ isc_timermgr_create(isc_mem_t *mctx, isc_timermgr_t **managerp) {
ISC_R_SUCCESS) {
isc_mem_detach(&manager->mctx);
(void)isc_condition_destroy(&manager->wakeup);
(void)isc_mutex_destroy(&manager->lock);
DESTROYLOCK(&manager->lock);
isc_heap_destroy(&manager->heap);
isc_mem_put(mctx, manager, sizeof *manager);
UNEXPECTED_ERROR(__FILE__, __LINE__,
......@@ -722,7 +722,7 @@ isc_timermgr_destroy(isc_timermgr_t **managerp) {
* Clean up.
*/
(void)isc_condition_destroy(&manager->wakeup);
(void)isc_mutex_destroy(&manager->lock);
DESTROYLOCK(&manager->lock);
isc_heap_destroy(&manager->heap);
manager->magic = 0;
mctx = manager->mctx;
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: auth.c,v 1.12 2000/08/01 01:32:48 tale Exp $ */
/* $Id: auth.c,v 1.13 2000/08/26 01:42:30 bwelling Exp $ */
/* Principal Author: DCL */
......@@ -357,5 +357,5 @@ void
auth_destroy(void) {
omapi_auth_deregister(NULL);
RUNTIME_CHECK(isc_mutex_destroy(&mutex) == ISC_R_SUCCESS);
DESTROYLOCK(&mutex);
}
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: connection.c,v 1.33 2000/08/01 01:32:49 tale Exp $ */
/* $Id: connection.c,v 1.34 2000/08/26 01:42:32 bwelling Exp $ */
/* Principal Author: DCL */
......@@ -101,8 +101,7 @@ free_connection(omapi_connection_t *connection) {
isc_socket_detach(&connection->socket);
if (connection->is_client) {
RUNTIME_CHECK(isc_mutex_destroy(&connection->wait_lock) ==
ISC_R_SUCCESS);
DESTROYLOCK(&connection->wait_lock);
RUNTIME_CHECK(isc_condition_destroy(&connection->waiter) ==
ISC_R_SUCCESS);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: handle.c,v 1.16 2000/08/01 01:32:52 tale Exp $ */
/* $Id: handle.c,v 1.17 2000/08/26 01:42:33 bwelling Exp $ */
/* Principal Author: Ted Lemon */
......@@ -348,5 +348,5 @@ handle_destroy(void) {
UNLOCK(&mutex);
RUNTIME_CHECK(isc_mutex_destroy(&mutex) == ISC_R_SUCCESS);
DESTROYLOCK(&mutex);
}
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: listener.c,v 1.29 2000/08/01 01:32:55 tale Exp $ */
/* $Id: listener.c,v 1.30 2000/08/26 01:42:34 bwelling Exp $ */
/*
* Subroutines that support the generic listener object.
......@@ -433,7 +433,7 @@ listener_destroy(omapi_object_t *listener) {
INSIST(ISC_LIST_EMPTY(l->connections));
UNLOCK(&l->mutex);
RUNTIME_CHECK(isc_mutex_destroy(&l->mutex) == ISC_R_SUCCESS);
DESTROYLOCK(&l->mutex);
if (l->task != NULL)
isc_task_destroy(&l->task);
......
Supports Markdown
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