git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ovs-thread: Make caller provide thread name when creating a thread.
[sliver-openvswitch.git]
/
lib
/
ovs-rcu.c
diff --git
a/lib/ovs-rcu.c
b/lib/ovs-rcu.c
index
ac4513b
..
c1ac61a
100644
(file)
--- a/
lib/ovs-rcu.c
+++ b/
lib/ovs-rcu.c
@@
-99,7
+99,7
@@
ovsrcu_quiesced(void)
} else {
static struct ovsthread_once once = OVSTHREAD_ONCE_INITIALIZER;
if (ovsthread_once_start(&once)) {
} else {
static struct ovsthread_once once = OVSTHREAD_ONCE_INITIALIZER;
if (ovsthread_once_start(&once)) {
-
xpthread_create(NULL, NULL
, ovsrcu_postpone_thread, NULL);
+
ovs_thread_create("urcu"
, ovsrcu_postpone_thread, NULL);
ovsthread_once_done(&once);
}
}
ovsthread_once_done(&once);
}
}
@@
-127,12
+127,20
@@
ovsrcu_quiesce_start(void)
void
ovsrcu_quiesce(void)
{
void
ovsrcu_quiesce(void)
{
+ ovsrcu_init();
ovsrcu_perthread_get()->seqno = seq_read(global_seqno);
seq_change(global_seqno);
ovsrcu_quiesced();
}
ovsrcu_perthread_get()->seqno = seq_read(global_seqno);
seq_change(global_seqno);
ovsrcu_quiesced();
}
+bool
+ovsrcu_is_quiescent(void)
+{
+ ovsrcu_init();
+ return pthread_getspecific(perthread_key) == NULL;
+}
+
static void
ovsrcu_synchronize(void)
{
static void
ovsrcu_synchronize(void)
{