summaryrefslogtreecommitdiff
path: root/source3/locking
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-09-10 19:40:43 +0200
committerVolker Lendecke <vl@samba.org>2013-09-11 08:27:11 +0200
commit6bcfc1a9daad1432c45db816d32ac5076f748e81 (patch)
tree6d35ab6fd9d9b9ebc403eac41926cb8662a093ba /source3/locking
parent635c35dc8d0d7e9ee7f0a850552564896b7342d9 (diff)
downloadsamba-6bcfc1a9daad1432c45db816d32ac5076f748e81.tar.gz
samba-6bcfc1a9daad1432c45db816d32ac5076f748e81.tar.bz2
samba-6bcfc1a9daad1432c45db816d32ac5076f748e81.zip
smbd: Add brl_num_locks access function
Diffstat (limited to 'source3/locking')
-rw-r--r--source3/locking/brlock.c5
-rw-r--r--source3/locking/proto.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index 2e08ce64ef..0639649576 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -63,6 +63,11 @@ static void print_lock_struct(unsigned int i, const struct lock_struct *pls)
lock_flav_name(pls->lock_flav) ));
}
+unsigned int brl_num_locks(const struct byte_range_lock *brl)
+{
+ return brl->num_locks;
+}
+
/****************************************************************************
See if two locking contexts are equal.
****************************************************************************/
diff --git a/source3/locking/proto.h b/source3/locking/proto.h
index a51c5a204c..f5137f97d2 100644
--- a/source3/locking/proto.h
+++ b/source3/locking/proto.h
@@ -28,6 +28,8 @@
void brl_init(bool read_only);
void brl_shutdown(void);
+unsigned int brl_num_locks(const struct byte_range_lock *brl);
+
NTSTATUS brl_lock_windows_default(struct byte_range_lock *br_lck,
struct lock_struct *plock,
bool blocking_lock);