/* ============================================================================ Name : call.c Author : Heiher Copyright : Copyright (c) 2020 everyone. Description : ============================================================================ */ #include #include #include #include static void call_entry (HevTaskCall *call) { void *ptr; printf ("call %p on stack %p\n", call, &ptr); hev_task_call_set_retval (call, &ptr); } static void task_entry (void *data) { HevTaskCall *call; call = hev_task_call_new (sizeof (HevTaskCall), 8192); hev_task_call_jump (call, call_entry); hev_task_call_destroy (call); } int main (int argc, char *argv[]) { HevTask *task; hev_task_system_init (); task = hev_task_new (-1); hev_task_run (task, task_entry, NULL); hev_task_system_run (); hev_task_system_fini (); return 0; }