pthreads: shift around defs in .h files
pthread: fix spinlock