From 6fc498dafd3c15788fcaefc39f4e8e8e746b2bce Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Thu, 22 Jul 2010 11:50:15 +0000 Subject: [PATCH] Added ReadLockWithTimeout(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37685 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/tests/system/kernel/file_corruption/fs/Node.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/tests/system/kernel/file_corruption/fs/Node.h b/src/tests/system/kernel/file_corruption/fs/Node.h index 21ffdbe0ac..4684abc1dc 100644 --- a/src/tests/system/kernel/file_corruption/fs/Node.h +++ b/src/tests/system/kernel/file_corruption/fs/Node.h @@ -79,6 +79,8 @@ public: void Touched(int32 mode); inline bool ReadLock(); + inline bool ReadLockWithTimeout(uint32 timeoutFlags, + bigtime_t timeout); inline void ReadUnlock(); inline bool WriteLock(); inline void WriteUnlock(); @@ -149,6 +151,14 @@ Node::ReadLock() } +bool +Node::ReadLockWithTimeout(uint32 timeoutFlags, bigtime_t timeout) +{ + return rw_lock_read_lock_with_timeout(&fLock, timeoutFlags, timeout) + == B_OK; +} + + void Node::ReadUnlock() {