On Windows to current definitions of thread_local are not working.
Signed-off-by: Frank Wagner <[email protected]>
---
northd/lflow-mgr.c | 2 ++
northd/northd.c | 2 ++
northd/northd.h | 4 ++++
3 files changed, 8 insertions(+)
diff --git a/northd/lflow-mgr.c b/northd/lflow-mgr.c
index 88ce7ce56..d29d5e7b4 100644
--- a/northd/lflow-mgr.c
+++ b/northd/lflow-mgr.c
@@ -98,7 +98,9 @@ static bool sync_lflow_to_sb(struct ovn_lflow *,
/* TODO: Move the parallization logic to this module to avoid accessing
* and modifying in both northd.c and lflow-mgr.c. */
extern int parallelization_state;
+#ifndef _WIN32
extern thread_local size_t thread_lflow_counter;
+#endif
struct dp_refcnt;
static struct dp_refcnt *dp_refcnt_find(struct hmap *dp_refcnts_map,
diff --git a/northd/northd.c b/northd/northd.c
index a1fcc64a5..a378fbea5 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -5476,7 +5476,9 @@ int parallelization_state = STATE_NULL;
* threads are collected to fix the lflow hmap's size (by the function
* fix_flow_map_size()).
* */
+#ifndef _WIN32
thread_local size_t thread_lflow_counter = 0;
+#endif
static bool
build_dhcpv4_action(struct ovn_port *op, ovs_be32 offer_ip,
diff --git a/northd/northd.h b/northd/northd.h
index 1fbc93c8e..190503753 100644
--- a/northd/northd.h
+++ b/northd/northd.h
@@ -250,7 +250,11 @@ enum {
STATE_USE_PARALLELIZATION /* parallelization is on */
};
+#ifdef _WIN32
+static __declspec(thread) size_t thread_lflow_counter = 0;
+#else
extern thread_local size_t thread_lflow_counter;
+#endif
/*
* Multicast snooping and querier per datapath configuration.
--
2.48.1
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev