about summary refs log tree commit diff
path: root/linuxthreads
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-04-15 22:26:34 +0000
committerUlrich Drepper <drepper@redhat.com>2000-04-15 22:26:34 +0000
commit145b84138f8b1fca851196451ab0f21a054ae754 (patch)
tree0e7f1c478ba1aa27bd7acd4fbbf7b99471e5c14a /linuxthreads
parent29094e48802f69927d59b5edf5afc90ec222c8b9 (diff)
downloadglibc-145b84138f8b1fca851196451ab0f21a054ae754.tar.gz
glibc-145b84138f8b1fca851196451ab0f21a054ae754.tar.xz
glibc-145b84138f8b1fca851196451ab0f21a054ae754.zip
Update.
	* elf/dl-version.c (_dl_check_map_versions): New argument trace_mode.
	Before testing versions check that we actually loaded the object
	and whether we are in trace mode.  If not loaded during tracing don't
	test versions in this object.
	(_dl_check_all_versions): Take new parameter and pass to
	_dl_check_map_versions.
	* sysdeps/generic/ldsodefs.h: Update prototypes for
	_dl_check_all_versions and _dl_check_map_versions.
	* elf/rtld.c (struct version_check_args): Add dotrace.
	(version_check_doit): Pass args->dotrace to _dl_check_all_versions.
	(dl_main): Pass info about trace mode to version_check_doit.
	* elf/dl-open.c (dl_open_worker): Pass zero as new argument to
	_dl_check_all_versions.

	* manual/users.texi (XPG Functions): Document utmpxname, getutmp,
	and getutmpx.
	Patch by Bryan Henderson <bryanh@giraffe-data.com>.
Diffstat (limited to 'linuxthreads')
-rw-r--r--linuxthreads/ChangeLog3
-rw-r--r--linuxthreads/pthread.c20
-rw-r--r--linuxthreads/spinlock.c4
3 files changed, 19 insertions, 8 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 0530c63506..f9a3bf9240 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,5 +1,8 @@
 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
 
+	* pthread.c (pthread_initialize): Avoid a bit more code if
+	realtime signals are known to exist.
+
 	* pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
 	to dynamically detect RT signals and avoid generating compatibility
 	functions with old kernel.
diff --git a/linuxthreads/pthread.c b/linuxthreads/pthread.c
index 3ceb33562e..eca90635b0 100644
--- a/linuxthreads/pthread.c
+++ b/linuxthreads/pthread.c
@@ -369,10 +369,12 @@ static void pthread_initialize(void)
 #ifndef __i386__
   sa.sa_handler = pthread_handle_sigrestart;
 #else
-  if (__pthread_sig_restart >= SIGRTMIN)
-    sa.sa_handler = (__sighandler_t) pthread_handle_sigrestart_rt;
-  else
+# if !__ASSUME_REALTIME_SIGNALS
+  if (__pthread_sig_restart < SIGRTMIN)
     sa.sa_handler = (__sighandler_t) pthread_handle_sigrestart_nonrt;
+  else
+# endif
+    sa.sa_handler = (__sighandler_t) pthread_handle_sigrestart_rt;
 #endif
   sigemptyset(&sa.sa_mask);
   sa.sa_flags = 0;
@@ -380,10 +382,12 @@ static void pthread_initialize(void)
 #ifndef __i386__
   sa.sa_handler = pthread_handle_sigcancel;
 #else
-  if (__pthread_sig_restart >= SIGRTMIN)
-    sa.sa_handler = (__sighandler_t) pthread_handle_sigcancel_rt;
-  else
+# if !__ASSUME_REALTIME_SIGNALS
+  if (__pthread_sig_restart < SIGRTMIN)
     sa.sa_handler = (__sighandler_t) pthread_handle_sigcancel_nonrt;
+  else
+# endif
+    sa.sa_handler = (__sighandler_t) pthread_handle_sigcancel_rt;
 #endif
   sa.sa_flags = 0;
   __sigaction(__pthread_sig_cancel, &sa, NULL);
@@ -664,11 +668,13 @@ static void pthread_handle_sigrestart(int sig)
 }
 
 #ifdef __i386__
+# if !__ASSUME_REALTIME_SIGNALS
 static void pthread_handle_sigrestart_nonrt(int sig, struct sigcontext ctx)
 {
   asm volatile ("movw %w0,%%gs" : : "r" (ctx.gs));
   pthread_handle_sigrestart(sig);
 }
+# endif
 
 static void pthread_handle_sigrestart_rt(int sig, struct siginfo *si,
 					 struct ucontext *uc)
@@ -713,11 +719,13 @@ static void pthread_handle_sigcancel(int sig)
 }
 
 #ifdef __i386__
+# if !__ASSUME_REALTIME_SIGNALS
 static void pthread_handle_sigcancel_nonrt(int sig, struct sigcontext ctx)
 {
   asm volatile ("movw %w0,%%gs" : : "r" (ctx.gs));
   pthread_handle_sigcancel(sig);
 }
+# endif
 
 static void pthread_handle_sigcancel_rt(int sig, struct siginfo *si,
 					 struct ucontext *uc)
diff --git a/linuxthreads/spinlock.c b/linuxthreads/spinlock.c
index ac94001bda..d13cea18c7 100644
--- a/linuxthreads/spinlock.c
+++ b/linuxthreads/spinlock.c
@@ -56,7 +56,7 @@ void internal_function __pthread_lock(pthread_spinlock_t * lock,
       THREAD_SETMEM(self, p_nextlock, (pthread_descr) oldstatus);
       /* Make sure the store in p_nextlock completes before performing
          the compare-and-swap */
-      WRITE_MEMORY_BARRIER();
+      MEMORY_BARRIER();
     }
   } while(! compare_and_swap(&lock->__status, oldstatus, newstatus,
                              &lock->__spinlock));
@@ -144,7 +144,7 @@ again:
   }
   /* Prevent reordering of store to *maxptr above and store to thr->p_nextlock
      below */
-  MEMORY_BARRIER();
+  WRITE_MEMORY_BARRIER();
   /* Wake up the selected waiting thread */
   thr->p_nextlock = NULL;
   restart(thr);