summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-07-17 11:24:56 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-07-17 11:24:56 +0200
commitd6460e815f5c23778da825a50f42ee1512fc2173 (patch)
treece5f71bfae63c9a51dba9a3d348b60b66deed86c /testsuites
parentlibtests/termios01: Use greedy allocation API (diff)
downloadrtems-d6460e815f5c23778da825a50f42ee1512fc2173.tar.bz2
psxtests/psxpipe01: Use greedy allocation API
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/psxtests/psxpipe01/init.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/testsuites/psxtests/psxpipe01/init.c b/testsuites/psxtests/psxpipe01/init.c
index d2e0381a53..f342fd4f85 100644
--- a/testsuites/psxtests/psxpipe01/init.c
+++ b/testsuites/psxtests/psxpipe01/init.c
@@ -19,6 +19,7 @@
#include <unistd.h>
#include <errno.h>
#include <rtems/libcsupport.h>
+#include <rtems/malloc.h>
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument ignored);
@@ -30,7 +31,7 @@ rtems_task Init(
int fd[2] = {0,0};
int dummy_fd[2] = {0,0};
int status = 0;
- void *alloc_ptr = (void *)0;
+ void *opaque = NULL;
puts( "*** TEST POSIX PIPE CREATION - 01 ***" );
@@ -55,7 +56,7 @@ rtems_task Init(
status |= close( fd[1] );
rtems_test_assert( status == 0 );
- alloc_ptr = malloc( malloc_free_space() - 4 );
+ opaque = rtems_heap_greedy_allocate( NULL, 0 );
/* case where mkfifo fails */
puts( "Init - attempt to create pipe -- expect ENOMEM" );
@@ -63,7 +64,7 @@ rtems_task Init(
rtems_test_assert( status == -1 );
rtems_test_assert( errno == ENOMEM );
- free( alloc_ptr );
+ rtems_heap_greedy_free( opaque );
dummy_fd[0] = open( "/file01", O_RDONLY | O_CREAT, S_IRWXU );
rtems_test_assert( dummy_fd[0] != -1 );