<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>chiharunpo</author_name>
  <author_url>https://blog.hatena.ne.jp/chiharunpo/</author_url>
  <blog_title>Chiharu の日記</blog_title>
  <blog_url>https://chiharunpo.hatenablog.com/</blog_url>
  <categories>
    <anon>C++</anon>
  </categories>
  <description>Linux の eventfd を Win32 イベントオブジェクトの SetEvent(), ResetEvent(), WaitForSingleObject() のように使いたかったので、やってみました。生成時に EFD_NONBLOCK を指定して、待機を select() で実施するのがポイントですね。 #include &lt;sys/eventfd.h&gt; #include &lt;sys/select.h&gt; #include &lt;unistd.h&gt; #include &lt;cerrno&gt; class Event { public: Event(): mEventFd(eventfd(0, EFD_…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fchiharunpo.hatenablog.com%2Fentry%2F20180331%2F1522494922&quot; title=&quot;Linux の eventfd を Win32 イベントオブジェクトのように使う - Chiharu の日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-03-31 20:15:22</published>
  <title>Linux の eventfd を Win32 イベントオブジェクトのように使う</title>
  <type>rich</type>
  <url>https://chiharunpo.hatenablog.com/entry/20180331/1522494922</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
