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
Merge branch 'mainstream'
[sliver-openvswitch.git]
/
lib
/
dpif.c
diff --git
a/lib/dpif.c
b/lib/dpif.c
index
f07d3c0
..
c4b6ff6
100644
(file)
--- a/
lib/dpif.c
+++ b/
lib/dpif.c
@@
-98,15
+98,15
@@
static void log_execute_message(struct dpif *, const struct dpif_execute *,
static void
dp_initialize(void)
{
static void
dp_initialize(void)
{
- static
int status = -1
;
+ static
struct ovsthread_once once = OVSTHREAD_ONCE_INITIALIZER
;
- if (
status < 0
) {
+ if (
ovsthread_once_start(&once)
) {
int i;
int i;
- status = 0;
for (i = 0; i < ARRAY_SIZE(base_dpif_classes); i++) {
dp_register_provider(base_dpif_classes[i]);
}
for (i = 0; i < ARRAY_SIZE(base_dpif_classes); i++) {
dp_register_provider(base_dpif_classes[i]);
}
+ ovsthread_once_done(&once);
}
}
}
}