cmogstored.git  about / heads / tags
alternative mogstored implementation for MogileFS
blob b9dff7947621ed565318d92f6e1a83d694d52ed5 565 bytes (raw)
$ git show v1.7.1:queue_epoll.h	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
 
/*
 * Copyright (C) 2012-2018 all contributors <cmogstored-public@bogomips.org>
 * License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
 */
#if defined(HAVE_EPOLL_WAIT) && ! MOG_LIBKQUEUE
#include <sys/epoll.h>

/*
 * EPOLLERR and EPOLLHUP are always set by default,
 * but there's no harm in setting them here
 */
#define MY_EP_FLAGS (EPOLLONESHOT|EPOLLHUP|EPOLLERR)
enum mog_qev {
	MOG_QEV_RD = EPOLLIN | MY_EP_FLAGS | EPOLLET,
	MOG_QEV_WR = EPOLLOUT | MY_EP_FLAGS | EPOLLET,
	MOG_QEV_RW = EPOLLIN | EPOLLOUT | MY_EP_FLAGS
};
#endif /* HAVE_EPOLL_WAIT */

git clone https://yhbt.net/cmogstored.git