diff options
Diffstat (limited to 'src/kernel/task')
-rw-r--r-- | src/kernel/task/task.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/kernel/task/task.cpp b/src/kernel/task/task.cpp index 96864da..51219e0 100644 --- a/src/kernel/task/task.cpp +++ b/src/kernel/task/task.cpp @@ -287,7 +287,7 @@ process::process(process* parent, uint32_t uid, uint32_t privilege) { stack = 0; if (privilege >= PL_USER) { //We are running in user mode size_t stacksBottom = K_HIGHHALF_ADDR - 0x01000000; - seg_map(simpleseg_make(stacksBottom, USER_STACK_SIZE, 1), pagedir, 0); + (new simpleseg(stacksBottom, USER_STACK_SIZE, 1))->map(pagedir, 0); stack = stacksBottom + USER_STACK_SIZE - 4; } @@ -350,9 +350,9 @@ size_t process_sbrk(size_t size) { size_t end = start + size; if (end & 0x0FFF) end = (end & 0xFFFFF000) + 0x1000; - segment *s = simpleseg_make(start, end - start, 1); + segment *s = new simpleseg(start, end - start, 1); if (s == 0) return -5; - p->dataseg = seg_map(s, p->pagedir, 0); + p->dataseg = s->map(p->pagedir, 0); if (p->dataseg == 0) return -1; ret = start; @@ -363,7 +363,8 @@ size_t process_sbrk(size_t size) { if (end <= start) return -1; if (end & 0x0FFF) end = (end & 0xFFFFF000) + 0x1000; - simpleseg_resize(p->dataseg, end - start); + simpleseg *s = (simpleseg*)(p->dataseg->seg); + s->resize(p->dataseg, end - start); ret = p->data; p->data += size; |