From 1512dc5c23d842f233c256a25feab3721a5a2871 Mon Sep 17 00:00:00 2001 From: David van Moolenbroek Date: Sun, 4 Mar 2012 21:08:59 +0100 Subject: [PATCH] Kernel: do not retry message delivery upon failure --- kernel/arch/i386/memory.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/kernel/arch/i386/memory.c b/kernel/arch/i386/memory.c index 6ec2f20ff..7a4e26e7e 100644 --- a/kernel/arch/i386/memory.c +++ b/kernel/arch/i386/memory.c @@ -540,7 +540,7 @@ PRIVATE void vm_suspend(struct proc *caller, const struct proc *target, *===========================================================================*/ PUBLIC void delivermsg(struct proc *rp) { - int r; + int r = OK; assert(rp->p_misc_flags & MF_DELIVERMSG); assert(rp->p_delivermsg.m_source != NONE); @@ -553,13 +553,12 @@ PUBLIC void delivermsg(struct proc *rp) rp->p_name, rp->p_endpoint); r = EFAULT; - } else { - /* Indicate message has been delivered; address is 'used'. */ - rp->p_delivermsg.m_source = NONE; - rp->p_misc_flags &= ~MF_DELIVERMSG; - r = OK; } + /* Indicate message has been delivered; address is 'used'. */ + rp->p_delivermsg.m_source = NONE; + rp->p_misc_flags &= ~MF_DELIVERMSG; + if(!(rp->p_misc_flags & MF_CONTEXT_SET)) { rp->p_reg.retreg = r; }