Add snooze!

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@150 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
David Reid 2002-07-12 20:24:28 +00:00
parent 03b2717394
commit 4ab9bc87a6

View File

@ -1068,6 +1068,12 @@ void thread_snooze(bigtime_t time)
acquire_sem_etc(snooze_sem, 1, B_TIMEOUT, time);
}
status_t snooze(bigtime_t timeout)
{
return acquire_sem_etc(snooze_sem, 1, B_TIMEOUT | B_CAN_INTERRUPT,
timeout);
}
// this function gets run by a new thread before anything else
static void thread_entry(void)
{