000597cc <_CORE_message_queue_Broadcast>: Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 597cc: 4e56 ffe0 linkw %fp,#-32 597d0: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 597d4: 266e 0008 moveal %fp@(8),%a3 597d8: 282e 000c movel %fp@(12),%d4 597dc: 242e 0010 movel %fp@(16),%d2 597e0: 2a2e 001c movel %fp@(28),%d5 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 597e4: b4ab 004c cmpl %a3@(76),%d2 597e8: 6262 bhis 5984c <_CORE_message_queue_Broadcast+0x80> * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 597ea: 4aab 0048 tstl %a3@(72) 597ee: 664c bnes 5983c <_CORE_message_queue_Broadcast+0x70> * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 597f0: 2f0b movel %a3,%sp@- 597f2: 49f9 0005 bd90 lea 5bd90 <_Thread_queue_Dequeue>,%a4 597f8: 4283 clrl %d3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 597fa: 4bf9 0006 19a4 lea 619a4 ,%a5 59800: 4e94 jsr %a4@ /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 59802: 588f addql #4,%sp _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 59804: 2440 moveal %d0,%a2 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 59806: 4a80 tstl %d0 59808: 6722 beqs 5982c <_CORE_message_queue_Broadcast+0x60> 5980a: 2f02 movel %d2,%sp@- _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 5980c: 5283 addql #1,%d3 5980e: 2f04 movel %d4,%sp@- 59810: 2f2a 002c movel %a2@(44),%sp@- 59814: 4e95 jsr %a5@ buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 59816: 206a 0028 moveal %a2@(40),%a0 5981a: 4fef 000c lea %sp@(12),%sp 5981e: 2082 movel %d2,%a0@ * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 59820: 2f0b movel %a3,%sp@- 59822: 4e94 jsr %a4@ /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 59824: 588f addql #4,%sp _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 59826: 2440 moveal %d0,%a2 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 59828: 4a80 tstl %d0 5982a: 66de bnes 5980a <_CORE_message_queue_Broadcast+0x3e> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 5982c: 2045 moveal %d5,%a0 5982e: 4280 clrl %d0 59830: 2083 movel %d3,%a0@ return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 59832: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 59838: 4e5e unlk %fp 5983a: 4e75 rts * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 5983c: 2045 moveal %d5,%a0 5983e: 4280 clrl %d0 #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 59840: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 59846: 4290 clrl %a0@ #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 59848: 4e5e unlk %fp 5984a: 4e75 rts { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 5984c: 7001 moveq #1,%d0 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 5984e: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 <== NOT EXECUTED 59854: 4e5e unlk %fp <== NOT EXECUTED 59856: 4e75 rts 0004fdf8 <_CORE_message_queue_Initialize>: /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 4fdf8: 7203 moveq #3,%d1 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { 4fdfa: 4e56 fff4 linkw %fp,#-12 4fdfe: 202e 0014 movel %fp@(20),%d0 4fe02: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4fe06: 246e 0008 moveal %fp@(8),%a2 4fe0a: 242e 0010 movel %fp@(16),%d2 /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 4fe0e: c280 andl %d0,%d1 ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 4fe10: 2542 0044 movel %d2,%a2@(68) the_message_queue->number_of_pending_messages = 0; 4fe14: 42aa 0048 clrl %a2@(72) the_message_queue->maximum_message_size = maximum_message_size; 4fe18: 2540 004c movel %d0,%a2@(76) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 4fe1c: 4a81 tstl %d1 4fe1e: 6620 bnes 4fe40 <_CORE_message_queue_Initialize+0x48> 4fe20: 2200 movel %d0,%d1 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 4fe22: 2601 movel %d1,%d3 4fe24: 0683 0000 0010 addil #16,%d3 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 4fe2a: 2003 movel %d3,%d0 4fe2c: 4c02 0800 mulsl %d2,%d0 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 4fe30: b280 cmpl %d0,%d1 4fe32: 631c blss 4fe50 <_CORE_message_queue_Initialize+0x58> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4fe34: 4200 clrb %d0 } 4fe36: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4fe3c: 4e5e unlk %fp 4fe3e: 4e75 rts * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { allocated_message_size += sizeof(uint32_t); 4fe40: 2200 movel %d0,%d1 4fe42: 5881 addql #4,%d1 allocated_message_size &= ~(sizeof(uint32_t) - 1); 4fe44: 76fc moveq #-4,%d3 4fe46: c283 andl %d3,%d1 } if (allocated_message_size < maximum_message_size) 4fe48: b280 cmpl %d0,%d1 4fe4a: 64d6 bccs 4fe22 <_CORE_message_queue_Initialize+0x2a> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4fe4c: 4200 clrb %d0 <== NOT EXECUTED 4fe4e: 60e6 bras 4fe36 <_CORE_message_queue_Initialize+0x3e> <== NOT EXECUTED return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4fe50: 2f00 movel %d0,%sp@- 4fe52: 4eb9 0005 2ac0 jsr 52ac0 <_Workspace_Allocate> _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4fe58: 588f addql #4,%sp return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4fe5a: 2540 005c movel %d0,%a2@(92) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4fe5e: 67d4 beqs 4fe34 <_CORE_message_queue_Initialize+0x3c> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 4fe60: 2f03 movel %d3,%sp@- 4fe62: 2f02 movel %d2,%sp@- 4fe64: 2f00 movel %d0,%sp@- 4fe66: 486a 0060 pea %a2@(96) 4fe6a: 4eb9 0005 47d0 jsr 547d0 <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 4fe70: 4878 0006 pea 6 4fe74: 7001 moveq #1,%d0 4fe76: 206e 000c moveal %fp@(12),%a0 4fe7a: b090 cmpl %a0@,%d0 4fe7c: 57c0 seq %d0 4fe7e: 4878 0080 pea 80 4fe82: 49c0 extbl %d0 4fe84: 4480 negl %d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4fe86: 41ea 0054 lea %a2@(84),%a0 4fe8a: 2f00 movel %d0,%sp@- 4fe8c: 2548 0050 movel %a0,%a2@(80) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4fe90: 41ea 0050 lea %a2@(80),%a0 4fe94: 2548 0058 movel %a0,%a2@(88) 4fe98: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4fe9a: 42aa 0054 clrl %a2@(84) 4fe9e: 4eb9 0005 1e98 jsr 51e98 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4fea4: 4fef 0020 lea %sp@(32),%sp } 4fea8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 4feae: 7001 moveq #1,%d0 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 4feb0: 4e5e unlk %fp 4feb2: 4e75 rts 0004b094 <_CORE_mutex_Seize_interrupt_trylock>: #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 4b094: 4e56 0000 linkw %fp,#0 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 4b098: 2279 0005 da0e moveal 5da0e <_Thread_Executing>,%a1 4b09e: 2f0a movel %a2,%sp@- 4b0a0: 206e 0008 moveal %fp@(8),%a0 4b0a4: 246e 000c moveal %fp@(12),%a2 4b0a8: 2f02 movel %d2,%sp@- executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4b0aa: 42a9 0034 clrl %a1@(52) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4b0ae: 4aa8 004e tstl %a0@(78) 4b0b2: 673a beqs 4b0ee <_CORE_mutex_Seize_interrupt_trylock+0x5a> the_mutex->lock = CORE_MUTEX_LOCKED; 4b0b4: 42a8 004e clrl %a0@(78) the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4b0b8: 7201 moveq #1,%d1 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4b0ba: 2169 0008 005e movel %a1@(8),%a0@(94) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 4b0c0: 2028 0046 movel %a0@(70),%d0 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4b0c4: 2141 0052 movel %d1,%a0@(82) if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4b0c8: 123c 0002 moveb #2,%d1 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 4b0cc: 2149 005a movel %a1,%a0@(90) the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4b0d0: b280 cmpl %d0,%d1 4b0d2: 672e beqs 4b102 <_CORE_mutex_Seize_interrupt_trylock+0x6e> 4b0d4: 123c 0003 moveb #3,%d1 4b0d8: b280 cmpl %d0,%d1 4b0da: 674e beqs 4b12a <_CORE_mutex_Seize_interrupt_trylock+0x96> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 4b0dc: 2012 movel %a2@,%d0 4b0de: 46c0 movew %d0,%sr 4b0e0: 4280 clrl %d0 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4b0e2: 242e fff8 movel %fp@(-8),%d2 4b0e6: 246e fffc moveal %fp@(-4),%a2 4b0ea: 4e5e unlk %fp 4b0ec: 4e75 rts /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 4b0ee: b3e8 005a cmpal %a0@(90),%a1 4b0f2: 671a beqs 4b10e <_CORE_mutex_Seize_interrupt_trylock+0x7a> 4b0f4: 242e fff8 movel %fp@(-8),%d2 the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; _ISR_Enable( *level_p ); 4b0f8: 7001 moveq #1,%d0 4b0fa: 246e fffc moveal %fp@(-4),%a2 4b0fe: 4e5e unlk %fp 4b100: 4e75 rts _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4b102: 52a9 001c addql #1,%a1@(28) } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 4b106: 2012 movel %a2@,%d0 4b108: 46c0 movew %d0,%sr 4b10a: 4280 clrl %d0 4b10c: 60d4 bras 4b0e2 <_CORE_mutex_Seize_interrupt_trylock+0x4e> * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4b10e: 2028 0040 movel %a0@(64),%d0 4b112: 6658 bnes 4b16c <_CORE_mutex_Seize_interrupt_trylock+0xd8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 4b114: 52a8 0052 addql #1,%a0@(82) _ISR_Enable( *level_p ); 4b118: 2012 movel %a2@,%d0 4b11a: 46c0 movew %d0,%sr 4b11c: 242e fff8 movel %fp@(-8),%d2 4b120: 4280 clrl %d0 4b122: 246e fffc moveal %fp@(-4),%a2 4b126: 4e5e unlk %fp 4b128: 4e75 rts _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4b12a: 2429 001c movel %a1@(28),%d2 4b12e: 2002 movel %d2,%d0 4b130: 5280 addql #1,%d0 4b132: 2340 001c movel %d0,%a1@(28) { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 4b136: 2029 0014 movel %a1@(20),%d0 */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4b13a: 2228 004a movel %a0@(74),%d1 current = executing->current_priority; if ( current == ceiling ) { 4b13e: b081 cmpl %d1,%d0 4b140: 6700 0082 beqw 4b1c4 <_CORE_mutex_Seize_interrupt_trylock+0x130> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 4b144: 6244 bhis 4b18a <_CORE_mutex_Seize_interrupt_trylock+0xf6> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4b146: 7206 moveq #6,%d1 the_mutex->lock = CORE_MUTEX_UNLOCKED; 4b148: 7001 moveq #1,%d0 ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4b14a: 2341 0034 movel %d1,%a1@(52) the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 4b14e: 42a8 0052 clrl %a0@(82) _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 4b152: 2140 004e movel %d0,%a0@(78) the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4b156: 2342 001c movel %d2,%a1@(28) _ISR_Enable( *level_p ); 4b15a: 2012 movel %a2@,%d0 4b15c: 46c0 movew %d0,%sr 4b15e: 242e fff8 movel %fp@(-8),%d2 4b162: 4280 clrl %d0 4b164: 246e fffc moveal %fp@(-4),%a2 4b168: 4e5e unlk %fp 4b16a: 4e75 rts * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4b16c: 7201 moveq #1,%d1 4b16e: b280 cmpl %d0,%d1 4b170: 6682 bnes 4b0f4 <_CORE_mutex_Seize_interrupt_trylock+0x60> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 4b172: 7002 moveq #2,%d0 <== NOT EXECUTED 4b174: 2340 0034 movel %d0,%a1@(52) <== NOT EXECUTED _ISR_Enable( *level_p ); 4b178: 2012 movel %a2@,%d0 <== NOT EXECUTED 4b17a: 46c0 movew %d0,%sr <== NOT EXECUTED 4b17c: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4b180: 4280 clrl %d0 <== NOT EXECUTED 4b182: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4b186: 4e5e unlk %fp <== NOT EXECUTED 4b188: 4e75 rts <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4b18a: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 4b190: 5280 addql #1,%d0 4b192: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 4b198: 2012 movel %a2@,%d0 4b19a: 46c0 movew %d0,%sr _Thread_Change_priority( 4b19c: 42a7 clrl %sp@- 4b19e: 2f28 004a movel %a0@(74),%sp@- 4b1a2: 2f28 005a movel %a0@(90),%sp@- 4b1a6: 4eb9 0004 781c jsr 4781c <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 4b1ac: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> 4b1b2: 242e fff8 movel %fp@(-8),%d2 4b1b6: 4fef 000c lea %sp@(12),%sp 4b1ba: 4280 clrl %d0 4b1bc: 246e fffc moveal %fp@(-4),%a2 4b1c0: 4e5e unlk %fp 4b1c2: 4e75 rts Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); 4b1c4: 2012 movel %a2@,%d0 4b1c6: 46c0 movew %d0,%sr 4b1c8: 242e fff8 movel %fp@(-8),%d2 4b1cc: 4280 clrl %d0 4b1ce: 246e fffc moveal %fp@(-4),%a2 4b1d2: 4e5e unlk %fp 4b1d4: 4e75 rts ... 00046b10 <_CORE_semaphore_Surrender>: CORE_semaphore_Status _CORE_semaphore_Surrender( CORE_semaphore_Control *the_semaphore, Objects_Id id, CORE_semaphore_API_mp_support_callout api_semaphore_mp_support ) { 46b10: 4e56 0000 linkw %fp,#0 46b14: 2f0a movel %a2,%sp@- 46b16: 246e 0008 moveal %fp@(8),%a2 ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 46b1a: 2f0a movel %a2,%sp@- 46b1c: 4eb9 0004 80a0 jsr 480a0 <_Thread_queue_Dequeue> 46b22: 588f addql #4,%sp 46b24: 4a80 tstl %d0 46b26: 670a beqs 46b32 <_CORE_semaphore_Surrender+0x22> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 46b28: 246e fffc moveal %fp@(-4),%a2 ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 46b2c: 4280 clrl %d0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 46b2e: 4e5e unlk %fp 46b30: 4e75 rts if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 46b32: 203c 0000 0700 movel #1792,%d0 46b38: 40c1 movew %sr,%d1 46b3a: 8081 orl %d1,%d0 46b3c: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 46b3e: 202a 0048 movel %a2@(72),%d0 46b42: b0aa 0040 cmpl %a2@(64),%d0 46b46: 6412 bccs 46b5a <_CORE_semaphore_Surrender+0x4a> the_semaphore->count += 1; 46b48: 5280 addql #1,%d0 46b4a: 2540 0048 movel %d0,%a2@(72) 46b4e: 4280 clrl %d0 else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 46b50: 46c1 movew %d1,%sr } return status; } 46b52: 246e fffc moveal %fp@(-4),%a2 46b56: 4e5e unlk %fp 46b58: 4e75 rts (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 46b5a: 7004 moveq #4,%d0 <== NOT EXECUTED the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 46b5c: 46c1 movew %d1,%sr <== NOT EXECUTED 46b5e: 60f2 bras 46b52 <_CORE_semaphore_Surrender+0x42> <== NOT EXECUTED 000503a4 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 503a4: 4e56 fff4 linkw %fp,#-12 503a8: 206e 0008 moveal %fp@(8),%a0 503ac: 202e 000c movel %fp@(12),%d0 Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; 503b0: 2228 001c movel %a0@(28),%d1 uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block; 503b4: 2268 0024 moveal %a0@(36),%a1 Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 503b8: 48d7 040c moveml %d2-%d3/%a2,%sp@ Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; 503bc: b0a8 0018 cmpl %a0@(24),%d0 503c0: 6410 bccs 503d2 <_Heap_Extend+0x2e> * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 503c2: b280 cmpl %d0,%d1 503c4: 671c beqs 503e2 <_Heap_Extend+0x3e> 503c6: 7002 moveq #2,%d0 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 503c8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 503ce: 4e5e unlk %fp 503d0: 4e75 rts * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { 503d2: b280 cmpl %d0,%d1 503d4: 63ec blss 503c2 <_Heap_Extend+0x1e> 503d6: 7001 moveq #1,%d0 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 503d8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 503de: 4e5e unlk %fp 503e0: 4e75 rts { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; 503e2: 2200 movel %d0,%d1 503e4: d2ae 0010 addl %fp@(16),%d1 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end 503e8: 70f8 moveq #-8,%d0 503ea: 9089 subl %a1,%d0 503ec: d081 addl %d1,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 503ee: 2600 movel %d0,%d3 503f0: 4c68 3002 0010 remul %a0@(16),%d2,%d3 * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ heap->area_end = new_heap_area_end; 503f6: 2141 001c movel %d1,%a0@(28) extend_size = new_heap_area_end - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; 503fa: 246e 0014 moveal %fp@(20),%a2 503fe: 9082 subl %d2,%d0 50400: 2480 movel %d0,%a2@ if( extend_size >= heap->min_block_size ) { 50402: b0a8 0014 cmpl %a0@(20),%d0 50406: 640c bccs 50414 <_Heap_Extend+0x70> /* Statistics */ stats->size += extend_size; ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 50408: 4280 clrl %d0 <== NOT EXECUTED } return HEAP_EXTEND_SUCCESSFUL; } 5040a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 50410: 4e5e unlk %fp 50412: 4e75 rts uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 50414: 7401 moveq #1,%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 50416: 45f1 0800 lea %a1@(00000000,%d0:l),%a2 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 5041a: c4a9 0004 andl %a1@(4),%d2 if( extend_size >= heap->min_block_size ) { Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 5041e: 2228 0020 movel %a0@(32),%d1 50422: 928a subl %a2,%d1 50424: 8480 orl %d0,%d2 ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 50426: 214a 0024 movel %a2,%a0@(36) 5042a: 2342 0004 movel %d2,%a1@(4) if( extend_size >= heap->min_block_size ) { Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 5042e: 7401 moveq #1,%d2 50430: 8481 orl %d1,%d2 50432: 2542 0004 movel %d2,%a2@(4) /* Statistics */ stats->size += extend_size; ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 50436: 4869 0008 pea %a1@(8) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 5043a: d1a8 002c addl %d0,%a0@(44) ++stats->used_blocks; 5043e: 52a8 0040 addql #1,%a0@(64) --stats->frees; /* Do not count subsequent call as actual free() */ 50442: 53a8 0050 subql #1,%a0@(80) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 50446: 2f08 movel %a0,%sp@- 50448: 4eb9 0004 b51c jsr 4b51c <_Heap_Free> 5044e: 508f addql #8,%sp 50450: 4280 clrl %d0 50452: 60b6 bras 5040a <_Heap_Extend+0x66> 0007ac88 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 7ac88: 4e56 fff4 linkw %fp,#-12 7ac8c: 206e 0008 moveal %fp@(8),%a0 7ac90: 48d7 040c moveml %d2-%d3/%a2,%sp@ 7ac94: 246e 000c moveal %fp@(12),%a2 Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; 7ac98: 2428 0024 movel %a0@(36),%d2 void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->first_block; 7ac9c: 2268 0020 moveal %a0@(32),%a1 Heap_Block *const end = the_heap->last_block; _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 7aca0: 4292 clrl %a2@ the_info->Free.total = 0; 7aca2: 42aa 0008 clrl %a2@(8) the_info->Free.largest = 0; 7aca6: 42aa 0004 clrl %a2@(4) the_info->Used.number = 0; 7acaa: 42aa 000c clrl %a2@(12) the_info->Used.total = 0; 7acae: 42aa 0014 clrl %a2@(20) the_info->Used.largest = 0; 7acb2: 42aa 0010 clrl %a2@(16) while ( the_block != end ) { 7acb6: b489 cmpl %a1,%d2 7acb8: 6746 beqs 7ad00 <_Heap_Get_information+0x78> uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; 7acba: 260a movel %a2,%d3 7acbc: 0683 0000 000c addil #12,%d3 the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 7acc2: 2229 0004 movel %a1@(4),%d1 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 7acc6: 70fe moveq #-2,%d0 uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) 7acc8: 204a moveal %a2,%a0 7acca: c081 andl %d1,%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 7accc: d3c0 addal %d0,%a1 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 7acce: 2229 0004 movel %a1@(4),%d1 7acd2: 0801 0000 btst #0,%d1 7acd6: 6702 beqs 7acda <_Heap_Get_information+0x52> 7acd8: 2043 moveal %d3,%a0 info = &the_info->Used; else info = &the_info->Free; info->number++; 7acda: 5290 addql #1,%a0@ info->total += the_size; 7acdc: d1a8 0008 addl %d0,%a0@(8) if ( info->largest < the_size ) 7ace0: b0a8 0004 cmpl %a0@(4),%d0 7ace4: 6304 blss 7acea <_Heap_Get_information+0x62> info->largest = the_size; 7ace6: 2140 0004 movel %d0,%a0@(4) the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 7acea: b3c2 cmpal %d2,%a1 7acec: 66d8 bnes 7acc6 <_Heap_Get_information+0x3e> 7acee: 202a 0014 movel %a2@(20),%d0 7acf2: 5080 addql #8,%d0 /* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE; 7acf4: 2540 0014 movel %d0,%a2@(20) } 7acf8: 4cd7 040c moveml %sp@,%d2-%d3/%a2 7acfc: 4e5e unlk %fp 7acfe: 4e75 rts the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 7ad00: 7008 moveq #8,%d0 <== NOT EXECUTED /* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE; 7ad02: 2540 0014 movel %d0,%a2@(20) <== NOT EXECUTED } 7ad06: 4cd7 040c moveml %sp@,%d2-%d3/%a2 <== NOT EXECUTED 7ad0a: 4e5e unlk %fp <== NOT EXECUTED 7ad0c: 4e75 rts <== NOT EXECUTED ... 00046f70 <_Internal_error_Occurred>: _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46f70: 4280 clrl %d0 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 46f72: 4e56 0000 linkw %fp,#0 46f76: 222e 000c movel %fp@(12),%d1 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46f7a: 1001 moveb %d1,%d0 46f7c: 2040 moveal %d0,%a0 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 46f7e: 2f03 movel %d3,%sp@- 46f80: 202e 0008 movel %fp@(8),%d0 46f84: 2f02 movel %d2,%sp@- 46f86: 242e 0010 movel %fp@(16),%d2 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46f8a: 2f02 movel %d2,%sp@- Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; 46f8c: 13c1 0005 d9fe moveb %d1,5d9fe <_Internal_errors_What_happened+0x4> _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46f92: 2f08 movel %a0,%sp@- bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 46f94: 23c0 0005 d9fa movel %d0,5d9fa <_Internal_errors_What_happened> _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46f9a: 2f00 movel %d0,%sp@- ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; 46f9c: 23c2 0005 da00 movel %d2,5da00 <_Internal_errors_What_happened+0x6> _User_extensions_Fatal( the_source, is_internal, the_error ); 46fa2: 4eb9 0004 8ca2 jsr 48ca2 <_User_extensions_Fatal> _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 46fa8: 307c 0700 moveaw #1792,%a0 46fac: 2608 movel %a0,%d3 46fae: 40c0 movew %sr,%d0 46fb0: 8083 orl %d3,%d0 46fb2: 46c0 movew %d0,%sr 46fb4: 2002 movel %d2,%d0 <== NOT EXECUTED 46fb6: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 46fbc: 4ac8 halt <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 46fbe: 7005 moveq #5,%d0 46fc0: 4fef 000c lea %sp@(12),%sp 46fc4: 23c0 0005 dad6 movel %d0,5dad6 <_System_state_Current> 46fca: 60fe bras 46fca <_Internal_error_Occurred+0x5a> 00047034 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 47034: 4e56 fff0 linkw %fp,#-16 47038: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4703c: 246e 0008 moveal %fp@(8),%a2 * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) 47040: 4aaa 0014 tstl %a2@(20) 47044: 660c bnes 47052 <_Objects_Allocate+0x1e> 47046: 4280 clrl %d0 <== NOT EXECUTED information->inactive--; } } return the_object; } 47048: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4704e: 4e5e unlk %fp 47050: 4e75 rts /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 47052: 240a movel %a2,%d2 47054: 0682 0000 001c addil #28,%d2 4705a: 47f9 0004 b010 lea 4b010 <_Chain_Get>,%a3 47060: 2f02 movel %d2,%sp@- 47062: 4e93 jsr %a3@ if ( information->auto_extend ) { 47064: 588f addql #4,%sp 47066: 4a2a 0010 tstb %a2@(16) 4706a: 67dc beqs 47048 <_Objects_Allocate+0x14> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 4706c: 4a80 tstl %d0 4706e: 6738 beqs 470a8 <_Objects_Allocate+0x74> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47070: 2040 moveal %d0,%a0 47072: 4281 clrl %d1 47074: 4283 clrl %d3 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 47076: 4282 clrl %d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47078: 362a 0008 movew %a2@(8),%d3 4707c: 3228 000a movew %a0@(10),%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; 47080: 306a 0028 moveaw %a2@(40),%a0 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 47084: 342a 0012 movew %a2@(18),%d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47088: 9283 subl %d3,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; 4708a: 5388 subql #1,%a0 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 4708c: 4c42 1001 remul %d2,%d1,%d1 information->inactive--; 47090: 3548 0028 movew %a0,%a2@(40) block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 47094: 206a 002a moveal %a2@(42),%a0 47098: e589 lsll #2,%d1 information->inactive--; } } return the_object; } 4709a: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 470a0: 4e5e unlk %fp block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 470a2: d1c1 addal %d1,%a0 470a4: 5390 subql #1,%a0@ information->inactive--; } } return the_object; } 470a6: 4e75 rts * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 470a8: 2f0a movel %a2,%sp@- 470aa: 4eb9 0004 70f0 jsr 470f0 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 470b0: 2f02 movel %d2,%sp@- 470b2: 4e93 jsr %a3@ } if ( the_object ) { 470b4: 508f addql #8,%sp 470b6: 4a80 tstl %d0 470b8: 66b6 bnes 47070 <_Objects_Allocate+0x3c> information->inactive--; } } return the_object; } 470ba: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 470c0: 4e5e unlk %fp 470c2: 4e75 rts 000470f0 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 470f0: 4e56 ffcc linkw %fp,#-52 470f4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 470f8: 246e 0008 moveal %fp@(8),%a2 /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); 470fc: 4285 clrl %d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 470fe: 206a 002e moveal %a2@(46),%a0 /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); 47102: 3a2a 0008 movew %a2@(8),%d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 47106: 4a88 tstl %a0 47108: 6700 022c beqw 47336 <_Objects_Extend_information+0x246> block_count = 0; else { block_count = information->maximum / information->allocation_size; 4710c: 322a 000e movew %a2@(14),%d1 47110: 302a 0012 movew %a2@(18),%d0 47114: 3801 movew %d1,%d4 47116: 0284 0000 ffff andil #65535,%d4 4711c: 88c0 divuw %d0,%d4 4711e: 0284 0000 ffff andil #65535,%d4 for ( ; block < block_count; block++ ) { 47124: 6700 0224 beqw 4734a <_Objects_Extend_information+0x25a> if ( information->object_blocks[ block ] == NULL ) 47128: 4a90 tstl %a0@ 4712a: 6700 021e beqw 4734a <_Objects_Extend_information+0x25a> 4712e: 5888 addql #4,%a0 47130: 2605 movel %d5,%d3 47132: 4282 clrl %d2 47134: 0280 0000 ffff andil #65535,%d0 break; else index_base += information->allocation_size; 4713a: d680 addl %d0,%d3 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 4713c: 5282 addql #1,%d2 4713e: b484 cmpl %d4,%d2 47140: 6404 bccs 47146 <_Objects_Extend_information+0x56> if ( information->object_blocks[ block ] == NULL ) 47142: 4a98 tstl %a0@+ 47144: 66f4 bnes 4713a <_Objects_Extend_information+0x4a> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 47146: 0281 0000 ffff andil #65535,%d1 4714c: 2641 moveal %d1,%a3 4714e: d7c0 addal %d0,%a3 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 47150: b7fc 0000 ffff cmpal #65535,%a3 47156: 6200 0186 bhiw 472de <_Objects_Extend_information+0x1ee> /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 4715a: 41ea 0014 lea %a2@(20),%a0 4715e: 4c10 0800 mulsl %a0@,%d0 if ( information->auto_extend ) { 47162: 4a2a 0010 tstb %a2@(16) 47166: 6700 0180 beqw 472e8 <_Objects_Extend_information+0x1f8> new_object_block = _Workspace_Allocate( block_size ); 4716a: 2f00 movel %d0,%sp@- 4716c: 4eb9 0004 90a4 jsr 490a4 <_Workspace_Allocate> if ( !new_object_block ) 47172: 588f addql #4,%sp * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); 47174: 2c00 movel %d0,%d6 if ( !new_object_block ) 47176: 6700 0166 beqw 472de <_Objects_Extend_information+0x1ee> } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 4717a: 4280 clrl %d0 4717c: 302a 000e movew %a2@(14),%d0 47180: b083 cmpl %d3,%d0 47182: 6200 00c4 bhiw 47248 <_Objects_Extend_information+0x158> */ /* * Up the block count and maximum */ block_count++; 47186: 2a44 moveal %d4,%a5 47188: 528d addql #1,%a5 * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 4718a: 200b movel %a3,%d0 4718c: 41f5 da00 lea %a5@(00000000,%a5:l:2),%a0 47190: d088 addl %a0,%d0 47192: d085 addl %d5,%d0 47194: e588 lsll #2,%d0 47196: 2f00 movel %d0,%sp@- 47198: 4eb9 0004 90a4 jsr 490a4 <_Workspace_Allocate> if ( !object_blocks ) { 4719e: 588f addql #4,%sp * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 471a0: 2840 moveal %d0,%a4 if ( !object_blocks ) { 471a2: 4a80 tstl %d0 471a4: 6700 01b2 beqw 47358 <_Objects_Extend_information+0x268> } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 471a8: 2e0d movel %a5,%d7 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 471aa: 4280 clrl %d0 } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 471ac: e58f lsll #2,%d7 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 471ae: 302a 000e movew %a2@(14),%d0 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 471b2: 4bf4 7800 lea %a4@(00000000,%d7:l),%a5 471b6: de8d addl %a5,%d7 471b8: b085 cmpl %d5,%d0 471ba: 6200 013c bhiw 472f8 <_Objects_Extend_information+0x208> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 471be: 4a85 tstl %d5 471c0: 670c beqs 471ce <_Objects_Extend_information+0xde> information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 471c2: 2047 moveal %d7,%a0 471c4: 4280 clrl %d0 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 471c6: 4298 clrl %a0@+ } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 471c8: 5280 addql #1,%d0 471ca: b085 cmpl %d5,%d0 471cc: 65f8 bcss 471c6 <_Objects_Extend_information+0xd6> 471ce: e58c lsll #2,%d4 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 471d0: 4281 clrl %d1 471d2: 322a 0012 movew %a2@(18),%d1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 471d6: 42b5 4800 clrl %a5@(00000000,%d4:l) for ( index=index_base ; index < ( information->allocation_size + index_base ); 471da: d283 addl %d3,%d1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 471dc: 42b4 4800 clrl %a4@(00000000,%d4:l) inactive_per_block[block_count] = 0; for ( index=index_base ; 471e0: b283 cmpl %d3,%d1 471e2: 6310 blss 471f4 <_Objects_Extend_information+0x104> 471e4: 2247 moveal %d7,%a1 471e6: 2003 movel %d3,%d0 471e8: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 471ec: 4298 clrl %a0@+ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 471ee: 5280 addql #1,%d0 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 471f0: b280 cmpl %d0,%d1 471f2: 62f8 bhis 471ec <_Objects_Extend_information+0xfc> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 471f4: 203c 0000 0700 movel #1792,%d0 471fa: 40c4 movew %sr,%d4 471fc: 8084 orl %d4,%d0 471fe: 46c0 movew %d0,%sr information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 47200: 2012 movel %a2@,%d0 47202: 7218 moveq #24,%d1 47204: 4285 clrl %d5 47206: e3a8 lsll %d1,%d0 47208: 3a0b movew %a3,%d5 4720a: 4281 clrl %d1 4720c: 2245 moveal %d5,%a1 4720e: 7a1b moveq #27,%d5 47210: 322a 0004 movew %a2@(4),%d1 47214: 08c0 0010 bset #16,%d0 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 47218: 206a 002e moveal %a2@(46),%a0 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 4721c: eba9 lsll %d5,%d1 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 4721e: 354b 000e movew %a3,%a2@(14) _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 47222: 254c 002e movel %a4,%a2@(46) information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 47226: 8081 orl %d1,%d0 47228: 2209 movel %a1,%d1 4722a: 8280 orl %d0,%d1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 4722c: 254d 002a movel %a5,%a2@(42) information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 47230: 2541 000a movel %d1,%a2@(10) old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 47234: 2547 0018 movel %d7,%a2@(24) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 47238: 46c4 movew %d4,%sr if ( old_tables ) 4723a: 4a88 tstl %a0 4723c: 670a beqs 47248 <_Objects_Extend_information+0x158> _Workspace_Free( old_tables ); 4723e: 2f08 movel %a0,%sp@- 47240: 4eb9 0004 90c0 jsr 490c0 <_Workspace_Free> 47246: 588f addql #4,%sp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 47248: 206a 002e moveal %a2@(46),%a0 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 4724c: 4280 clrl %d0 4724e: 280e movel %fp,%d4 47250: 0684 ffff fff4 addil #-12,%d4 47256: 47f9 0004 b010 lea 4b010 <_Chain_Get>,%a3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 4725c: 2a0a movel %a2,%d5 4725e: 0685 0000 001c addil #28,%d5 47264: 49f9 0004 673c lea 4673c <_Chain_Append>,%a4 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 4726a: e58a lsll #2,%d2 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 4726c: 302a 0012 movew %a2@(18),%d0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 47270: 2186 2800 movel %d6,%a0@(00000000,%d2:l) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 47274: 2f2a 0014 movel %a2@(20),%sp@- 47278: 2f00 movel %d0,%sp@- 4727a: 2f06 movel %d6,%sp@- 4727c: 2f04 movel %d4,%sp@- 4727e: 4eb9 0004 b04c jsr 4b04c <_Chain_Initialize> /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 47284: 4fef 0010 lea %sp@(16),%sp 47288: 2f04 movel %d4,%sp@- 4728a: 4e93 jsr %a3@ 4728c: 588f addql #4,%sp 4728e: 4a80 tstl %d0 47290: 6732 beqs 472c4 <_Objects_Extend_information+0x1d4> the_object->id = _Objects_Build_id( 47292: 2212 movel %a2@,%d1 47294: 7c18 moveq #24,%d6 47296: 7e1b moveq #27,%d7 47298: 2040 moveal %d0,%a0 4729a: eda9 lsll %d6,%d1 4729c: 4286 clrl %d6 4729e: 3c2a 0004 movew %a2@(4),%d6 472a2: 08c1 0010 bset #16,%d1 472a6: efae lsll %d7,%d6 472a8: 8286 orl %d6,%d1 472aa: 8283 orl %d3,%d1 index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 472ac: 5283 addql #1,%d3 */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 472ae: 2141 0008 movel %d1,%a0@(8) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 472b2: 2f00 movel %d0,%sp@- 472b4: 2f05 movel %d5,%sp@- 472b6: 4e94 jsr %a4@ index++; 472b8: 508f addql #8,%sp /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 472ba: 2f04 movel %d4,%sp@- 472bc: 4e93 jsr %a3@ 472be: 588f addql #4,%sp 472c0: 4a80 tstl %d0 472c2: 66ce bnes 47292 <_Objects_Extend_information+0x1a2> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 472c4: 4280 clrl %d0 information->inactive = 472c6: 322a 0028 movew %a2@(40),%d1 472ca: 326a 0012 moveaw %a2@(18),%a1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 472ce: 206a 002a moveal %a2@(42),%a0 information->inactive = 472d2: d289 addl %a1,%d1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 472d4: 3009 movew %a1,%d0 information->inactive = 472d6: 3541 0028 movew %d1,%a2@(40) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 472da: 2180 2800 movel %d0,%a0@(00000000,%d2:l) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 472de: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 472e4: 4e5e unlk %fp 472e6: 4e75 rts if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 472e8: 2f00 movel %d0,%sp@- 472ea: 4eb9 0004 9070 jsr 49070 <_Workspace_Allocate_or_fatal_error> 472f0: 588f addql #4,%sp 472f2: 2c00 movel %d0,%d6 472f4: 6000 fe84 braw 4717a <_Objects_Extend_information+0x8a> /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 472f8: e58c lsll #2,%d4 472fa: 2f04 movel %d4,%sp@- 472fc: 2f2a 002e movel %a2@(46),%sp@- 47300: 2f0c movel %a4,%sp@- 47302: 4eb9 0004 e024 jsr 4e024 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 47308: 2f04 movel %d4,%sp@- 4730a: 2f2a 002a movel %a2@(42),%sp@- 4730e: 2f0d movel %a5,%sp@- 47310: 4eb9 0004 e024 jsr 4e024 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 47316: 4280 clrl %d0 47318: 302a 000e movew %a2@(14),%d0 4731c: da80 addl %d0,%d5 4731e: e58d lsll #2,%d5 47320: 2f05 movel %d5,%sp@- 47322: 2f2a 0018 movel %a2@(24),%sp@- 47326: 2f07 movel %d7,%sp@- 47328: 4eb9 0004 e024 jsr 4e024 4732e: 4fef 0024 lea %sp@(36),%sp 47332: 6000 fe9c braw 471d0 <_Objects_Extend_information+0xe0> minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 47336: 4280 clrl %d0 47338: 2605 movel %d5,%d3 4733a: 4282 clrl %d2 4733c: 4284 clrl %d4 4733e: 322a 000e movew %a2@(14),%d1 47342: 302a 0012 movew %a2@(18),%d0 47346: 6000 fdfe braw 47146 <_Objects_Extend_information+0x56> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 4734a: 2605 movel %d5,%d3 <== NOT EXECUTED 4734c: 4282 clrl %d2 <== NOT EXECUTED 4734e: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED 47354: 6000 fdf0 braw 47146 <_Objects_Extend_information+0x56> <== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 47358: 2f06 movel %d6,%sp@- 4735a: 4eb9 0004 90c0 jsr 490c0 <_Workspace_Free> return; 47360: 588f addql #4,%sp } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 47362: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 47368: 4e5e unlk %fp 4736a: 4e75 rts 0004753c <_Objects_Initialize_information>: information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 4753c: 41f9 0005 d90c lea 5d90c <_Objects_Information_table>,%a0 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 47542: 4e56 fff0 linkw %fp,#-16 47546: 202e 000c movel %fp@(12),%d0 information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 4754a: 2270 0c00 moveal %a0@(00000000,%d0:l:4),%a1 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 4754e: 48d7 003c moveml %d2-%d5,%sp@ 47552: 222e 0014 movel %fp@(20),%d1 47556: 4285 clrl %d5 /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 47558: 2601 movel %d1,%d3 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 4755a: 206e 0008 moveal %fp@(8),%a0 information->the_class = the_class; information->size = size; information->local_table = 0; information->inactive_per_block = 0; information->object_blocks = 0; information->inactive = 0; 4755e: 4244 clrw %d4 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 47560: 3a2e 001a movew %fp@(26),%d5 47564: 242e 0010 movel %fp@(16),%d2 /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 47568: d683 addl %d3,%d3 4756a: 9783 subxl %d3,%d3 4756c: 4483 negl %d3 information->the_class = the_class; information->size = size; information->local_table = 0; information->inactive_per_block = 0; information->object_blocks = 0; information->inactive = 0; 4756e: 3144 0028 movew %d4,%a0@(40) /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; 47572: 3144 000e movew %d4,%a0@(14) , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 47576: 282e 0020 movel %fp@(32),%d4 #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; 4757a: 3142 0004 movew %d2,%a0@(4) _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 4757e: 1143 0010 moveb %d3,%a0@(16) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->size = size; 47582: 2145 0014 movel %d5,%a0@(20) information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 47586: 2388 2c00 movel %a0,%a1@(00000000,%d2:l:4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 4758a: 0881 001f bclr #31,%d1 uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 4758e: 2080 movel %d0,%a0@ information->the_class = the_class; information->size = size; information->local_table = 0; 47590: 42a8 0018 clrl %a0@(24) information->inactive_per_block = 0; 47594: 42a8 002a clrl %a0@(42) information->object_blocks = 0; 47598: 42a8 002e clrl %a0@(46) maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 4759c: 4a03 tstb %d3 4759e: 6706 beqs 475a6 <_Objects_Initialize_information+0x6a> 475a0: 4a81 tstl %d1 475a2: 6700 0092 beqw 47636 <_Objects_Initialize_information+0xfa> /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 475a6: 7a18 moveq #24,%d5 475a8: 4a81 tstl %d1 475aa: 56c3 sne %d3 475ac: eba8 lsll %d5,%d0 475ae: 1a3c 001b moveb #27,%d5 475b2: 49c3 extbl %d3 475b4: 4483 negl %d3 information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 475b6: 43f9 0005 d0fc lea 5d0fc ,%a1 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 475bc: ebaa lsll %d5,%d2 475be: 08c0 0010 bset #16,%d0 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 475c2: 1a3c 0003 moveb #3,%d5 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 475c6: 8082 orl %d2,%d0 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 475c8: ca84 andl %d4,%d5 } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 475ca: 3141 0012 movew %d1,%a0@(18) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 475ce: 8083 orl %d3,%d0 information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 475d0: 2149 0018 movel %a1,%a0@(24) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 475d4: 2140 0006 movel %d0,%a0@(6) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 475d8: 4a85 tstl %d5 475da: 6626 bnes 47602 <_Objects_Initialize_information+0xc6> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 475dc: 43e8 0020 lea %a0@(32),%a1 475e0: 2149 001c movel %a1,%a0@(28) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 475e4: 43e8 001c lea %a0@(28),%a1 name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 475e8: 3144 0032 movew %d4,%a0@(50) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 475ec: 42a8 0020 clrl %a0@(32) the_chain->last = _Chain_Head(the_chain); 475f0: 2149 0024 movel %a1,%a0@(36) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 475f4: 4a81 tstl %d1 475f6: 662c bnes 47624 <_Objects_Initialize_information+0xe8> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 475f8: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 475fe: 4e5e unlk %fp 47600: 4e75 rts * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 47602: 5884 addql #4,%d4 <== NOT EXECUTED 47604: 70fc moveq #-4,%d0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 47606: 43e8 0020 lea %a0@(32),%a1 <== NOT EXECUTED 4760a: c880 andl %d0,%d4 <== NOT EXECUTED 4760c: 2149 001c movel %a1,%a0@(28) <== NOT EXECUTED the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 47610: 43e8 001c lea %a0@(28),%a1 <== NOT EXECUTED ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 47614: 3144 0032 movew %d4,%a0@(50) <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 47618: 42a8 0020 clrl %a0@(32) <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 4761c: 2149 0024 movel %a1,%a0@(36) <== NOT EXECUTED _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 47620: 4a81 tstl %d1 <== NOT EXECUTED 47622: 67d4 beqs 475f8 <_Objects_Initialize_information+0xbc> <== NOT EXECUTED /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 47624: 2d48 0008 movel %a0,%fp@(8) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 47628: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 4762e: 4e5e unlk %fp /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 47630: 4ef9 0004 70f0 jmp 470f0 <_Objects_Extend_information> /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 47636: 4878 0014 pea 14 4763a: 4878 0001 pea 1 4763e: 42a7 clrl %sp@- 47640: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred> ... 000476d8 <_Objects_Shrink_information>: /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / 476d8: 4281 clrl %d1 */ void _Objects_Shrink_information( Objects_Information *information ) { 476da: 4e56 ffec linkw %fp,#-20 476de: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 476e2: 246e 0008 moveal %fp@(8),%a2 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 476e6: 4283 clrl %d3 block_count = (information->maximum - index_base) / 476e8: 4284 clrl %d4 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 476ea: 362a 0008 movew %a2@(8),%d3 block_count = (information->maximum - index_base) / 476ee: 382a 000e movew %a2@(14),%d4 476f2: 322a 0012 movew %a2@(18),%d1 476f6: 9883 subl %d3,%d4 476f8: 4c41 4004 remul %d1,%d4,%d4 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 476fc: 672c beqs 4772a <_Objects_Shrink_information+0x52> if ( information->inactive_per_block[ block ] == 476fe: 226a 002a moveal %a2@(42),%a1 47702: b291 cmpl %a1@,%d1 47704: 672e beqs 47734 <_Objects_Shrink_information+0x5c> information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 47706: 7404 moveq #4,%d2 47708: 4280 clrl %d0 } index_base += information->allocation_size; 4770a: 2042 moveal %d2,%a0 4770c: d681 addl %d1,%d3 4770e: 5888 addql #4,%a0 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 47710: 5280 addql #1,%d0 47712: b084 cmpl %d4,%d0 47714: 6414 bccs 4772a <_Objects_Shrink_information+0x52> if ( information->inactive_per_block[ block ] == 47716: b2b1 2800 cmpl %a1@(00000000,%d2:l),%d1 4771a: 671a beqs 47736 <_Objects_Shrink_information+0x5e> 4771c: 2408 movel %a0,%d2 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 4771e: 2042 moveal %d2,%a0 47720: d681 addl %d1,%d3 47722: 5888 addql #4,%a0 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 47724: 5280 addql #1,%d0 47726: b084 cmpl %d4,%d0 47728: 65ec bcss 47716 <_Objects_Shrink_information+0x3e> return; } index_base += information->allocation_size; } } 4772a: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 47730: 4e5e unlk %fp 47732: 4e75 rts index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 47734: 4282 clrl %d2 <== NOT EXECUTED information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 47736: 206a 001c moveal %a2@(28),%a0 */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 4773a: 47f9 0004 afe8 lea 4afe8 <_Chain_Extract>,%a3 * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id ); 47740: 4280 clrl %d0 47742: 3028 000a movew %a0@(10),%d0 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 47746: 2810 movel %a0@,%d4 if ((index >= index_base) && 47748: b680 cmpl %d0,%d3 4774a: 620c bhis 47758 <_Objects_Shrink_information+0x80> (index < (index_base + information->allocation_size))) { 4774c: 4281 clrl %d1 4774e: 322a 0012 movew %a2@(18),%d1 47752: d283 addl %d3,%d1 47754: b280 cmpl %d0,%d1 47756: 623e bhis 47796 <_Objects_Shrink_information+0xbe> _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 47758: 2044 moveal %d4,%a0 4775a: 4a84 tstl %d4 4775c: 66e2 bnes 47740 <_Objects_Shrink_information+0x68> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 4775e: 206a 002e moveal %a2@(46),%a0 47762: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 47766: 4eb9 0004 90c0 jsr 490c0 <_Workspace_Free> information->object_blocks[ block ] = NULL; 4776c: 206a 002e moveal %a2@(46),%a0 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 47770: 588f addql #4,%sp _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 47772: 302a 0028 movew %a2@(40),%d0 47776: 322a 0012 movew %a2@(18),%d1 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 4777a: 226a 002a moveal %a2@(42),%a1 information->inactive -= information->allocation_size; 4777e: 9081 subl %d1,%d0 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 47780: 42b1 2800 clrl %a1@(00000000,%d2:l) /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 47784: 42b0 2800 clrl %a0@(00000000,%d2:l) information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 47788: 3540 0028 movew %d0,%a2@(40) return; } index_base += information->allocation_size; } } 4778c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 47792: 4e5e unlk %fp 47794: 4e75 rts */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 47796: 2f08 movel %a0,%sp@- 47798: 4e93 jsr %a3@ 4779a: 588f addql #4,%sp } } while ( the_object ); 4779c: 2044 moveal %d4,%a0 4779e: 4a84 tstl %d4 477a0: 669e bnes 47740 <_Objects_Shrink_information+0x68> 477a2: 60ba bras 4775e <_Objects_Shrink_information+0x86> 0004adae <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 4adae: 4e56 ffec linkw %fp,#-20 4adb2: 206e 0008 moveal %fp@(8),%a0 4adb6: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4adba: 2468 0108 moveal %a0@(264),%a2 if ( !api ) 4adbe: 4a8a tstl %a2 4adc0: 671a beqs 4addc <_RTEMS_tasks_Post_switch_extension+0x2e> * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 4adc2: 203c 0000 0700 movel #1792,%d0 4adc8: 40c1 movew %sr,%d1 4adca: 8081 orl %d1,%d0 4adcc: 46c0 movew %d0,%sr signal_set = asr->signals_posted; 4adce: 242a 0012 movel %a2@(18),%d2 asr->signals_posted = 0; 4add2: 42aa 0012 clrl %a2@(18) _ISR_Enable( level ); 4add6: 46c1 movew %d1,%sr if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 4add8: 4a82 tstl %d2 4adda: 660a bnes 4ade6 <_RTEMS_tasks_Post_switch_extension+0x38> (*asr->handler)( signal_set ); asr->nest_level -= 1; rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); } 4addc: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 4ade2: 4e5e unlk %fp <== NOT EXECUTED 4ade4: 4e75 rts <== NOT EXECUTED if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4ade6: 52aa 001a addql #1,%a2@(26) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4adea: 260e movel %fp,%d3 4adec: 5983 subql #4,%d3 4adee: 47f9 0004 cd24 lea 4cd24 ,%a3 4adf4: 2f03 movel %d3,%sp@- 4adf6: 2f3c 0000 ffff movel #65535,%sp@- 4adfc: 2f2a 000e movel %a2@(14),%sp@- 4ae00: 4e93 jsr %a3@ (*asr->handler)( signal_set ); 4ae02: 2f02 movel %d2,%sp@- 4ae04: 206a 000a moveal %a2@(10),%a0 4ae08: 4e90 jsr %a0@ asr->nest_level -= 1; 4ae0a: 53aa 001a subql #1,%a2@(26) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4ae0e: 2f03 movel %d3,%sp@- 4ae10: 2f3c 0000 ffff movel #65535,%sp@- 4ae16: 2f2e fffc movel %fp@(-4),%sp@- 4ae1a: 4e93 jsr %a3@ 4ae1c: 4fef 001c lea %sp@(28),%sp } 4ae20: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4ae26: 4e5e unlk %fp 4ae28: 4e75 rts 00047968 <_Thread_Clear_state>: ) { ISR_Level level; States_Control current_state; _ISR_Disable( level ); 47968: 327c 0700 moveaw #1792,%a1 4796c: 2009 movel %a1,%d0 void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 4796e: 4e56 ffec linkw %fp,#-20 47972: 206e 0008 moveal %fp@(8),%a0 47976: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4797a: 242e 000c movel %fp@(12),%d2 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4797e: 40c3 movew %sr,%d3 47980: 8083 orl %d3,%d0 47982: 46c0 movew %d0,%sr current_state = the_thread->current_state; 47984: 2228 0010 movel %a0@(16),%d1 if ( current_state & state ) { 47988: 2002 movel %d2,%d0 4798a: c081 andl %d1,%d0 4798c: 6776 beqs 47a04 <_Thread_Clear_state+0x9c> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 4798e: 2002 movel %d2,%d0 47990: 4680 notl %d0 47992: c081 andl %d1,%d0 current_state = 47994: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 47998: 666a bnes 47a04 <_Thread_Clear_state+0x9c> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4799a: 2868 008e moveal %a0@(142),%a4 4799e: 3028 0094 movew %a0@(148),%d0 479a2: 3214 movew %a4@,%d1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 479a4: 2468 008a moveal %a0@(138),%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 479a8: 240a movel %a2,%d2 479aa: 5882 addql #4,%d2 479ac: 8081 orl %d1,%d0 479ae: 2082 movel %d2,%a0@ old_last_node = the_chain->last; 479b0: 266a 0008 moveal %a2@(8),%a3 479b4: 3880 movew %d0,%a4@ the_chain->last = the_node; 479b6: 2548 0008 movel %a0,%a2@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 479ba: 3239 0005 da04 movew 5da04 <_Priority_Major_bit_map>,%d1 479c0: 3028 0092 movew %a0@(146),%d0 old_last_node->next = the_node; the_node->previous = old_last_node; 479c4: 214b 0004 movel %a3,%a0@(4) 479c8: 8081 orl %d1,%d0 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 479ca: 2688 movel %a0,%a3@ 479cc: 33c0 0005 da04 movew %d0,5da04 <_Priority_Major_bit_map> _ISR_Flash( level ); 479d2: 2009 movel %a1,%d0 479d4: 46c3 movew %d3,%sr 479d6: 8083 orl %d3,%d0 479d8: 46c0 movew %d0,%sr * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 479da: 2028 0014 movel %a0@(20),%d0 479de: 2279 0005 d9e2 moveal 5d9e2 <_Thread_Heir>,%a1 479e4: b0a9 0014 cmpl %a1@(20),%d0 479e8: 641a bccs 47a04 <_Thread_Clear_state+0x9c> _Thread_Heir = the_thread; 479ea: 23c8 0005 d9e2 movel %a0,5d9e2 <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 479f0: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 479f6: 4a28 0075 tstb %a0@(117) 479fa: 6712 beqs 47a0e <_Thread_Clear_state+0xa6> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 479fc: 7001 moveq #1,%d0 479fe: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> } } } _ISR_Enable( level ); 47a04: 46c3 movew %d3,%sr } 47a06: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 47a0a: 4e5e unlk %fp 47a0c: 4e75 rts * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 47a0e: 4a80 tstl %d0 47a10: 66f2 bnes 47a04 <_Thread_Clear_state+0x9c> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 47a12: 7001 moveq #1,%d0 <== NOT EXECUTED 47a14: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> <== NOT EXECUTED 47a1a: 60e8 bras 47a04 <_Thread_Clear_state+0x9c> <== NOT EXECUTED 00047a1c <_Thread_Close>: 47a1c: 4280 clrl %d0 void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 47a1e: 4e56 0000 linkw %fp,#0 47a22: 2f0b movel %a3,%sp@- 47a24: 266e 0008 moveal %fp@(8),%a3 47a28: 2f0a movel %a2,%sp@- 47a2a: 246e 000c moveal %fp@(12),%a2 47a2e: 206b 0018 moveal %a3@(24),%a0 47a32: 302a 000a movew %a2@(10),%d0 47a36: 42b0 0c00 clrl %a0@(00000000,%d0:l:4) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 47a3a: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 47a40: 5380 subql #1,%d0 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 47a42: 2f0a movel %a2,%sp@- 47a44: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> 47a4a: 4eb9 0004 8d40 jsr 48d40 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 47a50: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 47a56: 5280 addql #1,%d0 47a58: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> /* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object ); 47a5e: 2f0a movel %a2,%sp@- 47a60: 2f0b movel %a3,%sp@- 47a62: 4eb9 0004 70c4 jsr 470c4 <_Objects_Close> /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); 47a68: 4878 0001 pea 1 47a6c: 2f0a movel %a2,%sp@- 47a6e: 4eb9 0004 8608 jsr 48608 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 47a74: 2f0a movel %a2,%sp@- 47a76: 4eb9 0004 8414 jsr 48414 <_Thread_queue_Extract_with_proxy> 47a7c: 4fef 0018 lea %sp@(24),%sp 47a80: 4a00 tstb %d0 47a82: 6608 bnes 47a8c <_Thread_Close+0x70> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 47a84: 7002 moveq #2,%d0 47a86: b0aa 0050 cmpl %a2@(80),%d0 47a8a: 6756 beqs 47ae2 <_Thread_Close+0xc6> /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 47a8c: b5f9 0005 d9da cmpal 5d9da <_Thread_Allocated_fp>,%a2 47a92: 6746 beqs 47ada <_Thread_Close+0xbe> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; if ( the_thread->Start.fp_context ) 47a94: 202a 00c4 movel %a2@(196),%d0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 47a98: 42aa 0100 clrl %a2@(256) if ( the_thread->Start.fp_context ) 47a9c: 4a80 tstl %d0 47a9e: 670a beqs 47aaa <_Thread_Close+0x8e> (void) _Workspace_Free( the_thread->Start.fp_context ); 47aa0: 2f00 movel %d0,%sp@- 47aa2: 4eb9 0004 90c0 jsr 490c0 <_Workspace_Free> 47aa8: 588f addql #4,%sp /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 47aaa: 2f0a movel %a2,%sp@- 47aac: 4eb9 0004 8804 jsr 48804 <_Thread_Stack_Free> the_thread->Start.stack = NULL; if ( the_thread->extensions ) 47ab2: 202a 0114 movel %a2@(276),%d0 47ab6: 588f addql #4,%sp /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; 47ab8: 42aa 00c8 clrl %a2@(200) if ( the_thread->extensions ) 47abc: 4a80 tstl %d0 47abe: 670a beqs 47aca <_Thread_Close+0xae> (void) _Workspace_Free( the_thread->extensions ); 47ac0: 2f00 movel %d0,%sp@- 47ac2: 4eb9 0004 90c0 jsr 490c0 <_Workspace_Free> 47ac8: 588f addql #4,%sp the_thread->extensions = NULL; 47aca: 42aa 0114 clrl %a2@(276) } 47ace: 246e fff8 moveal %fp@(-8),%a2 47ad2: 266e fffc moveal %fp@(-4),%a3 47ad6: 4e5e unlk %fp 47ad8: 4e75 rts */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 47ada: 42b9 0005 d9da clrl 5d9da <_Thread_Allocated_fp> 47ae0: 60b2 bras 47a94 <_Thread_Close+0x78> */ _Thread_Set_state( the_thread, STATES_DORMANT ); if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 47ae2: 486a 0048 pea %a2@(72) 47ae6: 4eb9 0004 8f54 jsr 48f54 <_Watchdog_Remove> 47aec: 588f addql #4,%sp /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 47aee: b5f9 0005 d9da cmpal 5d9da <_Thread_Allocated_fp>,%a2 47af4: 669e bnes 47a94 <_Thread_Close+0x78> 47af6: 60e2 bras 47ada <_Thread_Close+0xbe> <== NOT EXECUTED 0004d1a4 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4d1a4: 4e56 0000 linkw %fp,#0 4d1a8: 2f0a movel %a2,%sp@- #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 4d1aa: 2479 0005 da0e moveal 5da0e <_Thread_Executing>,%a2 * * Output parameters: NONE */ void _Thread_Handler( void ) { 4d1b0: 2f02 movel %d2,%sp@- /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 4d1b2: 222a 00b4 movel %a2@(180),%d1 _ISR_Set_level(level); 4d1b6: 40c0 movew %sr,%d0 4d1b8: e189 lsll #8,%d1 4d1ba: 0280 0000 f8ff andil #63743,%d0 4d1c0: 8081 orl %d1,%d0 4d1c2: 46c0 movew %d0,%sr #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1; 4d1c4: 7001 moveq #1,%d0 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 4d1c6: 1439 0005 d108 moveb 5d108 ,%d2 doneConstructors = 1; 4d1cc: 13c0 0005 d108 moveb %d0,5d108 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4d1d2: 4aaa 0100 tstl %a2@(256) 4d1d6: 6720 beqs 4d1f8 <_Thread_Handler+0x54> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 4d1d8: 2079 0005 d9da moveal 5d9da <_Thread_Allocated_fp>,%a0 4d1de: b1ca cmpal %a2,%a0 4d1e0: 6716 beqs 4d1f8 <_Thread_Handler+0x54> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 4d1e2: 4a88 tstl %a0 4d1e4: 670c beqs 4d1f2 <_Thread_Handler+0x4e> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 4d1e6: 4868 0100 pea %a0@(256) 4d1ea: 4eb9 0004 9276 jsr 49276 <_CPU_Context_save_fp> 4d1f0: 588f addql #4,%sp _Thread_Allocated_fp = executing; 4d1f2: 23ca 0005 d9da movel %a2,5d9da <_Thread_Allocated_fp> /* * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); 4d1f8: 2f0a movel %a2,%sp@- 4d1fa: 4eb9 0004 8c24 jsr 48c24 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4d200: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { 4d206: 588f addql #4,%sp 4d208: 4a02 tstb %d2 4d20a: 6746 beqs 4d252 <_Thread_Handler+0xae> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4d20c: 4aaa 009e tstl %a2@(158) 4d210: 6718 beqs 4d22a <_Thread_Handler+0x86> * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 4d212: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d214: 4eb9 0004 8c62 jsr 48c62 <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( 4d21a: 4878 0006 pea 6 <== NOT EXECUTED 4d21e: 4878 0001 pea 1 <== NOT EXECUTED 4d222: 42a7 clrl %sp@- <== NOT EXECUTED 4d224: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred> <== NOT EXECUTED } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4d22a: 2f2a 00a6 movel %a2@(166),%sp@- 4d22e: 206a 009a moveal %a2@(154),%a0 4d232: 4e90 jsr %a0@ INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 4d234: 588f addql #4,%sp 4d236: 2540 0028 movel %d0,%a2@(40) * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 4d23a: 2f0a movel %a2,%sp@- 4d23c: 4eb9 0004 8c62 jsr 48c62 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4d242: 4878 0006 pea 6 4d246: 4878 0001 pea 1 4d24a: 42a7 clrl %sp@- 4d24c: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred> * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { INIT_NAME (); 4d252: 4eb9 0005 a854 jsr 5a854 <_init> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4d258: 4aaa 009e tstl %a2@(158) 4d25c: 66b4 bnes 4d212 <_Thread_Handler+0x6e> 4d25e: 60ca bras 4d22a <_Thread_Handler+0x86> 0004ba6c <_Thread_Reset_timeslice>: Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 4ba6c: 223c 0000 0700 movel #1792,%d1 4ba72: 2001 movel %d1,%d0 * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4ba74: 4e56 fff4 linkw %fp,#-12 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4ba78: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4ba7e: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 4ba82: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 4ba86: 40c2 movew %sr,%d2 4ba88: 8082 orl %d2,%d0 4ba8a: 46c0 movew %d0,%sr if ( _Chain_Has_only_one_node( ready ) ) { 4ba8c: 2029 0008 movel %a1@(8),%d0 4ba90: b091 cmpl %a1@,%d0 4ba92: 6752 beqs 4bae6 <_Thread_Reset_timeslice+0x7a> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4ba94: 2450 moveal %a0@,%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4ba96: 2009 movel %a1,%d0 4ba98: 5880 addql #4,%d0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4ba9a: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; previous->next = next; 4ba9e: 268a movel %a2,%a3@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4baa0: 254b 0004 movel %a3,%a2@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4baa4: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 4baa6: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 4baaa: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 4baae: 214a 0004 movel %a2,%a0@(4) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4bab2: 2488 movel %a0,%a2@ return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4bab4: 46c2 movew %d2,%sr 4bab6: 8282 orl %d2,%d1 4bab8: 46c1 movew %d1,%sr if ( _Thread_Is_heir( executing ) ) 4baba: b1f9 0005 d9e2 cmpal 5d9e2 <_Thread_Heir>,%a0 4bac0: 6712 beqs 4bad4 <_Thread_Reset_timeslice+0x68> _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 4bac2: 7001 moveq #1,%d0 <== NOT EXECUTED 4bac4: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 4baca: 46c2 movew %d2,%sr <== NOT EXECUTED } 4bacc: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 4bad0: 4e5e unlk %fp 4bad2: 4e75 rts _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 4bad4: 23d1 0005 d9e2 movel %a1@,5d9e2 <_Thread_Heir> _Context_Switch_necessary = true; 4bada: 7001 moveq #1,%d0 4badc: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> _ISR_Enable( level ); 4bae2: 46c2 movew %d2,%sr 4bae4: 60e6 bras 4bacc <_Thread_Reset_timeslice+0x60> executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 4bae6: 46c2 movew %d2,%sr _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; _ISR_Enable( level ); } 4bae8: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 4baec: 4e5e unlk %fp 4baee: 4e75 rts 00049150 <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 49150: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 49152: 4e56 0000 linkw %fp,#0 49156: 2f0a movel %a2,%sp@- 49158: 246e 0008 moveal %fp@(8),%a2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 4915c: c0aa 0010 andl %a2@(16),%d0 49160: 4a00 tstb %d0 49162: 670a beqs 4916e <_Thread_Restart+0x1e> return true; } return false; } 49164: 246e fffc moveal %fp@(-4),%a2 49168: 4e5e unlk %fp Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 4916a: 4200 clrb %d0 return true; } return false; } 4916c: 4e75 rts Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 4916e: 2f0a movel %a2,%sp@- 49170: 4eb9 0004 9360 jsr 49360 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 49176: 2f2e 0010 movel %fp@(16),%sp@- 4917a: 2f2e 000c movel %fp@(12),%sp@- 4917e: 2f0a movel %a2,%sp@- 49180: 4eb9 0004 c6f4 jsr 4c6f4 <_Thread_Reset> _Thread_Load_environment( the_thread ); 49186: 2f0a movel %a2,%sp@- 49188: 4eb9 0004 c348 jsr 4c348 <_Thread_Load_environment> _Thread_Ready( the_thread ); 4918e: 2f0a movel %a2,%sp@- 49190: 4eb9 0004 c634 jsr 4c634 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 49196: 2f0a movel %a2,%sp@- 49198: 4eb9 0004 99cc jsr 499cc <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 4919e: 4fef 001c lea %sp@(28),%sp 491a2: b5f9 0005 e946 cmpal 5e946 <_Thread_Executing>,%a2 491a8: 670a beqs 491b4 <_Thread_Restart+0x64> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) _Context_Restore_fp( &_Thread_Executing->fp_context ); #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 491aa: 7001 moveq #1,%d0 return true; } return false; } 491ac: 246e fffc moveal %fp@(-4),%a2 491b0: 4e5e unlk %fp 491b2: 4e75 rts */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 491b4: 4aaa 0100 tstl %a2@(256) 491b8: 6712 beqs 491cc <_Thread_Restart+0x7c> _Context_Restore_fp( &_Thread_Executing->fp_context ); 491ba: 486a 0100 pea %a2@(256) 491be: 4eb9 0004 9f36 jsr 49f36 <_CPU_Context_restore_fp> 491c4: 2479 0005 e946 moveal 5e946 <_Thread_Executing>,%a2 491ca: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 491cc: 486a 00cc pea %a2@(204) 491d0: 4eb9 0004 9dde jsr 49dde <_CPU_Context_Restart_self> 491d6: 588f addql #4,%sp <== NOT EXECUTED 491d8: 7001 moveq #1,%d0 <== NOT EXECUTED 491da: 60d0 bras 491ac <_Thread_Restart+0x5c> <== NOT EXECUTED 0004c6b8 <_Thread_Resume>: { ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4c6b8: 327c 0700 moveaw #1792,%a1 4c6bc: 2009 movel %a1,%d0 void _Thread_Resume( Thread_Control *the_thread, bool force ) { 4c6be: 4e56 ffec linkw %fp,#-20 4c6c2: 206e 0008 moveal %fp@(8),%a0 4c6c6: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4c6ca: 40c1 movew %sr,%d1 4c6cc: 8081 orl %d1,%d0 4c6ce: 46c0 movew %d0,%sr _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 4c6d0: 2028 0010 movel %a0@(16),%d0 if ( current_state & STATES_SUSPENDED ) { 4c6d4: 0800 0001 btst #1,%d0 4c6d8: 6774 beqs 4c74e <_Thread_Resume+0x96> 4c6da: 74fd moveq #-3,%d2 4c6dc: c082 andl %d2,%d0 current_state = 4c6de: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 4c6e2: 666a bnes 4c74e <_Thread_Resume+0x96> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4c6e4: 2868 008e moveal %a0@(142),%a4 4c6e8: 3028 0094 movew %a0@(148),%d0 4c6ec: 3414 movew %a4@,%d2 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 4c6ee: 2468 008a moveal %a0@(138),%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4c6f2: 260a movel %a2,%d3 4c6f4: 5883 addql #4,%d3 4c6f6: 8082 orl %d2,%d0 4c6f8: 2083 movel %d3,%a0@ old_last_node = the_chain->last; 4c6fa: 266a 0008 moveal %a2@(8),%a3 4c6fe: 3880 movew %d0,%a4@ the_chain->last = the_node; 4c700: 2548 0008 movel %a0,%a2@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 4c704: 3439 0006 363c movew 6363c <_Priority_Major_bit_map>,%d2 4c70a: 3028 0092 movew %a0@(146),%d0 old_last_node->next = the_node; the_node->previous = old_last_node; 4c70e: 214b 0004 movel %a3,%a0@(4) 4c712: 8082 orl %d2,%d0 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4c714: 2688 movel %a0,%a3@ 4c716: 33c0 0006 363c movew %d0,6363c <_Priority_Major_bit_map> _ISR_Flash( level ); 4c71c: 2009 movel %a1,%d0 4c71e: 46c1 movew %d1,%sr 4c720: 8081 orl %d1,%d0 4c722: 46c0 movew %d0,%sr if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4c724: 2028 0014 movel %a0@(20),%d0 4c728: 2279 0006 361a moveal 6361a <_Thread_Heir>,%a1 4c72e: b0a9 0014 cmpl %a1@(20),%d0 4c732: 641a bccs 4c74e <_Thread_Resume+0x96> _Thread_Heir = the_thread; 4c734: 23c8 0006 361a movel %a0,6361a <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 4c73a: 2079 0006 3646 moveal 63646 <_Thread_Executing>,%a0 4c740: 4a28 0075 tstb %a0@(117) 4c744: 6712 beqs 4c758 <_Thread_Resume+0xa0> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4c746: 7001 moveq #1,%d0 4c748: 13c0 0006 3656 moveb %d0,63656 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 4c74e: 46c1 movew %d1,%sr } 4c750: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4c754: 4e5e unlk %fp 4c756: 4e75 rts _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4c758: 4a80 tstl %d0 4c75a: 66f2 bnes 4c74e <_Thread_Resume+0x96> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4c75c: 7001 moveq #1,%d0 <== NOT EXECUTED 4c75e: 13c0 0006 3656 moveb %d0,63656 <_Context_Switch_necessary> <== NOT EXECUTED 4c764: 60e8 bras 4c74e <_Thread_Resume+0x96> <== NOT EXECUTED ... 00048a38 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 48a38: 4e56 fff4 linkw %fp,#-12 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 48a3c: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 * ready chain * select heir */ void _Thread_Yield_processor( void ) { 48a42: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 48a46: 243c 0000 0700 movel #1792,%d2 48a4c: 2002 movel %d2,%d0 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 48a4e: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 48a52: 40c1 movew %sr,%d1 48a54: 8081 orl %d1,%d0 48a56: 46c0 movew %d0,%sr if ( !_Chain_Has_only_one_node( ready ) ) { 48a58: 2029 0008 movel %a1@(8),%d0 48a5c: b091 cmpl %a1@,%d0 48a5e: 6750 beqs 48ab0 <_Thread_Yield_processor+0x78> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 48a60: 2450 moveal %a0@,%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 48a62: 2009 movel %a1,%d0 48a64: 5880 addql #4,%d0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 48a66: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; previous->next = next; 48a6a: 268a movel %a2,%a3@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 48a6c: 254b 0004 movel %a3,%a2@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 48a70: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 48a72: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 48a76: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 48a7a: 214a 0004 movel %a2,%a0@(4) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 48a7e: 2488 movel %a0,%a2@ _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 48a80: 46c1 movew %d1,%sr 48a82: 8481 orl %d1,%d2 48a84: 46c2 movew %d2,%sr if ( _Thread_Is_heir( executing ) ) 48a86: b1f9 0005 d9e2 cmpal 5d9e2 <_Thread_Heir>,%a0 48a8c: 6712 beqs 48aa0 <_Thread_Yield_processor+0x68> _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 48a8e: 7001 moveq #1,%d0 <== NOT EXECUTED 48a90: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 48a96: 46c1 movew %d1,%sr } 48a98: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 48a9c: 4e5e unlk %fp 48a9e: 4e75 rts _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 48aa0: 23d1 0005 d9e2 movel %a1@,5d9e2 <_Thread_Heir> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 48aa6: 7001 moveq #1,%d0 48aa8: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> 48aae: 60e6 bras 48a96 <_Thread_Yield_processor+0x5e> if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 48ab0: b1f9 0005 d9e2 cmpal 5d9e2 <_Thread_Heir>,%a0 48ab6: 67de beqs 48a96 <_Thread_Yield_processor+0x5e> _Context_Switch_necessary = true; 48ab8: 7001 moveq #1,%d0 <== NOT EXECUTED 48aba: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> <== NOT EXECUTED 48ac0: 60d4 bras 48a96 <_Thread_Yield_processor+0x5e> <== NOT EXECUTED ... 0004829c <_Thread_queue_Enqueue_priority>: Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 4829c: 4e56 ffe4 linkw %fp,#-28 482a0: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 482a4: 266e 000c moveal %fp@(12),%a3 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 482a8: 41eb 003c lea %a3@(60),%a0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 482ac: 263c 0000 0700 movel #1792,%d3 Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 482b2: 222b 0014 movel %a3@(20),%d1 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 482b6: 2401 movel %d1,%d2 482b8: ec8a lsrl #6,%d2 482ba: 2002 movel %d2,%d0 482bc: e58a lsll #2,%d2 482be: e988 lsll #4,%d0 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 482c0: 286e 0008 moveal %fp@(8),%a4 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 482c4: 9082 subl %d2,%d0 482c6: 45f4 0800 lea %a4@(00000000,%d0:l),%a2 482ca: 2748 0038 movel %a0,%a3@(56) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 482ce: 41eb 0038 lea %a3@(56),%a0 block_state = the_thread_queue->state; 482d2: 242c 0038 movel %a4@(56),%d2 482d6: 2748 0040 movel %a0,%a3@(64) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 482da: 42ab 003c clrl %a3@(60) if ( _Thread_queue_Is_reverse_search( priority ) ) 482de: 0801 0005 btst #5,%d1 482e2: 6656 bnes 4833a <_Thread_queue_Enqueue_priority+0x9e> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 482e4: 2a0a movel %a2,%d5 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 482e6: 2803 movel %d3,%d4 482e8: 5885 addql #4,%d5 482ea: 2004 movel %d4,%d0 482ec: 40c3 movew %sr,%d3 482ee: 8083 orl %d3,%d0 482f0: 46c0 movew %d0,%sr search_thread = (Thread_Control *) header->first; 482f2: 2052 moveal %a2@,%a0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 482f4: ba88 cmpl %a0,%d5 482f6: 6700 010a beqw 48402 <_Thread_queue_Enqueue_priority+0x166> search_priority = search_thread->current_priority; 482fa: 2268 0014 moveal %a0@(20),%a1 if ( priority <= search_priority ) 482fe: b3c1 cmpal %d1,%a1 48300: 6418 bccs 4831a <_Thread_queue_Enqueue_priority+0x7e> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 48302: 2004 movel %d4,%d0 48304: 46c3 movew %d3,%sr 48306: 8083 orl %d3,%d0 48308: 46c0 movew %d0,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4830a: 2002 movel %d2,%d0 4830c: c0a8 0010 andl %a0@(16),%d0 48310: 6700 0092 beqw 483a4 <_Thread_queue_Enqueue_priority+0x108> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 48314: 2050 moveal %a0@,%a0 restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 48316: ba88 cmpl %a0,%d5 48318: 66e0 bnes 482fa <_Thread_queue_Enqueue_priority+0x5e> 4831a: 2403 movel %d3,%d2 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 4831c: 7001 moveq #1,%d0 4831e: b0ac 0030 cmpl %a4@(48),%d0 48322: 6700 0094 beqw 483b8 <_Thread_queue_Enqueue_priority+0x11c> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 48326: 206e 0010 moveal %fp@(16),%a0 return the_thread_queue->sync_state; 4832a: 202c 0030 movel %a4@(48),%d0 * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 4832e: 2082 movel %d2,%a0@ return the_thread_queue->sync_state; } 48330: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 48334: 4e5e unlk %fp 48336: 4e75 rts if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 48338: 46c4 movew %d4,%sr <== NOT EXECUTED the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 4833a: 4284 clrl %d4 4833c: 1839 0005 c222 moveb 5c222 ,%d4 _ISR_Disable( level ); 48342: 2003 movel %d3,%d0 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 48344: 2244 moveal %d4,%a1 48346: 5289 addql #1,%a1 _ISR_Disable( level ); 48348: 40c4 movew %sr,%d4 4834a: 8084 orl %d4,%d0 4834c: 46c0 movew %d0,%sr search_thread = (Thread_Control *) header->last; 4834e: 206a 0008 moveal %a2@(8),%a0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 48352: b5c8 cmpal %a0,%a2 48354: 6720 beqs 48376 <_Thread_queue_Enqueue_priority+0xda> search_priority = search_thread->current_priority; 48356: 2268 0014 moveal %a0@(20),%a1 if ( priority >= search_priority ) 4835a: b3c1 cmpal %d1,%a1 4835c: 6318 blss 48376 <_Thread_queue_Enqueue_priority+0xda> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 4835e: 2003 movel %d3,%d0 48360: 46c4 movew %d4,%sr 48362: 8084 orl %d4,%d0 48364: 46c0 movew %d0,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 48366: 2002 movel %d2,%d0 48368: c0a8 0010 andl %a0@(16),%d0 4836c: 67ca beqs 48338 <_Thread_queue_Enqueue_priority+0x9c> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 4836e: 2068 0004 moveal %a0@(4),%a0 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 48372: b5c8 cmpal %a0,%a2 48374: 66e0 bnes 48356 <_Thread_queue_Enqueue_priority+0xba> 48376: 2404 movel %d4,%d2 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 48378: 7001 moveq #1,%d0 4837a: b0ac 0030 cmpl %a4@(48),%d0 4837e: 66a6 bnes 48326 <_Thread_queue_Enqueue_priority+0x8a> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 48380: 42ac 0030 clrl %a4@(48) if ( priority == search_priority ) 48384: b3c1 cmpal %d1,%a1 48386: 6756 beqs 483de <_Thread_queue_Enqueue_priority+0x142> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 48388: 2250 moveal %a0@,%a1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 4838a: 2748 0004 movel %a0,%a3@(4) search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 4838e: 2689 movel %a1,%a3@ the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 48390: 274c 0044 movel %a4,%a3@(68) next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 48394: 208b movel %a3,%a0@ next_node->previous = the_node; 48396: 234b 0004 movel %a3,%a1@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4839a: 46c4 movew %d4,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 4839c: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 483a0: 4e5e unlk %fp 483a2: 4e75 rts if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 483a4: 46c3 movew %d3,%sr <== NOT EXECUTED if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 483a6: 2004 movel %d4,%d0 <== NOT EXECUTED 483a8: 40c3 movew %sr,%d3 <== NOT EXECUTED 483aa: 8083 orl %d3,%d0 <== NOT EXECUTED 483ac: 46c0 movew %d0,%sr <== NOT EXECUTED search_thread = (Thread_Control *) header->first; 483ae: 2052 moveal %a2@,%a0 <== NOT EXECUTED while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 483b0: ba88 cmpl %a0,%d5 <== NOT EXECUTED 483b2: 6600 ff46 bnew 482fa <_Thread_queue_Enqueue_priority+0x5e> <== NOT EXECUTED 483b6: 604a bras 48402 <_Thread_queue_Enqueue_priority+0x166> <== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 483b8: 42ac 0030 clrl %a4@(48) if ( priority == search_priority ) 483bc: b3c1 cmpal %d1,%a1 483be: 671e beqs 483de <_Thread_queue_Enqueue_priority+0x142> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 483c0: 2268 0004 moveal %a0@(4),%a1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 483c4: 2688 movel %a0,%a3@ the_node->previous = previous_node; 483c6: 2749 0004 movel %a1,%a3@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 483ca: 274c 0044 movel %a4,%a3@(68) previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 483ce: 228b movel %a3,%a1@ search_node->previous = the_node; 483d0: 214b 0004 movel %a3,%a0@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 483d4: 46c3 movew %d3,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 483d6: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 483da: 4e5e unlk %fp 483dc: 4e75 rts 483de: 41e8 003c lea %a0@(60),%a0 _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 483e2: 2268 0004 moveal %a0@(4),%a1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 483e6: 2688 movel %a0,%a3@ the_node->previous = previous_node; 483e8: 2749 0004 movel %a1,%a3@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 483ec: 274c 0044 movel %a4,%a3@(68) previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 483f0: 228b movel %a3,%a1@ search_node->previous = the_node; 483f2: 214b 0004 movel %a3,%a0@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 483f6: 46c2 movew %d2,%sr 483f8: 7001 moveq #1,%d0 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 483fa: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 483fe: 4e5e unlk %fp 48400: 4e75 rts restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 48402: 2403 movel %d3,%d2 48404: 327c ffff moveaw #-1,%a1 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 48408: 7001 moveq #1,%d0 4840a: b0ac 0030 cmpl %a4@(48),%d0 4840e: 6600 ff16 bnew 48326 <_Thread_queue_Enqueue_priority+0x8a> 48412: 60a4 bras 483b8 <_Thread_queue_Enqueue_priority+0x11c> 000484ec <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 484ec: 4e56 fff0 linkw %fp,#-16 484f0: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 484f4: 246e 0008 moveal %fp@(8),%a2 484f8: 266e 000c moveal %fp@(12),%a3 /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 484fc: 4a8a tstl %a2 484fe: 6708 beqs 48508 <_Thread_queue_Requeue+0x1c> /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 48500: 7001 moveq #1,%d0 48502: b0aa 0034 cmpl %a2@(52),%d0 48506: 670a beqs 48512 <_Thread_queue_Requeue+0x26> _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 48508: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 4850e: 4e5e unlk %fp <== NOT EXECUTED 48510: 4e75 rts <== NOT EXECUTED if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 48512: 303c 0700 movew #1792,%d0 48516: 40c2 movew %sr,%d2 48518: 8082 orl %d2,%d0 4851a: 46c0 movew %d0,%sr if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4851c: 202b 0010 movel %a3@(16),%d0 48520: 0280 0003 bee0 andil #245472,%d0 48526: 660c bnes 48534 <_Thread_queue_Requeue+0x48> _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 48528: 46c2 movew %d2,%sr <== NOT EXECUTED } } 4852a: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 48530: 4e5e unlk %fp 48532: 4e75 rts ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 48534: 4878 0001 pea 1 48538: 7001 moveq #1,%d0 4853a: 2f0b movel %a3,%sp@- 4853c: 2540 0030 movel %d0,%a2@(48) 48540: 2f0a movel %a2,%sp@- 48542: 4eb9 0004 b874 jsr 4b874 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 48548: 486e fffc pea %fp@(-4) 4854c: 2f0b movel %a3,%sp@- 4854e: 2f0a movel %a2,%sp@- 48550: 4eb9 0004 829c jsr 4829c <_Thread_queue_Enqueue_priority> 48556: 4fef 0018 lea %sp@(24),%sp } _ISR_Enable( level ); 4855a: 46c2 movew %d2,%sr 4855c: 60cc bras 4852a <_Thread_queue_Requeue+0x3e> ... 00058ce8 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 58ce8: 4e56 ffb0 linkw %fp,#-80 58cec: 41ee ffec lea %fp@(-20),%a0 58cf0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 58cf4: 246e 0008 moveal %fp@(8),%a2 58cf8: 2c0e movel %fp,%d6 58cfa: 260e movel %fp,%d3 58cfc: 5186 subql #8,%d6 58cfe: 0683 ffff ffe8 addil #-24,%d3 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 58d04: 240a movel %a2,%d2 /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 58d06: 2a0a movel %a2,%d5 58d08: 4bf9 0005 cd78 lea 5cd78 <_Watchdog_Adjust_to_chain>,%a5 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 58d0e: 0682 0000 0030 addil #48,%d2 /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 58d14: 0685 0000 0068 addil #104,%d5 58d1a: 47f9 0005 9748 lea 59748 <_Chain_Get>,%a3 58d20: 49f9 0005 ce08 lea 5ce08 <_Watchdog_Insert>,%a4 * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 58d26: 283c 0000 0700 movel #1792,%d4 58d2c: 2d48 ffd8 movel %a0,%fp@(-40) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 58d30: 41ea 0008 lea %a2@(8),%a0 58d34: 2d48 ffe0 movel %a0,%fp@(-32) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 58d38: 41ea 0040 lea %a2@(64),%a0 58d3c: 2d48 ffe4 movel %a0,%fp@(-28) Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 58d40: 41ee fff4 lea %fp@(-12),%a0 58d44: 2d48 fffc movel %a0,%fp@(-4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 58d48: 41ee ffec lea %fp@(-20),%a0 58d4c: 2d46 fff4 movel %d6,%fp@(-12) the_chain->permanent_null = NULL; 58d50: 42ae fff8 clrl %fp@(-8) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 58d54: 2d48 ffe8 movel %a0,%fp@(-24) the_chain->permanent_null = NULL; 58d58: 42ae ffec clrl %fp@(-20) the_chain->last = _Chain_Head(the_chain); 58d5c: 2d43 fff0 movel %d3,%fp@(-16) { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 58d60: 41ee fff4 lea %fp@(-12),%a0 58d64: 2548 0078 movel %a0,%a2@(120) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 58d68: 2039 0007 ca20 movel 7ca20 <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 58d6e: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 58d72: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 58d76: 9081 subl %d1,%d0 58d78: 2f03 movel %d3,%sp@- 58d7a: 2f00 movel %d0,%sp@- 58d7c: 2f02 movel %d2,%sp@- 58d7e: 4e95 jsr %a5@ static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 58d80: 2039 0007 c972 movel 7c972 <_TOD_Now>,%d0 /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 58d86: 4fef 000c lea %sp@(12),%sp Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 58d8a: 222a 0074 movel %a2@(116),%d1 /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 58d8e: b280 cmpl %d0,%d1 58d90: 6500 0086 bcsw 58e18 <_Timer_server_Body+0x130> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 58d94: b280 cmpl %d0,%d1 58d96: 6200 00a4 bhiw 58e3c <_Timer_server_Body+0x154> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 58d9a: 2540 0074 movel %d0,%a2@(116) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 58d9e: 202a 0078 movel %a2@(120),%d0 58da2: 2f00 movel %d0,%sp@- 58da4: 4e93 jsr %a3@ if ( timer == NULL ) { 58da6: 588f addql #4,%sp 58da8: 4a80 tstl %d0 58daa: 672e beqs 58dda <_Timer_server_Body+0xf2> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 58dac: 2040 moveal %d0,%a0 58dae: 7e01 moveq #1,%d7 58db0: 2228 0038 movel %a0@(56),%d1 58db4: be81 cmpl %d1,%d7 58db6: 6700 00a8 beqw 58e60 <_Timer_server_Body+0x178> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 58dba: 7e03 moveq #3,%d7 58dbc: be81 cmpl %d1,%d7 58dbe: 66de bnes 58d9e <_Timer_server_Body+0xb6> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 58dc0: 2040 moveal %d0,%a0 58dc2: 4868 0010 pea %a0@(16) 58dc6: 2f05 movel %d5,%sp@- 58dc8: 4e94 jsr %a4@ } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 58dca: 202a 0078 movel %a2@(120),%d0 ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 58dce: 508f addql #8,%sp } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 58dd0: 2f00 movel %d0,%sp@- 58dd2: 4e93 jsr %a3@ if ( timer == NULL ) { 58dd4: 588f addql #4,%sp 58dd6: 4a80 tstl %d0 58dd8: 66d2 bnes 58dac <_Timer_server_Body+0xc4> * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 58dda: 2004 movel %d4,%d0 58ddc: 40c1 movew %sr,%d1 58dde: 8081 orl %d1,%d0 58de0: 46c0 movew %d0,%sr if ( _Chain_Is_empty( insert_chain ) ) { 58de2: bcae fff4 cmpl %fp@(-12),%d6 58de6: 6700 0086 beqw 58e6e <_Timer_server_Body+0x186> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 58dea: 46c1 movew %d1,%sr <== NOT EXECUTED static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 58dec: 2039 0007 ca20 movel 7ca20 <_Watchdog_Ticks_since_boot>,%d0 <== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 58df2: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED watchdogs->last_snapshot = snapshot; 58df6: 2540 003c movel %d0,%a2@(60) <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 58dfa: 9081 subl %d1,%d0 <== NOT EXECUTED 58dfc: 2f03 movel %d3,%sp@- <== NOT EXECUTED 58dfe: 2f00 movel %d0,%sp@- <== NOT EXECUTED 58e00: 2f02 movel %d2,%sp@- <== NOT EXECUTED 58e02: 4e95 jsr %a5@ <== NOT EXECUTED static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 58e04: 2039 0007 c972 movel 7c972 <_TOD_Now>,%d0 <== NOT EXECUTED /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 58e0a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 58e0e: 222a 0074 movel %a2@(116),%d1 <== NOT EXECUTED /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 58e12: b280 cmpl %d0,%d1 <== NOT EXECUTED 58e14: 6400 ff7e bccw 58d94 <_Timer_server_Body+0xac> <== NOT EXECUTED /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 58e18: 2f03 movel %d3,%sp@- 58e1a: 2e00 movel %d0,%d7 58e1c: 9e81 subl %d1,%d7 58e1e: 2f07 movel %d7,%sp@- 58e20: 2d40 ffdc movel %d0,%fp@(-36) 58e24: 2f05 movel %d5,%sp@- 58e26: 4eb9 0005 cd78 jsr 5cd78 <_Watchdog_Adjust_to_chain> 58e2c: 202e ffdc movel %fp@(-36),%d0 58e30: 4fef 000c lea %sp@(12),%sp */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 58e34: 2540 0074 movel %d0,%a2@(116) 58e38: 6000 ff64 braw 58d9e <_Timer_server_Body+0xb6> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 58e3c: 9280 subl %d0,%d1 58e3e: 2f01 movel %d1,%sp@- 58e40: 4878 0001 pea 1 58e44: 2d40 ffdc movel %d0,%fp@(-36) 58e48: 2f05 movel %d5,%sp@- 58e4a: 4eb9 0005 cce4 jsr 5cce4 <_Watchdog_Adjust> 58e50: 202e ffdc movel %fp@(-36),%d0 58e54: 4fef 000c lea %sp@(12),%sp } watchdogs->last_snapshot = snapshot; 58e58: 2540 0074 movel %d0,%a2@(116) 58e5c: 6000 ff40 braw 58d9e <_Timer_server_Body+0xb6> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 58e60: 4868 0010 pea %a0@(16) 58e64: 2f02 movel %d2,%sp@- 58e66: 4e94 jsr %a4@ 58e68: 508f addql #8,%sp 58e6a: 6000 ff32 braw 58d9e <_Timer_server_Body+0xb6> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 58e6e: 42aa 0078 clrl %a2@(120) _ISR_Enable( level ); 58e72: 46c1 movew %d1,%sr _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 58e74: 202e ffd8 movel %fp@(-40),%d0 58e78: b0ae ffe8 cmpl %fp@(-24),%d0 58e7c: 6752 beqs 58ed0 <_Timer_server_Body+0x1e8> /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 58e7e: 2204 movel %d4,%d1 58e80: 40c0 movew %sr,%d0 58e82: 8280 orl %d0,%d1 58e84: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 58e86: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 58e8a: b1ee ffd8 cmpal %fp@(-40),%a0 58e8e: 6732 beqs 58ec2 <_Timer_server_Body+0x1da> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 58e90: 2250 moveal %a0@,%a1 the_chain->first = new_first; 58e92: 2d49 ffe8 movel %a1,%fp@(-24) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 58e96: 42a8 0008 clrl %a0@(8) new_first->previous = _Chain_Head(the_chain); 58e9a: 2343 0004 movel %d3,%a1@(4) _ISR_Enable( level ); 58e9e: 46c0 movew %d0,%sr /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 58ea0: 2f28 0024 movel %a0@(36),%sp@- 58ea4: 2f28 0020 movel %a0@(32),%sp@- 58ea8: 2068 001c moveal %a0@(28),%a0 58eac: 4e90 jsr %a0@ } 58eae: 508f addql #8,%sp /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 58eb0: 2204 movel %d4,%d1 58eb2: 40c0 movew %sr,%d0 58eb4: 8280 orl %d0,%d1 58eb6: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 58eb8: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 58ebc: b1ee ffd8 cmpal %fp@(-40),%a0 58ec0: 66ce bnes 58e90 <_Timer_server_Body+0x1a8> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 58ec2: 46c0 movew %d0,%sr { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 58ec4: 41ee fff4 lea %fp@(-12),%a0 58ec8: 2548 0078 movel %a0,%a2@(120) 58ecc: 6000 fe9a braw 58d68 <_Timer_server_Body+0x80> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 58ed0: 4207 clrb %d7 58ed2: 1547 007c moveb %d7,%a2@(124) 58ed6: 2039 0007 c8e0 movel 7c8e0 <_Thread_Dispatch_disable_level>,%d0 58edc: 5280 addql #1,%d0 58ede: 23c0 0007 c8e0 movel %d0,7c8e0 <_Thread_Dispatch_disable_level> /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 58ee4: 4878 0008 pea 8 58ee8: 2f12 movel %a2@,%sp@- 58eea: 4eb9 0005 c434 jsr 5c434 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 58ef0: 2f0a movel %a2,%sp@- 58ef2: 4eba fd1c jsr %pc@(58c10 <_Timer_server_Reset_interval_system_watchdog>) _Timer_server_Reset_tod_system_watchdog( ts ); 58ef6: 2f0a movel %a2,%sp@- 58ef8: 4eba fd80 jsr %pc@(58c7a <_Timer_server_Reset_tod_system_watchdog>) _Thread_Enable_dispatch(); 58efc: 4eb9 0005 b9fc jsr 5b9fc <_Thread_Enable_dispatch> ts->active = true; 58f02: 7001 moveq #1,%d0 58f04: 1540 007c moveb %d0,%a2@(124) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 58f08: 2f2e ffe0 movel %fp@(-32),%sp@- 58f0c: 4eb9 0005 cf50 jsr 5cf50 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 58f12: 2f2e ffe4 movel %fp@(-28),%sp@- 58f16: 4eb9 0005 cf50 jsr 5cf50 <_Watchdog_Remove> 58f1c: 4fef 0018 lea %sp@(24),%sp 58f20: 6000 fe3e braw 58d60 <_Timer_server_Body+0x78> 00058f24 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 58f24: 4e56 fff0 linkw %fp,#-16 58f28: 206e 000c moveal %fp@(12),%a0 58f2c: 48d7 041c moveml %d2-%d4/%a2,%sp@ 58f30: 246e 0008 moveal %fp@(8),%a2 if ( ts->insert_chain == NULL ) { 58f34: 202a 0078 movel %a2@(120),%d0 58f38: 671a beqs 58f54 <_Timer_server_Schedule_operation_method+0x30> * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 58f3a: 202a 0078 movel %a2@(120),%d0 58f3e: 2d48 000c movel %a0,%fp@(12) } } 58f42: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 58f48: 2d40 0008 movel %d0,%fp@(8) } } 58f4c: 4e5e unlk %fp * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 58f4e: 4ef9 0005 9710 jmp 59710 <_Chain_Append> 58f54: 2039 0007 c8e0 movel 7c8e0 <_Thread_Dispatch_disable_level>,%d0 58f5a: 5280 addql #1,%d0 58f5c: 23c0 0007 c8e0 movel %d0,7c8e0 <_Thread_Dispatch_disable_level> * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 58f62: 2028 0038 movel %a0@(56),%d0 58f66: 7201 moveq #1,%d1 58f68: b280 cmpl %d0,%d1 58f6a: 6700 0088 beqw 58ff4 <_Timer_server_Schedule_operation_method+0xd0> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 58f6e: 7203 moveq #3,%d1 58f70: b280 cmpl %d0,%d1 58f72: 670e beqs 58f82 <_Timer_server_Schedule_operation_method+0x5e> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 58f74: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 58f7a: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 58f7c: 4ef9 0005 b9fc jmp 5b9fc <_Thread_Enable_dispatch> } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 58f82: 203c 0000 0700 movel #1792,%d0 58f88: 40c2 movew %sr,%d2 58f8a: 8082 orl %d2,%d0 58f8c: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 58f8e: 260a movel %a2,%d3 58f90: 0683 0000 006c addil #108,%d3 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 58f96: 2039 0007 c972 movel 7c972 <_TOD_Now>,%d0 last_snapshot = ts->TOD_watchdogs.last_snapshot; 58f9c: 222a 0074 movel %a2@(116),%d1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 58fa0: 226a 0068 moveal %a2@(104),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 58fa4: b689 cmpl %a1,%d3 58fa6: 671a beqs 58fc2 <_Timer_server_Schedule_operation_method+0x9e> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 58fa8: 2629 0010 movel %a1@(16),%d3 if ( snapshot > last_snapshot ) { 58fac: b280 cmpl %d0,%d1 58fae: 6400 00b8 bccw 59068 <_Timer_server_Schedule_operation_method+0x144> /* * We advanced in time. */ delta = snapshot - last_snapshot; 58fb2: 2800 movel %d0,%d4 58fb4: 9881 subl %d1,%d4 if (delta_interval > delta) { 58fb6: b883 cmpl %d3,%d4 58fb8: 6500 00ba bcsw 59074 <_Timer_server_Schedule_operation_method+0x150> 58fbc: 4281 clrl %d1 <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 58fbe: 2341 0010 movel %d1,%a1@(16) <== NOT EXECUTED } ts->TOD_watchdogs.last_snapshot = snapshot; 58fc2: 2540 0074 movel %d0,%a2@(116) _ISR_Enable( level ); 58fc6: 46c2 movew %d2,%sr _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 58fc8: 4868 0010 pea %a0@(16) 58fcc: 486a 0068 pea %a2@(104) 58fd0: 4eb9 0005 ce08 jsr 5ce08 <_Watchdog_Insert> if ( !ts->active ) { 58fd6: 508f addql #8,%sp 58fd8: 102a 007c moveb %a2@(124),%d0 58fdc: 6696 bnes 58f74 <_Timer_server_Schedule_operation_method+0x50> _Timer_server_Reset_tod_system_watchdog( ts ); 58fde: 2f0a movel %a2,%sp@- 58fe0: 4eba fc98 jsr %pc@(58c7a <_Timer_server_Reset_tod_system_watchdog>) 58fe4: 588f addql #4,%sp * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 58fe6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 58fec: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 58fee: 4ef9 0005 b9fc jmp 5b9fc <_Thread_Enable_dispatch> if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 58ff4: 203c 0000 0700 movel #1792,%d0 58ffa: 40c3 movew %sr,%d3 58ffc: 8083 orl %d3,%d0 58ffe: 46c0 movew %d0,%sr snapshot = _Watchdog_Ticks_since_boot; 59000: 2039 0007 ca20 movel 7ca20 <_Watchdog_Ticks_since_boot>,%d0 59006: 240a movel %a2,%d2 59008: 0682 0000 0034 addil #52,%d2 last_snapshot = ts->Interval_watchdogs.last_snapshot; 5900e: 222a 003c movel %a2@(60),%d1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 59012: 226a 0030 moveal %a2@(48),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 59016: b489 cmpl %a1,%d2 59018: 6712 beqs 5902c <_Timer_server_Schedule_operation_method+0x108> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 5901a: 2800 movel %d0,%d4 5901c: 9881 subl %d1,%d4 delta_interval = first_watchdog->delta_interval; 5901e: 2429 0010 movel %a1@(16),%d2 if (delta_interval > delta) { 59022: b484 cmpl %d4,%d2 59024: 623a bhis 59060 <_Timer_server_Schedule_operation_method+0x13c> 59026: 4282 clrl %d2 delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 59028: 2342 0010 movel %d2,%a1@(16) } ts->Interval_watchdogs.last_snapshot = snapshot; 5902c: 2540 003c movel %d0,%a2@(60) _ISR_Enable( level ); 59030: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 59032: 4868 0010 pea %a0@(16) 59036: 486a 0030 pea %a2@(48) 5903a: 4eb9 0005 ce08 jsr 5ce08 <_Watchdog_Insert> if ( !ts->active ) { 59040: 508f addql #8,%sp 59042: 102a 007c moveb %a2@(124),%d0 59046: 6600 ff2c bnew 58f74 <_Timer_server_Schedule_operation_method+0x50> _Timer_server_Reset_interval_system_watchdog( ts ); 5904a: 2f0a movel %a2,%sp@- 5904c: 4eba fbc2 jsr %pc@(58c10 <_Timer_server_Reset_interval_system_watchdog>) 59050: 588f addql #4,%sp * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 59052: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 59058: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 5905a: 4ef9 0005 b9fc jmp 5b9fc <_Thread_Enable_dispatch> */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; 59060: 9484 subl %d4,%d2 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 59062: 2342 0010 movel %d2,%a1@(16) 59066: 60c4 bras 5902c <_Timer_server_Schedule_operation_method+0x108> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 59068: d283 addl %d3,%d1 delta_interval += delta; 5906a: 9280 subl %d0,%d1 } first_watchdog->delta_interval = delta_interval; 5906c: 2341 0010 movel %d1,%a1@(16) 59070: 6000 ff50 braw 58fc2 <_Timer_server_Schedule_operation_method+0x9e> /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; 59074: 9684 subl %d4,%d3 59076: 2203 movel %d3,%d1 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 59078: 2341 0010 movel %d1,%a1@(16) 5907c: 6000 ff44 braw 58fc2 <_Timer_server_Schedule_operation_method+0x9e> 0007ae5c <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 7ae5c: 4e56 0000 linkw %fp,#0 7ae60: 226e 0008 moveal %fp@(8),%a1 7ae64: 206e 000c moveal %fp@(12),%a0 if ( lhs->tv_sec > rhs->tv_sec ) 7ae68: 2211 movel %a1@,%d1 7ae6a: 2010 movel %a0@,%d0 7ae6c: b081 cmpl %d1,%d0 7ae6e: 6d18 blts 7ae88 <_Timespec_Greater_than+0x2c> return true; if ( lhs->tv_sec < rhs->tv_sec ) 7ae70: 6e10 bgts 7ae82 <_Timespec_Greater_than+0x26> #include #include #include bool _Timespec_Greater_than( 7ae72: 2068 0004 moveal %a0@(4),%a0 7ae76: b1e9 0004 cmpal %a1@(4),%a0 7ae7a: 5dc0 slt %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 7ae7c: 4e5e unlk %fp #include #include #include bool _Timespec_Greater_than( 7ae7e: 4480 negl %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 7ae80: 4e75 rts 7ae82: 4e5e unlk %fp <== NOT EXECUTED ) { if ( lhs->tv_sec > rhs->tv_sec ) return true; if ( lhs->tv_sec < rhs->tv_sec ) 7ae84: 4200 clrb %d0 <== NOT EXECUTED /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 7ae86: 4e75 rts <== NOT EXECUTED 7ae88: 4e5e unlk %fp bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 7ae8a: 7001 moveq #1,%d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 7ae8c: 4e75 rts ... 00048c62 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 48c62: 4e56 0000 linkw %fp,#0 48c66: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48c68: 2479 0005 daea moveal 5daea <_User_extensions_List+0x8>,%a2 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 48c6e: 2f02 movel %d2,%sp@- 48c70: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48c74: b5fc 0005 dae2 cmpal #383714,%a2 48c7a: 671a beqs 48c96 <_User_extensions_Thread_exitted+0x34> !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) 48c7c: 206a 002c moveal %a2@(44),%a0 48c80: 4a88 tstl %a0 48c82: 6706 beqs 48c8a <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 48c84: 2f02 movel %d2,%sp@- 48c86: 4e90 jsr %a0@ 48c88: 588f addql #4,%sp <== NOT EXECUTED Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 48c8a: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48c8e: b5fc 0005 dae2 cmpal #383714,%a2 48c94: 66e6 bnes 48c7c <_User_extensions_Thread_exitted+0x1a> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 48c96: 242e fff8 movel %fp@(-8),%d2 48c9a: 246e fffc moveal %fp@(-4),%a2 48c9e: 4e5e unlk %fp 48ca0: 4e75 rts 000482cc : rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 482cc: 4e56 fff4 linkw %fp,#-12 482d0: 226e 000c moveal %fp@(12),%a1 482d4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 482d8: 242e 0008 movel %fp@(8),%d2 482dc: 246e 0010 moveal %fp@(16),%a2 rtems_device_major_number major_limit = _IO_Number_of_drivers; 482e0: 2039 0006 3ca2 movel 63ca2 <_IO_Number_of_drivers>,%d0 if ( rtems_interrupt_is_in_progress() ) 482e6: 2239 0006 3af6 movel 63af6 <_ISR_Nest_level>,%d1 482ec: 6600 009c bnew 4838a return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 482f0: 4a8a tstl %a2 482f2: 6700 00ea beqw 483de return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 482f6: 2480 movel %d0,%a2@ if ( driver_table == NULL ) 482f8: 4a89 tstl %a1 482fa: 6700 00e2 beqw 483de static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 482fe: 4a91 tstl %a1@ 48300: 6700 00d4 beqw 483d6 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 48304: b480 cmpl %d0,%d2 48306: 6476 bccs 4837e rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 48308: 2039 0006 3a5c movel 63a5c <_Thread_Dispatch_disable_level>,%d0 4830e: 5280 addql #1,%d0 48310: 23c0 0006 3a5c movel %d0,63a5c <_Thread_Dispatch_disable_level> return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 48316: 4a82 tstl %d2 48318: 667c bnes 48396 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 4831a: 2039 0006 3ca2 movel 63ca2 <_IO_Number_of_drivers>,%d0 rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 48320: 6700 00fc beqw 4841e 48324: 2239 0006 3ca6 movel 63ca6 <_IO_Driver_address_table>,%d1 4832a: 2041 moveal %d1,%a0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 4832c: 4a90 tstl %a0@ 4832e: 6700 008e beqw 483be rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 48332: 5282 addql #1,%d2 48334: 41e8 0018 lea %a0@(24),%a0 48338: b480 cmpl %d0,%d2 4833a: 65f0 bcss 4832c if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 4833c: 2482 movel %d2,%a2@ if ( m != n ) 4833e: b480 cmpl %d0,%d2 48340: 6700 00de beqw 48420 48344: 2602 movel %d2,%d3 48346: 2002 movel %d2,%d0 48348: 2041 moveal %d1,%a0 4834a: e78b lsll #3,%d3 4834c: eb88 lsll #5,%d0 4834e: 9083 subl %d3,%d0 48350: d1c0 addal %d0,%a0 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 48352: 20d9 movel %a1@+,%a0@+ 48354: 20d9 movel %a1@+,%a0@+ 48356: 20d9 movel %a1@+,%a0@+ 48358: 20d9 movel %a1@+,%a0@+ 4835a: 20d9 movel %a1@+,%a0@+ 4835c: 2091 movel %a1@,%a0@ _Thread_Enable_dispatch(); 4835e: 4eb9 0004 9df8 jsr 49df8 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 48364: 2d42 0008 movel %d2,%fp@(8) } 48368: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 4836e: 42ae 0010 clrl %fp@(16) 48372: 42ae 000c clrl %fp@(12) } 48376: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 48378: 4ef9 0005 0860 jmp 50860 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 4837e: 700a moveq #10,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48380: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48386: 4e5e unlk %fp 48388: 4e75 rts rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 4838a: 7012 moveq #18,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 4838c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48392: 4e5e unlk %fp 48394: 4e75 rts _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 48396: 2202 movel %d2,%d1 48398: 2002 movel %d2,%d0 4839a: e789 lsll #3,%d1 4839c: eb88 lsll #5,%d0 4839e: 2079 0006 3ca6 moveal 63ca6 <_IO_Driver_address_table>,%a0 483a4: 9081 subl %d1,%d0 483a6: d1c0 addal %d0,%a0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 483a8: 4a90 tstl %a0@ 483aa: 673e beqs 483ea major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); 483ac: 4eb9 0004 9df8 jsr 49df8 <_Thread_Enable_dispatch> 483b2: 700c moveq #12,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 483b4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 483ba: 4e5e unlk %fp 483bc: 4e75 rts static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 483be: 4aa8 0004 tstl %a0@(4) 483c2: 6700 ff78 beqw 4833c rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 483c6: 5282 addql #1,%d2 483c8: 41e8 0018 lea %a0@(24),%a0 483cc: b480 cmpl %d0,%d2 483ce: 6500 ff5c bcsw 4832c 483d2: 6000 ff68 braw 4833c static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 483d6: 4aa9 0004 tstl %a1@(4) 483da: 6600 ff28 bnew 48304 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 483de: 7009 moveq #9,%d0 } 483e0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 483e6: 4e5e unlk %fp 483e8: 4e75 rts static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 483ea: 4aa8 0004 tstl %a0@(4) 483ee: 66bc bnes 483ac } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 483f0: 20d9 movel %a1@+,%a0@+ 483f2: 20d9 movel %a1@+,%a0@+ 483f4: 20d9 movel %a1@+,%a0@+ 483f6: 20d9 movel %a1@+,%a0@+ 483f8: 20d9 movel %a1@+,%a0@+ 483fa: 2091 movel %a1@,%a0@ if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 483fc: 2482 movel %d2,%a2@ } _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); 483fe: 4eb9 0004 9df8 jsr 49df8 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 48404: 2d42 0008 movel %d2,%fp@(8) } 48408: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 4840e: 42ae 0010 clrl %fp@(16) 48412: 42ae 000c clrl %fp@(12) } 48416: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 48418: 4ef9 0005 0860 jmp 50860 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 4841e: 4292 clrl %a2@ <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 48420: 4eb9 0004 9df8 jsr 49df8 <_Thread_Enable_dispatch> 48426: 7005 moveq #5,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48428: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4842e: 4e5e unlk %fp 48430: 4e75 rts ... 000476e8 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 476e8: 4e56 0000 linkw %fp,#0 476ec: 2f0a movel %a2,%sp@- 476ee: 246e 0010 moveal %fp@(16),%a2 476f2: 2f02 movel %d2,%sp@- int i; /* * Validate parameters and look up information structure. */ if ( !info ) 476f4: 4a8a tstl %a2 476f6: 6766 beqs 4775e return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 476f8: 2f2e 000c movel %fp@(12),%sp@- 476fc: 2f2e 0008 movel %fp@(8),%sp@- 47700: 4eb9 0004 9298 jsr 49298 <_Objects_Get_information> if ( !obj_info ) 47706: 508f addql #8,%sp * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 47708: 2040 moveal %d0,%a0 if ( !obj_info ) 4770a: 4a80 tstl %d0 4770c: 675e beqs 4776c return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 4770e: 24a8 0006 movel %a0@(6),%a2@ info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 47712: 4282 clrl %d2 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; 47714: 2568 000a 0004 movel %a0@(10),%a2@(4) info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 4771a: 3428 000e movew %a0@(14),%d2 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; 4771e: 1568 0010 000c moveb %a0@(16),%a2@(12) info->maximum = obj_info->maximum; 47724: 2542 0008 movel %d2,%a2@(8) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 47728: 6750 beqs 4777a 4772a: 2068 0018 moveal %a0@(24),%a0 4772e: 7201 moveq #1,%d1 47730: 7001 moveq #1,%d0 47732: 93c9 subal %a1,%a1 47734: 5280 addql #1,%d0 if ( !obj_info->local_table[i] ) 47736: 4ab0 1c00 tstl %a0@(00000000,%d1:l:4) 4773a: 6718 beqs 47754 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 4773c: 2200 movel %d0,%d1 4773e: b082 cmpl %d2,%d0 47740: 63f2 blss 47734 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 47742: 2549 000e movel %a1,%a2@(14) 47746: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 47748: 242e fff8 movel %fp@(-8),%d2 4774c: 246e fffc moveal %fp@(-4),%a2 47750: 4e5e unlk %fp 47752: 4e75 rts info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) if ( !obj_info->local_table[i] ) unallocated++; 47754: 5289 addql #1,%a1 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 47756: 2200 movel %d0,%d1 47758: b082 cmpl %d2,%d0 4775a: 63d8 blss 47734 4775c: 60e4 bras 47742 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 4775e: 242e fff8 movel %fp@(-8),%d2 int i; /* * Validate parameters and look up information structure. */ if ( !info ) 47762: 7009 moveq #9,%d0 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 47764: 246e fffc moveal %fp@(-4),%a2 47768: 4e5e unlk %fp 4776a: 4e75 rts 4776c: 242e fff8 movel %fp@(-8),%d2 */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) 47770: 700a moveq #10,%d0 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 47772: 246e fffc moveal %fp@(-4),%a2 47776: 4e5e unlk %fp 47778: 4e75 rts info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 4777a: 93c9 subal %a1,%a1 <== NOT EXECUTED if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 4777c: 4280 clrl %d0 <== NOT EXECUTED 4777e: 2549 000e movel %a1,%a2@(14) <== NOT EXECUTED 47782: 60c4 bras 47748 <== NOT EXECUTED 0007a57c : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 7a57c: 4e56 ffec linkw %fp,#-20 7a580: 48d7 040c moveml %d2-%d3/%a2,%sp@ 7a584: 486e fffc pea %fp@(-4) 7a588: 242e 0008 movel %fp@(8),%d2 7a58c: 2f02 movel %d2,%sp@- 7a58e: 4879 000a 5752 pea a5752 <_Rate_monotonic_Information> 7a594: 4eb9 0004 da8c jsr 4da8c <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 7a59a: 4fef 000c lea %sp@(12),%sp 7a59e: 2440 moveal %d0,%a2 7a5a0: 4aae fffc tstl %fp@(-4) 7a5a4: 661e bnes 7a5c4 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 7a5a6: 2039 000a 53e2 movel a53e2 <_Thread_Executing>,%d0 7a5ac: b0aa 0040 cmpl %a2@(64),%d0 7a5b0: 671e beqs 7a5d0 _Thread_Enable_dispatch(); 7a5b2: 4eb9 0004 e3a8 jsr 4e3a8 <_Thread_Enable_dispatch> 7a5b8: 7017 moveq #23,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a5ba: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a5c0: 4e5e unlk %fp 7a5c2: 4e75 rts the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 7a5c4: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a5c6: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a5cc: 4e5e unlk %fp 7a5ce: 4e75 rts if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 7a5d0: 4aae 000c tstl %fp@(12) 7a5d4: 6700 00ce beqw 7a6a4 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 7a5d8: 203c 0000 0700 movel #1792,%d0 7a5de: 40c3 movew %sr,%d3 7a5e0: 8083 orl %d3,%d0 7a5e2: 46c0 movew %d0,%sr switch ( the_period->state ) { 7a5e4: 202a 0038 movel %a2@(56),%d0 7a5e8: 7202 moveq #2,%d1 7a5ea: b280 cmpl %d0,%d1 7a5ec: 6700 00dc beqw 7a6ca 7a5f0: 123c 0004 moveb #4,%d1 7a5f4: b280 cmpl %d0,%d1 7a5f6: 6762 beqs 7a65a 7a5f8: 4a80 tstl %d0 7a5fa: 66c8 bnes 7a5c4 case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 7a5fc: 46c3 movew %d3,%sr /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 7a5fe: 2f0a movel %a2,%sp@- 7a600: 2d40 fff8 movel %d0,%fp@(-8) 7a604: 4eb9 0007 a334 jsr 7a334 <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 7a60a: 223c 0007 a768 movel #501608,%d1 the_watchdog->id = id; 7a610: 2542 0030 movel %d2,%a2@(48) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 7a614: 242e 000c movel %fp@(12),%d2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 7a618: 2541 002c movel %d1,%a2@(44) the_period->state = RATE_MONOTONIC_ACTIVE; 7a61c: 7202 moveq #2,%d1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 7a61e: 2542 001c movel %d2,%a2@(28) 7a622: 2541 0038 movel %d1,%a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 7a626: 42aa 0018 clrl %a2@(24) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 7a62a: 42aa 0034 clrl %a2@(52) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 7a62e: 2542 003c movel %d2,%a2@(60) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 7a632: 486a 0010 pea %a2@(16) 7a636: 4879 000a 5400 pea a5400 <_Watchdog_Ticks_chain> 7a63c: 4eb9 0004 f478 jsr 4f478 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 7a642: 4eb9 0004 e3a8 jsr 4e3a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 7a648: 202e fff8 movel %fp@(-8),%d0 7a64c: 4fef 000c lea %sp@(12),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a650: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a656: 4e5e unlk %fp 7a658: 4e75 rts case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 7a65a: 2f0a movel %a2,%sp@- 7a65c: 4eb9 0007 a462 jsr 7a462 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 7a662: 46c3 movew %d3,%sr the_period->state = RATE_MONOTONIC_ACTIVE; 7a664: 7202 moveq #2,%d1 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 7a666: 7006 moveq #6,%d0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 7a668: 242e 000c movel %fp@(12),%d2 */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 7a66c: 2541 0038 movel %d1,%a2@(56) 7a670: 2542 001c movel %d2,%a2@(28) the_period->next_length = length; 7a674: 2542 003c movel %d2,%a2@(60) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 7a678: 486a 0010 pea %a2@(16) 7a67c: 4879 000a 5400 pea a5400 <_Watchdog_Ticks_chain> 7a682: 2d40 fff8 movel %d0,%fp@(-8) 7a686: 4eb9 0004 f478 jsr 4f478 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 7a68c: 4eb9 0004 e3a8 jsr 4e3a8 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 7a692: 202e fff8 movel %fp@(-8),%d0 7a696: 4fef 000c lea %sp@(12),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a69a: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a6a0: 4e5e unlk %fp 7a6a2: 4e75 rts _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 7a6a4: 202a 0038 movel %a2@(56),%d0 7a6a8: 7204 moveq #4,%d1 7a6aa: b280 cmpl %d0,%d1 7a6ac: 6400 009c bccw 7a74a 7a6b0: 4280 clrl %d0 <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 7a6b2: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 7a6b6: 4eb9 0004 e3a8 jsr 4e3a8 <_Thread_Enable_dispatch> <== NOT EXECUTED return( return_value ); 7a6bc: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a6c0: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a6c6: 4e5e unlk %fp 7a6c8: 4e75 rts case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 7a6ca: 2f0a movel %a2,%sp@- 7a6cc: 4eb9 0007 a462 jsr 7a462 <_Rate_monotonic_Update_statistics> * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; 7a6d2: 242e 000c movel %fp@(12),%d2 /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 7a6d6: 7001 moveq #1,%d0 the_period->next_length = length; 7a6d8: 2542 003c movel %d2,%a2@(60) /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 7a6dc: 2540 0038 movel %d0,%a2@(56) the_period->next_length = length; _ISR_Enable( level ); 7a6e0: 46c3 movew %d3,%sr _Thread_Executing->Wait.id = the_period->Object.id; 7a6e2: 2079 000a 53e2 moveal a53e2 <_Thread_Executing>,%a0 7a6e8: 216a 0008 0020 movel %a2@(8),%a0@(32) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 7a6ee: 4878 4000 pea 4000 7a6f2: 2f08 movel %a0,%sp@- 7a6f4: 4eb9 0004 ec74 jsr 4ec74 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 7a6fa: 203c 0000 0700 movel #1792,%d0 7a700: 40c1 movew %sr,%d1 7a702: 8081 orl %d1,%d0 7a704: 46c0 movew %d0,%sr local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 7a706: 7402 moveq #2,%d2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; 7a708: 202a 0038 movel %a2@(56),%d0 the_period->state = RATE_MONOTONIC_ACTIVE; 7a70c: 2542 0038 movel %d2,%a2@(56) _ISR_Enable( level ); 7a710: 46c1 movew %d1,%sr /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) 7a712: 7203 moveq #3,%d1 7a714: 4fef 000c lea %sp@(12),%sp 7a718: b280 cmpl %d0,%d1 7a71a: 6712 beqs 7a72e _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 7a71c: 4eb9 0004 e3a8 jsr 4e3a8 <_Thread_Enable_dispatch> 7a722: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a724: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a72a: 4e5e unlk %fp 7a72c: 4e75 rts /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 7a72e: 4878 4000 pea 4000 7a732: 2f39 000a 53e2 movel a53e2 <_Thread_Executing>,%sp@- 7a738: 4eb9 0004 dfd4 jsr 4dfd4 <_Thread_Clear_state> 7a73e: 508f addql #8,%sp _Thread_Enable_dispatch(); 7a740: 4eb9 0004 e3a8 jsr 4e3a8 <_Thread_Enable_dispatch> 7a746: 4280 clrl %d0 7a748: 60da bras 7a724 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 7a74a: 41f9 0009 f3d8 lea 9f3d8 ,%a0 7a750: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 7a754: 2d40 fff8 movel %d0,%fp@(-8) 7a758: 4eb9 0004 e3a8 jsr 4e3a8 <_Thread_Enable_dispatch> return( return_value ); 7a75e: 202e fff8 movel %fp@(-8),%d0 7a762: 6000 ff5c braw 7a6c0 ... 00069504 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 69504: 4e56 ff78 linkw %fp,#-136 69508: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 6950c: 262e 0008 movel %fp@(8),%d3 69510: 246e 000c moveal %fp@(12),%a2 rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 69514: 4a8a tstl %a2 69516: 6700 0082 beqw 6959a return; (*print)( context, "Period information by period\n" ); 6951a: 4879 0009 c0a4 pea 9c0a4 <_TOD_Days_per_month+0x68> 69520: 2f03 movel %d3,%sp@- 69522: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 69524: 4879 0009 c0c2 pea 9c0c2 <_TOD_Days_per_month+0x86> 6952a: 2f03 movel %d3,%sp@- 6952c: 4e92 jsr %a2@ (*print)( context, "--- Wall times are in seconds ---\n" ); 6952e: 4879 0009 c0e4 pea 9c0e4 <_TOD_Days_per_month+0xa8> 69534: 2f03 movel %d3,%sp@- 69536: 4e92 jsr %a2@ Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 69538: 4879 0009 c107 pea 9c107 <_TOD_Days_per_month+0xcb> 6953e: 2f03 movel %d3,%sp@- 69540: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 69542: 4fef 001c lea %sp@(28),%sp 69546: 2ebc 0009 c152 movel #639314,%sp@ 6954c: 2f03 movel %d3,%sp@- 6954e: 4e92 jsr %a2@ /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 69550: 2439 000a 5758 movel a5758 <_Rate_monotonic_Information+0x6>,%d2 69556: 508f addql #8,%sp 69558: b4b9 000a 575c cmpl a575c <_Rate_monotonic_Information+0xa>,%d2 6955e: 623a bhis 6959a 69560: 280e movel %fp,%d4 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 69562: 2a0e movel %fp,%d5 69564: 0684 ffff ffa2 addil #-94,%d4 6956a: 47f9 0007 a1ac lea 7a1ac ,%a3 status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 69570: 4bf9 0007 a26c lea 7a26c ,%a5 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 69576: 5b85 subql #5,%d5 69578: 49f9 0004 be3c lea 4be3c ,%a4 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 6957e: 2e3c 0006 ad54 movel #437588,%d7 * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 69584: 2f04 movel %d4,%sp@- 69586: 2f02 movel %d2,%sp@- 69588: 4e93 jsr %a3@ if ( status != RTEMS_SUCCESSFUL ) 6958a: 508f addql #8,%sp 6958c: 4a80 tstl %d0 6958e: 6714 beqs 695a4 * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 69590: 5282 addql #1,%d2 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 69592: b4b9 000a 575c cmpl a575c <_Rate_monotonic_Information+0xa>,%d2 69598: 63ea blss 69584 the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 6959a: 4cee 3cfc ff78 moveml %fp@(-136),%d2-%d7/%a2-%a5 695a0: 4e5e unlk %fp 695a2: 4e75 rts status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 695a4: 486e ffda pea %fp@(-38) 695a8: 2f02 movel %d2,%sp@- 695aa: 4e95 jsr %a5@ #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 695ac: 2f05 movel %d5,%sp@- 695ae: 4878 0005 pea 5 695b2: 2f2e ffda movel %fp@(-38),%sp@- 695b6: 4e94 jsr %a4@ /* * Print part of report line that is not dependent on granularity */ (*print)( context, 695b8: 2f2e ffa6 movel %fp@(-90),%sp@- 695bc: 2f2e ffa2 movel %fp@(-94),%sp@- 695c0: 2f05 movel %d5,%sp@- 695c2: 2f02 movel %d2,%sp@- 695c4: 4879 0009 c19e pea 9c19e <_TOD_Days_per_month+0x162> 695ca: 2f03 movel %d3,%sp@- 695cc: 4e92 jsr %a2@ ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 695ce: 202e ffa2 movel %fp@(-94),%d0 695d2: 4fef 002c lea %sp@(44),%sp 695d6: 6618 bnes 695f0 (*print)( context, "\n" ); 695d8: 4879 0009 d995 pea 9d995 <__FUNCTION__.5914+0x5d> * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 695de: 5282 addql #1,%d2 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 695e0: 2f03 movel %d3,%sp@- 695e2: 4e92 jsr %a2@ continue; 695e4: 508f addql #8,%sp /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 695e6: b4b9 000a 575c cmpl a575c <_Rate_monotonic_Information+0xa>,%d2 695ec: 6396 blss 69584 695ee: 60aa bras 6959a <== NOT EXECUTED struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 695f0: 486e fff2 pea %fp@(-14) 695f4: 2047 moveal %d7,%a0 * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 695f6: 5282 addql #1,%d2 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 695f8: 2f00 movel %d0,%sp@- 695fa: 486e ffba pea %fp@(-70) 695fe: 4e90 jsr %a0@ (*print)( context, 69600: 202e fff6 movel %fp@(-10),%d0 69604: 223c 0000 03e8 movel #1000,%d1 6960a: 4c41 0800 remsl %d1,%d0,%d0 6960e: 2c2e ffb6 movel %fp@(-74),%d6 69612: 2f00 movel %d0,%sp@- 69614: 2001 movel %d1,%d0 69616: 2f2e fff2 movel %fp@(-14),%sp@- 6961a: 4c40 6806 remsl %d0,%d6,%d6 6961e: 202e ffae movel %fp@(-82),%d0 69622: 2246 moveal %d6,%a1 69624: 223c 0000 03e8 movel #1000,%d1 6962a: 2f09 movel %a1,%sp@- 6962c: 2f2e ffb2 movel %fp@(-78),%sp@- 69630: 4c41 0800 remsl %d1,%d0,%d0 struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); (*print)( context, 69634: 2c3c 0000 03e8 movel #1000,%d6 struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); (*print)( context, 6963a: 2f00 movel %d0,%sp@- 6963c: 2f2e ffaa movel %fp@(-86),%sp@- 69640: 4879 0009 c1b5 pea 9c1b5 <_TOD_Days_per_month+0x179> 69646: 2f03 movel %d3,%sp@- 69648: 4e92 jsr %a2@ struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 6964a: 4fef 002c lea %sp@(44),%sp 6964e: 2047 moveal %d7,%a0 69650: 486e fff2 pea %fp@(-14) 69654: 2f2e ffa2 movel %fp@(-94),%sp@- 69658: 486e ffd2 pea %fp@(-46) 6965c: 4e90 jsr %a0@ (*print)( context, 6965e: 202e fff6 movel %fp@(-10),%d0 69662: 4c46 0800 remsl %d6,%d0,%d0 69666: 222e ffce movel %fp@(-50),%d1 6966a: 2f00 movel %d0,%sp@- 6966c: 2f2e fff2 movel %fp@(-14),%sp@- 69670: 4c46 1801 remsl %d6,%d1,%d1 69674: 202e ffc6 movel %fp@(-58),%d0 69678: 2241 moveal %d1,%a1 6967a: 2f09 movel %a1,%sp@- 6967c: 2f2e ffca movel %fp@(-54),%sp@- 69680: 4c46 0800 remsl %d6,%d0,%d0 69684: 2f00 movel %d0,%sp@- 69686: 2f2e ffc2 movel %fp@(-62),%sp@- 6968a: 4879 0009 c1d4 pea 9c1d4 <_TOD_Days_per_month+0x198> 69690: 2f03 movel %d3,%sp@- 69692: 4e92 jsr %a2@ 69694: 4fef 002c lea %sp@(44),%sp /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 69698: b4b9 000a 575c cmpl a575c <_Rate_monotonic_Information+0xa>,%d2 6969e: 6300 fee4 blsw 69584 696a2: 6000 fef6 braw 6959a <== NOT EXECUTED 0005725c : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 5725c: 4e56 fffc linkw %fp,#-4 57260: 2f03 movel %d3,%sp@- 57262: 262e 0010 movel %fp@(16),%d3 57266: 2f02 movel %d2,%sp@- 57268: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 5726c: 6700 0092 beqw 57300 return RTEMS_INVALID_ADDRESS; if ( !size ) 57270: 4a83 tstl %d3 57272: 6700 008c beqw 57300 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 57276: 2f39 0007 c992 movel 7c992 <_RTEMS_Allocator_Mutex>,%sp@- 5727c: 4eb9 0005 967c jsr 5967c <_API_Mutex_Lock> 57282: 486e fffc pea %fp@(-4) 57286: 2f2e 0008 movel %fp@(8),%sp@- 5728a: 4879 0007 c7e4 pea 7c7e4 <_Region_Information> 57290: 4eb9 0005 b0d0 jsr 5b0d0 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 57296: 222e fffc movel %fp@(-4),%d1 5729a: 4fef 0010 lea %sp@(16),%sp 5729e: 6636 bnes 572d6 case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 572a0: 2f03 movel %d3,%sp@- 572a2: 2040 moveal %d0,%a0 572a4: 2f02 movel %d2,%sp@- 572a6: 4868 0068 pea %a0@(104) 572aa: 4eb9 0005 ab0c jsr 5ab0c <_Heap_Size_of_alloc_area> 572b0: 4fef 000c lea %sp@(12),%sp 572b4: 4a00 tstb %d0 572b6: 6624 bnes 572dc case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 572b8: 2f39 0007 c992 movel 7c992 <_RTEMS_Allocator_Mutex>,%sp@- <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 572be: 7409 moveq #9,%d2 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 572c0: 4eb9 0005 96dc jsr 596dc <_API_Mutex_Unlock> <== NOT EXECUTED return return_status; 572c6: 588f addql #4,%sp <== NOT EXECUTED } 572c8: 2002 movel %d2,%d0 572ca: 242e fff4 movel %fp@(-12),%d2 572ce: 262e fff8 movel %fp@(-8),%d3 572d2: 4e5e unlk %fp 572d4: 4e75 rts return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 572d6: 7001 moveq #1,%d0 572d8: b081 cmpl %d1,%d0 572da: 6712 beqs 572ee case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 572dc: 2f39 0007 c992 movel 7c992 <_RTEMS_Allocator_Mutex>,%sp@- the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 572e2: 4282 clrl %d2 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 572e4: 4eb9 0005 96dc jsr 596dc <_API_Mutex_Unlock> return return_status; 572ea: 588f addql #4,%sp 572ec: 60da bras 572c8 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 572ee: 2f39 0007 c992 movel 7c992 <_RTEMS_Allocator_Mutex>,%sp@- return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 572f4: 7404 moveq #4,%d2 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 572f6: 4eb9 0005 96dc jsr 596dc <_API_Mutex_Unlock> return return_status; 572fc: 588f addql #4,%sp 572fe: 60c8 bras 572c8 57300: 7409 moveq #9,%d2 } 57302: 2002 movel %d2,%d0 57304: 242e fff4 movel %fp@(-12),%d2 57308: 262e fff8 movel %fp@(-8),%d3 5730c: 4e5e unlk %fp 5730e: 4e75 rts 0005895c : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 5895c: 4e56 ffec linkw %fp,#-20 58960: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 58964: 242e 000c movel %fp@(12),%d2 58968: 262e 0010 movel %fp@(16),%d3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 5896c: 2479 0007 cb3a moveal 7cb3a <_Timer_server>,%a2 if ( !timer_server ) 58972: 4a8a tstl %a2 58974: 6700 00c8 beqw 58a3e return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 58978: 4a39 0007 c8f4 tstb 7c8f4 <_TOD_Is_set> 5897e: 6700 00a6 beqw 58a26 return RTEMS_NOT_DEFINED; if ( !routine ) 58982: 4a83 tstl %d3 58984: 6700 00ac beqw 58a32 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 58988: 2f02 movel %d2,%sp@- 5898a: 4eb9 0005 5630 jsr 55630 <_TOD_Validate> 58990: 588f addql #4,%sp 58992: 4a00 tstb %d0 58994: 660c bnes 589a2 the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 58996: 7014 moveq #20,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58998: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 5899e: 4e5e unlk %fp 589a0: 4e75 rts return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 589a2: 2f02 movel %d2,%sp@- 589a4: 4eb9 0005 5520 jsr 55520 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 589aa: 588f addql #4,%sp return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 589ac: 2400 movel %d0,%d2 if ( seconds <= _TOD_Seconds_since_epoch() ) 589ae: b0b9 0007 c972 cmpl 7c972 <_TOD_Now>,%d0 589b4: 63e0 blss 58996 589b6: 486e fffc pea %fp@(-4) 589ba: 2f2e 0008 movel %fp@(8),%sp@- 589be: 4879 0007 cb02 pea 7cb02 <_Timer_Information> 589c4: 4eb9 0005 b10c jsr 5b10c <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 589ca: 4fef 000c lea %sp@(12),%sp 589ce: 2640 moveal %d0,%a3 589d0: 4aae fffc tstl %fp@(-4) 589d4: 6674 bnes 58a4a case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 589d6: 486b 0010 pea %a3@(16) 589da: 4eb9 0005 cf50 jsr 5cf50 <_Watchdog_Remove> the_watchdog->routine = routine; the_watchdog->id = id; 589e0: 202e 0008 movel %fp@(8),%d0 589e4: 2740 0030 movel %d0,%a3@(48) the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 589e8: 94b9 0007 c972 subl 7c972 <_TOD_Now>,%d2 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 589ee: 7003 moveq #3,%d0 the_watchdog->user_data = user_data; 589f0: 276e 0014 0034 movel %fp@(20),%a3@(52) 589f6: 2740 0038 movel %d0,%a3@(56) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 589fa: 2742 001c movel %d2,%a3@(28) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 589fe: 2743 002c movel %d3,%a3@(44) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 58a02: 42ab 0018 clrl %a3@(24) (*timer_server->schedule_operation)( timer_server, the_timer ); 58a06: 2f0b movel %a3,%sp@- 58a08: 2f0a movel %a2,%sp@- 58a0a: 206a 0004 moveal %a2@(4),%a0 58a0e: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 58a10: 4eb9 0005 b9fc jsr 5b9fc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 58a16: 4fef 000c lea %sp@(12),%sp _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); 58a1a: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58a1c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 58a22: 4e5e unlk %fp 58a24: 4e75 rts Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 58a26: 700b moveq #11,%d0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58a28: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 58a2e: 4e5e unlk %fp <== NOT EXECUTED 58a30: 4e75 rts <== NOT EXECUTED return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) 58a32: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58a34: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 58a3a: 4e5e unlk %fp 58a3c: 4e75 rts Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 58a3e: 700e moveq #14,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58a40: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 58a46: 4e5e unlk %fp 58a48: 4e75 rts seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58a4a: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58a4c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 58a52: 4e5e unlk %fp 58a54: 4e75 rts ...