Added DEV_PING message type to drivers (but not ethernet drivers) so
RS can monitor them.
This commit is contained in:
parent
866b3fda9c
commit
87dbfc7dda
@ -292,6 +292,7 @@ PUBLIC int main()
|
|||||||
{
|
{
|
||||||
/* Set special disk parameters then call the generic main loop. */
|
/* Set special disk parameters then call the generic main loop. */
|
||||||
init_params();
|
init_params();
|
||||||
|
signal(SIGTERM, SIG_IGN);
|
||||||
driver_task(&w_dtab);
|
driver_task(&w_dtab);
|
||||||
return(OK);
|
return(OK);
|
||||||
}
|
}
|
||||||
@ -1142,6 +1143,8 @@ PRIVATE void w_intr_wait()
|
|||||||
} else if (m.m_type == HARD_INT) {
|
} else if (m.m_type == HARD_INT) {
|
||||||
sys_inb(w_wn->base_cmd + REG_STATUS, &w_wn->w_status);
|
sys_inb(w_wn->base_cmd + REG_STATUS, &w_wn->w_status);
|
||||||
ack_irqs(m.NOTIFY_ARG);
|
ack_irqs(m.NOTIFY_ARG);
|
||||||
|
} else if (m.m_type == DEV_PING) {
|
||||||
|
notify(m.m_source);
|
||||||
} else {
|
} else {
|
||||||
printf("AT_WINI got unexpected message %d from %d\n",
|
printf("AT_WINI got unexpected message %d from %d\n",
|
||||||
m.m_type, m.m_source);
|
m.m_type, m.m_source);
|
||||||
|
@ -57,6 +57,9 @@ PUBLIC void main(void)
|
|||||||
reply(TASK_REPLY, m.m_source, m.PROC_NR, OK);
|
reply(TASK_REPLY, m.m_source, m.PROC_NR, OK);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case DEV_PING:
|
||||||
|
notify(m.m_source);
|
||||||
|
break;
|
||||||
case DEV_IOCTL:
|
case DEV_IOCTL:
|
||||||
|
|
||||||
/* Probably best to SUSPEND the caller, CMOS I/O has nasty timeouts.
|
/* Probably best to SUSPEND the caller, CMOS I/O has nasty timeouts.
|
||||||
|
@ -711,6 +711,8 @@ PRIVATE void start_motor()
|
|||||||
receive(ANY, &mess);
|
receive(ANY, &mess);
|
||||||
if (mess.m_type == SYN_ALARM) {
|
if (mess.m_type == SYN_ALARM) {
|
||||||
f_expire_tmrs(NULL, NULL);
|
f_expire_tmrs(NULL, NULL);
|
||||||
|
} else if(mess.m_type == DEV_PING) {
|
||||||
|
notify(mess.m_source);
|
||||||
} else {
|
} else {
|
||||||
f_busy = BSY_IDLE;
|
f_busy = BSY_IDLE;
|
||||||
}
|
}
|
||||||
@ -793,6 +795,8 @@ PRIVATE int seek()
|
|||||||
receive(ANY, &mess);
|
receive(ANY, &mess);
|
||||||
if (mess.m_type == SYN_ALARM) {
|
if (mess.m_type == SYN_ALARM) {
|
||||||
f_expire_tmrs(NULL, NULL);
|
f_expire_tmrs(NULL, NULL);
|
||||||
|
} else if(mess.m_type == DEV_PING) {
|
||||||
|
notify(mess.m_source);
|
||||||
} else {
|
} else {
|
||||||
f_busy = BSY_IDLE;
|
f_busy = BSY_IDLE;
|
||||||
}
|
}
|
||||||
@ -1061,6 +1065,8 @@ PRIVATE void f_reset()
|
|||||||
receive(ANY, &mess);
|
receive(ANY, &mess);
|
||||||
if (mess.m_type == SYN_ALARM) {
|
if (mess.m_type == SYN_ALARM) {
|
||||||
f_expire_tmrs(NULL, NULL);
|
f_expire_tmrs(NULL, NULL);
|
||||||
|
} else if(mess.m_type == DEV_PING) {
|
||||||
|
notify(mess.m_source);
|
||||||
} else { /* expect HARD_INT */
|
} else { /* expect HARD_INT */
|
||||||
f_busy = BSY_IDLE;
|
f_busy = BSY_IDLE;
|
||||||
}
|
}
|
||||||
@ -1106,6 +1112,8 @@ PRIVATE int f_intr_wait()
|
|||||||
receive(ANY, &mess);
|
receive(ANY, &mess);
|
||||||
if (mess.m_type == SYN_ALARM) {
|
if (mess.m_type == SYN_ALARM) {
|
||||||
f_expire_tmrs(NULL, NULL);
|
f_expire_tmrs(NULL, NULL);
|
||||||
|
} else if(mess.m_type == DEV_PING) {
|
||||||
|
notify(mess.m_source);
|
||||||
} else {
|
} else {
|
||||||
f_busy = BSY_IDLE;
|
f_busy = BSY_IDLE;
|
||||||
}
|
}
|
||||||
|
@ -114,6 +114,8 @@ struct driver *dp; /* Device dependent entry points. */
|
|||||||
continue; /* don't reply */
|
continue; /* don't reply */
|
||||||
case SYN_ALARM: (*dp->dr_alarm)(dp, &mess);
|
case SYN_ALARM: (*dp->dr_alarm)(dp, &mess);
|
||||||
continue; /* don't reply */
|
continue; /* don't reply */
|
||||||
|
case DEV_PING: notify(mess.m_source);
|
||||||
|
continue;
|
||||||
default:
|
default:
|
||||||
if(dp->dr_other)
|
if(dp->dr_other)
|
||||||
r = (*dp->dr_other)(dp, &mess);
|
r = (*dp->dr_other)(dp, &mess);
|
||||||
|
@ -221,6 +221,8 @@ unsigned nr_req; /* length of request vector */
|
|||||||
unsigned long dv_size;
|
unsigned long dv_size;
|
||||||
int accumulated_read = 0;
|
int accumulated_read = 0;
|
||||||
struct logdevice *log;
|
struct logdevice *log;
|
||||||
|
static int f;
|
||||||
|
if(f++ > 100) exit(0);
|
||||||
|
|
||||||
if(log_device < 0 || log_device >= NR_DEVS)
|
if(log_device < 0 || log_device >= NR_DEVS)
|
||||||
return EIO;
|
return EIO;
|
||||||
|
@ -148,6 +148,7 @@ PUBLIC void main(void)
|
|||||||
case CANCEL: do_cancel(&pr_mess); break;
|
case CANCEL: do_cancel(&pr_mess); break;
|
||||||
case HARD_INT: do_printer_output(); break;
|
case HARD_INT: do_printer_output(); break;
|
||||||
case SYS_SIG: /* do nothing */ break;
|
case SYS_SIG: /* do nothing */ break;
|
||||||
|
case DEV_PING: notify(pr_mess.m_source); break;
|
||||||
default:
|
default:
|
||||||
reply(TASK_REPLY, pr_mess.m_source, pr_mess.PROC_NR, EINVAL);
|
reply(TASK_REPLY, pr_mess.m_source, pr_mess.PROC_NR, EINVAL);
|
||||||
}
|
}
|
||||||
|
@ -205,6 +205,9 @@ PUBLIC void main(void)
|
|||||||
case SYN_ALARM: /* fall through */
|
case SYN_ALARM: /* fall through */
|
||||||
expire_timers(); /* run watchdogs of expired timers */
|
expire_timers(); /* run watchdogs of expired timers */
|
||||||
continue; /* contine to check for events */
|
continue; /* contine to check for events */
|
||||||
|
case DEV_PING:
|
||||||
|
notify(tty_mess.m_source);
|
||||||
|
continue;
|
||||||
case HARD_INT: { /* hardware interrupt notification */
|
case HARD_INT: { /* hardware interrupt notification */
|
||||||
if (tty_mess.NOTIFY_ARG & kbd_irq_set)
|
if (tty_mess.NOTIFY_ARG & kbd_irq_set)
|
||||||
kbd_interrupt(&tty_mess);/* fetch chars from keyboard */
|
kbd_interrupt(&tty_mess);/* fetch chars from keyboard */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user