X-Git-Url: http://gitweb.pgornicz.com/gitweb.cgi?a=blobdiff_plain;f=src%2Fdebug.cpp;h=5c8baeb1fe4e130a007a1c706f6d51753cfefcb4;hb=3bccd1d78b605dc5b2898877601ad1a6374e0e44;hp=148db98b6ad53d8b5d1e92c18a50b4d2e2412e96;hpb=dca497db1c716132a88dc430a86caa5b281162dc;p=physics.git diff --git a/src/debug.cpp b/src/debug.cpp index 148db98..5c8baeb 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -22,11 +22,28 @@ using std::cerr; using std::cout; using std::endl; +#include "locks/Mutex.h" +#include "locks/Autolock.h" + /// ***** Public Methods ***** +Mutex muDPF; + void DPF(int level, const char* pstr) { - //cout << pstr << endl; + Autolock lock(muDPF); + + cout << pstr << endl; +} + +void debug::init() +{ + muDPF.init(); +} + +void debug::clean() +{ + muDPF.clean(); } /// ***** Private Methods *****