From: Jens Gustedt <jens.gustedt@inria.fr>
To: musl@lists.openwall.com
Subject: Re: implement stdatomic.h library interface
Date: Sat, 25 Jul 2015 14:12:46 +0200 [thread overview]
Message-ID: <1437826366.23129.7.camel@inria.fr> (raw)
In-Reply-To: <914b5486.dNq.dMV.20.hISEiN@mailjet.com>
[-- Attachment #1: Type: text/plain, Size: 1368 bytes --]
Hello,
Am Samstag, den 25.07.2015, 11:17 +0200 schrieb Joakim Sindholt:
> On Sat, 2015-07-25 at 08:33 +0200, Jens Gustedt wrote:
> > clang relies on the C library (it seems on bsd) or a gcc installation
> > as a fallback.
>
> I'm not sure what you mean by this. Can you clarify? Compiler-rt has all
> of clang's own fallback symbols and it looks like they're incompatible
> with libatomic.
>
> As far as I can tell they just use regular spinlocks on linux without
> any libc dependency what-so-ever and on FreeBSD it goes straight to
> _umtx_op which looks like their version of futex.
so I must have read some obsolete documentation somewhere
In any case a lock with kernel support seems to be preferable. I have
a test application that wildly allocates and deallocates list elements
and inserts them atomically. When there is a 16 byte atomic all is
done with that, if not the lockfull replacement is used. For the
lockfull version I seem to get 3 times more work done when using
LOCK/UNLOCK over just using a spinlock.
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 --]
next prev parent reply other threads:[~2015-07-25 12:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-23 9:58 Jens Gustedt
2015-07-23 12:14 ` Joakim Sindholt
2015-07-23 22:21 ` Jens Gustedt
2015-07-24 23:18 ` Rich Felker
2015-07-25 6:33 ` Jens Gustedt
2015-07-25 9:17 ` Joakim Sindholt
2015-07-25 12:12 ` Jens Gustedt [this message]
2015-07-23 13:05 ` Szabolcs Nagy
2015-07-23 14:04 ` Jens Gustedt
2015-07-23 14:42 ` Szabolcs Nagy
2015-07-23 15:04 ` Jens Gustedt
2015-07-23 16:32 ` Joakim Sindholt
2015-07-23 17:02 ` Szabolcs Nagy
2015-07-23 22:44 ` Jens Gustedt
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=1437826366.23129.7.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).