Lines Matching full:priority

12  * This module demonstrates the kernel's priority inheritance algorithm.
13 * A thread that owns a mutex is promoted to the priority level of the
14 * highest-priority thread attempting to lock the mutex.
24 * Timeline for priority inheritance testing:
29 * - 1.0 sec: main thread (@ priority 9) takes mutex_2 then sleeps
31 * - 2.0 sec: main thread (@ priority 8) takes mutex_3 then sleeps
33 * - 3.0 sec: main thread (@ priority 7) takes mutex_4 then sleeps
37 * - 4.0 sec: main thread wakes (@ priority 5) then sleeps
39 * - 5.0 sec: main thread wakes (@ priority 6) then gives mutex_4
40 * : main thread (@ priority 7) sleeps
42 * - 6.0 sec: main thread (@ priority 8) gives mutex_3
43 * : main thread (@ priority 8) gives mutex_2
44 * : main thread (@ priority 9) gives mutex_1
45 * : main thread (@ priority 10) sleeps
113 /* Wait and boost owner priority to 5 */ in thread_05()
140 * Wait for the mutex. There is a higher priority level thread waiting in thread_06()
142 * the priority of the owning thread (main thread). When thread_05 in thread_06()
143 * times out this thread will become the highest priority waiting in thread_06()
144 * thread. The priority of the owning thread (main thread) will not in thread_06()
175 * Wait and boost owner priority to 7. While waiting, another thread of in thread_07()
176 * a very low priority level will also wait for the mutex. thread_07 is in thread_07()
179 * priority of the owning main thread will drop to 8. in thread_07()
207 /* Wait and boost owner priority to 8 */ in thread_08()
232 k_sleep(K_MSEC(500)); /* Allow lower priority thread to run */ in thread_09()
243 /* Wait and boost owner priority to 9 */ in thread_09()
335 * Main thread(test_main) priority was 10 but ztest thread runs at in ZTEST_USER_OR_NOT()
336 * priority -1. To run the test smoothly make both main and ztest in ZTEST_USER_OR_NOT()
337 * threads run at same priority level. in ZTEST_USER_OR_NOT()
346 int priority[4] = { 9, 8, 7, 5 }; in ZTEST_USER_OR_NOT() local
364 zassert_equal(rv, priority[i], "expected priority %d, not %d\n", in ZTEST_USER_OR_NOT()
365 priority[i], rv); in ZTEST_USER_OR_NOT()
373 TC_PRINT("Done LOCKING! Current priority = %d\n", in ZTEST_USER_OR_NOT()
381 zassert_equal(rv, 6, "%s timed out and out priority should drop.\n", in ZTEST_USER_OR_NOT()
383 zassert_equal(rv, 6, "Expected priority %d, not %d\n", 6, rv); in ZTEST_USER_OR_NOT()
387 zassert_equal(rv, 7, "Gave %s and priority should drop.\n", "mutex_4"); in ZTEST_USER_OR_NOT()
388 zassert_equal(rv, 7, "Expected priority %d, not %d\n", 7, rv); in ZTEST_USER_OR_NOT()
396 zassert_equal(rv, droppri[i], "Expected priority %d, not %d\n", in ZTEST_USER_OR_NOT()
404 zassert_equal(rv, 10, "Expected priority %d, not %d\n", 10, rv); in ZTEST_USER_OR_NOT()