Implement syncOnAddress ABIs (perf improvement)

This commit is contained in:
nmzik
2026-08-04 21:24:12 +02:00
parent a9ddd44d73
commit 00a5dd32c0
5 changed files with 617 additions and 19 deletions
+19
View File
@@ -0,0 +1,19 @@
#ifndef EMULATOR_INCLUDE_EMULATOR_KERNEL_SYNC_ON_ADDRESS_H_
#define EMULATOR_INCLUDE_EMULATOR_KERNEL_SYNC_ON_ADDRESS_H_
#include "common/abi.h"
#include "common/common.h"
namespace Libs::LibKernel::SyncOnAddress {
using signal_poll_func_t = void (*)();
int Wait32(volatile uint32_t* address, uint32_t expected, const uint32_t* timeout_micros,
signal_poll_func_t signal_poll = nullptr);
int Wait64(volatile uint64_t* address, uint64_t expected, const uint32_t* timeout_micros,
signal_poll_func_t signal_poll = nullptr);
int Wake(volatile void* address, int32_t count);
} // namespace Libs::LibKernel::SyncOnAddress
#endif /* EMULATOR_INCLUDE_EMULATOR_KERNEL_SYNC_ON_ADDRESS_H_ */