/*
- * 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
*
*/
#ifndef _LTT_POLL_H
#define _LTT_POLL_H
-#include <assert.h>
#include <string.h>
#include <unistd.h>
static inline int __lttng_epoll_get_prev_fd(struct lttng_poll_event *events,
int index, uint32_t nb_fd)
{
- assert(events);
- assert(index != nb_fd);
+ LTTNG_ASSERT(events);
+ LTTNG_ASSERT(index != nb_fd);
if (index == 0 || nb_fd == 0) {
return -1;
* fcntl(..).
*/
int efd = epoll_create(size);
- assert(fcntl(efd, F_SETFD, flags) != -1);
+ LTTNG_ASSERT(fcntl(efd, F_SETFD, flags) != -1);
return efd;
}
#endif
LPOLLRDBAND = POLLRDBAND,
LPOLLWRNORM = POLLWRNORM,
LPOLLWRBAND = POLLWRBAND,
-#if __linux__
+#ifdef __linux__
LPOLLMSG = POLLMSG,
LPOLLRDHUP = POLLRDHUP,
#elif (defined(__FreeBSD__) || defined(__CYGWIN__) || defined(__sun__) || defined(__APPLE__))
static inline int __lttng_poll_get_prev_fd(struct lttng_poll_event *events,
int index, uint32_t nb_fd)
{
- assert(events);
- assert(index != nb_fd);
+ LTTNG_ASSERT(events);
+ LTTNG_ASSERT(index != nb_fd);
if (index == 0 || nb_fd == 0) {
return -1;
/*
* 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)))
{}
/*