/*
* This file and its contents are supplied under the terms of the
* Common Development and Distribution License ("CDDL"), version 1.0.
* You may only use this file in accordance with the terms of version
* 1.0 of the CDDL.
*
* A full copy of the text of the CDDL should have accompanied this
* source. A copy of the CDDL is also available via the Internet at
*/
/*
* Copyright (c) 2015 Joyent, Inc. All rights reserved.
*/
/*
* Header file to support for the timerfd facility.
*/
#ifndef _SYS_TIMERFD_H
#define _SYS_TIMERFD_H
#include <sys/time_impl.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* To assure binary compatibility with Linux, these values are fixed at their
* Linux equivalents, not their native ones.
*/
/*
* These ioctl values are specific to the native implementation; applications
* shouldn't be using them directly, and they should therefore be safe to
* change without breaking apps.
*/
typedef struct timerfd_settime {
#ifndef _KERNEL
extern int timerfd_create(int, int);
extern int timerfd_settime(int, int,
const struct itimerspec *, struct itimerspec *);
extern int timerfd_gettime(int, struct itimerspec *);
#else
#define TIMERFDMNRN_TIMERFD 0
/*
* Fortunately, the values for the Linux clocks that are valid for timerfd
* (namely, CLOCK_REALTIME and CLOCK_MONOTONIC) don't overlap with our values
* the same.
*/
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_TIMERFD_H */