qpcpp/doxygen/snippets/qf_postx.cpp
MMS 34cdcc7929 7.0.0rc1
major release 7.0.0 release candidate 1
2022-04-19 19:23:30 -04:00

25 lines
586 B
C++

extern QActive *AO_Table;
Q_STATE_DEF(Philo, hungry) {
QP::QState status_;
switch (e->sig) {
case Q_ENTRY_SIG: {
TableEvt *pe = Q_NEW_X(TableEvt, 5U, /* <- margin */
HUNGRY_SIG);
if (te != nullptr) {
pe->philoNum = PHILO_ID(this);
AO_Table->POST_X(pe, 2U, this); // <----
}
status_ = Q_RET_HANDLED;
break;
}
. . .
default: {
status_ = super(&top);
break;
}
}
return status_;
}