[Core] Added POSIX support (Experimental)
Thanks to Danman I don't think it actually compile although tried my best to correct code. Former-commit-id: c3366c2c924f7392f4d46824dafca63ecf7f1fea
This commit is contained in:
31
src/Nazara/Core/Posix/ThreadImpl.hpp
Normal file
31
src/Nazara/Core/Posix/ThreadImpl.hpp
Normal file
@@ -0,0 +1,31 @@
|
||||
// Copyright (C) 2012 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>
|
||||
#include <pthread.h>
|
||||
|
||||
struct NzFunctor;
|
||||
|
||||
class NzThreadImpl
|
||||
{
|
||||
public:
|
||||
NzThreadImpl(NzFunctor* threadFunc);
|
||||
|
||||
void Detach();
|
||||
void Join();
|
||||
|
||||
static void Sleep(nzUInt32 time);
|
||||
|
||||
private:
|
||||
static unsigned int ThreadProc(void* userdata);
|
||||
|
||||
pthread_t m_handle;
|
||||
};
|
||||
|
||||
#endif // NAZARA_THREADIMPL_HPP
|
||||
Reference in New Issue
Block a user