masters-thesis/listings/timerfd_wait.c

13 lines
160 B
C
Raw Normal View History

uint64_t task_wait(struct task *t)
{
int ret;
uint64_t steps;
ret = read(t->fd, &steps, sizeof(steps));
if (ret < 0)
return 0;
return steps;
}