Changeset 34d194c for libcfa/src/bits


Ignore:
Timestamp:
Jul 5, 2026, 11:13:26 PM (6 days ago)
Author:
Peter A. Buhr <pabuhr@…>
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)
Message:

move libcfa/src/concurrency/atomic.hfa to libcfa/src/bits/atomic.hfa, and update all the atomic operations

Location:
libcfa/src/bits
Files:
1 added
2 edited

Legend:

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

    r3859adb r34d194c  
    1313// Created On       : Thu Nov  9 13:24:10 2017
    1414// Last Modified By : Peter A. Buhr
    15 // Last Modified On : Mon Oct 27 22:40:05 2025
    16 // Update Count     : 23
     15// Last Modified On : Sat Jul  4 15:04:20 2026
     16// Update Count     : 26
    1717//
    1818
     
    6868#endif
    6969
    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#L116
    77         long long int virtual_timer_value;
    78         asm volatile("mrs %0, cntvct_el0" : "=r"(virtual_timer_value));
    79         return virtual_timer_value;
    80         #else
    81                 #error unsupported hardware architecture
    82         #endif
    83 }
    84 
    85 // pause to prevent excess processor bus usage
    86 #if defined( __i386 ) || defined( __x86_64 )
    87         #define Pause() __asm__ __volatile__ ( "pause" : : : )
    88 #elif defined( __ARM_ARCH )
    89         #define Pause() __asm__ __volatile__ ( "YIELD" : : : )
    90 #else
    91         #error unsupported architecture
    92 #endif
    93 
    9470#define CFA_IO_LAZY (1_l64u << 32_l64u)
  • libcfa/src/bits/locks.hfa

    r3859adb r34d194c  
    1313// Created On       : Tue Oct 31 15:14:38 2017
    1414// Last Modified By : Peter A. Buhr
    15 // Last Modified On : Tue Sep 20 22:09:50 2022
    16 // Update Count     : 18
     15// Last Modified On : Sat Jul  4 06:50:46 2026
     16// Update Count     : 21
    1717//
    1818
     
    2121#include "bits/debug.hfa"
    2222#include "bits/defs.hfa"
     23#include "bits/atomic.hfa"
    2324#include <assert.h>
    2425
Note: See TracChangeset for help on using the changeset viewer.