MEM_undefine
Application Program Interface
2-227
C Interface
Syntax
MEM_undefine(segid);
Parameters
Int
segid;
/* segment to undefine */
Return Value
Void
Reentrant
yes
Description
MEM_undefine removes a memory segment from the internal memory
tables. Once a memory segment has been undefined, the segid cannot
be used in any of the MEM APIs (except MEM_stat). Note: The undefined
segid might later be returned by a subsequent MEM_define call.
MEM_undefine internally locks the memory by calling LCK_pend and
LCK_post. If another task already holds a lock to the memory, there is a
context switch. For this reason, MEM_undefine cannot be called from the
context of a SWI or HWI. It can be called from main() or a TSK. The
duration that the API holds the memory lock is variable.
Constraints and
Calling Context
❏
Do not call from the context of a SWI or HWI.
❏
MEM_undefine does not free the actual memory buffer managed by
the memory segment.
See Also
MEM_undefine
Undefine an existing memory segment