Use the new mutex in the replay cache structure
authorKen Raeburn <raeburn@mit.edu>
Sat, 1 May 2004 01:43:15 +0000 (01:43 +0000)
committerKen Raeburn <raeburn@mit.edu>
Sat, 1 May 2004 01:43:15 +0000 (01:43 +0000)
commitc8cb3f7aab6c2ce515c83d7e4ead311f1a5d44d0
treeaab3bf455234bc79bbac1e9de1e4cc969708a27b
parent37c80d09c84a5a64311f8d4e34ca79b7a3db4119
Use the new mutex in the replay cache structure

Rather coarse at the moment: While one thread is blocking waiting for data to
be flushed to disk, another thread is unnecessarily prevented from scanning the
in-memory data.

* rc_base.c (krb5_rc_resolve_type): Initialize the mutex in the replay cache
structure.
(krb5_rc_default, krb5_rc_resolve_full): Destroy it if creation of the replay
cache fails.
* rc_dfl.c (krb5_rc_dfl_get_span, krb5_rc_dfl_init): Lock the mutex while
operating on the replay cache object.
(krb5_rc_dfl_expunge_locked): Renamed from krb5_rc_dfl_expunge and made static.
Call krb5_rc_dfl_recover_locked.
(krb5_rc_dfl_expunge): New wrapper function, locks the mutex.
(krb5_rc_dfl_recover_locked): Renamed from krb5_rc_dfl_recover and made static.
Call krb5_rc_dfl_expunge_locked.
(krb5_rc_dfl_recover): New wrapper function, locks the mutex.
(krb5_rc_dfl_store): Lock the mutex.  Call _expunge_locked.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16295 dc483132-0cff-0310-8789-dd5450dbe970
src/lib/krb5/rcache/ChangeLog
src/lib/krb5/rcache/rc_base.c
src/lib/krb5/rcache/rc_dfl.c