summaryrefslogtreecommitdiff
path: root/src/kernel/task
diff options
context:
space:
mode:
authorAlex AUVOLAT <alexis211@gmail.com>2012-05-04 20:47:46 +0200
committerAlex AUVOLAT <alexis211@gmail.com>2012-05-04 20:47:46 +0200
commita9bb8d1be024730fc4687aab78a8e5cb54b4f05e (patch)
treee10940a39e9864430b584cd84700b8d49aebd62a /src/kernel/task
parent35857cb36ae65779a7cab773040c0fc91387a989 (diff)
downloadTCE-a9bb8d1be024730fc4687aab78a8e5cb54b4f05e.tar.gz
TCE-a9bb8d1be024730fc4687aab78a8e5cb54b4f05e.zip
More OOP;
Diffstat (limited to 'src/kernel/task')
-rw-r--r--src/kernel/task/task.cpp9
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;