Skip to content

xTimerDelete in freertos deinit#3008

Open
peterharperuk wants to merge 1 commit into
raspberrypi:developfrom
peterharperuk:freertos_deinit
Open

xTimerDelete in freertos deinit#3008
peterharperuk wants to merge 1 commit into
raspberrypi:developfrom
peterharperuk:freertos_deinit

Conversation

@peterharperuk

@peterharperuk peterharperuk commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Fixes #2687

@peterharperuk peterharperuk requested a review from kilograham June 12, 2026 14:03
@peterharperuk peterharperuk added this to the 2.2.1 milestone Jun 12, 2026
Comment thread src/rp2_common/pico_async_context/async_context_freertos.c Outdated
@@ -190,7 +195,6 @@ void async_context_freertos_deinit(async_context_t *self_base) {
if (self->task_complete_sem) {
vSemaphoreDelete(self->task_complete_sem);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean it wasn't totally unnecessary; it made calling deinit multiple times ok (whether this is useful or not, i don't know)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've had a second attempt - just not clearing static memory.

In async_context_freertos_deinit we delete the timer,
but the timer task might be running on the other core.
So don't zero static memory as it might be in use.

Fixes raspberrypi#2687
@peterharperuk peterharperuk changed the title Wait for xTimerDelete in freertos deinit xTimerDelete in freertos deinit Jun 22, 2026
@kilograham kilograham self-assigned this Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants