函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\printk\printk.c Create Date:2022-07-27 11:07:09
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Return the console tty driver structure and its associated index

函数原型:struct tty_driver *console_device(int *index)

返回类型:struct tty_driver

参数:

类型参数名称
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  如果非device则继续下一循环
2588  driver等于device(c, index)
2589  如果driver退出
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  返回:driver