sys/posix: impl rest of linux, impl some of Windows

This commit is contained in:
Laytan Laats
2024-12-01 11:54:51 +11:00
committed by flysand7
parent 879771fe32
commit 49ddbd9b99
63 changed files with 1237 additions and 789 deletions
+2
View File
@@ -40,7 +40,9 @@ int main(int argc, char *argv[])
printf("pthread_attr_t %zu %zu\n", sizeof(pthread_attr_t), _Alignof(pthread_attr_t));
printf("pthread_key_t %zu %zu\n", sizeof(pthread_key_t), _Alignof(pthread_key_t));
#ifndef __linux__
printf("sched_param %zu %zu\n", sizeof(struct sched_param), _Alignof(struct sched_param));
#endif
printf("termios %zu %zu\n", sizeof(struct termios), _Alignof(struct termios));
+5 -1
View File
@@ -14,7 +14,11 @@ main :: proc() {
fmt.println("pthread_attr_t", size_of(posix.pthread_attr_t), align_of(posix.pthread_attr_t))
fmt.println("pthread_key_t", size_of(posix.pthread_key_t), align_of(posix.pthread_key_t))
fmt.println("sched_param", size_of(posix.sched_param), align_of(posix.sched_param))
// NOTE: On Linux, differences between libc may mean the Odin side is larger than the other side,
// this is fine in practice.
when ODIN_OS != .Linux {
fmt.println("sched_param", size_of(posix.sched_param), align_of(posix.sched_param))
}
fmt.println("termios", size_of(posix.termios), align_of(posix.termios))