From: Vlad-Andrei BĂDOIU (78692) Date: Wed, 30 Oct 2019 22:37:58 +0000 (+0000) Subject: Set priority to pthread constructor X-Git-Tag: RELEASE-0.4~7 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=b487eae8d93e7ad87f6b7ffac6055b5f14aacbaf;p=unikraft%2Flibs%2Fpthread-embedded.git Set priority to pthread constructor Other libraries might use the default constructor attribute and expect pthreads to be initialised. Currently, the priority for pthread-embedded library constructor has the highest priority (101). Signed-off-by: Vlad-Andrei Badoiu Reviewed-by: Costin Lupu --- diff --git a/pte_osal.c b/pte_osal.c index 23dcd01..3ce2a8c 100644 --- a/pte_osal.c +++ b/pte_osal.c @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -58,7 +59,8 @@ typedef struct { * ***************************************************************************/ -int __constructor pthread_constructor(void) +UK_CTOR_ATTR(UK_CTOR_PRIO_PTHREAD_EMBEDDED) +int pthread_constructor(void) { uk_pr_debug("pthread-embedded constructor\n"); return pthread_init();