Eliminate TRUE/FALSE.

This commit is contained in:
Ralf Corsepius
2008-12-22 05:52:32 +00:00
parent 52cece81c4
commit aae7f1a12b
49 changed files with 126 additions and 126 deletions

View File

@@ -26,11 +26,11 @@ void _API_Mutex_Initialization(
OBJECTS_INTERNAL_MUTEXES, /* object class */ OBJECTS_INTERNAL_MUTEXES, /* object class */
maximum_mutexes, /* maximum objects of this class */ maximum_mutexes, /* maximum objects of this class */
sizeof( API_Mutex_Control ), /* size of this object's control block */ sizeof( API_Mutex_Control ), /* size of this object's control block */
FALSE, /* TRUE if the name is a string */ false, /* true if the name is a string */
0 /* maximum length of an object name */ 0 /* maximum length of an object name */
#if defined(RTEMS_MULTIPROCESSING) #if defined(RTEMS_MULTIPROCESSING)
, ,
TRUE, /* TRUE if this is a global object class */ true, /* true if this is a global object class */
NULL /* Proxy extraction support callout */ NULL /* Proxy extraction support callout */
#endif #endif
); );

View File

@@ -24,7 +24,7 @@ void _API_Mutex_Allocate(
CORE_mutex_Attributes attr = { CORE_mutex_Attributes attr = {
CORE_MUTEX_NESTING_IS_ERROR, CORE_MUTEX_NESTING_IS_ERROR,
FALSE, false,
CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT, CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT,
0 0
}; };

View File

@@ -27,7 +27,7 @@ void _API_Mutex_Lock(
_CORE_mutex_Seize( _CORE_mutex_Seize(
&the_mutex->Mutex, &the_mutex->Mutex,
the_mutex->Object.id, the_mutex->Object.id,
TRUE, true,
0, 0,
level level
); );

View File

@@ -33,7 +33,7 @@
* Input parameters: * Input parameters:
* the_barrier - pointer to barrier control block * the_barrier - pointer to barrier control block
* id - id of object to wait on * id - id of object to wait on
* wait - TRUE if wait is allowed, FALSE otherwise * wait - true if wait is allowed, false otherwise
* timeout - number of ticks to wait (0 means forever) * timeout - number of ticks to wait (0 means forever)
* api_barrier_mp_support - api dependent MP support actions * api_barrier_mp_support - api dependent MP support actions
* *

View File

@@ -45,8 +45,8 @@
* maximum_message_size - maximum size of each message * maximum_message_size - maximum size of each message
* *
* Output parameters: * Output parameters:
* TRUE - if the message queue is initialized * true - if the message queue is initialized
* FALSE - if the message queue is NOT initialized * false - if the message queue is NOT initialized
*/ */
bool _CORE_message_queue_Initialize( bool _CORE_message_queue_Initialize(

View File

@@ -36,7 +36,7 @@
* *
* This kernel routine dequeues a message, copies the message buffer to * This kernel routine dequeues a message, copies the message buffer to
* a given destination buffer, and frees the message buffer to the * a given destination buffer, and frees the message buffer to the
* inactive message pool. The thread will be blocked if wait is TRUE, * inactive message pool. The thread will be blocked if wait is true,
* otherwise an error will be given to the thread if no messages are available. * otherwise an error will be given to the thread if no messages are available.
* *
* Input parameters: * Input parameters:
@@ -44,7 +44,7 @@
* id - id of object we are waitig on * id - id of object we are waitig on
* buffer - pointer to message buffer to be filled * buffer - pointer to message buffer to be filled
* size_p - pointer to the size of buffer to be filled * size_p - pointer to the size of buffer to be filled
* wait - TRUE if wait is allowed, FALSE otherwise * wait - true if wait is allowed, false otherwise
* timeout - time to wait for a message * timeout - time to wait for a message
* *
* Output parameters: NONE * Output parameters: NONE

View File

@@ -65,7 +65,7 @@ void _CORE_mutex_Seize_interrupt_blocking(
_Thread_Change_priority( _Thread_Change_priority(
the_mutex->holder, the_mutex->holder,
executing->current_priority, executing->current_priority,
FALSE false
); );
} }
} }

View File

@@ -121,11 +121,11 @@ CORE_mutex_Status _CORE_mutex_Surrender(
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
#ifdef __RTEMS_STRICT_ORDER_MUTEX__ #ifdef __RTEMS_STRICT_ORDER_MUTEX__
if(the_mutex->queue.priority_before != holder->current_priority) if(the_mutex->queue.priority_before != holder->current_priority)
_Thread_Change_priority(holder,the_mutex->queue.priority_before,TRUE); _Thread_Change_priority(holder,the_mutex->queue.priority_before,true);
#endif #endif
if ( holder->resource_count == 0 && if ( holder->resource_count == 0 &&
holder->real_priority != holder->current_priority ) { holder->real_priority != holder->current_priority ) {
_Thread_Change_priority( holder, holder->real_priority, TRUE ); _Thread_Change_priority( holder, holder->real_priority, true );
} }
} }
@@ -174,7 +174,7 @@ CORE_mutex_Status _CORE_mutex_Surrender(
_Thread_Change_priority( _Thread_Change_priority(
the_thread, the_thread,
the_mutex->Attributes.priority_ceiling, the_mutex->Attributes.priority_ceiling,
FALSE false
); );
} }
break; break;

