Add teardown function for the event.c module

Also move the `job_teardown` call from os_unix.c to the event module
This commit is contained in:
Thiago de Arruda 2014-05-07 17:58:00 -03:00
parent 519fd1deb6
commit 17b275b23a
3 changed files with 7 additions and 1 deletions

View File

@ -41,6 +41,11 @@ void event_init()
uv_prepare_init(uv_default_loop(), &timer_prepare);
}
void event_teardown()
{
job_teardown();
}
// Wait for some event
bool event_poll(int32_t ms)
{

View File

@ -8,6 +8,7 @@
#include "os/job_defs.h"
void event_init(void);
void event_teardown(void);
bool event_poll(int32_t ms);
bool event_is_pending(void);
void event_push(Event event);

View File

@ -581,7 +581,7 @@ void mch_exit(int r)
{
exiting = TRUE;
job_teardown();
event_teardown();
{
settmode(TMODE_COOK);