Lines Matching refs:policy
71 int policy; in thread_top_exec() local
74 pthread_getschedparam(pthread_self(), &policy, &schedparam); in thread_top_exec()
76 id, policy, schedparam.sched_priority); in thread_top_exec()
193 int oldstate, policy, ret; in thread_top_term() local
205 zassert_false(pthread_getschedparam(self, &policy, &getschedparam), in thread_top_term()
235 int dstate, policy; in test_posix_pthread_execution() local
280 ret = pthread_attr_getschedpolicy(&attr[0], &policy); in test_posix_pthread_execution()
330 pthread_attr_getschedpolicy(&attr[i], &policy); in test_posix_pthread_execution()
331 zassert_equal(schedpolicy, policy, in test_posix_pthread_execution()
412 int policy, detach; in test_posix_pthread_error_condition() local
426 zassert_equal(pthread_attr_getschedpolicy(NULL, &policy), in test_posix_pthread_error_condition()
443 zassert_equal(pthread_getschedparam(NULL, &policy, ¶m), ESRCH, in test_posix_pthread_error_condition()
445 zassert_equal(pthread_setschedparam(NULL, policy, ¶m), ESRCH, in test_posix_pthread_error_condition()
474 int oldstate, policy; in test_posix_pthread_termination() local
530 ret = pthread_getschedparam(newthread[N_THR_T/2], &policy, &schedparam); in test_posix_pthread_termination()
622 for (int policy = 0; policy < ARRAY_SIZE(policies); ++policy) { in test_sched_policy() local
623 if (!policy_enabled[policy]) { in test_sched_policy()
626 zassert_equal(-1, sched_get_priority_min(policies[policy]), in test_sched_policy()
628 policy_names[policy]); in test_sched_policy()
630 policy_names[policy]); in test_sched_policy()
633 zassert_equal(-1, sched_get_priority_max(policies[policy]), in test_sched_policy()
635 policy_names[policy]); in test_sched_policy()
637 policy_names[policy]); in test_sched_policy()
645 pmin = sched_get_priority_min(policies[policy]); in test_sched_policy()
648 pmax = sched_get_priority_max(policies[policy]); in test_sched_policy()
654 i == 0 ? "min" : "max", policy_names[policy], errno); in test_sched_policy()
656 i == 0 ? "min" : "max", policy_names[policy], errno); in test_sched_policy()
666 "%s min/max inconsistency: pmin: %d pmax: %d", policy_names[policy], in test_sched_policy()
677 zassert_equal(pmin, 0, "unexpected pmin for %s", policy_names[policy]); in test_sched_policy()
678 zassert_equal(pmax, nprio[policy] - 1, "unexpected pmax for %s", in test_sched_policy()
679 policy_names[policy]); /* test happy paths */ in test_sched_policy()
685 param.sched_priority, policy_names[policy]); in test_sched_policy()
687 zassert_equal(0, pthread_attr_setschedpolicy(&attr, policies[policy]), in test_sched_policy()
689 prios[i], param.sched_priority, policy_names[policy]); in test_sched_policy()
693 prios[i], param.sched_priority, policy_names[policy]); in test_sched_policy()
697 param.sched_priority, policy_names[policy]); in test_sched_policy()
701 param.sched_priority, policy_names[policy]); in test_sched_policy()
705 param.sched_priority, policy_names[policy]); in test_sched_policy()