From: Carlos O'Donell <carlos@baldric.uwo.ca>
To: Ulrich Drepper <drepper@redhat.com>
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: Thu, 22 May 2003 11:09:02 -0400 [thread overview]
Message-ID: <20030522150902.GM21858@systemhalted> (raw)
In-Reply-To: <3ECBBE25.8090302@redhat.com>
Ulrich,
> The indentation and general style is wrong in many places.
I'll clean this up today and break it into three chunks for even easier
digestion.
> > __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.
__ldcw is volatile.
Are you suggesting that it is prehaps fragile based on gcc's
choice of optimization?
> And I don't understand why you removed the asm code. These pieces of
> code are prime candidates for hand-coding.
__ldcw is still assembly only. __ldcw_align is a macro. In truth I
wanted a functioning implementation first, optimization is a close
second. Though a full assembly version would fix gcc from reordering
anything.
> > +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.
This should get addressed as TLS is implemented for HPPA. I will be
attending gcc-summit in hopes to discuss this with my colleagues.
c.
next prev parent reply other threads:[~2003-05-22 15:07 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 ` [parisc-linux] " Ulrich Drepper
2003-05-21 17:57 ` Ulrich Drepper
2003-05-22 15:09 ` Carlos O'Donell
2003-05-22 15:09 ` Carlos O'Donell [this message]
2003-05-22 15:15 ` Grant Grundler
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 17:04 ` John David Anglin
2003-05-22 17:04 ` John David Anglin
2003-05-22 16:23 ` Grant Grundler
2003-05-22 15:53 ` John David Anglin
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=20030522150902.GM21858@systemhalted \
--to=carlos@baldric.uwo.ca \
--cc=dave.anglin@nrc-cnrc.gc.ca \
--cc=drepper@redhat.com \
--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