Files
NazaraEngine/src/Nazara/Core/Posix/ThreadImpl.hpp
Gawaboumga bbac0838dd Include-What-You-Use (#137)
* IWYU Core

* IWYU Noise

* IWYU Utility

* IWYU Audio

* IWYU Platform

* IWYU Lua

* IWYU Network

* IWYU Physics2D

* IWYU Physics3D

* IWYU Renderer

* IWYU Graphics

* IWYU NDKServer

* IWYU Fix

* Try to fix compilation

* Other fixes
2017-10-01 11:17:09 +02:00

43 lines
788 B
C++

// Copyright (C) 2015 Alexandre Janniaux
// 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_THREADIMPL_HPP
#define NAZARA_THREADIMPL_HPP
#include <Nazara/Prerequesites.hpp>
#if defined(__GNUC__) && !defined(_GNU_SOURCE)
#define _GNU_SOURCE
#endif
#include <pthread.h>
namespace Nz
{
struct Functor;
class String;
class ThreadImpl
{
public:
ThreadImpl(Functor* threadFunc);
void Detach();
void Join();
void SetName(const Nz::String& name);
static void SetCurrentName(const Nz::String& name);
static void Sleep(UInt32 time);
private:
static void* ThreadProc(void* userdata);
pthread_t m_handle;
};
}
#endif // NAZARA_THREADIMPL_HPP