From: Ben Gras Date: Sat, 26 Jul 2014 11:53:47 +0000 (+0200) Subject: custom message type for VM_QUERY_EXIT X-Git-Tag: v3.3.0~125 X-Git-Url: http://zhaoyanbai.com/repos/cppcheck.log?a=commitdiff_plain;h=3c88d20cb5b3f4454171b50affabdb91a3a466f9;p=minix.git custom message type for VM_QUERY_EXIT --- diff --git a/include/minix/com.h b/include/minix/com.h index bce17cc6c..869968888 100644 --- a/include/minix/com.h +++ b/include/minix/com.h @@ -767,8 +767,6 @@ # define VM_RS_SYS m2_i2 #define VM_QUERY_EXIT (VM_RQ_BASE+38) -# define VM_QUERY_RET_PT m2_i1 -# define VM_QUERY_IS_MORE m2_i2 #define VM_NOTIFY_SIG (VM_RQ_BASE+39) # define VM_NOTIFY_SIG_ENDPOINT m1_i1 diff --git a/include/minix/ipc.h b/include/minix/ipc.h index a5616fc27..bd703b316 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -1734,6 +1734,13 @@ typedef struct { } mess_lsys_vm_getref; _ASSERT_MSG_SIZE(mess_lsys_vm_getref); +typedef struct { + endpoint_t ret_pt; + int is_more; + uint8_t padding[48]; +} mess_lsys_vm_query_exit; +_ASSERT_MSG_SIZE(mess_lsys_vm_query_exit); + typedef struct { endpoint_t m_source; /* who sent the message */ int m_type; /* what kind of message is it */ @@ -1956,6 +1963,7 @@ typedef struct { mess_lsys_vm_getref m_lsys_vm_getref; mess_lc_vm_getphys m_lc_vm_getphys; mess_lc_vm_shm_unmap m_lc_vm_shm_unmap; + mess_lsys_vm_query_exit m_lsys_vm_query_exit; mess_vfs_lchardriver_cancel m_vfs_lchardriver_cancel; mess_vfs_lchardriver_openclose m_vfs_lchardriver_openclose; diff --git a/lib/libsys/vm_query_exit.c b/lib/libsys/vm_query_exit.c index 1e6d892c7..49d1334cf 100644 --- a/lib/libsys/vm_query_exit.c +++ b/lib/libsys/vm_query_exit.c @@ -22,8 +22,8 @@ vm_query_exit(int *endpt) if (endpt == NULL) return EFAULT; - *endpt = m.VM_QUERY_RET_PT; - return (m.VM_QUERY_IS_MORE ? 1 : 0); + *endpt = m.m_lsys_vm_query_exit.ret_pt; + return (m.m_lsys_vm_query_exit.is_more ? 1 : 0); } int diff --git a/servers/vm/queryexit.c b/servers/vm/queryexit.c index 67b1d8492..cff96b5e1 100644 --- a/servers/vm/queryexit.c +++ b/servers/vm/queryexit.c @@ -55,8 +55,8 @@ int do_query_exit(message *m) if (!array[i].avail) nr++; } - m->VM_QUERY_RET_PT = ep; - m->VM_QUERY_IS_MORE = (nr > 0); + m->m_lsys_vm_query_exit.ret_pt = ep; + m->m_lsys_vm_query_exit.is_more = (nr > 0); return OK; }