Loading [MathJax]/extensions/tex2jax.js
|
NVIDIA DRIVE OS Linux SDK API Reference
|
6.0.6 Release
|
Go to the documentation of this file.
18 #ifndef INCLUDED_NVSCISYNC_H
19 #define INCLUDED_NVSCISYNC_H
151 #if !defined (__cplusplus)
160 #if defined (__cplusplus)
166 #define PACK_SYNC( __Declaration__, ... ) __Declaration__,##__VA_ARGS__ __attribute__((packed))
168 #define PACK_SYNC( __Declaration__, ... ) __pragma(pack(push, 1)) __Declaration__,##__VA_ARGS__ __pragma(pack(pop))
278 uint64_t payload[128];
335 #define NvSciSyncAccessPerm_WaitOnly ((uint64_t)1U << 0U)
340 #define NvSciSyncAccessPerm_SignalOnly ((uint64_t)1U << 1U)
346 #define NvSciSyncAccessPerm_WaitSignal (NvSciSyncAccessPerm_WaitOnly | NvSciSyncAccessPerm_SignalOnly)
352 #define NvSciSyncAccessPerm_Auto ((uint64_t)1U << 63U)
384 uint32_t statusEngine;
391 }) NvSciSyncTaskStatus;
849 size_t inputUnreconciledAttrListCount,
850 bool* isReconciledListValid);
1032 size_t inputUnreconciledAttrListCount,
1139 #if (NV_IS_SAFETY == 0)
1157 #if (NV_IS_SAFETY == 0)
1182 #if (NV_IS_SAFETY == 0)
1221 #if (NV_IS_SAFETY == 0)
1309 #if (NV_IS_SAFETY == 0)
1338 size_t unreconciledAttrListCount,
1444 const void* descBuf,
1529 const void* descBuf,
1532 size_t inputUnreconciledAttrListCount,
1764 uint32_t timestampSlot);
1800 uint32_t taskStatusSlot);
1836 uint32_t* timeStampSlot);
2255 #if (NV_IS_SAFETY == 0)
2292 #if (NV_IS_SAFETY == 0)
2432 uint64_t* timestampUS);
2468 NvSciSyncTaskStatus* taskStatus);
2535 #if (NV_IS_SAFETY == 0)
2561 #if (NV_IS_SAFETY == 0)
2657 void** attrListAndObjDesc,
2658 size_t* attrListAndObjDescSize);
2689 void* attrListAndObjDescBuf);
2775 const void* attrListAndObjDesc,
2776 size_t attrListAndObjDescSize,
2778 size_t attrListCount,
2817 #if (NV_IS_SAFETY == 0)
2825 bool* isCompatible);
2827 #if defined(__cplusplus)
2829 #endif // __cplusplus
2831 #endif // INCLUDED_NVSCISYNC_H
void NvSciSyncFenceClear(NvSciSyncFence *syncFence)
Frees any resources allocated for the NvSciSyncFence.
@ NvSciSyncAttrKey_RequireDeterministicFences
(bool, inout) Specifies if deterministic primitives are required.
uint64_t NvSciSyncAccessPerm
Describes NvSciSyncObj access permissions.
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...
@ 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...
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.
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 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.
@ 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.
NvSciError NvSciSyncAttrListIsReconciled(NvSciSyncAttrList attrList, bool *isReconciled)
Checks whether 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, 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.
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 the corresponding values specifying synchroniza...
NvSciError NvSciSyncObjAlloc(NvSciSyncAttrList reconciledList, NvSciSyncObj *syncObj)
Allocates and initializes a NvSciSyncObj that meets all the constraints specified in the given reconc...
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.
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.
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.
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 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.
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...
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国产