Have a couple of questions wrt QPID-7926

Question 1: what is the relevance of the is_pod<> result?

JIRA- 7926 (https://issues.apache.org/jira/browse/QPID-7926) states that:
"In a stand-alone windows program
returns false. In Linux the same statement in qpidd broker returns true."

If I execute:
grep -r is_pod
in qpid-cpp-1.38.0 directory I get nothing i.e. from what I can see the
broker never uses "is_pod".  What am I missing?

Question 2: Is this a possible approach?
I find 3 non-comment lines using QPID_MUTEX_INITIALIZER:
src/qpid/sys/posix/Mutex.h:#define QPID_MUTEX_INITIALIZER {
src/qpid/sys/windows/Mutex.h:#define QPID_MUTEX_INITIALIZER 0
src/qpid/log/Logger.cpp:sys::PODMutex loggerLock = QPID_MUTEX_INITIALIZER;

Where the last line is generating the compiler error under windows, due to
the type mismatch.

For windows PODMutex, is a thin wrapper around boost::recusive_mutex, while
under linux PODMutex is wrapper around pthread_mutex_t.

>From what I can see boost::recusive_mutex does not need to be initalised,
but pthread_mutex_t does, hence under windows+boost the initialisation on
the line:
sys::PODMutex loggerLock = QPID_MUTEX_INITIALIZER;
is not required.  So possibly src/qpid/log/Logger.cpp can become:
#if defined(BOOST_WINDOWS)
sys::PODMutex loggerLock;
sys::PODMutex loggerLock = QPID_MUTEX_INITIALIZER;

Kind regards

Reply via email to