RESOLVED FIXED Bug 15939
Add currentThread API
https://bugs.webkit.org/show_bug.cgi?id=15939
Summary Add currentThread API
Justin Haygood
Reported 2007-11-10 18:37:28 PST
in order to get rid of all direct useages of pthread, we need a currentThread API
Attachments
Implements currentThread API (5.57 KB, patch)
2007-11-10 18:37 PST, Justin Haygood
aroben: review+
Justin Haygood
Comment 1 2007-11-10 18:37:56 PST
Created attachment 17179 [details] Implements currentThread API
Adam Roben (:aroben)
Comment 2 2007-11-11 21:25:40 PST
Comment on attachment 17179 [details] Implements currentThread API +static ThreadIdentifier identifierByPthreadHandle(pthread_t& pthreadhandle) The parameter should be marked const (ditto for the ThreadingGtk version). + for (; i != threadMap().end(); ++i) { + if (i->second == thread)) + return i->first; + } You don't need the braces around the body of the loop. r=me
Adam Roben (:aroben)
Comment 3 2007-11-11 21:30:36 PST
(In reply to comment #2) > (From update of attachment 17179 [details] [edit]) > + for (; i != threadMap().end(); ++i) { > + if (i->second == thread)) > + return i->first; > + } > > You don't need the braces around the body of the loop. Please disregard this. The braces are correct per our style guidelines <http://webkit.org/coding/coding-style.html>.
Mark Rowe (bdash)
Comment 4 2007-11-11 21:58:54 PST
Landed in r27707 after some fixes to the gthreads version and improvements to match the style guidelines.
Alexey Proskuryakov
Comment 5 2008-01-24 12:47:22 PST
*** Bug 15935 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.