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

21 lines
474 B
C++

extern QActive * const AO_Table;
Q_STATE_DEF(Philo, hungry) {
QP::QState status_;
switch (e->sig) {
case Q_ENTRY_SIG: {
TableEvt *pe = Q_NEW(TableEvt, HUNGRY_SIG);
pe->philoNum = PHILO_ID(this);
AO_Table->POST(pe, this); // <----
status_ = Q_RET_HANDLED;
break;
}
. . .
default: {
status_ = super(&top);
break;
}
}
return status_;
}