Skip to content
Snippets Groups Projects
Verified Commit ef03f13b authored by rahix's avatar rahix
Browse files

fix(hw-locks): Don't show warnings for 0 wait acquires


Signed-off-by: default avatarRahix <rahix@rahix.de>
parent dcb9c8f9
No related branches found
No related tags found
No related merge requests found
......@@ -28,9 +28,14 @@ int hwlock_acquire(enum hwlock_periph p, TickType_t wait)
TaskHandle_t task = xTaskGetCurrentTaskHandle();
if (xSemaphoreTake(hwlock_mutex[p], wait) != pdTRUE) {
/* Don't print warnings for 0 wait acquires */
if (wait == 0) {
return -EBUSY;
}
LOG_WARN(
"hwlock",
"Lock %u is busy, held by: %s, attempt to accquire by: %s",
"Lock %u is busy! Held by \"%s\" and attempted to accquire by \"%s\"",
p,
pcTaskGetName(hwlock_tasks[p]),
pcTaskGetName(task)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment