Block-Flow: integrate actual Gate-implementation

Each Epoch in the memory manager holds a Gate in the first slot;
after the logic for Gate-activation is worked out now, we can switch
to using this actual logic to determine when an Epoch can be released
This commit is contained in:
Fischlurch 2023-08-20 16:50:54 +02:00
parent abc29eaa31
commit b7641115fb
2 changed files with 6 additions and 2 deletions

View file

@ -241,6 +241,10 @@ namespace gear {
{
int rest; ///< alive while rest > 0
Instant dead; ///< alive while time < dead
bool isDead (Time now) const { return dead <= now;}
bool isHold () const { return rest > 0; }
bool isFree (Time now) const { return not (isHold() or isDead(now)); }
};
/** Time window to define for activation */

View file

@ -260,8 +260,8 @@ namespace gear {
bool
isAlive (Time deadline)
{
/////////////////////////////////////////////OOO preliminary implementation ... should use the GATE-Activity itself
return this->deadline() > deadline;
return data_.condition.isHold() // NOTE: expected callback keeps alive
or not data_.condition.isDead (deadline);
}
size_t