aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/libevent/include/event2/event_struct.h
diff options
context:
space:
mode:
authorkikht <kikht@yandex-team.ru>2022-02-10 16:45:14 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:14 +0300
commit194cae0e8855b11be2005e1eff12c660c3ee9774 (patch)
treeed29c437b616690880c017855ebe0be34fdf81a2 /contrib/libs/libevent/include/event2/event_struct.h
parent49116032d905455a7b1c994e4a696afc885c1e71 (diff)
downloadydb-194cae0e8855b11be2005e1eff12c660c3ee9774.tar.gz
Restoring authorship annotation for <kikht@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/libevent/include/event2/event_struct.h')
-rw-r--r--contrib/libs/libevent/include/event2/event_struct.h136
1 files changed, 68 insertions, 68 deletions
diff --git a/contrib/libs/libevent/include/event2/event_struct.h b/contrib/libs/libevent/include/event2/event_struct.h
index 1c8b71b6b0..d6b5a5b56a 100644
--- a/contrib/libs/libevent/include/event2/event_struct.h
+++ b/contrib/libs/libevent/include/event2/event_struct.h
@@ -24,8 +24,8 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef EVENT2_EVENT_STRUCT_H_INCLUDED_
-#define EVENT2_EVENT_STRUCT_H_INCLUDED_
+#ifndef EVENT2_EVENT_STRUCT_H_INCLUDED_
+#define EVENT2_EVENT_STRUCT_H_INCLUDED_
/** @file event2/event_struct.h
@@ -41,10 +41,10 @@ extern "C" {
#endif
#include <event2/event-config.h>
-#ifdef EVENT__HAVE_SYS_TYPES_H
+#ifdef EVENT__HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
-#ifdef EVENT__HAVE_SYS_TIME_H
+#ifdef EVENT__HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
@@ -54,20 +54,20 @@ extern "C" {
/* For evkeyvalq */
#include <event2/keyvalq_struct.h>
-#define EVLIST_TIMEOUT 0x01
-#define EVLIST_INSERTED 0x02
-#define EVLIST_SIGNAL 0x04
-#define EVLIST_ACTIVE 0x08
-#define EVLIST_INTERNAL 0x10
-#define EVLIST_ACTIVE_LATER 0x20
-#define EVLIST_FINALIZING 0x40
-#define EVLIST_INIT 0x80
+#define EVLIST_TIMEOUT 0x01
+#define EVLIST_INSERTED 0x02
+#define EVLIST_SIGNAL 0x04
+#define EVLIST_ACTIVE 0x08
+#define EVLIST_INTERNAL 0x10
+#define EVLIST_ACTIVE_LATER 0x20
+#define EVLIST_FINALIZING 0x40
+#define EVLIST_INIT 0x80
-#define EVLIST_ALL 0xff
+#define EVLIST_ALL 0xff
/* Fix so that people don't have to run with <sys/queue.h> */
#ifndef TAILQ_ENTRY
-#define EVENT_DEFINED_TQENTRY_
+#define EVENT_DEFINED_TQENTRY_
#define TAILQ_ENTRY(type) \
struct { \
struct type *tqe_next; /* next element */ \
@@ -76,7 +76,7 @@ struct { \
#endif /* !TAILQ_ENTRY */
#ifndef TAILQ_HEAD
-#define EVENT_DEFINED_TQHEAD_
+#define EVENT_DEFINED_TQHEAD_
#define TAILQ_HEAD(name, type) \
struct name { \
struct type *tqh_first; \
@@ -84,45 +84,45 @@ struct name { \
}
#endif
-/* Fix so that people don't have to run with <sys/queue.h> */
-#ifndef LIST_ENTRY
-#define EVENT_DEFINED_LISTENTRY_
-#define LIST_ENTRY(type) \
-struct { \
- struct type *le_next; /* next element */ \
- struct type **le_prev; /* address of previous next element */ \
-}
-#endif /* !LIST_ENTRY */
-
-#ifndef LIST_HEAD
-#define EVENT_DEFINED_LISTHEAD_
-#define LIST_HEAD(name, type) \
-struct name { \
- struct type *lh_first; /* first element */ \
- }
-#endif /* !LIST_HEAD */
-
-struct event;
-
-struct event_callback {
- TAILQ_ENTRY(event_callback) evcb_active_next;
- short evcb_flags;
- ev_uint8_t evcb_pri; /* smaller numbers are higher priority */
- ev_uint8_t evcb_closure;
- /* allows us to adopt for different types of events */
- union {
- void (*evcb_callback)(evutil_socket_t, short, void *);
- void (*evcb_selfcb)(struct event_callback *, void *);
- void (*evcb_evfinalize)(struct event *, void *);
- void (*evcb_cbfinalize)(struct event_callback *, void *);
- } evcb_cb_union;
- void *evcb_arg;
-};
-
+/* Fix so that people don't have to run with <sys/queue.h> */
+#ifndef LIST_ENTRY
+#define EVENT_DEFINED_LISTENTRY_
+#define LIST_ENTRY(type) \
+struct { \
+ struct type *le_next; /* next element */ \
+ struct type **le_prev; /* address of previous next element */ \
+}
+#endif /* !LIST_ENTRY */
+
+#ifndef LIST_HEAD
+#define EVENT_DEFINED_LISTHEAD_
+#define LIST_HEAD(name, type) \
+struct name { \
+ struct type *lh_first; /* first element */ \
+ }
+#endif /* !LIST_HEAD */
+
+struct event;
+
+struct event_callback {
+ TAILQ_ENTRY(event_callback) evcb_active_next;
+ short evcb_flags;
+ ev_uint8_t evcb_pri; /* smaller numbers are higher priority */
+ ev_uint8_t evcb_closure;
+ /* allows us to adopt for different types of events */
+ union {
+ void (*evcb_callback)(evutil_socket_t, short, void *);
+ void (*evcb_selfcb)(struct event_callback *, void *);
+ void (*evcb_evfinalize)(struct event *, void *);
+ void (*evcb_cbfinalize)(struct event_callback *, void *);
+ } evcb_cb_union;
+ void *evcb_arg;
+};
+
struct event_base;
struct event {
- struct event_callback ev_evcallback;
-
+ struct event_callback ev_evcallback;
+
/* for managing timeouts */
union {
TAILQ_ENTRY(event) ev_next_with_common_timeout;
@@ -135,18 +135,18 @@ struct event {
union {
/* used for io events */
struct {
- LIST_ENTRY (event) ev_io_next;
+ LIST_ENTRY (event) ev_io_next;
struct timeval ev_timeout;
} ev_io;
/* used by signal events */
struct {
- LIST_ENTRY (event) ev_signal_next;
+ LIST_ENTRY (event) ev_signal_next;
short ev_ncalls;
/* Allows deletes in callback */
short *ev_pncalls;
} ev_signal;
- } ev_;
+ } ev_;
short ev_events;
short ev_res; /* result passed to event callback */
@@ -155,26 +155,26 @@ struct event {
TAILQ_HEAD (event_list, event);
-#ifdef EVENT_DEFINED_TQENTRY_
+#ifdef EVENT_DEFINED_TQENTRY_
#undef TAILQ_ENTRY
#endif
-#ifdef EVENT_DEFINED_TQHEAD_
+#ifdef EVENT_DEFINED_TQHEAD_
#undef TAILQ_HEAD
#endif
-LIST_HEAD (event_dlist, event);
-
-#ifdef EVENT_DEFINED_LISTENTRY_
-#undef LIST_ENTRY
-#endif
-
-#ifdef EVENT_DEFINED_LISTHEAD_
-#undef LIST_HEAD
-#endif
-
+LIST_HEAD (event_dlist, event);
+
+#ifdef EVENT_DEFINED_LISTENTRY_
+#undef LIST_ENTRY
+#endif
+
+#ifdef EVENT_DEFINED_LISTHEAD_
+#undef LIST_HEAD
+#endif
+
#ifdef __cplusplus
}
#endif
-#endif /* EVENT2_EVENT_STRUCT_H_INCLUDED_ */
+#endif /* EVENT2_EVENT_STRUCT_H_INCLUDED_ */