/* the specific events implementation */
const struct tevent_ops *ops;
+ /*
+ * The following three pointers are queried on every loop_once
+ * in the order in which they appear here. Not measured, but
+ * hopefully putting them at the top together with "ops"
+ * should make tevent a *bit* more cache-friendly than before.
+ */
+
+ /* list of signal events - used by common code */
+ struct tevent_signal *signal_events;
+
+ /* List of threaded job indicators */
+ struct tevent_threaded_context *threaded_contexts;
+
+ /* list of immediate events - used by common code */
+ struct tevent_immediate *immediate_events;
+
/* list of fd events - used by common code */
struct tevent_fd *fd_events;
/* list of timed events - used by common code */
struct tevent_timer *timer_events;
- /* List of threaded job indicators */
- struct tevent_threaded_context *threaded_contexts;
-
/* List of scheduled immediates */
pthread_mutex_t scheduled_mutex;
struct tevent_immediate *scheduled_immediates;
- /* list of immediate events - used by common code */
- struct tevent_immediate *immediate_events;
-
- /* list of signal events - used by common code */
- struct tevent_signal *signal_events;
-
/* this is private for the events_ops implementation */
void *additional_data;
/* pipe hack used with signal handlers */
- struct tevent_fd *pipe_fde;
- int pipe_fds[2];
+ struct tevent_fd *wakeup_fde;
+ int wakeup_fd;
+#ifndef HAVE_EVENT_FD
+ int wakeup_write_fd;
+#endif
/* debugging operations */
struct tevent_debug_ops debug_ops;
#endif
#ifdef HAVE_SOLARIS_PORTS
bool tevent_port_init(void);
+#ifdef HAVE_KQUEUE
+bool tevent_kqueue_init(void);
+bool tevent_kqueue_set_panic_fallback(struct tevent_context *ev,
+ bool (*panic_fallback)(struct tevent_context *ev,
+ bool replay));
#endif