X-Git-Url: http://gitweb.pgornicz.com/gitweb.cgi?a=blobdiff_plain;f=src%2Fdebug.cpp;h=4e659d2f976c0760bc71c4fcd59f8b3ff45a137f;hb=8e89e1d3c7894ff40d3871f3a1ff72327b7de6bb;hp=148db98b6ad53d8b5d1e92c18a50b4d2e2412e96;hpb=dca497db1c716132a88dc430a86caa5b281162dc;p=physics.git diff --git a/src/debug.cpp b/src/debug.cpp index 148db98..4e659d2 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -22,11 +22,35 @@ using std::cerr; using std::cout; using std::endl; +#include + +#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(); +} + +void DASSERT(bool fBreak) +{ + assert(fBreak); } /// ***** Private Methods *****