diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libc/include/thread_private.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/lib/libc/include/thread_private.h b/src/lib/libc/include/thread_private.h index 2d8913e482..673fb9c6a6 100644 --- a/src/lib/libc/include/thread_private.h +++ b/src/lib/libc/include/thread_private.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: thread_private.h,v 1.24 2008/06/14 15:43:43 otto Exp $ */ | 1 | /* $OpenBSD: thread_private.h,v 1.25 2011/10/16 06:29:56 guenther Exp $ */ |
2 | 2 | ||
3 | /* PUBLIC DOMAIN: No Rights Reserved. Marco S Hyman <marc@snafu.org> */ | 3 | /* PUBLIC DOMAIN: No Rights Reserved. Marco S Hyman <marc@snafu.org> */ |
4 | 4 | ||
@@ -34,6 +34,21 @@ extern int __isthreaded; | |||
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | /* | 36 | /* |
37 | * Ditto for hand-written syscall stubs: | ||
38 | * | ||
39 | * Use STUB_NAME(n) to get the strong name of the stub: _thread_sys_n | ||
40 | * STUB_ALIAS(n) to generate the weak symbol n pointing to _thread_sys_n, | ||
41 | * STUB_PROTOTYPE(n) to generate a prototype for _thread_sys_n (based on n). | ||
42 | */ | ||
43 | #define STUB_NAME(name) __CONCAT(_thread_sys_,name) | ||
44 | #define STUB_ALIAS(name) __weak_alias(name, STUB_NAME(name)) | ||
45 | #ifdef __GNUC__ | ||
46 | #define STUB_PROTOTYPE(name) __typeof__(name) STUB_NAME(name) | ||
47 | #else | ||
48 | #define STUB_PROTOTYPE(name) /* typeof() only in gcc */ | ||
49 | #endif | ||
50 | |||
51 | /* | ||
37 | * helper macro to make unique names in the thread namespace | 52 | * helper macro to make unique names in the thread namespace |
38 | */ | 53 | */ |
39 | #define __THREAD_NAME(name) __CONCAT(_thread_tagname_,name) | 54 | #define __THREAD_NAME(name) __CONCAT(_thread_tagname_,name) |