commit | a2acd7b2fbde5f5febf38c3efb960488bfdbc31a | [log] [tgz] |
---|---|---|
author | Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> | Fri Nov 03 14:16:16 2023 +0100 |
committer | Anas Nashif <anas.nashif@intel.com> | Fri Dec 01 10:08:12 2023 -0500 |
tree | 394a2b5aa822c626200a3ca028076c7edab023b6 | |
parent | 0b5bfd22e39cae54d8f2ca795fd752fa57e579ba [diff] |
llext: add reference counting Extend the llext_load() / llext_unload() API to let it be called repeatedly for the same extension to increment or decrement its reference counter respectively. We use a mutex to protect the counter and make both llext_load() and llext_unload() return the use-count to let the caller identify when the first loading and the last unloading took place. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>