X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=common%2Fos.hpp;h=cc72a0ea5b288184ffeb1759894344d2f5f5de3a;hb=d6c4372e46219a1e54ac749852d1bdb1ecec0fce;hp=8e487b502937f02c5e80ae0a292c9c7fd0e7d7d0;hpb=ae2b4d32ed56e3ac193cc7205aeb58082c448ce8;p=apitrace diff --git a/common/os.hpp b/common/os.hpp index 8e487b5..cc72a0e 100644 --- a/common/os.hpp +++ b/common/os.hpp @@ -33,6 +33,7 @@ #include #include #include +#include #ifdef _WIN32 #ifndef snprintf @@ -41,25 +42,11 @@ #ifndef vsnprintf #define vsnprintf _vsnprintf #endif -#define PATH_SEP '\\' -#else /* !_WIN32 */ -#define PATH_SEP '/' #endif /* !_WIN32 */ -#ifndef PATH_MAX -#define PATH_MAX 1024 -#endif - -namespace OS { - -void AcquireMutex(void); - -void ReleaseMutex(void); +namespace os { -bool GetProcessName(char *str, size_t size); -bool GetCurrentDir(char *str, size_t size); - -void DebugMessage(const char *format, ...) +void log(const char *format, ...) #ifdef __GNUC__ __attribute__ ((format (printf, 1, 2))) #endif @@ -83,16 +70,11 @@ void DebugMessage(const char *format, ...) #endif #endif -/** - * Get the current time in microseconds from an unknown base. - */ -long long GetTime(void); - -void Abort(void); +void abort(void); -void SetExceptionCallback(void (*callback)(void)); -void ResetExceptionCallback(void); +void setExceptionCallback(void (*callback)(void)); +void resetExceptionCallback(void); -} /* namespace OS */ +} /* namespace os */ #endif /* _OS_HPP_ */