void exit() { uint64_t pid = get_current_pid(); // cleaning memory here change_task_status(pid, 2); // 2 means it will be removed during maintenance asm volatile("sti"); asm volatile("int $0x20"); }
static void target_set_type(struct target *t) { pid_t ppid = target_get_ppid(t); enum app_type_t app_type = APP_TYPE_UNKNOWN; if (get_current_pid() == ppid) { app_type = APP_TYPE_COMMON; } else if (get_lpad_pid(ppid) == ppid) { app_type = APP_TYPE_TIZEN; } t->app_type = app_type; }
static int sys_hello(void) { printf("process %d says hello!\n", get_current_pid()); return 0; }