custom message for vm_update

This commit is contained in:
Ben Gras 2014-07-26 13:53:49 +02:00 committed by Lionel Sambuc
parent 9e2efbd73d
commit 93422a1f4c
4 changed files with 12 additions and 6 deletions

View file

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

View file

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

View file

@ -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);
}

View file

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