Family of src/nx/nn/hooks.hook. The hooks_off setting turns a family off by its name.
nn::os's light events, semaphores and message queues (os_sync.c) whole, their waits and signals the kernel's address arbiter's with no SVC: their words keep the SDK's protocol, so each function may be left to the game's code alone. Under native_os_sync as the os_sync family, for its waits a save state can't hold
LightEventType as each SDK's InitializeLightEvent lays it out: the waiter word first up to 12.3.1, after the flags from 13.3.0 (games of 6.5.0 to 12.3.1 and of 13.3.0 to 18.3.2 looked at). A module of a version between, or of no known version, runs the SDK's own light event code. The SDK before 13 clears all 12 bytes first
struct nn::os::LightEventType SDK >= 6.5.0, <= 12.3.1 source| Field | Type | Offset |
|---|---|---|
| waiter | u32 | 0x0 |
| auto_clear | bool | 0x4 |
| initialized | bool | 0x5 |
Size 0xc.
struct nn::os::LightEventType SDK >= 13.3.0 source| Field | Type | Offset |
|---|---|---|
| auto_clear | bool | 0x0 |
| initialized | bool | 0x1 |
| waiter | u32 | 0x4 |
Size 0x8.
nn::os::InitializeLightEvent(nn::os::LightEventType*, bool, nn::os::EventClearMode) SDK >= 6.5.0, <= 12.3.1 source_ZN2nn2os20InitializeLightEventEPNS0_14LightEventTypeEbNS0_14EventClearModeE
As C: void (addr e, bool signaled, u32 mode)
Handler: os_light_event_init_old (os_sync.c)
Uses: nn::os::LightEventType
nn::os::InitializeLightEvent(nn::os::LightEventType*, bool, nn::os::EventClearMode) SDK >= 13.3.0 source_ZN2nn2os20InitializeLightEventEPNS0_14LightEventTypeEbNS0_14EventClearModeE
As C: void (addr e, bool signaled, u32 mode)
Handler: os_light_event_init (os_sync.c)
Uses: nn::os::LightEventType
nn::os::SignalLightEvent(nn::os::LightEventType*) source_ZN2nn2os16SignalLightEventEPNS0_14LightEventTypeE
As C: void (addr e)
Handler: os_light_event_signal (os_sync.c)
Uses: nn::os::LightEventType
nn::os::ClearLightEvent(nn::os::LightEventType*) source_ZN2nn2os15ClearLightEventEPNS0_14LightEventTypeE
As C: void (addr e)
Handler: os_light_event_clear (os_sync.c)
Uses: nn::os::LightEventType
nn::os::WaitLightEvent(nn::os::LightEventType*) source_ZN2nn2os14WaitLightEventEPNS0_14LightEventTypeE
As C: void (addr e)
Handler: os_light_event_wait (os_sync.c)
Uses: nn::os::LightEventType
nn::os::TryWaitLightEvent(nn::os::LightEventType*) source_ZN2nn2os17TryWaitLightEventEPNS0_14LightEventTypeE
As C: bool (addr e)
Handler: os_light_event_try_wait (os_sync.c)
Uses: nn::os::LightEventType
nn::os::AcquireLightSemaphore(nn::os::LightSemaphoreType*) source_ZN2nn2os21AcquireLightSemaphoreEPNS0_18LightSemaphoreTypeE
As C: void (addr s)
Handler: os_light_sem_acquire (os_sync.c)
nn::os::TryAcquireLightSemaphore(nn::os::LightSemaphoreType*) source_ZN2nn2os24TryAcquireLightSemaphoreEPNS0_18LightSemaphoreTypeE
As C: bool (addr s)
Handler: os_light_sem_try_acquire (os_sync.c)
nn::os::ReleaseLightSemaphore(nn::os::LightSemaphoreType*) source_ZN2nn2os21ReleaseLightSemaphoreEPNS0_18LightSemaphoreTypeE
As C: void (addr s)
Handler: os_light_sem_release (os_sync.c)
nn::os::ReleaseLightSemaphore(nn::os::LightSemaphoreType*, int) source_ZN2nn2os21ReleaseLightSemaphoreEPNS0_18LightSemaphoreTypeEi
As C: void (addr s, i32 count)
Handler: os_light_sem_release_n (os_sync.c)
nn::os::ReceiveLightMessageQueue(unsigned long*, nn::os::LightMessageQueueType*) source_ZN2nn2os24ReceiveLightMessageQueueEPmPNS0_21LightMessageQueueTypeE
As C: void (addr out, addr q)
Handler: os_lmq_receive (os_sync.c)
nn::os::TryReceiveLightMessageQueue(unsigned long*, nn::os::LightMessageQueueType*) source_ZN2nn2os27TryReceiveLightMessageQueueEPmPNS0_21LightMessageQueueTypeE
As C: bool (addr out, addr q)
Handler: os_lmq_try_receive (os_sync.c)
nn::os::TrySendLightMessageQueue(nn::os::LightMessageQueueType*, unsigned long) source_ZN2nn2os24TrySendLightMessageQueueEPNS0_21LightMessageQueueTypeEm
As C: bool (addr q, u64 msg)
Handler: os_lmq_try_send (os_sync.c)
Made from ScarletNX's Sail at 166ad3910f80. The hooks' and the SVCs' declarations and their handlers are ScarletNX's (GPL-3.0-or-later); the SVCs' declarations are Eden's, as hos.svc says.