Until now I haven’t been into system programming, so if the question seems to be inaccurate / naive / stupid, please help formulate it correctly.
While interested in two "mechanism": kqueue and epoll (and partly IOCP )
Question
How to programmatically find out that the necessary mechanism on the executable system is implemented and operational?
Details
The listed “mechanisms” (with the exception of IOCP , I probably don’t know) were not initially implemented. And they were added to the functionality from some kernel versions. As written on the net, for example, kqueue on FreeBSD - starting with version 4.1, epoll on Linux - starting from 2.5.44 kernel version. While I see for myself the only option - yes, watch the versions. But, something suggests that this is not correct, or rather, is not quite correct.
How more correct?