From 4df2423a947bcd3f024cc3d3a1a315a8dc428598 Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Thu, 5 Mar 2009 14:34:35 -0800 Subject: auto import from //depot/cupcake/@136594 --- include/utils/threads.h | 35 ----------------------------------- 1 file changed, 35 deletions(-) (limited to 'include/utils/threads.h') diff --git a/include/utils/threads.h b/include/utils/threads.h index 7dca810043e9..8d8d46a054d8 100644 --- a/include/utils/threads.h +++ b/include/utils/threads.h @@ -248,41 +248,6 @@ private: }; -/* - * Read/write lock. The resource can have multiple readers or one writer, - * but can't be read and written at the same time. - * - * The same thread should not call a lock function while it already has - * a lock. (Should be okay for multiple readers.) - */ -class ReadWriteLock { -public: - ReadWriteLock() - : mNumReaders(0), mNumWriters(0) - {} - ~ReadWriteLock() {} - - void lockForRead(); - bool tryLockForRead(); - void unlockForRead(); - - void lockForWrite(); - bool tryLockForWrite(); - void unlockForWrite(); - -private: - int mNumReaders; - int mNumWriters; - - Mutex mLock; - Condition mReadWaiter; - Condition mWriteWaiter; -#if defined(PRINT_RENDER_TIMES) - DurationTimer mDebugTimer; -#endif -}; - - /* * This is our spiffy thread object! */ -- cgit v1.2.3-59-g8ed1b