The NvSciSync library allows applications to manage synchronization objects which coordinate when sequences of operations begin and end.
The following constants are defined and have type unsigned
int:
NvSciSyncMajorVersion
NvSciSyncMinorVersion
In C and C++ these constants are guaranteed to be defined as global const variables.
Upon each new release of NvSciSync:
This version of this specification corresponds to NvSciSync version 1.0 (major version 1, minor version 0).
Different processes using the NvSciSync inter-process APIs may use different minor versions of NvSciSync within the same major version, provided that if a process uses a feature newer than another processor's NvSciSync version, the latter process does not import an unreconciled NvSciSyncAttrList (directly or indirectly) from the former process.
In general, an NvSciSync API call will not return an error code if it has caused any side effects other than allocating resources and subsequently freeing those resources.
In general, unless specified otherwise, if a NULL pointer is passed to an NvSciSync API call, the API call will either return NvSciError_BadParameter or (if there are other applicable error conditions as well) an error code corresponding to another error.
Each NvSciSyncAttrList is either unreconciled or reconciled. It is unreconciled if it was:
It is reconciled if it was:
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... | |
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 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 struct NvSciSyncAttrListRec * | NvSciSyncAttrList |
A container constituting an NvSciSyncAttrList which contains: More... | |
Enumerations | |
enum | NvSciSyncAccessPerm { NvSciSyncAccessPerm_WaitOnly = (uint64_t)1U << 0U, NvSciSyncAccessPerm_SignalOnly = (uint64_t)1U << 1U, NvSciSyncAccessPerm_WaitSignal = NvSciSyncAccessPerm_WaitOnly | NvSciSyncAccessPerm_SignalOnly, NvSciSyncAccessPerm_Auto = (uint64_t)1U << 63U } |
Describes NvSciSyncObj access permissions. More... | |
enum | NvSciSyncAttrKey { NvSciSyncAttrKey_LowerBound, NvSciSyncAttrKey_NeedCpuAccess, NvSciSyncAttrKey_RequiredPerm, NvSciSyncAttrKey_ActualPerm, NvSciSyncAttrKey_WaiterContextInsensitiveFenceExports, NvSciSyncAttrKey_WaiterRequireTimestamps, NvSciSyncAttrKey_UpperBound } |
Describes the NvSciSync public attribute keys holding corresponding values specifying synchronization object constraints. More... | |
Functions | |
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) |
Releases 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 if 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 per NvSciSyncAttrKey in a 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. 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 | NvSciSyncAttrListDebugDump (NvSciSyncAttrList attrList, void **buf, size_t *len) |
Dumps the NvSciSyncAttrList into a binary descriptor. 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. 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 | 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 | 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 | 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 loaded library version is compatible with the supplied library build version. More... | |
Variables | |
static const uint32_t | NvSciSyncMajorVersion = 1U |
NvSciSync major version number. More... | |
static const uint32_t | NvSciSyncMinorVersion = 1U |
NvSciSync minor version number. More... | |
static const NvSciSyncFence | NvSciSyncFenceInitializer = {{0U}} |
Defines the value used to zero-initialize the NvSciSyncFence object. More... | |
typedef struct NvSciSyncAttrListRec* NvSciSyncAttrList |
A container constituting an NvSciSyncAttrList which contains:
Definition at line 295 of file nvscisync.h.
typedef struct NvSciSyncCpuWaitContextRec* NvSciSyncCpuWaitContext |
Represents the right to perform a CPU wait on an NvSciSyncFence.
It holds resources necessary to perform a CPU wait using NvSciSyncFenceWait(). It can be used to wait on NvSciSyncFence(s) associated with the same NvSciSyncModule that this NvSciSyncCpuWaitContext is associated with. An NvSciSyncCpuWaitContext can be used to wait on only one NvSciSyncFence at a time. However, a single NvSciSyncCpuWaitContext can be used to wait on different NvSciSyncFences at different instants of time.
Definition at line 195 of file nvscisync.h.
typedef struct NvSciSyncModuleRec* NvSciSyncModule |
Represents an instance of the NvSciSyncModule.
Any NvSciSyncAttrList created or imported using a particular NvSciSyncModule is bound to that module instance, along with any NvSciSyncObjs created or imported using those NvSciSyncAttrLists and any NvSciSyncFences created or imported using those NvSciSyncObjs.
Definition at line 183 of file nvscisync.h.
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.
If Timestamps have been requested prior to Reconciliation via the NvSciSyncAttrKey_WaiterRequireTimestamps key, this will also hold the Timestamp Buffer allocated by NvSciBuf.
A reference to a particular Synchronization Object.
Definition at line 282 of file nvscisync.h.
enum NvSciSyncAccessPerm |
Describes NvSciSyncObj access permissions.
Definition at line 302 of file nvscisync.h.
enum NvSciSyncAttrKey |
Describes the NvSciSync public attribute keys holding corresponding values specifying synchronization object constraints.
Input attribute keys specify desired synchronization object constraints and can be set/retrieved from unreconciled NvSciSyncAttrList using NvSciSyncAttrListSetAttrs()/ NvSciSyncAttrListGetAttrs() respectively. Output attribute key specify actual constraints computed by NvSciSync if reconciliation succeeds. Output attribute can be retrieved from reconciled NvSciSyncAttrList using NvSciSyncAttrListGetAttrs().
Enumerator | |
---|---|
NvSciSyncAttrKey_LowerBound | Specifies the lower bound - for NvSciSync internal use only. |
NvSciSyncAttrKey_NeedCpuAccess | (bool, inout) Specifies if CPU access is required. |
NvSciSyncAttrKey_RequiredPerm | (NvSciSyncAccessPerm, inout) Specifies the required access permissions. If NvSciSyncAttrKey_NeedCpuAccess is true, the CPU will be offered at least these permissions. Any hardware accelerators that contribute to this NvSciSyncAttrList will be offered at least these permissions. |
NvSciSyncAttrKey_ActualPerm | (NvSciSyncAccessPerm, out) Actual permission granted after reconciliation.
|
NvSciSyncAttrKey_WaiterContextInsensitiveFenceExports | (bool, inout) Importing and then exporting an NvSciSyncFenceIpcExportDescriptor has no side effects and yields an identical NvSciSyncFenceIpcExportDescriptor even if the NvSciIpcEndpoints used for import and export are different from ones used for NvSciSyncAttrList transporting. |
NvSciSyncAttrKey_WaiterRequireTimestamps | (bool, inout) Specifies if timestamps are required. Only valid for waiters. |
NvSciSyncAttrKey_UpperBound | Specifies the upper bound - for NvSciSync internal use only. |
Definition at line 339 of file nvscisync.h.
void NvSciSyncAttrListAndObjFreeDesc | ( | void * | attrListAndObjDescBuf | ) |
Frees an NvSciSyncIpcExportAttrListAndObj descriptor returned by a successful call to NvSciSyncIpcExportAttrListAndObj.
[in] | attrListAndObjDescBuf | Exported NvSciSyncIpcExportAttrListAndObj descriptor to be freed. |
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.
[in] | inputUnreconciledAttrListArray | Array containing the unreconciled NvSciSyncAttrList(s) to be appended together. Valid value: Array of unreconciled NvSciSyncAttrList(s) where the array size is at least 1. |
[in] | inputUnreconciledAttrListCount | Number of unreconciled NvSciSyncAttrList(s) in inputUnreconciledAttrListArray. Valid value: inputUnreconciledAttrListCount is valid input if it is non-zero. |
[out] | newUnreconciledAttrList | Appended NvSciSyncAttrList created out of the input unreconciled NvSciSyncAttrList(s). The output NvSciSyncAttrList is non-writable. |
NvSciError NvSciSyncAttrListClone | ( | NvSciSyncAttrList | origAttrList, |
NvSciSyncAttrList * | newAttrList | ||
) |
Clones an NvSciSyncAttrList.
The cloned NvSciSyncAttrList will contain all the values of the original NvSciSyncAttrList. If the original NvSciSyncAttrList is unreconciled, then modification will be allowed on the cloned NvSciSyncAttrList using set attributes APIs even if the attributes had been set in the original NvSciSyncAttrList, but the calls to set attributes in either NvSciSyncAttrList will not affect the other.
[in] | origAttrList | NvSciSyncAttrList to be cloned. |
[out] | newAttrList | The new NvSciSyncAttrList. |
NvSciError NvSciSyncAttrListCreate | ( | NvSciSyncModule | module, |
NvSciSyncAttrList * | attrList | ||
) |
Creates a new, single-slot unreconciled NvSciSyncAttrList associated with the input NvSciSyncModule with empty NvSciSyncAttrKeys.
[in] | module | The NvSciSyncModule instance with which to associate the new NvSciSyncAttrList. |
[out] | attrList | The new NvSciSyncAttrList. |
NvSciError NvSciSyncAttrListDebugDump | ( | NvSciSyncAttrList | attrList, |
void ** | buf, | ||
size_t * | len | ||
) |
Dumps the NvSciSyncAttrList into a binary descriptor.
[in] | attrList | NvSciSyncAttrList to create the blob from. |
[out] | buf | A pointer to binary descriptor buffer. |
[out] | len | The length of the binary descriptor buffer created. |
void NvSciSyncAttrListFree | ( | NvSciSyncAttrList | attrList | ) |
Frees the NvSciSyncAttrList and removes its association with the NvSciSyncModule with which it was created.
[in] | attrList | The NvSciSyncAttrList to be freed. |
void NvSciSyncAttrListFreeDesc | ( | void * | descBuf | ) |
Frees an exported NvSciSyncAttrList descriptor previously returned by any NvSciSyncAttrList exporting function.
[in] | descBuf | The exported NvSciSyncAttrList descriptor to be freed. The valid value is non-NULL. |
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.
If an NvSciSyncAttrKey was not set, this function will set *value to NULL and *len to 0.
[in] | attrList | NvSciSyncAttrList to retrieve the NvSciSyncAttrKey and value from. |
[in] | key | NvSciSyncAttrKey for which value to retrieve. Valid value: key is a valid input if it is an input or input/output attribute and it is > NvSciSyncAttrKey_LowerBound and < NvSciSyncAttrKey_UpperBound |
[out] | value | A pointer to the location where the attribute value is written. |
[out] | len | Length of the value. |
NvSciError NvSciSyncAttrListGetAttrs | ( | NvSciSyncAttrList | attrList, |
NvSciSyncAttrKeyValuePair * | pairArray, | ||
size_t | pairCount | ||
) |
Gets the value of NvSciSyncAttrKey from slot 0 of the input NvSciSyncAttrList.
The return values, stored in NvSciSyncAttrKeyValuePair, consist of const void* pointers to the attribute values from NvSciSyncAttrList. The application must not write to this data. If an attribute was never set, the corresponding value will be set to NULL and length to 0.
[in] | attrList | NvSciSyncAttrList to retrieve the value for given NvSciSyncAttrKey(s) from |
[in,out] | pairArray | A pointer to the array of NvSciSyncAttrKeyValuePair. Valid value: pairArray is valid input if it is not NULL and key member of every NvSciSyncAttrKeyValuePair in the array > NvSciSyncAttrKey_LowerBound and < NvSciSyncAttrKey_UpperBound. |
[in] | pairCount | The number of elements/entries in pairArray. Valid value: pairCount is valid input if it is non-zero. |
size_t NvSciSyncAttrListGetSlotCount | ( | NvSciSyncAttrList | attrList | ) |
Gets the slot count per NvSciSyncAttrKey in a NvSciSyncAttrList.
[in] | attrList | NvSciSyncAttrList to get the slot count from. |
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.
[in] | reconciledAttrList | The NvSciSyncAttrList to be exported. |
[in] | ipcEndpoint | The NvSciIpcEndpoint through which the caller may send the exported reconciled NvSciSyncAttrList descriptor. |
[out] | descBuf | A pointer to the new reconciled NvSciSyncAttrList descriptor, which the caller can deallocate later using NvSciSyncAttrListFreeDesc(). |
[out] | descLen | The size of the new reconciled NvSciSyncAttrList descriptor. |
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.
[in] | unreconciledAttrListArray | NvSciSyncAttrList(s) to be exported. Valid value: Array of valid NvSciSyncAttrList(s) where the array size is at least 1. |
[in] | unreconciledAttrListCount | Number of NvSciSyncAttrList(s) in unreconciledAttrListArray. Valid value: unreconciledAttrListCount is valid input if it is non-zero. |
[in] | ipcEndpoint | The NvSciIpcEndpoint through which the caller may send the exported unreconciled NvSciSyncAttrList descriptor. |
[out] | descBuf | A pointer to the new unreconciled NvSciSyncAttrList descriptor, which the caller can deallocate later using NvSciSyncAttrListFreeDesc(). |
[out] | descLen | The size of the new unreconciled NvSciSyncAttrList descriptor. |
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.
It also validates that the reconciled NvSciSyncAttrList to be imported will be a reconciled NvSciSyncAttrList that is consistent with the constraints in an array of input unreconciled NvSciSyncAttrList(s). This is recommended while importing what is expected to be a reconciled NvSciSyncAttrList to cause NvSciSync to validate the reconciled NvSciSyncAttrList against the input unreconciled NvSciSyncAttrList(s), so that the importing process can be sure that an NvSciSyncObj will satisfy the input constraints.
[in] | module | The NvSciSyncModule instance with which to associate the imported NvSciSyncAttrList. |
[in] | ipcEndpoint | The NvSciIpcEndpoint through which the caller receives the exported reconciled NvSciSyncAttrList descriptor. |
[in] | descBuf | The reconciled NvSciSyncAttrList descriptor to be transformed into a reconciled NvSciSyncAttrList. Valid value: descBuf is valid if it is non-NULL. |
[in] | descLen | The size of the reconciled NvSciSyncAttrList descriptor. Valid value: descLen is valid if it is not 0. |
[in] | inputUnreconciledAttrListArray | The array of NvSciSyncAttrLists against which the new NvSciSyncAttrList is to be validated. Valid value: Array of valid NvSciSyncAttrList(s) |
[in] | inputUnreconciledAttrListCount | The number of NvSciSyncAttrLists in inputUnreconciledAttrListArray. If inputUnreconciledAttrListCount is non-zero, then this operation will fail with an error unless all the constraints of all the NvSciSyncAttrLists in inputUnreconciledAttrListArray are met by the imported NvSciSyncAttrList. Valid value: [0, SIZE_MAX] |
[out] | importedReconciledAttrList | Imported NvSciSyncAttrList. |
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.
[in] | module | The NvSciSyncModule instance with which to associate the imported NvSciSyncAttrList. |
[in] | ipcEndpoint | The NvSciIpcEndpoint through which the caller receives the exported unreconciled NvSciSyncAttrList descriptor. |
[in] | descBuf | The unreconciled NvSciSyncAttrList descriptor to be translated into an unreconciled NvSciSyncAttrList. It should be the result of NvSciSyncAttrListIpcExportUnreconciled Valid value: descBuf is valid input if it is non-NULL. |
[in] | descLen | The size of the unreconciled NvSciSyncAttrList descriptor. Valid value: descLen is valid input if it is not 0. |
[out] | importedUnreconciledAttrList | Imported unreconciled NvSciSyncAttrList. |
NvSciError NvSciSyncAttrListIsReconciled | ( | NvSciSyncAttrList | attrList, |
bool * | isReconciled | ||
) |
Checks if the NvSciSyncAttrList is reconciled.
[in] | attrList | NvSciSyncAttrList to check. |
[out] | isReconciled | A pointer to a boolean to store whether the attrList is reconciled or not. |
NvSciError NvSciSyncAttrListReconcile | ( | const NvSciSyncAttrList | inputArray[], |
size_t | inputCount, | ||
NvSciSyncAttrList * | newReconciledList, | ||
NvSciSyncAttrList * | newConflictList | ||
) |
Reconciles the input unreconciled NvSciSyncAttrLists into a new reconciled NvSciSyncAttrList.
On success, this API call allocates memory for the reconciled NvSciSyncAttrList which has to be freed by the caller using NvSciSyncAttrListFree(). On reconciliation failure, this API call allocates memory for the conflicting NvSciSyncAttrList which has to be freed by the caller using NvSciSyncAttrListFree().
[in] | inputArray | Array containing unreconciled NvSciSyncAttrLists to be reconciled. Valid value: Array of valid NvSciSyncAttrLists where the array size is at least 1 |
[in] | inputCount | The number of unreconciled NvSciSyncAttrLists in inputArray. Valid value: inputCount is valid input if is non-zero. |
[out] | newReconciledList | Reconciled NvSciSyncAttrList. This field is populated only if the reconciliation succeeded. |
[out] | newConflictList | Unreconciled NvSciSyncAttrList consisting of the key/value pairs which caused the reconciliation failure. This field is populated only if the reconciliation failed. |
NvSciError NvSciSyncAttrListReconcileAndObjAlloc | ( | const NvSciSyncAttrList | inputArray[], |
size_t | inputCount, | ||
NvSciSyncObj * | syncObj, | ||
NvSciSyncAttrList * | newConflictList | ||
) |
Reconciles the input Unreconciled NvSciSyncAttrList(s) into a new Reconciled NvSciSyncAttrList.
If successful, a Reconciled NvSciSyncAttrList will be associated with a newly-allocated NvSciSyncObj that satisfies all the constraints specified in the Reconciled NvSciSyncAttrList.
Note: This function serves as a convenience function that combines calls to NvSciSyncAttrListReconcile and NvSciSyncObjAlloc.
[in] | inputArray | Array containing the Unreconciled NvSciSyncAttrList(s) to reconcile. Valid value: Array of valid NvSciSyncAttrLists where the array size is at least 1 |
[in] | inputCount | Number of Unreconciled NvSciSyncAttrLists in inputArray. Valid value: inputCount is valid input if is non-zero. |
[out] | syncObj | The new NvSciSyncObj. |
[out] | newConflictList | Unreconciled NvSciSyncAttrList consisting of the key-value pairs which caused the reconciliation failure. Valid value: This parameter is a valid output parameter only if the return code is NvSciError_ReconciliationFailed |
NvSciError NvSciSyncAttrListSetAttrs | ( | NvSciSyncAttrList | attrList, |
const NvSciSyncAttrKeyValuePair * | pairArray, | ||
size_t | pairCount | ||
) |
Sets the values for NvSciSyncAttrKey(s) in slot 0 of the input NvSciSyncAttrList.
Reads values only during the call, saving copies. Only allows writing attributes once, making them non writable in the NvSciSyncAttrList.
[in] | attrList | An unreconciled NvSciSyncAttrList containing the attribute key and value to set. |
[in] | pairArray | Array of NvSciSyncAttrKeyValuePair. Valid value: pairArray is valid input if it is not NULL and key member of every NvSciSyncAttrKeyValuePair in the array is an input or input/output attribute and it is > NvSciSyncAttrKey_LowerBound and < NvSciSyncAttrKey_UpperBound and value member of every NvSciSyncAttrKeyValuePair in the array is not NULL. |
[in] | pairCount | The number of elements/entries in pairArray. Valid value: pairCount is valid input if it is non-zero. |
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.
The returned pairArray consist of const void* pointers to the actual attribute values from NvSciSyncAttrList. The application must not overwrite this data. If an attribute was never set, the corresponding value will be set to NULL and length to 0.
[in] | attrList | NvSciSyncAttrList to retrieve the NvSciSyncAttrKey and value from. |
[in] | slotIndex | Index in the NvSciSyncAttrList. Valid value: 0 to slot count of NvSciSyncAttrList - 1. |
[in,out] | pairArray | Array of NvSciSyncAttrKeyValuePair. Holds the NvSciSyncAttrKey(s) passed into the function and returns an array of NvSciSyncAttrKeyValuePair structures. Valid value: pairArray is valid input if it is not NULL and key member of every NvSciSyncAttrKeyValuePair in the array > NvSciSyncAttrKey_LowerBound and < NvSciSyncAttrKey_UpperBound. |
[in] | pairCount | Indicates the number of elements/entries in pairArray. Valid value: pairCount is valid input if it is non-zero. |
NvSciError NvSciSyncAttrListValidateReconciled | ( | NvSciSyncAttrList | reconciledAttrList, |
const NvSciSyncAttrList | inputUnreconciledAttrListArray[], | ||
size_t | inputUnreconciledAttrListCount, | ||
bool * | isReconciledListValid | ||
) |
Validates a reconciled NvSciSyncAttrList against a set of input unreconciled NvSciSyncAttrLists.
[in] | reconciledAttrList | Reconciled NvSciSyncAttrList to be validated. |
[in] | inputUnreconciledAttrListArray | Array containing the unreconciled NvSciSyncAttrLists used for validation. Valid value: Array of valid unreconciled NvSciSyncAttrLists |
[in] | inputUnreconciledAttrListCount | number of elements/indices in inputUnreconciledAttrListArray Valid value: [1, SIZE_MAX] |
[out] | isReconciledListValid | A pointer to a boolean to store whether the reconciled NvSciSyncAttrList satisfies the parameters of set of unreconciled NvSciSyncAttrList(s) or not. |
NvSciError NvSciSyncCheckVersionCompatibility | ( | uint32_t | majorVer, |
uint32_t | minorVer, | ||
bool * | isCompatible | ||
) |
Checks if loaded library version is compatible with the supplied library build version.
This function checks the version of all dependent libraries and sets the output variable to true if all libraries are compatible, else sets output to false.
[in] | majorVer | build major version. Valid value: valid if set to NvSciSyncMajorVersion |
[in] | minorVer | build minor version. Valid value: valid if set to NvSciSyncMinorVersion |
[out] | isCompatible | pointer to the bool holding the result. |
NvSciError NvSciSyncCpuWaitContextAlloc | ( | NvSciSyncModule | module, |
NvSciSyncCpuWaitContext * | newContext | ||
) |
Allocates a new NvSciSyncCpuWaitContext.
[in] | module | NvSciSyncModule instance with which to associate the new NvSciSyncCpuWaitContext. |
[out] | newContext | The new NvSciSyncCpuWaitContext. |
void NvSciSyncCpuWaitContextFree | ( | NvSciSyncCpuWaitContext | context | ) |
Releases the NvSciSyncCpuWaitContext.
[in] | context | NvSciSyncCpuWaitContext to be freed. |
void NvSciSyncFenceClear | ( | NvSciSyncFence * | syncFence | ) |
Frees any resources allocated for the NvSciSyncFence.
Upon return, the memory pointed to by the NvSciSyncFence is guaranteed to be all zeros and thus the NvSciSyncFence is returned to the cleared state.
[in,out] | syncFence | A pointer to NvSciSyncFence. |
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.
If the given NvSciSyncFence is in a cleared state, then so also will be the duplicated NvSciSyncFence. The given NvSciSyncFence will be cleared before the duplication. If the given NvSciSyncFence holds any reference on a NvSciSyncObj, then the duplicated NvSciSyncFence will create an additional reference on it.
[in] | srcSyncFence | NvSciSyncFence to duplicate. |
[out] | dstSyncFence | duplicated NvSciSyncFence. |
NvSciError NvSciSyncFenceGetTimestamp | ( | const NvSciSyncFence * | syncFence, |
uint64_t * | timestampUS | ||
) |
Read the timestamp associated with the NvSciSyncFence.
[in] | syncFence | object of type NvSciSyncFence |
[out] | timestampUS | time (in microseconds) when the NvSciSyncFence expired. |
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.
Any NvSciSyncCpuWaitContext may be used for waiting on any NvSciSyncFence provided they were created in the same NvSciSyncModule context. One NvSciSyncCpuWaitContext can be used to wait on only one NvSciSyncFence at a time but it can be used to wait on a different NvSciSyncFence at a different time.
Waiting on a cleared NvSciSyncFence is always not blocking.
[in] | syncFence | The NvSciSyncFence to wait on. |
[in] | context | NvSciSyncCpuWaitContext holding resources needed to perform waiting. |
[in] | timeoutUs | Timeout to wait for in micro seconds, -1 for infinite wait. Valid value: [-1, INT64_MAX] |
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.
The binary descriptor can subsequently be transferred to Waiters to create a matching NvSciSyncObj.
Note: This function serves as a convenience function that combines calls to NvSciSyncAttrListIpcExportReconciled and NvSciSyncObjIpcExport.
[in] | syncObj | NvSciSyncObj to export. |
[in] | permissions | Flag indicating the expected NvSciSyncAccessPerm. Valid value: permissions is valid if it is set to NvSciSyncAccessPerm_WaitOnly or NvSciSyncAccessPerm_Auto. |
[in] | ipcEndpoint | The NvSciIpcEndpoint through which the caller may send the exported NvSciSyncAttrList and NvSciSyncObj descriptor. |
[out] | attrListAndObjDesc | Exported form of NvSciSyncAttrList and NvSciSyncObj shareable across an NvSciIpc channel. |
[out] | attrListAndObjDescSize | Size of the exported blob. |
NvSciError NvSciSyncIpcExportFence | ( | const NvSciSyncFence * | syncFence, |
NvSciIpcEndpoint | ipcEndpoint, | ||
NvSciSyncFenceIpcExportDescriptor * | desc | ||
) |
Exports the input NvSciSyncFence into a binary descriptor shareable across the NvSciIpc channel.
The resulting descriptor of a non-cleared NvSciSyncFence is associated with NvSciSyncObj associated with the NvSciSyncFence. After transporting the descriptor via an Ipc path, NvSciSync will be able to recognize that the NvSciSyncFence is associated with this NvSciSyncObj if NvSciSyncObj traversed the same Ipc path.
[in] | syncFence | A pointer to NvSciSyncFence object to be exported. |
[in] | ipcEndpoint | The NvSciIpcEndpoint through which the caller may send the exported fence descriptor. |
[out] | desc | The exported form of NvSciSyncFence shared across an NvSciIpc channel. |
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.
It also validates Reconciled NvSciSyncAttrList against a set of Unreconciled NvSciSyncAttrLists to ensure that the Reconciled NvSciSyncAttrList satisfies the constraints of all the given Unreconciled NvSciSyncAttrLists.
This function is called from the Waiter after it receives the binary descriptor from the Signaler who has created the binary descriptor. Waiter will create its own NvSciSyncObj and return as output.
Note: This function serves as a convenience function that combines calls to NvSciSyncAttrListIpcImportReconciled and NvSciSyncObjIpcImport.
[in] | module | A NvSciSyncModule to associate the imported NvSciSyncAttrList with. |
[in] | ipcEndpoint | The NvSciIpcEndpoint through which the caller receives the exported NvSciSyncAttrList and NvSciSyncObj descriptor. |
[in] | attrListAndObjDesc | Exported form of NvSciSyncAttrList and NvSciSyncObj received through NvSciIpc channel. Valid value: attrListAndObjDesc is valid if it is non-NULL. |
[in] | attrListAndObjDescSize | Size of the exported blob. Valid value: attrListAndObjDescSize is valid if it is not 0. |
[in] | attrList | The array of Unreconciled NvSciSyncAttrLists against which the new NvSciSyncAttrList is to be validated. Valid value: Array of valid NvSciSyncAttrList(s) |
[in] | attrListCount | Number of Unreconciled NvSciSyncAttrLists in the attrList array. Valid value: [0, SIZE_MAX] |
[in] | minPermissions | Flag indicating the expected NvSciSyncAccessPerm. Valid value: NvSciSyncAccessPerm_WaitOnly and NvSciSyncAccessPerm_Auto |
[in] | timeoutUs | Unused |
[out] | syncObj | Waiter's NvSciSyncObj. |
NvSciError NvSciSyncIpcImportFence | ( | NvSciSyncObj | syncObj, |
const NvSciSyncFenceIpcExportDescriptor * | desc, | ||
NvSciSyncFence * | syncFence | ||
) |
Fills in the NvSciSyncFence based on the input binary descriptor.
If the NvSciSyncFence is not cleared, then NvSciSync will validate if it corresponds to the NvSciSyncObj and it will associate it with the NvSciSyncObj.
The NvSciSyncFence will be cleared first, removing any previous reference to a NvSciSyncObj.
[in] | syncObj | The NvSciSyncObj. |
[in] | desc | The exported form of NvSciSyncFence. Valid value: A binary descriptor produced by NvSciSyncIpcExportFence. |
[out] | syncFence | A pointer to NvSciSyncFence object. |
void NvSciSyncModuleClose | ( | NvSciSyncModule | module | ) |
Releases an instance of the NvSciSyncModule that was obtained through an earlier call to NvSciSyncModuleOpen().
Once an NvSciSyncModule is closed and all NvSciSyncAttrLists, NvSciSyncObjs, NvSciSyncCpuWaitContexts, NvSciSyncFences bound to that module instance are freed, the NvSciSyncModule instance will be de-initialized in the calling process. Until then the NvSciSyncModule will still be accessible from those objects still referencing it.
[in] | module | The NvSciSyncModule instance to close. The calling process must not pass this module to another NvSciSync API call. |
NvSciError NvSciSyncModuleOpen | ( | NvSciSyncModule * | newModule | ) |
Initializes and returns a new NvSciSyncModule with no NvSciSyncAttrLists, NvSciSyncCpuWaitContexts, NvSciSyncObjs or NvSciSyncFences bound to it.
[out] | newModule | The new NvSciSyncModule. |
NvSciError NvSciSyncObjAlloc | ( | NvSciSyncAttrList | reconciledList, |
NvSciSyncObj * | syncObj | ||
) |
Allocates and initializes a NvSciSyncObj that meets all the constraints specified in the given Reconciled NvSciSyncAttrList.
[in] | reconciledList | A Reconciled NvSciSyncAttrList. |
[out] | syncObj | The allocated NvSciSyncObj. |
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.
The duplicated NvSciSyncObj is not a completely new NvSciSyncObj. Therefore, signaling and generating NvSciSyncFences from one affects the state of the other, because it is the same underlying NvSciSyncObj.
The resulting NvSciSyncObj must be freed separately by the user.
[in] | syncObj | NvSciSyncObj to duplicate. |
[out] | dupObj | Duplicated NvSciSyncObj. |
void NvSciSyncObjFree | ( | NvSciSyncObj | syncObj | ) |
Destroys a valid NvSciSyncObj and frees any resources that were allocated for it.
[in] | syncObj | NvSciSyncObj to be freed. |
NvSciError NvSciSyncObjGenerateFence | ( | NvSciSyncObj | syncObj, |
NvSciSyncFence * | syncFence | ||
) |
Generates next point on sync timeline of an NvSciSyncObj and fills in the supplied NvSciSyncFence object.
This function can be used when the CPU is the Signaler.
[in] | syncObj | A valid NvSciSyncObj. |
[out] | syncFence | NvSciSyncFence to be filled |
NvSciError NvSciSyncObjGetAttrList | ( | NvSciSyncObj | syncObj, |
NvSciSyncAttrList * | syncAttrList | ||
) |
Retrieves the Reconciled NvSciSyncAttrList associated with an input NvSciSyncObj.
The retrieved Reconciled NvSciSyncAttrList is always read-only and the Attribute Key values in the NvSciSyncAttrList cannot be changed using the set attribute APIs. In addition, the returned NvSciSyncAttrList must not be freed.
[in] | syncObj | Handle corresponding to NvSciSyncObj from which the NvSciSyncAttrList has to be retrieved. |
[out] | syncAttrList | pointer to the retrieved NvSciSyncAttrList. |
NvSciError NvSciSyncObjIpcExport | ( | NvSciSyncObj | syncObj, |
NvSciSyncAccessPerm | permissions, | ||
NvSciIpcEndpoint | ipcEndpoint, | ||
NvSciSyncObjIpcExportDescriptor * | desc | ||
) |
Exports an NvSciSyncObj into an NvSciIpc-transferable object binary descriptor.
The binary descriptor can be transferred to a Waiter to create a matching NvSciSyncObj.
[in] | syncObj | A NvSciSyncObj to export. |
[in] | permissions | Flag indicating the expected NvSciSyncAccessPerm. Valid value: permissions is valid if it is set to NvSciSyncAccessPerm_WaitOnly or NvSciSyncAccessPerm_Auto. |
[in] | ipcEndpoint | The NvSciIpcEndpoint through which the caller intends to transfer the exported NvSciSyncObj descriptor. |
[out] | desc | NvSciSync fills in this caller-supplied descriptor with the exported form of NvSciSyncObj that is to be shared across an NvSciIpc channel. |
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.
This function is called from the Waiter after it receives the binary descriptor from the Signaler who has created and exported the binary descriptor. The Waiter will create its corresponding NvSciSyncObj and return the allocated NvSciSyncObj as output.
[in] | ipcEndpoint | The NvSciIpcEndpoint through which the caller received the exported NvSciSyncObj descriptor. |
[in] | desc | The exported form of NvSciSyncObj received through the NvSciIpc channel. Valid value: desc is valid if it is non-NULL |
[in] | inputAttrList | The reconciled NvSciSyncAttrList returned by NvSciSyncAttrListIpcImportReconciled. |
[in] | permissions | NvSciSyncAccessPerm indicating the expected access permissions. Valid value: NvSciSyncAccessPerm_WaitOnly and NvSciSyncAccessPerm_Auto |
[in] | timeoutUs | Unused |
[out] | syncObj | The Waiter's NvSciSyncObj. |
NvSciError NvSciSyncObjSignal | ( | NvSciSyncObj | syncObj | ) |
Signals the NvSciSyncObj using the reconciled primitive that was allocated along with the NvSciSyncObj.
This function is called when the CPU is the Signaler.
[in] | syncObj | A valid NvSciSyncObj to signal. |
|
static |
Defines the value used to zero-initialize the NvSciSyncFence object.
An NvSciSyncFence that is all zeroes is in a cleared state.
Definition at line 237 of file nvscisync.h.
|
static |
|
static |