- statically initialize all global spin locks. on hppa, 0 means
the lock is held, so leaving them with the default value doesn't work.
- compare functions pointers using a function-pointer type rather than
an integral type. on hppa, function pointers may be indirect,
so we need to trigger gcc to emit calls to the function-pointer
canonicalization routines in the millicode.
- on hppa the stack grows up, so handle that using the STACK_* macros.
sleep(3) expects this, even though it's not a documented property of
nanosleep().
Fixes a problem where sleep() in a threaded program would return
nonzero even on success.
to sleep a lot, and there's no need for each such thread to consume kernel
resources.
(accidentally checked the pthread.c part of this in yesterday; no reason
not to finish the job)