From: David van Moolenbroek Date: Sun, 4 Mar 2012 20:08:59 +0000 (+0100) Subject: Kernel: do not retry message delivery upon failure X-Git-Tag: v3.2.1~676 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=1512dc5c23d842f233c256a25feab3721a5a2871;p=minix.git Kernel: do not retry message delivery upon failure --- 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; }