summaryrefslogtreecommitdiffstats
path: root/cpukit/libblock
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-11-25 16:12:59 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-11-25 16:12:59 +0100
commite68176270479c9ca806c21fb0ab1c03b1b1e3fb3 (patch)
treeb644c5bc1aa051dccb2c27a54958bd65cf56b30c /cpukit/libblock
parentrtems: Move rtems_cache_aligned_malloc() (diff)
downloadrtems-e68176270479c9ca806c21fb0ab1c03b1b1e3fb3.tar.bz2
bdbuf: Use rtems_cache_aligned_malloc()
Diffstat (limited to 'cpukit/libblock')
-rw-r--r--cpukit/libblock/src/bdbuf.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/cpukit/libblock/src/bdbuf.c b/cpukit/libblock/src/bdbuf.c
index e1ed0397c2..bae57e2adf 100644
--- a/cpukit/libblock/src/bdbuf.c
+++ b/cpukit/libblock/src/bdbuf.c
@@ -19,7 +19,7 @@
* Rewritten to remove score mutex access. Fixes many performance
* issues.
*
- * Copyright (c) 2009-2012 embedded brains GmbH.
+ * Copyright (c) 2009-2014 embedded brains GmbH.
*/
/**
@@ -39,7 +39,6 @@
#include <rtems.h>
#include <rtems/error.h>
-#include <rtems/malloc.h>
#include "rtems/bdbuf.h"
@@ -1599,14 +1598,12 @@ rtems_bdbuf_do_init (void)
/*
* Allocate memory for buffer memory. The buffer memory will be cache
- * aligned. It is possible to free the memory allocated by rtems_memalign()
- * with free(). Return 0 if allocated.
- *
- * The memory allocate allows a
+ * aligned. It is possible to free the memory allocated by
+ * rtems_cache_aligned_malloc() with free().
*/
- if (rtems_memalign ((void **) &bdbuf_cache.buffers,
- rtems_cache_get_data_line_size(),
- bdbuf_cache.buffer_min_count * bdbuf_config.buffer_min) != 0)
+ bdbuf_cache.buffers = rtems_cache_aligned_malloc(bdbuf_cache.buffer_min_count
+ * bdbuf_config.buffer_min);
+ if (bdbuf_cache.buffers == NULL)
goto error;
/*