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