View File

@@ -37,7 +37,7 @@
* Input parameters: * Input parameters:
* the_semaphore - pointer to semaphore control block * the_semaphore - pointer to semaphore control block
* id - id of object to wait on * id - id of object to wait on
* wait - TRUE if wait is allowed, FALSE otherwise * wait - true if wait is allowed, false otherwise
* timeout - number of ticks to wait (0 means forever) * timeout - number of ticks to wait (0 means forever)
* *
* Output parameters: NONE * Output parameters: NONE

View File

@@ -42,6 +42,6 @@ void _TOD_Handler_initialization(void)
_Timestamp_Set_to_zero( &_TOD_Uptime ); _Timestamp_Set_to_zero( &_TOD_Uptime );
/* TOD has not been set */ /* TOD has not been set */
_TOD_Is_set = FALSE; _TOD_Is_set = false;
_TOD_Activate(); _TOD_Activate();
} }

View File

@@ -54,7 +54,7 @@ void _TOD_Set(
/* POSIX format TOD (timespec) */ /* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
_TOD_Is_set = TRUE; _TOD_Is_set = true;
_TOD_Activate(); _TOD_Activate();

View File

@@ -31,8 +31,8 @@
* starting_address - starting address of the memory block to free. * starting_address - starting address of the memory block to free.
* *
* Output parameters: * Output parameters:
* TRUE - if starting_address is valid heap address * true - if starting_address is valid heap address
* FALSE - if starting_address is invalid heap address * false - if starting_address is invalid heap address
*/ */
bool _Heap_Free( bool _Heap_Free(
@@ -50,27 +50,27 @@ bool _Heap_Free(
if ( !_Addresses_Is_in_range( if ( !_Addresses_Is_in_range(
starting_address, (void *)the_heap->start, (void *)the_heap->final ) ) { starting_address, (void *)the_heap->start, (void *)the_heap->final ) ) {
_HAssert(starting_address != NULL); _HAssert(starting_address != NULL);
return( FALSE ); return( false );
} }
_Heap_Start_of_block( the_heap, starting_address, &the_block ); _Heap_Start_of_block( the_heap, starting_address, &the_block );
if ( !_Heap_Is_block_in( the_heap, the_block ) ) { if ( !_Heap_Is_block_in( the_heap, the_block ) ) {
_HAssert( FALSE ); _HAssert( false );
return( FALSE ); return( false );
} }
the_size = _Heap_Block_size( the_block ); the_size = _Heap_Block_size( the_block );
next_block = _Heap_Block_at( the_block, the_size ); next_block = _Heap_Block_at( the_block, the_size );
if ( !_Heap_Is_block_in( the_heap, next_block ) ) { if ( !_Heap_Is_block_in( the_heap, next_block ) ) {
_HAssert( FALSE ); _HAssert( false );
return( FALSE ); return( false );
} }
if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Is_prev_used( next_block ) ) {
_HAssert( FALSE ); _HAssert( false );
return( FALSE ); return( false );
} }
next_size = _Heap_Block_size( next_block ); next_size = _Heap_Block_size( next_block );
@@ -82,15 +82,15 @@ bool _Heap_Free(
Heap_Block *const prev_block = _Heap_Block_at( the_block, -prev_size ); Heap_Block *const prev_block = _Heap_Block_at( the_block, -prev_size );
if ( !_Heap_Is_block_in( the_heap, prev_block ) ) { if ( !_Heap_Is_block_in( the_heap, prev_block ) ) {
_HAssert( FALSE ); _HAssert( false );
return( FALSE ); return( false );
} }
/* As we always coalesce free blocks, the block that preceedes prev_block /* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */ must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) { if ( !_Heap_Is_prev_used ( prev_block) ) {
_HAssert( FALSE ); _HAssert( false );
return( FALSE ); return( false );
} }
if ( next_is_free ) { /* coalesce both */ if ( next_is_free ) { /* coalesce both */
@@ -133,5 +133,5 @@ bool _Heap_Free(
stats->free_size += the_size; stats->free_size += the_size;
stats->frees += 1; stats->frees += 1;
return( TRUE ); return( true );
} }

View File

@@ -25,7 +25,7 @@
* *
* This kernel routine sets '*size' to the size of the block of memory * This kernel routine sets '*size' to the size of the block of memory
* which begins at 'starting_address'. * which begins at 'starting_address'.
* It returns TRUE if the 'starting_address' is in the heap, and FALSE * It returns true if the 'starting_address' is in the heap, and false
* otherwise. * otherwise.
* *
* Input parameters: * Input parameters:
@@ -35,8 +35,8 @@
* *
* Output parameters: * Output parameters:
* size - size of area filled in * size - size of area filled in
* TRUE - if starting_address is valid heap address * true - if starting_address is valid heap address
* FALSE - if starting_address is invalid heap address * false - if starting_address is invalid heap address
*/ */
bool _Heap_Size_of_user_area( bool _Heap_Size_of_user_area(
@@ -51,13 +51,13 @@ bool _Heap_Size_of_user_area(
if ( !_Addresses_Is_in_range( if ( !_Addresses_Is_in_range(
starting_address, (void *)the_heap->start, (void *)the_heap->final ) ) starting_address, (void *)the_heap->start, (void *)the_heap->final ) )
return( FALSE ); return( false );
_Heap_Start_of_block( the_heap, starting_address, &the_block ); _Heap_Start_of_block( the_heap, starting_address, &the_block );
_HAssert(_Heap_Is_block_in( the_heap, the_block )); _HAssert(_Heap_Is_block_in( the_heap, the_block ));
if ( !_Heap_Is_block_in( the_heap, the_block ) ) if ( !_Heap_Is_block_in( the_heap, the_block ) )
return( FALSE ); return( false );
the_size = _Heap_Block_size( the_block ); the_size = _Heap_Block_size( the_block );
next_block = _Heap_Block_at( the_block, the_size ); next_block = _Heap_Block_at( the_block, the_size );
@@ -68,7 +68,7 @@ bool _Heap_Size_of_user_area(
!_Heap_Is_block_in( the_heap, next_block ) || !_Heap_Is_block_in( the_heap, next_block ) ||
!_Heap_Is_prev_used( next_block ) !_Heap_Is_prev_used( next_block )
) )
return( FALSE ); return( false );
/* 'starting_address' could be greater than 'the_block' address plus /* 'starting_address' could be greater than 'the_block' address plus
HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user
@@ -82,6 +82,6 @@ bool _Heap_Size_of_user_area(
*size = _Addresses_Subtract ( next_block, starting_address ) *size = _Addresses_Subtract ( next_block, starting_address )
+ HEAP_BLOCK_HEADER_OFFSET; + HEAP_BLOCK_HEADER_OFFSET;
return( TRUE ); return( true );
} }

View File

@@ -32,7 +32,7 @@
* Input parameters: * Input parameters:
* the_heap - pointer to heap header * the_heap - pointer to heap header
* source - a numeric indicator of the invoker of this routine * source - a numeric indicator of the invoker of this routine
* do_dump - when TRUE print the information * do_dump - when true print the information
* *
* Output parameters: NONE * Output parameters: NONE
*/ */
@@ -51,7 +51,7 @@ bool _Heap_Walk(
int error = 0; int error = 0;
int passes = 0; int passes = 0;
do_dump = FALSE; do_dump = false;
/* /*
* We don't want to allow walking the heap until we have * We don't want to allow walking the heap until we have
* transferred control to the user task so we watch the * transferred control to the user task so we watch the
@@ -60,13 +60,13 @@ bool _Heap_Walk(
/* /*
if ( !_System_state_Is_up( _System_state_Get() ) ) if ( !_System_state_Is_up( _System_state_Get() ) )
return TRUE; return true;
*/ */
if (source < 0) if (source < 0)
source = the_heap->stats.instance; source = the_heap->stats.instance;
if (do_dump == TRUE) if (do_dump == true)
printk("\nPASS: %d start %p final %p first %p last %p begin %p end %p\n", printk("\nPASS: %d start %p final %p first %p last %p begin %p end %p\n",
source, the_block, end, source, the_block, end,
_Heap_First(the_heap), _Heap_Last(the_heap), _Heap_First(the_heap), _Heap_Last(the_heap),
@@ -164,7 +164,7 @@ bool _Heap_Walk(
} }
if(do_dump && error) if(do_dump && error)
_Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, 0xffff0000 );
return error; return error;

View File

@@ -61,5 +61,5 @@ void _Internal_error_Occurred(
_CPU_Fatal_halt( the_error ); _CPU_Fatal_halt( the_error );
/* will not return from this routine */ /* will not return from this routine */
while (TRUE); while (true);
} }

View File

@@ -34,7 +34,7 @@
void _ISR_Handler_initialization( void ) void _ISR_Handler_initialization( void )
{ {
_ISR_Signals_to_thread_executing = FALSE; _ISR_Signals_to_thread_executing = false;
_ISR_Nest_level = 0; _ISR_Nest_level = 0;
@@ -51,7 +51,7 @@ void _ISR_Handler_initialization( void )
if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) ) if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) )
_Internal_error_Occurred( _Internal_error_Occurred(
INTERNAL_ERROR_CORE, INTERNAL_ERROR_CORE,
TRUE, true,
INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL
); );

View File

@@ -58,7 +58,7 @@ void _MPCI_Handler_initialization(
if ( _System_state_Is_multiprocessing && !users_mpci_table ) if ( _System_state_Is_multiprocessing && !users_mpci_table )
_Internal_error_Occurred( _Internal_error_Occurred(
INTERNAL_ERROR_CORE, INTERNAL_ERROR_CORE,
TRUE, true,
INTERNAL_ERROR_NO_MPCI INTERNAL_ERROR_NO_MPCI
); );
@@ -127,7 +127,7 @@ void _MPCI_Create_server( void )
_Configuration_MP_table->extra_mpci_receive_server_stack, _Configuration_MP_table->extra_mpci_receive_server_stack,
CPU_ALL_TASKS_ARE_FP, CPU_ALL_TASKS_ARE_FP,
PRIORITY_MINIMUM, PRIORITY_MINIMUM,
FALSE, /* no preempt */ false, /* no preempt */
THREAD_CPU_BUDGET_ALGORITHM_NONE, THREAD_CPU_BUDGET_ALGORITHM_NONE,
NULL, /* no budget algorithm callout */ NULL, /* no budget algorithm callout */
0, /* all interrupts enabled */ 0, /* all interrupts enabled */
@@ -190,7 +190,7 @@ MP_packet_Prefix *_MPCI_Get_packet ( void )
if ( the_packet == NULL ) if ( the_packet == NULL )
_Internal_error_Occurred( _Internal_error_Occurred(
INTERNAL_ERROR_CORE, INTERNAL_ERROR_CORE,
TRUE, true,
INTERNAL_ERROR_OUT_OF_PACKETS INTERNAL_ERROR_OUT_OF_PACKETS
); );
@@ -375,7 +375,7 @@ Thread _MPCI_Receive_server(
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 ( ; ; ) {
@@ -394,7 +394,7 @@ Thread _MPCI_Receive_server(
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
); );
@@ -497,7 +497,7 @@ void _MPCI_Internal_packets_Process_packet (
_Internal_error_Occurred( _Internal_error_Occurred(
INTERNAL_ERROR_CORE, INTERNAL_ERROR_CORE,
TRUE, true,
INTERNAL_ERROR_INCONSISTENT_MP_INFORMATION INTERNAL_ERROR_INCONSISTENT_MP_INFORMATION
); );
} }

View File

@@ -38,10 +38,10 @@
* information - object information table * information - object information table
* maximum - maximum objects of this class * maximum - maximum objects of this class
* size - size of this object's control block * size - size of this object's control block
* is_string - TRUE if names for this object are strings * is_string - true if names for this object are strings
* maximum_name_length - maximum length of each object's name * maximum_name_length - maximum length of each object's name
* When multiprocessing is configured, * When multiprocessing is configured,
* supports_global - TRUE if this is a global object class * supports_global - true if this is a global object class
* extract_callout - pointer to threadq extract callout * extract_callout - pointer to threadq extract callout
* *
* Output parameters: NONE * Output parameters: NONE
@@ -96,7 +96,7 @@ void _Objects_Initialize_information(
*/ */
information->auto_extend = information->auto_extend =
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? TRUE : FALSE; (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
maximum &= ~OBJECTS_UNLIMITED_OBJECTS; maximum &= ~OBJECTS_UNLIMITED_OBJECTS;
/* /*

View File

@@ -42,7 +42,7 @@ void _Objects_MP_Handler_initialization(void)
if ( node < 1 || node > maximum_nodes ) if ( node < 1 || node > maximum_nodes )
_Internal_error_Occurred( _Internal_error_Occurred(
INTERNAL_ERROR_CORE, INTERNAL_ERROR_CORE,
TRUE, true,
INTERNAL_ERROR_INVALID_NODE INTERNAL_ERROR_INVALID_NODE
); );
@@ -108,12 +108,12 @@ bool _Objects_MP_Allocate_and_open (
the_global_object = _Objects_MP_Allocate_global_object(); the_global_object = _Objects_MP_Allocate_global_object();
if ( _Objects_MP_Is_null_global_object( the_global_object ) ) { if ( _Objects_MP_Is_null_global_object( the_global_object ) ) {
if ( is_fatal_error == FALSE ) if ( is_fatal_error == false )
return FALSE; return false;
_Internal_error_Occurred( _Internal_error_Occurred(
INTERNAL_ERROR_CORE, INTERNAL_ERROR_CORE,
TRUE, true,
INTERNAL_ERROR_OUT_OF_GLOBAL_OBJECTS INTERNAL_ERROR_OUT_OF_GLOBAL_OBJECTS
); );
@@ -121,7 +121,7 @@ bool _Objects_MP_Allocate_and_open (
_Objects_MP_Open( information, the_global_object, the_name, the_id ); _Objects_MP_Open( information, the_global_object, the_name, the_id );
return TRUE; return true;
} }
/*PAGE /*PAGE
@@ -158,7 +158,7 @@ void _Objects_MP_Close (
_Internal_error_Occurred( _Internal_error_Occurred(
INTERNAL_ERROR_CORE, INTERNAL_ERROR_CORE,
TRUE, true,
INTERNAL_ERROR_INVALID_GLOBAL_ID INTERNAL_ERROR_INVALID_GLOBAL_ID
); );
} }

View File

@@ -62,7 +62,7 @@ Objects_Name_or_id_lookup_errors _Objects_Name_to_id_u32(
Objects_Name name_for_mp; Objects_Name name_for_mp;
#endif #endif
/* ASSERT: information->is_string == FALSE */ /* ASSERT: information->is_string == false */
if ( !id ) if ( !id )
return OBJECTS_INVALID_ADDRESS; return OBJECTS_INVALID_ADDRESS;
@@ -70,14 +70,14 @@ Objects_Name_or_id_lookup_errors _Objects_Name_to_id_u32(
if ( name == 0 ) if ( name == 0 )
return OBJECTS_INVALID_NAME; return OBJECTS_INVALID_NAME;
search_local_node = FALSE; search_local_node = false;
if ( information->maximum != 0 && if ( information->maximum != 0 &&
(node == OBJECTS_SEARCH_ALL_NODES || (node == OBJECTS_SEARCH_ALL_NODES ||
node == OBJECTS_SEARCH_LOCAL_NODE || node == OBJECTS_SEARCH_LOCAL_NODE ||
_Objects_Is_local_node( node ) _Objects_Is_local_node( node )
)) ))
search_local_node = TRUE; search_local_node = true;
if ( search_local_node ) { if ( search_local_node ) {
name_length = information->name_length; name_length = information->name_length;

View File

@@ -58,7 +58,7 @@ Objects_Name_or_id_lookup_errors _Objects_Name_to_id_string(
uint32_t index; uint32_t index;
uint32_t name_length; uint32_t name_length;
/* ASSERT: information->is_string == TRUE */ /* ASSERT: information->is_string == true */
if ( !id ) if ( !id )
return OBJECTS_INVALID_ADDRESS; return OBJECTS_INVALID_ADDRESS;

View File

@@ -45,7 +45,7 @@ bool _Objects_Set_name(
d = _Workspace_Allocate( length ); d = _Workspace_Allocate( length );
if ( !d ) if ( !d )
return FALSE; return false;
if ( the_object->name.name_p ) { if ( the_object->name.name_p ) {
_Workspace_Free( (void *)the_object->name.name_p ); _Workspace_Free( (void *)the_object->name.name_p );
@@ -64,5 +64,5 @@ bool _Objects_Set_name(
} }
return TRUE; return true;
} }

View File

@@ -65,11 +65,11 @@ void _Thread_Handler_initialization(void)
== (!Configuration.stack_free_hook) ) ) == (!Configuration.stack_free_hook) ) )
_Internal_error_Occurred( _Internal_error_Occurred(
INTERNAL_ERROR_CORE, INTERNAL_ERROR_CORE,
TRUE, true,
INTERNAL_ERROR_BAD_STACK_HOOK INTERNAL_ERROR_BAD_STACK_HOOK
); );
_Context_Switch_necessary = FALSE; _Context_Switch_necessary = false;
_Thread_Executing = NULL; _Thread_Executing = NULL;
_Thread_Heir = NULL; _Thread_Heir = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
@@ -108,11 +108,11 @@ void _Thread_Handler_initialization(void)
#endif #endif
sizeof( Thread_Control ), sizeof( Thread_Control ),
/* size of this object's control block */ /* size of this object's control block */
TRUE, /* TRUE if names for this object are strings */ true, /* true if names for this object are strings */
8 /* maximum length of each object's name */ 8 /* maximum length of each object's name */
#if defined(RTEMS_MULTIPROCESSING) #if defined(RTEMS_MULTIPROCESSING)
, ,
FALSE, /* TRUE if this is a global object class */ false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */ NULL /* Proxy extraction support callout */
#endif #endif
); );

View File

@@ -45,7 +45,7 @@ void _Thread_blocking_operation_Cancel(
(sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) {
_Internal_error_Occurred( _Internal_error_Occurred(
INTERNAL_ERROR_CORE, INTERNAL_ERROR_CORE,
TRUE, true,
INTERNAL_ERROR_IMPLEMENTATION_BLOCKING_OPERATION_CANCEL INTERNAL_ERROR_IMPLEMENTATION_BLOCKING_OPERATION_CANCEL
); );
} }

View File

@@ -40,7 +40,7 @@
* Input parameters: * Input parameters:
* the_thread - pointer to thread control block * the_thread - pointer to thread control block
* new_priority - ultimate priority * new_priority - ultimate priority
* prepend_it - TRUE if the thread should be prepended to the chain * prepend_it - true if the thread should be prepended to the chain
* *
* Output parameters: NONE * Output parameters: NONE
* *
@@ -70,7 +70,7 @@ void _Thread_Change_priority(
if ( prepend_it && if ( prepend_it &&
_Thread_Is_executing( the_thread ) && _Thread_Is_executing( the_thread ) &&
new_priority >= the_thread->current_priority ) new_priority >= the_thread->current_priority )
prepend_it = TRUE; prepend_it = true;
*/ */
/* /*
@@ -137,6 +137,6 @@ void _Thread_Change_priority(
if ( !_Thread_Is_executing_also_the_heir() && if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible ) _Thread_Executing->is_preemptible )
_Context_Switch_necessary = TRUE; _Context_Switch_necessary = true;
_ISR_Enable( level ); _ISR_Enable( level );
} }

View File

@@ -89,7 +89,7 @@ void _Thread_Clear_state(
_Thread_Heir = the_thread; _Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible || if ( _Thread_Executing->is_preemptible ||
the_thread->current_priority == 0 ) the_thread->current_priority == 0 )
_Context_Switch_necessary = TRUE; _Context_Switch_necessary = true;
} }
} }
} }

View File

@@ -63,7 +63,7 @@ void _Thread_Create_idle( void )
_Stack_Ensure_minimum( Configuration.idle_task_stack_size ), _Stack_Ensure_minimum( Configuration.idle_task_stack_size ),
CPU_IDLE_TASK_IS_FP, CPU_IDLE_TASK_IS_FP,
PRIORITY_MAXIMUM, PRIORITY_MAXIMUM,
TRUE, /* preemptable */ true, /* preemptable */
THREAD_CPU_BUDGET_ALGORITHM_NONE, THREAD_CPU_BUDGET_ALGORITHM_NONE,
NULL, /* no budget algorithm callout */ NULL, /* no budget algorithm callout */
0, /* all interrupts enabled */ 0, /* all interrupts enabled */

View File

@@ -88,10 +88,10 @@ void _Thread_Dispatch( void )
executing = _Thread_Executing; executing = _Thread_Executing;
_ISR_Disable( level ); _ISR_Disable( level );
while ( _Context_Switch_necessary == TRUE ) { while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir; heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1; _Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = FALSE; _Context_Switch_necessary = false;
_Thread_Executing = heir; _Thread_Executing = heir;
#if __RTEMS_ADA__ #if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self; executing->rtems_ada_self = rtems_ada_self;

View File

@@ -45,9 +45,9 @@ bool _Thread_Evaluate_mode( void )
if ( !_States_Is_ready( executing->current_state ) || if ( !_States_Is_ready( executing->current_state ) ||
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
_Context_Switch_necessary = TRUE; _Context_Switch_necessary = true;
return TRUE; return true;
} }
return FALSE; return false;
} }

View File

@@ -185,7 +185,7 @@ void _Thread_Handler( void )
_Internal_error_Occurred( _Internal_error_Occurred(
INTERNAL_ERROR_CORE, INTERNAL_ERROR_CORE,
TRUE, true,
INTERNAL_ERROR_THREAD_EXITTED INTERNAL_ERROR_THREAD_EXITTED
); );
} }

View File

@@ -81,14 +81,14 @@ bool _Thread_Initialize(
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size ) if ( !actual_stack_size || actual_stack_size < stack_size )
return FALSE; /* stack allocation failed */ return false; /* stack allocation failed */
stack = the_thread->Start.stack; stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = TRUE; the_thread->Start.core_allocated_stack = true;
} else { } else {
stack = stack_area; stack = stack_area;
actual_stack_size = stack_size; actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = FALSE; the_thread->Start.core_allocated_stack = false;
} }
_Stack_Initialize( _Stack_Initialize(
@@ -107,7 +107,7 @@ bool _Thread_Initialize(
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
if ( !fp_area ) { if ( !fp_area ) {
_Thread_Stack_Free( the_thread ); _Thread_Stack_Free( the_thread );
return FALSE; return false;
} }
fp_area = _Context_Fp_start( fp_area, 0 ); fp_area = _Context_Fp_start( fp_area, 0 );
@@ -151,7 +151,7 @@ bool _Thread_Initialize(
_Thread_Stack_Free( the_thread ); _Thread_Stack_Free( the_thread );
return FALSE; return false;
} }
} else } else
extensions_area = NULL; extensions_area = NULL;
@@ -238,9 +238,9 @@ bool _Thread_Initialize(
_Thread_Stack_Free( the_thread ); _Thread_Stack_Free( the_thread );
return FALSE; return false;
} }
return TRUE; return true;
} }

