AuroraRuntime/Source/Grug/AuGrugThread.hpp

35 lines
682 B
C++

/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: AuGrugThread.hpp
Date: 2022-02-03
Author: Reece
***/
#pragma once
namespace Aurora::Grug
{
struct GrugThread
{
GrugThread();
union
{
#if defined(AURORA_IS_MODERNNT_DERIVED)
struct
{
AuThreads::IAuroraThread *pThread;
} nt;
#endif
#if defined(AURORA_IS_POSIX_DERIVED)
struct
{
pid_t pid;
} posix;
#endif
};
AuUInt genericThreadHandle;
AuThreads::IAuroraThread *ToThread() const;
};
}