diff options
author | Chris Johns <chrisj@rtems.org> | 2008-07-03 01:37:38 +0000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2008-07-03 01:37:38 +0000 |
commit | 72d2ec4da4ea788335adf921faebf0ac96d67c93 (patch) | |
tree | f50017188d1482928932df90c96985a0748616cd /cpukit/libcsupport | |
parent | 2008-07-03 Chris Johns <chrisj@rtems.org> (diff) | |
download | rtems-72d2ec4da4ea788335adf921faebf0ac96d67c93.tar.bz2 |
2008-07-03 Chris Johns <chrisj@rtems.org>
* cpukit/libcsupport/include/chain.h: Removed. Use the SAPI
interface that is supported.
* cpukit/libcsupport/Makefile.am,
cpukit/libcsupport/preinstall.am: Remove chain.h header
references.
* cpukit/sapi/include/rtems/chain.h,
cpukit/sapi/inline/rtems/chain.inl: New. A supported chains
interface.
* cpukit/sapi/Makefile.am, cpukit/sapi/preinstall.am: Updated to
include the new chains interface.
* cpukit/libfs/src/imfs/imfs.h,
cpukit/libfs/src/imfs/imfs_creat.c,
cpukit/libfs/src/imfs/imfs_debug.c,
cpukit/libfs/src/imfs/imfs_directory.c,
cpukit/libfs/src/imfs/imfs_fsunmount.c,
cpukit/libfs/src/imfs/imfs_getchild.c,
cpukit/libfs/src/imfs/imfs_load_tar.c,
cpukit/libfs/src/imfs/imfs_rmnod.c,
cpukit/libfs/src/imfs/memfile.c,
cpukit/libfs/src/nfsclient/src/nfs.c,
cpukit/libcsupport/include/rtems/libio.h,
cpukit/libcsupport/src/malloc_deferred.c,
cpukit/libcsupport/src/mount.c,
cpukit/libcsupport/src/privateenv.c,
cpukit/libcsupport/src/unmount.c: Change to the new chains
interface.
* cpukit/libcsupport/src/malloc_boundary.c: Remove warning.
Diffstat (limited to 'cpukit/libcsupport')
-rw-r--r-- | cpukit/libcsupport/Makefile.am | 2 | ||||
-rw-r--r-- | cpukit/libcsupport/include/rtems/libio.h | 3 | ||||
-rw-r--r-- | cpukit/libcsupport/preinstall.am | 4 | ||||
-rw-r--r-- | cpukit/libcsupport/src/malloc_boundary.c | 2 | ||||
-rw-r--r-- | cpukit/libcsupport/src/malloc_deferred.c | 10 | ||||
-rw-r--r-- | cpukit/libcsupport/src/mount.c | 11 | ||||
-rw-r--r-- | cpukit/libcsupport/src/privateenv.c | 3 | ||||
-rw-r--r-- | cpukit/libcsupport/src/unmount.c | 8 |
8 files changed, 21 insertions, 22 deletions
diff --git a/cpukit/libcsupport/Makefile.am b/cpukit/libcsupport/Makefile.am index 72dfdc264f..0dfa4357a3 100644 --- a/cpukit/libcsupport/Makefile.am +++ b/cpukit/libcsupport/Makefile.am @@ -10,7 +10,7 @@ noinst_LIBRARIES = libcsupport.a libcsupport_a_CPPFLAGS = $(AM_CPPFLAGS) include_rtemsdir = $(includedir)/rtems -include_rtems_HEADERS = include/chain.h include/console.h include/clockdrv.h \ +include_rtems_HEADERS = include/console.h include/clockdrv.h \ include/iosupp.h include/ringbuf.h include/rtc.h include/spurious.h \ include/timerdrv.h include/vmeintr.h diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h index baa2219352..1767d1d789 100644 --- a/cpukit/libcsupport/include/rtems/libio.h +++ b/cpukit/libcsupport/include/rtems/libio.h @@ -24,6 +24,7 @@ #define _RTEMS_RTEMS_LIBIO_H #include <rtems.h> +#include <rtems/chain.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/ioctl.h> @@ -308,7 +309,7 @@ typedef struct { */ struct rtems_filesystem_mount_table_entry_tt { - Chain_Node Node; + rtems_chain_node Node; rtems_filesystem_location_info_t mt_point_node; rtems_filesystem_location_info_t mt_fs_root; int options; diff --git a/cpukit/libcsupport/preinstall.am b/cpukit/libcsupport/preinstall.am index cccde53bc0..d76efdf511 100644 --- a/cpukit/libcsupport/preinstall.am +++ b/cpukit/libcsupport/preinstall.am @@ -32,10 +32,6 @@ $(PROJECT_INCLUDE)/rtems/$(dirstamp): @: > $(PROJECT_INCLUDE)/rtems/$(dirstamp) PREINSTALL_DIRS += $(PROJECT_INCLUDE)/rtems/$(dirstamp) -$(PROJECT_INCLUDE)/rtems/chain.h: include/chain.h $(PROJECT_INCLUDE)/rtems/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/chain.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/chain.h - $(PROJECT_INCLUDE)/rtems/console.h: include/console.h $(PROJECT_INCLUDE)/rtems/$(dirstamp) $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/console.h PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/console.h diff --git a/cpukit/libcsupport/src/malloc_boundary.c b/cpukit/libcsupport/src/malloc_boundary.c index 706e224294..75ec05c1b6 100644 --- a/cpukit/libcsupport/src/malloc_boundary.c +++ b/cpukit/libcsupport/src/malloc_boundary.c @@ -159,7 +159,7 @@ void reportMallocError(const char *msg, struct mallocNode *mp) mp, mp->forw, mp->forw->back, mp->back, mp->back->forw); if (mp->memory != (mp + 1)) ind += sprintf(cbuf+ind, "mp+1:%p ", mp + 1); - ind += sprintf(cbuf+ind, "mp->memory:%p mp->size:%d\n", mp->memory, mp->size); + ind += sprintf(cbuf+ind, "mp->memory:%p mp->size:%li\n", mp->memory, mp->size); if (memcmp((char *)mp->memory + mp->size, SENTINEL, SENTINELSIZE) != 0) { ind += sprintf(cbuf+ind, "mp->sentinel: "); for (i = 0 ; i < SENTINELSIZE ; i++) diff --git a/cpukit/libcsupport/src/malloc_deferred.c b/cpukit/libcsupport/src/malloc_deferred.c index 57fd8752c3..923b0d980d 100644 --- a/cpukit/libcsupport/src/malloc_deferred.c +++ b/cpukit/libcsupport/src/malloc_deferred.c @@ -22,7 +22,7 @@ #include "malloc_p.h" -Chain_Control RTEMS_Malloc_GC_list; +rtems_chain_control RTEMS_Malloc_GC_list; boolean malloc_is_system_state_OK(void) { @@ -37,17 +37,17 @@ boolean malloc_is_system_state_OK(void) void malloc_deferred_frees_initialize(void) { - Chain_Initialize_empty(&RTEMS_Malloc_GC_list); + rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { - Chain_Node *to_be_freed; + rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ - while ((to_be_freed = Chain_Get(&RTEMS_Malloc_GC_list)) != NULL) + while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) free(to_be_freed); } @@ -55,6 +55,6 @@ void malloc_deferred_free( void *pointer ) { - Chain_Append(&RTEMS_Malloc_GC_list, (Chain_Node *)pointer); + rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } #endif diff --git a/cpukit/libcsupport/src/mount.c b/cpukit/libcsupport/src/mount.c index 997cf859b1..f66778217d 100644 --- a/cpukit/libcsupport/src/mount.c +++ b/cpukit/libcsupport/src/mount.c @@ -33,7 +33,7 @@ #include <rtems/libio_.h> -Chain_Control rtems_filesystem_mount_table_control; +rtems_chain_control rtems_filesystem_mount_table_control; /* * Prototypes that probably should be somewhere else. @@ -227,7 +227,8 @@ int mount( * Add the mount table entry to the mount table chain */ - Chain_Append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); + rtems_chain_append( &rtems_filesystem_mount_table_control, + &temp_mt_entry->Node ); if ( mt_entry ) *mt_entry = temp_mt_entry; @@ -255,7 +256,7 @@ cleanup_and_bail: int init_fs_mount_table() { - Chain_Initialize_empty ( &rtems_filesystem_mount_table_control ); + rtems_chain_initialize_empty ( &rtems_filesystem_mount_table_control ); return 0; } @@ -274,7 +275,7 @@ static int Is_node_fs_root( rtems_filesystem_location_info_t *loc ) { - Chain_Node *the_node; + rtems_chain_node *the_node; rtems_filesystem_mount_table_entry_t *the_mount_entry; /* @@ -282,7 +283,7 @@ static int Is_node_fs_root( */ for ( the_node = rtems_filesystem_mount_table_control.first; - !Chain_Is_tail( &rtems_filesystem_mount_table_control, the_node ); + !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access ) diff --git a/cpukit/libcsupport/src/privateenv.c b/cpukit/libcsupport/src/privateenv.c index e1a5e674e3..286a2f6733 100644 --- a/cpukit/libcsupport/src/privateenv.c +++ b/cpukit/libcsupport/src/privateenv.c @@ -20,10 +20,11 @@ #include <stdlib.h> /* free */ #include <rtems.h> +#include <rtems/chain.h> #include <rtems/libio.h> #include <rtems/libio_.h> -extern Chain_Control rtems_filesystem_mount_table_control; +extern rtems_chain_control rtems_filesystem_mount_table_control; #define THE_ROOT_FS_LOC \ (((rtems_filesystem_mount_table_entry_t*)\ diff --git a/cpukit/libcsupport/src/unmount.c b/cpukit/libcsupport/src/unmount.c index f37d3f2e56..422e89ea6e 100644 --- a/cpukit/libcsupport/src/unmount.c +++ b/cpukit/libcsupport/src/unmount.c @@ -37,7 +37,7 @@ * Data structures and routines private to mount/unmount pair. */ -extern Chain_Control rtems_filesystem_mount_table_control; +extern rtems_chain_control rtems_filesystem_mount_table_control; int search_mt_for_mount_point( rtems_filesystem_location_info_t *location_of_mount_point @@ -69,7 +69,7 @@ rtems_boolean file_systems_below_this_mountpoint( rtems_filesystem_mount_table_entry_t *fs_to_unmount ) { - Chain_Node *the_node; + rtems_chain_node *the_node; rtems_filesystem_mount_table_entry_t *the_mount_entry; /* @@ -78,7 +78,7 @@ rtems_boolean file_systems_below_this_mountpoint( */ for ( the_node = rtems_filesystem_mount_table_control.first; - !Chain_Is_tail( &rtems_filesystem_mount_table_control, the_node ); + !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { @@ -205,7 +205,7 @@ int unmount( * Extract the mount table entry from the chain */ - Chain_Extract( ( Chain_Node * ) mt_entry ); + rtems_chain_extract( ( rtems_chain_node * ) mt_entry ); /* * Free the memory node that was allocated in mount |