Use td_ucred of curthread instead of p_ucred of curproc.  This required changing sem_perm() and sem_hasopen() to take a thread instead of a proc for the first argument.
Use td_ucred of curthread instead of p_ucred of curproc.  This required
changing sem_perm() and sem_hasopen() to take a thread instead of a proc
for the first argument.

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