diff options
author | Alexander Pyhalov <apyhalov@gmail.com> | 2018-05-24 14:55:20 +0300 |
---|---|---|
committer | Nathan Hjelm <hjelmn@lanl.gov> | 2018-12-05 10:11:24 -0700 |
commit | e8e80368b78238ea36b378cd37e94140fec29dc7 (patch) | |
tree | febda9f887ca7684494323e3f76bc67310c24ae5 /libusb/os/sunos_usb.c | |
parent | 18a5f99ad3c071a3defef7e2ecf117489b8a8552 (diff) | |
download | libusb-e8e80368b78238ea36b378cd37e94140fec29dc7.tar.gz |
Enable timerfd on sunos when available
Closes #432
Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
Diffstat (limited to 'libusb/os/sunos_usb.c')
-rw-r--r-- | libusb/os/sunos_usb.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libusb/os/sunos_usb.c b/libusb/os/sunos_usb.c index 7150a3e..495be4c 100644 --- a/libusb/os/sunos_usb.c +++ b/libusb/os/sunos_usb.c @@ -1637,6 +1637,13 @@ sunos_usb_get_status(int fd) return (status); } +#ifdef USBI_TIMERFD_AVAILABLE +static clockid_t op_get_timerfd_clockid(void) +{ + return CLOCK_MONOTONIC; +} +#endif + const struct usbi_os_backend usbi_backend = { .name = "Solaris", .caps = 0, @@ -1669,6 +1676,9 @@ const struct usbi_os_backend usbi_backend = { .clear_transfer_priv = sunos_clear_transfer_priv, .handle_transfer_completion = sunos_handle_transfer_completion, .clock_gettime = sunos_clock_gettime, +#ifdef USBI_TIMERFD_AVAILABLE + .get_timerfd_clockid = op_get_timerfd_clockid, +#endif .device_priv_size = sizeof(sunos_dev_priv_t), .device_handle_priv_size = sizeof(sunos_dev_handle_priv_t), .transfer_priv_size = sizeof(sunos_xfer_priv_t), |