We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ef1163 commit f478893Copy full SHA for f478893
subsys/retention/retention.c
@@ -63,7 +63,9 @@ static inline void retention_lock_take(const struct device *dev)
63
#ifdef CONFIG_RETENTION_MUTEXES
64
struct retention_data *data = dev->data;
65
66
- k_mutex_lock(&data->lock, K_FOREVER);
+ if (!k_is_pre_kernel()) {
67
+ k_mutex_lock(&data->lock, K_FOREVER);
68
+ }
69
#else
70
ARG_UNUSED(dev);
71
#endif
@@ -74,7 +76,9 @@ static inline void retention_lock_release(const struct device *dev)
74
76
75
77
78
- k_mutex_unlock(&data->lock);
79
80
+ k_mutex_unlock(&data->lock);
81
82
83
84
0 commit comments