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
feat: fstat now handle symbolic link
[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 3da8501f34aecdb43aa89a1fcd3270d15e9e6b6a..0fc2b6867d18ae2a031f788bc790292ae9c4b2aa 100644
(file)
--- a/
lunaix-os/kernel/mm/dmm.c
+++ b/
lunaix-os/kernel/mm/dmm.c
@@
-30,11
+30,13
@@
create_heap(struct proc_mm* pvms, ptr_t addr)
heap->region_copied = __heap_copied;
mm_index((void**)&pvms->heap, heap);
heap->region_copied = __heap_copied;
mm_index((void**)&pvms->heap, heap);
+
+ return status;
}
__DEFINE_LXSYSCALL1(void*, sbrk, ssize_t, incr)
{
}
__DEFINE_LXSYSCALL1(void*, sbrk, ssize_t, incr)
{
- struct proc_mm* pvms = &__current->mm;
+ struct proc_mm* pvms =
(struct proc_mm*)
&__current->mm;
struct mm_region* heap = pvms->heap;
assert(heap);
struct mm_region* heap = pvms->heap;
assert(heap);
@@
-47,11
+49,11
@@
__DEFINE_LXSYSCALL1(void*, sbrk, ssize_t, incr)
__DEFINE_LXSYSCALL1(int, brk, void*, addr)
{
__DEFINE_LXSYSCALL1(int, brk, void*, addr)
{
- struct proc_mm* pvms = &__current->mm;
+ struct proc_mm* pvms =
(struct proc_mm*)
&__current->mm;
struct mm_region* heap = pvms->heap;
if (!heap) {
struct mm_region* heap = pvms->heap;
if (!heap) {
- return DO_STATUS(create_heap(pvms, addr));
+ return DO_STATUS(create_heap(pvms,
(ptr_t)
addr));
}
assert(heap);
}
assert(heap);