mirror of
https://github.com/QuantumLeaps/qpcpp.git
synced 2025-01-28 06:02:56 +08:00
34cdcc7929
major release 7.0.0 release candidate 1
21 lines
474 B
C++
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_;
|
|
}
|