Changeset 36982fc for src/libcfa/bits


Ignore:
Timestamp:
Nov 29, 2017, 2:50:33 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
875a72f
Parents:
8a0a64d9
Message:

Renamed internal stuff to cfaabi_...

File:
1 edited

Legend:

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

    r8a0a64d9 r36982fc  
    6565
    6666        // Lock the spinlock, return false if already acquired
    67         static inline _Bool try_lock  ( __spinlock_t & this DEBUG_CTX_PARAM2 ) {
     67        static inline _Bool try_lock  ( __spinlock_t & this __cfaabi_dbg_ctx_param2 ) {
    6868                _Bool result = __lock_test_and_test_and_set( this.lock );
    69                 LIB_DEBUG_DO(
     69                __cfaabi_dbg_debug_do(
    7070                        if( result ) {
    7171                                this.prev_name = caller;
     
    7777
    7878        // Lock the spinlock, spin if already acquired
    79         static inline void lock( __spinlock_t & this DEBUG_CTX_PARAM2 ) {
     79        static inline void lock( __spinlock_t & this __cfaabi_dbg_ctx_param2 ) {
    8080                #ifndef NOEXPBACK
    8181                        enum { SPIN_START = 4, SPIN_END = 64 * 1024, };
     
    9898                        #endif
    9999                }
    100                 LIB_DEBUG_DO(
     100                __cfaabi_dbg_debug_do(
    101101                        this.prev_name = caller;
    102102                        this.prev_thrd = this_thread;
     
    105105
    106106        // Lock the spinlock, spin if already acquired
    107         static inline void lock_yield( __spinlock_t & this DEBUG_CTX_PARAM2 ) {
     107        static inline void lock_yield( __spinlock_t & this __cfaabi_dbg_ctx_param2 ) {
    108108                for ( unsigned int i = 1;; i += 1 ) {
    109109                        if ( __lock_test_and_test_and_set( this.lock ) ) break;
    110110                        yield( i );
    111111                }
    112                 LIB_DEBUG_DO(
     112                __cfaabi_dbg_debug_do(
    113113                        this.prev_name = caller;
    114114                        this.prev_thrd = this_thread;
Note: See TracChangeset for help on using the changeset viewer.