From: Ben Gras Date: Tue, 20 Jan 2009 15:47:00 +0000 (+0000) Subject: minor cleanup, extra check X-Git-Tag: v3.1.4~128 X-Git-Url: http://zhaoyanbai.com/repos/?a=commitdiff_plain;h=0f41416100d01652ba209feb2e1aeeacec3ccdd9;p=minix.git minor cleanup, extra check --- diff --git a/kernel/proc.c b/kernel/proc.c index d8a502688..11960020a 100755 --- a/kernel/proc.c +++ b/kernel/proc.c @@ -621,7 +621,7 @@ int flags; while (*xpp != NIL_PROC) { if (src_e == ANY || src_p == proc_nr(*xpp)) { #if 1 - if (RTS_ISSET(*xpp, SLOT_FREE)) + if (RTS_ISSET(*xpp, SLOT_FREE) || RTS_ISSET(*xpp, NO_ENDPOINT)) { kprintf("%d: receive from %d; found dead %d (%s)?\n", caller_ptr->p_endpoint, src_e, (*xpp)->p_endpoint, @@ -689,11 +689,8 @@ int dst; /* which process to notify */ /* Check to see if target is blocked waiting for this message. A process * can be both sending and receiving during a SENDREC system call. */ - if ( (RTS_ISSET(dst_ptr, RECEIVING) && !RTS_ISSET(dst_ptr, SENDING)) && - ! (dst_ptr->p_misc_flags & REPLY_PENDING) && - (dst_ptr->p_getfrom_e == ANY || - dst_ptr->p_getfrom_e == caller_ptr->p_endpoint)) { - + if (WILLRECEIVE(dst_ptr, caller_ptr->p_endpoint) && + ! (dst_ptr->p_misc_flags & REPLY_PENDING)) { /* Destination is indeed waiting for a message. Assemble a notification * message and deliver it. Copy from pseudo-source HARDWARE, since the * message is in the kernel's address space.