Ringbuf safety across multiple cores

GreenGiant
Posts: 28
Joined: Tue Sep 10, 2019 7:22 am

Ringbuf safety across multiple cores

Postby GreenGiant » Thu Dec 05, 2019 8:39 am

Quick question; I notice that the ESP IDF ringbuf is thread safe. Is it also core safe; i.e. if you have two tasks, running on different cores that access the same ringbuf at the same time, will they be excluded? (I'm thinking pre-emption, etc?)
Just looking for some reassurance before using it in a home project.
Cheers

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: Ringbuf safety across multiple cores

Postby ESP_Sprite » Thu Dec 05, 2019 8:44 am

Yes. In general as well as in esp-idf specifically, thread-safe means both for threads on the same core as well as concurrent threads on different cores.

Who is online

Users browsing this forum: Majestic-12 [Bot] and 88 guests