thread: use existing EPOLL defines

Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Change-Id: Ic8ed31c7c2a4b915ec969a0757fca73ebbfb4488
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14934
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Thanos Makatos 2022-07-27 08:59:21 +00:00 committed by Tomasz Zawadzki
parent b8fc75c36e
commit e51dde79b8

View File

@ -10,6 +10,10 @@
#ifndef SPDK_THREAD_H_
#define SPDK_THREAD_H_
#ifdef __linux__
#include <sys/epoll.h>
#endif
#include "spdk/stdinc.h"
#include "spdk/cpuset.h"
@ -802,9 +806,15 @@ struct spdk_interrupt *spdk_interrupt_register(int efd, spdk_interrupt_fn fn,
void spdk_interrupt_unregister(struct spdk_interrupt **pintr);
enum spdk_interrupt_event_types {
SPDK_INTERRUPT_EVENT_IN = 0x001,
#ifdef __linux__
SPDK_INTERRUPT_EVENT_IN = EPOLLIN,
SPDK_INTERRUPT_EVENT_OUT = EPOLLOUT,
SPDK_INTERRUPT_EVENT_ET = EPOLLET
#else
SPDK_INTERRUPT_EVENT_IN = 0x001,
SPDK_INTERRUPT_EVENT_OUT = 0x004,
SPDK_INTERRUPT_EVENT_ET = 1u << 31
#endif
};
/**