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.10.0 Release
    All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
    nvscievent.h
    Go to the documentation of this file.
    1 /*
    2  * Copyright (c) 2019-2023, NVIDIA CORPORATION. All rights reserved.
    3  *
    4  * NVIDIA CORPORATION and its licensors retain all intellectual property
    5  * and proprietary rights in and to this software, related documentation
    6  * and any modifications thereto. Any use, reproduction, disclosure or
    7  * distribution of this software and related documentation without an express
    8  * license agreement from NVIDIA CORPORATION is strictly prohibited.
    9  */
    10 
    11 #ifndef INCLUDED_NVSCIEVENT_H
    12 #define INCLUDED_NVSCIEVENT_H
    13 
    14 #ifdef __cplusplus
    15 extern "C" {
    16 #endif
    17 
    18 #include <string.h>
    19 #include <stdint.h>
    20 #include <stdlib.h>
    21 #include <stdbool.h>
    22 #include "nvscierror.h"
    23 
    60 /*
    61  * use constant global version variable instead of macro for consistency with
    62  * version check API of existing NvSci family
    63  */
    64 
    66 static const uint32_t NvSciEventMajorVersion = 1U;
    67 
    69 static const uint32_t NvSciEventMinorVersion = 4U;
    70 
    135 /*******************************************************************/
    136 /********************* ACCESS CONTROL ******************************/
    137 /*******************************************************************/
    138 
    148 /*****************************************************************************/
    149 /* DATA TYPES */
    150 /*****************************************************************************/
    151 
    156 #define NV_SCI_EVENT_INFINITE_WAIT -1
    157 #define NV_SCI_EVENT_PRIORITIES 4
    158 
    164 
    166 typedef struct NvSciTimerEvent NvSciTimerEvent;
    167 typedef struct NvSciEventLoop NvSciEventLoop;
    169 
    178 
    208  NvSciError (*Signal)(NvSciLocalEvent* thisLocalEvent);
    209 
    238  void (*Delete)(NvSciLocalEvent* thisLocalEvent);
    239 };
    240 
    311  NvSciError (*CreateNativeEventNotifier)(
    313  NvSciEventService* thisEventService,
    314  NvSciNativeEvent* nativeEvent,
    315  NvSciEventNotifier** newEventNotifier);
    317 
    349  NvSciEventService* thisEventService,
    350  NvSciLocalEvent** newLocalEvent);
    351 
    361  NvSciError (*CreateTimerEvent)(
    363  NvSciEventService* thisEventService,
    364  NvSciTimerEvent** newTimerEvent);
    366 
    411  void (*Delete)(NvSciEventService* thisEventService);
    412 };
    413 
    463  NvSciError (*SetHandler)(NvSciEventNotifier* thisEventNotifier,
    464  void (*callback)(void* cookie),
    465  void* cookie,
    466  uint32_t priority);
    467 
    503  void (*Delete)(NvSciEventNotifier* thisEventNotifier);
    504 };
    505 
    516  size_t maxEventLoops,
    517  NvSciEventLoopService** newEventLoopService);
    518 
    593  size_t maxEventLoops,
    594  void* config,
    595  NvSciEventLoopService** newEventLoopService);
    596 
    643  size_t maxEventLoops,
    644  void* config,
    645  NvSciEventLoopService** newEventLoopService);
    646 
    655 
    666  NvSciError (*CreateEventLoop)(NvSciEventLoopService* eventLoopService,
    668  NvSciEventLoop** eventLoop);
    670 
    720  NvSciEventNotifier* eventNotifier,
    721  int64_t microseconds);
    722 
    781  NvSciEventNotifier* const * eventNotifierArray,
    782  size_t eventNotifierCount,
    783  int64_t microseconds,
    784  bool* newEventArray);
    785 
    856  NvSciEventService *eventService,
    857  NvSciEventNotifier* const * eventNotifierArray,
    858  size_t eventNotifierCount,
    859  int64_t microseconds,
    860  bool* newEventArray);
    861 };
    862 
    863 #ifdef __QNX__
    864 
    904 NvSciError NvSciEventInspect(
    905  NvSciEventService *thisEventService,
    906  uint32_t numEvents,
    907  uint32_t eventNotifierCount,
    908  NvSciEventNotifier** eventNotifierArray);
    909 #endif /* __QNX__ */
    910 
    975  NvSciEventService *oldEventService,
    976  NvSciEventService *newEventService,
    977  NvSciEventNotifier *eventNotifier);
    978 
    1014  uint32_t majorVer,
    1015  uint32_t minorVer,
    1016  bool* isCompatible);
    1017 
    1020 #ifdef __cplusplus
    1021 }
    1022 #endif
    1023 #endif /* INCLUDED_NVSCIEVENT_H */
    1024 
    NvSciError
    NvSciError
    Return/error codes for all NvSci functions.
    Definition: nvscierror.h:45
    NvSciLocalEvent::Signal
    NvSciError(* Signal)(NvSciLocalEvent *thisLocalEvent)
    Sends an intra-process local event signal.
    Definition: nvscievent.h:208
    NvSciLocalEvent::eventNotifier
    NvSciEventNotifier * eventNotifier
    Event notifier associated with this local event.
    Definition: nvscievent.h:177
    NvSciEventMinorVersion
    static const uint32_t NvSciEventMinorVersion
    NvSciEvent API Minor version number.
    Definition: nvscievent.h:69
    NvSciEventService::CreateLocalEvent
    NvSciError(* CreateLocalEvent)(NvSciEventService *thisEventService, NvSciLocalEvent **newLocalEvent)
    Creates an intra-process local event with an event notifier that reports each event signaled through ...
    Definition: nvscievent.h:348
    NvSciEventCheckVersionCompatibility
    NvSciError NvSciEventCheckVersionCompatibility(uint32_t majorVer, uint32_t minorVer, bool *isCompatible)
    Check NvSciEventSerivice library version compatibility.
    NvSciEventNotifier
    An abstract interface to notify event to event consumer and to register event handler of the event co...
    Definition: nvscievent.h:420
    NvSciEventLoopServiceCreate
    NvSciError NvSciEventLoopServiceCreate(size_t maxEventLoops, NvSciEventLoopService **newEventLoopService)
    Creates a new event loop service.
    NvSciEventLoopService::WaitForEvent
    NvSciError(* WaitForEvent)(NvSciEventNotifier *eventNotifier, int64_t microseconds)
    Waits up to a configurable timeout for a particular event notification, servicing events with configu...
    Definition: nvscievent.h:719
    NvSciEventMajorVersion
    static const uint32_t NvSciEventMajorVersion
    NvSciEvent API Major version number.
    Definition: nvscievent.h:66
    NvSciEventLoopServiceCreateSafeX
    NvSciError NvSciEventLoopServiceCreateSafeX(size_t maxEventLoops, void *config, NvSciEventLoopService **newEventLoopService)
    Creates a new event loop service that has the same properties as created by NvSciEventLoopServiceCrea...
    NvSciEventLoopServiceCreateSafe
    NvSciError NvSciEventLoopServiceCreateSafe(size_t maxEventLoops, void *config, NvSciEventLoopService **newEventLoopService)
    Creates a new event loop service.
    NvSciEventNotifier::Delete
    void(* Delete)(NvSciEventNotifier *thisEventNotifier)
    Unregisters any previously-registered event handler and delete this event notifier.
    Definition: nvscievent.h:503
    NvSciLocalEvent
    An OS-agnostic object that sends signal to another thread in the same process.
    Definition: nvscievent.h:175
    NvSciEventLoopService::WaitForMultipleEvents
    NvSciError(* WaitForMultipleEvents)(NvSciEventNotifier *const *eventNotifierArray, size_t eventNotifierCount, int64_t microseconds, bool *newEventArray)
    Waits up to a configurable timeout for any of a set of particular event notifications,...
    Definition: nvscievent.h:780
    NvSciEventLoopService::EventService
    NvSciEventService EventService
    Definition: nvscievent.h:654
    NvSciLocalEvent::Delete
    void(* Delete)(NvSciLocalEvent *thisLocalEvent)
    Releases any resources associated with this local event.
    Definition: nvscievent.h:238
    NvSciEventLoopService
    An abstract interface that event consumer can wait for events using event notifier in event loop.
    Definition: nvscievent.h:653
    nvscierror.h
    NvSciEventService::Delete
    void(* Delete)(NvSciEventService *thisEventService)
    Releases any resources associated with this event service.
    Definition: nvscievent.h:411
    NvSciEventNotifier::SetHandler
    NvSciError(* SetHandler)(NvSciEventNotifier *thisEventNotifier, void(*callback)(void *cookie), void *cookie, uint32_t priority)
    Registers or unregisters a handler for a particular event notifier.
    Definition: nvscievent.h:463
    NvSciEventLoopService::WaitForMultipleEventsExt
    NvSciError(* WaitForMultipleEventsExt)(NvSciEventService *eventService, NvSciEventNotifier *const *eventNotifierArray, size_t eventNotifierCount, int64_t microseconds, bool *newEventArray)
    Waits up to a configurable timeout for any of a set of particular event notifications,...
    Definition: nvscievent.h:855
    NvSciEventMoveNotifier
    NvSciError NvSciEventMoveNotifier(NvSciEventService *oldEventService, NvSciEventService *newEventService, NvSciEventNotifier *eventNotifier)
    Move event notifier.
    NvSciEventService
    An abstract interface for a program's event handling infrastructure.
    Definition: nvscievent.h:266
    NvSciNativeEvent
    struct NvSciNativeEvent NvSciNativeEvent
    Definition: nvscievent.h:162
    人人超碰97caoporen国产