using shared read locks in credential set enumerators to avoid deadlocks
This commit is contained in:
@@ -36,6 +36,13 @@ typedef struct credential_set_t credential_set_t;
|
||||
* Enumerators are used because queries might return multiple matches.
|
||||
* Filter parameters restrict enumeration over specific items only.
|
||||
* See credential_manager_t for an overview of the credential framework.
|
||||
*
|
||||
* A credential set enumerator may not block the credential set, i.e. multiple
|
||||
* threads must be able to hold multiple enumerators, as the credential manager
|
||||
* is higly parallelized. The best way to achieve this is by using shared
|
||||
* read locks for the enumerators only. Otherwiese deadlocks will occur.
|
||||
* The writing cache_cert() routine is called by the manager only if no
|
||||
* enumerator is alive, so it is save to use a write lock there.
|
||||
*/
|
||||
struct credential_set_t {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user