Rename core_lock to task_lock and global_lock to thread_lock.