swh:1:snp:c3bf2749e3476071fa748f67b0ffa2fdc5fe49d9
Raw File
Tip revision: 9bf1a2445f3c569098b8de7097ca324e65abecc2 authored by Linus Torvalds on 15 November 2008, 21:42:56 UTC
Linux 2.6.28-rc5
Tip revision: 9bf1a24
eventfd.h
/*
 *  include/linux/eventfd.h
 *
 *  Copyright (C) 2007  Davide Libenzi <davidel@xmailserver.org>
 *
 */

#ifndef _LINUX_EVENTFD_H
#define _LINUX_EVENTFD_H

#ifdef CONFIG_EVENTFD

/* For O_CLOEXEC and O_NONBLOCK */
#include <linux/fcntl.h>

/* Flags for eventfd2.  */
#define EFD_CLOEXEC O_CLOEXEC
#define EFD_NONBLOCK O_NONBLOCK

struct file *eventfd_fget(int fd);
int eventfd_signal(struct file *file, int n);

#else /* CONFIG_EVENTFD */

#define eventfd_fget(fd) ERR_PTR(-ENOSYS)
static inline int eventfd_signal(struct file *file, int n)
{ return 0; }

#endif /* CONFIG_EVENTFD */

#endif /* _LINUX_EVENTFD_H */

back to top