Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
ISC Open Source Projects
BIND
Commits
1edb223d
Commit
1edb223d
authored
Nov 06, 1998
by
Michael Graff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
return the number of items purged
parent
f02c1d94
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
lib/isc/include/isc/task.h
lib/isc/include/isc/task.h
+1
-1
lib/isc/task.c
lib/isc/task.c
+6
-1
No files found.
lib/isc/include/isc/task.h
View file @
1edb223d
...
...
@@ -77,7 +77,7 @@ void isc_task_attach(isc_task_t,
void
isc_task_detach
(
isc_task_t
*
);
void
isc_task_send
(
isc_task_t
,
isc_event_t
*
);
void
isc_task_purge
(
isc_task_t
,
void
*
,
unsigned
int
isc_task_purge
(
isc_task_t
,
void
*
,
isc_eventtype_t
);
void
isc_task_shutdown
(
isc_task_t
);
void
isc_task_destroy
(
isc_task_t
*
);
...
...
lib/isc/task.c
View file @
1edb223d
...
...
@@ -341,10 +341,11 @@ isc_task_send(isc_task_t task, isc_event_t *eventp) {
XTRACE
(
"sent"
);
}
void
unsigned
int
isc_task_purge
(
isc_task_t
task
,
void
*
sender
,
isc_eventtype_t
type
)
{
isc_event_t
event
,
next_event
;
isc_eventlist_t
purgeable
;
unsigned
int
purge_count
;
REQUIRE
(
VALID_TASK
(
task
));
REQUIRE
(
type
>=
0
);
...
...
@@ -356,6 +357,7 @@ isc_task_purge(isc_task_t task, void *sender, isc_eventtype_t type) {
*/
INIT_LIST
(
purgeable
);
purge_count
=
0
;
LOCK
(
&
task
->
lock
);
for
(
event
=
HEAD
(
task
->
events
);
...
...
@@ -375,7 +377,10 @@ isc_task_purge(isc_task_t task, void *sender, isc_eventtype_t type) {
event
=
next_event
)
{
next_event
=
NEXT
(
event
,
link
);
isc_event_free
(
&
event
);
purge_count
++
;
}
return
(
purge_count
);
}
void
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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