proc: separate from sched

This commit is contained in:
Matheus
2024-09-21 22:43:16 -03:00
parent 77c39fdda3
commit cc6477d46d
19 changed files with 430 additions and 383 deletions
+2 -2
View File
@@ -602,7 +602,7 @@ static int localsock_connect(socket_t *socket, sockaddr_t *addr, uintmax_t flags
}
// get the vnode specified in addr
refnode = addr->path[0] == '/' ? sched_getroot() : sched_getcwd();
refnode = addr->path[0] == '/' ? proc_get_root() : proc_get_cwd();
error = vfs_lookup(&result, refnode, addr->path, NULL, 0);
if (error)
goto leave;
@@ -883,7 +883,7 @@ static int localsock_bind(socket_t *socket, sockaddr_t *addr, cred_t *cred) {
strcpy(path, addr->path);
refnode = *path == '/' ? sched_getroot() : sched_getcwd();
refnode = *path == '/' ? proc_get_root() : proc_get_cwd();
vattr_t attr = {
.mode = current_thread()->proc ? UMASK(0777) : 0644,
.gid = current_thread()->proc ? current_thread()->proc->cred.gid : 0,
+1 -1
View File
@@ -356,7 +356,7 @@ int tty_ioctl(tty_t *tty, unsigned long req, void *arg, int *result, cred_t *cre
if (e)
return e;
proc_t *proc = sched_getprocfrompid(pgrp);
proc_t *proc = proc_get_from_pid(pgrp);
if (proc == NULL)
return ESRCH;