This Trac instance is not used for development anymore!

We migrated our development workflow to git and Gitea.
To test the future redirection, replace trac by ariadne in the page URL.

Changeset 9875 for ps


Ignore:
Timestamp:
07/18/11 17:25:48 (13 years ago)
Author:
Jan Wassenberg
Message:

hopefully fix non-Windows build errors

Location:
ps/trunk/source/lib
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • ps/trunk/source/lib/alignment.h

    r9410 r9875  
    1717    return (n + multiple-1) & ~(multiple-1);
    1818}
     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
    1930
    2031
     
    3849
    3950static const size_t cacheLineSize = 64; // (L2)
     51# define CACHE_ALIGNED(type) ALIGNED(type, 64)  // ALIGNED() requires a literal; keep in sync with cacheLineSize
    4052
    41 #if MSC_VERSION
    42 #define CACHE_ALIGNED __declspec(align(64)) // align() requires a literal; keep in sync with cacheLineSize
    43 #endif
     53
    4454
    4555
  • ps/trunk/source/lib/debug.cpp

    r9871 r9875  
    533533ErrorReaction debug_OnError(Status err, atomic_bool* suppress, const wchar_t* file, int line, const char* func)
    534534{
    535     CACHE_ALIGNED u8 context[DEBUG_CONTEXT_SIZE];
     535    CACHE_ALIGNED(u8) context[DEBUG_CONTEXT_SIZE];
    536536    (void)debug_CaptureContext(context);
    537537
     
    549549ErrorReaction debug_OnAssertionFailure(const wchar_t* expr, atomic_bool* suppress, const wchar_t* file, int line, const char* func)
    550550{
    551     CACHE_ALIGNED u8 context[DEBUG_CONTEXT_SIZE];
     551    CACHE_ALIGNED(u8) context[DEBUG_CONTEXT_SIZE];
    552552    (void)debug_CaptureContext(context);
    553553
  • ps/trunk/source/lib/debug.h

    r9871 r9875  
    198198    do\
    199199    {\
    200         CACHE_ALIGNED u8 context[DEBUG_CONTEXT_SIZE];\
     200        CACHE_ALIGNED(u8) context[DEBUG_CONTEXT_SIZE];\
    201201        (void)debug_CaptureContext(context);\
    202202        (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  
    3838#include "lib/debug.h"
    3939
     40
     41Status debug_CaptureContext(void* UNUSED(context))
     42{
     43    // (not needed unless/until we support stack traces)
     44    return INFO::SKIPPED;
     45}
    4046
    4147void debug_break()
  • ps/trunk/source/lib/sysdep/os/win/tests/test_wdbg_sym.h

    r9871 r9875  
    108108        // amount of text (not just "(failed)" error messages) was produced.
    109109        ErrorMessageMem emm = {0};
    110         CACHE_ALIGNED u8 context[DEBUG_CONTEXT_SIZE];
     110        CACHE_ALIGNED(u8) context[DEBUG_CONTEXT_SIZE];
    111111        (void)debug_CaptureContext(context);
    112112        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  
    308308
    309309    FileControlBlock fcbs[maxFiles];
    310     CACHE_ALIGNED volatile intptr_t inUse[maxFiles];
     310    CACHE_ALIGNED(volatile intptr_t) inUse[maxFiles];
    311311
    312312    void Init()
Note: See TracChangeset for help on using the changeset viewer.