Files
pintos_22/src/tests/devices/alarm-one.c
2024-10-01 23:37:39 +01:00

19 lines
415 B
C

/* 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 ();
}