Switch list of global variables to read/write locks.