| 57 | } |
| 58 | |
| 59 | int CEvent::Init() |
| 60 | { |
| 61 | #if HAVE_EVENTFD |
| 62 | qDebug(log) << "Use eventfd"; |
| 63 | fd[0] = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC | EFD_SEMAPHORE); |
| 64 | #else |
| 65 | return CreateSocketPair(fd); |
| 66 | #endif |
| 67 | return 0; |
| 68 | } |
| 69 | |
| 70 | int CEvent::Clear() |
| 71 | { |