#include <nitro/os.h>
s32 OS_GetLockID( void );
Obtains an unused ID
The ID is obtained using this function so that IDs will not overlap with the OS_Lock* function.
If there are unused IDs, one may be obtained in the 0x60 – 0x6F range for the ARM9 environment and in the 0x80 – 0xAF range for ARM7. For any processor, when an ID cannot be obtained (conceivably because there are no openings), OS_LOCK_ID_ERROR is returned. Note also that this value is a negative number.
If an ID is not needed, release it using OS_ReleaseLockID().
If all IDs are already assigned, OS_GetLockID() will not return an ID value until one is released.
This is an unused ID. It produces an error for OS_LOCK_ID_ERROR.
The ID itself is u16 data, but because of the error detection, the return value has s32 format.
07/22/2004 Noted that the ID is u16
06/21/2004 Initial version