zephyr/samples
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
..
application_development cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
arch cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
basic cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
bluetooth samples: Bluetooth: df: Enable TX of mutliple CTEs in a per adv event 2021-08-26 18:25:35 -04:00
boards samples: sensortile_box: get chosen console device from devicetree 2021-08-23 18:53:47 -04:00
compression cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
drivers samples: enable support for Atmel SAM DAC driver 2021-08-26 16:46:16 -04:00
hello_world cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
kernel cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
modules samples: tflite-micro: fix magic_wand 2021-08-24 07:26:08 -04:00
net net: ot: rework NCP interface configuration 2021-08-23 18:53:47 -04:00
philosophers cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
posix cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
sensor samples: sensor: added sample app for INA219 2021-08-23 10:32:07 -05:00
shields cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
subsys ipc: rpmsg_multi_instance: Rework instance tracking 2021-08-27 06:44:08 -04:00
synchronization cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
tfm_integration cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
userspace samples: prod_consumer: don't reuse main stack for app_b 2021-08-26 21:16:22 -04:00
classic.rst doc: fix top samples doc index 2021-03-09 17:48:18 -05:00
index.rst samples: compression: lz4: lz4 sample application 2021-06-12 17:21:55 +02:00