FBB::SharedMutex

libbobcat-dev_3.22.00-x.tar.gz

2005-2014


FBB::SharedMutex(3bobcat)

FBB::SharedMutex(3bobcat)

libbobcat-dev_3.22.00-x.tar.gz Shared Memory Mutex

2005-2014

NAME

FBB::SharedMutex - Mutex for shared memory

SYNOPSIS

#include <bobcat/sharedmutex>
Linking option: -lpthread, -lbobcat

DESCRIPTION

Shared memory may be used by multiple processes. To synchronize access to shared memory an FBB::SharedMutex may be defined inside a shared memory segment. An FBB::SharedMutex allows clients to lock a shared memory segment before reading or writing its contents. E.g., the Bobcat class FBB::SharedSegment defines a SharedMutex in its shared memory segment.

The FBB::SharedMutex class uses the facilities offered by the PThread library to implement shared memory locking. To force unlocking a (possibly) locked shared memory segment, its destructor can be called.

NAMESPACE

FBB
All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB.

INHERITS FROM

-

CONSTRUCTORS

The copy and move constructors are not available.

The class's destructor releasea all of the current process's nested shared memory segment locks. To destroy an FBB::SharedMuted object that has been constructed using the placement new operator use


    d_sharedMutex->~SharedMutex();
       
(assuming SharedMutex *d_sharedMutex points to the location where placement new has previously initialized the FBB::SharedMutex object.)

MEMBER FUNCTIONS

EXAMPLE

See the sharedstream(3bobcat) man page.

FILES

bobcat/sharedmutex - defines the class interface

SEE ALSO

bobcat(7) isharedstream(3bobcat), osharedstream(3bobcat), sharedblock(3bobcat), sharedmemory(3bobcat), sharedpos(3bobcat), sharedsegment(3bobcat), sharedstream(3bobcat), sharedstreambuf(3bobcat)

BUGS

None Reported.

DISTRIBUTION FILES

BOBCAT

Bobcat is an acronym of `Brokken's Own Base Classes And Templates'.

COPYRIGHT

This is free software, distributed under the terms of the GNU General Public License (GPL).

AUTHOR

Frank B. Brokken (f.b.brokken@rug.nl).