View File

@@ -92,7 +92,7 @@ Thread_Control *_Thread_MP_Allocate_proxy (
_Internal_error_Occurred( _Internal_error_Occurred(
INTERNAL_ERROR_CORE, INTERNAL_ERROR_CORE,
TRUE, true,
INTERNAL_ERROR_OUT_OF_PROXIES INTERNAL_ERROR_OUT_OF_PROXIES
); );

View File

@@ -35,7 +35,7 @@
* Input parameters: * Input parameters:
* the_thread_queue - pointer to a threadq header * the_thread_queue - pointer to a threadq header
* the_thread - pointer to a thread control block * the_thread - pointer to a thread control block
* requeuing - TRUE if requeuing and should not alter timeout or state * requeuing - true if requeuing and should not alter timeout or state
* *
* Output parameters: NONE * Output parameters: NONE
* *

View File

@@ -61,7 +61,7 @@ bool _Thread_queue_Extract_with_proxy(
#endif #endif
_Thread_queue_Extract( the_thread->Wait.queue, the_thread ); _Thread_queue_Extract( the_thread->Wait.queue, the_thread );
return TRUE; return true;
} }
return FALSE; return false;
} }

View File

@@ -65,7 +65,7 @@ void _Thread_queue_Requeue(
_ISR_Disable( level ); _ISR_Disable( level );
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_Thread_queue_Enter_critical_section( tq ); _Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, TRUE ); _Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
} }
_ISR_Enable( level ); _ISR_Enable( level );

