odyssey/sources/task.h

22 lines
310 B
C
Raw Normal View History

2017-05-24 11:04:19 +00:00
#ifndef MM_TASK_H
#define MM_TASK_H
2017-05-23 12:34:35 +00:00
/*
* machinarium.
*
* cooperative multitasking engine.
*/
2017-05-24 11:04:19 +00:00
typedef struct mm_task mm_task_t;
2017-05-23 12:34:35 +00:00
typedef void (*mm_task_function_t)(void*);
2017-05-24 11:04:19 +00:00
struct mm_task
{
2017-05-23 12:34:35 +00:00
mm_task_function_t function;
void *arg;
mm_event_t on_complete;
2017-05-23 12:34:35 +00:00
};
2017-05-24 11:04:19 +00:00
#endif /* MM_TASK_H */