linux - WaitForMultipleObjects() 和 WSAEnumNetworkEvents() 的等效 linux API 是什么?

标签 linux windows porting

WaitForMultipleObjects() 和 WSAEnumNetworkEvents() 的等效 linux API 是什么? 我们可以为 WaitForMultipleObjects 使用 pthread_cond_wait() 吗?

最佳答案

对于来自 Windows 背景的开发人员,我们在将一些代码从 Win32 移植到 pthreads 时遇到了同样的问题 and created an open source (MIT-licensed) library称为 pevents它在 Linux 上实现了 WaitForMultipleObjects(),同时支持自动和手动重置事件。它的行为方式应与 Windows 上的 WIN32 事件相同。

关于linux - WaitForMultipleObjects() 和 WSAEnumNetworkEvents() 的等效 linux API 是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13913882/

相关文章:

c - sys/mman.h 的 Windows 等价物

linux - 以编程方式禁用 AMD 系统上的硬件预取

linux - while循环变量读取问题

regex - 带有捕获组的正则表达式,用于由可变数量的单词组成的子字符串

python - 在 Python 中可靠地检测 Windows

javascript - 在 C++ 代码中处理 HTML 按钮单击事件

Java 到 Objective c

python - 将基于 'sh 1.11' 的代码移植到 Windows

linux - 如何在 vim 中为 *.h 文件设置 syntax=cpp

Windows 与 Linux 上的 Python 目录结构