cons: Fix initialization bug
authorBarret Rhoden <brho@cs.berkeley.edu>
Tue, 24 Jan 2017 16:48:30 +0000 (11:48 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 9 Feb 2017 17:31:08 +0000 (12:31 -0500)
commit638abcc55f9692c80eab2a38bcae72ab93199a4d
treeead679eb0b1ff253aad2a8e9d2ee951f41b0be3f
parent64b7407e3ba015e21587b4374c0663face8d47d8
cons: Fix initialization bug

We could receive an IRQ early during boot: after arch_init(), but before
cons_init().  That would attempt to write to an uninitialized queue.  This
would happen periodically in QEMU, and maybe it was more likely when I was
hitting keys during boot.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/drivers/dev/cons.c