scheduler: umask default value and fpu saving in x86_64 context

This commit is contained in:
Matheus
2023-07-08 22:54:34 -03:00
parent 71a6833f52
commit c20d0e790f
2 changed files with 16 additions and 3 deletions
+2
View File
@@ -60,6 +60,7 @@ proc_t *sched_newproc() {
}
proc->pid = __atomic_fetch_add(&currpid, 1, __ATOMIC_SEQ_CST);
proc->umask = 022; // default umask
return proc;
}
@@ -86,6 +87,7 @@ thread_t *sched_newthread(void *ip, size_t kstacksize, int priority, proc_t *pro
CTX_INIT(&thread->context, proc != NULL);
CTX_XINIT(&thread->extracontext, proc != NULL);
CTX_SP(&thread->context) = proc ? (ctxreg_t)ustack : (ctxreg_t)thread->kernelstacktop;
CTX_IP(&thread->context) = (ctxreg_t)ip;
SPINLOCK_INIT(thread->sleeplock);