summaryrefslogtreecommitdiff
path: root/linuxthreads
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2006-10-04 13:16:36 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2006-10-04 13:16:36 +0000
commit4cd901381fc33271958aa2cb826309a515413cc3 (patch)
tree5edcc0aac7823690f5b3d73fe4a5ee1999a83f04 /linuxthreads
parentd6e297f8c462e9d0a60da8e897f433b3d354b792 (diff)
Merge changes between r291 and r312 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@313 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'linuxthreads')
-rw-r--r--linuxthreads/linuxthreads/ChangeLog27
-rw-r--r--linuxthreads/linuxthreads/sysdeps/m68k/pt-machine.h4
-rw-r--r--linuxthreads/linuxthreads/sysdeps/pthread/gai_misc.h9
-rw-r--r--linuxthreads/linuxthreads/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h27
-rw-r--r--linuxthreads/linuxthreads/sysdeps/unix/sysv/linux/m68k/vfork.S5
5 files changed, 63 insertions, 9 deletions
diff --git a/linuxthreads/linuxthreads/ChangeLog b/linuxthreads/linuxthreads/ChangeLog
index 3b440b023..6e6ae6067 100644
--- a/linuxthreads/linuxthreads/ChangeLog
+++ b/linuxthreads/linuxthreads/ChangeLog
@@ -1,3 +1,30 @@
+2H2006-10-03 Richard Sandiford <richard@codesourcery.com>
+
+ * sysdeps/m68k/pt-machine.h (__compare_and_swap): Don't define for
+ Coldfire.
+ (HAS_COMPARE_AND_SWAP): Likewise.
+ * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (PSEUDO): Pass a
+ temporary register to SINGLE_THREAD_P.
+ (__local_multiple_threads): Do not mark hidden in librt.
+ (SINGLE_THREAD_P): Make the assembler version take a temporary
+ register argument. Load __local_multiple_threads from the GOT
+ when generating PIC for librt. Use separate PIC implementations
+ for m680x0 and Coldfire.
+ * sysdeps/unix/sysv/linux/m68k/vfork.S (__vfork): On Coldfire targets,
+ load the GOTPC offset into a temporary register first.
+
+2006-10-02 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/pthread/gai_misc.h (__gai_start_notify_thread): Use
+ sigprocmask instead.
+ (__gai_create_helper_thread): Likewise.
+
+2006-10-01 Petr Salinger <Petr.Salinger@seznam..cz>
+
+ * sysdeps/pthread/gai_misc.h (__gai_start_notify_thread): Use
+ __sigprocmask.
+ (__gai_create_helper_thread): Likewise.
+
2006-09-22 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/pthread/gai_misc.h: New file.
diff --git a/linuxthreads/linuxthreads/sysdeps/m68k/pt-machine.h b/linuxthreads/linuxthreads/sysdeps/m68k/pt-machine.h
index ad524d6d2..d133756e6 100644
--- a/linuxthreads/linuxthreads/sysdeps/m68k/pt-machine.h
+++ b/linuxthreads/linuxthreads/sysdeps/m68k/pt-machine.h
@@ -27,7 +27,9 @@
#endif
extern long int testandset (int *spinlock);
+#ifndef __mcoldfire__
extern int __compare_and_swap (long int *p, long int oldval, long int newval);
+#endif
/* Spinlock implementation; required. */
PT_EI long int
@@ -50,6 +52,7 @@ testandset (int *spinlock)
register char * stack_pointer __asm__ ("%sp");
+#ifndef __mcoldfire__
/* Compare-and-swap for semaphores. */
#define HAS_COMPARE_AND_SWAP
@@ -65,5 +68,6 @@ __compare_and_swap (long int *p, long int oldval, long int newval)
return ret;
}
+#endif
#endif /* pt-machine.h */
diff --git a/linuxthreads/linuxthreads/sysdeps/pthread/gai_misc.h b/linuxthreads/linuxthreads/sysdeps/pthread/gai_misc.h
index b7be50747..3544bcaf2 100644
--- a/linuxthreads/linuxthreads/sysdeps/pthread/gai_misc.h
+++ b/linuxthreads/linuxthreads/sysdeps/pthread/gai_misc.h
@@ -34,8 +34,7 @@ __gai_start_notify_thread (void)
{
sigset_t ss;
sigemptyset (&ss);
- INTERNAL_SYSCALL_DECL (err);
- INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &ss, NULL, _NSIG / 8);
+ sigprocmask (SIG_SETMASK, &ss, NULL);
}
extern inline int
@@ -56,14 +55,12 @@ __gai_create_helper_thread (pthread_t *threadp, void *(*tf) (void *),
sigset_t ss;
sigset_t oss;
sigfillset (&ss);
- INTERNAL_SYSCALL_DECL (err);
- INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &ss, &oss, _NSIG / 8);
+ sigprocmask (SIG_SETMASK, &ss, &oss);
int ret = pthread_create (threadp, &attr, tf, arg);
/* Restore the signal mask. */
- INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &oss, NULL,
- _NSIG / 8);
+ sigprocmask (SIG_SETMASK, &oss, NULL);
(void) pthread_attr_destroy (&attr);
return ret;
diff --git a/linuxthreads/linuxthreads/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h b/linuxthreads/linuxthreads/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h
index bb798e40d..4228b4f22 100644
--- a/linuxthreads/linuxthreads/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h
+++ b/linuxthreads/linuxthreads/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h
@@ -28,7 +28,7 @@
# define PSEUDO(name, syscall_name, args) \
.text; \
ENTRY (name) \
- SINGLE_THREAD_P; \
+ SINGLE_THREAD_P (%a0); \
jne .Lpseudo_cancel; \
DO_CALL (syscall_name, args); \
cmp.l &-4095, %d0; \
@@ -111,13 +111,34 @@
# endif
# ifndef __ASSEMBLER__
+# if !defined NOT_IN_libc || defined IS_IN_libpthread
extern int __local_multiple_threads attribute_hidden;
+# else
+extern int __local_multiple_threads;
+# endif
# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
# else
# if !defined PIC
-# define SINGLE_THREAD_P tst.l __local_multiple_threads
+# define SINGLE_THREAD_P(ATMP) tst.l __local_multiple_threads
+# elif !defined NOT_IN_libc || defined IS_IN_libpthread
+# if defined __mcoldfire__
+# define SINGLE_THREAD_P(ATMP) \
+ move.l &__local_multiple_threads-., ATMP; \
+ tst.l (-8, %pc, ATMP)
+# else
+# define SINGLE_THREAD_P(ATMP) tst.l (__local_multiple_threads, %pc)
+# endif
# else
-# define SINGLE_THREAD_P tst.l (__local_multiple_threads, %pc)
+# if defined __mcoldfire__
+# define SINGLE_THREAD_P(ATMP) \
+ move.l &__local_multiple_threads@GOTPC, ATMP; \
+ move.l (-6, %pc, ATMP), ATMP; \
+ tst.l (ATMP)
+# else
+# define SINGLE_THREAD_P(ATMP) \
+# move.l (__local_multiple_threads@GOTPC, %pc), ATMP; \
+# tst.l (ATMP)
+# endif
# endif
# endif
diff --git a/linuxthreads/linuxthreads/sysdeps/unix/sysv/linux/m68k/vfork.S b/linuxthreads/linuxthreads/sysdeps/unix/sysv/linux/m68k/vfork.S
index 49b8a3c0a..7cbe3d126 100644
--- a/linuxthreads/linuxthreads/sysdeps/unix/sysv/linux/m68k/vfork.S
+++ b/linuxthreads/linuxthreads/sysdeps/unix/sysv/linux/m68k/vfork.S
@@ -30,7 +30,12 @@
ENTRY (__vfork)
#ifdef SHARED
+#ifdef __mcoldfire__
+ movel #__libc_pthread_functions@GOTPC, %d0
+ tstl (-6, %pc, %d0)
+#else
tstl (__libc_pthread_functions@GOTPC, %pc)
+#endif
#else
.weak pthread_create
movel #pthread_create, %d0