mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-10 03:10:09 +00:00
Update.
* sysdeps/unix/sysv/linux/sigwait.c (__sigwait): Use INTERNAL_SYSCALL is possible. * sysdeps/unix/sysv/linux/i386/sysdep.h (INTERNAL_SYSCALL_ERROR_P): New define. (INTERNAL_SYSCALL_ERRNO): Likewise.
This commit is contained in:
parent
eb9f749186
commit
f44476711d
@ -1,5 +1,12 @@
|
|||||||
2002-10-11 Ulrich Drepper <drepper@redhat.com>
|
2002-10-11 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/sigwait.c (__sigwait): Use
|
||||||
|
INTERNAL_SYSCALL is possible.
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/i386/sysdep.h
|
||||||
|
(INTERNAL_SYSCALL_ERROR_P): New define.
|
||||||
|
(INTERNAL_SYSCALL_ERRNO): Likewise.
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/i386/profil-counter.h (profil_counter):
|
* sysdeps/unix/sysv/linux/i386/profil-counter.h (profil_counter):
|
||||||
Add hack to prevent the compiler from clobbering the signal
|
Add hack to prevent the compiler from clobbering the signal
|
||||||
context.
|
context.
|
||||||
|
@ -291,9 +291,9 @@ asm (".L__X'%ebx = 1\n\t"
|
|||||||
#define INLINE_SYSCALL(name, nr, args...) \
|
#define INLINE_SYSCALL(name, nr, args...) \
|
||||||
({ \
|
({ \
|
||||||
unsigned int resultvar = INTERNAL_SYSCALL(name, nr, args); \
|
unsigned int resultvar = INTERNAL_SYSCALL(name, nr, args); \
|
||||||
if (resultvar >= 0xfffff001) \
|
if (INTERNAL_SYSCALL_ERROR_P (resultvar)) \
|
||||||
{ \
|
{ \
|
||||||
__set_errno (-resultvar); \
|
__set_errno (INTERNAL_SYSCALL_ERRNO (resultvar)); \
|
||||||
resultvar = 0xffffffff; \
|
resultvar = 0xffffffff; \
|
||||||
} \
|
} \
|
||||||
(int) resultvar; })
|
(int) resultvar; })
|
||||||
@ -315,6 +315,12 @@ asm (".L__X'%ebx = 1\n\t"
|
|||||||
: "i" (__NR_##name) ASMFMT_##nr(args) : "memory", "cc"); \
|
: "i" (__NR_##name) ASMFMT_##nr(args) : "memory", "cc"); \
|
||||||
(int) resultvar; })
|
(int) resultvar; })
|
||||||
|
|
||||||
|
#undef INTERNAL_SYSCALL_ERROR_P
|
||||||
|
#define INTERNAL_SYSCALL_ERROR_P(val) ((val) >= 0xfffff001)
|
||||||
|
|
||||||
|
#undef INTERNAL_SYSCALL_ERRNO
|
||||||
|
#define INTERNAL_SYSCALL_ERRNO(val) (-(val))
|
||||||
|
|
||||||
#define LOADARGS_0
|
#define LOADARGS_0
|
||||||
#define LOADARGS_1 \
|
#define LOADARGS_1 \
|
||||||
"bpushl .L__X'%k2, %k2\n\t" \
|
"bpushl .L__X'%k2, %k2\n\t" \
|
||||||
|
@ -40,7 +40,17 @@ __sigwait (set, sig)
|
|||||||
|
|
||||||
/* XXX The size argument hopefully will have to be changed to the
|
/* XXX The size argument hopefully will have to be changed to the
|
||||||
real size of the user-level sigset_t. */
|
real size of the user-level sigset_t. */
|
||||||
/* XXX INLINE_SYSCALL_NOERROR candiate. */
|
#ifdef INTERNAL_SYSCALL
|
||||||
|
ret = INTERNAL_SYSCALL (rt_sigtimedwait, 4, CHECK_SIGSET (set),
|
||||||
|
NULL, NULL, _NSIG / 8);
|
||||||
|
if (! INTERNAL_SYSCALL_ERROR_P (ret))
|
||||||
|
{
|
||||||
|
*sig = ret;
|
||||||
|
ret = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ret = INTERNAL_SYSCALL_ERRNO (ret);
|
||||||
|
#else
|
||||||
ret = INLINE_SYSCALL (rt_sigtimedwait, 4, CHECK_SIGSET (set),
|
ret = INLINE_SYSCALL (rt_sigtimedwait, 4, CHECK_SIGSET (set),
|
||||||
NULL, NULL, _NSIG / 8);
|
NULL, NULL, _NSIG / 8);
|
||||||
if (ret != -1)
|
if (ret != -1)
|
||||||
@ -50,6 +60,7 @@ __sigwait (set, sig)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
ret = errno;
|
ret = errno;
|
||||||
|
#endif
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user