On 02/03/2016 04:50 PM, Ben Pfaff wrote: > This could be beneficial if we ever insert a new module at runtime > (currently we only insert them at startup) and it should have negligible > cost. > > Suggested-by: Russell Bryant <[email protected]> > Signed-off-by: Ben Pfaff <[email protected]>
Acked-by: Russell Bryant <[email protected]> > @@ -104,13 +101,18 @@ DEFINE_STATIC_PER_THREAD_DATA(unsigned int, msg_num, 0); > * > * All of the following is protected by 'log_file_mutex', which nests inside > * pattern_rwlock. */ > -static struct ovs_mutex log_file_mutex = OVS_MUTEX_INITIALIZER; > +static struct ovs_mutex log_file_mutex OVS_ACQ_AFTER(pattern_rwlock) > + = OVS_MUTEX_INITIALIZER; btw, I *love* these macros enabling thread safety attributes from clang. They probably would have saved me a lot of pain in a previous life. -- Russell Bryant _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
