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

@@ -2,7 +2,7 @@
#include <PSX/System/threads.hpp>
namespace JabyEngine {
namespace [[deprecated("Callbacks are deprecated for now")]] Callback {
namespace Callback {
namespace internal {
namespace VSync {
static constexpr size_t StackSize = 64;
@@ -16,6 +16,19 @@ namespace JabyEngine {
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();
}
}
}
}
}