From: Steven Munroe <sjmunroe@us.ibm.com>
To: libc-hacker@sources.redhat.com, Paul Mackerras <paulus@samba.org>
Subject: PPC atomic.h and compare_exchange_val forms
Date: Tue, 15 Apr 2003 19:32:00 -0000 [thread overview]
Message-ID: <3E9C5E50.1020302@us.ibm.com> (raw)
I sent the patch to libc-alpha to fix the current problem for PPC64 but
I think there is a larger issue that needs to be discussed.
For the macros defined by include/atomic.h, which forms are included for
the convenience of specific architecture and which forms are part of the
common API (i.e. can they be freely used in arch independent parts of
glibc)?
For example atomic_compare_and_exchange_val_acq. Are all forms (8-, 16-,
32-, and 64-bit) of this operation expected to be available for general
use?
A quick review of arch specific atomic.h's shows that only i386 and m68k
support the 8- and 16-bit forms. Most arch's define these to abort().
The 64-bit form is also problematic on most 32-bit arches.
For PPC32/PPC64 implementing the 8- and 16-bit forms would be
problematic. The resulting code would be slow and prone to live lock
conditions. I assume that this is true for most architectures.
I recommend dropping any mention of the 8- and 16-bit forms from
include/atomic.h.
next reply other threads:[~2003-04-15 19:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-15 19:32 Steven Munroe [this message]
2003-04-15 19:41 ` 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=3E9C5E50.1020302@us.ibm.com \
--to=sjmunroe@us.ibm.com \
--cc=libc-hacker@sources.redhat.com \
--cc=paulus@samba.org \
--cc=sjmunroe@vnet.ibm.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).