[Webkit-unassigned] [Bug 242690] New: [WTF] Ensure isMainThread semantics for Linux match Apple/BSD semantics
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jul 13 07:49:31 PDT 2022
https://bugs.webkit.org/show_bug.cgi?id=242690
Bug ID: 242690
Summary: [WTF] Ensure isMainThread semantics for Linux match
Apple/BSD semantics
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Web Template Framework
Assignee: webkit-unassigned at lists.webkit.org
Reporter: james.hilliard1 at gmail.com
It's not entirely clear if the current implementation semantics are fully identical between Linux and Apple/BSD systems. The Apple/BSD pthread_main_np function has 3 potential return values, 1 if the thread is the initial thread, 0 if it is not or -1 if thread is not initialized/unknown, lets make sure we only return true for isMainThread if the return for pthread_main_np is 1. On linux checking if we are on the initial thread can be accomplished by checking the equality of getpid and gettid. Note we use a syscall for calling gettid as the gettid() libc function may not be guaranteed to be supported by all libc's on Linux unlike the syscall(which is also used elsewhere in WebKit).
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220713/2f4fc034/attachment-0001.htm>
More information about the webkit-unassigned
mailing list