Correct locking for accessing Table with AgenPro code


We use AgenPro to generate code from our MIBs. An update thread periodically clears / populate some MIB tables and we use lock_mib() / start_synch() / unlock_mib() / end_synch() as per the FAQ

Do we need to implement locking within the user-code from the AgenPro e.g.
tableRowEntry::update() or


Yes sure, within the generated methods the same locking scheme needs to be applied as necessary (i.e. updates in concurrent threads are possible).
Hope this helps.
Best regards

Thanks - I’m not sure how this would be possible? In the generated code, e.g. when responding to a GET on a table row - how might this look?

e.g. generate code

void myTableEntry::get_request(Request* req, int ind)
   //--AgentGen BEGIN=myTableEntry::get_request
   //--AgentGen END
   MibTable::get_request(req, ind);

void myTableEntry::update(Request* req)
   // This table needs to be updated.
   //--AgentGen BEGIN=myTableEntry::update
   //--AgentGen END

When responding to a table query (i.e. snmptable) the ::update method looks to be called - but how would locking be implemented here?