1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

Split architecture-specific parts of sys/eventfd.h into bits/eventfd.h.

This commit is contained in:
Joseph Myers
2012-02-13 20:27:59 +00:00
parent e19e83c5d2
commit 2a418ac326
5 changed files with 51 additions and 40 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
/* Copyright (C) 2007-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -16,36 +16,14 @@
<http://www.gnu.org/licenses/>. */
#ifndef _SYS_EVENTFD_H
#define _SYS_EVENTFD_H 1
# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead."
#endif
#include <stdint.h>
/* Type for event counter. */
typedef uint64_t eventfd_t;
/* Flags for signalfd. */
/* Flags for eventfd. */
enum
{
EFD_CLOEXEC = 0x400000,
#define EFD_CLOEXEC EFD_CLOEXEC
EFD_NONBLOCK = 0x4000
EFD_NONBLOCK = 0x004000
#define EFD_NONBLOCK EFD_NONBLOCK
};
__BEGIN_DECLS
/* Return file descriptor for generic event channel. Set initial
value to COUNT. */
extern int eventfd (int __count, int __flags) __THROW;
/* Read event counter and possibly wait for events. */
extern int eventfd_read (int __fd, eventfd_t *__value);
/* Increment event counter. */
extern int eventfd_write (int __fd, eventfd_t __value);
__END_DECLS
#endif /* sys/eventfd.h */