On Fri, Jan 06, 2006 at 02:12:59AM +0100, Bernd Eckenfels wrote:
> Josef Sipek <[email protected]> wrote:
> > That's something to watch out for...If you say have:
> >
> > printk(KERN_DEBUG "fooo.....");
> > do_foo();
> > printk(KERN_DEBUG "done.\n");
>
> dont do it. It is better to have the time stamps for both and to have atomic
> prints.
First of all, the above code is to just illustrate a point. And as a matter of
fact it may not even work if some other kernel thread prints something while
do_foo() is executing, the whole thing will get screwed up.
If I remember correctly, I the second line of the "sample" code, will _NOT_
produce a timestamp. So, the output will be:
[1234567.123456] fooo.....<7>done.
where, the timestamp is that of the first printk.
> In fact I would disallow this and add automatic linebreaks.
I wouldn't go that far. I'd just let the kernel janitors people have fun with
the existing code :)
Jeff.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]