summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2007-12-10 03:44:06 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2007-12-10 03:44:06 +0000
commit372cdd515fe78635d0570723447646ff8ffa6924 (patch)
tree114969a590313894bcb8e41252f0159a6e2629c1 /doc
parent2007-12-06 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-372cdd515fe78635d0570723447646ff8ffa6924.tar.bz2
2007-12-10 Ralf Corsepius <ralf.corsepius@rtems.org>
* address.h, address.inl, chain.c, chain.h, system.h: Eliminate unsigned8, unsigned16, unsigned32. Use size_t, ptrdiff_t, intptr_t for 64bit compliance. * chain.c: Reflect removal of isr.h. * isr.h: Remove. * Makefile.am: Remove isr.h.
Diffstat (limited to 'doc')
-rw-r--r--doc/tools/bmenu/ChangeLog9
-rw-r--r--doc/tools/bmenu/Makefile.am2
-rw-r--r--doc/tools/bmenu/address.h80
-rw-r--r--doc/tools/bmenu/address.inl78
-rw-r--r--doc/tools/bmenu/chain.c22
-rw-r--r--doc/tools/bmenu/chain.h6
-rw-r--r--doc/tools/bmenu/isr.h18
-rw-r--r--doc/tools/bmenu/system.h4
8 files changed, 23 insertions, 196 deletions
diff --git a/doc/tools/bmenu/ChangeLog b/doc/tools/bmenu/ChangeLog
index 9ef8bbc269..5d34af57bc 100644
--- a/doc/tools/bmenu/ChangeLog
+++ b/doc/tools/bmenu/ChangeLog
@@ -1,3 +1,12 @@
+2007-12-10 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * address.h, address.inl, chain.c, chain.h, system.h:
+ Eliminate unsigned8, unsigned16, unsigned32.
+ Use size_t, ptrdiff_t, intptr_t for 64bit compliance.
+ * chain.c: Reflect removal of isr.h.
+ * isr.h: Remove.
+ * Makefile.am: Remove isr.h.
+
2003-12-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* Makefile.am: Cosmetics.
diff --git a/doc/tools/bmenu/Makefile.am b/doc/tools/bmenu/Makefile.am
index 3f53ef1e57..272230bd28 100644
--- a/doc/tools/bmenu/Makefile.am
+++ b/doc/tools/bmenu/Makefile.am
@@ -8,5 +8,5 @@
noinst_PROGRAMS = bmenu2
-bmenu2_SOURCES = address.h chain.c isr.h address.inl chain.h bmenu2.c base.h \
+bmenu2_SOURCES = address.h chain.c address.inl chain.h bmenu2.c base.h \
chain.inl system.h
diff --git a/doc/tools/bmenu/address.h b/doc/tools/bmenu/address.h
index 1b26544f87..22faa9b454 100644
--- a/doc/tools/bmenu/address.h
+++ b/doc/tools/bmenu/address.h
@@ -13,6 +13,8 @@
#ifndef __ADDRESSES_h
#define __ADDRESSES_h
+#include <stddef.h>
+
/*
* _Addresses_Add_offset
*
@@ -25,83 +27,7 @@
STATIC INLINE void *_Addresses_Add_offset (
void *base,
- unsigned32 offset
-);
-
-/*
- * _Addresses_Subtract_offset
- *
- * DESCRIPTION:
- *
- * This function is used to subtract an offset from a base
- * address. It returns the resulting address. This address is
- * typically converted to an access type before being used further.
- */
-
-STATIC INLINE void *_Addresses_Subtract_offset(
- void *base,
- unsigned32 offset
-);
-
-/*
- * _Addresses_Add
- *
- * DESCRIPTION:
- *
- * This function is used to add two addresses. It returns the
- * resulting address. This address is typically converted to an
- * access type before being used further.
- */
-
-STATIC INLINE void *_Addresses_Add (
- void *left,
- void *right
-);
-
-/*
- * _Addresses_Subtract
- *
- * DESCRIPTION:
- *
- * This function is used to subtract two addresses. It returns the
- * resulting offset.
- */
-
-STATIC INLINE unsigned32 _Addresses_Subtract (
- void *left,
- void *right
-);
-
-/*
- * _Addresses_Is_aligned
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the given address is correctly
- * aligned for this processor and FALSE otherwise. Proper alignment
- * is based on correctness and efficiency.
- */
-
-STATIC INLINE boolean _Addresses_Is_aligned (
- void *address
-);
-
-/*
- * _Addresses_Is_in_range
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the given address is within the
- * memory range specified and FALSE otherwise. base is the address
- * of the first byte in the memory range and limit is the address
- * of the last byte in the memory range. The base address is
- * assumed to be lower than the limit address.
- */
-
-STATIC INLINE boolean _Addresses_Is_in_range (
- void *address,
- void *base,
- void *limit
+ size_t offset
);
#include "address.inl"
diff --git a/doc/tools/bmenu/address.inl b/doc/tools/bmenu/address.inl
index 220e5fe2e0..6b079d7f9d 100644
--- a/doc/tools/bmenu/address.inl
+++ b/doc/tools/bmenu/address.inl
@@ -13,6 +13,8 @@
#ifndef __INLINE_ADDRESSES_inl
#define __INLINE_ADDRESSES_inl
+#include <stddef.h>
+
/*PAGE
*
* _Addresses_Add_offset
@@ -21,85 +23,11 @@
STATIC INLINE void *_Addresses_Add_offset (
void *base,
- unsigned32 offset
+ size_t offset
)
{
return (base + offset);
}
-/*PAGE
- *
- * _Addresses_Subtract_offset
- *
- */
-
-STATIC INLINE void *_Addresses_Subtract_offset (
- void *base,
- unsigned32 offset
-)
-{
- return (base - offset);
-}
-
-/*PAGE
- *
- * _Addresses_Add
- *
- * NOTE: The cast of an address to an unsigned32 makes this code
- * dependent on an addresses being thirty two bits.
- */
-
-STATIC INLINE void *_Addresses_Add (
- void *left,
- void *right
-)
-{
- return (left + (unsigned32)right);
-}
-
-/*PAGE
- *
- * _Addresses_Subtract
- *
- * NOTE: The cast of an address to an unsigned32 makes this code
- * dependent on an addresses being thirty two bits.
- */
-
-STATIC INLINE unsigned32 _Addresses_Subtract (
- void *left,
- void *right
-)
-{
- return (left - right);
-}
-
-/*PAGE
- *
- * _Addresses_Is_aligned
- *
- */
-
-STATIC INLINE boolean _Addresses_Is_aligned (
- void *address
-)
-{
- return ( ( (unsigned32)address % 4 ) == 0 );
-}
-
-/*PAGE
- *
- * _Addresses_Is_aligned
- *
- */
-
-STATIC INLINE boolean _Addresses_Is_in_range (
- void *address,
- void *base,
- void *limit
-)
-{
- return ( address >= base && address <= limit );
-}
-
#endif
/* end of include file */
diff --git a/doc/tools/bmenu/chain.c b/doc/tools/bmenu/chain.c
index 7047b42d56..a9ee942cea 100644
--- a/doc/tools/bmenu/chain.c
+++ b/doc/tools/bmenu/chain.c
@@ -11,7 +11,6 @@
#include "system.h"
#include "address.h"
#include "chain.h"
-#include "isr.h"
/*PAGE
*
@@ -31,11 +30,11 @@
void _Chain_Initialize(
Chain_Control *the_chain,
void *starting_address,
- unsigned32 number_nodes,
- unsigned32 node_size
+ size_t number_nodes,
+ size_t node_size
)
{
- unsigned32 count;
+ size_t count;
Chain_Node *current;
Chain_Node *next;
@@ -76,14 +75,11 @@ Chain_Node *_Chain_Get(
Chain_Control *the_chain
)
{
- ISR_Level level;
Chain_Node *return_node;
return_node = NULL;
- _ISR_Disable( level );
if ( !_Chain_Is_empty( the_chain ) )
return_node = _Chain_Get_first_unprotected( the_chain );
- _ISR_Enable( level );
return return_node;
}
@@ -108,11 +104,7 @@ void _Chain_Append(
Chain_Node *node
)
{
- ISR_Level level;
-
- _ISR_Disable( level );
_Chain_Append_unprotected( the_chain, node );
- _ISR_Enable( level );
}
/*PAGE
@@ -134,11 +126,7 @@ void _Chain_Extract(
Chain_Node *node
)
{
- ISR_Level level;
-
- _ISR_Disable( level );
_Chain_Extract_unprotected( node );
- _ISR_Enable( level );
}
/*PAGE
@@ -163,11 +151,7 @@ void _Chain_Insert(
Chain_Node *node
)
{
- ISR_Level level;
-
- _ISR_Disable( level );
_Chain_Insert_unprotected( after_node, node );
- _ISR_Enable( level );
}
/*PAGE
diff --git a/doc/tools/bmenu/chain.h b/doc/tools/bmenu/chain.h
index 8f8574e239..990fd2cb6b 100644
--- a/doc/tools/bmenu/chain.h
+++ b/doc/tools/bmenu/chain.h
@@ -13,6 +13,8 @@
#ifndef __CHAIN_h
#define __CHAIN_h
+#include <stddef.h>
+
#include "address.h"
/*
@@ -66,8 +68,8 @@ typedef struct {
void _Chain_Initialize(
Chain_Control *the_chain,
void *starting_address,
- unsigned32 number_nodes,
- unsigned32 node_size
+ size_t number_nodes,
+ size_t node_size
);
/*
diff --git a/doc/tools/bmenu/isr.h b/doc/tools/bmenu/isr.h
deleted file mode 100644
index 33eaefb127..0000000000
--- a/doc/tools/bmenu/isr.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * COPYRIGHT (c) 1988-2002.
- * On-Line Applications Research Corporation (OAR).
- * All rights reserved.
- *
- * $Id$
- */
-
-
-#ifndef __ISR_h
-#define __ISR_h
-
-typedef unsigned32 ISR_Level;
-
-#define _ISR_Disable
-#define _ISR_Enable
-
-#endif
diff --git a/doc/tools/bmenu/system.h b/doc/tools/bmenu/system.h
index a573045070..782d2511ad 100644
--- a/doc/tools/bmenu/system.h
+++ b/doc/tools/bmenu/system.h
@@ -9,10 +9,6 @@
#ifndef __SYSTEM_h
#define __SYSTEM_h
-typedef unsigned int unsigned32;
-typedef unsigned short unsigned16;
-typedef unsigned char unsigned8;
-
#define STATIC static
#define INLINE inline