summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cpp/doc/Makefile2
-rw-r--r--cpp/include/IceUtil/Cond.h50
-rw-r--r--cpp/include/IceUtil/Lock.h58
-rw-r--r--cpp/include/IceUtil/Monitor.h31
-rw-r--r--cpp/include/IceUtil/Mutex.h37
-rw-r--r--cpp/include/IceUtil/RWRecMutex.h125
-rw-r--r--cpp/include/IceUtil/RecMutex.h19
-rw-r--r--cpp/include/IceUtil/Thread.h2
-rw-r--r--cpp/src/Ice/.depend2
-rw-r--r--cpp/src/Ice/Connection.cpp2
-rw-r--r--cpp/src/Ice/Object.cpp2
-rw-r--r--cpp/src/IceStorm/Subscriber.h2
-rw-r--r--cpp/src/IceStorm/TopicI.cpp4
-rw-r--r--cpp/src/IceUtil/Cond.cpp10
-rw-r--r--cpp/src/IceUtil/RWRecMutex.cpp10
-rw-r--r--cpp/src/IceUtil/RecMutex.cpp20
16 files changed, 113 insertions, 263 deletions
diff --git a/cpp/doc/Makefile b/cpp/doc/Makefile
index 5df654152a1..ab2102ebcd3 100644
--- a/cpp/doc/Makefile
+++ b/cpp/doc/Makefile
@@ -40,7 +40,7 @@ include $(top_srcdir)/config/Make.rules
manual/index.html: $(SGMLFILES)
rm -rf manual
db2html manual.sgml
- (mkdir manual/stylesheet-images; \
+ (mkdir -p manual/stylesheet-images; \
cd manual/stylesheet-images; \
ln -s ../../images/*.gif .)
diff --git a/cpp/include/IceUtil/Cond.h b/cpp/include/IceUtil/Cond.h
index a7202335784..b3274c77464 100644
--- a/cpp/include/IceUtil/Cond.h
+++ b/cpp/include/IceUtil/Cond.h
@@ -46,12 +46,12 @@ public:
Semaphore(long = 0);
~Semaphore();
- bool wait(long = -1);
- void post(int = 1);
+ bool wait(long = -1) const;
+ void post(int = 1) const;
private:
- HANDLE _sem;
+ mutable HANDLE _sem;
};
#else
@@ -79,9 +79,9 @@ public:
void signal();
//
- // pthread_cond_broadcast restarts all the threads that are
- // waiting on the condition variable cond. Nothing happens if no
- // threads are waiting on cond.
+ // broadcast restarts all the threads that are waiting on the
+ // condition variable cond. Nothing happens if no threads are
+ // waiting on cond.
//
void broadcast();
@@ -96,7 +96,7 @@ public:
// the mutex is reaquired.
//
template <typename Lock> inline void
- wait(Lock& lock)
+ wait(const Lock& lock) const
{
waitImpl(lock._mutex);
}
@@ -109,7 +109,7 @@ public:
// timeout.
//
template <typename Lock> inline bool
- timedwait(Lock& lock, long msec)
+ timedwait(const Lock& lock, long msec) const
{
timedwaitImpl(lock._mutex, msec);
}
@@ -131,7 +131,7 @@ private:
//
/*
template <typename M> void
- waitImpl(M& mutex)
+ waitImpl(const M& mutex) const
{
preWait();
@@ -152,7 +152,7 @@ private:
}
}
template <typename M> bool
- timedwaitImpl(M& mutex, long msec)
+ timedwaitImpl(const M& mutex, long msec) const
{
preWait();
@@ -176,7 +176,7 @@ private:
*/
void
- waitImpl(RecMutex& mutex)
+ waitImpl(const RecMutex& mutex) const
{
preWait();
@@ -196,7 +196,7 @@ private:
}
void
- waitImpl(Mutex& mutex)
+ waitImpl(const Mutex& mutex) const
{
preWait();
@@ -216,7 +216,7 @@ private:
}
bool
- timedwaitImpl(RecMutex& mutex, long msec)
+ timedwaitImpl(const RecMutex& mutex, long msec) const
{
preWait();
@@ -237,7 +237,7 @@ private:
}
bool
- timedwaitImpl(Mutex& mutex, long msec)
+ timedwaitImpl(const Mutex& mutex, long msec) const
{
preWait();
@@ -259,32 +259,32 @@ private:
#else
- template <typename M> void waitImpl(M&);
- template <typename M> bool timedwaitImpl(M&, long);
+ template <typename M> void waitImpl(const M&) const;
+ template <typename M> bool timedwaitImpl(const M&, long) const;
#endif
#ifdef WIN32
void wake(bool);
- void preWait();
- void postWait(bool);
- bool dowait(long);
+ void preWait() const;
+ void postWait(bool) const;
+ bool dowait(long) const;
Mutex _internal;
Semaphore _gate;
Semaphore _queue;
- long _blocked;
- long _unblocked;
- long _toUnblock;
+ mutable long _blocked;
+ mutable long _unblocked;
+ mutable long _toUnblock;
#else
- pthread_cond_t _cond;
+ mutable pthread_cond_t _cond;
#endif
};
#ifndef WIN32
template <typename M> inline void
-Cond::waitImpl(M& mutex)
+Cond::waitImpl(const M& mutex) const
{
typedef typename M::LockState LockState;
@@ -300,7 +300,7 @@ Cond::waitImpl(M& mutex)
}
template <typename M> inline bool
-Cond::timedwaitImpl(M& mutex, long msec)
+Cond::timedwaitImpl(const M& mutex, long msec) const
{
typedef typename M::LockState LockState;
diff --git a/cpp/include/IceUtil/Lock.h b/cpp/include/IceUtil/Lock.h
index 4fb921c8a66..d5b9d2ca14b 100644
--- a/cpp/include/IceUtil/Lock.h
+++ b/cpp/include/IceUtil/Lock.h
@@ -26,7 +26,7 @@ class Lock
{
public:
- Lock(T& mutex) :
+ Lock(const T& mutex) :
_mutex(mutex)
{
_mutex.lock();
@@ -39,7 +39,7 @@ public:
private:
- T& _mutex;
+ const T& _mutex;
friend class Cond;
};
@@ -49,7 +49,7 @@ class TryLock
{
public:
- TryLock(T& mutex) :
+ TryLock(const T& mutex) :
_mutex(mutex)
{
_mutex.trylock();
@@ -62,57 +62,7 @@ public:
private:
- T& _mutex;
-
- friend class Cond;
-};
-
-//
-// This is for use when a class derives from Mutex, Monitor or
-// RecMutex. Otherwise declare the concurrency primitive mutable.
-//
-template <typename T>
-class ConstLock
-{
-public:
-
- ConstLock(const T& mutex) :
- _mutex(const_cast<T&>(mutex))
- {
- _mutex.lock();
- }
-
- ~ConstLock()
- {
- _mutex.unlock();
- }
-
-private:
-
- T& _mutex;
-
- friend class Cond;
-};
-
-template <typename T>
-class ConstTryLock
-{
-public:
-
- ConstTryLock(const T& mutex) :
- _mutex(const_cast<T>(mutex))
- {
- _mutex.trylock();
- }
-
- ~ConstTryLock()
- {
- _mutex.unlock();
- }
-
-private:
-
- T& _mutex;
+ const T& _mutex;
friend class Cond;
};
diff --git a/cpp/include/IceUtil/Monitor.h b/cpp/include/IceUtil/Monitor.h
index 77af7f53822..36b14f9bb58 100644
--- a/cpp/include/IceUtil/Monitor.h
+++ b/cpp/include/IceUtil/Monitor.h
@@ -31,9 +31,6 @@ public:
typedef Lock<Monitor<T> > Lock;
typedef TryLock<Monitor<T> > TryLock;
- typedef ConstLock<Monitor<T> > ConstLock;
- typedef ConstTryLock<Monitor<T> > ConstTryLock;
-
Monitor();
~Monitor();
@@ -41,12 +38,12 @@ public:
// Note that lock/trylock & unlock in general should not be used
// directly. Instead use Lock & TryLock.
//
- void lock();
- void unlock();
- void trylock();
+ void lock() const;
+ void unlock() const;
+ void trylock() const;
- void wait();
- bool timedwait(long);
+ void wait() const;
+ bool timedwait(long) const;
void notify();
void notifyAll();
@@ -56,11 +53,11 @@ private:
Monitor(const Monitor&);
void operator=(const Monitor&);
- void notifyImpl(int);
+ void notifyImpl(int) const;
- Cond _cond;
+ mutable Cond _cond;
T _mutex;
- int _nnotify;
+ mutable int _nnotify;
};
} // End namespace IceUtil
@@ -88,7 +85,7 @@ IceUtil::Monitor<T>::~Monitor()
}
template <class T> inline void
-IceUtil::Monitor<T>::lock()
+IceUtil::Monitor<T>::lock() const
{
if (_mutex.lock())
{
@@ -101,7 +98,7 @@ IceUtil::Monitor<T>::lock()
}
template <class T> inline void
-IceUtil::Monitor<T>::unlock()
+IceUtil::Monitor<T>::unlock() const
{
int nnotify = _nnotify;
if (_mutex.unlock())
@@ -114,7 +111,7 @@ IceUtil::Monitor<T>::unlock()
}
template <class T> inline void
-IceUtil::Monitor<T>::trylock()
+IceUtil::Monitor<T>::trylock() const
{
if (_mutex.trylock())
{
@@ -127,7 +124,7 @@ IceUtil::Monitor<T>::trylock()
}
template <class T> inline void
-IceUtil::Monitor<T>::wait()
+IceUtil::Monitor<T>::wait() const
{
//
// Perform any pending notifies
@@ -153,7 +150,7 @@ IceUtil::Monitor<T>::wait()
}
template <class T> inline bool
-IceUtil::Monitor<T>::timedwait(long msec)
+IceUtil::Monitor<T>::timedwait(long msec) const
{
//
// Perform any pending notifies.
@@ -206,7 +203,7 @@ IceUtil::Monitor<T>::notifyAll()
template <class T> inline void
-IceUtil::Monitor<T>::notifyImpl(int nnotify)
+IceUtil::Monitor<T>::notifyImpl(int nnotify) const
{
//
// Zero indicates no notifies.
diff --git a/cpp/include/IceUtil/Mutex.h b/cpp/include/IceUtil/Mutex.h
index 5b4ffdaf3ee..0c43398b279 100644
--- a/cpp/include/IceUtil/Mutex.h
+++ b/cpp/include/IceUtil/Mutex.h
@@ -43,9 +43,6 @@ public:
typedef Lock<Mutex> Lock;
typedef TryLock<Mutex> TryLock;
- typedef ConstLock<Mutex> ConstLock;
- typedef ConstTryLock<Mutex> ConstTryLock;
-
Mutex();
~Mutex();
@@ -64,7 +61,7 @@ public:
//
// Return true if the mutex has been locked for the first time.
//
- bool lock();
+ bool lock() const;
//
// Throw LockedException in the case that the lock call would
@@ -72,13 +69,13 @@ public:
// thread). Returns true if the mutex has been locked for the
// first time.
//
- bool trylock();
+ bool trylock() const;
//
// Returns true if the mutex has been unlocked for the last time
// (false otherwise).
//
- bool unlock();
+ bool unlock() const;
private:
@@ -101,15 +98,15 @@ private:
};
#endif
- void unlock(LockState&);
- void lock(LockState&);
+ void unlock(LockState&) const;
+ void lock(LockState&) const;
friend class Cond;
#ifdef WIN32
- CRITICAL_SECTION _mutex;
+ mutable CRITICAL_SECTION _mutex;
#else
- pthread_mutex_t _mutex;
+ mutable pthread_mutex_t _mutex;
#endif
};
@@ -127,7 +124,7 @@ Mutex::~Mutex()
}
inline bool
-Mutex::lock()
+Mutex::lock() const
{
EnterCriticalSection(&_mutex);
//
@@ -139,7 +136,7 @@ Mutex::lock()
}
inline bool
-Mutex::trylock()
+Mutex::trylock() const
{
if (!TryEnterCriticalSection(&_mutex))
{
@@ -154,7 +151,7 @@ Mutex::trylock()
}
inline bool
-Mutex::unlock()
+Mutex::unlock() const
{
assert(_mutex.RecursionCount == 1);
LeaveCriticalSection(&_mutex);
@@ -162,13 +159,13 @@ Mutex::unlock()
}
inline void
-Mutex::unlock(LockState& state)
+Mutex::unlock(LockState& state) const
{
LeaveCriticalSection(&_mutex);
}
inline void
-Mutex::lock(LockState&)
+Mutex::lock(LockState&) const
{
EnterCriticalSection(&_mutex);
}
@@ -194,7 +191,7 @@ Mutex::~Mutex()
}
inline bool
-Mutex::lock()
+Mutex::lock() const
{
int rc = pthread_mutex_lock(&_mutex);
if (rc != 0)
@@ -205,7 +202,7 @@ Mutex::lock()
}
inline bool
-Mutex::trylock()
+Mutex::trylock() const
{
int rc = pthread_mutex_trylock(&_mutex);
if (rc != 0)
@@ -220,7 +217,7 @@ Mutex::trylock()
}
inline bool
-Mutex::unlock()
+Mutex::unlock() const
{
int rc = pthread_mutex_unlock(&_mutex);
if (rc != 0)
@@ -231,13 +228,13 @@ Mutex::unlock()
}
inline void
-Mutex::unlock(LockState& state)
+Mutex::unlock(LockState& state) const
{
state.mutex = &_mutex;
}
inline void
-Mutex::lock(LockState&)
+Mutex::lock(LockState&) const
{
}
#endif
diff --git a/cpp/include/IceUtil/RWRecMutex.h b/cpp/include/IceUtil/RWRecMutex.h
index df8efe6e0bd..518eac78d58 100644
--- a/cpp/include/IceUtil/RWRecMutex.h
+++ b/cpp/include/IceUtil/RWRecMutex.h
@@ -22,7 +22,7 @@ class RLock
{
public:
- RLock(T& mutex) :
+ RLock(const T& mutex) :
_mutex(mutex)
{
_mutex.readLock();
@@ -35,28 +35,7 @@ public:
private:
- T& _mutex;
-};
-
-template <typename T>
-class ConstRLock
-{
-public:
-
- ConstRLock(const T& mutex) :
- _mutex(const_cast<T>(mutex))
- {
- _mutex.readLock();
- }
-
- ~ConstRLock()
- {
- _mutex.unlock();
- }
-
-private:
-
- T& _mutex;
+ const T& _mutex;
};
template <typename T>
@@ -64,7 +43,7 @@ class TryRLock
{
public:
- TryRLock(T& mutex) :
+ TryRLock(const T& mutex) :
_mutex(mutex)
{
_mutex.tryReadLock();
@@ -77,28 +56,7 @@ public:
private:
- T& _mutex;
-};
-
-template <typename T>
-class ConstTryRLock
-{
-public:
-
- ConstTryRLock(const T& mutex) :
- _mutex(const_cast<T>(mutex))
- {
- _mutex.tryReadLock();
- }
-
- ~ConstTryRLock()
- {
- _mutex.unlock();
- }
-
-private:
-
- T& _mutex;
+ const T& _mutex;
};
template <typename T>
@@ -106,7 +64,7 @@ class WLock
{
public:
- WLock(T& mutex) :
+ WLock(const T& mutex) :
_mutex(mutex)
{
_mutex.writeLock();
@@ -119,28 +77,7 @@ public:
private:
- T& _mutex;
-};
-
-template <typename T>
-class ConstWLock
-{
-public:
-
- ConstWLock(const T& mutex) :
- _mutex(const_cast<T>(mutex))
- {
- _mutex.writeLock();
- }
-
- ~ConstWLock()
- {
- _mutex.unlock();
- }
-
-private:
-
- T& _mutex;
+ const T& _mutex;
};
template <typename T>
@@ -148,7 +85,7 @@ class TryWLock
{
public:
- TryWLock(T& mutex) :
+ TryWLock(const T& mutex) :
_mutex(mutex)
{
_mutex.tryWriteLock();
@@ -161,29 +98,7 @@ public:
private:
- T& _mutex;
-};
-
-
-template <typename T>
-class ConstTryWLock
-{
-public:
-
- ConstTryWLock(const T& mutex) :
- _mutex(const_cast<T>(mutex))
- {
- _mutex.tryWriteLock();
- }
-
- ~ConstTryWLock()
- {
- _mutex.unlock();
- }
-
-private:
-
- T& _mutex;
+ const T& _mutex;
};
//
@@ -204,12 +119,6 @@ public:
typedef WLock<RWRecMutex> WLock;
typedef TryWLock<RWRecMutex> TryWLock;
- typedef ConstRLock<RWRecMutex> ConstRLock;
- typedef ConstTryRLock<RWRecMutex> ConstTryRLock;
- typedef ConstWLock<RWRecMutex> ConstWLock;
- typedef ConstTryWLock<RWRecMutex> ConstTryWLock;
-
-
RWRecMutex();
~RWRecMutex();
@@ -221,27 +130,27 @@ public:
//
// Acquire a read lock.
//
- void readLock();
+ void readLock() const;
//
// Try to acquire a read lock.
//
- void tryReadLock();
+ void tryReadLock() const;
//
// Acquire a write lock.
//
- void writeLock();
+ void writeLock() const;
//
// Acquire a write lock.
//
- void tryWriteLock();
+ void tryWriteLock() const;
//
// Unlock the reader/writer lock.
//
- void unlock();
+ void unlock() const;
private:
@@ -253,12 +162,12 @@ private:
// Number of readers holding the lock. -1 means a writer has the
// lock.
//
- int _count;
+ mutable int _count;
//
// Number of waiting writers.
//
- unsigned int _waitingWriters;
+ mutable unsigned int _waitingWriters;
//
// Internal mutex.
@@ -268,8 +177,8 @@ private:
//
// Two condition variables for waiting readers & writers.
//
- Cond _readers;
- Cond _writers;
+ mutable Cond _readers;
+ mutable Cond _writers;
};
} // End namespace IceUtil
diff --git a/cpp/include/IceUtil/RecMutex.h b/cpp/include/IceUtil/RecMutex.h
index 5ef5f42f342..9f0e3b51319 100644
--- a/cpp/include/IceUtil/RecMutex.h
+++ b/cpp/include/IceUtil/RecMutex.h
@@ -35,9 +35,6 @@ public:
typedef Lock<RecMutex> Lock;
typedef TryLock<RecMutex> TryLock;
- typedef ConstLock<RecMutex> ConstLock;
- typedef ConstTryLock<RecMutex> ConstTryLock;
-
RecMutex();
~RecMutex();
@@ -56,7 +53,7 @@ public:
//
// Return true if the mutex has been locked for the first time.
//
- bool lock();
+ bool lock() const;
//
// Throw LockedException in the case that the lock call would
@@ -64,13 +61,13 @@ public:
// thread). Returns true if the mutex has been locked for the
// first time.
//
- bool trylock();
+ bool trylock() const;
//
// Returns true if the mutex has been unlocked for the last time
// (false otherwise).
//
- bool unlock();
+ bool unlock() const;
private:
@@ -95,18 +92,18 @@ private:
};
#endif
- void unlock(LockState&);
- void lock(LockState&);
+ void unlock(LockState&) const;
+ void lock(LockState&) const;
friend class Cond;
#ifdef WIN32
- CRITICAL_SECTION _mutex;
+ mutable CRITICAL_SECTION _mutex;
#else
- pthread_mutex_t _mutex;
+ mutable pthread_mutex_t _mutex;
#endif
- int _count;
+ mutable int _count;
};
} // End namespace IceUtil
diff --git a/cpp/include/IceUtil/Thread.h b/cpp/include/IceUtil/Thread.h
index 4d1a9551cc5..8ff7f171a38 100644
--- a/cpp/include/IceUtil/Thread.h
+++ b/cpp/include/IceUtil/Thread.h
@@ -87,7 +87,7 @@ private:
#endif
};
-class ICE_UTIL_API Thread : public IceUtil::Shared
+class ICE_UTIL_API Thread : public virtual IceUtil::Shared
{
public:
diff --git a/cpp/src/Ice/.depend b/cpp/src/Ice/.depend
index 3560b1eca99..ad7897bc7a3 100644
--- a/cpp/src/Ice/.depend
+++ b/cpp/src/Ice/.depend
@@ -62,6 +62,6 @@ SslConnectionOpenSSLServer.o: SslConnectionOpenSSLServer.cpp ../Ice/Network.h ..
SslFactory.o: SslFactory.cpp ../Ice/SslFactory.h ../Ice/SslSystem.h ../Ice/SslConnection.h ../../include/Ice/Buffer.h ../../include/Ice/Config.h ../../include/IceUtil/Config.h ../Ice/TraceLevels.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Lock.h ../Ice/TraceLevelsF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/Ice/PropertiesF.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/Ice/Logger.h ../../include/Ice/Properties.h ../Ice/SslSystemOpenSSL.h ../Ice/SslConnectionOpenSSL.h ../Ice/SslGeneralConfig.h ../Ice/SslCertificateDesc.h ../Ice/SslCertificateAuthority.h ../Ice/SslBaseCerts.h ../Ice/SslTempCerts.h ../Ice/Security.h
SslGeneralConfig.o: SslGeneralConfig.cpp ../Ice/SslGeneralConfig.h ../Ice/SslSystemOpenSSL.h ../../include/Ice/Config.h ../../include/IceUtil/Config.h ../Ice/TraceLevels.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Lock.h ../Ice/TraceLevelsF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/Ice/PropertiesF.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/Ice/Logger.h ../Ice/SslFactory.h ../Ice/SslSystem.h ../Ice/SslConnection.h ../../include/Ice/Buffer.h ../../include/Ice/Properties.h ../Ice/SslConnectionOpenSSL.h ../Ice/SslCertificateDesc.h ../Ice/SslCertificateAuthority.h ../Ice/SslBaseCerts.h ../Ice/SslTempCerts.h
SslSystem.o: SslSystem.cpp ../Ice/SslSystem.h ../Ice/SslConnection.h ../../include/Ice/Buffer.h ../../include/Ice/Config.h ../../include/IceUtil/Config.h ../Ice/TraceLevels.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Lock.h ../Ice/TraceLevelsF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/Ice/PropertiesF.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/Ice/Logger.h ../../include/Ice/Properties.h
-SslSystemOpenSSL.o: SslSystemOpenSSL.cpp ../../include/IceUtil/Mutex.h ../../include/IceUtil/Config.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Lock.h ../Ice/Security.h ../Ice/SslSystem.h ../Ice/SslConnection.h ../../include/Ice/Buffer.h ../../include/Ice/Config.h ../Ice/TraceLevels.h ../../include/IceUtil/Shared.h ../Ice/TraceLevelsF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/Ice/PropertiesF.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/Ice/Logger.h ../../include/Ice/Properties.h ../../include/Ice/SecurityException.h ../Ice/SslConnectionOpenSSLClient.h ../Ice/SslConnectionOpenSSL.h ../Ice/SslConnectionOpenSSLServer.h ../Ice/SslConfig.h ../../include/Ice/LoggerF.h ../Ice/SslCertificateDesc.h ../Ice/SslGeneralConfig.h ../Ice/SslSystemOpenSSL.h ../Ice/SslFactory.h ../Ice/SslCertificateAuthority.h ../Ice/SslBaseCerts.h ../Ice/SslTempCerts.h
+SslSystemOpenSSL.o: SslSystemOpenSSL.cpp ../../include/IceUtil/Config.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Lock.h ../Ice/Security.h ../Ice/SslSystem.h ../Ice/SslConnection.h ../../include/Ice/Buffer.h ../../include/Ice/Config.h ../Ice/TraceLevels.h ../../include/IceUtil/Shared.h ../Ice/TraceLevelsF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/Ice/PropertiesF.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/Ice/Logger.h ../../include/Ice/Properties.h ../../include/Ice/SecurityException.h ../Ice/SslConnectionOpenSSLClient.h ../Ice/SslConnectionOpenSSL.h ../Ice/SslConnectionOpenSSLServer.h ../Ice/SslConfig.h ../../include/Ice/LoggerF.h ../Ice/SslCertificateDesc.h ../Ice/SslGeneralConfig.h ../Ice/SslSystemOpenSSL.h ../Ice/SslFactory.h ../Ice/SslCertificateAuthority.h ../Ice/SslBaseCerts.h ../Ice/SslTempCerts.h
SslTempCerts.o: SslTempCerts.cpp ../Ice/SslTempCerts.h ../Ice/SslCertificateDesc.h
UdpTransceiver.o: UdpTransceiver.cpp ../Ice/UdpTransceiver.h ../../include/Ice/InstanceF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../Ice/TraceLevelsF.h ../../include/Ice/LoggerF.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../Ice/Transceiver.h ../Ice/TransceiverF.h ../Ice/Instance.h ../../include/Ice/CommunicatorF.h ../../include/Ice/PropertiesF.h ../../include/Ice/ProxyFactoryF.h ../Ice/ThreadPoolF.h ../../include/Ice/ConnectionFactoryF.h ../Ice/ObjectFactoryManagerF.h ../Ice/UserExceptionFactoryManagerF.h ../../include/Ice/ObjectAdapterFactoryF.h ../Ice/TraceLevels.h ../../include/Ice/Logger.h ../../include/Ice/Buffer.h ../Ice/Network.h
diff --git a/cpp/src/Ice/Connection.cpp b/cpp/src/Ice/Connection.cpp
index 10a7cb63d22..a51985f77ad 100644
--- a/cpp/src/Ice/Connection.cpp
+++ b/cpp/src/Ice/Connection.cpp
@@ -78,7 +78,7 @@ IceInternal::Connection::destroy(DestructionReason reason)
bool
IceInternal::Connection::destroyed() const
{
- IceUtil::RecMutex::ConstLock sync(*this);
+ IceUtil::RecMutex::Lock sync(*this);
return _state >= StateClosing;
}
diff --git a/cpp/src/Ice/Object.cpp b/cpp/src/Ice/Object.cpp
index 341252af3bd..4f8b7975f2c 100644
--- a/cpp/src/Ice/Object.cpp
+++ b/cpp/src/Ice/Object.cpp
@@ -136,7 +136,7 @@ Ice::Object::__dispatch(Incoming& in, const Current& current)
void
Ice::Object::__write(::IceInternal::BasicStream* __os) const
{
- IceUtil::Mutex::ConstLock sync(_activeFacetMapMutex);
+ IceUtil::Mutex::Lock sync(_activeFacetMapMutex);
__os->write(Int(_activeFacetMap.size()));
for (map<string, ObjectPtr>::const_iterator p = _activeFacetMap.begin(); p != _activeFacetMap.end(); ++p)
diff --git a/cpp/src/IceStorm/Subscriber.h b/cpp/src/IceStorm/Subscriber.h
index cae11c9df97..4ab2edd7030 100644
--- a/cpp/src/IceStorm/Subscriber.h
+++ b/cpp/src/IceStorm/Subscriber.h
@@ -106,7 +106,7 @@ protected:
// Immutable
TraceLevelsPtr _traceLevels;
- mutable IceUtil::Mutex _stateMutex;
+ IceUtil::Mutex _stateMutex;
State _state;
private:
diff --git a/cpp/src/IceStorm/TopicI.cpp b/cpp/src/IceStorm/TopicI.cpp
index 5e71fbdd887..45a4aa61872 100644
--- a/cpp/src/IceStorm/TopicI.cpp
+++ b/cpp/src/IceStorm/TopicI.cpp
@@ -239,7 +239,7 @@ private:
//
// Set of subscribers that encountered an error.
//
- mutable IceUtil::Mutex _errorMutex;
+ IceUtil::Mutex _errorMutex;
mutable SubscriberList _error;
};
@@ -513,7 +513,7 @@ TopicI::getLinkProxy(const Ice::Current&)
bool
TopicI::destroyed() const
{
- IceUtil::RecMutex::ConstLock sync(*this);
+ IceUtil::RecMutex::Lock sync(*this);
return _destroyed;
}
diff --git a/cpp/src/IceUtil/Cond.cpp b/cpp/src/IceUtil/Cond.cpp
index 439b1676c9c..807295d2441 100644
--- a/cpp/src/IceUtil/Cond.cpp
+++ b/cpp/src/IceUtil/Cond.cpp
@@ -31,7 +31,7 @@ IceUtil::Semaphore::~Semaphore()
}
bool
-IceUtil::Semaphore::wait(long timeout)
+IceUtil::Semaphore::wait(long timeout) const
{
if (timeout < 0)
{
@@ -46,7 +46,7 @@ IceUtil::Semaphore::wait(long timeout)
}
void
-IceUtil::Semaphore::post(int count)
+IceUtil::Semaphore::post(int count) const
{
int rc = ReleaseSemaphore(_sem, count, 0);
if (rc == 0)
@@ -114,7 +114,7 @@ IceUtil::Cond::wake(bool broadcast)
}
void
-IceUtil::Cond::preWait()
+IceUtil::Cond::preWait() const
{
_gate.wait();
_blocked++;
@@ -122,7 +122,7 @@ IceUtil::Cond::preWait()
}
void
-IceUtil::Cond::postWait(bool timedout)
+IceUtil::Cond::postWait(bool timedout) const
{
_internal.lock();
_unblocked++;
@@ -153,7 +153,7 @@ IceUtil::Cond::postWait(bool timedout)
}
bool
-IceUtil::Cond::dowait(long timeout)
+IceUtil::Cond::dowait(long timeout) const
{
try
{
diff --git a/cpp/src/IceUtil/RWRecMutex.cpp b/cpp/src/IceUtil/RWRecMutex.cpp
index 0137ca79668..dd87a1ae245 100644
--- a/cpp/src/IceUtil/RWRecMutex.cpp
+++ b/cpp/src/IceUtil/RWRecMutex.cpp
@@ -24,7 +24,7 @@ IceUtil::RWRecMutex::~RWRecMutex()
}
void
-IceUtil::RWRecMutex::readLock()
+IceUtil::RWRecMutex::readLock() const
{
Mutex::Lock lock(_mutex);
@@ -40,7 +40,7 @@ IceUtil::RWRecMutex::readLock()
}
void
-IceUtil::RWRecMutex::tryReadLock()
+IceUtil::RWRecMutex::tryReadLock() const
{
Mutex::Lock lock(_mutex);
@@ -56,7 +56,7 @@ IceUtil::RWRecMutex::tryReadLock()
}
void
-IceUtil::RWRecMutex::writeLock()
+IceUtil::RWRecMutex::writeLock() const
{
Mutex::Lock lock(_mutex);
@@ -86,7 +86,7 @@ IceUtil::RWRecMutex::writeLock()
}
void
-IceUtil::RWRecMutex::tryWriteLock()
+IceUtil::RWRecMutex::tryWriteLock() const
{
Mutex::Lock lock(_mutex);
@@ -105,7 +105,7 @@ IceUtil::RWRecMutex::tryWriteLock()
}
void
-IceUtil::RWRecMutex::unlock()
+IceUtil::RWRecMutex::unlock() const
{
bool ww;
bool wr;
diff --git a/cpp/src/IceUtil/RecMutex.cpp b/cpp/src/IceUtil/RecMutex.cpp
index 91735b00c78..98775a5cc86 100644
--- a/cpp/src/IceUtil/RecMutex.cpp
+++ b/cpp/src/IceUtil/RecMutex.cpp
@@ -28,7 +28,7 @@ IceUtil::RecMutex::~RecMutex()
}
bool
-IceUtil::RecMutex::lock()
+IceUtil::RecMutex::lock() const
{
EnterCriticalSection(&_mutex);
if (++_count > 1)
@@ -40,7 +40,7 @@ IceUtil::RecMutex::lock()
}
bool
-IceUtil::RecMutex::trylock()
+IceUtil::RecMutex::trylock() const
{
if (!TryEnterCriticalSection(&_mutex))
{
@@ -55,7 +55,7 @@ IceUtil::RecMutex::trylock()
}
bool
-IceUtil::RecMutex::unlock()
+IceUtil::RecMutex::unlock() const
{
if (--_count == 0)
{
@@ -66,7 +66,7 @@ IceUtil::RecMutex::unlock()
}
void
-IceUtil::RecMutex::unlock(LockState& state)
+IceUtil::RecMutex::unlock(LockState& state) const
{
state.count = _count;
_count = 0;
@@ -74,7 +74,7 @@ IceUtil::RecMutex::unlock(LockState& state)
}
void
-IceUtil::RecMutex::lock(LockState& state)
+IceUtil::RecMutex::lock(LockState& state) const
{
EnterCriticalSection(&_mutex);
_count = state.count;
@@ -101,7 +101,7 @@ IceUtil::RecMutex::~RecMutex()
}
bool
-IceUtil::RecMutex::lock()
+IceUtil::RecMutex::lock() const
{
int rc = pthread_mutex_lock(&_mutex);
if (rc != 0)
@@ -118,7 +118,7 @@ IceUtil::RecMutex::lock()
}
bool
-IceUtil::RecMutex::trylock()
+IceUtil::RecMutex::trylock() const
{
int rc = pthread_mutex_trylock(&_mutex);
if (rc != 0)
@@ -139,7 +139,7 @@ IceUtil::RecMutex::trylock()
}
bool
-IceUtil::RecMutex::unlock()
+IceUtil::RecMutex::unlock() const
{
if (--_count == 0)
{
@@ -152,7 +152,7 @@ IceUtil::RecMutex::unlock()
}
void
-IceUtil::RecMutex::unlock(LockState& state)
+IceUtil::RecMutex::unlock(LockState& state) const
{
state.mutex = &_mutex;
state.count = _count;
@@ -160,7 +160,7 @@ IceUtil::RecMutex::unlock(LockState& state)
}
void
-IceUtil::RecMutex::lock(LockState& state)
+IceUtil::RecMutex::lock(LockState& state) const
{
_count = state.count;
}