diff options
author | Christian Cunningham <cc@localhost> | 2022-02-13 17:31:22 -0700 |
---|---|---|
committer | Christian Cunningham <cc@localhost> | 2022-02-13 17:31:22 -0700 |
commit | e814983a452c40734c5ecc63581df88d3925835e (patch) | |
tree | 39ea355b1e47fa0baf3acb49e2229616827f4af5 /src/tests | |
parent | a0d6941b2ef689302dce37d1a864fd4213a0a559 (diff) |
Mode-aware locking
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/test.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tests/test.c b/src/tests/test.c index 40e2679..071323e 100644 --- a/src/tests/test.c +++ b/src/tests/test.c @@ -33,28 +33,28 @@ void test_entry(void) add_thread(btest, 0, 4); } -static struct Mutex testm = {.addr = 0, .pid = 0}; -//static struct Lock testm = {.pid = 0}; +//static struct Mutex testm = {.addr = 0, .pid = 0}; +static struct Lock testm = {.pid = 0}; void ctest1(void) { uart_string("1 Started\n"); - sys1(SYS_LOCK, &testm); + lock(&testm); uart_string("1 Finished\n"); } void ctest2(void) { uart_string("2 Started\n"); - sys1(SYS_LOCK, &testm); + lock(&testm); uart_string("2 Finished\n"); - sys1(SYS_UNLOCK, &testm); + unlock(&testm); } void ctest3(void) { uart_string("3 Started\n"); - sys1(SYS_UNLOCK, &testm); + unlock(&testm); uart_string("3 Finished\n"); } |