summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-01-28 11:32:35 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-02-04 10:06:34 +0100
commita850d040ab99b4d6c66a40adc86778c849f74ebe (patch)
tree911a3cb3c7f880242305c83078e4e45db6fcd66e /cpukit
parentbsp/v850: Use proper ABI in linkcmds (diff)
downloadrtems-a850d040ab99b4d6c66a40adc86778c849f74ebe.tar.bz2
score: Add _Workspace_Allocate_aligned()
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/score/include/rtems/score/wkspace.h11
-rw-r--r--cpukit/score/src/wkspace.c5
2 files changed, 16 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/wkspace.h b/cpukit/score/include/rtems/score/wkspace.h
index 7adf9dff07..ea8ad856ac 100644
--- a/cpukit/score/include/rtems/score/wkspace.h
+++ b/cpukit/score/include/rtems/score/wkspace.h
@@ -72,6 +72,17 @@ void *_Workspace_Allocate(
);
/**
+ * @brief Allocate aligned memory from workspace.
+ *
+ * @param[in] size The size of the requested memory.
+ * @param[in] alignment The alignment of the requested memory.
+ *
+ * @retval NULL Not enough resources.
+ * @retval other The memory area begin.
+ */
+void *_Workspace_Allocate_aligned( size_t size, size_t alignment );
+
+/**
* @brief Free memory to the workspace.
*
* This function frees the specified block of memory. If the block
diff --git a/cpukit/score/src/wkspace.c b/cpukit/score/src/wkspace.c
index b9482960ac..65806863c2 100644
--- a/cpukit/score/src/wkspace.c
+++ b/cpukit/score/src/wkspace.c
@@ -114,6 +114,11 @@ void *_Workspace_Allocate(
return memory;
}
+void *_Workspace_Allocate_aligned( size_t size, size_t alignment )
+{
+ return _Heap_Allocate_aligned( &_Workspace_Area, size, alignment );
+}
+
/*
* _Workspace_Free
*/