* libfs/src/dosfs/fat_file.c, libfs/src/imfs/imfs_debug.c,
	libfs/src/imfs/imfs_directory.c, libfs/src/imfs/imfs_getchild.c,
	posix/src/killinfo.c, score/inline/rtems/score/schedulerpriority.inl,
	score/inline/rtems/score/watchdog.inl, score/src/apiext.c,
	score/src/chain.c, score/src/coremsgflushsupp.c,
	score/src/coremsginsert.c, score/src/objectshrinkinformation.c,
	score/src/schedulerpriorityyield.c,
	score/src/threadqdequeuepriority.c,
	score/src/threadqenqueuepriority.c,
	score/src/threadqextractpriority.c, score/src/threadqfirstfifo.c,
	score/src/threadqfirstpriority.c, score/src/threadyieldprocessor.c,
	score/src/userextthreadbegin.c, score/src/userextthreadcreate.c,
	score/src/userextthreaddelete.c, score/src/userextthreadrestart.c,
	score/src/userextthreadstart.c, score/src/userextthreadswitch.c,
	score/src/watchdogreportchain.c: Avoid chain API violations.
This commit is contained in:
Sebastian Huber
2010-11-25 09:27:06 +00:00
parent 692775fa56
commit ce002b161d
27 changed files with 90 additions and 63 deletions

View File

@@ -1,3 +1,21 @@
2010-11-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libfs/src/dosfs/fat_file.c, libfs/src/imfs/imfs_debug.c,
libfs/src/imfs/imfs_directory.c, libfs/src/imfs/imfs_getchild.c,
posix/src/killinfo.c, score/inline/rtems/score/schedulerpriority.inl,
score/inline/rtems/score/watchdog.inl, score/src/apiext.c,
score/src/chain.c, score/src/coremsgflushsupp.c,
score/src/coremsginsert.c, score/src/objectshrinkinformation.c,
score/src/schedulerpriorityyield.c,
score/src/threadqdequeuepriority.c,
score/src/threadqenqueuepriority.c,
score/src/threadqextractpriority.c, score/src/threadqfirstfifo.c,
score/src/threadqfirstpriority.c, score/src/threadyieldprocessor.c,
score/src/userextthreadbegin.c, score/src/userextthreadcreate.c,
score/src/userextthreaddelete.c, score/src/userextthreadrestart.c,
score/src/userextthreadstart.c, score/src/userextthreadswitch.c,
score/src/watchdogreportchain.c: Avoid chain API violations.
2010-11-24 Gedare Bloom <giddyup44@yahoo.com> 2010-11-24 Gedare Bloom <giddyup44@yahoo.com>
PR 1647/cpukit PR 1647/cpukit

View File

