projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: urcu-wait: futex wait: handle spurious futex wakeups
[userspace-rcu.git]
/
src
/
urcu.c
diff --git
a/src/urcu.c
b/src/urcu.c
index c36119aeb466673c03c810dc2ea372eea568f10f..e64432f8bb7034cf3ef63cacc03aca7884133b74 100644
(file)
--- a/
src/urcu.c
+++ b/
src/urcu.c
@@
-23,6
+23,7
@@
* IBM's contributions to this file may be relicensed under LGPLv2 or later.
*/
* IBM's contributions to this file may be relicensed under LGPLv2 or later.
*/
+#define URCU_NO_COMPAT_IDENTIFIERS
#define _BSD_SOURCE
#define _LGPL_SOURCE
#define _DEFAULT_SOURCE
#define _BSD_SOURCE
#define _LGPL_SOURCE
#define _DEFAULT_SOURCE
@@
-37,6
+38,7
@@
#include <stdbool.h>
#include <poll.h>
#include <stdbool.h>
#include <poll.h>
+#include <urcu/config.h>
#include <urcu/arch.h>
#include <urcu/wfcqueue.h>
#include <urcu/map/urcu.h>
#include <urcu/arch.h>
#include <urcu/wfcqueue.h>
#include <urcu/map/urcu.h>
@@
-92,7
+94,7
@@
static int urcu_memb_has_sys_membarrier_private_expedited;
* uninitialized variable.
*/
int urcu_memb_has_sys_membarrier = 0;
* uninitialized variable.
*/
int urcu_memb_has_sys_membarrier = 0;
-
__attribute__((alias("urcu_memb_has_sys_membarrier"))
)
+
URCU_ATTR_ALIAS("urcu_memb_has_sys_membarrier"
)
extern int rcu_has_sys_membarrier_memb;
#endif
extern int rcu_has_sys_membarrier_memb;
#endif
@@
-103,7
+105,7
@@
void __attribute__((constructor)) rcu_init(void);
void rcu_init(void)
{
}
void rcu_init(void)
{
}
-
__attribute__((alias(urcu_stringify(rcu_init))
))
+
URCU_ATTR_ALIAS(urcu_stringify(rcu_init
))
void alias_rcu_init(void);
#endif
void alias_rcu_init(void);
#endif
@@
-130,7
+132,7
@@
static pthread_mutex_t rcu_gp_lock = PTHREAD_MUTEX_INITIALIZER;
*/
static pthread_mutex_t rcu_registry_lock = PTHREAD_MUTEX_INITIALIZER;
struct urcu_gp rcu_gp = { .ctr = URCU_GP_COUNT };
*/
static pthread_mutex_t rcu_registry_lock = PTHREAD_MUTEX_INITIALIZER;
struct urcu_gp rcu_gp = { .ctr = URCU_GP_COUNT };
-
__attribute__((alias(urcu_stringify(rcu_gp))
))
+
URCU_ATTR_ALIAS(urcu_stringify(rcu_gp
))
extern struct urcu_gp alias_rcu_gp;
/*
extern struct urcu_gp alias_rcu_gp;
/*
@@
-138,8
+140,7
@@
extern struct urcu_gp alias_rcu_gp;
* writers.
*/
DEFINE_URCU_TLS(struct urcu_reader, rcu_reader);
* writers.
*/
DEFINE_URCU_TLS(struct urcu_reader, rcu_reader);
-__attribute__((alias(urcu_stringify(rcu_reader))))
-extern struct urcu_reader alias_rcu_reader;
+DEFINE_URCU_TLS_ALIAS(struct urcu_reader, rcu_reader, alias_rcu_reader);
static CDS_LIST_HEAD(registry);
static CDS_LIST_HEAD(registry);
@@
-515,7
+516,7
@@
out:
*/
urcu_wake_all_waiters(&waiters);
}
*/
urcu_wake_all_waiters(&waiters);
}
-
__attribute__((alias(urcu_stringify(synchronize_rcu))
))
+
URCU_ATTR_ALIAS(urcu_stringify(synchronize_rcu
))
void alias_synchronize_rcu();
/*
void alias_synchronize_rcu();
/*
@@
-526,21
+527,21
@@
void rcu_read_lock(void)
{
_rcu_read_lock();
}
{
_rcu_read_lock();
}
-
__attribute__((alias(urcu_stringify(rcu_read_lock))
))
+
URCU_ATTR_ALIAS(urcu_stringify(rcu_read_lock
))
void alias_rcu_read_lock();
void rcu_read_unlock(void)
{
_rcu_read_unlock();
}
void alias_rcu_read_lock();
void rcu_read_unlock(void)
{
_rcu_read_unlock();
}
-
__attribute__((alias(urcu_stringify(rcu_read_unlock))
))
+
URCU_ATTR_ALIAS(urcu_stringify(rcu_read_unlock
))
void alias_rcu_read_unlock();
int rcu_read_ongoing(void)
{
return _rcu_read_ongoing();
}
void alias_rcu_read_unlock();
int rcu_read_ongoing(void)
{
return _rcu_read_ongoing();
}
-
__attribute__((alias(urcu_stringify(rcu_read_ongoing))
))
+
URCU_ATTR_ALIAS(urcu_stringify(rcu_read_ongoing
))
void alias_rcu_read_ongoing();
void rcu_register_thread(void)
void alias_rcu_read_ongoing();
void rcu_register_thread(void)
@@
-556,7
+557,7
@@
void rcu_register_thread(void)
cds_list_add(&URCU_TLS(rcu_reader).node, ®istry);
mutex_unlock(&rcu_registry_lock);
}
cds_list_add(&URCU_TLS(rcu_reader).node, ®istry);
mutex_unlock(&rcu_registry_lock);
}
-
__attribute__((alias(urcu_stringify(rcu_register_thread))
))
+
URCU_ATTR_ALIAS(urcu_stringify(rcu_register_thread
))
void alias_rcu_register_thread();
void rcu_unregister_thread(void)
void alias_rcu_register_thread();
void rcu_unregister_thread(void)
@@
-567,7
+568,7
@@
void rcu_unregister_thread(void)
cds_list_del(&URCU_TLS(rcu_reader).node);
mutex_unlock(&rcu_registry_lock);
}
cds_list_del(&URCU_TLS(rcu_reader).node);
mutex_unlock(&rcu_registry_lock);
}
-
__attribute__((alias(urcu_stringify(rcu_unregister_thread))
))
+
URCU_ATTR_ALIAS(urcu_stringify(rcu_unregister_thread
))
void alias_rcu_unregister_thread();
#ifdef RCU_MEMBARRIER
void alias_rcu_unregister_thread();
#ifdef RCU_MEMBARRIER
@@
-616,12
+617,14
@@
void rcu_init(void)
init_done = 1;
rcu_sys_membarrier_init();
}
init_done = 1;
rcu_sys_membarrier_init();
}
-
__attribute__((alias(urcu_stringify(rcu_init))
))
+
URCU_ATTR_ALIAS(urcu_stringify(rcu_init
))
void alias_rcu_init(void);
#endif
#ifdef RCU_SIGNAL
void alias_rcu_init(void);
#endif
#ifdef RCU_SIGNAL
-static void sigrcu_handler(int signo, siginfo_t *siginfo, void *context)
+static void sigrcu_handler(int signo __attribute__((unused)),
+ siginfo_t *siginfo __attribute__((unused)),
+ void *context __attribute__((unused)))
{
/*
* Executing this cmm_smp_mb() is the only purpose of this signal handler.
{
/*
* Executing this cmm_smp_mb() is the only purpose of this signal handler.
@@
-657,7
+660,7
@@
void rcu_init(void)
if (ret)
urcu_die(errno);
}
if (ret)
urcu_die(errno);
}
-
__attribute__((alias(urcu_stringify(rcu_init))
))
+
URCU_ATTR_ALIAS(urcu_stringify(rcu_init
))
void alias_rcu_init(void);
void rcu_exit(void)
void alias_rcu_init(void);
void rcu_exit(void)
@@
-671,7
+674,7
@@
void rcu_exit(void)
* assert(cds_list_empty(®istry));
*/
}
* assert(cds_list_empty(®istry));
*/
}
-
__attribute__((alias(urcu_stringify(rcu_exit))
))
+
URCU_ATTR_ALIAS(urcu_stringify(rcu_exit
))
void alias_rcu_exit(void);
#endif /* #ifdef RCU_SIGNAL */
void alias_rcu_exit(void);
#endif /* #ifdef RCU_SIGNAL */
This page took
0.025506 seconds
and
4
git commands to generate.