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
rework external irq system, introduce hierarchical irq
[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..50804dbf47ee46523e89e3003d2f1e6a532248fe 100644
(file)
--- a/
lunaix-os/kernel/mm/dmm.c
+++ b/
lunaix-os/kernel/mm/dmm.c
@@
-21,10
+21,10
@@
create_heap(struct proc_mm* pvms, ptr_t addr)
.flags = MAP_ANON | MAP_PRIVATE,
.type = REGION_TYPE_HEAP,
.proct = PROT_READ | PROT_WRITE,
.flags = MAP_ANON | MAP_PRIVATE,
.type = REGION_TYPE_HEAP,
.proct = PROT_READ | PROT_WRITE,
- .mlen = P
G
_SIZE };
+ .mlen = P
AGE
_SIZE };
int status = 0;
struct mm_region* heap;
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,20
+36,20
@@
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);
int err = mem_adjust_inplace(&pvms->regions, heap, heap->end + incr);
if (err) {
struct mm_region* heap = pvms->heap;
assert(heap);
int err = mem_adjust_inplace(&pvms->regions, heap, heap->end + incr);
if (err) {
- return (void*)
DO_STATUS(err
);
+ return (void*)
__ptr(DO_STATUS(err)
);
}
return (void*)heap->end;
}
__DEFINE_LXSYSCALL1(int, brk, void*, addr)
{
}
return (void*)heap->end;
}
__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) {