@@ -926,7 +926,7 @@ _hash_search(
) )
{ {
uint32_t mod = (key1) % FAT_HASH_MODULE; uint32_t mod = (key1) % FAT_HASH_MODULE;
rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first; rtems_chain_node *the_node = rtems_chain_first(hash + mod);
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
{ {

View File

@@ -114,7 +114,7 @@ void IMFS_dump_directory(
the_chain = &the_directory->info.directory.Entries; the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first; for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node ); !rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) { the_node = the_node->next ) {

View File

@@ -97,7 +97,7 @@ ssize_t imfs_dir_read(
return 0; return 0;
/* Move to the first of the desired directory entries */ /* Move to the first of the desired directory entries */
the_node = the_chain->first; the_node = rtems_chain_first( the_chain );
bytes_transferred = 0; bytes_transferred = 0;
first_entry = iop->offset; first_entry = iop->offset;
@@ -263,7 +263,7 @@ int imfs_dir_fstat(
/* Run through the chain and count the number of directory entries */ /* Run through the chain and count the number of directory entries */
/* that are subordinate to this directory node */ /* that are subordinate to this directory node */
for ( the_node = the_chain->first ; for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node ) ; !rtems_chain_is_tail( the_chain, the_node ) ;
the_node = the_node->next ) { the_node = the_node->next ) {

View File

@@ -52,7 +52,7 @@ IMFS_jnode_t *IMFS_find_match_in_dir(
the_chain = &directory->info.directory.Entries; the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first; for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node ); !rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) { the_node = the_node->next ) {

View File

@@ -137,7 +137,7 @@ int killinfo(
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ; for ( the_node = _Chain_First( the_chain );
!_Chain_Is_tail( the_chain, the_node ) ; !_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) { the_node = the_node->next ) {

View File

@@ -138,10 +138,10 @@ RTEMS_INLINE_ROUTINE Thread_Control *_Scheduler_priority_Ready_queue_first(
Chain_Control *the_ready_queue Chain_Control *the_ready_queue
) )
{ {
uint32_t index = _Priority_bit_map_Get_highest(); Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
return (Thread_Control *) the_ready_queue[ index ].first; return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL; return NULL;
} }

View File

@@ -238,7 +238,7 @@ RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
) )
{ {
return ( (Watchdog_Control *) header->first ); return ( (Watchdog_Control *) _Chain_First( header ) );
} }
@@ -252,7 +252,7 @@ RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Last(
) )
{ {
return ( (Watchdog_Control *) header->last ); return ( (Watchdog_Control *) _Chain_Last( header ) );
} }

View File

@@ -52,7 +52,7 @@ void _API_extensions_Add(
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 = _Chain_First( &_API_extensions_List );
!_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 ) {
@@ -74,7 +74,7 @@ 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 = _Chain_First( &_API_extensions_List );
!_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 ) {
@@ -100,7 +100,7 @@ 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 = _Chain_First( &_API_extensions_List );
!_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 ) {

View File

@@ -40,14 +40,14 @@ void _Chain_Initialize(
size_t node_size size_t node_size
) )
{ {
size_t count; size_t count = number_nodes;
Chain_Node *current; Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *next; Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) { while ( count-- ) {
current->next = next; current->next = next;
next->previous = current; next->previous = current;
@@ -55,6 +55,7 @@ void _Chain_Initialize(
next = (Chain_Node *) next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size ); _Addresses_Add_offset( (void *) next, node_size );
} }
current->next = _Chain_Tail( the_chain );
the_chain->last = current; current->next = tail;
tail->previous = current;
} }

View File

@@ -53,6 +53,7 @@ uint32_t _CORE_message_queue_Flush_support(
) )
{ {
ISR_Level level; ISR_Level level;
Chain_Node *inactive_head;
Chain_Node *inactive_first; Chain_Node *inactive_first;
Chain_Node *message_queue_first; Chain_Node *message_queue_first;
Chain_Node *message_queue_last; Chain_Node *message_queue_last;
@@ -86,15 +87,15 @@ uint32_t _CORE_message_queue_Flush_support(
*/ */
_ISR_Disable( level ); _ISR_Disable( level );
inactive_first = the_message_queue->Inactive_messages.first; inactive_head = _Chain_Head( &the_message_queue->Inactive_messages );
message_queue_first = the_message_queue->Pending_messages.first; inactive_first = inactive_head->next;;
message_queue_last = the_message_queue->Pending_messages.last; message_queue_first = _Chain_First( &the_message_queue->Pending_messages );
message_queue_last = _Chain_Last( &the_message_queue->Pending_messages );
the_message_queue->Inactive_messages.first = message_queue_first; inactive_head->next = message_queue_first;
message_queue_last->next = inactive_first; message_queue_last->next = inactive_first;
inactive_first->previous = message_queue_last; inactive_first->previous = message_queue_last;
message_queue_first->previous = message_queue_first->previous = inactive_head;
_Chain_Head( &the_message_queue->Inactive_messages );
_Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Chain_Initialize_empty( &the_message_queue->Pending_messages );

View File

@@ -99,7 +99,7 @@ void _CORE_message_queue_Insert_message(
the_priority = _CORE_message_queue_Get_message_priority(the_message); the_priority = _CORE_message_queue_Get_message_priority(the_message);
the_header = &the_message_queue->Pending_messages; the_header = &the_message_queue->Pending_messages;
the_node = the_header->first; the_node = _Chain_First( the_header );
while ( !_Chain_Is_tail( the_header, the_node ) ) { while ( !_Chain_Is_tail( the_header, the_node ) ) {
int this_priority; int this_priority;

View File

@@ -69,7 +69,7 @@ void _Objects_Shrink_information(
/* /*
* Assume the Inactive chain is never empty at this point * Assume the Inactive chain is never empty at this point
*/ */
the_object = (Objects_Control *) information->Inactive.first; the_object = (Objects_Control *) _Chain_First( &information->Inactive );
do { do {
index = _Objects_Get_index( the_object->id ); index = _Objects_Get_index( the_object->id );

View File

@@ -67,7 +67,7 @@ void _Scheduler_priority_Yield(
_ISR_Flash( level ); _ISR_Flash( level );
if ( _Thread_Is_heir( executing ) ) if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first; _Thread_Heir = (Thread_Control *) _Chain_First( ready );
_Thread_Dispatch_necessary = true; _Thread_Dispatch_necessary = true;
} }
else if ( !_Thread_Is_heir( executing ) ) else if ( !_Thread_Is_heir( executing ) )

View File

@@ -50,6 +50,8 @@ Thread_Control *_Thread_queue_Dequeue_priority(
ISR_Level level; ISR_Level level;
Thread_Control *the_thread = NULL; /* just to remove warnings */ Thread_Control *the_thread = NULL; /* just to remove warnings */
Thread_Control *new_first_thread; Thread_Control *new_first_thread;
Chain_Node *head;
Chain_Node *tail;
Chain_Node *new_first_node; Chain_Node *new_first_node;
Chain_Node *new_second_node; Chain_Node *new_second_node;
Chain_Node *last_node; Chain_Node *last_node;
@@ -61,8 +63,9 @@ Thread_Control *_Thread_queue_Dequeue_priority(
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) { index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
the_thread = (Thread_Control *) the_thread = (Thread_Control *) _Chain_First(
the_thread_queue->Queues.Priority[ index ].first; &the_thread_queue->Queues.Priority[ index ]
);
goto dequeue; goto dequeue;
} }
} }
@@ -75,13 +78,13 @@ Thread_Control *_Thread_queue_Dequeue_priority(
dequeue: dequeue:
the_thread->Wait.queue = NULL; the_thread->Wait.queue = NULL;
new_first_node = the_thread->Wait.Block2n.first; new_first_node = _Chain_First( &the_thread->Wait.Block2n );
new_first_thread = (Thread_Control *) new_first_node; new_first_thread = (Thread_Control *) new_first_node;
next_node = the_thread->Object.Node.next; next_node = the_thread->Object.Node.next;
previous_node = the_thread->Object.Node.previous; previous_node = the_thread->Object.Node.previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
last_node = the_thread->Wait.Block2n.last; last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next; new_second_node = new_first_node->next;
previous_node->next = new_first_node; previous_node->next = new_first_node;
@@ -91,13 +94,13 @@ dequeue:
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */ /* > two threads on 2-n */
new_second_node->previous = head = _Chain_Head( &new_first_thread->Wait.Block2n );
_Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node; new_second_node->previous = head;
new_first_thread->Wait.Block2n.last = last_node; head->next = new_second_node;
tail->previous = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); last_node->next = tail;
} }
} else { } else {
previous_node->next = next_node; previous_node->next = next_node;

View File

@@ -80,7 +80,7 @@ Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
restart_forward_search: restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1; search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level ); _ISR_Disable( level );
search_thread = (Thread_Control *) header->first; search_thread = (Thread_Control *) _Chain_First( header );
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
search_priority = search_thread->current_priority; search_priority = search_thread->current_priority;
if ( priority <= search_priority ) if ( priority <= search_priority )
@@ -128,7 +128,7 @@ restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1; search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level ); _ISR_Disable( level );
search_thread = (Thread_Control *) header->last; search_thread = (Thread_Control *) _Chain_Last( header );
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
search_priority = search_thread->current_priority; search_priority = search_thread->current_priority;
if ( priority >= search_priority ) if ( priority >= search_priority )

View File

@@ -50,6 +50,8 @@ void _Thread_queue_Extract_priority_helper(
) )
{ {
ISR_Level level; ISR_Level level;
Chain_Node *head;
Chain_Node *tail;
Chain_Node *the_node; Chain_Node *the_node;
Chain_Node *next_node; Chain_Node *next_node;
Chain_Node *previous_node; Chain_Node *previous_node;
@@ -73,9 +75,9 @@ void _Thread_queue_Extract_priority_helper(
previous_node = the_node->previous; previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
new_first_node = the_thread->Wait.Block2n.first; new_first_node = _Chain_First( &the_thread->Wait.Block2n );
new_first_thread = (Thread_Control *) new_first_node; new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last; last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next; new_second_node = new_first_node->next;
previous_node->next = new_first_node; previous_node->next = new_first_node;
@@ -85,12 +87,13 @@ void _Thread_queue_Extract_priority_helper(
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */ /* > two threads on 2-n */
new_second_node->previous = head = _Chain_Head( &new_first_thread->Wait.Block2n );
_Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
new_first_thread->Wait.Block2n.last = last_node; new_second_node->previous = head;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); head->next = new_second_node;
tail->previous = last_node;
last_node->next = tail;
} }
} else { } else {
previous_node->next = next_node; previous_node->next = next_node;

View File

@@ -44,7 +44,7 @@ Thread_Control *_Thread_queue_First_fifo(
) )
{ {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) )
return (Thread_Control *) the_thread_queue->Queues.Fifo.first; return (Thread_Control *) _Chain_First( &the_thread_queue->Queues.Fifo );
return NULL; return NULL;
} }

View File

@@ -49,8 +49,9 @@ Thread_Control *_Thread_queue_First_priority (
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) { index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) )
return (Thread_Control *) return (Thread_Control *) _Chain_First(
the_thread_queue->Queues.Priority[ index ].first; &the_thread_queue->Queues.Priority[ index ]
);
} }
return NULL; return NULL;
} }

