zephyr/samples/subsys
Carlo Caione 0c2dabb4b9 ipc: rpmsg_multi_instance: Rework instance tracking
This patch is the first step to make the rpmsg_multi_instance usable in
a multi-core scenario.

The current driver is using a local driver variable (instance) to track
the number of allocated instances. This counter is practically used to
allocate to the instance the correct portion of the shared memory.

This is fundamentally wrong because this is assuming that it does exist
only one single shared memory region to split amongs all the allocated
instances.  When the platform has more than one core this is obviously
not the case since each couple of cores are communicating using a
different memory region.

To solve this issue we introduce a new struct rpmsg_mi_ctx_shm_cfg that
is doing two things: (1) it's carrying the information about the shared
memory and (2) it's carrying an internal variable used to track the
instances allocated in that region. The same struct should be used every
time a new instance is allocated in the same shared memory region.

We also fix a problem with the current code where there is a race
between threads when accessing the instance variable, so this patch is
adding a serializing mutex.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-08-27 06:44:08 -04:00
..
audio/sof cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
canbus cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
console cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
cpp cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
debug cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
display samples: lvgl: add min_ram to adafruit_2_8_tft_touch_v2 test 2021-08-24 15:40:06 -04:00
edac cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
fs samples: littlefs: Fix printk messages for native_posix_64 2021-08-26 06:53:28 -04:00
ipc ipc: rpmsg_multi_instance: Rework instance tracking 2021-08-27 06:44:08 -04:00
logging cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
lorawan/class_a cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
mgmt drivers: uart_mcumgr: remove CONFIG_UART_MCUMGR_ON_DEV_NAME 2021-08-23 18:53:47 -04:00
modbus cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
nvs cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
pm/device_pm cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
portability cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
settings cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
shell shell: remove Kconfig option CONFIG_UART_SHELL_ON_DEV_NAME 2021-08-24 17:15:58 -04:00
task_wdt cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
testsuite cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
tracing cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
usb sample: usb: hid-cdc: add a sleep for cpu to response 2021-08-24 16:37:44 -05:00
video cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
subsys.rst