sched: use THREAD_DEFAULT_KSTACK_SIZE rather than hardcoding 10*PAGE_SIZE

This commit is contained in:
Matheus
2022-12-31 01:12:13 -03:00
parent 646f5001d0
commit 5ea50fee28
4 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -409,7 +409,7 @@ void sched_runinit(){
printf("Loading /sbin/init\n");
thread_t* thread = sched_newuthread(NULL, PAGE_SIZE*10, NULL, NULL, false, THREAD_PRIORITY_USER);
thread_t* thread = sched_newuthread(NULL, THREAD_DEFAULT_KSTACK_SIZE, NULL, NULL, false, THREAD_PRIORITY_USER);
proc_t* proc = thread->proc;
init = proc;
+1 -1
View File
@@ -10,7 +10,7 @@ syscallret syscall_fork(arch_regs* ctx){
syscallret retv;
retv.ret = -1;
thread_t* newthread = sched_newuthread(NULL, PAGE_SIZE*10, NULL, NULL, false, THREAD_PRIORITY_USER);
thread_t* newthread = sched_newuthread(NULL, THREAD_DEFAULT_KSTACK_SIZE, NULL, NULL, false, THREAD_PRIORITY_USER);
if(!newthread){
retv.errno = ENOMEM;