- Change donice() to take a thread as the first argument instead of a   process so it can use td_ucred. - Require the target process of donice() to be locked when donice() is   called. - Use td_ucred. - Lock the target process of p_cansee() and while reading the credentials   of a process. - Change the logic of rtprio() slightly so it does it's copyin() if needed   prior to locking the target process. - rtprio() no longer needs Giant.  In theory with full KSE it would still   need Giant to protect p_ucred of curproc for the p_canfoo() functions   but p_canfoo() will be changing to using td_ucred of curthread before   full KSE hits the tree.
- Change donice() to take a thread as the first argument instead of a
  process so it can use td_ucred.
- Require the target process of donice() to be locked when donice() is
  called.
- Use td_ucred.
- Lock the target process of p_cansee() and while reading the credentials
  of a process.
- Change the logic of rtprio() slightly so it does it's copyin() if needed
  prior to locking the target process.
- rtprio() no longer needs Giant.  In theory with full KSE it would still
  need Giant to protect p_ucred of curproc for the p_canfoo() functions
  but p_canfoo() will be changing to using td_ucred of curthread before
  full KSE hits the tree.

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