# HG changeset patch # User Sam Lantinga # Date 1296175907 28800 # Node ID 02b860cbc7ce0dd5f2771f1b1fd9b77460689386 # Parent 427998ff3bcf2274ad283314473f208bc0e4ac1a Bump up the default cache line size. diff -r 427998ff3bcf -r 02b860cbc7ce include/SDL_cpuinfo.h --- a/include/SDL_cpuinfo.h Thu Jan 27 16:46:15 2011 -0800 +++ b/include/SDL_cpuinfo.h Thu Jan 27 16:51:47 2011 -0800 @@ -39,10 +39,12 @@ /* *INDENT-ON* */ #endif -/* This is a guess for the cacheline size used for padding, and is correct - * for most x86 processors at this point. +/* This is a guess for the cacheline size used for padding. + * Most x86 processors have a 64 byte cache line. + * The 64-bit PowerPC processors have a 128 byte cache line. + * We'll use the larger value to be generally safe. */ -#define SDL_CACHELINE_SIZE 64 +#define SDL_CACHELINE_SIZE 128 /** * This function returns the number of CPU cores available. diff -r 427998ff3bcf -r 02b860cbc7ce test/testatomic.c --- a/test/testatomic.c Thu Jan 27 16:46:15 2011 -0800 +++ b/test/testatomic.c Thu Jan 27 16:51:47 2011 -0800 @@ -3,6 +3,7 @@ #include "SDL.h" #include "SDL_atomic.h" #include "SDL_assert.h" +#include "SDL_cpuinfo.h" /* Absolutely basic tests just to see if we get the expected value