Add pthread_mutex_lock_timeout_np
David 'Digit' Turner authored
This is used to perform a mutex lock for a given amount of
milliseconds before giving up. Using the _np prefix since this
is absolutely not portable.

Also remove a compiler warning in pthread_attr_getstackaddr
3f56b7f6