Manual Reference Pages (including a list of functions that are not thread-safe)
Tutorial on pthreads
And if you wonder why you cannot create more than X threads on your system (for me this was always 382), this forum provides a solution.
Basically, the problem is that each thread created will occupy space for its stack. On my system, the default thread stack size is 8MB. Therefore, after 382, I simply run out of space.
Solution: Change the stack size to a smaller value, unless you really need 8MB.
size = PTHREAD_STACK_MIN + WHAT_ELSE_YOU_NEED;
Another interesting page on pthreads is this.