Commit 764a245
Fix M:N threads under OpenBSD
OpenBSD requires MAP_STACK for memory regions used as thread stacks.
However it seems to error with "Invalid argument" unless the permissions
include both PROT_READ | PROT_WRITE.
We should be able to satisft this by re-mmapping over our reserved stack
region to get the MAP_STACK flag. As a (very minor) bonus, this applies
MAP_STACK only to the machine stack region, not the VM region.
Co-authored-by: Jeremy Evans <code@jeremyevans.net>1 parent 21f2bbf commit 764a245
1 file changed
Lines changed: 8 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
| 192 | + | |
198 | 193 | | |
199 | 194 | | |
200 | 195 | | |
| |||
318 | 313 | | |
319 | 314 | | |
320 | 315 | | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
321 | 322 | | |
322 | 323 | | |
323 | | - | |
| 324 | + | |
324 | 325 | | |
325 | 326 | | |
326 | 327 | | |
| |||
0 commit comments