MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / subscribeSystemEvent

Function subscribeSystemEvent

Tactility/Source/kernel/SystemEvents.cpp:58–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58SystemEventSubscription subscribeSystemEvent(SystemEvent event, OnSystemEvent handler) {
59 if (mutex.lock(MAX_TICKS)) {
60 auto id = ++subscriptionCounter;
61
62 subscriptions.push_back({
63 .id = id,
64 .event = event,
65 .handler = handler
66 });
67
68 mutex.unlock();
69 return id;
70 } else {
71 check(false);
72 }
73}
74
75void unsubscribeSystemEvent(SystemEventSubscription subscription) {
76 if (mutex.lock(MAX_TICKS)) {

Callers 5

initBootFunction · 0.85
tpagerInitFunction · 0.85
initBootFunction · 0.85
onStartMethod · 0.85
statusbar_constructorFunction · 0.85

Calls 3

checkFunction · 0.50
lockMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected