SWI_andn
2-428
C Interface
Syntax
SWI_andn(swi, mask);
Parameters
SWI_Handle swi;
/* SWI object handle*/
Uns
mask
/* inverse value to be ANDed */
Return Value
Void
Reentrant
yes
Description
SWI_andn is used to conditionally post a software interrupt. SWI_andn
clears the bits specified by a mask from SWI’s internal mailbox. If SWI’s
mailbox becomes 0, SWI_andn posts the SWI. The bitwise logical
operation performed is:
mailbox = mailbox AND (NOT MASK)
For example, if multiple conditions that all be met before a SWI can run,
you should use a different bit in the mailbox for each condition. When a
condition is met, clear the bit for that condition.
SWI_andn results in a context switch if the SWI's mailbox becomes zero
and the SWI has higher priority than the currently executing thread.
You specify a SWI’s initial mailbox value in the configuration. The mailbox
value is automatically reset when the SWI executes.
Note:
Use the specialized version, SWI_andnHook, when SWI_andn
functionality is required for a DSP/BIOS object hook function.
SWI_andn
Clear bits from SWI’s mailbox and post if mailbox becomes 0