From: Jorrit Herder Date: Mon, 30 May 2005 11:11:40 +0000 (+0000) Subject: SENDREC now always has flag FRESH_ANSWER to prevent pending notifications X-Git-Tag: v3.1.0~803 X-Git-Url: http://zhaoyanbai.com/repos/README?a=commitdiff_plain;h=b421423c77b08e5b592d737bd68e0dbd8c013af9;p=minix.git SENDREC now always has flag FRESH_ANSWER to prevent pending notifications to be used as answer to a SENDREC call. --- diff --git a/kernel/proc.c b/kernel/proc.c index 1ee50e39d..d3245383d 100755 --- a/kernel/proc.c +++ b/kernel/proc.c @@ -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)) { diff --git a/lib/i386/rts/_ipc.s b/lib/i386/rts/_ipc.s index ffdb4f395..8988975f5 100755 --- a/lib/i386/rts/_ipc.s +++ b/lib/i386/rts/_ipc.s @@ -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