Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/pmax/dev Fix callout change for keyboard repeat. T...
details: https://anonhg.NetBSD.org/src/rev/ab893d30aa6e
branches: trunk
changeset: 485359:ab893d30aa6e
user: mhitch <mhitch%NetBSD.org@localhost>
date: Wed Apr 26 04:16:17 2000 +0000
description:
Fix callout change for keyboard repeat. The callout structure was
incorrectly added as a union member which overlaid the keyboard
state structure. Fixed by moving the callout structure into to
keyboard state structure.
diffstat:
sys/arch/pmax/dev/dtop.c | 13 ++++++-------
sys/arch/pmax/dev/dtopreg.h | 4 ++--
2 files changed, 8 insertions(+), 9 deletions(-)
diffs (87 lines):
diff -r 63d32bcc67d7 -r ab893d30aa6e sys/arch/pmax/dev/dtop.c
--- a/sys/arch/pmax/dev/dtop.c Wed Apr 26 02:49:04 2000 +0000
+++ b/sys/arch/pmax/dev/dtop.c Wed Apr 26 04:16:17 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dtop.c,v 1.52 2000/03/26 06:51:46 nisimura Exp $ */
+/* $NetBSD: dtop.c,v 1.53 2000/04/26 04:16:17 mhitch Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -94,7 +94,7 @@
********************************************************/
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: dtop.c,v 1.52 2000/03/26 06:51:46 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dtop.c,v 1.53 2000/04/26 04:16:17 mhitch Exp $");
#include "opt_ddb.h"
#include "rasterconsole.h"
@@ -158,7 +158,6 @@
int (*handler) __P((dtop_device_t, dtop_message_t,
int, int));
dtop_device status;
- struct callout repeat_ch;
} device[(DTOP_ADDR_DEFAULT - DTOP_ADDR_FIRST) >> 1];
# define DTOP_DEVICE_NO(address) (((address)-DTOP_ADDR_FIRST)>>1)
@@ -275,7 +274,7 @@
for (i = 0; i < DTOP_MAX_DEVICES; i++) {
sc->device[i].handler = dtop_null_device_handler;
- callout_init(&sc->device[i].repeat_ch);
+ callout_init(&sc->device[i].status.keyboard.repeat_ch);
}
/* a lot more needed here, fornow: */
@@ -856,7 +855,7 @@
s = splhigh();
if (dev->keyboard.k_ar_state != K_AR_IDLE) {
dev->keyboard.k_ar_state = K_AR_IDLE;
- callout_stop(&dev->repeat_ch);
+ callout_stop(&dev->keyboard.repeat_ch);
}
splx(s);
msg_len = msg->code.val.len;
@@ -967,7 +966,7 @@
bcopy(save, dev->keyboard.last_codes, msg_len);
dev->keyboard.last_codes_count = msg_len;
if (dev->keyboard.k_ar_state == K_AR_ACTIVE)
- callout_reset(&dev->repeat_ch, hz / 2,
+ callout_reset(&dev->keyboard.repeat_ch, hz / 2,
dtop_keyboard_repeat, (void *)dev);
return (outc);
}
@@ -1011,7 +1010,7 @@
}
}
if (gotone)
- callout_reset(&dev->repeat_ch, hz / 20,
+ callout_reset(&dev->keyboard.repeat_ch, hz / 20,
dtop_keyboard_repeat, dev);
else
dev->keyboard.k_ar_state = K_AR_IDLE;
diff -r 63d32bcc67d7 -r ab893d30aa6e sys/arch/pmax/dev/dtopreg.h
--- a/sys/arch/pmax/dev/dtopreg.h Wed Apr 26 02:49:04 2000 +0000
+++ b/sys/arch/pmax/dev/dtopreg.h Wed Apr 26 04:16:17 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dtopreg.h,v 1.7 2000/03/23 06:43:01 thorpej Exp $ */
+/* $NetBSD: dtopreg.h,v 1.8 2000/04/26 04:16:17 mhitch Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -251,6 +251,7 @@
# define K_AR_OFF 4 /* turn off polling pls */
# define K_AR_ACTIVE 2 /* polling, no autos yet */
# define K_AR_TRIGGER 1 /* sent one autorepeat */
+ struct callout repeat_ch;
} keyboard;
struct {
@@ -265,7 +266,6 @@
} locator;
/* add more as they come along */
- struct callout repeat_ch;
} dtop_device, *dtop_device_t;
Home |
Main Index |
Thread Index |
Old Index