mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-29 18:11:05 +00:00
stm32f0: Change idle task warning printf to save stack space
Change the idle task overslept warning printf to save stack space. The current warning uses CPRINTF which adds too much to the stack and overflows the idle stack. BUG=chrome-os-partner:33138, chrome-os-partner:36636 BRANCH=samus TEST=comment out the if (margin_us < 0) check and always print warning message. Without this CL stack overflows. With this CL, stack does not overflow and gets to 168/256, which is plenty of headroom considering the task doesn't do much. Change-Id: I19a8336b8584d2a1342e7b9290aad471d326a060 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/250300 Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
This commit is contained in:
committed by
ChromeOS Commit Bot
parent
ada0cc90a4
commit
2e6bee5642
@@ -397,7 +397,8 @@ void __idle(void)
|
||||
/* Calculate how close we were to missing deadline */
|
||||
margin_us = next_delay - rtc_diff;
|
||||
if (margin_us < 0)
|
||||
CPRINTS("overslept by %dus", -margin_us);
|
||||
/* Use CPUTS to save stack space */
|
||||
CPUTS("Idle overslept!\n");
|
||||
|
||||
/* Record the closest to missing a deadline. */
|
||||
if (margin_us < dsleep_recovery_margin_us)
|
||||
|
||||
Reference in New Issue
Block a user