No need to use memcpy to copy a message of 36 bytes. The overhead just
to call memcpy is half of the inline copy (using gcc -O)
This commit is contained in:
parent
9a7cd8e254
commit
e0f7043e04
@ -115,7 +115,7 @@ PUBLIC void sys_task()
|
|||||||
*/
|
*/
|
||||||
vmassert(RTS_ISSET(caller_ptr, RTS_VMREQUEST));
|
vmassert(RTS_ISSET(caller_ptr, RTS_VMREQUEST));
|
||||||
vmassert(caller_ptr->p_vmrequest.type == VMSTYPE_KERNELCALL);
|
vmassert(caller_ptr->p_vmrequest.type == VMSTYPE_KERNELCALL);
|
||||||
memcpy(&caller_ptr->p_vmrequest.saved.reqmsg, &m, sizeof(m));
|
caller_ptr->p_vmrequest.saved.reqmsg = m;
|
||||||
} else if (result != EDONTREPLY) {
|
} else if (result != EDONTREPLY) {
|
||||||
/* Send a reply, unless inhibited by a handler function.
|
/* Send a reply, unless inhibited by a handler function.
|
||||||
* Use the kernel function lock_send() to prevent a system
|
* Use the kernel function lock_send() to prevent a system
|
||||||
@ -564,7 +564,7 @@ PRIVATE struct proc *vmrestart_check(message *m)
|
|||||||
|
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case VMSTYPE_KERNELCALL:
|
case VMSTYPE_KERNELCALL:
|
||||||
memcpy(m, &restarting->p_vmrequest.saved.reqmsg, sizeof(*m));
|
*m = restarting->p_vmrequest.saved.reqmsg;
|
||||||
restarting->p_vmrequest.saved.reqmsg.m_source = NONE;
|
restarting->p_vmrequest.saved.reqmsg.m_source = NONE;
|
||||||
vmassert(m->m_source == restarting->p_endpoint);
|
vmassert(m->m_source == restarting->p_endpoint);
|
||||||
/* Original caller could've disappeared in the meantime. */
|
/* Original caller could've disappeared in the meantime. */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user