2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Last set of DESTROYLOCK changes

This commit is contained in:
Brian Wellington
2000-08-26 01:42:34 +00:00
parent 5e387b9ce6
commit fa9a407180
9 changed files with 24 additions and 25 deletions

View File

@@ -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;