From 207c24a4fdc86fb65c4bad77bc21eebf2acb9798 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Thu, 28 Dec 2017 11:23:29 -0600 Subject: [PATCH] deprecate LOCAL_STATIC_LOCK This construct is fairly useless. Doesn't prevent ctor ordering problems. --- src/factory/FieldCreateFactory.cpp | 2 -- src/misc/pv/localStaticLock.h | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/factory/FieldCreateFactory.cpp b/src/factory/FieldCreateFactory.cpp index 1f5e18e..82eef14 100644 --- a/src/factory/FieldCreateFactory.cpp +++ b/src/factory/FieldCreateFactory.cpp @@ -26,7 +26,6 @@ #include #include #include -#include using std::tr1::static_pointer_cast; using std::size_t; @@ -1456,7 +1455,6 @@ FieldConstPtr FieldCreate::deserialize(ByteBuffer* buffer, DeserializableControl // TODO replace with non-locking singleton pattern const FieldCreatePtr& FieldCreate::getFieldCreate() { - LOCAL_STATIC_LOCK; static FieldCreatePtr fieldCreate; static Mutex mutex; diff --git a/src/misc/pv/localStaticLock.h b/src/misc/pv/localStaticLock.h index fd4577b..1c1af4b 100644 --- a/src/misc/pv/localStaticLock.h +++ b/src/misc/pv/localStaticLock.h @@ -9,11 +9,13 @@ #ifndef LOCALSTATICLOCK_H #define LOCALSTATICLOCK_H +#include + #include #include -epicsShareExtern epics::pvData::Mutex& getLocalStaticInitMutex(); +epicsShareExtern epics::pvData::Mutex& getLocalStaticInitMutex() EPICS_DEPRECATED; #if defined(__GNUC__) && __GNUC__ >= 4 // noop