summaryrefslogtreecommitdiff
path: root/ACE/ace/Service_Repository.inl
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2016-02-12 15:37:31 +0100
committerJohnny Willemsen <jwillemsen@remedy.nl>2016-02-12 15:37:31 +0100
commitb61579224c35cbefe2a34a6315bea999cf6ff67e (patch)
tree18d6fc34d7ab8b27f62c8b3945a97eaad021f42b /ACE/ace/Service_Repository.inl
parentae65ab947f05f6ef56abfbb2fc2fae6f5b19fe2b (diff)
downloadATCD-b61579224c35cbefe2a34a6315bea999cf6ff67e.tar.gz
Added a lock accessor to the ACE Service Repository which is now of
type ACE_SYNCH_RECURSIVE_MUTEX so that user code that iterates the service repository can lock its content during iteration to make sure it doesn't get a corrupted state when another thread tries to change its state * ACE/ace/Service_Repository.cpp: * ACE/ace/Service_Repository.h: * ACE/ace/Service_Repository.inl: * ACE/tests/Service_Config_Test.cpp:
Diffstat (limited to 'ACE/ace/Service_Repository.inl')
-rw-r--r--ACE/ace/Service_Repository.inl6
1 files changed, 6 insertions, 0 deletions
diff --git a/ACE/ace/Service_Repository.inl b/ACE/ace/Service_Repository.inl
index dbe09731f92..27a8d5c7ec8 100644
--- a/ACE/ace/Service_Repository.inl
+++ b/ACE/ace/Service_Repository.inl
@@ -19,6 +19,12 @@ ACE_Service_Repository::current_size (void) const
return this->service_array_.size ();
}
+ACE_INLINE ACE_SYNCH_RECURSIVE_MUTEX&
+ACE_Service_Repository::lock (void)
+{
+ return this->lock_;
+}
+
ACE_INLINE int
ACE_Service_Repository_Iterator::done (void) const
{