osSetEventMesg osSetEventMesg (function)

Associates a message queue and message with an event

Syntax

#include <ultra64.h>     /* ultra64.h */
void osSetEventMesg(OSEvent e, OSMesgQueue *mq, OSMesg m);

Description

osSetEventMesg associates a message queue and message with an event, which usually corresponds to an interrupt or an exception of some kind. When an event occurs, the message registered with osSetEventMesg is sent to the associated message queue. The message sending is of the non-blocking form; if the message queue is full, the message is dropped.

The following events are supported:

OS_EVENT_SW1
CPU software interrupt 1; although supported by the CPU, this is not expected to be widely used.

OS_EVENT_SW2
CPU software interrupt 2; not expected to be widely used.

OS_EVENT_CART
Indy has written to GIO bus register; intended for use by the rmon debugger program.

OS_EVENT_COUNTER
CPU COUNT register has reached COMPARE value; intended for use by the VI or Timer manager.

OS_EVENT_SP
Signal Processor (SP) interrupt; intended for application use to indicate SP task completion.

OS_EVENT_SI
Serial Interface (SI) interrupt; intended for application use to indicate Controller input is available.

OS_EVENT_AI
Audio Interface (AI) interrupt; intended for application use to indicate that the audio buffer has been consumed.

OS_EVENT_VI
Video Interface (VI) interrupt; intended for application use to indicate vertical retrace.

OS_EVENT_PI
Parallel Interface (PI) interrupt to indicate that DMA is finished; intended for use by the PI manager.

OS_EVENT_DP
Display Processor (DP) interrupt triggered by the DP FullSync command

OS_EVENT_PRENMI
An NMI has been requested and will occur in 0.5 seconds; intended for application use to begin graceful shutdown.

OS_EVENT_SP_BREAK
The SP has hit a breakpoint; intended for use by the rmon program.

OS_EVENT_FAULT
The CPU has encountered an unrecoverable exception; intended for use by the rmon debugger program.

OS_EVENT_THREADSTATUS
A thread has been created or destroyed; intended for use by the rmon debugger program.

See Also

osCreateMesgQueue, osSendMesg, osSpTaskLoad, osContInit, osAiSetNextBuffer, osViSetEvent, osPiStartDma, and osDpSetNextBuffer

Revision History

1999/04/30 Changed format