mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-12 06:10:10 +00:00
bdcebfc4c7
* io/Makefile (routines): Add dup3 and pipe2. * io/Versions [glibc] (GLIBC_2.9): Add dup3 and pipe2. * io/dup3.c: New file. * io/pipe2.c: New file. * posix/unistd.h: Declare dup3 and pipe2. * socket/Makefile (routines): Add paccept. * socket/Versions [glibc] (GLIBC_2.9): Add paccept. * socket/paccept.c: New file. * socket/sys/socket.h: Declare paccept. * sysdeps/unix/syscalls.list: Add entry for dup3. * sysdeps/unix/sysv/linux/Versions [glibc] (GLIBC_2.9): Add epoll_create2 and inotify_init1. * sysdeps/unix/sysv/linux/eventfd.c: Use eventfd1 syscall if possible. * sysdeps/unix/sysv/linux/paccept.c: New file. * sysdeps/unix/sysv/linux/signalfd.c: Use signalfd4 syscall if possible. * sysdeps/unix/sysv/linux/socketcall.h: Add SOCKOP_paccept. * sysdeps/unix/sysv/linux/syscalls.list: Add epoll_create2, inotify_init1, and pipe2 entries. * sysdeps/unix/sysv/linux/alpha/sys/epoll.h: New file. * sysdeps/unix/sysv/linux/alpha/sys/eventfd.h: New file. * sysdeps/unix/sysv/linux/alpha/sys/inotify.h: New file. * sysdeps/unix/sysv/linux/alpha/sys/signalfd.h: New file. * sysdeps/unix/sysv/linux/alpha/sys/timerfd.h: New file. * sysdeps/unix/sysv/linux/bits/socket.h: Define SOCK_CLOEXEC and SOCK_NONBLOCK. * sysdeps/unix/sysv/linux/i386/paccept.S: New file. * sysdeps/unix/sysv/linux/sparc/sys/epoll.h: New file. * sysdeps/unix/sysv/linux/sparc/sys/eventfd.h: New file. * sysdeps/unix/sysv/linux/sparc/sys/inotify.h: New file. * sysdeps/unix/sysv/linux/sparc/sys/signalfd.h: New file. * sysdeps/unix/sysv/linux/sparc/sys/timerfd.h: New file. * sysdeps/unix/sysv/linux/sparc/bits/socket.h: New file. * sysdeps/unix/sysv/linux/sys/epoll.h: Define EPOLL_CLOEXEC and EPOLL_NONBLOCK. Declare epoll_create2. * sysdeps/unix/sysv/linux/sys/eventfd.h: Define EFD_CLOEXEC and EFD_NONBLOCK. * sysdeps/unix/sysv/linux/sys/inotify.h: Define IN_CLOEXEC and IN_NONBLOCK. Declare inotify_init1. * sysdeps/unix/sysv/linux/sys/signalfd.h: Define SFD_CLOEXEC and SFD_NONBLOCK. * sysdeps/unix/sysv/linux/sys/timerfd.h: Define TFD_CLOEXEC and TFD_NONBLOCK.
61 lines
1.9 KiB
C
61 lines
1.9 KiB
C
/* Copyright (C) 2008 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
|
|
modify it under the terms of the GNU Lesser General Public
|
|
License as published by the Free Software Foundation; either
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Lesser General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
License along with the GNU C Library; if not, write to the Free
|
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
|
02111-1307 USA. */
|
|
|
|
#ifndef _SYS_TIMERFD_H
|
|
#define _SYS_TIMERFD_H 1
|
|
|
|
#include <time.h>
|
|
|
|
|
|
/* Bits to be set in the FLAGS parameter of `timerfd_create'. */
|
|
enum
|
|
{
|
|
TFD_CLOEXEC = 02000000,
|
|
#define TFD_CLOEXEC TFD_CLOEXEC
|
|
TFD_NONBLOCK = 04000
|
|
#define TFD_NONBLOCK TFD_NONBLOCK
|
|
};
|
|
|
|
|
|
/* Bits to be set in the FLAGS parameter of `timerfd_settime'. */
|
|
enum
|
|
{
|
|
TFD_TIMER_ABSTIME = 1 << 0
|
|
#define TFD_TIMER_ABSTIME TFD_TIMER_ABSTIME
|
|
};
|
|
|
|
|
|
__BEGIN_DECLS
|
|
|
|
/* Return file descriptor for new interval timer source. */
|
|
extern int timerfd_create (clockid_t __clock_id, int __flags) __THROW;
|
|
|
|
/* Set next expiration time of interval timer source UFD to UTMR. If
|
|
FLAGS has the TFD_TIMER_ABSTIME flag set the timeout value is
|
|
absolute. Optionally return the old expiration time in OTMR. */
|
|
extern int timerfd_settime (int __ufd, int __flags,
|
|
__const struct itimerspec *__utmr,
|
|
struct itimerspec *__otmr) __THROW;
|
|
|
|
/* Return the next expiration time of UFD. */
|
|
extern int timerfd_gettime (int __ufd, struct itimerspec *__otmr) __THROW;
|
|
|
|
__END_DECLS
|
|
|
|
#endif /* sys/timerfd.h */
|