View File

@@ -72,7 +72,7 @@ void _Thread_Ready(
heir = _Thread_Heir; heir = _Thread_Heir;
if ( !_Thread_Is_executing( heir ) && _Thread_Executing->is_preemptible ) if ( !_Thread_Is_executing( heir ) && _Thread_Executing->is_preemptible )
_Context_Switch_necessary = TRUE; _Context_Switch_necessary = true;
_ISR_Enable( level ); _ISR_Enable( level );
} }

View File

@@ -69,7 +69,7 @@ void _Thread_Reset_timeslice( void )
if ( _Thread_Is_heir( executing ) ) if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first; _Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = TRUE; _Context_Switch_necessary = true;
_ISR_Enable( level ); _ISR_Enable( level );
} }

View File

@@ -61,8 +61,8 @@ bool _Thread_Restart(
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

@@ -62,7 +62,7 @@ void _Thread_Resume(
_ISR_Disable( level ); _ISR_Disable( level );
if ( force == TRUE ) if ( force == true )
the_thread->suspend_count = 0; the_thread->suspend_count = 0;
else else
the_thread->suspend_count--; the_thread->suspend_count--;
@@ -89,7 +89,7 @@ void _Thread_Resume(
_Thread_Heir = the_thread; _Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible || if ( _Thread_Executing->is_preemptible ||
the_thread->current_priority == 0 ) the_thread->current_priority == 0 )
_Context_Switch_necessary = TRUE; _Context_Switch_necessary = true;
} }
} }
} }

