Skip to content

Remove reliance on svcGetThreadList and do some refactoring#14

Merged
Meziu merged 4 commits intomasterfrom
tweak/remove-svcGetThreadList
Mar 1, 2022
Merged

Remove reliance on svcGetThreadList and do some refactoring#14
Meziu merged 4 commits intomasterfrom
tweak/remove-svcGetThreadList

Conversation

@AzureMarker
Copy link
Copy Markdown
Member

Continuing from #13, this should close rust3ds/ctru-rs#48.

This implements the "BTreeMap" approach discussed here: #13 (comment)

We also get some nice benefits from this refactoring, such as implementing the "retval" part of pthread_join.

To more easily see the relevant changes, skip the first commit (it just splits the code into multiple files).

cc: @Meziu, @ian-h-chamberlain

We need to track the threads ourselves now, but that also lets us act
more intelligently. We know when the thread is detached, so we can
return an error in join before calling libctru. We can also implement
the "retval" functionality of `pthread_join`.

We can't just only keep track of the thread ID, because libctru expects
us to use their `Thread` pointer/data structure.
@AzureMarker AzureMarker requested a review from Meziu March 1, 2022 05:46
@Meziu Meziu merged commit 2e5e1b5 into master Mar 1, 2022
@AzureMarker AzureMarker deleted the tweak/remove-svcGetThreadList branch March 2, 2022 04:12
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.

Zombies ate my 3DS? (kernel panic after multiple 3dsx app exits)

2 participants