)]}'
{
  "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",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c6ef5e33cb34ed2cefc257e3e20a9706f4bf4faa",
      "old_mode": 33188,
      "old_path": "fs/timerfd.c",
      "new_id": "75d44efe346ca93bcded0b3a5df75568bd809aa1",
      "new_mode": 33188,
      "new_path": "fs/timerfd.c"
    },
    {
      "type": "modify",
      "old_id": "96ed97dff00f3114e6f03f2ad412acfff7203d56",
      "old_mode": 33188,
      "old_path": "include/linux/timerfd.h",
      "new_id": "86cb0501d3e20428b749eb2156bf5abc301e1c20",
      "new_mode": 33188,
      "new_path": "include/linux/timerfd.h"
    }
  ]
}
