Changeset 34d194c for libcfa/src/bits
- Timestamp:
- Jul 5, 2026, 11:13:26 PM (6 days ago)
- Branches:
- master
- Children:
- 97c75bf
- Parents:
- 3859adb
- git-author:
- Peter A. Buhr <pabuhr@…> (07/05/26 23:05:57)
- git-committer:
- Peter A. Buhr <pabuhr@…> (07/05/26 23:13:26)
- Location:
- libcfa/src/bits
- Files:
-
- 1 added
- 2 edited
-
atomic.hfa (added)
-
defs.hfa (modified) (2 diffs)
-
locks.hfa (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/bits/defs.hfa
r3859adb r34d194c 13 13 // Created On : Thu Nov 9 13:24:10 2017 14 14 // Last Modified By : Peter A. Buhr 15 // Last Modified On : Mon Oct 27 22:40:05 202516 // Update Count : 2 315 // Last Modified On : Sat Jul 4 15:04:20 2026 16 // Update Count : 26 17 17 // 18 18 … … 68 68 #endif 69 69 70 static inline long long int rdtscl(void) {71 #if defined( __i386 ) || defined( __x86_64 )72 unsigned int lo, hi;73 __asm__ __volatile__ ("rdtsc" : "=a"(lo), "=d"(hi));74 return ( (unsigned long long)lo)|( ((unsigned long long)hi)<<32 );75 #elif defined( __aarch64__ ) || defined( __arm__ )76 // https://github.com/google/benchmark/blob/v1.1.0/src/cycleclock.h#L11677 long long int virtual_timer_value;78 asm volatile("mrs %0, cntvct_el0" : "=r"(virtual_timer_value));79 return virtual_timer_value;80 #else81 #error unsupported hardware architecture82 #endif83 }84 85 // pause to prevent excess processor bus usage86 #if defined( __i386 ) || defined( __x86_64 )87 #define Pause() __asm__ __volatile__ ( "pause" : : : )88 #elif defined( __ARM_ARCH )89 #define Pause() __asm__ __volatile__ ( "YIELD" : : : )90 #else91 #error unsupported architecture92 #endif93 94 70 #define CFA_IO_LAZY (1_l64u << 32_l64u) -
libcfa/src/bits/locks.hfa
r3859adb r34d194c 13 13 // Created On : Tue Oct 31 15:14:38 2017 14 14 // Last Modified By : Peter A. Buhr 15 // Last Modified On : Tue Sep 20 22:09:50 202216 // Update Count : 1815 // Last Modified On : Sat Jul 4 06:50:46 2026 16 // Update Count : 21 17 17 // 18 18 … … 21 21 #include "bits/debug.hfa" 22 22 #include "bits/defs.hfa" 23 #include "bits/atomic.hfa" 23 24 #include <assert.h> 24 25
Note:
See TracChangeset
for help on using the changeset viewer.