aboutsummaryrefslogtreecommitdiff
path: root/src/tests/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/test.c')
-rw-r--r--src/tests/test.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/tests/test.c b/src/tests/test.c
index 0dad659..d954ade 100644
--- a/src/tests/test.c
+++ b/src/tests/test.c
@@ -431,6 +431,32 @@ void semaphore_test1(void)
sys1(SYS_SEMAPHORE_P, &test_semaphore);
// Semaphore decremented
draw_cletter(x++, y+1, 'P', 0xFF0000);
+ draw_cletter(x++, y+1, 'V', 0xFF0000);
+ sys1(SYS_SEMAPHORE_V, &test_semaphore);
+ draw_cletter(x++, y+1, 'V', 0xFF0000);
+ sys1(SYS_SEMAPHORE_V, &test_semaphore);
+ draw_cletter(x++, y+1, 'V', 0xFF0000);
+ sys1(SYS_SEMAPHORE_V, &test_semaphore);
+ // Try to decrement semaphore
+ draw_cletter(x++, y+1, 'T', 0xFF0000);
+ sys1(SYS_SEMAPHORE_P, &test_semaphore);
+ // Semaphore decremented
+ draw_cletter(x++, y+1, 'P', 0xFF0000);
+ // Try to decrement semaphore
+ draw_cletter(x++, y+1, 'T', 0xFF0000);
+ sys1(SYS_SEMAPHORE_P, &test_semaphore);
+ // Semaphore decremented
+ draw_cletter(x++, y+1, 'P', 0xFF0000);
+ // Try to decrement semaphore
+ draw_cletter(x++, y+1, 'T', 0xFF0000);
+ sys1(SYS_SEMAPHORE_P, &test_semaphore);
+ // Semaphore decremented
+ draw_cletter(x++, y+1, 'P', 0xFF0000);
+ // Try to decrement semaphore
+ draw_cletter(x++, y+1, 'T', 0xFF0000);
+ sys1(SYS_SEMAPHORE_P, &test_semaphore);
+ // Semaphore decremented
+ draw_cletter(x++, y+1, 'P', 0xFF0000);
draw_cletter(x++, y+1, 'F', 0xFF0000);
}
@@ -440,6 +466,9 @@ void semaphore_test2(void)
// Increment semaphore
draw_cletter(x++, y+2, 'V', 0xFF00);
sys1(SYS_SEMAPHORE_V, &test_semaphore);
+ // Increment semaphore
+ draw_cletter(x++, y+2, 'V', 0xFF00);
+ sys1(SYS_SEMAPHORE_V, &test_semaphore);
draw_cletter(x++, y+2, 'F', 0xFF00);
}