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

Method enqueue

kernel/orbis/src/umtx.cpp:83–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81static auto umtxStorage = createGlobalObject<UmtxStorage>();
82
83std::pair<const UmtxKey, UmtxCond> *UmtxChain::enqueue(UmtxKey &key,
84 Thread *thr) {
85 if (!spare_queue.empty()) {
86 auto node = spare_queue.extract(spare_queue.begin());
87 node.key() = key;
88 node.mapped().thr = thr;
89 return &*sleep_queue.insert(std::move(node));
90 }
91 return &*sleep_queue.emplace(key, thr);
92}
93
94void UmtxChain::erase(std::pair<const UmtxKey, UmtxCond> *obj) {
95 for (auto [it, e] = sleep_queue.equal_range(obj->first); it != e; it++) {

Callers 6

umtx_waitMethod · 0.45
do_lock_normalFunction · 0.45
umtx_cv_waitMethod · 0.45
umtx_rw_rdlockMethod · 0.45
umtx_rw_wrlockMethod · 0.45
umtx_sem_waitMethod · 0.45

Calls 5

emptyMethod · 0.45
extractMethod · 0.45
beginMethod · 0.45
insertMethod · 0.45
emplaceMethod · 0.45

Tested by

no test coverage detected