logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

ost::MutexCounter - The Mutex Counter is a counter variable which can safely be incremented or

Author

       Generated automatically by Doxygen for GNU CommonC++ from the source code.

GNU CommonC++                                    Sun Dec 27 2020                            ost::MutexCounter(3)

Constructor & Destructor Documentation

ost::MutexCounter::MutexCounter(constchar*id=NULL)
       Create and optionally name a mutex protected counter.

       Parametersid name for mutex counter, optional for deadlock testing.

   ost::MutexCounter::MutexCounter(intinitial,constchar*id=NULL)
       Create and optionally name a mutex protected counter with an initial value.

       Parametersinitial value of counter.
           id name of counter, optional for deadlock testing.

Detailed Description

       The MutexCounter is a counter variable which can safely be incremented or decremented by multiple
       threads.

       A Mutex is used to protect access to the counter variable (an integer). An initial value can be specified
       for the counter, and it can be manipulated with the ++ and -- operators.

       Author
           David Sugar dyfet@ostel.comThread protected integer counter.

Name

       ost::MutexCounter - The MutexCounter is a counter variable which can safely be incremented or
       decremented by multiple threads.

Synopsis

       #include <thread.h>

       Inherits ost::Mutex.

   PublicMemberFunctionsMutexCounter (const char *id=NULL)
           Create and optionally name a mutex protected counter.
       MutexCounter (int initial, const char *id=NULL)
           Create and optionally name a mutex protected counter with an initial value.

   Friends__EXPORT int operator++ (MutexCounter &mc)
       __EXPORT int operator-- (MutexCounter &mc)

   AdditionalInheritedMembers

See Also