Trac #9878: Implement RW locks to protect the spt.