Run clang-format

This commit is contained in:
Isaac Marovitz 2023-07-06 17:16:25 +01:00
parent d999edfd2c
commit 1f05a8a6a6
125 changed files with 10664 additions and 7154 deletions

View file

@ -27,23 +27,24 @@ using slong = int64_t;
using ulong = uint64_t;
template <typename T> using ptr = T *;
template <typename T> using cptr = T * const;
template <typename T> using cptr = T *const;
using caddr_t = ptr<char>;
inline ErrorCode uread(void *kernelAddress, ptr<const void> userAddress,
size_t size) {
size_t size) {
std::memcpy(kernelAddress, userAddress, size);
return {};
}
inline ErrorCode uwrite(ptr<void> userAddress, const void *kernelAddress,
size_t size) {
size_t size) {
std::memcpy(userAddress, kernelAddress, size);
return {};
}
inline ErrorCode ureadString(char *kernelAddress, size_t kernelSize, ptr<const char> userAddress) {
inline ErrorCode ureadString(char *kernelAddress, size_t kernelSize,
ptr<const char> userAddress) {
std::strncpy(kernelAddress, userAddress, kernelSize);
if (kernelAddress[kernelSize - 1] != '\0') {
kernelAddress[kernelSize - 1] = '\0';

View file

@ -38,49 +38,100 @@ namespace orbis {
uint64_t readRegister(void *context, RegisterId id) {
auto c = reinterpret_cast<Registers *>(context);
switch (id) {
case RegisterId::r15: return c->r15;
case RegisterId::r14: return c->r14;
case RegisterId::r13: return c->r13;
case RegisterId::r12: return c->r12;
case RegisterId::r11: return c->r11;
case RegisterId::r10: return c->r10;
case RegisterId::r9: return c->r9;
case RegisterId::r8: return c->r8;
case RegisterId::rdi: return c->rdi;
case RegisterId::rsi: return c->rsi;
case RegisterId::rbp: return c->rbp;
case RegisterId::rbx: return c->rbx;
case RegisterId::rdx: return c->rdx;
case RegisterId::rcx: return c->rcx;
case RegisterId::rax: return c->rax;
case RegisterId::rsp: return c->rsp;
case RegisterId::rflags: return c->rflags;
case RegisterId::r15:
return c->r15;
case RegisterId::r14:
return c->r14;
case RegisterId::r13:
return c->r13;
case RegisterId::r12:
return c->r12;
case RegisterId::r11:
return c->r11;
case RegisterId::r10:
return c->r10;
case RegisterId::r9:
return c->r9;
case RegisterId::r8:
return c->r8;
case RegisterId::rdi:
return c->rdi;
case RegisterId::rsi:
return c->rsi;
case RegisterId::rbp:
return c->rbp;
case RegisterId::rbx:
return c->rbx;
case RegisterId::rdx:
return c->rdx;
case RegisterId::rcx:
return c->rcx;
case RegisterId::rax:
return c->rax;
case RegisterId::rsp:
return c->rsp;
case RegisterId::rflags:
return c->rflags;
}
}
void writeRegister(void *context, RegisterId id, uint64_t value) {
auto c = reinterpret_cast<Registers *>(context);
switch (id) {
case RegisterId::r15: c->r15 = value; return;
case RegisterId::r14: c->r14 = value; return;
case RegisterId::r13: c->r13 = value; return;
case RegisterId::r12: c->r12 = value; return;
case RegisterId::r11: c->r11 = value; return;
case RegisterId::r10: c->r10 = value; return;
case RegisterId::r9: c->r9 = value; return;
case RegisterId::r8: c->r8 = value; return;
case RegisterId::rdi: c->rdi = value; return;
case RegisterId::rsi: c->rsi = value; return;
case RegisterId::rbp: c->rbp = value; return;
case RegisterId::rbx: c->rbx = value; return;
case RegisterId::rdx: c->rdx = value; return;
case RegisterId::rcx: c->rcx = value; return;
case RegisterId::rax: c->rax = value; return;
case RegisterId::rsp: c->rsp = value; return;
case RegisterId::rflags: c->rflags = value; return;
case RegisterId::r15:
c->r15 = value;
return;
case RegisterId::r14:
c->r14 = value;
return;
case RegisterId::r13:
c->r13 = value;
return;
case RegisterId::r12:
c->r12 = value;
return;
case RegisterId::r11:
c->r11 = value;
return;
case RegisterId::r10:
c->r10 = value;
return;
case RegisterId::r9:
c->r9 = value;
return;
case RegisterId::r8:
c->r8 = value;
return;
case RegisterId::rdi:
c->rdi = value;
return;
case RegisterId::rsi:
c->rsi = value;
return;
case RegisterId::rbp:
c->rbp = value;
return;
case RegisterId::rbx:
c->rbx = value;
return;
case RegisterId::rdx:
c->rdx = value;
return;
case RegisterId::rcx:
c->rcx = value;
return;
case RegisterId::rax:
c->rax = value;
return;
case RegisterId::rsp:
c->rsp = value;
return;
case RegisterId::rflags:
c->rflags = value;
return;
}
}
}
} // namespace orbis
static thread_local orbis::Thread *g_guestThread = nullptr;
@ -100,9 +151,7 @@ class CPU {
public:
CPU(int index) : m_index(index) {}
int getIndex() const {
return m_index;
}
int getIndex() const { return m_index; }
void addTask(orbis::Thread *thread, std::function<void()> task) {
m_workQueue.push_back({thread, std::move(task)});
@ -160,14 +209,13 @@ public:
};
struct orbis::ProcessOps procOps = {
.exit = [](orbis::Thread *, orbis::sint status) -> orbis::SysResult {
std::printf("sys_exit(%u)\n", status);
std::exit(status);
}
};
.exit = [](orbis::Thread *, orbis::sint status) -> orbis::SysResult {
std::printf("sys_exit(%u)\n", status);
std::exit(status);
}};
static orbis::Thread *allocateGuestThread(orbis::Process *process,
orbis::lwpid_t tid) {
orbis::lwpid_t tid) {
auto guestThread = new orbis::Thread{};
guestThread->state = orbis::ThreadState::RUNQ;
guestThread->tid = tid;
@ -175,7 +223,6 @@ static orbis::Thread *allocateGuestThread(orbis::Process *process,
return guestThread;
}
static void onSysEnter(orbis::Thread *thread, int id, uint64_t *args,
int argsCount) {
std::printf(" [%u] sys_%u(", thread->tid, id);

View file

@ -1,17 +1,17 @@
#pragma once
#include "utils/Rc.hpp"
#include <utility>
#include <string>
#include <vector>
#include <deque>
#include <map>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
namespace orbis {
inline namespace utils {
void *kalloc(std::size_t size, std::size_t align);
void kfree(void* ptr, std::size_t size);
void kfree(void *ptr, std::size_t size);
template <typename T> struct kallocator {
using value_type = T;
@ -21,9 +21,7 @@ template <typename T> struct kallocator {
return static_cast<T *>(kalloc(sizeof(T) * n, alignof(T)));
}
void deallocate(T *p, std::size_t n) {
kfree(p, sizeof(T) * n);
}
void deallocate(T *p, std::size_t n) { kfree(p, sizeof(T) * n); }
template <typename U>
friend constexpr bool operator==(const kallocator &,
@ -32,7 +30,8 @@ template <typename T> struct kallocator {
}
};
using kstring = std::basic_string<char, std::char_traits<char>, kallocator<char>>;
using kstring =
std::basic_string<char, std::char_traits<char>, kallocator<char>>;
template <typename T> using kvector = std::vector<T, kallocator<T>>;
template <typename T> using kdeque = std::deque<T, kallocator<T>>;
template <typename K, typename T, typename Cmp = std::less<>>
@ -48,7 +47,7 @@ using kunmap =
template <typename T, typename... Args> T *knew(Args &&...args) {
auto loc = static_cast<T *>(utils::kalloc(sizeof(T), alignof(T)));
auto res = std::construct_at(loc, std::forward<Args>(args)...);
if constexpr (requires(T *t) { t->_total_size = sizeof(T); })
if constexpr (requires(T * t) { t->_total_size = sizeof(T); })
res->_total_size = sizeof(T);
return res;
}

View file

@ -1,4 +1,4 @@
#pragma once
#include "error/SysResult.hpp" // IWYU pragma: export
#include "error/ErrorCode.hpp" // IWYU pragma: export
#include "error/SysResult.hpp" // IWYU pragma: export

View file

@ -8,7 +8,7 @@ class SysResult {
public:
SysResult() = default;
SysResult(ErrorCode ec) : mValue(-static_cast<int>(ec)){}
SysResult(ErrorCode ec) : mValue(-static_cast<int>(ec)) {}
[[nodiscard]] static SysResult notAnError(ErrorCode ec) {
SysResult result;

View file

@ -62,11 +62,7 @@ struct EventFlag {
shared_mutex queueMtx;
enum class NotifyType {
Set,
Cancel,
Destroy
};
enum class NotifyType { Set, Cancel, Destroy };
explicit EventFlag(std::int32_t attrs) : attrs(attrs) {}
@ -77,17 +73,13 @@ struct EventFlag {
std::uint64_t bitPattern, std::uint64_t *patternSet);
std::size_t notify(NotifyType type, std::uint64_t bits);
std::size_t destroy() {
return notify(NotifyType::Destroy, {});
}
std::size_t destroy() { return notify(NotifyType::Destroy, {}); }
std::size_t cancel(std::uint64_t value) {
return notify(NotifyType::Cancel, value);
}
std::size_t set(std::uint64_t bits) {
return notify(NotifyType::Set, bits);
}
std::size_t set(std::uint64_t bits) { return notify(NotifyType::Set, bits); }
void clear(std::uint64_t bits) {
writer_lock lock(queueMtx);

View file

@ -1,7 +1,7 @@
#pragma once
#include "module/Module.hpp" // IWYU pragma: export
#include "module/ModuleHandle.hpp" // IWYU pragma: export
#include "module/ModuleInfo.hpp" // IWYU pragma: export
#include "module/ModuleInfoEx.hpp" // IWYU pragma: export
#include "module/Module.hpp" // IWYU pragma: export
#include "module/ModuleHandle.hpp" // IWYU pragma: export
#include "module/ModuleInfo.hpp" // IWYU pragma: export
#include "module/ModuleInfoEx.hpp" // IWYU pragma: export
#include "module/ModuleSegment.hpp" // IWYU pragma: export

View file

@ -3,13 +3,13 @@
#include "ModuleHandle.hpp"
#include "ModuleSegment.hpp"
#include "../utils/Rc.hpp"
#include "../KernelAllocator.hpp"
#include "../utils/Rc.hpp"
#include "orbis-config.hpp"
#include <cstddef>
#include <vector>
#include <string>
#include <vector>
namespace orbis {
struct Thread;
@ -22,12 +22,7 @@ struct ModuleNeeded {
bool isExport;
};
enum class SymbolBind : std::uint8_t {
Local,
Global,
Weak,
Unique = 10
};
enum class SymbolBind : std::uint8_t { Local, Global, Weak, Unique = 10 };
enum class SymbolVisibility : std::uint8_t {
Default,
@ -47,7 +42,6 @@ enum class SymbolType : std::uint8_t {
IFunc = 10,
};
struct Symbol {
std::int32_t moduleIndex;
std::uint32_t libraryIndex;
@ -130,7 +124,8 @@ struct Module final {
}
void decRef() {
if (references.fetch_sub(1, std::memory_order::relaxed) == 1 && proc != nullptr) {
if (references.fetch_sub(1, std::memory_order::relaxed) == 1 &&
proc != nullptr) {
destroy();
}
}
@ -141,5 +136,6 @@ private:
void destroy();
};
utils::Ref<Module> createModule(Thread *p, std::string vfsPath, const char *name);
utils::Ref<Module> createModule(Thread *p, std::string vfsPath,
const char *name);
} // namespace orbis

View file

@ -1,6 +1,6 @@
#include <array>
#include <orbis/error.hpp>
#include <orbis/thread.hpp>
#include <array>
namespace orbis {
using acl_type_t = sint;
@ -24,7 +24,8 @@ SysResult sys_read(Thread *thread, sint fd, ptr<void> buf, size_t nbyte);
SysResult sys_write(Thread *thread, sint fd, ptr<const void> buf, size_t nbyte);
SysResult sys_open(Thread *thread, ptr<char> path, sint flags, sint mode);
SysResult sys_close(Thread *thread, sint fd);
SysResult sys_wait4(Thread *thread, sint pid, ptr<sint> status, sint options, ptr<struct rusage> rusage);
SysResult sys_wait4(Thread *thread, sint pid, ptr<sint> status, sint options,
ptr<struct rusage> rusage);
SysResult sys_link(Thread *thread, ptr<char> path, ptr<char> link);
SysResult sys_unlink(Thread *thread, ptr<char> path);
SysResult sys_chdir(Thread *thread, ptr<char> path);
@ -34,18 +35,27 @@ SysResult sys_chmod(Thread *thread, ptr<char> path, sint mode);
SysResult sys_chown(Thread *thread, ptr<char> path, sint uid, sint gid);
SysResult sys_obreak(Thread *thread, ptr<char> nsize);
SysResult sys_getpid(Thread *thread);
SysResult sys_mount(Thread *thread, ptr<char> type, ptr<char> path, sint flags, caddr_t data);
SysResult sys_mount(Thread *thread, ptr<char> type, ptr<char> path, sint flags,
caddr_t data);
SysResult sys_unmount(Thread *thread, ptr<char> path, sint flags);
SysResult sys_setuid(Thread *thread, uid_t uid);
SysResult sys_getuid(Thread *thread);
SysResult sys_geteuid(Thread *thread);
SysResult sys_ptrace(Thread *thread, sint req, pid_t pid, caddr_t addr, sint data);
SysResult sys_recvmsg(Thread *thread, sint s, ptr<struct msghdr> msg, sint flags);
SysResult sys_sendmsg(Thread *thread, sint s, ptr<struct msghdr> msg, sint flags);
SysResult sys_recvfrom(Thread *thread, sint s, caddr_t buf, size_t len, sint flags, ptr<struct sockaddr> from, ptr<uint32_t> fromlenaddr);
SysResult sys_accept(Thread *thread, sint s, ptr<struct sockaddr> from, ptr<uint32_t> fromlenaddr);
SysResult sys_getpeername(Thread *thread, sint fdes, ptr<struct sockaddr> asa, ptr<uint32_t> alen);
SysResult sys_getsockname(Thread *thread, sint fdes, ptr<struct sockaddr> asa, ptr<uint32_t> alen);
SysResult sys_ptrace(Thread *thread, sint req, pid_t pid, caddr_t addr,
sint data);
SysResult sys_recvmsg(Thread *thread, sint s, ptr<struct msghdr> msg,
sint flags);
SysResult sys_sendmsg(Thread *thread, sint s, ptr<struct msghdr> msg,
sint flags);
SysResult sys_recvfrom(Thread *thread, sint s, caddr_t buf, size_t len,
sint flags, ptr<struct sockaddr> from,
ptr<uint32_t> fromlenaddr);
SysResult sys_accept(Thread *thread, sint s, ptr<struct sockaddr> from,
ptr<uint32_t> fromlenaddr);
SysResult sys_getpeername(Thread *thread, sint fdes, ptr<struct sockaddr> asa,
ptr<uint32_t> alen);
SysResult sys_getsockname(Thread *thread, sint fdes, ptr<struct sockaddr> asa,
ptr<uint32_t> alen);
SysResult sys_access(Thread *thread, ptr<char> path, sint flags);
SysResult sys_chflags(Thread *thread, ptr<char> path, sint flags);
SysResult sys_fchflags(Thread *thread, sint fd, sint flags);
@ -55,8 +65,10 @@ SysResult sys_getppid(Thread *thread);
SysResult sys_dup(Thread *thread, uint fd);
SysResult sys_pipe(Thread *thread);
SysResult sys_getegid(Thread *thread);
SysResult sys_profil(Thread *thread, caddr_t samples, size_t size, size_t offset, uint scale);
SysResult sys_ktrace(Thread *thread, ptr<const char> fname, sint ops, sint facs, sint pit);
SysResult sys_profil(Thread *thread, caddr_t samples, size_t size,
size_t offset, uint scale);
SysResult sys_ktrace(Thread *thread, ptr<const char> fname, sint ops, sint facs,
sint pit);
SysResult sys_getgid(Thread *thread);
SysResult sys_getlogin(Thread *thread, ptr<char> namebuf, uint namelen);
SysResult sys_setlogin(Thread *thread, ptr<char> namebuf);
@ -66,8 +78,10 @@ SysResult sys_ioctl(Thread *thread, sint fd, ulong com, caddr_t data);
SysResult sys_reboot(Thread *thread, sint opt);
SysResult sys_revoke(Thread *thread, ptr<char> path);
SysResult sys_symlink(Thread *thread, ptr<char> path, ptr<char> link);
SysResult sys_readlink(Thread *thread, ptr<char> path, ptr<char> buf, size_t count);
SysResult sys_execve(Thread *thread, ptr<char> fname, ptr<ptr<char>> argv, ptr<ptr<char>> envv);
SysResult sys_readlink(Thread *thread, ptr<char> path, ptr<char> buf,
size_t count);
SysResult sys_execve(Thread *thread, ptr<char> fname, ptr<ptr<char>> argv,
ptr<ptr<char>> envv);
SysResult sys_umask(Thread *thread, sint newmask);
SysResult sys_chroot(Thread *thread, ptr<char> path);
SysResult sys_msync(Thread *thread, ptr<void> addr, size_t len, sint flags);
@ -76,34 +90,45 @@ SysResult sys_sbrk(Thread *thread, sint incr);
SysResult sys_sstk(Thread *thread, sint incr);
SysResult sys_ovadvise(Thread *thread, sint anom);
SysResult sys_munmap(Thread *thread, ptr<void> addr, size_t len);
SysResult sys_mprotect(Thread *thread, ptr<const void> addr, size_t len, sint prot);
SysResult sys_mprotect(Thread *thread, ptr<const void> addr, size_t len,
sint prot);
SysResult sys_madvise(Thread *thread, ptr<void> addr, size_t len, sint behav);
SysResult sys_mincore(Thread *thread, ptr<const void> addr, size_t len, ptr<char> vec);
SysResult sys_mincore(Thread *thread, ptr<const void> addr, size_t len,
ptr<char> vec);
SysResult sys_getgroups(Thread *thread, uint gidsetsize, ptr<gid_t> gidset);
SysResult sys_setgroups(Thread *thread, uint gidsetsize, ptr<gid_t> gidset);
SysResult sys_getpgrp(Thread *thread);
SysResult sys_setpgid(Thread *thread, sint pid, sint pgid);
SysResult sys_setitimer(Thread *thread, uint which, ptr<struct itimerval> itv, ptr<struct itimerval> oitv);
SysResult sys_setitimer(Thread *thread, uint which, ptr<struct itimerval> itv,
ptr<struct itimerval> oitv);
SysResult sys_swapon(Thread *thread, ptr<char> name);
SysResult sys_getitimer(Thread *thread, uint which, ptr<struct itimerval> itv);
SysResult sys_getdtablesize(Thread *thread);
SysResult sys_dup2(Thread *thread, uint from, uint to);
SysResult sys_fcntl(Thread *thread, sint fd, sint cmd, slong arg);
SysResult sys_select(Thread *thread, sint nd, ptr<struct fd_set_t> in, ptr<struct fd_set_t> out, ptr<struct fd_set_t> ex, ptr<struct timeval> tv);
SysResult sys_select(Thread *thread, sint nd, ptr<struct fd_set_t> in,
ptr<struct fd_set_t> out, ptr<struct fd_set_t> ex,
ptr<struct timeval> tv);
SysResult sys_fsync(Thread *thread, sint fd);
SysResult sys_setpriority(Thread *thread, sint which, sint who, sint prio);
SysResult sys_socket(Thread *thread, sint domain, sint type, sint protocol);
SysResult sys_connect(Thread *thread, sint s, caddr_t name, sint namelen);
SysResult sys_getpriority(Thread *thread, sint which, sint who);
SysResult sys_bind(Thread *thread, sint s, caddr_t name, sint namelen);
SysResult sys_setsockopt(Thread *thread, sint s, sint level, sint name, caddr_t val, sint valsize);
SysResult sys_setsockopt(Thread *thread, sint s, sint level, sint name,
caddr_t val, sint valsize);
SysResult sys_listen(Thread *thread, sint s, sint backlog);
SysResult sys_gettimeofday(Thread *thread, ptr<struct timeval> tp, ptr<struct timezone> tzp);
SysResult sys_gettimeofday(Thread *thread, ptr<struct timeval> tp,
ptr<struct timezone> tzp);
SysResult sys_getrusage(Thread *thread, sint who, ptr<struct rusage> rusage);
SysResult sys_getsockopt(Thread *thread, sint s, sint level, sint name, caddr_t val, ptr<sint> avalsize);
SysResult sys_readv(Thread *thread, sint fd, ptr<struct iovec> iovp, uint iovcnt);
SysResult sys_writev(Thread *thread, sint fd, ptr<struct iovec> iovp, uint iovcnt);
SysResult sys_settimeofday(Thread *thread, ptr<struct timeval> tp, ptr<struct timezone> tzp);
SysResult sys_getsockopt(Thread *thread, sint s, sint level, sint name,
caddr_t val, ptr<sint> avalsize);
SysResult sys_readv(Thread *thread, sint fd, ptr<struct iovec> iovp,
uint iovcnt);
SysResult sys_writev(Thread *thread, sint fd, ptr<struct iovec> iovp,
uint iovcnt);
SysResult sys_settimeofday(Thread *thread, ptr<struct timeval> tp,
ptr<struct timezone> tzp);
SysResult sys_fchown(Thread *thread, sint fd, sint uid, sint gid);
SysResult sys_fchmod(Thread *thread, sint fd, sint mode);
SysResult sys_setreuid(Thread *thread, sint ruid, sint euid);
@ -111,26 +136,36 @@ SysResult sys_setregid(Thread *thread, sint rgid, sint egid);
SysResult sys_rename(Thread *thread, ptr<char> from, ptr<char> to);
SysResult sys_flock(Thread *thread, sint fd, sint how);
SysResult sys_mkfifo(Thread *thread, ptr<char> path, sint mode);
SysResult sys_sendto(Thread *thread, sint s, caddr_t buf, size_t len, sint flags, caddr_t to, sint tolen);
SysResult sys_sendto(Thread *thread, sint s, caddr_t buf, size_t len,
sint flags, caddr_t to, sint tolen);
SysResult sys_shutdown(Thread *thread, sint s, sint how);
SysResult sys_socketpair(Thread *thread, sint domain, sint type, sint protocol, ptr<sint> rsv);
SysResult sys_socketpair(Thread *thread, sint domain, sint type, sint protocol,
ptr<sint> rsv);
SysResult sys_mkdir(Thread *thread, ptr<char> path, sint mode);
SysResult sys_rmdir(Thread *thread, ptr<char> path);
SysResult sys_utimes(Thread *thread, ptr<char> path, ptr<struct timeval> tptr);
SysResult sys_adjtime(Thread *thread, ptr<struct timeval> delta, ptr<struct timeval> olddelta);
SysResult sys_adjtime(Thread *thread, ptr<struct timeval> delta,
ptr<struct timeval> olddelta);
SysResult sys_setsid(Thread *thread);
SysResult sys_quotactl(Thread *thread, ptr<char> path, sint cmd, sint uid, caddr_t arg);
SysResult sys_nlm_syscall(Thread *thread, sint debug_level, sint grace_period, sint addr_count, ptr<ptr<char>> addrs);
SysResult sys_quotactl(Thread *thread, ptr<char> path, sint cmd, sint uid,
caddr_t arg);
SysResult sys_nlm_syscall(Thread *thread, sint debug_level, sint grace_period,
sint addr_count, ptr<ptr<char>> addrs);
SysResult sys_nfssvc(Thread *thread, sint flag, caddr_t argp);
SysResult sys_lgetfh(Thread *thread, ptr<char> fname, ptr<struct fhandle> fhp);
SysResult sys_getfh(Thread *thread, ptr<char> fname, ptr<struct fhandle> fhp);
SysResult sys_sysarch(Thread *thread, sint op, ptr<char> parms);
SysResult sys_rtprio(Thread *thread, sint function, pid_t pid, ptr<struct rtprio> rtp);
SysResult sys_semsys(Thread *thread, sint which, sint a2, sint a3, sint a4, sint a5);
SysResult sys_msgsys(Thread *thread, sint which, sint a2, sint a3, sint a4, sint a5, sint a6);
SysResult sys_rtprio(Thread *thread, sint function, pid_t pid,
ptr<struct rtprio> rtp);
SysResult sys_semsys(Thread *thread, sint which, sint a2, sint a3, sint a4,
sint a5);
SysResult sys_msgsys(Thread *thread, sint which, sint a2, sint a3, sint a4,
sint a5, sint a6);
SysResult sys_shmsys(Thread *thread, sint which, sint a2, sint a3, sint a4);
SysResult sys_freebsd6_pread(Thread *thread, sint fd, ptr<void> buf, size_t nbyte, sint pad, off_t offset);
SysResult sys_freebsd6_pwrite(Thread *thread, sint fd, ptr<const void> buf, size_t nbyte, sint pad, off_t offset);
SysResult sys_freebsd6_pread(Thread *thread, sint fd, ptr<void> buf,
size_t nbyte, sint pad, off_t offset);
SysResult sys_freebsd6_pwrite(Thread *thread, sint fd, ptr<const void> buf,
size_t nbyte, sint pad, off_t offset);
SysResult sys_setfib(Thread *thread, sint fib);
SysResult sys_ntp_adjtime(Thread *thread, ptr<struct timex> tp);
SysResult sys_setgid(Thread *thread, gid_t gid);
@ -143,54 +178,82 @@ SysResult sys_pathconf(Thread *thread, ptr<char> path, sint name);
SysResult sys_fpathconf(Thread *thread, sint fd, sint name);
SysResult sys_getrlimit(Thread *thread, uint which, ptr<struct rlimit> rlp);
SysResult sys_setrlimit(Thread *thread, uint which, ptr<struct rlimit> rlp);
SysResult sys_getdirentries(Thread *thread, sint fd, ptr<char> buf, uint count, ptr<slong> basep);
SysResult sys_freebsd6_mmap(Thread *thread, caddr_t addr, size_t len, sint prot, sint flags, sint fd, sint pad, off_t pos);
SysResult sys_freebsd6_lseek(Thread *thread, sint fd, sint pad, off_t offset, sint whence);
SysResult sys_freebsd6_truncate(Thread *thread, ptr<char> path, sint pad, off_t length);
SysResult sys_freebsd6_ftruncate(Thread *thread, sint fd, sint pad, off_t length);
SysResult sys___sysctl(Thread *thread, ptr<sint> name, uint namelen, ptr<void> old, ptr<size_t> oldenp, ptr<void> new_, size_t newlen);
SysResult sys_getdirentries(Thread *thread, sint fd, ptr<char> buf, uint count,
ptr<slong> basep);
SysResult sys_freebsd6_mmap(Thread *thread, caddr_t addr, size_t len, sint prot,
sint flags, sint fd, sint pad, off_t pos);
SysResult sys_freebsd6_lseek(Thread *thread, sint fd, sint pad, off_t offset,
sint whence);
SysResult sys_freebsd6_truncate(Thread *thread, ptr<char> path, sint pad,
off_t length);
SysResult sys_freebsd6_ftruncate(Thread *thread, sint fd, sint pad,
off_t length);
SysResult sys___sysctl(Thread *thread, ptr<sint> name, uint namelen,
ptr<void> old, ptr<size_t> oldenp, ptr<void> new_,
size_t newlen);
SysResult sys_mlock(Thread *thread, ptr<const void> addr, size_t len);
SysResult sys_munlock(Thread *thread, ptr<const void> addr, size_t len);
SysResult sys_undelete(Thread *thread, ptr<char> path);
SysResult sys_futimes(Thread *thread, sint fd, ptr<struct timeval> tptr);
SysResult sys_getpgid(Thread *thread, pid_t pid);
SysResult sys_poll(Thread *thread, ptr<struct pollfd> fds, uint nfds, sint timeout);
SysResult sys_poll(Thread *thread, ptr<struct pollfd> fds, uint nfds,
sint timeout);
SysResult sys_semget(Thread *thread, key_t key, sint nsems, sint semflg);
SysResult sys_semop(Thread *thread, sint semid, ptr<struct sembuf> sops, size_t nspos);
SysResult sys_semop(Thread *thread, sint semid, ptr<struct sembuf> sops,
size_t nspos);
SysResult sys_msgget(Thread *thread, key_t key, sint msgflg);
SysResult sys_msgsnd(Thread *thread, sint msqid, ptr<const void> msgp, size_t msgsz, sint msgflg);
SysResult sys_msgrcv(Thread *thread, sint msqid, ptr<void> msgp, size_t msgsz, slong msgtyp, sint msgflg);
SysResult sys_shmat(Thread *thread, sint shmid, ptr<const void> shmaddr, sint shmflg);
SysResult sys_msgsnd(Thread *thread, sint msqid, ptr<const void> msgp,
size_t msgsz, sint msgflg);
SysResult sys_msgrcv(Thread *thread, sint msqid, ptr<void> msgp, size_t msgsz,
slong msgtyp, sint msgflg);
SysResult sys_shmat(Thread *thread, sint shmid, ptr<const void> shmaddr,
sint shmflg);
SysResult sys_shmdt(Thread *thread, ptr<const void> shmaddr);
SysResult sys_shmget(Thread *thread, key_t key, size_t size, sint shmflg);
SysResult sys_clock_gettime(Thread *thread, clockid_t clock_id, ptr<struct timespec> tp);
SysResult sys_clock_settime(Thread *thread, clockid_t clock_id, ptr<const struct timespec> tp);
SysResult sys_clock_getres(Thread *thread, clockid_t clock_id, ptr<struct timespec> tp);
SysResult sys_ktimer_create(Thread *thread, clockid_t clock_id, ptr<struct sigevent> evp, ptr<sint> timerid);
SysResult sys_clock_gettime(Thread *thread, clockid_t clock_id,
ptr<struct timespec> tp);
SysResult sys_clock_settime(Thread *thread, clockid_t clock_id,
ptr<const struct timespec> tp);
SysResult sys_clock_getres(Thread *thread, clockid_t clock_id,
ptr<struct timespec> tp);
SysResult sys_ktimer_create(Thread *thread, clockid_t clock_id,
ptr<struct sigevent> evp, ptr<sint> timerid);
SysResult sys_ktimer_delete(Thread *thread, sint timerid);
SysResult sys_ktimer_settime(Thread *thread, sint timerid, sint flags, ptr<const struct itimerspec> value, ptr<struct itimerspec> ovalue);
SysResult sys_ktimer_gettime(Thread *thread, sint timerid, ptr<struct itimerspec> value);
SysResult sys_ktimer_settime(Thread *thread, sint timerid, sint flags,
ptr<const struct itimerspec> value,
ptr<struct itimerspec> ovalue);
SysResult sys_ktimer_gettime(Thread *thread, sint timerid,
ptr<struct itimerspec> value);
SysResult sys_ktimer_getoverrun(Thread *thread, sint timerid);
SysResult sys_nanosleep(Thread *thread, ptr<const struct timespec> rqtp, ptr<struct timespec> rmtp);
SysResult sys_nanosleep(Thread *thread, ptr<const struct timespec> rqtp,
ptr<struct timespec> rmtp);
SysResult sys_ntp_gettime(Thread *thread, ptr<struct ntptimeval> ntvp);
SysResult sys_minherit(Thread *thread, ptr<void> addr, size_t len, sint inherit);
SysResult sys_minherit(Thread *thread, ptr<void> addr, size_t len,
sint inherit);
SysResult sys_rfork(Thread *thread, sint flags);
SysResult sys_openbsd_poll(Thread *thread, ptr<struct pollfd> fds, uint nfds, sint timeout);
SysResult sys_openbsd_poll(Thread *thread, ptr<struct pollfd> fds, uint nfds,
sint timeout);
SysResult sys_issetugid(Thread *thread);
SysResult sys_lchown(Thread *thread, ptr<char> path, sint uid, sint gid);
SysResult sys_aio_read(Thread *thread, ptr<struct aiocb> aiocbp);
SysResult sys_aio_write(Thread *thread, ptr<struct aiocb> aiocbp);
SysResult sys_lio_listio(Thread *thread, sint mode, ptr<cptr<struct aiocb>> aiocbp, sint nent, ptr<struct sigevent> sig);
SysResult sys_lio_listio(Thread *thread, sint mode,
ptr<cptr<struct aiocb>> aiocbp, sint nent,
ptr<struct sigevent> sig);
SysResult sys_getdents(Thread *thread, sint fd, ptr<char> buf, size_t count);
SysResult sys_lchmod(Thread *thread, ptr<char> path, mode_t mode);
SysResult sys_lutimes(Thread *thread, ptr<char> path, ptr<struct timeval> tptr);
SysResult sys_nstat(Thread *thread, ptr<char> path, ptr<struct nstat> ub);
SysResult sys_nfstat(Thread *thread, sint fd, ptr<struct nstat> sb);
SysResult sys_nlstat(Thread *thread, ptr<char> path, ptr<struct nstat> ub);
SysResult sys_preadv(Thread *thread, sint fd, ptr<struct iovec> iovp, uint iovcnt, off_t offset);
SysResult sys_pwritev(Thread *thread, sint fd, ptr<struct iovec> iovp, uint iovcnt, off_t offset);
SysResult sys_fhopen(Thread *thread, ptr<const struct fhandle> u_fhp, sint flags);
SysResult sys_fhstat(Thread *thread, ptr<const struct fhandle> u_fhp, ptr<struct stat> sb);
SysResult sys_preadv(Thread *thread, sint fd, ptr<struct iovec> iovp,
uint iovcnt, off_t offset);
SysResult sys_pwritev(Thread *thread, sint fd, ptr<struct iovec> iovp,
uint iovcnt, off_t offset);
SysResult sys_fhopen(Thread *thread, ptr<const struct fhandle> u_fhp,
sint flags);
SysResult sys_fhstat(Thread *thread, ptr<const struct fhandle> u_fhp,
ptr<struct stat> sb);
SysResult sys_modnext(Thread *thread, sint modid);
SysResult sys_modstat(Thread *thread, sint modid, ptr<struct module_stat> stat);
SysResult sys_modfnext(Thread *thread, sint modid);
@ -199,116 +262,188 @@ SysResult sys_kldload(Thread *thread, ptr<const char> file);
SysResult sys_kldunload(Thread *thread, sint fileid);
SysResult sys_kldfind(Thread *thread, ptr<const char> name);
SysResult sys_kldnext(Thread *thread, sint fileid);
SysResult sys_kldstat(Thread *thread, sint fileid, ptr<struct kld_file_stat> stat);
SysResult sys_kldstat(Thread *thread, sint fileid,
ptr<struct kld_file_stat> stat);
SysResult sys_kldfirstmod(Thread *thread, sint fileid);
SysResult sys_getsid(Thread *thread, pid_t pid);
SysResult sys_setresuid(Thread *thread, uid_t ruid, uid_t euid, uid_t suid);
SysResult sys_setresgid(Thread *thread, gid_t rgid, gid_t egid, gid_t sgid);
SysResult sys_aio_return(Thread *thread, ptr<struct aiocb> aiocbp);
SysResult sys_aio_suspend(Thread *thread, ptr<struct aiocb> aiocbp, sint nent, ptr<const struct timespec> timeout);
SysResult sys_aio_suspend(Thread *thread, ptr<struct aiocb> aiocbp, sint nent,
ptr<const struct timespec> timeout);
SysResult sys_aio_cancel(Thread *thread, sint fd, ptr<struct aiocb> aiocbp);
SysResult sys_aio_error(Thread *thread, ptr<struct aiocb> aiocbp);
SysResult sys_oaio_read(Thread *thread, ptr<struct aiocb> aiocbp);
SysResult sys_oaio_write(Thread *thread, ptr<struct aiocb> aiocbp);
SysResult sys_olio_listio(Thread *thread, sint mode, ptr<cptr<struct aiocb>> acb_list, sint nent, ptr<struct osigevent> sig);
SysResult sys_olio_listio(Thread *thread, sint mode,
ptr<cptr<struct aiocb>> acb_list, sint nent,
ptr<struct osigevent> sig);
SysResult sys_yield(Thread *thread);
SysResult sys_mlockall(Thread *thread, sint how);
SysResult sys_munlockall(Thread *thread);
SysResult sys___getcwd(Thread *thread, ptr<char> buf, uint buflen);
SysResult sys_sched_setparam(Thread *thread, pid_t pid, ptr<const struct sched_param> param);
SysResult sys_sched_getparam(Thread *thread, pid_t pid, ptr<struct sched_param> param);
SysResult sys_sched_setscheduler(Thread *thread, pid_t pid, sint policy, ptr<const struct sched_param> param);
SysResult sys_sched_setparam(Thread *thread, pid_t pid,
ptr<const struct sched_param> param);
SysResult sys_sched_getparam(Thread *thread, pid_t pid,
ptr<struct sched_param> param);
SysResult sys_sched_setscheduler(Thread *thread, pid_t pid, sint policy,
ptr<const struct sched_param> param);
SysResult sys_sched_getscheduler(Thread *thread, pid_t pid);
SysResult sys_sched_yield(Thread *thread);
SysResult sys_sched_get_priority_max(Thread *thread, sint policy);
SysResult sys_sched_get_priority_min(Thread *thread, sint policy);
SysResult sys_sched_rr_get_interval(Thread *thread, pid_t pid, ptr<struct timespec> interval);
SysResult sys_sched_rr_get_interval(Thread *thread, pid_t pid,
ptr<struct timespec> interval);
SysResult sys_utrace(Thread *thread, ptr<const void> addr, size_t len);
SysResult sys_kldsym(Thread *thread, sint fileid, sint cmd, ptr<void> data);
SysResult sys_jail(Thread *thread, ptr<struct jail> jail);
SysResult sys_nnpfs_syscall(Thread *thread, sint operation, ptr<char> a_pathP, sint opcode, ptr<void> a_paramsP, sint a_followSymlinks);
SysResult sys_sigprocmask(Thread *thread, sint how, ptr<uint64_t> set, ptr<uint64_t> oset);
SysResult sys_nnpfs_syscall(Thread *thread, sint operation, ptr<char> a_pathP,
sint opcode, ptr<void> a_paramsP,
sint a_followSymlinks);
SysResult sys_sigprocmask(Thread *thread, sint how, ptr<uint64_t> set,
ptr<uint64_t> oset);
SysResult sys_sigsuspend(Thread *thread, ptr<const struct sigset> set);
SysResult sys_sigpending(Thread *thread, ptr<struct sigset> set);
SysResult sys_sigtimedwait(Thread *thread, ptr<const struct sigset> set, ptr<struct siginfo> info, ptr<const struct timespec> timeout);
SysResult sys_sigwaitinfo(Thread *thread, ptr<const struct sigset> set, ptr<struct siginfo> info);
SysResult sys___acl_get_file(Thread *thread, ptr<char> path, acl_type_t type, ptr<struct acl> aclp);
SysResult sys___acl_set_file(Thread *thread, ptr<char> path, acl_type_t type, ptr<struct acl> aclp);
SysResult sys___acl_get_fd(Thread *thread, sint filedes, acl_type_t type, ptr<struct acl> aclp);
SysResult sys___acl_set_fd(Thread *thread, sint filedes, acl_type_t type, ptr<struct acl> aclp);
SysResult sys___acl_delete_file(Thread *thread, ptr<char> path, acl_type_t type);
SysResult sys_sigtimedwait(Thread *thread, ptr<const struct sigset> set,
ptr<struct siginfo> info,
ptr<const struct timespec> timeout);
SysResult sys_sigwaitinfo(Thread *thread, ptr<const struct sigset> set,
ptr<struct siginfo> info);
SysResult sys___acl_get_file(Thread *thread, ptr<char> path, acl_type_t type,
ptr<struct acl> aclp);
SysResult sys___acl_set_file(Thread *thread, ptr<char> path, acl_type_t type,
ptr<struct acl> aclp);
SysResult sys___acl_get_fd(Thread *thread, sint filedes, acl_type_t type,
ptr<struct acl> aclp);
SysResult sys___acl_set_fd(Thread *thread, sint filedes, acl_type_t type,
ptr<struct acl> aclp);
SysResult sys___acl_delete_file(Thread *thread, ptr<char> path,
acl_type_t type);
SysResult sys___acl_delete_fd(Thread *thread, sint filedes, acl_type_t type);
SysResult sys___acl_aclcheck_file(Thread *thread, ptr<char> path, acl_type_t type, ptr<struct acl> aclp);
SysResult sys___acl_aclcheck_fd(Thread *thread, sint filedes, acl_type_t type, ptr<struct acl> aclp);
SysResult sys_extattrctl(Thread *thread, ptr<char> path, char cmd, ptr<const char> filename, sint attrnamespace, ptr<const char> attrname);
SysResult sys_extattr_set_file(Thread *thread, ptr<char> path, sint attrnamespace, ptr<const char> filename, ptr<void> data, size_t nbytes);
SysResult sys_extattr_get_file(Thread *thread, ptr<char> path, sint attrnamespace, ptr<const char> filename, ptr<void> data, size_t nbytes);
SysResult sys_extattr_delete_file(Thread *thread, ptr<char> path, sint attrnamespace, ptr<const char> attrname);
SysResult sys_aio_waitcomplete(Thread *thread, ptr<ptr<struct aiocb>> aiocbp, ptr<struct timespec> timeout);
SysResult sys_getresuid(Thread *thread, ptr<uid_t> ruid, ptr<uid_t> euid, ptr<uid_t> suid);
SysResult sys_getresgid(Thread *thread, ptr<gid_t> rgid, ptr<gid_t> egid, ptr<gid_t> sgid);
SysResult sys___acl_aclcheck_file(Thread *thread, ptr<char> path,
acl_type_t type, ptr<struct acl> aclp);
SysResult sys___acl_aclcheck_fd(Thread *thread, sint filedes, acl_type_t type,
ptr<struct acl> aclp);
SysResult sys_extattrctl(Thread *thread, ptr<char> path, char cmd,
ptr<const char> filename, sint attrnamespace,
ptr<const char> attrname);
SysResult sys_extattr_set_file(Thread *thread, ptr<char> path,
sint attrnamespace, ptr<const char> filename,
ptr<void> data, size_t nbytes);
SysResult sys_extattr_get_file(Thread *thread, ptr<char> path,
sint attrnamespace, ptr<const char> filename,
ptr<void> data, size_t nbytes);
SysResult sys_extattr_delete_file(Thread *thread, ptr<char> path,
sint attrnamespace, ptr<const char> attrname);
SysResult sys_aio_waitcomplete(Thread *thread, ptr<ptr<struct aiocb>> aiocbp,
ptr<struct timespec> timeout);
SysResult sys_getresuid(Thread *thread, ptr<uid_t> ruid, ptr<uid_t> euid,
ptr<uid_t> suid);
SysResult sys_getresgid(Thread *thread, ptr<gid_t> rgid, ptr<gid_t> egid,
ptr<gid_t> sgid);
SysResult sys_kqueue(Thread *thread);
SysResult sys_kevent(Thread *thread, sint fd, ptr<struct kevent> changelist, sint nchanges, ptr<struct kevent> eventlist, sint nevents, ptr<const struct timespec> timeout);
SysResult sys_extattr_set_fd(Thread *thread, sint fd, sint attrnamespace, ptr<const char> attrname, ptr<void> data, size_t nbytes);
SysResult sys_extattr_get_fd(Thread *thread, sint fd, sint attrnamespace, ptr<const char> attrname, ptr<void> data, size_t nbytes);
SysResult sys_extattr_delete_fd(Thread *thread, sint fd, sint attrnamespace, ptr<const char> attrname);
SysResult sys_kevent(Thread *thread, sint fd, ptr<struct kevent> changelist,
sint nchanges, ptr<struct kevent> eventlist, sint nevents,
ptr<const struct timespec> timeout);
SysResult sys_extattr_set_fd(Thread *thread, sint fd, sint attrnamespace,
ptr<const char> attrname, ptr<void> data,
size_t nbytes);
SysResult sys_extattr_get_fd(Thread *thread, sint fd, sint attrnamespace,
ptr<const char> attrname, ptr<void> data,
size_t nbytes);
SysResult sys_extattr_delete_fd(Thread *thread, sint fd, sint attrnamespace,
ptr<const char> attrname);
SysResult sys___setugid(Thread *thread, sint flags);
SysResult sys_eaccess(Thread *thread, ptr<char> path, sint flags);
SysResult sys_afs3_syscall(Thread *thread, slong syscall, slong param1, slong param2, slong param3, slong param4, slong param5, slong param6);
SysResult sys_nmount(Thread *thread, ptr<struct iovec> iovp, uint iovcnt, sint flags);
SysResult sys_afs3_syscall(Thread *thread, slong syscall, slong param1,
slong param2, slong param3, slong param4,
slong param5, slong param6);
SysResult sys_nmount(Thread *thread, ptr<struct iovec> iovp, uint iovcnt,
sint flags);
SysResult sys___mac_get_proc(Thread *thread, ptr<struct mac> mac_p);
SysResult sys___mac_set_proc(Thread *thread, ptr<struct mac> mac_p);
SysResult sys___mac_get_fd(Thread *thread, sint fd, ptr<struct mac> mac_p);
SysResult sys___mac_get_file(Thread *thread, ptr<const char> path, ptr<struct mac> mac_p);
SysResult sys___mac_get_file(Thread *thread, ptr<const char> path,
ptr<struct mac> mac_p);
SysResult sys___mac_set_fd(Thread *thread, sint fd, ptr<struct mac> mac_p);
SysResult sys___mac_set_file(Thread *thread, ptr<const char> path, ptr<struct mac> mac_p);
SysResult sys_kenv(Thread *thread, sint what, ptr<const char> name, ptr<char> value, sint len);
SysResult sys___mac_set_file(Thread *thread, ptr<const char> path,
ptr<struct mac> mac_p);
SysResult sys_kenv(Thread *thread, sint what, ptr<const char> name,
ptr<char> value, sint len);
SysResult sys_lchflags(Thread *thread, ptr<const char> path, sint flags);
SysResult sys_uuidgen(Thread *thread, ptr<struct uuid> store, sint count);
SysResult sys_sendfile(Thread *thread, sint fd, sint s, off_t offset, size_t nbytes, ptr<struct sf_hdtr> hdtr, ptr<off_t> sbytes, sint flags);
SysResult sys_mac_syscall(Thread *thread, ptr<const char> policy, sint call, ptr<void> arg);
SysResult sys_getfsstat(Thread *thread, ptr<struct statfs> buf, slong bufsize, sint flags);
SysResult sys_sendfile(Thread *thread, sint fd, sint s, off_t offset,
size_t nbytes, ptr<struct sf_hdtr> hdtr,
ptr<off_t> sbytes, sint flags);
SysResult sys_mac_syscall(Thread *thread, ptr<const char> policy, sint call,
ptr<void> arg);
SysResult sys_getfsstat(Thread *thread, ptr<struct statfs> buf, slong bufsize,
sint flags);
SysResult sys_statfs(Thread *thread, ptr<char> path, ptr<struct statfs> buf);
SysResult sys_fstatfs(Thread *thread, sint fd, ptr<struct statfs> buf);
SysResult sys_fhstatfs(Thread *thread, ptr<const struct fhandle> u_fhp, ptr<struct statfs> buf);
SysResult sys_fhstatfs(Thread *thread, ptr<const struct fhandle> u_fhp,
ptr<struct statfs> buf);
SysResult sys_ksem_close(Thread *thread, semid_t id);
SysResult sys_ksem_post(Thread *thread, semid_t id);
SysResult sys_ksem_wait(Thread *thread, semid_t id);
SysResult sys_ksem_trywait(Thread *thread, semid_t id);
SysResult sys_ksem_init(Thread *thread, ptr<semid_t> idp, uint value);
SysResult sys_ksem_open(Thread *thread, ptr<semid_t> idp, ptr<const char> name, sint oflag, mode_t mode, uint value);
SysResult sys_ksem_open(Thread *thread, ptr<semid_t> idp, ptr<const char> name,
sint oflag, mode_t mode, uint value);
SysResult sys_ksem_unlink(Thread *thread, ptr<const char> name);
SysResult sys_ksem_getvalue(Thread *thread, semid_t id, ptr<sint> value);
SysResult sys_ksem_destroy(Thread *thread, semid_t id);
SysResult sys___mac_get_pid(Thread *thread, pid_t pid, ptr<struct mac> mac_p);
SysResult sys___mac_get_link(Thread *thread, ptr<const char> path_p, ptr<struct mac> mac_p);
SysResult sys___mac_set_link(Thread *thread, ptr<const char> path_p, ptr<struct mac> mac_p);
SysResult sys_extattr_set_link(Thread *thread, ptr<const char> path, sint attrnamespace, ptr<const char> attrname, ptr<void> data, size_t nbytes);
SysResult sys_extattr_get_link(Thread *thread, ptr<const char> path, sint attrnamespace, ptr<const char> attrname, ptr<void> data, size_t nbytes);
SysResult sys_extattr_delete_link(Thread *thread, ptr<const char> path, sint attrnamespace, ptr<const char> attrname);
SysResult sys___mac_execve(Thread *thread, ptr<char> fname, ptr<ptr<char>> argv, ptr<ptr<char>> envv, ptr<struct mac> mac_p);
SysResult sys_sigaction(Thread *thread, sint sig, ptr<struct sigaction> act, ptr<struct sigaction> oact);
SysResult sys___mac_get_link(Thread *thread, ptr<const char> path_p,
ptr<struct mac> mac_p);
SysResult sys___mac_set_link(Thread *thread, ptr<const char> path_p,
ptr<struct mac> mac_p);
SysResult sys_extattr_set_link(Thread *thread, ptr<const char> path,
sint attrnamespace, ptr<const char> attrname,
ptr<void> data, size_t nbytes);
SysResult sys_extattr_get_link(Thread *thread, ptr<const char> path,
sint attrnamespace, ptr<const char> attrname,
ptr<void> data, size_t nbytes);
SysResult sys_extattr_delete_link(Thread *thread, ptr<const char> path,
sint attrnamespace, ptr<const char> attrname);
SysResult sys___mac_execve(Thread *thread, ptr<char> fname, ptr<ptr<char>> argv,
ptr<ptr<char>> envv, ptr<struct mac> mac_p);
SysResult sys_sigaction(Thread *thread, sint sig, ptr<struct sigaction> act,
ptr<struct sigaction> oact);
SysResult sys_sigreturn(Thread *thread, ptr<struct ucontext> sigcntxp);
SysResult sys_getcontext(Thread *thread, ptr<struct ucontext> ucp);
SysResult sys_setcontext(Thread *thread, ptr<struct ucontext> ucp);
SysResult sys_swapcontext(Thread *thread, ptr<struct ucontext> oucp, ptr<struct ucontext> ucp);
SysResult sys_swapcontext(Thread *thread, ptr<struct ucontext> oucp,
ptr<struct ucontext> ucp);
SysResult sys_swapoff(Thread *thread, ptr<const char> name);
SysResult sys___acl_get_link(Thread *thread, ptr<const char> path, acl_type_t type, ptr<struct acl> aclp);
SysResult sys___acl_set_link(Thread *thread, ptr<const char> path, acl_type_t type, ptr<struct acl> aclp);
SysResult sys___acl_delete_link(Thread *thread, ptr<const char> path, acl_type_t type);
SysResult sys___acl_aclcheck_link(Thread *thread, ptr<const char> path, acl_type_t type, ptr<struct acl> aclp);
SysResult sys_sigwait(Thread *thread, ptr<const struct sigset> set, ptr<sint> sig);
SysResult sys_thr_create(Thread *thread, ptr<struct ucontext> ctxt, ptr<slong> arg, sint flags);
SysResult sys___acl_get_link(Thread *thread, ptr<const char> path,
acl_type_t type, ptr<struct acl> aclp);
SysResult sys___acl_set_link(Thread *thread, ptr<const char> path,
acl_type_t type, ptr<struct acl> aclp);
SysResult sys___acl_delete_link(Thread *thread, ptr<const char> path,
acl_type_t type);
SysResult sys___acl_aclcheck_link(Thread *thread, ptr<const char> path,
acl_type_t type, ptr<struct acl> aclp);
SysResult sys_sigwait(Thread *thread, ptr<const struct sigset> set,
ptr<sint> sig);
SysResult sys_thr_create(Thread *thread, ptr<struct ucontext> ctxt,
ptr<slong> arg, sint flags);
SysResult sys_thr_exit(Thread *thread, ptr<slong> state);
SysResult sys_thr_self(Thread *thread, ptr<slong> id);
SysResult sys_thr_kill(Thread *thread, slong id, sint sig);
SysResult sys__umtx_lock(Thread *thread, ptr<struct umtx> umtx);
SysResult sys__umtx_unlock(Thread *thread, ptr<struct umtx> umtx);
SysResult sys_jail_attach(Thread *thread, sint jid);
SysResult sys_extattr_list_fd(Thread *thread, sint fd, sint attrnamespace, ptr<void> data, size_t nbytes);
SysResult sys_extattr_list_file(Thread *thread, ptr<const char> path, sint attrnamespace, ptr<void> data, size_t nbytes);
SysResult sys_extattr_list_link(Thread *thread, ptr<const char> path, sint attrnamespace, ptr<void> data, size_t nbytes);
SysResult sys_ksem_timedwait(Thread *thread, semid_t id, ptr<const struct timespec> abstime);
SysResult sys_extattr_list_fd(Thread *thread, sint fd, sint attrnamespace,
ptr<void> data, size_t nbytes);
SysResult sys_extattr_list_file(Thread *thread, ptr<const char> path,
sint attrnamespace, ptr<void> data,
size_t nbytes);
SysResult sys_extattr_list_link(Thread *thread, ptr<const char> path,
sint attrnamespace, ptr<void> data,
size_t nbytes);
SysResult sys_ksem_timedwait(Thread *thread, semid_t id,
ptr<const struct timespec> abstime);
SysResult sys_thr_suspend(Thread *thread, ptr<const struct timespec> timeout);
SysResult sys_thr_wake(Thread *thread, slong id);
SysResult sys_kldunloadf(Thread *thread, slong fileid, sint flags);
@ -318,64 +453,119 @@ SysResult sys_getauid(Thread *thread, ptr<uid_t> auid);
SysResult sys_setauid(Thread *thread, ptr<uid_t> auid);
SysResult sys_getaudit(Thread *thread, ptr<struct auditinfo> auditinfo);
SysResult sys_setaudit(Thread *thread, ptr<struct auditinfo> auditinfo);
SysResult sys_getaudit_addr(Thread *thread, ptr<struct auditinfo_addr> auditinfo_addr, uint length);
SysResult sys_setaudit_addr(Thread *thread, ptr<struct auditinfo_addr> auditinfo_addr, uint length);
SysResult sys_getaudit_addr(Thread *thread,
ptr<struct auditinfo_addr> auditinfo_addr,
uint length);
SysResult sys_setaudit_addr(Thread *thread,
ptr<struct auditinfo_addr> auditinfo_addr,
uint length);
SysResult sys_auditctl(Thread *thread, ptr<char> path);
SysResult sys__umtx_op(Thread *thread, ptr<void> obj, sint op, ulong val, ptr<void> uaddr1, ptr<void> uaddr2);
SysResult sys_thr_new(Thread *thread, ptr<struct thr_param> param, sint param_size);
SysResult sys__umtx_op(Thread *thread, ptr<void> obj, sint op, ulong val,
ptr<void> uaddr1, ptr<void> uaddr2);
SysResult sys_thr_new(Thread *thread, ptr<struct thr_param> param,
sint param_size);
SysResult sys_sigqueue(Thread *thread, pid_t pid, sint signum, ptr<void> value);
SysResult sys_kmq_open(Thread *thread, ptr<const char> path, sint flags, mode_t mode, ptr<const struct mq_attr> attr);
SysResult sys_kmq_setattr(Thread *thread, sint mqd, ptr<const struct mq_attr> attr, ptr<struct mq_attr> oattr);
SysResult sys_kmq_timedreceive(Thread *thread, sint mqd, ptr<const char> msg_ptr, size_t msg_len, ptr<uint> msg_prio, ptr<const struct timespec> abstimeout);
SysResult sys_kmq_timedsend(Thread *thread, sint mqd, ptr<char> msg_ptr, size_t msg_len, ptr<uint> msg_prio, ptr<const struct timespec> abstimeout);
SysResult sys_kmq_notify(Thread *thread, sint mqd, ptr<const struct sigevent> sigev);
SysResult sys_kmq_open(Thread *thread, ptr<const char> path, sint flags,
mode_t mode, ptr<const struct mq_attr> attr);
SysResult sys_kmq_setattr(Thread *thread, sint mqd,
ptr<const struct mq_attr> attr,
ptr<struct mq_attr> oattr);
SysResult sys_kmq_timedreceive(Thread *thread, sint mqd,
ptr<const char> msg_ptr, size_t msg_len,
ptr<uint> msg_prio,
ptr<const struct timespec> abstimeout);
SysResult sys_kmq_timedsend(Thread *thread, sint mqd, ptr<char> msg_ptr,
size_t msg_len, ptr<uint> msg_prio,
ptr<const struct timespec> abstimeout);
SysResult sys_kmq_notify(Thread *thread, sint mqd,
ptr<const struct sigevent> sigev);
SysResult sys_kmq_unlink(Thread *thread, ptr<const char> path);
SysResult sys_abort2(Thread *thread, ptr<const char> why, sint narg, ptr<ptr<void>> args);
SysResult sys_abort2(Thread *thread, ptr<const char> why, sint narg,
ptr<ptr<void>> args);
SysResult sys_thr_set_name(Thread *thread, slong id, ptr<const char> name);
SysResult sys_aio_fsync(Thread *thread, sint op, ptr<struct aiocb> aiocbp);
SysResult sys_rtprio_thread(Thread *thread, sint function, lwpid_t lwpid, ptr<struct rtprio> rtp);
SysResult sys_rtprio_thread(Thread *thread, sint function, lwpid_t lwpid,
ptr<struct rtprio> rtp);
SysResult sys_sctp_peeloff(Thread *thread, sint sd, uint32_t name);
SysResult sys_sctp_generic_sendmsg(Thread *thread, sint sd, caddr_t msg, sint mlen, caddr_t to, __socklen_t tolen, ptr<struct sctp_sndrcvinfo> sinfo, sint flags);
SysResult sys_sctp_generic_sendmsg_iov(Thread *thread, sint sd, ptr<struct iovec> iov, sint iovlen, caddr_t to, __socklen_t tolen, ptr<struct sctp_sndrcvinfo> sinfo, sint flags);
SysResult sys_sctp_generic_recvmsg(Thread *thread, sint sd, ptr<struct iovec> iov, sint iovlen, caddr_t from, __socklen_t fromlen, ptr<struct sctp_sndrcvinfo> sinfo, sint flags);
SysResult sys_pread(Thread *thread, sint fd, ptr<void> buf, size_t nbyte, off_t offset);
SysResult sys_pwrite(Thread *thread, sint fd, ptr<const void> buf, size_t nbyte, off_t offset);
SysResult sys_mmap(Thread *thread, caddr_t addr, size_t len, sint prot, sint flags, sint fd, off_t pos);
SysResult sys_sctp_generic_sendmsg(Thread *thread, sint sd, caddr_t msg,
sint mlen, caddr_t to, __socklen_t tolen,
ptr<struct sctp_sndrcvinfo> sinfo,
sint flags);
SysResult sys_sctp_generic_sendmsg_iov(Thread *thread, sint sd,
ptr<struct iovec> iov, sint iovlen,
caddr_t to, __socklen_t tolen,
ptr<struct sctp_sndrcvinfo> sinfo,
sint flags);
SysResult sys_sctp_generic_recvmsg(Thread *thread, sint sd,
ptr<struct iovec> iov, sint iovlen,
caddr_t from, __socklen_t fromlen,
ptr<struct sctp_sndrcvinfo> sinfo,
sint flags);
SysResult sys_pread(Thread *thread, sint fd, ptr<void> buf, size_t nbyte,
off_t offset);
SysResult sys_pwrite(Thread *thread, sint fd, ptr<const void> buf, size_t nbyte,
off_t offset);
SysResult sys_mmap(Thread *thread, caddr_t addr, size_t len, sint prot,
sint flags, sint fd, off_t pos);
SysResult sys_lseek(Thread *thread, sint fd, off_t offset, sint whence);
SysResult sys_truncate(Thread *thread, ptr<char> path, off_t length);
SysResult sys_ftruncate(Thread *thread, sint fd, off_t length);
SysResult sys_thr_kill2(Thread *thread, pid_t pid, slong id, sint sig);
SysResult sys_shm_open(Thread *thread, ptr<const char> path, sint flags, mode_t mode);
SysResult sys_shm_open(Thread *thread, ptr<const char> path, sint flags,
mode_t mode);
SysResult sys_shm_unlink(Thread *thread, ptr<const char> path);
SysResult sys_cpuset(Thread *thread, ptr<cpusetid_t> setid);
SysResult sys_cpuset_setid(Thread *thread, cpuwhich_t which, id_t id, cpusetid_t setid);
SysResult sys_cpuset_getid(Thread *thread, cpulevel_t level, cpuwhich_t which, id_t id, ptr<cpusetid_t> setid);
SysResult sys_cpuset_getaffinity(Thread *thread, cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, ptr<cpuset> mask);
SysResult sys_cpuset_setaffinity(Thread *thread, cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, ptr<const cpuset> mask);
SysResult sys_faccessat(Thread *thread, sint fd, ptr<char> path, sint mode, sint flag);
SysResult sys_fchmodat(Thread *thread, sint fd, ptr<char> path, mode_t mode, sint flag);
SysResult sys_fchownat(Thread *thread, sint fd, ptr<char> path, uid_t uid, gid_t gid, sint flag);
SysResult sys_fexecve(Thread *thread, sint fd, ptr<ptr<char>> argv, ptr<ptr<char>> envv);
SysResult sys_fstatat(Thread *thread, sint fd, ptr<char> path, ptr<struct stat> buf, sint flag);
SysResult sys_futimesat(Thread *thread, sint fd, ptr<char> path, ptr<struct timeval> times);
SysResult sys_linkat(Thread *thread, sint fd1, ptr<char> path1, sint fd2, ptr<char> path2, sint flag);
SysResult sys_cpuset_setid(Thread *thread, cpuwhich_t which, id_t id,
cpusetid_t setid);
SysResult sys_cpuset_getid(Thread *thread, cpulevel_t level, cpuwhich_t which,
id_t id, ptr<cpusetid_t> setid);
SysResult sys_cpuset_getaffinity(Thread *thread, cpulevel_t level,
cpuwhich_t which, id_t id, size_t cpusetsize,
ptr<cpuset> mask);
SysResult sys_cpuset_setaffinity(Thread *thread, cpulevel_t level,
cpuwhich_t which, id_t id, size_t cpusetsize,
ptr<const cpuset> mask);
SysResult sys_faccessat(Thread *thread, sint fd, ptr<char> path, sint mode,
sint flag);
SysResult sys_fchmodat(Thread *thread, sint fd, ptr<char> path, mode_t mode,
sint flag);
SysResult sys_fchownat(Thread *thread, sint fd, ptr<char> path, uid_t uid,
gid_t gid, sint flag);
SysResult sys_fexecve(Thread *thread, sint fd, ptr<ptr<char>> argv,
ptr<ptr<char>> envv);
SysResult sys_fstatat(Thread *thread, sint fd, ptr<char> path,
ptr<struct stat> buf, sint flag);
SysResult sys_futimesat(Thread *thread, sint fd, ptr<char> path,
ptr<struct timeval> times);
SysResult sys_linkat(Thread *thread, sint fd1, ptr<char> path1, sint fd2,
ptr<char> path2, sint flag);
SysResult sys_mkdirat(Thread *thread, sint fd, ptr<char> path, mode_t mode);
SysResult sys_mkfifoat(Thread *thread, sint fd, ptr<char> path, mode_t mode);
SysResult sys_mknodat(Thread *thread, sint fd, ptr<char> path, mode_t mode, dev_t dev);
SysResult sys_openat(Thread *thread, sint fd, ptr<char> path, sint flag, mode_t mode);
SysResult sys_readlinkat(Thread *thread, sint fd, ptr<char> path, ptr<char> buf, size_t bufsize);
SysResult sys_renameat(Thread *thread, sint oldfd, ptr<char> old, sint newfd, ptr<char> new_);
SysResult sys_symlinkat(Thread *thread, ptr<char> path1, sint fd, ptr<char> path2);
SysResult sys_mknodat(Thread *thread, sint fd, ptr<char> path, mode_t mode,
dev_t dev);
SysResult sys_openat(Thread *thread, sint fd, ptr<char> path, sint flag,
mode_t mode);
SysResult sys_readlinkat(Thread *thread, sint fd, ptr<char> path, ptr<char> buf,
size_t bufsize);
SysResult sys_renameat(Thread *thread, sint oldfd, ptr<char> old, sint newfd,
ptr<char> new_);
SysResult sys_symlinkat(Thread *thread, ptr<char> path1, sint fd,
ptr<char> path2);
SysResult sys_unlinkat(Thread *thread, sint fd, ptr<char> path, sint flag);
SysResult sys_posix_openpt(Thread *thread, sint flags);
SysResult sys_gssd_syscall(Thread *thread, ptr<char> path);
SysResult sys_jail_get(Thread *thread, ptr<struct iovec> iovp, uint iovcnt, sint flags);
SysResult sys_jail_set(Thread *thread, ptr<struct iovec> iovp, uint iovcnt, sint flags);
SysResult sys_jail_get(Thread *thread, ptr<struct iovec> iovp, uint iovcnt,
sint flags);
SysResult sys_jail_set(Thread *thread, ptr<struct iovec> iovp, uint iovcnt,
sint flags);
SysResult sys_jail_remove(Thread *thread, sint jid);
SysResult sys_closefrom(Thread *thread, sint lowfd);
SysResult sys___semctl(Thread *thread, sint semid, sint semnum, sint cmd, ptr<union semun> arg);
SysResult sys_msgctl(Thread *thread, sint msqid, sint cmd, ptr<struct msqid_ds> buf);
SysResult sys_shmctl(Thread *thread, sint shmid, sint cmd, ptr<struct shmid_ds> buf);
SysResult sys___semctl(Thread *thread, sint semid, sint semnum, sint cmd,
ptr<union semun> arg);
SysResult sys_msgctl(Thread *thread, sint msqid, sint cmd,
ptr<struct msqid_ds> buf);
SysResult sys_shmctl(Thread *thread, sint shmid, sint cmd,
ptr<struct shmid_ds> buf);
SysResult sys_lpathconf(Thread *thread, ptr<char> path, sint name);
SysResult sys_cap_new(Thread *thread, sint fd, uint64_t rights);
SysResult sys_cap_getrights(Thread *thread, sint fd, ptr<uint64_t> rights);
@ -384,40 +574,62 @@ SysResult sys_cap_getmode(Thread *thread, ptr<uint> modep);
SysResult sys_pdfork(Thread *thread, ptr<sint> fdp, sint flags);
SysResult sys_pdkill(Thread *thread, sint fd, sint signum);
SysResult sys_pdgetpid(Thread *thread, sint fd, ptr<pid_t> pidp);
SysResult sys_pselect(Thread *thread, sint nd, ptr<fd_set> in, ptr<fd_set> ou, ptr<fd_set> ex, ptr<const struct timespec> ts, ptr<const sigset_t> sm);
SysResult sys_pselect(Thread *thread, sint nd, ptr<fd_set> in, ptr<fd_set> ou,
ptr<fd_set> ex, ptr<const struct timespec> ts,
ptr<const sigset_t> sm);
SysResult sys_getloginclass(Thread *thread, ptr<char> namebuf, size_t namelen);
SysResult sys_setloginclass(Thread *thread, ptr<char> namebuf);
SysResult sys_rctl_get_racct(Thread *thread, ptr<const void> inbufp, size_t inbuflen, ptr<void> outbuf, size_t outbuflen);
SysResult sys_rctl_get_rules(Thread *thread, ptr<const void> inbufp, size_t inbuflen, ptr<void> outbuf, size_t outbuflen);
SysResult sys_rctl_get_limits(Thread *thread, ptr<const void> inbufp, size_t inbuflen, ptr<void> outbuf, size_t outbuflen);
SysResult sys_rctl_add_rule(Thread *thread, ptr<const void> inbufp, size_t inbuflen, ptr<void> outbuf, size_t outbuflen);
SysResult sys_rctl_remove_rule(Thread *thread, ptr<const void> inbufp, size_t inbuflen, ptr<void> outbuf, size_t outbuflen);
SysResult sys_rctl_get_racct(Thread *thread, ptr<const void> inbufp,
size_t inbuflen, ptr<void> outbuf,
size_t outbuflen);
SysResult sys_rctl_get_rules(Thread *thread, ptr<const void> inbufp,
size_t inbuflen, ptr<void> outbuf,
size_t outbuflen);
SysResult sys_rctl_get_limits(Thread *thread, ptr<const void> inbufp,
size_t inbuflen, ptr<void> outbuf,
size_t outbuflen);
SysResult sys_rctl_add_rule(Thread *thread, ptr<const void> inbufp,
size_t inbuflen, ptr<void> outbuf,
size_t outbuflen);
SysResult sys_rctl_remove_rule(Thread *thread, ptr<const void> inbufp,
size_t inbuflen, ptr<void> outbuf,
size_t outbuflen);
SysResult sys_posix_fallocate(Thread *thread, sint fd, off_t offset, off_t len);
SysResult sys_posix_fadvise(Thread *thread, sint fd, off_t offset, off_t len, sint advice);
SysResult sys_posix_fadvise(Thread *thread, sint fd, off_t offset, off_t len,
sint advice);
SysResult sys_netcontrol(Thread *thread, sint fd, uint op, ptr<void> buf, uint nbuf);
SysResult sys_netcontrol(Thread *thread, sint fd, uint op, ptr<void> buf,
uint nbuf);
SysResult sys_netabort(Thread *thread /* TODO */);
SysResult sys_netgetsockinfo(Thread *thread /* TODO */);
SysResult sys_socketex(Thread *thread, ptr<const char> name, sint domain, sint type, sint protocol);
SysResult sys_socketex(Thread *thread, ptr<const char> name, sint domain,
sint type, sint protocol);
SysResult sys_socketclose(Thread *thread /* TODO */);
SysResult sys_netgetiflist(Thread *thread /* TODO */);
SysResult sys_kqueueex(Thread *thread /* TODO */);
SysResult sys_mtypeprotect(Thread *thread /* TODO */);
SysResult sys_regmgr_call(Thread *thread, uint32_t op, uint32_t id, ptr<void> result, ptr<void> value, uint64_t type);
SysResult sys_regmgr_call(Thread *thread, uint32_t op, uint32_t id,
ptr<void> result, ptr<void> value, uint64_t type);
SysResult sys_jitshm_create(Thread *thread /* TODO */);
SysResult sys_jitshm_alias(Thread *thread /* TODO */);
SysResult sys_dl_get_list(Thread *thread /* TODO */);
SysResult sys_dl_get_info(Thread *thread /* TODO */);
SysResult sys_dl_notify_event(Thread *thread /* TODO */);
SysResult sys_evf_create(Thread *thread, ptr<char> name, sint attrs, ptr<struct evFlag> evf);
SysResult sys_evf_create(Thread *thread, ptr<char> name, sint attrs,
ptr<struct evFlag> evf);
SysResult sys_evf_delete(Thread *thread, sint id);
SysResult sys_evf_open(Thread *thread, ptr<char> name);
SysResult sys_evf_close(Thread *thread, sint id);
SysResult sys_evf_wait(Thread *thread, sint id, uint64_t patternSet, uint64_t mode, ptr<uint64_t> pPatternSet, ptr<uint> pTimeout);
SysResult sys_evf_trywait(Thread *thread, sint id, uint64_t patternSet, uint64_t mode, ptr<uint64_t> pPatternSet); // FIXME: verify args
SysResult sys_evf_wait(Thread *thread, sint id, uint64_t patternSet,
uint64_t mode, ptr<uint64_t> pPatternSet,
ptr<uint> pTimeout);
SysResult sys_evf_trywait(Thread *thread, sint id, uint64_t patternSet,
uint64_t mode,
ptr<uint64_t> pPatternSet); // FIXME: verify args
SysResult sys_evf_set(Thread *thread, sint id, uint64_t value);
SysResult sys_evf_clear(Thread *thread, sint id, uint64_t value);
SysResult sys_evf_cancel(Thread *thread, sint id, uint64_t value, ptr<sint> pNumWaitThreads);
SysResult sys_evf_cancel(Thread *thread, sint id, uint64_t value,
ptr<sint> pNumWaitThreads);
SysResult sys_query_memory_protection(Thread *thread /* TODO */);
SysResult sys_batch_map(Thread *thread /* TODO */);
SysResult sys_osem_create(Thread *thread /* TODO */);
@ -428,7 +640,8 @@ SysResult sys_osem_wait(Thread *thread /* TODO */);
SysResult sys_osem_trywait(Thread *thread /* TODO */);
SysResult sys_osem_post(Thread *thread /* TODO */);
SysResult sys_osem_cancel(Thread *thread /* TODO */);
SysResult sys_namedobj_create(Thread *thread, ptr<const char> name, ptr<void> object, uint64_t type);
SysResult sys_namedobj_create(Thread *thread, ptr<const char> name,
ptr<void> object, uint64_t type);
SysResult sys_namedobj_delete(Thread *thread /* TODO */);
SysResult sys_set_vm_container(Thread *thread /* TODO */);
SysResult sys_debug_init(Thread *thread /* TODO */);
@ -443,7 +656,8 @@ SysResult sys_budget_create(Thread *thread /* TODO */);
SysResult sys_budget_delete(Thread *thread /* TODO */);
SysResult sys_budget_get(Thread *thread /* TODO */);
SysResult sys_budget_set(Thread *thread /* TODO */);
SysResult sys_virtual_query(Thread *thread, ptr<void> addr, uint64_t unk, ptr<void> info, size_t infosz);
SysResult sys_virtual_query(Thread *thread, ptr<void> addr, uint64_t unk,
ptr<void> info, size_t infosz);
SysResult sys_mdbg_call(Thread *thread /* TODO */);
SysResult sys_obs_sblock_create(Thread *thread /* TODO */);
SysResult sys_obs_sblock_delete(Thread *thread /* TODO */);
@ -459,27 +673,38 @@ SysResult sys_obs_eport_close(Thread *thread /* TODO */);
SysResult sys_is_in_sandbox(Thread *thread /* TODO */);
SysResult sys_dmem_container(Thread *thread);
SysResult sys_get_authinfo(Thread *thread, pid_t pid, ptr<void> info);
SysResult sys_mname(Thread *thread, ptr<void> address, uint64_t length, ptr<const char> name);
SysResult sys_mname(Thread *thread, ptr<void> address, uint64_t length,
ptr<const char> name);
SysResult sys_dynlib_dlopen(Thread *thread /* TODO */);
SysResult sys_dynlib_dlclose(Thread *thread /* TODO */);
SysResult sys_dynlib_dlsym(Thread *thread, SceKernelModule handle, ptr<const char> symbol, ptr<ptr<void>> addrp);
SysResult sys_dynlib_get_list(Thread *thread, ptr<SceKernelModule> pArray, size_t numArray, ptr<size_t> pActualNum);
SysResult sys_dynlib_get_info(Thread *thread, SceKernelModule handle, ptr<ModuleInfo> pInfo);
SysResult sys_dynlib_load_prx(Thread *thread, ptr<const char> name, uint64_t arg1, ptr<ModuleHandle> pHandle, uint64_t arg3);
SysResult sys_dynlib_unload_prx(Thread *thread, SceKernelModule handle /* TODO*/);
SysResult sys_dynlib_dlsym(Thread *thread, SceKernelModule handle,
ptr<const char> symbol, ptr<ptr<void>> addrp);
SysResult sys_dynlib_get_list(Thread *thread, ptr<SceKernelModule> pArray,
size_t numArray, ptr<size_t> pActualNum);
SysResult sys_dynlib_get_info(Thread *thread, SceKernelModule handle,
ptr<ModuleInfo> pInfo);
SysResult sys_dynlib_load_prx(Thread *thread, ptr<const char> name,
uint64_t arg1, ptr<ModuleHandle> pHandle,
uint64_t arg3);
SysResult sys_dynlib_unload_prx(Thread *thread,
SceKernelModule handle /* TODO*/);
SysResult sys_dynlib_do_copy_relocations(Thread *thread);
SysResult sys_dynlib_prepare_dlclose(Thread *thread /* TODO */);
SysResult sys_dynlib_get_proc_param(Thread *thread, ptr<ptr<void>> procParam, ptr<uint64_t> procParamSize);
SysResult sys_dynlib_get_proc_param(Thread *thread, ptr<ptr<void>> procParam,
ptr<uint64_t> procParamSize);
SysResult sys_dynlib_process_needed_and_relocate(Thread *thread);
SysResult sys_sandbox_path(Thread *thread /* TODO */);
SysResult sys_mdbg_service(Thread *thread, uint32_t op, ptr<void> arg0, ptr<void> arg1);
SysResult sys_mdbg_service(Thread *thread, uint32_t op, ptr<void> arg0,
ptr<void> arg1);
SysResult sys_randomized_path(Thread *thread /* TODO */);
SysResult sys_rdup(Thread *thread /* TODO */);
SysResult sys_dl_get_metadata(Thread *thread /* TODO */);
SysResult sys_workaround8849(Thread *thread /* TODO */);
SysResult sys_is_development_mode(Thread *thread /* TODO */);
SysResult sys_get_self_auth_info(Thread *thread /* TODO */);
SysResult sys_dynlib_get_info_ex(Thread *thread, SceKernelModule handle, ptr<struct Unk> unk, ptr<ModuleInfoEx> destModuleInfoEx);
SysResult sys_dynlib_get_info_ex(Thread *thread, SceKernelModule handle,
ptr<struct Unk> unk,
ptr<ModuleInfoEx> destModuleInfoEx);
SysResult sys_budget_getid(Thread *thread);
SysResult sys_budget_get_ptype(Thread *thread, sint budgetId);
SysResult sys_get_paging_stats_of_all_threads(Thread *thread /* TODO */);
@ -493,7 +718,9 @@ SysResult sys_get_paging_stats_of_all_objects(Thread *thread /* TODO */);
SysResult sys_test_debug_rwmem(Thread *thread /* TODO */);
SysResult sys_free_stack(Thread *thread /* TODO */);
SysResult sys_suspend_system(Thread *thread /* TODO */);
SysResult sys_ipmimgr_call(Thread *thread, uint64_t id, uint64_t arg2, ptr<uint64_t> result, ptr<uint64_t> params, uint64_t arg5, uint64_t arg6);
SysResult sys_ipmimgr_call(Thread *thread, uint64_t id, uint64_t arg2,
ptr<uint64_t> result, ptr<uint64_t> params,
uint64_t arg5, uint64_t arg6);
SysResult sys_get_gpo(Thread *thread /* TODO */);
SysResult sys_get_vm_map_timestamp(Thread *thread /* TODO */);
SysResult sys_opmc_set_hw(Thread *thread /* TODO */);
@ -520,7 +747,8 @@ SysResult sys_extend_page_table_pool2(Thread *thread);
SysResult sys_get_kernel_mem_statistics(Thread *thread /* TODO */);
SysResult sys_get_sdk_compiled_version(Thread *thread /* TODO */);
SysResult sys_app_state_change(Thread *thread /* TODO */);
SysResult sys_dynlib_get_obj_member(Thread *thread, SceKernelModule handle, uint64_t index, ptr<ptr<void>> addrp);
SysResult sys_dynlib_get_obj_member(Thread *thread, SceKernelModule handle,
uint64_t index, ptr<ptr<void>> addrp);
SysResult sys_budget_get_ptype_of_budget(Thread *thread /* TODO */);
SysResult sys_prepare_to_resume_process(Thread *thread /* TODO */);
SysResult sys_process_terminate(Thread *thread /* TODO */);

View file

@ -1,10 +1,10 @@
#pragma once
#include "thread/cpuset.hpp" // IWYU pragma: export
#include "thread/Process.hpp" // IWYU pragma: export
#include "thread/ProcessOps.hpp" // IWYU pragma: export
#include "thread/Process.hpp" // IWYU pragma: export
#include "thread/ProcessOps.hpp" // IWYU pragma: export
#include "thread/ProcessState.hpp" // IWYU pragma: export
#include "thread/sysent.hpp" // IWYU pragma: export
#include "thread/Thread.hpp" // IWYU pragma: export
#include "thread/ThreadState.hpp" // IWYU pragma: export
#include "thread/types.hpp" // IWYU pragma: export
#include "thread/Thread.hpp" // IWYU pragma: export
#include "thread/ThreadState.hpp" // IWYU pragma: export
#include "thread/cpuset.hpp" // IWYU pragma: export
#include "thread/sysent.hpp" // IWYU pragma: export
#include "thread/types.hpp" // IWYU pragma: export

View file

@ -1,45 +1,58 @@
#pragma once
#include "../error/SysResult.hpp"
#include "../module/ModuleHandle.hpp"
#include "orbis-config.hpp"
#include "../thread/types.hpp"
#include "orbis-config.hpp"
namespace orbis {
struct Thread;
struct Module;
struct ProcessOps {
SysResult (*mmap)(Thread *thread, caddr_t addr, size_t len, sint prot, sint flags, sint fd, off_t pos);
SysResult (*mmap)(Thread *thread, caddr_t addr, size_t len, sint prot,
sint flags, sint fd, off_t pos);
SysResult (*munmap)(Thread *thread, ptr<void> addr, size_t len);
SysResult (*msync)(Thread *thread, ptr<void> addr, size_t len, sint flags);
SysResult (*mprotect)(Thread *thread, ptr<const void> addr, size_t len, sint prot);
SysResult (*minherit)(Thread *thread, ptr<void> addr, size_t len, sint inherit);
SysResult (*mprotect)(Thread *thread, ptr<const void> addr, size_t len,
sint prot);
SysResult (*minherit)(Thread *thread, ptr<void> addr, size_t len,
sint inherit);
SysResult (*madvise)(Thread *thread, ptr<void> addr, size_t len, sint behav);
SysResult (*mincore)(Thread *thread, ptr<const void> addr, size_t len, ptr<char> vec);
SysResult (*mincore)(Thread *thread, ptr<const void> addr, size_t len,
ptr<char> vec);
SysResult (*mlock)(Thread *thread, ptr<const void> addr, size_t len);
SysResult (*mlockall)(Thread *thread, sint how);
SysResult (*munlockall)(Thread *thread);
SysResult (*munlock)(Thread *thread, ptr<const void> addr, size_t len);
SysResult (*virtual_query)(Thread *thread, ptr<const void> addr, sint flags, ptr<void> info, ulong infoSize);
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);
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 (*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);
SysResult (*dynlib_get_obj_member)(Thread *thread, ModuleHandle handle, uint64_t index, ptr<ptr<void>> addrp);
SysResult (*dynlib_dlsym)(Thread *thread, ModuleHandle handle, ptr<const char> symbol, ptr<ptr<void>> addrp);
SysResult (*dynlib_get_obj_member)(Thread *thread, ModuleHandle handle,
uint64_t index, ptr<ptr<void>> addrp);
SysResult (*dynlib_dlsym)(Thread *thread, ModuleHandle handle,
ptr<const char> symbol, ptr<ptr<void>> addrp);
SysResult (*dynlib_do_copy_relocations)(Thread *thread);
SysResult (*dynlib_load_prx)(Thread *thread, ptr<const char> name, uint64_t arg1, ptr<ModuleHandle> pHandle, uint64_t arg3);
SysResult (*dynlib_load_prx)(Thread *thread, ptr<const char> name,
uint64_t arg1, ptr<ModuleHandle> pHandle,
uint64_t arg3);
SysResult (*dynlib_unload_prx)(Thread *thread, ModuleHandle handle);
SysResult (*thr_create)(Thread *thread, ptr<struct ucontext> ctxt, ptr<slong> arg, sint flags);
SysResult (*thr_create)(Thread *thread, ptr<struct ucontext> ctxt,
ptr<slong> arg, sint flags);
SysResult (*thr_new)(Thread *thread, ptr<thr_param> param, sint param_size);
SysResult (*thr_exit)(Thread *thread, ptr<slong> state);
SysResult (*thr_kill)(Thread *thread, slong id, sint sig);

View file

@ -1,8 +1,8 @@
#pragma once
#include "ThreadState.hpp"
#include "orbis-config.hpp"
#include "types.hpp"
#include "ThreadState.hpp"
#include "../utils/SharedMutex.hpp"
@ -19,10 +19,7 @@ struct Thread {
uint64_t gsBase{};
char name[32];
uint64_t sigMask[4] = {
0x7fff'ffff,
0
};
uint64_t sigMask[4] = {0x7fff'ffff, 0};
lwpid_t tid = -1;
ThreadState state = ThreadState::INACTIVE;

View file

@ -3,5 +3,11 @@
#include <cstdint>
namespace orbis {
enum class ThreadState : std::uint32_t { INACTIVE, INHIBITED, CAN_RUN, RUNQ, RUNNING };
enum class ThreadState : std::uint32_t {
INACTIVE,
INHIBITED,
CAN_RUN,
RUNQ,
RUNNING
};
} // namespace orbis

View file

@ -13,15 +13,19 @@ struct rtprio {
};
struct thr_param {
ptr<void(void *)> start_func;
ptr<void> arg;
ptr<char> stack_base;
size_t stack_size;
ptr<char> tls_base;
size_t tls_size;
ptr<slong> child_tid; // Address to store the new thread identifier, for the child's use
ptr<slong> parent_tid; // Address to store the new thread identifier, for the parent's use
sint flags; // Thread creation flags. The flags member may specify the following flags:
ptr<rtprio> rtp; // Real-time scheduling priority for the new thread. May be NULL to inherit the priority from the creating thread
ptr<void(void *)> start_func;
ptr<void> arg;
ptr<char> stack_base;
size_t stack_size;
ptr<char> tls_base;
size_t tls_size;
ptr<slong> child_tid; // Address to store the new thread identifier, for the
// child's use
ptr<slong> parent_tid; // Address to store the new thread identifier, for the
// parent's use
sint flags; // Thread creation flags. The flags member may specify the
// following flags:
ptr<rtprio> rtp; // Real-time scheduling priority for the new thread. May be
// NULL to inherit the priority from the creating thread
};
} // namespace orbis

View file

@ -1,8 +1,8 @@
#pragma once
#include <atomic>
#include <utility>
#include <functional>
#include <utility>
namespace orbis {
inline namespace utils {

View file

@ -13,8 +13,7 @@ namespace orbis {
inline namespace utils {
template <WithRc T, typename IdT = int, std::size_t MaxId = 4096,
std::size_t MinId = 0>
requires(MaxId > MinId)
class RcIdMap {
requires(MaxId > MinId) class RcIdMap {
static constexpr auto ChunkSize = std::min<std::size_t>(MaxId - MinId, 64);
static constexpr auto ChunkCount =
(MaxId - MinId + ChunkSize - 1) / ChunkSize;
@ -191,8 +190,7 @@ public:
template <typename T, typename IdT = int, std::size_t MaxId = 4096,
std::size_t MinId = 0>
requires(MaxId > MinId)
struct OwningIdMap {
requires(MaxId > MinId) struct OwningIdMap {
static constexpr auto ChunkSize = std::min<std::size_t>(MaxId - MinId, 64);
static constexpr auto ChunkCount =
(MaxId - MinId + ChunkSize - 1) / ChunkSize;
@ -250,8 +248,8 @@ struct OwningIdMap {
BitSet<ChunkCount> fullChunks;
template <typename... ArgsT>
requires(std::is_constructible_v<T, ArgsT...>)
std::pair<IdT, T *> emplace(ArgsT &&...args) {
requires(std::is_constructible_v<T, ArgsT...>) std::pair<IdT, T *> emplace(
ArgsT &&...args) {
auto page = fullChunks.countr_one();
if (page == ChunkCount) {

View file

@ -6,9 +6,9 @@
#include <utility>
namespace orbis {
//template <typename T, typename... Args> T *knew(Args &&...args);
// template <typename T, typename... Args> T *knew(Args &&...args);
inline namespace utils {
void kfree(void* ptr, std::size_t size);
void kfree(void *ptr, std::size_t size);
struct RcBase {
std::atomic<unsigned> references{0};
@ -50,24 +50,23 @@ public:
Ref() = default;
template <typename OT>
requires(std::is_base_of_v<T, OT>)
Ref(OT *ref) : m_ref(ref) {
requires(std::is_base_of_v<T, OT>) Ref(OT *ref) : m_ref(ref) {
if (m_ref != nullptr) {
ref->incRef();
}
}
template <typename OT>
requires(std::is_base_of_v<T, OT>)
Ref(const Ref<OT> &other) : m_ref(other.get()) {
requires(std::is_base_of_v<T, OT>) Ref(const Ref<OT> &other)
: m_ref(other.get()) {
if (m_ref != nullptr) {
m_ref->incRef();
}
}
template <typename OT>
requires(std::is_base_of_v<T, OT>)
Ref(Ref<OT> &&other) : m_ref(other.release()) {}
requires(std::is_base_of_v<T, OT>) Ref(Ref<OT> &&other)
: m_ref(other.release()) {}
Ref(const Ref &other) : m_ref(other.get()) {
if (m_ref != nullptr) {
@ -77,22 +76,19 @@ public:
Ref(Ref &&other) : m_ref(other.release()) {}
template <typename OT>
requires(std::is_base_of_v<T, OT>)
Ref &operator=(Ref<OT> &&other) {
requires(std::is_base_of_v<T, OT>) Ref &operator=(Ref<OT> &&other) {
other.swap(*this);
return *this;
}
template <typename OT>
requires(std::is_base_of_v<T, OT>)
Ref &operator=(OT *other) {
requires(std::is_base_of_v<T, OT>) Ref &operator=(OT *other) {
*this = Ref(other);
return *this;
}
template <typename OT>
requires(std::is_base_of_v<T, OT>)
Ref &operator=(const Ref<OT> &other) {
requires(std::is_base_of_v<T, OT>) Ref &operator=(const Ref<OT> &other) {
*this = Ref(other);
return *this;
}

View file

@ -81,8 +81,7 @@ orbis::ErrorCode orbis::EventFlag::wait(Thread *thread, std::uint8_t waitMode,
return {};
}
orbis::ErrorCode orbis::EventFlag::tryWait(Thread *,
std::uint8_t waitMode,
orbis::ErrorCode orbis::EventFlag::tryWait(Thread *, std::uint8_t waitMode,
std::uint64_t bitPattern,
std::uint64_t *patternSet) {
writer_lock lock(queueMtx);
@ -91,9 +90,8 @@ orbis::ErrorCode orbis::EventFlag::tryWait(Thread *,
return ErrorCode::ACCES;
}
auto waitingThread = WaitingThread{
.bitPattern = bitPattern,
.waitMode = waitMode};
auto waitingThread =
WaitingThread{.bitPattern = bitPattern, .waitMode = waitMode};
if (auto patValue = value.load(std::memory_order::relaxed);
waitingThread.test(patValue)) {
@ -138,7 +136,9 @@ std::size_t orbis::EventFlag::notify(NotifyType type, std::uint64_t bits) {
thread->mtx->unlock(); // release wait on waiter thread
waitingThreadsCount.fetch_sub(1, std::memory_order::relaxed);
std::memmove(thread, thread + 1, (waitingThreads + count - (thread + 1)) * sizeof(*waitingThreads));
std::memmove(thread, thread + 1,
(waitingThreads + count - (thread + 1)) *
sizeof(*waitingThreads));
--count;
return true;
};

View file

@ -131,8 +131,10 @@ static orbis::SysResult doRelocation(orbis::Process *process,
}
}
std::printf("'%s' ('%s') uses undefined symbol '%llx' in '%s' ('%s') module\n",
module->moduleName, module->soName, (unsigned long long)symbol.id, defModule->moduleName, defModule->soName);
std::printf(
"'%s' ('%s') uses undefined symbol '%llx' in '%s' ('%s') module\n",
module->moduleName, module->soName, (unsigned long long)symbol.id,
defModule->moduleName, defModule->soName);
if (foundInLibs.size() > 0) {
std::printf("Requested library is '%s', exists in libraries: [",
library.name.c_str());

View file

@ -1,4 +1,6 @@
#include "sys/sysproto.hpp"
#include "error.hpp"
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_acct(Thread *thread, ptr<char> path) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_acct(Thread *thread, ptr<char> path) {
return ErrorCode::NOSYS;
}

View file

@ -1,11 +1,35 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_audit(Thread *thread, ptr<const void> record, uint length) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_auditon(Thread *thread, sint cmd, ptr<void> data, uint length) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_getauid(Thread *thread, ptr<uid_t> auid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_setauid(Thread *thread, ptr<uid_t> auid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_getaudit(Thread *thread, ptr<struct auditinfo> auditinfo) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_setaudit(Thread *thread, ptr<struct auditinfo> auditinfo) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_getaudit_addr(Thread *thread, ptr<struct auditinfo_addr> auditinfo_addr, uint length) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_setaudit_addr(Thread *thread, ptr<struct auditinfo_addr> auditinfo_addr, uint length) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_auditctl(Thread *thread, ptr<char> path) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_audit(Thread *thread, ptr<const void> record,
uint length) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_auditon(Thread *thread, sint cmd, ptr<void> data,
uint length) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_getauid(Thread *thread, ptr<uid_t> auid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_setauid(Thread *thread, ptr<uid_t> auid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_getaudit(Thread *thread,
ptr<struct auditinfo> auditinfo) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_setaudit(Thread *thread,
ptr<struct auditinfo> auditinfo) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_getaudit_addr(
Thread *thread, ptr<struct auditinfo_addr> auditinfo_addr, uint length) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_setaudit_addr(
Thread *thread, ptr<struct auditinfo_addr> auditinfo_addr, uint length) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_auditctl(Thread *thread, ptr<char> path) {
return ErrorCode::NOSYS;
}

View file

@ -1,6 +1,15 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_cap_enter(Thread *thread) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_cap_getmode(Thread *thread, ptr<uint> modep) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_cap_new(Thread *thread, sint fd, uint64_t rights) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_cap_getrights(Thread *thread, sint fd, ptr<uint64_t> rights) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_cap_enter(Thread *thread) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_cap_getmode(Thread *thread, ptr<uint> modep) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_cap_new(Thread *thread, sint fd, uint64_t rights) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_cap_getrights(Thread *thread, sint fd,
ptr<uint64_t> rights) {
return ErrorCode::NOSYS;
}

View file

@ -1,5 +1,15 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_getcontext(Thread *thread, ptr<struct ucontext> ucp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_setcontext(Thread *thread, ptr<struct ucontext> ucp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_swapcontext(Thread *thread, ptr<struct ucontext> oucp, ptr<struct ucontext> ucp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_getcontext(Thread *thread,
ptr<struct ucontext> ucp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_setcontext(Thread *thread,
ptr<struct ucontext> ucp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_swapcontext(Thread *thread,
ptr<struct ucontext> oucp,
ptr<struct ucontext> ucp) {
return ErrorCode::NOSYS;
}

View file

@ -1,7 +1,26 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_cpuset(Thread *thread, ptr<cpusetid_t> setid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_cpuset_setid(Thread *thread, cpuwhich_t which, id_t id, cpusetid_t setid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_cpuset_getid(Thread *thread, cpulevel_t level, cpuwhich_t which, id_t id, ptr<cpusetid_t> setid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_cpuset_getaffinity(Thread *thread, cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, ptr<cpuset> mask) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_cpuset_setaffinity(Thread *thread, cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, ptr<const cpuset> mask) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_cpuset(Thread *thread, ptr<cpusetid_t> setid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_cpuset_setid(Thread *thread, cpuwhich_t which,
id_t id, cpusetid_t setid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_cpuset_getid(Thread *thread, cpulevel_t level,
cpuwhich_t which, id_t id,
ptr<cpusetid_t> setid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_cpuset_getaffinity(Thread *thread, cpulevel_t level,
cpuwhich_t which, id_t id,
size_t cpusetsize,
ptr<cpuset> mask) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_cpuset_setaffinity(Thread *thread, cpulevel_t level,
cpuwhich_t which, id_t id,
size_t cpusetsize,
ptr<const cpuset> mask) {
return ErrorCode::NOSYS;
}

View file

@ -1,9 +1,18 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_getdtablesize(Thread *thread) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_dup2(Thread *thread, uint from, uint to) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_dup(Thread *thread, uint fd) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_fcntl(Thread *thread, sint fd, sint cmd, slong arg) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_getdtablesize(Thread *thread) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_dup2(Thread *thread, uint from, uint to) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_dup(Thread *thread, uint fd) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_fcntl(Thread *thread, sint fd, sint cmd,
slong arg) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_close(Thread *thread, sint fd) {
if (auto close = thread->tproc->ops->close) {
return close(thread, fd);
@ -11,8 +20,20 @@ orbis::SysResult orbis::sys_close(Thread *thread, sint fd) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_closefrom(Thread *thread, sint lowfd) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_fstat(Thread *thread, sint fd, ptr<struct stat> ub) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_nfstat(Thread *thread, sint fd, ptr<struct nstat> sb) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_fpathconf(Thread *thread, sint fd, sint name) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_flock(Thread *thread, sint fd, sint how) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_closefrom(Thread *thread, sint lowfd) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_fstat(Thread *thread, sint fd,
ptr<struct stat> ub) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_nfstat(Thread *thread, sint fd,
ptr<struct nstat> sb) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_fpathconf(Thread *thread, sint fd, sint name) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_flock(Thread *thread, sint fd, sint how) {
return ErrorCode::NOSYS;
}

View file

@ -1,3 +1,7 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_kenv(Thread *thread, sint what, ptr<const char> name, ptr<char> value, sint len) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_kenv(Thread *thread, sint what,
ptr<const char> name, ptr<char> value,
sint len) {
return ErrorCode::NOSYS;
}

View file

@ -1,9 +1,10 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_kqueue(Thread *thread) {
return {};
}
orbis::SysResult orbis::sys_kqueue(Thread *thread) { return {}; }
orbis::SysResult orbis::sys_kevent(Thread *thread, sint fd, ptr<struct kevent> changelist, sint nchanges, ptr<struct kevent> eventlist, sint nevents, ptr<const struct timespec> timeout) {
orbis::SysResult orbis::sys_kevent(Thread *thread, sint fd,
ptr<struct kevent> changelist, sint nchanges,
ptr<struct kevent> eventlist, sint nevents,
ptr<const struct timespec> timeout) {
return {};
}

View file

@ -1,5 +1,16 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_execve(Thread *thread, ptr<char> fname, ptr<ptr<char>> argv, ptr<ptr<char>> envv) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_fexecve(Thread *thread, sint fd, ptr<ptr<char>> argv, ptr<ptr<char>> envv) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys___mac_execve(Thread *thread, ptr<char> fname, ptr<ptr<char>> argv, ptr<ptr<char>> envv, ptr<struct mac> mac_p) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_execve(Thread *thread, ptr<char> fname,
ptr<ptr<char>> argv, ptr<ptr<char>> envv) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_fexecve(Thread *thread, sint fd,
ptr<ptr<char>> argv, ptr<ptr<char>> envv) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys___mac_execve(Thread *thread, ptr<char> fname,
ptr<ptr<char>> argv,
ptr<ptr<char>> envv,
ptr<struct mac> mac_p) {
return ErrorCode::NOSYS;
}

View file

@ -7,7 +7,11 @@ orbis::SysResult orbis::sys_exit(Thread *thread, sint status) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_abort2(Thread *thread, ptr<const char> why, sint narg, ptr<ptr<void>> args) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_wait4(Thread *thread, sint pid, ptr<sint> status, sint options, ptr<struct rusage> rusage) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_abort2(Thread *thread, ptr<const char> why,
sint narg, ptr<ptr<void>> args) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_wait4(Thread *thread, sint pid, ptr<sint> status,
sint options, ptr<struct rusage> rusage) {
return ErrorCode::NOSYS;
}

View file

@ -1,6 +1,10 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_fork(Thread *thread) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_pdfork(Thread *thread, ptr<sint> fdp, sint flags) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_pdfork(Thread *thread, ptr<sint> fdp, sint flags) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_vfork(Thread *thread) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_rfork(Thread *thread, sint flags) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_rfork(Thread *thread, sint flags) {
return ErrorCode::NOSYS;
}

View file

@ -1,64 +1,111 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_read(Thread *thread, sint fd, ptr<void> buf, size_t nbyte) {
orbis::SysResult orbis::sys_read(Thread *thread, sint fd, ptr<void> buf,
size_t nbyte) {
if (auto read = thread->tproc->ops->read) {
return read(thread, fd, buf, nbyte);
}
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_pread(Thread *thread, sint fd, ptr<void> buf, size_t nbyte, off_t offset) {
orbis::SysResult orbis::sys_pread(Thread *thread, sint fd, ptr<void> buf,
size_t nbyte, off_t offset) {
if (auto pread = thread->tproc->ops->pread) {
return pread(thread, fd, buf, nbyte, offset);
}
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_freebsd6_pread(Thread *thread, sint fd, ptr<void> buf, size_t nbyte, sint, off_t offset) {
orbis::SysResult orbis::sys_freebsd6_pread(Thread *thread, sint fd,
ptr<void> buf, size_t nbyte, sint,
off_t offset) {
return sys_pread(thread, fd, buf, nbyte, offset);
}
orbis::SysResult orbis::sys_readv(Thread *thread, sint fd, ptr<struct iovec> iovp, uint iovcnt) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_preadv(Thread *thread, sint fd, ptr<struct iovec> iovp, uint iovcnt, off_t offset) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_write(Thread *thread, sint fd, ptr<const void> buf, size_t nbyte) {
orbis::SysResult orbis::sys_readv(Thread *thread, sint fd,
ptr<struct iovec> iovp, uint iovcnt) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_preadv(Thread *thread, sint fd,
ptr<struct iovec> iovp, uint iovcnt,
off_t offset) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_write(Thread *thread, sint fd, ptr<const void> buf,
size_t nbyte) {
if (auto write = thread->tproc->ops->write) {
return write(thread, fd, buf, nbyte);
}
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_pwrite(Thread *thread, sint fd, ptr<const void> buf, size_t nbyte, off_t offset) {
orbis::SysResult orbis::sys_pwrite(Thread *thread, sint fd, ptr<const void> buf,
size_t nbyte, off_t offset) {
if (auto pwrite = thread->tproc->ops->pwrite) {
return pwrite(thread, fd, buf, nbyte, offset);
}
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_freebsd6_pwrite(Thread *thread, sint fd, ptr<const void> buf, size_t nbyte, sint, off_t offset) {
orbis::SysResult orbis::sys_freebsd6_pwrite(Thread *thread, sint fd,
ptr<const void> buf, size_t nbyte,
sint, off_t offset) {
return sys_pwrite(thread, fd, buf, nbyte, offset);
}
orbis::SysResult orbis::sys_writev(Thread *thread, sint fd, ptr<struct iovec> iovp, uint iovcnt) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_pwritev(Thread *thread, sint fd, ptr<struct iovec> iovp, uint iovcnt, off_t offset) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_writev(Thread *thread, sint fd,
ptr<struct iovec> iovp, uint iovcnt) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_pwritev(Thread *thread, sint fd,
ptr<struct iovec> iovp, uint iovcnt,
off_t offset) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_ftruncate(Thread *thread, sint fd, off_t length) {
if (auto ftruncate = thread->tproc->ops->ftruncate) {
return ftruncate(thread, fd, length);
}
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_freebsd6_ftruncate(Thread *thread, sint fd, sint, off_t length) {
orbis::SysResult orbis::sys_freebsd6_ftruncate(Thread *thread, sint fd, sint,
off_t length) {
return sys_ftruncate(thread, fd, length);
}
orbis::SysResult orbis::sys_ioctl(Thread *thread, sint fd, ulong com, caddr_t data) {
orbis::SysResult orbis::sys_ioctl(Thread *thread, sint fd, ulong com,
caddr_t data) {
if (auto ioctl = thread->tproc->ops->ioctl) {
return ioctl(thread, fd, com, data);
}
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_pselect(Thread *thread, sint nd, ptr<fd_set> in, ptr<fd_set> ou, ptr<fd_set> ex, ptr<const struct timespec> ts, ptr<const sigset_t> sm) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_select(Thread *thread, sint nd, ptr<struct fd_set_t> in, ptr<struct fd_set_t> out, ptr<struct fd_set_t> ex, ptr<struct timeval> tv) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_poll(Thread *thread, ptr<struct pollfd> fds, uint nfds, sint timeout) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_openbsd_poll(Thread *thread, ptr<struct pollfd> fds, uint nfds, sint timeout) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_pselect(Thread *thread, sint nd, ptr<fd_set> in,
ptr<fd_set> ou, ptr<fd_set> ex,
ptr<const struct timespec> ts,
ptr<const sigset_t> sm) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_select(Thread *thread, sint nd,
ptr<struct fd_set_t> in,
ptr<struct fd_set_t> out,
ptr<struct fd_set_t> ex,
ptr<struct timeval> tv) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_poll(Thread *thread, ptr<struct pollfd> fds,
uint nfds, sint timeout) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_openbsd_poll(Thread *thread, ptr<struct pollfd> fds,
uint nfds, sint timeout) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_nlm_syscall(Thread *thread, sint debug_level, sint grace_period, sint addr_count, ptr<ptr<char>> addrs) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_nfssvc(Thread *thread, sint flag, caddr_t argp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_nlm_syscall(Thread *thread, sint debug_level,
sint grace_period, sint addr_count,
ptr<ptr<char>> addrs) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_nfssvc(Thread *thread, sint flag, caddr_t argp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_sysarch(Thread *thread, sint op, ptr<char> parms) {
if (op == 129) {
auto fs = uread((ptr<uint64_t>)parms);
@ -70,6 +117,18 @@ orbis::SysResult orbis::sys_sysarch(Thread *thread, sint op, ptr<char> parms) {
std::printf("sys_sysarch(op = %d, parms = %p): unknown op\n", op, parms);
return {};
}
orbis::SysResult orbis::sys_nnpfs_syscall(Thread *thread, sint operation, ptr<char> a_pathP, sint opcode, ptr<void> a_paramsP, sint a_followSymlinks) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_afs3_syscall(Thread *thread, slong syscall, slong param1, slong param2, slong param3, slong param4, slong param5, slong param6) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_gssd_syscall(Thread *thread, ptr<char> path) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_nnpfs_syscall(Thread *thread, sint operation,
ptr<char> a_pathP, sint opcode,
ptr<void> a_paramsP,
sint a_followSymlinks) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_afs3_syscall(Thread *thread, slong syscall,
slong param1, slong param2,
slong param3, slong param4,
slong param5, slong param6) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_gssd_syscall(Thread *thread, ptr<char> path) {
return ErrorCode::NOSYS;
}

View file

@ -1,7 +1,19 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_jail(Thread *thread, ptr<struct jail> jail) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_jail_set(Thread *thread, ptr<struct iovec> iovp, uint iovcnt, sint flags) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_jail_get(Thread *thread, ptr<struct iovec> iovp, uint iovcnt, sint flags) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_jail_remove(Thread *thread, sint jid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_jail_attach(Thread *thread, sint jid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_jail(Thread *thread, ptr<struct jail> jail) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_jail_set(Thread *thread, ptr<struct iovec> iovp,
uint iovcnt, sint flags) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_jail_get(Thread *thread, ptr<struct iovec> iovp,
uint iovcnt, sint flags) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_jail_remove(Thread *thread, sint jid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_jail_attach(Thread *thread, sint jid) {
return ErrorCode::NOSYS;
}

View file

@ -1,4 +1,10 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_ktrace(Thread *thread, ptr<const char> fname, sint ops, sint facs, sint pit) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_utrace(Thread *thread, ptr<const void> addr, size_t len) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_ktrace(Thread *thread, ptr<const char> fname,
sint ops, sint facs, sint pit) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_utrace(Thread *thread, ptr<const void> addr,
size_t len) {
return ErrorCode::NOSYS;
}

View file

@ -1,10 +1,29 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_kldload(Thread *thread, ptr<const char> file) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_kldunload(Thread *thread, sint fileid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_kldunloadf(Thread *thread, slong fileid, sint flags) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_kldfind(Thread *thread, ptr<const char> name) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_kldnext(Thread *thread, sint fileid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_kldstat(Thread *thread, sint fileid, ptr<struct kld_file_stat> stat) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_kldfirstmod(Thread *thread, sint fileid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_kldsym(Thread *thread, sint fileid, sint cmd, ptr<void> data) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_kldload(Thread *thread, ptr<const char> file) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_kldunload(Thread *thread, sint fileid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_kldunloadf(Thread *thread, slong fileid,
sint flags) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_kldfind(Thread *thread, ptr<const char> name) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_kldnext(Thread *thread, sint fileid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_kldstat(Thread *thread, sint fileid,
ptr<struct kld_file_stat> stat) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_kldfirstmod(Thread *thread, sint fileid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_kldsym(Thread *thread, sint fileid, sint cmd,
ptr<void> data) {
return ErrorCode::NOSYS;
}

View file

@ -1,4 +1,9 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_getloginclass(Thread *thread, ptr<char> namebuf, size_t namelen) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_setloginclass(Thread *thread, ptr<char> namebuf) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_getloginclass(Thread *thread, ptr<char> namebuf,
size_t namelen) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_setloginclass(Thread *thread, ptr<char> namebuf) {
return ErrorCode::NOSYS;
}

View file

@ -1,12 +1,44 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys___mac_get_pid(Thread *thread, pid_t pid, ptr<struct mac> mac_p) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys___mac_get_proc(Thread *thread, ptr<struct mac> mac_p) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys___mac_set_proc(Thread *thread, ptr<struct mac> mac_p) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys___mac_get_fd(Thread *thread, sint fd, ptr<struct mac> mac_p) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys___mac_get_file(Thread *thread, ptr<const char> path, ptr<struct mac> mac_p) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys___mac_set_fd(Thread *thread, sint fd, ptr<struct mac> mac_p) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys___mac_set_file(Thread *thread, ptr<const char> path, ptr<struct mac> mac_p) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys___mac_get_link(Thread *thread, ptr<const char> path_p, ptr<struct mac> mac_p) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys___mac_set_link(Thread *thread, ptr<const char> path_p, ptr<struct mac> mac_p) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_mac_syscall(Thread *thread, ptr<const char> policy, sint call, ptr<void> arg) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys___mac_get_pid(Thread *thread, pid_t pid,
ptr<struct mac> mac_p) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys___mac_get_proc(Thread *thread,
ptr<struct mac> mac_p) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys___mac_set_proc(Thread *thread,
ptr<struct mac> mac_p) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys___mac_get_fd(Thread *thread, sint fd,
ptr<struct mac> mac_p) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys___mac_get_file(Thread *thread, ptr<const char> path,
ptr<struct mac> mac_p) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys___mac_set_fd(Thread *thread, sint fd,
ptr<struct mac> mac_p) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys___mac_set_file(Thread *thread, ptr<const char> path,
ptr<struct mac> mac_p) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys___mac_get_link(Thread *thread,
ptr<const char> path_p,
ptr<struct mac> mac_p) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys___mac_set_link(Thread *thread,
ptr<const char> path_p,
ptr<struct mac> mac_p) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_mac_syscall(Thread *thread, ptr<const char> policy,
sint call, ptr<void> arg) {
return ErrorCode::NOSYS;
}

View file

@ -1,6 +1,15 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_modnext(Thread *thread, sint modid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_modfnext(Thread *thread, sint modid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_modstat(Thread *thread, sint modid, ptr<struct module_stat> stat) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_modfind(Thread *thread, ptr<const char> name) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_modnext(Thread *thread, sint modid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_modfnext(Thread *thread, sint modid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_modstat(Thread *thread, sint modid,
ptr<struct module_stat> stat) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_modfind(Thread *thread, ptr<const char> name) {
return ErrorCode::NOSYS;
}

View file

@ -1,7 +1,22 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_msgctl(Thread *thread, sint msqid, sint cmd, ptr<struct msqid_ds> buf) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_msgget(Thread *thread, key_t key, sint msgflg) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_msgsnd(Thread *thread, sint msqid, ptr<const void> msgp, size_t msgsz, sint msgflg) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_msgrcv(Thread *thread, sint msqid, ptr<void> msgp, size_t msgsz, slong msgtyp, sint msgflg) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_msgsys(Thread *thread, sint which, sint a2, sint a3, sint a4, sint a5, sint a6) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_msgctl(Thread *thread, sint msqid, sint cmd,
ptr<struct msqid_ds> buf) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_msgget(Thread *thread, key_t key, sint msgflg) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_msgsnd(Thread *thread, sint msqid,
ptr<const void> msgp, size_t msgsz,
sint msgflg) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_msgrcv(Thread *thread, sint msqid, ptr<void> msgp,
size_t msgsz, slong msgtyp, sint msgflg) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_msgsys(Thread *thread, sint which, sint a2, sint a3,
sint a4, sint a5, sint a6) {
return ErrorCode::NOSYS;
}

View file

@ -1,5 +1,13 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_ntp_gettime(Thread *thread, ptr<struct ntptimeval> ntvp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_ntp_adjtime(Thread *thread, ptr<struct timex> tp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_adjtime(Thread *thread, ptr<struct timeval> delta, ptr<struct timeval> olddelta) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_ntp_gettime(Thread *thread,
ptr<struct ntptimeval> ntvp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_ntp_adjtime(Thread *thread, ptr<struct timex> tp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_adjtime(Thread *thread, ptr<struct timeval> delta,
ptr<struct timeval> olddelta) {
return ErrorCode::NOSYS;
}

View file

@ -1,10 +1,35 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_sched_setparam(Thread *thread, pid_t pid, ptr<const struct sched_param> param) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_sched_getparam(Thread *thread, pid_t pid, ptr<struct sched_param> param) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_sched_setscheduler(Thread *thread, pid_t pid, sint policy, ptr<const struct sched_param> param) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_sched_getscheduler(Thread *thread, pid_t pid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_sched_yield(Thread *thread) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_sched_get_priority_max(Thread *thread, sint policy) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_sched_get_priority_min(Thread *thread, sint policy) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_sched_rr_get_interval(Thread *thread, pid_t pid, ptr<struct timespec> interval) { return ErrorCode::NOSYS; }
orbis::SysResult
orbis::sys_sched_setparam(Thread *thread, pid_t pid,
ptr<const struct sched_param> param) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_sched_getparam(Thread *thread, pid_t pid,
ptr<struct sched_param> param) {
return ErrorCode::NOSYS;
}
orbis::SysResult
orbis::sys_sched_setscheduler(Thread *thread, pid_t pid, sint policy,
ptr<const struct sched_param> param) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_sched_getscheduler(Thread *thread, pid_t pid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_sched_yield(Thread *thread) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_sched_get_priority_max(Thread *thread,
sint policy) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_sched_get_priority_min(Thread *thread,
sint policy) {
return ErrorCode::NOSYS;
}
orbis::SysResult
orbis::sys_sched_rr_get_interval(Thread *thread, pid_t pid,
ptr<struct timespec> interval) {
return ErrorCode::NOSYS;
}

View file

@ -1,3 +1,5 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_pdgetpid(Thread *thread, sint fd, ptr<pid_t> pidp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_pdgetpid(Thread *thread, sint fd, ptr<pid_t> pidp) {
return ErrorCode::NOSYS;
}

View file

@ -1,3 +1,6 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_ptrace(Thread *thread, sint req, pid_t pid, caddr_t addr, sint data) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_ptrace(Thread *thread, sint req, pid_t pid,
caddr_t addr, sint data) {
return ErrorCode::NOSYS;
}

View file

@ -6,27 +6,72 @@ orbis::SysResult orbis::sys_getpid(Thread *thread) {
}
orbis::SysResult orbis::sys_getppid(Thread *thread) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_getpgrp(Thread *thread) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_getpgid(Thread *thread, pid_t pid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_getsid(Thread *thread, pid_t pid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_getpgid(Thread *thread, pid_t pid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_getsid(Thread *thread, pid_t pid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_getuid(Thread *thread) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_geteuid(Thread *thread) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_getgid(Thread *thread) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_getegid(Thread *thread) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_getgroups(Thread *thread, uint gidsetsize, ptr<gid_t> gidset) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_getgroups(Thread *thread, uint gidsetsize,
ptr<gid_t> gidset) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_setsid(Thread *thread) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_setpgid(Thread *thread, sint pid, sint pgid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_setuid(Thread *thread, uid_t uid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_seteuid(Thread *thread, uid_t euid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_setgid(Thread *thread, gid_t gid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_setegid(Thread *thread, gid_t egid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_setgroups(Thread *thread, uint gidsetsize, ptr<gid_t> gidset) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_setreuid(Thread *thread, sint ruid, sint euid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_setregid(Thread *thread, sint rgid, sint egid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_setresuid(Thread *thread, uid_t ruid, uid_t euid, uid_t suid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_setresgid(Thread *thread, gid_t rgid, gid_t egid, gid_t sgid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_getresuid(Thread *thread, ptr<uid_t> ruid, ptr<uid_t> euid, ptr<uid_t> suid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_getresgid(Thread *thread, ptr<gid_t> rgid, ptr<gid_t> egid, ptr<gid_t> sgid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_issetugid(Thread *thread) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys___setugid(Thread *thread, sint flags) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_getlogin(Thread *thread, ptr<char> namebuf, uint namelen) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_setlogin(Thread *thread, ptr<char> namebuf) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_setpgid(Thread *thread, sint pid, sint pgid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_setuid(Thread *thread, uid_t uid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_seteuid(Thread *thread, uid_t euid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_setgid(Thread *thread, gid_t gid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_setegid(Thread *thread, gid_t egid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_setgroups(Thread *thread, uint gidsetsize,
ptr<gid_t> gidset) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_setreuid(Thread *thread, sint ruid, sint euid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_setregid(Thread *thread, sint rgid, sint egid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_setresuid(Thread *thread, uid_t ruid, uid_t euid,
uid_t suid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_setresgid(Thread *thread, gid_t rgid, gid_t egid,
gid_t sgid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_getresuid(Thread *thread, ptr<uid_t> ruid,
ptr<uid_t> euid, ptr<uid_t> suid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_getresgid(Thread *thread, ptr<gid_t> rgid,
ptr<gid_t> egid, ptr<gid_t> sgid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_issetugid(Thread *thread) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys___setugid(Thread *thread, sint flags) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_getlogin(Thread *thread, ptr<char> namebuf,
uint namelen) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_setlogin(Thread *thread, ptr<char> namebuf) {
return ErrorCode::NOSYS;
}

View file

@ -1,3 +1,5 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_posix_openpt(Thread *thread, sint flags) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_posix_openpt(Thread *thread, sint flags) {
return ErrorCode::NOSYS;
}

View file

@ -1,7 +1,32 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_rctl_get_racct(Thread *thread, ptr<const void> inbufp, size_t inbuflen, ptr<void> outbuf, size_t outbuflen) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_rctl_get_rules(Thread *thread, ptr<const void> inbufp, size_t inbuflen, ptr<void> outbuf, size_t outbuflen) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_rctl_get_limits(Thread *thread, ptr<const void> inbufp, size_t inbuflen, ptr<void> outbuf, size_t outbuflen) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_rctl_add_rule(Thread *thread, ptr<const void> inbufp, size_t inbuflen, ptr<void> outbuf, size_t outbuflen) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_rctl_remove_rule(Thread *thread, ptr<const void> inbufp, size_t inbuflen, ptr<void> outbuf, size_t outbuflen) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_rctl_get_racct(Thread *thread,
ptr<const void> inbufp,
size_t inbuflen, ptr<void> outbuf,
size_t outbuflen) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_rctl_get_rules(Thread *thread,
ptr<const void> inbufp,
size_t inbuflen, ptr<void> outbuf,
size_t outbuflen) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_rctl_get_limits(Thread *thread,
ptr<const void> inbufp,
size_t inbuflen, ptr<void> outbuf,
size_t outbuflen) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_rctl_add_rule(Thread *thread,
ptr<const void> inbufp,
size_t inbuflen, ptr<void> outbuf,
size_t outbuflen) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_rctl_remove_rule(Thread *thread,
ptr<const void> inbufp,
size_t inbuflen, ptr<void> outbuf,
size_t outbuflen) {
return ErrorCode::NOSYS;
}

View file

@ -1,12 +1,31 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_getpriority(Thread *thread, sint which, sint who) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_setpriority(Thread *thread, sint which, sint who, sint prio) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_rtprio_thread(Thread *thread, sint function, lwpid_t lwpid, ptr<struct rtprio> rtp) {
orbis::SysResult orbis::sys_getpriority(Thread *thread, sint which, sint who) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_setpriority(Thread *thread, sint which, sint who,
sint prio) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_rtprio_thread(Thread *thread, sint function,
lwpid_t lwpid,
ptr<struct rtprio> rtp) {
std::printf("sys_rtprio_thread: unimplemented\n");
return {};
}
orbis::SysResult orbis::sys_rtprio(Thread *thread, sint function, pid_t pid, ptr<struct rtprio> rtp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_setrlimit(Thread *thread, uint which, ptr<struct rlimit> rlp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_getrlimit(Thread *thread, uint which, ptr<struct rlimit> rlp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_getrusage(Thread *thread, sint who, ptr<struct rusage> rusage) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_rtprio(Thread *thread, sint function, pid_t pid,
ptr<struct rtprio> rtp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_setrlimit(Thread *thread, uint which,
ptr<struct rlimit> rlp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_getrlimit(Thread *thread, uint which,
ptr<struct rlimit> rlp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_getrusage(Thread *thread, sint who,
ptr<struct rusage> rusage) {
return ErrorCode::NOSYS;
}

View file

@ -1,3 +1,5 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_setfib(Thread *thread, sint fib) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_setfib(Thread *thread, sint fib) {
return ErrorCode::NOSYS;
}

View file

@ -127,7 +127,7 @@ orbis::SysResult orbis::sys_evf_delete(Thread *thread, sint id) {
return ErrorCode::SRCH;
}
// TODO: do destroy and remove atomically
// TODO: do destroy and remove atomically
evf->destroy();
thread->tproc->evfMap.remove(id);
@ -163,7 +163,7 @@ orbis::SysResult orbis::sys_evf_wait(Thread *thread, sint id,
ptr<uint> pTimeout) {
if ((mode & (kEvfWaitModeAnd | kEvfWaitModeOr)) == 0 ||
(mode & ~(kEvfWaitModeAnd | kEvfWaitModeOr | kEvfWaitModeClearAll |
kEvfWaitModeClearPat)) != 0 ||
kEvfWaitModeClearPat)) != 0 ||
patternSet == 0) {
return ErrorCode::INVAL;
}
@ -195,7 +195,7 @@ orbis::SysResult orbis::sys_evf_trywait(Thread *thread, sint id,
ptr<uint64_t> pPatternSet) {
if ((mode & (kEvfWaitModeAnd | kEvfWaitModeOr)) == 0 ||
(mode & ~(kEvfWaitModeAnd | kEvfWaitModeOr | kEvfWaitModeClearAll |
kEvfWaitModeClearPat)) != 0 ||
kEvfWaitModeClearPat)) != 0 ||
patternSet == 0) {
return ErrorCode::INVAL;
}
@ -207,7 +207,8 @@ orbis::SysResult orbis::sys_evf_trywait(Thread *thread, sint id,
}
std::uint64_t resultPattern{};
auto result = evf->tryWait(thread, mode, patternSet, pPatternSet != nullptr ? &resultPattern : nullptr);
auto result = evf->tryWait(thread, mode, patternSet,
pPatternSet != nullptr ? &resultPattern : nullptr);
if (pPatternSet != nullptr) {
uwrite(pPatternSet, (uint64_t)resultPattern);
@ -223,7 +224,7 @@ orbis::SysResult orbis::sys_evf_set(Thread *thread, sint id, uint64_t value) {
}
evf->set(value);
return{};
return {};
}
orbis::SysResult orbis::sys_evf_clear(Thread *thread, sint id, uint64_t value) {
Ref<EventFlag> evf = thread->tproc->evfMap.get(id);
@ -233,9 +234,10 @@ orbis::SysResult orbis::sys_evf_clear(Thread *thread, sint id, uint64_t value) {
}
evf->clear(value);
return{};
return {};
}
orbis::SysResult orbis::sys_evf_cancel(Thread *thread, sint id, uint64_t value, ptr<sint> pNumWaitThreads) {
orbis::SysResult orbis::sys_evf_cancel(Thread *thread, sint id, uint64_t value,
ptr<sint> pNumWaitThreads) {
Ref<EventFlag> evf = thread->tproc->evfMap.get(id);
if (evf == nullptr) {
@ -246,7 +248,7 @@ orbis::SysResult orbis::sys_evf_cancel(Thread *thread, sint id, uint64_t value,
if (pNumWaitThreads != nullptr) {
*pNumWaitThreads = numWaitThreads;
}
return{};
return {};
}
orbis::SysResult orbis::sys_query_memory_protection(Thread *thread /* TODO */) {
return ErrorCode::NOSYS;

View file

@ -1,6 +1,18 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys___semctl(Thread *thread, sint semid, sint semnum, sint cmd, ptr<union semun> arg) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_semget(Thread *thread, key_t key, sint nsems, sint semflg) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_semop(Thread *thread, sint semid, ptr<struct sembuf> sops, size_t nspos) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_semsys(Thread *thread, sint which, sint a2, sint a3, sint a4, sint a5) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys___semctl(Thread *thread, sint semid, sint semnum,
sint cmd, ptr<union semun> arg) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_semget(Thread *thread, key_t key, sint nsems,
sint semflg) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_semop(Thread *thread, sint semid,
ptr<struct sembuf> sops, size_t nspos) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_semsys(Thread *thread, sint which, sint a2, sint a3,
sint a4, sint a5) {
return ErrorCode::NOSYS;
}

View file

@ -1,7 +1,21 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_shmdt(Thread *thread, ptr<const void> shmaddr) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_shmat(Thread *thread, sint shmid, ptr<const void> shmaddr, sint shmflg) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_shmctl(Thread *thread, sint shmid, sint cmd, ptr<struct shmid_ds> buf) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_shmget(Thread *thread, key_t key, size_t size, sint shmflg) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_shmsys(Thread *thread, sint which, sint a2, sint a3, sint a4) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_shmdt(Thread *thread, ptr<const void> shmaddr) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_shmat(Thread *thread, sint shmid,
ptr<const void> shmaddr, sint shmflg) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_shmctl(Thread *thread, sint shmid, sint cmd,
ptr<struct shmid_ds> buf) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_shmget(Thread *thread, key_t key, size_t size,
sint shmflg) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_shmsys(Thread *thread, sint which, sint a2, sint a3,
sint a4) {
return ErrorCode::NOSYS;
}

View file

@ -1,3 +1,5 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_reboot(Thread *thread, sint opt) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_reboot(Thread *thread, sint opt) {
return ErrorCode::NOSYS;
}

View file

@ -1,7 +1,12 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_sigaction(Thread *thread, sint sig, ptr<struct sigaction> act, ptr<struct sigaction> oact) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_sigprocmask(Thread *thread, sint how, ptr<uint64_t> set, ptr<uint64_t> oset) {
orbis::SysResult orbis::sys_sigaction(Thread *thread, sint sig,
ptr<struct sigaction> act,
ptr<struct sigaction> oact) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_sigprocmask(Thread *thread, sint how,
ptr<uint64_t> set, ptr<uint64_t> oset) {
if (oset) {
for (std::size_t i = 0; i < 2; ++i) {
oset[i] = thread->sigMask[i];
@ -31,14 +36,45 @@ orbis::SysResult orbis::sys_sigprocmask(Thread *thread, sint how, ptr<uint64_t>
}
return {};
}
orbis::SysResult orbis::sys_sigwait(Thread *thread, ptr<const struct sigset> set, ptr<sint> sig) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_sigtimedwait(Thread *thread, ptr<const struct sigset> set, ptr<struct siginfo> info, ptr<const struct timespec> timeout) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_sigwaitinfo(Thread *thread, ptr<const struct sigset> set, ptr<struct siginfo> info) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_sigpending(Thread *thread, ptr<struct sigset> set) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_sigsuspend(Thread *thread, ptr<const struct sigset> set) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_sigaltstack(Thread *thread, ptr<struct stack_t> ss, ptr<struct stack_t> oss) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_kill(Thread *thread, sint pid, sint signum) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_pdkill(Thread *thread, sint fd, sint signum) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_sigqueue(Thread *thread, pid_t pid, sint signum, ptr<void> value) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_sigreturn(Thread *thread, ptr<struct ucontext> sigcntxp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_sigwait(Thread *thread,
ptr<const struct sigset> set,
ptr<sint> sig) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_sigtimedwait(Thread *thread,
ptr<const struct sigset> set,
ptr<struct siginfo> info,
ptr<const struct timespec> timeout) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_sigwaitinfo(Thread *thread,
ptr<const struct sigset> set,
ptr<struct siginfo> info) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_sigpending(Thread *thread, ptr<struct sigset> set) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_sigsuspend(Thread *thread,
ptr<const struct sigset> set) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_sigaltstack(Thread *thread, ptr<struct stack_t> ss,
ptr<struct stack_t> oss) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_kill(Thread *thread, sint pid, sint signum) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_pdkill(Thread *thread, sint fd, sint signum) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_sigqueue(Thread *thread, pid_t pid, sint signum,
ptr<void> value) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_sigreturn(Thread *thread,
ptr<struct ucontext> sigcntxp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::nosys(Thread *thread) { return ErrorCode::NOSYS; }

View file

@ -1,3 +1,6 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_profil(Thread *thread, caddr_t samples, size_t size, size_t offset, uint scale) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_profil(Thread *thread, caddr_t samples, size_t size,
size_t offset, uint scale) {
return ErrorCode::NOSYS;
}

View file

@ -1,4 +1,8 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_swapon(Thread *thread, ptr<char> name) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_swapoff(Thread *thread, ptr<const char> name) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_swapon(Thread *thread, ptr<char> name) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_swapoff(Thread *thread, ptr<const char> name) {
return ErrorCode::NOSYS;
}

View file

@ -1,6 +1,8 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_thr_create(Thread *thread, ptr<struct ucontext> ctxt, ptr<slong> arg, sint flags) {
orbis::SysResult orbis::sys_thr_create(Thread *thread,
ptr<struct ucontext> ctxt,
ptr<slong> arg, sint flags) {
if (auto thr_create = thread->tproc->ops->thr_create) {
return thr_create(thread, ctxt, arg, flags);
}
@ -8,7 +10,8 @@ orbis::SysResult orbis::sys_thr_create(Thread *thread, ptr<struct ucontext> ctxt
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_thr_new(Thread *thread, ptr<struct thr_param> param, sint param_size) {
orbis::SysResult orbis::sys_thr_new(Thread *thread, ptr<struct thr_param> param,
sint param_size) {
if (auto thr_new = thread->tproc->ops->thr_new) {
return thr_new(thread, param, param_size);
}
@ -36,7 +39,8 @@ orbis::SysResult orbis::sys_thr_kill(Thread *thread, slong id, sint sig) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_thr_kill2(Thread *thread, pid_t pid, slong id, sint sig) {
orbis::SysResult orbis::sys_thr_kill2(Thread *thread, pid_t pid, slong id,
sint sig) {
if (auto thr_kill2 = thread->tproc->ops->thr_kill2) {
return thr_kill2(thread, pid, id, sig);
}
@ -44,7 +48,8 @@ orbis::SysResult orbis::sys_thr_kill2(Thread *thread, pid_t pid, slong id, sint
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_thr_suspend(Thread *thread, ptr<const struct timespec> timeout) {
orbis::SysResult orbis::sys_thr_suspend(Thread *thread,
ptr<const struct timespec> timeout) {
if (auto thr_suspend = thread->tproc->ops->thr_suspend) {
return thr_suspend(thread, timeout);
}
@ -60,7 +65,8 @@ orbis::SysResult orbis::sys_thr_wake(Thread *thread, slong id) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_thr_set_name(Thread *thread, slong id, ptr<const char> name) {
orbis::SysResult orbis::sys_thr_set_name(Thread *thread, slong id,
ptr<const char> name) {
if (auto thr_set_name = thread->tproc->ops->thr_set_name) {
return thr_set_name(thread, id, name);
}

View file

@ -1,15 +1,57 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_clock_gettime(Thread *thread, clockid_t clock_id, ptr<struct timespec> tp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_clock_settime(Thread *thread, clockid_t clock_id, ptr<const struct timespec> tp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_clock_getres(Thread *thread, clockid_t clock_id, ptr<struct timespec> tp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_nanosleep(Thread *thread, ptr<const struct timespec> rqtp, ptr<struct timespec> rmtp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_gettimeofday(Thread *thread, ptr<struct timeval> tp, ptr<struct timezone> tzp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_settimeofday(Thread *thread, ptr<struct timeval> tp, ptr<struct timezone> tzp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_getitimer(Thread *thread, uint which, ptr<struct itimerval> itv) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_setitimer(Thread *thread, uint which, ptr<struct itimerval> itv, ptr<struct itimerval> oitv) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_ktimer_create(Thread *thread, clockid_t clock_id, ptr<struct sigevent> evp, ptr<sint> timerid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_ktimer_delete(Thread *thread, sint timerid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_ktimer_settime(Thread *thread, sint timerid, sint flags, ptr<const struct itimerspec> value, ptr<struct itimerspec> ovalue) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_ktimer_gettime(Thread *thread, sint timerid, ptr<struct itimerspec> value) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_ktimer_getoverrun(Thread *thread, sint timerid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_clock_gettime(Thread *thread, clockid_t clock_id,
ptr<struct timespec> tp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_clock_settime(Thread *thread, clockid_t clock_id,
ptr<const struct timespec> tp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_clock_getres(Thread *thread, clockid_t clock_id,
ptr<struct timespec> tp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_nanosleep(Thread *thread,
ptr<const struct timespec> rqtp,
ptr<struct timespec> rmtp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_gettimeofday(Thread *thread, ptr<struct timeval> tp,
ptr<struct timezone> tzp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_settimeofday(Thread *thread, ptr<struct timeval> tp,
ptr<struct timezone> tzp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_getitimer(Thread *thread, uint which,
ptr<struct itimerval> itv) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_setitimer(Thread *thread, uint which,
ptr<struct itimerval> itv,
ptr<struct itimerval> oitv) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_ktimer_create(Thread *thread, clockid_t clock_id,
ptr<struct sigevent> evp,
ptr<sint> timerid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_ktimer_delete(Thread *thread, sint timerid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_ktimer_settime(Thread *thread, sint timerid,
sint flags,
ptr<const struct itimerspec> value,
ptr<struct itimerspec> ovalue) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_ktimer_gettime(Thread *thread, sint timerid,
ptr<struct itimerspec> value) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_ktimer_getoverrun(Thread *thread, sint timerid) {
return ErrorCode::NOSYS;
}

View file

@ -1,22 +1,94 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_socket(Thread *thread, sint domain, sint type, sint protocol) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_bind(Thread *thread, sint s, caddr_t name, sint namelen) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_listen(Thread *thread, sint s, sint backlog) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_accept(Thread *thread, sint s, ptr<struct sockaddr> from, ptr<uint32_t> fromlenaddr) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_connect(Thread *thread, sint s, caddr_t name, sint namelen) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_socketpair(Thread *thread, sint domain, sint type, sint protocol, ptr<sint> rsv) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_sendto(Thread *thread, sint s, caddr_t buf, size_t len, sint flags, caddr_t to, sint tolen) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_sendmsg(Thread *thread, sint s, ptr<struct msghdr> msg, sint flags) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_recvfrom(Thread *thread, sint s, caddr_t buf, size_t len, sint flags, ptr<struct sockaddr> from, ptr<uint32_t> fromlenaddr) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_recvmsg(Thread *thread, sint s, ptr<struct msghdr> msg, sint flags) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_shutdown(Thread *thread, sint s, sint how) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_setsockopt(Thread *thread, sint s, sint level, sint name, caddr_t val, sint valsize) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_getsockopt(Thread *thread, sint s, sint level, sint name, caddr_t val, ptr<sint> avalsize) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_getsockname(Thread *thread, sint fdes, ptr<struct sockaddr> asa, ptr<uint32_t> alen) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_getpeername(Thread *thread, sint fdes, ptr<struct sockaddr> asa, ptr<uint32_t> alen) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_sendfile(Thread *thread, sint fd, sint s, off_t offset, size_t nbytes, ptr<struct sf_hdtr> hdtr, ptr<off_t> sbytes, sint flags) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_sctp_peeloff(Thread *thread, sint sd, uint32_t name) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_sctp_generic_sendmsg(Thread *thread, sint sd, caddr_t msg, sint mlen, caddr_t to, __socklen_t tolen, ptr<struct sctp_sndrcvinfo> sinfo, sint flags) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_sctp_generic_sendmsg_iov(Thread *thread, sint sd, ptr<struct iovec> iov, sint iovlen, caddr_t to, __socklen_t tolen, ptr<struct sctp_sndrcvinfo> sinfo, sint flags) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_sctp_generic_recvmsg(Thread *thread, sint sd, ptr<struct iovec> iov, sint iovlen, caddr_t from, __socklen_t fromlen, ptr<struct sctp_sndrcvinfo> sinfo, sint flags) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_socket(Thread *thread, sint domain, sint type,
sint protocol) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_bind(Thread *thread, sint s, caddr_t name,
sint namelen) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_listen(Thread *thread, sint s, sint backlog) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_accept(Thread *thread, sint s,
ptr<struct sockaddr> from,
ptr<uint32_t> fromlenaddr) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_connect(Thread *thread, sint s, caddr_t name,
sint namelen) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_socketpair(Thread *thread, sint domain, sint type,
sint protocol, ptr<sint> rsv) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_sendto(Thread *thread, sint s, caddr_t buf,
size_t len, sint flags, caddr_t to,
sint tolen) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_sendmsg(Thread *thread, sint s,
ptr<struct msghdr> msg, sint flags) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_recvfrom(Thread *thread, sint s, caddr_t buf,
size_t len, sint flags,
ptr<struct sockaddr> from,
ptr<uint32_t> fromlenaddr) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_recvmsg(Thread *thread, sint s,
ptr<struct msghdr> msg, sint flags) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_shutdown(Thread *thread, sint s, sint how) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_setsockopt(Thread *thread, sint s, sint level,
sint name, caddr_t val, sint valsize) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_getsockopt(Thread *thread, sint s, sint level,
sint name, caddr_t val,
ptr<sint> avalsize) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_getsockname(Thread *thread, sint fdes,
ptr<struct sockaddr> asa,
ptr<uint32_t> alen) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_getpeername(Thread *thread, sint fdes,
ptr<struct sockaddr> asa,
ptr<uint32_t> alen) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_sendfile(Thread *thread, sint fd, sint s,
off_t offset, size_t nbytes,
ptr<struct sf_hdtr> hdtr,
ptr<off_t> sbytes, sint flags) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_sctp_peeloff(Thread *thread, sint sd,
uint32_t name) {
return ErrorCode::NOSYS;
}
orbis::SysResult
orbis::sys_sctp_generic_sendmsg(Thread *thread, sint sd, caddr_t msg, sint mlen,
caddr_t to, __socklen_t tolen,
ptr<struct sctp_sndrcvinfo> sinfo, sint flags) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_sctp_generic_sendmsg_iov(
Thread *thread, sint sd, ptr<struct iovec> iov, sint iovlen, caddr_t to,
__socklen_t tolen, ptr<struct sctp_sndrcvinfo> sinfo, sint flags) {
return ErrorCode::NOSYS;
}
orbis::SysResult
orbis::sys_sctp_generic_recvmsg(Thread *thread, sint sd, ptr<struct iovec> iov,
sint iovlen, caddr_t from, __socklen_t fromlen,
ptr<struct sctp_sndrcvinfo> sinfo, sint flags) {
return ErrorCode::NOSYS;
}

View file

@ -1,8 +1,31 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_kmq_open(Thread *thread, ptr<const char> path, sint flags, mode_t mode, ptr<const struct mq_attr> attr) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_kmq_unlink(Thread *thread, ptr<const char> path) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_kmq_setattr(Thread *thread, sint mqd, ptr<const struct mq_attr> attr, ptr<struct mq_attr> oattr) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_kmq_timedreceive(Thread *thread, sint mqd, ptr<const char> msg_ptr, size_t msg_len, ptr<uint> msg_prio, ptr<const struct timespec> abstimeout) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_kmq_timedsend(Thread *thread, sint mqd, ptr<char> msg_ptr, size_t msg_len, ptr<uint> msg_prio, ptr<const struct timespec> abstimeout) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_kmq_notify(Thread *thread, sint mqd, ptr<const struct sigevent> sigev) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_kmq_open(Thread *thread, ptr<const char> path,
sint flags, mode_t mode,
ptr<const struct mq_attr> attr) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_kmq_unlink(Thread *thread, ptr<const char> path) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_kmq_setattr(Thread *thread, sint mqd,
ptr<const struct mq_attr> attr,
ptr<struct mq_attr> oattr) {
return ErrorCode::NOSYS;
}
orbis::SysResult
orbis::sys_kmq_timedreceive(Thread *thread, sint mqd, ptr<const char> msg_ptr,
size_t msg_len, ptr<uint> msg_prio,
ptr<const struct timespec> abstimeout) {
return ErrorCode::NOSYS;
}
orbis::SysResult
orbis::sys_kmq_timedsend(Thread *thread, sint mqd, ptr<char> msg_ptr,
size_t msg_len, ptr<uint> msg_prio,
ptr<const struct timespec> abstimeout) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_kmq_notify(Thread *thread, sint mqd,
ptr<const struct sigevent> sigev) {
return ErrorCode::NOSYS;
}

View file

@ -1,12 +1,37 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_ksem_init(Thread *thread, ptr<semid_t> idp, uint value) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_ksem_open(Thread *thread, ptr<semid_t> idp, ptr<const char> name, sint oflag, mode_t mode, uint value) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_ksem_unlink(Thread *thread, ptr<const char> name) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_ksem_close(Thread *thread, semid_t id) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_ksem_post(Thread *thread, semid_t id) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_ksem_wait(Thread *thread, semid_t id) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_ksem_timedwait(Thread *thread, semid_t id, ptr<const struct timespec> abstime) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_ksem_trywait(Thread *thread, semid_t id) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_ksem_getvalue(Thread *thread, semid_t id, ptr<sint> value) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_ksem_destroy(Thread *thread, semid_t id) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_ksem_init(Thread *thread, ptr<semid_t> idp,
uint value) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_ksem_open(Thread *thread, ptr<semid_t> idp,
ptr<const char> name, sint oflag,
mode_t mode, uint value) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_ksem_unlink(Thread *thread, ptr<const char> name) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_ksem_close(Thread *thread, semid_t id) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_ksem_post(Thread *thread, semid_t id) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_ksem_wait(Thread *thread, semid_t id) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_ksem_timedwait(Thread *thread, semid_t id,
ptr<const struct timespec> abstime) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_ksem_trywait(Thread *thread, semid_t id) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_ksem_getvalue(Thread *thread, semid_t id,
ptr<sint> value) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_ksem_destroy(Thread *thread, semid_t id) {
return ErrorCode::NOSYS;
}

View file

@ -1,4 +1,9 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_shm_open(Thread *thread, ptr<const char> path, sint flags, mode_t mode) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_shm_unlink(Thread *thread, ptr<const char> path) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_shm_open(Thread *thread, ptr<const char> path,
sint flags, mode_t mode) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_shm_unlink(Thread *thread, ptr<const char> path) {
return ErrorCode::NOSYS;
}

View file

@ -1,8 +1,15 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys__umtx_lock(Thread *thread, ptr<struct umtx> umtx) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys__umtx_unlock(Thread *thread, ptr<struct umtx> umtx) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys__umtx_op(Thread *thread, ptr<void> obj, sint op, ulong val, ptr<void> uaddr1, ptr<void> uaddr2) {
orbis::SysResult orbis::sys__umtx_lock(Thread *thread, ptr<struct umtx> umtx) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys__umtx_unlock(Thread *thread,
ptr<struct umtx> umtx) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys__umtx_op(Thread *thread, ptr<void> obj, sint op,
ulong val, ptr<void> uaddr1,
ptr<void> uaddr2) {
std::printf("TODO: sys__umtx_op\n");
return {};
}

View file

@ -1,3 +1,6 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_uuidgen(Thread *thread, ptr<struct uuid> store, sint count) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_uuidgen(Thread *thread, ptr<struct uuid> store,
sint count) {
return ErrorCode::NOSYS;
}

View file

@ -2,14 +2,33 @@
#include "utils/Logs.hpp"
orbis::SysResult orbis::sys_sync(Thread *thread) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_quotactl(Thread *thread, ptr<char> path, sint cmd, sint uid, caddr_t arg) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_statfs(Thread *thread, ptr<char> path, ptr<struct statfs> buf) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_fstatfs(Thread *thread, sint fd, ptr<struct statfs> buf) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_getfsstat(Thread *thread, ptr<struct statfs> buf, slong bufsize, sint flags) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_fchdir(Thread *thread, sint fd) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_chdir(Thread *thread, ptr<char> path) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_chroot(Thread *thread, ptr<char> path) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_open(Thread *thread, ptr<char> path, sint flags, sint mode) {
orbis::SysResult orbis::sys_quotactl(Thread *thread, ptr<char> path, sint cmd,
sint uid, caddr_t arg) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_statfs(Thread *thread, ptr<char> path,
ptr<struct statfs> buf) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_fstatfs(Thread *thread, sint fd,
ptr<struct statfs> buf) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_getfsstat(Thread *thread, ptr<struct statfs> buf,
slong bufsize, sint flags) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_fchdir(Thread *thread, sint fd) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_chdir(Thread *thread, ptr<char> path) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_chroot(Thread *thread, ptr<char> path) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_open(Thread *thread, ptr<char> path, sint flags,
sint mode) {
ORBIS_LOG_NOTICE("sys_open", path, flags, mode);
if (auto open = thread->tproc->ops->open) {
return open(thread, path, flags, mode);
@ -17,77 +36,240 @@ orbis::SysResult orbis::sys_open(Thread *thread, ptr<char> path, sint flags, sin
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_openat(Thread *thread, sint fd, ptr<char> path, sint flag, mode_t mode) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_mknod(Thread *thread, ptr<char> path, sint mode, sint dev) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_mknodat(Thread *thread, sint fd, ptr<char> path, mode_t mode, dev_t dev) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_mkfifo(Thread *thread, ptr<char> path, sint mode) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_mkfifoat(Thread *thread, sint fd, ptr<char> path, mode_t mode) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_link(Thread *thread, ptr<char> path, ptr<char> link) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_linkat(Thread *thread, sint fd1, ptr<char> path1, sint fd2, ptr<char> path2, sint flag) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_symlink(Thread *thread, ptr<char> path, ptr<char> link) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_symlinkat(Thread *thread, ptr<char> path1, sint fd, ptr<char> path2) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_undelete(Thread *thread, ptr<char> path) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_unlink(Thread *thread, ptr<char> path) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_unlinkat(Thread *thread, sint fd, ptr<char> path, sint flag) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_lseek(Thread *thread, sint fd, off_t offset, sint whence) {
orbis::SysResult orbis::sys_openat(Thread *thread, sint fd, ptr<char> path,
sint flag, mode_t mode) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_mknod(Thread *thread, ptr<char> path, sint mode,
sint dev) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_mknodat(Thread *thread, sint fd, ptr<char> path,
mode_t mode, dev_t dev) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_mkfifo(Thread *thread, ptr<char> path, sint mode) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_mkfifoat(Thread *thread, sint fd, ptr<char> path,
mode_t mode) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_link(Thread *thread, ptr<char> path,
ptr<char> link) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_linkat(Thread *thread, sint fd1, ptr<char> path1,
sint fd2, ptr<char> path2, sint flag) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_symlink(Thread *thread, ptr<char> path,
ptr<char> link) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_symlinkat(Thread *thread, ptr<char> path1, sint fd,
ptr<char> path2) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_undelete(Thread *thread, ptr<char> path) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_unlink(Thread *thread, ptr<char> path) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_unlinkat(Thread *thread, sint fd, ptr<char> path,
sint flag) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_lseek(Thread *thread, sint fd, off_t offset,
sint whence) {
if (auto lseek = thread->tproc->ops->lseek) {
return lseek(thread, fd, offset, whence);
}
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_freebsd6_lseek(Thread *thread, sint fd, sint, off_t offset, sint whence) {
orbis::SysResult orbis::sys_freebsd6_lseek(Thread *thread, sint fd, sint,
off_t offset, sint whence) {
return sys_lseek(thread, fd, offset, whence);
}
orbis::SysResult orbis::sys_access(Thread *thread, ptr<char> path, sint flags) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_faccessat(Thread *thread, sint fd, ptr<char> path, sint mode, sint flag) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_eaccess(Thread *thread, ptr<char> path, sint flags) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_stat(Thread *thread, ptr<char> path, ptr<struct stat> ub) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_fstatat(Thread *thread, sint fd, ptr<char> path, ptr<struct stat> buf, sint flag) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_lstat(Thread *thread, ptr<char> path, ptr<struct stat> ub) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_nstat(Thread *thread, ptr<char> path, ptr<struct nstat> ub) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_nlstat(Thread *thread, ptr<char> path, ptr<struct nstat> ub) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_pathconf(Thread *thread, ptr<char> path, sint name) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_lpathconf(Thread *thread, ptr<char> path, sint name) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_readlink(Thread *thread, ptr<char> path, ptr<char> buf, size_t count) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_readlinkat(Thread *thread, sint fd, ptr<char> path, ptr<char> buf, size_t bufsize) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_chflags(Thread *thread, ptr<char> path, sint flags) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_lchflags(Thread *thread, ptr<const char> path, sint flags) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_fchflags(Thread *thread, sint fd, sint flags) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_chmod(Thread *thread, ptr<char> path, sint mode) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_fchmodat(Thread *thread, sint fd, ptr<char> path, mode_t mode, sint flag) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_lchmod(Thread *thread, ptr<char> path, mode_t mode) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_fchmod(Thread *thread, sint fd, sint mode) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_chown(Thread *thread, ptr<char> path, sint uid, sint gid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_fchownat(Thread *thread, sint fd, ptr<char> path, uid_t uid, gid_t gid, sint flag) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_lchown(Thread *thread, ptr<char> path, sint uid, sint gid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_fchown(Thread *thread, sint fd, sint uid, sint gid) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_utimes(Thread *thread, ptr<char> path, ptr<struct timeval> tptr) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_futimesat(Thread *thread, sint fd, ptr<char> path, ptr<struct timeval> times) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_lutimes(Thread *thread, ptr<char> path, ptr<struct timeval> tptr) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_futimes(Thread *thread, sint fd, ptr<struct timeval> tptr) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_truncate(Thread *thread, ptr<char> path, off_t length) {
orbis::SysResult orbis::sys_access(Thread *thread, ptr<char> path, sint flags) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_faccessat(Thread *thread, sint fd, ptr<char> path,
sint mode, sint flag) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_eaccess(Thread *thread, ptr<char> path,
sint flags) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_stat(Thread *thread, ptr<char> path,
ptr<struct stat> ub) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_fstatat(Thread *thread, sint fd, ptr<char> path,
ptr<struct stat> buf, sint flag) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_lstat(Thread *thread, ptr<char> path,
ptr<struct stat> ub) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_nstat(Thread *thread, ptr<char> path,
ptr<struct nstat> ub) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_nlstat(Thread *thread, ptr<char> path,
ptr<struct nstat> ub) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_pathconf(Thread *thread, ptr<char> path,
sint name) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_lpathconf(Thread *thread, ptr<char> path,
sint name) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_readlink(Thread *thread, ptr<char> path,
ptr<char> buf, size_t count) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_readlinkat(Thread *thread, sint fd, ptr<char> path,
ptr<char> buf, size_t bufsize) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_chflags(Thread *thread, ptr<char> path,
sint flags) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_lchflags(Thread *thread, ptr<const char> path,
sint flags) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_fchflags(Thread *thread, sint fd, sint flags) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_chmod(Thread *thread, ptr<char> path, sint mode) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_fchmodat(Thread *thread, sint fd, ptr<char> path,
mode_t mode, sint flag) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_lchmod(Thread *thread, ptr<char> path,
mode_t mode) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_fchmod(Thread *thread, sint fd, sint mode) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_chown(Thread *thread, ptr<char> path, sint uid,
sint gid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_fchownat(Thread *thread, sint fd, ptr<char> path,
uid_t uid, gid_t gid, sint flag) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_lchown(Thread *thread, ptr<char> path, sint uid,
sint gid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_fchown(Thread *thread, sint fd, sint uid,
sint gid) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_utimes(Thread *thread, ptr<char> path,
ptr<struct timeval> tptr) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_futimesat(Thread *thread, sint fd, ptr<char> path,
ptr<struct timeval> times) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_lutimes(Thread *thread, ptr<char> path,
ptr<struct timeval> tptr) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_futimes(Thread *thread, sint fd,
ptr<struct timeval> tptr) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_truncate(Thread *thread, ptr<char> path,
off_t length) {
if (auto truncate = thread->tproc->ops->truncate) {
return truncate(thread, path, length);
}
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_freebsd6_truncate(Thread *thread, ptr<char> path, sint, off_t length) {
orbis::SysResult orbis::sys_freebsd6_truncate(Thread *thread, ptr<char> path,
sint, off_t length) {
return sys_truncate(thread, path, length);
}
orbis::SysResult orbis::sys_fsync(Thread *thread, sint fd) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_rename(Thread *thread, ptr<char> from, ptr<char> to) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_renameat(Thread *thread, sint oldfd, ptr<char> old, sint newfd, ptr<char> new_) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_mkdir(Thread *thread, ptr<char> path, sint mode) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_mkdirat(Thread *thread, sint fd, ptr<char> path, mode_t mode) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_rmdir(Thread *thread, ptr<char> path) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_getdirentries(Thread *thread, sint fd, ptr<char> buf, uint count, ptr<slong> basep) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_getdents(Thread *thread, sint fd, ptr<char> buf, size_t count) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_umask(Thread *thread, sint newmask) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_revoke(Thread *thread, ptr<char> path) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_lgetfh(Thread *thread, ptr<char> fname, ptr<struct fhandle> fhp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_getfh(Thread *thread, ptr<char> fname, ptr<struct fhandle> fhp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_fhopen(Thread *thread, ptr<const struct fhandle> u_fhp, sint flags) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_fhstat(Thread *thread, ptr<const struct fhandle> u_fhp, ptr<struct stat> sb) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_fhstatfs(Thread *thread, ptr<const struct fhandle> u_fhp, ptr<struct statfs> buf) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_posix_fallocate(Thread *thread, sint fd, off_t offset, off_t len) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_posix_fadvise(Thread *thread, sint fd, off_t offset, off_t len, sint advice) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_fsync(Thread *thread, sint fd) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_rename(Thread *thread, ptr<char> from,
ptr<char> to) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_renameat(Thread *thread, sint oldfd, ptr<char> old,
sint newfd, ptr<char> new_) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_mkdir(Thread *thread, ptr<char> path, sint mode) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_mkdirat(Thread *thread, sint fd, ptr<char> path,
mode_t mode) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_rmdir(Thread *thread, ptr<char> path) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_getdirentries(Thread *thread, sint fd,
ptr<char> buf, uint count,
ptr<slong> basep) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_getdents(Thread *thread, sint fd, ptr<char> buf,
size_t count) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_umask(Thread *thread, sint newmask) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_revoke(Thread *thread, ptr<char> path) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_lgetfh(Thread *thread, ptr<char> fname,
ptr<struct fhandle> fhp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_getfh(Thread *thread, ptr<char> fname,
ptr<struct fhandle> fhp) {
return ErrorCode::NOSYS;
}
orbis::SysResult
orbis::sys_fhopen(Thread *thread, ptr<const struct fhandle> u_fhp, sint flags) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_fhstat(Thread *thread,
ptr<const struct fhandle> u_fhp,
ptr<struct stat> sb) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_fhstatfs(Thread *thread,
ptr<const struct fhandle> u_fhp,
ptr<struct statfs> buf) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_posix_fallocate(Thread *thread, sint fd,
off_t offset, off_t len) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_posix_fadvise(Thread *thread, sint fd, off_t offset,
off_t len, sint advice) {
return ErrorCode::NOSYS;
}

View file

@ -1,14 +1,61 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys___acl_get_file(Thread *thread, ptr<char> path, acl_type_t type, ptr<struct acl> aclp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys___acl_get_link(Thread *thread, ptr<const char> path, acl_type_t type, ptr<struct acl> aclp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys___acl_set_file(Thread *thread, ptr<char> path, acl_type_t type, ptr<struct acl> aclp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys___acl_set_link(Thread *thread, ptr<const char> path, acl_type_t type, ptr<struct acl> aclp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys___acl_get_fd(Thread *thread, sint filedes, acl_type_t type, ptr<struct acl> aclp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys___acl_set_fd(Thread *thread, sint filedes, acl_type_t type, ptr<struct acl> aclp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys___acl_delete_link(Thread *thread, ptr<const char> path, acl_type_t type) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys___acl_delete_file(Thread *thread, ptr<char> path, acl_type_t type) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys___acl_delete_fd(Thread *thread, sint filedes, acl_type_t type) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys___acl_aclcheck_file(Thread *thread, ptr<char> path, acl_type_t type, ptr<struct acl> aclp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys___acl_aclcheck_link(Thread *thread, ptr<const char> path, acl_type_t type, ptr<struct acl> aclp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys___acl_aclcheck_fd(Thread *thread, sint filedes, acl_type_t type, ptr<struct acl> aclp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys___acl_get_file(Thread *thread, ptr<char> path,
acl_type_t type,
ptr<struct acl> aclp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys___acl_get_link(Thread *thread, ptr<const char> path,
acl_type_t type,
ptr<struct acl> aclp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys___acl_set_file(Thread *thread, ptr<char> path,
acl_type_t type,
ptr<struct acl> aclp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys___acl_set_link(Thread *thread, ptr<const char> path,
acl_type_t type,
ptr<struct acl> aclp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys___acl_get_fd(Thread *thread, sint filedes,
acl_type_t type,
ptr<struct acl> aclp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys___acl_set_fd(Thread *thread, sint filedes,
acl_type_t type,
ptr<struct acl> aclp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys___acl_delete_link(Thread *thread,
ptr<const char> path,
acl_type_t type) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys___acl_delete_file(Thread *thread, ptr<char> path,
acl_type_t type) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys___acl_delete_fd(Thread *thread, sint filedes,
acl_type_t type) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys___acl_aclcheck_file(Thread *thread, ptr<char> path,
acl_type_t type,
ptr<struct acl> aclp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys___acl_aclcheck_link(Thread *thread,
ptr<const char> path,
acl_type_t type,
ptr<struct acl> aclp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys___acl_aclcheck_fd(Thread *thread, sint filedes,
acl_type_t type,
ptr<struct acl> aclp) {
return ErrorCode::NOSYS;
}

View file

@ -1,15 +1,53 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_aio_return(Thread *thread, ptr<struct aiocb> aiocbp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_aio_suspend(Thread *thread, ptr<struct aiocb> aiocbp, sint nent, ptr<const struct timespec> timeout) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_aio_cancel(Thread *thread, sint fd, ptr<struct aiocb> aiocbp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_aio_error(Thread *thread, ptr<struct aiocb> aiocbp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_oaio_read(Thread *thread, ptr<struct aiocb> aiocbp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_aio_read(Thread *thread, ptr<struct aiocb> aiocbp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_oaio_write(Thread *thread, ptr<struct aiocb> aiocbp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_aio_write(Thread *thread, ptr<struct aiocb> aiocbp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_olio_listio(Thread *thread, sint mode, ptr<cptr<struct aiocb>> acb_list, sint nent, ptr<struct osigevent> sig) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_lio_listio(Thread *thread, sint mode, ptr<cptr<struct aiocb>> aiocbp, sint nent, ptr<struct sigevent> sig) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_aio_waitcomplete(Thread *thread, ptr<ptr<struct aiocb>> aiocbp, ptr<struct timespec> timeout) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_aio_fsync(Thread *thread, sint op, ptr<struct aiocb> aiocbp) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_aio_return(Thread *thread,
ptr<struct aiocb> aiocbp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_aio_suspend(Thread *thread,
ptr<struct aiocb> aiocbp, sint nent,
ptr<const struct timespec> timeout) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_aio_cancel(Thread *thread, sint fd,
ptr<struct aiocb> aiocbp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_aio_error(Thread *thread,
ptr<struct aiocb> aiocbp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_oaio_read(Thread *thread,
ptr<struct aiocb> aiocbp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_aio_read(Thread *thread, ptr<struct aiocb> aiocbp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_oaio_write(Thread *thread,
ptr<struct aiocb> aiocbp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_aio_write(Thread *thread,
ptr<struct aiocb> aiocbp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_olio_listio(Thread *thread, sint mode,
ptr<cptr<struct aiocb>> acb_list,
sint nent, ptr<struct osigevent> sig) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_lio_listio(Thread *thread, sint mode,
ptr<cptr<struct aiocb>> aiocbp,
sint nent, ptr<struct sigevent> sig) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_aio_waitcomplete(Thread *thread,
ptr<ptr<struct aiocb>> aiocbp,
ptr<struct timespec> timeout) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_aio_fsync(Thread *thread, sint op,
ptr<struct aiocb> aiocbp) {
return ErrorCode::NOSYS;
}

View file

@ -1,3 +1,6 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys___getcwd(Thread *thread, ptr<char> buf, uint buflen) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys___getcwd(Thread *thread, ptr<char> buf,
uint buflen) {
return ErrorCode::NOSYS;
}

View file

@ -1,15 +1,79 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_extattrctl(Thread *thread, ptr<char> path, char cmd, ptr<const char> filename, sint attrnamespace, ptr<const char> attrname) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_extattr_set_fd(Thread *thread, sint fd, sint attrnamespace, ptr<const char> attrname, ptr<void> data, size_t nbytes) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_extattr_set_file(Thread *thread, ptr<char> path, sint attrnamespace, ptr<const char> filename, ptr<void> data, size_t nbytes) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_extattr_set_link(Thread *thread, ptr<const char> path, sint attrnamespace, ptr<const char> attrname, ptr<void> data, size_t nbytes) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_extattr_get_fd(Thread *thread, sint fd, sint attrnamespace, ptr<const char> attrname, ptr<void> data, size_t nbytes) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_extattr_get_file(Thread *thread, ptr<char> path, sint attrnamespace, ptr<const char> filename, ptr<void> data, size_t nbytes) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_extattr_get_link(Thread *thread, ptr<const char> path, sint attrnamespace, ptr<const char> attrname, ptr<void> data, size_t nbytes) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_extattr_delete_fd(Thread *thread, sint fd, sint attrnamespace, ptr<const char> attrname) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_extattr_delete_file(Thread *thread, ptr<char> path, sint attrnamespace, ptr<const char> attrname) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_extattr_delete_link(Thread *thread, ptr<const char> path, sint attrnamespace, ptr<const char> attrname) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_extattr_list_fd(Thread *thread, sint fd, sint attrnamespace, ptr<void> data, size_t nbytes) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_extattr_list_file(Thread *thread, ptr<const char> path, sint attrnamespace, ptr<void> data, size_t nbytes) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_extattr_list_link(Thread *thread, ptr<const char> path, sint attrnamespace, ptr<void> data, size_t nbytes) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_extattrctl(Thread *thread, ptr<char> path, char cmd,
ptr<const char> filename,
sint attrnamespace,
ptr<const char> attrname) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_extattr_set_fd(Thread *thread, sint fd,
sint attrnamespace,
ptr<const char> attrname,
ptr<void> data, size_t nbytes) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_extattr_set_file(Thread *thread, ptr<char> path,
sint attrnamespace,
ptr<const char> filename,
ptr<void> data, size_t nbytes) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_extattr_set_link(Thread *thread,
ptr<const char> path,
sint attrnamespace,
ptr<const char> attrname,
ptr<void> data, size_t nbytes) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_extattr_get_fd(Thread *thread, sint fd,
sint attrnamespace,
ptr<const char> attrname,
ptr<void> data, size_t nbytes) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_extattr_get_file(Thread *thread, ptr<char> path,
sint attrnamespace,
ptr<const char> filename,
ptr<void> data, size_t nbytes) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_extattr_get_link(Thread *thread,
ptr<const char> path,
sint attrnamespace,
ptr<const char> attrname,
ptr<void> data, size_t nbytes) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_extattr_delete_fd(Thread *thread, sint fd,
sint attrnamespace,
ptr<const char> attrname) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_extattr_delete_file(Thread *thread, ptr<char> path,
sint attrnamespace,
ptr<const char> attrname) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_extattr_delete_link(Thread *thread,
ptr<const char> path,
sint attrnamespace,
ptr<const char> attrname) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_extattr_list_fd(Thread *thread, sint fd,
sint attrnamespace, ptr<void> data,
size_t nbytes) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_extattr_list_file(Thread *thread,
ptr<const char> path,
sint attrnamespace,
ptr<void> data, size_t nbytes) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_extattr_list_link(Thread *thread,
ptr<const char> path,
sint attrnamespace,
ptr<void> data, size_t nbytes) {
return ErrorCode::NOSYS;
}

View file

@ -1,5 +1,14 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_mount(Thread *thread, ptr<char> type, ptr<char> path, sint flags, caddr_t data) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_unmount(Thread *thread, ptr<char> path, sint flags) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_nmount(Thread *thread, ptr<struct iovec> iovp, uint iovcnt, sint flags) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_mount(Thread *thread, ptr<char> type,
ptr<char> path, sint flags, caddr_t data) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_unmount(Thread *thread, ptr<char> path,
sint flags) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_nmount(Thread *thread, ptr<struct iovec> iovp,
uint iovcnt, sint flags) {
return ErrorCode::NOSYS;
}

View file

@ -93,7 +93,7 @@ orbis::SysResult orbis::sys_munlockall(Thread *thread) {
}
orbis::SysResult orbis::sys_munlock(Thread *thread, ptr<const void> addr,
size_t len) {
if (auto impl = thread->tproc->ops->munlock) {
if (auto impl = thread->tproc->ops->munlock) {
return impl(thread, addr, len);
}

View file

@ -1,4 +1,8 @@
#include "sys/sysproto.hpp"
orbis::SysResult orbis::sys_obreak(Thread *thread, ptr<char> nsize) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_ovadvise(Thread *thread, sint anom) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_obreak(Thread *thread, ptr<char> nsize) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_ovadvise(Thread *thread, sint anom) {
return ErrorCode::NOSYS;
}

File diff suppressed because it is too large Load diff

View file

@ -1,10 +1,10 @@
#include "utils/Logs.hpp"
#include <cstdarg>
#include <cstdint>
#include <sstream>
#include <string>
#include <string_view>
#include <vector>
#include <cstdarg>
#include <cstdint>
static void append_hex(std::string &out, std::uintmax_t value) {
std::ostringstream buf;