Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 19f07f9

Browse files
authored
Merge pull request #3605 from ibara/openbsd-pthread_np
Fix Issue 22454 - OpenBSD: Add prototypes for pthread_np.h
2 parents d940d0b + 420efc9 commit 19f07f9

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

mak/COPY

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ COPY=\
257257
\
258258
$(IMPDIR)\core\sys\openbsd\dlfcn.d \
259259
$(IMPDIR)\core\sys\openbsd\err.d \
260+
$(IMPDIR)\core\sys\openbsd\pthread_np.d \
260261
$(IMPDIR)\core\sys\openbsd\stdlib.d \
261262
$(IMPDIR)\core\sys\openbsd\string.d \
262263
$(IMPDIR)\core\sys\openbsd\time.d \

mak/SRCS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ SRCS=\
257257
\
258258
src\core\sys\openbsd\dlfcn.d \
259259
src\core\sys\openbsd\err.d \
260+
src\core\sys\openbsd\pthread_np.d \
260261
src\core\sys\openbsd\stdlib.d \
261262
src\core\sys\openbsd\string.d \
262263
src\core\sys\openbsd\time.d \

src/core/sys/openbsd/pthread_np.d

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* D header file for OpenBSD pthread_np.h.
3+
*
4+
* Copyright: Copyright © 2021, The D Language Foundation
5+
* License: <a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>.
6+
* Authors: Brian Callahan
7+
*/
8+
module core.sys.openbsd.pthread_np;
9+
10+
version (OpenBSD):
11+
extern (C):
12+
nothrow:
13+
@nogc:
14+
15+
public import core.sys.posix.sys.types;
16+
import core.sys.posix.signal : stack_t;
17+
18+
int pthread_mutexattr_getkind_np(pthread_mutexattr_t);
19+
int pthread_mutexattr_setkind_np(pthread_mutexattr_t*, int);
20+
void pthread_get_name_np(pthread_t, char*, size_t);
21+
void pthread_set_name_np(pthread_t, const(char)*);
22+
int pthread_stackseg_np(pthread_t, stack_t*);
23+
int pthread_main_np();

0 commit comments

Comments
 (0)