#include #include #include #include "models.h" #include "status.h" #include "process.h" #ifndef ZIVUOS_USE_STATIC #include #endif #ifndef ZIVUOS_USE_STATIC zv_process_t * zv_process_create() { zv_process_t *self = (zv_process_t *) malloc(sizeof(zv_process_t)); if (self == NULL) { return NULL; } self->is_dynamic = true; self->status = ZV_STATUS_CREATING; self->next = NULL; return self; } zv_process_t * zv_process_remove(zv_process_t *self) { zv_process_t *next = self->next; if (self->is_dynamic) { free(self); } return next; } #else zv_process_t * zv_process_create() { return NULL; } zv_process_t * zv_process_remove(zv_process_t *self) { return self->next; } #endif