mirror of https://git.kore.io/kore.git
Add cleanup function for platform_event on BSD systems
This commit is contained in:
parent
ec73c35952
commit
fd0ddca46c
14
src/bsd.c
14
src/bsd.c
|
@ -94,6 +94,20 @@ kore_platform_event_init(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
kore_platform_event_cleanup(void)
|
||||||
|
{
|
||||||
|
if (kfd >= 0) {
|
||||||
|
close(kfd);
|
||||||
|
kfd = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (events != NULL) {
|
||||||
|
kore_mem_free(events);
|
||||||
|
events = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
kore_platform_event_wait(u_int64_t timer)
|
kore_platform_event_wait(u_int64_t timer)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue