diff options
author | Jennifer Averett <Jennifer.Averett@OARcorp.com> | 2010-06-22 20:03:41 +0000 |
---|---|---|
committer | Jennifer Averett <Jennifer.Averett@OARcorp.com> | 2010-06-22 20:03:41 +0000 |
commit | e525f66b09e11427852da956424c71d784d828c6 (patch) | |
tree | b134de04d80b384828099df538537db8b1845876 | |
parent | 2010-06-22 Joel Sherrill <joel.sherrilL@OARcorp.com> (diff) | |
download | rtems-e525f66b09e11427852da956424c71d784d828c6.tar.bz2 |
2010-06-22 Jennifer Averett <Jennifer.Averett@OARcorp.com>
* libcsupport/Makefile.am, libcsupport/include/rtems/libio_.h: Moved
method to free a node from a define to an external method.
* libcsupport/src/freenode.c: New file.
-rw-r--r-- | cpukit/ChangeLog | 6 | ||||
-rw-r--r-- | cpukit/libcsupport/Makefile.am | 3 | ||||
-rw-r--r-- | cpukit/libcsupport/include/rtems/libio_.h | 8 | ||||
-rw-r--r-- | cpukit/libcsupport/src/freenode.c | 22 |
4 files changed, 31 insertions, 8 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 822fb50383..5aa4bc8c7a 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,5 +1,11 @@ 2010-06-22 Jennifer Averett <Jennifer.Averett@OARcorp.com> + * libcsupport/Makefile.am, libcsupport/include/rtems/libio_.h: Moved + method to free a node from a define to an external method. + * libcsupport/src/freenode.c: New file. + +2010-06-22 Jennifer Averett <Jennifer.Averett@OARcorp.com> + * posix/src/nanosleep.c, posix/src/timersettime.c: Removed redundent code and cleaned up error checking code. diff --git a/cpukit/libcsupport/Makefile.am b/cpukit/libcsupport/Makefile.am index 368833b60b..d2e60c7c2f 100644 --- a/cpukit/libcsupport/Makefile.am +++ b/cpukit/libcsupport/Makefile.am @@ -84,7 +84,8 @@ ID_C_FILES = src/getegid.c src/geteuid.c src/getgid.c src/getgroups.c \ src/setpgid.c src/setsid.c MALLOC_C_FILES = src/malloc_initialize.c src/calloc.c src/malloc.c \ - src/realloc.c src/_calloc_r.c src/free.c src/_free_r.c src/_malloc_r.c \ + src/realloc.c src/_calloc_r.c src/_malloc_r.c \ + src/free.c src/freenode.c src/_free_r.c \ src/_realloc_r.c src/__brk.c src/__sbrk.c src/mallocfreespace.c \ src/mallocinfo.c src/malloc_walk.c src/malloc_get_statistics.c \ src/malloc_report_statistics.c src/malloc_report_statistics_plugin.c \ diff --git a/cpukit/libcsupport/include/rtems/libio_.h b/cpukit/libcsupport/include/rtems/libio_.h index a6c7860672..6abc1ee5e0 100644 --- a/cpukit/libcsupport/include/rtems/libio_.h +++ b/cpukit/libcsupport/include/rtems/libio_.h @@ -148,13 +148,7 @@ extern rtems_libio_t *rtems_libio_iop_freelist; * Macro to free a node. */ -#define rtems_filesystem_freenode( _node ) \ - do { \ - if ( (_node)->ops )\ - if ( (_node)->ops->freenod_h ) \ - (*(_node)->ops->freenod_h)( (_node) ); \ - } while (0) - +void rtems_filesystem_freenode( rtems_filesystem_location_info_t* node ); /* * External structures diff --git a/cpukit/libcsupport/src/freenode.c b/cpukit/libcsupport/src/freenode.c new file mode 100644 index 0000000000..c99db96271 --- /dev/null +++ b/cpukit/libcsupport/src/freenode.c @@ -0,0 +1,22 @@ +/* + * freenode() + * + * COPYRIGHT (c) 1989-2010. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#include <stdlib.h> +#include <rtems/libio_.h> + +void rtems_filesystem_freenode( rtems_filesystem_location_info_t *_node ) +{ + if ( _node->ops ) + if ( _node->ops->freenod_h ) + _node->ops->freenod_h(_node ); +} |