//============================================================================= // drt/sys/idebug.cpp // Debugging trace classes. // These are system-specific definitions of members of class DrtTrace. // // History // 0.01, 1998-05-30, David R Tribble. // First cut. // // 0.02, 1998-06-28, David R Tribble. // Renamed from "kdebugt.cpp" to "idebug.cpp". // // 0.03, 1999-02-26, David R Tribble. // Moved to drt/sys/. // // Copyright ©1998-1999, by David R. Tribble, all rights reserved. // See "drt/sys/copyr.txt" for more information. //----------------------------------------------------------------------------- // Identification static const char id[] = "@(#)drt/sys/idebug.cpp 0.03"; // Special includes #include "sdefs.hpp" #include "sdebug.hpp" // System includes #if DRT_OS_UNIX //??? #elif DRT_OS_WIN32 #ifndef drt_std_windows_h #define WIN32_LEAN_AND_MEAN 1 #include #define drt_std_windows_h 1 #endif #endif // Local wrappers drt_namespace_begin //----------------------------------------------------------------------------- // Class member functions //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // DrtTrace::lock() // Acquire an exclusive lock on a mutex for the debug tracing output // stream on behalf of this thread. // // See also // unlock() // // Caveats // Multiple calls to this function without intervening calls to unlock() // are benign. //----------------------------------------------------------------------------- /*static*/ void DrtTrace::lock() { #if DrtTrace_VS/100 != 1 #error DrtTrace_VS has changed #endif #if is_incomplete___ #if DRT_OS_UNIX #error Support for Unix is incomplete #elif DRT_OS_WIN32 #error Support for Win32 is incomplete #else #error Unknown O/S #endif #else // Fake it for now, until we can finish this... ///drt_std::printf("DrtTrace::lock() is incomplete\n"); return; #endif } //----------------------------------------------------------------------------- // DrtTrace::unlock() // Release the exclusive lock on a mutex for the debug tracing output // stream on behalf of this thread. // // See also // lock() // // Caveats // Multiple calls to this function without intervening calls to lock() // are benign. //----------------------------------------------------------------------------- /*static*/ void DrtTrace::unlock() { #if DrtTrace_VS/100 != 1 #error DrtTrace_VS has changed #endif #if is_incomplete___ #if DRT_OS_UNIX #error Support for Unix is incomplete #elif DRT_OS_WIN32 #error Support for Win32 is incomplete #else #error Unknown O/S #endif #else // Fake it for now, until we can finish this... ///drt_std::printf("DrtTrace::unlock() is incomplete\n"); return; #endif } drt_namespace_end // End idebug.cpp