/* Get scheduling policy attribute in Thread attributes. 
See IEEE 1003.1  */
int pthread_attr_getschedpolicy(const pthread_attr_t *_attr, int *policy)
/* Get scheduling policy attribute in Thread attributes. 
See IEEE 1003.1  */
int pthread_attr_getschedpolicy(const pthread_attr_t *_attr, int *policy)
{
	const struct posix_thread_attr *attr = (const struct posix_thread_attr *)_attr;
	if (!__attr_is_initialized(attr) || (policy == NULL)) {
		return EINVAL;
	}
	*policy = attr->schedpolicy;
	return 0;
}