Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
a4403827
Commit
a4403827
authored
Aug 26, 2000
by
Brian Wellington
Browse files
MOre calls to DESTROYLOCK
parent
6714319d
Changes
7
Hide whitespace changes
Inline
Side-by-side
lib/isc/mutexblock.c
View file @
a4403827
...
...
@@ -15,11 +15,12 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: mutexblock.c,v 1.1
1
2000/08/26 01:
23:16
bwelling Exp $ */
/* $Id: mutexblock.c,v 1.1
2
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
)
{
...
...
lib/isc/ratelimiter.c
View file @
a4403827
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: ratelimiter.c,v 1.1
6
2000/08/
01
01:
29:42 tale
Exp $ */
/* $Id: ratelimiter.c,v 1.1
7
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
));
}
...
...
lib/isc/rwlock.c
View file @
a4403827
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rwlock.c,v 1.2
3
2000/08/2
4 23:26:13
bwelling Exp $ */
/* $Id: rwlock.c,v 1.2
4
2000/08/2
6 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
);
}
lib/isc/task.c
View file @
a4403827
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: task.c,v 1.7
0
2000/08/2
4
01:
40:46 gson
Exp $ */
/* $Id: task.c,v 1.7
1
2000/08/2
6
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__
,
...
...
lib/isc/unix/app.c
View file @
a4403827
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: app.c,v 1.2
4
2000/08/2
5 18:58:35
bwelling Exp $ */
/* $Id: app.c,v 1.2
5
2000/08/2
6 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
);
}
lib/isc/unix/entropy.c
View file @
a4403827
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: entropy.c,v 1.4
8
2000/08/26 01:1
0
:54 bwelling Exp $ */
/* $Id: entropy.c,v 1.4
9
2000/08/26 01:
3
1: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
));
...
...
lib/isc/unix/socket.c
View file @
a4403827
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: socket.c,v 1.1
59
2000/08/2
5 22:07
:5
2
bwelling Exp $ */
/* $Id: socket.c,v 1.1
60
2000/08/2
6 01:31
:5
6
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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment