diff --git a/include/sled/synchronization/mutex.h b/include/sled/synchronization/mutex.h index daf62e7..f27e39e 100644 --- a/include/sled/synchronization/mutex.h +++ b/include/sled/synchronization/mutex.h @@ -86,6 +86,7 @@ private: }; using MutexLock = LockGuard; +using MutexGuard = LockGuard; using RecursiveMutexLock = LockGuard; // class MutexLock final { diff --git a/include/sled/system/location.h b/include/sled/system/location.h index 86c494e..3523f5e 100644 --- a/include/sled/system/location.h +++ b/include/sled/system/location.h @@ -16,15 +16,20 @@ class Location final { public: Location() = delete; + Location(const char *file_name, int file_line, const char *function); static Location Current(const char *file_name = __builtin_FILE(), int file_line = __builtin_LINE(), const char *function = __builtin_FUNCTION()); std::string ToString() const; -private: - Location(const char *file_name, int file_line, const char *function); + const char *file() const { return file_name; }; + int line() const { return file_line; }; + + const char *func() const { return function; }; + +private: const char *file_name; int file_line; const char *function; @@ -32,6 +37,6 @@ private: }// namespace sled -#define SLED_FROM_HERE sled::Location::Current(); +#define SLED_FROM_HERE sled::Location::Current() #endif// SLED_SYSTEM_LOCATION_H