From 00ef93d6a2ac63e7e23fb3f738bbc78183ee11b3 Mon Sep 17 00:00:00 2001 From: Philip Homburg Date: Fri, 22 Feb 2008 16:03:00 +0000 Subject: [PATCH] Use nonblocking sends to reply, fixed reply message for DIAGNOSTICS(_S) --- drivers/tty/console.c | 3 ++- drivers/tty/tty.c | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/drivers/tty/console.c b/drivers/tty/console.c index 205651ba7..c7a2421f5 100644 --- a/drivers/tty/console.c +++ b/drivers/tty/console.c @@ -1132,7 +1132,8 @@ int safe; cons_putk(c); } cons_putk(0); /* always terminate, even with EFAULT */ - m_ptr->m_type = result; + m_ptr->m_type = DIAG_REPL; + m_ptr->REP_STATUS = result; send(m_ptr->m_source, m_ptr); } diff --git a/drivers/tty/tty.c b/drivers/tty/tty.c index 780dbda34..56b412477 100644 --- a/drivers/tty/tty.c +++ b/drivers/tty/tty.c @@ -212,7 +212,11 @@ PUBLIC void main(void) continue; } case DIAGNOSTICS: /* a server wants to print some */ - printf("WARNING: old DIAGNOSTICS from %d\n", tty_mess.m_source); + if (tty_mess.m_source != LOG_PROC_NR) + { + printf("WARNING: old DIAGNOSTICS from %d\n", + tty_mess.m_source); + } do_diagnostics(&tty_mess, 0); continue; case DIAGNOSTICS_S: @@ -377,8 +381,10 @@ message *m_ptr; } /* Almost done. Send back the reply message to the caller. */ - if ((status = send(m_ptr->m_source, m_ptr)) != OK) { - panic("TTY","send in do_status failed, status\n", status); + status = sendnb(m_ptr->m_source, m_ptr); + if (status != OK) { + printf("tty`do_status: send to %d failed: %d\n", + m_ptr->m_source, status); } } @@ -1473,9 +1479,9 @@ int status; /* reply code */ panic("TTY","tty_reply sending TTY_REVIVE", NO_NUM); } - if ((status = send(replyee, &tty_mess)) != OK) { - printf("tty: tty_reply to %d failed: %d\n", replyee, status); - } + status = sendnb(replyee, &tty_mess); + if (status != OK) + printf("tty`tty_reply: send to %d failed: %d\n", replyee, status); } /*===========================================================================* -- 2.44.0