vlog: Mark vlog_module_ptr_* as const.
authorBen Pfaff <blp@nicira.com>
Mon, 15 Jul 2013 20:13:17 +0000 (13:13 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 23 Jul 2013 18:38:22 +0000 (11:38 -0700)
This makes them more obviously thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/vlog.h

index 9576687..c111ff6 100644 (file)
@@ -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