From 79f3d50d7c178364c620c3da19fb8c66bf4cd8a6 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 15 Jul 2013 13:13:17 -0700 Subject: [PATCH] vlog: Mark vlog_module_ptr_* as const. This makes them more obviously thread-safe. Signed-off-by: Ben Pfaff --- lib/vlog.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vlog.h b/lib/vlog.h index 95766875d..c111ff6e9 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 -- 2.45.2