-#define NEW_REVIVE 1
/* This file contains the tesminal driver, both for the IBM console and regular
* ASCII terminals. It handles only the device-independent part of a TTY, the
* device dependent parts are in console.c, rs232.c, etc. This file contains
/* Reply if enough bytes are available. */
if (tp->tty_incum >= tp->tty_min && tp->tty_inleft > 0) {
-#if NEW_REVIVE
if (tp->tty_inrepcode == REVIVE) {
notify(tp->tty_incaller);
tp->tty_inrevived = 1;
tp->tty_inproc, tp->tty_incum);
tp->tty_inleft = tp->tty_incum = 0;
}
-#else
- tty_reply(tp->tty_inrepcode, tp->tty_incaller, tp->tty_inproc,
- tp->tty_incum);
- tp->tty_inleft = tp->tty_incum = 0;
-#endif
}
if(tp->tty_select_ops)
select_retry(tp);
/* Usually reply to the reader, possibly even if incum == 0 (EOF). */
if (tp->tty_inleft == 0) {
-#if NEW_REVIVE
if (tp->tty_inrepcode == REVIVE) {
notify(tp->tty_incaller);
tp->tty_inrevived = 1;
tp->tty_inproc, tp->tty_incum);
tp->tty_inleft = tp->tty_incum = 0;
}
-#else
- tty_reply(tp->tty_inrepcode, tp->tty_incaller, tp->tty_inproc,
- tp->tty_incum);
- tp->tty_inleft = tp->tty_incum = 0;
-#endif
}
}
* alarm. The process number is stored in timer argument 'ta_int'. Notify that
* process with a notification message from CLOCK.
*/
- lock_notify(CLOCK, tmr_arg(tp)->ta_int);
+ int proc_nr = tmr_arg(tp)->ta_int; /* get process number */
+ tmr_inittimer(tp); /* reset alarm timer */
+ lock_notify(CLOCK, proc_nr); /* notify process */
}
#endif /* USE_SETALARM */
#include "sysutil.h"
+#include <timers.h>
/*===========================================================================*
* tickdelay *
receive(CLOCK,&m_alarm); /* await synchronous alarm */
/* Check if we must reschedule the current alarm. */
- if (m.ALRM_TIME_LEFT > 0) {
+ if (m.ALRM_TIME_LEFT > 0 && m.ALRM_TIME_LEFT != TMR_NEVER) {
m.ALRM_EXP_TIME = m.ALRM_TIME_LEFT - ticks;
if (m.ALRM_EXP_TIME <= 0)
m.ALRM_EXP_TIME = 1;
}
/* Initialize tables to all physical memory and print memory information. */
- printf("Gathering memory:");
+ printf("Physical memory:");
mem_init(mem_chunks, &free_clicks);
total_clicks = minix_clicks + free_clicks;
printf(" total %u KB,", click_to_round_k(total_clicks));