]> arthur.barton.de Git - netdata.git/commitdiff
added compile option NETDATA_VERIFY_LOCKS to enable the locks
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sun, 12 Mar 2017 21:28:05 +0000 (23:28 +0200)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sun, 12 Mar 2017 21:28:05 +0000 (23:28 +0200)
src/rrdhost.c
src/rrdset.c

index 3ec71b5835c0ae4e9b56094e6b69492cd1ed0c63..fd7f35246abf40312b298fa30fff09859c97e738 100644 (file)
@@ -380,7 +380,7 @@ void rrd_init(char *hostname) {
 // RRDHOST - lock validations
 // there are only used when NETDATA_INTERNAL_CHECKS is set
 
-void rrdhost_check_rdlock_int(RRDHOST *host, const char *file, const char *function, const unsigned long line) {
+void __rrdhost_check_rdlock(RRDHOST *host, const char *file, const char *function, const unsigned long line) {
     debug(D_RRDHOST, "Checking read lock on host '%s'", host->hostname);
 
     int ret = netdata_rwlock_trywrlock(&host->rrdhost_rwlock);
@@ -388,7 +388,7 @@ void rrdhost_check_rdlock_int(RRDHOST *host, const char *file, const char *funct
         fatal("RRDHOST '%s' should be read-locked, but it is not, at function %s() at line %lu of file '%s'", host->hostname, function, line, file);
 }
 
-void rrdhost_check_wrlock_int(RRDHOST *host, const char *file, const char *function, const unsigned long line) {
+void __rrdhost_check_wrlock(RRDHOST *host, const char *file, const char *function, const unsigned long line) {
     debug(D_RRDHOST, "Checking write lock on host '%s'", host->hostname);
 
     int ret = netdata_rwlock_tryrdlock(&host->rrdhost_rwlock);
@@ -396,7 +396,7 @@ void rrdhost_check_wrlock_int(RRDHOST *host, const char *file, const char *funct
         fatal("RRDHOST '%s' should be write-locked, but it is not, at function %s() at line %lu of file '%s'", host->hostname, function, line, file);
 }
 
-void rrd_check_rdlock_int(const char *file, const char *function, const unsigned long line) {
+void __rrd_check_rdlock(const char *file, const char *function, const unsigned long line) {
     debug(D_RRDHOST, "Checking read lock on all RRDs");
 
     int ret = netdata_rwlock_trywrlock(&rrd_rwlock);
@@ -404,7 +404,7 @@ void rrd_check_rdlock_int(const char *file, const char *function, const unsigned
         fatal("RRDs should be read-locked, but it are not, at function %s() at line %lu of file '%s'", function, line, file);
 }
 
-void rrd_check_wrlock_int(const char *file, const char *function, const unsigned long line) {
+void __rrd_check_wrlock(const char *file, const char *function, const unsigned long line) {
     debug(D_RRDHOST, "Checking write lock on all RRDs");
 
     int ret = netdata_rwlock_tryrdlock(&rrd_rwlock);
index 5195060356fe870a23573114101262703bb4647c..c847b96907de21c655707b725712a54289166886 100644 (file)
@@ -3,7 +3,7 @@
 
 #define RRD_DEFAULT_GAP_INTERPOLATIONS 1
 
-void rrdset_check_rdlock_int(RRDSET *st, const char *file, const char *function, const unsigned long line) {
+void __rrdset_check_rdlock(RRDSET *st, const char *file, const char *function, const unsigned long line) {
     debug(D_RRD_CALLS, "Checking read lock on chart '%s'", st->id);
 
     int ret = netdata_rwlock_trywrlock(&st->rrdset_rwlock);
@@ -11,7 +11,7 @@ void rrdset_check_rdlock_int(RRDSET *st, const char *file, const char *function,
         fatal("RRDSET '%s' should be read-locked, but it is not, at function %s() at line %lu of file '%s'", st->id, function, line, file);
 }
 
-void rrdset_check_wrlock_int(RRDSET *st, const char *file, const char *function, const unsigned long line) {
+void __rrdset_check_wrlock(RRDSET *st, const char *file, const char *function, const unsigned long line) {
     debug(D_RRD_CALLS, "Checking write lock on chart '%s'", st->id);
 
     int ret = netdata_rwlock_tryrdlock(&st->rrdset_rwlock);