Looks good to me, Want to ask, the "section" attribute specifies that the pointer is placed in "vlog_modules"" section. And this section is automatically created by compiler, right?
Thanks, On Thu, Jul 18, 2013 at 4:15 PM, Ben Pfaff <b...@nicira.com> wrote: > This makes them more obviously thread-safe. > > Signed-off-by: Ben Pfaff <b...@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 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev >
_______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev