diff options
author | Ian Moffett <ian@osmora.org> | 2024-03-13 21:08:50 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-03-13 21:24:08 -0400 |
commit | 2cfcba7e6ed64a00ca01dcc7247ecfc5edacfdb2 (patch) | |
tree | baf4119a0d1143921f5795620185b78095111a9a /sys/include | |
parent | 5c9366f3e5f7448811e03d4ee5671a3408353e41 (diff) |
kernel: sched: Improve stack init code
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include')
-rw-r--r-- | sys/include/sys/loader.h | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/sys/include/sys/loader.h b/sys/include/sys/loader.h index c1aa426..74a325c 100644 --- a/sys/include/sys/loader.h +++ b/sys/include/sys/loader.h @@ -33,17 +33,22 @@ #include <sys/types.h> #include <vm/pmap.h> -#define AT_NULL 0 -#define AT_IGNORE 1 -#define AT_EXECFD 2 -#define AT_PHDR 3 -#define AT_PHENT 4 -#define AT_PHNUM 5 -#define AT_PAGESZ 6 -#define AT_BASE 7 -#define AT_FLAGS 8 -#define AT_ENTRY 9 -#define AT_SECURE 10 +/* DANGER!: DO NOT CHANGE THESE DEFINES */ +#define AT_NULL 0 +#define AT_ENTRY 1 +#define AT_PHDR 2 +#define AT_PHENT 3 +#define AT_PHNUM 4 +#define AT_EXECPATH 5 +#define AT_SECURE 6 +#define AT_RANDOM 7 +#define AT_EXECFN 8 + +#define STACK_PUSH(ptr, val) *(--ptr) = val +#define AUXVAL(ptr, tag, val) __extension__ ({ \ + STACK_PUSH(ptr, val); \ + STACK_PUSH(ptr, tag); \ +}); /* Auxiliary Vector */ struct auxval { |