Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\printk\printk.c Create Date:2022-07-28 10:07:02
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Return the console tty driver structure and its associated index

Proto:struct tty_driver *console_device(int *index)

Type:struct tty_driver

Parameter:

TypeParameterName
int *index
2582  struct tty_driver * driver = NULL
2584  sole_lock - lock the console system for exclusive use.* Acquires a lock which guarantees that the caller has* exclusive access to the console system and the console_drivers list.* Can sleep, returns nothing.
2586  If Not device Then Continue
2588  driver = device(c, index)
2589  If driver Then Break
2592  sole_unlock - unlock the console system* Releases the console_lock which the caller holds on the console system* and the console driver list.* While the console_lock was held, console output may have been buffered* by printk()
2593  Return driver