summaryrefslogtreecommitdiff
path: root/sysdeps/generic
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-11-26 12:02:23 +0000
committerUlrich Drepper <drepper@redhat.com>1998-11-26 12:02:23 +0000
commitcb0509a8d5a3569117babe0a24dc4946cf6c06c1 (patch)
tree85cc83f80f4dff0f7a7b2580865f6341ad3e79ae /sysdeps/generic
parent0155a7737f5653e07015421b962b70fd8831c4ad (diff)
Update.
1998-11-26 Ulrich Drepper <drepper@cygnus.com> * sysdeps/mips/dl-machine.h (ELF_MACHINE_NO_PLT): New defined macro. (elf_machine_got_rel): Remove scope variable. Use scope from the map. Don't modify _dl_global_scope_end in the end. (__dl_runtime_resolv): Also use scope from the map. * sysdeps/mips/mips64/dl-machine.h: Likewise. * elf/dl-runtime.c: Don't define fixup and profile_fixup if ELF_MACHINE_NO_PLT is defined. * sysdeps/mips/sys/ucontext.h: New file. Patches by kaz Kojima <kkojima@rr.iij4u.or.jp>. 1998-11-26 Andreas Jaeger <aj@arthur.rhein-neckar.de> * sysdeps/generic/pselect.c (__pselect): Change interface, set/restore sigmask. * misc/sys/select.h: Change declaration according to Stevens' Unix Network Programming. * include/sys/select.h (__pselect): Likewise. Reported by <bwelling@anomaly.munge.com> [PR libc/872]. * include/fpu_control.h: New file, contains __setfpucw declaration. * sysdeps/generic/fpu_control.h: Remove __setfpucw declaration, it's an internal symbol. * sysdeps/alpha/fpu/fpu_control.h: Likewise. * sysdeps/arm/fpu/fpu_control.h: Likewise. * sysdeps/i386/fpu_control.h: Likewise. * sysdeps/m68k/fpu_control.h: Likewise. * sysdeps/powerpc/fpu_control.h: Likewise. * sysdeps/sparc/sparc32/fpu/fpu_control.h: Likewise. * sysdeps/sparc/sparc64/fpu/fpu_control.h: Likewise.
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/fpu_control.h9
-rw-r--r--sysdeps/generic/pselect.c24
2 files changed, 15 insertions, 18 deletions
diff --git a/sysdeps/generic/fpu_control.h b/sysdeps/generic/fpu_control.h
index 4d3d978426..8d50901300 100644
--- a/sysdeps/generic/fpu_control.h
+++ b/sysdeps/generic/fpu_control.h
@@ -1,5 +1,5 @@
/* FPU control word definitions. Stub version.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -36,11 +36,4 @@ typedef unsigned int fpu_control_t;
/* Default control word set at startup. */
extern fpu_control_t __fpu_control;
-__BEGIN_DECLS
-
-/* Called at startup. It can be used to manipulate fpu control register. */
-extern void __setfpucw __P ((fpu_control_t));
-
-__END_DECLS
-
#endif /* _FPU_CONTROL_H */
diff --git a/sysdeps/generic/pselect.c b/sysdeps/generic/pselect.c
index 3a93f997f5..dab4d754f2 100644
--- a/sysdeps/generic/pselect.c
+++ b/sysdeps/generic/pselect.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -18,24 +18,28 @@
Boston, MA 02111-1307, USA. */
#include <errno.h>
+#include <signal.h>
#include <sys/time.h>
#include <sys/select.h>
/* Check the first NFDS descriptors each in READFDS (if not NULL) for read
readiness, in WRITEFDS (if not NULL) for write readiness, and in EXCEPTFDS
(if not NULL) for exceptional conditions. If TIMEOUT is not NULL, time out
- after waiting the interval specified therein. Returns the number of ready
- descriptors, or -1 for errors. */
+ after waiting the interval specified therein. Additionally set the sigmask
+ SIGMASK for this call. Returns the number of ready descriptors, or -1 for
+ errors. */
int
-__pselect (nfds, readfds, writefds, exceptfds, timeout)
+__pselect (nfds, readfds, writefds, exceptfds, timeout, sigmask)
int nfds;
fd_set *readfds;
fd_set *writefds;
fd_set *exceptfds;
- struct timespec *timeout;
+ const struct timespec *timeout;
+ const sigset_t *sigmask;
{
struct timeval tval;
int retval;
+ sigset_t savemask;
/* Change nanosecond number to microseconds. This may loose
precision and therefore the `pselect` should be available. But
@@ -43,13 +47,13 @@ __pselect (nfds, readfds, writefds, exceptfds, timeout)
if (timeout != NULL)
TIMESPEC_TO_TIMEVAL (&tval, timeout);
+ /* The setting and restoring of the signal mask and the select call
+ should be an atomic operation. This can't be done without kernel
+ help. */
+ __sigprocmask (SIG_SETMASK, sigmask, &savemask);
retval = __select (nfds, readfds, writefds, exceptfds,
timeout != NULL ? &tval : NULL);
-
- /* Change the result back. The remaining time must be made
- available to the caller. */
- if (timeout != NULL)
- TIMEVAL_TO_TIMESPEC (&tval, timeout);
+ __sigprocmask (SIG_SETMASK, &savemask, NULL);
return retval;
}