NVIDIA DriveOS Linux SDK API Reference

7.2.5.0 Early Access Release
nvscisync.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2019-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA Corporation and its licensors retain all intellectual property
6  * and proprietary rights in and to this software, related documentation
7  * and any modifications thereto. Any use, reproduction, disclosure or
8  * distribution of this software and related documentation without an express
9  * license agreement from NVIDIA Corporation is strictly prohibited.
10  */
19 #ifndef INCLUDED_NVSCISYNC_H
20 #define INCLUDED_NVSCISYNC_H
21 
158 #if !defined (__cplusplus)
159 #include <stddef.h>
160 #include <stdbool.h>
161 #include <stdint.h>
162 #endif
163 
164 #include "nvscierror.h"
165 #include "nvsciipc.h"
166 #include "nvscibuf.h"
167 
168 #if defined (__cplusplus)
169 extern "C"
170 {
171 #endif
172 
173 #if defined __GNUC__
174  #define PACK_SYNC( __Declaration__, ... ) __Declaration__,##__VA_ARGS__ __attribute__((packed))
175 #else
176  #define PACK_SYNC( __Declaration__, ... ) __pragma(pack(push, 1)) __Declaration__,##__VA_ARGS__ __pragma(pack(pop))
177 #endif
178 
183 static const uint32_t NvSciSyncMajorVersion = 2U;
184 
189 static const uint32_t NvSciSyncMinorVersion = 10U;
190 
196 static const int64_t NvSciSyncFenceMaxTimeout = (0x7fffffffffffffff / 1000);
197 
209 typedef struct NvSciSyncModuleRec* NvSciSyncModule;
210 
221 typedef struct NvSciSyncCpuWaitContextRec* NvSciSyncCpuWaitContext;
222 
253 typedef struct NvSciSyncFence {
254  uint64_t payload[6];
256 
263 
269 typedef struct {
270  uint64_t payload[7];
272 
278 typedef struct {
280  uint64_t payload[128];
282 
308 typedef struct NvSciSyncObjRec* NvSciSyncObj;
309 
314 typedef const struct NvSciSyncObjRec* NvSciSyncObjConst;
315 
327 typedef struct NvSciSyncAttrListRec* NvSciSyncAttrList;
328 
333 typedef uint64_t NvSciSyncAccessPerm;
334 
339 #if defined(__cplusplus)
340  #define NvSciSyncAccessPerm_WaitOnly (static_cast<uint64_t>(1U) << 0U)
341 #else
342  #define NvSciSyncAccessPerm_WaitOnly ((uint64_t)1U << 0U)
343 #endif
344 
349 #if defined(__cplusplus)
350  #define NvSciSyncAccessPerm_SignalOnly (static_cast<uint64_t>(1U) << 1U)
351 #else
352  #define NvSciSyncAccessPerm_SignalOnly ((uint64_t)1U << 1U)
353 #endif
354 
360 #define NvSciSyncAccessPerm_WaitSignal (NvSciSyncAccessPerm_WaitOnly | NvSciSyncAccessPerm_SignalOnly)
361 
366 #if defined(__cplusplus)
367  #define NvSciSyncAccessPerm_Auto (static_cast<uint64_t>(1U) << 63U)
368 #else
369  #define NvSciSyncAccessPerm_Auto ((uint64_t)1U << 63U)
370 #endif
371 
382 typedef enum {
391 
396 PACK_SYNC(typedef struct {
398  uint64_t timestamp;
400  uint32_t statusEngine;
402  uint16_t subframe;
406  uint16_t status;
407 }) NvSciSyncTaskStatus;
408 
447 };
448 
454 
466 typedef enum {
633 
679 
686 typedef struct {
692  const void* value;
694  size_t len;
696 
700 typedef enum {
710 
751 NvSciError NvSciSyncModuleOpen(
752  NvSciSyncModule* newModule);
753 
800  NvSciSyncModule module);
801 
845  NvSciSyncModule module,
846  NvSciSyncCpuWaitContext* newContext);
847 
883  NvSciSyncCpuWaitContext context);
884 
927 NvSciError NvSciSyncAttrListCreate(
928  NvSciSyncModule module,
929  NvSciSyncAttrList* attrList);
930 
966  NvSciSyncAttrList attrList);
967 
1005  NvSciSyncAttrList attrList,
1006  bool* isReconciled);
1007 
1076  NvSciSyncAttrList reconciledAttrList,
1077  const NvSciSyncAttrList inputUnreconciledAttrListArray[],
1078  size_t inputUnreconciledAttrListCount,
1079  bool* isReconciledListValid);
1080 
1137 NvSciError NvSciSyncAttrListSetAttrs(
1138  NvSciSyncAttrList attrList,
1139  const NvSciSyncAttrKeyValuePair* pairArray,
1140  size_t pairCount);
1141 
1194 NvSciError NvSciSyncAttrListGetAttrs(
1195  NvSciSyncAttrList attrList,
1196  NvSciSyncAttrKeyValuePair* pairArray,
1197  size_t pairCount);
1198 
1227  NvSciSyncAttrList attrList);
1228 
1296  const NvSciSyncAttrList inputUnreconciledAttrListArray[],
1297  size_t inputUnreconciledAttrListCount,
1298  NvSciSyncAttrList* newUnreconciledAttrList);
1299 
1349 NvSciError NvSciSyncAttrListClone(
1350  NvSciSyncAttrList origAttrList,
1351  NvSciSyncAttrList* newAttrList);
1352 
1407  NvSciSyncAttrList attrList,
1408  size_t slotIndex,
1409  NvSciSyncAttrKeyValuePair* pairArray,
1410  size_t pairCount);
1411 
1493 NvSciError NvSciSyncAttrListReconcile(
1494  const NvSciSyncAttrList inputArray[],
1495  size_t inputCount,
1496  NvSciSyncAttrList* newReconciledList,
1497  NvSciSyncAttrList* newConflictList);
1498 
1499 #if (NV_IS_SAFETY == 0)
1500 
1548 NvSciError NvSciSyncAttrListDebugDump(
1550  NvSciSyncAttrList attrList,
1551  void** buf,
1552  size_t* len);
1554 #endif
1555 
1636  const NvSciSyncAttrList unreconciledAttrListArray[],
1637  size_t unreconciledAttrListCount,
1638  NvSciIpcEndpoint ipcEndpoint,
1639  void** descBuf,
1640  size_t* descLen);
1641 
1697  const NvSciSyncAttrList reconciledAttrList,
1698  NvSciIpcEndpoint ipcEndpoint,
1699  void** descBuf,
1700  size_t* descLen);
1701 
1762  NvSciSyncModule module,
1763  NvSciIpcEndpoint ipcEndpoint,
1764  const void* descBuf,
1765  size_t descLen,
1766  NvSciSyncAttrList* importedUnreconciledAttrList);
1767 
1857  NvSciSyncModule module,
1858  NvSciIpcEndpoint ipcEndpoint,
1859  const void* descBuf,
1860  size_t descLen,
1861  const NvSciSyncAttrList inputUnreconciledAttrListArray[],
1862  size_t inputUnreconciledAttrListCount,
1863  NvSciSyncAttrList* importedReconciledAttrList);
1864 
1899  void* descBuf);
1900 
1933 void NvSciSyncFenceClear(
1934  NvSciSyncFence* syncFence);
1935 
1982 NvSciError NvSciSyncFenceDup(
1983  const NvSciSyncFence* srcSyncFence,
1984  NvSciSyncFence* dstSyncFence);
1985 
2020 NvSciError NvSciSyncFenceExtractFence(
2021  const NvSciSyncFence* syncFence,
2022  uint64_t* id,
2023  uint64_t* value);
2024 
2084 NvSciError NvSciSyncFenceUpdateFence(
2085  NvSciSyncObj syncObj,
2086  uint64_t id,
2087  uint64_t value,
2088  NvSciSyncFence* syncFence);
2089 
2127  NvSciSyncFence* syncFence,
2128  uint32_t timestampSlot);
2129 
2167  NvSciSyncFence* syncFence,
2168  uint32_t taskStatusSlot);
2169 
2206  NvSciSyncFence* syncFence,
2207  uint32_t* timestampSlot);
2208 
2263 NvSciError NvSciSyncObjAlloc(
2264  NvSciSyncAttrList reconciledList,
2265  NvSciSyncObj* syncObj);
2266 
2316 NvSciError NvSciSyncObjDup(
2317  NvSciSyncObj syncObj,
2318  NvSciSyncObj* dupObj);
2319 
2382  NvSciSyncObj syncObj,
2383  NvSciSyncAccessPerm reducedPerm,
2384  NvSciSyncObj* dupObj);
2385 
2423 NvSciError NvSciSyncObjGetPerm(
2424  NvSciSyncObj syncObj,
2425  NvSciSyncAccessPerm* permissions);
2426 
2464 NvSciError NvSciSyncObjGetAttrList(
2465  NvSciSyncObj syncObj,
2466  NvSciSyncAttrList* syncAttrList);
2467 
2511 void NvSciSyncObjFree(
2512  NvSciSyncObj syncObj);
2513 
2556 #if (NV_L4T == 1)
2557 
2561 #endif
2562 
2587 NvSciError NvSciSyncObjIpcExport(
2588  NvSciSyncObj syncObj,
2589  NvSciSyncAccessPerm permissions,
2590  NvSciIpcEndpoint ipcEndpoint,
2592 
2678 NvSciError NvSciSyncObjIpcImport(
2679  NvSciIpcEndpoint ipcEndpoint,
2680  const NvSciSyncObjIpcExportDescriptor* desc,
2681  NvSciSyncAttrList inputAttrList,
2682  NvSciSyncAccessPerm permissions,
2683  int64_t timeoutUs,
2684  NvSciSyncObj* syncObj);
2685 
2731 NvSciError NvSciSyncIpcExportFence(
2732  const NvSciSyncFence* syncFence,
2733  NvSciIpcEndpoint ipcEndpoint,
2735 
2783 NvSciError NvSciSyncIpcImportFence(
2784  NvSciSyncObj syncObj,
2786  NvSciSyncFence* syncFence);
2787 
2842 NvSciError NvSciSyncObjValidate(
2843  NvSciSyncObj syncObj);
2844 
2891 NvSciError NvSciSyncObjGenerateFence(
2892  NvSciSyncObj syncObj,
2893  NvSciSyncFence* syncFence);
2894 
2895 #if (defined(__linux__) || defined (__ANDROID__) || (NV_L4T == 1)) && (NV_IS_SAFETY == 0)
2896 
2936 NvSciError NvSciSyncFencePutToFile(
2937  const NvSciSyncFence* syncFence,
2938  int32_t* fenceFd);
2939 
2993 NvSciError NvSciSyncFenceUpdateFromFile(
2994  NvSciSyncObj syncObj,
2995  int32_t fenceFd,
2996  NvSciSyncFence* syncFence);
2997 #endif
2998 
3038 NvSciError NvSciSyncObjSignal(
3039  NvSciSyncObj syncObj);
3040 
3104 NvSciError NvSciSyncFenceWait(
3105  const NvSciSyncFence* syncFence,
3106  NvSciSyncCpuWaitContext context,
3107  int64_t timeoutUs);
3108 
3156 NvSciError NvSciSyncFenceGetTimestamp(
3157  const NvSciSyncFence* syncFence,
3158  uint64_t* timestampUS);
3159 
3201 NvSciError NvSciSyncFenceGetTaskStatus(
3202  const NvSciSyncFence* syncFence,
3203  NvSciSyncTaskStatus* taskStatus);
3204 
3205 /*
3206  * NvSciSync Utility functions
3207  */
3208 
3258 NvSciError NvSciSyncAttrListGetAttr(
3259  NvSciSyncAttrList attrList,
3260  NvSciSyncAttrKey key,
3261  const void** value,
3262  size_t* len);
3263 
3345  const NvSciSyncAttrList inputArray[],
3346  size_t inputCount,
3347  NvSciSyncObj* syncObj,
3348  NvSciSyncAttrList* newConflictList);
3349 
3417  NvSciSyncObj syncObj,
3418  NvSciSyncAccessPerm permissions,
3419  NvSciIpcEndpoint ipcEndpoint,
3420  void** attrListAndObjDesc,
3421  size_t* attrListAndObjDescSize);
3422 
3459  void* attrListAndObjDescBuf);
3460 
3559  NvSciSyncModule module,
3560  NvSciIpcEndpoint ipcEndpoint,
3561  const void* attrListAndObjDesc,
3562  size_t attrListAndObjDescSize,
3563  NvSciSyncAttrList const attrList[],
3564  size_t attrListCount,
3565  NvSciSyncAccessPerm minPermissions,
3566  int64_t timeoutUs,
3567  NvSciSyncObj* syncObj);
3568 
3614  uint32_t majorVer,
3615  uint32_t minorVer,
3616  bool* isCompatible);
3617 
3670 NvSciError NvSciSyncObjAttachPeer(
3671  NvSciSyncObj syncObj,
3672  const NvSciSyncAttrList inputArray[],
3673  size_t inputCount);
3674 
3712 NvSciError NvSciSyncFillC2cAttrs(
3713  NvSciSyncAttrList unrecAttrList,
3714  NvSciSyncAccessPerm permissions);
3715 
3779  NvSciSyncAttrList reconciledAttrList,
3780  const NvSciSyncAttrKeyValuePair* pairArray,
3781  size_t pairCount,
3782  NvSciSyncAccessPerm permissions);
3783 
3860 NvSciError NvSciSyncFenceWaitWithMode(
3861  const NvSciSyncFence* syncFence,
3862  NvSciSyncCpuWaitContext context,
3863  int64_t timeoutUs,
3864  NvSciSyncWaitMode waitMode);
3865 
3912 NvSciError NvSciSyncObjSetTaskStatus(
3913  NvSciSyncObj syncObj,
3914  uint32_t taskStatusSlot,
3915  const NvSciSyncTaskStatus* taskStatus);
3916 
3917 #if defined(__cplusplus)
3918 }
3919 #endif // __cplusplus
3920 
3921 #endif // INCLUDED_NVSCISYNC_H
NvSciSyncFenceClear
void NvSciSyncFenceClear(NvSciSyncFence *syncFence)
Frees any resources allocated for the NvSciSyncFence.
NvSciSyncAttrValPrimitiveType_VidmemSemaphorePayload64b
@ NvSciSyncAttrValPrimitiveType_VidmemSemaphorePayload64b
16 bytes semaphore backed by video memory.
Definition: nvscisync.h:444
NvSciSyncAttrKey_RequireDeterministicFences
@ NvSciSyncAttrKey_RequireDeterministicFences
(bool, inout) Specifies if deterministic primitives are required.
Definition: nvscisync.h:581
NvSciSyncAccessPerm
uint64_t NvSciSyncAccessPerm
Describes NvSciSyncObj access permissions.
Definition: nvscisync.h:333
NvSciSyncObjValidate
NvSciError NvSciSyncObjValidate(NvSciSyncObj syncObj)
Validates the NvSciSyncObj satisfies the constraints of the NvSciSyncAttrList that it is associated w...
NvSciSyncAttrListAndObjFreeDesc
void NvSciSyncAttrListAndObjFreeDesc(void *attrListAndObjDescBuf)
Frees an NvSciSyncIpcExportAttrListAndObj descriptor returned by a successful call to NvSciSyncIpcExp...
NvSciSyncWaitMode_Default
@ NvSciSyncWaitMode_Default
same behavior as with NvSciSyncFenceWait()
Definition: nvscisync.h:702
NvSciSyncIpcImportFence
NvSciError NvSciSyncIpcImportFence(NvSciSyncObj syncObj, const NvSciSyncFenceIpcExportDescriptor *desc, NvSciSyncFence *syncFence)
Fills in the NvSciSyncFence based on the input binary descriptor.
NvSciSyncAttrKey_NeedCpuAccess
@ NvSciSyncAttrKey_NeedCpuAccess
(bool, inout) Specifies if CPU access is required.
Definition: nvscisync.h:499
NvSciSyncObjIpcExport
NvSciError NvSciSyncObjIpcExport(NvSciSyncObj syncObj, NvSciSyncAccessPerm permissions, NvSciIpcEndpoint ipcEndpoint, NvSciSyncObjIpcExportDescriptor *desc)
Exports an NvSciSyncObj into an NvSciIpc-transferable object binary descriptor.
NvSciSyncObjIpcImport
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...
NvSciSyncFencePutToFile
NvSciError NvSciSyncFencePutToFile(const NvSciSyncFence *syncFence, int32_t *fenceFd)
Creates a sync file from NvSciSyncFence.
NvSciSyncAttrListFreeDesc
void NvSciSyncAttrListFreeDesc(void *descBuf)
Frees an exported NvSciSyncAttrList descriptor previously returned by any NvSciSyncAttrList exporting...
NvSciSyncObjSetTaskStatus
NvSciError NvSciSyncObjSetTaskStatus(NvSciSyncObj syncObj, uint32_t taskStatusSlot, const NvSciSyncTaskStatus *taskStatus)
Sets the task status for a specific slot in the NvSciSyncObj.
NvSciSyncAttrValPrimitiveType_SysmemSemaphore
@ NvSciSyncAttrValPrimitiveType_SysmemSemaphore
16 bytes semaphore backed by system memory.
Definition: nvscisync.h:426
NvSciSyncTaskStatus_Failure
@ NvSciSyncTaskStatus_Failure
The task has failed.
Definition: nvscisync.h:386
NvSciSyncIpcImportAttrListAndObj
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
@ NvSciSyncAttrValPrimitiveType_Syncpoint
Syncpoint.
Definition: nvscisync.h:420
NvSciSyncAttrKeyValuePair::len
size_t len
Length of the value in bytes.
Definition: nvscisync.h:694
NvSciSyncTaskStatusVal
NvSciSyncTaskStatusVal
Status of the signaler's task that signals a particular NvSciSyncFence.
Definition: nvscisync.h:382
NvSciSyncFence::payload
uint64_t payload[6]
Definition: nvscisync.h:254
NvSciSyncAttrKey_LowerBound
@ NvSciSyncAttrKey_LowerBound
Specifies the lower bound - for NvSciSync internal use only.
Definition: nvscisync.h:468
NvSciSyncTaskStatus_Invalid
@ NvSciSyncTaskStatus_Invalid
The signaler did not report any task status.
Definition: nvscisync.h:389
NvSciSyncAttrKey_Numa
@ NvSciSyncAttrKey_Numa
Attribute key specifying the NUMA node for resource allocation.
Definition: nvscisync.h:675
NvSciSyncWaitMode_BusyNoYield
@ NvSciSyncWaitMode_BusyNoYield
Polling with spin, no yielding.
Definition: nvscisync.h:706
NvSciSyncCpuWaitContextFree
void NvSciSyncCpuWaitContextFree(NvSciSyncCpuWaitContext context)
Releases the NvSciSyncCpuWaitContext.
NvSciSyncAttrListSetAttrs
NvSciError NvSciSyncAttrListSetAttrs(NvSciSyncAttrList attrList, const NvSciSyncAttrKeyValuePair *pairArray, size_t pairCount)
Sets the values for NvSciSyncAttrKey(s) in slot 0 of the input NvSciSyncAttrList.
NvSciSyncFenceAddTaskStatusSlot
NvSciError NvSciSyncFenceAddTaskStatusSlot(NvSciSyncFence *syncFence, uint32_t taskStatusSlot)
Sets the current task status slot index to the NvSciSyncFence.
NvSciSyncAttrKeyValuePair::attrKey
NvSciSyncAttrKey attrKey
NvSciSyncAttrKey for which value needs to be set/retrieved.
Definition: nvscisync.h:690
NvSciSyncIpcExportFence
NvSciError NvSciSyncIpcExportFence(const NvSciSyncFence *syncFence, NvSciIpcEndpoint ipcEndpoint, NvSciSyncFenceIpcExportDescriptor *desc)
Exports the input NvSciSyncFence into a binary descriptor shareable across the NvSciIpc channel.
NvSciSyncFenceWaitWithMode
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...
NvSciSyncAttrListIpcImportReconciled
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...
NvSciSyncMajorVersion
static const uint32_t NvSciSyncMajorVersion
NvSciSync major version number.
Definition: nvscisync.h:183
NvSciSyncAttrKey_PeerHwEngineArray
@ NvSciSyncAttrKey_PeerHwEngineArray
(NvSciBufPeerHwEngine[], inout) An attribute indicating engine information of late peer which are goi...
Definition: nvscisync.h:650
timestamp
const WFDPipeline const WFDSource const WFDTransition const WFDRect *const const WFDuint64 timestamp
Definition: wfdext.h:114
NvSciSyncAttrList
struct NvSciSyncAttrListRec * NvSciSyncAttrList
A container constituting an NvSciSyncAttrList which contains:
Definition: nvscisync.h:327
NvSciSyncAttrValPrimitiveType
enum NvSciSyncAttrValPrimitiveTypeRec NvSciSyncAttrValPrimitiveType
Alias for enum NvSciSyncAttrValPrimitiveTypeRec.
Definition: nvscisync.h:453
NvSciSyncCpuWaitContextAlloc
NvSciError NvSciSyncCpuWaitContextAlloc(NvSciSyncModule module, NvSciSyncCpuWaitContext *newContext)
Allocates a new NvSciSyncCpuWaitContext.
NvSciSyncAttrKey_NumTimestampSlots
@ NvSciSyncAttrKey_NumTimestampSlots
(uint32_t, out) Specifies the total number of slots in the timestamps buffer.
Definition: nvscisync.h:591
NvSciSyncObjFree
void NvSciSyncObjFree(NvSciSyncObj syncObj)
Destroys a valid NvSciSyncObj and frees any resources that were allocated for it.
NvSciSyncAttrKey_WaiterRequireTimestamps
@ NvSciSyncAttrKey_WaiterRequireTimestamps
(bool, inout) Specifies if timestamps are required.
Definition: nvscisync.h:569
NvSciSyncAttrKeyValuePair::value
const void * value
Memory which contains the value corresponding to the key.
Definition: nvscisync.h:692
NvSciSyncAttrKey_MaxPrimitiveValue
@ NvSciSyncAttrKey_MaxPrimitiveValue
(uint64_t, out) Specifies the maximum value of the reconciled primitive.
Definition: nvscisync.h:609
NvSciSyncFenceMaxTimeout
static const int64_t NvSciSyncFenceMaxTimeout
Maximum supported timeout value.
Definition: nvscisync.h:196
NvSciSyncObjGenerateFence
NvSciError NvSciSyncObjGenerateFence(NvSciSyncObj syncObj, NvSciSyncFence *syncFence)
Generates next point on sync timeline of an NvSciSyncObj and fills in the supplied NvSciSyncFence obj...
NvSciSyncAttrListGetAttrs
NvSciError NvSciSyncAttrListGetAttrs(NvSciSyncAttrList attrList, NvSciSyncAttrKeyValuePair *pairArray, size_t pairCount)
Gets the value of NvSciSyncAttrKey from slot 0 of the input NvSciSyncAttrList.
NvSciSyncAttrKey_PeerLocationInfo
@ NvSciSyncAttrKey_PeerLocationInfo
(NvSciBufPeerLocationInfo[], inout) An attribute indicating location information of late peer which a...
Definition: nvscisync.h:638
NvSciSyncAttrListIsReconciled
NvSciError NvSciSyncAttrListIsReconciled(NvSciSyncAttrList attrList, bool *isReconciled)
Checks whether the NvSciSyncAttrList is reconciled.
NvSciSyncFillC2cAttrs
NvSciError NvSciSyncFillC2cAttrs(NvSciSyncAttrList unrecAttrList, NvSciSyncAccessPerm permissions)
Fills appropriate attributes for C2C copy in the input NvSciSyncAttrList.
NvSciSyncAttrKey_PrimitiveInfo
@ NvSciSyncAttrKey_PrimitiveInfo
(NvSciSyncAttrValPrimitiveType[], inout) supported primitive types.
Definition: nvscisync.h:632
NvSciSyncObjAttachPeer
NvSciError NvSciSyncObjAttachPeer(NvSciSyncObj syncObj, const NvSciSyncAttrList inputArray[], size_t inputCount)
Allows remote peer NvSciIpcEndpoint to gain access to already allocated NvSciSyncObj.
NvSciSyncFenceGetTimestamp
NvSciError NvSciSyncFenceGetTimestamp(const NvSciSyncFence *syncFence, uint64_t *timestampUS)
Read the timestamp associated with the NvSciSyncFence.
NvSciSyncObjConst
const struct NvSciSyncObjRec * NvSciSyncObjConst
A reference, that is not modifiable, to a particular Synchronization Object.
Definition: nvscisync.h:314
NvSciSyncObjGetPerm
NvSciError NvSciSyncObjGetPerm(NvSciSyncObj syncObj, NvSciSyncAccessPerm *permissions)
Retrieves permissions from an NvSciSyncObj.
NvSciSyncModuleClose
void NvSciSyncModuleClose(NvSciSyncModule module)
Closes an instance of the NvSciSyncModule that was obtained through an earlier call to NvSciSyncModul...
NvSciSyncObjIpcExportDescriptor
Defines the exported form of NvSciSyncObj intended to be shared across an NvSciIpc channel.
Definition: nvscisync.h:278
NvSciSyncAttrValPrimitiveType_SysmemSemaphorePayload64b
@ NvSciSyncAttrValPrimitiveType_SysmemSemaphorePayload64b
16 bytes semaphore backed by system memory.
Definition: nvscisync.h:438
nvsciipc.h
NVIDIA Software Communications Interface (SCI) : NvSci Inter-Process Communication
NvSciSyncAttrValPrimitiveType_VidmemSemaphore
@ NvSciSyncAttrValPrimitiveType_VidmemSemaphore
16 bytes semaphore backed by video memory.
Definition: nvscisync.h:432
NvSciSyncAttrListGetAttr
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
NvSciSyncAttrKey
Describes the NvSciSync public attribute keys holding the corresponding values specifying synchroniza...
Definition: nvscisync.h:466
NvSciSyncWaitMode_BusyWithYield
@ NvSciSyncWaitMode_BusyWithYield
Polling with processor yielding.
Definition: nvscisync.h:704
NvSciSyncObjAlloc
NvSciError NvSciSyncObjAlloc(NvSciSyncAttrList reconciledList, NvSciSyncObj *syncObj)
Allocates and initializes a NvSciSyncObj that meets all the constraints specified in the given reconc...
NvSciSyncAttrKey_GpuId
@ NvSciSyncAttrKey_GpuId
(NvSciRmGpuId[], inout) GpuID of the GPU in the system that will access the semaphore buffer.
Definition: nvscisync.h:644
NvSciIpcEndpoint
uint64_t NvSciIpcEndpoint
Handle to the NvSciIpc endpoint.
Definition: nvsciipc.h:314
NvSciSyncObjDup
NvSciError NvSciSyncObjDup(NvSciSyncObj syncObj, NvSciSyncObj *dupObj)
Creates a new NvSciSyncObj holding a reference to the original resources to which the input NvSciSync...
NvSciSyncCheckVersionCompatibility
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...
NvSciSyncAttrListIpcExportUnreconciled
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...
NvSciSyncAttrKeyValuePair
This structure defines a key/value pair used to get or set the NvSciSyncAttrKey(s) and their correspo...
Definition: nvscisync.h:686
NvSciSyncFenceExtractFence
NvSciError NvSciSyncFenceExtractFence(const NvSciSyncFence *syncFence, uint64_t *id, uint64_t *value)
Extracts the id and value from the input NvSciSyncFence.
NvSciSyncAttrKey_RequiredPerm
@ NvSciSyncAttrKey_RequiredPerm
(NvSciSyncAccessPerm, inout) Specifies the required access permissions.
Definition: nvscisync.h:507
NvSciSyncAttrValPrimitiveTypeRec
NvSciSyncAttrValPrimitiveTypeRec
Types of synchronization primitives.
Definition: nvscisync.h:413
NvSciSyncAttrListIpcImportUnreconciled
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...
NvSciSyncMinorVersion
static const uint32_t NvSciSyncMinorVersion
NvSciSync minor version number.
Definition: nvscisync.h:189
NvSciSyncObjSignal
NvSciError NvSciSyncObjSignal(NvSciSyncObj syncObj)
Signals the NvSciSyncObj using the reconciled primitive that was allocated along with the NvSciSyncOb...
NvSciSyncFenceAddTimestampSlot
NvSciError NvSciSyncFenceAddTimestampSlot(NvSciSyncFence *syncFence, uint32_t timestampSlot)
Sets the current timestamp slot index in the NvSciSyncFence.
NvSciSyncAttrValPrimitiveType_LowerBound
@ NvSciSyncAttrValPrimitiveType_LowerBound
For NvSciSync internal use only.
Definition: nvscisync.h:415
NvSciSyncAttrListReconcile
NvSciError NvSciSyncAttrListReconcile(const NvSciSyncAttrList inputArray[], size_t inputCount, NvSciSyncAttrList *newReconciledList, NvSciSyncAttrList *newConflictList)
Reconciles the input unreconciled NvSciSyncAttrLists into a new reconciled NvSciSyncAttrList.
NvSciSyncFenceExtractTimestampSlot
NvSciError NvSciSyncFenceExtractTimestampSlot(NvSciSyncFence *syncFence, uint32_t *timestampSlot)
Reads the current timestamp slot index from the NvSciSyncFence.
NvSciSyncFenceWait
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...
NvSciSyncModuleOpen
NvSciError NvSciSyncModuleOpen(NvSciSyncModule *newModule)
Initializes and returns a new NvSciSyncModule with no NvSciSyncAttrLists, NvSciSyncCpuWaitContexts,...
NvSciSyncAttrListReconcileAndObjAlloc
NvSciError NvSciSyncAttrListReconcileAndObjAlloc(const NvSciSyncAttrList inputArray[], size_t inputCount, NvSciSyncObj *syncObj, NvSciSyncAttrList *newConflictList)
Reconciles the input unreconciled NvSciSyncAttrList(s) into a new reconciled NvSciSyncAttrList and al...
NvSciSyncFence
struct NvSciSyncFence NvSciSyncFence
Defines the opaque NvSciSyncFence.
NvSciSyncFence
Defines the opaque NvSciSyncFence.
Definition: nvscisync.h:253
NvSciSyncAttrListValidateReconciledAgainstAttrs
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...
NvSciSyncObjGetAttrList
NvSciError NvSciSyncObjGetAttrList(NvSciSyncObj syncObj, NvSciSyncAttrList *syncAttrList)
Retrieves the reconciled NvSciSyncAttrList associated with an input NvSciSyncObj.
NvSciSyncFenceUpdateFromFile
NvSciError NvSciSyncFenceUpdateFromFile(NvSciSyncObj syncObj, int32_t fenceFd, NvSciSyncFence *syncFence)
Populates the input NvSciSyncFence based on the input sync file.
nvscibuf.h
NVIDIA Software Communications Interface (SCI) : NvSciBuf
NvSciSyncWaitMode_Blocking
@ NvSciSyncWaitMode_Blocking
Blocked wait, released by a trigger, like an interrupt.
Definition: nvscisync.h:708
NvSciSyncFenceGetTaskStatus
NvSciError NvSciSyncFenceGetTaskStatus(const NvSciSyncFence *syncFence, NvSciSyncTaskStatus *taskStatus)
Reads the task status associated with the NvSciSyncFence and stores it in the user provided out param...
NvSciSyncAttrListValidateReconciled
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
@ NvSciSyncAttrKey_NumTaskStatusSlots
(uint32_t, out) Specifies the total number of slots in the task status buffer.
Definition: nvscisync.h:601
NvSciSyncAttrKey_ActualPerm
@ NvSciSyncAttrKey_ActualPerm
(NvSciSyncAccessPerm, out) Actual permission granted after reconciliation.
Definition: nvscisync.h:538
NvSciSyncAttrValPrimitiveType_UpperBound
@ NvSciSyncAttrValPrimitiveType_UpperBound
For NvSciSync internal use only.
Definition: nvscisync.h:446
NvSciSyncAttrListSlotGetAttrs
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...
NvSciSyncAttrListFree
void NvSciSyncAttrListFree(NvSciSyncAttrList attrList)
Frees the NvSciSyncAttrList and removes its association with the NvSciSyncModule with which it was cr...
NvSciSyncAttrListGetSlotCount
size_t NvSciSyncAttrListGetSlotCount(NvSciSyncAttrList attrList)
Gets the slot count of the given NvSciSyncAttrList.
NvSciSyncModule
struct NvSciSyncModuleRec * NvSciSyncModule
Represents an instance of the NvSciSyncModule.
Definition: nvscisync.h:209
NvSciSyncFenceUpdateFence
NvSciError NvSciSyncFenceUpdateFence(NvSciSyncObj syncObj, uint64_t id, uint64_t value, NvSciSyncFence *syncFence)
Populates the input NvSciSyncFence based on the input id and value.
NvSciSyncObjDupWithReducePerm
NvSciError NvSciSyncObjDupWithReducePerm(NvSciSyncObj syncObj, NvSciSyncAccessPerm reducedPerm, NvSciSyncObj *dupObj)
Creates a new NvSciSyncObj holding a reference to the original resources to which the input NvSciSync...
NvSciSyncAttrKey_UpperBound
@ NvSciSyncAttrKey_UpperBound
Specifies the upper bound - for NvSciSync internal use only.
Definition: nvscisync.h:677
NvSciSyncFenceInitializer
static const NvSciSyncFence NvSciSyncFenceInitializer
Defines the value used to zero-initialize the NvSciSyncFence object.
Definition: nvscisync.h:262
NvSciSyncObj
struct NvSciSyncObjRec * NvSciSyncObj
A Synchronization Object is a container holding the reconciled NvSciSyncAttrList defining constraints...
Definition: nvscisync.h:308
NvSciSyncAttrListCreate
NvSciError NvSciSyncAttrListCreate(NvSciSyncModule module, NvSciSyncAttrList *attrList)
Creates a new, single-slot unreconciled NvSciSyncAttrList associated with the input NvSciSyncModule w...
PACK_SYNC
#define PACK_SYNC(__Declaration__,...)
Definition: nvscisync.h:176
NvSciSyncAttrListAppendUnreconciled
NvSciError NvSciSyncAttrListAppendUnreconciled(const NvSciSyncAttrList inputUnreconciledAttrListArray[], size_t inputUnreconciledAttrListCount, NvSciSyncAttrList *newUnreconciledAttrList)
Appends multiple unreconciled NvSciSyncAttrLists together, forming a single new unreconciled NvSciSyn...
NvSciSyncAttrListIpcExportReconciled
NvSciError NvSciSyncAttrListIpcExportReconciled(const NvSciSyncAttrList reconciledAttrList, NvSciIpcEndpoint ipcEndpoint, void **descBuf, size_t *descLen)
Transforms the reconciled NvSciSyncAttrList to an exportable reconciled NvSciSyncAttrList descriptor ...
NvSciSyncFenceIpcExportDescriptor
Defines the exported form of NvSciSyncFence intended to be shared across an NvSciIpc channel.
Definition: nvscisync.h:269
NvSciSyncIpcExportAttrListAndObj
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
@ NvSciSyncTaskStatus_Success
The task has completed successfully.
Definition: nvscisync.h:384
NvSciSyncAttrListClone
NvSciError NvSciSyncAttrListClone(NvSciSyncAttrList origAttrList, NvSciSyncAttrList *newAttrList)
Clones an NvSciSyncAttrList.
NvSciSyncAttrKey_WaiterContextInsensitiveFenceExports
@ NvSciSyncAttrKey_WaiterContextInsensitiveFenceExports
(bool, inout) Importing and then exporting an NvSciSyncFenceIpcExportDescriptor has no side effects a...
Definition: nvscisync.h:557
NvSciSyncWaitMode
NvSciSyncWaitMode
Modes of CPU waiting.
Definition: nvscisync.h:700
NvSciSyncCpuWaitContext
struct NvSciSyncCpuWaitContextRec * NvSciSyncCpuWaitContext
Represents the right to perform a CPU wait on an NvSciSyncFence.
Definition: nvscisync.h:221
NvSciSyncFenceDup
NvSciError NvSciSyncFenceDup(const NvSciSyncFence *srcSyncFence, NvSciSyncFence *dstSyncFence)
Duplicates the given NvSciSyncFence, such that any wait on duplicated NvSciSyncFence will complete at...