Changeset e99e43f for libcfa/src/bits/locks.hfa
- Timestamp:
- Jan 10, 2019, 3:50:34 PM (7 years ago)
- 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:
- d97c3a4
- Parents:
- aeb8f70 (diff), 08222c7 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Aaron Moss <a3moss@…> (01/10/19 14:46:09)
- git-committer:
- Aaron Moss <a3moss@…> (01/10/19 15:50:34)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/bits/locks.hfa
raeb8f70 re99e43f 37 37 #endif 38 38 39 #if defined( __i386 ) || defined( __x86_64 ) || defined( __ARM_ARCH )40 // Intel recommendation41 #define __ALIGN__ __attribute__(( aligned (128) ))42 #elif defined( __sparc )43 #define __ALIGN__ CALIGN44 #else45 #error unsupported architecture46 #endif47 48 39 struct __spinlock_t { 49 40 // 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; 54 42 #ifdef __CFA_DEBUG__ 55 43 // previous function to acquire the lock … … 58 46 void* prev_thrd; 59 47 #endif 60 } __ALIGN__;48 }; 61 49 62 50 #ifdef __cforall
Note:
See TracChangeset
for help on using the changeset viewer.