aboutsummaryrefslogtreecommitdiff
path: root/src/tests/test.c
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-02-13 17:13:17 -0700
committerChristian Cunningham <cc@localhost>2022-02-13 17:13:17 -0700
commita0d6941b2ef689302dce37d1a864fd4213a0a559 (patch)
tree10376ed4d35fb6d89a4fb0bb2cb1c4228ddb6d98 /src/tests/test.c
parent22b2957d4610f201bd2d365d42de285478093c01 (diff)
Implement generic lock
Diffstat (limited to 'src/tests/test.c')
-rw-r--r--src/tests/test.c10
1 files changed, 6 insertions, 4 deletions
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 <sys/core.h>
#include <sys/schedule.h>
#include <util/mutex.h>
+#include <util/lock.h>
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");
}