class Sync
Defined at line 940 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/cpp/fidl/fuchsia.sysmem2/cpp/markers.h
Ensure that previous messages have been received server side. This is
particularly useful after previous messages that created new tokens,
because a token must be known to the sysmem server before sending the
token to another participant.
Calling [`fuchsia.sysmem2/BufferCollectionToken.Sync`] on a token that
isn't/wasn't a valid token risks the `Sync` stalling forever. See
[`fuchsia.sysmem2/Allocator.ValidateBufferCollectionToken`] for one way
to mitigate the possibility of a hostile/fake
[`fuchsia.sysmem2/BufferCollectionToken`] at the cost of one round trip.
Another way is to pass the token to
[`fuchsia.sysmem2/Allocator/BindSharedCollection`], which also validates
the token as part of exchanging it for a
[`fuchsia.sysmem2/BufferCollection`] channel, and
[`fuchsia.sysmem2/BufferCollection.Sync`] can then be used without risk
of stalling.
After creating one or more [`fuchsia.sysmem2/BufferCollectionToken`](s)
and then starting and completing a `Sync`, it's then safe to send the
`BufferCollectionToken` client ends to other participants knowing the
server will recognize the tokens when they're sent by the other
participants to sysmem in a
[`fuchsia.sysmem2/Allocator.BindSharedCollection`] message. This is an
efficient way to create tokens while avoiding unnecessary round trips.
Other options include waiting for each
[`fuchsia.sysmem2/BufferCollectionToken.Duplicate`] to complete
individually (using separate call to `Sync` after each), or calling
[`fuchsia.sysmem2/BufferCollection.Sync`] after a token has been
converted to a `BufferCollection` via
[`fuchsia.sysmem2/Allocator.BindSharedCollection`], or using
[`fuchsia.sysmem2/BufferCollectionToken.DuplicateSync`] which includes
the sync step and can create multiple tokens at once.
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