函数源码

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source File:kernel\printk\printk.c Create Date:2022-07-27 11:07:01
首页 Copyright©Brick

2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
/**
 * console_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.
 */
void console_lock(void)
{
    might_sleep();
 
    down_console_sem();
    if (console_suspended)
        return;
    console_locked = 1;
    console_may_schedule = 1;
}