View File

@@ -66,7 +66,7 @@ void _Thread_Yield_processor( void )
_ISR_Flash( level ); _ISR_Flash( level );
if ( _Thread_Is_heir( executing ) ) if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first; _Thread_Heir = (Thread_Control *) _Chain_First( ready );
_Thread_Dispatch_necessary = true; _Thread_Dispatch_necessary = true;
} }
else if ( !_Thread_Is_heir( executing ) ) else if ( !_Thread_Is_heir( executing ) )

View File

@@ -31,7 +31,7 @@ void _User_extensions_Thread_begin (
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 = _Chain_First( &_User_extensions_List );
!_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 ) {
@@ -49,7 +49,7 @@ void _User_extensions_Thread_exitted (
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 = _Chain_Last( &_User_extensions_List );
!_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 ) {
@@ -69,7 +69,7 @@ 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 = _Chain_Last( &_User_extensions_List );
!_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 ) {

View File

@@ -32,7 +32,7 @@ bool _User_extensions_Thread_create (
User_extensions_Control *the_extension; User_extensions_Control *the_extension;
bool status; bool status;
for ( the_node = _User_extensions_List.first ; for ( the_node = _Chain_First( &_User_extensions_List );
!_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 ) {

View File

@@ -31,7 +31,7 @@ void _User_extensions_Thread_delete (
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 = _Chain_Last( &_User_extensions_List );
!_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 ) {

View File

@@ -31,7 +31,7 @@ void _User_extensions_Thread_restart (
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 = _Chain_First( &_User_extensions_List );
!_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 ) {

View File

@@ -31,7 +31,7 @@ void _User_extensions_Thread_start (
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 = _Chain_First( &_User_extensions_List );
!_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 ) {

View File

@@ -32,7 +32,7 @@ void _User_extensions_Thread_switch (
Chain_Node *the_node; Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch; User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ; for ( the_node = _Chain_First( &_User_extensions_Switches_list );
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) { the_node = the_node->next ) {

View File

@@ -34,7 +34,7 @@ void _Watchdog_Report_chain(
_ISR_Disable( level ); _ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header ); printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) { if ( !_Chain_Is_empty( header ) ) {
for ( node = header->first ; for ( node = _Chain_First( header ) ;
node != _Chain_Tail(header) ; node != _Chain_Tail(header) ;
node = node->next ) node = node->next )
{ {