- Change procfs_control()'s first argument to be a thread pointer instead   of a process pointer. - Move the p_candebug() at the start of procfs_control() a bit to make   locking feasible.  We still perform the access check before doing   anything, we just now perform it after acquiring locks. - Don't lock the sched_lock for TRACE_WAIT_P() and when checking to see if   p_stat is SSTOP.  We lock the process while setting p_stat to SSTOP   so locking the process is sufficient to do a read to see if p_stat is   SSTOP or not.
- Change procfs_control()'s first argument to be a thread pointer instead
  of a process pointer.
- Move the p_candebug() at the start of procfs_control() a bit to make
  locking feasible.  We still perform the access check before doing
  anything, we just now perform it after acquiring locks.
- Don't lock the sched_lock for TRACE_WAIT_P() and when checking to see if
  p_stat is SSTOP.  We lock the process while setting p_stat to SSTOP
  so locking the process is sufficient to do a read to see if p_stat is
  SSTOP or not.

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