APM:Libraries
Public Member Functions | Private Attributes | List of all members
Linux::Semaphore Class Reference

#include <Semaphores.h>

Inheritance diagram for Linux::Semaphore:
[legend]
Collaboration diagram for Linux::Semaphore:
[legend]

Public Member Functions

 Semaphore ()
 
bool give ()
 
bool take (uint32_t timeout_ms)
 
bool take_nonblocking ()
 
- Public Member Functions inherited from AP_HAL::Semaphore
virtual void take_blocking ()
 
virtual ~Semaphore (void)
 

Private Attributes

pthread_mutex_t _lock
 

Detailed Description

Definition at line 11 of file Semaphores.h.

Constructor & Destructor Documentation

◆ Semaphore()

Linux::Semaphore::Semaphore ( )
inline

Definition at line 13 of file Semaphores.h.

Here is the call graph for this function:

Member Function Documentation

◆ give()

bool Semaphore::give ( )
virtual

Implements AP_HAL::Semaphore.

Definition at line 9 of file Semaphores.cpp.

Referenced by Linux::Scheduler::_run_io(), Linux::Scheduler::_timer_task(), Linux::I2CBus::end_cb(), Linux::Scheduler::resume_timer_procs(), and Semaphore().

Here is the caller graph for this function:

◆ take()

bool Semaphore::take ( uint32_t  timeout_ms)
virtual

Implements AP_HAL::Semaphore.

Definition at line 14 of file Semaphores.cpp.

Referenced by Linux::Scheduler::_run_io(), Linux::Scheduler::_timer_task(), Semaphore(), Linux::I2CBus::start_cb(), and Linux::Scheduler::suspend_timer_procs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ take_nonblocking()

bool Semaphore::take_nonblocking ( )
virtual

Implements AP_HAL::Semaphore.

Definition at line 32 of file Semaphores.cpp.

Referenced by Semaphore(), and take().

Here is the caller graph for this function:

Member Data Documentation

◆ _lock

pthread_mutex_t Linux::Semaphore::_lock
private

Definition at line 20 of file Semaphores.h.

Referenced by give(), Semaphore(), take(), and take_nonblocking().


The documentation for this class was generated from the following files: