mesosphere: hard enforcement of TODOs
This commit is contained in:
@@ -15,8 +15,6 @@
|
||||
*/
|
||||
#pragma once
|
||||
#include <vapours.hpp>
|
||||
#include <mesosphere/kern_panic.hpp>
|
||||
#include <mesosphere/svc/kern_svc_results.hpp>
|
||||
|
||||
namespace ams::kern {
|
||||
|
||||
@@ -36,3 +34,5 @@ namespace ams::kern {
|
||||
#define MESOSPHERE_ENABLE_ASSERTIONS
|
||||
#define MESOSPHERE_ENABLE_DEBUG_PRINT
|
||||
#endif
|
||||
|
||||
#include <mesosphere/svc/kern_svc_results.hpp>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
#include <mesosphere/kern_common.hpp>
|
||||
#include <mesosphere/kern_select_cpu.hpp>
|
||||
#include <mesosphere/kern_slab_helpers.hpp>
|
||||
#include <mesosphere/kern_k_synchronization_object.hpp>
|
||||
@@ -27,12 +28,12 @@ namespace ams::kern {
|
||||
MESOSPHERE_AUTOOBJECT_TRAITS(KProcess, KSynchronizationObject);
|
||||
/* TODO: This is a placeholder definition. */
|
||||
public:
|
||||
constexpr ALWAYS_INLINE u64 GetCoreMask() const { /* TODO */ return 0; }
|
||||
constexpr ALWAYS_INLINE u64 GetPriorityMask() const { /* TODO */ return 0; }
|
||||
u64 GetCoreMask() const { MESOSPHERE_TODO_IMPLEMENT(); }
|
||||
u64 GetPriorityMask() const { MESOSPHERE_TODO_IMPLEMENT();}
|
||||
|
||||
constexpr ALWAYS_INLINE bool Is64Bit() const { /* TODO */ return true; }
|
||||
bool Is64Bit() const { MESOSPHERE_TODO_IMPLEMENT(); }
|
||||
|
||||
ALWAYS_INLINE KThread *GetPreemptionStatePinnedThread(s32 core_id) { /* TODO */ return nullptr; }
|
||||
KThread *GetPreemptionStatePinnedThread(s32 core_id) { MESOSPHERE_TODO_IMPLEMENT(); }
|
||||
|
||||
void SetPreemptionState();
|
||||
};
|
||||
|
||||
@@ -52,6 +52,9 @@ namespace ams::kern {
|
||||
#define MESOSPHERE_ASSERT_THIS()
|
||||
#endif
|
||||
|
||||
#define MESOSPHERE_TODO(arg) ({ constexpr const char *__mesosphere_todo = arg; MESOSPHERE_PANIC("TODO (%s): %s", __PRETTY_FUNCTION__, __mesosphere_todo); })
|
||||
#define MESOSPHERE_TODO_IMPLEMENT() MESOSPHERE_TODO("Implement")
|
||||
|
||||
#define MESOSPHERE_ABORT() MESOSPHERE_PANIC("Abort()");
|
||||
#define MESOSPHERE_INIT_ABORT() do { /* ... */ } while (true)
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
#include <mesosphere/kern_common.hpp>
|
||||
|
||||
#ifdef ATMOSPHERE_ARCH_ARM64
|
||||
#include <mesosphere/arch/arm64/kern_cpu.hpp>
|
||||
|
||||
Reference in New Issue
Block a user