Lines Matching refs:policy
196 int policy = BIOS_FOOD; in ZTEST() local
203 zassert_equal(pthread_attr_getschedpolicy(NULL, &policy), EINVAL); in ZTEST()
204 zassert_equal(pthread_attr_getschedpolicy(&uninit_attr, &policy), EINVAL); in ZTEST()
210 zassert_ok(pthread_attr_getschedpolicy(&attr, &policy)); in ZTEST()
211 zassert_not_equal(BIOS_FOOD, policy); in ZTEST()
216 int policy = SCHED_OTHER; in ZTEST() local
223 zassert_equal(pthread_attr_setschedpolicy(NULL, policy), EINVAL); in ZTEST()
225 pthread_attr_setschedpolicy((pthread_attr_t *)&uninit_attr, policy), in ZTEST()
233 policy = SCHED_INVALID; in ZTEST()
234 zassert_ok(pthread_attr_getschedpolicy(&attr, &policy)); in ZTEST()
235 zassert_equal(policy, SCHED_OTHER); in ZTEST()
352 int policy; in test_pthread_attr_setinheritsched_common() local
355 extern int zephyr_to_posix_priority(int priority, int *policy); in test_pthread_attr_setinheritsched_common()
366 param.sched_priority = zephyr_to_posix_priority(prio, &policy); in test_pthread_attr_setinheritsched_common()
368 zassert_ok(pthread_attr_setschedpolicy(&attr, policy)); in test_pthread_attr_setinheritsched_common()
494 ARRAY_FOR_EACH(policies, policy) { in ZTEST()
499 pmin = sched_get_priority_min(policies[policy]); in ZTEST()
502 pmax = sched_get_priority_max(policies[policy]); in ZTEST()
506 if (policy == 3) { in ZTEST()
515 i == 0 ? "min" : "max", policy_names[policy], errno); in ZTEST()
517 i == 0 ? "min" : "max", policy_names[policy], errno); in ZTEST()
520 if (policy != 3) { in ZTEST()
532 policy_names[policy], pmin, pmax); in ZTEST()
542 zassert_equal(pmin, 0, "unexpected pmin for %s", policy_names[policy]); in ZTEST()
543 zassert_equal(pmax, nprio[policy] - 1, "unexpected pmax for %s", in ZTEST()
544 policy_names[policy]); /* test happy paths */ in ZTEST()
551 if (!policy_enabled[policy]) { in ZTEST()
553 pthread_attr_setschedpolicy(&attr, policies[policy])); in ZTEST()
557 prios[i], param.sched_priority, policy_names[policy]); in ZTEST()
562 zassert_ok(pthread_attr_setschedpolicy(&attr, policies[policy]), in ZTEST()
564 prios[i], param.sched_priority, policy_names[policy]); in ZTEST()
569 prios[i], param.sched_priority, policy_names[policy]); in ZTEST()