about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-11-27 19:58:24 +0000
committerUlrich Drepper <drepper@redhat.com>2002-11-27 19:58:24 +0000
commitb54e18ebb31d856711e2f096a23d85753fbe57d7 (patch)
tree0f71d4323bd69655232d92bbc3804e54766d4deb
parenta39313366a59d118ef9553f3b635e6230385329f (diff)
downloadglibc-b54e18ebb31d856711e2f096a23d85753fbe57d7.tar.gz
glibc-b54e18ebb31d856711e2f096a23d85753fbe57d7.tar.xz
glibc-b54e18ebb31d856711e2f096a23d85753fbe57d7.zip
Update.
	* sysdeps/x86_64/pthread_sigmask.c: New file.

	* sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
	value in case of an error.
-rw-r--r--nptl/ChangeLog5
-rw-r--r--nptl/sysdeps/i386/pthread_sigmask.c6
-rw-r--r--nptl/sysdeps/x86_64/pthread_sigmask.c1
-rw-r--r--nptl/sysdeps/x86_64/tls.h11
4 files changed, 11 insertions, 12 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index c8caf217a5..530d6f49eb 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,5 +1,10 @@
 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
 
+	* sysdeps/x86_64/pthread_sigmask.c: New file.
+
+	* sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
+	value in case of an error.
+
 	* sysdeps/x86_64/tls.h: New file.
 
 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
diff --git a/nptl/sysdeps/i386/pthread_sigmask.c b/nptl/sysdeps/i386/pthread_sigmask.c
index 2ae9198c02..aa071841db 100644
--- a/nptl/sysdeps/i386/pthread_sigmask.c
+++ b/nptl/sysdeps/i386/pthread_sigmask.c
@@ -30,5 +30,9 @@ pthread_sigmask (how, newmask, oldmask)
      const sigset_t *newmask;
      sigset_t *oldmask;
 {
-  return INLINE_SYSCALL (sigprocmask, 3, how, newmask, oldmask);
+  int result = INTERNAL_SYSCALL (sigprocmask, 3, how, newmask, oldmask);
+
+  return (INTERNAL_SYSCALL_ERROR_P (result)
+	  ? INTERNAL_SYSCALL_ERRNO (result)
+	  : 0);
 }
diff --git a/nptl/sysdeps/x86_64/pthread_sigmask.c b/nptl/sysdeps/x86_64/pthread_sigmask.c
new file mode 100644
index 0000000000..802d61f819
--- /dev/null
+++ b/nptl/sysdeps/x86_64/pthread_sigmask.c
@@ -0,0 +1 @@
+#include "../i386/pthread_sigmask.c"
diff --git a/nptl/sysdeps/x86_64/tls.h b/nptl/sysdeps/x86_64/tls.h
index 2daf0328d5..8a4b718cf0 100644
--- a/nptl/sysdeps/x86_64/tls.h
+++ b/nptl/sysdeps/x86_64/tls.h
@@ -119,17 +119,6 @@ union user_desc_init
   (((tcbhead_t *) (descr))->dtv)
 
 
-/* Macros to load from and store into segment registers.  */
-# ifndef TLS_GET_GS
-#  define TLS_GET_GS() \
-  ({ int __seg; __asm ("movw %%gs, %w0" : "=q" (__seg)); __seg & 0xffff; })
-# endif
-# ifndef TLS_SET_GS
-#  define TLS_SET_GS(val) \
-  __asm ("movw %w0, %%gs" :: "q" (val))
-# endif
-
-
 # ifndef __NR_set_thread_area
 #  define __NR_set_thread_area 243
 # endif