- Timestamp:
- 07/18/11 17:25:48 (13 years ago)
- Location:
- ps/trunk/source/lib
- Files:
-
- 6 edited
-
alignment.h (modified) (2 diffs)
-
debug.cpp (modified) (2 diffs)
-
debug.h (modified) (1 diff)
-
sysdep/os/unix/udbg.cpp (modified) (1 diff)
-
sysdep/os/win/tests/test_wdbg_sym.h (modified) (1 diff)
-
sysdep/os/win/wposix/waio.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ps/trunk/source/lib/alignment.h
r9410 r9875 17 17 return (n + multiple-1) & ~(multiple-1); 18 18 } 19 20 21 // bridge the differences between MSC and GCC alignment definitions. 22 // example: ALIGNED(int, 8) myAlignedVariable = 0; 23 #if MSC_VERSION 24 # define ALIGNED(type, multiple) __declspec(align(multiple)) type 25 #elif GCC_VERSION 26 # define ALIGNED(type, multiple) type __attribute__((aligned(multiple))) 27 #else 28 # define ALIGNED(type, multiple) type 29 #endif 19 30 20 31 … … 38 49 39 50 static const size_t cacheLineSize = 64; // (L2) 51 # define CACHE_ALIGNED(type) ALIGNED(type, 64) // ALIGNED() requires a literal; keep in sync with cacheLineSize 40 52 41 #if MSC_VERSION 42 #define CACHE_ALIGNED __declspec(align(64)) // align() requires a literal; keep in sync with cacheLineSize 43 #endif 53 44 54 45 55 -
ps/trunk/source/lib/debug.cpp
r9871 r9875 533 533 ErrorReaction debug_OnError(Status err, atomic_bool* suppress, const wchar_t* file, int line, const char* func) 534 534 { 535 CACHE_ALIGNED u8context[DEBUG_CONTEXT_SIZE];535 CACHE_ALIGNED(u8) context[DEBUG_CONTEXT_SIZE]; 536 536 (void)debug_CaptureContext(context); 537 537 … … 549 549 ErrorReaction debug_OnAssertionFailure(const wchar_t* expr, atomic_bool* suppress, const wchar_t* file, int line, const char* func) 550 550 { 551 CACHE_ALIGNED u8context[DEBUG_CONTEXT_SIZE];551 CACHE_ALIGNED(u8) context[DEBUG_CONTEXT_SIZE]; 552 552 (void)debug_CaptureContext(context); 553 553 -
ps/trunk/source/lib/debug.h
r9871 r9875 198 198 do\ 199 199 {\ 200 CACHE_ALIGNED u8context[DEBUG_CONTEXT_SIZE];\200 CACHE_ALIGNED(u8) context[DEBUG_CONTEXT_SIZE];\ 201 201 (void)debug_CaptureContext(context);\ 202 202 (void)debug_DisplayError(description, 0, context, L"debug_DisplayError", WIDEN(__FILE__), __LINE__, __func__, 0);\ -
ps/trunk/source/lib/sysdep/os/unix/udbg.cpp
r9419 r9875 38 38 #include "lib/debug.h" 39 39 40 41 Status debug_CaptureContext(void* UNUSED(context)) 42 { 43 // (not needed unless/until we support stack traces) 44 return INFO::SKIPPED; 45 } 40 46 41 47 void debug_break() -
ps/trunk/source/lib/sysdep/os/win/tests/test_wdbg_sym.h
r9871 r9875 108 108 // amount of text (not just "(failed)" error messages) was produced. 109 109 ErrorMessageMem emm = {0}; 110 CACHE_ALIGNED u8context[DEBUG_CONTEXT_SIZE];110 CACHE_ALIGNED(u8) context[DEBUG_CONTEXT_SIZE]; 111 111 (void)debug_CaptureContext(context); 112 112 const wchar_t* text = debug_BuildErrorMessage(L"dummy", 0,0,0, context, L"m_test_array", &emm); -
ps/trunk/source/lib/sysdep/os/win/wposix/waio.cpp
r9550 r9875 308 308 309 309 FileControlBlock fcbs[maxFiles]; 310 CACHE_ALIGNED volatile intptr_tinUse[maxFiles];310 CACHE_ALIGNED(volatile intptr_t) inUse[maxFiles]; 311 311 312 312 void Init()
Note:
See TracChangeset
for help on using the changeset viewer.
