summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d45a2b9)
"vector siointrts". Thus only a compare is added for the other ports.
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.27 1994/02/06 11:59:35 ache Exp $
+ * $Id: sio.c,v 1.28 1994/02/07 18:37:21 ache Exp $
#define CE_INPUT_OFFSET RS_IBUFSIZE
u_char ibuf1[2 * RS_IBUFSIZE];
u_char ibuf2[2 * RS_IBUFSIZE];
#define CE_INPUT_OFFSET RS_IBUFSIZE
u_char ibuf1[2 * RS_IBUFSIZE];
u_char ibuf2[2 * RS_IBUFSIZE];
+ int do_timestamp;
+ struct timeval timestamp;
static struct com_s com_structs[NSIO];
static struct com_s com_structs[NSIO];
+static struct timeval intr_timestamp;
+
struct isa_driver siodriver = {
sioprobe, sioattach, "sio"
};
struct isa_driver siodriver = {
sioprobe, sioattach, "sio"
};
s = spltty();
iobase = com->iobase;
s = spltty();
iobase = com->iobase;
outb(iobase + com_cfcr, com->cfcr_image &= ~CFCR_SBREAK);
unit = com - &com_structs[0];
#ifdef KGDB
outb(iobase + com_cfcr, com->cfcr_image &= ~CFCR_SBREAK);
unit = com - &com_structs[0];
#ifdef KGDB
return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
}
return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
}
+/* Interrupt routine for timekeeping purposes */
+void
+siointrts(int unit)
+{
+ microtime(&intr_timestamp);
+ siointr(unit);
+}
+
void
siointr(unit)
int unit;
void
siointr(unit)
int unit;
u_char *ioptr;
u_char recv_data;
u_char *ioptr;
u_char recv_data;
+ if(com->do_timestamp)
+ com->timestamp = intr_timestamp;
while (TRUE) {
line_status = inb(com->line_status_port);
while (TRUE) {
line_status = inb(com->line_status_port);
case TIOCMGDTRWAIT:
*(int *)data = com->dtr_wait;
break;
case TIOCMGDTRWAIT:
*(int *)data = com->dtr_wait;
break;
+ case TIOCTIMESTAMP:
+ com->do_timestamp = 1;
+ *(struct timeval *)data = com->timestamp;
+ break;
default:
splx(s);
return (ENOTTY);
default:
splx(s);
return (ENOTTY);