git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support to multi-threading and pthread interface (POSIX.1-2008) (#23)
[lunaix-os.git]
/
lunaix-os
/
kernel
/
mm
/
dmm.c
diff --git
a/lunaix-os/kernel/mm/dmm.c
b/lunaix-os/kernel/mm/dmm.c
index 0fc2b6867d18ae2a031f788bc790292ae9c4b2aa..a76b9de979dd8e93ad68c6e9a24fdc7e7a571664 100644
(file)
--- a/
lunaix-os/kernel/mm/dmm.c
+++ b/
lunaix-os/kernel/mm/dmm.c
@@
-24,7
+24,7
@@
create_heap(struct proc_mm* pvms, ptr_t addr)
.mlen = PG_SIZE };
int status = 0;
struct mm_region* heap;
.mlen = PG_SIZE };
int status = 0;
struct mm_region* heap;
- if ((status = m
em_map
(NULL, &heap, addr, NULL, &map_param))) {
+ if ((status = m
map_user
(NULL, &heap, addr, NULL, &map_param))) {
return status;
}
return status;
}
@@
-36,7
+36,7
@@
create_heap(struct proc_mm* pvms, ptr_t addr)
__DEFINE_LXSYSCALL1(void*, sbrk, ssize_t, incr)
{
__DEFINE_LXSYSCALL1(void*, sbrk, ssize_t, incr)
{
- struct proc_mm* pvms =
(struct proc_mm*)&__current->mm
;
+ struct proc_mm* pvms =
vmspace(__current)
;
struct mm_region* heap = pvms->heap;
assert(heap);
struct mm_region* heap = pvms->heap;
assert(heap);
@@
-49,7
+49,7
@@
__DEFINE_LXSYSCALL1(void*, sbrk, ssize_t, incr)
__DEFINE_LXSYSCALL1(int, brk, void*, addr)
{
__DEFINE_LXSYSCALL1(int, brk, void*, addr)
{
- struct proc_mm* pvms =
(struct proc_mm*)&__current->mm
;
+ struct proc_mm* pvms =
vmspace(__current)
;
struct mm_region* heap = pvms->heap;
if (!heap) {
struct mm_region* heap = pvms->heap;
if (!heap) {