Module Name: krb5 Committed By: raeburn Date: Fri Jul 23 15:29:53 UTC 2004 Modified Files: krb5/src/include/ChangeLog krb5/src/include/fake-addrinfo.h krb5/src/util/support/ChangeLog krb5/src/util/support/fake-addrinfo.c krb5/src/util/support/threads.c Added Files: Removed Files: Log Message Add a mutex to protect the per-process fake-getaddrinfo data cache. Currently it gets locked while a name lookup is in progress, which is not very efficient. That should be changed, after the code is fixed up so that the cache works on other platforms. * include/fake-addrinfo.h: Include k5-thread.h. (struct fac): Add a mutex. (plant_face, find_face): Check that mutex is already locked. (krb5int_lock_fac, krb5int_unlock_fac): Declare. (fai_add_hosts_by_name): Use them to lock and unlock the mutex. * util/support/fake-addrinfo.c (krb5int_fac): Initialize the mutex. (krb5int_init_fac, krb5int_fini_fac): New functions; finish initializing or destroy the mutex. (krb5int_lock_fac, krb5int_unlock_fac): New functions; lock the mutex after calling krb5int_call_thread_support_init, or unlock it. * util/support/threads.c (krb5int_call_thread_support_init): New function. (krb5int_init_fac, krb5int_fini_fac): Declare. (krb5int_thread_support_init, krb5int_thread_support_fini): Call them. To generate a diff of this commit: cvs diff -r1.452 -r1.453 krb5/src/include/ChangeLog cvs diff -r1.48 -r1.49 krb5/src/include/fake-addrinfo.h cvs diff -r1.15 -r1.16 krb5/src/util/support/ChangeLog cvs diff -r1.3 -r1.4 krb5/src/util/support/fake-addrinfo.c cvs diff -r1.8 -r1.9 krb5/src/util/support/threads.c