![]() |
MOS Source Code
|
#include "mos/io/io.hpp"
#include <mos/hashmap.hpp>
#include <mos/tasks/task_types.hpp>
#include <optional>
Go to the source code of this file.
Classes | |
struct | stdio_t |
A wrapper type for the standard I/O streams. More... | |
Typedefs | |
typedef struct _hashmap | hashmap_t |
Functions | |
const char * | get_vmap_type_str (vmap_type_t type) |
should_inline bool | process_is_valid (const Process *process) |
should_inline stdio_t | current_stdio (void) |
void | process_destroy (Process *process) |
Process * | process_new (Process *parent, mos::string_view name, const stdio_t *ios) |
std::optional< Process * > | process_get (pid_t pid) |
fd_t | process_attach_ref_fd (Process *process, io_t *file, fd_flags_t flags) |
io_t * | process_get_fd (Process *process, fd_t fd) |
bool | process_detach_fd (Process *process, fd_t fd) |
pid_t | process_wait_for_pid (pid_t pid, u32 *exit_code, u32 flags) |
void | process_exit (Process *&&proc, u8 exit_code, signal_t signal) |
void | process_dump_mmaps (const Process *process) |
bool | process_register_signal_handler (Process *process, signal_t sig, const sigaction_t *sigaction) |
Process * | process_do_fork (Process *process) |
long | process_do_execveat (fd_t dirfd, const char *path, const char *const argv[], const char *const envp[], int flags) |
Variables | |
mos::HashMap< pid_t, Process * > | ProcessTable |
typedef struct _hashmap hashmap_t |
Definition at line 11 of file process.hpp.
const char * get_vmap_type_str | ( | vmap_type_t | type | ) |
Definition at line 51 of file process.cpp.
Referenced by process_do_fork(), process_dump_mmaps(), and process_sysfs_vmap_stat().
should_inline bool process_is_valid | ( | const Process * | process | ) |
Definition at line 25 of file process.hpp.
Referenced by process_attach_ref_fd(), process_destroy(), process_detach_fd(), process_do_fork(), process_exit(), process_get(), process_get_fd(), and vsnprintf_do_pointer_kernel().
should_inline stdio_t current_stdio | ( | void | ) |
Definition at line 33 of file process.hpp.
Referenced by MOS_STATIC_ASSERT().
Definition at line 106 of file process.cpp.
Referenced by process_new(), and process_wait_for_pid().
Process * process_new | ( | Process * | parent, |
mos::string_view | name, | ||
const stdio_t * | ios ) |
Definition at line 137 of file process.cpp.
Referenced by elf_create_process().
Definition at line 161 of file process.cpp.
Referenced by mmstat_sysfs_pagetable_show(), mmstat_sysfs_vmaps_show(), MOS_STATIC_ASSERT(), and process_wait_for_pid().
fd_t process_attach_ref_fd | ( | Process * | process, |
io_t * | file, | ||
fd_flags_t | flags ) |
Definition at line 172 of file process.cpp.
Referenced by fd_manipulate(), io_dup(), ipc_accept(), ipc_connect(), ipc_create(), memfd_create(), MOS_STATIC_ASSERT(), MOS_STATIC_ASSERT(), process_new(), and vfs_ipc_file_read().
Definition at line 193 of file process.cpp.
Referenced by dentry_from_fd(), io_dup(), io_pread(), io_read(), io_readv(), io_seek(), io_tell(), io_write(), ipc_accept(), mmap_file(), MOS_STATIC_ASSERT(), MOS_STATIC_ASSERT(), and vfs_fstatat().
Definition at line 201 of file process.cpp.
Referenced by io_close(), io_dup2(), and process_do_execveat().
Definition at line 216 of file process.cpp.
Referenced by MOS_STATIC_ASSERT().
Definition at line 284 of file process.cpp.
Referenced by elf_create_process(), exit(), process_do_execveat(), signal_do_coredump(), and signal_do_terminate().
Definition at line 368 of file process.cpp.
Referenced by dump_process(), and invalid_page_fault().
bool process_register_signal_handler | ( | Process * | process, |
signal_t | sig, | ||
const sigaction_t * | sigaction ) |
Definition at line 383 of file process.cpp.
Referenced by MOS_STATIC_ASSERT().
long process_do_execveat | ( | fd_t | dirfd, |
const char * | path, | ||
const char *const | argv[], | ||
const char *const | envp[], | ||
int | flags ) |
Definition at line 18 of file execve.cpp.
Referenced by execveat().
|
extern |
Definition at line 36 of file process.cpp.
Referenced by kthread_init(), process_destroy(), process_do_fork(), process_get(), process_new(), and tasks_sysfs_process_list().