summaryrefslogtreecommitdiff
path: root/src/util/mq.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/mq.c')
-rw-r--r--src/util/mq.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/util/mq.c b/src/util/mq.c
index c9cfad2bd..03b0f3a2a 100644
--- a/src/util/mq.c
+++ b/src/util/mq.c
@@ -1150,6 +1150,28 @@ GNUNET_MQ_destroy_notify_cancel (
* @param[in|out] env element to insert at the tail
*/
void
+GNUNET_MQ_dll_insert_head (struct GNUNET_MQ_Envelope **env_head,
+ struct GNUNET_MQ_Envelope **env_tail,
+ struct GNUNET_MQ_Envelope *env)
+{
+
+ GNUNET_CONTAINER_DLL_insert (*env_head, *env_tail, env);
+}
+
+
+/**
+ * Insert @a env into the envelope DLL starting at @a env_head
+ * Note that @a env must not be in any MQ while this function
+ * is used with DLLs defined outside of the MQ module. This
+ * is just in case some application needs to also manage a
+ * FIFO of envelopes independent of MQ itself and wants to
+ * re-use the pointers internal to @a env. Use with caution.
+ *
+ * @param[in|out] env_head of envelope DLL
+ * @param[in|out] env_tail tail of envelope DLL
+ * @param[in|out] env element to insert at the tail
+ */
+void
GNUNET_MQ_dll_insert_tail (struct GNUNET_MQ_Envelope **env_head,
struct GNUNET_MQ_Envelope **env_tail,
struct GNUNET_MQ_Envelope *env)