diff --git a/kern/include/test.h b/kern/include/test.h index 7b02114..2437e78 100644 --- a/kern/include/test.h +++ b/kern/include/test.h @@ -54,6 +54,7 @@ int semtest(int, char **); int locktest(int, char **); int cvtest(int, char **); int cvtest2(int, char **); +int rwtest(int, char **); /* semaphore unit tests */ int semu1(int, char **); diff --git a/kern/main/menu.c b/kern/main/menu.c index 405dfd4..91cd393 100644 --- a/kern/main/menu.c +++ b/kern/main/menu.c @@ -477,6 +477,7 @@ static const char *testmenu[] = { "[sy2] Lock test (1) ", "[sy3] CV test (1) ", "[sy4] CV test #2 (1) ", + "[sy5] RW lock test (1) ", "[semu1-22] Semaphore unit tests ", "[fs1] Filesystem test ", "[fs2] FS read stress ", @@ -579,6 +580,7 @@ static struct { { "sy2", locktest }, { "sy3", cvtest }, { "sy4", cvtest2 }, + { "sy5", rwtest }, /* semaphore unit tests */ { "semu1", semu1 }, diff --git a/kern/test/synchtest.c b/kern/test/synchtest.c index b2c72d6..b0889aa 100644 --- a/kern/test/synchtest.c +++ b/kern/test/synchtest.c @@ -487,3 +487,18 @@ cvtest2(int nargs, char **args) return 0; } + +/* + * Complete this for ASST1. + */ + +int rwtest(int nargs, char **args) { + + (void) nargs; + (void) args; + + tkprintf("rwtest unimplemented\n"); + success(FAIL, "rwtest"); + + return 0; +}