|
My Kernel v0.1.0
|
A single process. More...
#include <process.h>
Data Fields | |
| char | name [PROCESS_NAME_MAX_LEN] |
| pid_t | pid |
| struct address_space * | as |
| llist_t | threads |
| size_t | refcount |
| struct file * | files [PROCESS_FD_COUNT] |
| Open file descriptors table. More... | |
| spinlock_t | files_lock |
| spinlock_t | lock |
| Transmitted to the parent process during wait() | |
The struct contains information about the process, including its name, unique ID and resources context (address space, file descriptors, ...). It also contains a list of all the process's active threads.
| struct address_space* process::as |
The process's address space
| struct file* process::files[PROCESS_FD_COUNT] |
This table is lock protected by files_lock, one must always take this lock when accessing a process' open files (read AND write).
| spinlock_t process::files_lock |
Lock for open_files
| char process::name[PROCESS_NAME_MAX_LEN] |
The thread's name
| pid_t process::pid |
Process' unique ID
| size_t process::refcount |
Reference count to this process. We only kill a process once all of its threads have been released.
| llist_t process::threads |
Linked list of the process' active threads