QP/C
Functions
qa_usub.c File Reference

QActive_unsubscribe() definition. More...

#include "qf_pkg.h"
#include "qassert.h"

Go to the source code of this file.

Functions

void QActive_unsubscribe (QActive const *me, QSignal sig)
 Un-subscribes from the delivery of signal sig to the active object me.

Detailed Description

QActive_unsubscribe() definition.

Definition in file qa_usub.c.


Function Documentation

void QActive_unsubscribe ( QActive const *  me,
QSignal  sig 
)

Un-subscribes from the delivery of signal sig to the active object me.

This function is part of the Publish-Subscribe event delivery mechanism available in QF. Un-subscribing from an event means that the framework will stop posting published events with a given signal sig to the event queue of the active object me.

Note:
Due to the latency of event queues, an active object should NOT assume that a given signal sig will never be dispatched to the state machine of the active object after un-subscribing from that signal. The event might be already in the queue, or just about to be posted and the un-subscribe operation will not flush such events.
Un-subscribing from a signal that has never been subscribed in the first place is considered an error and QF will rise an assertion.
See also:
QF_publish(), QActive_subscribe(), and QActive_unsubscribeAll()

Definition at line 40 of file qa_usub.c.

References Q_REQUIRE, Q_USER_SIG, QF_active_, QF_div8Lkup, QF_invPwr2Lkup, QF_MAX_ACTIVE, QF_maxSignal_, QF_PTR_AT_, QF_subscrList_, QS_aoObj_, QS_BEGIN_NOCRIT_, QS_END_NOCRIT_, QS_OBJ_, QS_QF_ACTIVE_UNSUBSCRIBE, and QS_TIME_.