[PATCH] Add and use kputc()

Joel Sherrill joel.sherrill at OARcorp.com
Mon Aug 13 15:09:24 UTC 2012


On 08/13/2012 09:57 AM, Sebastian Huber wrote:
> On 08/13/2012 04:18 PM, Gedare Bloom wrote:
>> I have no issue with this change but it does "pollute" the public namespace.
> Yes, everyone using printk() has to deal now also with kputc().  This is not
> good.  What about rtems_console_putc()?  Maybe we should rename some of the
> other functions, e.g.
These aren't console, they are kernel debug output methods. And
if you rename getchark, you also need to rename printk.

I don't know that it is much of a pollution. If you want to put rtems_
in front of them, that's OK but including console is wrong.

If we are heading to a family of debug I/O methods, then they
all need to be consistent and (very likely) documented better
than they are currently.
>
> int rtems_console_getc(void);
>
> static inline int getchark(void)
> {
>     return rtems_console_getc();
> }
>
> void rtems_console_puts(const char *s);
>
> static inline void putk(const char *s)
> {
>     rtems_console_puts(s);
> }
>


-- 
Joel Sherrill, Ph.D.             Director of Research&   Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
     Support Available             (256) 722-9985





More information about the devel mailing list