Tubetrue01 / articles

0 stars 0 forks source link

IO 多路复用(四)epoll 函数 | Tubetrue01 #34

Open Tubetrue01 opened 2 years ago

Tubetrue01 commented 2 years ago

https://tubetrue01.github.io/articles/2021/07/11/c_unix/IO%E5%A4%9A%E8%B7%AF%E5%A4%8D%E7%94%A8(%E5%9B%9B)epoll%20%E5%87%BD%E6%95%B0/

引言 epoll 是 Linux 特有的结构,它允许一个进程监听多个文件描述符,并在 I/O 就绪时获取到通知。epoll 有 ET(edge-triggered) 跟 LT(level-triggered) 两种对文件描述符的操作模式,默认为 LT。在我们深入了解它之前,让我们先看看它的语法。 epll 语法与 poll 不同的是,epoll 本身并不是一个系统调用。它是一个允许进程在多个文件