Loading [MathJax]/extensions/tex2jax.js
|
NVIDIA DRIVE OS Linux SDK API Reference
|
6.0.9 Release
|
Go to the documentation of this file.
18 #ifndef INCLUDED_NVSCISYNC_H
19 #define INCLUDED_NVSCISYNC_H
158 #if !defined (__cplusplus)
168 #if defined (__cplusplus)
174 #define PACK_SYNC( __Declaration__, ... ) __Declaration__,##__VA_ARGS__ __attribute__((packed))
176 #define PACK_SYNC( __Declaration__, ... ) __pragma(pack(push, 1)) __Declaration__,##__VA_ARGS__ __pragma(pack(pop))
286 uint64_t payload[128];
343 #if defined(__cplusplus)
344 #define NvSciSyncAccessPerm_WaitOnly (static_cast<uint64_t>(1U) << 0U)
346 #define NvSciSyncAccessPerm_WaitOnly ((uint64_t)1U << 0U)
353 #if defined(__cplusplus)
354 #define NvSciSyncAccessPerm_SignalOnly (static_cast<uint64_t>(1U) << 1U)
356 #define NvSciSyncAccessPerm_SignalOnly ((uint64_t)1U << 1U)
364 #define NvSciSyncAccessPerm_WaitSignal (NvSciSyncAccessPerm_WaitOnly | NvSciSyncAccessPerm_SignalOnly)
370 #if defined(__cplusplus)
371 #define NvSciSyncAccessPerm_Auto (static_cast<uint64_t>(1U) << 63U)
373 #define NvSciSyncAccessPerm_Auto ((uint64_t)1U << 63U)
406 uint32_t statusEngine;
413 }) NvSciSyncTaskStatus;
998 size_t inputUnreconciledAttrListCount,
999 bool* isReconciledListValid);
1184 size_t inputUnreconciledAttrListCount,
1292 #if (NV_IS_SAFETY == 0)
1310 #if (NV_IS_SAFETY == 0)
1336 #if (NV_IS_SAFETY == 0)
1375 #if (NV_IS_SAFETY == 0)
1471 #if (NV_IS_SAFETY == 0)
1502 size_t unreconciledAttrListCount,
1612 const void* descBuf,
1698 const void* descBuf,
1701 size_t inputUnreconciledAttrListCount,
1934 uint32_t timestampSlot);
1970 uint32_t taskStatusSlot);
2005 uint32_t* timeStampSlot);
2419 #if (NV_IS_SAFETY == 0)
2480 #if (NV_IS_SAFETY == 0)
2517 #if (NV_IS_SAFETY == 0)
2656 uint64_t* timestampUS);
2693 NvSciSyncTaskStatus* taskStatus);
2761 #if (NV_IS_SAFETY == 0)
2788 #if (NV_IS_SAFETY == 0)
2885 void** attrListAndObjDesc,
2886 size_t* attrListAndObjDescSize);
2918 void* attrListAndObjDescBuf);
3005 const void* attrListAndObjDesc,
3006 size_t attrListAndObjDescSize,
3008 size_t attrListCount,
3048 #if (NV_IS_SAFETY == 0)
3056 bool* isCompatible);
3151 #if (NV_IS_SAFETY == 0)
3285 #if defined(__cplusplus)
3287 #endif // __cplusplus
3289 #endif // INCLUDED_NVSCISYNC_H
void NvSciSyncFenceClear(NvSciSyncFence *syncFence)
Frees any resources allocated for the NvSciSyncFence.
@ NvSciSyncAttrValPrimitiveType_VidmemSemaphorePayload64b
16 bytes semaphore backed by video memory.
@ NvSciSyncAttrKey_RequireDeterministicFences
(bool, inout) Specifies if deterministic primitives are required.
uint64_t NvSciSyncAccessPerm
Describes NvSciSyncObj access permissions.
NvSciError NvSciSyncObjValidate(NvSciSyncObj syncObj)
Validates the NvSciSyncObj satisfies the constraints of the NvSciSyncAttrList that it is associated w...
NvSciError
Return/error codes for all NvSci functions.
void NvSciSyncAttrListAndObjFreeDesc(void *attrListAndObjDescBuf)
Frees an NvSciSyncIpcExportAttrListAndObj descriptor returned by a successful call to NvSciSyncIpcExp...
@ NvSciSyncWaitMode_Default
same behavior as with NvSciSyncFenceWait()
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...
@ NvSciSyncAttrValPrimitiveType_SysmemSemaphore
16 bytes semaphore backed by system memory.
@ NvSciSyncTaskStatus_Failure
The task has failed.
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...
@ NvSciSyncAttrValPrimitiveType_Syncpoint
Syncpoint.
size_t len
Length of the value in bytes.
NvSciSyncTaskStatusVal
Status of the signaler's task that signals a particular NvSciSyncFence.
@ NvSciSyncAttrKey_LowerBound
Specifies the lower bound - for NvSciSync internal use only.
@ NvSciSyncTaskStatus_Invalid
The signaler did not report any task status.
@ NvSciSyncWaitMode_BusyNoYield
Polling with spin, no yielding.
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.
NvSciError NvSciSyncFenceAddTaskStatusSlot(NvSciSyncFence *syncFence, uint32_t taskStatusSlot)
Sets the current task status slot index to the NvSciSyncFence.
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 NvSciSyncFenceWaitWithMode(const NvSciSyncFence *syncFence, NvSciSyncCpuWaitContext context, int64_t timeoutUs, NvSciSyncWaitMode waitMode)
Performs a synchronous wait on the NvSciSyncFence object until the NvSciSyncFence has been signaled o...
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.
@ NvSciSyncAttrKey_PeerHwEngineArray
(NvSciBufPeerHwEngine[], inout) An attribute indicating engine information of late peer which are goi...
struct NvSciSyncAttrListRec * NvSciSyncAttrList
A container constituting an NvSciSyncAttrList which contains:
enum NvSciSyncAttrValPrimitiveTypeRec NvSciSyncAttrValPrimitiveType
Alias for enum NvSciSyncAttrValPrimitiveTypeRec.
NvSciError NvSciSyncCpuWaitContextAlloc(NvSciSyncModule module, NvSciSyncCpuWaitContext *newContext)
Allocates a new NvSciSyncCpuWaitContext.
@ NvSciSyncAttrKey_NumTimestampSlots
(uint32_t, out) Specifies the total number of slots in the timestamps buffer.
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.
@ NvSciSyncAttrKey_MaxPrimitiveValue
(uint64_t, out) Specifies the maximum value of the reconciled primitive.
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.
@ NvSciSyncAttrKey_PeerLocationInfo
(NvSciBufPeerLocationInfo[], inout) An attribute indicating location information of late peer which a...
NvSciError NvSciSyncAttrListIsReconciled(NvSciSyncAttrList attrList, bool *isReconciled)
Checks whether the NvSciSyncAttrList is reconciled.
NvSciError NvSciSyncFillC2cAttrs(NvSciSyncAttrList unrecAttrList, NvSciSyncAccessPerm permissions)
Fills appropriate attributes for C2C copy in the input NvSciSyncAttrList.
@ NvSciSyncAttrKey_PrimitiveInfo
(NvSciSyncAttrValPrimitiveType[], inout) supported primitive types.
NvSciError NvSciSyncObjAttachPeer(NvSciSyncObj syncObj, const NvSciSyncAttrList inputArray[], size_t inputCount)
Allows remote peer NvSciIpcEndpoint to gain access to already allocated NvSciSyncObj.
NvSciError NvSciSyncFenceGetTimestamp(const NvSciSyncFence *syncFence, uint64_t *timestampUS)
Read the timestamp associated with the NvSciSyncFence.
const struct NvSciSyncObjRec * NvSciSyncObjConst
A reference, that is not modifiable, to a particular Synchronization Object.
void NvSciSyncModuleClose(NvSciSyncModule module)
Closes an instance of the NvSciSyncModule that was obtained through an earlier call to NvSciSyncModul...
Defines the exported form of NvSciSyncObj intended to be shared across an NvSciIpc channel.
@ NvSciSyncAttrValPrimitiveType_SysmemSemaphorePayload64b
16 bytes semaphore backed by system memory.
NVIDIA Software Communications Interface (SCI) : NvSci Inter-Process Communication
@ NvSciSyncAttrValPrimitiveType_VidmemSemaphore
16 bytes semaphore backed by video memory.
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 the corresponding values specifying synchroniza...
@ NvSciSyncWaitMode_BusyWithYield
Polling with processor yielding.
NvSciError NvSciSyncObjAlloc(NvSciSyncAttrList reconciledList, NvSciSyncObj *syncObj)
Allocates and initializes a NvSciSyncObj that meets all the constraints specified in the given reconc...
@ NvSciSyncAttrKey_GpuId
(NvSciRmGpuId[], inout) GpuID of the GPU in the system that will access the semaphore buffer.
uint64_t NvSciIpcEndpoint
Handle to the NvSciIpc endpoint.
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 the loaded library version is compatible with the version the application was compiled agai...
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...
NvSciError NvSciSyncFenceExtractFence(const NvSciSyncFence *syncFence, uint64_t *id, uint64_t *value)
Extracts the id and value from the input NvSciSyncFence.
@ NvSciSyncAttrKey_RequiredPerm
(NvSciSyncAccessPerm, inout) Specifies the required access permissions.
NvSciSyncAttrValPrimitiveTypeRec
Types of synchronization primitives.
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.
NvSciError NvSciSyncObjSignal(NvSciSyncObj syncObj)
Signals the NvSciSyncObj using the reconciled primitive that was allocated along with the NvSciSyncOb...
NvSciError NvSciSyncFenceAddTimestampSlot(NvSciSyncFence *syncFence, uint32_t timestampSlot)
Sets the current timestamp slot index in the NvSciSyncFence.
@ NvSciSyncAttrValPrimitiveType_LowerBound
For NvSciSync internal use only.
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...
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.
struct NvSciSyncFence NvSciSyncFence
Defines the opaque NvSciSyncFence.
Defines the opaque NvSciSyncFence.
NvSciError NvSciSyncAttrListValidateReconciledAgainstAttrs(NvSciSyncAttrList reconciledAttrList, const NvSciSyncAttrKeyValuePair *pairArray, size_t pairCount, NvSciSyncAccessPerm permissions)
Validates reconciledAttrList against the set of input attributes that the user has set in the unrecon...
NvSciError NvSciSyncObjGetAttrList(NvSciSyncObj syncObj, NvSciSyncAttrList *syncAttrList)
Retrieves the reconciled NvSciSyncAttrList associated with an input NvSciSyncObj.
NVIDIA Software Communications Interface (SCI) : NvSciBuf
@ NvSciSyncWaitMode_Blocking
Blocked wait, released by a trigger, like an interrupt.
NvSciError NvSciSyncFenceGetTaskStatus(const NvSciSyncFence *syncFence, NvSciSyncTaskStatus *taskStatus)
Reads the task status associated with the NvSciSyncFence and stores it in the user provided out param...
NvSciError NvSciSyncAttrListValidateReconciled(NvSciSyncAttrList reconciledAttrList, const NvSciSyncAttrList inputUnreconciledAttrListArray[], size_t inputUnreconciledAttrListCount, bool *isReconciledListValid)
Validates a reconciled NvSciSyncAttrList against a set of input unreconciled NvSciSyncAttrLists.
@ NvSciSyncAttrKey_NumTaskStatusSlots
(uint32_t, out) Specifies the total number of slots in the task status buffer.
@ NvSciSyncAttrKey_ActualPerm
(NvSciSyncAccessPerm, out) Actual permission granted after reconciliation.
NvSciError NvSciSyncFenceExtractTimestampSlot(NvSciSyncFence *syncFence, uint32_t *timeStampSlot)
Reads the current timestamp slot index from the NvSciSyncFence.
@ NvSciSyncAttrValPrimitiveType_UpperBound
For NvSciSync internal use only.
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 of the given NvSciSyncAttrList.
struct NvSciSyncModuleRec * NvSciSyncModule
Represents an instance of the NvSciSyncModule.
NvSciError NvSciSyncFenceUpdateFence(NvSciSyncObj syncObj, uint64_t id, uint64_t value, NvSciSyncFence *syncFence)
Populates the input NvSciSyncFence based on the input id and value.
@ 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...
#define PACK_SYNC(__Declaration__,...)
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 ...
@ NvSciSyncTaskStatus_Success
The task has completed successfully.
NvSciError NvSciSyncAttrListClone(NvSciSyncAttrList origAttrList, NvSciSyncAttrList *newAttrList)
Clones an NvSciSyncAttrList.
@ NvSciSyncAttrKey_WaiterContextInsensitiveFenceExports
(bool, inout) Importing and then exporting an NvSciSyncFenceIpcExportDescriptor has no side effects a...
NvSciSyncWaitMode
Modes of CPU waiting.
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...
人人超碰97caoporen国产