[Bug 1661] Coverage improvements: termios

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Mon Aug 9 13:09:55 UTC 2010


https://www.rtems.org/bugzilla/show_bug.cgi?id=1661

--- Comment #5 from Joel Sherrill <joel.sherrill at oarcorp.com> 2010-08-09 08:09:54 CDT ---
(In reply to comment #4)
> I am very opposed to "local externs" like this one and consider them to be bad
> style (They indicate a violation of the API and/or improperly implemented API):
> 
> +  
> +  extern Heap_Control  *RTEMS_Malloc_Heap;
> +
>    static const rtems_termios_callbacks Callbacks = {
>      NULL,                                    /* firstOpen */
>      NULL,                                    /* lastClose */

It is an intentional violation of the API.  But most of the cases (except
malloc04) are calling it to just get the amount of free space
(e.g. malloc_free_space()).  I am testing a patch that should address 
all but malloc04.

malloc04 is replacing the malloc heap with another one so it can test the 
sbrk functionality in the malloc family.  I only see two ways to do this:

+ add it to a .h file
+ add "malloc_get_heap/malloc_set_heap"

I don't particularly care.  Which do you prefer?

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list