freebsd-dev/sys/dev/vt
John Baldwin 642ffab5fc Avoid grabbing locks when grabbing the vt(4) console for DDB.
Trying to grab locks during cngrab() when entering the debugger is
deadlock prone as all other CPUs are already halted (and thus unable
to release locks) when cngrab() is invoked.  One could instead use
try-locks.  However, the case that the try-lock fails still has to
be handled.  In addition, if the try-lock works it doesn't provide
any greater ordering guarantees than is already provided by entering
and exiting DDB.  It is simpler to define a simpler path for the
case that the try-lock would fail and always use that when entering
DDB.  Messing with timers, etc. when entering DDB is dubious even if
the try-lock succeeds.

This patch attempts to use the smallest possible set of operations to
grab the vt(4) console when entering DDB without using any locks.

Reviewed by:	emaste
Tested by:	Matthew Macy
MFC after:	1 week
2018-02-22 02:26:29 +00:00
..
colors Fix GCC build broken by r32744 2017-12-31 23:40:06 +00:00
font sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
hw Check more aggressively for whether the desired properties actually exist. 2017-12-30 20:23:14 +00:00
logo sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
vt_buf.c Implement "vidcontrol -h <history_size>" for vt(4) 2017-12-05 22:19:59 +00:00
vt_consolectl.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
vt_core.c Avoid grabbing locks when grabbing the vt(4) console for DDB. 2018-02-22 02:26:29 +00:00
vt_cpulogos.c Revert r316796. It is not necessary since r317173. 2017-04-19 22:43:11 +00:00
vt_font.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
vt_sysmouse.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
vt.h Implement "vidcontrol -h <history_size>" for vt(4) 2017-12-05 22:19:59 +00:00