Re: Strange asm generated by GCC...

Liste des GroupesRevenir à c arch 
Sujet : Re: Strange asm generated by GCC...
De : jseigh_es00 (at) *nospam* xemaps.com (jseigh)
Groupes : comp.arch
Date : 24. Dec 2024, 02:16:08
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vkd20o$1fk7q$1@dont-email.me>
References : 1 2 3 4 5 6 7
User-Agent : Mozilla Thunderbird
On 12/23/24 16:20, Chris M. Thomasson wrote:

 Wrt a traditional lock-free stack, I think the store can use relaxed for the success path of a CAS.
For pushing onto a stack, you want release.  For popping from a stack
you want acquire.
You are probably ok using relaxed loading the old value.  It's not
real clear how aggressive the compiler is allowed to be with relaxed
loads and stores.  To be super safe, you might want to add acquire
to all your cas loops.
I would just stick with the compare_exchange w/ 1 memory order
parameter.  The success/fail form is just confusing, the fail
parameter doesn't do anything.

Date Sujet#  Auteur
20 Dec 24 * Strange asm generated by GCC...21Chris M. Thomasson
20 Dec 24 +- Re: Strange asm generated by GCC...1Chris M. Thomasson
20 Dec 24 +* Re: Strange asm generated by GCC...5Chris M. Thomasson
20 Dec 24 i`* Re: Strange asm generated by GCC...4jseigh
20 Dec 24 i `* Re: Strange asm generated by GCC...3Chris M. Thomasson
20 Dec 24 i  +- Re: Strange asm generated by GCC...1Chris M. Thomasson
20 Dec 24 i  `- Re: Strange asm generated by GCC...1Chris M. Thomasson
20 Dec 24 `* Re: Strange asm generated by GCC...14jseigh
20 Dec 24  +* Re: Strange asm generated by GCC...2jseigh
20 Dec 24  i`- Re: Strange asm generated by GCC...1jseigh
21 Dec 24  `* Re: Strange asm generated by GCC...11aph
23 Dec 24   +- Re: Strange asm generated by GCC...1Chris M. Thomasson
23 Dec 24   `* Re: Strange asm generated by GCC...9Chris M. Thomasson
23 Dec 24    `* Re: Strange asm generated by GCC...8Chris M. Thomasson
23 Dec 24     +- Re: Strange asm generated by GCC...1Chris M. Thomasson
23 Dec 24     `* Re: Strange asm generated by GCC...6aph
23 Dec 24      `* Re: Strange asm generated by GCC...5Chris M. Thomasson
24 Dec 24       `* Re: Strange asm generated by GCC...4jseigh
24 Dec 24        `* Re: Strange asm generated by GCC...3Chris M. Thomasson
24 Dec 24         `* Re: Strange asm generated by GCC...2Chris M. Thomasson
24 Dec 24          `- Re: Strange asm generated by GCC...1jseigh

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal