162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci *  include/linux/timerfd.h
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci *  Copyright (C) 2007  Davide Libenzi <davidel@xmailserver.org>
662306a36Sopenharmony_ci *
762306a36Sopenharmony_ci */
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci#ifndef _UAPI_LINUX_TIMERFD_H
1062306a36Sopenharmony_ci#define _UAPI_LINUX_TIMERFD_H
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ci#include <linux/types.h>
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ci/* For O_CLOEXEC and O_NONBLOCK */
1562306a36Sopenharmony_ci#include <linux/fcntl.h>
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci/* For _IO helpers */
1862306a36Sopenharmony_ci#include <linux/ioctl.h>
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci/*
2162306a36Sopenharmony_ci * CAREFUL: Check include/asm-generic/fcntl.h when defining
2262306a36Sopenharmony_ci * new flags, since they might collide with O_* ones. We want
2362306a36Sopenharmony_ci * to re-use O_* flags that couldn't possibly have a meaning
2462306a36Sopenharmony_ci * from eventfd, in order to leave a free define-space for
2562306a36Sopenharmony_ci * shared O_* flags.
2662306a36Sopenharmony_ci *
2762306a36Sopenharmony_ci * Also make sure to update the masks in include/linux/timerfd.h
2862306a36Sopenharmony_ci * when adding new flags.
2962306a36Sopenharmony_ci */
3062306a36Sopenharmony_ci#define TFD_TIMER_ABSTIME (1 << 0)
3162306a36Sopenharmony_ci#define TFD_TIMER_CANCEL_ON_SET (1 << 1)
3262306a36Sopenharmony_ci#define TFD_CLOEXEC O_CLOEXEC
3362306a36Sopenharmony_ci#define TFD_NONBLOCK O_NONBLOCK
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_ci#define TFD_IOC_SET_TICKS	_IOW('T', 0, __u64)
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_ci#endif /* _UAPI_LINUX_TIMERFD_H */
38