ソースの整理中ですが、利用はできます。 大きなファイルはできないかもしれません。

Dependencies:   EthernetInterface HttpServer TextLCD expatlib mbed-rpc mbed-rtos mbed Socket lwip-eth lwip-sys lwip

Fork of giken9_HTMLServer_Sample by Yasushi TAUCHI

Embed: (wiki syntax)

« Back to documentation index

Semaphore Class Reference

Semaphore Class Reference

The Semaphore class is used to manage and protect access to a set of shared resources. More...

#include <Semaphore.h>

Public Member Functions

 Semaphore (int32_t count)
 Create and Initialize a Semaphore object used for managing resources.
int32_t wait (uint32_t millisec=osWaitForever)
 Wait until a Semaphore resource becomes available.
osStatus release (void)
 Release a Semaphore resource that was obtain with Semaphore::wait.

Detailed Description

The Semaphore class is used to manage and protect access to a set of shared resources.

Definition at line 31 of file Semaphore.h.


Constructor & Destructor Documentation

Semaphore ( int32_t  count )

Create and Initialize a Semaphore object used for managing resources.

Parameters:
numberof available resources; maximum index value is (count-1).

Definition at line 29 of file Semaphore.cpp.


Member Function Documentation

osStatus release ( void   )

Release a Semaphore resource that was obtain with Semaphore::wait.

Returns:
status code that indicates the execution status of the function.

Definition at line 41 of file Semaphore.cpp.

int32_t wait ( uint32_t  millisec = osWaitForever )

Wait until a Semaphore resource becomes available.

Parameters:
millisectimeout value or 0 in case of no time-out. (default: osWaitForever).
Returns:
number of available tokens, or -1 in case of incorrect parameters

Definition at line 37 of file Semaphore.cpp.