Use std::call_once instead of pthread_once_xxx
Created attachment 328840 [details] Patch
Created attachment 328842 [details] Patch
For macOS/iOS specific files you should use dispatch_once instead, it's slightly faster IIRC.
(In reply to Anders Carlsson from comment #3) > For macOS/iOS specific files you should use dispatch_once instead, it's > slightly faster IIRC. Oh, nice. I'll follow this.
Attachment 328842 [details] did not pass style-queue: ERROR: Source/WebKitLegacy/mac/Misc/WebKitErrors.mm:31: Bad include order. Mixing system and custom headers. [build/include_order] [4] ERROR: Source/WebKitLegacy/mac/Misc/WebKitErrors.mm:96: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebKitLegacy/mac/Misc/WebKitErrors.mm:112: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebKitLegacy/mac/Misc/WebKitErrors.mm:128: When wrapping a line, only indent 4 spaces. [whitespace/indent] [3] ERROR: Source/WebKitLegacy/mac/Misc/WebKitErrors.mm:129: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebKitLegacy/mac/Misc/WebKitErrors.mm:131: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebKitLegacy/mac/Misc/WebKitErrors.mm:132: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebKitLegacy/mac/Misc/WebKitErrors.mm:146: One line control clauses should not use braces. [whitespace/braces] [4] ERROR: Source/WebKitLegacy/mac/Misc/WebKitErrors.mm:149: One line control clauses should not use braces. [whitespace/braces] [4] ERROR: Source/WebKitLegacy/mac/Misc/WebKitErrors.mm:152: One line control clauses should not use braces. [whitespace/braces] [4] Total errors found: 10 in 12 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 328846 [details] Patch
Comment on attachment 328846 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=328846&action=review r=me. Looks like a reasonable cleanup. > Source/WTF/ChangeLog:3 > + Remove pthread_once in favor of std::call_once and dispatch_once You don't actually use std::call_once in this patch anymore :)
Comment on attachment 328846 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=328846&action=review Thanks. Now, very limited pthread_xxx is used in WebKit! (basically it is for platform specific pthread extensions like QOS). >> Source/WTF/ChangeLog:3 >> + Remove pthread_once in favor of std::call_once and dispatch_once > > You don't actually use std::call_once in this patch anymore :) Oh, right. Fixed :)
Committed r225692: <https://trac.webkit.org/changeset/225692>
<rdar://problem/35940539>