Commit 3e6b9858 authored by David Lawrence's avatar David Lawrence
Browse files

<isc/ondestroy.h> does not need <stddef.h> or <isc/event.h>.

parent 900b9aa2
97. [cleanup] <isc/ondestroy.h> does not need <stddef.h> or
<isc/event.h>.
96. [cleanup] <isc/mutex.h> does not need <isc/lang.h> or
<isc/result.h>.
......
......@@ -18,9 +18,8 @@
#ifndef ISC_ONDESTROY_H
#define ISC_ONDESTROY_H 1
#include <stddef.h>
#include <isc/event.h>
#include <isc/lang.h>
#include <isc/types.h>
ISC_LANG_BEGINDECLS
......@@ -74,15 +73,16 @@ typedef struct {
isc_eventlist_t events;
} isc_ondestroy_t;
void isc_ondestroy_init(isc_ondestroy_t *ondest);
void
isc_ondestroy_init(isc_ondestroy_t *ondest);
/*
* Initialize the on ondest structure. *must* be called before first call
* to isc_ondestroy_register().
*/
isc_result_t isc_ondestroy_register(isc_ondestroy_t *ondest,
isc_task_t *task,
isc_event_t **eventp);
isc_result_t
isc_ondestroy_register(isc_ondestroy_t *ondest, isc_task_t *task,
isc_event_t **eventp);
/*
* Stores task and *eventp away inside *ondest. Ownership of **event is
......@@ -90,8 +90,8 @@ isc_result_t isc_ondestroy_register(isc_ondestroy_t *ondest,
* to.
*/
void isc_ondestroy_notify(isc_ondestroy_t *ondest, void *sender);
void
isc_ondestroy_notify(isc_ondestroy_t *ondest, void *sender);
/*
* Dispatches the event(s) to the task(s) that were given in
* isc_ondestroy_register call(s) (done via calls to
......
......@@ -18,6 +18,7 @@
#include <config.h>
#include <isc/assertions.h>
#include <isc/event.h>
#include <isc/ondestroy.h>
#include <isc/result.h>
#include <isc/task.h>
......@@ -26,8 +27,7 @@
#define VALID_ONDESTROY(s) (s != NULL && (s->magic == ONDESTROY_MAGIC))
void
isc_ondestroy_init(isc_ondestroy_t *ondest)
{
isc_ondestroy_init(isc_ondestroy_t *ondest) {
ondest->magic = ONDESTROY_MAGIC;
ISC_LIST_INIT(ondest->events);
}
......@@ -60,8 +60,7 @@ isc_ondestroy_register(isc_ondestroy_t *ondest,
void
isc_ondestroy_notify(isc_ondestroy_t *ondest, void *sender)
{
isc_ondestroy_notify(isc_ondestroy_t *ondest, void *sender) {
isc_event_t *eventp;
isc_task_t *task;
......
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