mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-05 19:35:52 +03:00
Update.
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also defined symbol for entry point to avoid cancellation. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO): Likewise. * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel, __close_nocancel, __read_nocancel, __write_nocancel, __waitpid_nocancel): Add attribute_hidden. If not in libc.so, libpthread.so or librt.so, define to corresponding function without _nocancel suffix. * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file. * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file. * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
This commit is contained in:
@@ -1,5 +1,26 @@
|
|||||||
2003-09-02 Jakub Jelinek <jakub@redhat.com>
|
2003-09-02 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
|
||||||
|
defined symbol for entry point to avoid cancellation.
|
||||||
|
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
|
||||||
|
Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
|
||||||
|
Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
|
||||||
|
Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
|
||||||
|
Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
|
||||||
|
Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
|
||||||
|
__close_nocancel, __read_nocancel, __write_nocancel,
|
||||||
|
__waitpid_nocancel): Add attribute_hidden. If not in libc.so,
|
||||||
|
libpthread.so or librt.so, define to corresponding function
|
||||||
|
without _nocancel suffix.
|
||||||
|
* sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
|
||||||
|
* sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
|
||||||
|
* sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
|
* sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
|
||||||
|
|
||||||
2003-09-02 Ulrich Drepper <drepper@redhat.com>
|
2003-09-02 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* Uncancelable versions of cancelable interfaces. Linux version.
|
/* Uncancelable versions of cancelable interfaces. Linux/NPTL version.
|
||||||
Copyright (C) 2003 Free Software Foundation, Inc.
|
Copyright (C) 2003 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
|
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
|
||||||
@@ -20,15 +20,28 @@
|
|||||||
|
|
||||||
#include <sysdep.h>
|
#include <sysdep.h>
|
||||||
|
|
||||||
|
#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
|
||||||
|
extern int __open_nocancel (const char *, int, ...) attribute_hidden;
|
||||||
|
extern int __close_nocancel (int) attribute_hidden;
|
||||||
|
extern int __read_nocancel (int, void *, size_t) attribute_hidden;
|
||||||
|
extern int __write_nocancel (int, const void *, size_t) attribute_hidden;
|
||||||
|
extern pid_t __waitpid_nocancel (pid_t, int *, int) attribute_hidden;
|
||||||
|
#else
|
||||||
|
#define __open_nocancel(name, ...) __open (name, __VA_ARGS__)
|
||||||
|
#define __close_nocancel(fd) __close (fd)
|
||||||
|
#define __read_nocancel(fd, buf, len) __read (fd, buf, len)
|
||||||
|
#define __write_nocancel(fd, buf, len) __write (fd, buf, len)
|
||||||
|
#define __waitpid_nocancel(pid, stat_loc, options) \
|
||||||
|
__waitpid (pid, stat_loc, options)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Uncancelable open. */
|
/* Uncancelable open. */
|
||||||
extern int __open_nocancel (const char *, int, ...);
|
|
||||||
#define open_not_cancel(name, flags, mode) \
|
#define open_not_cancel(name, flags, mode) \
|
||||||
__open_nocancel (name, flags, mode)
|
__open_nocancel (name, flags, mode)
|
||||||
#define open_not_cancel_2(name, flags) \
|
#define open_not_cancel_2(name, flags) \
|
||||||
__open_nocancel (name, flags)
|
__open_nocancel (name, flags)
|
||||||
|
|
||||||
/* Uncancelable close. */
|
/* Uncancelable close. */
|
||||||
extern int __close_nocancel (int);
|
|
||||||
#define close_not_cancel(fd) \
|
#define close_not_cancel(fd) \
|
||||||
__close_nocancel (fd)
|
__close_nocancel (fd)
|
||||||
#define close_not_cancel_no_status(fd) \
|
#define close_not_cancel_no_status(fd) \
|
||||||
@@ -36,12 +49,10 @@ extern int __close_nocancel (int);
|
|||||||
INTERNAL_SYSCALL (close, err, 1, (fd)); })
|
INTERNAL_SYSCALL (close, err, 1, (fd)); })
|
||||||
|
|
||||||
/* Uncancelable read. */
|
/* Uncancelable read. */
|
||||||
extern int __read_nocancel (int, void *, size_t);
|
|
||||||
#define read_not_cancel(fd, buf, n) \
|
#define read_not_cancel(fd, buf, n) \
|
||||||
__read_nocancel (fd, buf, n)
|
__read_nocancel (fd, buf, n)
|
||||||
|
|
||||||
/* Uncancelable write. */
|
/* Uncancelable write. */
|
||||||
extern int __write_nocancel (int, const void *, size_t);
|
|
||||||
#define write_not_cancel(fd, buf, n) \
|
#define write_not_cancel(fd, buf, n) \
|
||||||
__write_nocancel (fd, buf, n)
|
__write_nocancel (fd, buf, n)
|
||||||
|
|
||||||
@@ -52,7 +63,6 @@ extern int __write_nocancel (int, const void *, size_t);
|
|||||||
|
|
||||||
/* Uncancelable waitpid. */
|
/* Uncancelable waitpid. */
|
||||||
#ifdef __NR_waitpid
|
#ifdef __NR_waitpid
|
||||||
extern pid_t __waitpid_nocancel (pid_t, int *, int);
|
|
||||||
# define waitpid_not_cancel(pid, stat_loc, options) \
|
# define waitpid_not_cancel(pid, stat_loc, options) \
|
||||||
__waitpid_nocancel (pid, stat_loc, options)
|
__waitpid_nocancel (pid, stat_loc, options)
|
||||||
#else
|
#else
|
||||||
|
1
nptl/sysdeps/unix/sysv/linux/powerpc/not-cancel.h
Normal file
1
nptl/sysdeps/unix/sysv/linux/powerpc/not-cancel.h
Normal file
@@ -0,0 +1 @@
|
|||||||
|
#include "../i386/not-cancel.h"
|
@@ -33,8 +33,12 @@
|
|||||||
cfi_startproc; \
|
cfi_startproc; \
|
||||||
SINGLE_THREAD_P; \
|
SINGLE_THREAD_P; \
|
||||||
bne- .Lpseudo_cancel; \
|
bne- .Lpseudo_cancel; \
|
||||||
|
.type __##syscall_name##_nocancel,@function; \
|
||||||
|
.globl __##syscall_name##_nocancel; \
|
||||||
|
__##syscall_name##_nocancel: \
|
||||||
DO_CALL (SYS_ify (syscall_name)); \
|
DO_CALL (SYS_ify (syscall_name)); \
|
||||||
PSEUDO_RET; \
|
PSEUDO_RET; \
|
||||||
|
.size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \
|
||||||
.Lpseudo_cancel: \
|
.Lpseudo_cancel: \
|
||||||
stwu 1,-48(1); \
|
stwu 1,-48(1); \
|
||||||
cfi_adjust_cfa_offset (48); \
|
cfi_adjust_cfa_offset (48); \
|
||||||
|
@@ -33,8 +33,12 @@
|
|||||||
cfi_startproc; \
|
cfi_startproc; \
|
||||||
SINGLE_THREAD_P; \
|
SINGLE_THREAD_P; \
|
||||||
bne- .Lpseudo_cancel; \
|
bne- .Lpseudo_cancel; \
|
||||||
|
.type .__##syscall_name##_nocancel,@function; \
|
||||||
|
.globl .__##syscall_name##_nocancel; \
|
||||||
|
.__##syscall_name##_nocancel: \
|
||||||
DO_CALL (SYS_ify (syscall_name)); \
|
DO_CALL (SYS_ify (syscall_name)); \
|
||||||
PSEUDO_RET; \
|
PSEUDO_RET; \
|
||||||
|
.size .__##syscall_name##_nocancel,.-.__##syscall_name##_nocancel; \
|
||||||
.Lpseudo_cancel: \
|
.Lpseudo_cancel: \
|
||||||
stdu 1,-128(1); \
|
stdu 1,-128(1); \
|
||||||
cfi_adjust_cfa_offset (128); \
|
cfi_adjust_cfa_offset (128); \
|
||||||
|
1
nptl/sysdeps/unix/sysv/linux/s390/not-cancel.h
Normal file
1
nptl/sysdeps/unix/sysv/linux/s390/not-cancel.h
Normal file
@@ -0,0 +1 @@
|
|||||||
|
#include "../i386/not-cancel.h"
|
@@ -59,11 +59,15 @@ L(pseudo_cancel): \
|
|||||||
ENTRY(name) \
|
ENTRY(name) \
|
||||||
SINGLE_THREAD_P(%r1) \
|
SINGLE_THREAD_P(%r1) \
|
||||||
jne L(pseudo_cancel); \
|
jne L(pseudo_cancel); \
|
||||||
|
.type __##syscall_name##_nocancel,@function; \
|
||||||
|
.globl __##syscall_name##_nocancel; \
|
||||||
|
__##syscall_name##_nocancel: \
|
||||||
DO_CALL(syscall_name, args); \
|
DO_CALL(syscall_name, args); \
|
||||||
L(pseudo_check): \
|
L(pseudo_check): \
|
||||||
lhi %r4,-4095; \
|
lhi %r4,-4095; \
|
||||||
clr %r2,%r4; \
|
clr %r2,%r4; \
|
||||||
jnl SYSCALL_ERROR_LABEL; \
|
jnl SYSCALL_ERROR_LABEL; \
|
||||||
|
.size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \
|
||||||
L(pseudo_end):
|
L(pseudo_end):
|
||||||
|
|
||||||
# ifdef IS_IN_libpthread
|
# ifdef IS_IN_libpthread
|
||||||
|
@@ -53,11 +53,15 @@ L(pseudo_cancel): \
|
|||||||
ENTRY(name) \
|
ENTRY(name) \
|
||||||
SINGLE_THREAD_P \
|
SINGLE_THREAD_P \
|
||||||
jne L(pseudo_cancel); \
|
jne L(pseudo_cancel); \
|
||||||
|
.type __##syscall_name##_nocancel,@function; \
|
||||||
|
.globl __##syscall_name##_nocancel; \
|
||||||
|
__##syscall_name##_nocancel: \
|
||||||
DO_CALL(syscall_name, args); \
|
DO_CALL(syscall_name, args); \
|
||||||
L(pseudo_check): \
|
L(pseudo_check): \
|
||||||
lghi %r4,-4095; \
|
lghi %r4,-4095; \
|
||||||
clgr %r2,%r4; \
|
clgr %r2,%r4; \
|
||||||
jgnl SYSCALL_ERROR_LABEL; \
|
jgnl SYSCALL_ERROR_LABEL; \
|
||||||
|
.size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \
|
||||||
L(pseudo_end):
|
L(pseudo_end):
|
||||||
|
|
||||||
# ifdef IS_IN_libpthread
|
# ifdef IS_IN_libpthread
|
||||||
|
1
nptl/sysdeps/unix/sysv/linux/sparc/not-cancel.h
Normal file
1
nptl/sysdeps/unix/sysv/linux/sparc/not-cancel.h
Normal file
@@ -0,0 +1 @@
|
|||||||
|
#include "../i386/not-cancel.h"
|
@@ -32,10 +32,14 @@ ENTRY(name) \
|
|||||||
ld [%g7 + MULTIPLE_THREADS_OFFSET], %g1; \
|
ld [%g7 + MULTIPLE_THREADS_OFFSET], %g1; \
|
||||||
cmp %g1, 0; \
|
cmp %g1, 0; \
|
||||||
bne 1f; \
|
bne 1f; \
|
||||||
|
.type __##syscall_name##_nocancel,@function; \
|
||||||
|
.globl __##syscall_name##_nocancel; \
|
||||||
|
__##syscall_name##_nocancel: \
|
||||||
mov SYS_ify(syscall_name), %g1; \
|
mov SYS_ify(syscall_name), %g1; \
|
||||||
ta 0x10; \
|
ta 0x10; \
|
||||||
bcs __syscall_error_handler; \
|
bcs __syscall_error_handler; \
|
||||||
nop; \
|
nop; \
|
||||||
|
.size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \
|
||||||
.subsection 2; \
|
.subsection 2; \
|
||||||
cfi_startproc; \
|
cfi_startproc; \
|
||||||
1: save %sp, -96, %sp; \
|
1: save %sp, -96, %sp; \
|
||||||
|
@@ -31,10 +31,14 @@
|
|||||||
ENTRY(name) \
|
ENTRY(name) \
|
||||||
ld [%g7 + MULTIPLE_THREADS_OFFSET], %g1; \
|
ld [%g7 + MULTIPLE_THREADS_OFFSET], %g1; \
|
||||||
brnz,pn %g1, 1f; \
|
brnz,pn %g1, 1f; \
|
||||||
|
.type __##syscall_name##_nocancel,@function; \
|
||||||
|
.globl __##syscall_name##_nocancel; \
|
||||||
|
__##syscall_name##_nocancel: \
|
||||||
mov SYS_ify(syscall_name), %g1; \
|
mov SYS_ify(syscall_name), %g1; \
|
||||||
ta 0x6d; \
|
ta 0x6d; \
|
||||||
bcs,pn %xcc, __syscall_error_handler; \
|
bcs,pn %xcc, __syscall_error_handler; \
|
||||||
nop; \
|
nop; \
|
||||||
|
.size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \
|
||||||
.subsection 2; \
|
.subsection 2; \
|
||||||
1: save %sp, -192, %sp; \
|
1: save %sp, -192, %sp; \
|
||||||
CENABLE; \
|
CENABLE; \
|
||||||
|
@@ -85,6 +85,7 @@ CFLAGS-tmpfile.c = -fexceptions
|
|||||||
CFLAGS-tmpfile64.c = -fexceptions
|
CFLAGS-tmpfile64.c = -fexceptions
|
||||||
CFLAGS-tempname.c = -fexceptions
|
CFLAGS-tempname.c = -fexceptions
|
||||||
CFLAGS-psignal.c = -fexceptions
|
CFLAGS-psignal.c = -fexceptions
|
||||||
|
CFLAGS-vprintf.c = -fexceptions
|
||||||
|
|
||||||
tst-sscanf-ENV = LOCPATH=$(common-objpfx)localedata
|
tst-sscanf-ENV = LOCPATH=$(common-objpfx)localedata
|
||||||
tst-swprintf-ENV = LOCPATH=$(common-objpfx)localedata
|
tst-swprintf-ENV = LOCPATH=$(common-objpfx)localedata
|
||||||
|
Reference in New Issue
Block a user