summaryrefslogtreecommitdiffstats
path: root/libnetdata/locks/locks.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libnetdata/locks/locks.c (renamed from src/locks.c)15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/locks.c b/libnetdata/locks/locks.c
index c5b42c92..91e22690 100644
--- a/src/locks.c
+++ b/libnetdata/locks/locks.c
@@ -1,4 +1,6 @@
-#include "common.h"
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#include "../libnetdata.h"
// ----------------------------------------------------------------------------
// automatic thread cancelability management, based on locks
@@ -82,6 +84,7 @@ int __netdata_mutex_unlock(netdata_mutex_t *mutex) {
int netdata_mutex_init_debug( const char *file, const char *function, const unsigned long line, netdata_mutex_t *mutex) {
usec_t start = 0;
+ (void)start;
if(unlikely(debug_flags & D_LOCKS)) {
start = now_boottime_usec();
@@ -97,6 +100,7 @@ int netdata_mutex_init_debug( const char *file, const char *function, const unsi
int netdata_mutex_lock_debug( const char *file, const char *function, const unsigned long line, netdata_mutex_t *mutex) {
usec_t start = 0;
+ (void)start;
if(unlikely(debug_flags & D_LOCKS)) {
start = now_boottime_usec();
@@ -112,6 +116,7 @@ int netdata_mutex_lock_debug( const char *file, const char *function, const unsi
int netdata_mutex_trylock_debug( const char *file, const char *function, const unsigned long line, netdata_mutex_t *mutex) {
usec_t start = 0;
+ (void)start;
if(unlikely(debug_flags & D_LOCKS)) {
start = now_boottime_usec();
@@ -127,6 +132,7 @@ int netdata_mutex_trylock_debug( const char *file, const char *function, const u
int netdata_mutex_unlock_debug( const char *file, const char *function, const unsigned long line, netdata_mutex_t *mutex) {
usec_t start = 0;
+ (void)start;
if(unlikely(debug_flags & D_LOCKS)) {
start = now_boottime_usec();
@@ -215,6 +221,7 @@ int __netdata_rwlock_trywrlock(netdata_rwlock_t *rwlock) {
int netdata_rwlock_destroy_debug( const char *file, const char *function, const unsigned long line, netdata_rwlock_t *rwlock) {
usec_t start = 0;
+ (void)start;
if(unlikely(debug_flags & D_LOCKS)) {
start = now_boottime_usec();
@@ -230,6 +237,7 @@ int netdata_rwlock_destroy_debug( const char *file, const char *function, const
int netdata_rwlock_init_debug( const char *file, const char *function, const unsigned long line, netdata_rwlock_t *rwlock) {
usec_t start = 0;
+ (void)start;
if(unlikely(debug_flags & D_LOCKS)) {
start = now_boottime_usec();
@@ -245,6 +253,7 @@ int netdata_rwlock_init_debug( const char *file, const char *function, const uns
int netdata_rwlock_rdlock_debug( const char *file, const char *function, const unsigned long line, netdata_rwlock_t *rwlock) {
usec_t start = 0;
+ (void)start;
if(unlikely(debug_flags & D_LOCKS)) {
start = now_boottime_usec();
@@ -260,6 +269,7 @@ int netdata_rwlock_rdlock_debug( const char *file, const char *function, const u
int netdata_rwlock_wrlock_debug( const char *file, const char *function, const unsigned long line, netdata_rwlock_t *rwlock) {
usec_t start = 0;
+ (void)start;
if(unlikely(debug_flags & D_LOCKS)) {
start = now_boottime_usec();
@@ -275,6 +285,7 @@ int netdata_rwlock_wrlock_debug( const char *file, const char *function, const u
int netdata_rwlock_unlock_debug( const char *file, const char *function, const unsigned long line, netdata_rwlock_t *rwlock) {
usec_t start = 0;
+ (void)start;
if(unlikely(debug_flags & D_LOCKS)) {
start = now_boottime_usec();
@@ -290,6 +301,7 @@ int netdata_rwlock_unlock_debug( const char *file, const char *function, const u
int netdata_rwlock_tryrdlock_debug( const char *file, const char *function, const unsigned long line, netdata_rwlock_t *rwlock) {
usec_t start = 0;
+ (void)start;
if(unlikely(debug_flags & D_LOCKS)) {
start = now_boottime_usec();
@@ -305,6 +317,7 @@ int netdata_rwlock_tryrdlock_debug( const char *file, const char *function, cons
int netdata_rwlock_trywrlock_debug( const char *file, const char *function, const unsigned long line, netdata_rwlock_t *rwlock) {
usec_t start = 0;
+ (void)start;
if(unlikely(debug_flags & D_LOCKS)) {
start = now_boottime_usec();