Remove stray white spaces.

This commit is contained in:
Ralf Corsepius
2004-04-17 13:32:13 +00:00
parent 3b2c47300a
commit 05279b84b4
74 changed files with 378 additions and 378 deletions

View File

@@ -70,11 +70,11 @@ void rtems_debug_enable (
* *
* This routine disables the specified types of debug checks. * This routine disables the specified types of debug checks.
*/ */
void rtems_debug_disable ( void rtems_debug_disable (
rtems_debug_control to_be_disabled rtems_debug_control to_be_disabled
); );
/* /*
* *
* _Debug_Is_enabled * _Debug_Is_enabled

View File

@@ -23,13 +23,13 @@
* The control structure which defines the points at which an API * The control structure which defines the points at which an API
* can add an extension to the system initialization thread. * can add an extension to the system initialization thread.
*/ */
typedef void (*API_extensions_Predriver_hook)(void); typedef void (*API_extensions_Predriver_hook)(void);
typedef void (*API_extensions_Postdriver_hook)(void); typedef void (*API_extensions_Postdriver_hook)(void);
typedef void (*API_extensions_Postswitch_hook)( typedef void (*API_extensions_Postswitch_hook)(
Thread_Control * Thread_Control *
); );
typedef struct { typedef struct {
Chain_Node Node; Chain_Node Node;
@@ -41,7 +41,7 @@ typedef struct {
/* /*
* This is the list of API extensions to the system initialization. * This is the list of API extensions to the system initialization.
*/ */
SCORE_EXTERN Chain_Control _API_extensions_List; SCORE_EXTERN Chain_Control _API_extensions_List;
/* /*
@@ -52,9 +52,9 @@ SCORE_EXTERN Chain_Control _API_extensions_List;
* This routine initializes the API extension handler. * This routine initializes the API extension handler.
* *
*/ */
void _API_extensions_Initialization( void ); void _API_extensions_Initialization( void );
/* /*
* _API_extensions_Add * _API_extensions_Add
* *
@@ -62,7 +62,7 @@ void _API_extensions_Initialization( void );
* *
* XXX * XXX
*/ */
void _API_extensions_Add( void _API_extensions_Add(
API_extensions_Control *the_extension API_extensions_Control *the_extension
); );
@@ -74,7 +74,7 @@ void _API_extensions_Add(
* *
* XXX * XXX
*/ */
void _API_extensions_Run_predriver( void ); void _API_extensions_Run_predriver( void );
/* /*

View File

@@ -109,7 +109,7 @@ SCORE_EXTERN Objects_Information _API_Mutex_Information;
_CORE_mutex_Seize( \ _CORE_mutex_Seize( \
&(_the_mutex)->Mutex, (_the_mutex)->Object.id, TRUE, 0, (_level) ); \ &(_the_mutex)->Mutex, (_the_mutex)->Object.id, TRUE, 0, (_level) ); \
} while (0) } while (0)
/* /*
* _API_Mutex_Unlock * _API_Mutex_Unlock
* *

View File

@@ -61,7 +61,7 @@ const unsigned char __log2table[256] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}; };
#endif #endif
#endif #endif
#if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE ) #if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE )

View File

@@ -85,7 +85,7 @@ void _Chain_Initialize(
/* /*
* _Chain_Get_first_unprotected * _Chain_Get_first_unprotected
*/ */
#ifndef RTEMS_INLINES #ifndef RTEMS_INLINES
Chain_Node *_Chain_Get_first_unprotected( Chain_Node *_Chain_Get_first_unprotected(
Chain_Control *the_chain Chain_Control *the_chain

View File

@@ -12,10 +12,10 @@
* *
* $Id$ * $Id$
*/ */
#ifndef __RTEMS_CORE_MESSAGE_QUEUE_h #ifndef __RTEMS_CORE_MESSAGE_QUEUE_h
#define __RTEMS_CORE_MESSAGE_QUEUE_h #define __RTEMS_CORE_MESSAGE_QUEUE_h
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@@ -25,12 +25,12 @@ extern "C" {
#include <rtems/score/threadq.h> #include <rtems/score/threadq.h>
#include <rtems/score/priority.h> #include <rtems/score/priority.h>
#include <rtems/score/watchdog.h> #include <rtems/score/watchdog.h>
/* /*
* The following type defines the callout which the API provides * The following type defines the callout which the API provides
* to support global/multiprocessor operations on message_queues. * to support global/multiprocessor operations on message_queues.
*/ */
typedef void ( *CORE_message_queue_API_mp_support_callout )( typedef void ( *CORE_message_queue_API_mp_support_callout )(
Thread_Control *, Thread_Control *,
Objects_Id Objects_Id
@@ -43,17 +43,17 @@ typedef void ( *CORE_message_queue_API_mp_support_callout )(
* NOTE: The buffer field is normally longer than a single uint32_t . * NOTE: The buffer field is normally longer than a single uint32_t .
* but since messages are variable length we just make a ptr to 1. * but since messages are variable length we just make a ptr to 1.
*/ */
typedef struct { typedef struct {
uint32_t size; uint32_t size;
uint32_t buffer[1]; uint32_t buffer[1];
} CORE_message_queue_Buffer; } CORE_message_queue_Buffer;
/* /*
* The following records define the organization of a message * The following records define the organization of a message
* buffer. * buffer.
*/ */
typedef struct { typedef struct {
Chain_Node Node; Chain_Node Node;
int priority; int priority;
@@ -81,13 +81,13 @@ typedef enum {
#define CORE_MESSAGE_QUEUE_SEND_REQUEST INT_MAX #define CORE_MESSAGE_QUEUE_SEND_REQUEST INT_MAX
#define CORE_MESSAGE_QUEUE_URGENT_REQUEST INT_MIN #define CORE_MESSAGE_QUEUE_URGENT_REQUEST INT_MIN
typedef int CORE_message_queue_Submit_types; typedef int CORE_message_queue_Submit_types;
/* /*
* Core Message queue handler return statuses. * Core Message queue handler return statuses.
*/ */
typedef enum { typedef enum {
CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL, CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL,
CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE, CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE,
@@ -107,7 +107,7 @@ typedef enum {
typedef struct { typedef struct {
CORE_message_queue_Disciplines discipline; CORE_message_queue_Disciplines discipline;
} CORE_message_queue_Attributes; } CORE_message_queue_Attributes;
/* /*
* The following defines the type for a Notification handler. A notification * The following defines the type for a Notification handler. A notification
* handler is invoked when the message queue makes a 0->1 transition on * handler is invoked when the message queue makes a 0->1 transition on
@@ -120,7 +120,7 @@ typedef void (*CORE_message_queue_Notify_Handler)( void * );
* The following defines the control block used to manage each * The following defines the control block used to manage each
* counting message_queue. * counting message_queue.
*/ */
typedef struct { typedef struct {
Thread_queue_Control Wait_queue; Thread_queue_Control Wait_queue;
CORE_message_queue_Attributes Attributes; CORE_message_queue_Attributes Attributes;
@@ -148,7 +148,7 @@ boolean _CORE_message_queue_Initialize(
uint32_t maximum_pending_messages, uint32_t maximum_pending_messages,
uint32_t maximum_message_size uint32_t maximum_message_size
); );
/* /*
* _CORE_message_queue_Close * _CORE_message_queue_Close
* *
@@ -157,7 +157,7 @@ boolean _CORE_message_queue_Initialize(
* This function closes a message by returning all allocated space and * This function closes a message by returning all allocated space and
* flushing the message_queue's task wait queue. * flushing the message_queue's task wait queue.
*/ */
void _CORE_message_queue_Close( void _CORE_message_queue_Close(
CORE_message_queue_Control *the_message_queue, CORE_message_queue_Control *the_message_queue,
Thread_queue_Flush_callout remote_extract_callout, Thread_queue_Flush_callout remote_extract_callout,
@@ -186,11 +186,11 @@ uint32_t _CORE_message_queue_Flush(
* This routine flushes all outstanding messages and returns * This routine flushes all outstanding messages and returns
* them to the inactive message chain. * them to the inactive message chain.
*/ */
uint32_t _CORE_message_queue_Flush_support( uint32_t _CORE_message_queue_Flush_support(
CORE_message_queue_Control *the_message_queue CORE_message_queue_Control *the_message_queue
); );
/* /*
* _CORE_message_queue_Flush_waiting_threads * _CORE_message_queue_Flush_waiting_threads
* *
@@ -214,7 +214,7 @@ void _CORE_message_queue_Flush_waiting_threads(
* returns the number of threads made ready by the message. * returns the number of threads made ready by the message.
* *
*/ */
CORE_message_queue_Status _CORE_message_queue_Broadcast( CORE_message_queue_Status _CORE_message_queue_Broadcast(
CORE_message_queue_Control *the_message_queue, CORE_message_queue_Control *the_message_queue,
void *buffer, void *buffer,
@@ -237,7 +237,7 @@ CORE_message_queue_Status _CORE_message_queue_Broadcast(
* at the front of the queue. * at the front of the queue.
* *
*/ */
CORE_message_queue_Status _CORE_message_queue_Submit( CORE_message_queue_Status _CORE_message_queue_Submit(
CORE_message_queue_Control *the_message_queue, CORE_message_queue_Control *the_message_queue,
void *buffer, void *buffer,
@@ -261,7 +261,7 @@ CORE_message_queue_Status _CORE_message_queue_Submit(
* *
* NOTE: Returns message priority via return are in TCB. * NOTE: Returns message priority via return are in TCB.
*/ */
void _CORE_message_queue_Seize( void _CORE_message_queue_Seize(
CORE_message_queue_Control *the_message_queue, CORE_message_queue_Control *the_message_queue,
Objects_Id id, Objects_Id id,
@@ -294,6 +294,6 @@ void _CORE_message_queue_Insert_message(
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
/* end of include file */ /* end of include file */

View File

@@ -14,10 +14,10 @@
* *
* $Id$ * $Id$
*/ */
#ifndef __RTEMS_CORE_MUTEX_h #ifndef __RTEMS_CORE_MUTEX_h
#define __RTEMS_CORE_MUTEX_h #define __RTEMS_CORE_MUTEX_h
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@@ -28,12 +28,12 @@ extern "C" {
#include <rtems/score/watchdog.h> #include <rtems/score/watchdog.h>
#include <rtems/score/interr.h> #include <rtems/score/interr.h>
#include <rtems/score/sysstate.h> #include <rtems/score/sysstate.h>
/* /*
* The following type defines the callout which the API provides * The following type defines the callout which the API provides
* to support global/multiprocessor operations on mutexes. * to support global/multiprocessor operations on mutexes.
*/ */
typedef void ( *CORE_mutex_API_mp_support_callout )( typedef void ( *CORE_mutex_API_mp_support_callout )(
Thread_Control *, Thread_Control *,
Objects_Id Objects_Id
@@ -53,7 +53,7 @@ typedef enum {
/* /*
* Mutex handler return statuses. * Mutex handler return statuses.
*/ */
typedef enum { typedef enum {
CORE_MUTEX_STATUS_SUCCESSFUL, CORE_MUTEX_STATUS_SUCCESSFUL,
CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT,
@@ -92,7 +92,7 @@ typedef enum {
CORE_MUTEX_NESTING_IS_ERROR, CORE_MUTEX_NESTING_IS_ERROR,
CORE_MUTEX_NESTING_BLOCKS CORE_MUTEX_NESTING_BLOCKS
} CORE_mutex_Nesting_behaviors; } CORE_mutex_Nesting_behaviors;
/* /*
* Locked and unlocked values * Locked and unlocked values
*/ */
@@ -111,11 +111,11 @@ typedef struct {
CORE_mutex_Disciplines discipline; CORE_mutex_Disciplines discipline;
Priority_Control priority_ceiling; Priority_Control priority_ceiling;
} CORE_mutex_Attributes; } CORE_mutex_Attributes;
/* /*
* The following defines the control block used to manage each mutex. * The following defines the control block used to manage each mutex.
*/ */
typedef struct { typedef struct {
Thread_queue_Control Wait_queue; Thread_queue_Control Wait_queue;
CORE_mutex_Attributes Attributes; CORE_mutex_Attributes Attributes;
@@ -139,7 +139,7 @@ void _CORE_mutex_Initialize(
CORE_mutex_Attributes *the_mutex_attributes, CORE_mutex_Attributes *the_mutex_attributes,
uint32_t initial_lock uint32_t initial_lock
); );
/* /*
* _CORE_mutex_Seize * _CORE_mutex_Seize
* *
@@ -209,7 +209,7 @@ CORE_mutex_Status _CORE_mutex_Surrender(
Objects_Id id, Objects_Id id,
CORE_mutex_API_mp_support_callout api_mutex_mp_support CORE_mutex_API_mp_support_callout api_mutex_mp_support
); );
/* /*
* _CORE_mutex_Flush * _CORE_mutex_Flush
* *
@@ -218,19 +218,19 @@ CORE_mutex_Status _CORE_mutex_Surrender(
* This routine assists in the deletion of a mutex by flushing the associated * This routine assists in the deletion of a mutex by flushing the associated
* wait queue. * wait queue.
*/ */
void _CORE_mutex_Flush( void _CORE_mutex_Flush(
CORE_mutex_Control *the_mutex, CORE_mutex_Control *the_mutex,
Thread_queue_Flush_callout remote_extract_callout, Thread_queue_Flush_callout remote_extract_callout,
uint32_t status uint32_t status
); );
#include <rtems/score/coremutex.inl> #include <rtems/score/coremutex.inl>
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
/* end of include file */ /* end of include file */

View File

@@ -14,10 +14,10 @@
* *
* $Id$ * $Id$
*/ */
#ifndef __RTEMS_CORE_COUNTING_SEMAPHORE_h #ifndef __RTEMS_CORE_COUNTING_SEMAPHORE_h
#define __RTEMS_CORE_COUNTING_SEMAPHORE_h #define __RTEMS_CORE_COUNTING_SEMAPHORE_h
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@@ -26,12 +26,12 @@ extern "C" {
#include <rtems/score/threadq.h> #include <rtems/score/threadq.h>
#include <rtems/score/priority.h> #include <rtems/score/priority.h>
#include <rtems/score/watchdog.h> #include <rtems/score/watchdog.h>
/* /*
* The following type defines the callout which the API provides * The following type defines the callout which the API provides
* to support global/multiprocessor operations on semaphores. * to support global/multiprocessor operations on semaphores.
*/ */
typedef void ( *CORE_semaphore_API_mp_support_callout )( typedef void ( *CORE_semaphore_API_mp_support_callout )(
Thread_Control *, Thread_Control *,
Objects_Id Objects_Id
@@ -49,7 +49,7 @@ typedef enum {
/* /*
* Core Semaphore handler return statuses. * Core Semaphore handler return statuses.
*/ */
typedef enum { typedef enum {
CORE_SEMAPHORE_STATUS_SUCCESSFUL, CORE_SEMAPHORE_STATUS_SUCCESSFUL,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT,
@@ -67,12 +67,12 @@ typedef struct {
uint32_t maximum_count; uint32_t maximum_count;
CORE_semaphore_Disciplines discipline; CORE_semaphore_Disciplines discipline;
} CORE_semaphore_Attributes; } CORE_semaphore_Attributes;
/* /*
* The following defines the control block used to manage each * The following defines the control block used to manage each
* counting semaphore. * counting semaphore.
*/ */
typedef struct { typedef struct {
Thread_queue_Control Wait_queue; Thread_queue_Control Wait_queue;
CORE_semaphore_Attributes Attributes; CORE_semaphore_Attributes Attributes;
@@ -92,7 +92,7 @@ void _CORE_semaphore_Initialize(
CORE_semaphore_Attributes *the_semaphore_attributes, CORE_semaphore_Attributes *the_semaphore_attributes,
uint32_t initial_value uint32_t initial_value
); );
/* /*
* _CORE_semaphore_Seize * _CORE_semaphore_Seize
* *
@@ -110,7 +110,7 @@ void _CORE_semaphore_Seize(
boolean wait, boolean wait,
Watchdog_Interval timeout Watchdog_Interval timeout
); );
/* /*
* _CORE_semaphore_Surrender * _CORE_semaphore_Surrender
* *
@@ -126,7 +126,7 @@ CORE_semaphore_Status _CORE_semaphore_Surrender(
Objects_Id id, Objects_Id id,
CORE_semaphore_API_mp_support_callout api_semaphore_mp_support CORE_semaphore_API_mp_support_callout api_semaphore_mp_support
); );
/* /*
* _CORE_semaphore_Flush * _CORE_semaphore_Flush
* *
@@ -149,6 +149,6 @@ void _CORE_semaphore_Flush(
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
/* end of include file */ /* end of include file */

View File

@@ -44,7 +44,7 @@ typedef enum {
HEAP_GET_INFORMATION_SYSTEM_STATE_ERROR, HEAP_GET_INFORMATION_SYSTEM_STATE_ERROR,
HEAP_GET_INFORMATION_BLOCK_ERROR HEAP_GET_INFORMATION_BLOCK_ERROR
} Heap_Get_information_status; } Heap_Get_information_status;
/* /*
* Information block returned by _Heap_Get_information * Information block returned by _Heap_Get_information
*/ */

View File

@@ -60,7 +60,7 @@ typedef enum {
/* /*
* This type holds the fatal error information. * This type holds the fatal error information.
*/ */
typedef struct { typedef struct {
Internal_errors_Source the_source; Internal_errors_Source the_source;
boolean is_internal; boolean is_internal;

View File

@@ -60,7 +60,7 @@ typedef ISR_Handler ( *ISR_Handler_entry )(
* the current CPU being used. This is usually the number of distinct vectors * the current CPU being used. This is usually the number of distinct vectors
* the cpu can vector. * the cpu can vector.
*/ */
#define ISR_NUMBER_OF_VECTORS CPU_INTERRUPT_NUMBER_OF_VECTORS #define ISR_NUMBER_OF_VECTORS CPU_INTERRUPT_NUMBER_OF_VECTORS
/* /*
@@ -166,10 +166,10 @@ void _ISR_Handler_initialization ( void );
* *
* This routine returns the current interrupt level. * This routine returns the current interrupt level.
*/ */
#define _ISR_Get_level() \ #define _ISR_Get_level() \
_CPU_ISR_Get_level() _CPU_ISR_Get_level()
/* /*
* _ISR_Set_level * _ISR_Set_level
* *

View File

@@ -32,7 +32,7 @@ extern "C" {
* The following constants define the stack size requirements for * The following constants define the stack size requirements for
* the system threads. * the system threads.
*/ */
#define MPCI_RECEIVE_SERVER_STACK_SIZE \ #define MPCI_RECEIVE_SERVER_STACK_SIZE \
( STACK_MINIMUM_SIZE + \ ( STACK_MINIMUM_SIZE + \
CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK + \ CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK + \
@@ -100,21 +100,21 @@ typedef struct {
*/ */
typedef void (*MPCI_Packet_processor)( MP_packet_Prefix * ); typedef void (*MPCI_Packet_processor)( MP_packet_Prefix * );
/* /*
* The following enumerated type defines the list of * The following enumerated type defines the list of
* internal MP operations. * internal MP operations.
*/ */
typedef enum { typedef enum {
MPCI_PACKETS_SYSTEM_VERIFY = 0 MPCI_PACKETS_SYSTEM_VERIFY = 0
} MPCI_Internal_Remote_operations; } MPCI_Internal_Remote_operations;
/* /*
* The following data structure defines the packet used to perform * The following data structure defines the packet used to perform
* remote event operations. * remote event operations.
*/ */
typedef struct { typedef struct {
MP_packet_Prefix Prefix; MP_packet_Prefix Prefix;
MPCI_Internal_Remote_operations operation; MPCI_Internal_Remote_operations operation;
@@ -138,13 +138,13 @@ SCORE_EXTERN Thread_queue_Control _MPCI_Remote_blocked_threads;
* The following define the internal pointers to the user's * The following define the internal pointers to the user's
* configuration information. * configuration information.
*/ */
SCORE_EXTERN MPCI_Control *_MPCI_table; SCORE_EXTERN MPCI_Control *_MPCI_table;
/* /*
* The following points to the MPCI Receive Server. * The following points to the MPCI Receive Server.
*/ */
SCORE_EXTERN Thread_Control *_MPCI_Receive_server_tcb; SCORE_EXTERN Thread_Control *_MPCI_Receive_server_tcb;
/* /*
@@ -197,13 +197,13 @@ void _MPCI_Initialization ( void );
* This routine registers the MPCI packet processor for the * This routine registers the MPCI packet processor for the
* designated object class. * designated object class.
*/ */
void _MPCI_Register_packet_processor( void _MPCI_Register_packet_processor(
MP_packet_Classes the_class, MP_packet_Classes the_class,
MPCI_Packet_processor the_packet_processor MPCI_Packet_processor the_packet_processor
); );
/* /*
* _MPCI_Get_packet * _MPCI_Get_packet
* *
@@ -300,7 +300,7 @@ Thread_Control *_MPCI_Process_response (
* _MPCI_Receive_server * _MPCI_Receive_server
* *
*/ */
Thread _MPCI_Receive_server( Thread _MPCI_Receive_server(
uint32_t ignored uint32_t ignored
); );
@@ -313,7 +313,7 @@ Thread _MPCI_Receive_server(
* *
* XXX * XXX
*/ */
void _MPCI_Announce ( void ); void _MPCI_Announce ( void );
/* /*
@@ -324,11 +324,11 @@ void _MPCI_Announce ( void );
* This routine performs a remote procedure call so that a * This routine performs a remote procedure call so that a
* process operation can be performed on another node. * process operation can be performed on another node.
*/ */
void _MPCI_Internal_packets_Send_process_packet ( void _MPCI_Internal_packets_Send_process_packet (
MPCI_Internal_Remote_operations operation MPCI_Internal_Remote_operations operation
); );
/* /*
* _MPCI_Internal_packets_Send_request_packet * _MPCI_Internal_packets_Send_request_packet
* *
@@ -340,7 +340,7 @@ void _MPCI_Internal_packets_Send_process_packet (
* This routine is not needed since there are no request * This routine is not needed since there are no request
* packets to be sent by this manager. * packets to be sent by this manager.
*/ */
/* /*
* _MPCI_Internal_packets_Send_response_packet * _MPCI_Internal_packets_Send_response_packet
* *
@@ -352,7 +352,7 @@ void _MPCI_Internal_packets_Send_process_packet (
* This routine is not needed since there are no response * This routine is not needed since there are no response
* packets to be sent by this manager. * packets to be sent by this manager.
*/ */
/* /*
* *
* _MPCI_Internal_packets_Process_packet * _MPCI_Internal_packets_Process_packet
@@ -362,11 +362,11 @@ void _MPCI_Internal_packets_Send_process_packet (
* This routine performs the actions specific to this package for * This routine performs the actions specific to this package for
* the request from another node. * the request from another node.
*/ */
void _MPCI_Internal_packets_Process_packet ( void _MPCI_Internal_packets_Process_packet (
MP_packet_Prefix *the_packet_prefix MP_packet_Prefix *the_packet_prefix
); );
/* /*
* _MPCI_Internal_packets_Send_object_was_deleted * _MPCI_Internal_packets_Send_object_was_deleted
* *
@@ -379,7 +379,7 @@ void _MPCI_Internal_packets_Process_packet (
* This routine is not needed since there are no objects * This routine is not needed since there are no objects
* deleted by this manager. * deleted by this manager.
*/ */
/* /*
* _MPCI_Internal_packets_Send_extract_proxy * _MPCI_Internal_packets_Send_extract_proxy
* *
@@ -392,7 +392,7 @@ void _MPCI_Internal_packets_Process_packet (
* This routine is not needed since there are no objects * This routine is not needed since there are no objects
* deleted by this manager. * deleted by this manager.
*/ */
/* /*
* _MPCI_Internal_packets_Get_packet * _MPCI_Internal_packets_Get_packet
* *
@@ -400,7 +400,7 @@ void _MPCI_Internal_packets_Process_packet (
* *
* This routine is used to obtain a internal threads mp packet. * This routine is used to obtain a internal threads mp packet.
*/ */
MPCI_Internal_packet *_MPCI_Internal_packets_Get_packet ( void ); MPCI_Internal_packet *_MPCI_Internal_packets_Get_packet ( void );
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -377,7 +377,7 @@ void _Objects_Free(
* *
* This method zeroes out the name. * This method zeroes out the name.
*/ */
void _Objects_Clear_name( void _Objects_Clear_name(
void *name, void *name,
uint32_t length uint32_t length

View File

@@ -55,7 +55,7 @@ void _Objects_MP_Handler_initialization (
* This routine place the specified global object in the * This routine place the specified global object in the
* specified information table. * specified information table.
*/ */
void _Objects_MP_Open ( void _Objects_MP_Open (
Objects_Information *information, Objects_Information *information,
Objects_MP_Control *the_global_object, Objects_MP_Control *the_global_object,

View File

@@ -73,17 +73,17 @@ SCORE_EXTERN Priority_Bit_map_control
* *
* These may simply be pass throughs to CPU dependent routines. * These may simply be pass throughs to CPU dependent routines.
*/ */
#if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE ) #if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE )
#define _Priority_Mask( _bit_number ) \ #define _Priority_Mask( _bit_number ) \
_CPU_Priority_Mask( _bit_number ) _CPU_Priority_Mask( _bit_number )
#define _Priority_Bits_index( _priority ) \ #define _Priority_Bits_index( _priority ) \
_CPU_Priority_bits_index( _priority ) _CPU_Priority_bits_index( _priority )
#endif #endif
#ifndef __RTEMS_APPLICATION__ #ifndef __RTEMS_APPLICATION__
#include <rtems/score/priority.inl> #include <rtems/score/priority.inl>
#endif #endif

View File

@@ -43,7 +43,7 @@ typedef enum {
* The following variable indicates whether or not this is * The following variable indicates whether or not this is
* an multiprocessing system. * an multiprocessing system.
*/ */
SCORE_EXTERN boolean _System_state_Is_multiprocessing; SCORE_EXTERN boolean _System_state_Is_multiprocessing;
/* /*

View File

@@ -231,19 +231,19 @@ struct Thread_Control_struct {
*/ */
SCORE_EXTERN void *rtems_ada_self; SCORE_EXTERN void *rtems_ada_self;
/* /*
* The following defines the information control block used to * The following defines the information control block used to
* manage this class of objects. * manage this class of objects.
*/ */
SCORE_EXTERN Objects_Information _Thread_Internal_information; SCORE_EXTERN Objects_Information _Thread_Internal_information;
/* /*
* The following define the thread control pointers used to access * The following define the thread control pointers used to access
* and manipulate the idle thread. * and manipulate the idle thread.
*/ */
SCORE_EXTERN Thread_Control *_Thread_Idle; SCORE_EXTERN Thread_Control *_Thread_Idle;
/* /*
@@ -253,9 +253,9 @@ SCORE_EXTERN Thread_Control *_Thread_Idle;
* control of the processor can be returned to the environment * control of the processor can be returned to the environment
* which initiated the system. * which initiated the system.
*/ */
SCORE_EXTERN Context_Control _Thread_BSP_context; SCORE_EXTERN Context_Control _Thread_BSP_context;
/* /*
* The following declares the dispatch critical section nesting * The following declares the dispatch critical section nesting
* counter which is used to prevent context switches at inopportune * counter which is used to prevent context switches at inopportune
@@ -348,7 +348,7 @@ void _Thread_Handler_initialization (
* *
* WARNING!! No thread should be created before this one. * WARNING!! No thread should be created before this one.
*/ */
void _Thread_Create_idle( void ); void _Thread_Create_idle( void );
/* /*
@@ -453,7 +453,7 @@ boolean _Thread_Initialize(
* and makes it ready to execute. After this routine executes, the * and makes it ready to execute. After this routine executes, the
* thread competes with all other threads for CPU time. * thread competes with all other threads for CPU time.
*/ */
boolean _Thread_Start( boolean _Thread_Start(
Thread_Control *the_thread, Thread_Control *the_thread,
Thread_Start_types the_prototype, Thread_Start_types the_prototype,
@@ -471,9 +471,9 @@ boolean _Thread_Start(
* next time this thread executes, it will begin execution at its * next time this thread executes, it will begin execution at its
* original starting point. * original starting point.
*/ */
/* XXX multiple task arg profiles */ /* XXX multiple task arg profiles */
boolean _Thread_Restart( boolean _Thread_Restart(
Thread_Control *the_thread, Thread_Control *the_thread,
void *pointer_argument, void *pointer_argument,
@@ -488,7 +488,7 @@ boolean _Thread_Restart(
* This routine resets a thread to its initial state but does * This routine resets a thread to its initial state but does
* not restart it. * not restart it.
*/ */
void _Thread_Reset( void _Thread_Reset(
Thread_Control *the_thread, Thread_Control *the_thread,
void *pointer_argument, void *pointer_argument,
@@ -504,7 +504,7 @@ void _Thread_Reset(
* thread and removes it from the local object table so no further * thread and removes it from the local object table so no further
* operations on this thread are allowed. * operations on this thread are allowed.
*/ */
void _Thread_Close( void _Thread_Close(
Objects_Information *information, Objects_Information *information,
Thread_Control *the_thread Thread_Control *the_thread
@@ -740,7 +740,7 @@ boolean _Thread_Evaluate_mode( void );
* NOTE: If we are not using static inlines, this must be a real * NOTE: If we are not using static inlines, this must be a real
* subroutine call. * subroutine call.
*/ */
#ifndef RTEMS_INLINES #ifndef RTEMS_INLINES
Thread_Control *_Thread_Get ( Thread_Control *_Thread_Get (
Objects_Id id, Objects_Id id,
@@ -755,7 +755,7 @@ Thread_Control *_Thread_Get (
* *
* This routine is the body of the system idle thread. * This routine is the body of the system idle thread.
*/ */
#if (CPU_PROVIDES_IDLE_THREAD_BODY == FALSE) #if (CPU_PROVIDES_IDLE_THREAD_BODY == FALSE)
Thread _Thread_Idle_body( Thread _Thread_Idle_body(
uint32_t ignored uint32_t ignored
@@ -770,7 +770,7 @@ Thread _Thread_Idle_body(
* This routine iterates over all threads regardless of API and * This routine iterates over all threads regardless of API and
* invokes the specified routine. * invokes the specified routine.
*/ */
typedef void (*rtems_per_thread_routine)( Thread_Control * ); typedef void (*rtems_per_thread_routine)( Thread_Control * );
void rtems_iterate_over_all_threads( void rtems_iterate_over_all_threads(

View File

@@ -29,7 +29,7 @@ extern "C" {
/* /*
* Constant for indefinite wait. * Constant for indefinite wait.
*/ */
#define THREAD_QUEUE_WAIT_FOREVER WATCHDOG_NO_TIMEOUT #define THREAD_QUEUE_WAIT_FOREVER WATCHDOG_NO_TIMEOUT
/* /*
@@ -46,7 +46,7 @@ typedef void ( *Thread_queue_Flush_callout )(
* is extracted from a remote thread queue (i.e. it's proxy must * is extracted from a remote thread queue (i.e. it's proxy must
* extracted from the remote queue). * extracted from the remote queue).
*/ */
#if 0 #if 0
typedef void ( *Thread_queue_Extract_callout )( typedef void ( *Thread_queue_Extract_callout )(
Thread_Control * Thread_Control *
@@ -108,7 +108,7 @@ void _Thread_queue_Extract(
* and ensures that if there is a proxy for this task on * and ensures that if there is a proxy for this task on
* another node, it is also dealt with. * another node, it is also dealt with.
*/ */
boolean _Thread_queue_Extract_with_proxy( boolean _Thread_queue_Extract_with_proxy(
Thread_Control *the_thread Thread_Control *the_thread
); );

View File

@@ -38,7 +38,7 @@ typedef enum {
* The following enumerated types indicate what happened while the thread * The following enumerated types indicate what happened while the thread
* queue was in the synchronization window. * queue was in the synchronization window.
*/ */
typedef enum { typedef enum {
THREAD_QUEUE_SYNCHRONIZED, THREAD_QUEUE_SYNCHRONIZED,
THREAD_QUEUE_NOTHING_HAPPENED, THREAD_QUEUE_NOTHING_HAPPENED,

View File

@@ -31,54 +31,54 @@ extern "C" {
* are invoked at critical points in the life of each thread and * are invoked at critical points in the life of each thread and
* the system as a whole. * the system as a whole.
*/ */
typedef void User_extensions_routine; typedef void User_extensions_routine;
typedef boolean ( *User_extensions_thread_create_extension )( typedef boolean ( *User_extensions_thread_create_extension )(
Thread_Control *, Thread_Control *,
Thread_Control * Thread_Control *
); );
typedef User_extensions_routine ( *User_extensions_thread_delete_extension )( typedef User_extensions_routine ( *User_extensions_thread_delete_extension )(
Thread_Control *, Thread_Control *,
Thread_Control * Thread_Control *
); );
typedef User_extensions_routine ( *User_extensions_thread_start_extension )( typedef User_extensions_routine ( *User_extensions_thread_start_extension )(
Thread_Control *, Thread_Control *,
Thread_Control * Thread_Control *
); );
typedef User_extensions_routine ( *User_extensions_thread_restart_extension )( typedef User_extensions_routine ( *User_extensions_thread_restart_extension )(
Thread_Control *, Thread_Control *,
Thread_Control * Thread_Control *
); );
typedef User_extensions_routine ( *User_extensions_thread_switch_extension )( typedef User_extensions_routine ( *User_extensions_thread_switch_extension )(
Thread_Control *, Thread_Control *,
Thread_Control * Thread_Control *
); );
typedef User_extensions_routine ( typedef User_extensions_routine (
*User_extensions_thread_post_switch_extension )( *User_extensions_thread_post_switch_extension )(
Thread_Control * Thread_Control *
); );
typedef User_extensions_routine ( *User_extensions_thread_begin_extension )( typedef User_extensions_routine ( *User_extensions_thread_begin_extension )(
Thread_Control * Thread_Control *
); );
typedef User_extensions_routine ( *User_extensions_thread_exitted_extension )( typedef User_extensions_routine ( *User_extensions_thread_exitted_extension )(
Thread_Control * Thread_Control *
); );
typedef User_extensions_routine ( *User_extensions_fatal_extension )( typedef User_extensions_routine ( *User_extensions_fatal_extension )(
Internal_errors_Source /* the_source */, Internal_errors_Source /* the_source */,
boolean /* is_internal */, boolean /* is_internal */,
uint32_t /* the_error */ uint32_t /* the_error */
); );
typedef struct { typedef struct {
User_extensions_thread_create_extension thread_create; User_extensions_thread_create_extension thread_create;
User_extensions_thread_start_extension thread_start; User_extensions_thread_start_extension thread_start;

View File

@@ -38,7 +38,7 @@ SCORE_EXTERN Heap_Control _Workspace_Area; /* executive heap header */
* *
* This routine performs the initialization necessary for this handler. * This routine performs the initialization necessary for this handler.
*/ */
void _Workspace_Handler_initialization( void _Workspace_Handler_initialization(
void *starting_address, void *starting_address,
uint32_t size uint32_t size

View File

@@ -8,10 +8,10 @@
* *
* $Id$ * $Id$
*/ */
#ifndef __RTEMS_SET_ERRNO_h #ifndef __RTEMS_SET_ERRNO_h
#define __RTEMS_SET_ERRNO_h #define __RTEMS_SET_ERRNO_h
#define rtems_set_errno_and_return_minus_one( _error ) \ #define rtems_set_errno_and_return_minus_one( _error ) \
do { errno = (_error); return -1; } while(0) do { errno = (_error); return -1; } while(0)

View File

@@ -20,17 +20,17 @@
* *
* _API_extensions_Initialization * _API_extensions_Initialization
*/ */
void _API_extensions_Initialization( void ) void _API_extensions_Initialization( void )
{ {
_Chain_Initialize_empty( &_API_extensions_List ); _Chain_Initialize_empty( &_API_extensions_List );
} }
/*PAGE /*PAGE
* *
* _API_extensions_Add * _API_extensions_Add
*/ */
void _API_extensions_Add( void _API_extensions_Add(
API_extensions_Control *the_extension API_extensions_Control *the_extension
) )
@@ -47,13 +47,13 @@ void _API_extensions_Run_predriver( void )
{ {
Chain_Node *the_node; Chain_Node *the_node;
API_extensions_Control *the_extension; API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ; for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) { the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node; the_extension = (API_extensions_Control *) the_node;
if ( the_extension->predriver_hook ) if ( the_extension->predriver_hook )
(*the_extension->predriver_hook)(); (*the_extension->predriver_hook)();
} }
@@ -68,13 +68,13 @@ void _API_extensions_Run_postdriver( void )
{ {
Chain_Node *the_node; Chain_Node *the_node;
API_extensions_Control *the_extension; API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ; for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) { the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node; the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postdriver_hook ) if ( the_extension->postdriver_hook )
(*the_extension->postdriver_hook)(); (*the_extension->postdriver_hook)();
} }
@@ -89,13 +89,13 @@ void _API_extensions_Run_postswitch( void )
{ {
Chain_Node *the_node; Chain_Node *the_node;
API_extensions_Control *the_extension; API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ; for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) { the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node; the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postswitch_hook ) if ( the_extension->postswitch_hook )
(*the_extension->postswitch_hook)( _Thread_Executing ); (*the_extension->postswitch_hook)( _Thread_Executing );
} }

View File

@@ -62,35 +62,35 @@ boolean _CORE_message_queue_Initialize(
the_message_queue->number_of_pending_messages = 0; the_message_queue->number_of_pending_messages = 0;
the_message_queue->maximum_message_size = maximum_message_size; the_message_queue->maximum_message_size = maximum_message_size;
_CORE_message_queue_Set_notify( the_message_queue, NULL, NULL ); _CORE_message_queue_Set_notify( the_message_queue, NULL, NULL );
/* /*
* round size up to multiple of a ptr for chain init * round size up to multiple of a ptr for chain init
*/ */
allocated_message_size = maximum_message_size; allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t ) - 1)) { if (allocated_message_size & (sizeof(uint32_t ) - 1)) {
allocated_message_size += sizeof(uint32_t ); allocated_message_size += sizeof(uint32_t );
allocated_message_size &= ~(sizeof(uint32_t ) - 1); allocated_message_size &= ~(sizeof(uint32_t ) - 1);
} }
message_buffering_required = maximum_pending_messages * message_buffering_required = maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); (allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
the_message_queue->message_buffers = (CORE_message_queue_Buffer *) the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required ); _Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0) if (the_message_queue->message_buffers == 0)
return FALSE; return FALSE;
_Chain_Initialize ( _Chain_Initialize (
&the_message_queue->Inactive_messages, &the_message_queue->Inactive_messages,
the_message_queue->message_buffers, the_message_queue->message_buffers,
maximum_pending_messages, maximum_pending_messages,
allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
); );
_Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize( _Thread_queue_Initialize(
&the_message_queue->Wait_queue, &the_message_queue->Wait_queue,
_CORE_message_queue_Is_priority( the_message_queue_attributes ) ? _CORE_message_queue_Is_priority( the_message_queue_attributes ) ?

View File

@@ -43,7 +43,7 @@
* *
* Output parameters: NONE * Output parameters: NONE
*/ */
void _CORE_message_queue_Close( void _CORE_message_queue_Close(
CORE_message_queue_Control *the_message_queue, CORE_message_queue_Control *the_message_queue,
Thread_queue_Flush_callout remote_extract_callout, Thread_queue_Flush_callout remote_extract_callout,
@@ -67,7 +67,7 @@ void _CORE_message_queue_Close(
* we just flushed all waiting threads, we don't have to worry about * we just flushed all waiting threads, we don't have to worry about
* the flush satisfying any blocked senders as a side-effect. * the flush satisfying any blocked senders as a side-effect.
*/ */
if ( the_message_queue->number_of_pending_messages != 0 ) if ( the_message_queue->number_of_pending_messages != 0 )
(void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _CORE_message_queue_Flush_support( the_message_queue );

View File

@@ -42,7 +42,7 @@
* Output parameters: * Output parameters:
* returns - the number of messages flushed from the queue * returns - the number of messages flushed from the queue
*/ */
uint32_t _CORE_message_queue_Flush( uint32_t _CORE_message_queue_Flush(
CORE_message_queue_Control *the_message_queue CORE_message_queue_Control *the_message_queue
) )

View File

@@ -42,7 +42,7 @@
* Output parameters: * Output parameters:
* returns - the number of messages flushed from the queue * returns - the number of messages flushed from the queue
*/ */
void _CORE_message_queue_Flush_waiting_threads( void _CORE_message_queue_Flush_waiting_threads(
CORE_message_queue_Control *the_message_queue CORE_message_queue_Control *the_message_queue
) )

View File

@@ -75,7 +75,7 @@ CORE_message_queue_Status _CORE_message_queue_Submit(
/* /*
* Is there a thread currently waiting on this message queue? * Is there a thread currently waiting on this message queue?
*/ */
if ( the_message_queue->number_of_pending_messages == 0 ) { if ( the_message_queue->number_of_pending_messages == 0 ) {
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
if ( the_thread ) { if ( the_thread ) {
@@ -86,7 +86,7 @@ CORE_message_queue_Status _CORE_message_queue_Submit(
); );
*(uint32_t *)the_thread->Wait.return_argument_1 = size; *(uint32_t *)the_thread->Wait.return_argument_1 = size;
the_thread->Wait.count = submit_type; the_thread->Wait.count = submit_type;
#if defined(RTEMS_MULTIPROCESSING) #if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) ) if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id ); (*api_message_queue_mp_support) ( the_thread, id );

View File

@@ -83,9 +83,9 @@ int _CORE_mutex_Seize_interrupt_trylock(
{ {
Thread_Control *executing; Thread_Control *executing;
ISR_Level level = *level_p; ISR_Level level = *level_p;
/* disabled when you get here */ /* disabled when you get here */
executing = _Thread_Executing; executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) { if ( !_CORE_mutex_Is_locked( the_mutex ) ) {

View File

@@ -110,7 +110,7 @@ CORE_mutex_Status _CORE_mutex_Surrender(
#if defined(RTEMS_MULTIPROCESSING) #if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) ) { if ( !_Objects_Is_local_id( the_thread->Object.id ) ) {
the_mutex->holder = NULL; the_mutex->holder = NULL;
the_mutex->holder_id = the_thread->Object.id; the_mutex->holder_id = the_thread->Object.id;
the_mutex->nest_count = 1; the_mutex->nest_count = 1;

View File

@@ -40,18 +40,18 @@
* *
* Output parameters: NONE * Output parameters: NONE
*/ */
void _CORE_semaphore_Flush( void _CORE_semaphore_Flush(
CORE_semaphore_Control *the_semaphore, CORE_semaphore_Control *the_semaphore,
Thread_queue_Flush_callout remote_extract_callout, Thread_queue_Flush_callout remote_extract_callout,
uint32_t status uint32_t status
) )
{ {
_Thread_queue_Flush( _Thread_queue_Flush(
&the_semaphore->Wait_queue, &the_semaphore->Wait_queue,
remote_extract_callout, remote_extract_callout,
status status
); );
} }

View File

@@ -54,7 +54,7 @@ void *_Heap_Allocate(
excess = size % the_heap->page_size; excess = size % the_heap->page_size;
the_size = size + the_heap->page_size + HEAP_BLOCK_USED_OVERHEAD; the_size = size + the_heap->page_size + HEAP_BLOCK_USED_OVERHEAD;
if ( excess ) if ( excess )
the_size += the_heap->page_size - excess; the_size += the_heap->page_size - excess;
@@ -90,12 +90,12 @@ void *_Heap_Allocate(
the_block->previous->next = the_block->next; the_block->previous->next = the_block->next;
ptr = _Heap_Start_of_user_area( the_block ); ptr = _Heap_Start_of_user_area( the_block );
} }
/* /*
* round ptr up to a multiple of page size * round ptr up to a multiple of page size
* Have to save the bump amount in the buffer so that free can figure it out * Have to save the bump amount in the buffer so that free can figure it out
*/ */
offset = the_heap->page_size - (((uint32_t ) ptr) & (the_heap->page_size - 1)); offset = the_heap->page_size - (((uint32_t ) ptr) & (the_heap->page_size - 1));
ptr = _Addresses_Add_offset( ptr, offset ); ptr = _Addresses_Add_offset( ptr, offset );
*(((uint32_t *) ptr) - 1) = offset; *(((uint32_t *) ptr) - 1) = offset;

View File

@@ -41,7 +41,7 @@ Heap_Extend_status _Heap_Extend(
{ {
Heap_Block *the_block; Heap_Block *the_block;
uint32_t *p; uint32_t *p;
/* /*
* The overhead was taken from the original heap memory. * The overhead was taken from the original heap memory.
*/ */
@@ -106,6 +106,6 @@ Heap_Extend_status _Heap_Extend(
*p = sizeof(uint32_t ); *p = sizeof(uint32_t );
p++; p++;
_Heap_Free( the_heap, p ); _Heap_Free( the_heap, p );
return HEAP_EXTEND_SUCCESSFUL; return HEAP_EXTEND_SUCCESSFUL;
} }

View File

@@ -67,7 +67,7 @@ Heap_Get_information_status _Heap_Get_information(
} }
while (notdone) { while (notdone) {
/* /*
* Accumulate size * Accumulate size
*/ */
@@ -79,7 +79,7 @@ Heap_Get_information_status _Heap_Get_information(
the_info->used_blocks++; the_info->used_blocks++;
the_info->used_size += _Heap_Block_size(the_block); the_info->used_size += _Heap_Block_size(the_block);
} }
/* /*
* Handle the last block * Handle the last block
*/ */

View File

@@ -45,7 +45,7 @@ boolean _Heap_Size_of_user_area(
uint32_t the_size; uint32_t the_size;
the_block = _Heap_User_block_at( starting_address ); the_block = _Heap_User_block_at( starting_address );
if ( !_Heap_Is_block_in( the_heap, the_block ) || if ( !_Heap_Is_block_in( the_heap, the_block ) ||
_Heap_Is_block_free( the_block ) ) _Heap_Is_block_free( the_block ) )
return( FALSE ); return( FALSE );

View File

@@ -88,7 +88,7 @@ void _Heap_Walk(
passes++; passes++;
if (error && (passes > 10)) if (error && (passes > 10))
abort(); abort();
if (do_dump == TRUE) { if (do_dump == TRUE) {
printf("PASS: %d Block @ 0x%p Back %d, Front %d", printf("PASS: %d Block @ 0x%p Back %d, Front %d",
source, the_block, source, the_block,

View File

@@ -24,7 +24,7 @@ void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
uint32_t api_index; uint32_t api_index;
Thread_Control *the_thread; Thread_Control *the_thread;
Objects_Information *information; Objects_Information *information;
for ( api_index = 1 ; for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ; api_index <= OBJECTS_APIS_LAST ;
api_index++ ) { api_index++ ) {
@@ -34,13 +34,13 @@ void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
if ( information ) { if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) { for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ]; the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread ) if ( !the_thread )
continue; continue;
(*routine)(the_thread); (*routine)(the_thread);
} }
} }
} }
} }

View File

@@ -57,7 +57,7 @@ void _MPCI_Handler_initialization(
/* /*
* Register the MP Process Packet routine. * Register the MP Process Packet routine.
*/ */
_MPCI_Register_packet_processor( _MPCI_Register_packet_processor(
MP_PACKET_MPCI_INTERNAL, MP_PACKET_MPCI_INTERNAL,
_MPCI_Internal_packets_Process_packet _MPCI_Internal_packets_Process_packet
@@ -103,7 +103,7 @@ void _MPCI_Create_server( void )
*/ */
_MPCI_Receive_server_tcb = _Thread_Internal_allocate(); _MPCI_Receive_server_tcb = _Thread_Internal_allocate();
_Thread_Initialize( _Thread_Initialize(
&_Thread_Internal_information, &_Thread_Internal_information,
_MPCI_Receive_server_tcb, _MPCI_Receive_server_tcb,
@@ -117,7 +117,7 @@ void _MPCI_Create_server( void )
0, /* all interrupts enabled */ 0, /* all interrupts enabled */
_MPCI_Internal_name _MPCI_Internal_name
); );
_Thread_Start( _Thread_Start(
_MPCI_Receive_server_tcb, _MPCI_Receive_server_tcb,
THREAD_START_NUMERIC, THREAD_START_NUMERIC,
@@ -147,11 +147,11 @@ void _MPCI_Initialization ( void )
* This routine registers the MPCI packet processor for the * This routine registers the MPCI packet processor for the
* designated object class. * designated object class.
*/ */
void _MPCI_Register_packet_processor( void _MPCI_Register_packet_processor(
MP_packet_Classes the_class, MP_packet_Classes the_class,
MPCI_Packet_processor the_packet_processor MPCI_Packet_processor the_packet_processor
) )
{ {
_MPCI_Packet_processors[ the_class ] = the_packet_processor; _MPCI_Packet_processors[ the_class ] = the_packet_processor;
@@ -347,41 +347,41 @@ Thread _MPCI_Receive_server(
uint32_t ignored uint32_t ignored
) )
{ {
MP_packet_Prefix *the_packet; MP_packet_Prefix *the_packet;
MPCI_Packet_processor the_function; MPCI_Packet_processor the_function;
Thread_Control *executing; Thread_Control *executing;
executing = _Thread_Executing; executing = _Thread_Executing;
for ( ; ; ) { for ( ; ; ) {
executing->receive_packet = NULL; executing->receive_packet = NULL;
_Thread_Disable_dispatch(); _Thread_Disable_dispatch();
_CORE_semaphore_Seize( &_MPCI_Semaphore, 0, TRUE, WATCHDOG_NO_TIMEOUT ); _CORE_semaphore_Seize( &_MPCI_Semaphore, 0, TRUE, WATCHDOG_NO_TIMEOUT );
_Thread_Enable_dispatch(); _Thread_Enable_dispatch();
for ( ; ; ) { for ( ; ; ) {
the_packet = _MPCI_Receive_packet(); the_packet = _MPCI_Receive_packet();
if ( !the_packet ) if ( !the_packet )
break; break;
executing->receive_packet = the_packet; executing->receive_packet = the_packet;
if ( !_Mp_packet_Is_valid_packet_class ( the_packet->the_class ) ) if ( !_Mp_packet_Is_valid_packet_class ( the_packet->the_class ) )
break; break;
the_function = _MPCI_Packet_processors[ the_packet->the_class ]; the_function = _MPCI_Packet_processors[ the_packet->the_class ];
if ( !the_function ) if ( !the_function )
_Internal_error_Occurred( _Internal_error_Occurred(
INTERNAL_ERROR_CORE, INTERNAL_ERROR_CORE,
TRUE, TRUE,
INTERNAL_ERROR_BAD_PACKET INTERNAL_ERROR_BAD_PACKET
); );
(*the_function)( the_packet ); (*the_function)( the_packet );
} }
} }
@@ -394,7 +394,7 @@ Thread _MPCI_Receive_server(
* _MPCI_Announce * _MPCI_Announce
* *
*/ */
void _MPCI_Announce ( void ) void _MPCI_Announce ( void )
{ {
_Thread_Disable_dispatch(); _Thread_Disable_dispatch();
@@ -407,32 +407,32 @@ void _MPCI_Announce ( void )
* _MPCI_Internal_packets_Send_process_packet * _MPCI_Internal_packets_Send_process_packet
* *
*/ */
void _MPCI_Internal_packets_Send_process_packet ( void _MPCI_Internal_packets_Send_process_packet (
MPCI_Internal_Remote_operations operation MPCI_Internal_Remote_operations operation
) )
{ {
MPCI_Internal_packet *the_packet; MPCI_Internal_packet *the_packet;
switch ( operation ) { switch ( operation ) {
case MPCI_PACKETS_SYSTEM_VERIFY: case MPCI_PACKETS_SYSTEM_VERIFY:
the_packet = _MPCI_Internal_packets_Get_packet(); the_packet = _MPCI_Internal_packets_Get_packet();
the_packet->Prefix.the_class = MP_PACKET_MPCI_INTERNAL; the_packet->Prefix.the_class = MP_PACKET_MPCI_INTERNAL;
the_packet->Prefix.length = sizeof ( MPCI_Internal_packet ); the_packet->Prefix.length = sizeof ( MPCI_Internal_packet );
the_packet->Prefix.to_convert = sizeof ( MPCI_Internal_packet ); the_packet->Prefix.to_convert = sizeof ( MPCI_Internal_packet );
the_packet->operation = operation; the_packet->operation = operation;
the_packet->maximum_nodes = _Objects_Maximum_nodes; the_packet->maximum_nodes = _Objects_Maximum_nodes;
the_packet->maximum_global_objects = _Objects_MP_Maximum_global_objects; the_packet->maximum_global_objects = _Objects_MP_Maximum_global_objects;
_MPCI_Send_process_packet( MPCI_ALL_NODES, &the_packet->Prefix ); _MPCI_Send_process_packet( MPCI_ALL_NODES, &the_packet->Prefix );
break; break;
} }
} }
/*PAGE /*PAGE
* *
* _MPCI_Internal_packets_Send_request_packet * _MPCI_Internal_packets_Send_request_packet
@@ -441,7 +441,7 @@ void _MPCI_Internal_packets_Send_process_packet (
* packets to be sent by this manager. * packets to be sent by this manager.
* *
*/ */
/*PAGE /*PAGE
* *
* _MPCI_Internal_packets_Send_response_packet * _MPCI_Internal_packets_Send_response_packet
@@ -450,14 +450,14 @@ void _MPCI_Internal_packets_Send_process_packet (
* packets to be sent by this manager. * packets to be sent by this manager.
* *
*/ */
/*PAGE /*PAGE
* *
* *
* _MPCI_Internal_packets_Process_packet * _MPCI_Internal_packets_Process_packet
* *
*/ */
void _MPCI_Internal_packets_Process_packet ( void _MPCI_Internal_packets_Process_packet (
MP_packet_Prefix *the_packet_prefix MP_packet_Prefix *the_packet_prefix
) )
@@ -465,33 +465,33 @@ void _MPCI_Internal_packets_Process_packet (
MPCI_Internal_packet *the_packet; MPCI_Internal_packet *the_packet;
uint32_t maximum_nodes; uint32_t maximum_nodes;
uint32_t maximum_global_objects; uint32_t maximum_global_objects;
the_packet = (MPCI_Internal_packet *) the_packet_prefix; the_packet = (MPCI_Internal_packet *) the_packet_prefix;
switch ( the_packet->operation ) { switch ( the_packet->operation ) {
case MPCI_PACKETS_SYSTEM_VERIFY: case MPCI_PACKETS_SYSTEM_VERIFY:
maximum_nodes = the_packet->maximum_nodes; maximum_nodes = the_packet->maximum_nodes;
maximum_global_objects = the_packet->maximum_global_objects; maximum_global_objects = the_packet->maximum_global_objects;
if ( maximum_nodes != _Objects_Maximum_nodes || if ( maximum_nodes != _Objects_Maximum_nodes ||
maximum_global_objects != _Objects_MP_Maximum_global_objects ) { maximum_global_objects != _Objects_MP_Maximum_global_objects ) {
_MPCI_Return_packet( the_packet_prefix ); _MPCI_Return_packet( the_packet_prefix );
_Internal_error_Occurred( _Internal_error_Occurred(
INTERNAL_ERROR_CORE, INTERNAL_ERROR_CORE,
TRUE, TRUE,
INTERNAL_ERROR_INCONSISTENT_MP_INFORMATION INTERNAL_ERROR_INCONSISTENT_MP_INFORMATION
); );
} }
_MPCI_Return_packet( the_packet_prefix ); _MPCI_Return_packet( the_packet_prefix );
break; break;
} }
} }
/*PAGE /*PAGE
* *
* _MPCI_Internal_packets_Send_object_was_deleted * _MPCI_Internal_packets_Send_object_was_deleted
@@ -500,7 +500,7 @@ void _MPCI_Internal_packets_Process_packet (
* deleted by this manager. * deleted by this manager.
* *
*/ */
/*PAGE /*PAGE
* *
* _MPCI_Internal_packets_Send_extract_proxy * _MPCI_Internal_packets_Send_extract_proxy
@@ -509,13 +509,13 @@ void _MPCI_Internal_packets_Process_packet (
* deleted by this manager. * deleted by this manager.
* *
*/ */
/*PAGE /*PAGE
* *
* _MPCI_Internal_packets_Get_packet * _MPCI_Internal_packets_Get_packet
* *
*/ */
MPCI_Internal_packet *_MPCI_Internal_packets_Get_packet ( void ) MPCI_Internal_packet *_MPCI_Internal_packets_Get_packet ( void )
{ {
return ( (MPCI_Internal_packet *) _MPCI_Get_packet() ); return ( (MPCI_Internal_packet *) _MPCI_Get_packet() );

View File

@@ -46,23 +46,23 @@ Objects_Control *_Objects_Allocate(
* If the list is empty then we are out of objects and need to * If the list is empty then we are out of objects and need to
* extend information base. * extend information base.
*/ */
if ( !the_object ) { if ( !the_object ) {
_Objects_Extend_information( information ); _Objects_Extend_information( information );
the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
} }
if ( the_object ) { if ( the_object ) {
uint32_t block; uint32_t block;
block = _Objects_Get_index( the_object->id ) - block = _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id ); _Objects_Get_index( information->minimum_id );
block /= information->allocation_size; block /= information->allocation_size;
information->inactive_per_block[ block ]--; information->inactive_per_block[ block ]--;
information->inactive--; information->inactive--;
} }
} }
return the_object; return the_object;
} }

View File

@@ -54,13 +54,13 @@ Objects_Control *_Objects_Allocate_by_index(
* + The pointer arithmetic is probably too expensive. * + The pointer arithmetic is probably too expensive.
* + etc. * + etc.
*/ */
the_object = (Objects_Control *) _Addresses_Add_offset( the_object = (Objects_Control *) _Addresses_Add_offset(
information->object_blocks[ 0 ], information->object_blocks[ 0 ],
(sizeof_control * (index - 1)) (sizeof_control * (index - 1))
); );
_Chain_Extract( &the_object->Node ); _Chain_Extract( &the_object->Node );
return the_object; return the_object;
} }

View File

@@ -30,7 +30,7 @@
* *
* XXX * XXX
*/ */
boolean _Objects_Compare_name_raw( boolean _Objects_Compare_name_raw(
void *name_1, void *name_1,
void *name_2, void *name_2,
@@ -42,7 +42,7 @@ boolean _Objects_Compare_name_raw(
uint32_t *name_2_p = (uint32_t *) name_2; uint32_t *name_2_p = (uint32_t *) name_2;
uint32_t tmp_length = length / OBJECTS_NAME_ALIGNMENT; uint32_t tmp_length = length / OBJECTS_NAME_ALIGNMENT;
#endif #endif
if ( name_1 == name_2 ) if ( name_1 == name_2 )
return TRUE; return TRUE;
return FALSE; return FALSE;

View File

@@ -40,7 +40,7 @@
* Output parameters: * Output parameters:
* returns - TRUE on a match * returns - TRUE on a match
*/ */
boolean _Objects_Compare_name_string( boolean _Objects_Compare_name_string(
void *name_1, void *name_1,
void *name_2, void *name_2,

View File

@@ -30,7 +30,7 @@
* *
* XXX * XXX
*/ */
void _Objects_Copy_name_raw( void _Objects_Copy_name_raw(
void *source, void *source,
void *destination, void *destination,
@@ -40,7 +40,7 @@ void _Objects_Copy_name_raw(
uint32_t *source_p = (uint32_t *) source; uint32_t *source_p = (uint32_t *) source;
uint32_t *destination_p = (uint32_t *) destination; uint32_t *destination_p = (uint32_t *) destination;
uint32_t tmp_length = length / OBJECTS_NAME_ALIGNMENT; uint32_t tmp_length = length / OBJECTS_NAME_ALIGNMENT;
while ( tmp_length-- ) while ( tmp_length-- )
*destination_p++ = *source_p++; *destination_p++ = *source_p++;
} }

View File

@@ -30,7 +30,7 @@
* *
* XXX * XXX
*/ */
void _Objects_Copy_name_string( void _Objects_Copy_name_string(
void *source, void *source,
void *destination void *destination
@@ -38,7 +38,7 @@ void _Objects_Copy_name_string(
{ {
uint8_t *source_p = (uint8_t *) source; uint8_t *source_p = (uint8_t *) source;
uint8_t *destination_p = (uint8_t *) destination; uint8_t *destination_p = (uint8_t *) destination;
*destination_p = '\0'; *destination_p = '\0';
if ( source_p ) { if ( source_p ) {
do { do {

View File

@@ -59,12 +59,12 @@ void _Objects_Extend_information(
minimum_index = _Objects_Get_index( information->minimum_id ); minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index; index_base = minimum_index;
block = 0; block = 0;
if ( information->maximum < minimum_index ) if ( information->maximum < minimum_index )
block_count = 0; block_count = 0;
else { else {
block_count = information->maximum / information->allocation_size; block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) { for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) if ( information->object_blocks[ block ] == NULL )
break; break;
@@ -85,7 +85,7 @@ void _Objects_Extend_information(
Objects_Control **local_table; Objects_Control **local_table;
uint32_t maximum; uint32_t maximum;
void *old_tables; void *old_tables;
/* /*
* Growing the tables means allocating a new area, doing a copy and * Growing the tables means allocating a new area, doing a copy and
* updating the information table. * updating the information table.
@@ -109,13 +109,13 @@ void _Objects_Extend_information(
*/ */
block_count++; block_count++;
maximum = information->maximum + information->allocation_size; maximum = information->maximum + information->allocation_size;
/* /*
* Allocate the tables and break it up. * Allocate the tables and break it up.
*/ */
if ( information->auto_extend ) { if ( information->auto_extend ) {
object_blocks = (void**) object_blocks = (void**)
_Workspace_Allocate( _Workspace_Allocate(
@@ -140,28 +140,28 @@ void _Objects_Extend_information(
* Break the block into the various sections. * Break the block into the various sections.
* *
*/ */
inactive_per_block = (uint32_t *) _Addresses_Add_offset( inactive_per_block = (uint32_t *) _Addresses_Add_offset(
object_blocks, block_count * sizeof(void*) ); object_blocks, block_count * sizeof(void*) );
name_table = (Objects_Name *) _Addresses_Add_offset( name_table = (Objects_Name *) _Addresses_Add_offset(
inactive_per_block, block_count * sizeof(uint32_t ) ); inactive_per_block, block_count * sizeof(uint32_t ) );
local_table = (Objects_Control **) _Addresses_Add_offset( local_table = (Objects_Control **) _Addresses_Add_offset(
name_table, block_count * sizeof(Objects_Name *) ); name_table, block_count * sizeof(Objects_Name *) );
/* /*
* Take the block count down. Saves all the (block_count - 1) * Take the block count down. Saves all the (block_count - 1)
* in the copies. * in the copies.
*/ */
block_count--; block_count--;
if ( information->maximum > minimum_index ) { if ( information->maximum > minimum_index ) {
/* /*
* Copy each section of the table over. This has to be performed as * Copy each section of the table over. This has to be performed as
* separate parts as size of each block has changed. * separate parts as size of each block has changed.
*/ */
memcpy( object_blocks, memcpy( object_blocks,
information->object_blocks, information->object_blocks,
block_count * sizeof(void*) ); block_count * sizeof(void*) );
@@ -184,11 +184,11 @@ void _Objects_Extend_information(
local_table[ index ] = NULL; local_table[ index ] = NULL;
} }
} }
/* /*
* Initialise the new entries in the table. * Initialise the new entries in the table.
*/ */
object_blocks[block_count] = NULL; object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0; inactive_per_block[block_count] = 0;
name_table[block_count] = NULL; name_table[block_count] = NULL;
@@ -198,11 +198,11 @@ void _Objects_Extend_information(
index++ ) { index++ ) {
local_table[ index ] = NULL; local_table[ index ] = NULL;
} }
_ISR_Disable( level ); _ISR_Disable( level );
old_tables = information->object_blocks; old_tables = information->object_blocks;
information->object_blocks = object_blocks; information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block; information->inactive_per_block = inactive_per_block;
information->name_table = name_table; information->name_table = name_table;
@@ -219,10 +219,10 @@ void _Objects_Extend_information(
if ( old_tables ) if ( old_tables )
_Workspace_Free( old_tables ); _Workspace_Free( old_tables );
block_count++; block_count++;
} }
/* /*
* Allocate the name table, and the objects * Allocate the name table, and the objects
*/ */
@@ -244,7 +244,7 @@ void _Objects_Extend_information(
(information->allocation_size * information->size) (information->allocation_size * information->size)
); );
} }
name_area = (Objects_Name *) _Addresses_Add_offset( name_area = (Objects_Name *) _Addresses_Add_offset(
information->object_blocks[ block ], information->object_blocks[ block ],
(information->allocation_size * information->size) (information->allocation_size * information->size)
@@ -267,16 +267,16 @@ void _Objects_Extend_information(
*/ */
index = index_base; index = index_base;
while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) {
the_object->id = _Objects_Build_id( the_object->id = _Objects_Build_id(
information->the_api, information->the_api,
information->the_class, information->the_class,
_Objects_Local_node, _Objects_Local_node,
index index
); );
the_object->name = (void *) name_area; the_object->name = (void *) name_area;
name_area = _Addresses_Add_offset( name_area, information->name_length ); name_area = _Addresses_Add_offset( name_area, information->name_length );
@@ -285,7 +285,7 @@ void _Objects_Extend_information(
index++; index++;
} }
information->inactive_per_block[ block ] = information->allocation_size; information->inactive_per_block[ block ] = information->allocation_size;
information->inactive += information->allocation_size; information->inactive += information->allocation_size;
} }

View File

@@ -45,14 +45,14 @@ void _Objects_Free(
if ( information->auto_extend ) { if ( information->auto_extend ) {
uint32_t block; uint32_t block;
block = block =
_Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id );
block /= information->allocation_size; block /= information->allocation_size;
information->inactive_per_block[ block ]++; information->inactive_per_block[ block ]++;
information->inactive++; information->inactive++;
/* /*
* Check if the threshold level has been met of * Check if the threshold level has been met of
* 1.5 x allocation_size are free. * 1.5 x allocation_size are free.

View File

@@ -60,7 +60,7 @@ _Objects_Get_next(
{ {
Objects_Control *object; Objects_Control *object;
Objects_Id next_id; Objects_Id next_id;
if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX)
next_id = information->minimum_id; next_id = information->minimum_id;
else else
@@ -73,7 +73,7 @@ _Objects_Get_next(
*location_p = OBJECTS_ERROR; *location_p = OBJECTS_ERROR;
goto final; goto final;
} }
/* try to grab one */ /* try to grab one */
object = _Objects_Get(information, next_id, location_p); object = _Objects_Get(information, next_id, location_p);

View File

@@ -41,20 +41,20 @@ Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Information *information; Objects_Information *information;
Objects_Control *the_object = (Objects_Control *) 0; Objects_Control *the_object = (Objects_Control *) 0;
Objects_Locations ignored_location; Objects_Locations ignored_location;
if ( !name ) if ( !name )
return OBJECTS_INVALID_NAME; return OBJECTS_INVALID_NAME;
the_api = _Objects_Get_API( id ); the_api = _Objects_Get_API( id );
if ( the_api && the_api > OBJECTS_APIS_LAST ) if ( the_api && the_api > OBJECTS_APIS_LAST )
return OBJECTS_INVALID_ID; return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( id ); the_class = _Objects_Get_class( id );
information = _Objects_Information_table[ the_api ][ the_class ]; information = _Objects_Information_table[ the_api ][ the_class ];
if ( !information ) if ( !information )
return OBJECTS_INVALID_ID; return OBJECTS_INVALID_ID;
if ( information->is_string ) if ( information->is_string )
return OBJECTS_INVALID_ID; return OBJECTS_INVALID_ID;

View File

@@ -68,14 +68,14 @@ void _Objects_Initialize_information(
information->the_api = the_api; information->the_api = the_api;
information->the_class = the_class; information->the_class = the_class;
information->is_string = is_string; information->is_string = is_string;
information->local_table = 0; information->local_table = 0;
information->name_table = 0; information->name_table = 0;
information->inactive_per_block = 0; information->inactive_per_block = 0;
information->object_blocks = 0; information->object_blocks = 0;
information->inactive = 0; information->inactive = 0;
/* /*
* Set the entry in the object information table. * Set the entry in the object information table.
*/ */
@@ -87,14 +87,14 @@ void _Objects_Initialize_information(
*/ */
information->size = size; information->size = size;
/* /*
* Are we operating in unlimited, or auto-extend mode * Are we operating in unlimited, or auto-extend mode
*/ */
information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? TRUE : FALSE; information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? TRUE : FALSE;
maximum &= ~OBJECTS_UNLIMITED_OBJECTS; maximum &= ~OBJECTS_UNLIMITED_OBJECTS;
/* /*
* The allocation unit is the maximum value * The allocation unit is the maximum value
*/ */
@@ -130,7 +130,7 @@ void _Objects_Initialize_information(
information->name_length = name_length; information->name_length = name_length;
_Chain_Initialize_empty( &information->Inactive ); _Chain_Initialize_empty( &information->Inactive );
/* /*
* Initialize objects .. if there are any * Initialize objects .. if there are any
*/ */
@@ -141,17 +141,17 @@ void _Objects_Initialize_information(
* Reset the maximum value. It will be updated when the information is * Reset the maximum value. It will be updated when the information is
* extended. * extended.
*/ */
information->maximum = 0; information->maximum = 0;
/* /*
* Always have the maximum size available so the current performance * Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum * figures are create are met. If the user moves past the maximum
* number then a performance hit is taken. * number then a performance hit is taken.
*/ */
_Objects_Extend_information( information ); _Objects_Extend_information( information );
} }
/* /*

View File

@@ -53,7 +53,7 @@ void _Objects_MP_Handler_initialization (
* _Objects_MP_Open * _Objects_MP_Open
* *
*/ */
void _Objects_MP_Open ( void _Objects_MP_Open (
Objects_Information *information, Objects_Information *information,
Objects_MP_Control *the_global_object, Objects_MP_Control *the_global_object,
@@ -63,7 +63,7 @@ void _Objects_MP_Open (
{ {
the_global_object->Object.id = the_id; the_global_object->Object.id = the_id;
the_global_object->name = the_name; the_global_object->name = the_name;
_Chain_Prepend( _Chain_Prepend(
&information->global_table[ _Objects_Get_node( the_id ) ], &information->global_table[ _Objects_Get_node( the_id ) ],
&the_global_object->Object.Node &the_global_object->Object.Node

View File

@@ -56,7 +56,7 @@ void _Objects_Shrink_information(
index_base = _Objects_Get_index( information->minimum_id ); index_base = _Objects_Get_index( information->minimum_id );
block_count = ( information->maximum - index_base ) / information->allocation_size; block_count = ( information->maximum - index_base ) / information->allocation_size;
for ( block = 0; block < block_count; block++ ) { for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] == information->allocation_size ) { if ( information->inactive_per_block[ block ] == information->allocation_size ) {
@@ -64,7 +64,7 @@ void _Objects_Shrink_information(
* XXX - Not to sure how to use a chain where you need to iterate and * XXX - Not to sure how to use a chain where you need to iterate and
* and remove elements. * and remove elements.
*/ */
the_object = (Objects_Control *) information->Inactive.first; the_object = (Objects_Control *) information->Inactive.first;
/* /*
@@ -76,18 +76,18 @@ void _Objects_Shrink_information(
if ((index >= index_base) && if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) { (index < (index_base + information->allocation_size))) {
/* /*
* Get the next node before the node is extracted * Get the next node before the node is extracted
*/ */
extract_me = the_object; extract_me = the_object;
if ( !_Chain_Is_last( &the_object->Node ) ) if ( !_Chain_Is_last( &the_object->Node ) )
the_object = (Objects_Control *) the_object->Node.next; the_object = (Objects_Control *) the_object->Node.next;
else else
the_object = NULL; the_object = NULL;
_Chain_Extract( &extract_me->Node ); _Chain_Extract( &extract_me->Node );
} }
else { else {
@@ -106,10 +106,10 @@ void _Objects_Shrink_information(
information->inactive_per_block[ block ] = 0; information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size; information->inactive -= information->allocation_size;
return; return;
} }
index_base += information->allocation_size; index_base += information->allocation_size;
} }
} }

View File

@@ -87,7 +87,7 @@ void _Thread_Handler_initialization(
/* /*
* Initialize this class of objects. * Initialize this class of objects.
*/ */
_Objects_Initialize_information( _Objects_Initialize_information(
&_Thread_Internal_information, &_Thread_Internal_information,
OBJECTS_INTERNAL_API, OBJECTS_INTERNAL_API,

View File

@@ -62,7 +62,7 @@ void _Thread_Change_priority(
* change calls (e.g. rtems_task_set_priority) should always do an * change calls (e.g. rtems_task_set_priority) should always do an
* append not a prepend. * append not a prepend.
*/ */
/* /*
* Techically, the prepend should conditional on the thread lowering * Techically, the prepend should conditional on the thread lowering
* its priority but that does allow cxd2004 of the acvc 2.0.1 to * its priority but that does allow cxd2004 of the acvc 2.0.1 to
@@ -75,7 +75,7 @@ void _Thread_Change_priority(
new_priority >= the_thread->current_priority ) new_priority >= the_thread->current_priority )
prepend_it = TRUE; prepend_it = TRUE;
*/ */
_Thread_Set_transient( the_thread ); _Thread_Set_transient( the_thread );
if ( the_thread->current_priority != new_priority ) if ( the_thread->current_priority != new_priority )

View File

@@ -56,7 +56,7 @@ void _Thread_Clear_state(
_ISR_Disable( level ); _ISR_Disable( level );
current_state = the_thread->current_state; current_state = the_thread->current_state;
if ( current_state & state ) { if ( current_state & state ) {
current_state = current_state =
the_thread->current_state = _States_Clear( state, current_state ); the_thread->current_state = _States_Clear( state, current_state );

View File

@@ -35,18 +35,18 @@
* thread and removes it from the local object table so no further * thread and removes it from the local object table so no further
* operations on this thread are allowed. * operations on this thread are allowed.
*/ */
void _Thread_Close( void _Thread_Close(
Objects_Information *information, Objects_Information *information,
Thread_Control *the_thread Thread_Control *the_thread
) )
{ {
_User_extensions_Thread_delete( the_thread ); _User_extensions_Thread_delete( the_thread );
_Objects_Close( information, &the_thread->Object ); _Objects_Close( information, &the_thread->Object );
_Thread_Set_state( the_thread, STATES_TRANSIENT ); _Thread_Set_state( the_thread, STATES_TRANSIENT );
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
if ( _Watchdog_Is_active( &the_thread->Timer ) ) if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer ); (void) _Watchdog_Remove( &the_thread->Timer );

View File

@@ -43,26 +43,26 @@ void _Thread_Create_idle( void )
* fields not explicitly assigned were explicitly zeroed by * fields not explicitly assigned were explicitly zeroed by
* _Workspace_Initialization. * _Workspace_Initialization.
*/ */
_Thread_Idle = _Thread_Internal_allocate(); _Thread_Idle = _Thread_Internal_allocate();
/* /*
* Initialize the IDLE task. * Initialize the IDLE task.
*/ */
#if (CPU_PROVIDES_IDLE_THREAD_BODY == TRUE) #if (CPU_PROVIDES_IDLE_THREAD_BODY == TRUE)
idle = (void *) _CPU_Thread_Idle_body; idle = (void *) _CPU_Thread_Idle_body;
#else #else
idle = (void *) _Thread_Idle_body; idle = (void *) _Thread_Idle_body;
#endif #endif
if ( _CPU_Table.idle_task ) if ( _CPU_Table.idle_task )
idle = _CPU_Table.idle_task; idle = _CPU_Table.idle_task;
idle_task_stack_size = _CPU_Table.idle_task_stack_size; idle_task_stack_size = _CPU_Table.idle_task_stack_size;
if ( idle_task_stack_size < STACK_MINIMUM_SIZE ) if ( idle_task_stack_size < STACK_MINIMUM_SIZE )
idle_task_stack_size = STACK_MINIMUM_SIZE; idle_task_stack_size = STACK_MINIMUM_SIZE;
_Thread_Initialize( _Thread_Initialize(
&_Thread_Internal_information, &_Thread_Internal_information,
_Thread_Idle, _Thread_Idle,
@@ -76,15 +76,15 @@ void _Thread_Create_idle( void )
0, /* all interrupts enabled */ 0, /* all interrupts enabled */
(Objects_Name) _Thread_Idle_name (Objects_Name) _Thread_Idle_name
); );
/* /*
* WARNING!!! This is necessary to "kick" start the system and * WARNING!!! This is necessary to "kick" start the system and
* MUST be done before _Thread_Start is invoked. * MUST be done before _Thread_Start is invoked.
*/ */
_Thread_Heir = _Thread_Heir =
_Thread_Executing = _Thread_Idle; _Thread_Executing = _Thread_Idle;
_Thread_Start( _Thread_Start(
_Thread_Idle, _Thread_Idle,
THREAD_START_NUMERIC, THREAD_START_NUMERIC,
@@ -92,5 +92,5 @@ void _Thread_Create_idle( void )
NULL, NULL,
0 0
); );
} }

View File

@@ -137,5 +137,5 @@ void _Thread_Dispatch( void )
executing->do_post_task_switch_extension = FALSE; executing->do_post_task_switch_extension = FALSE;
_API_extensions_Run_postswitch(); _API_extensions_Run_postswitch();
} }
} }

View File

@@ -47,35 +47,35 @@ Thread_Control *_Thread_Get (
uint32_t the_class; uint32_t the_class;
Objects_Information *information; Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0; Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
_Thread_Disable_dispatch(); _Thread_Disable_dispatch();
*location = OBJECTS_LOCAL; *location = OBJECTS_LOCAL;
tp = _Thread_Executing; tp = _Thread_Executing;
goto done; goto done;
} }
the_api = _Objects_Get_API( id ); the_api = _Objects_Get_API( id );
if ( the_api && the_api > OBJECTS_APIS_LAST ) { if ( the_api && the_api > OBJECTS_APIS_LAST ) {
*location = OBJECTS_ERROR; *location = OBJECTS_ERROR;
goto done; goto done;
} }
the_class = _Objects_Get_class( id ); the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */ if ( the_class != 1 ) { /* threads are always first class :) */
*location = OBJECTS_ERROR; *location = OBJECTS_ERROR;
goto done; goto done;
} }
information = _Objects_Information_table[ the_api ][ the_class ]; information = _Objects_Information_table[ the_api ][ the_class ];
if ( !information ) { if ( !information ) {
*location = OBJECTS_ERROR; *location = OBJECTS_ERROR;
goto done; goto done;
} }
tp = (Thread_Control *) _Objects_Get( information, id, location ); tp = (Thread_Control *) _Objects_Get( information, id, location );
done: done:
return tp; return tp;
} }

View File

@@ -68,14 +68,14 @@ void _Thread_Handler( void )
#if defined(__USE__MAIN__) #if defined(__USE__MAIN__)
extern void _main(void); extern void _main(void);
#endif #endif
executing = _Thread_Executing; executing = _Thread_Executing;
/* /*
* have to put level into a register for those cpu's that use * have to put level into a register for those cpu's that use
* inline asm here * inline asm here
*/ */
level = executing->Start.isr_level; level = executing->Start.isr_level;
_ISR_Set_level(level); _ISR_Set_level(level);
@@ -100,9 +100,9 @@ void _Thread_Handler( void )
* 'switch' extensions can run. This means must keep dispatch * 'switch' extensions can run. This means must keep dispatch
* disabled until all 'begin' extensions complete. * disabled until all 'begin' extensions complete.
*/ */
_User_extensions_Thread_begin( executing ); _User_extensions_Thread_begin( executing );
/* /*
* At this point, the dispatch disable level BETTER be 1. * At this point, the dispatch disable level BETTER be 1.
*/ */
@@ -117,7 +117,7 @@ void _Thread_Handler( void )
__main (); __main ();
#endif #endif
switch ( executing->Start.prototype ) { switch ( executing->Start.prototype ) {
case THREAD_START_NUMERIC: case THREAD_START_NUMERIC:
executing->Wait.return_argument = executing->Wait.return_argument =

View File

@@ -39,7 +39,7 @@
* *
* Output parameters: NONE * Output parameters: NONE
*/ */
#if (CPU_PROVIDES_IDLE_THREAD_BODY == FALSE) #if (CPU_PROVIDES_IDLE_THREAD_BODY == FALSE)
Thread _Thread_Idle_body( Thread _Thread_Idle_body(
uint32_t ignored uint32_t ignored

View File

@@ -75,7 +75,7 @@ boolean _Thread_Initialize(
actual_stack_size = stack_size; actual_stack_size = stack_size;
actual_stack_size = _Thread_Stack_Allocate( the_thread, actual_stack_size ); actual_stack_size = _Thread_Stack_Allocate( the_thread, actual_stack_size );
if ( !actual_stack_size ) if ( !actual_stack_size )
return FALSE; /* stack allocation failed */ return FALSE; /* stack allocation failed */
@@ -96,7 +96,7 @@ boolean _Thread_Initialize(
/* /*
* Allocate the floating point area for this thread * Allocate the floating point area for this thread
*/ */
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) { if ( is_fp ) {
@@ -117,9 +117,9 @@ boolean _Thread_Initialize(
/* /*
* Clear the libc reent hook. * Clear the libc reent hook.
*/ */
the_thread->libc_reent = NULL; the_thread->libc_reent = NULL;
/* /*
* Allocate the extensions area for this thread * Allocate the extensions area for this thread
*/ */
@@ -141,7 +141,7 @@ boolean _Thread_Initialize(
} }
} else } else
extensions_area = NULL; extensions_area = NULL;
the_thread->extensions = (void **) extensions_area; the_thread->extensions = (void **) extensions_area;
/* /*
@@ -185,7 +185,7 @@ boolean _Thread_Initialize(
the_thread->real_priority = priority; the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority; the_thread->Start.initial_priority = priority;
the_thread->ticks_executed = 0; the_thread->ticks_executed = 0;
_Thread_Set_priority( the_thread, priority ); _Thread_Set_priority( the_thread, priority );
/* /*
@@ -214,5 +214,5 @@ boolean _Thread_Initialize(
} }
return TRUE; return TRUE;
} }

View File

@@ -183,18 +183,18 @@ synchronize:
* enter a thread queue critical section. * enter a thread queue critical section.
*/ */
break; break;
case THREAD_QUEUE_NOTHING_HAPPENED: case THREAD_QUEUE_NOTHING_HAPPENED:
/* /*
* This should never happen. All of this was dealt with above. * This should never happen. All of this was dealt with above.
*/ */
break; break;
case THREAD_QUEUE_TIMEOUT: case THREAD_QUEUE_TIMEOUT:
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
_ISR_Enable( level ); _ISR_Enable( level );
break; break;
case THREAD_QUEUE_SATISFIED: case THREAD_QUEUE_SATISFIED:
if ( _Watchdog_Is_active( &the_thread->Timer ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) {
_Watchdog_Deactivate( &the_thread->Timer ); _Watchdog_Deactivate( &the_thread->Timer );
@@ -204,15 +204,15 @@ synchronize:
_ISR_Enable( level ); _ISR_Enable( level );
break; break;
} }
/* /*
* Global objects with thread queue's should not be operated on from an * Global objects with thread queue's should not be operated on from an
* ISR. But the sync code still must allow short timeouts to be processed * ISR. But the sync code still must allow short timeouts to be processed
* correctly. * correctly.
*/ */
_Thread_Unblock( the_thread ); _Thread_Unblock( the_thread );
#if defined(RTEMS_MULTIPROCESSING) #if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) ) if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread ); _Thread_MP_Free_proxy( the_thread );

View File

@@ -68,5 +68,5 @@ void _Thread_queue_Extract_fifo(
if ( !_Objects_Is_local_id( the_thread->Object.id ) ) if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread ); _Thread_MP_Free_proxy( the_thread );
#endif #endif
} }

View File

@@ -31,7 +31,7 @@
* *
* XXX * XXX
*/ */
boolean _Thread_queue_Extract_with_proxy( boolean _Thread_queue_Extract_with_proxy(
Thread_Control *the_thread Thread_Control *the_thread
) )

View File

@@ -35,7 +35,7 @@
* not actually restart it. Some APIs do this in separate * not actually restart it. Some APIs do this in separate
* operations and this division helps support this. * operations and this division helps support this.
*/ */
void _Thread_Reset( void _Thread_Reset(
Thread_Control *the_thread, Thread_Control *the_thread,
void *pointer_argument, void *pointer_argument,

View File

@@ -35,7 +35,7 @@
* next time this thread executes, it will begin execution at its * next time this thread executes, it will begin execution at its
* original starting point. * original starting point.
*/ */
boolean _Thread_Restart( boolean _Thread_Restart(
Thread_Control *the_thread, Thread_Control *the_thread,
void *pointer_argument, void *pointer_argument,
@@ -43,22 +43,22 @@ boolean _Thread_Restart(
) )
{ {
if ( !_States_Is_dormant( the_thread->current_state ) ) { if ( !_States_Is_dormant( the_thread->current_state ) ) {
_Thread_Set_transient( the_thread ); _Thread_Set_transient( the_thread );
_Thread_Reset( the_thread, pointer_argument, numeric_argument ); _Thread_Reset( the_thread, pointer_argument, numeric_argument );
_Thread_Load_environment( the_thread ); _Thread_Load_environment( the_thread );
_Thread_Ready( the_thread ); _Thread_Ready( the_thread );
_User_extensions_Thread_restart( the_thread ); _User_extensions_Thread_restart( the_thread );
if ( _Thread_Is_executing ( the_thread ) ) if ( _Thread_Is_executing ( the_thread ) )
_Thread_Restart_self(); _Thread_Restart_self();
return TRUE; return TRUE;
} }
return FALSE; return FALSE;
} }

View File

@@ -57,7 +57,7 @@ void _Thread_Resume(
States_Control current_state; States_Control current_state;
_ISR_Disable( level ); _ISR_Disable( level );
if ( force == TRUE ) if ( force == TRUE )
the_thread->suspend_count = 0; the_thread->suspend_count = 0;
else else

View File

@@ -42,10 +42,10 @@ uint32_t _Thread_Stack_Allocate(
) )
{ {
void *stack_addr = 0; void *stack_addr = 0;
if ( !_Stack_Is_enough( stack_size ) ) if ( !_Stack_Is_enough( stack_size ) )
stack_size = STACK_MINIMUM_SIZE; stack_size = STACK_MINIMUM_SIZE;
/* /*
* Call ONLY the CPU table stack allocate hook, _or_ the * Call ONLY the CPU table stack allocate hook, _or_ the
* the RTEMS workspace allocate. This is so the stack free * the RTEMS workspace allocate. This is so the stack free
@@ -71,11 +71,11 @@ uint32_t _Thread_Stack_Allocate(
stack_size = _Stack_Adjust_size( stack_size ); stack_size = _Stack_Adjust_size( stack_size );
stack_addr = _Workspace_Allocate( stack_size ); stack_addr = _Workspace_Allocate( stack_size );
} }
if ( !stack_addr ) if ( !stack_addr )
stack_size = 0; stack_size = 0;
the_thread->Start.stack = stack_addr; the_thread->Start.stack = stack_addr;
return stack_size; return stack_size;
} }

View File

@@ -35,7 +35,7 @@
* and makes it ready to execute. After this routine executes, the * and makes it ready to execute. After this routine executes, the
* thread competes with all other threads for CPU time. * thread competes with all other threads for CPU time.
*/ */
boolean _Thread_Start( boolean _Thread_Start(
Thread_Control *the_thread, Thread_Control *the_thread,
Thread_Start_types the_prototype, Thread_Start_types the_prototype,
@@ -45,22 +45,22 @@ boolean _Thread_Start(
) )
{ {
if ( _States_Is_dormant( the_thread->current_state ) ) { if ( _States_Is_dormant( the_thread->current_state ) ) {
the_thread->Start.entry_point = (Thread_Entry) entry_point; the_thread->Start.entry_point = (Thread_Entry) entry_point;
the_thread->Start.prototype = the_prototype; the_thread->Start.prototype = the_prototype;
the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.pointer_argument = pointer_argument;
the_thread->Start.numeric_argument = numeric_argument; the_thread->Start.numeric_argument = numeric_argument;
_Thread_Load_environment( the_thread ); _Thread_Load_environment( the_thread );
_Thread_Ready( the_thread ); _Thread_Ready( the_thread );
_User_extensions_Thread_start( the_thread ); _User_extensions_Thread_start( the_thread );
return TRUE; return TRUE;
} }
return FALSE; return FALSE;
} }

View File

@@ -74,7 +74,7 @@ void _Thread_Start_multitasking( void )
* Ignore the CPU_USE_DEFERRED_FP_SWITCH because we must always * Ignore the CPU_USE_DEFERRED_FP_SWITCH because we must always
* switch in the first thread if it is FP. * switch in the first thread if it is FP.
*/ */
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
/* /*

View File

@@ -28,13 +28,13 @@ boolean _User_extensions_Thread_create (
Chain_Node *the_node; Chain_Node *the_node;
User_extensions_Control *the_extension; User_extensions_Control *the_extension;
boolean status; boolean status;
for ( the_node = _User_extensions_List.first ; for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) { the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node; the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) { if ( the_extension->Callouts.thread_create != NULL ) {
status = (*the_extension->Callouts.thread_create)( status = (*the_extension->Callouts.thread_create)(
_Thread_Executing, _Thread_Executing,
@@ -44,7 +44,7 @@ boolean _User_extensions_Thread_create (
return FALSE; return FALSE;
} }
} }
return TRUE; return TRUE;
} }
@@ -52,20 +52,20 @@ boolean _User_extensions_Thread_create (
* *
* _User_extensions_Thread_delete * _User_extensions_Thread_delete
*/ */
void _User_extensions_Thread_delete ( void _User_extensions_Thread_delete (
Thread_Control *the_thread Thread_Control *the_thread
) )
{ {
Chain_Node *the_node; Chain_Node *the_node;
User_extensions_Control *the_extension; User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ; for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ; !_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) { the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node; the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL ) if ( the_extension->Callouts.thread_delete != NULL )
(*the_extension->Callouts.thread_delete)( (*the_extension->Callouts.thread_delete)(
_Thread_Executing, _Thread_Executing,
@@ -73,26 +73,26 @@ void _User_extensions_Thread_delete (
); );
} }
} }
/*PAGE /*PAGE
* *
* _User_extensions_Thread_start * _User_extensions_Thread_start
* *
*/ */
void _User_extensions_Thread_start ( void _User_extensions_Thread_start (
Thread_Control *the_thread Thread_Control *the_thread
) )
{ {
Chain_Node *the_node; Chain_Node *the_node;
User_extensions_Control *the_extension; User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ; for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) { the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node; the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL ) if ( the_extension->Callouts.thread_start != NULL )
(*the_extension->Callouts.thread_start)( (*the_extension->Callouts.thread_start)(
_Thread_Executing, _Thread_Executing,
@@ -100,26 +100,26 @@ void _User_extensions_Thread_start (
); );
} }
} }
/*PAGE /*PAGE
* *
* _User_extensions_Thread_restart * _User_extensions_Thread_restart
* *
*/ */
void _User_extensions_Thread_restart ( void _User_extensions_Thread_restart (
Thread_Control *the_thread Thread_Control *the_thread
) )
{ {
Chain_Node *the_node; Chain_Node *the_node;
User_extensions_Control *the_extension; User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ; for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) { the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node; the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL ) if ( the_extension->Callouts.thread_restart != NULL )
(*the_extension->Callouts.thread_restart)( (*the_extension->Callouts.thread_restart)(
_Thread_Executing, _Thread_Executing,
@@ -127,49 +127,49 @@ void _User_extensions_Thread_restart (
); );
} }
} }
/*PAGE /*PAGE
* *
* _User_extensions_Thread_begin * _User_extensions_Thread_begin
* *
*/ */
void _User_extensions_Thread_begin ( void _User_extensions_Thread_begin (
Thread_Control *executing Thread_Control *executing
) )
{ {
Chain_Node *the_node; Chain_Node *the_node;
User_extensions_Control *the_extension; User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ; for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) { the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node; the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL ) if ( the_extension->Callouts.thread_begin != NULL )
(*the_extension->Callouts.thread_begin)( executing ); (*the_extension->Callouts.thread_begin)( executing );
} }
} }
/*PAGE /*PAGE
* *
* _User_extensions_Thread_exitted * _User_extensions_Thread_exitted
*/ */
void _User_extensions_Thread_exitted ( void _User_extensions_Thread_exitted (
Thread_Control *executing Thread_Control *executing
) )
{ {
Chain_Node *the_node; Chain_Node *the_node;
User_extensions_Control *the_extension; User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ; for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ; !_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) { the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node; the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL ) if ( the_extension->Callouts.thread_exitted != NULL )
(*the_extension->Callouts.thread_exitted)( executing ); (*the_extension->Callouts.thread_exitted)( executing );
} }
@@ -179,7 +179,7 @@ void _User_extensions_Thread_exitted (
* *
* _User_extensions_Fatal * _User_extensions_Fatal
*/ */
void _User_extensions_Fatal ( void _User_extensions_Fatal (
Internal_errors_Source the_source, Internal_errors_Source the_source,
boolean is_internal, boolean is_internal,
@@ -188,13 +188,13 @@ void _User_extensions_Fatal (
{ {
Chain_Node *the_node; Chain_Node *the_node;
User_extensions_Control *the_extension; User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ; for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ; !_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) { the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node; the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL ) if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); (*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
} }

View File

@@ -33,7 +33,7 @@ void _Watchdog_Insert(
Watchdog_Control *after; Watchdog_Control *after;
uint32_t insert_isr_nest_level; uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval; Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level; insert_isr_nest_level = _ISR_Nest_level;
the_watchdog->state = WATCHDOG_BEING_INSERTED; the_watchdog->state = WATCHDOG_BEING_INSERTED;

View File

@@ -39,7 +39,7 @@ Watchdog_States _Watchdog_Remove(
break; break;
case WATCHDOG_BEING_INSERTED: case WATCHDOG_BEING_INSERTED:
/* /*
* It is not actually on the chain so just change the state and * It is not actually on the chain so just change the state and
* the Insert operation we interrupted will be aborted. * the Insert operation we interrupted will be aborted.

View File

@@ -23,7 +23,7 @@
* *
* _Workspace_Handler_initialization * _Workspace_Handler_initialization
*/ */
void _Workspace_Handler_initialization( void _Workspace_Handler_initialization(
void *starting_address, void *starting_address,
uint32_t size uint32_t size
@@ -32,28 +32,28 @@ void _Workspace_Handler_initialization(
uint32_t *zero_out_array; uint32_t *zero_out_array;
uint32_t index; uint32_t index;
uint32_t memory_available; uint32_t memory_available;
if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) if ( !starting_address || !_Addresses_Is_aligned( starting_address ) )
_Internal_error_Occurred( _Internal_error_Occurred(
INTERNAL_ERROR_CORE, INTERNAL_ERROR_CORE,
TRUE, TRUE,
INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS
); );
if ( _CPU_Table.do_zero_of_workspace ) { if ( _CPU_Table.do_zero_of_workspace ) {
for( zero_out_array = (uint32_t *) starting_address, index = 0 ; for( zero_out_array = (uint32_t *) starting_address, index = 0 ;
index < size / sizeof( uint32_t ) ; index < size / sizeof( uint32_t ) ;
index++ ) index++ )
zero_out_array[ index ] = 0; zero_out_array[ index ] = 0;
} }
memory_available = _Heap_Initialize( memory_available = _Heap_Initialize(
&_Workspace_Area, &_Workspace_Area,
starting_address, starting_address,
size, size,
CPU_HEAP_ALIGNMENT CPU_HEAP_ALIGNMENT
); );
if ( memory_available == 0 ) if ( memory_available == 0 )
_Internal_error_Occurred( _Internal_error_Occurred(
INTERNAL_ERROR_CORE, INTERNAL_ERROR_CORE,