Fix many thread and file descriptor issues on Windows

The greenbean web server now works nearly perfectly on Windows with over
1000 threads. But some synchronization issues still remain which prevent
us from going over nine thousand.
This commit is contained in:
Justine Tunney 2022-05-20 18:51:41 -07:00
parent 96781d0679
commit 7838edae88
32 changed files with 363 additions and 192 deletions

View file

@ -59,6 +59,7 @@ privileged noinstrument noasan int __hook(void *ifunc,
intptr_t kMcount = (intptr_t)&mcount;
intptr_t kProgramCodeStart = (intptr_t)_ereal;
intptr_t kPrivilegedStart = (intptr_t)__privileged_addr;
if (!symbols) return -1;
__morph_begin();
for (i = 0; i < symbols->count; ++i) {
if (symbols->addr_base + symbols->symbols[i].x < kProgramCodeStart) {