#pragma once #if !defined(MIJIN_UTIL_OS_HPP_INCLUDED) #define MIJIN_UTIL_OS_HPP_INCLUDED 1 #include #include #include #include "../detect.hpp" namespace mijin { // // public defines // // // public constants // // // public types // struct LibraryHandle { void* data = nullptr; constexpr operator bool() const noexcept { return data != nullptr; } constexpr bool operator!() const noexcept { return data == nullptr; } }; // // public functions // [[nodiscard]] LibraryHandle openSharedLibrary(std::string_view libraryFile) noexcept; [[nodiscard]] void* loadSymbolFromLibrary(const LibraryHandle library, const char* symbolName) noexcept; void setCurrentThreadName(const char* threadName) noexcept; [[nodiscard]] std::string makeLibraryFilename(std::string_view libraryName) noexcept; } // namespace mijin #endif // !defined(MIJIN_UTIL_OS_HPP_INCLUDED)