)]}'
{
  "log": [
    {
      "commit": "6b1ef0e60d42f2fdaec26baee8327eb156347b4f",
      "tree": "84f7e417f0c1f637ed10d42406276cff83849d69",
      "parents": [
        "e7d476dfdf0bcfed478a207aecfdc84f81efecaf"
      ],
      "author": {
        "name": "Ulrich Drepper",
        "email": "drepper@redhat.com",
        "time": "Wed Jul 23 21:29:39 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jul 24 10:47:29 2008 -0700"
      },
      "message": "flag parameters: NONBLOCK in timerfd_create\n\nThis patch adds support for the TFD_NONBLOCK flag to timerfd_create.  The\nadditional changes needed are minimal.\n\nThe following test must be adjusted for architectures other than x86 and\nx86-64 and in case the syscall numbers changed.\n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n#include \u003cfcntl.h\u003e\n#include \u003cstdio.h\u003e\n#include \u003ctime.h\u003e\n#include \u003cunistd.h\u003e\n#include \u003csys/syscall.h\u003e\n\n#ifndef __NR_timerfd_create\n# ifdef __x86_64__\n#  define __NR_timerfd_create 283\n# elif defined __i386__\n#  define __NR_timerfd_create 322\n# else\n#  error \"need __NR_timerfd_create\"\n# endif\n#endif\n\n#define TFD_NONBLOCK O_NONBLOCK\n\nint\nmain (void)\n{\n  int fd \u003d syscall (__NR_timerfd_create, CLOCK_REALTIME, 0);\n  if (fd \u003d\u003d -1)\n    {\n      puts (\"timerfd_create(0) failed\");\n      return 1;\n    }\n  int fl \u003d fcntl (fd, F_GETFL);\n  if (fl \u003d\u003d -1)\n    {\n      puts (\"fcntl failed\");\n      return 1;\n    }\n  if (fl \u0026 O_NONBLOCK)\n    {\n      puts (\"timerfd_create(0) set non-blocking mode\");\n      return 1;\n    }\n  close (fd);\n\n  fd \u003d syscall (__NR_timerfd_create, CLOCK_REALTIME, TFD_NONBLOCK);\n  if (fd \u003d\u003d -1)\n    {\n      puts (\"timerfd_create(TFD_NONBLOCK) failed\");\n      return 1;\n    }\n  fl \u003d fcntl (fd, F_GETFL);\n  if (fl \u003d\u003d -1)\n    {\n      puts (\"fcntl failed\");\n      return 1;\n    }\n  if ((fl \u0026 O_NONBLOCK) \u003d\u003d 0)\n    {\n      puts (\"timerfd_create(TFD_NONBLOCK) set non-blocking mode\");\n      return 1;\n    }\n  close (fd);\n\n  puts (\"OK\");\n\n  return 0;\n}\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nSigned-off-by: Ulrich Drepper \u003cdrepper@redhat.com\u003e\nAcked-by: Davide Libenzi \u003cdavidel@xmailserver.org\u003e\nCc: Michael Kerrisk \u003cmtk.manpages@googlemail.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "11fcb6c14676023d0bd437841f5dcd670e7990a0",
      "tree": "7b98614739715734d9cdd74f94982e110c953fc0",
      "parents": [
        "b087498eb5605673b0f260a7620d91818cd72304"
      ],
      "author": {
        "name": "Ulrich Drepper",
        "email": "drepper@redhat.com",
        "time": "Wed Jul 23 21:29:26 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jul 24 10:47:27 2008 -0700"
      },
      "message": "flag parameters: timerfd_create\n\nThe timerfd_create syscall already has a flags parameter.  It just is\nunused so far.  This patch changes this by introducing the TFD_CLOEXEC\nflag to set the close-on-exec flag for the returned file descriptor.\n\nA new name TFD_CLOEXEC is introduced which in this implementation must\nhave the same value as O_CLOEXEC.\n\nThe following test must be adjusted for architectures other than x86 and\nx86-64 and in case the syscall numbers changed.\n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n#include \u003cfcntl.h\u003e\n#include \u003cstdio.h\u003e\n#include \u003ctime.h\u003e\n#include \u003cunistd.h\u003e\n#include \u003csys/syscall.h\u003e\n\n#ifndef __NR_timerfd_create\n# ifdef __x86_64__\n#  define __NR_timerfd_create 283\n# elif defined __i386__\n#  define __NR_timerfd_create 322\n# else\n#  error \"need __NR_timerfd_create\"\n# endif\n#endif\n\n#define TFD_CLOEXEC O_CLOEXEC\n\nint\nmain (void)\n{\n  int fd \u003d syscall (__NR_timerfd_create, CLOCK_REALTIME, 0);\n  if (fd \u003d\u003d -1)\n    {\n      puts (\"timerfd_create(0) failed\");\n      return 1;\n    }\n  int coe \u003d fcntl (fd, F_GETFD);\n  if (coe \u003d\u003d -1)\n    {\n      puts (\"fcntl failed\");\n      return 1;\n    }\n  if (coe \u0026 FD_CLOEXEC)\n    {\n      puts (\"timerfd_create(0) set close-on-exec flag\");\n      return 1;\n    }\n  close (fd);\n\n  fd \u003d syscall (__NR_timerfd_create, CLOCK_REALTIME, TFD_CLOEXEC);\n  if (fd \u003d\u003d -1)\n    {\n      puts (\"timerfd_create(TFD_CLOEXEC) failed\");\n      return 1;\n    }\n  coe \u003d fcntl (fd, F_GETFD);\n  if (coe \u003d\u003d -1)\n    {\n      puts (\"fcntl failed\");\n      return 1;\n    }\n  if ((coe \u0026 FD_CLOEXEC) \u003d\u003d 0)\n    {\n      puts (\"timerfd_create(TFD_CLOEXEC) set close-on-exec flag\");\n      return 1;\n    }\n  close (fd);\n\n  puts (\"OK\");\n\n  return 0;\n}\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nSigned-off-by: Ulrich Drepper \u003cdrepper@redhat.com\u003e\nAcked-by: Davide Libenzi \u003cdavidel@xmailserver.org\u003e\nCc: Michael Kerrisk \u003cmtk.manpages@googlemail.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "b215e283992899650c4271e7385c79e26fb9a88e",
      "tree": "3f950814510422606821f1b0b373d65e4d9ed303",
      "parents": [
        "6d18c9220965b437287c3a7e803725c24992ceac"
      ],
      "author": {
        "name": "Davide Libenzi",
        "email": "davidel@xmailserver.org",
        "time": "Thu May 10 22:23:16 2007 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.linux-foundation.org",
        "time": "Fri May 11 08:29:36 2007 -0700"
      },
      "message": "signal/timer/event: timerfd core\n\nThis patch introduces a new system call for timers events delivered though\nfile descriptors.  This allows timer event to be used with standard POSIX\npoll(2), select(2) and read(2).  As a consequence of supporting the Linux\nf_op-\u003epoll subsystem, they can be used with epoll(2) too.\n\nThe system call is defined as:\n\nint timerfd(int ufd, int clockid, int flags, const struct itimerspec *utmr);\n\nThe \"ufd\" parameter allows for re-use (re-programming) of an existing timerfd\nw/out going through the close/open cycle (same as signalfd).  If \"ufd\" is -1,\ns new file descriptor will be created, otherwise the existing \"ufd\" will be\nre-programmed.\n\nThe \"clockid\" parameter is either CLOCK_MONOTONIC or CLOCK_REALTIME.  The time\nspecified in the \"utmr-\u003eit_value\" parameter is the expiry time for the timer.\n\nIf the TFD_TIMER_ABSTIME flag is set in \"flags\", this is an absolute time,\notherwise it\u0027s a relative time.\n\nIf the time specified in the \"utmr-\u003eit_interval\" is not zero (.tv_sec \u003d\u003d 0,\ntv_nsec \u003d\u003d 0), this is the period at which the following ticks should be\ngenerated.\n\nThe \"utmr-\u003eit_interval\" should be set to zero if only one tick is requested.\nSetting the \"utmr-\u003eit_value\" to zero will disable the timer, or will create a\ntimerfd without the timer enabled.\n\nThe function returns the new (or same, in case \"ufd\" is a valid timerfd\ndescriptor) file, or -1 in case of error.\n\nAs stated before, the timerfd file descriptor supports poll(2), select(2) and\nepoll(2).  When a timer event happened on the timerfd, a POLLIN mask will be\nreturned.\n\nThe read(2) call can be used, and it will return a u32 variable holding the\nnumber of \"ticks\" that happened on the interface since the last call to\nread(2).  The read(2) call supportes the O_NONBLOCK flag too, and EAGAIN will\nbe returned if no ticks happened.\n\nA quick test program, shows timerfd working correctly on my amd64 box:\n\nhttp://www.xmailserver.org/timerfd-test.c\n\n[akpm@linux-foundation.org: add sys_timerfd to sys_ni.c]\nSigned-off-by: Davide Libenzi \u003cdavidel@xmailserver.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    }
  ]
}
