Core: Add thread extension functions
This commit is contained in:
25
include/Nazara/Core/ThreadExt.hpp
Normal file
25
include/Nazara/Core/ThreadExt.hpp
Normal file
@@ -0,0 +1,25 @@
|
||||
// Copyright (C) 2023 Jérôme "Lynix" Leclercq (lynix680@gmail.com)
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef NAZARA_CORE_THREADEXT_HPP
|
||||
#define NAZARA_CORE_THREADEXT_HPP
|
||||
|
||||
#include <NazaraUtils/Prerequisites.hpp>
|
||||
#include <Nazara/Core/Config.hpp>
|
||||
#include <thread>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
NAZARA_CORE_API std::string GetCurrentThreadName();
|
||||
NAZARA_CORE_API std::string GetThreadName(std::thread& thread);
|
||||
|
||||
NAZARA_CORE_API void SetCurrentThreadName(const char* name);
|
||||
NAZARA_CORE_API void SetThreadName(std::thread& thread, const char* name);
|
||||
}
|
||||
|
||||
#include <Nazara/Core/ThreadExt.inl>
|
||||
|
||||
#endif // NAZARA_CORE_THREADEXT_HPP
|
||||
11
include/Nazara/Core/ThreadExt.inl
Normal file
11
include/Nazara/Core/ThreadExt.inl
Normal file
@@ -0,0 +1,11 @@
|
||||
// Copyright (C) 2023 Jérôme "Lynix" Leclercq (lynix680@gmail.com)
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Core/Debug.hpp>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
}
|
||||
|
||||
#include <Nazara/Core/DebugOff.hpp>
|
||||
Reference in New Issue
Block a user