GNUWeeb / GNUWeebBot

High-performance bot Telegram, running on Linux environment, written in C.
GNU General Public License v2.0
13 stars 8 forks source link

[core] Implement io_uring #39

Open ammarfaizi2 opened 3 years ago

ammarfaizi2 commented 3 years ago

I am going to replace epoll with io_uring, however io_uring syscall is only available for Linux 5.1+, hence I will not drop the epoll support, I will just make a dispatcher to detect kernel version at runtime.

IOW, we can say like this:

if (linux_version >= 5.1) {
   // use io_uring
} else {
   // fallback to epoll
}