Open ian-h-chamberlain opened 1 year ago
Shush. You weren't supposed to notice that yet :P
There is an intention to support pthreads on 3DS and, yes that support will be in libctru. We're not really looking for help with the implementation tbh but if you need something in particular we're generally willing to listen.
The devkitARM branch has now been deleted after quite a bit of work to consolidate the devkitA64 and devkitARM patchsets while updating to latest newlib snapshot in order to ease future maintenance and work towards feature parity. These changes now live at https://github.com/devkitPro/newlib/tree/devkitPro
There is an intention to support pthreads on 3DS and, yes that support will be in libctru.
Awesome, that's great news to hear, thank you!
but if you need something in particular we're generally willing to listen.
I think the only thing that came to mind when I first started looking at the implementation was that it would be nice to have some way to set CPU affinity / priority at thread creation time. It looks like __syscall_thread_create
doesn't have access to everything in the pthread_attr_t*
used to create the thread (just stacksize
and stackaddr
).
It would be great if we were able to use APIs like phread_attr_setschedparam
and pthread_attr_setaffinity_np
to change thread properties before creating a thread (particularly CPU affinity, since it seems setting after thread creation hasn't been supported for some time).
Clearly this is still under active development so I'll try not to get ahead of myself, but thank you for your work and I look forward to seeing further development on this front! :rocket:
Hello! I noticed with the latest
devkitARM
update (r60-9) thatnewlib
was updated to 4.3.0 and there appears to be a fullpthread
API included as part of https://github.com/devkitPro/buildscripts/commit/cd5e224d6a14f7d32712ab10cfc08e0c6a2daea3As far as I can tell, the syscalls used by the
pthread
implementation are not actually implemented anywhere, so none of thepthread_*
functions actually work, which is fine - however, it does seem like on the 3DS it would be possible to implement some of the functionality usinglibctru
calls and get a mostly-workingpthread
implementation.In light of this, I had a few questions about the new changes and any future plans for them:
pthread
s on the 3DS?libctru
or perhaps somewhere else? Are the maintainers looking for help implementing this?devkitARM
branch of this repo? If not, is there somewhere else it lives that can be used for reference, besides just thebuildscripts
repo as a big diff?Thanks in advance! I was excited to see these changes pulled down when I upgraded, but I wanted to set my expectations and see what, if any plans you all had for these APIs.