The method_lock Interface
void *method_lock (void *handlep, char *key, char *table, int wait);
The handlep parameter is a handle to the load module opened with the method_open interface. The key parameter refers to an entry in the named table. If it is NULL it refers to all entries in the table. The table parameter refers to one of the tables. The wait parameter is the number of second to wait for the lock to be acquired. If the wait parameter is zero the call returns without waiting if the entry cannot be locked immediately.
method_lock informs the loadable modules that access to the underlying mechanisms should be serialized for a specific table or table entry.
method_lock is called by the security library when serialization is required. The return value will be saved and used by a later call to method_unlock when serialization is no longer required.