diff options
author | Justus Winter <justus@gnupg.org> | 2017-03-12 16:36:48 +0100 |
---|---|---|
committer | Justus Winter <justus@gnupg.org> | 2017-03-18 16:24:59 +0100 |
commit | 146c35ddf493623561c261795610a9b5573834fd (patch) | |
tree | 497cebc3e48b917eb1b2faf263520be014e29009 /kern/bootstrap.c | |
parent | 25f22702f153d62b55cb276152ba5ea935023e6e (diff) | |
download | gnumach-146c35ddf493623561c261795610a9b5573834fd.tar.gz gnumach-146c35ddf493623561c261795610a9b5573834fd.tar.bz2 gnumach-146c35ddf493623561c261795610a9b5573834fd.zip |
kern: Make kernel task available to bootscript.
* kern/bootstrap.c (bootstrap_create): Insert the variable
'kernel-task' into the bootscript environment. Userspace can use this
instead of guessing based on the order of the first tasks.
Diffstat (limited to 'kern/bootstrap.c')
-rw-r--r-- | kern/bootstrap.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kern/bootstrap.c b/kern/bootstrap.c index 7398ea44..c21d3b1c 100644 --- a/kern/bootstrap.c +++ b/kern/bootstrap.c @@ -180,6 +180,12 @@ void bootstrap_create(void) if (losers) panic ("cannot set boot-script variable device-port: %s", boot_script_error_string (losers)); + losers = boot_script_set_variable + ("kernel-task", VAL_PORT, + (long) kernel_task->itk_self); + if (losers) + panic ("cannot set boot-script variable kernel-task: %s", + boot_script_error_string (losers)); losers = boot_script_set_variable ("kernel-command-line", VAL_STR, (long) kernel_cmdline); |