Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update.
2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>

	* sysdeps/sh/bits/atomic.h (__arch_compare_and_exchange_val_8_acq):
	Return old value. Make asm output reg constraint earlyclobber.
	Renamed from...
	(__arch_compare_and_exchange_8_acq): ... this.
	(__arch_compare_and_exchange_val_16_acq):
	Return old value. Make asm output reg constraint earlyclobber.
	Renamed from...
	(__arch_compare_and_exchange_16_acq): ... this.
	(__arch_compare_and_exchange_val_32_acq):
	Return old value. Make asm output reg constraint earlyclobber.
	Renamed from...
	(__arch_compare_and_exchange_32_acq): ... this.
	(__arch_compare_and_exchange_val_64_acq):
	Renamed from...
	(__arch_compare_and_exchange_64_acq): ... this.
	(atomic_exchange_and_add): Use local variables and
	__arch_compare_and_exchange_val_64_acq.
	(atomic_add): Likewise.
	(atomic_add_negative, atomic_add_zero): Use local variables.

	* Makefile: Remove libmd5crypt goal.
  • Loading branch information
Ulrich Drepper committed Mar 29, 2003
1 parent 10e717a commit dd731d5
Show file tree
Hide file tree
Showing 17 changed files with 382 additions and 160 deletions.
26 changes: 23 additions & 3 deletions ChangeLog
Expand Up @@ -16,15 +16,35 @@
* sysdeps/powerpc/bits/atomic.h [! __powerpc64__]
(__arch_atomic_decrement_if_positive_64): Fix bogus definition.

2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>

* sysdeps/sh/bits/atomic.h (__arch_compare_and_exchange_val_8_acq):
Return old value. Make asm output reg constraint earlyclobber.
Renamed from...
(__arch_compare_and_exchange_8_acq): ... this.
(__arch_compare_and_exchange_val_16_acq):
Return old value. Make asm output reg constraint earlyclobber.
Renamed from...
(__arch_compare_and_exchange_16_acq): ... this.
(__arch_compare_and_exchange_val_32_acq):
Return old value. Make asm output reg constraint earlyclobber.
Renamed from...
(__arch_compare_and_exchange_32_acq): ... this.
(__arch_compare_and_exchange_val_64_acq):
Renamed from...
(__arch_compare_and_exchange_64_acq): ... this.
(atomic_exchange_and_add): Use local variables and
__arch_compare_and_exchange_val_64_acq.
(atomic_add): Likewise.
(atomic_add_negative, atomic_add_zero): Use local variables.

2003-03-28 Alexandre Oliva <aoliva@redhat.com>

* sysdeps/unix/mips/sysdep.S: Include sys/asm.h.

* sysdeps/unix/sysv/linux/mips/configure: Rebuilt.

2003-03-27 Ulrich Drepper <drepper@redhat.com>

* Makefile: Remove libmd5script goal.
* Makefile: Remove libmd5crypt goal.

2003-03-25 Jakub Jelinek <jakub@redhat.com>

Expand Down
33 changes: 33 additions & 0 deletions nptl/ChangeLog
@@ -1,3 +1,36 @@
2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>

* sysdeps/sh/tls.h: Include nptl/descr.h after the definition
of TLS_DTV_AT_TP.
(INSTALL_DTV): Add parens.
(THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
Use passed descr instead of THREAD_SELF.
* sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
(__lll_mutex_timedlock_wait): Correct expected value after
spurious wakeup.
* sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
Release lock before waking up the waiters.
* sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
criteria. Reorderstruct passed to cleanup handler. Fix
handling of cancellation and failung pthread_mutex_unlock call.
Use __pthread_enable_asynccancel_2 instead of
__pthread_enable_asynccancel.
* sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
Return result of lock re-get if it fails.
* sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
for __pthread_cleanup_push.
* sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
completely broken rwlock implementation.
* sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
* sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
* sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
* sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
* sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
* sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
versioned_symbol macro.
* sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
* sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.

2003-03-27 Ulrich Drepper <drepper@redhat.com>

* sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
Expand Down
2 changes: 0 additions & 2 deletions nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
Expand Up @@ -177,8 +177,6 @@ __lll_timedwait_tid:
trapa #0x14
SYSCALL_INST_PAD

mov r0, r1

mov.l @r8, r0
tst r0, r0
bf 1f
Expand Down
12 changes: 7 additions & 5 deletions nptl/sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
Expand Up @@ -73,12 +73,13 @@ __lll_mutex_timedlock_wait:
mov r5, r8
mov r6, r9
mov r4, r10
add #1, r10

/* Stack frame for the timespec and timeval structs. */
add #-8, r15

1:
add #1, r10

/* Get current time. */
mov r15, r4
mov #0, r5
Expand Down Expand Up @@ -116,10 +117,11 @@ __lll_mutex_timedlock_wait:
extu.b r3, r3
trapa #0x14
SYSCALL_INST_PAD
mov r0, r4

mov #1, r3
XADD (r3, @r8, r10)
tst r10, r10
mov #1, r10
XADD (r10, @r8, r3)
tst r3, r3
bf 7f

mov #2, r1
Expand All @@ -134,7 +136,7 @@ __lll_mutex_timedlock_wait:
7:
/* Check whether the time expired. */
mov #-ETIMEDOUT, r1
cmp/eq r0, r1
cmp/eq r4, r1
bt 5f
bra 1b
nop
Expand Down
34 changes: 32 additions & 2 deletions nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
Expand Up @@ -59,10 +59,20 @@ __pthread_cond_broadcast:
bf 4f

3:
/* Case all currently waiting threads to wake up. */
/* Cause all currently waiting threads to recognize they are
woken up. */
mov.l r1, @(wakeup_seq,r8)
mov.l r0, @(wakeup_seq+4,r8)

/* Unlock. */
#if cond_lock != 0
DEC (@(cond_lock,r8), r2)
#else
DEC (@r8, r2)
#endif
tst r2, r2
bf 7f
8:
/* Wake up all threads. */
mov r8, r4
add #wakeup_seq, r4
Expand All @@ -75,6 +85,11 @@ __pthread_cond_broadcast:
trapa #0x14
SYSCALL_INST_PAD

mov #0, r0
lds.l @r15+, pr
rts
mov.l @r15+, r8

4:
/* Unlock. */
#if cond_lock != 0
Expand Down Expand Up @@ -104,7 +119,7 @@ __pthread_cond_broadcast:
nop

5:
/* Unlock in loop requires waekup. */
/* Unlock in loop requires wakeup. */
mov r8, r4
#if cond_lock != 0
add #cond_lock, r4
Expand All @@ -116,11 +131,26 @@ __pthread_cond_broadcast:
bra 6b
nop

7:
/* Unlock in loop requires wakeup. */
mov r8, r4
#if cond_lock != 0
add #cond_lock, r4
#endif
mov.l .Lmwake6, r1
bsrf r1
nop
.Lmwake6b:
bra 8b
nop

.align 2
.Lmwait5:
.long __lll_mutex_lock_wait-.Lmwait5b
.Lmwake5:
.long __lll_mutex_unlock_wake-.Lmwake5b
.Lmwake6:
.long __lll_mutex_unlock_wake-.Lmwake6b
.size __pthread_cond_broadcast, .-__pthread_cond_broadcast
versioned_symbol (libpthread, __pthread_cond_broadcast, pthread_cond_broadcast,
GLIBC_2_3_2)

0 comments on commit dd731d5

Please sign in to comment.