All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Carlos O'Donell Jr." <carlos@megatonmonkey.net>
To: parisc-linux@lists.parisc-linux.org
Cc: baldric-exec@baldric.uwo.ca
Subject: [parisc-linux] testandset
Date: Fri, 21 Sep 2001 11:37:00 -0400	[thread overview]
Message-ID: <20010921113700.A25803@megatonmonkey.net> (raw)

I remember Wilcox saying:

"
Because we can't implement testandset atomically & efficiently on hppa.
The places which use testandset actually just need trylock.
"

Was the old testandset changed to try_lock in pt-machine.h for
hppa?

I see that they are the same asm statement (i.e. just an ldcw).

pt-machine.h:old:
testandset (int *spinlock)
{
  int ret;

  __asm__ __volatile__(
       "ldcw 0(%2),%0"
       : "=r"(ret), "=m"(*spinlock)
       : "r"(spinlock));

  return ret == 0;
}

pt-machine.h:new:
try_lock(__atomic_lock_t *spinlock)
{
  int ret;

  __asm__ __volatile__(
       "ldcw 0(%2),%0"
       : "=r"(ret), "=m"(*spinlock)
       : "r"(spinlock));

  return ret == 0;
}

Same...

I'm sitting scratching my head becaues the ./sysdeps/hppa/dl-fptr.c
is peppered with testandset, which used to be in pt-machine.h,
but is now called try_lock within pt-machine.h

Which is my current reason that glibc-2.2.4 failes to build
Because dl-fptr.c makes use of testandset, which is no longer 
in pt-machine.h.

Do I have something backwards?
I'm starting to think that I should take a look at dpkg-buildpackage,
and if I'm using it all properly.

---

Matthew,

Since I can't quite get to the point where zic barfs while 
walking the timezones... I'm not much help ;)


c.

             reply	other threads:[~2001-09-21 15:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-21 15:37 Carlos O'Donell Jr. [this message]
2001-09-21 15:42 ` [parisc-linux] testandset Matthew Wilcox
2001-09-21 16:10   ` Carlos O'Donell Jr.
  -- strict thread matches above, loose matches on Subject: below --
2001-09-21 15:58 Carlos O'Donell Jr.
2001-09-21  1:12 Carlos O'Donell Jr.
2001-09-21 15:17 ` Matthew Wilcox

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=20010921113700.A25803@megatonmonkey.net \
    --to=carlos@megatonmonkey.net \
    --cc=baldric-exec@baldric.uwo.ca \
    --cc=parisc-linux@lists.parisc-linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.