Quoting Samuel Thibault (2014-05-13 12:55:29)
> Justus Winter, le Tue 13 May 2014 12:52:03 +0200, a écrit :
> > Quoting Neal H. Walfield (2014-05-13 09:44:21)
> > > At Mon, 12 May 2014 12:05:41 +0200,
> > > Justus Winter wrote:
> > > > +/* Decrement REF. Return the result of the operation. This f
Richard Braun, le Tue 13 May 2014 14:01:59 +0200, a écrit :
> 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
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
>
At Tue, 13 May 2014 13:47:51 +0200,
Samuel Thibault wrote:
>
> Neal H. Walfield, le Tue 13 May 2014 13:44:37 +0200, a écrit :
> > At Tue, 13 May 2014 12:52:03 +0200,
> > Justus Winter wrote:
> > > Quoting Neal H. Walfield (2014-05-13 09:44:21)
> > > > At Mon, 12 May 2014 12:05:41 +0200,
> > > > Ju
Neal H. Walfield, le Tue 13 May 2014 13:44:37 +0200, a écrit :
> At Tue, 13 May 2014 12:52:03 +0200,
> Justus Winter wrote:
> > Quoting Neal H. Walfield (2014-05-13 09:44:21)
> > > At Mon, 12 May 2014 12:05:41 +0200,
> > > Justus Winter wrote:
> > > > +/* Decrement REF. Return the result of the op
At Tue, 13 May 2014 12:52:03 +0200,
Justus Winter wrote:
>
> Quoting Neal H. Walfield (2014-05-13 09:44:21)
> > At Mon, 12 May 2014 12:05:41 +0200,
> > Justus Winter wrote:
> > > +/* Decrement REF. Return the result of the operation. This function
> > > + uses atomic operations. It is not req
Justus Winter, le Tue 13 May 2014 12:50:54 +0200, a écrit :
> Quoting Samuel Thibault (2014-05-13 01:04:13)
> > Justus Winter, le Mon 12 May 2014 12:05:41 +0200, a écrit :
> > > +/* An opaque type. You must not access these values directly. */
> > > +typedef uint64_t refcounts_t;
> > > +
> > > +/
Justus Winter, le Tue 13 May 2014 12:52:03 +0200, a écrit :
> Quoting Neal H. Walfield (2014-05-13 09:44:21)
> > At Mon, 12 May 2014 12:05:41 +0200,
> > Justus Winter wrote:
> > > +/* Decrement REF. Return the result of the operation. This function
> > > + uses atomic operations. It is not req
Quoting Neal H. Walfield (2014-05-13 09:44:21)
> At Mon, 12 May 2014 12:05:41 +0200,
> Justus Winter wrote:
> > +/* Decrement REF. Return the result of the operation. This function
> > + uses atomic operations. It is not required to serialize calls to
> > + this function. */
> > +static inl
Quoting Samuel Thibault (2014-05-13 01:04:13)
> Justus Winter, le Mon 12 May 2014 12:05:41 +0200, a écrit :
> > +/* An opaque type. You must not access these values directly. */
> > +typedef uint64_t refcounts_t;
> > +
> > +/* Instead, the functions manipulating refcounts_t values write the
> > +
At Mon, 12 May 2014 12:05:41 +0200,
Justus Winter wrote:
> +/* Decrement REF. Return the result of the operation. This function
> + uses atomic operations. It is not required to serialize calls to
> + this function. */
> +static inline unsigned int
> +refcount_deref (refcount_t *ref)
> +{
>
Justus Winter, le Mon 12 May 2014 12:05:41 +0200, a écrit :
> +/* An opaque type. You must not access these values directly. */
> +typedef uint64_t refcounts_t;
> +
> +/* Instead, the functions manipulating refcounts_t values write the
> + results into this kind of objects. */
> +struct refere
Richard Braun, le Tue 13 May 2014 00:36:44 +0200, a écrit :
> On Tue, May 13, 2014 at 12:23:48AM +0200, Samuel Thibault wrote:
> > Justus Winter, le Mon 12 May 2014 12:05:41 +0200, a écrit :
> > > + const union _references op = { .refs = { .hard = 1 } };
> > > + refcounts_t r = __atomic_add_fetch
On Tue, May 13, 2014 at 12:23:48AM +0200, Samuel Thibault wrote:
> Justus Winter, le Mon 12 May 2014 12:05:41 +0200, a écrit :
> > + const union _references op = { .refs = { .hard = 1 } };
> > + refcounts_t r = __atomic_add_fetch (ref, op.rc, __ATOMIC_RELAXED);
>
> Mmm, I don't think it is allow
Justus Winter, le Mon 12 May 2014 12:05:41 +0200, a écrit :
> + const union _references op = { .refs = { .hard = 1 } };
> + refcounts_t r = __atomic_add_fetch (ref, op.rc, __ATOMIC_RELAXED);
Mmm, I don't think it is allowed by C to write into a field and read
from another field. The legacy Hurd
15 matches
Mail list logo