first commit

This commit is contained in:
2026-06-22 11:49:35 +02:00
commit d805f2ba86
619 changed files with 126873 additions and 0 deletions

View File

@ -0,0 +1,55 @@
/* -----------------------------------------------------------------------------
GSFramework
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */
#ifndef __NTHREAD__
#define __NTHREAD__
#include "thread/atomic_value.h"
namespace GS {
namespace Threading {
/*
@short Thread abstraction class.
@author Emmanuel Julien (ejulien@gsworks.fr)
*/
struct Thread
{
void *handle;
virtual bool Start();
void Kill();
void Join();
static void SetName(const char *);
// Yield execution to the next running system thread.
static void Switch();
/*
@short Set thread priority.
Set the thread priority from 0 to 31.
0 is the highest priority, 31 is the lowest.
@return False is the required priority was invalid.
*/
bool SetPriority(int priority = 16);
/// Main thread execution function.
virtual void Execute() = 0;
Thread();
virtual ~Thread();
};
} // Threading
} // GS
#endif // __NTHREAD__