NVIDIA DRIVE OS Linux SDK API Reference

5.1.12.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvscisync.h File Reference

Detailed Description

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 shared across an NvSciIpc channel. More...
 
struct  NvSciSyncObjIpcExportDescriptor
 Defines the exported form of NvSciSyncObj shared across an NvSciIpc channel. More...
 
struct  NvSciSyncAttrKeyValuePair
 Describes the NvSciSyncAttrKey-Value pair. More...
 

Typedefs

typedef struct NvSciSyncModuleRec * NvSciSyncModule
 Represents an instance of the NvSciSync module. More...
 
typedef struct
NvSciSyncCpuWaitContextRec * 
NvSciSyncCpuWaitContext
 Represents the right to perform a CPU wait on an NvSciSyncFence. More...
 
typedef struct NvSciSyncObjRec * NvSciSyncObj
 Holds a pointer to an opaque NvSciSync object. More...
 
typedef struct
NvSciSyncAttrListRec * 
NvSciSyncAttrList
 Holds a pointer to an opaque NvSciSync attribute list. More...
 

Enumerations

enum  NvSciSyncAccessPerm {
  NvSciSyncAccessPerm_WaitOnly,
  NvSciSyncAccessPerm_SignalOnly,
  NvSciSyncAccessPerm_WaitSignal,
  NvSciSyncAccessPerm_Auto
}
 Describes sync object access permissions. More...
 
enum  NvSciSyncAttrKey {
  NvSciSyncAttrKey_LowerBound,
  NvSciSyncAttrKey_NeedCpuAccess,
  NvSciSyncAttrKey_RequiredPerm,
  NvSciSyncAttrKey_ActualPerm,
  NvSciSyncAttrKey_WaiterContextInsensitiveFenceExports,
  NvSciSyncAttrKey_WaiterRequireTimestamps,
  NvSciSyncAttrKey_UpperBound
}
 Describes the types of NvSciSyncAttr keys. More...
 

Functions

NvSciError NvSciSyncModuleOpen (NvSciSyncModule *newModule)
 Initializes an instance of the NvSciSync module within the calling process and provides an NvSciSyncModule representing the instance. More...
 
void NvSciSyncModuleClose (NvSciSyncModule module)
 Releases an instance of the NvSciSync module that was obtained through an earlier call to NvSciSyncModuleOpen(). More...
 
NvSciError NvSciSyncCpuWaitContextAlloc (NvSciSyncModule module, NvSciSyncCpuWaitContext *newContext)
 Allocates a CPU wait context that can be used to perform a CPU wait with NvSciSyncFenceWait(). More...
 
void NvSciSyncCpuWaitContextFree (NvSciSyncCpuWaitContext context)
 Releases a CPU wait context. More...
 
NvSciError NvSciSyncAttrListCreate (NvSciSyncModule module, NvSciSyncAttrList *attrList)
 Creates an attribute list holding the attributes of the NvSciSyncObj to be allocated. More...
 
void NvSciSyncAttrListFree (NvSciSyncAttrList attrList)
 Frees the memory of an attribute list. More...
 
NvSciError NvSciSyncAttrListIsReconciled (NvSciSyncAttrList attrList, bool *isReconciled)
 Returns whether the attribute list is reconciled or unreconciled. More...
 
NvSciError NvSciSyncAttrListValidateReconciled (NvSciSyncAttrList reconciledAttrList, const NvSciSyncAttrList inputUnreconciledAttrListArray[], size_t inputUnreconciledAttrListCount, bool *isReconciledListValid)
 Validates a reconciled attribute list against a set of input unreconciled attribute lists. More...
 
NvSciError NvSciSyncAttrListSetAttrs (NvSciSyncAttrList attrList, const NvSciSyncAttrKeyValuePair *pairArray, size_t pairCount)
 Sets the value of an attribute in an unreconciled attribute list that has not already been set. More...
 
NvSciError NvSciSyncAttrListGetAttrs (NvSciSyncAttrList attrList, NvSciSyncAttrKeyValuePair *pairArray, size_t pairCount)
 Gets the value of attributes from an attribute list. More...
 
