Add a new field to init ctx for the thread that executes main().
If main() does not execute on a separate thread, this is set to
NULL.
Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Andrei Tatar <andrei@unikraft.io>
Approved-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Andrei Tatar <andrei@unikraft.io>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
GitHub-Closes: #1620
#include <uk/essentials.h>
#include <uk/prio.h>
+#if CONFIG_LIBUKSCHED
+#include <uk/thread.h>
+#endif /* CONFIG_LIBUKSCHED */
+
#ifdef __cplusplus
extern "C" {
#endif
int argc;
char **argv;
} cmdline;
+#if CONFIG_LIBUKSCHED
+ /* Set if main() executes on a separate thread,
+ * otherwise NULL.
+ */
+ struct uk_thread *tmain;
+#endif /* CONFIG_LIBUKSCHED */
/* reserved for future additions */
};