clang format
This commit is contained in:
parent
dbeed80e3b
commit
ce6a01bd41
|
@ -27,18 +27,15 @@ public:
|
||||||
explicit MntPoints() = default;
|
explicit MntPoints() = default;
|
||||||
~MntPoints() = default;
|
~MntPoints() = default;
|
||||||
|
|
||||||
void Mount(const std::filesystem::path& host_folder,
|
void Mount(const std::filesystem::path& host_folder, const std::string& guest_folder);
|
||||||
const std::string& guest_folder);
|
void Unmount(const std::filesystem::path& host_folder, const std::string& guest_folder);
|
||||||
void Unmount(const std::filesystem::path& host_folder,
|
|
||||||
const std::string& guest_folder);
|
|
||||||
void UnmountAll();
|
void UnmountAll();
|
||||||
|
|
||||||
std::filesystem::path GetHostPath(const std::string& guest_directory);
|
std::filesystem::path GetHostPath(const std::string& guest_directory);
|
||||||
|
|
||||||
const MntPair* GetMount(const std::string& guest_path) {
|
const MntPair* GetMount(const std::string& guest_path) {
|
||||||
const auto it = std::ranges::find_if(m_mnt_pairs, [&](const auto& mount) {
|
const auto it = std::ranges::find_if(
|
||||||
return guest_path.starts_with(mount.mount);
|
m_mnt_pairs, [&](const auto& mount) { return guest_path.starts_with(mount.mount); });
|
||||||
});
|
|
||||||
return it == m_mnt_pairs.end() ? nullptr : &*it;
|
return it == m_mnt_pairs.end() ? nullptr : &*it;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ public:
|
||||||
|
|
||||||
EventFlagInternal(const std::string& name, ThreadMode thread_mode, QueueMode queue_mode,
|
EventFlagInternal(const std::string& name, ThreadMode thread_mode, QueueMode queue_mode,
|
||||||
uint64_t bits)
|
uint64_t bits)
|
||||||
: m_name(name), m_thread_mode(thread_mode), m_queue_mode(queue_mode), m_bits(bits){};
|
: m_name(name), m_thread_mode(thread_mode), m_queue_mode(queue_mode), m_bits(bits) {};
|
||||||
|
|
||||||
int Wait(u64 bits, WaitMode wait_mode, ClearMode clear_mode, u64* result, u32* ptr_micros);
|
int Wait(u64 bits, WaitMode wait_mode, ClearMode clear_mode, u64* result, u32* ptr_micros);
|
||||||
int Poll(u64 bits, WaitMode wait_mode, ClearMode clear_mode, u64* result);
|
int Poll(u64 bits, WaitMode wait_mode, ClearMode clear_mode, u64* result);
|
||||||
|
|
|
@ -134,8 +134,7 @@ s32 PS4_SYSV_ABI sceKernelAddHRTimerEvent(SceKernelEqueue eq, int id, timespec*
|
||||||
event.timer = std::make_unique<boost::asio::steady_timer>(
|
event.timer = std::make_unique<boost::asio::steady_timer>(
|
||||||
io_context, std::chrono::microseconds(total_us - HrTimerSpinlockThresholdUs));
|
io_context, std::chrono::microseconds(total_us - HrTimerSpinlockThresholdUs));
|
||||||
|
|
||||||
event.timer->async_wait(
|
event.timer->async_wait(std::bind(SmallTimerCallback, std::placeholders::_1, eq, event.event));
|
||||||
std::bind(SmallTimerCallback, std::placeholders::_1, eq, event.event));
|
|
||||||
|
|
||||||
if (!eq->AddEvent(event)) {
|
if (!eq->AddEvent(event)) {
|
||||||
return ORBIS_KERNEL_ERROR_ENOMEM;
|
return ORBIS_KERNEL_ERROR_ENOMEM;
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#else
|
#else
|
||||||
#include <asm/prctl.h> /* Definition of ARCH_* constants */
|
#include <asm/prctl.h> /* Definition of ARCH_* constants */
|
||||||
#include <sys/syscall.h> /* Definition of SYS_* constants */
|
#include <sys/syscall.h> /* Definition of SYS_* constants */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
|
@ -93,12 +93,12 @@ static void PatchFsAccess(u8* code, const TLSPattern& tls_pattern, Xbyak::CodeGe
|
||||||
static u32 slot = 0;
|
static u32 slot = 0;
|
||||||
|
|
||||||
void SetTcbBase(void* image_address) {
|
void SetTcbBase(void* image_address) {
|
||||||
asm volatile("wrgsbase %0" :: "r" (image_address) : "memory");
|
asm volatile("wrgsbase %0" ::"r"(image_address) : "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
Tcb* GetTcbBase() {
|
Tcb* GetTcbBase() {
|
||||||
Tcb* tcb;
|
Tcb* tcb;
|
||||||
asm volatile("rdgsbase %0" : "=r" (tcb) :: "memory");
|
asm volatile("rdgsbase %0" : "=r"(tcb)::"memory");
|
||||||
return tcb;
|
return tcb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
namespace Shader::IR {
|
namespace Shader::IR {
|
||||||
|
|
||||||
template <typename Pred>
|
template <typename Pred>
|
||||||
auto BreadthFirstSearch(const Value& value, Pred&& pred)
|
auto BreadthFirstSearch(const Value& value,
|
||||||
-> std::invoke_result_t<Pred, const Inst*> {
|
Pred&& pred) -> std::invoke_result_t<Pred, const Inst*> {
|
||||||
if (value.IsImmediate()) {
|
if (value.IsImmediate()) {
|
||||||
// Nothing to do with immediates
|
// Nothing to do with immediates
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
|
|
|
@ -52,7 +52,7 @@ constexpr Type F64x2{Type::F64x2};
|
||||||
constexpr Type F64x3{Type::F64x3};
|
constexpr Type F64x3{Type::F64x3};
|
||||||
constexpr Type F64x4{Type::F64x4};
|
constexpr Type F64x4{Type::F64x4};
|
||||||
|
|
||||||
constexpr OpcodeMeta META_TABLE[]{
|
constexpr OpcodeMeta META_TABLE[] {
|
||||||
#define OPCODE(name_token, type_token, ...) \
|
#define OPCODE(name_token, type_token, ...) \
|
||||||
{ \
|
{ \
|
||||||
.name{#name_token}, \
|
.name{#name_token}, \
|
||||||
|
|
Loading…
Reference in New Issue