diff options
author | Mariusz Okroj <mariusz.okroj@intel.com> | 2016-07-06 13:04:20 +0200 |
---|---|---|
committer | Peter Mitsis <peter.mitsis@windriver.com> | 2016-07-20 17:03:32 +0000 |
commit | ea808df0f5c1ed020d9f2f3a09539d7c5236be5c (patch) | |
tree | 722658dd2e1a5cb34602ade2083bf6b5da90098e /include/microkernel | |
parent | 4b6a87e48ebc14e4f961bc3ea4b1d338aeb34791 (diff) |
microkernel: Fix fifo buffer name generation in DEFINE_FIFO
Creating FIFO using DEFINE_FIFO should result in a new buffer in noinit
section which can be used only by this particular FIFO. Currently all
FIFOs unintentionally use the same buffer (__name_buffer). Fixed FIFO
buffer name generation, so now each FIFO has its own unique buffer.
Change-Id: I7ee8250f70b141254a4c98f0ed1a7b9a29dec0c8
JIRA: ZEP-523
Signed-off-by: Mariusz Okroj <mariusz.okroj@intel.com>
Diffstat (limited to 'include/microkernel')
-rw-r--r-- | include/microkernel/fifo.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/microkernel/fifo.h b/include/microkernel/fifo.h index a6c815586..ac1a0d03b 100644 --- a/include/microkernel/fifo.h +++ b/include/microkernel/fifo.h @@ -137,9 +137,9 @@ extern int task_fifo_get(kfifo_t queue, void *data, int32_t timeout); * @param width Width of the FIFO. */ #define DEFINE_FIFO(name, depth, width) \ - static char __noinit __##name_buffer[(depth * width)]; \ + static char __noinit __##name##_buffer[(depth * width)]; \ struct _k_fifo_struct _k_fifo_obj_##name = \ - __K_FIFO_DEFAULT(depth, width, __##name_buffer); \ + __K_FIFO_DEFAULT(depth, width, __##name##_buffer); \ const kfifo_t name = (kfifo_t)&_k_fifo_obj_##name; #ifdef __cplusplus |