Commit 824d831c authored by Philippe Gerum's avatar Philippe Gerum

copperplate/eventobj: add uninit cleanup helper

This one does not run the object finalizer, assuming a strictly
passive object (no waiters yet).
parent fa3092a1
......@@ -82,6 +82,8 @@ int eventobj_init(struct eventobj *evobj,
int eventobj_destroy(struct eventobj *evobj);
void eventobj_uninit(struct eventobj *evobj);
int eventobj_post(struct eventobj *evobj,
unsigned int bits);
......
......@@ -59,6 +59,13 @@ int eventobj_destroy(struct eventobj *evobj)
return 0;
}
void eventobj_uninit(struct eventobj *evobj)
{
int ret = cobalt_event_destroy(&evobj->core.event);
assert(ret == 0);
(void)ret;
}
int eventobj_wait(struct eventobj *evobj,
unsigned int bits, unsigned int *bits_r,
int mode, const struct timespec *timeout)
......@@ -186,6 +193,11 @@ int eventobj_destroy(struct eventobj *evobj)
return 0;
}
void eventobj_uninit(struct eventobj *evobj)
{
syncobj_uninit(&evobj->core.sobj);
}
int eventobj_wait(struct eventobj *evobj,
unsigned int bits, unsigned int *bits_r,
int mode, const struct timespec *timeout)
......
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