MCPcopy Create free account
hub / github.com/RPCSX/rpcsx / notify_n

Method notify_n

kernel/orbis/src/umtx.cpp:111–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111uint UmtxChain::notify_n(const UmtxKey &key, sint count) {
112 auto it = sleep_queue.find(key);
113 if (it == sleep_queue.end())
114 return 0;
115
116 uint n = 0;
117 while (count > 0) {
118 it->second.thr = nullptr;
119 it->second.cv.notify_all(mtx);
120 it = erase(it);
121
122 n++;
123 count--;
124
125 if (it == sleep_queue.end() || it->first != key) {
126 break;
127 }
128 }
129
130 return n;
131}
132
133uint UmtxChain::notify_one(const UmtxKey &key) { return notify_n(key, 1); }
134

Callers 3

umtx_wakeMethod · 0.45
umtx_rw_unlockMethod · 0.45
umtx_wake_privateMethod · 0.45

Calls 3

findMethod · 0.45
endMethod · 0.45
notify_allMethod · 0.45

Tested by

no test coverage detected