Arduino-Scheduler
Portable Collaborative Multi-Tasking Scheduler for Arduino
Semaphore Class Reference

#include <Semaphore.h>

Collaboration diagram for Semaphore:
Collaboration graph

Public Member Functions

 Semaphore (unsigned int count=1)
 
void wait (unsigned int count=1)
 
void signal (unsigned int count=1)
 

Protected Attributes

volatile unsigned int m_count
 

Detailed Description

Definition at line 24 of file Semaphore.h.

Constructor & Destructor Documentation

Semaphore::Semaphore ( unsigned int  count = 1)
inline

Initiate semaphore with given count.

Parameters
[in]count(default mutex).

Definition at line 30 of file Semaphore.h.

Member Function Documentation

void Semaphore::signal ( unsigned int  count = 1)
inline

Signal semaphore count.

Parameters
[in]count(default mutex).

Definition at line 46 of file Semaphore.h.

void Semaphore::wait ( unsigned int  count = 1)
inline

Wait for semaphore count.

Parameters
[in]count(default mutex).

Definition at line 36 of file Semaphore.h.

Member Data Documentation

volatile unsigned int Semaphore::m_count
protected

Definition at line 53 of file Semaphore.h.


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