mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-17 19:34:39 +01:00
Fix possible race condition issue.
This commit is contained in:
1 parent
ddc122bcbe
commit
04434ea68e
1 file changed
+4
-4
@@ -1139,18 +1139,18 @@ void AfterMatchingMipsCall::SetData(int ContextID, int eventId, u32_le BufAddr)
|
||||
|
||||
bool SetMatchingInCallback(SceNetAdhocMatchingContext* context, bool IsInCB) {
|
||||
if (context == NULL) return false;
|
||||
context->eventlock->lock(); //peerlock.lock();
|
||||
peerlock.lock();
|
||||
context->IsMatchingInCB = IsInCB;
|
||||
context->eventlock->unlock(); //peerlock.unlock();
|
||||
peerlock.unlock();
|
||||
return IsInCB;
|
||||
}
|
||||
|
||||
bool IsMatchingInCallback(SceNetAdhocMatchingContext* context) {
|
||||
bool inCB = false;
|
||||
if (context == NULL) return inCB;
|
||||
context->eventlock->lock(); //peerlock.lock();
|
||||
peerlock.lock();
|
||||
inCB = (context->IsMatchingInCB);
|
||||
context->eventlock->unlock(); //peerlock.unlock();
|
||||
peerlock.unlock();
|
||||
return inCB;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user