From: Eduard Vintilă Date: Sun, 9 Apr 2023 19:09:53 +0000 (+0300) Subject: include/pyconfig.h: Define `SIZEOF_PHTREAD_T` based on chosen libc X-Git-Tag: RELEASE-0.14.0~1 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=dc93f534f5fd65e9848f61a92c811fe99993a7d9;p=unikraft%2Flibs%2Fpython3.git include/pyconfig.h: Define `SIZEOF_PHTREAD_T` based on chosen libc 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ă Reviewed-by: Maria Sfiraiala Reviewed-by: Stefan Jumarea Approved-by: Razvan Deaconescu Tested-by: Unikraft CI GitHub-Closes: #12 --- diff --git a/include/pyconfig.h b/include/pyconfig.h index 868c3b5..5d85e2c 100644 --- a/include/pyconfig.h +++ b/include/pyconfig.h @@ -1655,7 +1655,11 @@ #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