]> xenbits.xensource.com Git - unikraft/unikraft.git/commit
lib/ukboot: Pass tmain to init context
authorMichalis Pappas <michalis@unikraft.io>
Tue, 25 Mar 2025 08:09:50 +0000 (09:09 +0100)
committerUnikraft Bot <monkey@unikraft.io>
Thu, 17 Apr 2025 12:41:44 +0000 (12:41 +0000)
commit0dc7050fd16b3c0c3ef5ed44540ff5a273d54bea
tree8bcc7f4cbaf76ba148de30dc25edcf35ef8fd554
parentd5a64db13f2143b6d268c7be8919957d7a541b46
lib/ukboot: Pass tmain to init context

Populate the init context with the thread that executes main().
When LIBUKBOOT_MAINTHREAD is selected, this allows libposix-process
to create INIT_PID from the main thread while excluding Unikraft's
init thread from the process.

Move the initialization of the main() thread before executing inittab.
With that change, update the parameters main_thread() function to pass
a pointer to ictx, so that it's possible for args to be updated by
inittab.

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
lib/ukboot/boot.c