Import the global sched_lock variable instead of using a private copy.  This fixes a problem where cpu_switch() wasn't properly saving and restoring the recursion count for sched_lock.
Import the global sched_lock variable instead of using a private copy.  This
fixes a problem where cpu_switch() wasn't properly saving and restoring
the recursion count for sched_lock.

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase