NVIDIA DriveOS Linux SDK API Reference

7.2.5.0 Early Access Release

Detailed Description

Functions

void NvOsSemaphoreDestroy (NvOsSemaphoreHandle semaphore)
 This function destroys a semaphore. More...
 
void NvOsSemaphoreSignal (NvOsSemaphoreHandle semaphore)
 This function increases the number of wait operation, to given semaphore. More...
 
void NvOsSemaphoreWait (NvOsSemaphoreHandle semaphore)
 This function waits a semaphore, and decrease the number of wait operations. Thread is blocked infinitely, if number of semaphore wait operations is 0. More...
 

Function Documentation

◆ NvOsSemaphoreDestroy()

void NvOsSemaphoreDestroy ( NvOsSemaphoreHandle  semaphore)

This function destroys a semaphore.

Parameters
[in]semaphoreSemaphore to be destroyed
Returns
N/A
Precondition
Semaphore semaphore was successfully created with NvOsSemaphoreCreate() or cloned with NvOsSemaphoreClone(), and there are no concurrent operations on it in other threads.


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: No
    • Thread-safe: No
    • Re-entrant: No
    • Async/Sync: Sync
  • Required privileges: None
  • Allowed execution state
    • Initialization: Yes
    • Operational: No
    • Reinit/Deinit Preparation: Yes
  • Maturity: GA

◆ NvOsSemaphoreSignal()

void NvOsSemaphoreSignal ( NvOsSemaphoreHandle  semaphore)

This function increases the number of wait operation, to given semaphore.

Parameters
[in]semaphoreTo increase Semaphore's number of wait operations
Returns
N/A
Note
  • Allowed context for the API call
    • This function's safety follow sem_post() in QNX libc.
  • Is thread safe: Yes
  • Required Privileges: N/A
  • API Group
    • Initialization: Yes
    • Run time: Yes
    • De-initialization: Yes

◆ NvOsSemaphoreWait()

void NvOsSemaphoreWait ( NvOsSemaphoreHandle  semaphore)

This function waits a semaphore, and decrease the number of wait operations. Thread is blocked infinitely, if number of semaphore wait operations is 0.

  • If multiple threads are waiting same semaphore,
    • The highest priority thread is returned
  • If multiple threads are waiting same semaphore, and their priority is same
    • The thread(which has been waited the longest duration) is returned
Parameters
[in]semaphoreSemaphore to wait
Returns
N/A
Note
  • Allowed context for the API call
    • This function's safety follow sem_wait() in QNX libc.
  • Is thread safe: Yes
  • Required Privileges: N/A
  • API Group
    • Initialization: Yes
    • Run time: Yes
    • De-initialization: Yes