windows: osi_TSignalForMLs simplify
authorJeffrey Altman <jaltman@your-file-system.com>
Tue, 27 Dec 2011 01:59:21 +0000 (20:59 -0500)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 31 Dec 2011 21:16:37 +0000 (13:16 -0800)
Simplify logic for readability and efficiency.

Change-Id: I3c78b23b6fcf8478fe20a803755923108995d532
Reviewed-on: http://gerrit.openafs.org/6438
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>

src/WINNT/client_osi/osisleep.c

index ddf4edf..7081d84 100644 (file)
@@ -392,9 +392,9 @@ void osi_TSignalForMLs(osi_turnstile_t *turnp, int stillHaveReaders, CRITICAL_SE
         }
         else if (tsp->waitFor & OSI_SLEEPINFO_W4READ) {
             sp = (void *) tsp->value;
+            if ((*sp) < OSI_RWLOCK_THREADS)
+                tsp->tidp[*sp] = tsp->tid;
             (*sp)++;
-            if ((*sp) <= OSI_RWLOCK_THREADS)
-                tsp->tidp[(*sp)-1] = tsp->tid;
         }
 
         /* and add to our own list */