Andreas Klausmann wroteHi,
which unit(s) do I have to include to use eventfd() under Linux?
I don't think anyone has added it to the linux unit, unfortunately. You'll have to call it directly with Do_SysCall() in unit syscall.
Is this function used internally by TEvent? Or where does TEvent end up on
Linux level to create the event handle?
TEvent uses a mutex and a condition variable from pthreads on unix.
I'm looking for a way to wait for >=2 events without polling. A thread
should yield until one of them has been set.
eventfd() is nice and lightweight, but if you don't have an incredibly low latency requirement, you can use pipes to accomplish the same thing, with the benefit that you'll be portable to other Unix OS'es.
Henry