WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
180591
Remove pthread_once in favor of dispatch_once
https://bugs.webkit.org/show_bug.cgi?id=180591
Summary
Remove pthread_once in favor of dispatch_once
Yusuke Suzuki
Reported
2017-12-08 11:34:10 PST
Use std::call_once instead of pthread_once_xxx
Attachments
Patch
(34.83 KB, patch)
2017-12-08 11:36 PST
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(34.83 KB, patch)
2017-12-08 11:37 PST
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(14.70 KB, patch)
2017-12-08 11:48 PST
,
Yusuke Suzuki
saam
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2017-12-08 11:36:27 PST
Created
attachment 328840
[details]
Patch
Yusuke Suzuki
Comment 2
2017-12-08 11:37:41 PST
Created
attachment 328842
[details]
Patch
Anders Carlsson
Comment 3
2017-12-08 11:38:12 PST
For macOS/iOS specific files you should use dispatch_once instead, it's slightly faster IIRC.
Yusuke Suzuki
Comment 4
2017-12-08 11:39:11 PST
(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.
EWS Watchlist
Comment 5
2017-12-08 11:40:49 PST
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.
Yusuke Suzuki
Comment 6
2017-12-08 11:48:20 PST
Created
attachment 328846
[details]
Patch
Saam Barati
Comment 7
2017-12-08 12:04:31 PST
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 :)
Yusuke Suzuki
Comment 8
2017-12-08 12:05:51 PST
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 :)
Yusuke Suzuki
Comment 9
2017-12-08 12:17:04 PST
Committed
r225692
: <
https://trac.webkit.org/changeset/225692
>
Radar WebKit Bug Importer
Comment 10
2017-12-08 12:18:29 PST
<
rdar://problem/35940539
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug