Title: [135206] trunk/Source/WTF
- Revision
- 135206
- Author
- commit-qu...@webkit.org
- Date
- 2012-11-19 15:47:19 -0800 (Mon, 19 Nov 2012)
Log Message
Remove ReadWriteLock
https://bugs.webkit.org/show_bug.cgi?id=101637
Patch by Laszlo Gombos <l.gom...@samsung.com> on 2012-11-19
Reviewed by Darin Adler.
Remove ReadWriteLock as it does not seems to be used.
* wtf/Platform.h: Remove the definition of HAVE_PTHREAD_RWLOCK.
* wtf/ThreadingPrimitives.h: Remove the PlatformReadWriteLock type
and the ReadWriteLock class.
* wtf/ThreadingPthreads.cpp: Remove the implementation of
the ReadWriteLock class using pthreads.
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (135205 => 135206)
--- trunk/Source/WTF/ChangeLog 2012-11-19 23:40:51 UTC (rev 135205)
+++ trunk/Source/WTF/ChangeLog 2012-11-19 23:47:19 UTC (rev 135206)
@@ -1,3 +1,20 @@
+2012-11-19 Laszlo Gombos <l.gom...@samsung.com>
+
+ Remove ReadWriteLock
+ https://bugs.webkit.org/show_bug.cgi?id=101637
+
+ Reviewed by Darin Adler.
+
+ Remove ReadWriteLock as it does not seems to be used.
+
+ * wtf/Platform.h: Remove the definition of HAVE_PTHREAD_RWLOCK.
+
+ * wtf/ThreadingPrimitives.h: Remove the PlatformReadWriteLock type
+ and the ReadWriteLock class.
+
+ * wtf/ThreadingPthreads.cpp: Remove the implementation of
+ the ReadWriteLock class using pthreads.
+
2012-11-19 Brady Eidson <beid...@apple.com>
Add 64-bit specializations for atomicIncrement and atomicDecrement
Modified: trunk/Source/WTF/wtf/Platform.h (135205 => 135206)
--- trunk/Source/WTF/wtf/Platform.h 2012-11-19 23:40:51 UTC (rev 135205)
+++ trunk/Source/WTF/wtf/Platform.h 2012-11-19 23:47:19 UTC (rev 135206)
@@ -553,7 +553,6 @@
#endif
#define WTF_USE_CF 1
#define WTF_USE_PTHREADS 1
-#define HAVE_PTHREAD_RWLOCK 1
#define HAVE_READLINE 1
#define HAVE_RUNLOOP_TIMER 1
#define ENABLE_FULLSCREEN_API 1
@@ -573,7 +572,6 @@
#if PLATFORM(CHROMIUM) && OS(DARWIN)
#define WTF_USE_CF 1
#define WTF_USE_PTHREADS 1
-#define HAVE_PTHREAD_RWLOCK 1
#define WTF_USE_WK_SCROLLBAR_PAINTER 1
#endif
@@ -600,7 +598,6 @@
#define ENABLE_ORIENTATION_EVENTS 1
#define ENABLE_REPAINT_THROTTLING 1
#define ENABLE_WEB_ARCHIVE 1
-#define HAVE_PTHREAD_RWLOCK 1
#define HAVE_READLINE 1
#define WTF_USE_CF 1
#define WTF_USE_CFNETWORK 1
@@ -657,7 +654,6 @@
#if OS(UNIX) && (PLATFORM(GTK) || PLATFORM(QT))
#define WTF_USE_PTHREADS 1
-#define HAVE_PTHREAD_RWLOCK 1
#endif
#if !defined(HAVE_ACCESSIBILITY)
Modified: trunk/Source/WTF/wtf/ThreadingPrimitives.h (135205 => 135206)
--- trunk/Source/WTF/wtf/ThreadingPrimitives.h 2012-11-19 23:40:51 UTC (rev 135205)
+++ trunk/Source/WTF/wtf/ThreadingPrimitives.h 2012-11-19 23:47:19 UTC (rev 135206)
@@ -50,18 +50,12 @@
#if USE(PTHREADS)
typedef pthread_mutex_t PlatformMutex;
-#if HAVE(PTHREAD_RWLOCK)
-typedef pthread_rwlock_t PlatformReadWriteLock;
-#else
-typedef void* PlatformReadWriteLock;
-#endif
typedef pthread_cond_t PlatformCondition;
#elif OS(WINDOWS)
struct PlatformMutex {
CRITICAL_SECTION m_internalMutex;
size_t m_recursionCount;
};
-typedef void* PlatformReadWriteLock; // FIXME: Implement.
struct PlatformCondition {
size_t m_waitersGone;
size_t m_waitersBlocked;
@@ -75,7 +69,6 @@
};
#else
typedef void* PlatformMutex;
-typedef void* PlatformReadWriteLock;
typedef void* PlatformCondition;
#endif
@@ -114,24 +107,6 @@
bool m_locked;
};
-class ReadWriteLock {
- WTF_MAKE_NONCOPYABLE(ReadWriteLock);
-public:
- ReadWriteLock();
- ~ReadWriteLock();
-
- void readLock();
- bool tryReadLock();
-
- void writeLock();
- bool tryWriteLock();
-
- void unlock();
-
-private:
- PlatformReadWriteLock m_readWriteLock;
-};
-
class ThreadCondition {
WTF_MAKE_NONCOPYABLE(ThreadCondition);
public:
Modified: trunk/Source/WTF/wtf/ThreadingPthreads.cpp (135205 => 135206)
--- trunk/Source/WTF/wtf/ThreadingPthreads.cpp 2012-11-19 23:40:51 UTC (rev 135205)
+++ trunk/Source/WTF/wtf/ThreadingPthreads.cpp 2012-11-19 23:47:19 UTC (rev 135206)
@@ -364,62 +364,6 @@
ASSERT_UNUSED(result, !result);
}
-#if HAVE(PTHREAD_RWLOCK)
-ReadWriteLock::ReadWriteLock()
-{
- pthread_rwlock_init(&m_readWriteLock, NULL);
-}
-
-ReadWriteLock::~ReadWriteLock()
-{
- pthread_rwlock_destroy(&m_readWriteLock);
-}
-
-void ReadWriteLock::readLock()
-{
- int result = pthread_rwlock_rdlock(&m_readWriteLock);
- ASSERT_UNUSED(result, !result);
-}
-
-bool ReadWriteLock::tryReadLock()
-{
- int result = pthread_rwlock_tryrdlock(&m_readWriteLock);
-
- if (result == 0)
- return true;
- if (result == EBUSY || result == EAGAIN)
- return false;
-
- ASSERT_NOT_REACHED();
- return false;
-}
-
-void ReadWriteLock::writeLock()
-{
- int result = pthread_rwlock_wrlock(&m_readWriteLock);
- ASSERT_UNUSED(result, !result);
-}
-
-bool ReadWriteLock::tryWriteLock()
-{
- int result = pthread_rwlock_trywrlock(&m_readWriteLock);
-
- if (result == 0)
- return true;
- if (result == EBUSY || result == EAGAIN)
- return false;
-
- ASSERT_NOT_REACHED();
- return false;
-}
-
-void ReadWriteLock::unlock()
-{
- int result = pthread_rwlock_unlock(&m_readWriteLock);
- ASSERT_UNUSED(result, !result);
-}
-#endif // HAVE(PTHREAD_RWLOCK)
-
ThreadCondition::ThreadCondition()
{
pthread_cond_init(&m_condition, NULL);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes