N64® Functions Menu

al - Audio Library Functions
gDP - DP GBI Macros
gdSP - General GBI Macros
gSP - SP GBI Macros
gt - Turbo Microcode RDP
gu - Graphics Utilities
Math - Math Functions
nuSys - NuSystem
os - N64 Operating System
sp - Sprite Library Functions
uh - Host to Target IO
64DD - N64 Disk Drive

Nintendo® Confidential

   

osSetEventMesg

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


What This Function Does
It 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; intended for application use to indicate the end of display processing.
  • 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_CPU_BREAK - The CPU has hit a breakpoint; intended for use by the rmon debugger program.
  • OS_EVENT_SP_BREAK - The SP has hit a breakpoint; intended for use by the rmon debugger 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
osDpSetNextBuffer



Nintendo® Confidential

Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.


Copyright © 1998
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last updated January 1998