public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Hei Chan <structurechart@yahoo.com>
To: "gcc-help@gcc.gnu.org" <gcc-help@gcc.gnu.org>
Subject: __sync_bool_compare_and_swap() With a Pointer
Date: Mon, 19 Nov 2012 05:10:00 -0000	[thread overview]
Message-ID: <1353301824.76156.YahooMailNeo@web165005.mail.bf1.yahoo.com> (raw)

Hi,

According to http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Atomic-Builtins.html, __sync_bool_compare_and_swap() supports int, long, long long, and their unsigned counterparts, and GCC will allow any integral scalar or pointer type that is 1, 2, 4 or 8 bytes in length.

I wonder in what situation the pointer type won't be 1, 2, 4 or 8 bytes in length.  Let's say I am running on a 64-bit Intel CPU.


Thanks in advance.


Cheers,
Hei

             reply	other threads:[~2012-11-19  5:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-19  5:10 Hei Chan [this message]
2012-11-19  5:42 ` Ian Lance Taylor

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=1353301824.76156.YahooMailNeo@web165005.mail.bf1.yahoo.com \
    --to=structurechart@yahoo.com \
    --cc=gcc-help@gcc.gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).