NVIDIA Software Communications Interface (SCI) : NvSciSync
The NvSciSync library allows applications to manage synchronization objects which coordinate when sequences of operations begin and end.
Definition in file nvscisync.h.
Go to the source code of this file.
Data Structures | |
struct | NvSciSyncFence |
Defines the opaque NvSciSyncFence. More... | |
struct | NvSciSyncFenceIpcExportDescriptor |
Defines the exported form of NvSciSyncFence intended to be shared across an NvSciIpc channel. More... | |
struct | NvSciSyncObjIpcExportDescriptor |
Defines the exported form of NvSciSyncObj intended to be shared across an NvSciIpc channel. More... | |
struct | NvSciSyncAttrKeyValuePair |
This structure defines a key/value pair used to get or set the NvSciSyncAttrKey(s) and their corresponding values from or to NvSciSyncAttrList. More... | |
Typedefs | |
typedef struct NvSciSyncModuleRec * | NvSciSyncModule |
Represents an instance of the NvSciSyncModule. More... | |
typedef struct NvSciSyncCpuWaitContextRec * | NvSciSyncCpuWaitContext |
Represents the right to perform a CPU wait on an NvSciSyncFence. More... | |
typedef struct NvSciSyncObjRec * | NvSciSyncObj |
A Synchronization Object is a container holding the reconciled NvSciSyncAttrList defining constraints of the Fence and the handle of the actual Primitive, with access permissions being enforced by the NvSciSyncAttrKey_RequiredPerm and NvSciSyncAttrKey_NeedCpuAccess Attribute Keys. More... | |
typedef const struct NvSciSyncObjRec * | NvSciSyncObjConst |
A reference to an immutable Synchronization Object. More... | |
typedef struct NvSciSyncAttrListRec * | NvSciSyncAttrList |
A container constituting an NvSciSyncAttrList which contains: More... | |
Enumerations | |
enum | NvSciSyncAccessPerm { NvSciSyncAccessPerm_WaitOnly = (uint64_t)1U << 0U, NvSciSyncAccessPerm_SignalOnly = (uint64_t)1U << 1U, NvSciSyncAccessPerm_WaitSignal = NvSciSyncAccessPerm_WaitOnly | NvSciSyncAccessPerm_SignalOnly, NvSciSyncAccessPerm_Auto = (uint64_t)1U << 63U } |
Describes NvSciSyncObj access permissions. More... | |
enum | NvSciSyncAttrKey { NvSciSyncAttrKey_LowerBound, NvSciSyncAttrKey_NeedCpuAccess, NvSciSyncAttrKey_RequiredPerm, NvSciSyncAttrKey_ActualPerm, NvSciSyncAttrKey_WaiterContextInsensitiveFenceExports, NvSciSyncAttrKey_WaiterRequireTimestamps, NvSciSyncAttrKey_UpperBound } |
Describes the NvSciSync public attribute keys holding corresponding values specifying synchronization object constraints. More... | |
Functions | |
NvSciError | NvSciSyncModuleOpen (NvSciSyncModule *newModule) |
Initializes and returns a new NvSciSyncModule with no NvSciSyncAttrLists, NvSciSyncCpuWaitContexts, NvSciSyncObjs or NvSciSyncFences bound to it. More... | |
void | NvSciSyncModuleClose (NvSciSyncModule module) |
Releases an instance of the NvSciSyncModule that was obtained through an earlier call to NvSciSyncModuleOpen(). More... | |
NvSciError | NvSciSyncCpuWaitContextAlloc (NvSciSyncModule module, NvSciSyncCpuWaitContext *newContext) |
Allocates a new NvSciSyncCpuWaitContext. More... | |
void | NvSciSyncCpuWaitContextFree (NvSciSyncCpuWaitContext context) |
Releases the NvSciSyncCpuWaitContext. More... | |
NvSciError | NvSciSyncAttrListCreate (NvSciSyncModule module, NvSciSyncAttrList *attrList) |
Creates a new, single-slot unreconciled NvSciSyncAttrList associated with the input NvSciSyncModule with empty NvSciSyncAttrKeys. More... | |
void | NvSciSyncAttrListFree (NvSciSyncAttrList attrList) |
Frees the NvSciSyncAttrList and removes its association with the NvSciSyncModule with which it was created. More... | |
NvSciError | NvSciSyncAttrListIsReconciled (NvSciSyncAttrList attrList, bool *isReconciled) |
Checks if the NvSciSyncAttrList is reconciled. More... | |
NvSciError | NvSciSyncAttrListValidateReconciled (NvSciSyncAttrList reconciledAttrList, const NvSciSyncAttrList inputUnreconciledAttrListArray[], size_t inputUnreconciledAttrListCount, bool *isReconciledListValid) |
Validates a reconciled NvSciSyncAttrList against a set of input unreconciled NvSciSyncAttrLists. More... | |
NvSciError | NvSciSyncAttrListSetAttrs (NvSciSyncAttrList attrList, const NvSciSyncAttrKeyValuePair *pairArray, size_t pairCount) |
Sets the values for NvSciSyncAttrKey(s) in slot 0 of the input NvSciSyncAttrList. More... | |
NvSciError | NvSciSyncAttrListGetAttrs (NvSciSyncAttrList attrList, NvSciSyncAttrKeyValuePair *pairArray, size_t pairCount) |
Gets the value of NvSciSyncAttrKey from slot 0 of the input NvSciSyncAttrList. More... | |
size_t | NvSciSyncAttrListGetSlotCount (NvSciSyncAttrList attrList) |
Gets the slot count per NvSciSyncAttrKey in a NvSciSyncAttrList. More... | |
NvSciError | NvSciSyncAttrListAppendUnreconciled (const NvSciSyncAttrList inputUnreconciledAttrListArray[], size_t inputUnreconciledAttrListCount, NvSciSyncAttrList *newUnreconciledAttrList) |
Appends multiple unreconciled NvSciSyncAttrLists together, forming a single new unreconciled NvSciSyncAttrList with a slot count equal to the sum of all the slot counts of NvSciSyncAttrList(s) in the input array. More... | |
NvSciError | NvSciSyncAttrListClone (NvSciSyncAttrList origAttrList, NvSciSyncAttrList *newAttrList) |
Clones an NvSciSyncAttrList. More... | |
NvSciError | NvSciSyncAttrListSlotGetAttrs (NvSciSyncAttrList attrList, size_t slotIndex, NvSciSyncAttrKeyValuePair *pairArray, size_t pairCount) |
Gets the value(s) of NvSciSyncAttrKey(s) from an NvSciSyncAttrList at given slot index in a multi-slot unreconciled NvSciSyncAttrList. More... | |
NvSciError | NvSciSyncAttrListReconcile (const NvSciSyncAttrList inputArray[], size_t inputCount, NvSciSyncAttrList *newReconciledList, NvSciSyncAttrList *newConflictList) |
Reconciles the input unreconciled NvSciSyncAttrLists into a new reconciled NvSciSyncAttrList. More... | |
NvSciError | NvSciSyncAttrListDebugDump (NvSciSyncAttrList attrList, void **buf, size_t *len) |
Dumps the NvSciSyncAttrList into a binary descriptor. More... | |
NvSciError | NvSciSyncAttrListIpcExportUnreconciled (const NvSciSyncAttrList unreconciledAttrListArray[], size_t unreconciledAttrListCount, NvSciIpcEndpoint ipcEndpoint, void **descBuf, size_t *descLen) |
Transforms the input unreconciled NvSciSyncAttrList(s) to an exportable unreconciled NvSciSyncAttrList descriptor that can be transported by the application to any remote process as a serialized set of bytes over an NvSciIpc channel. More... | |
NvSciError | NvSciSyncAttrListIpcExportReconciled (const NvSciSyncAttrList reconciledAttrList, NvSciIpcEndpoint ipcEndpoint, void **descBuf, size_t *descLen) |
Transforms the reconciled NvSciSyncAttrList to an exportable reconciled NvSciSyncAttrList descriptor that can be transported by the application to any remote process as a serialized set of bytes over an NvSciIpc channel. More... | |
NvSciError | NvSciSyncAttrListIpcImportUnreconciled (NvSciSyncModule module, NvSciIpcEndpoint ipcEndpoint, const void *descBuf, size_t descLen, NvSciSyncAttrList *importedUnreconciledAttrList) |
Transforms an exported unreconciled NvSciSyncAttrList descriptor (potentially received from any process) into an unreconciled NvSciSyncAttrList. More... | |
NvSciError | NvSciSyncAttrListIpcImportReconciled (NvSciSyncModule module, NvSciIpcEndpoint ipcEndpoint, const void *descBuf, size_t descLen, const NvSciSyncAttrList inputUnreconciledAttrListArray[], size_t inputUnreconciledAttrListCount, NvSciSyncAttrList *importedReconciledAttrList) |
Translates an exported reconciled NvSciSyncAttrList descriptor (potentially received from any process) into a reconciled NvSciSyncAttrList. More... | |
void | NvSciSyncAttrListFreeDesc (void *descBuf) |
Frees an exported NvSciSyncAttrList descriptor previously returned by any NvSciSyncAttrList exporting function. More... | |
void | NvSciSyncFenceClear (NvSciSyncFence *syncFence) |
Frees any resources allocated for the NvSciSyncFence. More... | |
NvSciError | NvSciSyncFenceDup (const NvSciSyncFence *srcSyncFence, NvSciSyncFence *dstSyncFence) |
Duplicates the given NvSciSyncFence, such that any wait on duplicated NvSciSyncFence will complete at the same time as a wait on given NvSciSyncFence. More... | |
NvSciError | NvSciSyncObjAlloc (NvSciSyncAttrList reconciledList, NvSciSyncObj *syncObj) |
Allocates and initializes a NvSciSyncObj that meets all the constraints specified in the given Reconciled NvSciSyncAttrList. More... | |
NvSciError | NvSciSyncObjDup (NvSciSyncObj syncObj, NvSciSyncObj *dupObj) |
Creates a new NvSciSyncObj holding a reference to the original resources to which the input NvSciSyncObj holds reference to. More... | |
NvSciError | NvSciSyncObjGetAttrList (NvSciSyncObj syncObj, NvSciSyncAttrList *syncAttrList) |
Retrieves the Reconciled NvSciSyncAttrList associated with an input NvSciSyncObj. More... | |
void | NvSciSyncObjFree (NvSciSyncObj syncObj) |
Destroys a valid NvSciSyncObj and frees any resources that were allocated for it. More... | |
NvSciError | NvSciSyncObjIpcExport (NvSciSyncObj syncObj, NvSciSyncAccessPerm permissions, NvSciIpcEndpoint ipcEndpoint, NvSciSyncObjIpcExportDescriptor *desc) |
Exports an NvSciSyncObj into an NvSciIpc-transferable object binary descriptor. More... | |
NvSciError | NvSciSyncObjIpcImport (NvSciIpcEndpoint ipcEndpoint, const NvSciSyncObjIpcExportDescriptor *desc, NvSciSyncAttrList inputAttrList, NvSciSyncAccessPerm permissions, int64_t timeoutUs, NvSciSyncObj *syncObj) |
Creates and returns an NvSciSyncObj based on the supplied binary descriptor describing an exported NvSciSyncObj. More... | |
NvSciError | NvSciSyncIpcExportFence (const NvSciSyncFence *syncFence, NvSciIpcEndpoint ipcEndpoint, NvSciSyncFenceIpcExportDescriptor *desc) |
Exports the input NvSciSyncFence into a binary descriptor shareable across the NvSciIpc channel. More... | |
NvSciError | NvSciSyncIpcImportFence (NvSciSyncObj syncObj, const NvSciSyncFenceIpcExportDescriptor *desc, NvSciSyncFence *syncFence) |
Fills in the NvSciSyncFence based on the input binary descriptor. More... | |
NvSciError | NvSciSyncObjGenerateFence (NvSciSyncObj syncObj, NvSciSyncFence *syncFence) |
Generates next point on sync timeline of an NvSciSyncObj and fills in the supplied NvSciSyncFence object. More... | |
NvSciError | NvSciSyncObjSignal (NvSciSyncObj syncObj) |
Signals the NvSciSyncObj using the reconciled primitive that was allocated along with the NvSciSyncObj. More... | |
NvSciError | NvSciSyncFenceWait (const NvSciSyncFence *syncFence, NvSciSyncCpuWaitContext context, int64_t timeoutUs) |
Performs a synchronous wait on the NvSciSyncFence object until the NvSciSyncFence has been signaled or the timeout expires. More... | |
NvSciError | NvSciSyncFenceGetTimestamp (const NvSciSyncFence *syncFence, uint64_t *timestampUS) |
Read the timestamp associated with the NvSciSyncFence. More... | |
NvSciError | NvSciSyncAttrListGetAttr (NvSciSyncAttrList attrList, NvSciSyncAttrKey key, const void **value, size_t *len) |
Gets the attribute value from the slot 0 of the passed NvSciSyncAttrList with the given NvSciSyncAttrKey. More... | |
NvSciError | NvSciSyncAttrListReconcileAndObjAlloc (const NvSciSyncAttrList inputArray[], size_t inputCount, NvSciSyncObj *syncObj, NvSciSyncAttrList *newConflictList) |
Reconciles the input Unreconciled NvSciSyncAttrList(s) into a new Reconciled NvSciSyncAttrList. More... | |
NvSciError | NvSciSyncIpcExportAttrListAndObj (NvSciSyncObj syncObj, NvSciSyncAccessPerm permissions, NvSciIpcEndpoint ipcEndpoint, void **attrListAndObjDesc, size_t *attrListAndObjDescSize) |
Exports an NvSciSyncAttrList and NvSciSyncObj into an NvSciIpc-transferable object binary descriptor pointed to by data. More... | |
void | NvSciSyncAttrListAndObjFreeDesc (void *attrListAndObjDescBuf) |
Frees an NvSciSyncIpcExportAttrListAndObj descriptor returned by a successful call to NvSciSyncIpcExportAttrListAndObj. More... | |
NvSciError | NvSciSyncIpcImportAttrListAndObj (NvSciSyncModule module, NvSciIpcEndpoint ipcEndpoint, const void *attrListAndObjDesc, size_t attrListAndObjDescSize, NvSciSyncAttrList const attrList[], size_t attrListCount, NvSciSyncAccessPerm minPermissions, int64_t timeoutUs, NvSciSyncObj *syncObj) |
Creates an NvSciSyncObj based on the supplied binary descriptor returned from a successful call to NvSciSyncIpcExportAttrListAndObj that has not yet been freed via NvSciSyncAttrListAndObjFreeDesc. More... | |
NvSciError | NvSciSyncCheckVersionCompatibility (uint32_t majorVer, uint32_t minorVer, bool *isCompatible) |
Checks if loaded library version is compatible with the supplied library build version. More... | |
Variables | |
static const uint32_t | NvSciSyncMajorVersion = 2U |
NvSciSync major version number. More... | |
static const uint32_t | NvSciSyncMinorVersion = 0U |
NvSciSync minor version number. More... | |
static const int64_t | NvSciSyncFenceMaxTimeout = (0x7fffffffffffffff / 1000) |
Maximum supported timeout value. More... | |
static const NvSciSyncFence | NvSciSyncFenceInitializer = {{0U}} |
Defines the value used to zero-initialize the NvSciSyncFence object. More... | |