/*
- * Copyright (C) 2011 David Goulet <david.goulet@polymtl.ca>
+ * Copyright (C) 2011 EfficiOS Inc.
*
- * SPDX-License-Identifier: GPL-2.0-only
+ * SPDX-License-Identifier: LGPL-2.1-only
*
*/
#include <common/common.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/*
* Used by lttng_poll_clean to free the events structure in a lttng_poll_event.
*/
free(events);
}
-#ifdef __cplusplus
-}
-#endif
-
/*
* epoll(7) implementation.
*/
#include <features.h>
#include <common/compat/fcntl.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* See man epoll(7) for this define path */
#define COMPAT_EPOLL_PROC_PATH "/proc/sys/fs/epoll/max_user_watches"
__lttng_poll_free((void *) events->events);
}
-#ifdef __cplusplus
-}
-#endif
-
#else /* HAVE_EPOLL */
/*
* Fallback on poll(2) API
#include <poll.h>
#include <stdint.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
enum {
/* Polling variables compatibility for poll */
LPOLLIN = POLLIN,
LPOLLRDBAND = POLLRDBAND,
LPOLLWRNORM = POLLWRNORM,
LPOLLWRBAND = POLLWRBAND,
-#if __linux__
+#ifdef __linux__
LPOLLMSG = POLLMSG,
LPOLLRDHUP = POLLRDHUP,
#elif (defined(__FreeBSD__) || defined(__CYGWIN__) || defined(__sun__) || defined(__APPLE__))
/*
* No need to reset a pollfd structure for poll(2)
*/
-static inline void lttng_poll_reset(struct lttng_poll_event *events)
+static inline void lttng_poll_reset(
+ struct lttng_poll_event *events __attribute__((unused)))
{}
/*
}
}
-#ifdef __cplusplus
-}
-#endif
-
#endif /* HAVE_EPOLL */
#endif /* _LTT_POLL_H */