<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://nick-black.com/dankwiki/index.php?action=history&amp;feed=atom&amp;title=Eventfd</id>
	<title>Eventfd - revision history</title>
	<link rel="self" type="application/atom+xml" href="https://nick-black.com/dankwiki/index.php?action=history&amp;feed=atom&amp;title=Eventfd"/>
	<link rel="alternate" type="text/html" href="https://nick-black.com/dankwiki/index.php?title=Eventfd&amp;action=history"/>
	<updated>2026-07-11T15:25:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://nick-black.com/dankwiki/index.php?title=Eventfd&amp;diff=10046&amp;oldid=prev</id>
		<title>Dank at 18:10, 22 May 2023</title>
		<link rel="alternate" type="text/html" href="https://nick-black.com/dankwiki/index.php?title=Eventfd&amp;diff=10046&amp;oldid=prev"/>
		<updated>2023-05-22T18:10:11Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:10, 22 May 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l8&quot;&gt;Line 8:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 8:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==External links==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==External links==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[https://man7.org/linux/man-pages/man2/eventfd.2.html eventfd(2)] man page&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;[https://man7.org/linux/man-pages/man2/eventfd.2.html eventfd(2)] man page&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:1.41:old-10045:rev-10046:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Dank</name></author>
	</entry>
	<entry>
		<id>https://nick-black.com/dankwiki/index.php?title=Eventfd&amp;diff=10045&amp;oldid=prev</id>
		<title>Dank at 18:10, 22 May 2023</title>
		<link rel="alternate" type="text/html" href="https://nick-black.com/dankwiki/index.php?title=Eventfd&amp;diff=10045&amp;oldid=prev"/>
		<updated>2023-05-22T18:10:03Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:10, 22 May 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l6&quot;&gt;Line 6:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 6:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;tt&amp;gt;POLLOUT&amp;lt;/tt&amp;gt; is high whenever the value of the eventfd is less than its maximum, i.e. 0xfffffffffffffffd or less. It only guarantees that a value of 1 can be written without blocking.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;tt&amp;gt;POLLOUT&amp;lt;/tt&amp;gt; is high whenever the value of the eventfd is less than its maximum, i.e. 0xfffffffffffffffd or less. It only guarantees that a value of 1 can be written without blocking.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==External links==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[https://man7.org/linux/man-pages/man2/eventfd.2.html eventfd(2)] man page&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Dank</name></author>
	</entry>
	<entry>
		<id>https://nick-black.com/dankwiki/index.php?title=Eventfd&amp;diff=10044&amp;oldid=prev</id>
		<title>Dank at 18:08, 22 May 2023</title>
		<link rel="alternate" type="text/html" href="https://nick-black.com/dankwiki/index.php?title=Eventfd&amp;diff=10044&amp;oldid=prev"/>
		<updated>2023-05-22T18:08:45Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:08, 22 May 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Linux_APIs|Linux]] offers the eventfd abstraction for file descriptor-based userspace notification. It is backed by &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;merely &lt;/del&gt;a single &amp;lt;tt&amp;gt;uint64_t&amp;lt;/tt&amp;gt; in the kernel, unlike a pipe (which is usually backed by a much larger buffer). It is thus the most lightweight method of IPC available to userspace. The maximum value of the eventfd counter is 2^64-2 (0xfffffffffffffffe), and the minimum (and default) value is 0.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Linux_APIs|Linux]] offers the eventfd abstraction for file descriptor-based userspace notification. It is backed by a single &amp;lt;tt&amp;gt;uint64_t&amp;lt;/tt&amp;gt; in the kernel, unlike a pipe (which is usually backed by a much larger buffer). It is thus the most lightweight method of IPC available to userspace. The maximum value of the eventfd counter is 2^64-2 (0xfffffffffffffffe), and the minimum (and default) value is 0.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In the past, a full pipe was often used to interrupt a thread that was blocking in &amp;lt;tt&amp;gt;poll(2)&amp;lt;/tt&amp;gt; (or &amp;lt;tt&amp;gt;select&amp;lt;/tt&amp;gt;, or &amp;lt;tt&amp;gt;[[epoll]]&amp;lt;/tt&amp;gt;, etc.). An eventfd can serve this same purpose while requiring less kernel memory.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In the past, a full pipe was often used to interrupt a thread that was blocking in &amp;lt;tt&amp;gt;poll(2)&amp;lt;/tt&amp;gt; (or &amp;lt;tt&amp;gt;select&amp;lt;/tt&amp;gt;, or &amp;lt;tt&amp;gt;[[epoll]]&amp;lt;/tt&amp;gt;, etc.). An eventfd can serve this same purpose while requiring less kernel memory.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Dank</name></author>
	</entry>
	<entry>
		<id>https://nick-black.com/dankwiki/index.php?title=Eventfd&amp;diff=9872&amp;oldid=prev</id>
		<title>Dank: Created page with &quot;Linux offers the eventfd abstraction for file descriptor-based userspace notification. It is backed by merely a single &lt;tt&gt;uint64_t&lt;/tt&gt; in the kernel, unlike a pipe (which is usually backed by a much larger buffer). It is thus the most lightweight method of IPC available to userspace. The maximum value of the eventfd counter is 2^64-2 (0xfffffffffffffffe), and the minimum (and default) value is 0.  In the past, a full pipe was often used to interrupt a th...&quot;</title>
		<link rel="alternate" type="text/html" href="https://nick-black.com/dankwiki/index.php?title=Eventfd&amp;diff=9872&amp;oldid=prev"/>
		<updated>2023-05-07T22:08:23Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&lt;a href=&quot;/dankwiki/index.php?title=Linux_APIs&quot; title=&quot;Linux APIs&quot;&gt;Linux&lt;/a&gt; offers the eventfd abstraction for file descriptor-based userspace notification. It is backed by merely a single &amp;lt;tt&amp;gt;uint64_t&amp;lt;/tt&amp;gt; in the kernel, unlike a pipe (which is usually backed by a much larger buffer). It is thus the most lightweight method of IPC available to userspace. The maximum value of the eventfd counter is 2^64-2 (0xfffffffffffffffe), and the minimum (and default) value is 0.  In the past, a full pipe was often used to interrupt a th...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Linux_APIs|Linux]] offers the eventfd abstraction for file descriptor-based userspace notification. It is backed by merely a single &amp;lt;tt&amp;gt;uint64_t&amp;lt;/tt&amp;gt; in the kernel, unlike a pipe (which is usually backed by a much larger buffer). It is thus the most lightweight method of IPC available to userspace. The maximum value of the eventfd counter is 2^64-2 (0xfffffffffffffffe), and the minimum (and default) value is 0.&lt;br /&gt;
