custom message type for VM_BRK
This commit is contained in:
parent
7cb7ac5b42
commit
8c2ac80abd
4 changed files with 9 additions and 3 deletions
|
@ -659,7 +659,6 @@
|
||||||
# define VMF_SLOTNO m1_i2
|
# define VMF_SLOTNO m1_i2
|
||||||
# define VMF_CHILD_ENDPOINT m1_i3 /* result */
|
# define VMF_CHILD_ENDPOINT m1_i3 /* result */
|
||||||
#define VM_BRK (VM_RQ_BASE+2)
|
#define VM_BRK (VM_RQ_BASE+2)
|
||||||
# define VMB_ADDR m1_p1
|
|
||||||
#define VM_EXEC_NEWMEM (VM_RQ_BASE+3)
|
#define VM_EXEC_NEWMEM (VM_RQ_BASE+3)
|
||||||
# define VMEN_ENDPOINT m1_i1
|
# define VMEN_ENDPOINT m1_i1
|
||||||
# define VMEN_ARGSPTR m1_p1
|
# define VMEN_ARGSPTR m1_p1
|
||||||
|
|
|
@ -1735,6 +1735,12 @@ typedef struct {
|
||||||
} mess_lc_vm_shm_unmap;
|
} mess_lc_vm_shm_unmap;
|
||||||
_ASSERT_MSG_SIZE(mess_lc_vm_shm_unmap);
|
_ASSERT_MSG_SIZE(mess_lc_vm_shm_unmap);
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
void *addr;
|
||||||
|
uint8_t padding[52];
|
||||||
|
} mess_lc_vm_brk;
|
||||||
|
_ASSERT_MSG_SIZE(mess_lc_vm_brk);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
endpoint_t endpt;
|
endpoint_t endpt;
|
||||||
void *addr;
|
void *addr;
|
||||||
|
@ -2076,6 +2082,7 @@ typedef struct {
|
||||||
mess_lc_ipc_semget m_lc_ipc_semget;
|
mess_lc_ipc_semget m_lc_ipc_semget;
|
||||||
mess_lc_ipc_semctl m_lc_ipc_semctl;
|
mess_lc_ipc_semctl m_lc_ipc_semctl;
|
||||||
mess_lc_ipc_semop m_lc_ipc_semop;
|
mess_lc_ipc_semop m_lc_ipc_semop;
|
||||||
|
mess_lc_vm_brk m_lc_vm_brk;
|
||||||
|
|
||||||
mess_vfs_lchardriver_cancel m_vfs_lchardriver_cancel;
|
mess_vfs_lchardriver_cancel m_vfs_lchardriver_cancel;
|
||||||
mess_vfs_lchardriver_openclose m_vfs_lchardriver_openclose;
|
mess_vfs_lchardriver_openclose m_vfs_lchardriver_openclose;
|
||||||
|
|
|
@ -26,7 +26,7 @@ void *addr;
|
||||||
|
|
||||||
if (addr != _brksize) {
|
if (addr != _brksize) {
|
||||||
memset(&m, 0, sizeof(m));
|
memset(&m, 0, sizeof(m));
|
||||||
m.VMB_ADDR = addr;
|
m.m_lc_vm_brk.addr = addr;
|
||||||
if (_syscall(VM_PROC_NR, VM_BRK, &m) < 0) return(-1);
|
if (_syscall(VM_PROC_NR, VM_BRK, &m) < 0) return(-1);
|
||||||
_brksize = addr;
|
_brksize = addr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ int do_brk(message *msg)
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return real_brk(&vmproc[proc], (vir_bytes) msg->VMB_ADDR);
|
return real_brk(&vmproc[proc], (vir_bytes) msg->m_lc_vm_brk.addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*===========================================================================*
|
/*===========================================================================*
|
||||||
|
|
Loading…
Reference in a new issue