| processes | [process_T](https://nerdcult.net/projects/noxos/docs/codebase/proc/process.h/#process_t---struct)** | The array of process pointers |
| processes_bitmap | bitmap_T(reference needed) | If a bit in this bitmap is set, the _processes_ entry with the same index is valid |
| num_free_pids | uint32_t | The amount of free slots in this chunk |
| prev | [scheduler_processes_chunk_T](https://nerdcult.net/projects/noxos/docs/codebase/proc/scheduler.h/#scheduler_processes_chunk_t---struct)* | The previous chunk |
| next | [scheduler_processes_chunk_T](https://nerdcult.net/projects/noxos/docs/codebase/proc/scheduler.h/#scheduler_processes_chunk_t---struct)* | The next chunk |
| num_threads | uint32_t | Total amount of currently spawned threads |
| num_processes | uint32_t | Total amount of currently spawned processes |
| running_thread | [thread_T](https://nerdcult.net/projects/noxos/docs/codebase/proc/thread.h/#thread_t---struct)* | A pointer to the currently running thread. |
| processes | [scheduler_processes_chunk_T](https://nerdcult.net/projects/noxos/docs/codebase/proc/scheduler.h/#scheduler_processes_chunk_t---struct)* | The first processes store chunk |
| blocked | bool | Set to true, while switching the context. Thread safety mechanism. |
| initialized | bool | Set to true, if the scheduler is initialized and started. |
#### `scheduler_init(boot_info)` - function (void)
Initializes the scheduler and performs a `nx_scheduler_start` kernel syscall.
**_boot_info_** is needed in to spawn the kernels' main process.
After this function, the whole kernel is in scheduling mode.
#### `scheduler_start(state)` - function (cpu_state_T*)
Creates and starts a thread from **_state_**.
It returns the result of a context switch, I forgot, why I did it like that.
This is basically the backend for the `nx_scheduler_start` kernel syscall.
#### `scheduler_is_initialized()` - function (bool)
Returns if the scheduler is initialized (and running) or not.
#### `scheduler_dump_info(process, indent)` - function (void)
This recursively lists information(pid, name, threads) for all child processes of **_process_**.
**_indent_** is used intern for the recursive calls and should be set to 0 initially.
#### `scheduler_register_thread(thread)` - function (thread_T*)
Registers **_thread_** in the scheduler.
#### `scheduler_pause_thread(thread)` - function (void)
Pauses **_thread_**, by removing it from the scheduling queue.
**Potential Bug:** if **_thread_** was the currently running thread,
this could cause issues, because it's _prev_ and _next_ values are nulled.
#### `scheduler_start_thread(thread)` - function (void)
Starts **_thread_**, by linking it into the scheduling queue.
#### `scheduler_kill_thread(thread)` - function (void)
Pauses and unregisters **_thread_**.
#### `scheduler_register_process(process)` - function (pid_t)