By default AGENT++ is a multi-threaded agent. Therefore access to each MibEntry in the a Mib has to be synchronized.
In order to reduce blocking of concurrent requests, AGENT++ uses a two level lockin:
- Mib instance level - locks the whole MIB
- MibEntry level - locks a scalar, sub-tree, or table
As tables and complex (sub-tree) entries may contain also MibEntry objects, for example scalars, additional levels can be implemented by the user.
In any case, the locking procedure boundary must be implemented according to the following schema:
If you need to add/remove objects from the Mib, the locking schema looks sligtly different: