summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Renner Berthing <esmil@mailme.dk>2013-02-09 19:58:00 +0100
committerEmil Renner Berthing <esmil@mailme.dk>2013-06-08 19:11:08 +0200
commit76f4dbf52e1bc85fd2d42fdb4c8caf0edc9df175 (patch)
tree2432bd325bc7f439f733fa2c3ede80fb616cf339
parent4019a8014aae283f44aad40d0e5c0334f8c63fd8 (diff)
downloadlem-76f4dbf52e1bc85fd2d42fdb4c8caf0edc9df175.tar.gz
lem-76f4dbf52e1bc85fd2d42fdb4c8caf0edc9df175.tar.xz
lem-76f4dbf52e1bc85fd2d42fdb4c8caf0edc9df175.zip
fix compilation with EV_MULTIPLICITY set
-rw-r--r--bin/lem.c10
-rw-r--r--bin/pool.c4
-rw-r--r--lem/utils.c4
3 files changed, 13 insertions, 5 deletions
diff --git a/bin/lem.c b/bin/lem.c
index 67e79ac..387cd7f 100644
--- a/bin/lem.c
+++ b/bin/lem.c
@@ -386,8 +386,12 @@ main(int argc, char *argv[])
/* free runqueue */
free(rq.queue);
- /* close default loop */
+ /* destroy loop */
+#if EV_MULTIPLICITY
+ ev_loop_destroy(lem_loop);
+#else
ev_default_destroy();
+#endif
lem_debug("Bye %s", exit_status == EXIT_SUCCESS ? "o/" : ":(");
return exit_status;
@@ -396,6 +400,10 @@ error:
lua_close(L);
if (rq.queue)
free(rq.queue);
+#if EV_MULTIPLICITY
+ ev_loop_destroy(lem_loop);
+#else
ev_default_destroy();
+#endif
return EXIT_FAILURE;
}
diff --git a/bin/pool.c b/bin/pool.c
index 66c20ae..d2b2df0 100644
--- a/bin/pool.c
+++ b/bin/pool.c
@@ -85,7 +85,7 @@ out:
}
static void
-pool_cb(EV_A_ struct ev_async *w, int revents)
+pool_cb(EV_P_ struct ev_async *w, int revents)
{
struct lem_async *a;
struct lem_async *next;
@@ -104,7 +104,7 @@ pool_cb(EV_A_ struct ev_async *w, int revents)
}
if (pool_jobs == 0)
- ev_async_stop(LEM_ w);
+ ev_async_stop(EV_A_ w);
}
static int
diff --git a/lem/utils.c b/lem/utils.c
index 18e9c67..d49d639 100644
--- a/lem/utils.c
+++ b/lem/utils.c
@@ -181,7 +181,7 @@ utils_resume(lua_State *T)
static int
utils_now(lua_State *T)
{
- lua_pushnumber(T, (lua_Number)ev_now());
+ lua_pushnumber(T, (lua_Number)ev_now(LEM));
return 1;
}
@@ -189,7 +189,7 @@ static int
utils_updatenow(lua_State *T)
{
ev_now_update(LEM);
- lua_pushnumber(T, (lua_Number)ev_now());
+ lua_pushnumber(T, (lua_Number)ev_now(LEM));
return 1;
}