diff options
author | Lennart Weller <lhw@ring0.de> | 2016-04-21 12:27:39 +0000 |
---|---|---|
committer | Lennart Weller <lhw@ring0.de> | 2016-04-21 12:27:39 +0000 |
commit | edff5c9db775e6e4318f3ad007df78ecae456190 (patch) | |
tree | 3677e5fcbccc776c77dd0451e5be4711068bff46 /src/avl.h | |
parent | Add postrm and TODO, update service (diff) | |
parent | Imported Upstream version 1.1.0 (diff) | |
download | netdata-edff5c9db775e6e4318f3ad007df78ecae456190.tar.xz netdata-edff5c9db775e6e4318f3ad007df78ecae456190.zip |
Merge tag 'upstream/1.1.0'
Upstream version 1.1.0
Diffstat (limited to 'src/avl.h')
-rw-r--r--[-rwxr-xr-x] | src/avl.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/avl.h b/src/avl.h index cbcc41211..2d1fbc537 100755..100644 --- a/src/avl.h +++ b/src/avl.h @@ -15,7 +15,9 @@ #ifndef _AVL_H #define _AVL_H 1 +#ifndef AVL_WITHOUT_PTHREADS #include <pthread.h> +#endif /* AVL_WITHOUT_PTHREADS */ // #define AVL_LOCK_WITH_MUTEX 1 @@ -33,11 +35,13 @@ typedef struct avl_tree { avl* root; int (*compar)(void* a, void* b); +#ifndef AVL_WITHOUT_PTHREADS #ifdef AVL_LOCK_WITH_MUTEX pthread_mutex_t mutex; -#else +#else /* AVL_LOCK_WITH_MUTEX */ pthread_rwlock_t rwlock; -#endif +#endif /* AVL_LOCK_WITH_MUTEX */ +#endif /* AVL_WITHOUT_PTHREADS */ } avl_tree; /* Public methods */ |