summaryrefslogtreecommitdiffstats
path: root/libnetdata/locks/locks.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2018-11-07 12:19:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2018-11-07 12:20:17 +0000
commita64a253794ac64cb40befee54db53bde17dd0d49 (patch)
treec1024acc5f6e508814b944d99f112259bb28b1be /libnetdata/locks/locks.c
parentNew upstream version 1.10.0+dfsg (diff)
downloadnetdata-a64a253794ac64cb40befee54db53bde17dd0d49.tar.xz
netdata-a64a253794ac64cb40befee54db53bde17dd0d49.zip
New upstream version 1.11.0+dfsgupstream/1.11.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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 c5b42c921..91e226902 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();