diff options
author | Alex AUVOLAT <alexis211@gmail.com> | 2012-05-04 20:47:46 +0200 |
---|---|---|
committer | Alex AUVOLAT <alexis211@gmail.com> | 2012-05-04 20:47:46 +0200 |
commit | a9bb8d1be024730fc4687aab78a8e5cb54b4f05e (patch) | |
tree | e10940a39e9864430b584cd84700b8d49aebd62a /src/kernel/task/task.cpp | |
parent | 35857cb36ae65779a7cab773040c0fc91387a989 (diff) | |
download | TCE-a9bb8d1be024730fc4687aab78a8e5cb54b4f05e.tar.gz TCE-a9bb8d1be024730fc4687aab78a8e5cb54b4f05e.zip |
More OOP;
Diffstat (limited to 'src/kernel/task/task.cpp')
-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; |