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
ofproto-dpif: Use sequence number to wake up main thread for
[sliver-openvswitch.git]
/
lib
/
seq.c
diff --git
a/lib/seq.c
b/lib/seq.c
index
36e5065
..
7a34244
100644
(file)
--- a/
lib/seq.c
+++ b/
lib/seq.c
@@
-52,7
+52,7
@@
struct seq_thread {
bool waiting OVS_GUARDED; /* True if latch_wait() already called. */
};
bool waiting OVS_GUARDED; /* True if latch_wait() already called. */
};
-static struct ovs_mutex seq_mutex = OVS_
ADAPTIVE_
MUTEX_INITIALIZER;
+static struct ovs_mutex seq_mutex = OVS_MUTEX_INITIALIZER;
static uint64_t seq_next OVS_GUARDED_BY(seq_mutex) = 1;
static uint64_t seq_next OVS_GUARDED_BY(seq_mutex) = 1;
@@
-148,6
+148,7
@@
seq_wait__(struct seq *seq, uint64_t value)
waiter = xmalloc(sizeof *waiter);
waiter->seq = seq;
hmap_insert(&seq->waiters, &waiter->hmap_node, hash);
waiter = xmalloc(sizeof *waiter);
waiter->seq = seq;
hmap_insert(&seq->waiters, &waiter->hmap_node, hash);
+ waiter->ovsthread_id = id;
waiter->value = value;
waiter->thread = seq_thread_get();
list_push_back(&waiter->thread->waiters, &waiter->list_node);
waiter->value = value;
waiter->thread = seq_thread_get();
list_push_back(&waiter->thread->waiters, &waiter->list_node);