[webkit-reviews] review granted: [Bug 16596] ThreadSafeShared should be lock-free where possible : [Attachment 18091] Fix Bug 16596: ThreadSafeShared should be lock-free where possible.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 24 14:14:51 PST 2007


Sam Weinig <sam at webkit.org> has granted Mark Rowe (bdash) <mrowe at apple.com>'s
request for review:
Bug 16596: ThreadSafeShared should be lock-free where possible
http://bugs.webkit.org/show_bug.cgi?id=16596

Attachment 18091: Fix Bug 16596: ThreadSafeShared should be lock-free where
possible.
http://bugs.webkit.org/attachment.cgi?id=18091&action=edit

------- Additional Comments from Sam Weinig <sam at webkit.org>
All in all, this seems great.  I do have a few nits though.

Typo.  This should be 1.7x.
+	 This is a 1.7xs as fast as the lock-based implementation on x86 for a
single-threaded use

As discussed on IRC, #if PLATFORM(WIN_OS) might be better than #if
COMPILER(MSVC) for this.  And I think it would be clearer if you didn't reuse
the names InterlockedIncrement/InterlockedDecrement but rather used a new
inline function atomicIncrement/atomicDecrement that forwarded to those calls
on windows.


More information about the webkit-reviews mailing list