MentOS
0.8.0
The Mentoring Operating System
|
Implementaiton of procr filesystem. More...
Functions | |
static char | __procr_get_task_state_char (int state) |
Returns the character identifying the process state. More... | |
static ssize_t | __procr_do_cmdline (char *buffer, size_t bufsize, task_struct *task) |
Returns the data for the /proc/<PID>/cmdline file. More... | |
static ssize_t | __procr_do_stat (char *buffer, size_t bufsize, task_struct *task) |
Returns the data for the /proc/<PID>/stat file. More... | |
static ssize_t | __procr_read (vfs_file_t *file, char *buffer, off_t offset, size_t nbyte) |
Performs a read of files inside the /proc/<PID>/ folder. More... | |
int | procr_create_entry_pid (task_struct *entry) |
Create the entire procfs entry tree for the give process. More... | |
int | procr_destroy_entry_pid (task_struct *entry) |
Destroy the entire procfs entry tree for the give process. More... | |
Variables | |
static vfs_sys_operations_t | procr_sys_operations |
Filesystem general operations. More... | |
static vfs_file_operations_t | procr_fs_operations |
Filesystem file operations. More... | |
Implementaiton of procr filesystem.
|
inlinestatic |
Returns the data for the /proc/<PID>/cmdline
file.
buffer | the buffer where the data should be placed. |
bufsize | the size of the buffer. |
task | the task associated with the /proc/<PID> folder. |
|
inlinestatic |
Returns the data for the /proc/<PID>/stat
file.
buffer | the buffer where the data should be placed. |
bufsize | the size of the buffer. |
task | the task associated with the /proc/<PID> folder. |
|
inlinestatic |
Returns the character identifying the process state.
state | the process state. |
R Running S Sleeping in an interruptible wait D Waiting in uninterruptible disk sleep Z Zombie T Stopped t Tracing stop X Dead
|
inlinestatic |
Performs a read of files inside the /proc/<PID>/
folder.
file | is the /proc/<PID>/ folder, thus, it should be a proc_dir_entry_t data. |
buffer | buffer where the read content must be placed. |
offset | offset from which we start reading from the file. |
nbyte | the number of bytes to read. |
int procr_create_entry_pid | ( | task_struct * | entry | ) |
Create the entire procfs entry tree for the give process.
entry | Pointer to the task_struct of the process. |
int procr_destroy_entry_pid | ( | task_struct * | entry | ) |
Destroy the entire procfs entry tree for the give process.
entry | Pointer to the task_struct of the process. |
|
static |
Filesystem file operations.