source: asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/linux/signalfd.c@ 337

Last change on this file since 337 was 337, checked in by coas-nagasima, 6 years ago

ASP3版ECNLを追加

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-csrc;charset=UTF-8
File size: 558 bytes
Line 
1#include <sys/signalfd.h>
2#include <signal.h>
3#include <errno.h>
4#include <fcntl.h>
5#include "syscall.h"
6
7int signalfd(int fd, const sigset_t *sigs, int flags)
8{
9 int ret = __syscall(SYS_signalfd4, fd, sigs, _NSIG/8, flags);
10#ifdef SYS_signalfd
11 if (ret != -ENOSYS) return __syscall_ret(ret);
12 ret = __syscall(SYS_signalfd, fd, sigs, _NSIG/8);
13 if (ret >= 0) {
14 if (flags & SFD_CLOEXEC)
15 __syscall(SYS_fcntl, ret, F_SETFD, FD_CLOEXEC);
16 if (flags & SFD_NONBLOCK)
17 __syscall(SYS_fcntl, ret, F_SETFL, O_NONBLOCK);
18 }
19#endif
20 return __syscall_ret(ret);
21}
Note: See TracBrowser for help on using the repository browser.