ipc_service: static_vrings: Set WQ default type to PRIO_COOP

In 92d8329d5b a new DT property was introduced to set the WQ priority
of the instance. The fallback value when the property was not present
was arbitrarily set to <0 PRIO_PREEMPT>.

The problem is that this value is actually changing the behaviour for
the code that is not explicitly setting the DT property, breaking in
some cases the existing code.

Move the default value to <0 PRIO_COOP> to give the old code a
consistent behaviour before and after the 92d8329d5b commit.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
This commit is contained in:
Carlo Caione 2022-04-20 13:58:48 +02:00 committed by Carles Cufí
parent 6a66493703
commit 7f51907fda
2 changed files with 3 additions and 2 deletions

View file

@ -42,4 +42,5 @@ properties:
or for K_PRIO_PREEMPT(2)
priority = <2 PRIO_PREEMPT>;
When this property is missing a default priority of 0 is assumed.
When this property is missing a default priority of <0 PRIO_COOP> is
assumed.

View file

@ -610,7 +610,7 @@ static int backend_init(const struct device *instance)
(0)), \
.wq_prio_type = COND_CODE_1(DT_INST_NODE_HAS_PROP(i, zephyr_priority), \
(DT_INST_PROP_BY_IDX(i, zephyr_priority, 1)), \
(PRIO_PREEMPT)), \
(PRIO_COOP)), \
.id = i, \
}; \
\