#include <stdint.h>
#include <sys/types.h>
Go to the source code of this file.
◆ thread_state
Represents the state of a thread
Enumerator |
---|
THREAD_RUNNING | The state of a running thread.
|
THREAD_READY | The state of a ready to run thread.
|
THREAD_EXITED | The state of an exited thread.
|
THREAD_BLOCKED | The state of a generically blocked thread.
|
◆ block_thread()
Block the current thread
- Parameters
-
state | The state to block it with |
◆ check_proc_exists()
char check_proc_exists |
( |
pid_t |
pid | ) |
|
Check if a process exists
- Parameters
-
pid | The param of the process to check |
- Returns
- Whether the process exists
◆ create_proc()
void create_proc |
( |
void * |
start, |
|
|
void * |
address_space, |
|
|
void * |
param1, |
|
|
void * |
param2 |
|
) |
| |
Create a process
- Parameters
-
start | The start function of the process |
address_space | The address space of the process |
param1 | The first parameter of the process |
param2 | The second parameter of the process |
◆ unblock_thread()
void unblock_thread |
( |
pid_t |
pid, |
|
|
pid_t |
tid |
|
) |
| |
Unblock a thread in a process
- Parameters
-
pid | The PID of the thread's process |
tid | The TID of the thread |
◆ yield()
Yield the CPU to another process