mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-01-02 22:59:59 +01:00
Run clang-format
This commit is contained in:
parent
d999edfd2c
commit
1f05a8a6a6
|
|
@ -37,8 +37,8 @@ amdgpu::bridge::createShmCommandBuffer(const char *name) {
|
|||
|
||||
gShmFd = fd;
|
||||
auto result = new (memory) amdgpu::bridge::BridgeHeader();
|
||||
result->size = (kShmSize - sizeof(amdgpu::bridge::BridgeHeader)) /
|
||||
sizeof(std::uint64_t);
|
||||
result->size =
|
||||
(kShmSize - sizeof(amdgpu::bridge::BridgeHeader)) / sizeof(std::uint64_t);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -98,5 +98,4 @@ enum PM4Opcodes {
|
|||
};
|
||||
|
||||
const char *pm4OpcodeToString(int opcode);
|
||||
} // namespace amdgpu::device
|
||||
|
||||
} // namespace amdgpu
|
||||
|
|
|
|||
|
|
@ -313,7 +313,8 @@ struct Tiler1d {
|
|||
m_bitsPerElement = 128;// getBitsPerElement(texture->dfmt);
|
||||
m_microTileMode = Gnm::MicroTileMode::kMicroTileModeThin;
|
||||
m_tileThickness = (m_arrayMode == Gnm::kArrayMode1dTiledThick) ? 4 : 1;
|
||||
m_tileBytes = (kMicroTileWidth * kMicroTileHeight * m_tileThickness * m_bitsPerElement + 7) / 8;
|
||||
m_tileBytes = (kMicroTileWidth * kMicroTileHeight * m_tileThickness *
|
||||
m_bitsPerElement + 7) / 8;
|
||||
|
||||
auto width = texture->width + 1;
|
||||
auto height = texture->height + 1;
|
||||
|
|
@ -326,8 +327,8 @@ struct Tiler1d {
|
|||
m_arrayMode = (Gnm::ArrayMode)2;
|
||||
m_bitsPerElement = 128;
|
||||
m_microTileMode = (Gnm::MicroTileMode)1;
|
||||
m_tileThickness= 1;
|
||||
m_tileBytes= 1024;
|
||||
m_tileThickness = 1;
|
||||
m_tileBytes = 1024;
|
||||
m_tilesPerRow = 16;
|
||||
m_tilesPerSlice = 256;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ struct RemoteMemory {
|
|||
char *shmPointer;
|
||||
|
||||
template <typename T = void> T *getPointer(std::uint64_t address) const {
|
||||
return address ? reinterpret_cast<T *>(shmPointer + address - 0x40000) : nullptr;
|
||||
return address ? reinterpret_cast<T *>(shmPointer + address - 0x40000)
|
||||
: nullptr;
|
||||
}
|
||||
};
|
||||
} // namespace amdgpu
|
||||
|
|
|
|||
|
|
@ -7,9 +7,7 @@ class Verify {
|
|||
util::SourceLocation mLocation;
|
||||
|
||||
public:
|
||||
util::SourceLocation location() const {
|
||||
return mLocation;
|
||||
}
|
||||
util::SourceLocation location() const { return mLocation; }
|
||||
|
||||
Verify(util::SourceLocation location = util::SourceLocation())
|
||||
: mLocation(location) {}
|
||||
|
|
|
|||
|
|
@ -12,4 +12,3 @@ inline Verify operator<<(Verify lhs, VkResult result) {
|
|||
|
||||
return lhs;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,14 @@
|
|||
#pragma once
|
||||
|
||||
#include "SourceLocation.hpp"
|
||||
#include <cstdio>
|
||||
#include <cstdarg>
|
||||
#include <cstdio>
|
||||
|
||||
namespace util {
|
||||
[[noreturn]] inline void unreachable_impl() { std::fflush(stdout); __builtin_trap(); }
|
||||
[[noreturn]] inline void unreachable_impl() {
|
||||
std::fflush(stdout);
|
||||
__builtin_trap();
|
||||
}
|
||||
|
||||
[[noreturn]] inline void unreachable(SourceLocation location = {}) {
|
||||
std::printf("\n");
|
||||
|
|
|
|||
|
|
@ -71,8 +71,8 @@ struct ImageValue : Value {};
|
|||
struct SampledImageValue : Value {};
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_base_of_v<Value, T>)
|
||||
struct ConstantValue : T {};
|
||||
requires(std::is_base_of_v<Value, T>) struct ConstantValue : T {
|
||||
};
|
||||
|
||||
struct AnyConstantValue : Value {
|
||||
AnyConstantValue() = default;
|
||||
|
|
@ -95,28 +95,28 @@ struct AnyConstantValue : Value {
|
|||
};
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_base_of_v<Type, T>)
|
||||
struct VectorOfType : VectorType {};
|
||||
requires(std::is_base_of_v<Type, T>) struct VectorOfType : VectorType {
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_base_of_v<Type, T>)
|
||||
struct ArrayOfType : ArrayType {};
|
||||
requires(std::is_base_of_v<Type, T>) struct ArrayOfType : ArrayType {
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_base_of_v<Type, T>)
|
||||
struct VectorOfValue : VectorValue {};
|
||||
requires(std::is_base_of_v<Type, T>) struct VectorOfValue : VectorValue {
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_base_of_v<Type, T>)
|
||||
struct ArrayOfValue : ArrayValue {};
|
||||
requires(std::is_base_of_v<Type, T>) struct ArrayOfValue : ArrayValue {
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_base_of_v<Type, T>)
|
||||
struct PointerToType : PointerType {};
|
||||
requires(std::is_base_of_v<Type, T>) struct PointerToType : PointerType {
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_base_of_v<Type, T>)
|
||||
struct PointerToValue : PointerValue {};
|
||||
requires(std::is_base_of_v<Type, T>) struct PointerToValue : PointerValue {
|
||||
};
|
||||
|
||||
struct StructPointerValue : Value {};
|
||||
|
||||
|
|
@ -125,45 +125,21 @@ struct VariableValue : PointerValue {};
|
|||
namespace detail {
|
||||
template <typename T> struct TypeToValueImpl;
|
||||
|
||||
template <> struct TypeToValueImpl<Type> {
|
||||
using type = Value;
|
||||
};
|
||||
template <> struct TypeToValueImpl<BoolType> {
|
||||
using type = BoolValue;
|
||||
};
|
||||
template <> struct TypeToValueImpl<IntType> {
|
||||
using type = IntValue;
|
||||
};
|
||||
template <> struct TypeToValueImpl<SIntType> {
|
||||
using type = SIntValue;
|
||||
};
|
||||
template <> struct TypeToValueImpl<UIntType> {
|
||||
using type = UIntValue;
|
||||
};
|
||||
template <> struct TypeToValueImpl<FloatType> {
|
||||
using type = FloatValue;
|
||||
};
|
||||
template <> struct TypeToValueImpl<StructType> {
|
||||
using type = StructValue;
|
||||
};
|
||||
template <> struct TypeToValueImpl<PointerType> {
|
||||
using type = PointerValue;
|
||||
};
|
||||
template <> struct TypeToValueImpl<Type> { using type = Value; };
|
||||
template <> struct TypeToValueImpl<BoolType> { using type = BoolValue; };
|
||||
template <> struct TypeToValueImpl<IntType> { using type = IntValue; };
|
||||
template <> struct TypeToValueImpl<SIntType> { using type = SIntValue; };
|
||||
template <> struct TypeToValueImpl<UIntType> { using type = UIntValue; };
|
||||
template <> struct TypeToValueImpl<FloatType> { using type = FloatValue; };
|
||||
template <> struct TypeToValueImpl<StructType> { using type = StructValue; };
|
||||
template <> struct TypeToValueImpl<PointerType> { using type = PointerValue; };
|
||||
template <> struct TypeToValueImpl<VariableValue> {
|
||||
using type = PointerValue;
|
||||
};
|
||||
template <> struct TypeToValueImpl<VectorType> {
|
||||
using type = VectorValue;
|
||||
};
|
||||
template <> struct TypeToValueImpl<ArrayType> {
|
||||
using type = ArrayValue;
|
||||
};
|
||||
template <> struct TypeToValueImpl<SamplerType> {
|
||||
using type = SamplerValue;
|
||||
};
|
||||
template <> struct TypeToValueImpl<ImageType> {
|
||||
using type = ImageValue;
|
||||
};
|
||||
template <> struct TypeToValueImpl<VectorType> { using type = VectorValue; };
|
||||
template <> struct TypeToValueImpl<ArrayType> { using type = ArrayValue; };
|
||||
template <> struct TypeToValueImpl<SamplerType> { using type = SamplerValue; };
|
||||
template <> struct TypeToValueImpl<ImageType> { using type = ImageValue; };
|
||||
template <> struct TypeToValueImpl<SampledImageType> {
|
||||
using type = SampledImageValue;
|
||||
};
|
||||
|
|
@ -184,8 +160,7 @@ template <typename T>
|
|||
using TypeToValue = typename detail::TypeToValueImpl<T>::type;
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_base_of_v<Type, T>)
|
||||
struct ScalarOrVectorOfValue : Value {
|
||||
requires(std::is_base_of_v<Type, T>) struct ScalarOrVectorOfValue : Value {
|
||||
ScalarOrVectorOfValue() = default;
|
||||
|
||||
ScalarOrVectorOfValue(TypeToValue<T> scalar) { id = scalar.id; }
|
||||
|
|
@ -199,8 +174,8 @@ using ConstantInt = ConstantValue<IntValue>;
|
|||
using ConstantFloat = ConstantValue<FloatValue>;
|
||||
|
||||
template <typename ToT, typename FromT>
|
||||
requires(std::is_base_of_v<FromT, ToT> && std::is_base_of_v<Id, FromT>)
|
||||
ToT cast(FromT from) {
|
||||
requires(std::is_base_of_v<FromT, ToT> &&std::is_base_of_v<Id, FromT>) ToT
|
||||
cast(FromT from) {
|
||||
ToT result;
|
||||
result.id = from.id;
|
||||
return result;
|
||||
|
|
@ -277,8 +252,7 @@ struct IdGenerator {
|
|||
std::uint32_t bounds = 1;
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_base_of_v<Id, T>)
|
||||
T newId() {
|
||||
requires(std::is_base_of_v<Id, T>) T newId() {
|
||||
T result;
|
||||
result.id = bounds++;
|
||||
return result;
|
||||
|
|
@ -544,9 +518,8 @@ public:
|
|||
|
||||
// arithmetic
|
||||
template <typename T>
|
||||
requires(std::is_base_of_v<ScalarType, T>)
|
||||
TypeToValue<T> createInst(spv::Op op, T resultType,
|
||||
std::span<const TypeToValue<T>> operands) {
|
||||
requires(std::is_base_of_v<ScalarType, T>) TypeToValue<T> createInst(
|
||||
spv::Op op, T resultType, std::span<const TypeToValue<T>> operands) {
|
||||
auto region = bodyRegion.pushOp(op, 3 + operands.size());
|
||||
auto id = newId<TypeToValue<T>>();
|
||||
region.pushIdUse(resultType);
|
||||
|
|
@ -583,142 +556,142 @@ public:
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_same_v<SIntType, T> ||
|
||||
std::is_same_v<VectorOfType<SIntType>, T>)
|
||||
TypeToValue<T> createSNegate(T resultType, TypeToValue<T> operand) {
|
||||
requires(std::is_same_v<SIntType, T> ||
|
||||
std::is_same_v<VectorOfType<SIntType>, T>)
|
||||
TypeToValue<T> createSNegate(T resultType, TypeToValue<T> operand) {
|
||||
return createInst(spv::Op::OpSNegate, resultType, std::array{operand});
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_same_v<FloatType, T> ||
|
||||
std::is_same_v<VectorOfType<FloatType>, T>)
|
||||
TypeToValue<T> createFNegate(T resultType, TypeToValue<T> operand) {
|
||||
requires(std::is_same_v<FloatType, T> ||
|
||||
std::is_same_v<VectorOfType<FloatType>, T>)
|
||||
TypeToValue<T> createFNegate(T resultType, TypeToValue<T> operand) {
|
||||
return createInst(spv::Op::OpFNegate, resultType, std::array{operand});
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_same_v<IntType, T> || std::is_base_of_v<IntType, T> ||
|
||||
std::is_same_v<VectorOfType<IntType>, T> ||
|
||||
std::is_same_v<VectorOfType<SIntType>, T> ||
|
||||
std::is_same_v<VectorOfType<UIntType>, T>)
|
||||
TypeToValue<T> createIAdd(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
requires(std::is_same_v<IntType, T> || std::is_base_of_v<IntType, T> ||
|
||||
std::is_same_v<VectorOfType<IntType>, T> ||
|
||||
std::is_same_v<VectorOfType<SIntType>, T> ||
|
||||
std::is_same_v<VectorOfType<UIntType>, T>)
|
||||
TypeToValue<T> createIAdd(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
return createInst(spv::Op::OpIAdd, resultType,
|
||||
std::array{operand1, operand2});
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_same_v<FloatType, T> ||
|
||||
std::is_same_v<VectorOfType<FloatType>, T>)
|
||||
TypeToValue<T> createFAdd(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
requires(std::is_same_v<FloatType, T> ||
|
||||
std::is_same_v<VectorOfType<FloatType>, T>)
|
||||
TypeToValue<T> createFAdd(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
return createInst(spv::Op::OpFAdd, resultType,
|
||||
std::array{operand1, operand2});
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_same_v<IntType, T> || std::is_base_of_v<IntType, T> ||
|
||||
std::is_same_v<VectorOfType<IntType>, T> ||
|
||||
std::is_same_v<VectorOfType<SIntType>, T> ||
|
||||
std::is_same_v<VectorOfType<UIntType>, T>)
|
||||
TypeToValue<T> createISub(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
requires(std::is_same_v<IntType, T> || std::is_base_of_v<IntType, T> ||
|
||||
std::is_same_v<VectorOfType<IntType>, T> ||
|
||||
std::is_same_v<VectorOfType<SIntType>, T> ||
|
||||
std::is_same_v<VectorOfType<UIntType>, T>)
|
||||
TypeToValue<T> createISub(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
return createInst(spv::Op::OpISub, resultType,
|
||||
std::array{operand1, operand2});
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_same_v<FloatType, T> ||
|
||||
std::is_same_v<VectorOfType<FloatType>, T>)
|
||||
TypeToValue<T> createFSub(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
requires(std::is_same_v<FloatType, T> ||
|
||||
std::is_same_v<VectorOfType<FloatType>, T>)
|
||||
TypeToValue<T> createFSub(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
return createInst(spv::Op::OpFSub, resultType,
|
||||
std::array{operand1, operand2});
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_same_v<IntType, T> || std::is_base_of_v<IntType, T> ||
|
||||
std::is_same_v<VectorOfType<IntType>, T> ||
|
||||
std::is_same_v<VectorOfType<SIntType>, T> ||
|
||||
std::is_same_v<VectorOfType<UIntType>, T>)
|
||||
TypeToValue<T> createIMul(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
requires(std::is_same_v<IntType, T> || std::is_base_of_v<IntType, T> ||
|
||||
std::is_same_v<VectorOfType<IntType>, T> ||
|
||||
std::is_same_v<VectorOfType<SIntType>, T> ||
|
||||
std::is_same_v<VectorOfType<UIntType>, T>)
|
||||
TypeToValue<T> createIMul(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
return createInst(spv::Op::OpIMul, resultType,
|
||||
std::array{operand1, operand2});
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_same_v<FloatType, T> ||
|
||||
std::is_same_v<VectorOfType<FloatType>, T>)
|
||||
TypeToValue<T> createFMul(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
requires(std::is_same_v<FloatType, T> ||
|
||||
std::is_same_v<VectorOfType<FloatType>, T>)
|
||||
TypeToValue<T> createFMul(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
return createInst(spv::Op::OpFMul, resultType,
|
||||
std::array{operand1, operand2});
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_same_v<UIntType, T> ||
|
||||
std::is_same_v<VectorOfType<UIntType>, T>)
|
||||
TypeToValue<T> createUDiv(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
requires(std::is_same_v<UIntType, T> ||
|
||||
std::is_same_v<VectorOfType<UIntType>, T>)
|
||||
TypeToValue<T> createUDiv(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
return createInst(spv::Op::OpUDiv, resultType,
|
||||
std::array{operand1, operand2});
|
||||
}
|
||||
template <typename T>
|
||||
requires(std::is_same_v<SIntType, T> ||
|
||||
std::is_same_v<VectorOfType<SIntType>, T>)
|
||||
TypeToValue<T> createSDiv(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
requires(std::is_same_v<SIntType, T> ||
|
||||
std::is_same_v<VectorOfType<SIntType>, T>)
|
||||
TypeToValue<T> createSDiv(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
return createInst(spv::Op::OpSDiv, resultType,
|
||||
std::array{operand1, operand2});
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_same_v<FloatType, T> ||
|
||||
std::is_same_v<VectorOfType<FloatType>, T>)
|
||||
TypeToValue<T> createFDiv(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
requires(std::is_same_v<FloatType, T> ||
|
||||
std::is_same_v<VectorOfType<FloatType>, T>)
|
||||
TypeToValue<T> createFDiv(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
return createInst(spv::Op::OpFDiv, resultType,
|
||||
std::array{operand1, operand2});
|
||||
}
|
||||
template <typename T>
|
||||
requires(std::is_same_v<UIntType, T> ||
|
||||
std::is_same_v<VectorOfType<UIntType>, T>)
|
||||
TypeToValue<T> createUMod(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
requires(std::is_same_v<UIntType, T> ||
|
||||
std::is_same_v<VectorOfType<UIntType>, T>)
|
||||
TypeToValue<T> createUMod(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
return createInst(spv::Op::OpUMod, resultType,
|
||||
std::array{operand1, operand2});
|
||||
}
|
||||
template <typename T>
|
||||
requires(std::is_same_v<SIntType, T> ||
|
||||
std::is_same_v<VectorOfType<SIntType>, T>)
|
||||
TypeToValue<T> createSRem(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
requires(std::is_same_v<SIntType, T> ||
|
||||
std::is_same_v<VectorOfType<SIntType>, T>)
|
||||
TypeToValue<T> createSRem(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
return createInst(spv::Op::OpSRem, resultType,
|
||||
std::array{operand1, operand2});
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_same_v<SIntType, T> ||
|
||||
std::is_same_v<VectorOfType<SIntType>, T>)
|
||||
TypeToValue<T> createSMod(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
requires(std::is_same_v<SIntType, T> ||
|
||||
std::is_same_v<VectorOfType<SIntType>, T>)
|
||||
TypeToValue<T> createSMod(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
return createInst(spv::Op::OpSMod, resultType,
|
||||
std::array{operand1, operand2});
|
||||
}
|
||||
template <typename T>
|
||||
requires(std::is_same_v<FloatType, T> ||
|
||||
std::is_same_v<VectorOfType<FloatType>, T>)
|
||||
TypeToValue<T> createFRem(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
requires(std::is_same_v<FloatType, T> ||
|
||||
std::is_same_v<VectorOfType<FloatType>, T>)
|
||||
TypeToValue<T> createFRem(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
return createInst(spv::Op::OpFRem, resultType,
|
||||
std::array{operand1, operand2});
|
||||
}
|
||||
template <typename T>
|
||||
requires(std::is_same_v<FloatType, T> ||
|
||||
std::is_same_v<VectorOfType<FloatType>, T>)
|
||||
TypeToValue<T> createFMod(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
requires(std::is_same_v<FloatType, T> ||
|
||||
std::is_same_v<VectorOfType<FloatType>, T>)
|
||||
TypeToValue<T> createFMod(T resultType, TypeToValue<T> operand1,
|
||||
TypeToValue<T> operand2) {
|
||||
return createInst(spv::Op::OpFMod, resultType,
|
||||
std::array{operand1, operand2});
|
||||
}
|
||||
|
|
@ -795,9 +768,8 @@ public:
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_base_of_v<Type, T>)
|
||||
TypeToValue<T> createPhi(T resultType,
|
||||
std::span<const std::pair<Value, Block>> values) {
|
||||
requires(std::is_base_of_v<Type, T>) TypeToValue<T> createPhi(
|
||||
T resultType, std::span<const std::pair<Value, Block>> values) {
|
||||
return cast<TypeToValue<T>>(
|
||||
createPhi(static_cast<Type>(resultType), values));
|
||||
}
|
||||
|
|
@ -883,8 +855,8 @@ public:
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_base_of_v<Type, T>)
|
||||
TypeToValue<T> createLoad(T resultType, PointerValue pointer) {
|
||||
requires(std::is_base_of_v<Type, T>)
|
||||
TypeToValue<T> createLoad(T resultType, PointerValue pointer) {
|
||||
auto region = bodyRegion.pushOp(spv::Op::OpLoad, 4);
|
||||
auto id = newId<TypeToValue<T>>();
|
||||
region.pushIdUse(resultType);
|
||||
|
|
@ -1521,8 +1493,7 @@ public:
|
|||
return id;
|
||||
}
|
||||
|
||||
IntValue createImageQueryLevels(IntType resultType,
|
||||
ImageValue sampledImage) {
|
||||
IntValue createImageQueryLevels(IntType resultType, ImageValue sampledImage) {
|
||||
auto region = bodyRegion.pushOp(spv::Op::OpImageQueryLevels, 4);
|
||||
auto id = newId<IntValue>();
|
||||
region.pushIdUse(resultType);
|
||||
|
|
@ -1617,8 +1588,8 @@ public:
|
|||
: mIdGenerator(&idGenerator), capabilityRegion{1}, extensionRegion{1},
|
||||
extInstRegion{4}, memoryModelRegion{3}, entryPointRegion{1},
|
||||
executionModeRegion{1}, debugRegion{0}, annotationRegion{1},
|
||||
globalRegion{1}, functionDeclRegion{1},
|
||||
functionRegion{expInstructionsCount} {}
|
||||
globalRegion{1}, functionDeclRegion{1}, functionRegion{
|
||||
expInstructionsCount} {}
|
||||
|
||||
SpirvBuilder clone() const { return *this; }
|
||||
|
||||
|
|
@ -1698,8 +1669,8 @@ public:
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_base_of_v<Type, T>)
|
||||
TypeToValue<T> createUndef(T resultType) {
|
||||
requires(std::is_base_of_v<Type, T>)
|
||||
TypeToValue<T> createUndef(T resultType) {
|
||||
return cast<TypeToValue<T>>(createUndef(resultType));
|
||||
}
|
||||
|
||||
|
|
@ -1985,8 +1956,8 @@ public:
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_base_of_v<Type, T>)
|
||||
PointerToType<T> createTypePointer(spv::StorageClass storageClass, T type) {
|
||||
requires(std::is_base_of_v<Type, T>) PointerToType<T> createTypePointer(
|
||||
spv::StorageClass storageClass, T type) {
|
||||
return cast<PointerToType<T>>(
|
||||
createTypePointer(storageClass, static_cast<Type>(type)));
|
||||
}
|
||||
|
|
@ -2024,9 +1995,9 @@ public:
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_base_of_v<Type, T>)
|
||||
ConstantValue<TypeToValue<T>>
|
||||
createConstant(T type, std::span<const std::uint32_t> values) {
|
||||
requires(std::is_base_of_v<Type, T>)
|
||||
ConstantValue<TypeToValue<T>> createConstant(
|
||||
T type, std::span<const std::uint32_t> values) {
|
||||
auto region = globalRegion.pushOp(spv::Op::OpConstant, 3 + values.size());
|
||||
auto id = newId<ConstantValue<TypeToValue<T>>>();
|
||||
region.pushIdUse(type);
|
||||
|
|
@ -2038,14 +2009,16 @@ public:
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_base_of_v<Type, T>)
|
||||
ConstantValue<TypeToValue<T>> createConstant32(T type, std::uint32_t value) {
|
||||
requires(std::is_base_of_v<Type, T>)
|
||||
ConstantValue<TypeToValue<T>> createConstant32(T type,
|
||||
std::uint32_t value) {
|
||||
return createConstant(type, std::array{value});
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_base_of_v<Type, T>)
|
||||
ConstantValue<TypeToValue<T>> createConstant64(T type, std::uint64_t value) {
|
||||
requires(std::is_base_of_v<Type, T>)
|
||||
ConstantValue<TypeToValue<T>> createConstant64(T type,
|
||||
std::uint64_t value) {
|
||||
return createConstant(type,
|
||||
std::array{static_cast<std::uint32_t>(value),
|
||||
static_cast<std::uint32_t>(value >> 32)});
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "Stage.hpp"
|
||||
#include "AccessOp.hpp"
|
||||
#include "Stage.hpp"
|
||||
|
||||
#include <amdgpu/RemoteMemory.hpp>
|
||||
|
||||
|
|
@ -11,11 +11,7 @@
|
|||
|
||||
namespace amdgpu::shader {
|
||||
struct Shader {
|
||||
enum class UniformKind {
|
||||
Buffer,
|
||||
Sampler,
|
||||
Image
|
||||
};
|
||||
enum class UniformKind { Buffer, Sampler, Image };
|
||||
|
||||
struct UniformInfo {
|
||||
std::uint32_t binding;
|
||||
|
|
|
|||
|
|
@ -9,18 +9,18 @@
|
|||
#include "Value.hpp"
|
||||
#include "scf.hpp"
|
||||
|
||||
#include <forward_list>
|
||||
#include <amdgpu/RemoteMemory.hpp>
|
||||
#include <forward_list>
|
||||
#include <spirv/spirv-builder.hpp>
|
||||
#include <unordered_map>
|
||||
#include <util/unreachable.hpp>
|
||||
|
||||
#include <bit>
|
||||
#include <span>
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <span>
|
||||
#include <vector>
|
||||
|
||||
namespace amdgpu::shader {
|
||||
/*
|
||||
|
|
@ -99,13 +99,12 @@ class ConverterContext {
|
|||
spirv::Function mDiscardFn;
|
||||
|
||||
public:
|
||||
ConverterContext(RemoteMemory memory, Stage stage) : mMemory(memory), mStage(stage) {
|
||||
ConverterContext(RemoteMemory memory, Stage stage)
|
||||
: mMemory(memory), mStage(stage) {
|
||||
mGlslStd450 = mBuilder.createExtInstImport("GLSL.std.450");
|
||||
}
|
||||
|
||||
const decltype(mInterfaces) &getInterfaces() const {
|
||||
return mInterfaces;
|
||||
}
|
||||
const decltype(mInterfaces) &getInterfaces() const { return mInterfaces; }
|
||||
|
||||
spirv::SpirvBuilder &getBuilder() { return mBuilder; }
|
||||
RemoteMemory getMemory() const { return mMemory; }
|
||||
|
|
@ -155,11 +154,13 @@ public:
|
|||
}
|
||||
|
||||
spirv::ArrayOfType<spirv::UIntType> getArrayUint32x8Type() {
|
||||
return spirv::cast<spirv::ArrayOfType<spirv::UIntType>>(getType(TypeId::ArrayUInt32x8));
|
||||
return spirv::cast<spirv::ArrayOfType<spirv::UIntType>>(
|
||||
getType(TypeId::ArrayUInt32x8));
|
||||
}
|
||||
|
||||
spirv::ArrayOfType<spirv::UIntType> getArrayUint32x16Type() {
|
||||
return spirv::cast<spirv::ArrayOfType<spirv::UIntType>>(getType(TypeId::ArrayUInt32x16));
|
||||
return spirv::cast<spirv::ArrayOfType<spirv::UIntType>>(
|
||||
getType(TypeId::ArrayUInt32x16));
|
||||
}
|
||||
|
||||
spirv::SIntType getSint32Type() {
|
||||
|
|
@ -225,12 +226,14 @@ public:
|
|||
return spirv::cast<spirv::ImageType>(getType(TypeId::Image2D));
|
||||
}
|
||||
spirv::SampledImageType getSampledImage2DType() {
|
||||
return spirv::cast<spirv::SampledImageType>(getType(TypeId::SampledImage2D));
|
||||
return spirv::cast<spirv::SampledImageType>(
|
||||
getType(TypeId::SampledImage2D));
|
||||
}
|
||||
|
||||
UniformInfo *createStorageBuffer(TypeId type);
|
||||
UniformInfo *getOrCreateStorageBuffer(std::uint32_t *vbuffer, TypeId type);
|
||||
UniformInfo *getOrCreateUniformConstant(std::uint32_t *buffer, std::size_t size, TypeId type);
|
||||
UniformInfo *getOrCreateUniformConstant(std::uint32_t *buffer,
|
||||
std::size_t size, TypeId type);
|
||||
spirv::VariableValue getThreadId();
|
||||
spirv::VariableValue getWorkgroupId();
|
||||
spirv::VariableValue getLocalInvocationId();
|
||||
|
|
@ -250,8 +253,6 @@ public:
|
|||
Function *createFunction(std::size_t expectedSize);
|
||||
Fragment *createFragment(std::size_t expectedSize);
|
||||
|
||||
std::vector<UniformInfo> &getUniforms() {
|
||||
return mUniforms;
|
||||
}
|
||||
std::vector<UniformInfo> &getUniforms() { return mUniforms; }
|
||||
};
|
||||
} // namespace amdgpu::shader
|
||||
|
|
|
|||
|
|
@ -14,10 +14,7 @@
|
|||
#include <spirv/spirv-builder.hpp>
|
||||
|
||||
namespace amdgpu::shader {
|
||||
enum class OperandGetFlags {
|
||||
None,
|
||||
PreserveType = 1 << 0
|
||||
};
|
||||
enum class OperandGetFlags { None, PreserveType = 1 << 0 };
|
||||
|
||||
struct Function;
|
||||
class ConverterContext;
|
||||
|
|
@ -36,9 +33,7 @@ struct Fragment {
|
|||
std::uint64_t jumpAddress = 0;
|
||||
spirv::BoolValue branchCondition;
|
||||
|
||||
void appendBranch(Fragment &other) {
|
||||
other.predecessors.push_back(this);
|
||||
}
|
||||
void appendBranch(Fragment &other) { other.predecessors.push_back(this); }
|
||||
|
||||
void injectValuesFromPreds();
|
||||
|
||||
|
|
@ -47,34 +42,31 @@ struct Fragment {
|
|||
spirv::SamplerValue createSampler(RegisterId base);
|
||||
spirv::ImageValue createImage(RegisterId base, bool r128); // TODO: params
|
||||
Value createCompositeExtract(Value composite, std::uint32_t member);
|
||||
Value getOperand(RegisterId id, TypeId type, OperandGetFlags flags = OperandGetFlags::None);
|
||||
Value getOperand(RegisterId id, TypeId type,
|
||||
OperandGetFlags flags = OperandGetFlags::None);
|
||||
void setOperand(RegisterId id, Value value);
|
||||
void setVcc(Value value);
|
||||
void setScc(Value value);
|
||||
spirv::BoolValue getScc();
|
||||
spirv::Value createBitcast(spirv::Type to, spirv::Type from, spirv::Value value);
|
||||
spirv::Value createBitcast(spirv::Type to, spirv::Type from,
|
||||
spirv::Value value);
|
||||
|
||||
Value getScalarOperand(int id, TypeId type, OperandGetFlags flags = OperandGetFlags::None) {
|
||||
Value getScalarOperand(int id, TypeId type,
|
||||
OperandGetFlags flags = OperandGetFlags::None) {
|
||||
return getOperand(RegisterId::Scalar(id), type, flags);
|
||||
}
|
||||
Value getVectorOperand(int id, TypeId type, OperandGetFlags flags = OperandGetFlags::None) {
|
||||
Value getVectorOperand(int id, TypeId type,
|
||||
OperandGetFlags flags = OperandGetFlags::None) {
|
||||
return getOperand(RegisterId::Vector(id), type, flags);
|
||||
}
|
||||
Value getAttrOperand(int id, TypeId type, OperandGetFlags flags = OperandGetFlags::None) {
|
||||
Value getAttrOperand(int id, TypeId type,
|
||||
OperandGetFlags flags = OperandGetFlags::None) {
|
||||
return getOperand(RegisterId::Attr(id), type, flags);
|
||||
}
|
||||
Value getVccLo() {
|
||||
return getOperand(RegisterId::VccLo, TypeId::UInt32);
|
||||
}
|
||||
Value getVccHi() {
|
||||
return getOperand(RegisterId::VccHi, TypeId::UInt32);
|
||||
}
|
||||
Value getExecLo() {
|
||||
return getOperand(RegisterId::ExecLo, TypeId::UInt32);
|
||||
}
|
||||
Value getExecHi() {
|
||||
return getOperand(RegisterId::ExecHi, TypeId::UInt32);
|
||||
}
|
||||
Value getVccLo() { return getOperand(RegisterId::VccLo, TypeId::UInt32); }
|
||||
Value getVccHi() { return getOperand(RegisterId::VccHi, TypeId::UInt32); }
|
||||
Value getExecLo() { return getOperand(RegisterId::ExecLo, TypeId::UInt32); }
|
||||
Value getExecHi() { return getOperand(RegisterId::ExecHi, TypeId::UInt32); }
|
||||
void setScalarOperand(int id, Value value) {
|
||||
setOperand(RegisterId::Scalar(id), value);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1419,7 +1419,8 @@ struct Mtbuf {
|
|||
bool idxen = fetchMaskedValue(inst[0], idxenMask);
|
||||
bool glc = fetchMaskedValue(inst[0], glcMask);
|
||||
SurfaceFormat dfmt = (SurfaceFormat)fetchMaskedValue(inst[0], dfmtMask);
|
||||
TextureChannelType nfmt = (TextureChannelType)fetchMaskedValue(inst[0], nfmtMask);
|
||||
TextureChannelType nfmt =
|
||||
(TextureChannelType)fetchMaskedValue(inst[0], nfmtMask);
|
||||
|
||||
std::uint8_t vaddr = fetchMaskedValue(inst[1], vaddrMask);
|
||||
std::uint8_t vdata = fetchMaskedValue(inst[1], vdataMask);
|
||||
|
|
|
|||
|
|
@ -73,7 +73,8 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
template <std::invocable<BasicBlock *> T> void walkPredecessors(T &&cb) const {
|
||||
template <std::invocable<BasicBlock *> T>
|
||||
void walkPredecessors(T &&cb) const {
|
||||
for (auto pred : predecessors) {
|
||||
cb(pred);
|
||||
}
|
||||
|
|
@ -92,7 +93,9 @@ public:
|
|||
return successors[1] != nullptr ? 2 : 1;
|
||||
}
|
||||
|
||||
BasicBlock *getSuccessor(std::size_t index) const { return successors[index]; }
|
||||
BasicBlock *getSuccessor(std::size_t index) const {
|
||||
return successors[index];
|
||||
}
|
||||
|
||||
void split(BasicBlock *target);
|
||||
};
|
||||
|
|
@ -108,7 +111,7 @@ public:
|
|||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
BasicBlock *getBasicBlock(std::uint64_t address) {
|
||||
if (auto it = basicBlocks.lower_bound(address); it != basicBlocks.end()) {
|
||||
auto bb = &it->second;
|
||||
|
|
|
|||
|
|
@ -31,51 +31,40 @@ class Node {
|
|||
public:
|
||||
virtual ~Node() = default;
|
||||
virtual void print(const PrintOptions &options, unsigned depth) = 0;
|
||||
virtual bool isEqual(const Node &other) const {
|
||||
return this == &other;
|
||||
}
|
||||
virtual bool isEqual(const Node &other) const { return this == &other; }
|
||||
|
||||
void dump() {
|
||||
print({}, 0);
|
||||
}
|
||||
void dump() { print({}, 0); }
|
||||
|
||||
void setParent(Node *parent) {
|
||||
mParent = parent;
|
||||
}
|
||||
void setParent(Node *parent) { mParent = parent; }
|
||||
|
||||
Node *getParent() const {
|
||||
return mParent;
|
||||
}
|
||||
Node *getParent() const { return mParent; }
|
||||
|
||||
template<typename T> requires(std::is_base_of_v<Node, T>)
|
||||
auto getParent() const -> decltype(dynCast<T>(mParent)) {
|
||||
template <typename T>
|
||||
requires(std::is_base_of_v<Node, T>) auto getParent() const
|
||||
-> decltype(dynCast<T>(mParent)) {
|
||||
return dynCast<T>(mParent);
|
||||
}
|
||||
|
||||
Node *getNext() const {
|
||||
return mNext;
|
||||
}
|
||||
Node *getNext() const { return mNext; }
|
||||
|
||||
Node *getPrev() const {
|
||||
return mPrev;
|
||||
}
|
||||
Node *getPrev() const { return mPrev; }
|
||||
|
||||
friend class Block;
|
||||
};
|
||||
|
||||
template <typename T, typename ST>
|
||||
requires(std::is_base_of_v<Node, T> && std::is_base_of_v<Node, ST>) &&
|
||||
requires(ST *s) { dynamic_cast<T *>(s); }
|
||||
T *dynCast(ST *s) {
|
||||
return dynamic_cast<T *>(s);
|
||||
requires(std::is_base_of_v<Node, T> &&std::is_base_of_v<Node, ST>) &&
|
||||
requires(ST *s) {
|
||||
dynamic_cast<T *>(s);
|
||||
}
|
||||
T *dynCast(ST *s) { return dynamic_cast<T *>(s); }
|
||||
|
||||
template <typename T, typename ST>
|
||||
requires(std::is_base_of_v<Node, T> && std::is_base_of_v<Node, ST>) &&
|
||||
requires(const ST *s) { dynamic_cast<const T *>(s); }
|
||||
const T *dynCast(const ST *s) {
|
||||
return dynamic_cast<const T *>(s);
|
||||
requires(std::is_base_of_v<Node, T> &&std::is_base_of_v<Node, ST>) &&
|
||||
requires(const ST *s) {
|
||||
dynamic_cast<const T *>(s);
|
||||
}
|
||||
const T *dynCast(const ST *s) { return dynamic_cast<const T *>(s); }
|
||||
|
||||
inline bool isNodeEqual(const Node *lhs, const Node *rhs) {
|
||||
if (lhs == rhs) {
|
||||
|
|
@ -105,7 +94,6 @@ struct Return final : Node {
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
class Context;
|
||||
|
||||
class Block final : public Node {
|
||||
|
|
@ -124,25 +112,14 @@ public:
|
|||
std::printf("%s}\n", options.makeIdent(depth).c_str());
|
||||
}
|
||||
|
||||
bool isEmpty() const {
|
||||
return mBegin == nullptr;
|
||||
}
|
||||
bool isEmpty() const { return mBegin == nullptr; }
|
||||
|
||||
Node *getRootNode() const {
|
||||
return mBegin;
|
||||
}
|
||||
Node *getLastNode() const {
|
||||
return mEnd;
|
||||
}
|
||||
Node *getRootNode() const { return mBegin; }
|
||||
Node *getLastNode() const { return mEnd; }
|
||||
|
||||
void setUserData(void *data) {
|
||||
mUserData = data;
|
||||
}
|
||||
void* getUserData() const {
|
||||
return mUserData;
|
||||
}
|
||||
template<typename T>
|
||||
T* getUserData() const {
|
||||
void setUserData(void *data) { mUserData = data; }
|
||||
void *getUserData() const { return mUserData; }
|
||||
template <typename T> T *getUserData() const {
|
||||
return static_cast<T *>(mUserData);
|
||||
}
|
||||
|
||||
|
|
@ -239,9 +216,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
Block *getBlock() const {
|
||||
return dynCast<Block>(getParent());
|
||||
}
|
||||
Block *getBlock() const { return dynCast<Block>(getParent()); }
|
||||
|
||||
bool isEqual(const Node &other) const override {
|
||||
if (this == &other) {
|
||||
|
|
@ -320,9 +295,7 @@ struct Jump final : Node {
|
|||
struct Loop final : Node {
|
||||
Block *body;
|
||||
|
||||
Loop(Block *body) : body(body) {
|
||||
body->setParent(this);
|
||||
}
|
||||
Loop(Block *body) : body(body) { body->setParent(this); }
|
||||
|
||||
bool isEqual(const Node &other) const override {
|
||||
if (this == &other) {
|
||||
|
|
@ -358,8 +331,7 @@ class Context {
|
|||
|
||||
public:
|
||||
template <typename T, typename... ArgsT>
|
||||
requires(std::is_constructible_v<T, ArgsT...>)
|
||||
T *create(ArgsT &&...args) {
|
||||
requires(std::is_constructible_v<T, ArgsT...>) T *create(ArgsT &&...args) {
|
||||
auto result = new T(std::forward<ArgsT>(args)...);
|
||||
mNodes.push_front(std::unique_ptr<Node>{result});
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "CfBuilder.hpp"
|
||||
#include "Instruction.hpp"
|
||||
#include <cassert>
|
||||
#include <amdgpu/RemoteMemory.hpp>
|
||||
#include <cassert>
|
||||
#include <unordered_set>
|
||||
|
||||
using namespace amdgpu;
|
||||
|
|
@ -176,9 +176,8 @@ struct CfgBuilder {
|
|||
}
|
||||
};
|
||||
|
||||
cf::BasicBlock *amdgpu::shader::buildCf(cf::Context &ctxt,
|
||||
RemoteMemory memory,
|
||||
std::uint64_t entryPoint) {
|
||||
cf::BasicBlock *amdgpu::shader::buildCf(cf::Context &ctxt, RemoteMemory memory,
|
||||
std::uint64_t entryPoint) {
|
||||
CfgBuilder builder;
|
||||
builder.context = &ctxt;
|
||||
builder.memory = memory;
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
#include "Instruction.hpp"
|
||||
#include "RegisterId.hpp"
|
||||
#include "RegisterState.hpp"
|
||||
#include "cf.hpp"
|
||||
#include "amdgpu/RemoteMemory.hpp"
|
||||
#include "cf.hpp"
|
||||
#include "scf.hpp"
|
||||
#include "util/unreachable.hpp"
|
||||
#include <compare>
|
||||
|
|
@ -108,8 +108,9 @@ private:
|
|||
instClass == InstructionClass::Vintrp ||
|
||||
instClass == InstructionClass::Exp ||
|
||||
instClass == InstructionClass::Vop1 ||
|
||||
instClass == InstructionClass::Vopc/* ||
|
||||
instClass == InstructionClass::Smrd*/;
|
||||
instClass == InstructionClass::Vopc /* ||
|
||||
instClass == InstructionClass::Smrd*/
|
||||
;
|
||||
}
|
||||
|
||||
spirv::BoolValue createExecTest(Fragment *fragment) {
|
||||
|
|
@ -274,10 +275,11 @@ private:
|
|||
};
|
||||
}; // namespace amdgpu::shader
|
||||
|
||||
amdgpu::shader::Shader amdgpu::shader::convert(
|
||||
RemoteMemory memory, Stage stage, std::uint64_t entry,
|
||||
std::span<const std::uint32_t> userSpgrs, int bindingOffset,
|
||||
std::uint32_t dimX, std::uint32_t dimY, std::uint32_t dimZ) {
|
||||
amdgpu::shader::Shader
|
||||
amdgpu::shader::convert(RemoteMemory memory, Stage stage, std::uint64_t entry,
|
||||
std::span<const std::uint32_t> userSpgrs,
|
||||
int bindingOffset, std::uint32_t dimX,
|
||||
std::uint32_t dimY, std::uint32_t dimZ) {
|
||||
ConverterContext ctxt(memory, stage);
|
||||
auto &builder = ctxt.getBuilder();
|
||||
builder.createCapability(spv::Capability::Shader);
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ UniformInfo *ConverterContext::createStorageBuffer(TypeId type) {
|
|||
newUniform.variable = uniformVariable;
|
||||
newUniform.isBuffer = true;
|
||||
std::printf("new storage buffer %u of type %u\n", newUniform.index,
|
||||
newUniform.typeId.raw);
|
||||
newUniform.typeId.raw);
|
||||
return &newUniform;
|
||||
}
|
||||
|
||||
|
|
@ -397,11 +397,11 @@ spirv::VariableValue ConverterContext::getFragCoord() {
|
|||
}
|
||||
|
||||
auto inputType = getPointerType(spv::StorageClass::Input, TypeId::Float32x4);
|
||||
mFragCoord =
|
||||
mBuilder.createVariable(inputType, spv::StorageClass::Input);
|
||||
mFragCoord = mBuilder.createVariable(inputType, spv::StorageClass::Input);
|
||||
|
||||
mBuilder.createDecorate(mFragCoord, spv::Decoration::BuiltIn,
|
||||
{{static_cast<std::uint32_t>(spv::BuiltIn::FragCoord)}});
|
||||
mBuilder.createDecorate(
|
||||
mFragCoord, spv::Decoration::BuiltIn,
|
||||
{{static_cast<std::uint32_t>(spv::BuiltIn::FragCoord)}});
|
||||
|
||||
mInterfaces.push_back(mFragCoord);
|
||||
return mFragCoord;
|
||||
|
|
|
|||
|
|
@ -3288,7 +3288,8 @@ void convertMimg(Fragment &fragment, Mimg inst) {
|
|||
fragment.registers->pc += Mimg::kMinInstSize * sizeof(std::uint32_t);
|
||||
switch (inst.op) {
|
||||
case Mimg::Op::IMAGE_GET_RESINFO: {
|
||||
auto image = fragment.createImage(RegisterId::Raw(inst.srsrc << 2), inst.r128);
|
||||
auto image =
|
||||
fragment.createImage(RegisterId::Raw(inst.srsrc << 2), inst.r128);
|
||||
spirv::Value values[4];
|
||||
auto uint32T = fragment.context->getUInt32Type();
|
||||
|
||||
|
|
@ -3314,13 +3315,15 @@ void convertMimg(Fragment &fragment, Mimg inst) {
|
|||
|
||||
for (std::size_t dstOffset = 0, i = 0; i < 4; ++i) {
|
||||
if (inst.dmask & (1 << i)) {
|
||||
fragment.setVectorOperand(inst.vdata + dstOffset++, {uint32T, values[i]});
|
||||
fragment.setVectorOperand(inst.vdata + dstOffset++,
|
||||
{uint32T, values[i]});
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Mimg::Op::IMAGE_SAMPLE: {
|
||||
auto image = fragment.createImage(RegisterId::Raw(inst.srsrc << 2), inst.r128);
|
||||
auto image =
|
||||
fragment.createImage(RegisterId::Raw(inst.srsrc << 2), inst.r128);
|
||||
auto sampler = fragment.createSampler(RegisterId::Raw(inst.ssamp << 2));
|
||||
auto coord0 = fragment.getVectorOperand(inst.vaddr, TypeId::Float32).value;
|
||||
auto coord1 =
|
||||
|
|
@ -3342,8 +3345,9 @@ void convertMimg(Fragment &fragment, Mimg inst) {
|
|||
for (std::uint32_t dstOffset = 0, i = 0; i < 4; ++i) {
|
||||
if (inst.dmask & (1 << i)) {
|
||||
fragment.setVectorOperand(
|
||||
inst.vdata + dstOffset++, {floatT, fragment.builder.createCompositeExtract(
|
||||
floatT, value, {{i}})});
|
||||
inst.vdata + dstOffset++,
|
||||
{floatT,
|
||||
fragment.builder.createCompositeExtract(floatT, value, {{i}})});
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
@ -3353,8 +3357,8 @@ void convertMimg(Fragment &fragment, Mimg inst) {
|
|||
auto intT = fragment.context->getUInt32Type();
|
||||
for (std::uint32_t dstOffset = 0, i = 0; i < 4; ++i) {
|
||||
if (inst.dmask & (1 << i)) {
|
||||
fragment.setVectorOperand(
|
||||
inst.vdata + dstOffset++, {intT, fragment.context->getUInt32(0)});
|
||||
fragment.setVectorOperand(inst.vdata + dstOffset++,
|
||||
{intT, fragment.context->getUInt32(0)});
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
@ -3457,19 +3461,19 @@ void convertExp(Fragment &fragment, Exp inst) {
|
|||
|
||||
auto resultType = fragment.context->getFloat32x4Type();
|
||||
auto floatType = fragment.context->getFloat32Type();
|
||||
/*
|
||||
if (inst.en != 0xf) {
|
||||
auto prevValue = fragment.getExportTarget(inst.target, TypeId::Float32x4);
|
||||
if (prevValue) {
|
||||
for (std::uint32_t i = 0; i < 4; ++i) {
|
||||
if (~inst.en & (1 << i)) {
|
||||
exports[i] = fragment.builder.createCompositeExtract(
|
||||
floatType, prevValue.value, {{i}});
|
||||
/*
|
||||
if (inst.en != 0xf) {
|
||||
auto prevValue = fragment.getExportTarget(inst.target, TypeId::Float32x4);
|
||||
if (prevValue) {
|
||||
for (std::uint32_t i = 0; i < 4; ++i) {
|
||||
if (~inst.en & (1 << i)) {
|
||||
exports[i] = fragment.builder.createCompositeExtract(
|
||||
floatType, prevValue.value, {{i}});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
||||
auto value = fragment.builder.createCompositeConstruct(resultType, exports);
|
||||
fragment.setExportTarget(inst.target, {resultType, value});
|
||||
|
|
@ -3535,7 +3539,6 @@ void convertVop1(Fragment &fragment, Vop1 inst) {
|
|||
break;
|
||||
}
|
||||
|
||||
|
||||
case Vop1::Op::V_FRACT_F32: {
|
||||
auto src = spirv::cast<spirv::FloatValue>(
|
||||
fragment.getScalarOperand(inst.src0, TypeId::Float32).value);
|
||||
|
|
@ -5412,8 +5415,7 @@ Value amdgpu::shader::Fragment::getRegister(RegisterId id) {
|
|||
return result;
|
||||
}
|
||||
|
||||
Value amdgpu::shader::Fragment::getRegister(RegisterId id,
|
||||
spirv::Type type) {
|
||||
Value amdgpu::shader::Fragment::getRegister(RegisterId id, spirv::Type type) {
|
||||
auto result = getRegister(id);
|
||||
|
||||
if (!result) {
|
||||
|
|
|
|||
|
|
@ -268,7 +268,8 @@ void Function::insertReturn() {
|
|||
exitFragment.builder.createStore(valuePointer, value.value);
|
||||
}
|
||||
|
||||
auto resultValue = exitFragment.builder.createLoad(resultType, resultVariable);
|
||||
auto resultValue =
|
||||
exitFragment.builder.createLoad(resultType, resultVariable);
|
||||
|
||||
exitFragment.builder.createReturnValue(resultValue);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3013,8 +3013,8 @@ void amdgpu::shader::Mtbuf::dump() const {
|
|||
printScalarOperand(soffset, inst + instSize);
|
||||
printf(" #offset=%x,offen=%x,idxen=%x,glc=%x,op=%x,dfmt=%x,nfmt=%x,vaddr=%x,"
|
||||
"vdata=%x,srsrc=%x,slc=%x,tfe=%x,soffset=%x",
|
||||
offset, offen, idxen, glc, (unsigned)op, dfmt, nfmt, vaddr, vdata, srsrc, slc,
|
||||
tfe, soffset);
|
||||
offset, offen, idxen, glc, (unsigned)op, dfmt, nfmt, vaddr, vdata,
|
||||
srsrc, slc, tfe, soffset);
|
||||
}
|
||||
void amdgpu::shader::Mimg::dump() const {
|
||||
int instSize = kMinInstSize;
|
||||
|
|
|
|||
|
|
@ -39,20 +39,35 @@ amdgpu::shader::RegisterState::getRegister(RegisterId regId) {
|
|||
util::unreachable();
|
||||
}
|
||||
|
||||
void amdgpu::shader::RegisterState::setRegister(RegisterId regId,
|
||||
Value value) {
|
||||
void amdgpu::shader::RegisterState::setRegister(RegisterId regId, Value value) {
|
||||
auto offset = regId.getOffset();
|
||||
|
||||
if (regId.isScalar()) {
|
||||
switch (offset) {
|
||||
case 0 ... 103: sgprs[offset] = value; return;
|
||||
case 106: vccLo = value; return;
|
||||
case 107: vccHi = value; return;
|
||||
case 124: m0 = value; return;
|
||||
case 126: execLo = value; return;
|
||||
case 127: execHi = value; return;
|
||||
case 253: scc = value; return;
|
||||
case 254: ldsDirect = value; return;
|
||||
case 0 ... 103:
|
||||
sgprs[offset] = value;
|
||||
return;
|
||||
case 106:
|
||||
vccLo = value;
|
||||
return;
|
||||
case 107:
|
||||
vccHi = value;
|
||||
return;
|
||||
case 124:
|
||||
m0 = value;
|
||||
return;
|
||||
case 126:
|
||||
execLo = value;
|
||||
return;
|
||||
case 127:
|
||||
execHi = value;
|
||||
return;
|
||||
case 253:
|
||||
scc = value;
|
||||
return;
|
||||
case 254:
|
||||
ldsDirect = value;
|
||||
return;
|
||||
}
|
||||
|
||||
util::unreachable();
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ std::size_t amdgpu::shader::TypeId::getElementsCount() const {
|
|||
case TypeId::Float32:
|
||||
case TypeId::Float64:
|
||||
return 1;
|
||||
|
||||
|
||||
case TypeId::UInt32x2:
|
||||
return 2;
|
||||
case TypeId::UInt32x3:
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
void scf::Block::eraseFrom(Node *endBefore) {
|
||||
mEnd = endBefore->getPrev();
|
||||
if (mEnd != nullptr) {
|
||||
if (mEnd != nullptr) {
|
||||
mEnd->mNext = nullptr;
|
||||
} else {
|
||||
mBegin = nullptr;
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 */);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
#include <utility>
|
||||
#include <functional>
|
||||
#include <utility>
|
||||
|
||||
namespace orbis {
|
||||
inline namespace utils {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
#include "bridge.hpp"
|
||||
|
||||
amdgpu::bridge::BridgePusher rx::bridge;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,7 @@
|
|||
#include <string>
|
||||
#include <unistd.h>
|
||||
|
||||
std::int64_t io_device_instance_close(IoDeviceInstance *instance) {
|
||||
return 0;
|
||||
}
|
||||
std::int64_t io_device_instance_close(IoDeviceInstance *instance) { return 0; }
|
||||
|
||||
void io_device_instance_init(IoDevice *device, IoDeviceInstance *instance) {
|
||||
if (instance->device == nullptr) {
|
||||
|
|
@ -54,7 +52,8 @@ static std::int64_t host_io_device_instance_close(IoDeviceInstance *instance) {
|
|||
return io_device_instance_close(instance);
|
||||
}
|
||||
|
||||
static std::int32_t host_io_open(IoDevice *device, orbis::Ref<IoDeviceInstance> *instance,
|
||||
static std::int32_t host_io_open(IoDevice *device,
|
||||
orbis::Ref<IoDeviceInstance> *instance,
|
||||
const char *path, std::uint32_t flags,
|
||||
std::uint32_t mode) {
|
||||
auto hostDevice = static_cast<HostIoDevice *>(device);
|
||||
|
|
@ -99,7 +98,8 @@ static std::int32_t host_io_open(IoDevice *device, orbis::Ref<IoDeviceInstance>
|
|||
}
|
||||
|
||||
if (flags != 0) {
|
||||
std::fprintf(stderr, "host_io_open: ***ERROR*** Unhandled open flags %x\n", flags);
|
||||
std::fprintf(stderr, "host_io_open: ***ERROR*** Unhandled open flags %x\n",
|
||||
flags);
|
||||
}
|
||||
|
||||
int hostFd = ::open(realPath.c_str(), realFlags, 0777);
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@ struct IoDevice : orbis::RcBase {
|
|||
std::uint32_t mode) = nullptr;
|
||||
};
|
||||
|
||||
|
||||
std::int64_t io_device_instance_close(IoDeviceInstance *instance);
|
||||
void io_device_instance_init(IoDevice *device, IoDeviceInstance *instance);
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue