COSA
An Object-Oriented Platform for Arduino Programming
Lock Class Reference

#include <Lock.hh>

Collaboration diagram for Lock:
Collaboration graph

Public Member Functions

 Lock ()
 
 ~Lock ()
 

Detailed Description

Lock/Unlock class. Alternative to synchronized block and lock/unlock functions. Used in the form:

{
Lock key;
...
if (...) return;
if (...) goto label;
}
label:

Interrupts are disabled in the block allowing secure update.

Definition at line 40 of file Lock.hh.

Constructor & Destructor Documentation

Lock::Lock ( )
inline

Construct lock and turn off interrupt handlers. Save processor state.

Definition at line 46 of file Lock.hh.

Lock::~Lock ( )
inline

Destruct lock and restore processor state.

Definition at line 55 of file Lock.hh.


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