psl1ght
A free SDK for Sony's PS3 console
|
Event queue management functions. More...
#include <ppu-lv2.h>
Go to the source code of this file.
Data Structures | |
struct | sys_event_queue_attr |
Data structure for create attributes for an event queue. More... | |
struct | sys_event |
Data structure for received event data. More... | |
Macros | |
#define | SYS_EVENT_QUEUE_PPU 0x01 |
Event queue type PPU. | |
#define | SYS_EVENT_QUEUE_SPU 0x02 |
Event queue type SPU. | |
#define | SYS_EVENT_QUEUE_FIFO 0x01 |
Synchronize event queue FIFO. | |
#define | SYS_EVENT_QUEUE_PRIO 0x02 |
Synchronize event queue PRIO. | |
#define | SYS_EVENT_QUEUE_PRIO_INHERIT 0x03 |
Synchronize event queue PRIO_INHERIT. | |
#define | SYS_EVENT_PORT_LOCAL 0x01 |
Event port type LOCAL. | |
#define | SYS_EVENT_PORT_NO_NAME 0x00 |
Used to auto create a port name. | |
#define | SYS_EVENT_QUEUE_KEY_LOCAL 0x00 |
Used to auto create a event queue key. | |
Typedefs | |
typedef struct sys_event_queue_attr | sys_event_queue_attr_t |
Data structure for create attributes for an event queue. | |
typedef struct sys_event | sys_event_t |
Data structure for received event data. | |
Functions | |
LV2_SYSCALL | sysEventQueueCreate (sys_event_queue_t *eventQ, sys_event_queue_attr_t *attrib, sys_ipc_key_t key, s32 size) |
Create an event queue. More... | |
LV2_SYSCALL | sysEventQueueDestroy (sys_event_queue_t eventQ, s32 mode) |
Destroy an event queue. More... | |
LV2_SYSCALL | sysEventQueueReceive (sys_event_queue_t eventQ, sys_event_t *event, u64 timeout_usec) |
Receive an event from an event queue. More... | |
LV2_SYSCALL | sysEventQueueDrain (sys_event_queue_t eventQ) |
Drain an event queue. More... | |
LV2_SYSCALL | sysEventPortCreate (sys_event_port_t *portId, int portType, u64 name) |
Create an event port. More... | |
LV2_SYSCALL | sysEventPortDestroy (sys_event_port_t portId) |
Destroys an event port. More... | |
LV2_SYSCALL | sysEventPortSend (sys_event_port_t portId, u64 data0, u64 data1, u64 data2) |
Send an event. More... | |
LV2_SYSCALL | sysEventPortConnectLocal (sys_event_port_t portId, sys_event_queue_t eventQ) |
Connect an event port to an event queue in the same process. More... | |
LV2_SYSCALL | sysEventPortDisconnect (sys_event_port_t portId) |
Disconnect an event port from an event queue. More... | |
Event queue management functions.
LV2_SYSCALL sysEventPortConnectLocal | ( | sys_event_port_t | portId, |
sys_event_queue_t | eventQ | ||
) |
Connect an event port to an event queue in the same process.
portId | The event port id. |
eventQ | The event queue id. |
LV2_SYSCALL sysEventPortCreate | ( | sys_event_port_t * | portId, |
int | portType, | ||
u64 | name | ||
) |
Create an event port.
This function creates an event port for sending events thru a connected event queue.
portId | Pointer to receive the event port id. |
portType | Type of the port to create. Possible values: |
name | User defined name or SYS_EVENT_PORT_NO_NAME. |
LV2_SYSCALL sysEventPortDestroy | ( | sys_event_port_t | portId | ) |
Destroys an event port.
portId | Event port id of the event port to be destroyed. |
LV2_SYSCALL sysEventPortDisconnect | ( | sys_event_port_t | portId | ) |
Disconnect an event port from an event queue.
portId | The event port id. |
LV2_SYSCALL sysEventPortSend | ( | sys_event_port_t | portId, |
u64 | data0, | ||
u64 | data1, | ||
u64 | data2 | ||
) |
Send an event.
This function sends an event to the event queue that is connected with the specified event port. Three additional 64-bit data can be sent with the event.
portId | Event port id. |
data0 | Additional data. |
data1 | Additional data. |
data2 | Additional data. |
LV2_SYSCALL sysEventQueueCreate | ( | sys_event_queue_t * | eventQ, |
sys_event_queue_attr_t * | attrib, | ||
sys_ipc_key_t | key, | ||
s32 | size | ||
) |
Create an event queue.
eventQ | Pointer to receive the event queue id. |
attrib | Pointer to attribute structure. |
key | Key to be used with this event queue. |
size | Initial size of the event queue. |
LV2_SYSCALL sysEventQueueDestroy | ( | sys_event_queue_t | eventQ, |
s32 | mode | ||
) |
Destroy an event queue.
eventQ | The event queue id. |
mode | Destroy mode (0: normal). |
LV2_SYSCALL sysEventQueueDrain | ( | sys_event_queue_t | eventQ | ) |
Drain an event queue.
This function removes all pending events in the queue, making it empty.
eventQ | The event queue id. |
LV2_SYSCALL sysEventQueueReceive | ( | sys_event_queue_t | eventQ, |
sys_event_t * | event, | ||
u64 | timeout_usec | ||
) |
Receive an event from an event queue.
The current thread blocks until an event is received or the timeout period (in microseconds) has been reached.
eventQ | The event queue id. |
event | Pointer to a structure for received event data. |
timeout_usec | Timeout period, or 0 for no timeout. |