Loading [MathJax]/extensions/tex2jax.js
  • <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>
  • NVIDIA DRIVE OS Linux SDK API Reference

    6.0.9 Release
    All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
    nvscisync.h File Reference

    Detailed Description

    NVIDIA Software Communications Interface (SCI) : NvSciSync

    The NvSciSync library allows applications to manage synchronization objects which coordinate when sequences of operations begin and end.

    Definition in file nvscisync.h.

    Go to the source code of this file.

    Data Structures

    struct  NvSciSyncFence
     Defines the opaque NvSciSyncFence. More...
     
    struct  NvSciSyncFenceIpcExportDescriptor
     Defines the exported form of NvSciSyncFence intended to be shared across an NvSciIpc channel. More...
     
    struct  NvSciSyncObjIpcExportDescriptor
     Defines the exported form of NvSciSyncObj intended to be shared across an NvSciIpc channel. More...
     
    struct  NvSciSyncAttrKeyValuePair
     This structure defines a key/value pair used to get or set the NvSciSyncAttrKey(s) and their corresponding values from or to NvSciSyncAttrList. More...
     

    Macros

    #define PACK_SYNC(__Declaration__, ...)   __pragma(pack(push, 1)) __Declaration__,##__VA_ARGS__ __pragma(pack(pop))
     
    #define NvSciSyncAccessPerm_WaitOnly   ((uint64_t)1U << 0U)
     This represents the capability to wait on an NvSciSyncObj as it progresses through points on its sync timeline. More...
     
    #define NvSciSyncAccessPerm_SignalOnly   ((uint64_t)1U << 1U)
     This represents the capability to advance an NvSciSyncObj to its next point on its sync timeline. More...
     
    #define NvSciSyncAccessPerm_WaitSignal   (NvSciSyncAccessPerm_WaitOnly | NvSciSyncAccessPerm_SignalOnly)
     This represents the capability to advance an NvSciSyncObj to its next point on its sync timeline and also wait until that next point is reached. More...
     
    #define NvSciSyncAccessPerm_Auto   ((uint64_t)1U << 63U)
     Usage of Auto permissions is restricted only for export/import APIs and shouldn't be used as valid value for NvSciSyncAttrKey_RequiredPerm Attribute. More...
     

    Typedefs

    typedef struct NvSciSyncModuleRec * NvSciSyncModule
     Represents an instance of the NvSciSyncModule. More...
     
    typedef struct NvSciSyncCpuWaitContextRec * NvSciSyncCpuWaitContext
     Represents the right to perform a CPU wait on an NvSciSyncFence. More...
     
    typedef struct NvSciSyncFence NvSciSyncFence
     Defines the opaque NvSciSyncFence. More...
     
    typedef struct NvSciSyncObjRec * NvSciSyncObj
     A Synchronization Object is a container holding the reconciled NvSciSyncAttrList defining constraints of the Fence and the handle of the actual Primitive, with access permissions being enforced by the NvSciSyncAttrKey_RequiredPerm and NvSciSyncAttrKey_NeedCpuAccess Attribute Keys. More...
     
    typedef const struct NvSciSyncObjRec * NvSciSyncObjConst
     A reference, that is not modifiable, to a particular Synchronization Object. More...
     
    typedef struct NvSciSyncAttrListRec * NvSciSyncAttrList
     A container constituting an NvSciSyncAttrList which contains: More...
     
    typedef uint64_t NvSciSyncAccessPerm
     Describes NvSciSyncObj access permissions. More...
     
    typedef enum NvSciSyncAttrValPrimitiveTypeRec NvSciSyncAttrValPrimitiveType
     Alias for enum NvSciSyncAttrValPrimitiveTypeRec. More...
     

    Enumerations

    enum  NvSciSyncTaskStatusVal {
      NvSciSyncTaskStatus_Success = 0U,
      NvSciSyncTaskStatus_Failure = 1U,
      NvSciSyncTaskStatus_Invalid = UINT16_MAX
    }
     Status of the signaler's task that signals a particular NvSciSyncFence. More...
     
    enum  NvSciSyncAttrValPrimitiveTypeRec {
      NvSciSyncAttrValPrimitiveType_LowerBound,
      NvSciSyncAttrValPrimitiveType_Syncpoint,
      NvSciSyncAttrValPrimitiveType_SysmemSemaphore,
      NvSciSyncAttrValPrimitiveType_VidmemSemaphore,
      NvSciSyncAttrValPrimitiveType_SysmemSemaphorePayload64b,
      NvSciSyncAttrValPrimitiveType_VidmemSemaphorePayload64b,
      NvSciSyncAttrValPrimitiveType_UpperBound
    }
     Types of synchronization primitives. More...
     
    enum  NvSciSyncAttrKey {
      NvSciSyncAttrKey_LowerBound,
      NvSciSyncAttrKey_NeedCpuAccess,
      NvSciSyncAttrKey_RequiredPerm,
      NvSciSyncAttrKey_ActualPerm,
      NvSciSyncAttrKey_WaiterContextInsensitiveFenceExports,
      NvSciSyncAttrKey_WaiterRequireTimestamps,
      NvSciSyncAttrKey_RequireDeterministicFences,
      NvSciSyncAttrKey_NumTimestampSlots,
      NvSciSyncAttrKey_NumTaskStatusSlots,
      NvSciSyncAttrKey_MaxPrimitiveValue,
      NvSciSyncAttrKey_PrimitiveInfo,
      NvSciSyncAttrKey_PeerLocationInfo,
      NvSciSyncAttrKey_GpuId,
      NvSciSyncAttrKey_PeerHwEngineArray,
      NvSciSyncAttrKey_UpperBound
    }
     Describes the NvSciSync public attribute keys holding the corresponding values specifying synchronization object constraints. More...
     
    enum  NvSciSyncWaitMode {
      NvSciSyncWaitMode_Default = 0U,
      NvSciSyncWaitMode_BusyWithYield = 1U,
      NvSciSyncWaitMode_BusyNoYield = 2U,
      NvSciSyncWaitMode_Blocking = 3U
    }
     Modes of CPU waiting. More...
     

    Functions

     PACK_SYNC (typedef struct { uint64_t timestamp;uint32_t statusEngine;uint16_t subframe;uint16_t status;}) NvSciSyncTaskStatus
     A single slot in the task status buffer. More...
     
    NvSciError NvSciSyncModuleOpen (NvSciSyncModule *newModule)
     Initializes and returns a new NvSciSyncModule with no NvSciSyncAttrLists, NvSciSyncCpuWaitContexts, NvSciSyncObjs or NvSciSyncFences bound to it. More...
     
    void NvSciSyncModuleClose (NvSciSyncModule module)
     Closes an instance of the NvSciSyncModule that was obtained through an earlier call to NvSciSyncModuleOpen(). More...
     
    NvSciError NvSciSyncCpuWaitContextAlloc (NvSciSyncModule module, NvSciSyncCpuWaitContext *newContext)
     Allocates a new NvSciSyncCpuWaitContext. More...
     
    void NvSciSyncCpuWaitContextFree (NvSciSyncCpuWaitContext context)
     Releases the NvSciSyncCpuWaitContext. More...
     
    NvSciError NvSciSyncAttrListCreate (NvSciSyncModule module, NvSciSyncAttrList *attrList)
     Creates a new, single-slot unreconciled NvSciSyncAttrList associated with the input NvSciSyncModule with empty NvSciSyncAttrKeys. More...
     
    void NvSciSyncAttrListFree (NvSciSyncAttrList attrList)
     Frees the NvSciSyncAttrList and removes its association with the NvSciSyncModule with which it was created. More...
     
    NvSciError NvSciSyncAttrListIsReconciled (NvSciSyncAttrList attrList, bool *isReconciled)
     Checks whether the NvSciSyncAttrList is reconciled. More...
     
    NvSciError NvSciSyncAttrListValidateReconciled (NvSciSyncAttrList reconciledAttrList, const NvSciSyncAttrList inputUnreconciledAttrListArray[], size_t inputUnreconciledAttrListCount, bool *isReconciledListValid)
     Validates a reconciled NvSciSyncAttrList against a set of input unreconciled NvSciSyncAttrLists. More...
     
    NvSciError NvSciSyncAttrListSetAttrs (NvSciSyncAttrList attrList, const NvSciSyncAttrKeyValuePair *pairArray, size_t pairCount)
     Sets the values for NvSciSyncAttrKey(s) in slot 0 of the input NvSciSyncAttrList. More...
     
    NvSciError NvSciSyncAttrListGetAttrs (NvSciSyncAttrList attrList, NvSciSyncAttrKeyValuePair *pairArray, size_t pairCount)
     Gets the value of NvSciSyncAttrKey from slot 0 of the input NvSciSyncAttrList. More...
     
    size_t NvSciSyncAttrListGetSlotCount (NvSciSyncAttrList attrList)
     Gets the slot count of the given NvSciSyncAttrList. More...
     
    NvSciError NvSciSyncAttrListAppendUnreconciled (const NvSciSyncAttrList inputUnreconciledAttrListArray[], size_t inputUnreconciledAttrListCount, NvSciSyncAttrList *newUnreconciledAttrList)
     Appends multiple unreconciled NvSciSyncAttrLists together, forming a single new unreconciled NvSciSyncAttrList with a slot count equal to the sum of all the slot counts of NvSciSyncAttrList(s) in the input array which is no longer writable. More...
     
    NvSciError NvSciSyncAttrListClone (NvSciSyncAttrList origAttrList, NvSciSyncAttrList *newAttrList)
     Clones an NvSciSyncAttrList. More...
     
    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-slot unreconciled NvSciSyncAttrList. More...
     
    NvSciError NvSciSyncAttrListReconcile (const NvSciSyncAttrList inputArray[], size_t inputCount, NvSciSyncAttrList *newReconciledList, NvSciSyncAttrList *newConflictList)
     Reconciles the input unreconciled NvSciSyncAttrLists into a new reconciled NvSciSyncAttrList. More...
     
    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 NvSciSyncAttrList descriptor that can be transported by the application to any remote process as a serialized set of bytes over an NvSciIpc channel. More...
     
    NvSciError NvSciSyncAttrListIpcExportReconciled (const NvSciSyncAttrList reconciledAttrList, NvSciIpcEndpoint ipcEndpoint, void **descBuf, size_t *descLen)
     Transforms the reconciled NvSciSyncAttrList to an exportable reconciled NvSciSyncAttrList descriptor that can be transported by the application to any remote process as a serialized set of bytes over an NvSciIpc channel. More...
     
    NvSciError NvSciSyncAttrListIpcImportUnreconciled (NvSciSyncModule module, NvSciIpcEndpoint ipcEndpoint, const void *descBuf, size_t descLen, NvSciSyncAttrList *importedUnreconciledAttrList)
     Transforms an exported unreconciled NvSciSyncAttrList descriptor (potentially received from any process) into an unreconciled NvSciSyncAttrList which is no longer writable. More...
     
    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) into a reconciled NvSciSyncAttrList. More...
     
    void NvSciSyncAttrListFreeDesc (void *descBuf)
     Frees an exported NvSciSyncAttrList descriptor previously returned by any NvSciSyncAttrList exporting function. More...
     
    void NvSciSyncFenceClear (NvSciSyncFence *syncFence)
     Frees any resources allocated for the NvSciSyncFence. More...
     
    NvSciError NvSciSyncFenceDup (const NvSciSyncFence *srcSyncFence, NvSciSyncFence *dstSyncFence)
     Duplicates the given NvSciSyncFence, such that any wait on duplicated NvSciSyncFence will complete at the same time as a wait on given NvSciSyncFence. More...
     
    NvSciError NvSciSyncFenceExtractFence (const NvSciSyncFence *syncFence, uint64_t *id, uint64_t *value)
     Extracts the id and value from the input NvSciSyncFence. More...
     
    NvSciError NvSciSyncFenceUpdateFence (NvSciSyncObj syncObj, uint64_t id, uint64_t value, NvSciSyncFence *syncFence)
     Populates the input NvSciSyncFence based on the input id and value. More...
     
    NvSciError NvSciSyncFenceAddTimestampSlot (NvSciSyncFence *syncFence, uint32_t timestampSlot)
     Sets the current timestamp slot index in the NvSciSyncFence. More...
     
    NvSciError NvSciSyncFenceAddTaskStatusSlot (NvSciSyncFence *syncFence, uint32_t taskStatusSlot)
     Sets the current task status slot index to the NvSciSyncFence. More...
     
    NvSciError NvSciSyncFenceExtractTimestampSlot (NvSciSyncFence *syncFence, uint32_t *timeStampSlot)
     Reads the current timestamp slot index from the NvSciSyncFence. More...
     
    NvSciError NvSciSyncObjAlloc (NvSciSyncAttrList reconciledList, NvSciSyncObj *syncObj)
     Allocates and initializes a NvSciSyncObj that meets all the constraints specified in the given reconciled NvSciSyncAttrList. More...
     
    NvSciError NvSciSyncObjDup (NvSciSyncObj syncObj, NvSciSyncObj *dupObj)
     Creates a new NvSciSyncObj holding a reference to the original resources to which the input NvSciSyncObj holds reference to. More...
     
    NvSciError NvSciSyncObjGetAttrList (NvSciSyncObj syncObj, NvSciSyncAttrList *syncAttrList)
     Retrieves the reconciled NvSciSyncAttrList associated with an input NvSciSyncObj. More...
     
    void NvSciSyncObjFree (NvSciSyncObj syncObj)
     Destroys a valid NvSciSyncObj and frees any resources that were allocated for it. More...
     
    NvSciError NvSciSyncObjIpcExport (NvSciSyncObj syncObj, NvSciSyncAccessPerm permissions, NvSciIpcEndpoint ipcEndpoint, NvSciSyncObjIpcExportDescriptor *desc)
     Exports an NvSciSyncObj into an NvSciIpc-transferable object binary descriptor. More...
     
    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 NvSciSyncObj. More...
     
    NvSciError NvSciSyncIpcExportFence (const NvSciSyncFence *syncFence, NvSciIpcEndpoint ipcEndpoint, NvSciSyncFenceIpcExportDescriptor *desc)
     Exports the input NvSciSyncFence into a binary descriptor shareable across the NvSciIpc channel. More...
     
    NvSciError NvSciSyncIpcImportFence (NvSciSyncObj syncObj, const NvSciSyncFenceIpcExportDescriptor *desc, NvSciSyncFence *syncFence)
     Fills in the NvSciSyncFence based on the input binary descriptor. More...
     
    NvSciError NvSciSyncObjValidate (NvSciSyncObj syncObj)
     Validates the NvSciSyncObj satisfies the constraints of the NvSciSyncAttrList that it is associated with. More...
     
    NvSciError NvSciSyncObjGenerateFence (NvSciSyncObj syncObj, NvSciSyncFence *syncFence)
     Generates next point on sync timeline of an NvSciSyncObj and fills in the supplied NvSciSyncFence object. More...
     
    NvSciError NvSciSyncObjSignal (NvSciSyncObj syncObj)
     Signals the NvSciSyncObj using the reconciled primitive that was allocated along with the NvSciSyncObj. More...
     
    NvSciError NvSciSyncFenceWait (const NvSciSyncFence *syncFence, NvSciSyncCpuWaitContext context, int64_t timeoutUs)
     Performs a synchronous wait on the NvSciSyncFence object until the NvSciSyncFence has been signaled or the timeout expires. More...
     
    NvSciError NvSciSyncFenceGetTimestamp (const NvSciSyncFence *syncFence, uint64_t *timestampUS)
     Read the timestamp associated with the NvSciSyncFence. More...
     
    NvSciError NvSciSyncFenceGetTaskStatus (const NvSciSyncFence *syncFence, NvSciSyncTaskStatus *taskStatus)
     Reads the task status associated with the NvSciSyncFence and stores it in the user provided out parameter. More...
     
    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 NvSciSyncAttrKey. More...
     
    NvSciError NvSciSyncAttrListReconcileAndObjAlloc (const NvSciSyncAttrList inputArray[], size_t inputCount, NvSciSyncObj *syncObj, NvSciSyncAttrList *newConflictList)
     Reconciles the input unreconciled NvSciSyncAttrList(s) into a new reconciled NvSciSyncAttrList. More...
     
    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 pointed to by data. More...
     
    void NvSciSyncAttrListAndObjFreeDesc (void *attrListAndObjDescBuf)
     Frees an NvSciSyncIpcExportAttrListAndObj descriptor returned by a successful call to NvSciSyncIpcExportAttrListAndObj. More...
     
    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 NvSciSyncIpcExportAttrListAndObj that has not yet been freed via NvSciSyncAttrListAndObjFreeDesc. More...
     
    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 against. More...
     
    NvSciError NvSciSyncObjAttachPeer (NvSciSyncObj syncObj, const NvSciSyncAttrList inputArray[], size_t inputCount)
     Allows remote peer NvSciIpcEndpoint to gain access to already allocated NvSciSyncObj. More...
     
    NvSciError NvSciSyncFillC2cAttrs (NvSciSyncAttrList unrecAttrList, NvSciSyncAccessPerm permissions)
     Fills appropriate attributes for C2C copy in the input NvSciSyncAttrList. More...
     
    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 unreconciled NvSciSyncAttrList(s). More...
     
    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 or the timeout expires. More...
     

    Variables

    static const uint32_t NvSciSyncMajorVersion = 2U
     NvSciSync major version number. More...
     
    static const uint32_t NvSciSyncMinorVersion = 8U
     NvSciSync minor version number. More...
     
    static const int64_t NvSciSyncFenceMaxTimeout = (0x7fffffffffffffff / 1000)
     Maximum supported timeout value. More...
     
    static const NvSciSyncFence NvSciSyncFenceInitializer = {{0U}}
     Defines the value used to zero-initialize the NvSciSyncFence object. More...
     
    人人超碰97caoporen国产