Previous Index Next

EQ - Compare Accesses

C Syntax

long *sysEQ(long *vp, unsigned int n)

Per-Thread Stack

Description

The EQ system call is used to compare an access to an entity (object, type, group or transaction) to one or more other accesses to determine if they point to the same entity.

The tested access is compared sequentially with the argument accesses, starting from the topmost one. If none of them point to the same entity EQ returns zero; otherwise it returns the number of matching access (starting from 1 for one on top of the stack).

After comparison is done EQ removes the argument accesses from the stack, leaving only the access which was tested. This access in not changed in any way.

Note that EQ does not check lifetime or protection bits of the access; it will compare expired accesses just as well as live ones.

Result Code

In case of successful execution EQ returns the number of the argument which matched the tested access has highest-priority event pending (starting from 1 for the topmost argument). If no matching access was found EQ sets the result code to 0.

If parameter n is less than 1 EQ returns error code ERR_EQ_ARG.

If stack contains less than n+1 accesses EQ returns error code ERR_EMPTY_STACK.


Previous Index Next