Ignore:
File:
1 edited

Legend:

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

    r0cf5b79 r875a72f  
    1616#pragma once
    1717
     18#include "bits/debug.h"
    1819#include "bits/defs.h"
    1920
     
    6566
    6667        // Lock the spinlock, return false if already acquired
    67         static inline _Bool try_lock  ( __spinlock_t & this DEBUG_CTX_PARAM2 ) {
     68        static inline _Bool try_lock  ( __spinlock_t & this __cfaabi_dbg_ctx_param2 ) {
    6869                _Bool result = __lock_test_and_test_and_set( this.lock );
    69                 LIB_DEBUG_DO(
     70                __cfaabi_dbg_debug_do(
    7071                        if( result ) {
    7172                                this.prev_name = caller;
     
    7778
    7879        // Lock the spinlock, spin if already acquired
    79         static inline void lock( __spinlock_t & this DEBUG_CTX_PARAM2 ) {
     80        static inline void lock( __spinlock_t & this __cfaabi_dbg_ctx_param2 ) {
    8081                #ifndef NOEXPBACK
    8182                        enum { SPIN_START = 4, SPIN_END = 64 * 1024, };
     
    9899                        #endif
    99100                }
    100                 LIB_DEBUG_DO(
     101                __cfaabi_dbg_debug_do(
    101102                        this.prev_name = caller;
    102103                        this.prev_thrd = this_thread;
     
    105106
    106107        // Lock the spinlock, spin if already acquired
    107         static inline void lock_yield( __spinlock_t & this DEBUG_CTX_PARAM2 ) {
     108        static inline void lock_yield( __spinlock_t & this __cfaabi_dbg_ctx_param2 ) {
    108109                for ( unsigned int i = 1;; i += 1 ) {
    109110                        if ( __lock_test_and_test_and_set( this.lock ) ) break;
    110111                        yield( i );
    111112                }
    112                 LIB_DEBUG_DO(
     113                __cfaabi_dbg_debug_do(
    113114                        this.prev_name = caller;
    114115                        this.prev_thrd = this_thread;
Note: See TracChangeset for help on using the changeset viewer.