Skip to content
Commit 971545c3 authored by Sandrine Bailleux's avatar Sandrine Bailleux
Browse files

Use lock-less printf() in assert macro



This allows to use assertions in interrupt context (which we do in
some places currently). Before this patch, a CPU could dead lock
itself by:

1. acquiring the printf lock in the normal execution context;
2. taking an interrupt while still holding the lock;
3. inside the interrupt handler, executing an assertion check that
   fails and thus tries to print an error message on the UART.

In a situation where several CPUs might be executing assert() at the
same time, we will now get interleaved messages but that should be
pretty rare.

Change-Id: I6d1603300f6a3ea5756a46338cb950b7ca3e7956
Signed-off-by: Sandrine Bailleux's avatarSandrine Bailleux <sandrine.bailleux@arm.com>
parent a2d516fc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment