1 //===--------------------- KQueue.h -----------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef utility_KQueue_h_
11 #define utility_KQueue_h_
13 #if defined(__APPLE__)
14 #define LLDB_USE_KQUEUES
17 #ifdef LLDB_USE_KQUEUES
19 #include <sys/types.h>
20 #include <sys/event.h>
23 #include "lldb/lldb-defines.h"
25 namespace lldb_private {
47 GetFD (bool can_create);
59 WaitForEvents (struct kevent *events,
62 uint32_t timeout_usec = UINT32_MAX); // UINT32_MAX means infinite timeout
65 int m_fd; // The kqueue fd
68 } // namespace lldb_private
70 #endif // #ifdef LLDB_USE_KQUEUES
72 #endif // #ifndef utility_KQueue_h_