GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||
GeezerVison is showing en.wikipedia.org — printk - Wikipedia
printk is a printf-like function of the Linux kernel interface for formatting and writing kernel log entries.[1] Since the C standard library (which contains the ubiquitous printf-like functions) is not available in kernel mode,
Use
int printk(const char* format, ...); The features different from Log level
printk(KERN_INFO "Message: %s", arg) The text specifying the log level consists of the ASCII SOH character followed by a digit that identifies the log level or the letter 'c' to indicate the message is a continuation of the previous message.[1][4] The following table lists each log level with its canonical meaning.[3]
When no log level is specified, the entry is logged as the default level which is typically KERN_WARNING,[1] but can be set, such as via the loglevel= boot argument.[5] Log levels are defined in header file <linux/kern_levels.h>.[4] Which log levels are printed is configured using the sysctl file /proc/sys/kernel/printk.[1] Pointer formatsThe No floating point supportWhile ImplementationThe function tries to lock the semaphore controlling access to the Linux system console.[1][8] If it succeeds, the output is logged and the console drivers are called.[1] If it is not possible to acquire the semaphore the output is placed into the log buffer, and the current holder of the console semaphore will notice the new output when they release the console semaphore and will send the buffered output to the console before releasing the semaphore.[1] One effect of this deferred printing is that code which calls References
External linksRetrieved from "https://en.wikipedia.org/w/index.php?title=Printk&oldid=1364828796" | ||||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |