1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.1.0 for Windows"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<TITLE>OS_GetLockID</TITLE> 8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 9</HEAD> 10<BODY> 11<H1 align="left">OS_GetLockID <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></H1> 12<H2>Syntax</H2> 13<DL> 14 <DD> 15<PRE><CODE>#include <nitro/os.h></CODE></PRE> 16 <PRE><CODE>s32 OS_GetLockID( void );</CODE> 17</PRE> 18</DL> 19<H2>Arguments</H2> 20<P>None.</P> 21<H2>Return Values</H2> 22<P>This is an unused ID. It produces an error for <CODE>OS_LOCK_ID_ERROR</CODE>. The ID itself is <CODE>u16</CODE> data, but because of the error detection, the return value has <CODE>s32</CODE> format.</P> 23<H2>Description</H2> 24<P>Obtains an unused ID The ID is obtained using this function so that IDs will not overlap with the <CODE>OS_Lock*</CODE> function.</P> 25<P>If there are unused IDs, one can be obtained in the 0x40 to 0x6F range (ARM9 environment) or in the 0x80 to 0xAF range (ARM7 environment). For any processor, when an ID cannot be obtained (conceivably because there are no openings), <CODE>OS_LOCK_ID_ERROR</CODE> is returned. Note also that this value is a negative number.</P> 26<P>If an ID is not needed, release it using <CODE><a href="OS_ReleaseLockID.html">OS_ReleaseLockID()</a></CODE>. If all IDs are already assigned, <CODE>OS_GetLockID()</a></CODE> will not return an ID value until one is released.</P> 27<H2>See Also</H2> 28<P><CODE><A href="OS_ReleaseLockID.html">OS_ReleaseLockID</A><BR></CODE></P> 29<H2>Revision History</H2> 30<P>2008/11/06 Corrected range of available values for ARM9.<BR>2004/07/22 Added mention that ID is u16.<BR>2004/06/21 Initial version.</P> 31<hr><p>CONFIDENTIAL</p></body> 32</HTML>