syscalls: sysinfo

This commit is contained in:
Matheus
2025-11-02 21:30:24 -03:00
parent d53d97d951
commit c9d401f488
7 changed files with 77 additions and 4 deletions
+10
View File
@@ -23,6 +23,16 @@ pid_t proc_allocate_pid(void) {
return __atomic_fetch_add(&currpid, 1, __ATOMIC_SEQ_CST);
}
size_t proc_get_count(void) {
MUTEX_ACQUIRE(&proc_pid_table_mutex);
size_t count = pid_table.entrycount;
MUTEX_RELEASE(&proc_pid_table_mutex);
return count;
}
proc_t *proc_get_from_pid(int pid) {
MUTEX_ACQUIRE(&proc_pid_table_mutex);
void *_proc = NULL;