From fb664aa4bdcd6d78007d6aa7c8ca82ae973b3730 Mon Sep 17 00:00:00 2001 From: Matej Sekoranja Date: Thu, 13 Jan 2011 00:52:30 +0100 Subject: [PATCH] fixed macro --- pvDataApp/misc/showConstructDestruct.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pvDataApp/misc/showConstructDestruct.h b/pvDataApp/misc/showConstructDestruct.h index b8e1973..643b9ac 100644 --- a/pvDataApp/misc/showConstructDestruct.h +++ b/pvDataApp/misc/showConstructDestruct.h @@ -69,39 +69,39 @@ extern ShowConstructDestruct* getShowConstructDestruct(); #define PVDATA_REFCOUNT_MONITOR_DEFINE(NAME) \ static volatile int64 NAME ## _totalConstruct = 0; \ static volatile int64 NAME ## _totalDestruct = 0; \ - static Mutex globalMutex; \ + static Mutex NAME ## _globalMutex; \ \ - static bool notInited = true; \ + static bool NAME ## _notInited = true; \ static int64 NAME ## _processTotalConstruct() \ { \ - Lock xx(&globalMutex); \ + Lock xx(&NAME ## _globalMutex); \ return NAME ## _totalConstruct; \ } \ \ static int64 NAME ## _processTotalDestruct() \ { \ - Lock xx(&globalMutex); \ + Lock xx(&NAME ## _globalMutex); \ return NAME ## _totalDestruct; \ } \ \ static void NAME ## _init() \ { \ - Lock xx(&globalMutex); \ - if(notInited) { \ - notInited = false; \ + Lock xx(&NAME ## _globalMutex); \ + if(NAME ## _notInited) { \ + NAME ## _notInited = false; \ ShowConstructDestruct::registerCallback( \ - String("#NAME"), \ - NAME ## _processTotalConstruct,NAME ## _processTotalDestruct,0); \ + String(#NAME), \ + NAME ## _processTotalConstruct,NAME ## _processTotalDestruct,0,0); \ } \ } #define PVDATA_REFCOUNT_MONITOR_DESTRUCT(NAME) \ - Lock xx(&globalMutex); \ + Lock xx(&NAME ## _globalMutex); \ NAME ## _totalDestruct++; #define PVDATA_REFCOUNT_MONITOR_CONSTRUCT(NAME) \ NAME ## _init(); \ - Lock xx(&globalMutex); \ + Lock xx(&NAME ## _globalMutex); \ NAME ## _totalConstruct++;