LCK_create
2-178
C Interface
Syntax
lock = LCK_create(attrs);
Parameters
LCK_Attrs
attrs;
/* pointer to lock attributes */
Return Value
LCK_Handle lock;
/* handle for new lock object */
Description
LCK_create creates a new lock object and returns its handle. The lock
has no current owner and its corresponding resource is available for
acquisition through LCK_pend.
If attrs is NULL, the new lock is assigned a default set of attributes.
Otherwise the lock’s attributes are specified through a structure of type
LCK_Attrs.
Note:
At present, no attributes are supported for lock objects.
All default attribute values are contained in the constant LCK_ATTRS,
which can be assigned to a variable of type LCK_Attrs prior to calling
LCK_create.
LCK_create calls MEM_alloc to dynamically create the object’s data
structure. MEM_alloc must acquire a lock to the memory before
proceeding. If another thread already holds a lock to the memory, then
there is a context switch. The segment from which the object is allocated
is described by the DSP/BIOS objects property in the MEM Module, page
2–205.
Constraints and
Calling Context
❏
LCK_create cannot be called from a SWI or HWI.
❏
You can reduce the size of your application program by creating
objects with Tconf rather than using the XXX_create functions.
See Also
LCK_create
Create a resource lock