kernel version can probably be older but we can't provide any guarantee.
Please let us know if you are able to go lower without any problems.
- - liburcu
+ - liburcu >= 0.8.0
Userspace RCU library, by Mathieu Desnoyers and Paul E. McKenney
- -> Tested with liburcu 0.7.x stable.
+ -> Tested with liburcu 0.8.x stable.
* Debian/Ubuntu package: liburcu-dev
* Git : git://git.lttng.org/userspace-rcu.git
AM_CONDITIONAL([LTTNG_BUILD_WITH_LIBC_UUID], [test "x$have_libc_uuid" = "xyes"])
# URCU library version needed or newer
-liburcu_version=">= 0.7.2"
+liburcu_version=">= 0.8.0"
# Check liburcu needed function calls
AC_CHECK_DECL([cds_list_add], [],
[AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include <urcu/list.h>]]
)
-AC_CHECK_DECL([cds_wfq_init], [],
- [AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include <urcu/wfqueue.h>]]
+AC_CHECK_DECL([cds_wfcq_init], [],
+ [AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include <urcu/wfcqueue.h>]]
)
-AC_CHECK_DECL([cds_wfq_dequeue_blocking], [],
- [AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include <urcu/wfqueue.h>]]
+AC_CHECK_DECL([cds_wfcq_dequeue_blocking], [],
+ [AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include <urcu/wfcqueue.h>]]
)
AC_CHECK_DECL([futex_async], [],
[AC_MSG_ERROR([liburcu $liburcu_version or newer is needed])], [[#include <urcu/futex.h>]]
#include <inttypes.h>
#include <pthread.h>
#include <urcu.h>
-#include <urcu/wfqueue.h>
+#include <urcu/wfcqueue.h>
#include <urcu/list.h>
#include <common/hashtable/hashtable.h>
struct lttcomm_sock *sock;
struct relay_session *session;
struct relay_viewer_session *viewer_session;
- struct cds_wfq_node qnode;
+ struct cds_wfcq_node qnode;
struct lttng_ht_node_ulong sock_n;
struct rcu_head rcu_node;
enum connection_type type;
new_conn->sock = newsock;
/* Enqueue request for the dispatcher thread. */
- cds_wfq_enqueue(&viewer_conn_queue.queue, &new_conn->qnode);
+ cds_wfcq_enqueue(&viewer_conn_queue.head, &viewer_conn_queue.tail,
+ &new_conn->qnode);
/*
* Wake the dispatch queue futex. Implicit memory barrier with
- * the exchange in cds_wfq_enqueue.
+ * the exchange in cds_wfcq_enqueue.
*/
futex_nto1_wake(&viewer_conn_queue.futex);
}
{
int err = -1;
ssize_t ret;
- struct cds_wfq_node *node;
+ struct cds_wfcq_node *node;
struct relay_connection *conn = NULL;
DBG("[thread] Live viewer relay dispatcher started");
health_code_update();
/* Dequeue commands */
- node = cds_wfq_dequeue_blocking(&viewer_conn_queue.queue);
+ node = cds_wfcq_dequeue_blocking(&viewer_conn_queue.head,
+ &viewer_conn_queue.tail);
if (node == NULL) {
DBG("Woken up but nothing in the live-viewer "
"relay command queue");
}
/* Init relay command queue. */
- cds_wfq_init(&viewer_conn_queue.queue);
+ cds_wfcq_init(&viewer_conn_queue.head, &viewer_conn_queue.tail);
/* Set up max poll set size */
lttng_poll_set_max_size();
#define _LGPL_SOURCE
#include <limits.h>
#include <urcu.h>
-#include <urcu/wfqueue.h>
+#include <urcu/wfcqueue.h>
#include <common/hashtable/hashtable.h>
* Queue used to enqueue relay requests
*/
struct relay_conn_queue {
- struct cds_wfq_queue queue;
+ struct cds_wfcq_head head;
+ struct cds_wfcq_tail tail;
int32_t futex;
};
new_conn->sock = newsock;
/* Enqueue request for the dispatcher thread. */
- cds_wfq_enqueue(&relay_conn_queue.queue, &new_conn->qnode);
+ cds_wfcq_enqueue(&relay_conn_queue.head, &relay_conn_queue.tail,
+ &new_conn->qnode);
/*
* Wake the dispatch queue futex. Implicit memory barrier with
- * the exchange in cds_wfq_enqueue.
+ * the exchange in cds_wfcq_enqueue.
*/
futex_nto1_wake(&relay_conn_queue.futex);
}
{
int err = -1;
ssize_t ret;
- struct cds_wfq_node *node;
+ struct cds_wfcq_node *node;
struct relay_connection *new_conn = NULL;
DBG("[thread] Relay dispatcher started");
health_code_update();
/* Dequeue commands */
- node = cds_wfq_dequeue_blocking(&relay_conn_queue.queue);
+ node = cds_wfcq_dequeue_blocking(&relay_conn_queue.head,
+ &relay_conn_queue.tail);
if (node == NULL) {
DBG("Woken up but nothing in the relay command queue");
/* Continue thread execution */
}
/* Init relay command queue. */
- cds_wfq_init(&relay_conn_queue.queue);
+ cds_wfcq_init(&relay_conn_queue.head, &relay_conn_queue.tail);
/* Set up max poll set size */
lttng_poll_set_max_size();
#define _LGPL_SOURCE
#include <urcu.h>
-#include <urcu/wfqueue.h>
+#include <urcu/wfcqueue.h>
#include <common/sessiond-comm/sessiond-comm.h>
#include <common/compat/poll.h>
struct ust_command {
int sock;
struct ust_register_msg reg_msg;
- struct cds_wfq_node node;
+ struct cds_wfcq_node node;
};
/*
*/
struct ust_cmd_queue {
int32_t futex;
- struct cds_wfq_queue queue;
+ struct cds_wfcq_head head;
+ struct cds_wfcq_tail tail;
};
/*
static void *thread_dispatch_ust_registration(void *data)
{
int ret, err = -1;
- struct cds_wfq_node *node;
+ struct cds_wfcq_node *node;
struct ust_command *ust_cmd = NULL;
struct ust_reg_wait_node *wait_node = NULL, *tmp_wait_node;
struct ust_reg_wait_queue wait_queue = {
health_code_update();
/* Dequeue command for registration */
- node = cds_wfq_dequeue_blocking(&ust_cmd_queue.queue);
+ node = cds_wfcq_dequeue_blocking(&ust_cmd_queue.head, &ust_cmd_queue.tail);
if (node == NULL) {
DBG("Woken up but nothing in the UST command queue");
/* Continue thread execution */
* Lock free enqueue the registration request. The red pill
* has been taken! This apps will be part of the *system*.
*/
- cds_wfq_enqueue(&ust_cmd_queue.queue, &ust_cmd->node);
+ cds_wfcq_enqueue(&ust_cmd_queue.head, &ust_cmd_queue.tail, &ust_cmd->node);
/*
* Wake the registration queue futex. Implicit memory
- * barrier with the exchange in cds_wfq_enqueue.
+ * barrier with the exchange in cds_wfcq_enqueue.
*/
futex_nto1_wake(&ust_cmd_queue.futex);
}
buffer_reg_init_pid_registry();
/* Init UST command queue. */
- cds_wfq_init(&ust_cmd_queue.queue);
+ cds_wfcq_init(&ust_cmd_queue.head, &ust_cmd_queue.tail);
/*
* Get session list pointer. This pointer MUST NOT be free(). This list is