early-access version 1350

This commit is contained in:
pineappleEA
2021-01-21 07:23:23 +01:00
parent 843abfbd8d
commit 7dcb3821c6
66 changed files with 721 additions and 925 deletions

View File

@@ -43,13 +43,9 @@ class KScheduler;
class SharedMemory;
class ServiceThread;
class Synchronization;
class KThread;
class Thread;
class TimeManager;
using EmuThreadHandle = uintptr_t;
constexpr EmuThreadHandle EmuThreadHandleInvalid{};
constexpr EmuThreadHandle EmuThreadHandleReserved{1ULL << 63};
/// Represents a single instance of the kernel.
class KernelCore {
private:
@@ -88,7 +84,7 @@ public:
std::shared_ptr<ResourceLimit> GetSystemResourceLimit() const;
/// Retrieves a shared pointer to a Thread instance within the thread wakeup handle table.
std::shared_ptr<KThread> RetrieveThreadFromGlobalHandleTable(Handle handle) const;
std::shared_ptr<Thread> RetrieveThreadFromGlobalHandleTable(Handle handle) const;
/// Adds the given shared pointer to an internal list of active processes.
void AppendNewProcess(std::shared_ptr<Process> process);
@@ -166,7 +162,7 @@ public:
bool IsValidNamedPort(NamedPortTable::const_iterator port) const;
/// Gets the current host_thread/guest_thread handle.
EmuThreadHandle GetCurrentEmuThreadID() const;
Core::EmuThreadHandle GetCurrentEmuThreadID() const;
/// Gets the current host_thread handle.
u32 GetCurrentHostThreadID() const;
@@ -241,14 +237,10 @@ public:
*/
void ReleaseServiceThread(std::weak_ptr<Kernel::ServiceThread> service_thread);
/// Workaround for single-core mode when preempting threads while idle.
bool IsPhantomModeForSingleCore() const;
void SetIsPhantomModeForSingleCore(bool value);
private:
friend class Object;
friend class Process;
friend class KThread;
friend class Thread;
/// Creates a new object ID, incrementing the internal object ID counter.
u32 CreateNewObjectID();