From 45819022cee43c0cef9146ccd10aaf20f99b489b Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 16 Aug 1995 19:42:41 +0000 Subject: bug fixes to make macro implementations work --- cpukit/score/include/rtems/score/tqdata.h | 4 ++-- cpukit/score/include/rtems/score/wkspace.h | 4 ++-- cpukit/score/inline/rtems/score/wkspace.inl | 22 +--------------------- cpukit/score/macros/rtems/score/chain.inl | 4 ++-- cpukit/score/macros/rtems/score/heap.inl | 4 +++- cpukit/score/macros/rtems/score/object.inl | 3 +-- cpukit/score/macros/rtems/score/priority.inl | 4 ++-- cpukit/score/macros/rtems/score/sysstate.inl | 4 ++-- cpukit/score/macros/rtems/score/wkspace.inl | 26 +------------------------- cpukit/score/src/thread.c | 10 +++++----- cpukit/score/src/wkspace.c | 12 ++---------- 11 files changed, 23 insertions(+), 74 deletions(-) (limited to 'cpukit/score') diff --git a/cpukit/score/include/rtems/score/tqdata.h b/cpukit/score/include/rtems/score/tqdata.h index 8c43fa4c72..0ed2eb5665 100644 --- a/cpukit/score/include/rtems/score/tqdata.h +++ b/cpukit/score/include/rtems/score/tqdata.h @@ -11,7 +11,7 @@ * to the copyright license under the clause at DFARS 252.227-7013. This * notice must appear in all copies of this file and its derivatives. * - * $Id$ + * tqdata.h,v 1.2 1995/05/31 16:47:42 joel Exp */ #ifndef __RTEMS_THREAD_QUEUE_DATA_h @@ -32,7 +32,7 @@ extern "C" { typedef enum { THREAD_QUEUE_DATA_FIFO_DISCIPLINE, /* RTEMS_FIFO queue discipline */ - THREAD_QUEUE_DATA_PRIORITY_DISCIPLINE, /* RTEMS_PRIORITY queue discipline */ + THREAD_QUEUE_DATA_PRIORITY_DISCIPLINE /* RTEMS_PRIORITY queue discipline */ } Thread_queue_Disciplines; /* diff --git a/cpukit/score/include/rtems/score/wkspace.h b/cpukit/score/include/rtems/score/wkspace.h index 14bc090291..2cd4df6a45 100644 --- a/cpukit/score/include/rtems/score/wkspace.h +++ b/cpukit/score/include/rtems/score/wkspace.h @@ -12,7 +12,7 @@ * to the copyright license under the clause at DFARS 252.227-7013. This * notice must appear in all copies of this file and its derivatives. * - * $Id$ + * wkspace.h,v 1.2 1995/05/31 16:47:46 joel Exp */ #ifndef __RTEMS_WORKSPACE_h @@ -71,7 +71,7 @@ STATIC INLINE void *_Workspace_Allocate( * is invoked. */ -STATIC INLINE void *_Workspace_Allocate_or_fatal_error( +void *_Workspace_Allocate_or_fatal_error( unsigned32 size ); diff --git a/cpukit/score/inline/rtems/score/wkspace.inl b/cpukit/score/inline/rtems/score/wkspace.inl index fee7623a6c..1d88843db8 100644 --- a/cpukit/score/inline/rtems/score/wkspace.inl +++ b/cpukit/score/inline/rtems/score/wkspace.inl @@ -11,7 +11,7 @@ * to the copyright license under the clause at DFARS 252.227-7013. This * notice must appear in all copies of this file and its derivatives. * - * $Id$ + * wkspace.inl,v 1.2 1995/05/31 16:48:49 joel Exp */ #ifndef __WORKSPACE_inl @@ -67,26 +67,6 @@ STATIC INLINE void *_Workspace_Allocate( return _Heap_Allocate( &_Workspace_Area, size ); } -/*PAGE - * - * _Workspace_Allocate_or_fatal_error - * - */ - -STATIC INLINE void *_Workspace_Allocate_or_fatal_error( - unsigned32 size -) -{ - void *memory; - - memory = _Workspace_Allocate( size ); - - if ( memory == NULL ) - rtems_fatal_error_occurred( RTEMS_UNSATISFIED ); - - return memory; -} - /*PAGE * * _Workspace_Free diff --git a/cpukit/score/macros/rtems/score/chain.inl b/cpukit/score/macros/rtems/score/chain.inl index a53b3fc270..3e17c46bfa 100644 --- a/cpukit/score/macros/rtems/score/chain.inl +++ b/cpukit/score/macros/rtems/score/chain.inl @@ -11,7 +11,7 @@ * to the copyright license under the clause at DFARS 252.227-7013. This * notice must appear in all copies of this file and its derivatives. * - * $Id$ + * chain.inl,v 1.2 1995/05/31 16:48:59 joel Exp */ #ifndef __MACROS_CHAIN_h @@ -145,7 +145,7 @@ #define _Chain_Get_unprotected( _the_chain ) \ (( !_Chain_Is_empty( (_the_chain) ) ) \ - ? _Chain_Get_unprotected( (_the_chain) ) \ + ? _Chain_Get_first_unprotected( (_the_chain) ) \ : NULL) /*PAGE diff --git a/cpukit/score/macros/rtems/score/heap.inl b/cpukit/score/macros/rtems/score/heap.inl index 6f06478207..1c2b20cbec 100644 --- a/cpukit/score/macros/rtems/score/heap.inl +++ b/cpukit/score/macros/rtems/score/heap.inl @@ -11,7 +11,7 @@ * to the copyright license under the clause at DFARS 252.227-7013. This * notice must appear in all copies of this file and its derivatives. * - * $Id$ + * heap.inl,v 1.2 1995/05/31 16:49:10 joel Exp */ #ifndef __HEAP_inl @@ -44,6 +44,7 @@ ( (Heap_Block *) _Addresses_Subtract_offset( \ (void *)(_the_block), \ (_the_block)->back_flag & ~ HEAP_BLOCK_USED \ + ) \ ) /*PAGE @@ -55,6 +56,7 @@ ( (Heap_Block *) _Addresses_Add_offset( \ (void *)(_the_block), \ (_the_block)->front_flag & ~ HEAP_BLOCK_USED \ + ) \ ) /*PAGE diff --git a/cpukit/score/macros/rtems/score/object.inl b/cpukit/score/macros/rtems/score/object.inl index f4fdc39d6e..ddd311689b 100644 --- a/cpukit/score/macros/rtems/score/object.inl +++ b/cpukit/score/macros/rtems/score/object.inl @@ -11,7 +11,7 @@ * to the copyright license under the clause at DFARS 252.227-7013. This * notice must appear in all copies of this file and its derivatives. * - * $Id$ + * object.inl,v 1.2 1995/05/31 16:49:20 joel Exp */ #ifndef __OBJECTS_inl @@ -38,7 +38,6 @@ (*(_c3) = ((_name) >> 8) & 0xff; \ (*(_c4) = ((_name)) & 0xff; \ } -); /*PAGE * diff --git a/cpukit/score/macros/rtems/score/priority.inl b/cpukit/score/macros/rtems/score/priority.inl index 7ad1fd909a..380df633d7 100644 --- a/cpukit/score/macros/rtems/score/priority.inl +++ b/cpukit/score/macros/rtems/score/priority.inl @@ -11,7 +11,7 @@ * to the copyright license under the clause at DFARS 252.227-7013. This * notice must appear in all copies of this file and its derivatives. * - * $Id$ + * priority.inl,v 1.2 1995/05/31 16:49:27 joel Exp */ #ifndef __PRIORITY_inl @@ -139,6 +139,6 @@ #define _Priority_Is_group_empty ( _the_priority ) \ ( (_the_priority) == 0 ) -} + #endif /* end of include file */ diff --git a/cpukit/score/macros/rtems/score/sysstate.inl b/cpukit/score/macros/rtems/score/sysstate.inl index 5cc9f9e9f9..89c5098341 100644 --- a/cpukit/score/macros/rtems/score/sysstate.inl +++ b/cpukit/score/macros/rtems/score/sysstate.inl @@ -11,7 +11,7 @@ * to the copyright license under the clause at DFARS 252.227-7013. This * notice must appear in all copies of this file and its derivatives. * - * $Id$ + * sysstate.inl,v 1.2 1995/05/31 16:49:39 joel Exp */ #ifndef __SYSTEM_STATE_inl @@ -30,7 +30,7 @@ * _System_state_Get */ -#define _System_state_Get( void ) \ +#define _System_state_Get() \ (_System_state_Current) /*PAGE diff --git a/cpukit/score/macros/rtems/score/wkspace.inl b/cpukit/score/macros/rtems/score/wkspace.inl index 3c516bfb93..d50bc110fb 100644 --- a/cpukit/score/macros/rtems/score/wkspace.inl +++ b/cpukit/score/macros/rtems/score/wkspace.inl @@ -11,7 +11,7 @@ * to the copyright license under the clause at DFARS 252.227-7013. This * notice must appear in all copies of this file and its derivatives. * - * $Id$ + * wkspace.inl,v 1.2 1995/05/31 16:49:53 joel Exp */ #ifndef __WORKSPACE_inl @@ -64,30 +64,6 @@ #define _Workspace_Allocate( _size ) \ _Heap_Allocate( &_Workspace_Area, (_size) ) -/*PAGE - * - * _Workspace_Allocate_or_fatal_error - * - * NOTE: XXX FIX ME - * - * When not using static inlines, this should really be a function - * somewhere. - */ - -static inline void _Workspace_Allocate_or_fatal_error( - unsigned32 size -) -{ - void *memory; - - memory = _Workspace_Allocate( size ); - - if ( memory == NULL ) - rtems_fatal_error_occurred( RTEMS_UNSATISFIED ); - - return memory; -} - /*PAGE * * _Workspace_Free diff --git a/cpukit/score/src/thread.c b/cpukit/score/src/thread.c index 9c9a7691c8..0cdb224bbc 100644 --- a/cpukit/score/src/thread.c +++ b/cpukit/score/src/thread.c @@ -10,7 +10,7 @@ * to the copyright license under the clause at DFARS 252.227-7013. This * notice must appear in all copies of this file and its derivatives. * - * $Id$ + * thread.c,v 1.5 1995/07/31 22:22:38 joel Exp */ #include @@ -628,8 +628,8 @@ void _Thread_Delay_ended( void *ignored ) { - Thread_Control *the_thread; - Objects_Locations location; + Thread_Control *the_thread; + Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { @@ -791,8 +791,8 @@ boolean _Thread_Change_mode( #ifndef USE_INLINES STATIC INLINE Thread_Control *_Thread_Get ( - Objects_Id id, - unsigned32 *location + Objects_Id id, + Objects_Locations *location ) { if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { diff --git a/cpukit/score/src/wkspace.c b/cpukit/score/src/wkspace.c index 8a373dce5b..59ccbd059a 100644 --- a/cpukit/score/src/wkspace.c +++ b/cpukit/score/src/wkspace.c @@ -1,13 +1,10 @@ /* * Workspace Handler * - * JUNK + * XXX * * NOTE: * - * This file only exists to contain the one function which cannot - * be written as a macro when "static inlines" are not used. - * * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. * On-Line Applications Research Corporation (OAR). * All rights assigned to U.S. Government, 1994. @@ -16,15 +13,13 @@ * to the copyright license under the clause at DFARS 252.227-7013. This * notice must appear in all copies of this file and its derivatives. * - * $Id$ + * wkspace.c,v 1.4 1995/05/25 15:26:53 joel Exp */ #include #include #include -#ifndef USE_INLINES - /*PAGE * * _Workspace_Allocate_or_fatal_error @@ -44,6 +39,3 @@ void *_Workspace_Allocate_or_fatal_error( return memory; } - -#endif /* USE_INLINES */ - -- cgit v1.2.3