From: Ulrich Drepper <drepper@redhat.com>
To: "Carlos O'Donell" <carlos@baldric.uwo.ca>
Cc: libc-alpha@sources.redhat.com,
parisc-linux@lists.parisc-linux.org,
Randolph Chung <tausq@debian.org>,
John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Subject: [parisc-linux] Re: [PATCH] HPPA Linuxthreads.
Date: Wed, 21 May 2003 10:57:57 -0700 [thread overview]
Message-ID: <3ECBBE25.8090302@redhat.com> (raw)
In-Reply-To: <20030521172929.GB21858@systemhalted>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Carlos O'Donell wrote:
> This is a cleaner HPPA linuxthreads implementation that stems from the
> work that John David Anglin <dave.anglin@nrc-cnrc.gc.ca> and myself did
> to devise a self-aligning lock system that doesn't impose the 16-byte
> lock alignment restriction.
The indentation and general style is wrong in many places.
> diff -urN glibc-2.3.1.orig/linuxthreads/sysdeps/hppa/pspinlock.c glibc-2.3.1/linuxthreads/sysdeps/hppa/pspinlock.c
> --- glibc-2.3.1.orig/linuxthreads/sysdeps/hppa/pspinlock.c 2002-08-26 18:39:51.000000000 -0400
> +++ glibc-2.3.1/linuxthreads/sysdeps/hppa/pspinlock.c 2003-01-15 18:26:51.000000000 -0500
> @@ -24,15 +24,12 @@
> int
> __pthread_spin_lock (pthread_spinlock_t *lock)
> {
> - unsigned int val;
> + unsigned int *addr = __ldcw_align (lock);
> +
> + while (__ldcw (addr) == 0)
> + while (*addr == 0) ;
This is plain wrong. addr at least must be volatile.
And I don't understand why you removed the asm code. These pieces of
code are prime candidates for hand-coding.
> +static inline struct _pthread_descr_struct * __get_cr27(void)
> +{
> + long cr27;
> + asm("mfctl %%cr27, %0" : "=r" (cr27) : );
> + return (struct _pthread_descr_struct *) cr27;
> +}
Not a real problem, but you should get gcc to recognize this reqister
and perform the loading.
- --
- --------------. ,-. 444 Castro Street
Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA
Red Hat `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+y74l2ijCOnn/RHQRAvZ1AKCkAhua5qA19EDylfBz2Zhp8dROIACfTrwO
9Slpj32aUy92PiggDNexZBE=
=6Ilf
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2003-05-21 17:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-21 17:29 [parisc-linux] [PATCH] HPPA Linuxthreads Carlos O'Donell
2003-05-21 17:57 ` Ulrich Drepper [this message]
2003-05-22 15:09 ` [parisc-linux] " Carlos O'Donell
2003-05-22 15:15 ` Grant Grundler
2003-05-22 15:53 ` John David Anglin
2003-05-22 16:23 ` Grant Grundler
2003-05-22 16:23 ` Grant Grundler
2003-05-22 17:04 ` John David Anglin
2003-05-22 17:04 ` John David Anglin
2003-05-22 15:53 ` John David Anglin
2003-05-22 15:15 ` Grant Grundler
2003-05-22 15:09 ` Carlos O'Donell
2003-05-21 17:57 ` Ulrich Drepper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3ECBBE25.8090302@redhat.com \
--to=drepper@redhat.com \
--cc=carlos@baldric.uwo.ca \
--cc=dave.anglin@nrc-cnrc.gc.ca \
--cc=libc-alpha@sources.redhat.com \
--cc=parisc-linux@lists.parisc-linux.org \
--cc=tausq@debian.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox