From a0d6941b2ef689302dce37d1a864fd4213a0a559 Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Sun, 13 Feb 2022 17:13:17 -0700 Subject: Implement generic lock --- src/tests/test.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/tests') diff --git a/src/tests/test.c b/src/tests/test.c index 8b01706..40e2679 100644 --- a/src/tests/test.c +++ b/src/tests/test.c @@ -5,6 +5,7 @@ #include #include #include +#include extern void atest(void); void btest(void); @@ -33,26 +34,27 @@ void test_entry(void) } static struct Mutex testm = {.addr = 0, .pid = 0}; +//static struct Lock testm = {.pid = 0}; void ctest1(void) { uart_string("1 Started\n"); - sys1(4, &testm); + sys1(SYS_LOCK, &testm); uart_string("1 Finished\n"); } void ctest2(void) { uart_string("2 Started\n"); - sys1(4, &testm); + sys1(SYS_LOCK, &testm); uart_string("2 Finished\n"); - sys1(5, &testm); + sys1(SYS_UNLOCK, &testm); } void ctest3(void) { uart_string("3 Started\n"); - sys1(5, &testm); + sys1(SYS_UNLOCK, &testm); uart_string("3 Finished\n"); } -- cgit v1.2.1