OSFastMutex_Init

Syntax

#include <cafe/os.h>

void OSFastMutex_Init (OSFastMutex* fastMutex, char* name);

Parameters

fastMutex Pointer to the mutex to initialize.
name Pointer to the fast mutex name, for debugging.

Return Values

None.

Description

Initializes the fast mutex that fastMutex specifies. Note that if the fast mutex specified is in use, attempting to initialize it results in a program error.

There are several major differences between a mutex and a fast mutex.

NOTE:
OSFastMutex_Init is not thread-safe because it is not safe to call OSFastMutex_Init on a mutex, if that mutex is in use in another thread. However, it is safe to call OSFastMutex_Init on a mutex, if that mutex is not currently in use on another thread.

Do Not Call From

Multiple threads This function is not thread-safe.

See Also

OSFastCond_Init
OSFastCond_Signal
OSFastCond_Wait
OSFastMutex_Lock
OSFastMutex_Unlock
OSFastMutex_TryLock

Revision History

2010/04/24 Initial version.


CONFIDENTIAL