Change `pthread_t` to be integer based instead of a struct.
- Dominant language
- C
- Stars
- 0
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
[POSIX explicitly allows `pthread_t` to be a struct](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html) (_thus allowing pthread_t to be defined as a structure_), but in the wild, some software assumes that `pthread_t` is integer based.
The reason hermit-newlib uses a struct for `pthread_t` is, that we use _pthread_embedded_ as a pthread implementation and that's how phtread_embedded does it. However, it seems that internally there is actually no reason to have the second field (https://github.com/search?q=repo%3Ahermit-os%2Fpthread-embedded%20tid-%3Ex&type=code) and hermit uses `i32` internally as well.
So if we will discard _pthread_embedded_ sometime, we should use an integer-based type for `pthread_t` as well, to increase compatibility.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.