raspberrypi / pico-sdk

BSD 3-Clause "New" or "Revised" License
3.66k stars 911 forks source link

Make multicore FIFO pop and push inline #1679

Closed daveythacher closed 1 month ago

daveythacher commented 6 months ago

Currently multicore_fifo_pop_blocking and multicore_fifo_push_blocking are not marked as inline.

This causes these symbols to end up in XIP. I can work around this issue on my side with linker script or by creating a new symbol containing the same logic which is inlined. This works for me since I do not have multiple producers or consumers. However I only found this because I ran behind the compiler. Currently I only use the XIP for boot code. The runtime logic is RAM only for performance.

lurch commented 6 months ago

I dunno if it helps, but it seems like there are inline versions of those functions? https://github.com/raspberrypi/pico-sdk/blob/master/src/rp2_common/pico_multicore/multicore.c#L26 https://github.com/raspberrypi/pico-sdk/blob/master/src/rp2_common/pico_multicore/multicore.c#L56

kilograham commented 4 months ago

yes, these inline versions can be made public

kilograham commented 1 month ago

done