Changeset 1e7a765 for libcfa


Ignore:
Timestamp:
Sep 30, 2023, 10:36:42 PM (7 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
147a137
Parents:
0bb64bfa
Message:

fix lock/unlock for heap statistic-mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/heap.cfa

    r0bb64bfa r1e7a765  
    1010// Created On       : Tue Dec 19 21:58:35 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Sep 11 11:21:10 2023
    13 // Update Count     : 1615
     12// Last Modified On : Sat Sep 30 17:31:15 2023
     13// Update Count     : 1617
    1414//
    1515
     
    5353#define TLSMODEL __attribute__(( tls_model("initial-exec") ))
    5454
    55 //#define __STATISTICS__
     55#define __STATISTICS__
    5656
    5757enum {
     
    681681
    682682static HeapStatistics & collectStats( HeapStatistics & stats ) with( heapMaster ) {
    683         lock( mgrLock );
     683        lock( heapMaster.mgrLock );
    684684
    685685        stats += heapMaster.stats;
     
    688688        } // for
    689689
    690         unlock( mgrLock );
     690        unlock( heapMaster.mgrLock );
    691691        return stats;
    692692} // collectStats
    693693
    694694static inline void clearStats() {
    695         lock( mgrLock );
     695        lock( heapMaster.mgrLock );
    696696
    697697        // Zero the heap master and all active thread heaps.
     
    701701        } // for
    702702
    703         unlock( mgrLock );
     703        unlock( heapMaster.mgrLock );
    704704} // clearStats
    705705#endif // __STATISTICS__
Note: See TracChangeset for help on using the changeset viewer.