]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-windows-sleep-when-out-of-buffers-20061212
authorJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 12 Dec 2006 17:04:41 +0000 (17:04 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 12 Dec 2006 17:04:41 +0000 (17:04 +0000)
When there are no free buffers, don't loop continuously.
Sleep so that the other threads that are holding the buffers
can grab the global buffer lock and release them.

(cherry picked from commit f126802236bb059b8f0e804c76aef1031beb8a44)

src/WINNT/afsd/cm_buf.c

index dba6f2e97221f3344f69707c5857aaace0617889..9008eafdd6fe7a2cd1d0debea5b504d90204b697 100644 (file)
@@ -908,6 +908,7 @@ long buf_GetNewLocked(struct cm_scache *scp, osi_hyper_t *offsetp, cm_buf_t **bu
             return 0;
         } /* for all buffers in lru queue */
         lock_ReleaseWrite(&buf_globalLock);
+               Sleep(100);             /* give some time for a buffer to be freed */
     }  /* while loop over everything */
     /* not reached */
 } /* the proc */