Ignore:
Timestamp:
Sep 28, 2018, 5:20:48 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
bb69196
Parents:
88e139e
Message:

Removed unnecessary alignment on locks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/bits/locks.hfa

    r88e139e r3aeee3c  
    3737#endif
    3838
    39 #if defined( __i386 ) || defined( __x86_64 ) || defined( __ARM_ARCH )
    40         // Intel recommendation
    41         #define __ALIGN__ __attribute__(( aligned (128) ))
    42 #elif defined( __sparc )
    43         #define __ALIGN__ CALIGN
    44 #else
    45         #error unsupported architecture
    46 #endif
    47 
    4839struct __spinlock_t {
    4940        // Wrap in struct to prevent false sharing with debug info
    50         struct {
    51                 // Align lock on 128-bit boundary
    52                 __ALIGN__ volatile bool lock;
    53         };
     41        volatile bool lock;
    5442        #ifdef __CFA_DEBUG__
    5543                // previous function to acquire the lock
     
    5846                void* prev_thrd;
    5947        #endif
    60 } __ALIGN__;
     48};
    6149
    6250#ifdef __cforall
Note: See TracChangeset for help on using the changeset viewer.