]> Zhao Yanbai Git Server - minix.git/commitdiff
SENDREC now always has flag FRESH_ANSWER to prevent pending notifications
authorJorrit Herder <jnherder@minix3.org>
Mon, 30 May 2005 11:11:40 +0000 (11:11 +0000)
committerJorrit Herder <jnherder@minix3.org>
Mon, 30 May 2005 11:11:40 +0000 (11:11 +0000)
to be used as answer to a SENDREC call.

kernel/proc.c
lib/i386/rts/_ipc.s

index 1ee50e39dc02eddabcecb5bfc9b62d1a75cce54a..d3245383daf0065ae1d177888ffd92aaaf74253d 100755 (executable)
@@ -148,8 +148,7 @@ message *m_ptr;                     /* pointer to message in the caller's space */
    *   - ECHO:    the message directly will be echoed to the sender 
    */
   switch(function) {
-  case SENDREC:                
-      flags |= FRESH_ANSWER;           /* ignore pending notifications */
+  case SENDREC:                                /* has FRESH_ANSWER flags */            
       /* fall through */
   case SEND:                   
       if (! isalive(src_dst)) {                        
index ffdb4f395bc1708781c5620aaf42cd7426b3caf4..8988975f59e6bb7715241005d35417cff2f837f3 100755 (executable)
@@ -5,10 +5,10 @@
 ECHO = 0
 SEND = 1
 RECEIVE = 2
-BOTH = 3
+SENDREC = 3 + 32               ! flags 0x20 to request fresh answer
 NOTIFY = 4
-NB_SEND = 1 + 16               ! SEND | 0xF0
-NB_RECEIVE = 2 + 16            ! RECEIVE | 0xF0
+NB_SEND = 1 + 16               ! flags 0x10 to prevent blocking 
+NB_RECEIVE = 2 + 16            ! flags 0x10 to prevent blocking 
 SYSVEC = 33                    ! trap to kernel 
 
 SRC_DST = 8                    ! source/ destination process 
@@ -75,7 +75,7 @@ __sendrec:
        push    ebx
        mov     eax, SRC_DST(ebp)       ! eax = dest-src
        mov     ebx, MESSAGE(ebp)       ! ebx = message pointer
-       mov     ecx, BOTH               ! _sendrec(srcdest, ptr)
+       mov     ecx, SENDREC            ! _sendrec(srcdest, ptr)
        int     SYSVEC                  ! trap to the kernel
        pop     ebx
        pop     ebp