APM:Libraries
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
F4Light::Semaphore Class Reference

#include <Semaphores.h>

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

Public Member Functions

 Semaphore ()
 
bool give ()
 
bool take (uint32_t timeout_ms)
 
bool take_nonblocking ()
 
bool svc_give ()
 
bool svc_take (uint32_t timeout_ms)
 
bool svc_take_nonblocking ()
 
void * get_owner ()
 
bool is_taken ()
 
bool is_waiting ()
 
- Public Member Functions inherited from AP_HAL::Semaphore
virtual void take_blocking ()
 
virtual ~Semaphore (void)
 

Protected Member Functions

bool _take_from_mainloop (uint32_t timeout_ms)
 
bool _take_nonblocking ()
 
bool _give ()
 

Protected Attributes

volatile bool _taken
 
void * _task
 
bool _is_waiting
 

Detailed Description

Definition at line 32 of file Semaphores.h.

Constructor & Destructor Documentation

◆ Semaphore()

Semaphore::Semaphore ( )

Definition at line 24 of file Semaphores.cpp.

Member Function Documentation

◆ _give()

bool NAKED Semaphore::_give ( )
protected

Definition at line 64 of file Semaphores.cpp.

Referenced by give().

Here is the caller graph for this function:

◆ _take_from_mainloop()

bool NAKED Semaphore::_take_from_mainloop ( uint32_t  timeout_ms)
protected

Definition at line 69 of file Semaphores.cpp.

Referenced by take().

Here is the caller graph for this function:

◆ _take_nonblocking()

bool NAKED Semaphore::_take_nonblocking ( )
protected

Definition at line 75 of file Semaphores.cpp.

Referenced by take_nonblocking().

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

◆ get_owner()

void* F4Light::Semaphore::get_owner ( )
inline

Definition at line 43 of file Semaphores.h.

Referenced by F4Light::Scheduler::get_next_task(), and F4Light::Scheduler::SVC_Handler().

Here is the caller graph for this function:

◆ give()

bool Semaphore::give ( )
virtual

Implements AP_HAL::Semaphore.

Definition at line 31 of file Semaphores.cpp.

Referenced by F4Light::I2CDevice::do_bus_reset(), and F4Light::Scheduler::do_task().

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

◆ is_taken()

bool F4Light::Semaphore::is_taken ( )
inline

Definition at line 44 of file Semaphores.h.

Referenced by F4Light::Scheduler::get_next_task().

Here is the caller graph for this function:

◆ is_waiting()

bool F4Light::Semaphore::is_waiting ( )
inline

Definition at line 45 of file Semaphores.h.

Referenced by F4Light::Scheduler::SVC_Handler().

Here is the caller graph for this function:

◆ svc_give()

bool Semaphore::svc_give ( )

Definition at line 96 of file Semaphores.cpp.

Referenced by give(), and F4Light::Scheduler::SVC_Handler().

Here is the caller graph for this function:

◆ svc_take()

bool Semaphore::svc_take ( uint32_t  timeout_ms)

Definition at line 136 of file Semaphores.cpp.

Referenced by F4Light::Scheduler::SVC_Handler().

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

◆ svc_take_nonblocking()

bool Semaphore::svc_take_nonblocking ( )

Definition at line 112 of file Semaphores.cpp.

Referenced by F4Light::Scheduler::SVC_Handler(), and take().

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

◆ take()

bool Semaphore::take ( uint32_t  timeout_ms)
virtual

Implements AP_HAL::Semaphore.

Definition at line 45 of file Semaphores.cpp.

Referenced by F4Light::Scheduler::do_task().

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 41 of file Semaphores.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ _is_waiting

bool F4Light::Semaphore::_is_waiting
protected

Definition at line 60 of file Semaphores.h.

Referenced by give(), svc_give(), svc_take(), and svc_take_nonblocking().

◆ _taken

volatile bool F4Light::Semaphore::_taken
protected

Definition at line 58 of file Semaphores.h.

Referenced by svc_give(), svc_take(), and svc_take_nonblocking().

◆ _task

void* F4Light::Semaphore::_task
protected

Definition at line 59 of file Semaphores.h.

Referenced by svc_give(), svc_take(), and svc_take_nonblocking().


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