libc/stdio: in dtoa(), up_interrupt_context() is used in a debug assertion. up_interrupt_context() is not available in the user-mode phase of the PROTECTED or KERNEL build configurations. In those configurations, enabling libc floating point support and debug assertions will result in an undefined reference to up_interrupt_context().
This commit is contained in:
parent
be81893b55
commit
e93cb86903
@ -138,6 +138,7 @@ static void lib_dtoa(FAR struct lib_outstream_s *obj, int fmt, int prec,
|
||||
int dsgn; /* Unused sign indicator */
|
||||
int i;
|
||||
|
||||
#if defined(CONFIG_BUILD_FLAT) || defined(__KERNEL__)
|
||||
/* This function may *NOT* be called within interrupt level logic. That is
|
||||
* because the logic in __dtoa may attempt to allocate memory. That will
|
||||
* lead to cryptic failures down the road within the memory manager.
|
||||
@ -146,6 +147,7 @@ static void lib_dtoa(FAR struct lib_outstream_s *obj, int fmt, int prec,
|
||||
*/
|
||||
|
||||
DEBUGASSERT(up_interrupt_context() == false);
|
||||
#endif
|
||||
|
||||
/* Special handling for NaN and Infinity */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user