aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-02-13 13:22:43 -0700
committerChristian Cunningham <cc@localhost>2022-02-13 13:23:01 -0700
commit921398936d989aef06be8d869d9162e3d9b294b3 (patch)
tree62e1c575a2df812bfd2c5a7edaf13ed0528d1f4d /src/tests
parent5643e3587507f3351a2ebeb44a5d95d13470741d (diff)
Output the count of the task stacks
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/test.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/tests/test.c b/src/tests/test.c
index c4abb3e..8b01706 100644
--- a/src/tests/test.c
+++ b/src/tests/test.c
@@ -29,11 +29,10 @@ void test_entry(void)
dt += tf - ti;
DRAW64(34, 19, dt/64);
DRAW64(34+17, 19, dt%64);
- btest();
+ add_thread(btest, 0, 4);
}
static struct Mutex testm = {.addr = 0, .pid = 0};
-static int testi = 0;
void ctest1(void)
{
@@ -59,16 +58,7 @@ void ctest3(void)
void btest(void)
{
- if (testi % 3 == 0) {
- testi++;
- add_thread(ctest1, 0, 1);
- }
- else if (testi % 3 == 1) {
- testi++;
- add_thread(ctest2, 0, 0);
- }
- else if (testi % 3 == 2) {
- testi++;
- add_thread(ctest3, 0, 1);
- }
+ add_thread(ctest1, 0, 1);
+ add_thread(ctest2, 0, 2);
+ add_thread(ctest3, 0, 3);
}