/* * machinarium. * * Cooperative multitasking engine. */ #include #include static void fiber(void *arg) { machine_io_t io = machine_io_create(); test(io != NULL); machine_io_free(io); } void test_io_new(void) { machinarium_init(); int id; id = machine_create("test", fiber, NULL); test(id != -1); int rc; rc = machine_wait(id); test(rc != -1); machinarium_free(); }