An interrupt handler may change adbInCount underneath us, so qualify the declaration
with volatile. The bug didn't show its face until more agressive optimization showed up, apparently a result of the last egcs upgrade. (The interrupt handling changes from June have certainly also played a part.) Thanks to Ken'ichi Ishizaka for discovering the problem.
This commit is contained in:
parent
855917ea08
commit
a15eb6dc13
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: adb_direct.c,v 1.34 1999/11/28 10:07:34 scottr Exp $ */
|
||||
/* $NetBSD: adb_direct.c,v 1.35 1999/12/10 00:03:47 scottr Exp $ */
|
||||
|
||||
/* From: adb_direct.c 2.02 4/18/97 jpw */
|
||||
|
||||
@ -252,7 +252,7 @@ struct ADBDevEntry ADBDevTable[16]; /* our ADB device table */
|
||||
int ADBNumDevices; /* num. of ADB devices found with ADBReInit */
|
||||
|
||||
struct adbCommand adbInbound[ADB_QUEUE]; /* incoming queue */
|
||||
int adbInCount = 0; /* how many packets in in queue */
|
||||
volatile int adbInCount = 0; /* how many packets in in queue */
|
||||
int adbInHead = 0; /* head of in queue */
|
||||
int adbInTail = 0; /* tail of in queue */
|
||||
struct adbCommand adbOutbound[ADB_QUEUE]; /* outgoing queue - not used yet */
|
||||
|
Loading…
Reference in New Issue
Block a user