Lines Matching +full:out +full:- +full:active +full:- +full:low

4  * SPDX-License-Identifier: Apache-2.0
25 bool active; member
43 item->item.priority = sys_rand32_get() % (K_LOWEST_THREAD_PRIO - 1); in stress_sub()
44 item->item.deadline = sys_rand32_get() % k_ms_to_cyc_ceil32(2); in stress_sub()
45 item->item.handler = stress_handler; in stress_sub()
46 item->running = false; in stress_sub()
47 item->active = true; in stress_sub()
49 k_p4wq_submit(&wq, &item->item); in stress_sub()
57 titem->running = true; in stress_handler()
61 zassert_true(curr_pri == item->priority, in stress_handler()
63 item->priority, curr_pri); in stress_handler()
70 active_items--; in stress_handler()
72 /* Pick 0-3 random item slots and submit them if they aren't in stress_handler()
73 * already. Make sure we always have at least one active. in stress_handler()
81 &items[ii] != titem && !items[ii].active) { in stress_handler()
90 titem->active = false; in stress_handler()
96 * random priorities, this tends to produce a lot of "out of worker
103 k_thread_priority_set(k_current_get(), -1); in ZTEST()
108 items[0].item.priority = -1; in ZTEST()
123 * "active" list is maintained from the thread itself against in active_count()
133 count = MAX_NUM_THREADS - count; in active_count()
145 * whether the item changed the number of active threads. Does not
155 item->priority = pri; in add_new_item()
156 item->deadline = k_us_to_cyc_ceil32(100); in add_new_item()
157 item->handler = spin_handler; in add_new_item()
174 /* The work item priorities are 0-4, this thread should be -1 in ZTEST()
177 k_thread_priority_set(k_current_get(), -1); in ZTEST()
181 * we can be sure to run). They should all be made active in ZTEST()
188 zassert_true(add_new_item(p0), "thread should be active"); in ZTEST()
192 zassert_false(add_new_item(p0), "thread should not be active"); in ZTEST()
196 * we run out of threads. in ZTEST()
198 for (int pri = p0 - 1; pri >= p0 - 4; pri++) { in ZTEST()
200 bool active = add_new_item(pri); in ZTEST() local
202 if (!active) { in ZTEST()
268 zassert_true(has_run, "low-priority item didn't run"); in ZTEST()
272 simple_item.priority = prio - 1; in ZTEST()
274 zassert_true(has_run, "high-priority item didn't run"); in ZTEST()