mirror of
https://github.com/N64Recomp/N64ModernRuntime.git
synced 2025-10-30 08:02:29 +00:00
* System to specify thread types by the game * Register threads callbacks * Remove temporary and permanent threads * Fix `pthread_setname_np` not liking names longer than 16 bytes * Singular * Rename events_callbacks arg * Use `prctl` instead of `pthread_setname_np` for naming a thread * Fix typo
31 lines
671 B
C++
31 lines
671 B
C++
#ifndef __RSP_HPP__
|
|
#define __RSP_HPP__
|
|
|
|
#include <cstdint>
|
|
|
|
#include "ultra64.h"
|
|
|
|
namespace ultramodern {
|
|
namespace rsp {
|
|
struct callbacks_t {
|
|
using init_t = void();
|
|
using run_microcode_t = bool(RDRAM_ARG const OSTask* task);
|
|
|
|
init_t* init;
|
|
|
|
/**
|
|
* Executes the given RSP task.
|
|
*
|
|
* Returns true if task was executed successfully.
|
|
*/
|
|
run_microcode_t* run_task;
|
|
};
|
|
|
|
void set_callbacks(const callbacks_t& callbacks);
|
|
|
|
void init();
|
|
bool run_task(RDRAM_ARG const OSTask* task);
|
|
};
|
|
} // namespace ultramodern
|
|
|
|
#endif
|