tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: passive references



On Tue, Feb 2, 2016 at 9:53 AM, Taylor R Campbell <riastradh%netbsd.org@localhost> wrote:
>    Date: Mon, 1 Feb 2016 14:58:05 +0900
>    From: Ryota Ozaki <ozaki-r%netbsd.org@localhost>
>
>    On Sat, Jan 30, 2016 at 12:43 AM, Taylor R Campbell
>    <riastradh%netbsd.org@localhost> wrote:
>    >    Date: Fri, 29 Jan 2016 17:39:13 +0900
>    >    From: Ryota Ozaki <ozaki-r%netbsd.org@localhost>
>    >
>    >    I'm thinking applying psref to bridge member list
>    >    that is now using its own version of similar mechanism
>    >    (psz + refcount).
>    >
>    > Nice!  That sounds like a good application to test, since most of the
>    > work has been done already and it's mainly a matter of replacing a
>    > refcount by a psref.
>
>    I'm happy if there is a patch of psref.c to -current :)
>
> Here you go, attached!  I even compile-tested this one.

Thanks!

One fix: psref_class_create needs to return class before fail1.

One question: can we destroy objects like this?:
  LIST_FOREACH_SAFE(frotz, &frobbotzim.head, frotz_entry, tmp) {
    frotz_destroy(frotz);
  }

If impossible, please teach me how to destroy all objects in a list
safely with psref.

Thanks,
  ozaki-r


Home | Main Index | Thread Index | Old Index