| 1234567891011121314151617181920212223242526272829303132333435363738 |
- #ifndef CX_ZIVUOS_MODELS_H_INCLUDED
- #define CX_ZIVUOS_MODELS_H_INCLUDED
- #include <stdint.h>
- #include <stdbool.h>
- typedef uint16_t zv_pid_t;
- typedef uint8_t zv_priority_t;
- typedef enum zv_state_e {
- ZV_EMPTY,
- ZV_WORKING,
- ZV_READY,
- ZV_INTERRUPTED,
- ZV_INTERRUPT_WAITING,
- ZV_WAITING
- } zv_state_t;
- typedef union zv_universal_u {
- uintptr_t unumber;
- intptr_t number;
- void *pointer;
- char *cstring;
- } zv_universal_t;
- struct zv_kernel_s;
- struct zv_process_s;
- typedef zv_state_t (*zv_worker_t) (
- struct zv_kernel_s *,
- struct zv_process_s *
- );
- #define ZV_LOWEST_PRIORITY UINT8_MAX
- #define ZV_ERROR_PID UINT16_MAX
- #define ZV_NULL_PARAM ((zv_universal_t) NULL)
- #endif
|