1PRINTK(9) Driver Basics PRINTK(9)
2
3
4
6 printk - print a kernel message
7
9 int printk(const char * fmt, ...);
10
12 fmt
13 format string
14
15 ...
16 variable arguments
17
19 This is printk. It can be called from any context. We want it to work.
20
21 We try to grab the console_sem. If we succeed, it's easy - we log the
22 output and call the console drivers. If we fail to get the semaphore we
23 place the output into the log buffer and return. The current holder of
24 the console_sem will notice the new output in release_console_sem and
25 will send it to the consoles before releasing the semaphore.
26
27 One effect of this deferred printing is that code which calls printk
28 and then changes console_loglevel may break. This is because
29 console_loglevel is inspected when the actual printing occurs.
30
32 printf(3)
33
34 See the vsnprintf documentation for format string extensions over C99.
35
37Kernel Hackers Manual 2.6. November 2011 PRINTK(9)