Skip to content

Commit

Permalink
zephyr: redefine MAX macro to the generic one
Browse files Browse the repository at this point in the history
SOF is redefining MAX() to version which cannot be used in
BUILD_ASSERT and logging is using it there. Redefining MAX
to generic version which can be used everywhere.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
  • Loading branch information
nordic-krch committed Mar 23, 2021
1 parent b5b772d commit 2f8ef20
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions zephyr/wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@
#error Define CONFIG_DYNAMIC_INTERRUPTS
#endif


/* TODO bring back zephyr MAX implementation which is used by the logging in
* that file.
*/
#undef MAX
#define MAX(a, b) (((a) > (b)) ? (a) : (b))

/*
* Memory - Create Zephyr HEAP for SOF.
*
Expand Down

0 comments on commit 2f8ef20

Please sign in to comment.