summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons/syscons.h
diff options
context:
space:
mode:
authorsimokawa <simokawa@FreeBSD.org>2007-09-20 04:05:59 +0000
committersimokawa <simokawa@FreeBSD.org>2007-09-20 04:05:59 +0000
commitdb835aec4a43bbb01e5c00e3053e397b7f0fbef8 (patch)
treed4d285641f612617591a96f5e87f5577604016be /sys/dev/syscons/syscons.h
parent099a7307bb3cf6518c7423e64ae0da0c143c0542 (diff)
downloadFreeBSD-src-db835aec4a43bbb01e5c00e3053e397b7f0fbef8.zip
FreeBSD-src-db835aec4a43bbb01e5c00e3053e397b7f0fbef8.tar.gz
Serialize output routine of terminal emulator (te_puts()) by a lock.
- The output routine of low level console is not protected by any lock by default. - Increment and decrement of sc->write_in_progress are not atomic and this may cause console hang. - We also have many other states used by emulator that should be protected by the lock. - This change does not fix interspersed messages which PRINTF_BUFR_SIZE kernel option should fix. Approved by: re (bmah) MFC after: 1 week
Diffstat (limited to 'sys/dev/syscons/syscons.h')
-rw-r--r--sys/dev/syscons/syscons.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/syscons/syscons.h b/sys/dev/syscons/syscons.h
index 089adf2..53e5ab7 100644
--- a/sys/dev/syscons/syscons.h
+++ b/sys/dev/syscons/syscons.h
@@ -333,6 +333,7 @@ typedef struct scr_stat {
int splash_save_mode; /* saved mode for splash screen */
int splash_save_status; /* saved status for splash screen */
+ struct mtx scr_lock; /* mutex for sc_puts() */
#ifdef _SCR_MD_STAT_DECLARED_
scr_md_stat_t md; /* machine dependent vars */
#endif
OpenPOWER on IntegriCloud