MFC 1.34, 1.35:
MFC 1.34, 1.35:

  - avoid exclusive sleep mutex witness warning using sx lock.
  - use TAILQ_FOREACH() for readability.

Approved by:	re (kensmith)

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