[PATCH] LOCK: Move mib lock implementation to header (inline).
Dominik Vogt
dominik.vogt at external.thalesgroup.com
Tue Aug 17 12:53:16 CEST 2010
This reduces the locking overhead.
---
include/agent_pp/mib.h | 15 +++++++++++++++
src/mib.cpp | 14 --------------
2 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/include/agent_pp/mib.h b/include/agent_pp/mib.h
index e97f3e4..e1adf0f 100644
--- a/include/agent_pp/mib.h
+++ b/include/agent_pp/mib.h
@@ -3127,6 +3127,21 @@ void* mib_method_routine_caller(void*);
#endif
#endif
+inline void Mib::lock_mib()
+{
+#ifdef _THREADS
+ mibLock.start_synch();
+#endif
+}
+
+inline void Mib::unlock_mib()
+{
+#ifdef _THREADS
+ mibLock.end_synch();
+#endif
+}
+
+
#ifdef AGENTPP_NAMESPACE
}
#endif
diff --git a/src/mib.cpp b/src/mib.cpp
index f70621b..debe633 100644
--- a/src/mib.cpp
+++ b/src/mib.cpp
@@ -3215,20 +3215,6 @@ int Mib::next_access_control(Request* req, const MibEntryPtr entry, Oidx& oid)
}
#endif
-void Mib::lock_mib()
-{
-#ifdef _THREADS
- mibLock.start_synch();
-#endif
-}
-
-void Mib::unlock_mib()
-{
-#ifdef _THREADS
- mibLock.end_synch();
-#endif
-}
-
boolean Mib::set_exception_vb(Request* req, int reqind, int err)
{
Vbx vb(req->get_oid(reqind));
--
1.5.5.6
--7JfCtLOvnd9MIVvH
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment;
filename="0004-LOCK-Remove-ifdef-_THREADS-around-locking-calls.patch"
More information about the AGENTPP
mailing list