Thread View: comp.lang.c++
8 messages
8 total messages
Started by Bonita Montero
Wed, 07 Oct 2026 03:19
Re: Consequential RCU
Author: Bonita Montero
Date: Wed, 07 Oct 2026 03:19
Date: Wed, 07 Oct 2026 03:19
8 lines
1796 bytes
1796 bytes
Am 06.10.2026 um 22:15 schrieb Chris M. Thomasson: > It seems like you are trying to compare using RCU to actually implement > a strong atomic ref counted pointer. Of course RCU s not needed for > that. Afaict, you might be missing the forest for the trees? You don't understand my idea.
Re: Consequential RCU
Author: Chris M. Thomasson
Date: Wed, 07 Oct 2026 04:29
Date: Wed, 07 Oct 2026 04:29
12 lines
1990 bytes
1990 bytes
On 10/6/2026 8:19 PM, Bonita Montero wrote: > Am 06.10.2026 um 22:15 schrieb Chris M. Thomasson: > >> It seems like you are trying to compare using RCU to actually >> implement a strong atomic ref counted pointer. Of course RCU s not >> needed for that. Afaict, you might be missing the forest for the trees? > > You don't understand my idea. > Are you trying to make a strong atomic ref count safe or not? RCU really does not have to have anything to do with that.
Re: Consequential RCU
Author: Bonita Montero
Date: Wed, 07 Oct 2026 13:01
Date: Wed, 07 Oct 2026 13:01
8 lines
1873 bytes
1873 bytes
Am 07.10.2026 um 06:29 schrieb Chris M. Thomasson: > Are you trying to make a strong atomic ref count safe or not? > RCU really does not have to have anything to do with that. My idea is totally different from RCU, but you can do the same thing with it with nearly no overhad.
Re: Consequential RCU
Author: Chris M. Thomasson
Date: Wed, 07 Oct 2026 20:12
Date: Wed, 07 Oct 2026 20:12
12 lines
2036 bytes
2036 bytes
On 10/7/2026 6:01 AM, Bonita Montero wrote: > Am 07.10.2026 um 06:29 schrieb Chris M. Thomasson: > >> Are you trying to make a strong atomic ref count safe or not? >> RCU really does not have to have anything to do with that. > > My idea is totally different from RCU, but you can do the same > thing with it with nearly no overhad. > So, you are making a proxy collector? I am quite fond of them. Joe knows all about them.
Re: Consequential RCU
Author: Bonita Montero
Date: Thu, 08 Oct 2026 03:57
Date: Thu, 08 Oct 2026 03:57
7 lines
1877 bytes
1877 bytes
Am 07.10.2026 um 22:12 schrieb Chris M. Thomasson: > So, you are making a proxy collector? I am quite fond of them. Joe knows > all about them. I think Joe understood my idea and you didn't.
Re: Consequential RCU
Author: Chris M. Thomasson
Date: Thu, 08 Oct 2026 18:41
Date: Thu, 08 Oct 2026 18:41
45 lines
3039 bytes
3039 bytes
On 10/7/2026 8:57 PM, Bonita Montero wrote:
> Am 07.10.2026 um 22:12 schrieb Chris M. Thomasson:
>
>> So, you are making a proxy collector? I am quite fond of them. Joe
>> knows all about them.
>
> I think Joe understood my idea and you didn't.
>
I think you should use his atomic_ptr and be done with it. It pure
lock-free. Yours is not:
____________
NOINLINE void shared_obj<T, ThreadMode>::slowAssign( const
tshared_obj<T, ThreadMode> &tso, data *pDtaRef ) noexcept
{
using namespace std;
for( ; ; )
{
if( !pDtaRef )
{
data *pData = m_pData;
if( pData && pData->decr() )
delete pData;
m_pData = nullptr;
return;
}
if( pDtaRef == (data *)-1 )
{
tso.m_pAtmData.wait( pDtaRef );
pDtaRef = tso.m_pAtmData.load( memory_order_relaxed );
}
else if( tso.m_pAtmData.compare_exchange_strong( pDtaRef, (data
*)-1, memory_order_relaxed, memory_order_relaxed ) ) [[likely]]
break;
if( m_pData == pDtaRef )
return;
}
m_pData = pDtaRef;
m_pData->incr( memory_order_acquire );
tso.m_pAtmData.store( pDtaRef, memory_order_relaxed );
tso.m_pAtmData.notify_all();
}
____________
Sigh.
Re: Consequential RCU
Author: Bonita Montero
Date: Fri, 09 Oct 2026 06:16
Date: Fri, 09 Oct 2026 06:16
6 lines
2157 bytes
2157 bytes
Am 08.10.2026 um 20:41 schrieb Chris M. Thomasson: > I think you should use his atomic_ptr and be done with it. It pure lock- > free. Yours is not: ... Sick !
Re: Consequential RCU
Author: Chris M. Thomasson
Date: Mon, 19 Oct 2026 19:07
Date: Mon, 19 Oct 2026 19:07
9 lines
2055 bytes
2055 bytes
On 10/8/2026 11:16 PM, Bonita Montero wrote: > Am 08.10.2026 um 20:41 schrieb Chris M. Thomasson: > >> I think you should use his atomic_ptr and be done with it. It pure >> lock- free. Yours is not: ... > > Sick ! Try to get rid of the futex and the notify all for fun.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads