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

Make sys_spu_thread_group_join return once per termination #5643

Merged
merged 3 commits into from Feb 9, 2019

Conversation

Projects
None yet
2 participants
@elad335
Copy link
Contributor

commented Feb 9, 2019

This makes the amount of times sys_spu_thread_group_join returned always be equal to the amount of times sys_spu_thread_group_start was called, and the amount of times a termination signal was signaled.

This also means that when executing a second sys_spu_thread_group_join, it waits until another signal will be received.
In theory, to exit from this situation another thread has to call sys_spu_thread_group_start, and waiting until the SPUs signal termination again.

Source for this:
https://user-images.githubusercontent.com/18193363/52517440-0bdde300-2c44-11e9-8c52-773a9de5a233.png

Past tests hinted this behavior, although it was unclear if an absolute deadlock occurs on the second sys_spu_thread_group_join execution, or how to exit from this situation.

@elad335 elad335 force-pushed the elad335:spu-group-join-accuracy branch 4 times, most recently from e4f1b74 to 1469c8a Feb 9, 2019

Show resolved Hide resolved rpcs3/Emu/Cell/PPUThread.cpp Outdated
Show resolved Hide resolved rpcs3/Emu/Cell/PPUThread.cpp Outdated
Show resolved Hide resolved rpcs3/Emu/Cell/lv2/sys_spu.h Outdated
Show resolved Hide resolved rpcs3/Emu/Cell/lv2/sys_spu.cpp Outdated

@elad335 elad335 force-pushed the elad335:spu-group-join-accuracy branch 2 times, most recently from 9b354fa to 56ca5a1 Feb 9, 2019

@elad335 elad335 force-pushed the elad335:spu-group-join-accuracy branch from 56ca5a1 to 75d4629 Feb 9, 2019

@Nekotekina

This comment has been minimized.

Copy link
Member

commented Feb 9, 2019

Ugh why you change stack arg positioning?
#5325 only changed min stack frame in the case of zero stack args.

@elad335 elad335 force-pushed the elad335:spu-group-join-accuracy branch 2 times, most recently from bd3684c to fdc9a52 Feb 9, 2019

Add EFAULT checks to spu_thread_group_join, ppu_thread_join
Order of checks is based on firmware

@elad335 elad335 force-pushed the elad335:spu-group-join-accuracy branch from fdc9a52 to f0b2300 Feb 9, 2019

@Nekotekina Nekotekina merged commit 84d42ec into RPCS3:master Feb 9, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

Nekotekina added a commit to Nekotekina/rpcs3 that referenced this pull request Feb 9, 2019

@elad335 elad335 deleted the elad335:spu-group-join-accuracy branch Feb 10, 2019

Nekotekina added a commit to Nekotekina/rpcs3 that referenced this pull request Feb 10, 2019

Fix sys_spu_thread_group_join wait condition
After waiting, thread group cannot be safely accessed
Following RPCS3#5643

Nekotekina added a commit to Nekotekina/rpcs3 that referenced this pull request Feb 27, 2019

Fix sys_spu_thread_group_join wait condition
After waiting, thread group cannot be safely accessed
Following RPCS3#5643

Nekotekina added a commit to Nekotekina/rpcs3 that referenced this pull request Feb 28, 2019

Fix sys_spu_thread_group_join wait condition
After waiting, thread group cannot be safely accessed
Following RPCS3#5643
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.