Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle async IO more correctly (testing/review) #939

Merged
merged 17 commits into from
Mar 11, 2013
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Simplify hleDelayResult()'s handler a bit.
unknownbrackets committed Mar 11, 2013

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 26306342fd93c3b6edf2a4ea9445648e396d0ea4
4 changes: 3 additions & 1 deletion Core/HLE/HLE.cpp
Original file line number Diff line number Diff line change
@@ -65,7 +65,9 @@ void hleDelayResultFinish(u64 userdata, int cycleslate)
u32 error;
SceUID threadID = (SceUID) userdata;
SceUID verify = __KernelGetWaitID(threadID, WAITTYPE_DELAY, error);
u64 result = (userdata ^ threadID) | __KernelGetWaitValue(threadID, error);
// The top 32 bits of userdata are the top 32 bits of the 64 bit result.
// We can't just put it all in userdata because we need to know the threadID...
u64 result = (userdata & 0xFFFFFFFF00000000ULL) | __KernelGetWaitValue(threadID, error);

if (error == 0 && verify == 1)
__KernelResumeThreadFromWait(threadID, result);