raspberrypi / pico-sdk

BSD 3-Clause "New" or "Revised" License
3.81k stars 955 forks source link

Make multicore FIFO pop and push inline #1679

Closed daveythacher closed 3 months ago

daveythacher commented 8 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 8 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 6 months ago

yes, these inline versions can be made public

kilograham commented 3 months ago

done