Ulrich Drepper
9fe5ad9c8c
flag parameters add-on: remove epoll_create size param
Remove the size parameter from the new epoll_create syscall and renames the
syscall itself. The updated test program follows.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#include <fcntl.h>
#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include <sys/syscall.h>
#ifndef __NR_epoll_create2
# ifdef __x86_64__
# define __NR_epoll_create2 291
# elif defined __i386__
# define __NR_epoll_create2 329
# else
# error "need __NR_epoll_create2"
# endif
#endif
#define EPOLL_CLOEXEC O_CLOEXEC
int
main (void)
{
int fd = syscall (__NR_epoll_create2, 0);
if (fd == -1)
{
puts ("epoll_create2(0) failed");
return 1;
}
int coe = fcntl (fd, F_GETFD);
if (coe == -1)
{
puts ("fcntl failed");
return 1;
}
if (coe & FD_CLOEXEC)
{
puts ("epoll_create2(0) set close-on-exec flag");
return 1;
}
close (fd);
fd = syscall (__NR_epoll_create2, EPOLL_CLOEXEC);
if (fd == -1)
{
puts ("epoll_create2(EPOLL_CLOEXEC) failed");
return 1;
}
coe = fcntl (fd, F_GETFD);
if (coe == -1)
{
puts ("fcntl failed");
return 1;
}
if ((coe & FD_CLOEXEC) == 0)
{
puts ("epoll_create2(EPOLL_CLOEXEC) set close-on-exec flag");
return 1;
}
close (fd);
puts ("OK");
return 0;
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Ulrich Drepper <drepper@redhat.com>
Acked-by: Davide Libenzi <davidel@xmailserver.org>
Cc: Michael Kerrisk <mtk.manpages@googlemail.com>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:29 -07:00
..
2008-07-03 09:59:03 -05:00
2008-04-30 08:29:54 -07:00
2008-05-06 13:45:33 -04:00
2008-06-06 11:29:10 -07:00
2008-02-08 09:22:40 -08:00
2008-05-01 08:04:01 -07:00
2008-05-16 12:01:45 -07:00
2008-04-30 08:29:54 -07:00
2008-07-14 15:29:34 -06:00
2008-07-21 21:54:41 -07:00
2008-07-17 15:21:29 -07:00
2008-04-18 22:16:44 -04:00
2008-07-21 21:54:59 -07:00
2008-04-30 08:29:48 -07:00
2008-07-17 15:21:29 -07:00
2008-07-14 15:29:34 -06:00
2008-04-02 15:28:19 -07:00
2008-04-30 08:29:54 -07:00
2008-04-28 08:58:43 -07:00
2008-07-04 10:40:05 -07:00
2008-07-11 19:27:31 -04:00
2008-07-14 15:29:34 -06:00
2008-04-29 08:06:00 -07:00
2008-06-17 18:08:10 -07:00
2008-07-15 10:38:46 -07:00
2008-04-30 08:29:52 -07:00
2008-05-13 08:02:24 -07:00
2008-02-05 09:44:30 -08:00
2008-02-08 09:22:40 -08:00
2008-05-21 16:55:58 -07:00
2008-07-24 10:47:17 -07:00
2008-04-30 08:29:33 -07:00
2008-05-14 19:11:14 -07:00
2008-07-11 19:27:31 -04:00
2008-05-01 11:15:28 -07:00
2008-06-10 15:12:58 -05:00
2008-07-20 21:21:46 -07:00
2008-02-07 08:42:28 -08:00
2008-06-20 14:05:54 -06:00
2008-07-02 15:06:27 -06:00
2008-07-15 18:34:58 -04:00
2008-07-20 21:21:46 -07:00
2007-10-18 14:37:31 -07:00
2008-05-24 09:56:08 -07:00
2008-07-17 15:21:29 -07:00
2008-02-07 08:42:29 -08:00
2008-07-21 21:54:52 -07:00
2008-07-24 10:47:17 -07:00
2008-02-07 08:42:28 -08:00
2008-07-04 09:52:14 +02:00
2008-07-08 12:39:31 -07:00
2008-03-19 18:53:36 -07:00
2008-07-02 15:06:27 -06:00
2008-07-21 21:55:01 -07:00
2008-04-30 08:29:52 -07:00
2008-07-15 17:35:24 +03:00
2008-06-24 11:38:03 +02:00
2008-05-13 08:02:23 -07:00
2008-06-20 14:05:54 -06:00
2008-07-11 11:37:18 -07:00
2008-06-06 11:36:22 -07:00
2008-07-24 10:47:28 -07:00
2007-10-18 14:37:22 -07:00
2008-02-07 08:42:26 -08:00
2008-04-29 08:06:04 -07:00
2008-06-06 11:29:13 -07:00
2008-07-22 09:59:40 -07:00
2008-04-29 08:06:04 -07:00
2008-06-06 11:29:13 -07:00
2008-07-24 10:47:27 -07:00
2008-04-29 08:06:04 -07:00
2008-04-25 09:23:53 -04:00
2008-07-03 13:21:13 +02:00
2008-07-03 13:21:15 +02:00
2008-06-23 08:30:55 -04:00
2008-07-15 21:55:59 +02:00
2008-06-20 14:05:53 -06:00
2008-01-30 13:31:46 +01:00
2008-07-19 00:30:39 -07:00
2008-07-24 10:47:27 -07:00
2008-07-24 10:47:15 -07:00
2008-02-14 21:17:09 -08:00
2008-02-05 09:44:13 -08:00
2008-05-01 13:08:16 -04:00
2008-05-13 08:02:23 -07:00
2008-04-29 08:06:05 -07:00
2008-07-24 10:47:29 -07:00
2008-07-24 10:47:29 -07:00
2008-07-24 10:47:15 -07:00
2008-07-24 10:47:28 -07:00
2008-05-01 13:08:16 -04:00
2008-05-16 17:22:52 -04:00
2008-07-14 19:10:52 +03:00
2007-07-17 12:00:03 -07:00
2008-05-06 13:13:37 -07:00
2008-07-24 10:47:29 -07:00
2008-02-06 10:41:07 -08:00
2008-04-21 23:11:01 -04:00
2008-04-29 08:06:00 -07:00
2008-01-28 11:38:15 +01:00
2008-07-17 10:55:51 -07:00
2008-06-06 11:29:08 -07:00
2008-07-04 10:40:07 -07:00
2008-06-23 11:52:30 -04:00
2008-07-16 15:02:57 -07:00
2008-04-15 19:35:41 -07:00
2008-07-11 19:27:31 -04:00
2008-06-23 11:52:30 -04:00
2008-07-14 15:02:05 +10:00
2008-02-14 21:13:33 -08:00
2008-07-24 10:47:19 -07:00
2008-07-24 10:47:29 -07:00
2008-04-23 00:05:09 -04:00
2008-04-23 00:05:09 -04:00
2008-04-28 08:58:32 -07:00
2008-04-30 08:29:51 -07:00
2008-04-28 08:58:33 -07:00
2008-07-02 15:06:27 -06:00
2007-12-06 17:39:54 -05:00
2008-06-22 12:23:15 -07:00
2008-04-23 00:04:38 -04:00
2008-07-24 10:47:29 -07:00
2008-07-04 09:52:14 +02:00
2008-02-14 21:13:33 -08:00
2008-07-24 10:47:15 -07:00
2008-07-24 10:47:17 -07:00
2008-07-24 10:47:29 -07:00
2008-06-23 08:43:52 -04:00
2008-04-29 08:06:06 -07:00