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

elad335
Copy link
Contributor

@elad335 elad335 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 spu-group-join-accuracy branch 4 times, most recently from e4f1b74 to 1469c8a Compare February 9, 2019 14:09
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 Show resolved Hide resolved
@elad335 elad335 force-pushed the spu-group-join-accuracy branch 2 times, most recently from 9b354fa to 56ca5a1 Compare February 9, 2019 16:05
@Nekotekina
Copy link
Member

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 spu-group-join-accuracy branch 2 times, most recently from bd3684c to fdc9a52 Compare February 9, 2019 17:31
@Nekotekina Nekotekina merged commit 84d42ec into RPCS3:master Feb 9, 2019
Nekotekina added a commit to Nekotekina/rpcs3 that referenced this pull request Feb 9, 2019
@elad335 elad335 deleted the spu-group-join-accuracy branch February 10, 2019 02:03
Nekotekina added a commit to Nekotekina/rpcs3 that referenced this pull request Feb 10, 2019
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
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
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants