]> Zhao Yanbai Git Server - minix.git/commitdiff
custom message type for VM_BRK
authorBen Gras <ben@minix3.org>
Sat, 26 Jul 2014 11:53:57 +0000 (13:53 +0200)
committerLionel Sambuc <lionel@minix3.org>
Mon, 28 Jul 2014 15:06:22 +0000 (17:06 +0200)
include/minix/com.h
include/minix/ipc.h
lib/libc/sys-minix/brk.c
servers/vm/break.c

index 3cedfe728c61d3900615733ad50f7fe5a48faeb5..e0edf54e8f427e8ce910ed7dc1e9f992a44a1863 100644 (file)
 #      define VMF_SLOTNO               m1_i2
 #      define VMF_CHILD_ENDPOINT       m1_i3   /* result */
 #define VM_BRK                 (VM_RQ_BASE+2)
-#      define VMB_ADDR                 m1_p1
 #define VM_EXEC_NEWMEM         (VM_RQ_BASE+3)
 #      define VMEN_ENDPOINT            m1_i1
 #      define VMEN_ARGSPTR             m1_p1
index 6de1d08b8299824338b604fd718ab61e0b021b36..c1fcc78e8db7a6fadf66f2c29a82b05c7d6eb232 100644 (file)
@@ -1735,6 +1735,12 @@ typedef struct {
 } 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 {
        endpoint_t      endpt;
        void            *addr;
@@ -2076,6 +2082,7 @@ typedef struct {
                mess_lc_ipc_semget      m_lc_ipc_semget;
                mess_lc_ipc_semctl      m_lc_ipc_semctl;
                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_openclose  m_vfs_lchardriver_openclose;
index 8b63978d9b8d81185e5890eac75c3d6f444adf75..a236196addb266ed28b50a55a01335bdd7f274b1 100644 (file)
@@ -26,7 +26,7 @@ void *addr;
 
   if (addr != _brksize) {
        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);
        _brksize = addr;
   }
index cc5cb7d8c3cdcd3218add8d2af321d93d4455cb9..92c0eee7d5e6a671ebf236425a9bb2198a1b897d 100644 (file)
@@ -54,7 +54,7 @@ int do_brk(message *msg)
                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);
 }
 
 /*===========================================================================*