tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: passive references
Date: Tue, 9 Feb 2016 16:07:32 +0000
From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
You shouldn't call psref_target_drain twice, unless you have already
called psref_target_destroy and psref_target_init again. You should:
1. Guarantee that no new references can be made. For example, remove
the object in question from a list.
2. Call psref_target_drain (once) to wait for existing references to
drain.
3. Call psref_target_destroy to destroy the psref target.
I can't remember now why I separated the drain and destroy operations,
since there's nothing that needs to happen between them. Maybe there
should just be one operation.
Home |
Main Index |
Thread Index |
Old Index