size_t NvSciSyncAttrListGetSlotCount (NvSciSyncAttrList attrList)
 Gets the total number of slots contained in a NvSciSyncAttrList. More...
 
NvSciError NvSciSyncAttrListAppendUnreconciled (const NvSciSyncAttrList inputUnreconciledAttrListArray[], size_t inputUnreconciledAttrListCount, NvSciSyncAttrList *newUnreconciledAttrList)
 Appends multiple unreconciled attribute lists together, forming a single new unreconciled attribute list with a slot count equal to the sum of all the slot counts of the input list. More...
 
NvSciError NvSciSyncAttrListClone (NvSciSyncAttrList origAttrList, NvSciSyncAttrList *newAttrList)
 Clones an unreconciled/reconciled attribute list. More...
 
NvSciError NvSciSyncAttrListSlotGetAttrs (NvSciSyncAttrList attrList, size_t slotIndex, NvSciSyncAttrKeyValuePair *pairArray, size_t pairCount)
 Gets the value of attributes from an attribute list at given index in a multi-slot unreconciled attribute list. More...
 
NvSciError NvSciSyncAttrListReconcile (const NvSciSyncAttrList inputArray[], size_t inputCount, NvSciSyncAttrList *newReconciledList, NvSciSyncAttrList *newConflictList)
 Reconciles the input unreconciled attribute list(s) into a new reconciled attribute list. More...
 
NvSciError NvSciSyncAttrListDebugDump (NvSciSyncAttrList attrList, void **buf, size_t *len)
 Dumps the attribute list into a binary blob. More...
 
NvSciError NvSciSyncAttrListIpcExportUnreconciled (const NvSciSyncAttrList unreconciledAttrListArray[], size_t unreconciledAttrListCount, NvSciIpcEndpoint ipcEndpoint, void **descBuf, size_t *descLen)
 Translates the unreconciled attribute list(s) to an exported attribute list descriptor that can potentially be transported by the application to any process as a serialized array of bytes. More...
 
NvSciError NvSciSyncAttrListIpcExportReconciled (const NvSciSyncAttrList reconciledAttrList, NvSciIpcEndpoint ipcEndpoint, void **descBuf, size_t *descLen)
 Translates the reconciled attribute list to an exported attribute list descriptor that can potentially be transported by the application to any process as a serialized array of bytes. More...
 
NvSciError NvSciSyncAttrListIpcImportUnreconciled (NvSciSyncModule module, NvSciIpcEndpoint ipcEndpoint, const void *descBuf, size_t descLen, NvSciSyncAttrList *importedUnreconciledAttrList)
 Translates an exported attribute list descriptor (potentially received from any process) into an attribute list. More...
 
NvSciError NvSciSyncAttrListIpcImportReconciled (NvSciSyncModule module, NvSciIpcEndpoint ipcEndpoint, const void *descBuf, size_t descLen, const NvSciSyncAttrList inputUnreconciledAttrListArray[], size_t inputUnreconciledAttrListCount, NvSciSyncAttrList *importedReconciledAttrList)
 Translates an exported attribute list descriptor (potentially received from any process) into an attribute list. More...
 
void NvSciSyncAttrListFreeDesc (void *descBuf)
 Frees an exported attribute list descriptor previously returned by NvSciSyncAttrListExport(). More...
 
void NvSciSyncFenceClear (NvSciSyncFence *syncFence)
 Frees any resources allocated for the specified fence. More...
 
NvSciError NvSciSyncFenceDup (const NvSciSyncFence *srcSyncFence, NvSciSyncFence *dstSyncFence)
 Duplicates srcSyncFence into dstSyncFence, such that any wait on destSyncFence will complete at the same time as a wait on srcSyncFence. More...
 
NvSciError NvSciSyncObjAlloc (NvSciSyncAttrList reconciledList, NvSciSyncObj *syncObj)
 Allocates a sync object that meets all the constraints in the specified reconciled attribute list. More...
 
