Blame sysdeps/unix/sysv/linux/sys/timerfd.h

Packit 6c4009
/* Copyright (C) 2008-2018 Free Software Foundation, Inc.
Packit 6c4009
   This file is part of the GNU C Library.
Packit 6c4009
Packit 6c4009
   The GNU C Library is free software; you can redistribute it and/or
Packit 6c4009
   modify it under the terms of the GNU Lesser General Public
Packit 6c4009
   License as published by the Free Software Foundation; either
Packit 6c4009
   version 2.1 of the License, or (at your option) any later version.
Packit 6c4009
Packit 6c4009
   The GNU C Library is distributed in the hope that it will be useful,
Packit 6c4009
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6c4009
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6c4009
   Lesser General Public License for more details.
Packit 6c4009
Packit 6c4009
   You should have received a copy of the GNU Lesser General Public
Packit 6c4009
   License along with the GNU C Library; if not, see
Packit 6c4009
   <http://www.gnu.org/licenses/>.  */
Packit 6c4009
Packit 6c4009
#ifndef	_SYS_TIMERFD_H
Packit 6c4009
#define	_SYS_TIMERFD_H	1
Packit 6c4009
Packit 6c4009
#include <time.h>
Packit 6c4009
#include <bits/types/struct_itimerspec.h>
Packit 6c4009
Packit 6c4009
/* Get the platform-dependent flags.  */
Packit 6c4009
#include <bits/timerfd.h>
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* Bits to be set in the FLAGS parameter of `timerfd_settime'.  */
Packit 6c4009
enum
Packit 6c4009
  {
Packit 6c4009
    TFD_TIMER_ABSTIME = 1 << 0,
Packit 6c4009
#define TFD_TIMER_ABSTIME TFD_TIMER_ABSTIME
Packit 6c4009
    TFD_TIMER_CANCEL_ON_SET = 1 << 1
Packit 6c4009
#define TFD_TIMER_CANCEL_ON_SET TFD_TIMER_CANCEL_ON_SET
Packit 6c4009
  };
Packit 6c4009
Packit 6c4009
Packit 6c4009
__BEGIN_DECLS
Packit 6c4009
Packit 6c4009
/* Return file descriptor for new interval timer source.  */
Packit 6c4009
extern int timerfd_create (__clockid_t __clock_id, int __flags) __THROW;
Packit 6c4009
Packit 6c4009
/* Set next expiration time of interval timer source UFD to UTMR.  If
Packit 6c4009
   FLAGS has the TFD_TIMER_ABSTIME flag set the timeout value is
Packit 6c4009
   absolute.  Optionally return the old expiration time in OTMR.  */
Packit 6c4009
extern int timerfd_settime (int __ufd, int __flags,
Packit 6c4009
			    const struct itimerspec *__utmr,
Packit 6c4009
			    struct itimerspec *__otmr) __THROW;
Packit 6c4009
Packit 6c4009
/* Return the next expiration time of UFD.  */
Packit 6c4009
extern int timerfd_gettime (int __ufd, struct itimerspec *__otmr) __THROW;
Packit 6c4009
Packit 6c4009
__END_DECLS
Packit 6c4009
Packit 6c4009
#endif /* sys/timerfd.h */