|
NVIDIA DRIVE OS Linux SDK API Reference
|
5.2.0 Release For Test and Development only
|
Go to the documentation of this file.
18 #ifndef INCLUDED_NVSCISYNC_H
19 #define INCLUDED_NVSCISYNC_H
144 #if !defined (__cplusplus)
153 #if defined (__cplusplus)
224 #if (NV_IS_SAFETY == 0)
264 uint64_t payload[128];
274 #if (NV_IS_SAFETY == 0)
554 size_t inputUnreconciledAttrListCount,
555 bool* isReconciledListValid);
669 size_t inputUnreconciledAttrListCount,
749 #if (NV_IS_SAFETY == 0)
767 #if (NV_IS_SAFETY == 0)
791 #if (NV_IS_SAFETY == 0)
809 #if (NV_IS_SAFETY == 0)
874 size_t unreconciledAttrListCount,
1006 const void* descBuf,
1009 size_t inputUnreconciledAttrListCount,
1360 #if (NV_IS_SAFETY == 0)
1380 uint64_t* timestampUS);
1432 #if (NV_IS_SAFETY == 0)
1457 #if (NV_IS_SAFETY == 0)
1511 void** attrListAndObjDesc,
1512 size_t* attrListAndObjDescSize);
1523 void* attrListAndObjDescBuf);
1581 const void* attrListAndObjDesc,
1582 size_t attrListAndObjDescSize,
1584 size_t attrListCount,
1611 bool* isCompatible);
1613 #if defined(__cplusplus)
1615 #endif // __cplusplus
1617 #endif // INCLUDED_NVSCISYNC_H
void NvSciSyncFenceClear(NvSciSyncFence *syncFence)
Frees any resources allocated for the NvSciSyncFence.
NvSciError
Return/error codes for all NvSci functions.
void NvSciSyncAttrListAndObjFreeDesc(void *attrListAndObjDescBuf)
Frees an NvSciSyncIpcExportAttrListAndObj descriptor returned by a successful call to NvSciSyncIpcExp...
NvSciError NvSciSyncIpcImportFence(NvSciSyncObj syncObj, const NvSciSyncFenceIpcExportDescriptor *desc, NvSciSyncFence *syncFence)
Fills in the NvSciSyncFence based on the input binary descriptor.
@ NvSciSyncAttrKey_NeedCpuAccess
(bool, inout) Specifies if CPU access is required.
NvSciError NvSciSyncObjIpcExport(NvSciSyncObj syncObj, NvSciSyncAccessPerm permissions, NvSciIpcEndpoint ipcEndpoint, NvSciSyncObjIpcExportDescriptor *desc)
Exports an NvSciSyncObj into an NvSciIpc-transferable object binary descriptor.
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 Nv...
void NvSciSyncAttrListFreeDesc(void *descBuf)
Frees an exported NvSciSyncAttrList descriptor previously returned by any NvSciSyncAttrList exporting...
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 Nv...
@ NvSciSyncAccessPerm_SignalOnly
This represents the capability to advance an NvSciSyncObj to its next point on its sync timeline.
size_t len
Length of the value in bytes.
@ NvSciSyncAttrKey_LowerBound
Specifies the lower bound - for NvSciSync internal use only.
void NvSciSyncCpuWaitContextFree(NvSciSyncCpuWaitContext context)
Releases the NvSciSyncCpuWaitContext.
NvSciError NvSciSyncAttrListSetAttrs(NvSciSyncAttrList attrList, const NvSciSyncAttrKeyValuePair *pairArray, size_t pairCount)
Sets the values for NvSciSyncAttrKey(s) in slot 0 of the input NvSciSyncAttrList.
NvSciSyncAttrKey attrKey
NvSciSyncAttrKey for which value needs to be set/retrieved.
NvSciError NvSciSyncIpcExportFence(const NvSciSyncFence *syncFence, NvSciIpcEndpoint ipcEndpoint, NvSciSyncFenceIpcExportDescriptor *desc)
Exports the input NvSciSyncFence into a binary descriptor shareable across the NvSciIpc channel.
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...
static const uint32_t NvSciSyncMajorVersion
NvSciSync major version number.
struct NvSciSyncAttrListRec * NvSciSyncAttrList
A container constituting an NvSciSyncAttrList which contains:
NvSciError NvSciSyncCpuWaitContextAlloc(NvSciSyncModule module, NvSciSyncCpuWaitContext *newContext)
Allocates a new NvSciSyncCpuWaitContext.
void NvSciSyncObjFree(NvSciSyncObj syncObj)
Destroys a valid NvSciSyncObj and frees any resources that were allocated for it.
@ NvSciSyncAttrKey_WaiterRequireTimestamps
(bool, inout) Specifies if timestamps are required.
const void * value
Memory which contains the value corresponding to the key.
static const int64_t NvSciSyncFenceMaxTimeout
Maximum supported timeout value.
NvSciError NvSciSyncObjGenerateFence(NvSciSyncObj syncObj, NvSciSyncFence *syncFence)
Generates next point on sync timeline of an NvSciSyncObj and fills in the supplied NvSciSyncFence obj...
NvSciError NvSciSyncAttrListGetAttrs(NvSciSyncAttrList attrList, NvSciSyncAttrKeyValuePair *pairArray, size_t pairCount)
Gets the value of NvSciSyncAttrKey from slot 0 of the input NvSciSyncAttrList.
NvSciError NvSciSyncAttrListIsReconciled(NvSciSyncAttrList attrList, bool *isReconciled)
Checks if the NvSciSyncAttrList is reconciled.
NvSciError NvSciSyncFenceGetTimestamp(const NvSciSyncFence *syncFence, uint64_t *timestampUS)
Read the timestamp associated with the NvSciSyncFence.
const struct NvSciSyncObjRec * NvSciSyncObjConst
A reference to an immutable Synchronization Object.
void NvSciSyncModuleClose(NvSciSyncModule module)
Releases an instance of the NvSciSyncModule that was obtained through an earlier call to NvSciSyncMod...
@ NvSciSyncAccessPerm_WaitOnly
This represents the capability to monitor an NvSciSyncObj as it progresses through points on its sync...
Defines the exported form of NvSciSyncObj intended to be shared across an NvSciIpc channel.
uint64_t NvSciIpcEndpoint
Handle to the NvSciIpc endpoint.
NVIDIA Software Communications Interface (SCI) : NvSci Inter-Process Communication
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 NvSciSyncAttr...
NvSciSyncAttrKey
Describes the NvSciSync public attribute keys holding corresponding values specifying synchronization...
NvSciError NvSciSyncObjAlloc(NvSciSyncAttrList reconciledList, NvSciSyncObj *syncObj)
Allocates and initializes a NvSciSyncObj that meets all the constraints specified in the given Reconc...
NvSciError NvSciSyncObjDup(NvSciSyncObj syncObj, NvSciSyncObj *dupObj)
Creates a new NvSciSyncObj holding a reference to the original resources to which the input NvSciSync...
NvSciError NvSciSyncCheckVersionCompatibility(uint32_t majorVer, uint32_t minorVer, bool *isCompatible)
Checks if loaded library version is compatible with the supplied library build version.
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 NvSciSyncAttrLis...
This structure defines a key/value pair used to get or set the NvSciSyncAttrKey(s) and their correspo...
@ NvSciSyncAttrKey_RequiredPerm
(NvSciSyncAccessPerm, inout) Specifies the required access permissions.
NvSciError NvSciSyncAttrListIpcImportUnreconciled(NvSciSyncModule module, NvSciIpcEndpoint ipcEndpoint, const void *descBuf, size_t descLen, NvSciSyncAttrList *importedUnreconciledAttrList)
Transforms an exported unreconciled NvSciSyncAttrList descriptor (potentially received from any proce...
static const uint32_t NvSciSyncMinorVersion
NvSciSync minor version number.
NvSciSyncAccessPerm
Describes NvSciSyncObj access permissions.
NvSciError NvSciSyncObjSignal(NvSciSyncObj syncObj)
Signals the NvSciSyncObj using the reconciled primitive that was allocated along with the NvSciSyncOb...
NvSciError NvSciSyncAttrListReconcile(const NvSciSyncAttrList inputArray[], size_t inputCount, NvSciSyncAttrList *newReconciledList, NvSciSyncAttrList *newConflictList)
Reconciles the input unreconciled NvSciSyncAttrLists into a new reconciled NvSciSyncAttrList.
NvSciError NvSciSyncFenceWait(const NvSciSyncFence *syncFence, NvSciSyncCpuWaitContext context, int64_t timeoutUs)
Performs a synchronous wait on the NvSciSyncFence object until the NvSciSyncFence has been signaled o...
@ NvSciSyncAccessPerm_Auto
Usage of Auto permissions is restricted only for export/import APIs and shouldn't be used as valid va...
NvSciError NvSciSyncModuleOpen(NvSciSyncModule *newModule)
Initializes and returns a new NvSciSyncModule with no NvSciSyncAttrLists, NvSciSyncCpuWaitContexts,...
NvSciError NvSciSyncAttrListReconcileAndObjAlloc(const NvSciSyncAttrList inputArray[], size_t inputCount, NvSciSyncObj *syncObj, NvSciSyncAttrList *newConflictList)
Reconciles the input Unreconciled NvSciSyncAttrList(s) into a new Reconciled NvSciSyncAttrList.
NvSciError NvSciSyncAttrListDebugDump(NvSciSyncAttrList attrList, void **buf, size_t *len)
Dumps the NvSciSyncAttrList into a binary descriptor.
Defines the opaque NvSciSyncFence.
NvSciError NvSciSyncObjGetAttrList(NvSciSyncObj syncObj, NvSciSyncAttrList *syncAttrList)
Retrieves the Reconciled NvSciSyncAttrList associated with an input NvSciSyncObj.
NvSciError NvSciSyncAttrListValidateReconciled(NvSciSyncAttrList reconciledAttrList, const NvSciSyncAttrList inputUnreconciledAttrListArray[], size_t inputUnreconciledAttrListCount, bool *isReconciledListValid)
Validates a reconciled NvSciSyncAttrList against a set of input unreconciled NvSciSyncAttrLists.
@ NvSciSyncAttrKey_ActualPerm
(NvSciSyncAccessPerm, out) Actual permission granted after reconciliation.
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-slo...
void NvSciSyncAttrListFree(NvSciSyncAttrList attrList)
Frees the NvSciSyncAttrList and removes its association with the NvSciSyncModule with which it was cr...
size_t NvSciSyncAttrListGetSlotCount(NvSciSyncAttrList attrList)
Gets the slot count per NvSciSyncAttrKey in a NvSciSyncAttrList.
struct NvSciSyncModuleRec * NvSciSyncModule
Represents an instance of the NvSciSyncModule.
@ NvSciSyncAttrKey_UpperBound
Specifies the upper bound - for NvSciSync internal use only.
static const NvSciSyncFence NvSciSyncFenceInitializer
Defines the value used to zero-initialize the NvSciSyncFence object.
struct NvSciSyncObjRec * NvSciSyncObj
A Synchronization Object is a container holding the reconciled NvSciSyncAttrList defining constraints...
NvSciError NvSciSyncAttrListCreate(NvSciSyncModule module, NvSciSyncAttrList *attrList)
Creates a new, single-slot unreconciled NvSciSyncAttrList associated with the input NvSciSyncModule w...
NvSciError NvSciSyncAttrListAppendUnreconciled(const NvSciSyncAttrList inputUnreconciledAttrListArray[], size_t inputUnreconciledAttrListCount, NvSciSyncAttrList *newUnreconciledAttrList)
Appends multiple unreconciled NvSciSyncAttrLists together, forming a single new unreconciled NvSciSyn...
NvSciError NvSciSyncAttrListIpcExportReconciled(const NvSciSyncAttrList reconciledAttrList, NvSciIpcEndpoint ipcEndpoint, void **descBuf, size_t *descLen)
Transforms the reconciled NvSciSyncAttrList to an exportable reconciled NvSciSyncAttrList descriptor ...
Defines the exported form of NvSciSyncFence intended to be shared across an NvSciIpc channel.
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 ...
NvSciError NvSciSyncAttrListClone(NvSciSyncAttrList origAttrList, NvSciSyncAttrList *newAttrList)
Clones an NvSciSyncAttrList.
@ NvSciSyncAccessPerm_WaitSignal
This represents the capability to advance an NvSciSyncObj to its next point on its sync timeline and ...
@ NvSciSyncAttrKey_WaiterContextInsensitiveFenceExports
(bool, inout) Importing and then exporting an NvSciSyncFenceIpcExportDescriptor has no side effects a...
struct NvSciSyncCpuWaitContextRec * NvSciSyncCpuWaitContext
Represents the right to perform a CPU wait on an NvSciSyncFence.
NvSciError NvSciSyncFenceDup(const NvSciSyncFence *srcSyncFence, NvSciSyncFence *dstSyncFence)
Duplicates the given NvSciSyncFence, such that any wait on duplicated NvSciSyncFence will complete at...