summaryrefslogtreecommitdiff
path: root/lib/libc/include
diff options
context:
space:
mode:
authorad <ad@NetBSD.org>2007-11-27 20:58:26 +0000
committerad <ad@NetBSD.org>2007-11-27 20:58:26 +0000
commit4084ca7f3fe50b29ad22fa4aa4049e62cd065573 (patch)
tree1ac442f21ae2bf1a27714f839e8a7809791273fd /lib/libc/include
parentd5e9b90716f622207f1403ab0be58282fdb2f2b6 (diff)
Add thr_curcpu(), pthread_curcpu_np().
Diffstat (limited to 'lib/libc/include')
-rw-r--r--lib/libc/include/reentrant.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libc/include/reentrant.h b/lib/libc/include/reentrant.h
index 15507ebe9c0..c8624998c8b 100644
--- a/lib/libc/include/reentrant.h
+++ b/lib/libc/include/reentrant.h
@@ -1,4 +1,4 @@
-/* $NetBSD: reentrant.h,v 1.10 2004/12/14 00:23:19 nathanw Exp $ */
+/* $NetBSD: reentrant.h,v 1.11 2007/11/27 20:58:26 ad Exp $ */
/*-
* Copyright (c) 1997, 1998, 2003 The NetBSD Foundation, Inc.
@@ -211,6 +211,7 @@ void __libc_thr_create(thr_t *, const thrattr_t *,
void __libc_thr_exit(void *) __attribute__((__noreturn__));
int *__libc_thr_errno(void);
int __libc_thr_setcancelstate(int, int *);
+unsigned int __libc_thr_curcpu(void);
extern int __isthreaded;
__END_DECLS
@@ -224,6 +225,7 @@ __END_DECLS
#define thr_errno() __libc_thr_errno()
#define thr_enabled() (__isthreaded)
#define thr_setcancelstate(n, o) __libc_thr_setcancelstate((n),(o))
+#define thr_curcpu() __libc_thr_curcpu()
#endif /* __LIBC_THREAD_STUBS */
#define FLOCKFILE(fp) __flockfile_internal(fp, 1)
@@ -261,6 +263,7 @@ __END_DECLS
#define thr_sigsetmask(f, n, o)
#define thr_self()
#define thr_errno()
+#define thr_curcpu() ((unsigned int)0)
#define FLOCKFILE(fp)
#define FUNLOCKFILE(fp)