summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorguenther <>2011-10-16 06:29:56 +0000
committerguenther <>2011-10-16 06:29:56 +0000
commitcaba4b0b065044add90c04bf641ed89ce819ec7e (patch)
treefbe1dbb4551963e3b9ed1c7599aca5fa3075af8e /src
parent695c37722457e1e3867d2ab9d91e8e38f22f14ca (diff)
downloadopenbsd-caba4b0b065044add90c04bf641ed89ce819ec7e.tar.gz
openbsd-caba4b0b065044add90c04bf641ed89ce819ec7e.tar.bz2
openbsd-caba4b0b065044add90c04bf641ed89ce819ec7e.zip
Make consistent the syscall stubs for the syscalls that got special
handling to fix up the alignment of 64bit arguments so that they do the same dance where _thread_sys_FOO is the real stub and FOO is a weak alias. For some of them, this is needed for cancellation handling. From discussions with fgsch@, ok millert@
Diffstat (limited to 'src')
-rw-r--r--src/lib/libc/include/thread_private.h17
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)