[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 03/11] include: add lock-less reference counting primitives
From: |
Richard Braun |
Subject: |
Re: [PATCH 03/11] include: add lock-less reference counting primitives |
Date: |
Tue, 13 May 2014 14:01:59 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, May 13, 2014 at 12:56:03PM +0200, Samuel Thibault wrote:
> > > AIUI this cast is a case of type-puning. Why not making refcounts_t the
> > > union itself? That way would be clearly safe with gcc's extension.
> >
> > As stated in the comment for refcounts_t, I like the idea of using the
> > type system to enforce the use of the accessor functions.
>
> I understand, but type-puning will break with smart compilers. We do
> have had bugs like that in the past.
I agree, you should directly use the proper type here, or maybe void *
but I don't see the point.
--
Richard Braun
- Re: [PATCH 07/11] libihash: use an integer hash function on the keys, (continued)
[PATCH 03/11] include: add lock-less reference counting primitives, Justus Winter, 2014/05/12
Re: [PATCH 03/11] include: add lock-less reference counting primitives, Samuel Thibault, 2014/05/12
Re: [PATCH 03/11] include: add lock-less reference counting primitives, Neal H. Walfield, 2014/05/13
Re: [PATCH 03/11] include: add lock-less reference counting primitives, Neal H. Walfield, 2014/05/13
Re: [PATCH 03/11] include: add lock-less reference counting primitives, Samuel Thibault, 2014/05/13
Re: [PATCH 03/11] include: add lock-less reference counting primitives, Neal H. Walfield, 2014/05/13
[PATCH 06/11] libtrivfs: lock-less reference counting for trivfs_peropen objects, Justus Winter, 2014/05/12
[PATCH 02/11] libports: use a single hash table, Justus Winter, 2014/05/12