|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT/PTHREAD-EMBEDDED PATCH] Use Unikraft initcall for initialization
Initialize the library by using an Unikraft initcall instead of the
constructor attribute. This is to make sure that pthread-embedded is
initialized before Unikraft calls any application constructors and
after Unikraft initialized the depending scheduler.
Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
---
pte_osal.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pte_osal.c b/pte_osal.c
index 3ce2a8c..cfd5b3b 100644
--- a/pte_osal.c
+++ b/pte_osal.c
@@ -25,7 +25,7 @@
#include <string.h>
#include <uk/essentials.h>
-#include <uk/ctors_prio.h>
+#include <uk/init.h>
#include <uk/arch/time.h>
#include <uk/arch/atomic.h>
#include <uk/print.h>
@@ -59,12 +59,12 @@ typedef struct {
*
***************************************************************************/
-UK_CTOR_ATTR(UK_CTOR_PRIO_PTHREAD_EMBEDDED)
-int pthread_constructor(void)
+static int pthread_initcall(void)
{
- uk_pr_debug("pthread-embedded constructor\n");
+ uk_pr_debug("Initialize pthread-embedded\n");
return pthread_init();
}
+uk_lib_initcall(pthread_initcall);
pte_osResult pte_osInit(void)
{
--
2.20.1
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |