Refactor test code.

This commit is contained in:
Geoffrey Challen
2015-12-31 19:26:33 -05:00
parent 3b2267123d
commit 26612b6142
6 changed files with 191 additions and 114 deletions

View File

@@ -85,52 +85,29 @@ void stoplight_cleanup() {
}
void
gostraight(void *p, unsigned long direction)
turnright(unsigned long direction)
{
struct semaphore * stoplightMenuSemaphore = (struct semaphore *)p;
(void)direction;
/*
* Implement this function.
*/
/*
* This code allows the test to return to the menu cleanly.
*/
V(stoplightMenuSemaphore);
return;
}
void
turnleft(void *p, unsigned long direction)
gostraight(unsigned long direction)
{
struct semaphore * stoplightMenuSemaphore = (struct semaphore *)p;
(void)direction;
/*
* Implement this function.
*/
/*
* This code allows the test to return to the menu cleanly.
*/
V(stoplightMenuSemaphore);
return;
}
void
turnright(void *p, unsigned long direction)
turnleft(unsigned long direction)
{
struct semaphore * stoplightMenuSemaphore = (struct semaphore *)p;
(void)direction;
/*
* Implement this function.
*/
/*
* This code allows the test to return to the menu cleanly.
*/
V(stoplightMenuSemaphore);
return;
}