From 097d8fee663ef8a8a63f29528ca04a7acb04f2ba Mon Sep 17 00:00:00 2001 From: Philip Homburg Date: Fri, 22 Feb 2008 14:53:02 +0000 Subject: [PATCH] Use nonblocking send for reply. Support for asynchronous message passing (needs cleaning up). --- servers/vfs/main.c | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/servers/vfs/main.c b/servers/vfs/main.c index 2551472a7..52186f77a 100644 --- a/servers/vfs/main.c +++ b/servers/vfs/main.c @@ -70,6 +70,49 @@ PUBLIC int main() printf("VFS: got call %d from %d\n", call_nr, who_e); #endif + if (call_nr == DEV_REVIVE) + { + endpoint_t endpt; + + endpt = m_in.REP_ENDPT; + if(endpt == FS_PROC_NR) { + endpt = suspended_ep(m_in.m_source, m_in.REP_IO_GRANT); + if(endpt == NONE) { + printf("FS: proc with " + "grant %d from %d not found (revive)\n", + m_in.REP_IO_GRANT, m_in.m_source); + continue; + } + } + revive(endpt, m_in.REP_STATUS); + continue; + } + if (call_nr == DEV_REOPEN_REPL) + { + reopen_reply(); + continue; + } + if (call_nr == DEV_CLOSE_REPL) + { + close_reply(); + continue; + } + if (call_nr == DEV_SEL_REPL1) + { + select_reply1(); + continue; + } + if (call_nr == DEV_SEL_REPL2) + { + select_reply2(); + continue; + } + if (call_nr == DIAG_REPL) + { + diag_repl(); + continue; + } + /* Check for special control messages first. */ if ((call_nr & NOTIFY_MESSAGE)) { if (call_nr == PROC_EVENT) @@ -243,7 +286,7 @@ int result; /* result of the call (usually OK or error #) */ printf("vfs:reply: replying %d for call %d\n", result, call_nr); m_out.reply_type = result; - s = send(whom, &m_out); + s = sendnb(whom, &m_out); if (s != OK) printf("VFS: couldn't send reply %d to %d: %d\n", result, whom, s); } -- 2.44.0