Yes, it's explicitly allowed to use it in atomic context; the function is in fact very robust since it may also be called at panic time.
printk will just try to lock the console to print the message; if the lock is already taken then the output is queued to a buffer but the function will never block.
是的,明确允许在原子上下文中使用它;该函数实际上非常健壮,因为它也可能在紧急情况下被调用。
printk
只会尝试锁定控制台来打印消息;如果锁已经被占用,则输出将排队到缓冲区,但该函数永远不会阻塞。Yes, it's explicitly allowed to use it in atomic context; the function is in fact very robust since it may also be called at panic time.
printk
will just try to lock the console to print the message; if the lock is already taken then the output is queued to a buffer but the function will never block.