View File

@@ -38,7 +38,7 @@
* remove the running THREAD from the ready chain * remove the running THREAD from the ready chain
* and place it immediatly at the rear of this chain. Reset timeslice * and place it immediatly at the rear of this chain. Reset timeslice
* and yield the processor functions both use this routine, therefore if * and yield the processor functions both use this routine, therefore if
* reset is TRUE and this is the only thread on the chain then the * reset is true and this is the only thread on the chain then the
* timeslice counter is reset. The heir THREAD will be updated if the * timeslice counter is reset. The heir THREAD will be updated if the
* running is also the currently the heir. * running is also the currently the heir.
* *
@@ -84,7 +84,7 @@ void _Thread_Rotate_Ready_Queue(
_Thread_Heir = (Thread_Control *) ready->first; _Thread_Heir = (Thread_Control *) ready->first;
if ( executing != _Thread_Heir ) if ( executing != _Thread_Heir )
_Context_Switch_necessary = TRUE; _Context_Switch_necessary = true;
_ISR_Enable( level ); _ISR_Enable( level );
} }

View File

@@ -81,7 +81,7 @@ void _Thread_Set_state(
_Thread_Calculate_heir(); _Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) ) if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = TRUE; _Context_Switch_necessary = true;
_ISR_Enable( level ); _ISR_Enable( level );
} }

