aboutsummaryrefslogtreecommitdiff
path: root/test/test_initrd.c
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2024-12-02 21:02:35 +0100
committerMiquel Sabaté Solà <mikisabate@gmail.com>2024-12-02 21:02:35 +0100
commit6132623dbf3076da11cdb85c494fadd7ee0f0a93 (patch)
treebcfeaade99c13b9a02fff282e8ef3998e405f14a /test/test_initrd.c
parentd4e2441ad7063ce7ca29981ca527b1aa643b0b0c (diff)
downloadfbos-6132623dbf30.tar.gz
fbos-6132623dbf30.zip
Share the same stack everywhere
As documented in the code, we are not implementing any kind of memory protection, so in theory any process (regardless if running in user or kernel space) would be able to tamper with other processes' stack. Hence, don't even pretend that we are separating stacks and share the same global stack everywhere. This simplifies things a bit. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'test/test_initrd.c')
-rw-r--r--test/test_initrd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/test_initrd.c b/test/test_initrd.c
index 314bd25..3d07b67 100644
--- a/test/test_initrd.c
+++ b/test/test_initrd.c
@@ -6,13 +6,13 @@
#include <fbos/sched.h>
#include <fbos/mm.h>
-unsigned long stack[4][THREAD_SIZE / sizeof(unsigned long)];
+unsigned long stack[THREAD_SIZE / sizeof(unsigned long)];
struct task_struct tasks[4] = {
- [TASK_INIT] = { .stack = stack[0], .entry_addr = NULL, },
- [TASK_FIZZ] = { .stack = stack[1], .entry_addr = NULL, },
- [TASK_BUZZ] = { .stack = stack[2], .entry_addr = NULL, },
- [TASK_FIZZBUZZ] = { .stack = stack[3], .entry_addr = NULL, },
+ [TASK_INIT] = { .stack = stack, .entry_addr = NULL, },
+ [TASK_FIZZ] = { .stack = stack, .entry_addr = NULL, },
+ [TASK_BUZZ] = { .stack = stack, .entry_addr = NULL, },
+ [TASK_FIZZBUZZ] = { .stack = stack, .entry_addr = NULL, },
};
int main(void)