From: Ben Gras Date: Sat, 26 Jul 2014 11:53:49 +0000 (+0200) Subject: custom message for vm_update X-Git-Tag: v3.3.0~123 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/expt.png?a=commitdiff_plain;h=93422a1f4c5ba3a143cfd344b48c2b39e6304194;p=minix.git custom message for vm_update --- diff --git a/include/minix/com.h b/include/minix/com.h index a134724dd..79b172f07 100644 --- a/include/minix/com.h +++ b/include/minix/com.h @@ -780,8 +780,6 @@ #define VMIW_REGION 3 #define VM_RS_UPDATE (VM_RQ_BASE+41) -# define VM_RS_SRC_ENDPT m1_i1 -# define VM_RS_DST_ENDPT m1_i2 #define VM_RS_MEMCTL (VM_RQ_BASE+42) # define VM_RS_CTL_ENDPT m1_i1 diff --git a/include/minix/ipc.h b/include/minix/ipc.h index a257ce048..f5932b4f4 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -1751,6 +1751,13 @@ typedef struct { } mess_lsys_vm_info; _ASSERT_MSG_SIZE(mess_lsys_vm_info); +typedef struct { + endpoint_t src; + endpoint_t dst; + uint8_t padding[48]; +} mess_lsys_vm_update; +_ASSERT_MSG_SIZE(mess_lsys_vm_update); + typedef struct { endpoint_t m_source; /* who sent the message */ int m_type; /* what kind of message is it */ @@ -1975,6 +1982,7 @@ typedef struct { mess_lc_vm_shm_unmap m_lc_vm_shm_unmap; mess_lsys_vm_query_exit m_lsys_vm_query_exit; mess_lsys_vm_info m_lsys_vm_info; + mess_lsys_vm_update m_lsys_vm_update; mess_vfs_lchardriver_cancel m_vfs_lchardriver_cancel; mess_vfs_lchardriver_openclose m_vfs_lchardriver_openclose; diff --git a/lib/libsys/vm_update.c b/lib/libsys/vm_update.c index 77027294d..c51cb0120 100644 --- a/lib/libsys/vm_update.c +++ b/lib/libsys/vm_update.c @@ -9,8 +9,8 @@ vm_update(endpoint_t src_e, endpoint_t dst_e) message m; memset(&m, 0, sizeof(m)); - m.VM_RS_SRC_ENDPT = src_e; - m.VM_RS_DST_ENDPT = dst_e; + m.m_lsys_vm_update.src = src_e; + m.m_lsys_vm_update.dst = dst_e; return _taskcall(VM_PROC_NR, VM_RS_UPDATE, &m); } diff --git a/servers/vm/rs.c b/servers/vm/rs.c index 493148f3d..5d9971538 100644 --- a/servers/vm/rs.c +++ b/servers/vm/rs.c @@ -73,8 +73,8 @@ int do_rs_update(message *m_ptr) struct vmproc *src_vmp, *dst_vmp; int r; - src_e = m_ptr->VM_RS_SRC_ENDPT; - dst_e = m_ptr->VM_RS_DST_ENDPT; + src_e = m_ptr->m_lsys_vm_update.src; + dst_e = m_ptr->m_lsys_vm_update.dst; /* Lookup slots for source and destination process. */ if(vm_isokendpt(src_e, &src_p) != OK) {