Look at this paper of design and implementation of NPTL by Ulrich Drepper and Ingo Molnar http://www.akkadia.org/drepper/nptl-design.pdf
I believe a lot had been changed since 2005 and it's not should be used as a reference to point out limitations and shortcomings (that said in header), though it's a great doc about overall design.