kernel.h 608 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef CX_ZIVUOS_KERNEL_H_INCLUDED
  2. #define CX_ZIVUOS_KERNEL_H_INCLUDED
  3. #include <stdbool.h>
  4. #include "process.h"
  5. #include "zivu_types.h"
  6. typedef struct zv_kernel_s {
  7. zv_process_t *processes;
  8. zv_pid_t processes_count;
  9. zv_pid_t current_process;
  10. /* For dynamic also kernel. */
  11. #ifndef ZV_DISABLE_DYNAMIC
  12. bool is_dynamic;
  13. #endif
  14. } zv_kernel_t;
  15. #define ZV_IDLE_PROCESS ZV_MAX_PID_T
  16. void zv_kernel_init(zv_kernel_t *, zv_process_t *, zv_pid_t);
  17. /* For dynamic also. */
  18. #ifndef ZV_DISABLE_DYNAMIC
  19. zv_kernel_t * zv_kernel_create();
  20. #define ZV_DYNAMIC_PROCESSES_STEP 0x08
  21. #endif
  22. #endif