]> xenbits.xensource.com Git - unikraft/libs/python3.git/commitdiff
include/pyconfig.h: Define `SIZEOF_PHTREAD_T` based on chosen libc
authorEduard Vintilă <eduard.vintila47@gmail.com>
Sun, 9 Apr 2023 19:09:53 +0000 (22:09 +0300)
committerUnikraft <monkey@unikraft.io>
Fri, 11 Aug 2023 18:11:11 +0000 (18:11 +0000)
The size of the `pthread_t` type varies between the libc/posix-threads
implementations, so we need to define the `SIZEOF_PTHREAD_T` macro
accordingly. This commit implements an additional
check for the Pthread Embedded library.

Signed-off-by: Eduard Vintilă <eduard.vintila47@gmail.com>
Reviewed-by: Maria Sfiraiala <maria.sfiraiala@gmail.com>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #12

include/pyconfig.h

index 868c3b5486f7760c548ac773525d044bfaa465e1..5d85e2ca4de73af3246e6fbb5575cc163d3c1faf 100644 (file)
 #define SIZEOF_PTHREAD_KEY_T 4
 
 /* The size of `pthread_t', as computed by sizeof. */
+#ifdef CONFIG_LIBPTHREAD_EMBEDDED
+#define SIZEOF_PTHREAD_T 12
+#else
 #define SIZEOF_PTHREAD_T 8
+#endif
 
 /* The size of `short', as computed by sizeof. */
 #define SIZEOF_SHORT 2