This should really return a value to tell if the lock was obtained.  The DAYS portion shouldn't ever be hit, but is still there.  And more importantly if an interrupt is found this will return with the lock not obtained and the interrupt flag set.