windows-osi-convertRToW-and-logging-optimizations-20080227
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 27 Feb 2008 17:03:30 +0000 (17:03 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 27 Feb 2008 17:03:30 +0000 (17:03 +0000)
commit72687c02b6ee5ff3029937b0278733b252f14550
treedfd3c5f27b6d4cf13468dd7c9323634c9fa90ad0
parent107899cefaeebe693f8025e9c0d88784facd2236
windows-osi-convertRToW-and-logging-optimizations-20080227

LICENSE MIT

Add lock_convertRToW which permits a read-lock to be upgraded to a
write lock.  If the caller is the only reader it permits a fast
transition otherwise it adds the caller to the waiters queue.

In the osi_Log macros, check to see if the log is enabled before making
the function call.  This avoids significant function call overhead.

In the cache manager, make use of the above.
src/WINNT/afsd/cm_buf.c
src/WINNT/afsd/cm_dir.c
src/WINNT/afsd/cm_dnlc.c
src/WINNT/afsd/cm_vnodeops.c
src/WINNT/client_osi/libosi.def
src/WINNT/client_osi/osibasel.c
src/WINNT/client_osi/osibasel.h
src/WINNT/client_osi/osilog.h
src/WINNT/client_osi/osiltype.h
src/WINNT/client_osi/osistatl.c