View File

@@ -61,7 +61,7 @@ void _Thread_Start_multitasking( void )
_System_state_Set( SYSTEM_STATE_UP ); _System_state_Set( SYSTEM_STATE_UP );
_Context_Switch_necessary = FALSE; _Context_Switch_necessary = false;
_Thread_Executing = _Thread_Heir; _Thread_Executing = _Thread_Heir;

View File

@@ -80,7 +80,7 @@ void _Thread_Suspend(
_Thread_Calculate_heir(); _Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) ) if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = TRUE; _Context_Switch_necessary = true;
_ISR_Enable( level ); _ISR_Enable( level );
} }

View File

@@ -37,7 +37,7 @@
* This kernel routine will remove the running THREAD from the ready chain * This kernel routine will remove the running THREAD from the ready chain
* and place it immediatly at the rear of this chain. Reset timeslice * and place it immediatly at the rear of this chain. Reset timeslice
* and yield the processor functions both use this routine, therefore if * and yield the processor functions both use this routine, therefore if
* reset is TRUE and this is the only thread on the chain then the * reset is true and this is the only thread on the chain then the
* timeslice counter is reset. The heir THREAD will be updated if the * timeslice counter is reset. The heir THREAD will be updated if the
* running is also the currently the heir. * running is also the currently the heir.
* *
@@ -67,10 +67,10 @@ void _Thread_Yield_processor( void )
if ( _Thread_Is_heir( executing ) ) if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first; _Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = TRUE; _Context_Switch_necessary = true;
} }
else if ( !_Thread_Is_heir( executing ) ) else if ( !_Thread_Is_heir( executing ) )
_Context_Switch_necessary = TRUE; _Context_Switch_necessary = true;
_ISR_Enable( level ); _ISR_Enable( level );
} }

