Updated drivers according to syslib interface changes.
This commit is contained in:
parent
d62e515660
commit
aec394a330
10 changed files with 22 additions and 24 deletions
|
@ -696,7 +696,7 @@ struct command *cmd; /* Command block */
|
|||
* controller was not able to execute the command. Leftover timeouts are
|
||||
* simply ignored by the main loop.
|
||||
*/
|
||||
sys_syncalrm(SELF, wakeup_ticks, 0);
|
||||
sys_setalarm(wakeup_ticks, 0);
|
||||
|
||||
w_status = STATUS_ADMBSY;
|
||||
w_command = cmd->command;
|
||||
|
@ -1114,7 +1114,7 @@ unsigned cnt;
|
|||
* controller was not able to execute the command. Leftover timeouts are
|
||||
* simply ignored by the main loop.
|
||||
*/
|
||||
sys_syncalrm(SELF, wakeup_ticks, 0);
|
||||
sys_setalarm(wakeup_ticks, 0);
|
||||
|
||||
#if _WORD_SIZE > 2
|
||||
if (cnt > 0xFFFE) cnt = 0xFFFE; /* Max data per interrupt. */
|
||||
|
|
|
@ -339,7 +339,7 @@ PRIVATE void f_expire_tmrs(struct driver *dp, message *m_ptr)
|
|||
f_next_timeout = TMR_NEVER;
|
||||
} else { /* set new sync alarm */
|
||||
f_next_timeout = f_timers->tmr_exp_time;
|
||||
if ((s=sys_syncalrm(SELF, f_next_timeout, 1)) != OK)
|
||||
if ((s=sys_setalarm(f_next_timeout, 1)) != OK)
|
||||
panic("FLOPPY","Couldn't set synchronous alarm.", s);
|
||||
}
|
||||
}
|
||||
|
@ -368,7 +368,7 @@ tmr_func_t watchdog; /* watchdog function to be called */
|
|||
*/
|
||||
if (f_timers->tmr_exp_time != f_next_timeout) {
|
||||
f_next_timeout = f_timers->tmr_exp_time;
|
||||
if ((s=sys_syncalrm(SELF, f_next_timeout, 1)) != OK)
|
||||
if ((s=sys_setalarm(f_next_timeout, 1)) != OK)
|
||||
panic("FLOPPY","Couldn't set synchronous alarm.", s);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2385,9 +2385,9 @@ tmr_func_t watchdog; /* watchdog function to be called */
|
|||
fxp_timers->tmr_exp_time < fxp_next_timeout)
|
||||
{
|
||||
fxp_next_timeout= fxp_timers->tmr_exp_time;
|
||||
printf("fxp_set_timer: calling sys_syncalrm for %d (now+%d)\n",
|
||||
printf("fxp_set_timer: calling sys_setalarm for %d (now+%d)\n",
|
||||
fxp_next_timeout, fxp_next_timeout-now);
|
||||
r= sys_syncalrm(SELF, fxp_next_timeout, 1);
|
||||
r= sys_setalarm(fxp_next_timeout, 1);
|
||||
if (r != OK)
|
||||
panic("FXP","unable to set synchronous alarm", r);
|
||||
}
|
||||
|
@ -2420,7 +2420,7 @@ PRIVATE void fxp_expire_timers()
|
|||
else
|
||||
{ /* set new alarm */
|
||||
fxp_next_timeout = fxp_timers->tmr_exp_time;
|
||||
r= sys_syncalrm(SELF, fxp_next_timeout, 1);
|
||||
r= sys_setalarm(fxp_next_timeout, 1);
|
||||
if (r != OK)
|
||||
panic("FXP","Unable to set synchronous alarm.", r);
|
||||
}
|
||||
|
|
|
@ -137,7 +137,7 @@ subwrite(struct logdevice *log, int count, int proc_nr, vir_bytes user_vir)
|
|||
log->log_status = subread(log, log->log_iosize,
|
||||
log->log_proc_nr, log->log_user_vir);
|
||||
printf("alert for revive %d..\n", log->log_source);
|
||||
alert(log->log_source);
|
||||
notify(log->log_source);
|
||||
printf("alert for revive done..\n");
|
||||
log->log_revive_alerted = 1;
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ subwrite(struct logdevice *log, int count, int proc_nr, vir_bytes user_vir)
|
|||
* swallow all the data (log_size > 0).
|
||||
*/
|
||||
if(log->log_selected & SEL_RD) {
|
||||
alert(log->log_select_proc);
|
||||
notify(log->log_select_proc);
|
||||
log->log_select_alerted = 1;
|
||||
#if LOG_DEBUG
|
||||
printf("log notified %d\n", log->log_select_proc);
|
||||
|
|
|
@ -396,8 +396,8 @@ message *m_ptr; /* pointer to alarm message */
|
|||
}
|
||||
|
||||
/* Schedule new alarm for next m_random call. */
|
||||
if (OK != (s=sys_syncalrm(SELF, KRANDOM_PERIOD, 0)))
|
||||
report("MEM", "sys_syncalarm failed", s);
|
||||
if (OK != (s=sys_setalarm(KRANDOM_PERIOD, 0)))
|
||||
report("MEM", "sys_setalarm failed", s);
|
||||
}
|
||||
|
||||
/*============================================================================*
|
||||
|
|
|
@ -258,7 +258,7 @@ PRIVATE void output_done()
|
|||
#else
|
||||
revive_pending = TRUE;
|
||||
revive_status = status;
|
||||
alert(caller);
|
||||
notify(caller);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -459,7 +459,7 @@ message *mp;
|
|||
|
||||
tmra_inittimer(&rl_watchdog);
|
||||
/* Use a synchronous alarm instead of a watchdog timer. */
|
||||
sys_syncalrm(SELF, HZ, 0);
|
||||
sys_setalarm(HZ, 0);
|
||||
}
|
||||
|
||||
port = mp->DL_PORT;
|
||||
|
@ -2352,7 +2352,7 @@ timer_t *tp;
|
|||
int i;
|
||||
re_t *rep;
|
||||
/* Use a synchronous alarm instead of a watchdog timer. */
|
||||
sys_setalarm(SELF, HZ, 0);
|
||||
sys_setalarm(HZ, 0);
|
||||
|
||||
for (i= 0, rep = &re_table[0]; i<RE_PORT_NR; i++, rep++)
|
||||
{
|
||||
|
|
|
@ -765,8 +765,8 @@ PRIVATE void beep()
|
|||
tmrs_settimer(&tty_timers, &tmr_stop_beep, now+B_TIME, stop_beep, NULL);
|
||||
if (tty_timers->tmr_exp_time != tty_next_timeout) {
|
||||
tty_next_timeout = tty_timers->tmr_exp_time;
|
||||
if ((s=sys_syncalrm(SELF, tty_next_timeout, 1)) != OK)
|
||||
panic("TTY","Console couldn't set syn alarm.", s);
|
||||
if ((s=sys_setalarm(tty_next_timeout, 1)) != OK)
|
||||
panic("TTY","Console couldn't set alarm.", s);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -539,7 +539,7 @@ int scode; /* scan code for a function key */
|
|||
/* See if an observer is registered and send it a message. */
|
||||
if (proc_nr != NONE) {
|
||||
m.NOTIFY_TYPE = FKEY_PRESSED;
|
||||
alert(proc_nr);
|
||||
notify(proc_nr);
|
||||
}
|
||||
return(TRUE);
|
||||
}
|
||||
|
|
|
@ -213,12 +213,10 @@ PUBLIC void main(void)
|
|||
|
||||
if (sigismember(&sigset, SIGKSTOP)) {
|
||||
cons_stop(); /* switch to primary console */
|
||||
#if DEAD_CODE
|
||||
if (irq_hook_id != -1) {
|
||||
sys_irqdisable(&irq_hook_id);
|
||||
sys_irqrmpolicy(KEYBOARD_IRQ, &irq_hook_id);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (sigismember(&sigset, SIGTERM)) cons_stop();
|
||||
if (sigismember(&sigset, SIGKMESS)) do_new_kmess(&tty_mess);
|
||||
|
@ -847,7 +845,7 @@ PUBLIC int select_retry(struct tty *tp)
|
|||
}
|
||||
#else
|
||||
if (select_try(tp, tp->tty_select_ops))
|
||||
alert(tp->tty_select_proc);
|
||||
notify(tp->tty_select_proc);
|
||||
#endif
|
||||
|
||||
return OK;
|
||||
|
@ -896,7 +894,7 @@ tty_t *tp; /* TTY to check for events. */
|
|||
if (tp->tty_incum >= tp->tty_min && tp->tty_inleft > 0) {
|
||||
#if NEW_REVIVE
|
||||
if (tp->tty_inrepcode == REVIVE) {
|
||||
alert(tp->tty_incaller);
|
||||
notify(tp->tty_incaller);
|
||||
tp->tty_inrevived = 1;
|
||||
} else {
|
||||
tty_reply(tp->tty_inrepcode, tp->tty_incaller,
|
||||
|
@ -973,7 +971,7 @@ register tty_t *tp; /* pointer to terminal to read from */
|
|||
if (tp->tty_inleft == 0) {
|
||||
#if NEW_REVIVE
|
||||
if (tp->tty_inrepcode == REVIVE) {
|
||||
alert(tp->tty_incaller);
|
||||
notify(tp->tty_incaller);
|
||||
tp->tty_inrevived = 1;
|
||||
} else {
|
||||
tty_reply(tp->tty_inrepcode, tp->tty_incaller,
|
||||
|
@ -1605,7 +1603,7 @@ PRIVATE void expire_timers(void)
|
|||
if (tty_timers == NULL) tty_next_timeout = TMR_NEVER;
|
||||
else { /* set new sync alarm */
|
||||
tty_next_timeout = tty_timers->tmr_exp_time;
|
||||
if ((s=sys_syncalrm(SELF, tty_next_timeout, 1)) != OK)
|
||||
if ((s=sys_setalarm(tty_next_timeout, 1)) != OK)
|
||||
panic("TTY","Couldn't set synchronous alarm.", s);
|
||||
}
|
||||
}
|
||||
|
@ -1641,7 +1639,7 @@ int enable; /* set timer if true, otherwise unset */
|
|||
if (tty_timers == NULL) tty_next_timeout = TMR_NEVER;
|
||||
else if (tty_timers->tmr_exp_time != tty_next_timeout) {
|
||||
tty_next_timeout = tty_timers->tmr_exp_time;
|
||||
if ((s=sys_syncalrm(SELF, tty_next_timeout, 1)) != OK)
|
||||
if ((s=sys_setalarm(tty_next_timeout, 1)) != OK)
|
||||
panic("TTY","Couldn't set synchronous alarm.", s);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue