From c1a01beded5103df32ea2e3ec596e80de740cf2e Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Fri, 8 Dec 2017 13:01:25 -0500 Subject: Playback: Move internal track list onto buffer Does away the statically-allocated track list which frees quite a fair amount of in-RAM size. There's no compile-time hard track limit. Recommended TODO (but not right away): Have data small enough use the handle structure as its buffer data area. Almost the entire handle structure is unused for simple allocations without any associated filesystem path. Change-Id: I74a4561e5a837e049811ac421722ec00dadc0d50 --- firmware/export/system.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'firmware/export/system.h') diff --git a/firmware/export/system.h b/firmware/export/system.h index c7f5a8112c..f26b3d7f56 100644 --- a/firmware/export/system.h +++ b/firmware/export/system.h @@ -97,6 +97,11 @@ int get_cpu_boost_counter(void); #define MAX(a, b) (((a)>(b))?(a):(b)) #endif +#ifndef SGN +#define SGN(a) \ + ({ typeof (a) ___a = (a); (___a > 0) - (___a < 0); }) +#endif + /* return number of elements in array a */ #define ARRAYLEN(a) (sizeof(a)/sizeof((a)[0])) -- cgit v1.2.3