summaryrefslogtreecommitdiff
path: root/firmware/export/system.h
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2017-12-08 13:01:25 -0500
committerMichael Sevakis <jethead71@rockbox.org>2017-12-09 17:05:59 -0500
commitc1a01beded5103df32ea2e3ec596e80de740cf2e (patch)
tree244e086f06172bb1957c45e1c508a1de5ece6964 /firmware/export/system.h
parente86ea6bdb9976d5142ba924565dbdf96bf9826a7 (diff)
downloadrockbox-c1a01beded5103df32ea2e3ec596e80de740cf2e.tar.gz
rockbox-c1a01beded5103df32ea2e3ec596e80de740cf2e.zip
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
Diffstat (limited to 'firmware/export/system.h')
-rw-r--r--firmware/export/system.h5
1 files changed, 5 insertions, 0 deletions
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);
97#define MAX(a, b) (((a)>(b))?(a):(b)) 97#define MAX(a, b) (((a)>(b))?(a):(b))
98#endif 98#endif
99 99
100#ifndef SGN
101#define SGN(a) \
102 ({ typeof (a) ___a = (a); (___a > 0) - (___a < 0); })
103#endif
104
100/* return number of elements in array a */ 105/* return number of elements in array a */
101#define ARRAYLEN(a) (sizeof(a)/sizeof((a)[0])) 106#define ARRAYLEN(a) (sizeof(a)/sizeof((a)[0]))
102 107