diff include/freeDiameter/libfdproto.h @ 1186:56c36d1007b4

Further preparation of the DTLS integration. Some cleanups in the GNUTLS handling.
author Sebastien Decugis <sdecugis@freediameter.net>
date Fri, 07 Jun 2013 18:48:34 +0800
parents 5dab72369dff
children f40de74bd1c7
line wrap: on
line diff
--- a/include/freeDiameter/libfdproto.h	Thu Jun 06 19:06:00 2013 +0800
+++ b/include/freeDiameter/libfdproto.h	Fri Jun 07 18:48:34 2013 +0800
@@ -3183,6 +3183,28 @@
 #define fd_fifo_timedget(queue, item, abstime) \
 	fd_fifo_timedget_int((queue), (void *)(item), (abstime))
 
+
+/*
+ * FUNCTION:	fd_fifo_select
+ *
+ * PARAMETERS:
+ *  queue	: The queue to test.
+ *  abstime	: the absolute time until which we can block waiting for an item. If NULL, the function returns immediatly.
+ *
+ * DESCRIPTION: 
+ *  This function is similar to select(), it waits for data to be available in the queue
+ * until the abstime is expired.
+ * Upon function entry, even if abstime is already expired the data availability is tested.
+ *
+ * RETURN VALUE:
+ *  0		: timeout expired without available data.
+ *  <0		: An error occurred (e.g., -EINVAL...)
+ *  >0		: data is available. The next call to fd_fifo_get will not block.
+ */
+int fd_fifo_select ( struct fifo * queue, const struct timespec *abstime );
+
+
+
 /* Dump a fifo list and optionally its inner elements -- beware of deadlocks! */
 typedef DECLARE_FD_DUMP_PROTOTYPE((*fd_fifo_dump_item_cb), void * item); /* This function should be 1 line if possible, or use indent level. Ends with '\n' */
 DECLARE_FD_DUMP_PROTOTYPE(fd_fifo_dump, char * name, struct fifo * queue, fd_fifo_dump_item_cb dump_item);
"Welcome to our mercurial repository"