18 #ifndef INCLUDED_NVSCISYNC_H
19 #define INCLUDED_NVSCISYNC_H
80 #if defined(__cplusplus)
90 #if defined (__cplusplus)
164 uint64_t payload[128];
269 NvSciSyncModule* newModule);
284 NvSciSyncModule module);
302 NvSciSyncModule module,
303 NvSciSyncCpuWaitContext* newContext);
313 NvSciSyncCpuWaitContext context);
329 NvSciSyncModule module,
330 NvSciSyncAttrList* attrList);
339 NvSciSyncAttrList attrList);
352 NvSciSyncAttrList attrList,
379 NvSciSyncAttrList reconciledAttrList,
380 const NvSciSyncAttrList inputUnreconciledAttrListArray[],
381 size_t inputUnreconciledAttrListCount,
382 bool* isReconciledListValid);
405 NvSciSyncAttrList attrList,
425 NvSciSyncAttrList attrList,
443 NvSciSyncAttrList attrList);
469 const NvSciSyncAttrList inputUnreconciledAttrListArray[],
470 size_t inputUnreconciledAttrListCount,
471 NvSciSyncAttrList* newUnreconciledAttrList);
490 NvSciSyncAttrList origAttrList,
491 NvSciSyncAttrList* newAttrList);
520 NvSciSyncAttrList attrList,
558 const NvSciSyncAttrList inputArray[],
560 NvSciSyncAttrList* newReconciledList,
561 NvSciSyncAttrList* newConflictList);
576 NvSciSyncAttrList attrList,
606 const NvSciSyncAttrList unreconciledAttrListArray[],
607 size_t unreconciledAttrListCount,
629 const NvSciSyncAttrList reconciledAttrList,
654 NvSciSyncModule module,
658 NvSciSyncAttrList* importedUnreconciledAttrList);
706 NvSciSyncModule module,
710 const NvSciSyncAttrList inputUnreconciledAttrListArray[],
711 size_t inputUnreconciledAttrListCount,
712 NvSciSyncAttrList* importedReconciledAttrList);
771 NvSciSyncAttrList reconciledList,
772 NvSciSyncObj* syncObj);
784 NvSciSyncObj syncObj,
785 NvSciSyncObj* dupObj);
804 NvSciSyncObj syncObj,
805 NvSciSyncAttrList* syncAttrList);
815 NvSciSyncObj syncObj);
841 NvSciSyncObj syncObj,
887 NvSciSyncAttrList inputAttrList,
890 NvSciSyncObj* syncObj);
928 NvSciSyncObj syncObj,
946 NvSciSyncObj syncObj,
962 NvSciSyncObj syncObj);
989 NvSciSyncCpuWaitContext context,
1009 NvSciSyncAttrList attrList,
1037 const NvSciSyncAttrList inputArray[],
1039 NvSciSyncObj* syncObj,
1040 NvSciSyncAttrList* newConflictList);
1067 NvSciSyncObj syncObj,
1070 void** attrListAndObjDesc,
1071 size_t* attrListAndObjDescSize);
1082 void* attrListAndObjDescBuf);
1122 NvSciSyncModule module,
1124 const void* attrListAndObjDesc,
1125 size_t attrListAndObjDescSize,
1126 NvSciSyncAttrList
const attrList[],
1127 size_t attrListCount,
1130 NvSciSyncObj* syncObj);
1132 #if defined(__cplusplus)
1134 #endif // __cplusplus
1136 #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.
static const uint32_t NvSciSyncMinorVersion
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...
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...
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...