This reverts commit
6fd172f599e8d798e68974a786dd930d876f182e.
The initial-exec model seems to behave differently than global-dynamic
with respect to lazy initialization, causing locks to be taken then
first time each thread touch the TLS. This introduces deadlocks
with library constructors waiting on other threads.
This will require further investigation.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
# define URCU_TLS(name) (name)
-# define DEFINE_URCU_TLS_IE(type, name) \
- CONFIG_RCU_TLS __attribute__((tls_model("initial-exec"))) type name
-
#else /* #ifndef CONFIG_RCU_TLS */
/*
# define DEFINE_URCU_TLS(type, name) \
DEFINE_URCU_TLS_1(type, name)
-# define DEFINE_URCU_TLS_IE(type, name) \
- DEFINE_URCU_TLS_1(type, name)
-
# define URCU_TLS_1(name) (*__tls_access_ ## name())
# define URCU_TLS(name) URCU_TLS_1(name)
* Pointer to registry elements. Written to only by each individual reader. Read
* by both the reader and the writers.
*/
-DEFINE_URCU_TLS_IE(struct rcu_reader *, rcu_reader);
+DEFINE_URCU_TLS(struct rcu_reader *, rcu_reader);
static CDS_LIST_HEAD(registry);
/* Link a thread using call_rcu() to its call_rcu thread. */
-static DEFINE_URCU_TLS_IE(struct call_rcu_data *, thread_call_rcu_data);
+static DEFINE_URCU_TLS(struct call_rcu_data *, thread_call_rcu_data);
/*
* Guard call_rcu thread creation and atfork handlers.
* Written to only by each individual deferer. Read by both the deferer and
* the reclamation tread.
*/
-static DEFINE_URCU_TLS_IE(struct defer_queue, defer_queue);
+static DEFINE_URCU_TLS(struct defer_queue, defer_queue);
static CDS_LIST_HEAD(registry_defer);
static pthread_t tid_defer;
* Written to only by each individual reader. Read by both the reader and the
* writers.
*/
-DEFINE_URCU_TLS_IE(struct rcu_reader, rcu_reader);
+DEFINE_URCU_TLS(struct rcu_reader, rcu_reader);
static CDS_LIST_HEAD(registry);
* Written to only by each individual reader. Read by both the reader and the
* writers.
*/
-DEFINE_URCU_TLS_IE(struct rcu_reader, rcu_reader);
+DEFINE_URCU_TLS(struct rcu_reader, rcu_reader);
static CDS_LIST_HEAD(registry);