Function call instead of #define

Leon Pollak leonp at plris.com
Thu Oct 16 10:04:43 UTC 2008


Hello, all.

Can somebody explain:

Why file ../lib/libcpu/powerpc/shared/src/cach.c contains such functions as 

void _CPU_cache_flush_1_data_line(...) or
void _CPU_cache_invalidate_1_data_line(...)

as functions and not as macros?
I mean, why aren't they defined as macros in cache.h, for example? 

Considering the function
rtems_cache_invalidate_multiple_data_lines 
which may use
_CPU_cache_invalidate_1_data_line 
thousands of times, the performance improvement may be significant, no?

Where is my misunderstanding?

Thanks ahead.
-- 
Leon



More information about the users mailing list