Lines Matching +full:max +full:- +full:priority
4 * SPDX-License-Identifier: Apache-2.0
21 * This function will resolve the event priority and invoke the LLL
29 * @param event_prio Priority of event [-128..127]
35 * -EINPROGRESS: Event already in progress and prepare was queued
45 struct lll_hdr *hdr = prepare_param->param; in lll_prepare()
47 /* Establish priority based on: in lll_prepare()
48 * 1. Event priority passed to function in lll_prepare()
49 * 2. Force flag => priority = -127 in lll_prepare()
50 * 3. Score (events terminated- and too late) in lll_prepare()
51 * 4. Latency (skipped- and programmed latency) in lll_prepare()
52 * 5. Critical priority is immutable (-128) in lll_prepare()
54 if (prio > -128) { in lll_prepare()
55 if (prepare_param->force) { in lll_prepare()
56 prio = -127; in lll_prepare()
58 prio = MAX(-127, prio - hdr->score - hdr->latency); in lll_prepare()
62 prepare_param->prio = prio; in lll_prepare()
76 err = lll_prepare_resolve(next->is_abort_cb, next->abort_cb, next->prepare_cb, in lll_resume()
77 &next->prepare_param, next->is_resume, 1U); in lll_resume()
78 LL_ASSERT(!err || err == -EINPROGRESS); in lll_resume()
91 hdr->score = 0; in lll_done_score()
92 hdr->latency = 0; in lll_done_score()
94 hdr->score++; in lll_done_score()