provided code
This commit is contained in:
18
src/tests/devices/alarm-one.c
Normal file
18
src/tests/devices/alarm-one.c
Normal file
@@ -0,0 +1,18 @@
|
||||
/* Tests timer_sleep(1), which should return shortly after called.
|
||||
This test can expose a race-condition if the kernel attempts to unblock
|
||||
the thread before it has been blocked.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "tests/devices/tests.h"
|
||||
#include "threads/malloc.h"
|
||||
#include "threads/synch.h"
|
||||
#include "threads/thread.h"
|
||||
#include "devices/timer.h"
|
||||
|
||||
void
|
||||
test_alarm_one (void)
|
||||
{
|
||||
timer_sleep (1);
|
||||
pass ();
|
||||
}
|
||||
Reference in New Issue
Block a user