mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-02-09 01:04:46 +01:00
fix blockpool & dmem implementation modernize blockpool & dmem io devices use budgets per allocation add serialization support for MemoryTableWithPayload and AddressRange utils add format support for EnumBitSet util implemented trace formatter per syscall increased allowed reference count for Ref
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
#include "orbis/IoDevice.hpp"
|
|
#include "orbis/KernelAllocator.hpp"
|
|
#include "orbis/file.hpp"
|
|
#include "orbis/utils/Logs.hpp"
|
|
|
|
struct RngDevice : public orbis::IoDevice {
|
|
orbis::ErrorCode open(rx::Ref<orbis::File> *file, const char *path,
|
|
std::uint32_t flags, std::uint32_t mode,
|
|
orbis::Thread *thread) override;
|
|
};
|
|
struct RngFile : public orbis::File {};
|
|
|
|
static orbis::ErrorCode rng_ioctl(orbis::File *file, std::uint64_t request,
|
|
void *argp, orbis::Thread *thread) {
|
|
ORBIS_LOG_FATAL("Unhandled rng ioctl", request);
|
|
|
|
// 0x800c4802
|
|
return {};
|
|
}
|
|
|
|
static const orbis::FileOps ops = {
|
|
.ioctl = rng_ioctl
|
|
};
|
|
|
|
orbis::ErrorCode RngDevice::open(rx::Ref<orbis::File> *file, const char *path,
|
|
std::uint32_t flags, std::uint32_t mode,
|
|
orbis::Thread *thread) {
|
|
auto newFile = orbis::knew<RngFile>();
|
|
newFile->device = this;
|
|
newFile->ops = &ops;
|
|
*file = newFile;
|
|
return {};
|
|
}
|
|
|
|
orbis::IoDevice *createRngCharacterDevice() { return orbis::knew<RngDevice>(); }
|