[Webkit-unassigned] [Bug 22567] HashTable needs to be made usable from multiple threads.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 1 04:00:48 PST 2008


https://bugs.webkit.org/show_bug.cgi?id=22567


levin at chromium.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #25620|0                           |1
        is obsolete|                            |
  Attachment #25623|                            |review?
               Flag|                            |




------- Comment #4 from levin at chromium.org  2008-12-01 04:00 PDT -------
Created an attachment (id=25623)
 --> (https://bugs.webkit.org/attachment.cgi?id=25623&action=view)
Addressed comments.

Thanks.

I've made the remaining const methods on HashTable thread safe as well.

> > -        static int numAccesses;
> > +        static volatile int numAccesses;
> Is this change needed?

The function definition includes it "atomicIncrement(int volatile*)".  The only
place I could find this function used was in RefCountedLeakCounter.cpp and the
variable that it uses for atomicIncrement is defined as volatile.

After thinking about it more, I realized that this is like the const modifier
in a prototype which indicates that the function can handle a volatile int* (as
well as an int*), so I've removed the volatile for all of these variables.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list