<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
	<id>https://arolstar52-zhtest.hf.space/index.php?action=history&amp;feed=atom&amp;title=Kqueue</id>
	<title>Kqueue - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://arolstar52-zhtest.hf.space/index.php?action=history&amp;feed=atom&amp;title=Kqueue"/>
	<link rel="alternate" type="text/html" href="https://arolstar52-zhtest.hf.space/index.php?title=Kqueue&amp;action=history"/>
	<updated>2026-06-26T00:55:02Z</updated>
	<subtitle>在这个wiki上该页的修订历史</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://arolstar52-zhtest.hf.space/index.php?title=Kqueue&amp;diff=3150412&amp;oldid=prev</id>
		<title>imported&gt;SchlurcherBot：​Bot: http → https</title>
		<link rel="alternate" type="text/html" href="https://arolstar52-zhtest.hf.space/index.php?title=Kqueue&amp;diff=3150412&amp;oldid=prev"/>
		<updated>2025-12-14T10:57:08Z</updated>

		<summary type="html">&lt;p&gt;Bot: http → https&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{noteTA|G1=IT}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;kqueue&amp;#039;&amp;#039;&amp;#039; 是一种可扩展的事件通知接口。2000 年 7 月发布的 [[FreeBSD]] 4.1 中首次引入了 kqueue&amp;lt;ref&amp;gt;{{Cite web |url=https://people.freebsd.org/~jlemon/papers/kqueue.pdf |title=存档副本 |accessdate=2018-12-05 |archive-date=2020-10-18 |archive-url=https://web.archive.org/web/20201018211731/https://people.freebsd.org/~jlemon/papers/kqueue.pdf |dead-url=no }}&amp;lt;/ref&amp;gt;，随后也被 [[NetBSD]]、[[OpenBSD]]、[[macOS]] 等操作系统支持。&lt;br /&gt;
&lt;br /&gt;
kqueue 在[[内核]]与[[用户空间]]之间充当输入输出事件的管线。因此在[[事件循环]]的迭代中，进行一次 &amp;lt;code&amp;gt;kevent(2)&amp;lt;/code&amp;gt; [[系统调用]]不仅可以接收未决事件，还可以修改事件过滤器。&lt;br /&gt;
&lt;br /&gt;
== 另见 ==&lt;br /&gt;
&lt;br /&gt;
支持 kqueue 且与操作系统无关的库：&lt;br /&gt;
&lt;br /&gt;
* [[libevent]]&lt;br /&gt;
* [[libuv]]&lt;br /&gt;
&lt;br /&gt;
其它平台上与 kqueue 等价的库：&lt;br /&gt;
&lt;br /&gt;
* Solaris、Windows、AIX：[[IOCP]]&lt;br /&gt;
* Linux：&lt;br /&gt;
** [[epoll]] 系统调用语义类似，但并不完全相同。&amp;lt;code&amp;gt;epoll&amp;lt;/code&amp;gt; 在文件描述符可进行 I/O 操作时进行通知，而 kqueue 和 IOCP 都在请求的操作完成时进行通知。&lt;br /&gt;
** [[inotify]] 是 Linux 上的内核子系统，可以在文件系统发生变化时通知应用程序。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;libkqueue&amp;lt;/code&amp;gt; 是在[[用户空间]]实现的 &amp;lt;code&amp;gt;kqueue(2)&amp;lt;/code&amp;gt;，将调用翻译为操作系统原生的事件机制。&amp;lt;ref&amp;gt;{{GitHub|https://github.com/mheily/libkqueue}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 参考资料 ==&lt;br /&gt;
{{reflist}}&lt;br /&gt;
&lt;br /&gt;
{{FreeBSD}}&lt;br /&gt;
&lt;br /&gt;
[[Category:事件 (计算机)]]&lt;br /&gt;
[[Category:FreeBSD]]&lt;br /&gt;
[[Category:OpenBSD]]&lt;br /&gt;
[[Category:MacOS]]&lt;br /&gt;
{{Computer-stub}}&lt;/div&gt;</summary>
		<author><name>imported&gt;SchlurcherBot</name></author>
	</entry>
</feed>