multithreading libraries, new auto functiontrace and minor corrections

master
Marc Wäckerlin 20 years ago
parent eb06d54993
commit 4b332eb798
  1. 65
      mrw/mrw.hpp.in

@ -39,22 +39,30 @@
See the <a href="pages.html">"Related Pages"</a>. See the <a href="pages.html">"Related Pages"</a>.
- @ref readme "The Readme, a Short Overview" - @ref readme
- @ref download "Download, Dependencies and Simple Installation" - @ref download
- @ref usage "Usage of the Library: Include and Link" - @ref usage
- @ref threads "Thread Safety" - @ref threads
- @ref libversion "Library Versioning" - @ref libversion
- @ref license "License Information (LGPL)" - @ref license
- @ref install "Detailed Compilation and Installation Information" - @ref install
- @ref news "Breaking News, What's New?" - @ref news
- @ref changes "Change Log" - @ref changes
*/ */
/** @page download Download, Detailed und Simple Installation /** @page download Download and Installation
Download this version from here: Download this version from here:
- Requirements: - Requirements:
- No special requirements for the binary package! - Boost thread library for multi threading:
http://boost.org
- log4cxx for automated tracing and function traces:
- http://logging.apache.org/log4cxx
- RPM: http://marc.waeckerlin.org/mrw-c++/log4cxx-0.9.7-1.i386.rpm
- @ref mrw::StackTrace requires:
- the GNU Binutils
- either GNU Compiler gcc or GNU C library glibc
- runs better on: either Linux or Solaris
- Binary - Binary
- Binary RPM Packages (built on i586/SuSE): - Binary RPM Packages (built on i586/SuSE):
- http://marc.waeckerlin.org/@PACKAGENAME@/@PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@-1.i586.rpm - http://marc.waeckerlin.org/@PACKAGENAME@/@PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@-1.i586.rpm
@ -65,6 +73,7 @@
<code>rpm -Uvh @PACKAGENAME@-devel-@MAJOR@.@MINOR@.@LEAST@-1.i586.rpm</code> <code>rpm -Uvh @PACKAGENAME@-devel-@MAJOR@.@MINOR@.@LEAST@-1.i586.rpm</code>
- Source - Source
- Requirements to build from source: - Requirements to build from source:
- boost: http://boost.org
- cppunit: http://cppunit.sf.net - cppunit: http://cppunit.sf.net
- log4cxx: http://logging.apache.org/log4cxx - log4cxx: http://logging.apache.org/log4cxx
- doxygen: http://doxygen.org - doxygen: http://doxygen.org
@ -93,27 +102,49 @@
#include <mrw/stacktrace.hpp> #include <mrw/stacktrace.hpp>
@endverbatim @endverbatim
All classes are in the mrw namespace. All classes are in the @c mrw namespace.
if you want the mrw::StackTrace to evaluate file and line numbers, if you want the mrw::StackTrace to evaluate file and line numbers,
then you need to compile with debug information enabled, thats then you need to compile with debug information enabled, thats
option @c -g. option @c -g.
Link to the library with option @c -lmrw, e.g.: Link to the library with option @c -lmrw (or @c -lmrw-mt if your
program is multi threaded), e.g.:
@verbatim @verbatim
g++ -g -o myprogram myprogram.cpp -lmrw g++ -g -o myprogram myprogram.cpp -lmrw
@endverbatim @endverbatim
For the @ref AutoTools "unexpected handler" you need to link with For the @ref AutoTools "unexpected handler" you need to link to
@c -lmrwexcstderr or @c -lmrwexclog4cxx. @c -lmrwexcstderr or @c -lmrwexclog4cxx (or @c -lmrwexcstderr-mt
*/ or @c -lmrwexclog4cxx-mt if your program is multi threaded).
For the @ref AutoFunctionTrace "automated function trace" you need
to link to @c -lmrwautofunctiontracelog4cxx (or @c
-lmrwautofunctiontracelog4cxx-mt if your program is multi
threaded). In addition, you must compile and link your program
with the GNU compiler specific option @c -finstrument-functions */
/** @page threads Thread Safety /** @page threads Thread Safety
To enable thread safety, you must link to @c libmrw-mt instead of
@c libmrw. That means, your link option is: @c -lmrw-mt
Different instances of classes can run in different threads, but
instances of classes can not be shared between different threads.
All classes are not thread safe, that means they should either All classes are not thread safe, that means they should either
always be accessed from the same thread, or you are responsible always be accessed from the same thread, or you are responsible
for locking. If you need thread safety as a feature, please send for locking.
All methods are threads safe, that means, they can be called at
the same time from different threads. But not on the same object.
This means: One instance should only be used within one single
thread. Different instances of the same class can be accessed
simultaneousely in different threads.
If you need more thread safety as a feature, please send
me an email and ask me for it (you find the address in the package me an email and ask me for it (you find the address in the package
or on my personal homepage: http://marc.waeckerlin.org). or on my personal homepage: http://marc.waeckerlin.org).
*/ */

Loading…
Cancel
Save