custom message type for VM_QUERY_EXIT

This commit is contained in:
Ben Gras 2014-07-26 13:53:47 +02:00 committed by Lionel Sambuc
parent 01a50f57d8
commit 3c88d20cb5
4 changed files with 12 additions and 6 deletions

View file

@ -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

View 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;

View 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

View 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;
}