18 #ifndef INCLUDED_NVSCISYNC_H
19 #define INCLUDED_NVSCISYNC_H
80 #if !defined (__cplusplus)
89 #if defined (__cplusplus)
163 uint64_t payload[128];
276 NvSciSyncModule* newModule);
291 NvSciSyncModule module);
309 NvSciSyncModule module,
310 NvSciSyncCpuWaitContext* newContext);
320 NvSciSyncCpuWaitContext context);
336 NvSciSyncModule module,
337 NvSciSyncAttrList* attrList);
346 NvSciSyncAttrList attrList);
359 NvSciSyncAttrList attrList,
386 NvSciSyncAttrList reconciledAttrList,
387 const NvSciSyncAttrList inputUnreconciledAttrListArray[],
388 size_t inputUnreconciledAttrListCount,
389 bool* isReconciledListValid);
412 NvSciSyncAttrList attrList,
433 NvSciSyncAttrList attrList,
451 NvSciSyncAttrList attrList);
477 const NvSciSyncAttrList inputUnreconciledAttrListArray[],
478 size_t inputUnreconciledAttrListCount,
479 NvSciSyncAttrList* newUnreconciledAttrList);
498 NvSciSyncAttrList origAttrList,
499 NvSciSyncAttrList* newAttrList);
530 NvSciSyncAttrList attrList,
568 const NvSciSyncAttrList inputArray[],
570 NvSciSyncAttrList* newReconciledList,
571 NvSciSyncAttrList* newConflictList);
586 NvSciSyncAttrList attrList,
616 const NvSciSyncAttrList unreconciledAttrListArray[],
617 size_t unreconciledAttrListCount,
639 const NvSciSyncAttrList reconciledAttrList,
664 NvSciSyncModule module,
668 NvSciSyncAttrList* importedUnreconciledAttrList);
716 NvSciSyncModule module,
720 const NvSciSyncAttrList inputUnreconciledAttrListArray[],
721 size_t inputUnreconciledAttrListCount,
722 NvSciSyncAttrList* importedReconciledAttrList);
781 NvSciSyncAttrList reconciledList,
782 NvSciSyncObj* syncObj);
794 NvSciSyncObj syncObj,
795 NvSciSyncObj* dupObj);
814 NvSciSyncObj syncObj,
815 NvSciSyncAttrList* syncAttrList);
825 NvSciSyncObj syncObj);
851 NvSciSyncObj syncObj,
897 NvSciSyncAttrList inputAttrList,
900 NvSciSyncObj* syncObj);
938 NvSciSyncObj syncObj,
956 NvSciSyncObj syncObj,
972 NvSciSyncObj syncObj);
999 NvSciSyncCpuWaitContext context,
1015 uint64_t* timestampUS);
1036 NvSciSyncAttrList attrList,
1064 const NvSciSyncAttrList inputArray[],
1066 NvSciSyncObj* syncObj,
1067 NvSciSyncAttrList* newConflictList);
1094 NvSciSyncObj syncObj,
1097 void** attrListAndObjDesc,
1098 size_t* attrListAndObjDescSize);
1109 void* attrListAndObjDescBuf);
1149 NvSciSyncModule module,
1151 const void* attrListAndObjDesc,
1152 size_t attrListAndObjDescSize,
1153 NvSciSyncAttrList
const attrList[],
1154 size_t attrListCount,
1157 NvSciSyncObj* syncObj);
1179 bool* isCompatible);
1181 #if defined(__cplusplus)
1183 #endif // __cplusplus
1185 #endif // INCLUDED_NVSCISYNC_H
struct NvSciSyncCpuWaitContextRec * NvSciSyncCpuWaitContext
Represents the right to perform a CPU wait on an NvSciSyncFence.
Defines the exported form of NvSciSyncFence shared across an NvSciIpc channel.
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 potentiall...
void NvSciSyncFenceClear(NvSciSyncFence *syncFence)
Frees any resources allocated for the specified fence.
void NvSciSyncAttrListAndObjFreeDesc(void *attrListAndObjDescBuf)
Frees an exported attribute-list-and-sync-object descriptor returned by NvSciSyncIpcExportAttrListAnd...
Describes the NvSciSyncAttrKey-Value pair.
NvSciError NvSciSyncAttrListAppendUnreconciled(const NvSciSyncAttrList inputUnreconciledAttrListArray[], size_t inputUnreconciledAttrListCount, NvSciSyncAttrList *newUnreconciledAttrList)
Appends multiple unreconciled attribute lists together, forming a single new unreconciled attribute l...
static const uint32_t NvSciSyncMajorVersion
NvSciSync version.
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...
NvSciError NvSciSyncObjGenerateFence(NvSciSyncObj syncObj, NvSciSyncFence *syncFence)
Generates next point on sync timeline of an NvSciSync object and fills in the supplied NvSciSyncFence...
void NvSciSyncCpuWaitContextFree(NvSciSyncCpuWaitContext context)
Releases a CPU wait context.
NVIDIA Software Communications Interface (SCI): Error Handling
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...
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 attr...
uint64_t NvSciIpcEndpoint
Handle to the IPC endpoint.
NvSciError NvSciSyncObjIpcExport(NvSciSyncObj syncObj, NvSciSyncAccessPerm permissions, NvSciIpcEndpoint ipcEndpoint, NvSciSyncObjIpcExportDescriptor *desc)
Exports a NvSciSync object into an NvSciIpc-transferable object binary descriptor.
This represents the capability to advance an NvSciSync object to its next point on its sync timeline ...
(bool) Importing and then exporting an NvSciSyncFenceIpcExportDescriptor has no side effects and yiel...
void NvSciSyncAttrListFreeDesc(void *descBuf)
Frees an exported attribute list descriptor previously returned by NvSciSyncAttrListExport().
This represents the capability to advance an NvSciSync object to its next point on its sync timeline...
void NvSciSyncObjFree(NvSciSyncObj syncObj)
Destroys the NvSciSync object and all memory that was allocated for it.
struct NvSciSyncAttrListRec * NvSciSyncAttrList
Holds a pointer to an opaque NvSciSync attribute list.
NvSciError NvSciSyncIpcExportFence(const NvSciSyncFence *syncFence, NvSciIpcEndpoint ipcEndpoint, NvSciSyncFenceIpcExportDescriptor *desc)
Exports a NvSciSyncFence into a binary descriptor shareable across the NvSciIpc channel.
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 poten...
NvSciSyncAttrKey attrKey
Specifies the attribute key to set.
NvSciError NvSciSyncFenceGetTimestamp(const NvSciSyncFence *syncFence, uint64_t *timestampUS)
Read the timestamp associated with the fence.
static const uint32_t NvSciSyncMinorVersion
Usage of Auto permissions is restricted only for export/ import APIs and shouldn’t be used as val...
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...
NvSciError NvSciSyncObjDup(NvSciSyncObj syncObj, NvSciSyncObj *dupObj)
Duplicates a valid NvSciSyncObj.
NvSciError NvSciSyncAttrListGetAttrs(NvSciSyncAttrList attrList, NvSciSyncAttrKeyValuePair *pairArray, size_t pairCount)
Gets the value of attributes from an attribute list.
NvSciError NvSciSyncCpuWaitContextAlloc(NvSciSyncModule module, NvSciSyncCpuWaitContext *newContext)
Allocates a CPU wait context that can be used to perform a CPU wait with NvSciSyncFenceWait().
NvSciSyncAttrKey
Describes the types of NvSciSyncAttr keys.
NVIDIA Software Communications Interface (SCI) : NvSci Inter-Process Communication ...
NvSciError NvSciSyncObjAlloc(NvSciSyncAttrList reconciledList, NvSciSyncObj *syncObj)
Allocates a sync object that meets all the constraints in the specified reconciled attribute list...
NvSciError NvSciSyncCheckVersionCompatibility(uint32_t majorVer, uint32_t minorVer, bool *isCompatible)
API to check if loaded library version is compatible with passed library build version.
size_t len
Specifies the buffer length, or 0 if there is no value assigned to attrKey.
void NvSciSyncModuleClose(NvSciSyncModule module)
Releases an instance of the NvSciSync module that was obtained through an earlier call to NvSciSyncMo...
NvSciError NvSciSyncModuleOpen(NvSciSyncModule *newModule)
Initializes an instance of the NvSciSync module within the calling process and provides an NvSciSyncM...
const void * value
Specifies the pointer to the attribute value, or NULL if there is no value assigned to attrKey...
NvSciSyncAccessPerm
Describes sync object access permissions.
NvSciError NvSciSyncAttrListIsReconciled(NvSciSyncAttrList attrList, bool *isReconciled)
Returns whether the attribute list is reconciled or unreconciled.
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 attr...
(bool) Specifies if timestamps are required.
enum NvSciErrorRec NvSciError
Return/error codes for all NvSci functions.
(NvSciSyncAccessPerm) Actual permission granted after reconciliation.
Specifies the upper bound - for NvSciSync internal use only.
NvSciError NvSciSyncAttrListDebugDump(NvSciSyncAttrList attrList, void **buf, size_t *len)
Dumps the attribute list into a binary blob.
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 attri...
(NvSciSyncAccessPerm) Specifies the required access permissions.
This represents the capability to monitor an NvSciSync object as it progresses through points on its ...
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 ...
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...
NvSciError NvSciSyncAttrListGetAttr(NvSciSyncAttrList attrList, NvSciSyncAttrKey key, const void **value, size_t *len)
NvSciSync Utility functions.
size_t NvSciSyncAttrListGetSlotCount(NvSciSyncAttrList attrList)
Gets the total number of slots contained in a NvSciSyncAttrList.
static const NvSciSyncFence NvSciSyncFenceInitializer
Defines the value used to zero-initialize the NvSciSyncFence object.
NvSciError NvSciSyncObjSignal(NvSciSyncObj syncObj)
Signal the NvSciSync object.
struct NvSciSyncObjRec * NvSciSyncObj
Holds a pointer to an opaque NvSciSync object.
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 tim...
(bool) Specifies if CPU access is required.
NvSciError NvSciSyncAttrListCreate(NvSciSyncModule module, NvSciSyncAttrList *attrList)
Creates an attribute list holding the attributes of the NvSciSyncObj to be allocated.
Defines the exported form of NvSciSyncObj shared across an NvSciIpc channel.
Defines the opaque NvSciSyncFence.
struct NvSciSyncModuleRec * NvSciSyncModule
Represents an instance of the NvSciSync module.
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 point...
NvSciError NvSciSyncAttrListClone(NvSciSyncAttrList origAttrList, NvSciSyncAttrList *newAttrList)
Clones an unreconciled/reconciled attribute list.
void NvSciSyncAttrListFree(NvSciSyncAttrList attrList)
Frees the memory of an attribute list.
NvSciError NvSciSyncFenceDup(const NvSciSyncFence *srcSyncFence, NvSciSyncFence *dstSyncFence)
Duplicates srcSyncFence into dstSyncFence, such that any wait on destSyncFence will complete at the s...
NvSciError NvSciSyncObjGetAttrList(NvSciSyncObj syncObj, NvSciSyncAttrList *syncAttrList)
Retrieves the attribute list from an allocated NvSciSync Object.
NvSciError NvSciSyncIpcImportFence(NvSciSyncObj syncObj, const NvSciSyncFenceIpcExportDescriptor *desc, NvSciSyncFence *syncFence)
Fills in the NvSciSyncFence object based on supplied binary descriptor.
Specifies the lower bound - for NvSciSync internal use only.
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...