comparison include/SDL_cpuinfo.h @ 5117:427998ff3bcf

Added cache line size info in SDL_cpuinfo.h I also added an implementation to dynamically query it, but didn't expose it since most x86 CPUs have an L1 cache line size of 64 bytes.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 27 Jan 2011 16:46:15 -0800
parents f7b03b6838cb
children 02b860cbc7ce
comparison
equal deleted inserted replaced
5116:e337f792c6a7 5117:427998ff3bcf
36 #ifdef __cplusplus 36 #ifdef __cplusplus
37 /* *INDENT-OFF* */ 37 /* *INDENT-OFF* */
38 extern "C" { 38 extern "C" {
39 /* *INDENT-ON* */ 39 /* *INDENT-ON* */
40 #endif 40 #endif
41
42 /* This is a guess for the cacheline size used for padding, and is correct
43 * for most x86 processors at this point.
44 */
45 #define SDL_CACHELINE_SIZE 64
41 46
42 /** 47 /**
43 * This function returns the number of CPU cores available. 48 * This function returns the number of CPU cores available.
44 */ 49 */
45 extern DECLSPEC int SDLCALL SDL_GetCPUCount(void); 50 extern DECLSPEC int SDLCALL SDL_GetCPUCount(void);