]> Zhao Yanbai Git Server - minix.git/commitdiff
KERNEL - mini_senda simplification
authorTomas Hruby <thruby@few.vu.nl>
Fri, 4 Nov 2011 18:25:27 +0000 (18:25 +0000)
committerTomas Hruby <tom@minix3.org>
Fri, 13 Jan 2012 11:29:59 +0000 (11:29 +0000)
kernel/proc.c

index c46edc3f26e2ac68b9018fcf0b4ff3d627e123f5..5f7523c7fbf23cc1503a05ba1cc7c3de802c772f 100644 (file)
@@ -1184,21 +1184,18 @@ PRIVATE int mini_senda(struct proc *caller_ptr, asynmsg_t *table, size_t size)
                set_sys_bit(priv(dst_ptr)->s_asyn_pending, 
                            priv(caller_ptr)->s_id); 
                pending_recv = TRUE;
+               done = FALSE;
+               continue;
        } 
 
-       if (!pending_recv) flags |= AMF_DONE; /* Done handling message */
-
        /* Store results */
        tabent.result = r;
-       tabent.flags = flags;
-       if (flags & AMF_DONE) {
-               if (flags & AMF_NOTIFY)
-                       do_notify = TRUE; 
-               else if (r != OK && (flags & AMF_NOTIFY_ERR))
-                       do_notify = TRUE;
-               A_INSRT(i);     /* Copy results to caller */
-       } else
-               done = FALSE;
+       tabent.flags = flags | AMF_DONE;
+       if (flags & AMF_NOTIFY)
+               do_notify = TRUE;
+       else if (r != OK && (flags & AMF_NOTIFY_ERR))
+               do_notify = TRUE;
+       A_INSRT(i);     /* Copy results to caller */
   }
 
   if (do_notify)