pdcomm_gem300_capability_catalog_snapshot
Function
Copies the complete ordered catalog contents into a new snapshot.
PdcommStatus pdcomm_gem300_capability_catalog_snapshot(const PdcommGem300CapabilityCatalog *catalog, PdcommGem300CapabilitySnapshot **out)Parameters
| Name | Description |
|---|---|
catalog | Live catalog. |
out | Receives the snapshot. Set to NULL first, so it is NULL after every failure. |
Returns
#PDCOMM_OK on success; #PDCOMM_INVALID_ARGUMENT when out or catalog is NULL; #PDCOMM_ALLOCATION_FAILED when the copy cannot be allocated; #PDCOMM_INTERNAL_ERROR when a panic was contained.
Notes
- Ownership: release the snapshot with pdcomm_gem300_capability_snapshot_destroy(). It stays valid after the catalog is replaced, cleared, or destroyed.
- Thread safety: may run concurrently with other read-only calls, but not with replace, clear, or destroy.