From 57d71e4267ecf66c84173f8ff3606091187b93b1 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Thu, 8 Nov 2007 05:17:20 +0000 Subject: Add some CACHEALIGN_* macros and a helper function to assist in aligning data and buffers on PortalPlayer processors to cache line boundaries. They're noops when PROC_NEED_CACHEALIGN isn't defined. Go safe and increase the value to 32 since I'm not sure yet if 16 is sufficient - changing that is a one-liner. Add helper to plugin API which will be needed shortly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15523 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/general.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'firmware/export/general.h') diff --git a/firmware/export/general.h b/firmware/export/general.h index 427e2773b8..f4ea9e206a 100644 --- a/firmware/export/general.h +++ b/firmware/export/general.h @@ -21,6 +21,7 @@ #define GENERAL_H #include +#include /* round a signed/unsigned 32bit value to the closest of a list of values */ /* returns the index of the closest value */ @@ -34,5 +35,6 @@ int make_list_from_caps32(unsigned long src_mask, unsigned long caps_mask, unsigned long *caps_list); +size_t align_buffer(void **start, size_t size, size_t align); #endif /* GENERAL_H */ -- cgit v1.2.3