OSPeekMessage

Syntax

#include <cafe/os.h>
    
BOOL OSPeekMessage( OSMessageQueue* mq, OSMessage* msg);

Parameters

mq Pointer to message queue.
msg Pointer to the message struct being received.

Return Values

Returns TRUE if a message was copied. Returns FALSE otherwise.

Description

Checks to see if there is a message in the queue and copies the first message to the variable msg. The message is copied but not removed from the queue.

Demo

A demo of the usage of OSPeekMessage is available at:

$CAFE_ROOT/system/src/demo/os/basic/usage_of_peek_message.c

Do Not Call From

Callbacks Do not call this function from any callback function.

See Also

OSInitMessageQueue
OSSendMessage

Revision History

2014/02/19 Initial version.


CONFIDENTIAL