diff --git a/.wiki/Kernel-documentation.md b/.wiki/Kernel-documentation.md index a8d708c..db03955 100644 --- a/.wiki/Kernel-documentation.md +++ b/.wiki/Kernel-documentation.md @@ -1141,19 +1141,26 @@ These are standard pids #### `process_T` - struct -| Name | Type | Description | -|----------|------------|--------------------------------------------------------| -| name | char[128] | The processes' name | -| id | pid_t | The process-identification number | -| chunk | void* | A pointer to the chunk, where the process is stored in | -| chunk_id | uint32_t | The processes id inside of its chunk | -| parent | process_T* | The process, that spawned this process | -| threads | void* | A pointer to the processes' first thread | +| Name | Type | Description | +|-------------|------------|-----------------------------------------------------------| +| name | char[128] | The processes' name | +| id | pid_t | The process-identification number | +| chunk | void* | A pointer to the chunk, where the process is stored in | +| chunk_id | uint32_t | The processes id inside of its chunk | +| num_threads | uint32_t | The amount of spawned threads, that belong to the process | +| threads | void* | A pointer to the processes' first thread | +| parent | process_T* | The process, that spawned this process | +| childs | process_T* | A pointer to the processes' first child process | +| prev | process_T* | The previous process | +| next | process_T* | The next process | #### `process_spawn(parent, name)` - function (pid_t) Spawns a process named **_name_** as child of **_parent_** and returns its pid. +#### `process_kill_pid(pid)` - function (void) +Kills the process connected with **_pid_** and all of its threads and child processes. + #### `process_kill(process)` - function (void) Kills **_process_** and all of its threads and child processes. @@ -1194,6 +1201,10 @@ This is basically the backend for the `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.