|
Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
|
Go to the source code of this file.
Data Structures | |
| struct | process_head |
| struct | process_node |
| struct | process |
Macros | |
| #define | MAX_PID_ALLOWED 4194304 |
| #define | INVALID_PID ((pid_t)-1) |
Typedefs | |
| typedef uint32_t | pid_t |
Functions | |
| struct process | __attribute__ ((aligned(64))) process_t |
| pid_t | alloc_pid () |
| void | free_pid (pid_t pid) |
| process_t * | create_process (char *name, struct thread *main_thread) |
| int | execve (const char *path, char *const argv[], char *const envp[]) |
Variables | |
| pid_t | pid |
| pid_t | parent_pid |
| char | name [64] |
| struct thread * | main_thread |
| struct fdtable * | fdtable |
| int | exit_code |
| bool | exited |
| struct process_node | cache |
| uintptr_t | heap_start |
| uintptr_t | heap_end |
| spinlock_t | vm_lock |
| struct virtual_memory_page * | vm_page |
| struct process * | next |
| struct process * | prev |
| #define INVALID_PID ((pid_t)-1) |
Definition at line 9 of file process.h.
Referenced by alloc_pid().
| #define MAX_PID_ALLOWED 4194304 |
Definition at line 8 of file process.h.
Referenced by alloc_pid(), and INIT().
| pid_t alloc_pid | ( | ) |
Definition at line 529 of file process.c.
References INVALID_PID, MAX_PID_ALLOWED, and pid_bitmap.
Referenced by create_process().
| process_t * create_process | ( | char * | name, |
| struct thread * | main_thread ) |
Definition at line 552 of file process.c.
References _process_list, alloc_fd(), alloc_fdtable(), alloc_pid(), CREATE_MISSING_ENTRY, process_head::first, get_tty_dentry(), h, itoa(), main_thread, name, name_len, process_node::next, NULL, process_node::prev, process_cache, process_dentry, resolve_dentry(), strlen(), strncpy(), tail, dentry::vnode, and vxSlabAlloc().
Referenced by execve().
| int execve | ( | const char * | path, |
| char *const | argv[], | ||
| char *const | envp[] ) |
| void free_pid | ( | pid_t | pid | ) |
Definition at line 546 of file process.c.
References pid, and pid_bitmap.
| struct process_node cache |
Definition at line 10 of file process.h.
Referenced by __attribute__(), cache_lookup(), cache_remove(), create_vfs_cache(), slab_cache_destroy(), slab_cache_stats(), slab_free(), vfs_cache_insert(), vxCreateSlabCache(), and vxSlabAlloc().
| uintptr_t heap_start |
Definition at line 12 of file process.h.
Referenced by execve(), and syscall_brk().
| struct thread* main_thread |
Definition at line 5 of file process.h.
Referenced by create_process().
| pid_t pid |
Definition at line 0 of file process.h.
Referenced by free_pid().
| struct process* prev |
Definition at line 19 of file process.h.
Referenced by llist_add(), llist_del_init(), slab_free(), and VirtioGpu::virtq_add_buf().
| spinlock_t vm_lock |
| struct virtual_memory_page* vm_page |
Definition at line 15 of file process.h.
Referenced by mmap_resolve_virt_addr().