Commit 662cb06
Remove redundant
The `sleeping` field was used to synchronize dlopen between threads, but
it is now redundant since the implementation of precise futex wakeups in
#26659. The `wait_addr` field now provides the same information (whether
a thread is currently blocked).
We now simply call `_emscripten_thread_notify` for every thread when
proxying dlopen sync events. This ensures that threads process the
dlopen catch-up queue promptly, even without the periodic 100ms wakeups
that were removed in #26659.
This change:
1. Removes the `sleeping` field from struct pthread.
2. Updates `emscripten_futex_wait` to no longer set/clear the sleeping
field.
3. Removes a redundant `_emscripten_process_dlopen_queue` call in
`emscripten_futex_wait`. (One remains at the end of the function, and
one is called via `emscripten_yield` at the start).
4. Updates `dynlink.c` to use `_emscripten_thread_notify`.
---------
Co-authored-by: Thomas Lively <tlively123@gmail.com>sleeping field from pthread struct. NFC (#26691)1 parent b9e9469 commit 662cb06
File tree
3 files changed
+5
-20
lines changed- system/lib
- libc
- musl/src/internal
- pthread
3 files changed
+5
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
406 | 408 | | |
407 | 409 | | |
408 | 410 | | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
416 | 414 | | |
417 | 415 | | |
418 | 416 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | 125 | | |
132 | 126 | | |
133 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | 176 | | |
183 | 177 | | |
184 | 178 | | |
| |||
197 | 191 | | |
198 | 192 | | |
199 | 193 | | |
200 | | - | |
201 | 194 | | |
202 | 195 | | |
203 | 196 | | |
| |||
0 commit comments