NVIDIA DRIVE OS Linux SDK API Reference

5.2.6 Release
For Test and Development only
nvscievent.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2021, 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 
114 /*****************************************************************************/
115 /* DATA TYPES */
116 /*****************************************************************************/
117 
122 #define NV_SCI_EVENT_INFINITE_WAIT -1
123 #define NV_SCI_EVENT_PRIORITIES 4
124 
128 
130 typedef struct NvSciNativeEvent NvSciNativeEvent;
131 typedef struct NvSciLocalEvent NvSciLocalEvent;
132 typedef struct NvSciTimerEvent NvSciTimerEvent;
133 typedef struct NvSciEventLoop NvSciEventLoop;
135 
204  NvSciError (*CreateNativeEventNotifier)(
206  NvSciEventService* thisEventService,
207  NvSciNativeEvent* nativeEvent,
208  NvSciEventNotifier** newEventNotifier);
210 
242  NvSciError (*CreateLocalEvent)(
244  NvSciEventService* thisEventService,
245  NvSciLocalEvent** newLocalEvent);
247 
257  NvSciError (*CreateTimerEvent)(
259  NvSciEventService* thisEventService,
260  NvSciTimerEvent** newTimerEvent);
262 
300  void (*Delete)(NvSciEventService* thisEventService);
301 };
302 
333  NvSciError (*SetHandler)(NvSciEventNotifier* thisEventNotifier,
335  void (*callback)(void* cookie),
336  void* cookie,
337  uint32_t priority);
339 
365  void (*Delete)(NvSciEventNotifier* thisEventNotifier);
366 };
367 
403  size_t maxEventLoops,
404  NvSciEventLoopService** newEventLoopService);
405 
414 
425  NvSciError (*CreateEventLoop)(NvSciEventLoopService* eventLoopService,
427  NvSciEventLoop** eventLoop);
429 
474  NvSciEventNotifier* eventNotifier,
475  int64_t microseconds);
476 
526  NvSciEventNotifier* const * eventNotifierArray,
527  size_t eventNotifierCount,
528  int64_t microseconds,
529  bool* newEventArray);
530 };
531 
534 #ifdef __cplusplus
535 }
536 #endif
537 #endif /* INCLUDED_NVSCIEVENT_H */
NvSciError
NvSciError
Return/error codes for all NvSci functions.
Definition: nvscierror.h:45
NvSciEventNotifier
An abstract interface to notify event to event consumer and to register event handler of the event co...
Definition: nvscievent.h:309
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:473
NvSciEventNotifier::Delete
void(* Delete)(NvSciEventNotifier *thisEventNotifier)
Unregisters any previously-registered event handler and delete this event notifier.
Definition: nvscievent.h:365
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:525
NvSciEventLoopService::EventService
NvSciEventService EventService
Definition: nvscievent.h:413
NvSciEventLoopService
An abstract interface that event consumer can wait for events using event notifier in event loop.
Definition: nvscievent.h:412
nvscierror.h
NvSciEventService::Delete
void(* Delete)(NvSciEventService *thisEventService)
Releases any resources associated with this event service.
Definition: nvscievent.h:300
NvSciEventService
An abstract interface for a program's event handling infrastructure.
Definition: nvscievent.h:161