&lt;br /&gt;
In the past, a full pipe was often used to interrupt a thread that was blocking in &amp;lt;tt&amp;gt;poll(2)&amp;lt;/tt&amp;gt; (or &amp;lt;tt&amp;gt;select&amp;lt;/tt&amp;gt;, or &amp;lt;tt&amp;gt;[[epoll]]&amp;lt;/tt&amp;gt;, etc.). An eventfd can serve this same purpose while requiring less kernel memory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;write(2)&amp;lt;/tt&amp;gt;s add the submitted eight-byte value to the value currently in the eventfd, unless they would cause the counter to exceed its maximum value, in which case they block. &amp;lt;tt&amp;gt;read(2)&amp;lt;/tt&amp;gt;s return this eight-byte value, unless it is zero, in which case they block until the counter becomes non-zero. Following a successful &amp;lt;tt&amp;gt;read(2)&amp;lt;/tt&amp;gt;, the counter is reset to zero (if &amp;lt;tt&amp;gt;EFD_SEMAPHORE&amp;lt;/tt&amp;gt; was not specified) or decremented by one (if &amp;lt;tt&amp;gt;EFD_SEMAPHORE&amp;lt;/tt&amp;gt; was specified).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;POLLOUT&amp;lt;/tt&amp;gt; is high whenever the value of the eventfd is less than its maximum, i.e. 0xfffffffffffffffd or less. It only guarantees that a value of 1 can be written without blocking.&lt;/div&gt;</summary>
		<author><name>Dank</name></author>
	</entry>
</feed>