summaryrefslogtreecommitdiff
path: root/include/utils/threads.h
diff options
context:
space:
mode:
author The Android Open Source Project <initial-contribution@android.com> 2009-03-05 14:34:35 -0800
committer The Android Open Source Project <initial-contribution@android.com> 2009-03-05 14:34:35 -0800
commit9adf84a4b6735354893ff1e57c129f66d97d75ee (patch)
tree6fad0d5c1e6ba13f6ec539e4dec71e2c5f57ed39 /include/utils/threads.h
parentedbf3b6af777b721cd2a1ef461947e51e88241e1 (diff)
auto import from //depot/cupcake/@136594
Diffstat (limited to 'include/utils/threads.h')
-rw-r--r--include/utils/threads.h35
1 files changed, 0 insertions, 35 deletions
diff --git a/include/utils/threads.h b/include/utils/threads.h
index 7dca810043..8d8d46a054 100644
--- a/include/utils/threads.h
+++ b/include/utils/threads.h
@@ -249,41 +249,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!
*/