[webkit-reviews] review denied: [Bug 41792] [WINCE] Implement TCSpinLock : [Attachment 60768] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jul 23 08:25:57 PDT 2010
Adam Roben (aroben) <aroben at apple.com> has denied Patrick R. Gansterer
<paroga at paroga.com>'s request for review:
Bug 41792: [WINCE] Implement TCSpinLock
https://bugs.webkit.org/show_bug.cgi?id=41792
Attachment 60768: Patch
https://bugs.webkit.org/attachment.cgi?id=60768&action=review
------- Additional Comments from Adam Roben (aroben) <aroben at apple.com>
> +#elif OS(WINDOWS)
I don't understand how this code will be compiled for WinCE. The first branch
of this #if/#elif chain is:
#if (CPU(X86) || CPU(X86_64) || CPU(PPC)) && (COMPILER(GCC) || COMPILER(MSVC))
Will WinCE not match that condition?
> + LONG m_lockword;
I think m_lockword is supposed to be a volatile LONG.
> +static void TCMalloc_SlowLock(LPLONG lockword) {
> + Sleep(0); // Yield immediately since fast path failed
> + while (true) {
> + if (!InterlockedExchange(lockword, 1))
> + return;
> +
> + Sleep(2);
> + }
> +}
This could be a little simpler:
Sleep(0);
while (InterlockedExchange(lockword, 1))
Sleep(2);
More information about the webkit-reviews
mailing list