You are absolutely correct.  The value is changed within a mutex (otherwise it would have to be changed via atomic operations).  Here it is only accessed.  The variable is marked as "volatile" so the compiler will not optimize the retrieval.  And I believe the function is only used today in DeleteObsoleteFiles() which is called when the same mutex is held.  But even if not, volatile gives me the level of thread security I desire.