diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-11-10 20:55:47 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-11-10 20:55:47 +0100 |
commit | c5aeb0dc4228c6396f35395194e0ec9cc91519c4 (patch) | |
tree | ff8a08aadad6c84d9042ffcc1ead169977216c01 /src/fastd.h | |
parent | 598a8acfc1c1aaefb3c7407e517cc1e0f87b753a (diff) | |
download | fastd-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.h | 5 |
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 */ |