[rtems commit] libcsupport: Add and use rtems_putc()
Sebastian Huber
sebastian.huber at embedded-brains.de
Mon Aug 20 09:52:33 UTC 2012
On 08/20/2012 11:23 AM, Ralf Corsepius wrote:
> On 08/20/2012 10:08 AM, Sebastian Huber wrote:
>> Module: rtems
>> Branch: master
>> Commit: bd5a138629771ae174927791fcc7515232a0e4fa
>> Changeset:
>> http://git.rtems.org/rtems/commit/?id=bd5a138629771ae174927791fcc7515232a0e4fa
>>
>> Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
>> Date: Mon Aug 13 11:29:13 2012 +0200
>>
>> libcsupport: Add and use rtems_putc()
>>
>> This reduces code size and provides a function similar to fputc().
>
> Such additions need very detailed descriptions and documentation.
>
> In this case, you need to describe why this function exists and how it is
> different from an ordinary "putc",
There was a discussion about this last week on the mailing list and IRC.
http://www.rtems.org/pipermail/rtems-devel/2012-August/001585.html
http://www.rtems.org/pipermail/rtems-devel/2012-August/001598.html
>
> That said, I don't know what this function does, how it is different from putc
void rtems_putc(char c)
{
(*BSP_output_char)(c);
}
> ... and why you are introducing it at all. My gut feeling is, this function
> should not exist.
As the commit message says, to reduce code space. Function calls via a
function pointer usually need more op-codes than a direct function call.
--
Sebastian Huber, embedded brains GmbH
Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone : +49 89 18 90 80 79-6
Fax : +49 89 18 90 80 79-9
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the devel
mailing list