X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=src%2Frrd.h;h=2f4f2127fffb202b7b94510770d2bbc250fd536e;hb=909e26f825bc1f6f907231761412c885331fec7e;hp=86c4d25da34a9938946cd1eb53132f1dcab26ec4;hpb=68c6d537788b9c11670903bce2e9806933a3322a;p=netdata.git diff --git a/src/rrd.h b/src/rrd.h index 86c4d25d..2f4f2127 100644 --- a/src/rrd.h +++ b/src/rrd.h @@ -376,7 +376,7 @@ struct rrdhost { uint32_t flags; // flags about this RRDHOST int rrd_update_every; // the update frequency of the host - int rrd_history_entries; // the number of history entries for the host's charts + long rrd_history_entries; // the number of history entries for the host's charts RRD_MEMORY_MODE rrd_memory_mode; // the memory more for the charts of this host char *cache_dir; // the directory to save RRD cache files @@ -491,7 +491,7 @@ extern RRDHOST *rrdhost_find_or_create( , const char *guid , const char *os , int update_every - , int history + , long history , RRD_MEMORY_MODE mode , int health_enabled , int rrdpush_enabled @@ -499,20 +499,20 @@ extern RRDHOST *rrdhost_find_or_create( , char *rrdpush_api_key ); -#ifdef NETDATA_INTERNAL_CHECKS -extern void rrdhost_check_wrlock_int(RRDHOST *host, const char *file, const char *function, const unsigned long line); -extern void rrdhost_check_rdlock_int(RRDHOST *host, const char *file, const char *function, const unsigned long line); -extern void rrdset_check_rdlock_int(RRDSET *st, const char *file, const char *function, const unsigned long line); -extern void rrdset_check_wrlock_int(RRDSET *st, const char *file, const char *function, const unsigned long line); -extern void rrd_check_rdlock_int(const char *file, const char *function, const unsigned long line); -extern void rrd_check_wrlock_int(const char *file, const char *function, const unsigned long line); - -#define rrdhost_check_rdlock(host) rrdhost_check_rdlock_int(host, __FILE__, __FUNCTION__, __LINE__) -#define rrdhost_check_wrlock(host) rrdhost_check_wrlock_int(host, __FILE__, __FUNCTION__, __LINE__) -#define rrdset_check_rdlock(st) rrdset_check_rdlock_int(st, __FILE__, __FUNCTION__, __LINE__) -#define rrdset_check_wrlock(st) rrdset_check_wrlock_int(st, __FILE__, __FUNCTION__, __LINE__) -#define rrd_check_rdlock() rrd_check_rdlock_int(__FILE__, __FUNCTION__, __LINE__) -#define rrd_check_wrlock() rrd_check_wrlock_int(__FILE__, __FUNCTION__, __LINE__) +#if defined(NETDATA_INTERNAL_CHECKS) && defined(NETDATA_VERIFY_LOCKS) +extern void __rrdhost_check_wrlock(RRDHOST *host, const char *file, const char *function, const unsigned long line); +extern void __rrdhost_check_rdlock(RRDHOST *host, const char *file, const char *function, const unsigned long line); +extern void __rrdset_check_rdlock(RRDSET *st, const char *file, const char *function, const unsigned long line); +extern void __rrdset_check_wrlock(RRDSET *st, const char *file, const char *function, const unsigned long line); +extern void __rrd_check_rdlock(const char *file, const char *function, const unsigned long line); +extern void __rrd_check_wrlock(const char *file, const char *function, const unsigned long line); + +#define rrdhost_check_rdlock(host) __rrdhost_check_rdlock(host, __FILE__, __FUNCTION__, __LINE__) +#define rrdhost_check_wrlock(host) __rrdhost_check_wrlock(host, __FILE__, __FUNCTION__, __LINE__) +#define rrdset_check_rdlock(st) __rrdset_check_rdlock(st, __FILE__, __FUNCTION__, __LINE__) +#define rrdset_check_wrlock(st) __rrdset_check_wrlock(st, __FILE__, __FUNCTION__, __LINE__) +#define rrd_check_rdlock() __rrd_check_rdlock(__FILE__, __FUNCTION__, __LINE__) +#define rrd_check_wrlock() __rrd_check_wrlock(__FILE__, __FUNCTION__, __LINE__) #else #define rrdhost_check_rdlock(host) (void)0