---
name: "sharedblock"
section: "3bobcat"
platform: "linux"
package: "libbobcat-dev"
version: "6.07.01-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/sharedblock"
---

# sharedblock(3bobcat)

Shared memory data block info

## NAME

FBB::SharedBlock - Shared memory data block info

## SYNOPSIS

**#include \<bobcat/sharedblock\>**\
 Linking option: *-lpthread, -lbobcat*

## DESCRIPTION

**FBB::SharedBlock** objects are used by *FBB::SharedSegment* to access the IDs and shared memory locks of shared memory data segments.

## NAMESPACE

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

## INHERITS FROM

\-

## CONSTRUCTORS

Only the default constructor is available. Copy and move assignment operators are not available.

## MEMBER FUNCTIONS

- o

  **size\_t id() const**:\
   The object’s stored ID value is returned.

-

  - o

  **void lock() const**:\
   When returning from this member, the current process has obtained the **FBB::SharedBlock**’s shared memory mutex lock.

-

  - o

  **void setID(size\_t id)**:\
   The object’s stored ID value is set to *id*.

-

  - o

  **void unlock() const**:\
   The shared memory segment’s mutex lock is released.

## EXAMPLE

See the [**sharedstream**(3bobcat)](/sharedstream/3bobcat.md) man page.

## FILES

*bobcat/sharedblock* - defines the class interface

## SEE ALSO

[**bobcat**(7)](/bobcat/7.md) [**isharedstream**(3bobcat)](/isharedstream/3bobcat.md), [**osharedstream**(3bobcat)](/osharedstream/3bobcat.md), [**sharedcondition**(3bobcat)](/sharedcondition/3bobcat.md), [**sharedmemory**(3bobcat)](/sharedmemory/3bobcat.md), [**sharedmutex**(3bobcat)](/sharedmutex/3bobcat.md), [**sharedpos**(3bobcat)](/sharedpos/3bobcat.md), [**sharedreadme**(7bobcat)](/sharedreadme/7bobcat.md), [**sharedsegment**(3bobcat)](/sharedsegment/3bobcat.md), [**sharedstream**(3bobcat)](/sharedstream/3bobcat.md), [**sharedbuf**(3bobcat)](/sharedbuf/3bobcat.md)

## BUGS

None Reported.

## BOBCAT PROJECT FILES

- o

  *https://fbb-git.gitlab.io/bobcat/*: gitlab project page;

Debian Bobcat project files:

- o

  *libbobcat6*: debian package containing the shared library, changelog and copyright note;

- o

  *libbobcat-dev*: debian package containing the static library, headers, manual pages, and developer info;

## 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**).
