public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] Rework not-cancel function prototypes
@ 2022-04-04 12:52 Adhemerval Zanella
0 siblings, 0 replies; 15+ messages in thread
From: Adhemerval Zanella @ 2022-04-04 12:52 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4f7b0d5c661b4a0f1557420cf8d6e5765ae60a59
commit 4f7b0d5c661b4a0f1557420cf8d6e5765ae60a59
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 8 16:41:14 2022 -0300
Rework not-cancel function prototypes
By adding a new hidden_proto2 macro.
Diff:
---
include/libc-symbols.h | 9 ++++++
sysdeps/unix/sysv/linux/not-cancel.h | 57 +++++++++++++++---------------------
2 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 662bd118b1..f4c1312ba5 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -532,11 +532,16 @@ for linking")
__attribute__ ((visibility ("hidden"), ##attrs))
# define hidden_proto(name, attrs...) \
__hidden_proto (name, , __GI_##name, ##attrs)
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2 (type, name, , __GI_##name, ##attrs)
# define hidden_tls_proto(name, attrs...) \
__hidden_proto (name, __thread, __GI_##name, ##attrs)
# define __hidden_proto(name, thread, internal, attrs...) \
extern thread __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
__hidden_proto_hiddenattr (attrs);
+# define __hidden_proto2(type, name, thread, internal, attrs...) \
+ extern thread __typeof (type) name __asm__ (__hidden_asmname (#internal)) \
+ __hidden_proto_hiddenattr (attrs);
# define __hidden_asmname(name) \
__hidden_asmname1 (__USER_LABEL_PREFIX__, name)
# define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name)
@@ -604,6 +609,10 @@ for linking")
# define hidden_proto(name, attrs...)
# define hidden_tls_proto(name, attrs...)
# endif
+# define __hidden_proto2(type, name, thread, attrs...) \
+ extern thread __typeof (type) name __attribute__ ((visibility ("hidden"), ##attrs));
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2(type, name, , attrs)
# else
# define HIDDEN_JUMPTARGET(name) JUMPTARGET(name)
# endif /* Not __ASSEMBLER__ */
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index 75b9e0ee1e..da2f2463b6 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -27,29 +27,35 @@
#include <sys/wait.h>
#include <time.h>
-/* Non cancellable open syscall. */
-__typeof (open) __open_nocancel;
-
-/* Non cancellable open syscall (LFS version). */
-__typeof (open64) __open64_nocancel;
-
-/* Non cancellable openat syscall. */
-__typeof (openat) __openat_nocancel;
-
+#if IS_IN (libc) || IS_IN (rtld)
+/* Non cacellable open syscall (LFS version). */
+hidden_proto2 (open, __open_nocancel)
+/* Non cacellable open syscall (LFS version). */
+hidden_proto2 (open64, __open64_nocancel)
/* Non cacellable openat syscall (LFS version). */
-__typeof (openat64) __openat64_nocancel;
-
+hidden_proto2 (openat, __openat_nocancel)
+/* Non cacellable openat syscall (LFS version). */
+hidden_proto2 (openat64, __openat64_nocancel)
/* Non cancellable read syscall. */
-__typeof (__read) __read_nocancel;
-
+hidden_proto2 (read, __read_nocancel)
/* Non cancellable pread syscall (LFS version). */
-__typeof (__pread64) __pread64_nocancel;
-
+hidden_proto2 (pread64, __pread64_nocancel)
/* Uncancelable write. */
-__typeof (__write) __write_nocancel;
-
+hidden_proto2 (write, __write_nocancel)
/* Uncancelable close. */
-__typeof (__close) __close_nocancel;
+hidden_proto2 (close, __close_nocancel)
+/* Uncancelable fcntl. */
+hidden_proto2 (fcntl64, __fcntl64_nocancel)
+#else
+__typeof (open) __open_nocancel;
+__typeof (open64) __open64_nocancel;
+__typeof (openat) __openat_nocancel;
+__typeof (openat64) __openat64_nocancel;
+__typeof (read) __read_nocancel;
+__typeof (pread64) __pread64_nocancel;
+__typeof (write) __write_nocancel;
+__typeof (close) __close_nocancel;
+#endif
/* Non cancellable close syscall that does not also set errno in case of
failure. */
@@ -67,19 +73,4 @@ __writev_nocancel_nostatus (int fd, const struct iovec *iov, int iovcnt)
INTERNAL_SYSCALL_CALL (writev, fd, iov, iovcnt);
}
-/* Uncancelable fcntl. */
-__typeof (__fcntl) __fcntl64_nocancel;
-
-#if IS_IN (libc) || IS_IN (rtld)
-hidden_proto (__open_nocancel)
-hidden_proto (__open64_nocancel)
-hidden_proto (__openat_nocancel)
-hidden_proto (__openat64_nocancel)
-hidden_proto (__read_nocancel)
-hidden_proto (__pread64_nocancel)
-hidden_proto (__write_nocancel)
-hidden_proto (__close_nocancel)
-hidden_proto (__fcntl64_nocancel)
-#endif
-
#endif /* NOT_CANCEL_H */
^ permalink raw reply [flat|nested] 15+ messages in thread
* [glibc/azanella/clang] Rework not-cancel function prototypes
@ 2022-10-04 12:56 Adhemerval Zanella
0 siblings, 0 replies; 15+ messages in thread
From: Adhemerval Zanella @ 2022-10-04 12:56 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3f7cb7b03a88be4479e3fcebaee0a51468586be8
commit 3f7cb7b03a88be4479e3fcebaee0a51468586be8
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 8 16:41:14 2022 -0300
Rework not-cancel function prototypes
By adding a new hidden_proto2 macro.
Diff:
---
include/libc-symbols.h | 9 ++++++
sysdeps/unix/sysv/linux/not-cancel.h | 54 ++++++++++++++++--------------------
2 files changed, 33 insertions(+), 30 deletions(-)
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index f4437ff6ad..0715d87c7d 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -520,6 +520,8 @@ for linking")
__hidden_proto (name, , __GI_##name, ##attrs)
# define hidden_proto_alias(name, alias, attrs...) \
__hidden_proto_alias (name, , alias, ##attrs)
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2 (type, name, , __GI_##name, ##attrs)
# define hidden_tls_proto(name, attrs...) \
__hidden_proto (name, __thread, __GI_##name, ##attrs)
# define __hidden_proto(name, thread, internal, attrs...) \
@@ -527,6 +529,9 @@ for linking")
__hidden_proto_hiddenattr (attrs);
# define __hidden_proto_alias(name, thread, internal, attrs...) \
extern thread __typeof (name) internal __hidden_proto_hiddenattr (attrs);
+# define __hidden_proto2(type, name, thread, internal, attrs...) \
+ extern thread __typeof (type) name __asm__ (__hidden_asmname (#internal)) \
+ __hidden_proto_hiddenattr (attrs);
# define __hidden_asmname(name) \
__hidden_asmname1 (__USER_LABEL_PREFIX__, name)
# define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name)
@@ -602,6 +607,10 @@ for linking")
# define hidden_proto_alias(name, alias, attrs...)
# define hidden_tls_proto(name, attrs...)
# endif
+# define __hidden_proto2(type, name, thread, attrs...) \
+ extern thread __typeof (type) name __attribute__ ((visibility ("hidden"), ##attrs));
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2(type, name, , attrs)
# else
# define HIDDEN_JUMPTARGET(name) JUMPTARGET(name)
# endif /* Not __ASSEMBLER__ */
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index 93615de681..f2d3594269 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -28,29 +28,35 @@
#include <sys/wait.h>
#include <time.h>
-/* Non cancellable open syscall. */
-__typeof (open) __open_nocancel;
-
-/* Non cancellable open syscall (LFS version). */
-__typeof (open64) __open64_nocancel;
-
-/* Non cancellable openat syscall. */
-__typeof (openat) __openat_nocancel;
-
+#if IS_IN (libc) || IS_IN (rtld)
+/* Non cacellable open syscall (LFS version). */
+hidden_proto2 (open, __open_nocancel)
+/* Non cacellable open syscall (LFS version). */
+hidden_proto2 (open64, __open64_nocancel)
/* Non cacellable openat syscall (LFS version). */
-__typeof (openat64) __openat64_nocancel;
-
+hidden_proto2 (openat, __openat_nocancel)
+/* Non cacellable openat syscall (LFS version). */
+hidden_proto2 (openat64, __openat64_nocancel)
/* Non cancellable read syscall. */
-__typeof (__read) __read_nocancel;
-
+hidden_proto2 (read, __read_nocancel)
/* Non cancellable pread syscall (LFS version). */
-__typeof (__pread64) __pread64_nocancel;
-
+hidden_proto2 (pread64, __pread64_nocancel)
/* Uncancelable write. */
-__typeof (__write) __write_nocancel;
-
+hidden_proto2 (write, __write_nocancel)
/* Uncancelable close. */
-__typeof (__close) __close_nocancel;
+hidden_proto2 (close, __close_nocancel)
+/* Uncancelable fcntl. */
+hidden_proto2 (fcntl64, __fcntl64_nocancel)
+#else
+__typeof (open) __open_nocancel;
+__typeof (open64) __open64_nocancel;
+__typeof (openat) __openat_nocancel;
+__typeof (openat64) __openat64_nocancel;
+__typeof (read) __read_nocancel;
+__typeof (pread64) __pread64_nocancel;
+__typeof (write) __write_nocancel;
+__typeof (close) __close_nocancel;
+#endif
/* Non cancellable close syscall that does not also set errno in case of
failure. */
@@ -83,16 +89,4 @@ __poll_infinity_nocancel (struct pollfd *fds, nfds_t nfds)
/* Uncancelable fcntl. */
__typeof (__fcntl) __fcntl64_nocancel;
-#if IS_IN (libc) || IS_IN (rtld)
-hidden_proto (__open_nocancel)
-hidden_proto (__open64_nocancel)
-hidden_proto (__openat_nocancel)
-hidden_proto (__openat64_nocancel)
-hidden_proto (__read_nocancel)
-hidden_proto (__pread64_nocancel)
-hidden_proto (__write_nocancel)
-hidden_proto (__close_nocancel)
-hidden_proto (__fcntl64_nocancel)
-#endif
-
#endif /* NOT_CANCEL_H */
^ permalink raw reply [flat|nested] 15+ messages in thread
* [glibc/azanella/clang] Rework not-cancel function prototypes
@ 2022-06-09 21:18 Adhemerval Zanella
0 siblings, 0 replies; 15+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 21:18 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=851b5c6183238c674bf2803e247dc86a3f39f104
commit 851b5c6183238c674bf2803e247dc86a3f39f104
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 8 16:41:14 2022 -0300
Rework not-cancel function prototypes
By adding a new hidden_proto2 macro.
Diff:
---
include/libc-symbols.h | 9 ++++++
sysdeps/unix/sysv/linux/not-cancel.h | 57 +++++++++++++++---------------------
2 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 4bb3d8c7ba..ac9a302cb6 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -534,11 +534,16 @@ for linking")
__attribute__ ((visibility ("hidden"), ##attrs))
# define hidden_proto(name, attrs...) \
__hidden_proto (name, , __GI_##name, ##attrs)
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2 (type, name, , __GI_##name, ##attrs)
# define hidden_tls_proto(name, attrs...) \
__hidden_proto (name, __thread, __GI_##name, ##attrs)
# define __hidden_proto(name, thread, internal, attrs...) \
extern thread __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
__hidden_proto_hiddenattr (attrs);
+# define __hidden_proto2(type, name, thread, internal, attrs...) \
+ extern thread __typeof (type) name __asm__ (__hidden_asmname (#internal)) \
+ __hidden_proto_hiddenattr (attrs);
# define __hidden_asmname(name) \
__hidden_asmname1 (__USER_LABEL_PREFIX__, name)
# define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name)
@@ -606,6 +611,10 @@ for linking")
# define hidden_proto(name, attrs...)
# define hidden_tls_proto(name, attrs...)
# endif
+# define __hidden_proto2(type, name, thread, attrs...) \
+ extern thread __typeof (type) name __attribute__ ((visibility ("hidden"), ##attrs));
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2(type, name, , attrs)
# else
# define HIDDEN_JUMPTARGET(name) JUMPTARGET(name)
# endif /* Not __ASSEMBLER__ */
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index 75b9e0ee1e..da2f2463b6 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -27,29 +27,35 @@
#include <sys/wait.h>
#include <time.h>
-/* Non cancellable open syscall. */
-__typeof (open) __open_nocancel;
-
-/* Non cancellable open syscall (LFS version). */
-__typeof (open64) __open64_nocancel;
-
-/* Non cancellable openat syscall. */
-__typeof (openat) __openat_nocancel;
-
+#if IS_IN (libc) || IS_IN (rtld)
+/* Non cacellable open syscall (LFS version). */
+hidden_proto2 (open, __open_nocancel)
+/* Non cacellable open syscall (LFS version). */
+hidden_proto2 (open64, __open64_nocancel)
/* Non cacellable openat syscall (LFS version). */
-__typeof (openat64) __openat64_nocancel;
-
+hidden_proto2 (openat, __openat_nocancel)
+/* Non cacellable openat syscall (LFS version). */
+hidden_proto2 (openat64, __openat64_nocancel)
/* Non cancellable read syscall. */
-__typeof (__read) __read_nocancel;
-
+hidden_proto2 (read, __read_nocancel)
/* Non cancellable pread syscall (LFS version). */
-__typeof (__pread64) __pread64_nocancel;
-
+hidden_proto2 (pread64, __pread64_nocancel)
/* Uncancelable write. */
-__typeof (__write) __write_nocancel;
-
+hidden_proto2 (write, __write_nocancel)
/* Uncancelable close. */
-__typeof (__close) __close_nocancel;
+hidden_proto2 (close, __close_nocancel)
+/* Uncancelable fcntl. */
+hidden_proto2 (fcntl64, __fcntl64_nocancel)
+#else
+__typeof (open) __open_nocancel;
+__typeof (open64) __open64_nocancel;
+__typeof (openat) __openat_nocancel;
+__typeof (openat64) __openat64_nocancel;
+__typeof (read) __read_nocancel;
+__typeof (pread64) __pread64_nocancel;
+__typeof (write) __write_nocancel;
+__typeof (close) __close_nocancel;
+#endif
/* Non cancellable close syscall that does not also set errno in case of
failure. */
@@ -67,19 +73,4 @@ __writev_nocancel_nostatus (int fd, const struct iovec *iov, int iovcnt)
INTERNAL_SYSCALL_CALL (writev, fd, iov, iovcnt);
}
-/* Uncancelable fcntl. */
-__typeof (__fcntl) __fcntl64_nocancel;
-
-#if IS_IN (libc) || IS_IN (rtld)
-hidden_proto (__open_nocancel)
-hidden_proto (__open64_nocancel)
-hidden_proto (__openat_nocancel)
-hidden_proto (__openat64_nocancel)
-hidden_proto (__read_nocancel)
-hidden_proto (__pread64_nocancel)
-hidden_proto (__write_nocancel)
-hidden_proto (__close_nocancel)
-hidden_proto (__fcntl64_nocancel)
-#endif
-
#endif /* NOT_CANCEL_H */
^ permalink raw reply [flat|nested] 15+ messages in thread
* [glibc/azanella/clang] Rework not-cancel function prototypes
@ 2022-06-09 13:14 Adhemerval Zanella
0 siblings, 0 replies; 15+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 13:14 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=851b5c6183238c674bf2803e247dc86a3f39f104
commit 851b5c6183238c674bf2803e247dc86a3f39f104
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 8 16:41:14 2022 -0300
Rework not-cancel function prototypes
By adding a new hidden_proto2 macro.
Diff:
---
include/libc-symbols.h | 9 ++++++
sysdeps/unix/sysv/linux/not-cancel.h | 57 +++++++++++++++---------------------
2 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 4bb3d8c7ba..ac9a302cb6 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -534,11 +534,16 @@ for linking")
__attribute__ ((visibility ("hidden"), ##attrs))
# define hidden_proto(name, attrs...) \
__hidden_proto (name, , __GI_##name, ##attrs)
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2 (type, name, , __GI_##name, ##attrs)
# define hidden_tls_proto(name, attrs...) \
__hidden_proto (name, __thread, __GI_##name, ##attrs)
# define __hidden_proto(name, thread, internal, attrs...) \
extern thread __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
__hidden_proto_hiddenattr (attrs);
+# define __hidden_proto2(type, name, thread, internal, attrs...) \
+ extern thread __typeof (type) name __asm__ (__hidden_asmname (#internal)) \
+ __hidden_proto_hiddenattr (attrs);
# define __hidden_asmname(name) \
__hidden_asmname1 (__USER_LABEL_PREFIX__, name)
# define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name)
@@ -606,6 +611,10 @@ for linking")
# define hidden_proto(name, attrs...)
# define hidden_tls_proto(name, attrs...)
# endif
+# define __hidden_proto2(type, name, thread, attrs...) \
+ extern thread __typeof (type) name __attribute__ ((visibility ("hidden"), ##attrs));
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2(type, name, , attrs)
# else
# define HIDDEN_JUMPTARGET(name) JUMPTARGET(name)
# endif /* Not __ASSEMBLER__ */
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index 75b9e0ee1e..da2f2463b6 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -27,29 +27,35 @@
#include <sys/wait.h>
#include <time.h>
-/* Non cancellable open syscall. */
-__typeof (open) __open_nocancel;
-
-/* Non cancellable open syscall (LFS version). */
-__typeof (open64) __open64_nocancel;
-
-/* Non cancellable openat syscall. */
-__typeof (openat) __openat_nocancel;
-
+#if IS_IN (libc) || IS_IN (rtld)
+/* Non cacellable open syscall (LFS version). */
+hidden_proto2 (open, __open_nocancel)
+/* Non cacellable open syscall (LFS version). */
+hidden_proto2 (open64, __open64_nocancel)
/* Non cacellable openat syscall (LFS version). */
-__typeof (openat64) __openat64_nocancel;
-
+hidden_proto2 (openat, __openat_nocancel)
+/* Non cacellable openat syscall (LFS version). */
+hidden_proto2 (openat64, __openat64_nocancel)
/* Non cancellable read syscall. */
-__typeof (__read) __read_nocancel;
-
+hidden_proto2 (read, __read_nocancel)
/* Non cancellable pread syscall (LFS version). */
-__typeof (__pread64) __pread64_nocancel;
-
+hidden_proto2 (pread64, __pread64_nocancel)
/* Uncancelable write. */
-__typeof (__write) __write_nocancel;
-
+hidden_proto2 (write, __write_nocancel)
/* Uncancelable close. */
-__typeof (__close) __close_nocancel;
+hidden_proto2 (close, __close_nocancel)
+/* Uncancelable fcntl. */
+hidden_proto2 (fcntl64, __fcntl64_nocancel)
+#else
+__typeof (open) __open_nocancel;
+__typeof (open64) __open64_nocancel;
+__typeof (openat) __openat_nocancel;
+__typeof (openat64) __openat64_nocancel;
+__typeof (read) __read_nocancel;
+__typeof (pread64) __pread64_nocancel;
+__typeof (write) __write_nocancel;
+__typeof (close) __close_nocancel;
+#endif
/* Non cancellable close syscall that does not also set errno in case of
failure. */
@@ -67,19 +73,4 @@ __writev_nocancel_nostatus (int fd, const struct iovec *iov, int iovcnt)
INTERNAL_SYSCALL_CALL (writev, fd, iov, iovcnt);
}
-/* Uncancelable fcntl. */
-__typeof (__fcntl) __fcntl64_nocancel;
-
-#if IS_IN (libc) || IS_IN (rtld)
-hidden_proto (__open_nocancel)
-hidden_proto (__open64_nocancel)
-hidden_proto (__openat_nocancel)
-hidden_proto (__openat64_nocancel)
-hidden_proto (__read_nocancel)
-hidden_proto (__pread64_nocancel)
-hidden_proto (__write_nocancel)
-hidden_proto (__close_nocancel)
-hidden_proto (__fcntl64_nocancel)
-#endif
-
#endif /* NOT_CANCEL_H */
^ permalink raw reply [flat|nested] 15+ messages in thread
* [glibc/azanella/clang] Rework not-cancel function prototypes
@ 2022-06-03 14:03 Adhemerval Zanella
0 siblings, 0 replies; 15+ messages in thread
From: Adhemerval Zanella @ 2022-06-03 14:03 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ea0621161c921ebc29d589c336893275f57c46b9
commit ea0621161c921ebc29d589c336893275f57c46b9
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 8 16:41:14 2022 -0300
Rework not-cancel function prototypes
By adding a new hidden_proto2 macro.
Diff:
---
include/libc-symbols.h | 9 ++++++
sysdeps/unix/sysv/linux/not-cancel.h | 57 +++++++++++++++---------------------
2 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 4bb3d8c7ba..ac9a302cb6 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -534,11 +534,16 @@ for linking")
__attribute__ ((visibility ("hidden"), ##attrs))
# define hidden_proto(name, attrs...) \
__hidden_proto (name, , __GI_##name, ##attrs)
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2 (type, name, , __GI_##name, ##attrs)
# define hidden_tls_proto(name, attrs...) \
__hidden_proto (name, __thread, __GI_##name, ##attrs)
# define __hidden_proto(name, thread, internal, attrs...) \
extern thread __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
__hidden_proto_hiddenattr (attrs);
+# define __hidden_proto2(type, name, thread, internal, attrs...) \
+ extern thread __typeof (type) name __asm__ (__hidden_asmname (#internal)) \
+ __hidden_proto_hiddenattr (attrs);
# define __hidden_asmname(name) \
__hidden_asmname1 (__USER_LABEL_PREFIX__, name)
# define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name)
@@ -606,6 +611,10 @@ for linking")
# define hidden_proto(name, attrs...)
# define hidden_tls_proto(name, attrs...)
# endif
+# define __hidden_proto2(type, name, thread, attrs...) \
+ extern thread __typeof (type) name __attribute__ ((visibility ("hidden"), ##attrs));
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2(type, name, , attrs)
# else
# define HIDDEN_JUMPTARGET(name) JUMPTARGET(name)
# endif /* Not __ASSEMBLER__ */
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index 75b9e0ee1e..da2f2463b6 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -27,29 +27,35 @@
#include <sys/wait.h>
#include <time.h>
-/* Non cancellable open syscall. */
-__typeof (open) __open_nocancel;
-
-/* Non cancellable open syscall (LFS version). */
-__typeof (open64) __open64_nocancel;
-
-/* Non cancellable openat syscall. */
-__typeof (openat) __openat_nocancel;
-
+#if IS_IN (libc) || IS_IN (rtld)
+/* Non cacellable open syscall (LFS version). */
+hidden_proto2 (open, __open_nocancel)
+/* Non cacellable open syscall (LFS version). */
+hidden_proto2 (open64, __open64_nocancel)
/* Non cacellable openat syscall (LFS version). */
-__typeof (openat64) __openat64_nocancel;
-
+hidden_proto2 (openat, __openat_nocancel)
+/* Non cacellable openat syscall (LFS version). */
+hidden_proto2 (openat64, __openat64_nocancel)
/* Non cancellable read syscall. */
-__typeof (__read) __read_nocancel;
-
+hidden_proto2 (read, __read_nocancel)
/* Non cancellable pread syscall (LFS version). */
-__typeof (__pread64) __pread64_nocancel;
-
+hidden_proto2 (pread64, __pread64_nocancel)
/* Uncancelable write. */
-__typeof (__write) __write_nocancel;
-
+hidden_proto2 (write, __write_nocancel)
/* Uncancelable close. */
-__typeof (__close) __close_nocancel;
+hidden_proto2 (close, __close_nocancel)
+/* Uncancelable fcntl. */
+hidden_proto2 (fcntl64, __fcntl64_nocancel)
+#else
+__typeof (open) __open_nocancel;
+__typeof (open64) __open64_nocancel;
+__typeof (openat) __openat_nocancel;
+__typeof (openat64) __openat64_nocancel;
+__typeof (read) __read_nocancel;
+__typeof (pread64) __pread64_nocancel;
+__typeof (write) __write_nocancel;
+__typeof (close) __close_nocancel;
+#endif
/* Non cancellable close syscall that does not also set errno in case of
failure. */
@@ -67,19 +73,4 @@ __writev_nocancel_nostatus (int fd, const struct iovec *iov, int iovcnt)
INTERNAL_SYSCALL_CALL (writev, fd, iov, iovcnt);
}
-/* Uncancelable fcntl. */
-__typeof (__fcntl) __fcntl64_nocancel;
-
-#if IS_IN (libc) || IS_IN (rtld)
-hidden_proto (__open_nocancel)
-hidden_proto (__open64_nocancel)
-hidden_proto (__openat_nocancel)
-hidden_proto (__openat64_nocancel)
-hidden_proto (__read_nocancel)
-hidden_proto (__pread64_nocancel)
-hidden_proto (__write_nocancel)
-hidden_proto (__close_nocancel)
-hidden_proto (__fcntl64_nocancel)
-#endif
-
#endif /* NOT_CANCEL_H */
^ permalink raw reply [flat|nested] 15+ messages in thread
* [glibc/azanella/clang] Rework not-cancel function prototypes
@ 2022-05-13 14:17 Adhemerval Zanella
0 siblings, 0 replies; 15+ messages in thread
From: Adhemerval Zanella @ 2022-05-13 14:17 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e0604bc8a2053b4dfd98a65100d781dbc4918f96
commit e0604bc8a2053b4dfd98a65100d781dbc4918f96
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 8 16:41:14 2022 -0300
Rework not-cancel function prototypes
By adding a new hidden_proto2 macro.
Diff:
---
include/libc-symbols.h | 9 ++++++
sysdeps/unix/sysv/linux/not-cancel.h | 57 +++++++++++++++---------------------
2 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 4bb3d8c7ba..ac9a302cb6 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -534,11 +534,16 @@ for linking")
__attribute__ ((visibility ("hidden"), ##attrs))
# define hidden_proto(name, attrs...) \
__hidden_proto (name, , __GI_##name, ##attrs)
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2 (type, name, , __GI_##name, ##attrs)
# define hidden_tls_proto(name, attrs...) \
__hidden_proto (name, __thread, __GI_##name, ##attrs)
# define __hidden_proto(name, thread, internal, attrs...) \
extern thread __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
__hidden_proto_hiddenattr (attrs);
+# define __hidden_proto2(type, name, thread, internal, attrs...) \
+ extern thread __typeof (type) name __asm__ (__hidden_asmname (#internal)) \
+ __hidden_proto_hiddenattr (attrs);
# define __hidden_asmname(name) \
__hidden_asmname1 (__USER_LABEL_PREFIX__, name)
# define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name)
@@ -606,6 +611,10 @@ for linking")
# define hidden_proto(name, attrs...)
# define hidden_tls_proto(name, attrs...)
# endif
+# define __hidden_proto2(type, name, thread, attrs...) \
+ extern thread __typeof (type) name __attribute__ ((visibility ("hidden"), ##attrs));
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2(type, name, , attrs)
# else
# define HIDDEN_JUMPTARGET(name) JUMPTARGET(name)
# endif /* Not __ASSEMBLER__ */
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index 75b9e0ee1e..da2f2463b6 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -27,29 +27,35 @@
#include <sys/wait.h>
#include <time.h>
-/* Non cancellable open syscall. */
-__typeof (open) __open_nocancel;
-
-/* Non cancellable open syscall (LFS version). */
-__typeof (open64) __open64_nocancel;
-
-/* Non cancellable openat syscall. */
-__typeof (openat) __openat_nocancel;
-
+#if IS_IN (libc) || IS_IN (rtld)
+/* Non cacellable open syscall (LFS version). */
+hidden_proto2 (open, __open_nocancel)
+/* Non cacellable open syscall (LFS version). */
+hidden_proto2 (open64, __open64_nocancel)
/* Non cacellable openat syscall (LFS version). */
-__typeof (openat64) __openat64_nocancel;
-
+hidden_proto2 (openat, __openat_nocancel)
+/* Non cacellable openat syscall (LFS version). */
+hidden_proto2 (openat64, __openat64_nocancel)
/* Non cancellable read syscall. */
-__typeof (__read) __read_nocancel;
-
+hidden_proto2 (read, __read_nocancel)
/* Non cancellable pread syscall (LFS version). */
-__typeof (__pread64) __pread64_nocancel;
-
+hidden_proto2 (pread64, __pread64_nocancel)
/* Uncancelable write. */
-__typeof (__write) __write_nocancel;
-
+hidden_proto2 (write, __write_nocancel)
/* Uncancelable close. */
-__typeof (__close) __close_nocancel;
+hidden_proto2 (close, __close_nocancel)
+/* Uncancelable fcntl. */
+hidden_proto2 (fcntl64, __fcntl64_nocancel)
+#else
+__typeof (open) __open_nocancel;
+__typeof (open64) __open64_nocancel;
+__typeof (openat) __openat_nocancel;
+__typeof (openat64) __openat64_nocancel;
+__typeof (read) __read_nocancel;
+__typeof (pread64) __pread64_nocancel;
+__typeof (write) __write_nocancel;
+__typeof (close) __close_nocancel;
+#endif
/* Non cancellable close syscall that does not also set errno in case of
failure. */
@@ -67,19 +73,4 @@ __writev_nocancel_nostatus (int fd, const struct iovec *iov, int iovcnt)
INTERNAL_SYSCALL_CALL (writev, fd, iov, iovcnt);
}
-/* Uncancelable fcntl. */
-__typeof (__fcntl) __fcntl64_nocancel;
-
-#if IS_IN (libc) || IS_IN (rtld)
-hidden_proto (__open_nocancel)
-hidden_proto (__open64_nocancel)
-hidden_proto (__openat_nocancel)
-hidden_proto (__openat64_nocancel)
-hidden_proto (__read_nocancel)
-hidden_proto (__pread64_nocancel)
-hidden_proto (__write_nocancel)
-hidden_proto (__close_nocancel)
-hidden_proto (__fcntl64_nocancel)
-#endif
-
#endif /* NOT_CANCEL_H */
^ permalink raw reply [flat|nested] 15+ messages in thread
* [glibc/azanella/clang] Rework not-cancel function prototypes
@ 2022-05-12 19:31 Adhemerval Zanella
0 siblings, 0 replies; 15+ messages in thread
From: Adhemerval Zanella @ 2022-05-12 19:31 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=97c75e65bfa15b0917bf4969bb63330d689f34fd
commit 97c75e65bfa15b0917bf4969bb63330d689f34fd
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 8 16:41:14 2022 -0300
Rework not-cancel function prototypes
By adding a new hidden_proto2 macro.
Diff:
---
include/libc-symbols.h | 9 ++++++
sysdeps/unix/sysv/linux/not-cancel.h | 57 +++++++++++++++---------------------
2 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 4bb3d8c7ba..ac9a302cb6 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -534,11 +534,16 @@ for linking")
__attribute__ ((visibility ("hidden"), ##attrs))
# define hidden_proto(name, attrs...) \
__hidden_proto (name, , __GI_##name, ##attrs)
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2 (type, name, , __GI_##name, ##attrs)
# define hidden_tls_proto(name, attrs...) \
__hidden_proto (name, __thread, __GI_##name, ##attrs)
# define __hidden_proto(name, thread, internal, attrs...) \
extern thread __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
__hidden_proto_hiddenattr (attrs);
+# define __hidden_proto2(type, name, thread, internal, attrs...) \
+ extern thread __typeof (type) name __asm__ (__hidden_asmname (#internal)) \
+ __hidden_proto_hiddenattr (attrs);
# define __hidden_asmname(name) \
__hidden_asmname1 (__USER_LABEL_PREFIX__, name)
# define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name)
@@ -606,6 +611,10 @@ for linking")
# define hidden_proto(name, attrs...)
# define hidden_tls_proto(name, attrs...)
# endif
+# define __hidden_proto2(type, name, thread, attrs...) \
+ extern thread __typeof (type) name __attribute__ ((visibility ("hidden"), ##attrs));
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2(type, name, , attrs)
# else
# define HIDDEN_JUMPTARGET(name) JUMPTARGET(name)
# endif /* Not __ASSEMBLER__ */
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index 75b9e0ee1e..da2f2463b6 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -27,29 +27,35 @@
#include <sys/wait.h>
#include <time.h>
-/* Non cancellable open syscall. */
-__typeof (open) __open_nocancel;
-
-/* Non cancellable open syscall (LFS version). */
-__typeof (open64) __open64_nocancel;
-
-/* Non cancellable openat syscall. */
-__typeof (openat) __openat_nocancel;
-
+#if IS_IN (libc) || IS_IN (rtld)
+/* Non cacellable open syscall (LFS version). */
+hidden_proto2 (open, __open_nocancel)
+/* Non cacellable open syscall (LFS version). */
+hidden_proto2 (open64, __open64_nocancel)
/* Non cacellable openat syscall (LFS version). */
-__typeof (openat64) __openat64_nocancel;
-
+hidden_proto2 (openat, __openat_nocancel)
+/* Non cacellable openat syscall (LFS version). */
+hidden_proto2 (openat64, __openat64_nocancel)
/* Non cancellable read syscall. */
-__typeof (__read) __read_nocancel;
-
+hidden_proto2 (read, __read_nocancel)
/* Non cancellable pread syscall (LFS version). */
-__typeof (__pread64) __pread64_nocancel;
-
+hidden_proto2 (pread64, __pread64_nocancel)
/* Uncancelable write. */
-__typeof (__write) __write_nocancel;
-
+hidden_proto2 (write, __write_nocancel)
/* Uncancelable close. */
-__typeof (__close) __close_nocancel;
+hidden_proto2 (close, __close_nocancel)
+/* Uncancelable fcntl. */
+hidden_proto2 (fcntl64, __fcntl64_nocancel)
+#else
+__typeof (open) __open_nocancel;
+__typeof (open64) __open64_nocancel;
+__typeof (openat) __openat_nocancel;
+__typeof (openat64) __openat64_nocancel;
+__typeof (read) __read_nocancel;
+__typeof (pread64) __pread64_nocancel;
+__typeof (write) __write_nocancel;
+__typeof (close) __close_nocancel;
+#endif
/* Non cancellable close syscall that does not also set errno in case of
failure. */
@@ -67,19 +73,4 @@ __writev_nocancel_nostatus (int fd, const struct iovec *iov, int iovcnt)
INTERNAL_SYSCALL_CALL (writev, fd, iov, iovcnt);
}
-/* Uncancelable fcntl. */
-__typeof (__fcntl) __fcntl64_nocancel;
-
-#if IS_IN (libc) || IS_IN (rtld)
-hidden_proto (__open_nocancel)
-hidden_proto (__open64_nocancel)
-hidden_proto (__openat_nocancel)
-hidden_proto (__openat64_nocancel)
-hidden_proto (__read_nocancel)
-hidden_proto (__pread64_nocancel)
-hidden_proto (__write_nocancel)
-hidden_proto (__close_nocancel)
-hidden_proto (__fcntl64_nocancel)
-#endif
-
#endif /* NOT_CANCEL_H */
^ permalink raw reply [flat|nested] 15+ messages in thread
* [glibc/azanella/clang] Rework not-cancel function prototypes
@ 2022-05-10 18:21 Adhemerval Zanella
0 siblings, 0 replies; 15+ messages in thread
From: Adhemerval Zanella @ 2022-05-10 18:21 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=31eedeb6bc19c1677994b7fa976c350fc8a91511
commit 31eedeb6bc19c1677994b7fa976c350fc8a91511
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 8 16:41:14 2022 -0300
Rework not-cancel function prototypes
By adding a new hidden_proto2 macro.
Diff:
---
include/libc-symbols.h | 9 ++++++
sysdeps/unix/sysv/linux/not-cancel.h | 57 +++++++++++++++---------------------
2 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 4bb3d8c7ba..ac9a302cb6 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -534,11 +534,16 @@ for linking")
__attribute__ ((visibility ("hidden"), ##attrs))
# define hidden_proto(name, attrs...) \
__hidden_proto (name, , __GI_##name, ##attrs)
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2 (type, name, , __GI_##name, ##attrs)
# define hidden_tls_proto(name, attrs...) \
__hidden_proto (name, __thread, __GI_##name, ##attrs)
# define __hidden_proto(name, thread, internal, attrs...) \
extern thread __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
__hidden_proto_hiddenattr (attrs);
+# define __hidden_proto2(type, name, thread, internal, attrs...) \
+ extern thread __typeof (type) name __asm__ (__hidden_asmname (#internal)) \
+ __hidden_proto_hiddenattr (attrs);
# define __hidden_asmname(name) \
__hidden_asmname1 (__USER_LABEL_PREFIX__, name)
# define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name)
@@ -606,6 +611,10 @@ for linking")
# define hidden_proto(name, attrs...)
# define hidden_tls_proto(name, attrs...)
# endif
+# define __hidden_proto2(type, name, thread, attrs...) \
+ extern thread __typeof (type) name __attribute__ ((visibility ("hidden"), ##attrs));
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2(type, name, , attrs)
# else
# define HIDDEN_JUMPTARGET(name) JUMPTARGET(name)
# endif /* Not __ASSEMBLER__ */
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index 75b9e0ee1e..da2f2463b6 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -27,29 +27,35 @@
#include <sys/wait.h>
#include <time.h>
-/* Non cancellable open syscall. */
-__typeof (open) __open_nocancel;
-
-/* Non cancellable open syscall (LFS version). */
-__typeof (open64) __open64_nocancel;
-
-/* Non cancellable openat syscall. */
-__typeof (openat) __openat_nocancel;
-
+#if IS_IN (libc) || IS_IN (rtld)
+/* Non cacellable open syscall (LFS version). */
+hidden_proto2 (open, __open_nocancel)
+/* Non cacellable open syscall (LFS version). */
+hidden_proto2 (open64, __open64_nocancel)
/* Non cacellable openat syscall (LFS version). */
-__typeof (openat64) __openat64_nocancel;
-
+hidden_proto2 (openat, __openat_nocancel)
+/* Non cacellable openat syscall (LFS version). */
+hidden_proto2 (openat64, __openat64_nocancel)
/* Non cancellable read syscall. */
-__typeof (__read) __read_nocancel;
-
+hidden_proto2 (read, __read_nocancel)
/* Non cancellable pread syscall (LFS version). */
-__typeof (__pread64) __pread64_nocancel;
-
+hidden_proto2 (pread64, __pread64_nocancel)
/* Uncancelable write. */
-__typeof (__write) __write_nocancel;
-
+hidden_proto2 (write, __write_nocancel)
/* Uncancelable close. */
-__typeof (__close) __close_nocancel;
+hidden_proto2 (close, __close_nocancel)
+/* Uncancelable fcntl. */
+hidden_proto2 (fcntl64, __fcntl64_nocancel)
+#else
+__typeof (open) __open_nocancel;
+__typeof (open64) __open64_nocancel;
+__typeof (openat) __openat_nocancel;
+__typeof (openat64) __openat64_nocancel;
+__typeof (read) __read_nocancel;
+__typeof (pread64) __pread64_nocancel;
+__typeof (write) __write_nocancel;
+__typeof (close) __close_nocancel;
+#endif
/* Non cancellable close syscall that does not also set errno in case of
failure. */
@@ -67,19 +73,4 @@ __writev_nocancel_nostatus (int fd, const struct iovec *iov, int iovcnt)
INTERNAL_SYSCALL_CALL (writev, fd, iov, iovcnt);
}
-/* Uncancelable fcntl. */
-__typeof (__fcntl) __fcntl64_nocancel;
-
-#if IS_IN (libc) || IS_IN (rtld)
-hidden_proto (__open_nocancel)
-hidden_proto (__open64_nocancel)
-hidden_proto (__openat_nocancel)
-hidden_proto (__openat64_nocancel)
-hidden_proto (__read_nocancel)
-hidden_proto (__pread64_nocancel)
-hidden_proto (__write_nocancel)
-hidden_proto (__close_nocancel)
-hidden_proto (__fcntl64_nocancel)
-#endif
-
#endif /* NOT_CANCEL_H */
^ permalink raw reply [flat|nested] 15+ messages in thread
* [glibc/azanella/clang] Rework not-cancel function prototypes
@ 2022-04-29 14:01 Adhemerval Zanella
0 siblings, 0 replies; 15+ messages in thread
From: Adhemerval Zanella @ 2022-04-29 14:01 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0db976f3a15cb7321def31320dbe1afefc0a3f26
commit 0db976f3a15cb7321def31320dbe1afefc0a3f26
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 8 16:41:14 2022 -0300
Rework not-cancel function prototypes
By adding a new hidden_proto2 macro.
Diff:
---
include/libc-symbols.h | 9 ++++++
sysdeps/unix/sysv/linux/not-cancel.h | 57 +++++++++++++++---------------------
2 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 4bb3d8c7ba..ac9a302cb6 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -534,11 +534,16 @@ for linking")
__attribute__ ((visibility ("hidden"), ##attrs))
# define hidden_proto(name, attrs...) \
__hidden_proto (name, , __GI_##name, ##attrs)
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2 (type, name, , __GI_##name, ##attrs)
# define hidden_tls_proto(name, attrs...) \
__hidden_proto (name, __thread, __GI_##name, ##attrs)
# define __hidden_proto(name, thread, internal, attrs...) \
extern thread __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
__hidden_proto_hiddenattr (attrs);
+# define __hidden_proto2(type, name, thread, internal, attrs...) \
+ extern thread __typeof (type) name __asm__ (__hidden_asmname (#internal)) \
+ __hidden_proto_hiddenattr (attrs);
# define __hidden_asmname(name) \
__hidden_asmname1 (__USER_LABEL_PREFIX__, name)
# define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name)
@@ -606,6 +611,10 @@ for linking")
# define hidden_proto(name, attrs...)
# define hidden_tls_proto(name, attrs...)
# endif
+# define __hidden_proto2(type, name, thread, attrs...) \
+ extern thread __typeof (type) name __attribute__ ((visibility ("hidden"), ##attrs));
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2(type, name, , attrs)
# else
# define HIDDEN_JUMPTARGET(name) JUMPTARGET(name)
# endif /* Not __ASSEMBLER__ */
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index 75b9e0ee1e..da2f2463b6 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -27,29 +27,35 @@
#include <sys/wait.h>
#include <time.h>
-/* Non cancellable open syscall. */
-__typeof (open) __open_nocancel;
-
-/* Non cancellable open syscall (LFS version). */
-__typeof (open64) __open64_nocancel;
-
-/* Non cancellable openat syscall. */
-__typeof (openat) __openat_nocancel;
-
+#if IS_IN (libc) || IS_IN (rtld)
+/* Non cacellable open syscall (LFS version). */
+hidden_proto2 (open, __open_nocancel)
+/* Non cacellable open syscall (LFS version). */
+hidden_proto2 (open64, __open64_nocancel)
/* Non cacellable openat syscall (LFS version). */
-__typeof (openat64) __openat64_nocancel;
-
+hidden_proto2 (openat, __openat_nocancel)
+/* Non cacellable openat syscall (LFS version). */
+hidden_proto2 (openat64, __openat64_nocancel)
/* Non cancellable read syscall. */
-__typeof (__read) __read_nocancel;
-
+hidden_proto2 (read, __read_nocancel)
/* Non cancellable pread syscall (LFS version). */
-__typeof (__pread64) __pread64_nocancel;
-
+hidden_proto2 (pread64, __pread64_nocancel)
/* Uncancelable write. */
-__typeof (__write) __write_nocancel;
-
+hidden_proto2 (write, __write_nocancel)
/* Uncancelable close. */
-__typeof (__close) __close_nocancel;
+hidden_proto2 (close, __close_nocancel)
+/* Uncancelable fcntl. */
+hidden_proto2 (fcntl64, __fcntl64_nocancel)
+#else
+__typeof (open) __open_nocancel;
+__typeof (open64) __open64_nocancel;
+__typeof (openat) __openat_nocancel;
+__typeof (openat64) __openat64_nocancel;
+__typeof (read) __read_nocancel;
+__typeof (pread64) __pread64_nocancel;
+__typeof (write) __write_nocancel;
+__typeof (close) __close_nocancel;
+#endif
/* Non cancellable close syscall that does not also set errno in case of
failure. */
@@ -67,19 +73,4 @@ __writev_nocancel_nostatus (int fd, const struct iovec *iov, int iovcnt)
INTERNAL_SYSCALL_CALL (writev, fd, iov, iovcnt);
}
-/* Uncancelable fcntl. */
-__typeof (__fcntl) __fcntl64_nocancel;
-
-#if IS_IN (libc) || IS_IN (rtld)
-hidden_proto (__open_nocancel)
-hidden_proto (__open64_nocancel)
-hidden_proto (__openat_nocancel)
-hidden_proto (__openat64_nocancel)
-hidden_proto (__read_nocancel)
-hidden_proto (__pread64_nocancel)
-hidden_proto (__write_nocancel)
-hidden_proto (__close_nocancel)
-hidden_proto (__fcntl64_nocancel)
-#endif
-
#endif /* NOT_CANCEL_H */
^ permalink raw reply [flat|nested] 15+ messages in thread
* [glibc/azanella/clang] Rework not-cancel function prototypes
@ 2022-03-31 19:04 Adhemerval Zanella
0 siblings, 0 replies; 15+ messages in thread
From: Adhemerval Zanella @ 2022-03-31 19:04 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=dd45b21b0232eaac8b58f67c468aa3580dc2c65b
commit dd45b21b0232eaac8b58f67c468aa3580dc2c65b
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 8 16:41:14 2022 -0300
Rework not-cancel function prototypes
By adding a new hidden_proto2 macro.
Diff:
---
include/libc-symbols.h | 9 ++++++
sysdeps/unix/sysv/linux/not-cancel.h | 57 +++++++++++++++---------------------
2 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 662bd118b1..f4c1312ba5 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -532,11 +532,16 @@ for linking")
__attribute__ ((visibility ("hidden"), ##attrs))
# define hidden_proto(name, attrs...) \
__hidden_proto (name, , __GI_##name, ##attrs)
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2 (type, name, , __GI_##name, ##attrs)
# define hidden_tls_proto(name, attrs...) \
__hidden_proto (name, __thread, __GI_##name, ##attrs)
# define __hidden_proto(name, thread, internal, attrs...) \
extern thread __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
__hidden_proto_hiddenattr (attrs);
+# define __hidden_proto2(type, name, thread, internal, attrs...) \
+ extern thread __typeof (type) name __asm__ (__hidden_asmname (#internal)) \
+ __hidden_proto_hiddenattr (attrs);
# define __hidden_asmname(name) \
__hidden_asmname1 (__USER_LABEL_PREFIX__, name)
# define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name)
@@ -604,6 +609,10 @@ for linking")
# define hidden_proto(name, attrs...)
# define hidden_tls_proto(name, attrs...)
# endif
+# define __hidden_proto2(type, name, thread, attrs...) \
+ extern thread __typeof (type) name __attribute__ ((visibility ("hidden"), ##attrs));
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2(type, name, , attrs)
# else
# define HIDDEN_JUMPTARGET(name) JUMPTARGET(name)
# endif /* Not __ASSEMBLER__ */
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index 75b9e0ee1e..da2f2463b6 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -27,29 +27,35 @@
#include <sys/wait.h>
#include <time.h>
-/* Non cancellable open syscall. */
-__typeof (open) __open_nocancel;
-
-/* Non cancellable open syscall (LFS version). */
-__typeof (open64) __open64_nocancel;
-
-/* Non cancellable openat syscall. */
-__typeof (openat) __openat_nocancel;
-
+#if IS_IN (libc) || IS_IN (rtld)
+/* Non cacellable open syscall (LFS version). */
+hidden_proto2 (open, __open_nocancel)
+/* Non cacellable open syscall (LFS version). */
+hidden_proto2 (open64, __open64_nocancel)
/* Non cacellable openat syscall (LFS version). */
-__typeof (openat64) __openat64_nocancel;
-
+hidden_proto2 (openat, __openat_nocancel)
+/* Non cacellable openat syscall (LFS version). */
+hidden_proto2 (openat64, __openat64_nocancel)
/* Non cancellable read syscall. */
-__typeof (__read) __read_nocancel;
-
+hidden_proto2 (read, __read_nocancel)
/* Non cancellable pread syscall (LFS version). */
-__typeof (__pread64) __pread64_nocancel;
-
+hidden_proto2 (pread64, __pread64_nocancel)
/* Uncancelable write. */
-__typeof (__write) __write_nocancel;
-
+hidden_proto2 (write, __write_nocancel)
/* Uncancelable close. */
-__typeof (__close) __close_nocancel;
+hidden_proto2 (close, __close_nocancel)
+/* Uncancelable fcntl. */
+hidden_proto2 (fcntl64, __fcntl64_nocancel)
+#else
+__typeof (open) __open_nocancel;
+__typeof (open64) __open64_nocancel;
+__typeof (openat) __openat_nocancel;
+__typeof (openat64) __openat64_nocancel;
+__typeof (read) __read_nocancel;
+__typeof (pread64) __pread64_nocancel;
+__typeof (write) __write_nocancel;
+__typeof (close) __close_nocancel;
+#endif
/* Non cancellable close syscall that does not also set errno in case of
failure. */
@@ -67,19 +73,4 @@ __writev_nocancel_nostatus (int fd, const struct iovec *iov, int iovcnt)
INTERNAL_SYSCALL_CALL (writev, fd, iov, iovcnt);
}
-/* Uncancelable fcntl. */
-__typeof (__fcntl) __fcntl64_nocancel;
-
-#if IS_IN (libc) || IS_IN (rtld)
-hidden_proto (__open_nocancel)
-hidden_proto (__open64_nocancel)
-hidden_proto (__openat_nocancel)
-hidden_proto (__openat64_nocancel)
-hidden_proto (__read_nocancel)
-hidden_proto (__pread64_nocancel)
-hidden_proto (__write_nocancel)
-hidden_proto (__close_nocancel)
-hidden_proto (__fcntl64_nocancel)
-#endif
-
#endif /* NOT_CANCEL_H */
^ permalink raw reply [flat|nested] 15+ messages in thread
* [glibc/azanella/clang] Rework not-cancel function prototypes
@ 2022-03-29 20:27 Adhemerval Zanella
0 siblings, 0 replies; 15+ messages in thread
From: Adhemerval Zanella @ 2022-03-29 20:27 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=89cae9d269e714ecee374be48deb1e78a2ccb2ba
commit 89cae9d269e714ecee374be48deb1e78a2ccb2ba
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 8 16:41:14 2022 -0300
Rework not-cancel function prototypes
By adding a new hidden_proto2 macro.
Diff:
---
include/libc-symbols.h | 9 ++++++
sysdeps/unix/sysv/linux/not-cancel.h | 57 +++++++++++++++---------------------
2 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 662bd118b1..f4c1312ba5 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -532,11 +532,16 @@ for linking")
__attribute__ ((visibility ("hidden"), ##attrs))
# define hidden_proto(name, attrs...) \
__hidden_proto (name, , __GI_##name, ##attrs)
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2 (type, name, , __GI_##name, ##attrs)
# define hidden_tls_proto(name, attrs...) \
__hidden_proto (name, __thread, __GI_##name, ##attrs)
# define __hidden_proto(name, thread, internal, attrs...) \
extern thread __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
__hidden_proto_hiddenattr (attrs);
+# define __hidden_proto2(type, name, thread, internal, attrs...) \
+ extern thread __typeof (type) name __asm__ (__hidden_asmname (#internal)) \
+ __hidden_proto_hiddenattr (attrs);
# define __hidden_asmname(name) \
__hidden_asmname1 (__USER_LABEL_PREFIX__, name)
# define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name)
@@ -604,6 +609,10 @@ for linking")
# define hidden_proto(name, attrs...)
# define hidden_tls_proto(name, attrs...)
# endif
+# define __hidden_proto2(type, name, thread, attrs...) \
+ extern thread __typeof (type) name __attribute__ ((visibility ("hidden"), ##attrs));
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2(type, name, , attrs)
# else
# define HIDDEN_JUMPTARGET(name) JUMPTARGET(name)
# endif /* Not __ASSEMBLER__ */
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index 75b9e0ee1e..da2f2463b6 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -27,29 +27,35 @@
#include <sys/wait.h>
#include <time.h>
-/* Non cancellable open syscall. */
-__typeof (open) __open_nocancel;
-
-/* Non cancellable open syscall (LFS version). */
-__typeof (open64) __open64_nocancel;
-
-/* Non cancellable openat syscall. */
-__typeof (openat) __openat_nocancel;
-
+#if IS_IN (libc) || IS_IN (rtld)
+/* Non cacellable open syscall (LFS version). */
+hidden_proto2 (open, __open_nocancel)
+/* Non cacellable open syscall (LFS version). */
+hidden_proto2 (open64, __open64_nocancel)
/* Non cacellable openat syscall (LFS version). */
-__typeof (openat64) __openat64_nocancel;
-
+hidden_proto2 (openat, __openat_nocancel)
+/* Non cacellable openat syscall (LFS version). */
+hidden_proto2 (openat64, __openat64_nocancel)
/* Non cancellable read syscall. */
-__typeof (__read) __read_nocancel;
-
+hidden_proto2 (read, __read_nocancel)
/* Non cancellable pread syscall (LFS version). */
-__typeof (__pread64) __pread64_nocancel;
-
+hidden_proto2 (pread64, __pread64_nocancel)
/* Uncancelable write. */
-__typeof (__write) __write_nocancel;
-
+hidden_proto2 (write, __write_nocancel)
/* Uncancelable close. */
-__typeof (__close) __close_nocancel;
+hidden_proto2 (close, __close_nocancel)
+/* Uncancelable fcntl. */
+hidden_proto2 (fcntl64, __fcntl64_nocancel)
+#else
+__typeof (open) __open_nocancel;
+__typeof (open64) __open64_nocancel;
+__typeof (openat) __openat_nocancel;
+__typeof (openat64) __openat64_nocancel;
+__typeof (read) __read_nocancel;
+__typeof (pread64) __pread64_nocancel;
+__typeof (write) __write_nocancel;
+__typeof (close) __close_nocancel;
+#endif
/* Non cancellable close syscall that does not also set errno in case of
failure. */
@@ -67,19 +73,4 @@ __writev_nocancel_nostatus (int fd, const struct iovec *iov, int iovcnt)
INTERNAL_SYSCALL_CALL (writev, fd, iov, iovcnt);
}
-/* Uncancelable fcntl. */
-__typeof (__fcntl) __fcntl64_nocancel;
-
-#if IS_IN (libc) || IS_IN (rtld)
-hidden_proto (__open_nocancel)
-hidden_proto (__open64_nocancel)
-hidden_proto (__openat_nocancel)
-hidden_proto (__openat64_nocancel)
-hidden_proto (__read_nocancel)
-hidden_proto (__pread64_nocancel)
-hidden_proto (__write_nocancel)
-hidden_proto (__close_nocancel)
-hidden_proto (__fcntl64_nocancel)
-#endif
-
#endif /* NOT_CANCEL_H */
^ permalink raw reply [flat|nested] 15+ messages in thread
* [glibc/azanella/clang] Rework not-cancel function prototypes
@ 2022-03-16 17:59 Adhemerval Zanella
0 siblings, 0 replies; 15+ messages in thread
From: Adhemerval Zanella @ 2022-03-16 17:59 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=03f19222d5253038ee02b566ee0b6ef84e6c8e7c
commit 03f19222d5253038ee02b566ee0b6ef84e6c8e7c
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 8 16:41:14 2022 -0300
Rework not-cancel function prototypes
By adding a new hidden_proto2 macro.
Diff:
---
include/libc-symbols.h | 9 +++++++++
sysdeps/unix/sysv/linux/not-cancel.h | 36 +++++++++++++++---------------------
2 files changed, 24 insertions(+), 21 deletions(-)
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 662bd118b1..f4c1312ba5 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -532,11 +532,16 @@ for linking")
__attribute__ ((visibility ("hidden"), ##attrs))
# define hidden_proto(name, attrs...) \
__hidden_proto (name, , __GI_##name, ##attrs)
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2 (type, name, , __GI_##name, ##attrs)
# define hidden_tls_proto(name, attrs...) \
__hidden_proto (name, __thread, __GI_##name, ##attrs)
# define __hidden_proto(name, thread, internal, attrs...) \
extern thread __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
__hidden_proto_hiddenattr (attrs);
+# define __hidden_proto2(type, name, thread, internal, attrs...) \
+ extern thread __typeof (type) name __asm__ (__hidden_asmname (#internal)) \
+ __hidden_proto_hiddenattr (attrs);
# define __hidden_asmname(name) \
__hidden_asmname1 (__USER_LABEL_PREFIX__, name)
# define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name)
@@ -604,6 +609,10 @@ for linking")
# define hidden_proto(name, attrs...)
# define hidden_tls_proto(name, attrs...)
# endif
+# define __hidden_proto2(type, name, thread, attrs...) \
+ extern thread __typeof (type) name __attribute__ ((visibility ("hidden"), ##attrs));
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2(type, name, , attrs)
# else
# define HIDDEN_JUMPTARGET(name) JUMPTARGET(name)
# endif /* Not __ASSEMBLER__ */
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index 6c0491bde3..5887cb4106 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -27,20 +27,26 @@
#include <sys/wait.h>
#include <time.h>
+#if IS_IN (libc) || IS_IN (rtld)
/* Non cacellable openat syscall (LFS version). */
-__typeof (openat64) __openat64_nocancel;
-
+hidden_proto2 (openat64, __openat64_nocancel)
/* Non cancellable read syscall. */
-__typeof (__read) __read_nocancel;
-
+hidden_proto2 (read, __read_nocancel)
/* Non cancellable pread syscall (LFS version). */
-__typeof (__pread64) __pread64_nocancel;
-
+hidden_proto2 (pread64, __pread64_nocancel)
/* Uncancelable write. */
-__typeof (__write) __write_nocancel;
-
+hidden_proto2 (write, __write_nocancel)
/* Uncancelable close. */
-__typeof (__close) __close_nocancel;
+hidden_proto2 (close, __close_nocancel)
+/* Uncancelable fcntl. */
+hidden_proto2 (fcntl64, __fcntl64_nocancel)
+#else
+__typeof (openat64) __openat64_nocancel;
+__typeof (read) __read_nocancel;
+__typeof (pread64) __pread64_nocancel;
+__typeof (write) __write_nocancel;
+__typeof (close) __close_nocancel;
+#endif
#define __open64_nocancel(args...) \
__openat64_nocancel (AT_FDCWD, args)
@@ -61,16 +67,4 @@ __writev_nocancel_nostatus (int fd, const struct iovec *iov, int iovcnt)
INTERNAL_SYSCALL_CALL (writev, fd, iov, iovcnt);
}
-/* Uncancelable fcntl. */
-__typeof (__fcntl) __fcntl64_nocancel;
-
-#if IS_IN (libc) || IS_IN (rtld)
-hidden_proto (__openat64_nocancel)
-hidden_proto (__read_nocancel)
-hidden_proto (__pread64_nocancel)
-hidden_proto (__write_nocancel)
-hidden_proto (__close_nocancel)
-hidden_proto (__fcntl64_nocancel)
-#endif
-
#endif /* NOT_CANCEL_H */
^ permalink raw reply [flat|nested] 15+ messages in thread
* [glibc/azanella/clang] Rework not-cancel function prototypes
@ 2022-03-15 18:37 Adhemerval Zanella
0 siblings, 0 replies; 15+ messages in thread
From: Adhemerval Zanella @ 2022-03-15 18:37 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=03f19222d5253038ee02b566ee0b6ef84e6c8e7c
commit 03f19222d5253038ee02b566ee0b6ef84e6c8e7c
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 8 16:41:14 2022 -0300
Rework not-cancel function prototypes
By adding a new hidden_proto2 macro.
Diff:
---
include/libc-symbols.h | 9 +++++++++
sysdeps/unix/sysv/linux/not-cancel.h | 36 +++++++++++++++---------------------
2 files changed, 24 insertions(+), 21 deletions(-)
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 662bd118b1..f4c1312ba5 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -532,11 +532,16 @@ for linking")
__attribute__ ((visibility ("hidden"), ##attrs))
# define hidden_proto(name, attrs...) \
__hidden_proto (name, , __GI_##name, ##attrs)
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2 (type, name, , __GI_##name, ##attrs)
# define hidden_tls_proto(name, attrs...) \
__hidden_proto (name, __thread, __GI_##name, ##attrs)
# define __hidden_proto(name, thread, internal, attrs...) \
extern thread __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
__hidden_proto_hiddenattr (attrs);
+# define __hidden_proto2(type, name, thread, internal, attrs...) \
+ extern thread __typeof (type) name __asm__ (__hidden_asmname (#internal)) \
+ __hidden_proto_hiddenattr (attrs);
# define __hidden_asmname(name) \
__hidden_asmname1 (__USER_LABEL_PREFIX__, name)
# define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name)
@@ -604,6 +609,10 @@ for linking")
# define hidden_proto(name, attrs...)
# define hidden_tls_proto(name, attrs...)
# endif
+# define __hidden_proto2(type, name, thread, attrs...) \
+ extern thread __typeof (type) name __attribute__ ((visibility ("hidden"), ##attrs));
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2(type, name, , attrs)
# else
# define HIDDEN_JUMPTARGET(name) JUMPTARGET(name)
# endif /* Not __ASSEMBLER__ */
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index 6c0491bde3..5887cb4106 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -27,20 +27,26 @@
#include <sys/wait.h>
#include <time.h>
+#if IS_IN (libc) || IS_IN (rtld)
/* Non cacellable openat syscall (LFS version). */
-__typeof (openat64) __openat64_nocancel;
-
+hidden_proto2 (openat64, __openat64_nocancel)
/* Non cancellable read syscall. */
-__typeof (__read) __read_nocancel;
-
+hidden_proto2 (read, __read_nocancel)
/* Non cancellable pread syscall (LFS version). */
-__typeof (__pread64) __pread64_nocancel;
-
+hidden_proto2 (pread64, __pread64_nocancel)
/* Uncancelable write. */
-__typeof (__write) __write_nocancel;
-
+hidden_proto2 (write, __write_nocancel)
/* Uncancelable close. */
-__typeof (__close) __close_nocancel;
+hidden_proto2 (close, __close_nocancel)
+/* Uncancelable fcntl. */
+hidden_proto2 (fcntl64, __fcntl64_nocancel)
+#else
+__typeof (openat64) __openat64_nocancel;
+__typeof (read) __read_nocancel;
+__typeof (pread64) __pread64_nocancel;
+__typeof (write) __write_nocancel;
+__typeof (close) __close_nocancel;
+#endif
#define __open64_nocancel(args...) \
__openat64_nocancel (AT_FDCWD, args)
@@ -61,16 +67,4 @@ __writev_nocancel_nostatus (int fd, const struct iovec *iov, int iovcnt)
INTERNAL_SYSCALL_CALL (writev, fd, iov, iovcnt);
}
-/* Uncancelable fcntl. */
-__typeof (__fcntl) __fcntl64_nocancel;
-
-#if IS_IN (libc) || IS_IN (rtld)
-hidden_proto (__openat64_nocancel)
-hidden_proto (__read_nocancel)
-hidden_proto (__pread64_nocancel)
-hidden_proto (__write_nocancel)
-hidden_proto (__close_nocancel)
-hidden_proto (__fcntl64_nocancel)
-#endif
-
#endif /* NOT_CANCEL_H */
^ permalink raw reply [flat|nested] 15+ messages in thread
* [glibc/azanella/clang] Rework not-cancel function prototypes
@ 2022-03-11 17:21 Adhemerval Zanella
0 siblings, 0 replies; 15+ messages in thread
From: Adhemerval Zanella @ 2022-03-11 17:21 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=cffa71d8b6bbce362d75bd268a7824ef27a3e266
commit cffa71d8b6bbce362d75bd268a7824ef27a3e266
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 8 16:41:14 2022 -0300
Rework not-cancel function prototypes
By adding a new hidden_proto2 macro.
Diff:
---
include/libc-symbols.h | 9 +++++++++
sysdeps/unix/sysv/linux/not-cancel.h | 36 +++++++++++++++---------------------
2 files changed, 24 insertions(+), 21 deletions(-)
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 662bd118b1..f4c1312ba5 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -532,11 +532,16 @@ for linking")
__attribute__ ((visibility ("hidden"), ##attrs))
# define hidden_proto(name, attrs...) \
__hidden_proto (name, , __GI_##name, ##attrs)
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2 (type, name, , __GI_##name, ##attrs)
# define hidden_tls_proto(name, attrs...) \
__hidden_proto (name, __thread, __GI_##name, ##attrs)
# define __hidden_proto(name, thread, internal, attrs...) \
extern thread __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
__hidden_proto_hiddenattr (attrs);
+# define __hidden_proto2(type, name, thread, internal, attrs...) \
+ extern thread __typeof (type) name __asm__ (__hidden_asmname (#internal)) \
+ __hidden_proto_hiddenattr (attrs);
# define __hidden_asmname(name) \
__hidden_asmname1 (__USER_LABEL_PREFIX__, name)
# define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name)
@@ -604,6 +609,10 @@ for linking")
# define hidden_proto(name, attrs...)
# define hidden_tls_proto(name, attrs...)
# endif
+# define __hidden_proto2(type, name, thread, attrs...) \
+ extern thread __typeof (type) name __attribute__ ((visibility ("hidden"), ##attrs));
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2(type, name, , attrs)
# else
# define HIDDEN_JUMPTARGET(name) JUMPTARGET(name)
# endif /* Not __ASSEMBLER__ */
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index 6c0491bde3..5887cb4106 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -27,20 +27,26 @@
#include <sys/wait.h>
#include <time.h>
+#if IS_IN (libc) || IS_IN (rtld)
/* Non cacellable openat syscall (LFS version). */
-__typeof (openat64) __openat64_nocancel;
-
+hidden_proto2 (openat64, __openat64_nocancel)
/* Non cancellable read syscall. */
-__typeof (__read) __read_nocancel;
-
+hidden_proto2 (read, __read_nocancel)
/* Non cancellable pread syscall (LFS version). */
-__typeof (__pread64) __pread64_nocancel;
-
+hidden_proto2 (pread64, __pread64_nocancel)
/* Uncancelable write. */
-__typeof (__write) __write_nocancel;
-
+hidden_proto2 (write, __write_nocancel)
/* Uncancelable close. */
-__typeof (__close) __close_nocancel;
+hidden_proto2 (close, __close_nocancel)
+/* Uncancelable fcntl. */
+hidden_proto2 (fcntl64, __fcntl64_nocancel)
+#else
+__typeof (openat64) __openat64_nocancel;
+__typeof (read) __read_nocancel;
+__typeof (pread64) __pread64_nocancel;
+__typeof (write) __write_nocancel;
+__typeof (close) __close_nocancel;
+#endif
#define __open64_nocancel(args...) \
__openat64_nocancel (AT_FDCWD, args)
@@ -61,16 +67,4 @@ __writev_nocancel_nostatus (int fd, const struct iovec *iov, int iovcnt)
INTERNAL_SYSCALL_CALL (writev, fd, iov, iovcnt);
}
-/* Uncancelable fcntl. */
-__typeof (__fcntl) __fcntl64_nocancel;
-
-#if IS_IN (libc) || IS_IN (rtld)
-hidden_proto (__openat64_nocancel)
-hidden_proto (__read_nocancel)
-hidden_proto (__pread64_nocancel)
-hidden_proto (__write_nocancel)
-hidden_proto (__close_nocancel)
-hidden_proto (__fcntl64_nocancel)
-#endif
-
#endif /* NOT_CANCEL_H */
^ permalink raw reply [flat|nested] 15+ messages in thread
* [glibc/azanella/clang] Rework not-cancel function prototypes
@ 2022-03-10 19:20 Adhemerval Zanella
0 siblings, 0 replies; 15+ messages in thread
From: Adhemerval Zanella @ 2022-03-10 19:20 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ad643fff57db9e1170a2fc09d95eece07037ae72
commit ad643fff57db9e1170a2fc09d95eece07037ae72
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Mar 8 16:41:14 2022 -0300
Rework not-cancel function prototypes
By adding a new hidden_proto2 macro.
Diff:
---
include/libc-symbols.h | 9 +++++++++
sysdeps/unix/sysv/linux/not-cancel.h | 36 +++++++++++++++---------------------
2 files changed, 24 insertions(+), 21 deletions(-)
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 662bd118b1..f4c1312ba5 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -532,11 +532,16 @@ for linking")
__attribute__ ((visibility ("hidden"), ##attrs))
# define hidden_proto(name, attrs...) \
__hidden_proto (name, , __GI_##name, ##attrs)
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2 (type, name, , __GI_##name, ##attrs)
# define hidden_tls_proto(name, attrs...) \
__hidden_proto (name, __thread, __GI_##name, ##attrs)
# define __hidden_proto(name, thread, internal, attrs...) \
extern thread __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
__hidden_proto_hiddenattr (attrs);
+# define __hidden_proto2(type, name, thread, internal, attrs...) \
+ extern thread __typeof (type) name __asm__ (__hidden_asmname (#internal)) \
+ __hidden_proto_hiddenattr (attrs);
# define __hidden_asmname(name) \
__hidden_asmname1 (__USER_LABEL_PREFIX__, name)
# define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name)
@@ -604,6 +609,10 @@ for linking")
# define hidden_proto(name, attrs...)
# define hidden_tls_proto(name, attrs...)
# endif
+# define __hidden_proto2(type, name, thread, attrs...) \
+ extern thread __typeof (type) name __attribute__ ((visibility ("hidden"), ##attrs));
+# define hidden_proto2(type, name, attrs...) \
+ __hidden_proto2(type, name, , attrs)
# else
# define HIDDEN_JUMPTARGET(name) JUMPTARGET(name)
# endif /* Not __ASSEMBLER__ */
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index 6c0491bde3..5887cb4106 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -27,20 +27,26 @@
#include <sys/wait.h>
#include <time.h>
+#if IS_IN (libc) || IS_IN (rtld)
/* Non cacellable openat syscall (LFS version). */
-__typeof (openat64) __openat64_nocancel;
-
+hidden_proto2 (openat64, __openat64_nocancel)
/* Non cancellable read syscall. */
-__typeof (__read) __read_nocancel;
-
+hidden_proto2 (read, __read_nocancel)
/* Non cancellable pread syscall (LFS version). */
-__typeof (__pread64) __pread64_nocancel;
-
+hidden_proto2 (pread64, __pread64_nocancel)
/* Uncancelable write. */
-__typeof (__write) __write_nocancel;
-
+hidden_proto2 (write, __write_nocancel)
/* Uncancelable close. */
-__typeof (__close) __close_nocancel;
+hidden_proto2 (close, __close_nocancel)
+/* Uncancelable fcntl. */
+hidden_proto2 (fcntl64, __fcntl64_nocancel)
+#else
+__typeof (openat64) __openat64_nocancel;
+__typeof (read) __read_nocancel;
+__typeof (pread64) __pread64_nocancel;
+__typeof (write) __write_nocancel;
+__typeof (close) __close_nocancel;
+#endif
#define __open64_nocancel(args...) \
__openat64_nocancel (AT_FDCWD, args)
@@ -61,16 +67,4 @@ __writev_nocancel_nostatus (int fd, const struct iovec *iov, int iovcnt)
INTERNAL_SYSCALL_CALL (writev, fd, iov, iovcnt);
}
-/* Uncancelable fcntl. */
-__typeof (__fcntl) __fcntl64_nocancel;
-
-#if IS_IN (libc) || IS_IN (rtld)
-hidden_proto (__openat64_nocancel)
-hidden_proto (__read_nocancel)
-hidden_proto (__pread64_nocancel)
-hidden_proto (__write_nocancel)
-hidden_proto (__close_nocancel)
-hidden_proto (__fcntl64_nocancel)
-#endif
-
#endif /* NOT_CANCEL_H */
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2022-10-04 12:56 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-04 12:52 [glibc/azanella/clang] Rework not-cancel function prototypes Adhemerval Zanella
-- strict thread matches above, loose matches on Subject: below --
2022-10-04 12:56 Adhemerval Zanella
2022-06-09 21:18 Adhemerval Zanella
2022-06-09 13:14 Adhemerval Zanella
2022-06-03 14:03 Adhemerval Zanella
2022-05-13 14:17 Adhemerval Zanella
2022-05-12 19:31 Adhemerval Zanella
2022-05-10 18:21 Adhemerval Zanella
2022-04-29 14:01 Adhemerval Zanella
2022-03-31 19:04 Adhemerval Zanella
2022-03-29 20:27 Adhemerval Zanella
2022-03-16 17:59 Adhemerval Zanella
2022-03-15 18:37 Adhemerval Zanella
2022-03-11 17:21 Adhemerval Zanella
2022-03-10 19:20 Adhemerval Zanella
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).