motivation behind pr_xxx macros

Himanshu Aggarwal lkml.himanshu at gmail.com
Sun Jan 30 10:12:36 EST 2011


While writing some code on 2.6.32, I have come across some of these
macros that in turn call printk:

pr_emerg
pr_alert
...
pr_debug

Is there any case when should these macros be preferred over explicit
printk statements? What is the motivation behind providing these
macros when this task can already be accomplished by using printk
statements explicitly with priority levels?

Regards,
Himanshu



More information about the Kernelnewbies mailing list