#include <cafe/os.h>

BOOL OSWaitRendezvous(OSRendezvous* ren, u32 wmask);


ren OSRendezvous on which to wait. OSRendezvous must be initialized prior to calling this function.
wmask Mask applied that determines which processor cores to wait upon.

Return Values

Returns TRUE if the OSRendezvous was successful.


Causes the thread or task to busy-wait until the specified set of processor cores all reach the OSRendezvous. The wmask flags for OSWaitRendezvous are not what cores that should wait, but what cores the current core should wait for. When a core enters OSWaitRendezvous, it sets its own core flag, and then waits for the flags specified by wmask to be set.

To guard against reinitialization of a rendezvous, a second rendezvous may be used:

OSWaitRendezvous(rendezvous, OS_WAIT_CORE_MAIN | OS_WAIT_CORE_SUB2);
OSWaitRendezvous(rendezvousReinit, OS_WAIT_CORE_MAIN | OS_WAIT_CORE_SUB2);

Using the double rendezvous insures that all cores pass the first rendezvous before initializing the first rendezvous.

The second rendezvous must be initialized before the first rendezvous is entered.

Failure to insure that all cores have passed the rendezvous before reinitializing the rendezvous data structure may cause a thread on a core other than the core reinitializing the rendezvous to miss the fact that all cores have reached rendezvous.

Do Not Call From

Multiple threads This function is not thread-safe.
Callbacks Do not call this function from any callback function.

See Also


Revision History

2013/05/08 Automated cleanup pass.
2012/08/01 Cleanup Pass.
2012/05/25 Matched actual prototype.
2010/08/23 Initial version.