aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorMartin Waitz <tali@admingilde.org>2005-11-13 19:08:14 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-13 21:14:21 -0500
commitddad86c2d6f660112c6ce8aabae6ffd346e25b9b (patch)
treef11cca30f8c67631b5b2d51d5ab45398bedfe6ff /kernel
parentaeec46b97a7975fd983219177980c58ed4fd607c (diff)
[PATCH] DocBook: include printk documentation
Add printk documentation to kernel-api. Signed-off-by: Martin Waitz <tali@admingilde.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/printk.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/kernel/printk.c b/kernel/printk.c
index e9be027bc93..ac8a08f3620 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -491,7 +491,10 @@ __attribute__((weak)) unsigned long long printk_clock(void)
491 return sched_clock(); 491 return sched_clock();
492} 492}
493 493
494/* 494/**
495 * printk - print a kernel message
496 * @fmt: format string
497 *
495 * This is printk. It can be called from any context. We want it to work. 498 * This is printk. It can be called from any context. We want it to work.
496 * 499 *
497 * We try to grab the console_sem. If we succeed, it's easy - we log the output and 500 * We try to grab the console_sem. If we succeed, it's easy - we log the output and
@@ -503,6 +506,9 @@ __attribute__((weak)) unsigned long long printk_clock(void)
503 * One effect of this deferred printing is that code which calls printk() and 506 * One effect of this deferred printing is that code which calls printk() and
504 * then changes console_loglevel may break. This is because console_loglevel 507 * then changes console_loglevel may break. This is because console_loglevel
505 * is inspected when the actual printing occurs. 508 * is inspected when the actual printing occurs.
509 *
510 * See also:
511 * printf(3)
506 */ 512 */
507 513
508asmlinkage int printk(const char *fmt, ...) 514asmlinkage int printk(const char *fmt, ...)
@@ -655,6 +661,9 @@ static void call_console_drivers(unsigned long start, unsigned long end)
655 661
656/** 662/**
657 * add_preferred_console - add a device to the list of preferred consoles. 663 * add_preferred_console - add a device to the list of preferred consoles.
664 * @name: device name
665 * @idx: device index
666 * @options: options for this console
658 * 667 *
659 * The last preferred console added will be used for kernel messages 668 * The last preferred console added will be used for kernel messages
660 * and stdin/out/err for init. Normally this is used by console_setup 669 * and stdin/out/err for init. Normally this is used by console_setup
@@ -764,7 +773,8 @@ void release_console_sem(void)
764} 773}
765EXPORT_SYMBOL(release_console_sem); 774EXPORT_SYMBOL(release_console_sem);
766 775
767/** console_conditional_schedule - yield the CPU if required 776/**
777 * console_conditional_schedule - yield the CPU if required
768 * 778 *
769 * If the console code is currently allowed to sleep, and 779 * If the console code is currently allowed to sleep, and
770 * if this CPU should yield the CPU to another task, do 780 * if this CPU should yield the CPU to another task, do
@@ -976,6 +986,8 @@ EXPORT_SYMBOL(unregister_console);
976 986
977/** 987/**
978 * tty_write_message - write a message to a certain tty, not just the console. 988 * tty_write_message - write a message to a certain tty, not just the console.
989 * @tty: the destination tty_struct
990 * @msg: the message to write
979 * 991 *
980 * This is used for messages that need to be redirected to a specific tty. 992 * This is used for messages that need to be redirected to a specific tty.
981 * We don't put it into the syslog queue right now maybe in the future if 993 * We don't put it into the syslog queue right now maybe in the future if