Cygwin: timerfd: implement TFD_IOC_SET_TICKS ioctl

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2019-01-16 18:40:53 +01:00
parent 0e8c7b8689
commit 173e067a31
3 changed files with 34 additions and 2 deletions

View File

@@ -176,15 +176,29 @@ int
fhandler_timerfd::ioctl (unsigned int cmd, void *p)
{
int ret = -1;
uint64_t ov_cnt;
switch (cmd)
{
case TFD_IOC_SET_TICKS:
/* TODO */
__try
{
timer_tracker *tt = (timer_tracker *) timerid;
ov_cnt = *(uint64_t *) p;
if (!ov_cnt)
{
set_errno (EINVAL);
break;
}
tt->set_event (ov_cnt);
}
__except (EFAULT) {}
__endtry
ret = 0;
break;
default:
set_errno (EINVAL);
ret = fhandler_base::ioctl (cmd, p);
break;
}
syscall_printf ("%d = ioctl_timerfd(%x, %p)", ret, cmd, p);