NAME | SYNOPSIS | API RESTRICTIONS | PARAMETERS | DESCRIPTION | RETURN VALUE | ERRORS | ATTRIBUTES | SEE ALSO
$(NUCLEUS_DIR)/lib/sysevent/sysevent.a #include <sysevent/chSysevent.h>intsyseventGetAny(int spaceId, KnTimeVal *waitLimit, KnSysevent **sysevent);
The function or functions documented here may not be used safely in all application contexts with all APIs provided in the ChorusOS 5.0 product.
See API(5FEA) for details.
handle pointing to the event space
timeout, if there is no free event buffer immediately address
address of a pointer to where the event buffer address is stored
The syseventGetAny() function returns the first system event with the highest priority pending behind any of the event queues belonging to the event space specified by spaceId.
If an event is waiting in any of the configured queues, this call sets the address of this event in sysevent and returns K_OK. Otherwise, syseventGetAny() may wait for the post of an event, according to the value of waitLimit. If waitLimit is set to K_NOBLOCK, syseventGetAny() immediately returns with a K_ETIMEOUT error code. Otherwise, the caller is blocked until an event is posted to one of the event queues by syseventPut(), or until the timeout expires.
If syseventGetAny() is called while other threads are already blocked, invoking syseventGet() on queues from the same event space, then an event posted to such a queue will be delivered to the thread invoking syseventGetAny(). In other words, the newly posted event is always delivered to syseventGetAny() despite previous, concurrent invocations of syseventGet().
K_OK is returned on successful completion. Otherwise, a negative error code is returned.
SpaceId is not valid
The maximum waiting time expired
The sysevent has a null value. Note that if this pointer is a non-accessible address, the caller actor crashes itself into the PRM or VM memory models. Otherwise, the FLM memory model can behave unpredictably.
The invoking thread was aborted while waiting for an event
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | API RESTRICTIONS | PARAMETERS | DESCRIPTION | RETURN VALUE | ERRORS | ATTRIBUTES | SEE ALSO