Re: Futex Stack Test...

Liste des GroupesRevenir à cl c++ 
Sujet : Re: Futex Stack Test...
De : jameskuyper (at) *nospam* alumni.caltech.edu (James Kuyper)
Groupes : comp.lang.c++
Date : 18. Feb 2025, 20:13:53
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vp2m5h$1r0qt$1@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
On 2/18/25 02:01, Paavo Helde wrote:
On 18.02.2025 01:17, Chris M. Thomasson wrote:
...
Seamed to work fine, but compilation produced some warnings about the
CT_WAIT macro.
 
 
Build started at 08:55...
1>------ Build started: Project: ConsoleTest2022, Configuration: Release
x64 ------
1>futex-stack-test.cpp
1>C:\Test\ConsoleTestVS2022\ConsoleTest2022\futex-stack-test.cpp(55,25):
warning C4312: 'type cast': conversion from 'unsigned int' to 'ct_node
*' of greater size
1>C:\Test\ConsoleTestVS2022\ConsoleTest2022\futex-stack-test.cpp(71,21):
warning C4312: 'type cast': conversion from 'unsigned int' to 'ct_node
*' of greater size
1>C:\Test\ConsoleTestVS2022\ConsoleTest2022\futex-stack-test.cpp(87,38):
warning C4312: 'type cast': conversion from 'unsigned int' to 'ct_node
*' of greater size
1>C:\Test\ConsoleTestVS2022\ConsoleTest2022\futex-stack-test.cpp(90,40):
warning C4312: 'type cast': conversion from 'unsigned int' to 'ct_node
*' of greater size
1>C:\Test\ConsoleTestVS2022\ConsoleTest2022\futex-stack-test.cpp(92,39):
warning C4312: 'type cast': conversion from 'unsigned int' to 'ct_node
*' of greater size
1>C:\Test\ConsoleTestVS2022\ConsoleTest2022\futex-stack-test.cpp(94,33):
warning C4312: 'type cast': conversion from 'unsigned int' to 'ct_node
*' of greater size
1>C:\Test\ConsoleTestVS2022\ConsoleTest2022\futex-stack-test.cpp(185,38):
warning C4312: 'type cast': conversion from 'unsigned int' to 'ct_node
*' of greater size
...
#define CT_WAIT ((ct_node*)0xDEADBEEF)

That should be a reinterpret_cast<>. Correcting that gets rid of all of
those messages.

Also, the following expressions should all use static_cast<>:
         ct_work* head = (ct_work*)shared.m_stack_in.flush_wait();
...
             ct_work* next = (ct_work*)head->m_next;
...
                 ct_work* head = (ct_work*)shared.m_stack_out.flush_wait();
...
                     ct_work* next = (ct_work*)head->m_next;
...
             ct_work* head =
(ct_work*)shared.m_stack_in.m_head.load(std::memory_order_relaxed);
...
                 ct_work* next = (ct_work*)head->m_next


Date Sujet#  Auteur
18 Feb 25 * Futex Stack Test...20Chris M. Thomasson
18 Feb 25 +* Re: Futex Stack Test...5Paavo Helde
18 Feb 25 i+* Re: Futex Stack Test...2James Kuyper
19 Feb 25 ii`- Re: Futex Stack Test...1Chris M. Thomasson
19 Feb 25 i+- Re: Futex Stack Test...1Chris M. Thomasson
28 Feb 25 i`- Re: Futex Stack Test...1Chris M. Thomasson
2 May 25 `* Re: Futex Stack Test...14Wuns Haerst
2 May 25  +* Re: Futex Stack Test...2Chris M. Thomasson
2 May 25  i`- Re: Futex Stack Test...1Chris M. Thomasson
3 May 25  `* Re: Futex Stack Test...11Chris M. Thomasson
3 May 25   `* Re: Futex Stack Test...10Wuns Haerst
3 May 25    `* Re: Futex Stack Test...9Bonita Montero
3 May 25     `* Re: Futex Stack Test...8Chris M. Thomasson
3 May 25      `* Re: Futex Stack Test...7Bonita Montero
3 May 25       `* Re: Futex Stack Test...6Chris M. Thomasson
4 May 25        `* Re: Futex Stack Test...5Chris M. Thomasson
8 May 25         +* Re: Futex Stack Test...2Bonita Montero
8 May 25         i`- Re: Futex Stack Test...1Chris M. Thomasson
8 May 25         `* Re: Futex Stack Test...2jseigh
10 May 25          `- Re: Futex Stack Test...1Chris M. Thomasson

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal