Reactive Callbacks and integrate them

This commit is contained in:
2024-06-13 22:07:37 +02:00
parent 33177eb97b
commit d628375a18
9 changed files with 110 additions and 50 deletions

View File

@@ -0,0 +1,34 @@
#pragma once
#include <PSX/System/threads.hpp>
namespace JabyEngine {
namespace Callback {
namespace internal {
namespace VSync {
static constexpr size_t StackSize = 64;
extern SysCall::ThreadHandle thread_handle;
extern uint32_t stack[StackSize];
void routine();
static void execute() {
MainThread::prepare_if_main(VSync::thread_handle);
Thread::execute_next();
}
}
namespace DataReady {
static constexpr size_t StackSize = 256;
extern SysCall::ThreadHandle thread_handle;
extern uint32_t stack[StackSize];
void routine();
static void execute() {
MainThread::prepare_if_main(DataReady::thread_handle);
Thread::execute_next();
}
}
}
}
}