class SetWeakOk
Defined at line 1428 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/cpp/fidl/fuchsia.sysmem2/cpp/markers.h
This indicates to sysmem that the client is prepared to pay attention to
`close_weak_asap`.
If sent, this message must be before
[`fuchsia.sysmem2/BufferCollection.WaitForAllBuffersAllocated`].
All participants using a weak [`fuchsia.sysmem2/BufferCollection`] must
send this message before `WaitForAllBuffersAllocated`, or a parent
`Node` must have sent [`fuchsia.sysmem2/Node.SetWeakOk`] with
`for_child_nodes_also` true, else the `WaitForAllBuffersAllocated` will
trigger buffer collection failure.
This message is necessary because weak sysmem VMOs have not always been
a thing, so older clients are not aware of the need to pay attention to
`close_weak_asap` `ZX_EVENTPAIR_PEER_CLOSED` and close all remaining
sysmem weak VMO handles asap. By having this message and requiring
participants to indicate their acceptance of this aspect of the overall
protocol, we avoid situations where an older client is delivered a weak
VMO without any way for sysmem to get that VMO to close quickly later
(and on a per-buffer basis).
A participant that doesn't handle `close_weak_asap` and also doesn't
retrieve any VMO handles via `WaitForAllBuffersAllocated` doesn't need
to send `SetWeakOk` (and doesn't need to have a parent `Node` send
`SetWeakOk` with `for_child_nodes_also` true either). However, if that
same participant has a child/delegate which does retrieve VMOs, that
child/delegate will need to send `SetWeakOk` before
`WaitForAllBuffersAllocated`.
+ request `for_child_nodes_also` If present and true, this means direct
child nodes of this node created after this message plus all
descendants of those nodes will behave as if `SetWeakOk` was sent on
those nodes. Any child node of this node that was created before this
message is not included. This setting is "sticky" in the sense that a
subsequent `SetWeakOk` without this bool set to true does not reset
the server-side bool. If this creates a problem for a participant, a
workaround is to `SetWeakOk` with `for_child_nodes_also` true on child
tokens instead, as appropriate. A participant should only set
`for_child_nodes_also` true if the participant can really promise to
obey `close_weak_asap` both for its own weak VMO handles, and for all
weak VMO handles held by participants holding the corresponding child
`Node`(s). When `for_child_nodes_also` is set, descendent `Node`(s)
which are using sysmem(1) can be weak, despite the clients of those
sysmem1 `Node`(s) not having any direct way to `SetWeakOk` or any
direct way to find out about `close_weak_asap`. This only applies to
descendents of this `Node` which are using sysmem(1), not to this
`Node` when converted directly from a sysmem2 token to a sysmem(1)
token, which will fail allocation unless an ancestor of this `Node`
specified `for_child_nodes_also` true.
Public Members
static const bool kHasClientToServer
static const bool kHasClientToServerBody
static const bool kHasServerToClient
static const bool kHasServerToClientBody
static const bool kHasNonEmptyUserFacingResponse
static const bool kHasDomainError
static const bool kHasFrameworkError
static const uint64_t kOrdinal