summaryrefslogtreecommitdiffstats
path: root/src/fastd.h
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2015-11-10 20:55:47 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2015-11-10 20:55:47 +0100
commitc5aeb0dc4228c6396f35395194e0ec9cc91519c4 (patch)
treeff8a08aadad6c84d9042ffcc1ead169977216c01 /src/fastd.h
parent598a8acfc1c1aaefb3c7407e517cc1e0f87b753a (diff)
downloadfastd-c5aeb0dc4228c6396f35395194e0ec9cc91519c4.tar
fastd-c5aeb0dc4228c6396f35395194e0ec9cc91519c4.zip
Implement generic task queue to handle handshakes and maintenance
Diffstat (limited to 'src/fastd.h')
-rw-r--r--src/fastd.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fastd.h b/src/fastd.h
index d15033c..9d44b21 100644
--- a/src/fastd.h
+++ b/src/fastd.h
@@ -41,6 +41,7 @@
#include "poll.h"
#include "sem.h"
#include "shell.h"
+#include "task.h"
#include "util.h"
#include "vector.h"
@@ -312,8 +313,8 @@ struct fastd_context {
size_t peer_addr_ht_used; /**< The current number of entries in the peer address hashtable */
VECTOR(fastd_peer_t *) *peer_addr_ht; /**< An array of hash buckets for the peer hash table */
- fastd_pqueue_t *handshake_queue; /**< A priority queue of the peers currently queued for handshakes (ordered by the time of the next handshake) */
- fastd_timeout_t next_maintenance; /**< The time of the next maintenance call */
+ fastd_pqueue_t *task_queue; /**< Priority queue of scheduled tasks */
+ fastd_task_t next_maintenance; /**< Schedules the next maintenance call */
VECTOR(pid_t) async_pids; /**< PIDs of asynchronously executed commands which still have to be reaped */
fastd_poll_fd_t async_rfd; /**< The read side of the pipe used to send data from other threads to the main thread */