Bug 236222 - [WTF] Retrieve the main thread ID from TEB in Windows
Summary: [WTF] Retrieve the main thread ID from TEB in Windows
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-02-07 01:42 PST by Yusuke Suzuki
Modified: 2023-02-15 14:51 PST (History)
9 users (show)

See Also:


Attachments
Patch (2.30 KB, patch)
2022-02-07 01:42 PST, Yusuke Suzuki
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2022-02-07 01:42:24 PST
[WTF] Retrieve the main thread ID from TEB in Windows
Comment 1 Yusuke Suzuki 2022-02-07 01:42:49 PST
Created attachment 451070 [details]
Patch
Comment 2 Alexey Proskuryakov 2022-02-07 12:31:50 PST
Comment on attachment 451070 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=451070&action=review

> Source/WTF/wtf/win/MainThreadWin.cpp:42
> +    // https://en.wikipedia.org/wiki/Win32_Thread_Information_Block

Makes me wonder if it is teb or tib.
Comment 3 Yusuke Suzuki 2022-02-07 23:40:08 PST
Comment on attachment 451070 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=451070&action=review

>> Source/WTF/wtf/win/MainThreadWin.cpp:42
>> +    // https://en.wikipedia.org/wiki/Win32_Thread_Information_Block
> 
> Makes me wonder if it is teb or tib.

It is referring to the same thing, but TIB in Windows 9x and TEB in Windows NT~.
So, TEB :)
Comment 4 Yusuke Suzuki 2022-02-07 23:40:52 PST
Comment on attachment 451070 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=451070&action=review

>>> Source/WTF/wtf/win/MainThreadWin.cpp:42
>>> +    // https://en.wikipedia.org/wiki/Win32_Thread_Information_Block
>> 
>> Makes me wonder if it is teb or tib.
> 
> It is referring to the same thing, but TIB in Windows 9x and TEB in Windows NT~.
> So, TEB :)

Ah, precisely, TEB for Win32.
Comment 5 Radar WebKit Bug Importer 2022-02-14 01:43:18 PST
<rdar://problem/88894012>
Comment 6 Brent Fulgham 2023-02-15 14:50:30 PST
@Yusuke: Is this ready to land? Weird that it never committed when everything was green.
Comment 7 Brent Fulgham 2023-02-15 14:51:07 PST
Note: We only really care about Win10+, since older Windows aren't really supported by MS anymore.