MCPcopy Create free account
hub / github.com/NetSys/bess / SignalOverload

Method SignalOverload

core/module.h:381–390  ·  view source on GitHub ↗

Signals to parent task(s) that module is overloaded. TODO: SignalOverload and SignalUnderload are only safe if the module is not thread safe (e.g. multiple workers should not be able to simultaneously call these methods)

Source from the content-addressed store, hash-verified

379 // thread safe (e.g. multiple workers should not be able to simultaneously
380 // call these methods)
381 void SignalOverload() {
382 if (overload_) {
383 return;
384 }
385 for (auto const &p : parent_tasks_) {
386 ++(p->children_overload_);
387 }
388
389 overload_ = true;
390 }
391
392 // Signals to parent task(s) that module is underloaded.
393 void SignalUnderload() {

Callers 1

TEST_FFunction · 0.80

Calls

no outgoing calls

Tested by 1

TEST_FFunction · 0.64