Skip to content

Commit

Permalink
Merge pull request dlang#3605 from ibara/openbsd-pthread_np
Browse files Browse the repository at this point in the history
Fix Issue 22454 - OpenBSD: Add prototypes for pthread_np.h
  • Loading branch information
kinke committed Oct 30, 2021
2 parents d940d0b + 420efc9 commit 19f07f9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions mak/COPY
Expand Up @@ -257,6 +257,7 @@ COPY=\
\
$(IMPDIR)\core\sys\openbsd\dlfcn.d \
$(IMPDIR)\core\sys\openbsd\err.d \
$(IMPDIR)\core\sys\openbsd\pthread_np.d \
$(IMPDIR)\core\sys\openbsd\stdlib.d \
$(IMPDIR)\core\sys\openbsd\string.d \
$(IMPDIR)\core\sys\openbsd\time.d \
Expand Down
1 change: 1 addition & 0 deletions mak/SRCS
Expand Up @@ -257,6 +257,7 @@ SRCS=\
\
src\core\sys\openbsd\dlfcn.d \
src\core\sys\openbsd\err.d \
src\core\sys\openbsd\pthread_np.d \
src\core\sys\openbsd\stdlib.d \
src\core\sys\openbsd\string.d \
src\core\sys\openbsd\time.d \
Expand Down
23 changes: 23 additions & 0 deletions src/core/sys/openbsd/pthread_np.d
@@ -0,0 +1,23 @@
/**
* D header file for OpenBSD pthread_np.h.
*
* Copyright: Copyright © 2021, The D Language Foundation
* License: <a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>.
* Authors: Brian Callahan
*/
module core.sys.openbsd.pthread_np;

version (OpenBSD):
extern (C):
nothrow:
@nogc:

public import core.sys.posix.sys.types;
import core.sys.posix.signal : stack_t;

int pthread_mutexattr_getkind_np(pthread_mutexattr_t);
int pthread_mutexattr_setkind_np(pthread_mutexattr_t*, int);
void pthread_get_name_np(pthread_t, char*, size_t);
void pthread_set_name_np(pthread_t, const(char)*);
int pthread_stackseg_np(pthread_t, stack_t*);
int pthread_main_np();

0 comments on commit 19f07f9

Please sign in to comment.