Changes in / [c8ad5d9:22bdc34]


Ignore:
Location:
src/libcfa
Files:
2 edited

Legend:

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

    rc8ad5d9 r22bdc34  
    6969        }
    7070
     71
     72        #ifdef __CFA_DEBUG__
     73                void __cfaabi_dbg_record(__spinlock_t & this, const char * prev_name);
     74        #else
     75                #define __cfaabi_dbg_record(x, y)
     76        #endif
     77
    7178        // Lock the spinlock, return false if already acquired
    7279        static inline _Bool try_lock  ( __spinlock_t & this __cfaabi_dbg_ctx_param2 ) {
     
    7481                if( result ) {
    7582                        disable_interrupts();
    76                         // __cfaabi_dbg_debug_do(
    77                         //      this.prev_name = caller;
    78                         //      this.prev_thrd = TL_GET( this_thread );
    79                         // )
     83                        __cfaabi_dbg_record( this, caller );
    8084                }
    8185                return result;
     
    105109                }
    106110                disable_interrupts();
    107                 // __cfaabi_dbg_debug_do(
    108                 //      this.prev_name = caller;
    109                 //      this.prev_thrd = TL_GET( this_thread );
    110                 // )
     111                __cfaabi_dbg_record( this, caller );
    111112        }
    112113
  • src/libcfa/concurrency/kernel.c

    rc8ad5d9 r22bdc34  
    725725                thrd->dbg_next = NULL;
    726726        }
     727
     728        void __cfaabi_dbg_record(__spinlock_t & this, const char * prev_name) {
     729                this.prev_name = prev_name;
     730                this.prev_thrd = TL_GET( this_thread );
     731        }
    727732)
    728733// Local Variables: //
Note: See TracChangeset for help on using the changeset viewer.