X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fvlog.h;h=1a11f598e00935772b2e1960ca422420b7d94151;hb=e2eed6a7581193da43210a26ad182fb2a697eaf5;hp=12844c6f7f1715bd26d848be352b6ea2442f2e68;hpb=e3c17733704fd54fa937ed5e1e8c4b51e00961f1;p=openvswitch diff --git a/lib/vlog.h b/lib/vlog.h index 12844c6f..1a11f598 100644 --- a/lib/vlog.h +++ b/lib/vlog.h @@ -92,6 +92,7 @@ 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 \ __attribute__((section("vlog_modules"))) = &VLM_##MODULE #else @@ -111,6 +112,7 @@ struct vlog_rate_limit { unsigned int tokens; /* Current number of tokens. */ time_t last_fill; /* Last time tokens added. */ time_t first_dropped; /* Time first message was dropped. */ + time_t last_dropped; /* Time of most recent message drop. */ unsigned int n_dropped; /* Number of messages dropped. */ }; @@ -129,6 +131,7 @@ struct vlog_rate_limit { 0, /* tokens */ \ 0, /* last_fill */ \ 0, /* first_dropped */ \ + 0, /* last_dropped */ \ 0, /* n_dropped */ \ } @@ -258,6 +261,7 @@ void vlog_usage(void); } while (0) #define VLOG_DEFINE_MODULE__(MODULE) \ + extern struct vlog_module VLM_##MODULE; \ struct vlog_module VLM_##MODULE = \ { \ #MODULE, /* name */ \