diff options
author | Chris Kay <chris.kay@arm.com> | 2020-06-09 19:08:13 +0100 |
---|---|---|
committer | jimqui01 <54316584+jimqui01@users.noreply.github.com> | 2020-07-07 17:04:07 +0100 |
commit | 0bcadcae2d45660be5f3d3a9f3fb73a5a42628f4 (patch) | |
tree | 8e2c210c8f1841620f8d5f6551663256677ec554 /product/rddaniel | |
parent | 136f0f3e5396c1951bd78dd5ed6912a11f523f36 (diff) |
fwk: Remove dependency on RTX threads
The multithreaded implementation of the framework currently depends
directly on Keil RTX because it directly allocates the thread control
block itself.
This change instead replaces RTX's memory allocator with the framework's
memory allocator in a way that RTX can now allocate its own threads
through the generic CMSIS-RTOS interface.
Change-Id: Ie1bf2760a8f21c38a9466ff945d553e0e293a363
Signed-off-by: Chris Kay <chris.kay@arm.com>
Diffstat (limited to 'product/rddaniel')
-rw-r--r-- | product/rddaniel/scp_ramfw/rtx_config.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/product/rddaniel/scp_ramfw/rtx_config.c b/product/rddaniel/scp_ramfw/rtx_config.c index 3f0acbaa..dc162ac8 100644 --- a/product/rddaniel/scp_ramfw/rtx_config.c +++ b/product/rddaniel/scp_ramfw/rtx_config.c @@ -10,6 +10,8 @@ #include <rtx_lib.c> #include <rtx_os.h> +#include <fwk_mm.h> + #include <fmw_cmsis.h> #include <stdbool.h> @@ -36,3 +38,18 @@ uint32_t osRtxErrorNotify(uint32_t code, void *object_id) { osRtxIdleThread(object_id); } + +uint32_t osRtxMemoryInit(void *mem, uint32_t size) +{ + return 1; +} + +void *osRtxMemoryAlloc(void *mem, uint32_t size, uint32_t type) +{ + return fwk_mm_alloc(1, size); +} + +uint32_t osRtxMemoryFree(void *mem, void *block) +{ + return 1; +} |