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

index bce17cc6c1a4825dfd861241b17077ebdf0d287c..8699688882416a5ba006c55e7d0b48904a292e49 100644 (file)
 #      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
index a5616fc276bc69ae4874bb5af175fe4079bae86e..bd703b31654fa36a1d11b29573c11a206c740d33 100644 (file)
@@ -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;
index 1e6d892c73085157a9be7f111ac83550617e721c..49d1334cf63923c0c91a2e39a494d85aa5a8c3ac 100644 (file)
@@ -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
index 67b1d8492dc82e0b7472886b5276e192d401cf83..cff96b5e105ee4ae7641379f7f2baa3e738cb7c1 100644 (file)
@@ -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;
 }