mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-29 05:55:16 -04:00
kern: clean up majority of TODOs
This commit is contained in:
parent
bea550ebce
commit
e1f3bb10a5
30 changed files with 112 additions and 85 deletions
|
@ -222,8 +222,6 @@ namespace ams::kern::arch::arm64 {
|
|||
const s32 num_interrupts = std::min(32 + 32 * (this->gicd->typer & 0x1F), static_cast<u32>(NumInterrupts));
|
||||
return (0 <= irq && irq < num_interrupts);
|
||||
}
|
||||
|
||||
/* TODO: Implement more KInterruptController functionality. */
|
||||
public:
|
||||
static constexpr ALWAYS_INLINE bool IsSoftware(s32 id) {
|
||||
MESOSPHERE_ASSERT(0 <= id && id < NumInterrupts);
|
||||
|
|
|
@ -266,7 +266,6 @@ namespace ams::kern::arch::arm64 {
|
|||
u32 GetAllocateOption() const { return this->page_table.GetAllocateOption(); }
|
||||
|
||||
KPhysicalAddress GetHeapPhysicalAddress(KVirtualAddress address) const {
|
||||
/* TODO: Better way to convert address type? */
|
||||
return this->page_table.GetHeapPhysicalAddress(address);
|
||||
}
|
||||
|
||||
|
|
|
@ -75,8 +75,8 @@ namespace ams::kern::arch::arm64 {
|
|||
void CloneFpuStatus();
|
||||
|
||||
const u128 *GetFpuRegisters() const { return this->fpu_registers; }
|
||||
|
||||
/* TODO: More methods (especially FPU management) */
|
||||
public:
|
||||
static void OnThreadTerminating(const KThread *thread);
|
||||
};
|
||||
|
||||
void GetUserContext(ams::svc::ThreadContext *out, const KThread *thread);
|
||||
|
|
|
@ -328,8 +328,6 @@ namespace ams::kern {
|
|||
constexpr bool CanForceDebug() const {
|
||||
return this->debug_capabilities.Get<DebugFlags::ForceDebug>();
|
||||
}
|
||||
|
||||
/* TODO: Member functions. */
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -48,7 +48,6 @@ namespace ams::kern {
|
|||
virtual void Destroy() override;
|
||||
virtual bool IsSignaled() const override;
|
||||
|
||||
/* TODO: More of KClientPort. */
|
||||
Result CreateSession(KClientSession **out);
|
||||
Result CreateLightSession(KLightClientSession **out);
|
||||
};
|
||||
|
|
|
@ -53,8 +53,6 @@ namespace ams::kern {
|
|||
Result GetDebugEventInfo(ams::svc::ilp32::DebugEventInfo *out);
|
||||
|
||||
KScopedAutoObject<KProcess> GetProcess();
|
||||
|
||||
/* TODO: This is a placeholder definition. */
|
||||
private:
|
||||
void PushDebugEvent(ams::svc::DebugEvent event, uintptr_t param0 = 0, uintptr_t param1 = 0, uintptr_t param2 = 0, uintptr_t param3 = 0, uintptr_t param4 = 0);
|
||||
void EnqueueDebugEventInfo(KEventInfo *info);
|
||||
|
|
|
@ -49,8 +49,6 @@ namespace ams::kern {
|
|||
|
||||
NOINLINE void Initialize();
|
||||
void EnqueueTask(KInterruptTask *task);
|
||||
|
||||
/* TODO: Actually implement KInterruptTaskManager. This is a placeholder. */
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -281,6 +281,11 @@ namespace ams::kern {
|
|||
return this->dynamic_page_manager.GetUsed() * PageSize;
|
||||
}
|
||||
|
||||
void SetRunningThread(s32 core, KThread *thread, u64 idle_count) {
|
||||
this->running_threads[core] = thread;
|
||||
this->running_thread_idle_counts[core] = idle_count;
|
||||
}
|
||||
|
||||
void ClearRunningThread(KThread *thread) {
|
||||
for (size_t i = 0; i < util::size(this->running_threads); ++i) {
|
||||
if (this->running_threads[i] == thread) {
|
||||
|
|
|
@ -51,11 +51,8 @@ namespace ams::kern {
|
|||
/* Overridden virtual functions. */
|
||||
virtual void Destroy() override;
|
||||
virtual bool IsSignaled() const override;
|
||||
|
||||
/* TODO: More of KServerPort. */
|
||||
private:
|
||||
void CleanupSessions();
|
||||
/* TODO: This is a placeholder definition. */
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -44,7 +44,6 @@ namespace ams::kern {
|
|||
|
||||
virtual bool IsSignaled() const override;
|
||||
|
||||
/* TODO: More of KServerSession. */
|
||||
Result OnRequest(KSessionRequest *request);
|
||||
|
||||
Result ReceiveRequest(uintptr_t message, uintptr_t buffer_size, KPhysicalAddress message_paddr);
|
||||
|
|
|
@ -203,7 +203,6 @@ namespace ams::kern {
|
|||
constexpr KThread() : wait_result(svc::ResultNoSynchronizationObject()), debug_exception_result(ResultSuccess()) { /* ... */ }
|
||||
|
||||
virtual ~KThread() { /* ... */ }
|
||||
/* TODO: Is a constexpr KThread() possible? */
|
||||
|
||||
Result Initialize(KThreadFunction func, uintptr_t arg, void *kern_stack_top, KProcessAddress user_stack_top, s32 prio, s32 core, KProcess *owner, ThreadType type);
|
||||
|
||||
|
@ -497,8 +496,6 @@ namespace ams::kern {
|
|||
ALWAYS_INLINE void *GetStackTop() const { return reinterpret_cast<StackParameters *>(this->kernel_stack_top) - 1; }
|
||||
ALWAYS_INLINE void *GetKernelStackTop() const { return this->kernel_stack_top; }
|
||||
|
||||
/* TODO: This is kind of a placeholder definition. */
|
||||
|
||||
ALWAYS_INLINE bool IsTerminationRequested() const {
|
||||
return this->termination_requested || this->GetRawState() == ThreadState_Terminated;
|
||||
}
|
||||
|
|
|
@ -124,8 +124,6 @@ namespace ams::kern {
|
|||
return this->address != rhs;
|
||||
}
|
||||
|
||||
/* TODO: <, <=, >, >= against uintptr_t? would need to be declared outside of class. Maybe worth it. */
|
||||
|
||||
/* Allow getting the address explicitly, for use in accessors. */
|
||||
constexpr ALWAYS_INLINE uintptr_t GetValue() const {
|
||||
return this->address;
|
||||
|
@ -244,6 +242,5 @@ namespace ams::kern {
|
|||
/* Accessors. */
|
||||
static_assert(15 == GetInteger(KPhysicalAddress(15)));
|
||||
static_assert(0 == GetInteger(Null<KPhysicalAddress>));
|
||||
/* TODO: reinterpret_cast<> not valid in a constant expression, can't test get pointers. */
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue