[ovs-dev] [threads 23/23] vlog: Mark vlog_module_ptr_* as const.
Ben Pfaff
blp at nicira.com
Thu Jul 18 23:15:36 UTC 2013
This makes them more obviously thread-safe.
Signed-off-by: Ben Pfaff <blp at nicira.com>
---
lib/vlog.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/vlog.h b/lib/vlog.h
index 9576687..c111ff6 100644
--- a/lib/vlog.h
+++ b/lib/vlog.h
@@ -88,8 +88,8 @@ struct vlog_module {
#if USE_LINKER_SECTIONS
#define VLOG_DEFINE_MODULE(MODULE) \
VLOG_DEFINE_MODULE__(MODULE) \
- extern struct vlog_module *vlog_module_ptr_##MODULE; \
- struct vlog_module *vlog_module_ptr_##MODULE \
+ extern struct vlog_module *const vlog_module_ptr_##MODULE; \
+ struct vlog_module *const vlog_module_ptr_##MODULE \
__attribute__((section("vlog_modules"))) = &VLM_##MODULE
#else
#define VLOG_DEFINE_MODULE(MODULE) extern struct vlog_module VLM_##MODULE
--
1.7.2.5
More information about the dev
mailing list