# OS_UnlockCartridge

## C Specification

      #include <nitro/os.h>

      s32 OS_UnlockCartridge( u16 lockID );

## Description

Releases a lock and passes shared resource access rights to a sub-processor

When the unlock succeeds, it accesses the `EXMEMCNT` register and obtains access rights to the card bus.

When executed on an unlocked module (when trying to release with an ID different from the one that is currently locked), the lock will not be released. It will return an `OS_UNLOCK_ERROR`.

## Arguments

`lockID` | ID used to lock a cartridge.

## Return Value

`OS_UNLOCK_SUCCESS` indicates that the lock was successfully released. (Defined as `0`.)

`OS_UNLOCK_ERROR` indicates that there was a lock release error. (Defined as a negative number.)

## Internal Operation

Accesses `EXMEMCNT(0x4000204)` of the IO register.

## See Also

`OS_LockCartridge, OS_TryLockCartridge, OS_UnlockCard, OS_GetLockID`

## Revision History

11/04/2004 Added Internal Operation description.
07/23/2004 `OS_UnLockCard` changed to `OS_UnlockCard`
07/22/2004 Argument format changed from `u32` to `u16`.
06/21/2004 Initial version