/* Get stack attributes in thread attributes object. 
See IEEE 1003.1  */
int pthread_attr_getstack(const pthread_attr_t *_attr, void **stackaddr, size_t *stacksize)
/* Get stack attributes in thread attributes object. 
See IEEE 1003.1  */
int pthread_attr_getstack(const pthread_attr_t *_attr, void **stackaddr, size_t *stacksize)
{
	const struct posix_thread_attr *attr = (const struct posix_thread_attr *)_attr;
	if (!__attr_is_initialized(attr) || (stackaddr == NULL) || (stacksize == NULL)) {
		return EINVAL;
	}
	*stackaddr = attr->stack;
	*stacksize = __get_attr_stacksize(attr);
	return 0;
}