cmogstored.git  about / heads / tags
alternative mogstored implementation for MogileFS
blob 8848a974003e30e775b2ef0b858a955f942a2e4b 554 bytes (raw)
$ git show gl-env: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-2016 all contributors <cmogstored-public@bogomips.org>
 * License: GPLv3 or later (see COPYING for details)
 */
#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