rpcsx/orbis-kernel/include/orbis/thread/Thread.hpp

35 lines
599 B
C++
Raw Normal View History

2023-07-03 13:10:16 +02:00
#pragma once
#include "orbis-config.hpp"
#include "types.hpp"
#include "ThreadState.hpp"
#include "../utils/SharedMutex.hpp"
2023-07-03 13:10:16 +02:00
namespace orbis {
struct Process;
struct Thread {
shared_mutex mtx;
2023-07-03 13:10:16 +02:00
Process *tproc = nullptr;
uint64_t retval[2]{};
void *context{};
ptr<void> stackStart;
ptr<void> stackEnd;
uint64_t fsBase{};
uint64_t gsBase{};
char name[32];
uint64_t sigMask[4] = {
0x7fff'ffff,
0
};
lwpid_t tid = -1;
ThreadState state = ThreadState::INACTIVE;
2023-07-06 16:23:50 +02:00
// FIXME: implement thread destruction
void incRef() {}
void decRef() {}
2023-07-03 13:10:16 +02:00
};
} // namespace orbis