...
If you need to add/remove objects from the Mib, the locking schema looks sligtly different:
Code Block |
---|
Mib* mib;
...
mib->lock_mib();
// code to lookup a MibEntry:
MibTable table = ...;
// enter protected region:
table->start_synch();
// remove table from Mib:
MibContext* ctx = mib->get_context(DEFAULT_CONTEXT);
ctx->remove(*table->key());
table->end_synch();
delete table;
// now you can drop the Mib lock
mib->unlock_mib();
|
...