Add cleanup function for platform_event on BSD systems

This commit is contained in:
Stig Telfer 2016-01-22 11:25:19 +00:00
parent ec73c35952
commit fd0ddca46c
1 changed files with 14 additions and 0 deletions

View File

@ -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
kore_platform_event_wait(u_int64_t timer)
{