Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions subsys/retention/retention.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ static inline void retention_lock_take(const struct device *dev)
#ifdef CONFIG_RETENTION_MUTEXES
struct retention_data *data = dev->data;

k_mutex_lock(&data->lock, K_FOREVER);
if (!k_is_pre_kernel()) {
k_mutex_lock(&data->lock, K_FOREVER);
}
#else
ARG_UNUSED(dev);
#endif
Expand All @@ -74,7 +76,9 @@ static inline void retention_lock_release(const struct device *dev)
#ifdef CONFIG_RETENTION_MUTEXES
struct retention_data *data = dev->data;

k_mutex_unlock(&data->lock);
if (!k_is_pre_kernel()) {
k_mutex_unlock(&data->lock);
}
#else
ARG_UNUSED(dev);
#endif
Expand Down