{"author_name":"chiharunpo","provider_url":"https://hatena.blog","height":"190","version":"1.0","published":"2018-03-31 20:15:22","url":"https://chiharunpo.hatenablog.com/entry/20180331/1522494922","author_url":"https://blog.hatena.ne.jp/chiharunpo/","title":"Linux \u306e eventfd \u3092 Win32 \u30a4\u30d9\u30f3\u30c8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u3088\u3046\u306b\u4f7f\u3046","image_url":null,"blog_url":"https://chiharunpo.hatenablog.com/","width":"100%","categories":["C++"],"blog_title":"Chiharu \u306e\u65e5\u8a18","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fchiharunpo.hatenablog.com%2Fentry%2F20180331%2F1522494922\" title=\"Linux \u306e eventfd \u3092 Win32 \u30a4\u30d9\u30f3\u30c8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u3088\u3046\u306b\u4f7f\u3046 - Chiharu \u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","type":"rich","provider_name":"Hatena Blog","description":"Linux \u306e eventfd \u3092 Win32 \u30a4\u30d9\u30f3\u30c8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e SetEvent(), ResetEvent(), WaitForSingleObject() \u306e\u3088\u3046\u306b\u4f7f\u3044\u305f\u304b\u3063\u305f\u306e\u3067\u3001\u3084\u3063\u3066\u307f\u307e\u3057\u305f\u3002\u751f\u6210\u6642\u306b EFD_NONBLOCK \u3092\u6307\u5b9a\u3057\u3066\u3001\u5f85\u6a5f\u3092 select() \u3067\u5b9f\u65bd\u3059\u308b\u306e\u304c\u30dd\u30a4\u30f3\u30c8\u3067\u3059\u306d\u3002 #include <sys/eventfd.h> #include <sys/select.h> #include <unistd.h> #include <cerrno> class Event { public: Event(): mEventFd(eventfd(0, EFD_\u2026"}