bug fixes to make macro implementations work

This commit is contained in:
Joel Sherrill
1995-08-16 19:42:41 +00:00
parent 7285a01656
commit 45819022ce
52 changed files with 101 additions and 246 deletions

View File

@@ -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$
* eventmp.h,v 1.2 1995/05/31 16:46:25 joel Exp
*/
#ifndef __RTEMS_EVENT_MP_h
@@ -34,7 +34,7 @@ extern "C" {
typedef enum {
EVENT_MP_SEND_REQUEST = 0,
EVENT_MP_SEND_RESPONSE = 1,
EVENT_MP_SEND_RESPONSE = 1
} Event_MP_Remote_operations;
/*

View File

@@ -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$
* partmp.h,v 1.2 1995/05/31 16:47:02 joel Exp
*/
#ifndef __RTEMS_PARTITION_MP_h
@@ -39,7 +39,7 @@ typedef enum {
PARTITION_MP_GET_BUFFER_REQUEST = 3,
PARTITION_MP_GET_BUFFER_RESPONSE = 4,
PARTITION_MP_RETURN_BUFFER_REQUEST = 5,
PARTITION_MP_RETURN_BUFFER_RESPONSE = 6,
PARTITION_MP_RETURN_BUFFER_RESPONSE = 6
} Partition_MP_Remote_operations;
/*

View File

@@ -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$
* regionmp.h,v 1.2 1995/05/31 16:47:09 joel Exp
*/
#ifndef __RTEMS_REGION_MP_h
@@ -39,7 +39,7 @@ typedef enum {
REGION_MP_GET_SEGMENT_REQUEST = 3,
REGION_MP_GET_SEGMENT_RESPONSE = 4,
REGION_MP_RETURN_SEGMENT_REQUEST = 5,
REGION_MP_RETURN_SEGMENT_RESPONSE = 6,
REGION_MP_RETURN_SEGMENT_RESPONSE = 6
} Region_MP_Remote_operations;
/*

View File

@@ -21,7 +21,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$
* sem.h,v 1.2 1995/05/31 16:47:13 joel Exp
*/
#ifndef __RTEMS_SEMAPHORE_h

View File

@@ -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$
* semmp.h,v 1.2 1995/05/31 16:47:15 joel Exp
*/
#ifndef __RTEMS_SEMAPHORE_MP_h
@@ -40,7 +40,7 @@ typedef enum {
SEMAPHORE_MP_OBTAIN_REQUEST = 3,
SEMAPHORE_MP_OBTAIN_RESPONSE = 4,
SEMAPHORE_MP_RELEASE_REQUEST = 5,
SEMAPHORE_MP_RELEASE_RESPONSE = 6,
SEMAPHORE_MP_RELEASE_RESPONSE = 6
} Semaphore_MP_Remote_operations;
/*

View File

@@ -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$
* signalmp.h,v 1.2 1995/05/31 16:47:18 joel Exp
*/
#ifndef __RTEMS_SIGNAL_MP_h
@@ -34,7 +34,7 @@ extern "C" {
typedef enum {
SIGNAL_MP_SEND_REQUEST = 0,
SIGNAL_MP_SEND_RESPONSE = 1,
SIGNAL_MP_SEND_RESPONSE = 1
} Signal_MP_Remote_operations;
/*

View File

@@ -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$
* taskmp.h,v 1.2 1995/05/31 16:47:30 joel Exp
*/
#ifndef __RTEMS_RTEMS_TASKS_MP_h
@@ -45,7 +45,7 @@ typedef enum {
RTEMS_TASKS_MP_GET_NOTE_REQUEST = 8,
RTEMS_TASKS_MP_GET_NOTE_RESPONSE = 9,
RTEMS_TASKS_MP_SET_NOTE_REQUEST = 10,
RTEMS_TASKS_MP_SET_NOTE_RESPONSE = 11,
RTEMS_TASKS_MP_SET_NOTE_RESPONSE = 11
} RTEMS_tasks_MP_Remote_operations;
/*

View File

@@ -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$
* eventmp.h,v 1.2 1995/05/31 16:46:25 joel Exp
*/
#ifndef __RTEMS_EVENT_MP_h
@@ -34,7 +34,7 @@ extern "C" {
typedef enum {
EVENT_MP_SEND_REQUEST = 0,
EVENT_MP_SEND_RESPONSE = 1,
EVENT_MP_SEND_RESPONSE = 1
} Event_MP_Remote_operations;
/*

View File

@@ -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$
* partmp.h,v 1.2 1995/05/31 16:47:02 joel Exp
*/
#ifndef __RTEMS_PARTITION_MP_h
@@ -39,7 +39,7 @@ typedef enum {
PARTITION_MP_GET_BUFFER_REQUEST = 3,
PARTITION_MP_GET_BUFFER_RESPONSE = 4,
PARTITION_MP_RETURN_BUFFER_REQUEST = 5,
PARTITION_MP_RETURN_BUFFER_RESPONSE = 6,
PARTITION_MP_RETURN_BUFFER_RESPONSE = 6
} Partition_MP_Remote_operations;
/*

View File

@@ -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$
* regionmp.h,v 1.2 1995/05/31 16:47:09 joel Exp
*/
#ifndef __RTEMS_REGION_MP_h
@@ -39,7 +39,7 @@ typedef enum {
REGION_MP_GET_SEGMENT_REQUEST = 3,
REGION_MP_GET_SEGMENT_RESPONSE = 4,
REGION_MP_RETURN_SEGMENT_REQUEST = 5,
REGION_MP_RETURN_SEGMENT_RESPONSE = 6,
REGION_MP_RETURN_SEGMENT_RESPONSE = 6
} Region_MP_Remote_operations;
/*

View File

@@ -21,7 +21,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$
* sem.h,v 1.2 1995/05/31 16:47:13 joel Exp
*/
#ifndef __RTEMS_SEMAPHORE_h

View File

@@ -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$
* semmp.h,v 1.2 1995/05/31 16:47:15 joel Exp
*/
#ifndef __RTEMS_SEMAPHORE_MP_h
@@ -40,7 +40,7 @@ typedef enum {
SEMAPHORE_MP_OBTAIN_REQUEST = 3,
SEMAPHORE_MP_OBTAIN_RESPONSE = 4,
SEMAPHORE_MP_RELEASE_REQUEST = 5,
SEMAPHORE_MP_RELEASE_RESPONSE = 6,
SEMAPHORE_MP_RELEASE_RESPONSE = 6
} Semaphore_MP_Remote_operations;
/*

View File

@@ -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$
* signalmp.h,v 1.2 1995/05/31 16:47:18 joel Exp
*/
#ifndef __RTEMS_SIGNAL_MP_h
@@ -34,7 +34,7 @@ extern "C" {
typedef enum {
SIGNAL_MP_SEND_REQUEST = 0,
SIGNAL_MP_SEND_RESPONSE = 1,
SIGNAL_MP_SEND_RESPONSE = 1
} Signal_MP_Remote_operations;
/*

View File

@@ -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$
* taskmp.h,v 1.2 1995/05/31 16:47:30 joel Exp
*/
#ifndef __RTEMS_RTEMS_TASKS_MP_h
@@ -45,7 +45,7 @@ typedef enum {
RTEMS_TASKS_MP_GET_NOTE_REQUEST = 8,
RTEMS_TASKS_MP_GET_NOTE_RESPONSE = 9,
RTEMS_TASKS_MP_SET_NOTE_REQUEST = 10,
RTEMS_TASKS_MP_SET_NOTE_RESPONSE = 11,
RTEMS_TASKS_MP_SET_NOTE_RESPONSE = 11
} RTEMS_tasks_MP_Remote_operations;
/*

View File

@@ -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;
/*

View File

@@ -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
);

View File

@@ -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;
/*

View File

@@ -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
);

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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
*

View File

@@ -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 */

View File

@@ -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

View File

@@ -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

View File

@@ -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
*

View File

@@ -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 */

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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 <rtems/system.h>
@@ -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 ) ) {

View File

@@ -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 <rtems/system.h>
#include <rtems/wkspace.h>
#include <rtems/fatal.h>
#ifndef USE_INLINES
/*PAGE
*
* _Workspace_Allocate_or_fatal_error
@@ -44,6 +39,3 @@ void *_Workspace_Allocate_or_fatal_error(
return memory;
}
#endif /* USE_INLINES */