diff options
| author | nathanw <nathanw@NetBSD.org> | 2004-12-10 16:40:40 +0000 |
|---|---|---|
| committer | nathanw <nathanw@NetBSD.org> | 2004-12-10 16:40:40 +0000 |
| commit | 0eaa8971b75ca19285a4ebb37816f150314d0bb1 (patch) | |
| tree | 19a82dc994a186cfd100ec3dcc2e183586182a9d /include | |
| parent | 8d1f13638c6ae51ded4266beab792aa7a07c79be (diff) | |
Use CPP macros to cause many libpthread functions used by applications
to be transformed into the do-nothing-when-libpthread-isn't-linked libc
stub names. This will permit library code that uses <pthread.h> and pthread
functions "defensively" to not need to link against libpthread and not need
to be patched to the threadlib.h API.
Diffstat (limited to 'include')
| -rw-r--r-- | include/sched.h | 7 | ||||
| -rw-r--r-- | include/signal.h | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/include/sched.h b/include/sched.h index 4d8979eca46..8bb540723f8 100644 --- a/include/sched.h +++ b/include/sched.h @@ -1,4 +1,4 @@ -/* $NetBSD: sched.h,v 1.4 2003/07/08 05:41:51 itojun Exp $ */ +/* $NetBSD: sched.h,v 1.5 2004/12/10 16:40:40 nathanw Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -64,8 +64,13 @@ int sched_rr_get_interval(pid_t, struct timespec *); /* Not optional in the presence of _POSIX_THREADS */ int sched_yield(void); +void __libc_thr_yield(void); __END_DECLS +#ifndef __LIBPTHREAD_SOURCE__ +#define sched_yield __libc_thr_yield +#endif /* __LIBPTHREAD_SOURCE__ */ + #if defined(_NETBSD_SOURCE) /* diff --git a/include/signal.h b/include/signal.h index 5918468c37e..53f0f3f4ca2 100644 --- a/include/signal.h +++ b/include/signal.h @@ -1,4 +1,4 @@ -/* $NetBSD: signal.h,v 1.38 2004/07/01 23:46:07 kleink Exp $ */ +/* $NetBSD: signal.h,v 1.39 2004/12/10 16:40:40 nathanw Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -66,6 +66,10 @@ int __libc_sigaction14 __P((int, const struct sigaction *, defined(_NETBSD_SOURCE) int pthread_sigmask __P((int, const sigset_t *, sigset_t *)); int pthread_kill __P((pthread_t, int)); +int __libc_thr_sigsetmask(int, const sigset_t *, sigset_t *); +#ifndef __LIBPTHREAD_SOURCE__ +#define pthread_sigmask __libc_thr_sigsetmask +#endif /* __LIBPTHREAD_SOURCE__ */ #endif #ifdef __LIBC12_SOURCE__ |
