summaryrefslogtreecommitdiffstats
path: root/include/lem.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lem.h')
-rw-r--r--include/lem.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/include/lem.h b/include/lem.h
index 0e34734..5b35459 100644
--- a/include/lem.h
+++ b/include/lem.h
@@ -54,7 +54,6 @@ extern struct ev_loop *lem_loop;
#endif
struct lem_async {
- lua_State *T;
void (*work)(struct lem_async *a);
void (*reap)(struct lem_async *a);
struct lem_async *next;
@@ -65,18 +64,17 @@ lua_State *lem_newthread(void);
void lem_forgetthread(lua_State *T);
void lem_queue(lua_State *T, int nargs);
void lem_exit(int status);
-void lem_async_put(struct lem_async *a);
+void lem_async_run(struct lem_async *a);
void lem_async_config(int delay, int min, int max);
static inline void
-lem_async_do(struct lem_async *a, lua_State *T,
- void (*work)(struct lem_async *),
- void (*reap)(struct lem_async *))
+lem_async_do(struct lem_async *a,
+ void (*work)(struct lem_async *a),
+ void (*reap)(struct lem_async *a))
{
- a->T = T;
a->work = work;
a->reap = reap;
- lem_async_put(a);
+ lem_async_run(a);
}
#endif