Changes

783 bytes added ,  23:28, 15 April 2020
IEventObserver
Line 118: Line 118:  
Error 0x6E4 is returned when there is no application process.
 
Error 0x6E4 is returned when there is no application process.
   −
== BoostSystemMemoryResourceLimit
+
== BoostSystemMemoryResourceLimit ==
    
This takes in a u64 mem_size, and uses it as input to pm:shell->BoostSystemMemoryResourceLimit
 
This takes in a u64 mem_size, and uses it as input to pm:shell->BoostSystemMemoryResourceLimit
Line 127: Line 127:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 0 || [[#GetEventHandle]]
+
| 0 || [[#GetProcessEventHandle]]
 
|-
 
|-
| 1 || [[#GetEventInfo]]
+
| 1 || [[#GetProcessEventInfo]]
 
|}
 
|}
 +
 +
 +
== ProcessEventInfo ==
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x8
 +
| ProcessId
 +
|-
 +
| 0x8
 +
| 0x4
 +
| ProcessEvent
 +
|-
 +
| 0xC
 +
| 0x4
 +
| Padding/Reserved
 +
|-
 +
|}
 +
 +
=== GetEventHandle ===
 +
 +
This takes no input and returns an output copy event handle.
 +
 +
=== GetEventInfo ===
 +
 +
This takes no input and attempts to receive a [[#ProcessEventInfo]] from the observer's message queue.
 +
 +
Every time a process event occurs, pgl receives the event from PM (it does pm:shell->GetProcessEventHandle() during startup and has a thread looping pm:shell->GetProcessEventInfo() to track process events.
 +
 +
PGL sends to all observers' message queues a [[#ProcessEventInfo]] for each event it receives, thus allowing for multiple subscribers to process events.