Commit af215ca
Add OpenBSD support in CPalThread (#129057)
Add OpenBSD support for `CPalThread::GetStackBase()` and
`CPalThread::GetStackLimit()`.
OpenBSD does not have `pthread_attr_get_np` or `pthread_getattr_np` to
get the current thread's stack attributes.
Instead there is a standalone function
[pthread_stackseg_np](https://man.openbsd.org/pthread_stackseg_np.3)
that does the same via [stack_t](https://man.openbsd.org/sigaltstack.2).
Since we do not actually need a standard pthread attr in this case I put
this case inside a `TARGET_OPENBSD` check similar to macOS.
Contributes to #124911
---------
Co-authored-by: Jan Kotas <jkotas@microsoft.com>1 parent 10aeb7b commit af215ca
1 file changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1423 | 1423 | | |
1424 | 1424 | | |
1425 | 1425 | | |
1426 | | - | |
| 1426 | + | |
1427 | 1427 | | |
1428 | 1428 | | |
1429 | 1429 | | |
| |||
2316 | 2316 | | |
2317 | 2317 | | |
2318 | 2318 | | |
| 2319 | + | |
| 2320 | + | |
| 2321 | + | |
| 2322 | + | |
| 2323 | + | |
| 2324 | + | |
2319 | 2325 | | |
2320 | 2326 | | |
2321 | 2327 | | |
| |||
2361 | 2367 | | |
2362 | 2368 | | |
2363 | 2369 | | |
| 2370 | + | |
| 2371 | + | |
| 2372 | + | |
| 2373 | + | |
| 2374 | + | |
| 2375 | + | |
2364 | 2376 | | |
2365 | 2377 | | |
2366 | 2378 | | |
| |||
0 commit comments