mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 14:37:08 +00:00
[rpcsx-os] Use orbis::File instead of IoDeviceInstance
This commit is contained in:
parent
c29aada46a
commit
84b2419241
43 changed files with 1626 additions and 1161 deletions
|
|
@ -6,12 +6,11 @@
|
|||
#include "../thread/Thread.hpp"
|
||||
#include "../thread/types.hpp"
|
||||
#include "ProcessState.hpp"
|
||||
#include "orbis/file.hpp"
|
||||
#include "orbis/module/Module.hpp"
|
||||
#include "orbis/utils/IdMap.hpp"
|
||||
#include "orbis/utils/SharedMutex.hpp"
|
||||
|
||||
#include <mutex>
|
||||
|
||||
namespace orbis {
|
||||
class KernelContext;
|
||||
struct Thread;
|
||||
|
|
@ -61,7 +60,7 @@ struct Process final {
|
|||
utils::RcIdMap<Semaphore, sint, 4097, 1> semMap;
|
||||
utils::RcIdMap<Module, ModuleHandle> modulesMap;
|
||||
utils::OwningIdMap<Thread, lwpid_t> threadsMap;
|
||||
utils::RcIdMap<utils::RcBase, sint> fileDescriptors;
|
||||
utils::RcIdMap<orbis::File, sint> fileDescriptors;
|
||||
|
||||
// Named objects for debugging
|
||||
utils::shared_mutex namedObjMutex;
|
||||
|
|
|
|||
|
|
@ -3,11 +3,13 @@
|
|||
#include "../module/ModuleHandle.hpp"
|
||||
#include "../thread/types.hpp"
|
||||
#include "orbis-config.hpp"
|
||||
#include "orbis/utils/Rc.hpp"
|
||||
|
||||
namespace orbis {
|
||||
struct Thread;
|
||||
struct Module;
|
||||
struct timespec;
|
||||
struct File;
|
||||
|
||||
struct ProcessOps {
|
||||
SysResult (*mmap)(Thread *thread, caddr_t addr, size_t len, sint prot,
|
||||
|
|
@ -28,22 +30,10 @@ struct ProcessOps {
|
|||
SysResult (*virtual_query)(Thread *thread, ptr<const void> addr, sint flags,
|
||||
ptr<void> info, ulong infoSize);
|
||||
|
||||
SysResult (*open)(Thread *thread, ptr<const char> path, sint flags,
|
||||
sint mode);
|
||||
SysResult (*open)(Thread *thread, ptr<const char> path, sint flags, sint mode,
|
||||
Ref<File> *file);
|
||||
SysResult (*socket)(Thread *thread, ptr<const char> name, sint domain,
|
||||
sint type, sint protocol);
|
||||
SysResult (*close)(Thread *thread, sint fd);
|
||||
SysResult (*ioctl)(Thread *thread, sint fd, ulong com, caddr_t argp);
|
||||
SysResult (*write)(Thread *thread, sint fd, ptr<const void> data, ulong size);
|
||||
SysResult (*read)(Thread *thread, sint fd, ptr<void> data, ulong size);
|
||||
SysResult (*pread)(Thread *thread, sint fd, ptr<void> data, ulong size,
|
||||
ulong offset);
|
||||
SysResult (*pwrite)(Thread *thread, sint fd, ptr<const void> data, ulong size,
|
||||
ulong offset);
|
||||
SysResult (*lseek)(Thread *thread, sint fd, ulong offset, sint whence);
|
||||
SysResult (*ftruncate)(Thread *thread, sint fd, off_t length);
|
||||
SysResult (*truncate)(Thread *thread, ptr<const char> path, off_t length);
|
||||
|
||||
sint type, sint protocol, Ref<File> *file);
|
||||
SysResult (*dynlib_get_obj_member)(Thread *thread, ModuleHandle handle,
|
||||
uint64_t index, ptr<ptr<void>> addrp);
|
||||
SysResult (*dynlib_dlsym)(Thread *thread, ModuleHandle handle,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue