mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-20 19:07:01 +02:00
kernel: use the AMPR filter for APR completion events
This commit is contained in:
@@ -564,7 +564,7 @@ int KYTY_SYSV_ABI KernelAddAmprEvent(KernelEqueue eq, int id, void* udata) {
|
||||
if (eq != KERNEL_EQUEUE_INVALID) {
|
||||
KernelEqueueEvent event {};
|
||||
event.event.ident = static_cast<uintptr_t>(id);
|
||||
event.event.filter = KERNEL_EVFILT_USER;
|
||||
event.event.filter = KERNEL_EVFILT_AMPR;
|
||||
event.event.flags = EV_ADD | EV_CLEAR;
|
||||
event.event.fflags = 0;
|
||||
event.event.data = 0;
|
||||
@@ -592,7 +592,7 @@ int KYTY_SYSV_ABI KernelDeleteAmprEvent(KernelEqueue eq, int id) {
|
||||
LOGF("\t AMPR event delete: eq = 0x%016" PRIx64 ", id = %d\n", static_cast<uint64_t>(eq), id);
|
||||
|
||||
if (eq != KERNEL_EQUEUE_INVALID) {
|
||||
(void)KernelDeleteEvent(eq, static_cast<uintptr_t>(id), KERNEL_EVFILT_USER);
|
||||
(void)KernelDeleteEvent(eq, static_cast<uintptr_t>(id), KERNEL_EVFILT_AMPR);
|
||||
}
|
||||
|
||||
return OK;
|
||||
|
||||
@@ -18,6 +18,7 @@ constexpr int16_t KERNEL_EVFILT_FILE = -4;
|
||||
constexpr int16_t KERNEL_EVFILT_GRAPHICS = -14;
|
||||
constexpr int16_t KERNEL_EVFILT_VIDEO_OUT = -13;
|
||||
constexpr int16_t KERNEL_EVFILT_HRTIMER = -15;
|
||||
constexpr int16_t KERNEL_EVFILT_AMPR = -25;
|
||||
|
||||
class KernelEqueuePrivate;
|
||||
struct KernelEqueueEvent;
|
||||
|
||||
@@ -1193,8 +1193,9 @@ static int ExecuteCommand(const CommandBufferState::Command& entry) {
|
||||
std::get_if<CommandBufferState::KernelEventCommand>(&entry.data)) {
|
||||
const auto& command = *payload;
|
||||
const auto eq = static_cast<LibKernel::EventQueue::KernelEqueue>(command.eq);
|
||||
auto result = LibKernel::EventQueue::KernelTriggerUserEvent(
|
||||
eq, command.id, reinterpret_cast<void*>(command.data));
|
||||
auto result = LibKernel::EventQueue::KernelTriggerEvent(
|
||||
eq, static_cast<uintptr_t>(command.id), LibKernel::EventQueue::KERNEL_EVFILT_AMPR,
|
||||
reinterpret_cast<void*>(command.data));
|
||||
if (result != OK) {
|
||||
LOGF("\tAPR submit event failed: eq=0x%016" PRIx64 ", id=%" PRId32
|
||||
", result=0x%08" PRIx32 "\n",
|
||||
|
||||
Reference in New Issue
Block a user