BIND 10 trac2899, updated. 6ed2d962ac93a626c7fe4494a0a060858c4125d0 [2899] added a README file explaining the intent of the interproc stuff

BIND 10 source code commits bind10-changes at lists.isc.org
Thu May 9 04:06:01 UTC 2013


The branch, trac2899 has been updated
       via  6ed2d962ac93a626c7fe4494a0a060858c4125d0 (commit)
       via  00cd04ff09dd403968633193ad51ce81bbd1c5d1 (commit)
      from  55f6c351193ff5aa17a2729bd58d6e74fcd17933 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6ed2d962ac93a626c7fe4494a0a060858c4125d0
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Wed May 8 20:21:58 2013 -0700

    [2899] added a README file explaining the intent of the interproc stuff

commit 00cd04ff09dd403968633193ad51ce81bbd1c5d1
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Wed May 8 20:15:10 2013 -0700

    [2899] hide the interprocess stuff from public log API more.
    
    - not include the header file, but use a forward declaration
    - added a note that setInterprocessSync shouldn't be used by normal apps

-----------------------------------------------------------------------

Summary of changes:
 src/lib/log/interprocess/Makefile.am |    2 ++
 src/lib/log/interprocess/README      |   13 +++++++++++++
 src/lib/log/logger.h                 |   11 ++++++++++-
 3 files changed, 25 insertions(+), 1 deletion(-)
 create mode 100644 src/lib/log/interprocess/README

-----------------------------------------------------------------------
diff --git a/src/lib/log/interprocess/Makefile.am b/src/lib/log/interprocess/Makefile.am
index ad7ad86..567ff09 100644
--- a/src/lib/log/interprocess/Makefile.am
+++ b/src/lib/log/interprocess/Makefile.am
@@ -17,3 +17,5 @@ libb10_log_interprocess_la_SOURCES += interprocess_sync_null.h
 libb10_log_interprocess_la_SOURCES += interprocess_sync_null.cc
 
 libb10_log_interprocess_la_LIBADD  = $(top_builddir)/src/lib/util/threads/libb10-threads.la
+
+EXTRA_DIST  = README
diff --git a/src/lib/log/interprocess/README b/src/lib/log/interprocess/README
new file mode 100644
index 0000000..e910a3a
--- /dev/null
+++ b/src/lib/log/interprocess/README
@@ -0,0 +1,13 @@
+The files in this directory implement a helper sub-library of the
+inter process locking for the log library.  We use our own locks
+because such locks are only available in relatively recent versions of
+log4cplus.  Also (against our usual practice) we somehow re-invented
+an in-house version of such a general purose library rather than
+existing proven tools such as boost::interprocess.  While we decided
+to go with the in-house version for the log library at least until we
+completely swith to log4cplus's native lock support, no other BIND 10
+module should use this; they should use existing external
+tools/libraries.
+
+This sub-library is therefore "hidden" here.  As such, none of these
+files should be installed.
diff --git a/src/lib/log/logger.h b/src/lib/log/logger.h
index 7cb755b..e4879cf 100644
--- a/src/lib/log/logger.h
+++ b/src/lib/log/logger.h
@@ -24,10 +24,14 @@
 #include <log/logger_level.h>
 #include <log/message_types.h>
 #include <log/log_formatter.h>
-#include <log/interprocess/interprocess_sync.h>
 
 namespace isc {
 namespace log {
+namespace internal {
+// Forward declaration to hide implementation details from normal
+// applications.
+class InterprocessSync;
+}
 
 /// \page LoggingApi Logging API
 /// \section LoggingApiOverview Overview
@@ -253,6 +257,11 @@ public:
     /// If this method is called with NULL as the argument, it throws a
     /// BadInterprocessSync exception.
     ///
+    /// \note This method is intended to be used only within this log library
+    /// and its tests.  Normal application shouldn't use it (in fact,
+    /// normal application shouldn't even be able to instantiate
+    /// InterprocessSync objects).
+    ///
     /// \param sync The logger uses this synchronization object for
     /// synchronizing output of log messages. It should be deletable and
     /// the ownership is transferred to the logger. If NULL is passed,



More information about the bind10-changes mailing list