View File

@@ -29,14 +29,14 @@ bool _Timespec_Greater_than(
) )
{ {
if ( lhs->tv_sec > rhs->tv_sec ) if ( lhs->tv_sec > rhs->tv_sec )
return TRUE; return true;
if ( lhs->tv_sec < rhs->tv_sec ) if ( lhs->tv_sec < rhs->tv_sec )
return FALSE; return false;
/* ASSERT: lhs->tv_sec == rhs->tv_sec */ /* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec ) if ( lhs->tv_nsec > rhs->tv_nsec )
return TRUE; return true;
return FALSE; return false;
} }

View File

@@ -28,16 +28,16 @@ bool _Timespec_Is_valid(
) )
{ {
if ( !time ) if ( !time )
return FALSE; return false;
if ( time->tv_sec < 0 ) if ( time->tv_sec < 0 )
return FALSE; return false;
if ( time->tv_nsec < 0 ) if ( time->tv_nsec < 0 )
return FALSE; return false;
if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND )
return FALSE; return false;
return TRUE; return true;
} }

View File

@@ -29,14 +29,14 @@ bool _Timespec_Less_than(
) )
{ {
if ( lhs->tv_sec < rhs->tv_sec ) if ( lhs->tv_sec < rhs->tv_sec )
return TRUE; return true;
if ( lhs->tv_sec > rhs->tv_sec ) if ( lhs->tv_sec > rhs->tv_sec )
return FALSE; return false;
/* ASSERT: lhs->tv_sec == rhs->tv_sec */ /* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec < rhs->tv_nsec ) if ( lhs->tv_nsec < rhs->tv_nsec )
return TRUE; return true;
return FALSE; return false;
} }

View File

@@ -41,9 +41,9 @@ bool _User_extensions_Thread_create (
the_thread the_thread
); );
if ( !status ) if ( !status )
return FALSE; return false;
} }
} }
return TRUE; return true;
} }

View File

@@ -38,7 +38,7 @@ void _Workspace_Handler_initialization(void)
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
); );
@@ -55,7 +55,7 @@ void _Workspace_Handler_initialization(void)
if ( memory_available == 0 ) if ( memory_available == 0 )
_Internal_error_Occurred( _Internal_error_Occurred(
INTERNAL_ERROR_CORE, INTERNAL_ERROR_CORE,
TRUE, true,
INTERNAL_ERROR_TOO_LITTLE_WORKSPACE INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
); );
} }
@@ -94,7 +94,7 @@ void *_Workspace_Allocate_or_fatal_error(
if ( memory == NULL ) if ( memory == NULL )
_Internal_error_Occurred( _Internal_error_Occurred(
INTERNAL_ERROR_CORE, INTERNAL_ERROR_CORE,
TRUE, true,
INTERNAL_ERROR_WORKSPACE_ALLOCATION INTERNAL_ERROR_WORKSPACE_ALLOCATION
); );