summaryrefslogtreecommitdiffstats
path: root/bsps
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-06-01 07:00:37 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-06-05 07:08:40 +0200
commitdea4bbe3746699627931ecd94fc437ae66bf9158 (patch)
tree13ed430fe3d57ec2bcd35ba68757df36edb32d7b /bsps
parentscore: Simplify _Objects_Name_to_string() (diff)
downloadrtems-dea4bbe3746699627931ecd94fc437ae66bf9158.tar.bz2
bsps: Avoid malloc() in generic IRQ support
Use rtems_heap_allocate_aligned_with_boundary() instead of malloc() to avoid a dependency on errno.
Diffstat (limited to 'bsps')
-rw-r--r--bsps/shared/irq/irq-generic.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bsps/shared/irq/irq-generic.c b/bsps/shared/irq/irq-generic.c
index 99033dc46a..ed77a78ed9 100644
--- a/bsps/shared/irq/irq-generic.c
+++ b/bsps/shared/irq/irq-generic.c
@@ -9,7 +9,7 @@
/*
* Based on concepts of Pavel Pisa, Till Straumann and Eric Valette.
*
- * Copyright (c) 2008, 2017 embedded brains GmbH.
+ * Copyright (c) 2008, 2018 embedded brains GmbH.
*
* embedded brains GmbH
* Dornierstr. 4
@@ -30,6 +30,7 @@
#include <rtems/score/apimutex.h>
#include <rtems/score/processormask.h>
#include <rtems/score/sysstate.h>
+#include <rtems/malloc.h>
#ifdef BSP_INTERRUPT_USE_INDEX_TABLE
bsp_interrupt_handler_index_type bsp_interrupt_handler_index_table
@@ -141,7 +142,7 @@ static bsp_interrupt_handler_entry *bsp_interrupt_allocate_handler_entry(void)
return NULL;
}
#else
- return malloc(sizeof(bsp_interrupt_handler_entry));
+ return rtems_heap_allocate_aligned_with_boundary(sizeof(bsp_interrupt_handler_entry), 0, 0);
#endif
}