NvSciError NvSciSyncObjDup (NvSciSyncObj syncObj, NvSciSyncObj *dupObj)
 Duplicates a valid NvSciSyncObj. More...
 
NvSciError NvSciSyncObjGetAttrList (NvSciSyncObj syncObj, NvSciSyncAttrList *syncAttrList)
 Retrieves the attribute list from an allocated NvSciSync Object. More...
 
void NvSciSyncObjFree (NvSciSyncObj syncObj)
 Destroys the NvSciSync object and all memory that was allocated for it. More...
 
NvSciError NvSciSyncObjIpcExport (NvSciSyncObj syncObj, NvSciSyncAccessPerm permissions, NvSciIpcEndpoint ipcEndpoint, NvSciSyncObjIpcExportDescriptor *desc)
 Exports a NvSciSync object 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 an NvSciSync object based on supplied binary descriptor and returns the sync object. More...
 
NvSciError NvSciSyncIpcExportFence (const NvSciSyncFence *syncFence, NvSciIpcEndpoint ipcEndpoint, NvSciSyncFenceIpcExportDescriptor *desc)
 Exports a NvSciSyncFence into a binary descriptor shareable across the NvSciIpc channel. More...
 
NvSciError NvSciSyncIpcImportFence (NvSciSyncObj syncObj, const NvSciSyncFenceIpcExportDescriptor *desc, NvSciSyncFence *syncFence)
 Fills in the NvSciSyncFence object based on supplied binary descriptor. More...
 
NvSciError NvSciSyncObjGenerateFence (NvSciSyncObj syncObj, NvSciSyncFence *syncFence)
 Generates next point on sync timeline of an NvSciSync object and fills in the supplied NvSciSyncFence object. More...
 
NvSciError NvSciSyncObjSignal (NvSciSyncObj syncObj)
 Signal the NvSciSync object. More...
 
NvSciError NvSciSyncFenceWait (const NvSciSyncFence *syncFence, NvSciSyncCpuWaitContext context, int64_t timeoutUs)
 Performs a synchronous wait on the NvSciSyncFence object until the fence has been signaled or the timeout expires. More...
 
NvSciError NvSciSyncFenceGetTimestamp (const NvSciSyncFence *syncFence, uint64_t *timestampUS)
 Read the timestamp associated with the fence. More...
 
NvSciError NvSciSyncAttrListGetAttr (NvSciSyncAttrList attrList, NvSciSyncAttrKey key, const void **value, size_t *len)
 NvSciSync Utility functions. More...
 
NvSciError NvSciSyncAttrListReconcileAndObjAlloc (const NvSciSyncAttrList inputArray[], size_t inputCount, NvSciSyncObj *syncObj, NvSciSyncAttrList *newConflictList)
 Reconcile the input unreconciled attribute list(s) into a new reconciled attribute list and allocate a sync object that meets all the constraints in the new reconciled attribute list. More...
 
NvSciError NvSciSyncIpcExportAttrListAndObj (NvSciSyncObj syncObj, NvSciSyncAccessPerm permissions, NvSciIpcEndpoint ipcEndpoint, void **attrListAndObjDesc, size_t *attrListAndObjDescSize)
 Exports an NvSciSync attribute list and object into an NvSciIpc-transferable object binary blob pointed to by the data param. More...
 
void NvSciSyncAttrListAndObjFreeDesc (void *attrListAndObjDescBuf)
 Frees an exported attribute-list-and-sync-object descriptor returned by 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 NvSciSync object based on the supplied binary descriptor and returns the sync object. More...
 
NvSciError NvSciSyncCheckVersionCompatibility (uint32_t majorVer, uint32_t minorVer, bool *isCompatible)
 API to check if loaded library version is compatible with passed library build version. More...
 

Variables

static const uint32_t NvSciSyncMajorVersion = 1U
 NvSciSync version. More...
 
static const uint32_t NvSciSyncMinorVersion = 1U
 
static const NvSciSyncFence NvSciSyncFenceInitializer = {{0U}}
 Defines the value used to zero-initialize the NvSciSyncFence object. More...