mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Jens Gustedt <jens.gustedt@inria.fr>
To: musl@lists.openwall.com
Subject: Re: stdatomic implementation
Date: Tue, 15 Dec 2015 12:00:05 +0100	[thread overview]
Message-ID: <1450177205.314.11.camel@inria.fr> (raw)
In-Reply-To: <20151213145950.GH23362@port70.net>

[-- Attachment #1: Type: text/plain, Size: 931 bytes --]

Am Sonntag, den 13.12.2015, 15:59 +0100 schrieb Szabolcs Nagy:
> i recently run into a problem that you may be interested in:
> the gcc atomic builtins do not handle atomic pointer types as
> expected.
> 
> T *p;
> __atomic_fetch_add(&p,1);
> 
> adds 1 to (char*)p instead of sizeof(T).
> 
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64843

thanks again for pointing me at this

Since here we can assume that we flat addressing and that we also have
C11's _Generic, a workaround is simple. I have now implemented this,
and as long as one is using my header file and not gcc's it seems to
work.

Jens

-- 
:: INRIA Nancy Grand Est ::: Camus ::::::: ICube/ICPS :::
:: ::::::::::::::: office Strasbourg : +33 368854536   ::
:: :::::::::::::::::::::: gsm France : +33 651400183   ::
:: ::::::::::::::: gsm international : +49 15737185122 ::
:: http://icube-icps.unistra.fr/index.php/Jens_Gustedt ::




[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

      parent reply	other threads:[~2015-12-15 11:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-13 10:01 Jens Gustedt
2015-12-13 14:59 ` Szabolcs Nagy
2015-12-13 15:25   ` Jens Gustedt
2015-12-15 11:00   ` Jens Gustedt [this message]

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=1450177205.314.11.camel@inria.fr \
    --to=jens.gustedt@inria.fr \
    --cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).