=============================================================================== 0010e6d0 <_CORE_message_queue_Initialize>: 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 ) { 10e6d0: 55 push %ebp 10e6d1: 89 e5 mov %esp,%ebp 10e6d3: 57 push %edi 10e6d4: 56 push %esi 10e6d5: 53 push %ebx 10e6d6: 83 ec 1c sub $0x1c,%esp 10e6d9: 8b 5d 08 mov 0x8(%ebp),%ebx 10e6dc: 8b 7d 10 mov 0x10(%ebp),%edi 10e6df: 8b 45 14 mov 0x14(%ebp),%eax size_t message_buffering_required = 0; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 10e6e2: 89 7b 44 mov %edi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 10e6e5: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 10e6ec: 89 43 4c mov %eax,0x4c(%ebx) /* * 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)) { 10e6ef: 89 c1 mov %eax,%ecx 10e6f1: a8 03 test $0x3,%al 10e6f3: 74 0c je 10e701 <_CORE_message_queue_Initialize+0x31> allocated_message_size += sizeof(uint32_t); 10e6f5: 83 c1 04 add $0x4,%ecx allocated_message_size &= ~(sizeof(uint32_t) - 1); 10e6f8: 83 e1 fc and $0xfffffffc,%ecx } if (allocated_message_size < maximum_message_size) return false; 10e6fb: 31 f6 xor %esi,%esi if (allocated_message_size & (sizeof(uint32_t) - 1)) { allocated_message_size += sizeof(uint32_t); allocated_message_size &= ~(sizeof(uint32_t) - 1); } if (allocated_message_size < maximum_message_size) 10e6fd: 39 c1 cmp %eax,%ecx 10e6ff: 72 6d jb 10e76e <_CORE_message_queue_Initialize+0x9e><== NEVER TAKEN /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ if ( !size_t_mult32_with_overflow( 10e701: 83 c1 10 add $0x10,%ecx size_t a, size_t b, size_t *c ) { long long x = (long long)a*b; 10e704: 89 f8 mov %edi,%eax 10e706: f7 e1 mul %ecx 10e708: 89 45 d8 mov %eax,-0x28(%ebp) 10e70b: 89 55 dc mov %edx,-0x24(%ebp) */ if ( !size_t_mult32_with_overflow( (size_t) maximum_pending_messages, allocated_message_size + sizeof(CORE_message_queue_Buffer_control), &message_buffering_required ) ) return false; 10e70e: 31 f6 xor %esi,%esi size_t *c ) { long long x = (long long)a*b; if ( x > SIZE_MAX ) 10e710: 85 d2 test %edx,%edx 10e712: 7f 5a jg 10e76e <_CORE_message_queue_Initialize+0x9e> /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); 10e714: 83 ec 0c sub $0xc,%esp 10e717: 50 push %eax 10e718: 89 4d e4 mov %ecx,-0x1c(%ebp) 10e71b: e8 56 e0 ff ff call 10c776 <_Workspace_Allocate> return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 10e720: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 10e723: 83 c4 10 add $0x10,%esp 10e726: 85 c0 test %eax,%eax 10e728: 8b 4d e4 mov -0x1c(%ebp),%ecx 10e72b: 74 41 je 10e76e <_CORE_message_queue_Initialize+0x9e><== NEVER TAKEN /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 10e72d: 51 push %ecx 10e72e: 57 push %edi 10e72f: 50 push %eax 10e730: 8d 43 60 lea 0x60(%ebx),%eax 10e733: 50 push %eax 10e734: e8 db fe ff ff call 10e614 <_Chain_Initialize> Chain_Node *tail = _Chain_Tail( the_chain ); 10e739: 8d 43 50 lea 0x50(%ebx),%eax 10e73c: 8d 53 54 lea 0x54(%ebx),%edx 10e73f: 89 53 50 mov %edx,0x50(%ebx) head->next = tail; head->previous = NULL; 10e742: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 10e749: 89 43 58 mov %eax,0x58(%ebx) allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 10e74c: 6a 06 push $0x6 10e74e: 68 80 00 00 00 push $0x80 10e753: 8b 45 0c mov 0xc(%ebp),%eax 10e756: 83 38 01 cmpl $0x1,(%eax) 10e759: 0f 94 c0 sete %al 10e75c: 0f b6 c0 movzbl %al,%eax 10e75f: 50 push %eax 10e760: 53 push %ebx 10e761: e8 1e d9 ff ff call 10c084 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 10e766: 83 c4 20 add $0x20,%esp 10e769: be 01 00 00 00 mov $0x1,%esi } 10e76e: 89 f0 mov %esi,%eax 10e770: 8d 65 f4 lea -0xc(%ebp),%esp 10e773: 5b pop %ebx 10e774: 5e pop %esi 10e775: 5f pop %edi 10e776: 5d pop %ebp 10e777: c3 ret =============================================================================== 0010a628 <_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 ) { 10a628: 55 push %ebp 10a629: 89 e5 mov %esp,%ebp 10a62b: 53 push %ebx 10a62c: 83 ec 10 sub $0x10,%esp 10a62f: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 10a632: 53 push %ebx 10a633: e8 3c 17 00 00 call 10bd74 <_Thread_queue_Dequeue> 10a638: 83 c4 10 add $0x10,%esp { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10a63b: 31 d2 xor %edx,%edx if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 10a63d: 85 c0 test %eax,%eax 10a63f: 75 15 jne 10a656 <_CORE_semaphore_Surrender+0x2e> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 10a641: 9c pushf 10a642: fa cli 10a643: 59 pop %ecx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10a644: 8b 43 48 mov 0x48(%ebx),%eax the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; 10a647: b2 04 mov $0x4,%dl (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10a649: 3b 43 40 cmp 0x40(%ebx),%eax 10a64c: 73 06 jae 10a654 <_CORE_semaphore_Surrender+0x2c><== NEVER TAKEN the_semaphore->count += 1; 10a64e: 40 inc %eax 10a64f: 89 43 48 mov %eax,0x48(%ebx) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10a652: 30 d2 xor %dl,%dl _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10a654: 51 push %ecx 10a655: 9d popf } return status; } 10a656: 89 d0 mov %edx,%eax 10a658: 8b 5d fc mov -0x4(%ebp),%ebx 10a65b: c9 leave 10a65c: c3 ret =============================================================================== 0010970c <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10970c: 55 push %ebp 10970d: 89 e5 mov %esp,%ebp 10970f: 57 push %edi 109710: 56 push %esi 109711: 53 push %ebx 109712: 83 ec 1c sub $0x1c,%esp 109715: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 109718: 8b bb e0 00 00 00 mov 0xe0(%ebx),%edi option_set = (rtems_option) the_thread->Wait.option; 10971e: 8b 43 30 mov 0x30(%ebx),%eax 109721: 89 45 e0 mov %eax,-0x20(%ebp) _ISR_Disable( level ); 109724: 9c pushf 109725: fa cli 109726: 58 pop %eax pending_events = api->pending_events; 109727: 8b 17 mov (%edi),%edx 109729: 89 55 dc mov %edx,-0x24(%ebp) event_condition = (rtems_event_set) the_thread->Wait.count; 10972c: 8b 73 24 mov 0x24(%ebx),%esi seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 10972f: 21 f2 and %esi,%edx 109731: 0f 84 ab 00 00 00 je 1097e2 <_Event_Surrender+0xd6> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 109737: 83 3d b4 f4 12 00 00 cmpl $0x0,0x12f4b4 10973e: 74 47 je 109787 <_Event_Surrender+0x7b> 109740: 3b 1d b8 f4 12 00 cmp 0x12f4b8,%ebx 109746: 75 3f jne 109787 <_Event_Surrender+0x7b> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 109748: 8b 0d f4 f4 12 00 mov 0x12f4f4,%ecx /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && 10974e: 83 f9 02 cmp $0x2,%ecx 109751: 74 09 je 10975c <_Event_Surrender+0x50> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 109753: 8b 0d f4 f4 12 00 mov 0x12f4f4,%ecx * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 109759: 49 dec %ecx 10975a: 75 2b jne 109787 <_Event_Surrender+0x7b> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 10975c: 39 f2 cmp %esi,%edx 10975e: 74 06 je 109766 <_Event_Surrender+0x5a> 109760: f6 45 e0 02 testb $0x2,-0x20(%ebp) 109764: 74 7c je 1097e2 <_Event_Surrender+0xd6> <== NEVER TAKEN RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) { return ( the_event_set & ~(the_mask) ); 109766: 89 d6 mov %edx,%esi 109768: f7 d6 not %esi 10976a: 23 75 dc and -0x24(%ebp),%esi 10976d: 89 37 mov %esi,(%edi) api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 10976f: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 109776: 8b 4b 28 mov 0x28(%ebx),%ecx 109779: 89 11 mov %edx,(%ecx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10977b: c7 05 f4 f4 12 00 03 movl $0x3,0x12f4f4 109782: 00 00 00 109785: eb 5b jmp 1097e2 <_Event_Surrender+0xd6> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 109787: f6 43 11 01 testb $0x1,0x11(%ebx) 10978b: 74 55 je 1097e2 <_Event_Surrender+0xd6> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 10978d: 39 f2 cmp %esi,%edx 10978f: 74 06 je 109797 <_Event_Surrender+0x8b> 109791: f6 45 e0 02 testb $0x2,-0x20(%ebp) 109795: 74 4b je 1097e2 <_Event_Surrender+0xd6> <== NEVER TAKEN 109797: 89 d6 mov %edx,%esi 109799: f7 d6 not %esi 10979b: 23 75 dc and -0x24(%ebp),%esi 10979e: 89 37 mov %esi,(%edi) api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 1097a0: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 1097a7: 8b 4b 28 mov 0x28(%ebx),%ecx 1097aa: 89 11 mov %edx,(%ecx) _ISR_Flash( level ); 1097ac: 50 push %eax 1097ad: 9d popf 1097ae: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 1097af: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 1097b3: 74 06 je 1097bb <_Event_Surrender+0xaf> _ISR_Enable( level ); 1097b5: 50 push %eax 1097b6: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 1097b7: 51 push %ecx 1097b8: 51 push %ecx 1097b9: eb 17 jmp 1097d2 <_Event_Surrender+0xc6> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 1097bb: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 1097c2: 50 push %eax 1097c3: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 1097c4: 83 ec 0c sub $0xc,%esp 1097c7: 8d 43 48 lea 0x48(%ebx),%eax 1097ca: 50 push %eax 1097cb: e8 8c 2e 00 00 call 10c65c <_Watchdog_Remove> 1097d0: 58 pop %eax 1097d1: 5a pop %edx 1097d2: 68 f8 ff 03 10 push $0x1003fff8 1097d7: 53 push %ebx 1097d8: e8 43 1f 00 00 call 10b720 <_Thread_Clear_state> 1097dd: 83 c4 10 add $0x10,%esp 1097e0: eb 02 jmp 1097e4 <_Event_Surrender+0xd8> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 1097e2: 50 push %eax 1097e3: 9d popf } 1097e4: 8d 65 f4 lea -0xc(%ebp),%esp 1097e7: 5b pop %ebx 1097e8: 5e pop %esi 1097e9: 5f pop %edi 1097ea: 5d pop %ebp 1097eb: c3 ret =============================================================================== 001097ec <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 1097ec: 55 push %ebp 1097ed: 89 e5 mov %esp,%ebp 1097ef: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 1097f2: 8d 45 f4 lea -0xc(%ebp),%eax 1097f5: 50 push %eax 1097f6: ff 75 08 pushl 0x8(%ebp) 1097f9: e8 76 22 00 00 call 10ba74 <_Thread_Get> switch ( location ) { 1097fe: 83 c4 10 add $0x10,%esp 109801: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 109805: 75 4e jne 109855 <_Event_Timeout+0x69> <== NEVER TAKEN * * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 109807: 9c pushf 109808: fa cli 109809: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10980a: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 109811: 3b 05 b8 f4 12 00 cmp 0x12f4b8,%eax 109817: 75 13 jne 10982c <_Event_Timeout+0x40> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 109819: 8b 0d f4 f4 12 00 mov 0x12f4f4,%ecx 10981f: 49 dec %ecx 109820: 75 0a jne 10982c <_Event_Timeout+0x40> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 109822: c7 05 f4 f4 12 00 02 movl $0x2,0x12f4f4 109829: 00 00 00 } the_thread->Wait.return_code = RTEMS_TIMEOUT; 10982c: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 109833: 52 push %edx 109834: 9d popf 109835: 52 push %edx 109836: 52 push %edx 109837: 68 f8 ff 03 10 push $0x1003fff8 10983c: 50 push %eax 10983d: e8 de 1e 00 00 call 10b720 <_Thread_Clear_state> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 109842: a1 a4 f2 12 00 mov 0x12f2a4,%eax 109847: 48 dec %eax 109848: a3 a4 f2 12 00 mov %eax,0x12f2a4 return _Thread_Dispatch_disable_level; 10984d: a1 a4 f2 12 00 mov 0x12f2a4,%eax 109852: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 109855: c9 leave 109856: c3 ret =============================================================================== 0010e8bb <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 10e8bb: 55 push %ebp 10e8bc: 89 e5 mov %esp,%ebp 10e8be: 57 push %edi 10e8bf: 56 push %esi 10e8c0: 53 push %ebx 10e8c1: 83 ec 4c sub $0x4c,%esp 10e8c4: 8b 5d 08 mov 0x8(%ebp),%ebx 10e8c7: 8b 4d 10 mov 0x10(%ebp),%ecx Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; 10e8ca: 8b 43 20 mov 0x20(%ebx),%eax 10e8cd: 89 45 c0 mov %eax,-0x40(%ebp) Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; 10e8d0: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) Heap_Block *extend_last_block = NULL; 10e8d7: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) uintptr_t const page_size = heap->page_size; 10e8de: 8b 53 10 mov 0x10(%ebx),%edx 10e8e1: 89 55 c4 mov %edx,-0x3c(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10e8e4: 8b 43 14 mov 0x14(%ebx),%eax uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; uintptr_t const free_size = stats->free_size; 10e8e7: 8b 53 30 mov 0x30(%ebx),%edx 10e8ea: 89 55 bc mov %edx,-0x44(%ebp) uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { return false; 10e8ed: 31 f6 xor %esi,%esi uintptr_t const free_size = stats->free_size; uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { 10e8ef: 8b 7d 0c mov 0xc(%ebp),%edi 10e8f2: 01 cf add %ecx,%edi 10e8f4: 0f 82 d4 01 00 00 jb 10eace <_Heap_Extend+0x213> return false; } extend_area_ok = _Heap_Get_first_and_last_block( 10e8fa: 52 push %edx 10e8fb: 52 push %edx 10e8fc: 8d 55 e4 lea -0x1c(%ebp),%edx 10e8ff: 52 push %edx 10e900: 8d 55 e0 lea -0x20(%ebp),%edx 10e903: 52 push %edx 10e904: 50 push %eax 10e905: ff 75 c4 pushl -0x3c(%ebp) 10e908: 51 push %ecx 10e909: ff 75 0c pushl 0xc(%ebp) 10e90c: e8 4d bd ff ff call 10a65e <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 10e911: 83 c4 20 add $0x20,%esp 10e914: 84 c0 test %al,%al 10e916: 0f 84 b2 01 00 00 je 10eace <_Heap_Extend+0x213> 10e91c: 8b 4d c0 mov -0x40(%ebp),%ecx 10e91f: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10e926: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) 10e92d: 31 f6 xor %esi,%esi 10e92f: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 10e936: 8b 43 18 mov 0x18(%ebx),%eax 10e939: 89 5d b8 mov %ebx,-0x48(%ebp) 10e93c: eb 02 jmp 10e940 <_Heap_Extend+0x85> 10e93e: 89 c8 mov %ecx,%eax uintptr_t const sub_area_end = start_block->prev_size; 10e940: 8b 19 mov (%ecx),%ebx Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 10e942: 39 c7 cmp %eax,%edi 10e944: 76 09 jbe 10e94f <_Heap_Extend+0x94> 10e946: 39 5d 0c cmp %ebx,0xc(%ebp) 10e949: 0f 82 7d 01 00 00 jb 10eacc <_Heap_Extend+0x211> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { 10e94f: 39 c7 cmp %eax,%edi 10e951: 74 06 je 10e959 <_Heap_Extend+0x9e> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 10e953: 39 df cmp %ebx,%edi 10e955: 72 07 jb 10e95e <_Heap_Extend+0xa3> 10e957: eb 08 jmp 10e961 <_Heap_Extend+0xa6> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { 10e959: 89 4d d0 mov %ecx,-0x30(%ebp) 10e95c: eb 03 jmp 10e961 <_Heap_Extend+0xa6> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 10e95e: 89 4d c8 mov %ecx,-0x38(%ebp) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10e961: 8d 43 f8 lea -0x8(%ebx),%eax 10e964: 89 45 d4 mov %eax,-0x2c(%ebp) 10e967: 89 d8 mov %ebx,%eax 10e969: 31 d2 xor %edx,%edx 10e96b: f7 75 c4 divl -0x3c(%ebp) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 10e96e: 29 55 d4 sub %edx,-0x2c(%ebp) link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 10e971: 3b 5d 0c cmp 0xc(%ebp),%ebx 10e974: 75 07 jne 10e97d <_Heap_Extend+0xc2> start_block->prev_size = extend_area_end; 10e976: 89 39 mov %edi,(%ecx) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 10e978: 8b 75 d4 mov -0x2c(%ebp),%esi 10e97b: eb 08 jmp 10e985 <_Heap_Extend+0xca> merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 10e97d: 73 06 jae 10e985 <_Heap_Extend+0xca> 10e97f: 8b 4d d4 mov -0x2c(%ebp),%ecx 10e982: 89 4d cc mov %ecx,-0x34(%ebp) - 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; 10e985: 8b 45 d4 mov -0x2c(%ebp),%eax 10e988: 8b 48 04 mov 0x4(%eax),%ecx 10e98b: 83 e1 fe and $0xfffffffe,%ecx RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10e98e: 01 c1 add %eax,%ecx link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 10e990: 3b 4d c0 cmp -0x40(%ebp),%ecx 10e993: 75 a9 jne 10e93e <_Heap_Extend+0x83> 10e995: 8b 5d b8 mov -0x48(%ebp),%ebx if ( extend_area_begin < heap->area_begin ) { 10e998: 8b 4d 0c mov 0xc(%ebp),%ecx 10e99b: 3b 4b 18 cmp 0x18(%ebx),%ecx 10e99e: 73 05 jae 10e9a5 <_Heap_Extend+0xea> heap->area_begin = extend_area_begin; 10e9a0: 89 4b 18 mov %ecx,0x18(%ebx) 10e9a3: eb 08 jmp 10e9ad <_Heap_Extend+0xf2> } else if ( heap->area_end < extend_area_end ) { 10e9a5: 39 7b 1c cmp %edi,0x1c(%ebx) 10e9a8: 73 03 jae 10e9ad <_Heap_Extend+0xf2> heap->area_end = extend_area_end; 10e9aa: 89 7b 1c mov %edi,0x1c(%ebx) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 10e9ad: 8b 45 e4 mov -0x1c(%ebp),%eax 10e9b0: 8b 55 e0 mov -0x20(%ebp),%edx heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 10e9b3: 89 c1 mov %eax,%ecx 10e9b5: 29 d1 sub %edx,%ecx 10e9b7: 89 4d d4 mov %ecx,-0x2c(%ebp) (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 10e9ba: 89 3a mov %edi,(%edx) extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 10e9bc: 83 c9 01 or $0x1,%ecx 10e9bf: 89 4a 04 mov %ecx,0x4(%edx) _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 10e9c2: 8b 4d d4 mov -0x2c(%ebp),%ecx 10e9c5: 89 08 mov %ecx,(%eax) extend_last_block->size_and_flag = 0; 10e9c7: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 10e9ce: 39 53 20 cmp %edx,0x20(%ebx) 10e9d1: 76 05 jbe 10e9d8 <_Heap_Extend+0x11d> heap->first_block = extend_first_block; 10e9d3: 89 53 20 mov %edx,0x20(%ebx) 10e9d6: eb 08 jmp 10e9e0 <_Heap_Extend+0x125> } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 10e9d8: 39 43 24 cmp %eax,0x24(%ebx) 10e9db: 73 03 jae 10e9e0 <_Heap_Extend+0x125> heap->last_block = extend_last_block; 10e9dd: 89 43 24 mov %eax,0x24(%ebx) } if ( merge_below_block != NULL ) { 10e9e0: 83 7d d0 00 cmpl $0x0,-0x30(%ebp) 10e9e4: 74 3b je 10ea21 <_Heap_Extend+0x166> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 10e9e6: 8b 4b 10 mov 0x10(%ebx),%ecx 10e9e9: 89 4d d4 mov %ecx,-0x2c(%ebp) uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); 10e9ec: 8b 4d 0c mov 0xc(%ebp),%ecx 10e9ef: 83 c1 08 add $0x8,%ecx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10e9f2: 89 c8 mov %ecx,%eax 10e9f4: 31 d2 xor %edx,%edx 10e9f6: f7 75 d4 divl -0x2c(%ebp) if ( remainder != 0 ) { 10e9f9: 85 d2 test %edx,%edx 10e9fb: 74 05 je 10ea02 <_Heap_Extend+0x147> return value - remainder + alignment; 10e9fd: 03 4d d4 add -0x2c(%ebp),%ecx 10ea00: 29 d1 sub %edx,%ecx uintptr_t const new_first_block_begin = 10ea02: 8d 51 f8 lea -0x8(%ecx),%edx uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; 10ea05: 8b 45 d0 mov -0x30(%ebp),%eax 10ea08: 8b 00 mov (%eax),%eax 10ea0a: 89 41 f8 mov %eax,-0x8(%ecx) uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const new_first_block_begin = new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = 10ea0d: 8b 45 d0 mov -0x30(%ebp),%eax 10ea10: 29 d0 sub %edx,%eax first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; 10ea12: 83 c8 01 or $0x1,%eax 10ea15: 89 42 04 mov %eax,0x4(%edx) _Heap_Free_block( heap, new_first_block ); 10ea18: 89 d8 mov %ebx,%eax 10ea1a: e8 81 fe ff ff call 10e8a0 <_Heap_Free_block> 10ea1f: eb 11 jmp 10ea32 <_Heap_Extend+0x177> heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { _Heap_Merge_below( heap, extend_area_begin, merge_below_block ); } else if ( link_below_block != NULL ) { 10ea21: 83 7d c8 00 cmpl $0x0,-0x38(%ebp) 10ea25: 74 0b je 10ea32 <_Heap_Extend+0x177> { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = (link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED; 10ea27: 8b 55 c8 mov -0x38(%ebp),%edx 10ea2a: 29 c2 sub %eax,%edx 10ea2c: 83 ca 01 or $0x1,%edx 10ea2f: 89 50 04 mov %edx,0x4(%eax) link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 10ea32: 85 f6 test %esi,%esi 10ea34: 74 30 je 10ea66 <_Heap_Extend+0x1ab> ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE, 10ea36: 83 ef 08 sub $0x8,%edi uintptr_t extend_area_end ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( 10ea39: 29 f7 sub %esi,%edi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10ea3b: 89 f8 mov %edi,%eax 10ea3d: 31 d2 xor %edx,%edx 10ea3f: f7 73 10 divl 0x10(%ebx) 10ea42: 29 d7 sub %edx,%edi ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) 10ea44: 8b 46 04 mov 0x4(%esi),%eax 10ea47: 29 f8 sub %edi,%eax | HEAP_PREV_BLOCK_USED; 10ea49: 83 c8 01 or $0x1,%eax 10ea4c: 89 44 37 04 mov %eax,0x4(%edi,%esi,1) RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 10ea50: 8b 46 04 mov 0x4(%esi),%eax 10ea53: 83 e0 01 and $0x1,%eax block->size_and_flag = size | flag; 10ea56: 09 f8 or %edi,%eax 10ea58: 89 46 04 mov %eax,0x4(%esi) _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 10ea5b: 89 f2 mov %esi,%edx 10ea5d: 89 d8 mov %ebx,%eax 10ea5f: e8 3c fe ff ff call 10e8a0 <_Heap_Free_block> 10ea64: eb 24 jmp 10ea8a <_Heap_Extend+0x1cf> ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 10ea66: 83 7d cc 00 cmpl $0x0,-0x34(%ebp) 10ea6a: 74 1e je 10ea8a <_Heap_Extend+0x1cf> _Heap_Link_above( 10ea6c: 8b 4d e4 mov -0x1c(%ebp),%ecx RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 10ea6f: 8b 55 cc mov -0x34(%ebp),%edx 10ea72: 8b 42 04 mov 0x4(%edx),%eax 10ea75: 83 e0 01 and $0x1,%eax ) { uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); 10ea78: 8b 55 e0 mov -0x20(%ebp),%edx 10ea7b: 2b 55 cc sub -0x34(%ebp),%edx block->size_and_flag = size | flag; 10ea7e: 09 d0 or %edx,%eax 10ea80: 8b 55 cc mov -0x34(%ebp),%edx 10ea83: 89 42 04 mov %eax,0x4(%edx) last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 10ea86: 83 49 04 01 orl $0x1,0x4(%ecx) extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 10ea8a: 85 f6 test %esi,%esi 10ea8c: 75 10 jne 10ea9e <_Heap_Extend+0x1e3> 10ea8e: 83 7d d0 00 cmpl $0x0,-0x30(%ebp) 10ea92: 75 0a jne 10ea9e <_Heap_Extend+0x1e3> _Heap_Free_block( heap, extend_first_block ); 10ea94: 8b 55 e0 mov -0x20(%ebp),%edx 10ea97: 89 d8 mov %ebx,%eax 10ea99: e8 02 fe ff ff call 10e8a0 <_Heap_Free_block> */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( heap->last_block, (uintptr_t) heap->first_block - (uintptr_t) heap->last_block 10ea9e: 8b 53 24 mov 0x24(%ebx),%edx RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 10eaa1: 8b 42 04 mov 0x4(%edx),%eax 10eaa4: 83 e0 01 and $0x1,%eax * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( 10eaa7: 8b 4b 20 mov 0x20(%ebx),%ecx 10eaaa: 29 d1 sub %edx,%ecx uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 10eaac: 09 c8 or %ecx,%eax 10eaae: 89 42 04 mov %eax,0x4(%edx) } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 10eab1: 8b 43 30 mov 0x30(%ebx),%eax 10eab4: 2b 45 bc sub -0x44(%ebp),%eax /* Statistics */ stats->size += extended_size; 10eab7: 01 43 2c add %eax,0x2c(%ebx) if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 10eaba: be 01 00 00 00 mov $0x1,%esi extended_size = stats->free_size - free_size; /* Statistics */ stats->size += extended_size; if ( extended_size_ptr != NULL ) 10eabf: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10eac3: 74 09 je 10eace <_Heap_Extend+0x213> <== NEVER TAKEN *extended_size_ptr = extended_size; 10eac5: 8b 4d 14 mov 0x14(%ebp),%ecx 10eac8: 89 01 mov %eax,(%ecx) 10eaca: eb 02 jmp 10eace <_Heap_Extend+0x213> _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; 10eacc: 31 f6 xor %esi,%esi if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 10eace: 89 f0 mov %esi,%eax 10ead0: 8d 65 f4 lea -0xc(%ebp),%esp 10ead3: 5b pop %ebx 10ead4: 5e pop %esi 10ead5: 5f pop %edi 10ead6: 5d pop %ebp 10ead7: c3 ret =============================================================================== 0010eb4c <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 10eb4c: 55 push %ebp 10eb4d: 89 e5 mov %esp,%ebp 10eb4f: 57 push %edi 10eb50: 56 push %esi 10eb51: 53 push %ebx 10eb52: 83 ec 10 sub $0x10,%esp 10eb55: 8b 4d 08 mov 0x8(%ebp),%ecx 10eb58: 8b 45 0c mov 0xc(%ebp),%eax * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { return true; 10eb5b: bf 01 00 00 00 mov $0x1,%edi /* * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { 10eb60: 85 c0 test %eax,%eax 10eb62: 0f 84 3e 01 00 00 je 10eca6 <_Heap_Free+0x15a> 10eb68: 8d 58 f8 lea -0x8(%eax),%ebx 10eb6b: 31 d2 xor %edx,%edx 10eb6d: f7 71 10 divl 0x10(%ecx) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 10eb70: 29 d3 sub %edx,%ebx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10eb72: 8b 41 20 mov 0x20(%ecx),%eax 10eb75: 89 45 ec mov %eax,-0x14(%ebp) && (uintptr_t) block <= (uintptr_t) heap->last_block; 10eb78: 31 c0 xor %eax,%eax 10eb7a: 3b 5d ec cmp -0x14(%ebp),%ebx 10eb7d: 72 08 jb 10eb87 <_Heap_Free+0x3b> 10eb7f: 31 c0 xor %eax,%eax 10eb81: 39 59 24 cmp %ebx,0x24(%ecx) 10eb84: 0f 93 c0 setae %al alloc_begin = (uintptr_t) alloc_begin_ptr; block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); if ( !_Heap_Is_block_in_heap( heap, block ) ) { return false; 10eb87: 31 ff xor %edi,%edi } alloc_begin = (uintptr_t) alloc_begin_ptr; block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); if ( !_Heap_Is_block_in_heap( heap, block ) ) { 10eb89: 85 c0 test %eax,%eax 10eb8b: 0f 84 15 01 00 00 je 10eca6 <_Heap_Free+0x15a> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 10eb91: 8b 7b 04 mov 0x4(%ebx),%edi 10eb94: 89 7d f0 mov %edi,-0x10(%ebp) - 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; 10eb97: 89 fe mov %edi,%esi 10eb99: 83 e6 fe and $0xfffffffe,%esi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10eb9c: 8d 14 1e lea (%esi,%ebx,1),%edx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 10eb9f: 31 c0 xor %eax,%eax 10eba1: 3b 55 ec cmp -0x14(%ebp),%edx 10eba4: 72 08 jb 10ebae <_Heap_Free+0x62> <== NEVER TAKEN 10eba6: 31 c0 xor %eax,%eax 10eba8: 39 51 24 cmp %edx,0x24(%ecx) 10ebab: 0f 93 c0 setae %al block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { return false; 10ebae: 31 ff xor %edi,%edi _Heap_Protection_block_check( heap, block ); block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 10ebb0: 85 c0 test %eax,%eax 10ebb2: 0f 84 ee 00 00 00 je 10eca6 <_Heap_Free+0x15a> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 10ebb8: 8b 42 04 mov 0x4(%edx),%eax return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 10ebbb: a8 01 test $0x1,%al 10ebbd: 0f 84 e3 00 00 00 je 10eca6 <_Heap_Free+0x15a> - 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; 10ebc3: 83 e0 fe and $0xfffffffe,%eax 10ebc6: 89 45 e8 mov %eax,-0x18(%ebp) if ( !_Heap_Protection_determine_block_free( heap, block ) ) { return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 10ebc9: 8b 79 24 mov 0x24(%ecx),%edi && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 10ebcc: 31 c0 xor %eax,%eax 10ebce: 39 fa cmp %edi,%edx 10ebd0: 74 0e je 10ebe0 <_Heap_Free+0x94> return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 10ebd2: 8b 45 e8 mov -0x18(%ebp),%eax 10ebd5: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1) return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 10ebda: 0f 94 c0 sete %al 10ebdd: 0f b6 c0 movzbl %al,%eax if ( !_Heap_Protection_determine_block_free( heap, block ) ) { return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 10ebe0: 88 45 e7 mov %al,-0x19(%ebp) && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 10ebe3: f6 45 f0 01 testb $0x1,-0x10(%ebp) 10ebe7: 75 59 jne 10ec42 <_Heap_Free+0xf6> uintptr_t const prev_size = block->prev_size; 10ebe9: 8b 03 mov (%ebx),%eax 10ebeb: 89 45 f0 mov %eax,-0x10(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10ebee: 29 c3 sub %eax,%ebx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 10ebf0: 31 c0 xor %eax,%eax 10ebf2: 3b 5d ec cmp -0x14(%ebp),%ebx 10ebf5: 72 07 jb 10ebfe <_Heap_Free+0xb2> <== NEVER TAKEN 10ebf7: 31 c0 xor %eax,%eax 10ebf9: 39 df cmp %ebx,%edi 10ebfb: 0f 93 c0 setae %al Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { _HAssert( false ); return( false ); 10ebfe: 31 ff xor %edi,%edi if ( !_Heap_Is_prev_used( block ) ) { uintptr_t const prev_size = block->prev_size; Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { 10ec00: 85 c0 test %eax,%eax 10ec02: 0f 84 9e 00 00 00 je 10eca6 <_Heap_Free+0x15a> <== NEVER TAKEN return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { 10ec08: f6 43 04 01 testb $0x1,0x4(%ebx) 10ec0c: 0f 84 94 00 00 00 je 10eca6 <_Heap_Free+0x15a> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 10ec12: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10ec16: 8b 7d f0 mov -0x10(%ebp),%edi 10ec19: 8d 04 3e lea (%esi,%edi,1),%eax 10ec1c: 74 14 je 10ec32 <_Heap_Free+0xe6> uintptr_t const size = block_size + prev_size + next_block_size; 10ec1e: 03 45 e8 add -0x18(%ebp),%eax return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 10ec21: 8b 7a 08 mov 0x8(%edx),%edi Heap_Block *prev = block->prev; 10ec24: 8b 52 0c mov 0xc(%edx),%edx prev->next = next; 10ec27: 89 7a 08 mov %edi,0x8(%edx) next->prev = prev; 10ec2a: 89 57 0c mov %edx,0xc(%edi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 10ec2d: ff 49 38 decl 0x38(%ecx) 10ec30: eb 2d jmp 10ec5f <_Heap_Free+0x113> next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10ec32: 89 c7 mov %eax,%edi 10ec34: 83 cf 01 or $0x1,%edi 10ec37: 89 7b 04 mov %edi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10ec3a: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 10ec3e: 89 02 mov %eax,(%edx) 10ec40: eb 56 jmp 10ec98 <_Heap_Free+0x14c> } } else if ( next_is_free ) { /* coalesce next */ 10ec42: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10ec46: 74 24 je 10ec6c <_Heap_Free+0x120> uintptr_t const size = block_size + next_block_size; 10ec48: 8b 45 e8 mov -0x18(%ebp),%eax 10ec4b: 01 f0 add %esi,%eax RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 10ec4d: 8b 7a 08 mov 0x8(%edx),%edi Heap_Block *prev = old_block->prev; 10ec50: 8b 52 0c mov 0xc(%edx),%edx new_block->next = next; 10ec53: 89 7b 08 mov %edi,0x8(%ebx) new_block->prev = prev; 10ec56: 89 53 0c mov %edx,0xc(%ebx) next->prev = new_block; 10ec59: 89 5f 0c mov %ebx,0xc(%edi) prev->next = new_block; 10ec5c: 89 5a 08 mov %ebx,0x8(%edx) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10ec5f: 89 c2 mov %eax,%edx 10ec61: 83 ca 01 or $0x1,%edx 10ec64: 89 53 04 mov %edx,0x4(%ebx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 10ec67: 89 04 18 mov %eax,(%eax,%ebx,1) 10ec6a: eb 2c jmp 10ec98 <_Heap_Free+0x14c> RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10ec6c: 8b 41 08 mov 0x8(%ecx),%eax new_block->next = next; 10ec6f: 89 43 08 mov %eax,0x8(%ebx) new_block->prev = block_before; 10ec72: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10ec75: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10ec78: 89 58 0c mov %ebx,0xc(%eax) } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 10ec7b: 89 f0 mov %esi,%eax 10ec7d: 83 c8 01 or $0x1,%eax 10ec80: 89 43 04 mov %eax,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10ec83: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = block_size; 10ec87: 89 32 mov %esi,(%edx) /* Statistics */ ++stats->free_blocks; 10ec89: 8b 41 38 mov 0x38(%ecx),%eax 10ec8c: 40 inc %eax 10ec8d: 89 41 38 mov %eax,0x38(%ecx) if ( stats->max_free_blocks < stats->free_blocks ) { 10ec90: 39 41 3c cmp %eax,0x3c(%ecx) 10ec93: 73 03 jae 10ec98 <_Heap_Free+0x14c> stats->max_free_blocks = stats->free_blocks; 10ec95: 89 41 3c mov %eax,0x3c(%ecx) } } /* Statistics */ --stats->used_blocks; 10ec98: ff 49 40 decl 0x40(%ecx) ++stats->frees; 10ec9b: ff 41 50 incl 0x50(%ecx) stats->free_size += block_size; 10ec9e: 01 71 30 add %esi,0x30(%ecx) return( true ); 10eca1: bf 01 00 00 00 mov $0x1,%edi } 10eca6: 89 f8 mov %edi,%eax 10eca8: 83 c4 10 add $0x10,%esp 10ecab: 5b pop %ebx 10ecac: 5e pop %esi 10ecad: 5f pop %edi 10ecae: 5d pop %ebp 10ecaf: c3 ret =============================================================================== 0011d4a0 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11d4a0: 55 push %ebp 11d4a1: 89 e5 mov %esp,%ebp 11d4a3: 57 push %edi 11d4a4: 56 push %esi 11d4a5: 53 push %ebx 11d4a6: 8b 5d 08 mov 0x8(%ebp),%ebx 11d4a9: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 11d4ac: 8d 4e f8 lea -0x8(%esi),%ecx 11d4af: 89 f0 mov %esi,%eax 11d4b1: 31 d2 xor %edx,%edx 11d4b3: f7 73 10 divl 0x10(%ebx) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 11d4b6: 29 d1 sub %edx,%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11d4b8: 8b 53 20 mov 0x20(%ebx),%edx && (uintptr_t) block <= (uintptr_t) heap->last_block; 11d4bb: 31 ff xor %edi,%edi 11d4bd: 39 d1 cmp %edx,%ecx 11d4bf: 72 0a jb 11d4cb <_Heap_Size_of_alloc_area+0x2b> 11d4c1: 31 c0 xor %eax,%eax 11d4c3: 39 4b 24 cmp %ecx,0x24(%ebx) 11d4c6: 0f 93 c0 setae %al 11d4c9: 89 c7 mov %eax,%edi Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { return false; 11d4cb: 31 c0 xor %eax,%eax uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 11d4cd: 85 ff test %edi,%edi 11d4cf: 74 30 je 11d501 <_Heap_Size_of_alloc_area+0x61> - 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; 11d4d1: 8b 41 04 mov 0x4(%ecx),%eax 11d4d4: 83 e0 fe and $0xfffffffe,%eax RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11d4d7: 01 c1 add %eax,%ecx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 11d4d9: 31 ff xor %edi,%edi 11d4db: 39 d1 cmp %edx,%ecx 11d4dd: 72 0a jb 11d4e9 <_Heap_Size_of_alloc_area+0x49><== NEVER TAKEN 11d4df: 31 c0 xor %eax,%eax 11d4e1: 39 4b 24 cmp %ecx,0x24(%ebx) 11d4e4: 0f 93 c0 setae %al 11d4e7: 89 c7 mov %eax,%edi if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; 11d4e9: 31 c0 xor %eax,%eax } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 11d4eb: 85 ff test %edi,%edi 11d4ed: 74 12 je 11d501 <_Heap_Size_of_alloc_area+0x61><== NEVER TAKEN !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 11d4ef: f6 41 04 01 testb $0x1,0x4(%ecx) 11d4f3: 74 0c je 11d501 <_Heap_Size_of_alloc_area+0x61><== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 11d4f5: 29 f1 sub %esi,%ecx 11d4f7: 8d 51 04 lea 0x4(%ecx),%edx 11d4fa: 8b 45 10 mov 0x10(%ebp),%eax 11d4fd: 89 10 mov %edx,(%eax) return true; 11d4ff: b0 01 mov $0x1,%al } 11d501: 5b pop %ebx 11d502: 5e pop %esi 11d503: 5f pop %edi 11d504: 5d pop %ebp 11d505: c3 ret =============================================================================== 0010b026 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10b026: 55 push %ebp 10b027: 89 e5 mov %esp,%ebp 10b029: 57 push %edi 10b02a: 56 push %esi 10b02b: 53 push %ebx 10b02c: 83 ec 3c sub $0x3c,%esp 10b02f: 8b 75 08 mov 0x8(%ebp),%esi 10b032: 8b 5d 0c mov 0xc(%ebp),%ebx uintptr_t const page_size = heap->page_size; 10b035: 8b 4e 10 mov 0x10(%esi),%ecx 10b038: 89 4d d8 mov %ecx,-0x28(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10b03b: 8b 46 14 mov 0x14(%esi),%eax 10b03e: 89 45 d4 mov %eax,-0x2c(%ebp) Heap_Block *const first_block = heap->first_block; 10b041: 8b 4e 20 mov 0x20(%esi),%ecx 10b044: 89 4d d0 mov %ecx,-0x30(%ebp) Heap_Block *const last_block = heap->last_block; 10b047: 8b 4e 24 mov 0x24(%esi),%ecx 10b04a: 89 4d c8 mov %ecx,-0x38(%ebp) Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10b04d: c7 45 e4 e8 af 10 00 movl $0x10afe8,-0x1c(%ebp) 10b054: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10b058: 74 07 je 10b061 <_Heap_Walk+0x3b> 10b05a: c7 45 e4 ed af 10 00 movl $0x10afed,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; 10b061: b0 01 mov $0x1,%al Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { 10b063: 83 3d 60 04 13 00 03 cmpl $0x3,0x130460 10b06a: 0f 85 e9 02 00 00 jne 10b359 <_Heap_Walk+0x333> Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 10b070: 50 push %eax 10b071: ff 76 0c pushl 0xc(%esi) 10b074: ff 76 08 pushl 0x8(%esi) 10b077: ff 75 c8 pushl -0x38(%ebp) 10b07a: ff 75 d0 pushl -0x30(%ebp) 10b07d: ff 76 1c pushl 0x1c(%esi) 10b080: ff 76 18 pushl 0x18(%esi) 10b083: ff 75 d4 pushl -0x2c(%ebp) 10b086: ff 75 d8 pushl -0x28(%ebp) 10b089: 68 e0 f5 11 00 push $0x11f5e0 10b08e: 6a 00 push $0x0 10b090: 53 push %ebx 10b091: ff 55 e4 call *-0x1c(%ebp) heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 10b094: 83 c4 30 add $0x30,%esp 10b097: 83 7d d8 00 cmpl $0x0,-0x28(%ebp) 10b09b: 75 0b jne 10b0a8 <_Heap_Walk+0x82> (*printer)( source, true, "page size is zero\n" ); 10b09d: 50 push %eax 10b09e: 68 71 f6 11 00 push $0x11f671 10b0a3: e9 6c 02 00 00 jmp 10b314 <_Heap_Walk+0x2ee> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10b0a8: f6 45 d8 03 testb $0x3,-0x28(%ebp) 10b0ac: 74 0d je 10b0bb <_Heap_Walk+0x95> (*printer)( 10b0ae: ff 75 d8 pushl -0x28(%ebp) 10b0b1: 68 84 f6 11 00 push $0x11f684 10b0b6: e9 59 02 00 00 jmp 10b314 <_Heap_Walk+0x2ee> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10b0bb: 8b 45 d4 mov -0x2c(%ebp),%eax 10b0be: 31 d2 xor %edx,%edx 10b0c0: f7 75 d8 divl -0x28(%ebp) ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10b0c3: 85 d2 test %edx,%edx 10b0c5: 74 0d je 10b0d4 <_Heap_Walk+0xae> (*printer)( 10b0c7: ff 75 d4 pushl -0x2c(%ebp) 10b0ca: 68 a2 f6 11 00 push $0x11f6a2 10b0cf: e9 40 02 00 00 jmp 10b314 <_Heap_Walk+0x2ee> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10b0d4: 8b 45 d0 mov -0x30(%ebp),%eax 10b0d7: 83 c0 08 add $0x8,%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10b0da: 31 d2 xor %edx,%edx 10b0dc: f7 75 d8 divl -0x28(%ebp) ); return false; } if ( 10b0df: 85 d2 test %edx,%edx 10b0e1: 74 0d je 10b0f0 <_Heap_Walk+0xca> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10b0e3: ff 75 d0 pushl -0x30(%ebp) 10b0e6: 68 c6 f6 11 00 push $0x11f6c6 10b0eb: e9 24 02 00 00 jmp 10b314 <_Heap_Walk+0x2ee> ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10b0f0: 8b 4d d0 mov -0x30(%ebp),%ecx 10b0f3: f6 41 04 01 testb $0x1,0x4(%ecx) 10b0f7: 75 0b jne 10b104 <_Heap_Walk+0xde> (*printer)( 10b0f9: 50 push %eax 10b0fa: 68 f7 f6 11 00 push $0x11f6f7 10b0ff: e9 10 02 00 00 jmp 10b314 <_Heap_Walk+0x2ee> - 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; 10b104: 8b 4d c8 mov -0x38(%ebp),%ecx 10b107: 8b 79 04 mov 0x4(%ecx),%edi 10b10a: 83 e7 fe and $0xfffffffe,%edi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10b10d: 01 cf add %ecx,%edi ); return false; } if ( _Heap_Is_free( last_block ) ) { 10b10f: f6 47 04 01 testb $0x1,0x4(%edi) 10b113: 75 0b jne 10b120 <_Heap_Walk+0xfa> (*printer)( 10b115: 57 push %edi 10b116: 68 25 f7 11 00 push $0x11f725 10b11b: e9 f4 01 00 00 jmp 10b314 <_Heap_Walk+0x2ee> ); return false; } if ( 10b120: 3b 7d d0 cmp -0x30(%ebp),%edi 10b123: 74 0b je 10b130 <_Heap_Walk+0x10a> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 10b125: 56 push %esi 10b126: 68 3a f7 11 00 push $0x11f73a 10b12b: e9 e4 01 00 00 jmp 10b314 <_Heap_Walk+0x2ee> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10b130: 8b 4e 10 mov 0x10(%esi),%ecx 10b133: 89 4d e0 mov %ecx,-0x20(%ebp) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10b136: 8b 4e 08 mov 0x8(%esi),%ecx const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); 10b139: 89 75 dc mov %esi,-0x24(%ebp) 10b13c: eb 75 jmp 10b1b3 <_Heap_Walk+0x18d> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 10b13e: 31 c0 xor %eax,%eax 10b140: 39 4e 20 cmp %ecx,0x20(%esi) 10b143: 77 08 ja 10b14d <_Heap_Walk+0x127> 10b145: 31 c0 xor %eax,%eax 10b147: 39 4e 24 cmp %ecx,0x24(%esi) 10b14a: 0f 93 c0 setae %al const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { 10b14d: 85 c0 test %eax,%eax 10b14f: 75 0b jne 10b15c <_Heap_Walk+0x136> (*printer)( 10b151: 51 push %ecx 10b152: 68 69 f7 11 00 push $0x11f769 10b157: e9 b8 01 00 00 jmp 10b314 <_Heap_Walk+0x2ee> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10b15c: 8d 41 08 lea 0x8(%ecx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10b15f: 31 d2 xor %edx,%edx 10b161: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( 10b164: 85 d2 test %edx,%edx 10b166: 74 0b je 10b173 <_Heap_Walk+0x14d> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10b168: 51 push %ecx 10b169: 68 89 f7 11 00 push $0x11f789 10b16e: e9 a1 01 00 00 jmp 10b314 <_Heap_Walk+0x2ee> - 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; 10b173: 8b 41 04 mov 0x4(%ecx),%eax 10b176: 83 e0 fe and $0xfffffffe,%eax ); return false; } if ( _Heap_Is_used( free_block ) ) { 10b179: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10b17e: 74 0b je 10b18b <_Heap_Walk+0x165> (*printer)( 10b180: 51 push %ecx 10b181: 68 b9 f7 11 00 push $0x11f7b9 10b186: e9 89 01 00 00 jmp 10b314 <_Heap_Walk+0x2ee> ); return false; } if ( free_block->prev != prev_block ) { 10b18b: 8b 41 0c mov 0xc(%ecx),%eax 10b18e: 3b 45 dc cmp -0x24(%ebp),%eax 10b191: 74 1a je 10b1ad <_Heap_Walk+0x187> (*printer)( 10b193: 83 ec 0c sub $0xc,%esp 10b196: 50 push %eax 10b197: 51 push %ecx 10b198: 68 d5 f7 11 00 push $0x11f7d5 10b19d: 6a 01 push $0x1 10b19f: 53 push %ebx 10b1a0: ff 55 e4 call *-0x1c(%ebp) 10b1a3: 83 c4 20 add $0x20,%esp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 10b1a6: 31 c0 xor %eax,%eax 10b1a8: e9 ac 01 00 00 jmp 10b359 <_Heap_Walk+0x333> return false; } prev_block = free_block; free_block = free_block->next; 10b1ad: 89 4d dc mov %ecx,-0x24(%ebp) 10b1b0: 8b 49 08 mov 0x8(%ecx),%ecx const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 10b1b3: 39 f1 cmp %esi,%ecx 10b1b5: 75 87 jne 10b13e <_Heap_Walk+0x118> 10b1b7: 89 5d dc mov %ebx,-0x24(%ebp) 10b1ba: eb 02 jmp 10b1be <_Heap_Walk+0x198> block->prev_size ); } block = next_block; } while ( block != first_block ); 10b1bc: 89 df mov %ebx,%edi return true; } 10b1be: 8b 4f 04 mov 0x4(%edi),%ecx 10b1c1: 89 4d cc mov %ecx,-0x34(%ebp) 10b1c4: 83 e1 fe and $0xfffffffe,%ecx 10b1c7: 89 4d e0 mov %ecx,-0x20(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10b1ca: 89 cb mov %ecx,%ebx 10b1cc: 01 fb add %edi,%ebx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 10b1ce: 31 c0 xor %eax,%eax 10b1d0: 39 5e 20 cmp %ebx,0x20(%esi) 10b1d3: 77 08 ja 10b1dd <_Heap_Walk+0x1b7> <== NEVER TAKEN 10b1d5: 31 c0 xor %eax,%eax 10b1d7: 39 5e 24 cmp %ebx,0x24(%esi) 10b1da: 0f 93 c0 setae %al bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 10b1dd: 85 c0 test %eax,%eax 10b1df: 75 11 jne 10b1f2 <_Heap_Walk+0x1cc> 10b1e1: 89 d9 mov %ebx,%ecx 10b1e3: 8b 5d dc mov -0x24(%ebp),%ebx (*printer)( 10b1e6: 83 ec 0c sub $0xc,%esp 10b1e9: 51 push %ecx 10b1ea: 57 push %edi 10b1eb: 68 07 f8 11 00 push $0x11f807 10b1f0: eb ab jmp 10b19d <_Heap_Walk+0x177> uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; 10b1f2: 3b 7d c8 cmp -0x38(%ebp),%edi 10b1f5: 0f 95 c1 setne %cl RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10b1f8: 8b 45 e0 mov -0x20(%ebp),%eax 10b1fb: 31 d2 xor %edx,%edx 10b1fd: f7 75 d8 divl -0x28(%ebp) ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 10b200: 85 d2 test %edx,%edx 10b202: 74 15 je 10b219 <_Heap_Walk+0x1f3> 10b204: 84 c9 test %cl,%cl 10b206: 74 11 je 10b219 <_Heap_Walk+0x1f3> 10b208: 8b 5d dc mov -0x24(%ebp),%ebx (*printer)( 10b20b: 83 ec 0c sub $0xc,%esp 10b20e: ff 75 e0 pushl -0x20(%ebp) 10b211: 57 push %edi 10b212: 68 34 f8 11 00 push $0x11f834 10b217: eb 84 jmp 10b19d <_Heap_Walk+0x177> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 10b219: 8b 45 d4 mov -0x2c(%ebp),%eax 10b21c: 39 45 e0 cmp %eax,-0x20(%ebp) 10b21f: 73 18 jae 10b239 <_Heap_Walk+0x213> 10b221: 84 c9 test %cl,%cl 10b223: 74 14 je 10b239 <_Heap_Walk+0x213> <== NEVER TAKEN 10b225: 8b 5d dc mov -0x24(%ebp),%ebx (*printer)( 10b228: 51 push %ecx 10b229: 51 push %ecx 10b22a: 50 push %eax 10b22b: ff 75 e0 pushl -0x20(%ebp) 10b22e: 57 push %edi 10b22f: 68 62 f8 11 00 push $0x11f862 10b234: e9 64 ff ff ff jmp 10b19d <_Heap_Walk+0x177> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 10b239: 39 fb cmp %edi,%ebx 10b23b: 77 18 ja 10b255 <_Heap_Walk+0x22f> 10b23d: 84 c9 test %cl,%cl 10b23f: 74 14 je 10b255 <_Heap_Walk+0x22f> 10b241: 89 d9 mov %ebx,%ecx 10b243: 8b 5d dc mov -0x24(%ebp),%ebx (*printer)( 10b246: 83 ec 0c sub $0xc,%esp 10b249: 51 push %ecx 10b24a: 57 push %edi 10b24b: 68 8d f8 11 00 push $0x11f88d 10b250: e9 48 ff ff ff jmp 10b19d <_Heap_Walk+0x177> 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; 10b255: 8b 4d cc mov -0x34(%ebp),%ecx 10b258: 83 e1 01 and $0x1,%ecx 10b25b: 89 4d c4 mov %ecx,-0x3c(%ebp) ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10b25e: f6 43 04 01 testb $0x1,0x4(%ebx) 10b262: 0f 85 ba 00 00 00 jne 10b322 <_Heap_Walk+0x2fc> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10b268: 8b 46 08 mov 0x8(%esi),%eax 10b26b: 89 45 c0 mov %eax,-0x40(%ebp) block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? 10b26e: 8b 4f 08 mov 0x8(%edi),%ecx 10b271: 89 4d bc mov %ecx,-0x44(%ebp) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10b274: ba ad f5 11 00 mov $0x11f5ad,%edx 10b279: 3b 4e 0c cmp 0xc(%esi),%ecx 10b27c: 74 0e je 10b28c <_Heap_Walk+0x266> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 10b27e: ba 0d f5 11 00 mov $0x11f50d,%edx 10b283: 39 f1 cmp %esi,%ecx 10b285: 75 05 jne 10b28c <_Heap_Walk+0x266> 10b287: ba bc f5 11 00 mov $0x11f5bc,%edx false, "block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n", block, block_size, block->prev, block->prev == first_free_block ? 10b28c: 8b 47 0c mov 0xc(%edi),%eax 10b28f: 89 45 cc mov %eax,-0x34(%ebp) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10b292: b8 c6 f5 11 00 mov $0x11f5c6,%eax 10b297: 8b 4d c0 mov -0x40(%ebp),%ecx 10b29a: 39 4d cc cmp %ecx,-0x34(%ebp) 10b29d: 74 0f je 10b2ae <_Heap_Walk+0x288> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 10b29f: b8 0d f5 11 00 mov $0x11f50d,%eax 10b2a4: 39 75 cc cmp %esi,-0x34(%ebp) 10b2a7: 75 05 jne 10b2ae <_Heap_Walk+0x288> 10b2a9: b8 d6 f5 11 00 mov $0x11f5d6,%eax Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10b2ae: 83 ec 0c sub $0xc,%esp 10b2b1: 52 push %edx 10b2b2: ff 75 bc pushl -0x44(%ebp) 10b2b5: 50 push %eax 10b2b6: ff 75 cc pushl -0x34(%ebp) 10b2b9: ff 75 e0 pushl -0x20(%ebp) 10b2bc: 57 push %edi 10b2bd: 68 c1 f8 11 00 push $0x11f8c1 10b2c2: 6a 00 push $0x0 10b2c4: ff 75 dc pushl -0x24(%ebp) 10b2c7: ff 55 e4 call *-0x1c(%ebp) block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 10b2ca: 8b 03 mov (%ebx),%eax 10b2cc: 83 c4 30 add $0x30,%esp 10b2cf: 39 45 e0 cmp %eax,-0x20(%ebp) 10b2d2: 74 16 je 10b2ea <_Heap_Walk+0x2c4> 10b2d4: 89 d9 mov %ebx,%ecx 10b2d6: 8b 5d dc mov -0x24(%ebp),%ebx (*printer)( 10b2d9: 52 push %edx 10b2da: 51 push %ecx 10b2db: 50 push %eax 10b2dc: ff 75 e0 pushl -0x20(%ebp) 10b2df: 57 push %edi 10b2e0: 68 f6 f8 11 00 push $0x11f8f6 10b2e5: e9 b3 fe ff ff jmp 10b19d <_Heap_Walk+0x177> ); return false; } if ( !prev_used ) { 10b2ea: 83 7d c4 00 cmpl $0x0,-0x3c(%ebp) 10b2ee: 75 0b jne 10b2fb <_Heap_Walk+0x2d5> 10b2f0: 8b 5d dc mov -0x24(%ebp),%ebx (*printer)( 10b2f3: 57 push %edi 10b2f4: 68 2f f9 11 00 push $0x11f92f 10b2f9: eb 19 jmp 10b314 <_Heap_Walk+0x2ee> 10b2fb: 8b 46 08 mov 0x8(%esi),%eax 10b2fe: eb 07 jmp 10b307 <_Heap_Walk+0x2e1> { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { if ( free_block == block ) { 10b300: 39 f8 cmp %edi,%eax 10b302: 74 4a je 10b34e <_Heap_Walk+0x328> return true; } free_block = free_block->next; 10b304: 8b 40 08 mov 0x8(%eax),%eax ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 10b307: 39 f0 cmp %esi,%eax 10b309: 75 f5 jne 10b300 <_Heap_Walk+0x2da> 10b30b: 8b 5d dc mov -0x24(%ebp),%ebx return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10b30e: 57 push %edi 10b30f: 68 9a f9 11 00 push $0x11f99a 10b314: 6a 01 push $0x1 10b316: 53 push %ebx 10b317: ff 55 e4 call *-0x1c(%ebp) 10b31a: 83 c4 10 add $0x10,%esp 10b31d: e9 84 fe ff ff jmp 10b1a6 <_Heap_Walk+0x180> if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 10b322: 83 7d c4 00 cmpl $0x0,-0x3c(%ebp) 10b326: 74 0e je 10b336 <_Heap_Walk+0x310> (*printer)( 10b328: 83 ec 0c sub $0xc,%esp 10b32b: ff 75 e0 pushl -0x20(%ebp) 10b32e: 57 push %edi 10b32f: 68 5e f9 11 00 push $0x11f95e 10b334: eb 0d jmp 10b343 <_Heap_Walk+0x31d> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10b336: 50 push %eax 10b337: 50 push %eax 10b338: ff 37 pushl (%edi) 10b33a: ff 75 e0 pushl -0x20(%ebp) 10b33d: 57 push %edi 10b33e: 68 75 f9 11 00 push $0x11f975 10b343: 6a 00 push $0x0 10b345: ff 75 dc pushl -0x24(%ebp) 10b348: ff 55 e4 call *-0x1c(%ebp) 10b34b: 83 c4 20 add $0x20,%esp block->prev_size ); } block = next_block; } while ( block != first_block ); 10b34e: 3b 5d d0 cmp -0x30(%ebp),%ebx 10b351: 0f 85 65 fe ff ff jne 10b1bc <_Heap_Walk+0x196> return true; 10b357: b0 01 mov $0x1,%al } 10b359: 8d 65 f4 lea -0xc(%ebp),%esp 10b35c: 5b pop %ebx 10b35d: 5e pop %esi 10b35e: 5f pop %edi 10b35f: 5d pop %ebp 10b360: c3 ret =============================================================================== 0010afed <_Heap_Walk_print>: static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { 10afed: 55 push %ebp 10afee: 89 e5 mov %esp,%ebp 10aff0: 83 ec 08 sub $0x8,%esp 10aff3: 8b 45 08 mov 0x8(%ebp),%eax va_list ap; if ( error ) { 10aff6: 80 7d 0c 00 cmpb $0x0,0xc(%ebp) 10affa: 74 0a je 10b006 <_Heap_Walk_print+0x19> <== NEVER TAKEN printk( "FAIL[%d]: ", source ); 10affc: 52 push %edx 10affd: 52 push %edx 10affe: 50 push %eax 10afff: 68 97 f5 11 00 push $0x11f597 10b004: eb 08 jmp 10b00e <_Heap_Walk_print+0x21> } else { printk( "PASS[%d]: ", source ); 10b006: 51 push %ecx 10b007: 51 push %ecx 10b008: 50 push %eax 10b009: 68 a2 f5 11 00 push $0x11f5a2 10b00e: e8 a1 cc ff ff call 107cb4 10b013: 58 pop %eax 10b014: 5a pop %edx } va_start( ap, fmt ); 10b015: 8d 45 14 lea 0x14(%ebp),%eax vprintk( fmt, ap ); 10b018: 50 push %eax 10b019: ff 75 10 pushl 0x10(%ebp) 10b01c: e8 33 e5 ff ff call 109554 va_end( ap ); 10b021: 83 c4 10 add $0x10,%esp } 10b024: c9 leave 10b025: c3 ret =============================================================================== 0010aa90 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10aa90: 55 push %ebp 10aa91: 89 e5 mov %esp,%ebp 10aa93: 53 push %ebx 10aa94: 83 ec 08 sub $0x8,%esp 10aa97: 8b 45 08 mov 0x8(%ebp),%eax 10aa9a: 8b 55 0c mov 0xc(%ebp),%edx 10aa9d: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10aaa0: a3 3c f3 12 00 mov %eax,0x12f33c _Internal_errors_What_happened.is_internal = is_internal; 10aaa5: 88 15 40 f3 12 00 mov %dl,0x12f340 _Internal_errors_What_happened.the_error = the_error; 10aaab: 89 1d 44 f3 12 00 mov %ebx,0x12f344 _User_extensions_Fatal( the_source, is_internal, the_error ); 10aab1: 53 push %ebx 10aab2: 0f b6 d2 movzbl %dl,%edx 10aab5: 52 push %edx 10aab6: 50 push %eax 10aab7: e8 63 19 00 00 call 10c41f <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10aabc: c7 05 f8 f3 12 00 05 movl $0x5,0x12f3f8 <== NOT EXECUTED 10aac3: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10aac6: fa cli <== NOT EXECUTED 10aac7: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10aac9: f4 hlt <== NOT EXECUTED 10aaca: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10aacd: eb fe jmp 10aacd <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 0010ab20 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10ab20: 55 push %ebp 10ab21: 89 e5 mov %esp,%ebp 10ab23: 56 push %esi 10ab24: 53 push %ebx 10ab25: 8b 5d 08 mov 0x8(%ebp),%ebx * 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 ) return NULL; 10ab28: 31 c9 xor %ecx,%ecx * 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 ) 10ab2a: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 10ab2e: 74 53 je 10ab83 <_Objects_Allocate+0x63><== NEVER TAKEN /* * 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 ); 10ab30: 8d 73 20 lea 0x20(%ebx),%esi 10ab33: 83 ec 0c sub $0xc,%esp 10ab36: 56 push %esi 10ab37: e8 f8 f7 ff ff call 10a334 <_Chain_Get> 10ab3c: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10ab3e: 83 c4 10 add $0x10,%esp 10ab41: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10ab45: 74 3c je 10ab83 <_Objects_Allocate+0x63> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10ab47: 85 c0 test %eax,%eax 10ab49: 75 1a jne 10ab65 <_Objects_Allocate+0x45> _Objects_Extend_information( information ); 10ab4b: 83 ec 0c sub $0xc,%esp 10ab4e: 53 push %ebx 10ab4f: e8 58 00 00 00 call 10abac <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10ab54: 89 34 24 mov %esi,(%esp) 10ab57: e8 d8 f7 ff ff call 10a334 <_Chain_Get> 10ab5c: 89 c1 mov %eax,%ecx } if ( the_object ) { 10ab5e: 83 c4 10 add $0x10,%esp 10ab61: 85 c0 test %eax,%eax 10ab63: 74 1e je 10ab83 <_Objects_Allocate+0x63> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10ab65: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10ab69: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10ab6d: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 10ab6f: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10ab73: 31 d2 xor %edx,%edx 10ab75: f7 f6 div %esi information->inactive_per_block[ block ]--; 10ab77: 8b 53 30 mov 0x30(%ebx),%edx 10ab7a: 8d 04 82 lea (%edx,%eax,4),%eax 10ab7d: ff 08 decl (%eax) information->inactive--; 10ab7f: 66 ff 4b 2c decw 0x2c(%ebx) ); } #endif return the_object; } 10ab83: 89 c8 mov %ecx,%eax 10ab85: 8d 65 f8 lea -0x8(%ebp),%esp 10ab88: 5b pop %ebx 10ab89: 5e pop %esi 10ab8a: 5d pop %ebp 10ab8b: c3 ret =============================================================================== 0010ae9c <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 10ae9c: 55 push %ebp 10ae9d: 89 e5 mov %esp,%ebp 10ae9f: 57 push %edi 10aea0: 56 push %esi 10aea1: 53 push %ebx 10aea2: 83 ec 0c sub $0xc,%esp 10aea5: 8b 75 08 mov 0x8(%ebp),%esi 10aea8: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *info; int the_class_api_maximum; if ( !the_class ) return NULL; 10aeab: 31 db xor %ebx,%ebx ) { Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10aead: 66 85 ff test %di,%di 10aeb0: 74 37 je 10aee9 <_Objects_Get_information+0x4d> /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); 10aeb2: 83 ec 0c sub $0xc,%esp 10aeb5: 56 push %esi 10aeb6: e8 f5 3d 00 00 call 10ecb0 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10aebb: 83 c4 10 add $0x10,%esp 10aebe: 85 c0 test %eax,%eax 10aec0: 74 27 je 10aee9 <_Objects_Get_information+0x4d> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10aec2: 0f b7 ff movzwl %di,%edi 10aec5: 39 c7 cmp %eax,%edi 10aec7: 77 20 ja 10aee9 <_Objects_Get_information+0x4d> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10aec9: 8b 04 b5 7c f2 12 00 mov 0x12f27c(,%esi,4),%eax 10aed0: 85 c0 test %eax,%eax 10aed2: 74 15 je 10aee9 <_Objects_Get_information+0x4d><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10aed4: 8b 1c b8 mov (%eax,%edi,4),%ebx if ( !info ) 10aed7: 85 db test %ebx,%ebx 10aed9: 74 0e je 10aee9 <_Objects_Get_information+0x4d><== NEVER TAKEN * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) return NULL; 10aedb: 31 c0 xor %eax,%eax 10aedd: 66 83 7b 10 00 cmpw $0x0,0x10(%ebx) 10aee2: 0f 95 c0 setne %al 10aee5: f7 d8 neg %eax 10aee7: 21 c3 and %eax,%ebx #endif return info; } 10aee9: 89 d8 mov %ebx,%eax 10aeeb: 8d 65 f4 lea -0xc(%ebp),%esp 10aeee: 5b pop %ebx 10aeef: 5e pop %esi 10aef0: 5f pop %edi 10aef1: 5d pop %ebp 10aef2: c3 ret =============================================================================== 0010e028 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10e028: 55 push %ebp 10e029: 89 e5 mov %esp,%ebp 10e02b: 53 push %ebx 10e02c: 83 ec 14 sub $0x14,%esp /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10e02f: 8b 45 08 mov 0x8(%ebp),%eax 10e032: 85 c0 test %eax,%eax 10e034: 75 08 jne 10e03e <_Objects_Id_to_name+0x16> 10e036: a1 b0 dd 13 00 mov 0x13ddb0,%eax 10e03b: 8b 40 08 mov 0x8(%eax),%eax 10e03e: 89 c2 mov %eax,%edx 10e040: c1 ea 18 shr $0x18,%edx 10e043: 83 e2 07 and $0x7,%edx */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 10e046: 8d 4a ff lea -0x1(%edx),%ecx the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; 10e049: bb 03 00 00 00 mov $0x3,%ebx 10e04e: 83 f9 02 cmp $0x2,%ecx 10e051: 77 30 ja 10e083 <_Objects_Id_to_name+0x5b> 10e053: eb 35 jmp 10e08a <_Objects_Id_to_name+0x62> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10e055: 89 c1 mov %eax,%ecx 10e057: c1 e9 1b shr $0x1b,%ecx if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10e05a: 8b 14 8a mov (%edx,%ecx,4),%edx if ( !information ) 10e05d: 85 d2 test %edx,%edx 10e05f: 74 22 je 10e083 <_Objects_Id_to_name+0x5b><== NEVER TAKEN #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 10e061: 51 push %ecx 10e062: 8d 4d f4 lea -0xc(%ebp),%ecx 10e065: 51 push %ecx 10e066: 50 push %eax 10e067: 52 push %edx 10e068: e8 5b ff ff ff call 10dfc8 <_Objects_Get> if ( !the_object ) 10e06d: 83 c4 10 add $0x10,%esp 10e070: 85 c0 test %eax,%eax 10e072: 74 0f je 10e083 <_Objects_Id_to_name+0x5b> return OBJECTS_INVALID_ID; *name = the_object->name; 10e074: 8b 50 0c mov 0xc(%eax),%edx 10e077: 8b 45 0c mov 0xc(%ebp),%eax 10e07a: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10e07c: e8 c7 0a 00 00 call 10eb48 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10e081: 31 db xor %ebx,%ebx } 10e083: 89 d8 mov %ebx,%eax 10e085: 8b 5d fc mov -0x4(%ebp),%ebx 10e088: c9 leave 10e089: c3 ret the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 10e08a: 8b 14 95 34 db 13 00 mov 0x13db34(,%edx,4),%edx 10e091: 85 d2 test %edx,%edx 10e093: 75 c0 jne 10e055 <_Objects_Id_to_name+0x2d> 10e095: eb ec jmp 10e083 <_Objects_Id_to_name+0x5b> =============================================================================== 0010f5ad <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 10f5ad: 55 push %ebp 10f5ae: 89 e5 mov %esp,%ebp 10f5b0: 57 push %edi 10f5b1: 56 push %esi 10f5b2: 53 push %ebx 10f5b3: 83 ec 08 sub $0x8,%esp 10f5b6: 8b 7d 08 mov 0x8(%ebp),%edi 10f5b9: 8b 5d 0c mov 0xc(%ebp),%ebx RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; 10f5bc: 85 db test %ebx,%ebx 10f5be: 0f 84 20 01 00 00 je 10f6e4 <_RBTree_Extract_unprotected+0x137><== NEVER TAKEN /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { 10f5c4: 3b 5f 08 cmp 0x8(%edi),%ebx 10f5c7: 75 1c jne 10f5e5 <_RBTree_Extract_unprotected+0x38> if (the_node->child[RBT_RIGHT]) 10f5c9: 8b 43 08 mov 0x8(%ebx),%eax 10f5cc: 85 c0 test %eax,%eax 10f5ce: 74 05 je 10f5d5 <_RBTree_Extract_unprotected+0x28><== ALWAYS TAKEN the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; 10f5d0: 89 47 08 mov %eax,0x8(%edi) <== NOT EXECUTED 10f5d3: eb 10 jmp 10f5e5 <_RBTree_Extract_unprotected+0x38><== NOT EXECUTED else { the_rbtree->first[RBT_LEFT] = the_node->parent; 10f5d5: 8b 03 mov (%ebx),%eax 10f5d7: 89 47 08 mov %eax,0x8(%edi) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, 10f5da: 39 c7 cmp %eax,%edi 10f5dc: 75 07 jne 10f5e5 <_RBTree_Extract_unprotected+0x38><== NEVER TAKEN the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; 10f5de: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi) } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { 10f5e5: 3b 5f 0c cmp 0xc(%edi),%ebx 10f5e8: 8b 43 04 mov 0x4(%ebx),%eax 10f5eb: 75 19 jne 10f606 <_RBTree_Extract_unprotected+0x59> if (the_node->child[RBT_LEFT]) 10f5ed: 85 c0 test %eax,%eax 10f5ef: 74 05 je 10f5f6 <_RBTree_Extract_unprotected+0x49><== ALWAYS TAKEN the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; 10f5f1: 89 47 0c mov %eax,0xc(%edi) <== NOT EXECUTED 10f5f4: eb 10 jmp 10f606 <_RBTree_Extract_unprotected+0x59><== NOT EXECUTED else { the_rbtree->first[RBT_RIGHT] = the_node->parent; 10f5f6: 8b 13 mov (%ebx),%edx 10f5f8: 89 57 0c mov %edx,0xc(%edi) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, 10f5fb: 39 d7 cmp %edx,%edi 10f5fd: 75 07 jne 10f606 <_RBTree_Extract_unprotected+0x59> the_rbtree->first[RBT_RIGHT])) the_rbtree->first[RBT_RIGHT] = NULL; 10f5ff: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi) * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], * and replace the_node with the target node. This maintains the binary * search tree property, but may violate the red-black properties. */ if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) { 10f606: 89 c6 mov %eax,%esi 10f608: 85 c0 test %eax,%eax 10f60a: 74 77 je 10f683 <_RBTree_Extract_unprotected+0xd6> 10f60c: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10f610: 75 04 jne 10f616 <_RBTree_Extract_unprotected+0x69><== ALWAYS TAKEN 10f612: eb 76 jmp 10f68a <_RBTree_Extract_unprotected+0xdd><== NOT EXECUTED target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */ while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT]; 10f614: 89 c6 mov %eax,%esi <== NOT EXECUTED 10f616: 8b 46 08 mov 0x8(%esi),%eax 10f619: 85 c0 test %eax,%eax 10f61b: 75 f7 jne 10f614 <_RBTree_Extract_unprotected+0x67><== NEVER TAKEN * target's position (target is the right child of target->parent) * when target vacates it. if there is no child, then target->parent * should become NULL. This may cause the coloring to be violated. * For now we store the color of the node being deleted in victim_color. */ leaf = target->child[RBT_LEFT]; 10f61d: 8b 46 04 mov 0x4(%esi),%eax if(leaf) { 10f620: 85 c0 test %eax,%eax 10f622: 74 06 je 10f62a <_RBTree_Extract_unprotected+0x7d><== ALWAYS TAKEN leaf->parent = target->parent; 10f624: 8b 16 mov (%esi),%edx <== NOT EXECUTED 10f626: 89 10 mov %edx,(%eax) <== NOT EXECUTED 10f628: eb 0d jmp 10f637 <_RBTree_Extract_unprotected+0x8a><== NOT EXECUTED } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); 10f62a: 56 push %esi 10f62b: 89 45 ec mov %eax,-0x14(%ebp) 10f62e: e8 3f fe ff ff call 10f472 <_RBTree_Extract_validate_unprotected> 10f633: 58 pop %eax 10f634: 8b 45 ec mov -0x14(%ebp),%eax } victim_color = target->color; 10f637: 8b 56 0c mov 0xc(%esi),%edx 10f63a: 89 55 f0 mov %edx,-0x10(%ebp) dir = target != target->parent->child[0]; 10f63d: 8b 16 mov (%esi),%edx 10f63f: 31 c9 xor %ecx,%ecx 10f641: 3b 72 04 cmp 0x4(%edx),%esi 10f644: 0f 95 c1 setne %cl target->parent->child[dir] = leaf; 10f647: 89 44 8a 04 mov %eax,0x4(%edx,%ecx,4) /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 10f64b: 8b 13 mov (%ebx),%edx 10f64d: 31 c9 xor %ecx,%ecx 10f64f: 3b 5a 04 cmp 0x4(%edx),%ebx 10f652: 0f 95 c1 setne %cl the_node->parent->child[dir] = target; 10f655: 89 74 8a 04 mov %esi,0x4(%edx,%ecx,4) /* set target's new children to the original node's children */ target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT]; 10f659: 8b 53 08 mov 0x8(%ebx),%edx 10f65c: 89 56 08 mov %edx,0x8(%esi) if (the_node->child[RBT_RIGHT]) 10f65f: 8b 53 08 mov 0x8(%ebx),%edx 10f662: 85 d2 test %edx,%edx 10f664: 74 02 je 10f668 <_RBTree_Extract_unprotected+0xbb><== NEVER TAKEN the_node->child[RBT_RIGHT]->parent = target; 10f666: 89 32 mov %esi,(%edx) target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; 10f668: 8b 53 04 mov 0x4(%ebx),%edx 10f66b: 89 56 04 mov %edx,0x4(%esi) if (the_node->child[RBT_LEFT]) 10f66e: 8b 53 04 mov 0x4(%ebx),%edx 10f671: 85 d2 test %edx,%edx 10f673: 74 02 je 10f677 <_RBTree_Extract_unprotected+0xca><== ALWAYS TAKEN the_node->child[RBT_LEFT]->parent = target; 10f675: 89 32 mov %esi,(%edx) <== NOT EXECUTED /* finally, update the parent node and recolor. target has completely * replaced the_node, and target's child has moved up the tree if needed. * the_node is no longer part of the tree, although it has valid pointers * still. */ target->parent = the_node->parent; 10f677: 8b 13 mov (%ebx),%edx 10f679: 89 16 mov %edx,(%esi) target->color = the_node->color; 10f67b: 8b 53 0c mov 0xc(%ebx),%edx 10f67e: 89 56 0c mov %edx,0xc(%esi) 10f681: eb 2e jmp 10f6b1 <_RBTree_Extract_unprotected+0x104> * the_node's location in the tree. This may cause the coloring to be * violated. We will fix it later. * For now we store the color of the node being deleted in victim_color. */ leaf = the_node->child[RBT_LEFT] ? the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; 10f683: 8b 43 08 mov 0x8(%ebx),%eax if( leaf ) { 10f686: 85 c0 test %eax,%eax 10f688: 74 06 je 10f690 <_RBTree_Extract_unprotected+0xe3><== ALWAYS TAKEN leaf->parent = the_node->parent; 10f68a: 8b 13 mov (%ebx),%edx <== NOT EXECUTED 10f68c: 89 10 mov %edx,(%eax) <== NOT EXECUTED 10f68e: eb 0d jmp 10f69d <_RBTree_Extract_unprotected+0xf0><== NOT EXECUTED } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); 10f690: 53 push %ebx 10f691: 89 45 ec mov %eax,-0x14(%ebp) 10f694: e8 d9 fd ff ff call 10f472 <_RBTree_Extract_validate_unprotected> 10f699: 59 pop %ecx 10f69a: 8b 45 ec mov -0x14(%ebp),%eax } victim_color = the_node->color; 10f69d: 8b 53 0c mov 0xc(%ebx),%edx 10f6a0: 89 55 f0 mov %edx,-0x10(%ebp) /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 10f6a3: 8b 13 mov (%ebx),%edx 10f6a5: 31 c9 xor %ecx,%ecx 10f6a7: 3b 5a 04 cmp 0x4(%edx),%ebx 10f6aa: 0f 95 c1 setne %cl the_node->parent->child[dir] = leaf; 10f6ad: 89 44 8a 04 mov %eax,0x4(%edx,%ecx,4) /* fix coloring. leaf has moved up the tree. The color of the deleted * node is in victim_color. There are two cases: * 1. Deleted a red node, its child must be black. Nothing must be done. * 2. Deleted a black node, its child must be red. Paint child black. */ if (victim_color == RBT_BLACK) { /* eliminate case 1 */ 10f6b1: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 10f6b5: 75 0b jne 10f6c2 <_RBTree_Extract_unprotected+0x115> if (leaf) { 10f6b7: 85 c0 test %eax,%eax 10f6b9: 74 07 je 10f6c2 <_RBTree_Extract_unprotected+0x115><== ALWAYS TAKEN leaf->color = RBT_BLACK; /* case 2 */ 10f6bb: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree( RBTree_Node *node ) { node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL; 10f6c2: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 10f6c9: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) 10f6d0: c7 03 00 00 00 00 movl $0x0,(%ebx) /* Wipe the_node */ _RBTree_Set_off_rbtree(the_node); /* set root to black, if it exists */ if (the_rbtree->root) the_rbtree->root->color = RBT_BLACK; 10f6d6: 8b 47 04 mov 0x4(%edi),%eax 10f6d9: 85 c0 test %eax,%eax 10f6db: 74 07 je 10f6e4 <_RBTree_Extract_unprotected+0x137> 10f6dd: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) } 10f6e4: 8d 65 f4 lea -0xc(%ebp),%esp 10f6e7: 5b pop %ebx 10f6e8: 5e pop %esi 10f6e9: 5f pop %edi 10f6ea: 5d pop %ebp 10f6eb: c3 ret =============================================================================== 0010f472 <_RBTree_Extract_validate_unprotected>: * of the extract operation. */ void _RBTree_Extract_validate_unprotected( RBTree_Node *the_node ) { 10f472: 55 push %ebp 10f473: 89 e5 mov %esp,%ebp 10f475: 57 push %edi 10f476: 56 push %esi 10f477: 53 push %ebx 10f478: 52 push %edx 10f479: 8b 7d 08 mov 0x8(%ebp),%edi RBTree_Node *parent, *sibling; RBTree_Direction dir; parent = the_node->parent; 10f47c: 8b 1f mov (%edi),%ebx if(!parent->parent) return; 10f47e: 83 3b 00 cmpl $0x0,(%ebx) 10f481: 0f 84 20 01 00 00 je 10f5a7 <_RBTree_Extract_validate_unprotected+0x135><== NEVER TAKEN sibling = _RBTree_Sibling(the_node); 10f487: 89 f8 mov %edi,%eax 10f489: e8 7e ff ff ff call 10f40c <_RBTree_Sibling> /* continue to correct tree as long as the_node is black and not the root */ while (!_RBTree_Is_red(the_node) && parent->parent) { 10f48e: e9 e6 00 00 00 jmp 10f579 <_RBTree_Extract_validate_unprotected+0x107> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 10f493: 85 c0 test %eax,%eax 10f495: 74 2e je 10f4c5 <_RBTree_Extract_validate_unprotected+0x53><== NEVER TAKEN 10f497: 83 78 0c 01 cmpl $0x1,0xc(%eax) 10f49b: 75 28 jne 10f4c5 <_RBTree_Extract_validate_unprotected+0x53><== ALWAYS TAKEN * then rotate parent left, making the sibling be the_node's grandparent. * Now the_node has a black sibling and red parent. After rotation, * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; 10f49d: c7 43 0c 01 00 00 00 movl $0x1,0xc(%ebx) <== NOT EXECUTED sibling->color = RBT_BLACK; 10f4a4: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) <== NOT EXECUTED dir = the_node != parent->child[0]; 10f4ab: 31 c0 xor %eax,%eax <== NOT EXECUTED 10f4ad: 3b 7b 04 cmp 0x4(%ebx),%edi <== NOT EXECUTED 10f4b0: 0f 95 c0 setne %al <== NOT EXECUTED 10f4b3: 89 c6 mov %eax,%esi <== NOT EXECUTED _RBTree_Rotate(parent, dir); 10f4b5: 89 f2 mov %esi,%edx <== NOT EXECUTED 10f4b7: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10f4b9: e8 70 ff ff ff call 10f42e <_RBTree_Rotate> <== NOT EXECUTED sibling = parent->child[!dir]; 10f4be: 83 f6 01 xor $0x1,%esi <== NOT EXECUTED 10f4c1: 8b 44 b3 04 mov 0x4(%ebx,%esi,4),%eax <== NOT EXECUTED } /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && 10f4c5: 8b 48 08 mov 0x8(%eax),%ecx 10f4c8: 31 d2 xor %edx,%edx 10f4ca: 85 c9 test %ecx,%ecx 10f4cc: 74 09 je 10f4d7 <_RBTree_Extract_validate_unprotected+0x65> 10f4ce: 31 d2 xor %edx,%edx 10f4d0: 83 79 0c 01 cmpl $0x1,0xc(%ecx) 10f4d4: 0f 94 c2 sete %dl 10f4d7: 85 d2 test %edx,%edx 10f4d9: 75 2e jne 10f509 <_RBTree_Extract_validate_unprotected+0x97> !_RBTree_Is_red(sibling->child[RBT_LEFT])) { 10f4db: 8b 48 04 mov 0x4(%eax),%ecx 10f4de: 85 c9 test %ecx,%ecx 10f4e0: 74 09 je 10f4eb <_RBTree_Extract_validate_unprotected+0x79><== ALWAYS TAKEN 10f4e2: 31 d2 xor %edx,%edx <== NOT EXECUTED 10f4e4: 83 79 0c 01 cmpl $0x1,0xc(%ecx) <== NOT EXECUTED 10f4e8: 0f 94 c2 sete %dl <== NOT EXECUTED _RBTree_Rotate(parent, dir); sibling = parent->child[!dir]; } /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && 10f4eb: 85 d2 test %edx,%edx 10f4ed: 75 1a jne 10f509 <_RBTree_Extract_validate_unprotected+0x97><== NEVER TAKEN !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; 10f4ef: c7 40 0c 01 00 00 00 movl $0x1,0xc(%eax) 10f4f6: 83 7b 0c 01 cmpl $0x1,0xc(%ebx) 10f4fa: 0f 85 98 00 00 00 jne 10f598 <_RBTree_Extract_validate_unprotected+0x126><== NEVER TAKEN if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; 10f500: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) break; 10f507: eb 7f jmp 10f588 <_RBTree_Extract_validate_unprotected+0x116> * cases, either the_node is to the left or the right of the parent. * In both cases, first check if one of sibling's children is black, * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; 10f509: 31 d2 xor %edx,%edx 10f50b: 3b 7b 04 cmp 0x4(%ebx),%edi 10f50e: 0f 95 c2 setne %dl 10f511: 89 d6 mov %edx,%esi if (!_RBTree_Is_red(sibling->child[!dir])) { 10f513: 83 f2 01 xor $0x1,%edx 10f516: 89 55 f0 mov %edx,-0x10(%ebp) 10f519: 8b 4c 90 04 mov 0x4(%eax,%edx,4),%ecx 10f51d: 31 d2 xor %edx,%edx 10f51f: 85 c9 test %ecx,%ecx 10f521: 74 09 je 10f52c <_RBTree_Extract_validate_unprotected+0xba><== NEVER TAKEN 10f523: 31 d2 xor %edx,%edx 10f525: 83 79 0c 01 cmpl $0x1,0xc(%ecx) 10f529: 0f 94 c2 sete %dl 10f52c: 85 d2 test %edx,%edx 10f52e: 75 23 jne 10f553 <_RBTree_Extract_validate_unprotected+0xe1><== ALWAYS TAKEN sibling->color = RBT_RED; 10f530: c7 40 0c 01 00 00 00 movl $0x1,0xc(%eax) <== NOT EXECUTED sibling->child[dir]->color = RBT_BLACK; 10f537: 8b 54 b0 04 mov 0x4(%eax,%esi,4),%edx <== NOT EXECUTED 10f53b: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) <== NOT EXECUTED _RBTree_Rotate(sibling, !dir); 10f542: 89 f2 mov %esi,%edx <== NOT EXECUTED 10f544: 83 f2 01 xor $0x1,%edx <== NOT EXECUTED 10f547: e8 e2 fe ff ff call 10f42e <_RBTree_Rotate> <== NOT EXECUTED sibling = parent->child[!dir]; 10f54c: 8b 55 f0 mov -0x10(%ebp),%edx <== NOT EXECUTED 10f54f: 8b 44 93 04 mov 0x4(%ebx,%edx,4),%eax <== NOT EXECUTED } sibling->color = parent->color; 10f553: 8b 53 0c mov 0xc(%ebx),%edx 10f556: 89 50 0c mov %edx,0xc(%eax) parent->color = RBT_BLACK; 10f559: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) sibling->child[!dir]->color = RBT_BLACK; 10f560: 8b 55 f0 mov -0x10(%ebp),%edx 10f563: 8b 44 90 04 mov 0x4(%eax,%edx,4),%eax 10f567: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) _RBTree_Rotate(parent, dir); 10f56e: 89 f2 mov %esi,%edx 10f570: 89 d8 mov %ebx,%eax 10f572: e8 b7 fe ff ff call 10f42e <_RBTree_Rotate> break; /* done */ 10f577: eb 0f jmp 10f588 <_RBTree_Extract_validate_unprotected+0x116> if(!parent->parent) return; sibling = _RBTree_Sibling(the_node); /* continue to correct tree as long as the_node is black and not the root */ while (!_RBTree_Is_red(the_node) && parent->parent) { 10f579: 83 7f 0c 01 cmpl $0x1,0xc(%edi) 10f57d: 74 09 je 10f588 <_RBTree_Extract_validate_unprotected+0x116> 10f57f: 83 3b 00 cmpl $0x0,(%ebx) 10f582: 0f 85 0b ff ff ff jne 10f493 <_RBTree_Extract_validate_unprotected+0x21><== ALWAYS TAKEN sibling->child[!dir]->color = RBT_BLACK; _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; 10f588: 8b 07 mov (%edi),%eax 10f58a: 83 38 00 cmpl $0x0,(%eax) 10f58d: 75 18 jne 10f5a7 <_RBTree_Extract_validate_unprotected+0x135><== ALWAYS TAKEN 10f58f: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi) <== NOT EXECUTED 10f596: eb 0f jmp 10f5a7 <_RBTree_Extract_validate_unprotected+0x135><== NOT EXECUTED if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; break; } the_node = parent; /* done if parent is red */ parent = the_node->parent; 10f598: 8b 33 mov (%ebx),%esi <== NOT EXECUTED sibling = _RBTree_Sibling(the_node); 10f59a: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10f59c: e8 6b fe ff ff call 10f40c <_RBTree_Sibling> <== NOT EXECUTED 10f5a1: 89 df mov %ebx,%edi <== NOT EXECUTED if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; break; } the_node = parent; /* done if parent is red */ parent = the_node->parent; 10f5a3: 89 f3 mov %esi,%ebx <== NOT EXECUTED sibling = _RBTree_Sibling(the_node); 10f5a5: eb d2 jmp 10f579 <_RBTree_Extract_validate_unprotected+0x107><== NOT EXECUTED _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; } 10f5a7: 58 pop %eax 10f5a8: 5b pop %ebx 10f5a9: 5e pop %esi 10f5aa: 5f pop %edi 10f5ab: 5d pop %ebp 10f5ac: c3 ret =============================================================================== 0010c1c8 <_RBTree_Find>: RBTree_Node *_RBTree_Find( RBTree_Control *the_rbtree, RBTree_Node *search_node ) { 10c1c8: 55 push %ebp <== NOT EXECUTED 10c1c9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10c1cb: 57 push %edi <== NOT EXECUTED 10c1cc: 56 push %esi <== NOT EXECUTED 10c1cd: 53 push %ebx <== NOT EXECUTED 10c1ce: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 10c1d1: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED ISR_Level level; RBTree_Node *return_node; return_node = NULL; _ISR_Disable( level ); 10c1d4: 9c pushf <== NOT EXECUTED 10c1d5: fa cli <== NOT EXECUTED 10c1d6: 8f 45 e4 popl -0x1c(%ebp) <== NOT EXECUTED RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { RBTree_Node* iter_node = the_rbtree->root; 10c1d9: 8b 5e 04 mov 0x4(%esi),%ebx <== NOT EXECUTED RBTree_Node* found = NULL; 10c1dc: 31 ff xor %edi,%edi <== NOT EXECUTED 10c1de: eb 23 jmp 10c203 <_RBTree_Find+0x3b> <== NOT EXECUTED int compare_result; while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); 10c1e0: 50 push %eax <== NOT EXECUTED 10c1e1: 50 push %eax <== NOT EXECUTED 10c1e2: 53 push %ebx <== NOT EXECUTED 10c1e3: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10c1e6: ff 56 10 call *0x10(%esi) <== NOT EXECUTED if (compare_result == 0) { 10c1e9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10c1ec: 85 c0 test %eax,%eax <== NOT EXECUTED 10c1ee: 75 08 jne 10c1f8 <_RBTree_Find+0x30> <== NOT EXECUTED found = iter_node; if ( the_rbtree->is_unique ) 10c1f0: 80 7e 14 00 cmpb $0x0,0x14(%esi) <== NOT EXECUTED 10c1f4: 75 13 jne 10c209 <_RBTree_Find+0x41> <== NOT EXECUTED 10c1f6: 89 df mov %ebx,%edi <== NOT EXECUTED break; } RBTree_Direction dir = (compare_result == 1); 10c1f8: 48 dec %eax <== NOT EXECUTED 10c1f9: 0f 94 c0 sete %al <== NOT EXECUTED 10c1fc: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED iter_node = iter_node->child[dir]; 10c1ff: 8b 5c 83 04 mov 0x4(%ebx,%eax,4),%ebx <== NOT EXECUTED ) { RBTree_Node* iter_node = the_rbtree->root; RBTree_Node* found = NULL; int compare_result; while (iter_node) { 10c203: 85 db test %ebx,%ebx <== NOT EXECUTED 10c205: 75 d9 jne 10c1e0 <_RBTree_Find+0x18> <== NOT EXECUTED 10c207: 89 fb mov %edi,%ebx <== NOT EXECUTED return_node = _RBTree_Find_unprotected( the_rbtree, search_node ); _ISR_Enable( level ); 10c209: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 10c20c: 9d popf <== NOT EXECUTED return return_node; } 10c20d: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10c20f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10c212: 5b pop %ebx <== NOT EXECUTED 10c213: 5e pop %esi <== NOT EXECUTED 10c214: 5f pop %edi <== NOT EXECUTED 10c215: 5d pop %ebp <== NOT EXECUTED 10c216: c3 ret <== NOT EXECUTED =============================================================================== 0010c1a4 <_RBTree_Find_header>: */ RBTree_Control *_RBTree_Find_header( RBTree_Node *the_node ) { 10c1a4: 55 push %ebp <== NOT EXECUTED 10c1a5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10c1a7: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED ISR_Level level; RBTree_Control *return_header; return_header = NULL; _ISR_Disable( level ); 10c1aa: 9c pushf <== NOT EXECUTED 10c1ab: fa cli <== NOT EXECUTED 10c1ac: 59 pop %ecx <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE RBTree_Control *_RBTree_Find_header_unprotected( RBTree_Node *the_node ) { if(!the_node) return NULL; 10c1ad: 31 c0 xor %eax,%eax <== NOT EXECUTED 10c1af: 85 d2 test %edx,%edx <== NOT EXECUTED 10c1b1: 74 11 je 10c1c4 <_RBTree_Find_header+0x20><== NOT EXECUTED if(!(the_node->parent)) return NULL; 10c1b3: 83 3a 00 cmpl $0x0,(%edx) <== NOT EXECUTED 10c1b6: 75 04 jne 10c1bc <_RBTree_Find_header+0x18><== NOT EXECUTED 10c1b8: eb 0a jmp 10c1c4 <_RBTree_Find_header+0x20><== NOT EXECUTED while(the_node->parent) the_node = the_node->parent; 10c1ba: 89 c2 mov %eax,%edx <== NOT EXECUTED 10c1bc: 8b 02 mov (%edx),%eax <== NOT EXECUTED 10c1be: 85 c0 test %eax,%eax <== NOT EXECUTED 10c1c0: 75 f8 jne 10c1ba <_RBTree_Find_header+0x16><== NOT EXECUTED 10c1c2: 89 d0 mov %edx,%eax <== NOT EXECUTED return_header = _RBTree_Find_header_unprotected( the_node ); _ISR_Enable( level ); 10c1c4: 51 push %ecx <== NOT EXECUTED 10c1c5: 9d popf <== NOT EXECUTED return return_header; } 10c1c6: 5d pop %ebp <== NOT EXECUTED 10c1c7: c3 ret <== NOT EXECUTED =============================================================================== 0010c3e4 <_RBTree_Initialize>: void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { 10c3e4: 55 push %ebp <== NOT EXECUTED 10c3e5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10c3e7: 57 push %edi <== NOT EXECUTED 10c3e8: 56 push %esi <== NOT EXECUTED 10c3e9: 53 push %ebx <== NOT EXECUTED 10c3ea: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10c3ed: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 10c3f0: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED 10c3f3: 8b 45 1c mov 0x1c(%ebp),%eax <== NOT EXECUTED size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; 10c3f6: 85 db test %ebx,%ebx <== NOT EXECUTED 10c3f8: 74 3d je 10c437 <_RBTree_Initialize+0x53><== NOT EXECUTED RBTree_Control *the_rbtree, RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; 10c3fa: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED the_rbtree->root = NULL; 10c400: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) <== NOT EXECUTED the_rbtree->first[0] = NULL; 10c407: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) <== NOT EXECUTED the_rbtree->first[1] = NULL; 10c40e: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) <== NOT EXECUTED the_rbtree->compare_function = compare_function; 10c415: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10c418: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED the_rbtree->is_unique = is_unique; 10c41b: 88 43 14 mov %al,0x14(%ebx) <== NOT EXECUTED /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; 10c41e: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED while ( count-- ) { 10c421: eb 10 jmp 10c433 <_RBTree_Initialize+0x4f><== NOT EXECUTED _RBTree_Insert(the_rbtree, next); 10c423: 50 push %eax <== NOT EXECUTED 10c424: 50 push %eax <== NOT EXECUTED 10c425: 56 push %esi <== NOT EXECUTED 10c426: 53 push %ebx <== NOT EXECUTED 10c427: e8 9d ff ff ff call 10c3c9 <_RBTree_Insert> <== NOT EXECUTED * node_size - size of node in bytes * * Output parameters: NONE */ void _RBTree_Initialize( 10c42c: 03 75 18 add 0x18(%ebp),%esi <== NOT EXECUTED 10c42f: 4f dec %edi <== NOT EXECUTED 10c430: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { 10c433: 85 ff test %edi,%edi <== NOT EXECUTED 10c435: 75 ec jne 10c423 <_RBTree_Initialize+0x3f><== NOT EXECUTED _RBTree_Insert(the_rbtree, next); next = (RBTree_Node *) _Addresses_Add_offset( (void *) next, node_size ); } } 10c437: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10c43a: 5b pop %ebx <== NOT EXECUTED 10c43b: 5e pop %esi <== NOT EXECUTED 10c43c: 5f pop %edi <== NOT EXECUTED 10c43d: 5d pop %ebp <== NOT EXECUTED 10c43e: c3 ret <== NOT EXECUTED =============================================================================== 0010f7e8 <_RBTree_Insert_unprotected>: */ RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 10f7e8: 55 push %ebp 10f7e9: 89 e5 mov %esp,%ebp 10f7eb: 57 push %edi 10f7ec: 56 push %esi 10f7ed: 53 push %ebx 10f7ee: 83 ec 0c sub $0xc,%esp 10f7f1: 8b 7d 08 mov 0x8(%ebp),%edi 10f7f4: 8b 5d 0c mov 0xc(%ebp),%ebx if(!the_node) return (RBTree_Node*)-1; 10f7f7: 83 ce ff or $0xffffffff,%esi 10f7fa: 85 db test %ebx,%ebx 10f7fc: 0f 84 85 00 00 00 je 10f887 <_RBTree_Insert_unprotected+0x9f> RBTree_Node *iter_node = the_rbtree->root; 10f802: 8b 77 04 mov 0x4(%edi),%esi int compare_result; if (!iter_node) { /* special case: first node inserted */ 10f805: 85 f6 test %esi,%esi 10f807: 75 5e jne 10f867 <_RBTree_Insert_unprotected+0x7f> the_node->color = RBT_BLACK; 10f809: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) the_rbtree->root = the_node; 10f810: 89 5f 04 mov %ebx,0x4(%edi) the_rbtree->first[0] = the_rbtree->first[1] = the_node; 10f813: 89 5f 0c mov %ebx,0xc(%edi) 10f816: 89 5f 08 mov %ebx,0x8(%edi) the_node->parent = (RBTree_Node *) the_rbtree; 10f819: 89 3b mov %edi,(%ebx) the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; 10f81b: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 10f822: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) 10f829: eb 5c jmp 10f887 <_RBTree_Insert_unprotected+0x9f> } else { /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); if ( the_rbtree->is_unique && !compare_result ) 10f82b: 85 c0 test %eax,%eax 10f82d: 74 58 je 10f887 <_RBTree_Insert_unprotected+0x9f><== ALWAYS TAKEN return iter_node; RBTree_Direction dir = (compare_result != -1); 10f82f: 40 inc %eax 10f830: 0f 95 c0 setne %al 10f833: 0f b6 c0 movzbl %al,%eax if (!iter_node->child[dir]) { 10f836: 8b 54 86 04 mov 0x4(%esi,%eax,4),%edx 10f83a: 85 d2 test %edx,%edx 10f83c: 75 27 jne 10f865 <_RBTree_Insert_unprotected+0x7d> the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; 10f83e: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 10f845: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) the_node->color = RBT_RED; 10f84c: c7 43 0c 01 00 00 00 movl $0x1,0xc(%ebx) iter_node->child[dir] = the_node; 10f853: 89 5c 86 04 mov %ebx,0x4(%esi,%eax,4) the_node->parent = iter_node; 10f857: 89 33 mov %esi,(%ebx) /* update min/max */ if (_RBTree_Is_first(the_rbtree, iter_node, dir)) { 10f859: 3b 74 87 08 cmp 0x8(%edi,%eax,4),%esi 10f85d: 75 1a jne 10f879 <_RBTree_Insert_unprotected+0x91><== NEVER TAKEN the_rbtree->first[dir] = the_node; 10f85f: 89 5c 87 08 mov %ebx,0x8(%edi,%eax,4) 10f863: eb 14 jmp 10f879 <_RBTree_Insert_unprotected+0x91> while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); if ( the_rbtree->is_unique && !compare_result ) return iter_node; RBTree_Direction dir = (compare_result != -1); if (!iter_node->child[dir]) { 10f865: 89 d6 mov %edx,%esi the_node->parent = (RBTree_Node *) the_rbtree; the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; } else { /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); 10f867: 50 push %eax 10f868: 50 push %eax 10f869: 56 push %esi 10f86a: 53 push %ebx 10f86b: ff 57 10 call *0x10(%edi) if ( the_rbtree->is_unique && !compare_result ) 10f86e: 83 c4 10 add $0x10,%esp 10f871: 80 7f 14 00 cmpb $0x0,0x14(%edi) 10f875: 75 b4 jne 10f82b <_RBTree_Insert_unprotected+0x43> 10f877: eb b6 jmp 10f82f <_RBTree_Insert_unprotected+0x47> } } /* while(iter_node) */ /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); 10f879: 83 ec 0c sub $0xc,%esp 10f87c: 53 push %ebx 10f87d: e8 ca fe ff ff call 10f74c <_RBTree_Validate_insert_unprotected> 10f882: 83 c4 10 add $0x10,%esp } return (RBTree_Node*)0; 10f885: 31 f6 xor %esi,%esi } 10f887: 89 f0 mov %esi,%eax 10f889: 8d 65 f4 lea -0xc(%ebp),%esp 10f88c: 5b pop %ebx 10f88d: 5e pop %esi 10f88e: 5f pop %edi 10f88f: 5d pop %ebp 10f890: c3 ret =============================================================================== 0010f40c <_RBTree_Sibling>: * exists, and NULL if not. */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { 10f40c: 55 push %ebp 10f40d: 89 e5 mov %esp,%ebp if(!the_node) return NULL; 10f40f: 31 d2 xor %edx,%edx 10f411: 85 c0 test %eax,%eax 10f413: 74 15 je 10f42a <_RBTree_Sibling+0x1e> <== NEVER TAKEN if(!(the_node->parent)) return NULL; 10f415: 8b 08 mov (%eax),%ecx 10f417: 85 c9 test %ecx,%ecx 10f419: 74 0f je 10f42a <_RBTree_Sibling+0x1e> <== NEVER TAKEN if(!(the_node->parent->parent)) return NULL; 10f41b: 83 39 00 cmpl $0x0,(%ecx) 10f41e: 74 0a je 10f42a <_RBTree_Sibling+0x1e> <== NEVER TAKEN if(the_node == the_node->parent->child[RBT_LEFT]) 10f420: 8b 51 04 mov 0x4(%ecx),%edx 10f423: 39 d0 cmp %edx,%eax 10f425: 75 03 jne 10f42a <_RBTree_Sibling+0x1e> return the_node->parent->child[RBT_RIGHT]; 10f427: 8b 51 08 mov 0x8(%ecx),%edx else return the_node->parent->child[RBT_LEFT]; } 10f42a: 89 d0 mov %edx,%eax 10f42c: 5d pop %ebp 10f42d: c3 ret =============================================================================== 0010f74c <_RBTree_Validate_insert_unprotected>: * append operation. */ void _RBTree_Validate_insert_unprotected( RBTree_Node *the_node ) { 10f74c: 55 push %ebp 10f74d: 89 e5 mov %esp,%ebp 10f74f: 57 push %edi 10f750: 56 push %esi 10f751: 53 push %ebx 10f752: 8b 75 08 mov 0x8(%ebp),%esi RBTree_Node *u,*g; /* note: the insert root case is handled already */ /* if the parent is black, nothing needs to be done * otherwise may need to loop a few times */ while (_RBTree_Is_red(_RBTree_Parent(the_node))) { 10f755: eb 5b jmp 10f7b2 <_RBTree_Validate_insert_unprotected+0x66> ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(!(the_node->parent->parent->parent)) return NULL; 10f757: 83 3b 00 cmpl $0x0,(%ebx) 10f75a: 74 6f je 10f7cb <_RBTree_Validate_insert_unprotected+0x7f><== NEVER TAKEN { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) 10f75c: 8b 53 04 mov 0x4(%ebx),%edx 10f75f: 39 d0 cmp %edx,%eax 10f761: 75 03 jne 10f766 <_RBTree_Validate_insert_unprotected+0x1a><== ALWAYS TAKEN return the_node->parent->child[RBT_RIGHT]; 10f763: 8b 53 08 mov 0x8(%ebx),%edx <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 10f766: 85 d2 test %edx,%edx 10f768: 74 61 je 10f7cb <_RBTree_Validate_insert_unprotected+0x7f> 10f76a: 83 7a 0c 01 cmpl $0x1,0xc(%edx) 10f76e: 75 5b jne 10f7cb <_RBTree_Validate_insert_unprotected+0x7f> u = _RBTree_Parent_sibling(the_node); g = the_node->parent->parent; /* if uncle is red, repaint uncle/parent black and grandparent red */ if(_RBTree_Is_red(u)) { the_node->parent->color = RBT_BLACK; 10f770: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) u->color = RBT_BLACK; 10f777: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) g->color = RBT_RED; 10f77e: c7 43 0c 01 00 00 00 movl $0x1,0xc(%ebx) 10f785: 89 de mov %ebx,%esi 10f787: eb 29 jmp 10f7b2 <_RBTree_Validate_insert_unprotected+0x66> RBTree_Direction dir = the_node != the_node->parent->child[0]; RBTree_Direction pdir = the_node->parent != g->child[0]; /* ensure node is on the same branch direction as parent */ if (dir != pdir) { _RBTree_Rotate(the_node->parent, pdir); 10f789: 89 fa mov %edi,%edx <== NOT EXECUTED 10f78b: e8 78 ff ff ff call 10f708 <_RBTree_Rotate> <== NOT EXECUTED the_node = the_node->child[pdir]; 10f790: 8b 74 be 04 mov 0x4(%esi,%edi,4),%esi <== NOT EXECUTED } the_node->parent->color = RBT_BLACK; 10f794: 8b 06 mov (%esi),%eax 10f796: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) g->color = RBT_RED; 10f79d: c7 43 0c 01 00 00 00 movl $0x1,0xc(%ebx) /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); 10f7a4: ba 01 00 00 00 mov $0x1,%edx 10f7a9: 29 fa sub %edi,%edx 10f7ab: 89 d8 mov %ebx,%eax 10f7ad: e8 56 ff ff ff call 10f708 <_RBTree_Rotate> ISR_Level level; _ISR_Disable( level ); return _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); } 10f7b2: 8b 06 mov (%esi),%eax */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; 10f7b4: 8b 18 mov (%eax),%ebx 10f7b6: 85 db test %ebx,%ebx 10f7b8: 74 08 je 10f7c2 <_RBTree_Validate_insert_unprotected+0x76> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 10f7ba: 83 78 0c 01 cmpl $0x1,0xc(%eax) 10f7be: 75 23 jne 10f7e3 <_RBTree_Validate_insert_unprotected+0x97> 10f7c0: eb 95 jmp 10f757 <_RBTree_Validate_insert_unprotected+0xb> /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); } } if(!the_node->parent->parent) the_node->color = RBT_BLACK; 10f7c2: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) 10f7c9: eb 18 jmp 10f7e3 <_RBTree_Validate_insert_unprotected+0x97> u->color = RBT_BLACK; g->color = RBT_RED; the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; RBTree_Direction pdir = the_node->parent != g->child[0]; 10f7cb: 31 d2 xor %edx,%edx 10f7cd: 3b 43 04 cmp 0x4(%ebx),%eax 10f7d0: 0f 95 c2 setne %dl 10f7d3: 89 d7 mov %edx,%edi the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; g->color = RBT_RED; the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; 10f7d5: 31 d2 xor %edx,%edx 10f7d7: 3b 70 04 cmp 0x4(%eax),%esi 10f7da: 0f 95 c2 setne %dl RBTree_Direction pdir = the_node->parent != g->child[0]; /* ensure node is on the same branch direction as parent */ if (dir != pdir) { 10f7dd: 39 fa cmp %edi,%edx 10f7df: 75 a8 jne 10f789 <_RBTree_Validate_insert_unprotected+0x3d><== NEVER TAKEN 10f7e1: eb b1 jmp 10f794 <_RBTree_Validate_insert_unprotected+0x48> /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); } } if(!the_node->parent->parent) the_node->color = RBT_BLACK; } 10f7e3: 5b pop %ebx 10f7e4: 5e pop %esi 10f7e5: 5f pop %edi 10f7e6: 5d pop %ebp 10f7e7: c3 ret =============================================================================== 0010e3e6 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 10e3e6: 55 push %ebp 10e3e7: 89 e5 mov %esp,%ebp 10e3e9: 57 push %edi 10e3ea: 56 push %esi 10e3eb: 53 push %ebx 10e3ec: 83 ec 1c sub $0x1c,%esp RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10e3ef: 8b 45 08 mov 0x8(%ebp),%eax 10e3f2: 8b 98 e0 00 00 00 mov 0xe0(%eax),%ebx if ( !api ) 10e3f8: 85 db test %ebx,%ebx 10e3fa: 74 45 je 10e441 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 10e3fc: 9c pushf 10e3fd: fa cli 10e3fe: 58 pop %eax signal_set = asr->signals_posted; 10e3ff: 8b 7b 14 mov 0x14(%ebx),%edi asr->signals_posted = 0; 10e402: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 10e409: 50 push %eax 10e40a: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 10e40b: 85 ff test %edi,%edi 10e40d: 74 32 je 10e441 <_RTEMS_tasks_Post_switch_extension+0x5b> return; asr->nest_level += 1; 10e40f: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10e412: 50 push %eax 10e413: 8d 75 e4 lea -0x1c(%ebp),%esi 10e416: 56 push %esi 10e417: 68 ff ff 00 00 push $0xffff 10e41c: ff 73 10 pushl 0x10(%ebx) 10e41f: e8 e0 19 00 00 call 10fe04 (*asr->handler)( signal_set ); 10e424: 89 3c 24 mov %edi,(%esp) 10e427: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 10e42a: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10e42d: 83 c4 0c add $0xc,%esp 10e430: 56 push %esi 10e431: 68 ff ff 00 00 push $0xffff 10e436: ff 75 e4 pushl -0x1c(%ebp) 10e439: e8 c6 19 00 00 call 10fe04 10e43e: 83 c4 10 add $0x10,%esp } 10e441: 8d 65 f4 lea -0xc(%ebp),%esp 10e444: 5b pop %ebx 10e445: 5e pop %esi 10e446: 5f pop %edi 10e447: 5d pop %ebp 10e448: c3 ret =============================================================================== 00139af8 <_Rate_monotonic_Get_status>: bool _Rate_monotonic_Get_status( Rate_monotonic_Control *the_period, Rate_monotonic_Period_time_t *wall_since_last_period, Thread_CPU_usage_t *cpu_since_last_period ) { 139af8: 55 push %ebp 139af9: 89 e5 mov %esp,%ebp 139afb: 57 push %edi 139afc: 56 push %esi 139afd: 53 push %ebx 139afe: 83 ec 38 sub $0x38,%esp #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; 139b01: 8b 45 08 mov 0x8(%ebp),%eax 139b04: 8b 58 40 mov 0x40(%eax),%ebx /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 139b07: 8d 45 e0 lea -0x20(%ebp),%eax 139b0a: 50 push %eax 139b0b: e8 98 f0 fe ff call 128ba8 <_TOD_Get_uptime> _Timestamp_Subtract( 139b10: 8b 75 e0 mov -0x20(%ebp),%esi 139b13: 8b 7d e4 mov -0x1c(%ebp),%edi const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 139b16: 89 f2 mov %esi,%edx 139b18: 89 f9 mov %edi,%ecx 139b1a: 8b 45 08 mov 0x8(%ebp),%eax 139b1d: 2b 50 4c sub 0x4c(%eax),%edx 139b20: 1b 48 50 sbb 0x50(%eax),%ecx 139b23: 8b 45 0c mov 0xc(%ebp),%eax 139b26: 89 10 mov %edx,(%eax) 139b28: 89 48 04 mov %ecx,0x4(%eax) #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; 139b2b: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 139b31: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx 139b37: 89 55 d0 mov %edx,-0x30(%ebp) 139b3a: 89 4d d4 mov %ecx,-0x2c(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 139b3d: 83 c4 10 add $0x10,%esp if (used < the_period->cpu_usage_period_initiated) return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; 139b40: b0 01 mov $0x1,%al * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 139b42: 3b 1d e0 b7 18 00 cmp 0x18b7e0,%ebx 139b48: 75 3f jne 139b89 <_Rate_monotonic_Get_status+0x91> 139b4a: 89 f0 mov %esi,%eax 139b4c: 89 fa mov %edi,%edx 139b4e: 2b 05 f0 b7 18 00 sub 0x18b7f0,%eax 139b54: 1b 15 f4 b7 18 00 sbb 0x18b7f4,%edx static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 139b5a: 03 45 d0 add -0x30(%ebp),%eax 139b5d: 13 55 d4 adc -0x2c(%ebp),%edx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 139b60: 8b 75 08 mov 0x8(%ebp),%esi 139b63: 8b 4e 44 mov 0x44(%esi),%ecx 139b66: 8b 5e 48 mov 0x48(%esi),%ebx /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) 139b69: 39 da cmp %ebx,%edx 139b6b: 7c 1a jl 139b87 <_Rate_monotonic_Get_status+0x8f><== NEVER TAKEN 139b6d: 7f 04 jg 139b73 <_Rate_monotonic_Get_status+0x7b><== NEVER TAKEN 139b6f: 39 c8 cmp %ecx,%eax 139b71: 72 14 jb 139b87 <_Rate_monotonic_Get_status+0x8f> const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 139b73: 89 c6 mov %eax,%esi 139b75: 89 d7 mov %edx,%edi 139b77: 29 ce sub %ecx,%esi 139b79: 19 df sbb %ebx,%edi 139b7b: 8b 55 10 mov 0x10(%ebp),%edx 139b7e: 89 32 mov %esi,(%edx) 139b80: 89 7a 04 mov %edi,0x4(%edx) if (used < the_period->cpu_usage_period_initiated) return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; 139b83: b0 01 mov $0x1,%al 139b85: eb 02 jmp 139b89 <_Rate_monotonic_Get_status+0x91> /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) return false; 139b87: 31 c0 xor %eax,%eax return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } 139b89: 8d 65 f4 lea -0xc(%ebp),%esp 139b8c: 5b pop %ebx 139b8d: 5e pop %esi 139b8e: 5f pop %edi 139b8f: 5d pop %ebp 139b90: c3 ret =============================================================================== 00139e30 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 139e30: 55 push %ebp 139e31: 89 e5 mov %esp,%ebp 139e33: 53 push %ebx 139e34: 83 ec 18 sub $0x18,%esp /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); 139e37: 8d 45 f4 lea -0xc(%ebp),%eax 139e3a: 50 push %eax 139e3b: ff 75 08 pushl 0x8(%ebp) 139e3e: 68 a0 ba 18 00 push $0x18baa0 139e43: e8 14 7a fd ff call 11185c <_Objects_Get> 139e48: 89 c3 mov %eax,%ebx switch ( location ) { 139e4a: 83 c4 10 add $0x10,%esp 139e4d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 139e51: 75 69 jne 139ebc <_Rate_monotonic_Timeout+0x8c><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 139e53: 8b 40 40 mov 0x40(%eax),%eax if ( _States_Is_waiting_for_period( the_thread->current_state ) && 139e56: f6 40 11 40 testb $0x40,0x11(%eax) 139e5a: 74 18 je 139e74 <_Rate_monotonic_Timeout+0x44> 139e5c: 8b 53 08 mov 0x8(%ebx),%edx 139e5f: 39 50 20 cmp %edx,0x20(%eax) 139e62: 75 10 jne 139e74 <_Rate_monotonic_Timeout+0x44> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 139e64: 51 push %ecx 139e65: 51 push %ecx 139e66: 68 f8 ff 03 10 push $0x1003fff8 139e6b: 50 push %eax 139e6c: e8 0b 82 fd ff call 11207c <_Thread_Clear_state> the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 139e71: 58 pop %eax 139e72: eb 10 jmp 139e84 <_Rate_monotonic_Timeout+0x54> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 139e74: 83 7b 38 01 cmpl $0x1,0x38(%ebx) 139e78: 75 2b jne 139ea5 <_Rate_monotonic_Timeout+0x75> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 139e7a: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) _Rate_monotonic_Initiate_statistics( the_period ); 139e81: 83 ec 0c sub $0xc,%esp 139e84: 53 push %ebx 139e85: e8 07 fd ff ff call 139b91 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 139e8a: 8b 43 3c mov 0x3c(%ebx),%eax 139e8d: 89 43 1c mov %eax,0x1c(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 139e90: 58 pop %eax 139e91: 5a pop %edx _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); 139e92: 83 c3 10 add $0x10,%ebx 139e95: 53 push %ebx 139e96: 68 88 b6 18 00 push $0x18b688 139e9b: e8 fc 8f fd ff call 112e9c <_Watchdog_Insert> 139ea0: 83 c4 10 add $0x10,%esp 139ea3: eb 07 jmp 139eac <_Rate_monotonic_Timeout+0x7c> } else the_period->state = RATE_MONOTONIC_EXPIRED; 139ea5: c7 43 38 04 00 00 00 movl $0x4,0x38(%ebx) * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 139eac: a1 cc b5 18 00 mov 0x18b5cc,%eax 139eb1: 48 dec %eax 139eb2: a3 cc b5 18 00 mov %eax,0x18b5cc return _Thread_Dispatch_disable_level; 139eb7: a1 cc b5 18 00 mov 0x18b5cc,%eax case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 139ebc: 8b 5d fc mov -0x4(%ebp),%ebx 139ebf: c9 leave 139ec0: c3 ret =============================================================================== 00139c0d <_Rate_monotonic_Update_statistics>: void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 139c0d: 55 push %ebp 139c0e: 89 e5 mov %esp,%ebp 139c10: 53 push %ebx 139c11: 83 ec 14 sub $0x14,%esp 139c14: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 139c17: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 139c1a: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 139c1e: 75 03 jne 139c23 <_Rate_monotonic_Update_statistics+0x16> stats->missed_count++; 139c20: ff 43 58 incl 0x58(%ebx) /* * Grab status for time statistics. */ valid_status = 139c23: 52 push %edx _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 139c24: 8d 45 e8 lea -0x18(%ebp),%eax stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 139c27: 50 push %eax _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 139c28: 8d 45 f0 lea -0x10(%ebp),%eax stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 139c2b: 50 push %eax 139c2c: 53 push %ebx 139c2d: e8 c6 fe ff ff call 139af8 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) 139c32: 83 c4 10 add $0x10,%esp 139c35: 84 c0 test %al,%al 139c37: 74 6c je 139ca5 <_Rate_monotonic_Update_statistics+0x98> /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 139c39: 8b 45 e8 mov -0x18(%ebp),%eax 139c3c: 8b 55 ec mov -0x14(%ebp),%edx 139c3f: 01 43 6c add %eax,0x6c(%ebx) 139c42: 11 53 70 adc %edx,0x70(%ebx) if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 139c45: 3b 53 60 cmp 0x60(%ebx),%edx 139c48: 7f 0d jg 139c57 <_Rate_monotonic_Update_statistics+0x4a><== NEVER TAKEN 139c4a: 7c 05 jl 139c51 <_Rate_monotonic_Update_statistics+0x44> 139c4c: 3b 43 5c cmp 0x5c(%ebx),%eax 139c4f: 73 06 jae 139c57 <_Rate_monotonic_Update_statistics+0x4a> stats->min_cpu_time = executed; 139c51: 89 43 5c mov %eax,0x5c(%ebx) 139c54: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 139c57: 39 53 68 cmp %edx,0x68(%ebx) 139c5a: 7f 0d jg 139c69 <_Rate_monotonic_Update_statistics+0x5c><== NEVER TAKEN 139c5c: 7c 05 jl 139c63 <_Rate_monotonic_Update_statistics+0x56><== NEVER TAKEN 139c5e: 39 43 64 cmp %eax,0x64(%ebx) 139c61: 73 06 jae 139c69 <_Rate_monotonic_Update_statistics+0x5c> stats->max_cpu_time = executed; 139c63: 89 43 64 mov %eax,0x64(%ebx) 139c66: 89 53 68 mov %edx,0x68(%ebx) /* * Update Wall time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); 139c69: 8b 45 f0 mov -0x10(%ebp),%eax 139c6c: 8b 55 f4 mov -0xc(%ebp),%edx 139c6f: 01 83 84 00 00 00 add %eax,0x84(%ebx) 139c75: 11 93 88 00 00 00 adc %edx,0x88(%ebx) if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 139c7b: 3b 53 78 cmp 0x78(%ebx),%edx 139c7e: 7f 0d jg 139c8d <_Rate_monotonic_Update_statistics+0x80><== NEVER TAKEN 139c80: 7c 05 jl 139c87 <_Rate_monotonic_Update_statistics+0x7a> 139c82: 3b 43 74 cmp 0x74(%ebx),%eax 139c85: 73 06 jae 139c8d <_Rate_monotonic_Update_statistics+0x80> stats->min_wall_time = since_last_period; 139c87: 89 43 74 mov %eax,0x74(%ebx) 139c8a: 89 53 78 mov %edx,0x78(%ebx) if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 139c8d: 39 93 80 00 00 00 cmp %edx,0x80(%ebx) 139c93: 7f 10 jg 139ca5 <_Rate_monotonic_Update_statistics+0x98> 139c95: 7c 05 jl 139c9c <_Rate_monotonic_Update_statistics+0x8f><== NEVER TAKEN 139c97: 39 43 7c cmp %eax,0x7c(%ebx) 139c9a: 73 09 jae 139ca5 <_Rate_monotonic_Update_statistics+0x98> stats->max_wall_time = since_last_period; 139c9c: 89 43 7c mov %eax,0x7c(%ebx) 139c9f: 89 93 80 00 00 00 mov %edx,0x80(%ebx) stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } 139ca5: 8b 5d fc mov -0x4(%ebp),%ebx 139ca8: c9 leave 139ca9: c3 ret =============================================================================== 0010cce0 <_Scheduler_CBS_Budget_callout>: Scheduler_CBS_Server **_Scheduler_CBS_Server_list; void _Scheduler_CBS_Budget_callout( Thread_Control *the_thread ) { 10cce0: 55 push %ebp <== NOT EXECUTED 10cce1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10cce3: 53 push %ebx <== NOT EXECUTED 10cce4: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED 10cce7: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED Priority_Control new_priority; Scheduler_CBS_Per_thread *sched_info; Scheduler_CBS_Server_id server_id; /* Put violating task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; 10ccea: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax <== NOT EXECUTED if ( the_thread->real_priority != new_priority ) 10ccf0: 39 43 18 cmp %eax,0x18(%ebx) <== NOT EXECUTED 10ccf3: 74 03 je 10ccf8 <_Scheduler_CBS_Budget_callout+0x18><== NOT EXECUTED the_thread->real_priority = new_priority; 10ccf5: 89 43 18 mov %eax,0x18(%ebx) <== NOT EXECUTED if ( the_thread->current_priority != new_priority ) 10ccf8: 39 43 14 cmp %eax,0x14(%ebx) <== NOT EXECUTED 10ccfb: 74 0d je 10cd0a <_Scheduler_CBS_Budget_callout+0x2a><== NOT EXECUTED _Thread_Change_priority(the_thread, new_priority, true); 10ccfd: 52 push %edx <== NOT EXECUTED 10ccfe: 6a 01 push $0x1 <== NOT EXECUTED 10cd00: 50 push %eax <== NOT EXECUTED 10cd01: 53 push %ebx <== NOT EXECUTED 10cd02: e8 f5 04 00 00 call 10d1fc <_Thread_Change_priority><== NOT EXECUTED 10cd07: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* Invoke callback function if any. */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; 10cd0a: 8b 9b 88 00 00 00 mov 0x88(%ebx),%ebx <== NOT EXECUTED if ( sched_info->cbs_server->cbs_budget_overrun ) { 10cd10: 8b 43 18 mov 0x18(%ebx),%eax <== NOT EXECUTED 10cd13: 83 78 0c 00 cmpl $0x0,0xc(%eax) <== NOT EXECUTED 10cd17: 74 1a je 10cd33 <_Scheduler_CBS_Budget_callout+0x53><== NOT EXECUTED _Scheduler_CBS_Get_server_id( 10cd19: 52 push %edx <== NOT EXECUTED 10cd1a: 52 push %edx <== NOT EXECUTED 10cd1b: 8d 55 f4 lea -0xc(%ebp),%edx <== NOT EXECUTED 10cd1e: 52 push %edx <== NOT EXECUTED 10cd1f: ff 30 pushl (%eax) <== NOT EXECUTED 10cd21: e8 7e ff ff ff call 10cca4 <_Scheduler_CBS_Get_server_id><== NOT EXECUTED sched_info->cbs_server->task_id, &server_id ); sched_info->cbs_server->cbs_budget_overrun( server_id ); 10cd26: 59 pop %ecx <== NOT EXECUTED 10cd27: 8b 43 18 mov 0x18(%ebx),%eax <== NOT EXECUTED 10cd2a: ff 75 f4 pushl -0xc(%ebp) <== NOT EXECUTED 10cd2d: ff 50 0c call *0xc(%eax) <== NOT EXECUTED 10cd30: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } 10cd33: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10cd36: c9 leave <== NOT EXECUTED 10cd37: c3 ret <== NOT EXECUTED =============================================================================== 0010c9d0 <_Scheduler_CBS_Create_server>: int _Scheduler_CBS_Create_server ( Scheduler_CBS_Parameters *params, Scheduler_CBS_Budget_overrun budget_overrun_callback, rtems_id *server_id ) { 10c9d0: 55 push %ebp 10c9d1: 89 e5 mov %esp,%ebp 10c9d3: 57 push %edi 10c9d4: 56 push %esi 10c9d5: 53 push %ebx 10c9d6: 83 ec 0c sub $0xc,%esp 10c9d9: 8b 5d 08 mov 0x8(%ebp),%ebx 10c9dc: 8b 7d 10 mov 0x10(%ebp),%edi if ( params->budget <= 0 || params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; 10c9df: b8 ee ff ff ff mov $0xffffffee,%eax ) { unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || 10c9e4: 83 7b 04 00 cmpl $0x0,0x4(%ebx) 10c9e8: 7e 6d jle 10ca57 <_Scheduler_CBS_Create_server+0x87> 10c9ea: 83 3b 00 cmpl $0x0,(%ebx) 10c9ed: 7e 68 jle 10ca57 <_Scheduler_CBS_Create_server+0x87> params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 10c9ef: 8b 15 60 f2 12 00 mov 0x12f260,%edx if ( !_Scheduler_CBS_Server_list[i] ) 10c9f5: a1 78 35 13 00 mov 0x133578,%eax 10c9fa: 31 f6 xor %esi,%esi 10c9fc: eb 35 jmp 10ca33 <_Scheduler_CBS_Create_server+0x63> 10c9fe: 83 3c b0 00 cmpl $0x0,(%eax,%esi,4) 10ca02: 75 2e jne 10ca32 <_Scheduler_CBS_Create_server+0x62> } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; 10ca04: 89 37 mov %esi,(%edi) _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) 10ca06: a1 78 35 13 00 mov 0x133578,%eax 10ca0b: 8d 34 b0 lea (%eax,%esi,4),%esi _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); 10ca0e: 83 ec 0c sub $0xc,%esp 10ca11: 6a 10 push $0x10 10ca13: e8 fa 18 00 00 call 10e312 <_Workspace_Allocate> if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) 10ca18: 89 06 mov %eax,(%esi) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; 10ca1a: 8b 17 mov (%edi),%edx 10ca1c: a1 78 35 13 00 mov 0x133578,%eax 10ca21: 8b 14 90 mov (%eax,%edx,4),%edx if ( !the_server ) 10ca24: 83 c4 10 add $0x10,%esp return SCHEDULER_CBS_ERROR_NO_MEMORY; 10ca27: b8 ef ff ff ff mov $0xffffffef,%eax *server_id = i; _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) 10ca2c: 85 d2 test %edx,%edx 10ca2e: 75 0e jne 10ca3e <_Scheduler_CBS_Create_server+0x6e><== ALWAYS TAKEN 10ca30: eb 25 jmp 10ca57 <_Scheduler_CBS_Create_server+0x87><== NOT EXECUTED params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 10ca32: 46 inc %esi 10ca33: 39 d6 cmp %edx,%esi 10ca35: 75 c7 jne 10c9fe <_Scheduler_CBS_Create_server+0x2e> if ( !_Scheduler_CBS_Server_list[i] ) break; } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; 10ca37: b8 e6 ff ff ff mov $0xffffffe6,%eax 10ca3c: eb 19 jmp 10ca57 <_Scheduler_CBS_Create_server+0x87> _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; 10ca3e: 8b 0b mov (%ebx),%ecx 10ca40: 8b 5b 04 mov 0x4(%ebx),%ebx 10ca43: 89 4a 04 mov %ecx,0x4(%edx) 10ca46: 89 5a 08 mov %ebx,0x8(%edx) the_server->task_id = -1; 10ca49: c7 02 ff ff ff ff movl $0xffffffff,(%edx) the_server->cbs_budget_overrun = budget_overrun_callback; 10ca4f: 8b 45 0c mov 0xc(%ebp),%eax 10ca52: 89 42 0c mov %eax,0xc(%edx) return SCHEDULER_CBS_OK; 10ca55: 31 c0 xor %eax,%eax } 10ca57: 8d 65 f4 lea -0xc(%ebp),%esp 10ca5a: 5b pop %ebx 10ca5b: 5e pop %esi 10ca5c: 5f pop %edi 10ca5d: 5d pop %ebp 10ca5e: c3 ret =============================================================================== 0010cacc <_Scheduler_CBS_Detach_thread>: int _Scheduler_CBS_Detach_thread ( Scheduler_CBS_Server_id server_id, rtems_id task_id ) { 10cacc: 55 push %ebp 10cacd: 89 e5 mov %esp,%ebp 10cacf: 57 push %edi 10cad0: 56 push %esi 10cad1: 53 push %ebx 10cad2: 83 ec 24 sub $0x24,%esp 10cad5: 8b 75 08 mov 0x8(%ebp),%esi 10cad8: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; Thread_Control *the_thread; Scheduler_CBS_Per_thread *sched_info; the_thread = _Thread_Get(task_id, &location); 10cadb: 8d 45 e4 lea -0x1c(%ebp),%eax 10cade: 50 push %eax 10cadf: 53 push %ebx 10cae0: e8 2b 0b 00 00 call 10d610 <_Thread_Get> 10cae5: 89 c7 mov %eax,%edi /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { 10cae7: 83 c4 10 add $0x10,%esp 10caea: 85 c0 test %eax,%eax 10caec: 74 05 je 10caf3 <_Scheduler_CBS_Detach_thread+0x27> _Thread_Enable_dispatch(); 10caee: e8 fd 0a 00 00 call 10d5f0 <_Thread_Enable_dispatch> } if ( server_id < 0 || server_id >= _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; 10caf3: b8 ee ff ff ff mov $0xffffffee,%eax /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { _Thread_Enable_dispatch(); } if ( server_id < 0 || server_id >= _Scheduler_CBS_Maximum_servers ) 10caf8: 3b 35 60 f2 12 00 cmp 0x12f260,%esi 10cafe: 73 4b jae 10cb4b <_Scheduler_CBS_Detach_thread+0x7f> return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !the_thread ) 10cb00: 85 ff test %edi,%edi 10cb02: 74 47 je 10cb4b <_Scheduler_CBS_Detach_thread+0x7f> return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; /* Server is not valid. */ if ( !_Scheduler_CBS_Server_list[server_id] ) 10cb04: a1 78 35 13 00 mov 0x133578,%eax 10cb09: 8b 14 b0 mov (%eax,%esi,4),%edx return SCHEDULER_CBS_ERROR_NOSERVER; 10cb0c: b8 e7 ff ff ff mov $0xffffffe7,%eax if ( server_id < 0 || server_id >= _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !the_thread ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; /* Server is not valid. */ if ( !_Scheduler_CBS_Server_list[server_id] ) 10cb11: 85 d2 test %edx,%edx 10cb13: 74 36 je 10cb4b <_Scheduler_CBS_Detach_thread+0x7f> return SCHEDULER_CBS_ERROR_NOSERVER; /* Thread and server are not attached. */ if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; 10cb15: b0 ee mov $0xee,%al return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; /* Server is not valid. */ if ( !_Scheduler_CBS_Server_list[server_id] ) return SCHEDULER_CBS_ERROR_NOSERVER; /* Thread and server are not attached. */ if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id ) 10cb17: 39 1a cmp %ebx,(%edx) 10cb19: 75 30 jne 10cb4b <_Scheduler_CBS_Detach_thread+0x7f><== NEVER TAKEN return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; _Scheduler_CBS_Server_list[server_id]->task_id = -1; 10cb1b: c7 02 ff ff ff ff movl $0xffffffff,(%edx) sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; 10cb21: 8b 87 88 00 00 00 mov 0x88(%edi),%eax 10cb27: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 10cb2e: 8b 87 a0 00 00 00 mov 0xa0(%edi),%eax 10cb34: 89 47 78 mov %eax,0x78(%edi) the_thread->budget_callout = the_thread->Start.budget_callout; 10cb37: 8b 87 a4 00 00 00 mov 0xa4(%edi),%eax 10cb3d: 89 47 7c mov %eax,0x7c(%edi) the_thread->is_preemptible = the_thread->Start.is_preemptible; 10cb40: 8a 87 9c 00 00 00 mov 0x9c(%edi),%al 10cb46: 88 47 70 mov %al,0x70(%edi) return SCHEDULER_CBS_OK; 10cb49: 31 c0 xor %eax,%eax } 10cb4b: 8d 65 f4 lea -0xc(%ebp),%esp 10cb4e: 5b pop %ebx 10cb4f: 5e pop %esi 10cb50: 5f pop %edi 10cb51: 5d pop %ebp 10cb52: c3 ret =============================================================================== 0010cb84 <_Scheduler_CBS_Get_execution_time>: int _Scheduler_CBS_Get_execution_time ( Scheduler_CBS_Server_id server_id, time_t *exec_time, time_t *abs_time ) { 10cb84: 55 push %ebp 10cb85: 89 e5 mov %esp,%ebp 10cb87: 57 push %edi 10cb88: 56 push %esi 10cb89: 53 push %ebx 10cb8a: 83 ec 1c sub $0x1c,%esp 10cb8d: 8b 5d 08 mov 0x8(%ebp),%ebx 10cb90: 8b 75 0c mov 0xc(%ebp),%esi Objects_Locations location; Thread_Control *the_thread; if ( server_id < 0 || server_id >= _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; 10cb93: b8 ee ff ff ff mov $0xffffffee,%eax ) { Objects_Locations location; Thread_Control *the_thread; if ( server_id < 0 || server_id >= _Scheduler_CBS_Maximum_servers ) 10cb98: 3b 1d 60 f2 12 00 cmp 0x12f260,%ebx 10cb9e: 73 5b jae 10cbfb <_Scheduler_CBS_Get_execution_time+0x77> return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !_Scheduler_CBS_Server_list[server_id] ) 10cba0: a1 78 35 13 00 mov 0x133578,%eax 10cba5: 8b 14 98 mov (%eax,%ebx,4),%edx return SCHEDULER_CBS_ERROR_NOSERVER; 10cba8: b8 e7 ff ff ff mov $0xffffffe7,%eax Objects_Locations location; Thread_Control *the_thread; if ( server_id < 0 || server_id >= _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !_Scheduler_CBS_Server_list[server_id] ) 10cbad: 85 d2 test %edx,%edx 10cbaf: 74 4a je 10cbfb <_Scheduler_CBS_Get_execution_time+0x77> return SCHEDULER_CBS_ERROR_NOSERVER; if ( _Scheduler_CBS_Server_list[server_id]->task_id == -1 ) { 10cbb1: 8b 02 mov (%edx),%eax 10cbb3: 83 f8 ff cmp $0xffffffff,%eax 10cbb6: 75 08 jne 10cbc0 <_Scheduler_CBS_Get_execution_time+0x3c><== NEVER TAKEN *exec_time = 0; 10cbb8: c7 06 00 00 00 00 movl $0x0,(%esi) 10cbbe: eb 39 jmp 10cbf9 <_Scheduler_CBS_Get_execution_time+0x75> return SCHEDULER_CBS_OK; } the_thread = _Thread_Get( 10cbc0: 52 push %edx <== NOT EXECUTED 10cbc1: 52 push %edx <== NOT EXECUTED 10cbc2: 8d 55 e4 lea -0x1c(%ebp),%edx <== NOT EXECUTED 10cbc5: 52 push %edx <== NOT EXECUTED 10cbc6: 50 push %eax <== NOT EXECUTED 10cbc7: e8 44 0a 00 00 call 10d610 <_Thread_Get> <== NOT EXECUTED 10cbcc: 89 c7 mov %eax,%edi <== NOT EXECUTED _Scheduler_CBS_Server_list[server_id]->task_id, &location ); /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { 10cbce: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10cbd1: 85 c0 test %eax,%eax <== NOT EXECUTED 10cbd3: 74 17 je 10cbec <_Scheduler_CBS_Get_execution_time+0x68><== NOT EXECUTED _Thread_Enable_dispatch(); 10cbd5: e8 16 0a 00 00 call 10d5f0 <_Thread_Enable_dispatch><== NOT EXECUTED *exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget - 10cbda: a1 78 35 13 00 mov 0x133578,%eax <== NOT EXECUTED 10cbdf: 8b 04 98 mov (%eax,%ebx,4),%eax <== NOT EXECUTED 10cbe2: 8b 50 08 mov 0x8(%eax),%edx <== NOT EXECUTED 10cbe5: 2b 57 74 sub 0x74(%edi),%edx <== NOT EXECUTED 10cbe8: 89 16 mov %edx,(%esi) <== NOT EXECUTED 10cbea: eb 0d jmp 10cbf9 <_Scheduler_CBS_Get_execution_time+0x75><== NOT EXECUTED the_thread->cpu_time_budget; } else { *exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget; 10cbec: a1 78 35 13 00 mov 0x133578,%eax <== NOT EXECUTED 10cbf1: 8b 04 98 mov (%eax,%ebx,4),%eax <== NOT EXECUTED 10cbf4: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED 10cbf7: 89 06 mov %eax,(%esi) <== NOT EXECUTED } return SCHEDULER_CBS_OK; 10cbf9: 31 c0 xor %eax,%eax } 10cbfb: 8d 65 f4 lea -0xc(%ebp),%esp 10cbfe: 5b pop %ebx 10cbff: 5e pop %esi 10cc00: 5f pop %edi 10cc01: 5d pop %ebp 10cc02: c3 ret =============================================================================== 0010cc3c <_Scheduler_CBS_Get_remaining_budget>: int _Scheduler_CBS_Get_remaining_budget ( Scheduler_CBS_Server_id server_id, time_t *remaining_budget ) { 10cc3c: 55 push %ebp 10cc3d: 89 e5 mov %esp,%ebp 10cc3f: 56 push %esi 10cc40: 53 push %ebx 10cc41: 83 ec 10 sub $0x10,%esp 10cc44: 8b 55 08 mov 0x8(%ebp),%edx 10cc47: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; Thread_Control *the_thread; if ( server_id < 0 || server_id >= _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; 10cc4a: b8 ee ff ff ff mov $0xffffffee,%eax ) { Objects_Locations location; Thread_Control *the_thread; if ( server_id < 0 || server_id >= _Scheduler_CBS_Maximum_servers ) 10cc4f: 3b 15 60 f2 12 00 cmp 0x12f260,%edx 10cc55: 73 46 jae 10cc9d <_Scheduler_CBS_Get_remaining_budget+0x61> return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !_Scheduler_CBS_Server_list[server_id] ) 10cc57: a1 78 35 13 00 mov 0x133578,%eax 10cc5c: 8b 14 90 mov (%eax,%edx,4),%edx return SCHEDULER_CBS_ERROR_NOSERVER; 10cc5f: b8 e7 ff ff ff mov $0xffffffe7,%eax Objects_Locations location; Thread_Control *the_thread; if ( server_id < 0 || server_id >= _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !_Scheduler_CBS_Server_list[server_id] ) 10cc64: 85 d2 test %edx,%edx 10cc66: 74 35 je 10cc9d <_Scheduler_CBS_Get_remaining_budget+0x61> return SCHEDULER_CBS_ERROR_NOSERVER; if ( _Scheduler_CBS_Server_list[server_id]->task_id == -1 ) { 10cc68: 8b 02 mov (%edx),%eax 10cc6a: 83 f8 ff cmp $0xffffffff,%eax 10cc6d: 75 05 jne 10cc74 <_Scheduler_CBS_Get_remaining_budget+0x38><== NEVER TAKEN *remaining_budget = _Scheduler_CBS_Server_list[server_id]->parameters.budget; 10cc6f: 8b 42 08 mov 0x8(%edx),%eax 10cc72: eb 1d jmp 10cc91 <_Scheduler_CBS_Get_remaining_budget+0x55> return SCHEDULER_CBS_OK; } the_thread = _Thread_Get( 10cc74: 52 push %edx <== NOT EXECUTED 10cc75: 52 push %edx <== NOT EXECUTED 10cc76: 8d 55 f4 lea -0xc(%ebp),%edx <== NOT EXECUTED 10cc79: 52 push %edx <== NOT EXECUTED 10cc7a: 50 push %eax <== NOT EXECUTED 10cc7b: e8 90 09 00 00 call 10d610 <_Thread_Get> <== NOT EXECUTED 10cc80: 89 c6 mov %eax,%esi <== NOT EXECUTED _Scheduler_CBS_Server_list[server_id]->task_id, &location ); /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { 10cc82: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10cc85: 85 c0 test %eax,%eax <== NOT EXECUTED 10cc87: 74 0c je 10cc95 <_Scheduler_CBS_Get_remaining_budget+0x59><== NOT EXECUTED _Thread_Enable_dispatch(); 10cc89: e8 62 09 00 00 call 10d5f0 <_Thread_Enable_dispatch><== NOT EXECUTED *remaining_budget = the_thread->cpu_time_budget; 10cc8e: 8b 46 74 mov 0x74(%esi),%eax <== NOT EXECUTED 10cc91: 89 03 mov %eax,(%ebx) 10cc93: eb 06 jmp 10cc9b <_Scheduler_CBS_Get_remaining_budget+0x5f> } else { *remaining_budget = 0; 10cc95: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED } return SCHEDULER_CBS_OK; 10cc9b: 31 c0 xor %eax,%eax } 10cc9d: 8d 65 f8 lea -0x8(%ebp),%esp 10cca0: 5b pop %ebx 10cca1: 5e pop %esi 10cca2: 5d pop %ebp 10cca3: c3 ret =============================================================================== 0010cd38 <_Scheduler_CBS_Initialize>: int _Scheduler_CBS_Initialize(void) { 10cd38: 55 push %ebp 10cd39: 89 e5 mov %esp,%ebp 10cd3b: 83 ec 14 sub $0x14,%esp unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( 10cd3e: a1 60 f2 12 00 mov 0x12f260,%eax 10cd43: c1 e0 02 shl $0x2,%eax 10cd46: 50 push %eax 10cd47: e8 c6 15 00 00 call 10e312 <_Workspace_Allocate> 10cd4c: a3 78 35 13 00 mov %eax,0x133578 _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) 10cd51: 83 c4 10 add $0x10,%esp return SCHEDULER_CBS_ERROR_NO_MEMORY; 10cd54: ba ef ff ff ff mov $0xffffffef,%edx int _Scheduler_CBS_Initialize(void) { unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) 10cd59: 85 c0 test %eax,%eax 10cd5b: 74 1e je 10cd7b <_Scheduler_CBS_Initialize+0x43><== NEVER TAKEN return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { 10cd5d: 8b 15 60 f2 12 00 mov 0x12f260,%edx 10cd63: 31 c0 xor %eax,%eax 10cd65: eb 0e jmp 10cd75 <_Scheduler_CBS_Initialize+0x3d> _Scheduler_CBS_Server_list[i] = NULL; 10cd67: 8b 0d 78 35 13 00 mov 0x133578,%ecx 10cd6d: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4) unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { 10cd74: 40 inc %eax 10cd75: 39 d0 cmp %edx,%eax 10cd77: 75 ee jne 10cd67 <_Scheduler_CBS_Initialize+0x2f> _Scheduler_CBS_Server_list[i] = NULL; } return SCHEDULER_CBS_OK; 10cd79: 31 d2 xor %edx,%edx } 10cd7b: 89 d0 mov %edx,%eax 10cd7d: c9 leave 10cd7e: c3 ret =============================================================================== 0010b904 <_Scheduler_CBS_Release_job>: void _Scheduler_CBS_Release_job( Thread_Control *the_thread, uint32_t deadline ) { 10b904: 55 push %ebp <== NOT EXECUTED 10b905: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b907: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10b90a: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10b90d: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED Priority_Control new_priority; Scheduler_CBS_Per_thread *sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; Scheduler_CBS_Server *serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server; 10b910: 8b 8a 88 00 00 00 mov 0x88(%edx),%ecx <== NOT EXECUTED ) { Priority_Control new_priority; Scheduler_CBS_Per_thread *sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; Scheduler_CBS_Server *serv_info = 10b916: 8b 49 18 mov 0x18(%ecx),%ecx <== NOT EXECUTED (Scheduler_CBS_Server *) sched_info->cbs_server; if (deadline) { 10b919: 85 c0 test %eax,%eax <== NOT EXECUTED 10b91b: 74 22 je 10b93f <_Scheduler_CBS_Release_job+0x3b><== NOT EXECUTED /* Initializing or shifting deadline. */ if (serv_info) 10b91d: 85 c9 test %ecx,%ecx <== NOT EXECUTED 10b91f: 74 0f je 10b930 <_Scheduler_CBS_Release_job+0x2c><== NOT EXECUTED new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline) 10b921: a1 78 1a 13 00 mov 0x131a78,%eax <== NOT EXECUTED 10b926: 03 41 04 add 0x4(%ecx),%eax <== NOT EXECUTED 10b929: 25 ff ff ff 7f and $0x7fffffff,%eax <== NOT EXECUTED 10b92e: eb 19 jmp 10b949 <_Scheduler_CBS_Release_job+0x45><== NOT EXECUTED & ~SCHEDULER_EDF_PRIO_MSB; else new_priority = (_Watchdog_Ticks_since_boot + deadline) 10b930: 8b 0d 78 1a 13 00 mov 0x131a78,%ecx <== NOT EXECUTED 10b936: 01 c8 add %ecx,%eax <== NOT EXECUTED 10b938: 25 ff ff ff 7f and $0x7fffffff,%eax <== NOT EXECUTED 10b93d: eb 10 jmp 10b94f <_Scheduler_CBS_Release_job+0x4b><== NOT EXECUTED & ~SCHEDULER_EDF_PRIO_MSB; } else { /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; 10b93f: 8b 82 ac 00 00 00 mov 0xac(%edx),%eax <== NOT EXECUTED } /* Budget replenishment for the next job. */ if (serv_info) 10b945: 85 c9 test %ecx,%ecx <== NOT EXECUTED 10b947: 74 06 je 10b94f <_Scheduler_CBS_Release_job+0x4b><== NOT EXECUTED the_thread->cpu_time_budget = serv_info->parameters.budget; 10b949: 8b 49 08 mov 0x8(%ecx),%ecx <== NOT EXECUTED 10b94c: 89 4a 74 mov %ecx,0x74(%edx) <== NOT EXECUTED the_thread->real_priority = new_priority; 10b94f: 89 42 18 mov %eax,0x18(%edx) <== NOT EXECUTED _Thread_Change_priority(the_thread, new_priority, true); 10b952: 51 push %ecx <== NOT EXECUTED 10b953: 6a 01 push $0x1 <== NOT EXECUTED 10b955: 50 push %eax <== NOT EXECUTED 10b956: 52 push %edx <== NOT EXECUTED 10b957: e8 e0 03 00 00 call 10bd3c <_Thread_Change_priority><== NOT EXECUTED 10b95c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10b95f: c9 leave <== NOT EXECUTED 10b960: c3 ret <== NOT EXECUTED =============================================================================== 0010b964 <_Scheduler_CBS_Unblock>: #include void _Scheduler_CBS_Unblock( Thread_Control *the_thread ) { 10b964: 55 push %ebp 10b965: 89 e5 mov %esp,%ebp 10b967: 56 push %esi 10b968: 53 push %ebx 10b969: 8b 5d 08 mov 0x8(%ebp),%ebx Scheduler_CBS_Per_thread *sched_info; Scheduler_CBS_Server *serv_info; Priority_Control new_priority; _Scheduler_EDF_Enqueue(the_thread); 10b96c: 83 ec 0c sub $0xc,%esp 10b96f: 53 push %ebx 10b970: e8 fb 00 00 00 call 10ba70 <_Scheduler_EDF_Enqueue> /* TODO: flash critical section? */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server; 10b975: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax 10b97b: 8b 40 18 mov 0x18(%eax),%eax * Late unblock rule for deadline-driven tasks. The remaining time to * deadline must be sufficient to serve the remaining computation time * without increased utilization of this task. It might cause a deadline * miss of another task. */ if (serv_info) { 10b97e: 83 c4 10 add $0x10,%esp 10b981: 85 c0 test %eax,%eax 10b983: 74 3d je 10b9c2 <_Scheduler_CBS_Unblock+0x5e><== ALWAYS TAKEN time_t deadline = serv_info->parameters.deadline; time_t budget = serv_info->parameters.budget; time_t deadline_left = the_thread->cpu_time_budget; time_t budget_left = the_thread->real_priority - 10b985: 8b 4b 18 mov 0x18(%ebx),%ecx <== NOT EXECUTED 10b988: 8b 15 78 1a 13 00 mov 0x131a78,%edx <== NOT EXECUTED 10b98e: 89 ce mov %ecx,%esi <== NOT EXECUTED 10b990: 29 d6 sub %edx,%esi <== NOT EXECUTED _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { 10b992: 8b 50 04 mov 0x4(%eax),%edx <== NOT EXECUTED 10b995: 0f af d6 imul %esi,%edx <== NOT EXECUTED 10b998: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED 10b99b: 0f af 43 74 imul 0x74(%ebx),%eax <== NOT EXECUTED 10b99f: 39 c2 cmp %eax,%edx <== NOT EXECUTED 10b9a1: 7e 1f jle 10b9c2 <_Scheduler_CBS_Unblock+0x5e><== NOT EXECUTED /* Put late unblocked task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; 10b9a3: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax <== NOT EXECUTED if ( the_thread->real_priority != new_priority ) 10b9a9: 39 c1 cmp %eax,%ecx <== NOT EXECUTED 10b9ab: 74 03 je 10b9b0 <_Scheduler_CBS_Unblock+0x4c><== NOT EXECUTED the_thread->real_priority = new_priority; 10b9ad: 89 43 18 mov %eax,0x18(%ebx) <== NOT EXECUTED if ( the_thread->current_priority != new_priority ) 10b9b0: 39 43 14 cmp %eax,0x14(%ebx) <== NOT EXECUTED 10b9b3: 74 0d je 10b9c2 <_Scheduler_CBS_Unblock+0x5e><== NOT EXECUTED _Thread_Change_priority(the_thread, new_priority, true); 10b9b5: 52 push %edx <== NOT EXECUTED 10b9b6: 6a 01 push $0x1 <== NOT EXECUTED 10b9b8: 50 push %eax <== NOT EXECUTED 10b9b9: 53 push %ebx <== NOT EXECUTED 10b9ba: e8 7d 03 00 00 call 10bd3c <_Thread_Change_priority><== NOT EXECUTED 10b9bf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b9c2: 50 push %eax 10b9c3: 50 push %eax * 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 ( _Scheduler_Is_priority_higher_than( the_thread->current_priority, 10b9c4: a1 84 1b 13 00 mov 0x131b84,%eax 10b9c9: ff 70 14 pushl 0x14(%eax) 10b9cc: ff 73 14 pushl 0x14(%ebx) 10b9cf: ff 15 b4 d8 12 00 call *0x12d8b4 10b9d5: 83 c4 10 add $0x10,%esp 10b9d8: 85 c0 test %eax,%eax 10b9da: 7e 1e jle 10b9fa <_Scheduler_CBS_Unblock+0x96> _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; 10b9dc: 89 1d 84 1b 13 00 mov %ebx,0x131b84 if ( _Thread_Executing->is_preemptible || 10b9e2: a1 80 1b 13 00 mov 0x131b80,%eax 10b9e7: 80 78 70 00 cmpb $0x0,0x70(%eax) 10b9eb: 75 06 jne 10b9f3 <_Scheduler_CBS_Unblock+0x8f> 10b9ed: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10b9f1: 75 07 jne 10b9fa <_Scheduler_CBS_Unblock+0x96><== ALWAYS TAKEN the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 10b9f3: c6 05 8c 1b 13 00 01 movb $0x1,0x131b8c } } 10b9fa: 8d 65 f8 lea -0x8(%ebp),%esp 10b9fd: 5b pop %ebx 10b9fe: 5e pop %esi 10b9ff: 5d pop %ebp 10ba00: c3 ret =============================================================================== 0010ba04 <_Scheduler_EDF_Allocate>: #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { 10ba04: 55 push %ebp 10ba05: 89 e5 mov %esp,%ebp 10ba07: 53 push %ebx 10ba08: 83 ec 10 sub $0x10,%esp 10ba0b: 8b 5d 08 mov 0x8(%ebp),%ebx void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); 10ba0e: 6a 18 push $0x18 10ba10: e8 a5 14 00 00 call 10ceba <_Workspace_Allocate> if ( sched ) { 10ba15: 83 c4 10 add $0x10,%esp 10ba18: 85 c0 test %eax,%eax 10ba1a: 74 0f je 10ba2b <_Scheduler_EDF_Allocate+0x27><== NEVER TAKEN the_thread->scheduler_info = sched; 10ba1c: 89 83 88 00 00 00 mov %eax,0x88(%ebx) schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; 10ba22: 89 18 mov %ebx,(%eax) schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 10ba24: c7 40 14 02 00 00 00 movl $0x2,0x14(%eax) } return sched; } 10ba2b: 8b 5d fc mov -0x4(%ebp),%ebx 10ba2e: c9 leave 10ba2f: c3 ret =============================================================================== 0010ba30 <_Scheduler_EDF_Block>: #include void _Scheduler_EDF_Block( Thread_Control *the_thread ) { 10ba30: 55 push %ebp 10ba31: 89 e5 mov %esp,%ebp 10ba33: 53 push %ebx 10ba34: 83 ec 10 sub $0x10,%esp 10ba37: 8b 5d 08 mov 0x8(%ebp),%ebx _Scheduler_EDF_Extract( the_thread ); 10ba3a: 53 push %ebx 10ba3b: e8 60 00 00 00 call 10baa0 <_Scheduler_EDF_Extract> /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) 10ba40: 83 c4 10 add $0x10,%esp 10ba43: 3b 1d 84 1b 13 00 cmp 0x131b84,%ebx 10ba49: 75 05 jne 10ba50 <_Scheduler_EDF_Block+0x20><== NEVER TAKEN _Scheduler_EDF_Schedule(); 10ba4b: e8 3c 01 00 00 call 10bb8c <_Scheduler_EDF_Schedule> if ( _Thread_Is_executing( the_thread ) ) 10ba50: 3b 1d 80 1b 13 00 cmp 0x131b80,%ebx 10ba56: 75 07 jne 10ba5f <_Scheduler_EDF_Block+0x2f><== NEVER TAKEN _Thread_Dispatch_necessary = true; 10ba58: c6 05 8c 1b 13 00 01 movb $0x1,0x131b8c } 10ba5f: 8b 5d fc mov -0x4(%ebp),%ebx 10ba62: c9 leave 10ba63: c3 ret =============================================================================== 0010ba64 <_Scheduler_EDF_Enqueue_first>: #include void _Scheduler_EDF_Enqueue_first( Thread_Control *the_thread ) { 10ba64: 55 push %ebp <== NOT EXECUTED 10ba65: 89 e5 mov %esp,%ebp <== NOT EXECUTED _Scheduler_EDF_Enqueue(the_thread); } 10ba67: 5d pop %ebp <== NOT EXECUTED void _Scheduler_EDF_Enqueue_first( Thread_Control *the_thread ) { _Scheduler_EDF_Enqueue(the_thread); 10ba68: e9 03 00 00 00 jmp 10ba70 <_Scheduler_EDF_Enqueue><== NOT EXECUTED =============================================================================== 0010ba8c <_Scheduler_EDF_Release_job>: void _Scheduler_EDF_Release_job( Thread_Control *the_thread, uint32_t deadline ) { 10ba8c: 55 push %ebp <== NOT EXECUTED 10ba8d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10ba8f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10ba92: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10ba95: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED Priority_Control new_priority; if (deadline) { 10ba98: 85 c0 test %eax,%eax <== NOT EXECUTED 10ba9a: 74 0f je 10baab <_Scheduler_EDF_Release_job+0x1f><== NOT EXECUTED /* Initializing or shifting deadline. */ new_priority = (_Watchdog_Ticks_since_boot + deadline) 10ba9c: 8b 0d d8 19 13 00 mov 0x1319d8,%ecx <== NOT EXECUTED 10baa2: 01 c8 add %ecx,%eax <== NOT EXECUTED 10baa4: 25 ff ff ff 7f and $0x7fffffff,%eax <== NOT EXECUTED 10baa9: eb 06 jmp 10bab1 <_Scheduler_EDF_Release_job+0x25><== NOT EXECUTED & ~SCHEDULER_EDF_PRIO_MSB; } else { /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; 10baab: 8b 82 ac 00 00 00 mov 0xac(%edx),%eax <== NOT EXECUTED } the_thread->real_priority = new_priority; 10bab1: 89 42 18 mov %eax,0x18(%edx) <== NOT EXECUTED _Thread_Change_priority(the_thread, new_priority, true); 10bab4: 51 push %ecx <== NOT EXECUTED 10bab5: 6a 01 push $0x1 <== NOT EXECUTED 10bab7: 50 push %eax <== NOT EXECUTED 10bab8: 52 push %edx <== NOT EXECUTED 10bab9: e8 06 02 00 00 call 10bcc4 <_Thread_Change_priority><== NOT EXECUTED 10babe: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10bac1: c9 leave <== NOT EXECUTED 10bac2: c3 ret <== NOT EXECUTED =============================================================================== 0010bae4 <_Scheduler_EDF_Unblock>: #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { 10bae4: 55 push %ebp 10bae5: 89 e5 mov %esp,%ebp 10bae7: 53 push %ebx 10bae8: 83 ec 10 sub $0x10,%esp 10baeb: 8b 5d 08 mov 0x8(%ebp),%ebx _Scheduler_EDF_Enqueue(the_thread); 10baee: 53 push %ebx 10baef: e8 7c fe ff ff call 10b970 <_Scheduler_EDF_Enqueue> 10baf4: 58 pop %eax 10baf5: 5a pop %edx 10baf6: ff 73 14 pushl 0x14(%ebx) * 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 ( _Scheduler_Is_priority_lower_than( 10baf9: a1 e4 1a 13 00 mov 0x131ae4,%eax 10bafe: ff 70 14 pushl 0x14(%eax) 10bb01: ff 15 14 d8 12 00 call *0x12d814 10bb07: 83 c4 10 add $0x10,%esp 10bb0a: 85 c0 test %eax,%eax 10bb0c: 79 1e jns 10bb2c <_Scheduler_EDF_Unblock+0x48> _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; 10bb0e: 89 1d e4 1a 13 00 mov %ebx,0x131ae4 if ( _Thread_Executing->is_preemptible || 10bb14: a1 e0 1a 13 00 mov 0x131ae0,%eax 10bb19: 80 78 70 00 cmpb $0x0,0x70(%eax) 10bb1d: 75 06 jne 10bb25 <_Scheduler_EDF_Unblock+0x41> 10bb1f: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10bb23: 75 07 jne 10bb2c <_Scheduler_EDF_Unblock+0x48><== ALWAYS TAKEN the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 10bb25: c6 05 ec 1a 13 00 01 movb $0x1,0x131aec } } 10bb2c: 8b 5d fc mov -0x4(%ebp),%ebx 10bb2f: c9 leave 10bb30: c3 ret =============================================================================== 0010bbac <_Scheduler_EDF_Update>: #include void _Scheduler_EDF_Update( Thread_Control *the_thread ) { 10bbac: 55 push %ebp 10bbad: 89 e5 mov %esp,%ebp 10bbaf: 8b 45 08 mov 0x8(%ebp),%eax Scheduler_EDF_Per_thread *sched_info = 10bbb2: 8b 88 88 00 00 00 mov 0x88(%eax),%ecx (Scheduler_EDF_Per_thread*)the_thread->scheduler_info; if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) { 10bbb8: 83 79 14 02 cmpl $0x2,0x14(%ecx) 10bbbc: 75 1f jne 10bbdd <_Scheduler_EDF_Update+0x31><== NEVER TAKEN /* Shifts the priority to the region of background tasks. */ the_thread->Start.initial_priority |= (SCHEDULER_EDF_PRIO_MSB); 10bbbe: 8b 90 ac 00 00 00 mov 0xac(%eax),%edx 10bbc4: 81 ca 00 00 00 80 or $0x80000000,%edx 10bbca: 89 90 ac 00 00 00 mov %edx,0xac(%eax) the_thread->real_priority = the_thread->Start.initial_priority; 10bbd0: 89 50 18 mov %edx,0x18(%eax) the_thread->current_priority = the_thread->Start.initial_priority; 10bbd3: 89 50 14 mov %edx,0x14(%eax) sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY; 10bbd6: c7 41 14 00 00 00 00 movl $0x0,0x14(%ecx) } } 10bbdd: 5d pop %ebp 10bbde: c3 ret =============================================================================== 0010b49c <_Scheduler_priority_Tick>: #include #include void _Scheduler_priority_Tick( void ) { 10b49c: 55 push %ebp 10b49d: 89 e5 mov %esp,%ebp 10b49f: 53 push %ebx 10b4a0: 50 push %eax Thread_Control *executing; executing = _Thread_Executing; 10b4a1: 8b 1d b8 f4 12 00 mov 0x12f4b8,%ebx /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 10b4a7: 80 7b 70 00 cmpb $0x0,0x70(%ebx) 10b4ab: 74 45 je 10b4f2 <_Scheduler_priority_Tick+0x56> return; if ( !_States_Is_ready( executing->current_state ) ) 10b4ad: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10b4b1: 75 3f jne 10b4f2 <_Scheduler_priority_Tick+0x56> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 10b4b3: 8b 43 78 mov 0x78(%ebx),%eax 10b4b6: 83 f8 01 cmp $0x1,%eax 10b4b9: 74 07 je 10b4c2 <_Scheduler_priority_Tick+0x26> 10b4bb: 83 f8 02 cmp $0x2,%eax 10b4be: 75 32 jne 10b4f2 <_Scheduler_priority_Tick+0x56><== ALWAYS TAKEN 10b4c0: eb 1b jmp 10b4dd <_Scheduler_priority_Tick+0x41><== NOT EXECUTED case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: #endif if ( (int)(--executing->cpu_time_budget) <= 0 ) { 10b4c2: 8b 43 74 mov 0x74(%ebx),%eax 10b4c5: 48 dec %eax 10b4c6: 89 43 74 mov %eax,0x74(%ebx) 10b4c9: 85 c0 test %eax,%eax 10b4cb: 7f 25 jg 10b4f2 <_Scheduler_priority_Tick+0x56> * always operates on the scheduler that 'owns' the currently executing * thread. */ RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void ) { _Scheduler.Operations.yield(); 10b4cd: ff 15 30 b2 12 00 call *0x12b230 * executing thread's timeslice is reset. Otherwise, the * currently executing thread is placed at the rear of the * FIFO for this priority and a new heir is selected. */ _Scheduler_Yield(); executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10b4d3: a1 78 f2 12 00 mov 0x12f278,%eax 10b4d8: 89 43 74 mov %eax,0x74(%ebx) 10b4db: eb 15 jmp 10b4f2 <_Scheduler_priority_Tick+0x56> } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 10b4dd: 8b 43 74 mov 0x74(%ebx),%eax <== NOT EXECUTED 10b4e0: 48 dec %eax <== NOT EXECUTED 10b4e1: 89 43 74 mov %eax,0x74(%ebx) <== NOT EXECUTED 10b4e4: 85 c0 test %eax,%eax <== NOT EXECUTED 10b4e6: 75 0a jne 10b4f2 <_Scheduler_priority_Tick+0x56><== NOT EXECUTED (*executing->budget_callout)( executing ); 10b4e8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b4eb: 53 push %ebx <== NOT EXECUTED 10b4ec: ff 53 7c call *0x7c(%ebx) <== NOT EXECUTED 10b4ef: 83 c4 10 add $0x10,%esp <== NOT EXECUTED break; #endif } } 10b4f2: 8b 5d fc mov -0x4(%ebp),%ebx 10b4f5: c9 leave 10b4f6: c3 ret =============================================================================== 0010a6cc <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 10a6cc: 55 push %ebp 10a6cd: 89 e5 mov %esp,%ebp 10a6cf: 56 push %esi 10a6d0: 53 push %ebx 10a6d1: 83 ec 10 sub $0x10,%esp Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 10a6d4: 69 05 48 b1 12 00 e8 imul $0x3e8,0x12b148,%eax 10a6db: 03 00 00 10a6de: 31 d2 xor %edx,%edx /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 10a6e0: 8b 0d b0 f3 12 00 mov 0x12f3b0,%ecx 10a6e6: 41 inc %ecx 10a6e7: 89 0d b0 f3 12 00 mov %ecx,0x12f3b0 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 10a6ed: 01 05 20 f3 12 00 add %eax,0x12f320 10a6f3: 11 15 24 f3 12 00 adc %edx,0x12f324 static inline uint32_t _Timestamp64_Add_to_at_tick( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; 10a6f9: 8b 0d 30 f3 12 00 mov 0x12f330,%ecx 10a6ff: 8b 1d 34 f3 12 00 mov 0x12f334,%ebx 10a705: 89 4d f0 mov %ecx,-0x10(%ebp) 10a708: 89 5d f4 mov %ebx,-0xc(%ebp) *_time += *_add; 10a70b: 01 c8 add %ecx,%eax 10a70d: 11 da adc %ebx,%edx 10a70f: a3 30 f3 12 00 mov %eax,0x12f330 10a714: 89 15 34 f3 12 00 mov %edx,0x12f334 if ( ((*_time) / 1000000000L) != _start ) { 10a71a: 6a 00 push $0x0 10a71c: 68 00 ca 9a 3b push $0x3b9aca00 10a721: 52 push %edx 10a722: 50 push %eax 10a723: e8 1c 23 01 00 call 11ca44 <__divdi3> 10a728: 83 c4 10 add $0x10,%esp 10a72b: 89 c6 mov %eax,%esi 10a72d: 89 d3 mov %edx,%ebx static inline uint32_t _Timestamp64_Add_to_at_tick( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; 10a72f: 6a 00 push $0x0 10a731: 68 00 ca 9a 3b push $0x3b9aca00 10a736: ff 75 f4 pushl -0xc(%ebp) 10a739: ff 75 f0 pushl -0x10(%ebp) 10a73c: e8 03 23 01 00 call 11ca44 <__divdi3> 10a741: 83 c4 10 add $0x10,%esp _Timestamp_Add_to( &_TOD_Uptime, &tick ); /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); while ( seconds ) { 10a744: 39 d3 cmp %edx,%ebx 10a746: 75 04 jne 10a74c <_TOD_Tickle_ticks+0x80><== NEVER TAKEN 10a748: 39 c6 cmp %eax,%esi 10a74a: 74 10 je 10a75c <_TOD_Tickle_ticks+0x90> */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 10a74c: 83 ec 0c sub $0xc,%esp 10a74f: 68 54 f3 12 00 push $0x12f354 10a754: e8 6b 1f 00 00 call 10c6c4 <_Watchdog_Tickle> 10a759: 83 c4 10 add $0x10,%esp _Watchdog_Tickle_seconds(); seconds--; } } 10a75c: 8d 65 f8 lea -0x8(%ebp),%esp 10a75f: 5b pop %ebx 10a760: 5e pop %esi 10a761: 5d pop %ebp 10a762: c3 ret =============================================================================== 0010a35c <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10a35c: 55 push %ebp 10a35d: 89 e5 mov %esp,%ebp 10a35f: 56 push %esi 10a360: 53 push %ebx 10a361: 8b 4d 08 mov 0x8(%ebp),%ecx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 10a364: 8b 35 28 e4 12 00 mov 0x12e428,%esi (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; 10a36a: 31 db xor %ebx,%ebx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10a36c: 85 c9 test %ecx,%ecx 10a36e: 74 57 je 10a3c7 <_TOD_Validate+0x6b> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 10a370: b8 40 42 0f 00 mov $0xf4240,%eax 10a375: 31 d2 xor %edx,%edx 10a377: f7 f6 div %esi rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10a379: 39 41 18 cmp %eax,0x18(%ecx) 10a37c: 73 49 jae 10a3c7 <_TOD_Validate+0x6b> (the_tod->ticks >= ticks_per_second) || 10a37e: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10a382: 77 43 ja 10a3c7 <_TOD_Validate+0x6b> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10a384: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10a388: 77 3d ja 10a3c7 <_TOD_Validate+0x6b> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10a38a: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10a38e: 77 37 ja 10a3c7 <_TOD_Validate+0x6b> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 10a390: 8b 41 04 mov 0x4(%ecx),%eax rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || 10a393: 85 c0 test %eax,%eax 10a395: 74 30 je 10a3c7 <_TOD_Validate+0x6b> <== NEVER TAKEN (the_tod->month == 0) || 10a397: 83 f8 0c cmp $0xc,%eax 10a39a: 77 2b ja 10a3c7 <_TOD_Validate+0x6b> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10a39c: 8b 31 mov (%ecx),%esi (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || 10a39e: 81 fe c3 07 00 00 cmp $0x7c3,%esi 10a3a4: 76 21 jbe 10a3c7 <_TOD_Validate+0x6b> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10a3a6: 8b 51 08 mov 0x8(%ecx),%edx (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10a3a9: 85 d2 test %edx,%edx 10a3ab: 74 1a je 10a3c7 <_TOD_Validate+0x6b> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10a3ad: 83 e6 03 and $0x3,%esi 10a3b0: 75 09 jne 10a3bb <_TOD_Validate+0x5f> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10a3b2: 8b 04 85 4c 10 12 00 mov 0x12104c(,%eax,4),%eax 10a3b9: eb 07 jmp 10a3c2 <_TOD_Validate+0x66> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 10a3bb: 8b 04 85 18 10 12 00 mov 0x121018(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10a3c2: 39 c2 cmp %eax,%edx 10a3c4: 0f 96 c3 setbe %bl if ( the_tod->day > days_in_month ) return false; return true; } 10a3c7: 88 d8 mov %bl,%al 10a3c9: 5b pop %ebx 10a3ca: 5e pop %esi 10a3cb: 5d pop %ebp 10a3cc: c3 ret =============================================================================== 0010b660 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10b660: 55 push %ebp 10b661: 89 e5 mov %esp,%ebp 10b663: 57 push %edi 10b664: 56 push %esi 10b665: 53 push %ebx 10b666: 83 ec 28 sub $0x28,%esp 10b669: 8b 5d 08 mov 0x8(%ebp),%ebx 10b66c: 8b 75 0c mov 0xc(%ebp),%esi 10b66f: 8a 45 10 mov 0x10(%ebp),%al 10b672: 88 45 e7 mov %al,-0x19(%ebp) States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 10b675: 8b 7b 10 mov 0x10(%ebx),%edi /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 10b678: 53 push %ebx 10b679: e8 36 0b 00 00 call 10c1b4 <_Thread_Set_transient> /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 10b67e: 83 c4 10 add $0x10,%esp 10b681: 39 73 14 cmp %esi,0x14(%ebx) 10b684: 74 0c je 10b692 <_Thread_Change_priority+0x32> _Thread_Set_priority( the_thread, new_priority ); 10b686: 50 push %eax 10b687: 50 push %eax 10b688: 56 push %esi 10b689: 53 push %ebx 10b68a: e8 d9 0a 00 00 call 10c168 <_Thread_Set_priority> 10b68f: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10b692: 9c pushf 10b693: fa cli 10b694: 5e pop %esi /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 10b695: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10b698: 83 f8 04 cmp $0x4,%eax 10b69b: 74 2b je 10b6c8 <_Thread_Change_priority+0x68> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10b69d: 83 e7 04 and $0x4,%edi 10b6a0: 75 08 jne 10b6aa <_Thread_Change_priority+0x4a><== NEVER TAKEN RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10b6a2: 89 c2 mov %eax,%edx 10b6a4: 83 e2 fb and $0xfffffffb,%edx 10b6a7: 89 53 10 mov %edx,0x10(%ebx) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10b6aa: 56 push %esi 10b6ab: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10b6ac: a9 e0 be 03 00 test $0x3bee0,%eax 10b6b1: 74 65 je 10b718 <_Thread_Change_priority+0xb8> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 10b6b3: 89 5d 0c mov %ebx,0xc(%ebp) 10b6b6: 8b 43 44 mov 0x44(%ebx),%eax 10b6b9: 89 45 08 mov %eax,0x8(%ebp) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 10b6bc: 8d 65 f4 lea -0xc(%ebp),%esp 10b6bf: 5b pop %ebx 10b6c0: 5e pop %esi 10b6c1: 5f pop %edi 10b6c2: 5d pop %ebp /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 10b6c3: e9 10 0a 00 00 jmp 10c0d8 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10b6c8: 83 e7 04 and $0x4,%edi 10b6cb: 75 26 jne 10b6f3 <_Thread_Change_priority+0x93><== NEVER TAKEN * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10b6cd: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) if ( prepend_it ) 10b6d4: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10b6d8: 74 0c je 10b6e6 <_Thread_Change_priority+0x86> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 10b6da: 83 ec 0c sub $0xc,%esp 10b6dd: 53 push %ebx 10b6de: ff 15 4c b2 12 00 call *0x12b24c 10b6e4: eb 0a jmp 10b6f0 <_Thread_Change_priority+0x90> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 10b6e6: 83 ec 0c sub $0xc,%esp 10b6e9: 53 push %ebx 10b6ea: ff 15 48 b2 12 00 call *0x12b248 10b6f0: 83 c4 10 add $0x10,%esp _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 10b6f3: 56 push %esi 10b6f4: 9d popf 10b6f5: fa cli * This kernel routine implements the scheduling decision logic for * the scheduler. It does NOT dispatch. */ RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void ) { _Scheduler.Operations.schedule(); 10b6f6: ff 15 2c b2 12 00 call *0x12b22c * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10b6fc: a1 b8 f4 12 00 mov 0x12f4b8,%eax * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Scheduler_Schedule(); if ( !_Thread_Is_executing_also_the_heir() && 10b701: 3b 05 bc f4 12 00 cmp 0x12f4bc,%eax 10b707: 74 0d je 10b716 <_Thread_Change_priority+0xb6> 10b709: 80 78 70 00 cmpb $0x0,0x70(%eax) 10b70d: 74 07 je 10b716 <_Thread_Change_priority+0xb6> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 10b70f: c6 05 c4 f4 12 00 01 movb $0x1,0x12f4c4 _ISR_Enable( level ); 10b716: 56 push %esi 10b717: 9d popf } 10b718: 8d 65 f4 lea -0xc(%ebp),%esp 10b71b: 5b pop %ebx 10b71c: 5e pop %esi 10b71d: 5f pop %edi 10b71e: 5d pop %ebp 10b71f: c3 ret =============================================================================== 0010b8d4 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10b8d4: 55 push %ebp 10b8d5: 89 e5 mov %esp,%ebp 10b8d7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10b8da: 8d 45 f4 lea -0xc(%ebp),%eax 10b8dd: 50 push %eax 10b8de: ff 75 08 pushl 0x8(%ebp) 10b8e1: e8 8e 01 00 00 call 10ba74 <_Thread_Get> switch ( location ) { 10b8e6: 83 c4 10 add $0x10,%esp 10b8e9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10b8ed: 75 20 jne 10b90f <_Thread_Delay_ended+0x3b><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10b8ef: 52 push %edx 10b8f0: 52 push %edx 10b8f1: 68 18 00 00 10 push $0x10000018 10b8f6: 50 push %eax 10b8f7: e8 24 fe ff ff call 10b720 <_Thread_Clear_state> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 10b8fc: a1 a4 f2 12 00 mov 0x12f2a4,%eax 10b901: 48 dec %eax 10b902: a3 a4 f2 12 00 mov %eax,0x12f2a4 return _Thread_Dispatch_disable_level; 10b907: a1 a4 f2 12 00 mov 0x12f2a4,%eax 10b90c: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10b90f: c9 leave 10b910: c3 ret =============================================================================== 0010b914 <_Thread_Dispatch>: * INTERRUPT LATENCY: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10b914: 55 push %ebp 10b915: 89 e5 mov %esp,%ebp 10b917: 57 push %edi 10b918: 56 push %esi 10b919: 53 push %ebx 10b91a: 83 ec 1c sub $0x1c,%esp * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 10b91d: a1 a4 f2 12 00 mov 0x12f2a4,%eax 10b922: 40 inc %eax 10b923: a3 a4 f2 12 00 mov %eax,0x12f2a4 return _Thread_Dispatch_disable_level; 10b928: a1 a4 f2 12 00 mov 0x12f2a4,%eax #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; 10b92d: 8b 1d b8 f4 12 00 mov 0x12f4b8,%ebx _ISR_Disable( level ); 10b933: 9c pushf 10b934: fa cli 10b935: 58 pop %eax _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10b936: 8d 7d e0 lea -0x20(%ebp),%edi /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 10b939: e9 e7 00 00 00 jmp 10ba25 <_Thread_Dispatch+0x111> heir = _Thread_Heir; 10b93e: 8b 35 bc f4 12 00 mov 0x12f4bc,%esi _Thread_Dispatch_necessary = false; 10b944: c6 05 c4 f4 12 00 00 movb $0x0,0x12f4c4 _Thread_Executing = heir; 10b94b: 89 35 b8 f4 12 00 mov %esi,0x12f4b8 /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) 10b951: 39 de cmp %ebx,%esi 10b953: 0f 84 da 00 00 00 je 10ba33 <_Thread_Dispatch+0x11f> */ #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) 10b959: 83 7e 78 01 cmpl $0x1,0x78(%esi) 10b95d: 75 09 jne 10b968 <_Thread_Dispatch+0x54> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10b95f: 8b 15 78 f2 12 00 mov 0x12f278,%edx 10b965: 89 56 74 mov %edx,0x74(%esi) _ISR_Enable( level ); 10b968: 50 push %eax 10b969: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10b96a: 83 ec 0c sub $0xc,%esp 10b96d: 57 push %edi 10b96e: e8 3d 30 00 00 call 10e9b0 <_TOD_Get_uptime> const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 10b973: 8b 07 mov (%edi),%eax 10b975: 8b 57 04 mov 0x4(%edi),%edx 10b978: 2b 05 c8 f4 12 00 sub 0x12f4c8,%eax 10b97e: 1b 15 cc f4 12 00 sbb 0x12f4cc,%edx static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 10b984: 01 83 80 00 00 00 add %eax,0x80(%ebx) 10b98a: 11 93 84 00 00 00 adc %edx,0x84(%ebx) &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 10b990: 8b 07 mov (%edi),%eax 10b992: 8b 57 04 mov 0x4(%edi),%edx 10b995: a3 c8 f4 12 00 mov %eax,0x12f4c8 10b99a: 89 15 cc f4 12 00 mov %edx,0x12f4cc #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10b9a0: a1 2c f3 12 00 mov 0x12f32c,%eax 10b9a5: 83 c4 10 add $0x10,%esp 10b9a8: 85 c0 test %eax,%eax 10b9aa: 74 10 je 10b9bc <_Thread_Dispatch+0xa8> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10b9ac: 8b 10 mov (%eax),%edx 10b9ae: 89 93 dc 00 00 00 mov %edx,0xdc(%ebx) *_Thread_libc_reent = heir->libc_reent; 10b9b4: 8b 96 dc 00 00 00 mov 0xdc(%esi),%edx 10b9ba: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10b9bc: 50 push %eax 10b9bd: 50 push %eax 10b9be: 56 push %esi 10b9bf: 53 push %ebx 10b9c0: e8 47 0b 00 00 call 10c50c <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10b9c5: 5a pop %edx 10b9c6: 59 pop %ecx 10b9c7: 81 c6 c0 00 00 00 add $0xc0,%esi 10b9cd: 56 push %esi 10b9ce: 8d 83 c0 00 00 00 lea 0xc0(%ebx),%eax 10b9d4: 50 push %eax 10b9d5: e8 06 0e 00 00 call 10c7e0 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10b9da: 83 c4 10 add $0x10,%esp 10b9dd: 83 bb d8 00 00 00 00 cmpl $0x0,0xd8(%ebx) 10b9e4: 74 36 je 10ba1c <_Thread_Dispatch+0x108> #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 ); 10b9e6: a1 28 f3 12 00 mov 0x12f328,%eax 10b9eb: 39 c3 cmp %eax,%ebx 10b9ed: 74 2d je 10ba1c <_Thread_Dispatch+0x108> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10b9ef: 85 c0 test %eax,%eax 10b9f1: 74 11 je 10ba04 <_Thread_Dispatch+0xf0> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10b9f3: 83 ec 0c sub $0xc,%esp 10b9f6: 05 d8 00 00 00 add $0xd8,%eax 10b9fb: 50 push %eax 10b9fc: e8 13 0e 00 00 call 10c814 <_CPU_Context_save_fp> 10ba01: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10ba04: 83 ec 0c sub $0xc,%esp 10ba07: 8d 83 d8 00 00 00 lea 0xd8(%ebx),%eax 10ba0d: 50 push %eax 10ba0e: e8 0b 0e 00 00 call 10c81e <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10ba13: 89 1d 28 f3 12 00 mov %ebx,0x12f328 10ba19: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10ba1c: 8b 1d b8 f4 12 00 mov 0x12f4b8,%ebx _ISR_Disable( level ); 10ba22: 9c pushf 10ba23: fa cli 10ba24: 58 pop %eax /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 10ba25: 8a 15 c4 f4 12 00 mov 0x12f4c4,%dl 10ba2b: 84 d2 test %dl,%dl 10ba2d: 0f 85 0b ff ff ff jne 10b93e <_Thread_Dispatch+0x2a> _ISR_Disable( level ); } post_switch: _ISR_Enable( level ); 10ba33: 50 push %eax 10ba34: 9d popf * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 10ba35: a1 a4 f2 12 00 mov 0x12f2a4,%eax 10ba3a: 48 dec %eax 10ba3b: a3 a4 f2 12 00 mov %eax,0x12f2a4 return _Thread_Dispatch_disable_level; 10ba40: a1 a4 f2 12 00 mov 0x12f2a4,%eax _Thread_Unnest_dispatch(); _API_extensions_Run_postswitch(); 10ba45: e8 a7 e7 ff ff call 10a1f1 <_API_extensions_Run_postswitch> } 10ba4a: 8d 65 f4 lea -0xc(%ebp),%esp 10ba4d: 5b pop %ebx 10ba4e: 5e pop %esi 10ba4f: 5f pop %edi 10ba50: 5d pop %ebp 10ba51: c3 ret =============================================================================== 00110054 <_Thread_Handler>: * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { 110054: 55 push %ebp 110055: 89 e5 mov %esp,%ebp 110057: 53 push %ebx 110058: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; 11005b: 8b 1d b8 f4 12 00 mov 0x12f4b8,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 110061: 8b 83 a8 00 00 00 mov 0xa8(%ebx),%eax _ISR_Set_level(level); 110067: 85 c0 test %eax,%eax 110069: 74 03 je 11006e <_Thread_Handler+0x1a> 11006b: fa cli 11006c: eb 01 jmp 11006f <_Thread_Handler+0x1b> 11006e: fb sti doCons = !doneConstructors && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; 11006f: a0 50 ef 12 00 mov 0x12ef50,%al 110074: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = true; 110077: c6 05 50 ef 12 00 01 movb $0x1,0x12ef50 #endif #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 11007e: 83 bb d8 00 00 00 00 cmpl $0x0,0xd8(%ebx) 110085: 74 24 je 1100ab <_Thread_Handler+0x57> #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 ); 110087: a1 28 f3 12 00 mov 0x12f328,%eax 11008c: 39 c3 cmp %eax,%ebx 11008e: 74 1b je 1100ab <_Thread_Handler+0x57> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 110090: 85 c0 test %eax,%eax 110092: 74 11 je 1100a5 <_Thread_Handler+0x51> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 110094: 83 ec 0c sub $0xc,%esp 110097: 05 d8 00 00 00 add $0xd8,%eax 11009c: 50 push %eax 11009d: e8 72 c7 ff ff call 10c814 <_CPU_Context_save_fp> 1100a2: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 1100a5: 89 1d 28 f3 12 00 mov %ebx,0x12f328 /* * 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 ); 1100ab: 83 ec 0c sub $0xc,%esp 1100ae: 53 push %ebx 1100af: e8 08 c3 ff ff call 10c3bc <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 1100b4: e8 9b b9 ff ff call 10ba54 <_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 (doCons) /* && (volatile void *)_init) */ { 1100b9: 83 c4 10 add $0x10,%esp 1100bc: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 1100c0: 75 05 jne 1100c7 <_Thread_Handler+0x73> INIT_NAME (); 1100c2: e8 c9 d4 00 00 call 11d590 <__start_set_sysctl_set> _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 1100c7: 83 bb 90 00 00 00 00 cmpl $0x0,0x90(%ebx) 1100ce: 75 15 jne 1100e5 <_Thread_Handler+0x91> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 1100d0: 83 ec 0c sub $0xc,%esp 1100d3: ff b3 98 00 00 00 pushl 0x98(%ebx) 1100d9: ff 93 8c 00 00 00 call *0x8c(%ebx) #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 1100df: 89 43 28 mov %eax,0x28(%ebx) 1100e2: 83 c4 10 add $0x10,%esp * 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 ); 1100e5: 83 ec 0c sub $0xc,%esp 1100e8: 53 push %ebx 1100e9: e8 ff c2 ff ff call 10c3ed <_User_extensions_Thread_exitted> _Internal_error_Occurred( 1100ee: 83 c4 0c add $0xc,%esp 1100f1: 6a 05 push $0x5 1100f3: 6a 01 push $0x1 1100f5: 6a 00 push $0x0 1100f7: e8 94 a9 ff ff call 10aa90 <_Internal_error_Occurred> =============================================================================== 0010baec <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10baec: 55 push %ebp 10baed: 89 e5 mov %esp,%ebp 10baef: 57 push %edi 10baf0: 56 push %esi 10baf1: 53 push %ebx 10baf2: 83 ec 24 sub $0x24,%esp 10baf5: 8b 5d 0c mov 0xc(%ebp),%ebx 10baf8: 8b 75 14 mov 0x14(%ebp),%esi 10bafb: 8a 55 18 mov 0x18(%ebp),%dl 10bafe: 8a 45 20 mov 0x20(%ebp),%al 10bb01: 88 45 e7 mov %al,-0x19(%ebp) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 10bb04: c7 83 e0 00 00 00 00 movl $0x0,0xe0(%ebx) 10bb0b: 00 00 00 10bb0e: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) 10bb15: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10bb18: c7 83 dc 00 00 00 00 movl $0x0,0xdc(%ebx) 10bb1f: 00 00 00 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 10bb22: 56 push %esi 10bb23: 53 push %ebx 10bb24: 88 55 e0 mov %dl,-0x20(%ebp) 10bb27: e8 b8 06 00 00 call 10c1e4 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10bb2c: 83 c4 10 add $0x10,%esp 10bb2f: 39 f0 cmp %esi,%eax 10bb31: 8a 55 e0 mov -0x20(%ebp),%dl 10bb34: 0f 82 a3 01 00 00 jb 10bcdd <_Thread_Initialize+0x1f1> 10bb3a: 85 c0 test %eax,%eax 10bb3c: 0f 84 9b 01 00 00 je 10bcdd <_Thread_Initialize+0x1f1><== NEVER TAKEN Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10bb42: 8b 8b bc 00 00 00 mov 0xbc(%ebx),%ecx 10bb48: 89 8b b4 00 00 00 mov %ecx,0xb4(%ebx) the_stack->size = size; 10bb4e: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) extensions_area = NULL; the_thread->libc_reent = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) fp_area = NULL; 10bb54: 31 ff xor %edi,%edi /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 10bb56: 84 d2 test %dl,%dl 10bb58: 74 17 je 10bb71 <_Thread_Initialize+0x85> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10bb5a: 83 ec 0c sub $0xc,%esp 10bb5d: 6a 6c push $0x6c 10bb5f: e8 12 0c 00 00 call 10c776 <_Workspace_Allocate> 10bb64: 89 c7 mov %eax,%edi if ( !fp_area ) 10bb66: 83 c4 10 add $0x10,%esp 10bb69: 85 c0 test %eax,%eax 10bb6b: 0f 84 19 01 00 00 je 10bc8a <_Thread_Initialize+0x19e> goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 10bb71: 89 bb d8 00 00 00 mov %edi,0xd8(%ebx) the_thread->Start.fp_context = fp_area; 10bb77: 89 bb b8 00 00 00 mov %edi,0xb8(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10bb7d: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10bb84: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10bb8b: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10bb92: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10bb99: a1 38 f3 12 00 mov 0x12f338,%eax * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 10bb9e: 31 f6 xor %esi,%esi #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10bba0: 85 c0 test %eax,%eax 10bba2: 74 1d je 10bbc1 <_Thread_Initialize+0xd5> extensions_area = _Workspace_Allocate( 10bba4: 83 ec 0c sub $0xc,%esp 10bba7: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10bbae: 50 push %eax 10bbaf: e8 c2 0b 00 00 call 10c776 <_Workspace_Allocate> 10bbb4: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10bbb6: 83 c4 10 add $0x10,%esp 10bbb9: 85 c0 test %eax,%eax 10bbbb: 0f 84 cb 00 00 00 je 10bc8c <_Thread_Initialize+0x1a0> goto failed; } the_thread->extensions = (void **) extensions_area; 10bbc1: 89 b3 e8 00 00 00 mov %esi,0xe8(%ebx) * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 10bbc7: 85 f6 test %esi,%esi 10bbc9: 74 1c je 10bbe7 <_Thread_Initialize+0xfb> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10bbcb: 8b 0d 38 f3 12 00 mov 0x12f338,%ecx 10bbd1: 31 c0 xor %eax,%eax 10bbd3: eb 0e jmp 10bbe3 <_Thread_Initialize+0xf7> the_thread->extensions[i] = NULL; 10bbd5: 8b 93 e8 00 00 00 mov 0xe8(%ebx),%edx 10bbdb: c7 04 82 00 00 00 00 movl $0x0,(%edx,%eax,4) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10bbe2: 40 inc %eax 10bbe3: 39 c8 cmp %ecx,%eax 10bbe5: 76 ee jbe 10bbd5 <_Thread_Initialize+0xe9> /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10bbe7: 8a 45 e7 mov -0x19(%ebp),%al 10bbea: 88 83 9c 00 00 00 mov %al,0x9c(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10bbf0: 8b 45 24 mov 0x24(%ebp),%eax 10bbf3: 89 83 a0 00 00 00 mov %eax,0xa0(%ebx) the_thread->Start.budget_callout = budget_callout; 10bbf9: 8b 45 28 mov 0x28(%ebp),%eax 10bbfc: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10bc02: 8b 45 2c mov 0x2c(%ebp),%eax 10bc05: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) the_thread->current_state = STATES_DORMANT; 10bc0b: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10bc12: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10bc19: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->real_priority = priority; 10bc20: 8b 45 1c mov 0x1c(%ebp),%eax 10bc23: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10bc26: 89 83 ac 00 00 00 mov %eax,0xac(%ebx) */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); 10bc2c: 83 ec 0c sub $0xc,%esp 10bc2f: 53 push %ebx 10bc30: ff 15 3c b2 12 00 call *0x12b23c 10bc36: 89 c2 mov %eax,%edx sched =_Scheduler_Allocate( the_thread ); if ( !sched ) 10bc38: 83 c4 10 add $0x10,%esp 10bc3b: 85 c0 test %eax,%eax 10bc3d: 74 4f je 10bc8e <_Thread_Initialize+0x1a2> goto failed; _Thread_Set_priority( the_thread, priority ); 10bc3f: 51 push %ecx 10bc40: 51 push %ecx 10bc41: ff 75 1c pushl 0x1c(%ebp) 10bc44: 53 push %ebx 10bc45: 89 45 e0 mov %eax,-0x20(%ebp) 10bc48: e8 1b 05 00 00 call 10c168 <_Thread_Set_priority> static inline void _Timestamp64_implementation_Set_to_zero( Timestamp64_Control *_time ) { *_time = 0; 10bc4d: c7 83 80 00 00 00 00 movl $0x0,0x80(%ebx) 10bc54: 00 00 00 10bc57: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10bc5e: 00 00 00 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10bc61: 0f b7 4b 08 movzwl 0x8(%ebx),%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10bc65: 8b 45 08 mov 0x8(%ebp),%eax 10bc68: 8b 40 1c mov 0x1c(%eax),%eax 10bc6b: 89 1c 88 mov %ebx,(%eax,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10bc6e: 8b 45 30 mov 0x30(%ebp),%eax 10bc71: 89 43 0c mov %eax,0xc(%ebx) * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); 10bc74: 89 1c 24 mov %ebx,(%esp) 10bc77: e8 e0 07 00 00 call 10c45c <_User_extensions_Thread_create> if ( extension_status ) 10bc7c: 83 c4 10 add $0x10,%esp return true; 10bc7f: b1 01 mov $0x1,%cl * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) 10bc81: 84 c0 test %al,%al 10bc83: 8b 55 e0 mov -0x20(%ebp),%edx 10bc86: 74 06 je 10bc8e <_Thread_Initialize+0x1a2> 10bc88: eb 55 jmp 10bcdf <_Thread_Initialize+0x1f3> * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 10bc8a: 31 f6 xor %esi,%esi size_t actual_stack_size = 0; void *stack = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_area; #endif void *sched = NULL; 10bc8c: 31 d2 xor %edx,%edx extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: _Workspace_Free( the_thread->libc_reent ); 10bc8e: 83 ec 0c sub $0xc,%esp 10bc91: ff b3 dc 00 00 00 pushl 0xdc(%ebx) 10bc97: 89 55 e0 mov %edx,-0x20(%ebp) 10bc9a: e8 f0 0a 00 00 call 10c78f <_Workspace_Free> for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 10bc9f: 58 pop %eax 10bca0: ff b3 e0 00 00 00 pushl 0xe0(%ebx) 10bca6: e8 e4 0a 00 00 call 10c78f <_Workspace_Free> 10bcab: 5a pop %edx 10bcac: ff b3 e4 00 00 00 pushl 0xe4(%ebx) 10bcb2: e8 d8 0a 00 00 call 10c78f <_Workspace_Free> _Workspace_Free( extensions_area ); 10bcb7: 89 34 24 mov %esi,(%esp) 10bcba: e8 d0 0a 00 00 call 10c78f <_Workspace_Free> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 10bcbf: 89 3c 24 mov %edi,(%esp) 10bcc2: e8 c8 0a 00 00 call 10c78f <_Workspace_Free> #endif _Workspace_Free( sched ); 10bcc7: 8b 55 e0 mov -0x20(%ebp),%edx 10bcca: 89 14 24 mov %edx,(%esp) 10bccd: e8 bd 0a 00 00 call 10c78f <_Workspace_Free> _Thread_Stack_Free( the_thread ); 10bcd2: 89 1c 24 mov %ebx,(%esp) 10bcd5: e8 5a 05 00 00 call 10c234 <_Thread_Stack_Free> return false; 10bcda: 83 c4 10 add $0x10,%esp * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ 10bcdd: 31 c9 xor %ecx,%ecx _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 10bcdf: 88 c8 mov %cl,%al 10bce1: 8d 65 f4 lea -0xc(%ebp),%esp 10bce4: 5b pop %ebx 10bce5: 5e pop %esi 10bce6: 5f pop %edi 10bce7: 5d pop %ebp 10bce8: c3 ret =============================================================================== 0010c0d8 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10c0d8: 55 push %ebp 10c0d9: 89 e5 mov %esp,%ebp 10c0db: 57 push %edi 10c0dc: 56 push %esi 10c0dd: 53 push %ebx 10c0de: 83 ec 1c sub $0x1c,%esp 10c0e1: 8b 75 08 mov 0x8(%ebp),%esi 10c0e4: 8b 7d 0c mov 0xc(%ebp),%edi /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 10c0e7: 85 f6 test %esi,%esi 10c0e9: 74 36 je 10c121 <_Thread_queue_Requeue+0x49><== NEVER TAKEN /* * 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 ) { 10c0eb: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10c0ef: 75 30 jne 10c121 <_Thread_queue_Requeue+0x49><== NEVER TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10c0f1: 9c pushf 10c0f2: fa cli 10c0f3: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10c0f4: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10c0fb: 74 22 je 10c11f <_Thread_queue_Requeue+0x47><== NEVER TAKEN RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10c0fd: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi) _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 10c104: 50 push %eax 10c105: 6a 01 push $0x1 10c107: 57 push %edi 10c108: 56 push %esi 10c109: e8 16 2d 00 00 call 10ee24 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10c10e: 83 c4 0c add $0xc,%esp 10c111: 8d 45 e4 lea -0x1c(%ebp),%eax 10c114: 50 push %eax 10c115: 57 push %edi 10c116: 56 push %esi 10c117: e8 e0 fd ff ff call 10befc <_Thread_queue_Enqueue_priority> 10c11c: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10c11f: 53 push %ebx 10c120: 9d popf } } 10c121: 8d 65 f4 lea -0xc(%ebp),%esp 10c124: 5b pop %ebx 10c125: 5e pop %esi 10c126: 5f pop %edi 10c127: 5d pop %ebp 10c128: c3 ret =============================================================================== 0010c12c <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10c12c: 55 push %ebp 10c12d: 89 e5 mov %esp,%ebp 10c12f: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c132: 8d 45 f4 lea -0xc(%ebp),%eax 10c135: 50 push %eax 10c136: ff 75 08 pushl 0x8(%ebp) 10c139: e8 36 f9 ff ff call 10ba74 <_Thread_Get> switch ( location ) { 10c13e: 83 c4 10 add $0x10,%esp 10c141: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10c145: 75 1c jne 10c163 <_Thread_queue_Timeout+0x37><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10c147: 83 ec 0c sub $0xc,%esp 10c14a: 50 push %eax 10c14b: e8 80 2d 00 00 call 10eed0 <_Thread_queue_Process_timeout> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 10c150: a1 a4 f2 12 00 mov 0x12f2a4,%eax 10c155: 48 dec %eax 10c156: a3 a4 f2 12 00 mov %eax,0x12f2a4 return _Thread_Dispatch_disable_level; 10c15b: a1 a4 f2 12 00 mov 0x12f2a4,%eax 10c160: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10c163: c9 leave 10c164: c3 ret =============================================================================== 00116265 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 116265: 55 push %ebp 116266: 89 e5 mov %esp,%ebp 116268: 57 push %edi 116269: 56 push %esi 11626a: 53 push %ebx 11626b: 83 ec 3c sub $0x3c,%esp 11626e: 8b 5d 08 mov 0x8(%ebp),%ebx ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 116271: 8d 45 d0 lea -0x30(%ebp),%eax 116274: 8d 55 d4 lea -0x2c(%ebp),%edx 116277: 89 55 d0 mov %edx,-0x30(%ebp) head->previous = NULL; 11627a: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) tail->previous = head; 116281: 89 45 d8 mov %eax,-0x28(%ebp) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 116284: 8d 75 dc lea -0x24(%ebp),%esi 116287: 8d 55 e0 lea -0x20(%ebp),%edx 11628a: 89 55 dc mov %edx,-0x24(%ebp) head->previous = NULL; 11628d: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) tail->previous = head; 116294: 89 75 e4 mov %esi,-0x1c(%ebp) { /* * 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; 116297: 8d 45 d0 lea -0x30(%ebp),%eax 11629a: 89 43 78 mov %eax,0x78(%ebx) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 11629d: 8d 7b 30 lea 0x30(%ebx),%edi static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 1162a0: a1 60 d7 14 00 mov 0x14d760,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 1162a5: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 1162a8: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1162ab: 51 push %ecx 1162ac: 56 push %esi Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 1162ad: 29 d0 sub %edx,%eax watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1162af: 50 push %eax 1162b0: 57 push %edi 1162b1: e8 da 37 00 00 call 119a90 <_Watchdog_Adjust_to_chain> 1162b6: 6a 00 push $0x0 1162b8: 68 00 ca 9a 3b push $0x3b9aca00 1162bd: ff 35 e4 d6 14 00 pushl 0x14d6e4 1162c3: ff 35 e0 d6 14 00 pushl 0x14d6e0 1162c9: e8 22 3c 01 00 call 129ef0 <__divdi3> Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 1162ce: 8b 53 74 mov 0x74(%ebx),%edx /* * 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 ) { 1162d1: 83 c4 20 add $0x20,%esp 1162d4: 39 d0 cmp %edx,%eax 1162d6: 76 15 jbe 1162ed <_Timer_server_Body+0x88> /* * 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 ); 1162d8: 51 push %ecx 1162d9: 56 push %esi if ( snapshot > last_snapshot ) { /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; 1162da: 89 c1 mov %eax,%ecx 1162dc: 29 d1 sub %edx,%ecx _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1162de: 51 push %ecx 1162df: 8d 53 68 lea 0x68(%ebx),%edx 1162e2: 52 push %edx 1162e3: 89 45 c0 mov %eax,-0x40(%ebp) 1162e6: e8 a5 37 00 00 call 119a90 <_Watchdog_Adjust_to_chain> 1162eb: eb 14 jmp 116301 <_Timer_server_Body+0x9c> } else if ( snapshot < last_snapshot ) { 1162ed: 73 18 jae 116307 <_Timer_server_Body+0xa2> /* * 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 ); 1162ef: 51 push %ecx } else if ( snapshot < last_snapshot ) { /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; 1162f0: 29 c2 sub %eax,%edx _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 1162f2: 52 push %edx 1162f3: 6a 01 push $0x1 1162f5: 8d 53 68 lea 0x68(%ebx),%edx 1162f8: 52 push %edx 1162f9: 89 45 c0 mov %eax,-0x40(%ebp) 1162fc: e8 27 37 00 00 call 119a28 <_Watchdog_Adjust> 116301: 83 c4 10 add $0x10,%esp 116304: 8b 45 c0 mov -0x40(%ebp),%eax } watchdogs->last_snapshot = snapshot; 116307: 89 43 74 mov %eax,0x74(%ebx) ) { 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 ); 11630a: 8d 4b 68 lea 0x68(%ebx),%ecx 11630d: 89 4d c4 mov %ecx,-0x3c(%ebp) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 116310: 8b 43 78 mov 0x78(%ebx),%eax 116313: 83 ec 0c sub $0xc,%esp 116316: 50 push %eax 116317: e8 c4 08 00 00 call 116be0 <_Chain_Get> if ( timer == NULL ) { 11631c: 83 c4 10 add $0x10,%esp 11631f: 85 c0 test %eax,%eax 116321: 74 29 je 11634c <_Timer_server_Body+0xe7><== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 116323: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 116326: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 116329: 75 09 jne 116334 <_Timer_server_Body+0xcf><== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 11632b: 52 push %edx <== NOT EXECUTED 11632c: 52 push %edx <== NOT EXECUTED 11632d: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 116330: 50 push %eax <== NOT EXECUTED 116331: 57 push %edi <== NOT EXECUTED 116332: eb 0e jmp 116342 <_Timer_server_Body+0xdd><== NOT EXECUTED } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 116334: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 116337: 75 d7 jne 116310 <_Timer_server_Body+0xab><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 116339: 51 push %ecx <== NOT EXECUTED 11633a: 51 push %ecx <== NOT EXECUTED 11633b: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 11633e: 50 push %eax <== NOT EXECUTED 11633f: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 116342: e8 d1 37 00 00 call 119b18 <_Watchdog_Insert> <== NOT EXECUTED 116347: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11634a: eb c4 jmp 116310 <_Timer_server_Body+0xab><== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 11634c: 9c pushf 11634d: fa cli 11634e: 58 pop %eax RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 11634f: 8d 55 d4 lea -0x2c(%ebp),%edx if ( _Chain_Is_empty( insert_chain ) ) { 116352: 39 55 d0 cmp %edx,-0x30(%ebp) 116355: 75 13 jne 11636a <_Timer_server_Body+0x105><== NEVER TAKEN ts->insert_chain = NULL; 116357: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 11635e: 50 push %eax 11635f: 9d popf 116360: 8d 7d e0 lea -0x20(%ebp),%edi _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 ) ) { 116363: 39 7d dc cmp %edi,-0x24(%ebp) 116366: 75 09 jne 116371 <_Timer_server_Body+0x10c> 116368: eb 39 jmp 1163a3 <_Timer_server_Body+0x13e> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 11636a: 50 push %eax <== NOT EXECUTED 11636b: 9d popf <== NOT EXECUTED 11636c: e9 2f ff ff ff jmp 1162a0 <_Timer_server_Body+0x3b><== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 116371: 9c pushf 116372: fa cli 116373: 5a pop %edx */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 116374: 8b 45 dc mov -0x24(%ebp),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 116377: 39 f8 cmp %edi,%eax 116379: 74 21 je 11639c <_Timer_server_Body+0x137> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 11637b: 8b 08 mov (%eax),%ecx head->next = new_first; 11637d: 89 4d dc mov %ecx,-0x24(%ebp) new_first->previous = head; 116380: 89 71 04 mov %esi,0x4(%ecx) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 116383: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 11638a: 52 push %edx 11638b: 9d popf /* * 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 ); 11638c: 52 push %edx 11638d: 52 push %edx 11638e: ff 70 24 pushl 0x24(%eax) 116391: ff 70 20 pushl 0x20(%eax) 116394: ff 50 1c call *0x1c(%eax) } 116397: 83 c4 10 add $0x10,%esp 11639a: eb d5 jmp 116371 <_Timer_server_Body+0x10c> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 11639c: 52 push %edx 11639d: 9d popf 11639e: e9 f4 fe ff ff jmp 116297 <_Timer_server_Body+0x32> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 1163a3: c6 43 7c 00 movb $0x0,0x7c(%ebx) /* * Block until there is something to do. */ _Thread_Disable_dispatch(); 1163a7: e8 18 fe ff ff call 1161c4 <_Thread_Disable_dispatch> _Thread_Set_state( ts->thread, STATES_DELAYING ); 1163ac: 51 push %ecx 1163ad: 51 push %ecx 1163ae: 6a 08 push $0x8 1163b0: ff 33 pushl (%ebx) 1163b2: e8 75 32 00 00 call 11962c <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 1163b7: 89 d8 mov %ebx,%eax 1163b9: e8 1b fe ff ff call 1161d9 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 1163be: 89 d8 mov %ebx,%eax 1163c0: e8 5a fe ff ff call 11621f <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 1163c5: e8 ba 2a 00 00 call 118e84 <_Thread_Enable_dispatch> ts->active = true; 1163ca: c6 43 7c 01 movb $0x1,0x7c(%ebx) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 1163ce: 8d 43 08 lea 0x8(%ebx),%eax 1163d1: 89 04 24 mov %eax,(%esp) 1163d4: e8 5b 38 00 00 call 119c34 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 1163d9: 8d 43 40 lea 0x40(%ebx),%eax 1163dc: 89 04 24 mov %eax,(%esp) 1163df: e8 50 38 00 00 call 119c34 <_Watchdog_Remove> 1163e4: 83 c4 10 add $0x10,%esp 1163e7: e9 ab fe ff ff jmp 116297 <_Timer_server_Body+0x32> =============================================================================== 001163ec <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 1163ec: 55 push %ebp 1163ed: 89 e5 mov %esp,%ebp 1163ef: 57 push %edi 1163f0: 56 push %esi 1163f1: 53 push %ebx 1163f2: 83 ec 1c sub $0x1c,%esp 1163f5: 8b 5d 08 mov 0x8(%ebp),%ebx 1163f8: 8b 75 0c mov 0xc(%ebp),%esi if ( ts->insert_chain == NULL ) { 1163fb: 8b 43 78 mov 0x78(%ebx),%eax 1163fe: 85 c0 test %eax,%eax 116400: 0f 85 fa 00 00 00 jne 116500 <_Timer_server_Schedule_operation_method+0x114><== NEVER TAKEN * is the reference point for the delta chain. Thus if we do not update the * reference point we have to add DT to the initial delta of the watchdog * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); 116406: e8 b9 fd ff ff call 1161c4 <_Thread_Disable_dispatch> if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 11640b: 8b 46 38 mov 0x38(%esi),%eax 11640e: 83 f8 01 cmp $0x1,%eax 116411: 75 61 jne 116474 <_Timer_server_Schedule_operation_method+0x88> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 116413: 9c pushf 116414: fa cli 116415: 8f 45 e0 popl -0x20(%ebp) snapshot = _Watchdog_Ticks_since_boot; 116418: 8b 15 60 d7 14 00 mov 0x14d760,%edx last_snapshot = ts->Interval_watchdogs.last_snapshot; 11641e: 8b 4b 3c mov 0x3c(%ebx),%ecx */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 116421: 8b 43 30 mov 0x30(%ebx),%eax RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 116424: 8d 7b 34 lea 0x34(%ebx),%edi if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 116427: 39 f8 cmp %edi,%eax 116429: 74 19 je 116444 <_Timer_server_Schedule_operation_method+0x58> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 11642b: 89 d7 mov %edx,%edi 11642d: 29 cf sub %ecx,%edi 11642f: 89 7d e4 mov %edi,-0x1c(%ebp) delta_interval = first_watchdog->delta_interval; 116432: 8b 78 10 mov 0x10(%eax),%edi if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 116435: 31 c9 xor %ecx,%ecx * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { 116437: 3b 7d e4 cmp -0x1c(%ebp),%edi 11643a: 76 05 jbe 116441 <_Timer_server_Schedule_operation_method+0x55> delta_interval -= delta; 11643c: 89 f9 mov %edi,%ecx 11643e: 2b 4d e4 sub -0x1c(%ebp),%ecx } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 116441: 89 48 10 mov %ecx,0x10(%eax) } ts->Interval_watchdogs.last_snapshot = snapshot; 116444: 89 53 3c mov %edx,0x3c(%ebx) _ISR_Enable( level ); 116447: ff 75 e0 pushl -0x20(%ebp) 11644a: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 11644b: 50 push %eax 11644c: 50 push %eax 11644d: 83 c6 10 add $0x10,%esi 116450: 56 push %esi 116451: 8d 43 30 lea 0x30(%ebx),%eax 116454: 50 push %eax 116455: e8 be 36 00 00 call 119b18 <_Watchdog_Insert> if ( !ts->active ) { 11645a: 8a 43 7c mov 0x7c(%ebx),%al 11645d: 83 c4 10 add $0x10,%esp 116460: 84 c0 test %al,%al 116462: 0f 85 8c 00 00 00 jne 1164f4 <_Timer_server_Schedule_operation_method+0x108> _Timer_server_Reset_interval_system_watchdog( ts ); 116468: 89 d8 mov %ebx,%eax 11646a: e8 6a fd ff ff call 1161d9 <_Timer_server_Reset_interval_system_watchdog> 11646f: e9 80 00 00 00 jmp 1164f4 <_Timer_server_Schedule_operation_method+0x108> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 116474: 83 f8 03 cmp $0x3,%eax 116477: 75 7b jne 1164f4 <_Timer_server_Schedule_operation_method+0x108> /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 116479: 9c pushf 11647a: fa cli 11647b: 8f 45 e0 popl -0x20(%ebp) 11647e: 6a 00 push $0x0 116480: 68 00 ca 9a 3b push $0x3b9aca00 116485: ff 35 e4 d6 14 00 pushl 0x14d6e4 11648b: ff 35 e0 d6 14 00 pushl 0x14d6e0 116491: e8 5a 3a 01 00 call 129ef0 <__divdi3> 116496: 83 c4 10 add $0x10,%esp snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; 116499: 8b 53 74 mov 0x74(%ebx),%edx */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 11649c: 8b 4b 68 mov 0x68(%ebx),%ecx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 11649f: 8d 7b 6c lea 0x6c(%ebx),%edi if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 1164a2: 39 f9 cmp %edi,%ecx 1164a4: 74 27 je 1164cd <_Timer_server_Schedule_operation_method+0xe1> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 1164a6: 8b 79 10 mov 0x10(%ecx),%edi 1164a9: 89 7d dc mov %edi,-0x24(%ebp) if ( snapshot > last_snapshot ) { 1164ac: 39 d0 cmp %edx,%eax 1164ae: 76 15 jbe 1164c5 <_Timer_server_Schedule_operation_method+0xd9> /* * We advanced in time. */ delta = snapshot - last_snapshot; 1164b0: 89 c7 mov %eax,%edi 1164b2: 29 d7 sub %edx,%edi 1164b4: 89 7d e4 mov %edi,-0x1c(%ebp) if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 1164b7: 31 d2 xor %edx,%edx if ( snapshot > last_snapshot ) { /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { 1164b9: 39 7d dc cmp %edi,-0x24(%ebp) 1164bc: 76 0c jbe 1164ca <_Timer_server_Schedule_operation_method+0xde><== NEVER TAKEN delta_interval -= delta; 1164be: 8b 55 dc mov -0x24(%ebp),%edx 1164c1: 29 fa sub %edi,%edx 1164c3: eb 05 jmp 1164ca <_Timer_server_Schedule_operation_method+0xde> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 1164c5: 03 55 dc add -0x24(%ebp),%edx delta_interval += delta; 1164c8: 29 c2 sub %eax,%edx } first_watchdog->delta_interval = delta_interval; 1164ca: 89 51 10 mov %edx,0x10(%ecx) } ts->TOD_watchdogs.last_snapshot = snapshot; 1164cd: 89 43 74 mov %eax,0x74(%ebx) _ISR_Enable( level ); 1164d0: ff 75 e0 pushl -0x20(%ebp) 1164d3: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 1164d4: 57 push %edi 1164d5: 57 push %edi 1164d6: 83 c6 10 add $0x10,%esi 1164d9: 56 push %esi 1164da: 8d 43 68 lea 0x68(%ebx),%eax 1164dd: 50 push %eax 1164de: e8 35 36 00 00 call 119b18 <_Watchdog_Insert> if ( !ts->active ) { 1164e3: 8a 43 7c mov 0x7c(%ebx),%al 1164e6: 83 c4 10 add $0x10,%esp 1164e9: 84 c0 test %al,%al 1164eb: 75 07 jne 1164f4 <_Timer_server_Schedule_operation_method+0x108> _Timer_server_Reset_tod_system_watchdog( ts ); 1164ed: 89 d8 mov %ebx,%eax 1164ef: e8 2b fd ff ff call 11621f <_Timer_server_Reset_tod_system_watchdog> * 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 ); } } 1164f4: 8d 65 f4 lea -0xc(%ebp),%esp 1164f7: 5b pop %ebx 1164f8: 5e pop %esi 1164f9: 5f pop %edi 1164fa: 5d pop %ebp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 1164fb: e9 84 29 00 00 jmp 118e84 <_Thread_Enable_dispatch> * 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 ); 116500: 8b 43 78 mov 0x78(%ebx),%eax <== NOT EXECUTED 116503: 89 75 0c mov %esi,0xc(%ebp) <== NOT EXECUTED 116506: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } } 116509: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11650c: 5b pop %ebx <== NOT EXECUTED 11650d: 5e pop %esi <== NOT EXECUTED 11650e: 5f pop %edi <== NOT EXECUTED 11650f: 5d pop %ebp <== NOT EXECUTED * 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 ); 116510: e9 8f 06 00 00 jmp 116ba4 <_Chain_Append> <== NOT EXECUTED =============================================================================== 0010beac <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 10beac: 55 push %ebp 10bead: 89 e5 mov %esp,%ebp 10beaf: 57 push %edi 10beb0: 56 push %esi 10beb1: 53 push %ebx 10beb2: 83 ec 1c sub $0x1c,%esp 10beb5: 8b 45 08 mov 0x8(%ebp),%eax 10beb8: 8b 4d 0c mov 0xc(%ebp),%ecx /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10bebb: 8b 38 mov (%eax),%edi left += lhs->tv_nsec; 10bebd: 8b 70 04 mov 0x4(%eax),%esi right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10bec0: bb 00 ca 9a 3b mov $0x3b9aca00,%ebx 10bec5: 8b 01 mov (%ecx),%eax 10bec7: f7 eb imul %ebx 10bec9: 89 45 e0 mov %eax,-0x20(%ebp) 10becc: 89 55 e4 mov %edx,-0x1c(%ebp) right += rhs->tv_nsec; 10becf: 8b 41 04 mov 0x4(%ecx),%eax 10bed2: 99 cltd 10bed3: 01 45 e0 add %eax,-0x20(%ebp) 10bed6: 11 55 e4 adc %edx,-0x1c(%ebp) if ( right == 0 ) { 10bed9: 8b 55 e4 mov -0x1c(%ebp),%edx 10bedc: 0b 55 e0 or -0x20(%ebp),%edx 10bedf: 75 14 jne 10bef5 <_Timespec_Divide+0x49> <== NEVER TAKEN *ival_percentage = 0; 10bee1: 8b 45 10 mov 0x10(%ebp),%eax 10bee4: c7 00 00 00 00 00 movl $0x0,(%eax) *fval_percentage = 0; 10beea: 8b 55 14 mov 0x14(%ebp),%edx 10beed: c7 02 00 00 00 00 movl $0x0,(%edx) return; 10bef3: eb 64 jmp 10bf59 <_Timespec_Divide+0xad> /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10bef5: 89 f8 mov %edi,%eax <== NOT EXECUTED 10bef7: f7 eb imul %ebx <== NOT EXECUTED 10bef9: 89 45 d8 mov %eax,-0x28(%ebp) <== NOT EXECUTED 10befc: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED left += lhs->tv_nsec; 10beff: 89 f0 mov %esi,%eax <== NOT EXECUTED 10bf01: 99 cltd <== NOT EXECUTED 10bf02: 01 75 d8 add %esi,-0x28(%ebp) <== NOT EXECUTED 10bf05: 11 55 dc adc %edx,-0x24(%ebp) <== NOT EXECUTED * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 10bf08: 69 4d dc a0 86 01 00 imul $0x186a0,-0x24(%ebp),%ecx <== NOT EXECUTED 10bf0f: b8 a0 86 01 00 mov $0x186a0,%eax <== NOT EXECUTED 10bf14: f7 65 d8 mull -0x28(%ebp) <== NOT EXECUTED 10bf17: 01 ca add %ecx,%edx <== NOT EXECUTED 10bf19: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 10bf1c: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 10bf1f: 52 push %edx <== NOT EXECUTED 10bf20: 50 push %eax <== NOT EXECUTED 10bf21: e8 be 04 01 00 call 11c3e4 <__udivdi3> <== NOT EXECUTED 10bf26: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10bf29: 89 c6 mov %eax,%esi <== NOT EXECUTED 10bf2b: 89 d7 mov %edx,%edi <== NOT EXECUTED *ival_percentage = answer / 1000; 10bf2d: 6a 00 push $0x0 <== NOT EXECUTED 10bf2f: 68 e8 03 00 00 push $0x3e8 <== NOT EXECUTED 10bf34: 52 push %edx <== NOT EXECUTED 10bf35: 50 push %eax <== NOT EXECUTED 10bf36: e8 a9 04 01 00 call 11c3e4 <__udivdi3> <== NOT EXECUTED 10bf3b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10bf3e: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 10bf41: 89 02 mov %eax,(%edx) <== NOT EXECUTED *fval_percentage = answer % 1000; 10bf43: 6a 00 push $0x0 <== NOT EXECUTED 10bf45: 68 e8 03 00 00 push $0x3e8 <== NOT EXECUTED 10bf4a: 57 push %edi <== NOT EXECUTED 10bf4b: 56 push %esi <== NOT EXECUTED 10bf4c: e8 af 05 01 00 call 11c500 <__umoddi3> <== NOT EXECUTED 10bf51: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10bf54: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED 10bf57: 89 02 mov %eax,(%edx) <== NOT EXECUTED } 10bf59: 8d 65 f4 lea -0xc(%ebp),%esp 10bf5c: 5b pop %ebx 10bf5d: 5e pop %esi 10bf5e: 5f pop %edi 10bf5f: 5d pop %ebp 10bf60: c3 ret =============================================================================== 0010bf64 <_Timespec_Less_than>: bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { 10bf64: 55 push %ebp 10bf65: 89 e5 mov %esp,%ebp 10bf67: 53 push %ebx 10bf68: 8b 4d 08 mov 0x8(%ebp),%ecx 10bf6b: 8b 55 0c mov 0xc(%ebp),%edx if ( lhs->tv_sec < rhs->tv_sec ) return true; 10bf6e: b0 01 mov $0x1,%al bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec < rhs->tv_sec ) 10bf70: 8b 1a mov (%edx),%ebx 10bf72: 39 19 cmp %ebx,(%ecx) 10bf74: 7c 0d jl 10bf83 <_Timespec_Less_than+0x1f><== NEVER TAKEN return true; if ( lhs->tv_sec > rhs->tv_sec ) return false; 10bf76: b0 00 mov $0x0,%al ) { if ( lhs->tv_sec < rhs->tv_sec ) return true; if ( lhs->tv_sec > rhs->tv_sec ) 10bf78: 7f 09 jg 10bf83 <_Timespec_Less_than+0x1f> #include #include #include bool _Timespec_Less_than( 10bf7a: 8b 42 04 mov 0x4(%edx),%eax 10bf7d: 39 41 04 cmp %eax,0x4(%ecx) 10bf80: 0f 9c c0 setl %al /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } 10bf83: 5b pop %ebx 10bf84: 5d pop %ebp 10bf85: c3 ret =============================================================================== 0010c85c <_Timespec_Subtract>: void _Timespec_Subtract( const struct timespec *start, const struct timespec *end, struct timespec *result ) { 10c85c: 55 push %ebp 10c85d: 89 e5 mov %esp,%ebp 10c85f: 56 push %esi 10c860: 53 push %ebx 10c861: 8b 5d 08 mov 0x8(%ebp),%ebx 10c864: 8b 75 0c mov 0xc(%ebp),%esi 10c867: 8b 45 10 mov 0x10(%ebp),%eax if (end->tv_nsec < start->tv_nsec) { 10c86a: 8b 4e 04 mov 0x4(%esi),%ecx 10c86d: 8b 53 04 mov 0x4(%ebx),%edx 10c870: 39 d1 cmp %edx,%ecx 10c872: 8b 1b mov (%ebx),%ebx 10c874: 8b 36 mov (%esi),%esi 10c876: 7d 0d jge 10c885 <_Timespec_Subtract+0x29><== ALWAYS TAKEN result->tv_sec = end->tv_sec - start->tv_sec - 1; 10c878: 29 de sub %ebx,%esi <== NOT EXECUTED 10c87a: 4e dec %esi <== NOT EXECUTED 10c87b: 89 30 mov %esi,(%eax) <== NOT EXECUTED result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; 10c87d: 81 c1 00 ca 9a 3b add $0x3b9aca00,%ecx <== NOT EXECUTED 10c883: eb 04 jmp 10c889 <_Timespec_Subtract+0x2d><== NOT EXECUTED } else { result->tv_sec = end->tv_sec - start->tv_sec; 10c885: 29 de sub %ebx,%esi 10c887: 89 30 mov %esi,(%eax) result->tv_nsec = end->tv_nsec - start->tv_nsec; 10c889: 29 d1 sub %edx,%ecx 10c88b: 89 48 04 mov %ecx,0x4(%eax) } } 10c88e: 5b pop %ebx 10c88f: 5e pop %esi 10c890: 5d pop %ebp 10c891: c3 ret =============================================================================== 0010d4fc <_Timestamp64_Divide>: const Timestamp64_Control *_lhs, const Timestamp64_Control *_rhs, uint32_t *_ival_percentage, uint32_t *_fval_percentage ) { 10d4fc: 55 push %ebp 10d4fd: 89 e5 mov %esp,%ebp 10d4ff: 57 push %edi 10d500: 56 push %esi 10d501: 53 push %ebx 10d502: 83 ec 0c sub $0xc,%esp 10d505: 8b 55 08 mov 0x8(%ebp),%edx Timestamp64_Control answer; if ( *_rhs == 0 ) { 10d508: 8b 45 0c mov 0xc(%ebp),%eax 10d50b: 8b 08 mov (%eax),%ecx 10d50d: 8b 58 04 mov 0x4(%eax),%ebx 10d510: 89 d8 mov %ebx,%eax 10d512: 09 c8 or %ecx,%eax 10d514: 75 14 jne 10d52a <_Timestamp64_Divide+0x2e><== ALWAYS TAKEN *_ival_percentage = 0; 10d516: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 10d519: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED *_fval_percentage = 0; 10d51f: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 10d522: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED return; 10d528: eb 4c jmp 10d576 <_Timestamp64_Divide+0x7a><== NOT EXECUTED * This looks odd but gives the results the proper precision. * * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; 10d52a: 69 72 04 a0 86 01 00 imul $0x186a0,0x4(%edx),%esi 10d531: b8 a0 86 01 00 mov $0x186a0,%eax 10d536: f7 22 mull (%edx) 10d538: 01 f2 add %esi,%edx 10d53a: 53 push %ebx 10d53b: 51 push %ecx 10d53c: 52 push %edx 10d53d: 50 push %eax 10d53e: e8 b1 0c 01 00 call 11e1f4 <__divdi3> 10d543: 83 c4 10 add $0x10,%esp 10d546: 89 c6 mov %eax,%esi 10d548: 89 d7 mov %edx,%edi *_ival_percentage = answer / 1000; 10d54a: 6a 00 push $0x0 10d54c: 68 e8 03 00 00 push $0x3e8 10d551: 52 push %edx 10d552: 50 push %eax 10d553: e8 9c 0c 01 00 call 11e1f4 <__divdi3> 10d558: 83 c4 10 add $0x10,%esp 10d55b: 8b 55 10 mov 0x10(%ebp),%edx 10d55e: 89 02 mov %eax,(%edx) *_fval_percentage = answer % 1000; 10d560: 6a 00 push $0x0 10d562: 68 e8 03 00 00 push $0x3e8 10d567: 57 push %edi 10d568: 56 push %esi 10d569: e8 c6 0d 01 00 call 11e334 <__moddi3> 10d56e: 83 c4 10 add $0x10,%esp 10d571: 8b 55 14 mov 0x14(%ebp),%edx 10d574: 89 02 mov %eax,(%edx) } 10d576: 8d 65 f4 lea -0xc(%ebp),%esp 10d579: 5b pop %ebx 10d57a: 5e pop %esi 10d57b: 5f pop %edi 10d57c: 5d pop %ebp 10d57d: c3 ret =============================================================================== 0010c308 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10c308: 55 push %ebp 10c309: 89 e5 mov %esp,%ebp 10c30b: 57 push %edi 10c30c: 56 push %esi 10c30d: 53 push %ebx 10c30e: 83 ec 1c sub $0x1c,%esp User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; 10c311: a1 74 b1 12 00 mov 0x12b174,%eax 10c316: 89 45 e4 mov %eax,-0x1c(%ebp) initial_extensions = Configuration.User_extension_table; 10c319: 8b 15 78 b1 12 00 mov 0x12b178,%edx ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 10c31f: c7 05 68 f4 12 00 6c movl $0x12f46c,0x12f468 10c326: f4 12 00 head->previous = NULL; 10c329: c7 05 6c f4 12 00 00 movl $0x0,0x12f46c 10c330: 00 00 00 tail->previous = head; 10c333: c7 05 70 f4 12 00 68 movl $0x12f468,0x12f470 10c33a: f4 12 00 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 10c33d: c7 05 a8 f2 12 00 ac movl $0x12f2ac,0x12f2a8 10c344: f2 12 00 head->previous = NULL; 10c347: c7 05 ac f2 12 00 00 movl $0x0,0x12f2ac 10c34e: 00 00 00 tail->previous = head; 10c351: c7 05 b0 f2 12 00 a8 movl $0x12f2a8,0x12f2b0 10c358: f2 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10c35b: 85 d2 test %edx,%edx 10c35d: 74 55 je 10c3b4 <_User_extensions_Handler_initialization+0xac><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( 10c35f: 6b f0 34 imul $0x34,%eax,%esi _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) 10c362: 83 ec 0c sub $0xc,%esp 10c365: 56 push %esi 10c366: 89 55 e0 mov %edx,-0x20(%ebp) 10c369: e8 39 04 00 00 call 10c7a7 <_Workspace_Allocate_or_fatal_error> 10c36e: 89 c3 mov %eax,%ebx _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10c370: 31 c0 xor %eax,%eax 10c372: 89 df mov %ebx,%edi 10c374: 89 f1 mov %esi,%ecx 10c376: f3 aa rep stos %al,%es:(%edi) 10c378: 8b 55 e0 mov -0x20(%ebp),%edx 10c37b: 89 d0 mov %edx,%eax extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10c37d: 83 c4 10 add $0x10,%esp 10c380: 31 d2 xor %edx,%edx 10c382: eb 2b jmp 10c3af <_User_extensions_Handler_initialization+0xa7> RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 10c384: 8d 7b 14 lea 0x14(%ebx),%edi 10c387: 89 c6 mov %eax,%esi 10c389: b9 08 00 00 00 mov $0x8,%ecx 10c38e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10c390: 83 ec 0c sub $0xc,%esp 10c393: 53 push %ebx 10c394: 89 45 dc mov %eax,-0x24(%ebp) 10c397: 89 55 e0 mov %edx,-0x20(%ebp) 10c39a: e8 9d 2b 00 00 call 10ef3c <_User_extensions_Add_set> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10c39f: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10c3a2: 8b 55 e0 mov -0x20(%ebp),%edx 10c3a5: 42 inc %edx 10c3a6: 8b 45 dc mov -0x24(%ebp),%eax 10c3a9: 83 c0 20 add $0x20,%eax 10c3ac: 83 c4 10 add $0x10,%esp 10c3af: 3b 55 e4 cmp -0x1c(%ebp),%edx 10c3b2: 75 d0 jne 10c384 <_User_extensions_Handler_initialization+0x7c> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10c3b4: 8d 65 f4 lea -0xc(%ebp),%esp 10c3b7: 5b pop %ebx 10c3b8: 5e pop %esi 10c3b9: 5f pop %edi 10c3ba: 5d pop %ebp 10c3bb: c3 ret =============================================================================== 0010d7f4 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10d7f4: 55 push %ebp 10d7f5: 89 e5 mov %esp,%ebp 10d7f7: 57 push %edi 10d7f8: 56 push %esi 10d7f9: 53 push %ebx 10d7fa: 83 ec 0c sub $0xc,%esp 10d7fd: 8b 75 08 mov 0x8(%ebp),%esi 10d800: 8b 4d 0c mov 0xc(%ebp),%ecx 10d803: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10d806: 9c pushf 10d807: fa cli 10d808: 58 pop %eax */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 10d809: 8b 16 mov (%esi),%edx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10d80b: 8d 7e 04 lea 0x4(%esi),%edi * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 10d80e: 39 fa cmp %edi,%edx 10d810: 74 3e je 10d850 <_Watchdog_Adjust+0x5c> switch ( direction ) { 10d812: 85 c9 test %ecx,%ecx 10d814: 74 36 je 10d84c <_Watchdog_Adjust+0x58> 10d816: 49 dec %ecx 10d817: 75 37 jne 10d850 <_Watchdog_Adjust+0x5c> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10d819: 01 5a 10 add %ebx,0x10(%edx) break; 10d81c: eb 32 jmp 10d850 <_Watchdog_Adjust+0x5c> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 10d81e: 8b 16 mov (%esi),%edx case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 10d820: 8b 4a 10 mov 0x10(%edx),%ecx 10d823: 39 cb cmp %ecx,%ebx 10d825: 73 07 jae 10d82e <_Watchdog_Adjust+0x3a> _Watchdog_First( header )->delta_interval -= units; 10d827: 29 d9 sub %ebx,%ecx 10d829: 89 4a 10 mov %ecx,0x10(%edx) break; 10d82c: eb 22 jmp 10d850 <_Watchdog_Adjust+0x5c> } else { units -= _Watchdog_First( header )->delta_interval; 10d82e: 29 cb sub %ecx,%ebx _Watchdog_First( header )->delta_interval = 1; 10d830: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10d837: 50 push %eax 10d838: 9d popf _Watchdog_Tickle( header ); 10d839: 83 ec 0c sub $0xc,%esp 10d83c: 56 push %esi 10d83d: e8 9e 01 00 00 call 10d9e0 <_Watchdog_Tickle> _ISR_Disable( level ); 10d842: 9c pushf 10d843: fa cli 10d844: 58 pop %eax if ( _Chain_Is_empty( header ) ) 10d845: 83 c4 10 add $0x10,%esp 10d848: 39 3e cmp %edi,(%esi) 10d84a: 74 04 je 10d850 <_Watchdog_Adjust+0x5c> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10d84c: 85 db test %ebx,%ebx 10d84e: 75 ce jne 10d81e <_Watchdog_Adjust+0x2a> <== ALWAYS TAKEN } break; } } _ISR_Enable( level ); 10d850: 50 push %eax 10d851: 9d popf } 10d852: 8d 65 f4 lea -0xc(%ebp),%esp 10d855: 5b pop %ebx 10d856: 5e pop %esi 10d857: 5f pop %edi 10d858: 5d pop %ebp 10d859: c3 ret =============================================================================== 0010c65c <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10c65c: 55 push %ebp 10c65d: 89 e5 mov %esp,%ebp 10c65f: 56 push %esi 10c660: 53 push %ebx 10c661: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10c664: 9c pushf 10c665: fa cli 10c666: 5e pop %esi previous_state = the_watchdog->state; 10c667: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10c66a: 83 f8 01 cmp $0x1,%eax 10c66d: 74 09 je 10c678 <_Watchdog_Remove+0x1c> 10c66f: 72 42 jb 10c6b3 <_Watchdog_Remove+0x57> 10c671: 83 f8 03 cmp $0x3,%eax 10c674: 77 3d ja 10c6b3 <_Watchdog_Remove+0x57> <== NEVER TAKEN 10c676: eb 09 jmp 10c681 <_Watchdog_Remove+0x25> /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 10c678: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10c67f: eb 32 jmp 10c6b3 <_Watchdog_Remove+0x57> case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10c681: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } 10c688: 8b 0a mov (%edx),%ecx case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10c68a: 83 39 00 cmpl $0x0,(%ecx) 10c68d: 74 06 je 10c695 <_Watchdog_Remove+0x39> next_watchdog->delta_interval += the_watchdog->delta_interval; 10c68f: 8b 5a 10 mov 0x10(%edx),%ebx 10c692: 01 59 10 add %ebx,0x10(%ecx) if ( _Watchdog_Sync_count ) 10c695: 8b 1d ac f3 12 00 mov 0x12f3ac,%ebx 10c69b: 85 db test %ebx,%ebx 10c69d: 74 0c je 10c6ab <_Watchdog_Remove+0x4f> _Watchdog_Sync_level = _ISR_Nest_level; 10c69f: 8b 1d b4 f4 12 00 mov 0x12f4b4,%ebx 10c6a5: 89 1d 4c f3 12 00 mov %ebx,0x12f34c { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10c6ab: 8b 5a 04 mov 0x4(%edx),%ebx next->previous = previous; 10c6ae: 89 59 04 mov %ebx,0x4(%ecx) previous->next = next; 10c6b1: 89 0b mov %ecx,(%ebx) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10c6b3: 8b 0d b0 f3 12 00 mov 0x12f3b0,%ecx 10c6b9: 89 4a 18 mov %ecx,0x18(%edx) _ISR_Enable( level ); 10c6bc: 56 push %esi 10c6bd: 9d popf return( previous_state ); } 10c6be: 5b pop %ebx 10c6bf: 5e pop %esi 10c6c0: 5d pop %ebp 10c6c1: c3 ret =============================================================================== 0010c6c4 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10c6c4: 55 push %ebp 10c6c5: 89 e5 mov %esp,%ebp 10c6c7: 57 push %edi 10c6c8: 56 push %esi 10c6c9: 53 push %ebx 10c6ca: 83 ec 1c sub $0x1c,%esp 10c6cd: 8b 7d 08 mov 0x8(%ebp),%edi * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 10c6d0: 9c pushf 10c6d1: fa cli 10c6d2: 5e pop %esi */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 10c6d3: 8b 1f mov (%edi),%ebx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10c6d5: 8d 47 04 lea 0x4(%edi),%eax 10c6d8: 89 45 e4 mov %eax,-0x1c(%ebp) if ( _Chain_Is_empty( header ) ) 10c6db: 39 c3 cmp %eax,%ebx 10c6dd: 74 40 je 10c71f <_Watchdog_Tickle+0x5b> * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { 10c6df: 8b 43 10 mov 0x10(%ebx),%eax 10c6e2: 85 c0 test %eax,%eax 10c6e4: 74 08 je 10c6ee <_Watchdog_Tickle+0x2a> the_watchdog->delta_interval--; 10c6e6: 48 dec %eax 10c6e7: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10c6ea: 85 c0 test %eax,%eax 10c6ec: 75 31 jne 10c71f <_Watchdog_Tickle+0x5b> goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10c6ee: 83 ec 0c sub $0xc,%esp 10c6f1: 53 push %ebx 10c6f2: e8 65 ff ff ff call 10c65c <_Watchdog_Remove> _ISR_Enable( level ); 10c6f7: 56 push %esi 10c6f8: 9d popf switch( watchdog_state ) { 10c6f9: 83 c4 10 add $0x10,%esp 10c6fc: 83 f8 02 cmp $0x2,%eax 10c6ff: 75 0e jne 10c70f <_Watchdog_Tickle+0x4b> <== NEVER TAKEN case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10c701: 50 push %eax 10c702: 50 push %eax 10c703: ff 73 24 pushl 0x24(%ebx) 10c706: ff 73 20 pushl 0x20(%ebx) 10c709: ff 53 1c call *0x1c(%ebx) the_watchdog->id, the_watchdog->user_data ); break; 10c70c: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10c70f: 9c pushf 10c710: fa cli 10c711: 5e pop %esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 10c712: 8b 1f mov (%edi),%ebx the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10c714: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10c717: 74 06 je 10c71f <_Watchdog_Tickle+0x5b> } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && 10c719: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10c71d: eb cd jmp 10c6ec <_Watchdog_Tickle+0x28> (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 10c71f: 56 push %esi 10c720: 9d popf } 10c721: 8d 65 f4 lea -0xc(%ebp),%esp 10c724: 5b pop %ebx 10c725: 5e pop %esi 10c726: 5f pop %edi 10c727: 5d pop %ebp 10c728: c3 ret =============================================================================== 00109a20 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 109a20: 55 push %ebp 109a21: 89 e5 mov %esp,%ebp 109a23: 57 push %edi 109a24: 56 push %esi 109a25: 53 push %ebx 109a26: 83 ec 1c sub $0x1c,%esp 109a29: 8b 45 08 mov 0x8(%ebp),%eax 109a2c: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !tp ) 109a2f: 85 db test %ebx,%ebx 109a31: 74 6c je 109a9f rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 109a33: 83 f8 01 cmp $0x1,%eax 109a36: 75 3b jne 109a73 struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _TOD_Get_as_timestamp( &tod_as_timestamp ); 109a38: 83 ec 0c sub $0xc,%esp 109a3b: 8d 45 e0 lea -0x20(%ebp),%eax 109a3e: 50 push %eax 109a3f: e8 f0 12 00 00 call 10ad34 <_TOD_Get_as_timestamp> _Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec ); 109a44: 8b 75 e0 mov -0x20(%ebp),%esi 109a47: 8b 7d e4 mov -0x1c(%ebp),%edi static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 109a4a: 6a 00 push $0x0 109a4c: 68 00 ca 9a 3b push $0x3b9aca00 109a51: 57 push %edi 109a52: 56 push %esi 109a53: e8 14 41 01 00 call 11db6c <__divdi3> 109a58: 83 c4 10 add $0x10,%esp 109a5b: 89 03 mov %eax,(%ebx) _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 109a5d: 6a 00 push $0x0 109a5f: 68 00 ca 9a 3b push $0x3b9aca00 109a64: 57 push %edi 109a65: 56 push %esi 109a66: e8 41 42 01 00 call 11dcac <__moddi3> 109a6b: 83 c4 10 add $0x10,%esp 109a6e: 89 43 04 mov %eax,0x4(%ebx) 109a71: eb 13 jmp 109a86 _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 109a73: 83 f8 04 cmp $0x4,%eax 109a76: 74 05 je 109a7d <== NEVER TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) { 109a78: 83 f8 02 cmp $0x2,%eax 109a7b: 75 10 jne 109a8d _TOD_Get_uptime_as_timespec( tp ); 109a7d: 83 ec 0c sub $0xc,%esp 109a80: 53 push %ebx 109a81: e8 e6 12 00 00 call 10ad6c <_TOD_Get_uptime_as_timespec> return 0; 109a86: 83 c4 10 add $0x10,%esp 109a89: 31 c0 xor %eax,%eax 109a8b: eb 20 jmp 109aad } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) 109a8d: 83 f8 03 cmp $0x3,%eax 109a90: 75 0d jne 109a9f rtems_set_errno_and_return_minus_one( ENOSYS ); 109a92: e8 85 6f 00 00 call 110a1c <__errno> 109a97: c7 00 58 00 00 00 movl $0x58,(%eax) 109a9d: eb 0b jmp 109aaa #endif rtems_set_errno_and_return_minus_one( EINVAL ); 109a9f: e8 78 6f 00 00 call 110a1c <__errno> 109aa4: c7 00 16 00 00 00 movl $0x16,(%eax) 109aaa: 83 c8 ff or $0xffffffff,%eax return 0; } 109aad: 8d 65 f4 lea -0xc(%ebp),%esp 109ab0: 5b pop %ebx 109ab1: 5e pop %esi 109ab2: 5f pop %edi 109ab3: 5d pop %ebp 109ab4: c3 ret =============================================================================== 00127eb0 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 127eb0: 55 push %ebp 127eb1: 89 e5 mov %esp,%ebp 127eb3: 53 push %ebx 127eb4: 83 ec 24 sub $0x24,%esp 127eb7: 8b 45 08 mov 0x8(%ebp),%eax 127eba: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !tp ) 127ebd: 85 c9 test %ecx,%ecx 127ebf: 74 71 je 127f32 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 127ec1: 83 f8 01 cmp $0x1,%eax 127ec4: 75 55 jne 127f1b if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 127ec6: 81 39 ff e4 da 21 cmpl $0x21dae4ff,(%ecx) 127ecc: 76 64 jbe 127f32 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 127ece: a1 cc b5 18 00 mov 0x18b5cc,%eax 127ed3: 40 inc %eax 127ed4: a3 cc b5 18 00 mov %eax,0x18b5cc return _Thread_Dispatch_disable_level; 127ed9: a1 cc b5 18 00 mov 0x18b5cc,%eax Timestamp64_Control *_time, Timestamp64_Control _seconds, Timestamp64_Control _nanoseconds ) { *_time = _seconds * 1000000000L + _nanoseconds; 127ede: bb 00 ca 9a 3b mov $0x3b9aca00,%ebx 127ee3: 8b 01 mov (%ecx),%eax 127ee5: f7 eb imul %ebx 127ee7: 89 45 e0 mov %eax,-0x20(%ebp) 127eea: 89 55 e4 mov %edx,-0x1c(%ebp) const struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _Timestamp_Set( 127eed: 8b 41 04 mov 0x4(%ecx),%eax 127ef0: 99 cltd 127ef1: 01 45 e0 add %eax,-0x20(%ebp) 127ef4: 11 55 e4 adc %edx,-0x1c(%ebp) 127ef7: 8b 45 e0 mov -0x20(%ebp),%eax 127efa: 8b 55 e4 mov -0x1c(%ebp),%edx 127efd: 89 45 f0 mov %eax,-0x10(%ebp) 127f00: 89 55 f4 mov %edx,-0xc(%ebp) &tod_as_timestamp, tod_as_timespec->tv_sec, tod_as_timespec->tv_nsec ); _TOD_Set_with_timestamp( &tod_as_timestamp ); 127f03: 83 ec 0c sub $0xc,%esp 127f06: 8d 45 f0 lea -0x10(%ebp),%eax 127f09: 50 push %eax 127f0a: e8 1d 0d 00 00 call 128c2c <_TOD_Set_with_timestamp> rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); 127f0f: e8 9c a4 fe ff call 1123b0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 127f14: 83 c4 10 add $0x10,%esp 127f17: 31 c0 xor %eax,%eax 127f19: eb 25 jmp 127f40 _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) 127f1b: 83 f8 02 cmp $0x2,%eax 127f1e: 74 05 je 127f25 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) 127f20: 83 f8 03 cmp $0x3,%eax 127f23: 75 0d jne 127f32 rtems_set_errno_and_return_minus_one( ENOSYS ); 127f25: e8 06 45 01 00 call 13c430 <__errno> 127f2a: c7 00 58 00 00 00 movl $0x58,(%eax) 127f30: eb 0b jmp 127f3d #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 127f32: e8 f9 44 01 00 call 13c430 <__errno> 127f37: c7 00 16 00 00 00 movl $0x16,(%eax) 127f3d: 83 c8 ff or $0xffffffff,%eax return 0; } 127f40: 8b 5d fc mov -0x4(%ebp),%ebx 127f43: c9 leave 127f44: c3 ret =============================================================================== 0010feac : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 10feac: 55 push %ebp 10fead: 89 e5 mov %esp,%ebp 10feaf: 57 push %edi 10feb0: 56 push %esi 10feb1: 53 push %ebx 10feb2: 83 ec 2c sub $0x2c,%esp 10feb5: 8b 75 08 mov 0x8(%ebp),%esi 10feb8: 8b 7d 0c mov 0xc(%ebp),%edi 10febb: 8b 55 10 mov 0x10(%ebp),%edx 10febe: 8b 5d 14 mov 0x14(%ebp),%ebx Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10fec1: b8 03 00 00 00 mov $0x3,%eax ) { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 10fec6: 85 f6 test %esi,%esi 10fec8: 0f 84 91 00 00 00 je 10ff5f <== NEVER TAKEN return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10fece: b0 09 mov $0x9,%al CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10fed0: 85 db test %ebx,%ebx 10fed2: 0f 84 87 00 00 00 je 10ff5f <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 10fed8: f7 c7 10 00 00 00 test $0x10,%edi 10fede: 74 0f je 10feef the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 10fee0: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; 10fee7: b0 0a mov $0xa,%al return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 10fee9: 85 d2 test %edx,%edx 10feeb: 74 72 je 10ff5f <== NEVER TAKEN 10feed: eb 07 jmp 10fef6 return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 10feef: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) the_attributes.maximum_count = maximum_waiters; 10fef6: 89 55 e4 mov %edx,-0x1c(%ebp) * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 10fef9: a1 a4 15 13 00 mov 0x1315a4,%eax 10fefe: 40 inc %eax 10feff: a3 a4 15 13 00 mov %eax,0x1315a4 return _Thread_Dispatch_disable_level; 10ff04: a1 a4 15 13 00 mov 0x1315a4,%eax * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void ) { return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information ); 10ff09: 83 ec 0c sub $0xc,%esp 10ff0c: 68 f4 17 13 00 push $0x1317f4 10ff11: e8 aa c1 ff ff call 10c0c0 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 10ff16: 83 c4 10 add $0x10,%esp 10ff19: 85 c0 test %eax,%eax 10ff1b: 75 0c jne 10ff29 _Thread_Enable_dispatch(); 10ff1d: e8 96 d0 ff ff call 10cfb8 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10ff22: b8 05 00 00 00 mov $0x5,%eax 10ff27: eb 36 jmp 10ff5f } the_barrier->attribute_set = attribute_set; 10ff29: 89 78 10 mov %edi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 10ff2c: 52 push %edx 10ff2d: 52 push %edx 10ff2e: 8d 55 e0 lea -0x20(%ebp),%edx 10ff31: 52 push %edx 10ff32: 8d 50 14 lea 0x14(%eax),%edx 10ff35: 52 push %edx 10ff36: 89 45 d4 mov %eax,-0x2c(%ebp) 10ff39: e8 96 08 00 00 call 1107d4 <_CORE_barrier_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10ff3e: 8b 45 d4 mov -0x2c(%ebp),%eax 10ff41: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10ff44: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10ff47: 8b 0d 10 18 13 00 mov 0x131810,%ecx 10ff4d: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10ff50: 89 70 0c mov %esi,0xc(%eax) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 10ff53: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10ff55: e8 5e d0 ff ff call 10cfb8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ff5a: 83 c4 10 add $0x10,%esp 10ff5d: 31 c0 xor %eax,%eax } 10ff5f: 8d 65 f4 lea -0xc(%ebp),%esp 10ff62: 5b pop %ebx 10ff63: 5e pop %esi 10ff64: 5f pop %edi 10ff65: 5d pop %ebp 10ff66: c3 ret =============================================================================== 0010a118 : rtems_chain_control *chain, rtems_event_set events, rtems_interval timeout, rtems_chain_node **node_ptr ) { 10a118: 55 push %ebp 10a119: 89 e5 mov %esp,%ebp 10a11b: 57 push %edi 10a11c: 56 push %esi 10a11d: 53 push %ebx 10a11e: 83 ec 1c sub $0x1c,%esp 10a121: 8b 7d 0c mov 0xc(%ebp),%edi while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ) { rtems_event_set out; sc = rtems_event_receive( 10a124: 8d 75 e4 lea -0x1c(%ebp),%esi 10a127: eb 13 jmp 10a13c 10a129: 56 push %esi 10a12a: ff 75 10 pushl 0x10(%ebp) 10a12d: 6a 00 push $0x0 10a12f: 57 push %edi 10a130: e8 ab f5 ff ff call 1096e0 ) { rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( 10a135: 83 c4 10 add $0x10,%esp 10a138: 85 c0 test %eax,%eax 10a13a: 75 16 jne 10a152 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 10a13c: 83 ec 0c sub $0xc,%esp 10a13f: ff 75 08 pushl 0x8(%ebp) 10a142: e8 5d 04 00 00 call 10a5a4 <_Chain_Get> 10a147: 89 c3 mov %eax,%ebx sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL 10a149: 83 c4 10 add $0x10,%esp 10a14c: 85 c0 test %eax,%eax 10a14e: 74 d9 je 10a129 10a150: 31 c0 xor %eax,%eax timeout, &out ); } *node_ptr = node; 10a152: 8b 55 14 mov 0x14(%ebp),%edx 10a155: 89 1a mov %ebx,(%edx) return sc; } 10a157: 8d 65 f4 lea -0xc(%ebp),%esp 10a15a: 5b pop %ebx 10a15b: 5e pop %esi 10a15c: 5f pop %edi 10a15d: 5d pop %ebp 10a15e: c3 ret =============================================================================== 0010bc68 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10bc68: 55 push %ebp 10bc69: 89 e5 mov %esp,%ebp 10bc6b: 57 push %edi 10bc6c: 56 push %esi 10bc6d: 53 push %ebx 10bc6e: 83 ec 0c sub $0xc,%esp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10bc71: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 10bc75: 74 41 je 10bcb8 <== NEVER TAKEN 10bc77: bb 01 00 00 00 mov $0x1,%ebx return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { #if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) 10bc7c: 8b 04 9d 1c 29 13 00 mov 0x13291c(,%ebx,4),%eax 10bc83: 85 c0 test %eax,%eax 10bc85: 74 2b je 10bcb2 continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; 10bc87: 8b 78 04 mov 0x4(%eax),%edi if ( !information ) 10bc8a: be 01 00 00 00 mov $0x1,%esi 10bc8f: 85 ff test %edi,%edi 10bc91: 75 17 jne 10bcaa 10bc93: eb 1d jmp 10bcb2 continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 10bc95: 8b 47 1c mov 0x1c(%edi),%eax 10bc98: 8b 04 b0 mov (%eax,%esi,4),%eax if ( !the_thread ) 10bc9b: 85 c0 test %eax,%eax 10bc9d: 74 0a je 10bca9 <== NEVER TAKEN continue; (*routine)(the_thread); 10bc9f: 83 ec 0c sub $0xc,%esp 10bca2: 50 push %eax 10bca3: ff 55 08 call *0x8(%ebp) 10bca6: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10bca9: 46 inc %esi 10bcaa: 0f b7 47 10 movzwl 0x10(%edi),%eax 10bcae: 39 c6 cmp %eax,%esi 10bcb0: 76 e3 jbe 10bc95 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10bcb2: 43 inc %ebx 10bcb3: 83 fb 04 cmp $0x4,%ebx 10bcb6: 75 c4 jne 10bc7c (*routine)(the_thread); } } } 10bcb8: 8d 65 f4 lea -0xc(%ebp),%esp 10bcbb: 5b pop %ebx 10bcbc: 5e pop %esi 10bcbd: 5f pop %edi 10bcbe: 5d pop %ebp 10bcbf: c3 ret =============================================================================== 0010afa0 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 10afa0: 55 push %ebp 10afa1: 89 e5 mov %esp,%ebp 10afa3: 57 push %edi 10afa4: 56 push %esi 10afa5: 53 push %ebx 10afa6: 83 ec 0c sub $0xc,%esp 10afa9: 8b 5d 10 mov 0x10(%ebp),%ebx /* * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; 10afac: b8 09 00 00 00 mov $0x9,%eax int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10afb1: 85 db test %ebx,%ebx 10afb3: 74 52 je 10b007 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 10afb5: 50 push %eax 10afb6: 50 push %eax 10afb7: 0f b7 45 0c movzwl 0xc(%ebp),%eax 10afbb: 50 push %eax 10afbc: ff 75 08 pushl 0x8(%ebp) 10afbf: e8 c8 17 00 00 call 10c78c <_Objects_Get_information> 10afc4: 89 c2 mov %eax,%edx if ( !obj_info ) 10afc6: 83 c4 10 add $0x10,%esp return RTEMS_INVALID_NUMBER; 10afc9: b8 0a 00 00 00 mov $0xa,%eax */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) 10afce: 85 d2 test %edx,%edx 10afd0: 74 35 je 10b007 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 10afd2: 8b 42 08 mov 0x8(%edx),%eax 10afd5: 89 03 mov %eax,(%ebx) info->maximum_id = obj_info->maximum_id; 10afd7: 8b 42 0c mov 0xc(%edx),%eax 10afda: 89 43 04 mov %eax,0x4(%ebx) info->auto_extend = obj_info->auto_extend; 10afdd: 8a 42 12 mov 0x12(%edx),%al 10afe0: 88 43 0c mov %al,0xc(%ebx) info->maximum = obj_info->maximum; 10afe3: 0f b7 72 10 movzwl 0x10(%edx),%esi 10afe7: 89 73 08 mov %esi,0x8(%ebx) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10afea: b8 01 00 00 00 mov $0x1,%eax 10afef: 31 c9 xor %ecx,%ecx 10aff1: eb 0b jmp 10affe if ( !obj_info->local_table[i] ) 10aff3: 8b 7a 1c mov 0x1c(%edx),%edi unallocated++; 10aff6: 83 3c 87 01 cmpl $0x1,(%edi,%eax,4) 10affa: 83 d1 00 adc $0x0,%ecx 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++ ) 10affd: 40 inc %eax 10affe: 39 f0 cmp %esi,%eax 10b000: 76 f1 jbe 10aff3 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 10b002: 89 4b 10 mov %ecx,0x10(%ebx) return RTEMS_SUCCESSFUL; 10b005: 31 c0 xor %eax,%eax } 10b007: 8d 65 f4 lea -0xc(%ebp),%esp 10b00a: 5b pop %ebx 10b00b: 5e pop %esi 10b00c: 5f pop %edi 10b00d: 5d pop %ebp 10b00e: c3 ret =============================================================================== 00113f04 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 113f04: 55 push %ebp 113f05: 89 e5 mov %esp,%ebp 113f07: 57 push %edi 113f08: 56 push %esi 113f09: 53 push %ebx 113f0a: 83 ec 1c sub $0x1c,%esp 113f0d: 8b 75 0c mov 0xc(%ebp),%esi 113f10: 8b 55 10 mov 0x10(%ebp),%edx 113f13: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 113f16: b8 03 00 00 00 mov $0x3,%eax rtems_id *id ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 113f1b: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 113f1f: 0f 84 d3 00 00 00 je 113ff8 return RTEMS_INVALID_NAME; if ( !starting_address ) return RTEMS_INVALID_ADDRESS; 113f25: b0 09 mov $0x9,%al register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !starting_address ) 113f27: 85 f6 test %esi,%esi 113f29: 0f 84 c9 00 00 00 je 113ff8 return RTEMS_INVALID_ADDRESS; if ( !id ) 113f2f: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp) 113f33: 0f 84 bf 00 00 00 je 113ff8 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 113f39: 85 ff test %edi,%edi 113f3b: 0f 84 b2 00 00 00 je 113ff3 113f41: 85 d2 test %edx,%edx 113f43: 0f 84 aa 00 00 00 je 113ff3 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; 113f49: b0 08 mov $0x8,%al return RTEMS_INVALID_ADDRESS; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 113f4b: 39 fa cmp %edi,%edx 113f4d: 0f 82 a5 00 00 00 jb 113ff8 113f53: f7 c7 03 00 00 00 test $0x3,%edi 113f59: 0f 85 99 00 00 00 jne 113ff8 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; 113f5f: b0 09 mov $0x9,%al if ( length == 0 || buffer_size == 0 || length < buffer_size || !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 113f61: f7 c6 03 00 00 00 test $0x3,%esi 113f67: 0f 85 8b 00 00 00 jne 113ff8 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 113f6d: a1 54 d6 14 00 mov 0x14d654,%eax 113f72: 40 inc %eax 113f73: a3 54 d6 14 00 mov %eax,0x14d654 return _Thread_Dispatch_disable_level; 113f78: a1 54 d6 14 00 mov 0x14d654,%eax * This function allocates a partition control block from * the inactive chain of free partition control blocks. */ RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void ) { return (Partition_Control *) _Objects_Allocate( &_Partition_Information ); 113f7d: 83 ec 0c sub $0xc,%esp 113f80: 68 e8 d4 14 00 push $0x14d4e8 113f85: 89 55 e4 mov %edx,-0x1c(%ebp) 113f88: e8 8b 3f 00 00 call 117f18 <_Objects_Allocate> 113f8d: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 113f8f: 83 c4 10 add $0x10,%esp 113f92: 85 c0 test %eax,%eax 113f94: 8b 55 e4 mov -0x1c(%ebp),%edx 113f97: 75 0c jne 113fa5 _Thread_Enable_dispatch(); 113f99: e8 e6 4e 00 00 call 118e84 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 113f9e: b8 05 00 00 00 mov $0x5,%eax 113fa3: eb 53 jmp 113ff8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 113fa5: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 113fa8: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 113fab: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 113fae: 8b 45 18 mov 0x18(%ebp),%eax 113fb1: 89 43 1c mov %eax,0x1c(%ebx) the_partition->number_of_used_blocks = 0; 113fb4: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) _Chain_Initialize( &the_partition->Memory, starting_address, 113fbb: 57 push %edi 113fbc: 89 d0 mov %edx,%eax 113fbe: 31 d2 xor %edx,%edx 113fc0: f7 f7 div %edi 113fc2: 50 push %eax 113fc3: 56 push %esi 113fc4: 8d 43 24 lea 0x24(%ebx),%eax 113fc7: 50 push %eax 113fc8: e8 37 2c 00 00 call 116c04 <_Chain_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 113fcd: 8b 43 08 mov 0x8(%ebx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 113fd0: 0f b7 c8 movzwl %ax,%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 113fd3: 8b 15 04 d5 14 00 mov 0x14d504,%edx 113fd9: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 113fdc: 8b 55 08 mov 0x8(%ebp),%edx 113fdf: 89 53 0c mov %edx,0xc(%ebx) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 113fe2: 8b 55 1c mov 0x1c(%ebp),%edx 113fe5: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 113fe7: e8 98 4e 00 00 call 118e84 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 113fec: 83 c4 10 add $0x10,%esp 113fef: 31 c0 xor %eax,%eax 113ff1: eb 05 jmp 113ff8 if ( !id ) return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; 113ff3: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113ff8: 8d 65 f4 lea -0xc(%ebp),%esp 113ffb: 5b pop %ebx 113ffc: 5e pop %esi 113ffd: 5f pop %edi 113ffe: 5d pop %ebp 113fff: c3 ret =============================================================================== 00139caa : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 139caa: 55 push %ebp 139cab: 89 e5 mov %esp,%ebp 139cad: 57 push %edi 139cae: 56 push %esi 139caf: 53 push %ebx 139cb0: 83 ec 30 sub $0x30,%esp 139cb3: 8b 75 08 mov 0x8(%ebp),%esi 139cb6: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_value; rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); 139cb9: 8d 45 e4 lea -0x1c(%ebp),%eax 139cbc: 50 push %eax 139cbd: 56 push %esi 139cbe: 68 a0 ba 18 00 push $0x18baa0 139cc3: e8 94 7b fd ff call 11185c <_Objects_Get> 139cc8: 89 c7 mov %eax,%edi switch ( location ) { 139cca: 83 c4 10 add $0x10,%esp 139ccd: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 139cd1: 0f 85 49 01 00 00 jne 139e20 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 139cd7: a1 e0 b7 18 00 mov 0x18b7e0,%eax 139cdc: 39 47 40 cmp %eax,0x40(%edi) 139cdf: 74 0f je 139cf0 _Thread_Enable_dispatch(); 139ce1: e8 ca 86 fd ff call 1123b0 <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 139ce6: be 17 00 00 00 mov $0x17,%esi 139ceb: e9 35 01 00 00 jmp 139e25 } if ( length == RTEMS_PERIOD_STATUS ) { 139cf0: 85 db test %ebx,%ebx 139cf2: 75 1b jne 139d0f switch ( the_period->state ) { 139cf4: 8b 47 38 mov 0x38(%edi),%eax 139cf7: 31 f6 xor %esi,%esi 139cf9: 83 f8 04 cmp $0x4,%eax 139cfc: 77 07 ja 139d05 <== NEVER TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 139cfe: 0f b6 b0 70 03 16 00 movzbl 0x160370(%eax),%esi case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 139d05: e8 a6 86 fd ff call 1123b0 <_Thread_Enable_dispatch> return( return_value ); 139d0a: e9 16 01 00 00 jmp 139e25 } _ISR_Disable( level ); 139d0f: 9c pushf 139d10: fa cli 139d11: 8f 45 d4 popl -0x2c(%ebp) if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { 139d14: 8b 47 38 mov 0x38(%edi),%eax 139d17: 85 c0 test %eax,%eax 139d19: 75 4c jne 139d67 _ISR_Enable( level ); 139d1b: ff 75 d4 pushl -0x2c(%ebp) 139d1e: 9d popf the_period->next_length = length; 139d1f: 89 5f 3c mov %ebx,0x3c(%edi) /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 139d22: 83 ec 0c sub $0xc,%esp 139d25: 57 push %edi 139d26: e8 66 fe ff ff call 139b91 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 139d2b: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 139d32: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 139d39: c7 47 2c 30 9e 13 00 movl $0x139e30,0x2c(%edi) the_watchdog->id = id; 139d40: 89 77 30 mov %esi,0x30(%edi) the_watchdog->user_data = user_data; 139d43: c7 47 34 00 00 00 00 movl $0x0,0x34(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 139d4a: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 139d4d: 58 pop %eax 139d4e: 5a pop %edx _Rate_monotonic_Timeout, id, NULL ); _Watchdog_Insert_ticks( &the_period->Timer, length ); 139d4f: 83 c7 10 add $0x10,%edi 139d52: 57 push %edi 139d53: 68 88 b6 18 00 push $0x18b688 139d58: e8 3f 91 fd ff call 112e9c <_Watchdog_Insert> _Thread_Enable_dispatch(); 139d5d: e8 4e 86 fd ff call 1123b0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 139d62: 83 c4 10 add $0x10,%esp 139d65: eb 65 jmp 139dcc } if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { 139d67: 83 f8 02 cmp $0x2,%eax 139d6a: 75 64 jne 139dd0 /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 139d6c: 83 ec 0c sub $0xc,%esp 139d6f: 57 push %edi 139d70: e8 98 fe ff ff call 139c0d <_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; 139d75: c7 47 38 01 00 00 00 movl $0x1,0x38(%edi) the_period->next_length = length; 139d7c: 89 5f 3c mov %ebx,0x3c(%edi) _ISR_Enable( level ); 139d7f: ff 75 d4 pushl -0x2c(%ebp) 139d82: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 139d83: a1 e0 b7 18 00 mov 0x18b7e0,%eax 139d88: 8b 57 08 mov 0x8(%edi),%edx 139d8b: 89 50 20 mov %edx,0x20(%eax) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 139d8e: 5b pop %ebx 139d8f: 5e pop %esi 139d90: 68 00 40 00 00 push $0x4000 139d95: 50 push %eax 139d96: e8 3d 8d fd ff call 112ad8 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 139d9b: 9c pushf 139d9c: fa cli 139d9d: 5a pop %edx local_state = the_period->state; 139d9e: 8b 47 38 mov 0x38(%edi),%eax the_period->state = RATE_MONOTONIC_ACTIVE; 139da1: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) _ISR_Enable( level ); 139da8: 52 push %edx 139da9: 9d popf /* * 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 ) 139daa: 83 c4 10 add $0x10,%esp 139dad: 83 f8 03 cmp $0x3,%eax 139db0: 75 15 jne 139dc7 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 139db2: 51 push %ecx 139db3: 51 push %ecx 139db4: 68 00 40 00 00 push $0x4000 139db9: ff 35 e0 b7 18 00 pushl 0x18b7e0 139dbf: e8 b8 82 fd ff call 11207c <_Thread_Clear_state> 139dc4: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 139dc7: e8 e4 85 fd ff call 1123b0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 139dcc: 31 f6 xor %esi,%esi 139dce: eb 55 jmp 139e25 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 139dd0: be 04 00 00 00 mov $0x4,%esi _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { 139dd5: 83 f8 04 cmp $0x4,%eax 139dd8: 75 4b jne 139e25 <== NEVER TAKEN /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 139dda: 83 ec 0c sub $0xc,%esp 139ddd: 57 push %edi 139dde: e8 2a fe ff ff call 139c0d <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 139de3: ff 75 d4 pushl -0x2c(%ebp) 139de6: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 139de7: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) the_period->next_length = length; 139dee: 89 5f 3c mov %ebx,0x3c(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 139df1: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 139df4: 59 pop %ecx 139df5: 5b pop %ebx _Watchdog_Insert_ticks( &the_period->Timer, length ); 139df6: 8d 47 10 lea 0x10(%edi),%eax 139df9: 50 push %eax 139dfa: 68 88 b6 18 00 push $0x18b688 139dff: e8 98 90 fd ff call 112e9c <_Watchdog_Insert> 139e04: 58 pop %eax 139e05: 5a pop %edx 139e06: ff 77 3c pushl 0x3c(%edi) 139e09: ff 77 40 pushl 0x40(%edi) 139e0c: ff 15 8c 3d 18 00 call *0x183d8c _Scheduler_Release_job(the_period->owner, the_period->next_length); _Thread_Enable_dispatch(); 139e12: e8 99 85 fd ff call 1123b0 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 139e17: 83 c4 10 add $0x10,%esp 139e1a: 66 be 06 00 mov $0x6,%si 139e1e: eb 05 jmp 139e25 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 139e20: be 04 00 00 00 mov $0x4,%esi } 139e25: 89 f0 mov %esi,%eax 139e27: 8d 65 f4 lea -0xc(%ebp),%esp 139e2a: 5b pop %ebx 139e2b: 5e pop %esi 139e2c: 5f pop %edi 139e2d: 5d pop %ebp 139e2e: c3 ret =============================================================================== 001283e4 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 1283e4: 55 push %ebp 1283e5: 89 e5 mov %esp,%ebp 1283e7: 57 push %edi 1283e8: 56 push %esi 1283e9: 53 push %ebx 1283ea: 83 ec 7c sub $0x7c,%esp 1283ed: 8b 5d 08 mov 0x8(%ebp),%ebx 1283f0: 8b 7d 0c mov 0xc(%ebp),%edi rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 1283f3: 85 ff test %edi,%edi 1283f5: 0f 84 44 01 00 00 je 12853f <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 1283fb: 56 push %esi 1283fc: 56 push %esi 1283fd: 68 7c b9 15 00 push $0x15b97c 128402: 53 push %ebx 128403: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 128405: 58 pop %eax 128406: 5a pop %edx 128407: 68 9a b9 15 00 push $0x15b99a 12840c: 53 push %ebx 12840d: ff d7 call *%edi (*print)( context, "--- Wall times are in seconds ---\n" ); 12840f: 59 pop %ecx 128410: 5e pop %esi 128411: 68 bc b9 15 00 push $0x15b9bc 128416: 53 push %ebx 128417: ff d7 call *%edi Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 128419: 58 pop %eax 12841a: 5a pop %edx 12841b: 68 df b9 15 00 push $0x15b9df 128420: 53 push %ebx 128421: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 128423: 59 pop %ecx 128424: 5e pop %esi 128425: 68 2a ba 15 00 push $0x15ba2a 12842a: 53 push %ebx 12842b: ff d7 call *%edi /* * 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 ; 12842d: 8b 35 a8 ba 18 00 mov 0x18baa8,%esi 128433: 83 c4 10 add $0x10,%esp 128436: 89 bd 78 ff ff ff mov %edi,-0x88(%ebp) 12843c: e9 f2 00 00 00 jmp 128533 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 128441: 51 push %ecx 128442: 51 push %ecx 128443: 8d 45 88 lea -0x78(%ebp),%eax 128446: 50 push %eax 128447: 56 push %esi 128448: e8 27 14 01 00 call 139874 if ( status != RTEMS_SUCCESSFUL ) 12844d: 83 c4 10 add $0x10,%esp 128450: 85 c0 test %eax,%eax 128452: 0f 85 da 00 00 00 jne 128532 #if defined(RTEMS_DEBUG) status = rtems_rate_monotonic_get_status( id, &the_status ); if ( status != RTEMS_SUCCESSFUL ) continue; #else (void) rtems_rate_monotonic_get_status( id, &the_status ); 128458: 57 push %edi 128459: 57 push %edi 12845a: 8d 55 c0 lea -0x40(%ebp),%edx 12845d: 52 push %edx 12845e: 56 push %esi 12845f: e8 98 15 01 00 call 1399fc #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 128464: 83 c4 0c add $0xc,%esp 128467: 8d 55 e3 lea -0x1d(%ebp),%edx 12846a: 52 push %edx 12846b: 6a 05 push $0x5 12846d: ff 75 c0 pushl -0x40(%ebp) 128470: 89 55 84 mov %edx,-0x7c(%ebp) 128473: e8 b8 76 fe ff call 10fb30 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 128478: 58 pop %eax 128479: 5a pop %edx 12847a: ff 75 8c pushl -0x74(%ebp) 12847d: ff 75 88 pushl -0x78(%ebp) 128480: 8b 55 84 mov -0x7c(%ebp),%edx 128483: 52 push %edx 128484: 56 push %esi 128485: 68 76 ba 15 00 push $0x15ba76 12848a: 53 push %ebx 12848b: ff 95 78 ff ff ff call *-0x88(%ebp) ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 128491: 8b 45 88 mov -0x78(%ebp),%eax 128494: 83 c4 20 add $0x20,%esp 128497: 85 c0 test %eax,%eax 128499: 75 16 jne 1284b1 (*print)( context, "\n" ); 12849b: 51 push %ecx 12849c: 51 push %ecx 12849d: 68 a2 d0 15 00 push $0x15d0a2 1284a2: 53 push %ebx 1284a3: ff 95 78 ff ff ff call *-0x88(%ebp) continue; 1284a9: 83 c4 10 add $0x10,%esp 1284ac: e9 81 00 00 00 jmp 128532 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 ); 1284b1: 52 push %edx 1284b2: 8d 4d d8 lea -0x28(%ebp),%ecx 1284b5: 51 push %ecx 1284b6: 50 push %eax { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ 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; 1284b7: 8d 45 a0 lea -0x60(%ebp),%eax _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 1284ba: 50 push %eax 1284bb: 89 4d 84 mov %ecx,-0x7c(%ebp) 1284be: e8 95 0f 00 00 call 129458 <_Timespec_Divide_by_integer> (*print)( context, 1284c3: 8b 45 dc mov -0x24(%ebp),%eax 1284c6: bf e8 03 00 00 mov $0x3e8,%edi 1284cb: 99 cltd 1284cc: f7 ff idiv %edi 1284ce: 50 push %eax 1284cf: ff 75 d8 pushl -0x28(%ebp) 1284d2: 8b 45 9c mov -0x64(%ebp),%eax 1284d5: 99 cltd 1284d6: f7 ff idiv %edi 1284d8: 50 push %eax 1284d9: ff 75 98 pushl -0x68(%ebp) 1284dc: 8b 45 94 mov -0x6c(%ebp),%eax 1284df: 99 cltd 1284e0: f7 ff idiv %edi 1284e2: 50 push %eax 1284e3: ff 75 90 pushl -0x70(%ebp) 1284e6: 68 8d ba 15 00 push $0x15ba8d 1284eb: 53 push %ebx 1284ec: ff 95 78 ff ff ff call *-0x88(%ebp) 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); 1284f2: 83 c4 2c add $0x2c,%esp 1284f5: 8b 4d 84 mov -0x7c(%ebp),%ecx 1284f8: 51 push %ecx 1284f9: ff 75 88 pushl -0x78(%ebp) { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ 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; 1284fc: 8d 45 b8 lea -0x48(%ebp),%eax _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 1284ff: 50 push %eax 128500: e8 53 0f 00 00 call 129458 <_Timespec_Divide_by_integer> (*print)( context, 128505: 8b 45 dc mov -0x24(%ebp),%eax 128508: 99 cltd 128509: f7 ff idiv %edi 12850b: 50 push %eax 12850c: ff 75 d8 pushl -0x28(%ebp) 12850f: 8b 45 b4 mov -0x4c(%ebp),%eax 128512: 99 cltd 128513: f7 ff idiv %edi 128515: 50 push %eax 128516: ff 75 b0 pushl -0x50(%ebp) 128519: 8b 45 ac mov -0x54(%ebp),%eax 12851c: 99 cltd 12851d: f7 ff idiv %edi 12851f: 50 push %eax 128520: ff 75 a8 pushl -0x58(%ebp) 128523: 68 ac ba 15 00 push $0x15baac 128528: 53 push %ebx 128529: ff 95 78 ff ff ff call *-0x88(%ebp) 12852f: 83 c4 30 add $0x30,%esp * 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++ ) { 128532: 46 inc %esi /* * 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 ; 128533: 3b 35 ac ba 18 00 cmp 0x18baac,%esi 128539: 0f 86 02 ff ff ff jbe 128441 the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 12853f: 8d 65 f4 lea -0xc(%ebp),%esp 128542: 5b pop %ebx 128543: 5e pop %esi 128544: 5f pop %edi 128545: 5d pop %ebp 128546: c3 ret =============================================================================== 00109858 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 109858: 55 push %ebp 109859: 89 e5 mov %esp,%ebp 10985b: 57 push %edi 10985c: 56 push %esi 10985d: 53 push %ebx 10985e: 83 ec 3c sub $0x3c,%esp 109861: 8b 7d 0c mov 0xc(%ebp),%edi 109864: 8b 5d 10 mov 0x10(%ebp),%ebx CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 109867: b8 03 00 00 00 mov $0x3,%eax register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) 10986c: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 109870: 0f 84 72 01 00 00 je 1099e8 <== NEVER TAKEN return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 109876: b0 09 mov $0x9,%al CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 109878: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 10987c: 0f 84 66 01 00 00 je 1099e8 <== NEVER TAKEN return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 109882: 89 d9 mov %ebx,%ecx 109884: 81 e1 c0 00 00 00 and $0xc0,%ecx 10988a: 74 25 je 1098b1 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); 10988c: 89 da mov %ebx,%edx 10988e: 83 e2 30 and $0x30,%edx _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; 109891: b0 0b mov $0xb,%al #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 109893: 83 fa 10 cmp $0x10,%edx 109896: 0f 85 4c 01 00 00 jne 1099e8 <== NEVER TAKEN 10989c: f6 c3 04 test $0x4,%bl 10989f: 0f 84 43 01 00 00 je 1099e8 <== NEVER TAKEN _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 1098a5: 81 f9 c0 00 00 00 cmp $0xc0,%ecx 1098ab: 0f 84 37 01 00 00 je 1099e8 <== NEVER TAKEN _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 1098b1: 89 da mov %ebx,%edx 1098b3: 83 e2 30 and $0x30,%edx 1098b6: 74 0e je 1098c6 return RTEMS_INVALID_NUMBER; 1098b8: b8 0a 00 00 00 mov $0xa,%eax if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 1098bd: 83 ff 01 cmp $0x1,%edi 1098c0: 0f 87 22 01 00 00 ja 1099e8 <== NEVER TAKEN * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 1098c6: a1 a4 f2 12 00 mov 0x12f2a4,%eax 1098cb: 40 inc %eax 1098cc: a3 a4 f2 12 00 mov %eax,0x12f2a4 return _Thread_Dispatch_disable_level; 1098d1: a1 a4 f2 12 00 mov 0x12f2a4,%eax * This function allocates a semaphore control block from * the inactive chain of free semaphore control blocks. */ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) { return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); 1098d6: 83 ec 0c sub $0xc,%esp 1098d9: 68 f8 f1 12 00 push $0x12f1f8 1098de: 89 55 c4 mov %edx,-0x3c(%ebp) 1098e1: e8 3a 12 00 00 call 10ab20 <_Objects_Allocate> 1098e6: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 1098e8: 83 c4 10 add $0x10,%esp 1098eb: 85 c0 test %eax,%eax 1098ed: 8b 55 c4 mov -0x3c(%ebp),%edx 1098f0: 75 0f jne 109901 _Thread_Enable_dispatch(); 1098f2: e8 5d 21 00 00 call 10ba54 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 1098f7: b8 05 00 00 00 mov $0x5,%eax 1098fc: e9 e7 00 00 00 jmp 1099e8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 109901: 89 58 10 mov %ebx,0x10(%eax) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 109904: 85 d2 test %edx,%edx 109906: 75 37 jne 10993f /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 109908: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 10990f: 31 c0 xor %eax,%eax 109911: 80 e3 04 and $0x4,%bl 109914: 0f 95 c0 setne %al 109917: 89 45 e4 mov %eax,-0x1c(%ebp) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10991a: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 109921: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) _CORE_semaphore_Initialize( 109928: 51 push %ecx 109929: 57 push %edi 10992a: 8d 45 e0 lea -0x20(%ebp),%eax 10992d: 50 push %eax 10992e: 8d 46 14 lea 0x14(%esi),%eax 109931: 50 push %eax 109932: e8 b5 0c 00 00 call 10a5ec <_CORE_semaphore_Initialize> 109937: 83 c4 10 add $0x10,%esp 10993a: e9 88 00 00 00 jmp 1099c7 /* * It is either simple binary semaphore or a more powerful mutex * style binary semaphore. This is the mutex style. */ if ( _Attributes_Is_priority( attribute_set ) ) the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 10993f: 31 c0 xor %eax,%eax 109941: f6 c3 04 test $0x4,%bl 109944: 0f 95 c0 setne %al 109947: 89 45 d8 mov %eax,-0x28(%ebp) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 10994a: 83 fa 10 cmp $0x10,%edx 10994d: 75 34 jne 109983 the_mutex_attr.priority_ceiling = priority_ceiling; 10994f: 8b 55 14 mov 0x14(%ebp),%edx 109952: 89 55 dc mov %edx,-0x24(%ebp) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 109955: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10995c: c6 45 d4 00 movb $0x0,-0x2c(%ebp) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 109960: 48 dec %eax 109961: 75 2b jne 10998e if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 109963: f6 c3 40 test $0x40,%bl 109966: 74 09 je 109971 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 109968: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp) 10996f: eb 0c jmp 10997d the_mutex_attr.only_owner_release = true; } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { 109971: 80 e3 80 and $0x80,%bl 109974: 74 18 je 10998e the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 109976: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10997d: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 109981: eb 0b jmp 10998e } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 109983: c7 45 d0 01 00 00 00 movl $0x1,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10998a: c6 45 d4 00 movb $0x0,-0x2c(%ebp) } mutex_status = _CORE_mutex_Initialize( 10998e: 52 push %edx 10998f: 31 c0 xor %eax,%eax 109991: 4f dec %edi 109992: 0f 94 c0 sete %al 109995: 50 push %eax 109996: 8d 45 d0 lea -0x30(%ebp),%eax 109999: 50 push %eax 10999a: 8d 46 14 lea 0x14(%esi),%eax 10999d: 50 push %eax 10999e: e8 c1 09 00 00 call 10a364 <_CORE_mutex_Initialize> &the_semaphore->Core_control.mutex, &the_mutex_attr, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 1099a3: 83 c4 10 add $0x10,%esp 1099a6: 83 f8 05 cmp $0x5,%eax 1099a9: 75 1c jne 1099c7 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 1099ab: 50 push %eax 1099ac: 50 push %eax 1099ad: 56 push %esi 1099ae: 68 f8 f1 12 00 push $0x12f1f8 1099b3: e8 54 14 00 00 call 10ae0c <_Objects_Free> _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 1099b8: e8 97 20 00 00 call 10ba54 <_Thread_Enable_dispatch> return RTEMS_INVALID_PRIORITY; 1099bd: 83 c4 10 add $0x10,%esp 1099c0: b8 13 00 00 00 mov $0x13,%eax 1099c5: eb 21 jmp 1099e8 Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 1099c7: 8b 46 08 mov 0x8(%esi),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 1099ca: 0f b7 c8 movzwl %ax,%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1099cd: 8b 15 14 f2 12 00 mov 0x12f214,%edx 1099d3: 89 34 8a mov %esi,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1099d6: 8b 55 08 mov 0x8(%ebp),%edx 1099d9: 89 56 0c mov %edx,0xc(%esi) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 1099dc: 8b 55 18 mov 0x18(%ebp),%edx 1099df: 89 02 mov %eax,(%edx) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 1099e1: e8 6e 20 00 00 call 10ba54 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1099e6: 31 c0 xor %eax,%eax } 1099e8: 8d 65 f4 lea -0xc(%ebp),%esp 1099eb: 5b pop %ebx 1099ec: 5e pop %esi 1099ed: 5f pop %edi 1099ee: 5d pop %ebp 1099ef: c3 ret =============================================================================== 001153b0 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 1153b0: 55 push %ebp 1153b1: 89 e5 mov %esp,%ebp 1153b3: 53 push %ebx 1153b4: 83 ec 14 sub $0x14,%esp 1153b7: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; 1153ba: b8 0a 00 00 00 mov $0xa,%eax register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 1153bf: 85 db test %ebx,%ebx 1153c1: 74 6d je 115430 return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 1153c3: 50 push %eax 1153c4: 50 push %eax 1153c5: 8d 45 f4 lea -0xc(%ebp),%eax 1153c8: 50 push %eax 1153c9: ff 75 08 pushl 0x8(%ebp) 1153cc: e8 d3 3a 00 00 call 118ea4 <_Thread_Get> switch ( location ) { 1153d1: 83 c4 10 add $0x10,%esp 1153d4: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 1153d8: 75 51 jne 11542b case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 1153da: 8b 90 e0 00 00 00 mov 0xe0(%eax),%edx asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 1153e0: 83 7a 0c 00 cmpl $0x0,0xc(%edx) 1153e4: 74 39 je 11541f if ( asr->is_enabled ) { 1153e6: 80 7a 08 00 cmpb $0x0,0x8(%edx) 1153ea: 74 22 je 11540e rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 1153ec: 9c pushf 1153ed: fa cli 1153ee: 59 pop %ecx *signal_set |= signals; 1153ef: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 1153f2: 51 push %ecx 1153f3: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 1153f4: 83 3d 6c d8 14 00 00 cmpl $0x0,0x14d86c 1153fb: 74 19 je 115416 1153fd: 3b 05 70 d8 14 00 cmp 0x14d870,%eax 115403: 75 11 jne 115416 <== NEVER TAKEN _Thread_Dispatch_necessary = true; 115405: c6 05 7c d8 14 00 01 movb $0x1,0x14d87c 11540c: eb 08 jmp 115416 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 11540e: 9c pushf 11540f: fa cli 115410: 58 pop %eax *signal_set |= signals; 115411: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 115414: 50 push %eax 115415: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 115416: e8 69 3a 00 00 call 118e84 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11541b: 31 c0 xor %eax,%eax 11541d: eb 11 jmp 115430 } _Thread_Enable_dispatch(); 11541f: e8 60 3a 00 00 call 118e84 <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 115424: b8 0b 00 00 00 mov $0xb,%eax 115429: eb 05 jmp 115430 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 11542b: b8 04 00 00 00 mov $0x4,%eax } 115430: 8b 5d fc mov -0x4(%ebp),%ebx 115433: c9 leave 115434: c3 ret =============================================================================== 0010fe04 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 10fe04: 55 push %ebp 10fe05: 89 e5 mov %esp,%ebp 10fe07: 57 push %edi 10fe08: 56 push %esi 10fe09: 53 push %ebx 10fe0a: 83 ec 1c sub $0x1c,%esp 10fe0d: 8b 4d 10 mov 0x10(%ebp),%ecx bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; 10fe10: b8 09 00 00 00 mov $0x9,%eax ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 10fe15: 85 c9 test %ecx,%ecx 10fe17: 0f 84 fb 00 00 00 je 10ff18 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 10fe1d: 8b 35 b8 f4 12 00 mov 0x12f4b8,%esi api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10fe23: 8b 9e e0 00 00 00 mov 0xe0(%esi),%ebx asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 10fe29: 80 7e 70 01 cmpb $0x1,0x70(%esi) 10fe2d: 19 ff sbb %edi,%edi 10fe2f: 81 e7 00 01 00 00 and $0x100,%edi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 10fe35: 83 7e 78 00 cmpl $0x0,0x78(%esi) 10fe39: 74 06 je 10fe41 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 10fe3b: 81 cf 00 02 00 00 or $0x200,%edi old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 10fe41: 80 7b 08 01 cmpb $0x1,0x8(%ebx) 10fe45: 19 d2 sbb %edx,%edx 10fe47: 81 e2 00 04 00 00 and $0x400,%edx old_mode |= _ISR_Get_level(); 10fe4d: 89 55 e4 mov %edx,-0x1c(%ebp) 10fe50: 89 4d e0 mov %ecx,-0x20(%ebp) 10fe53: e8 d6 cc ff ff call 10cb2e <_CPU_ISR_Get_level> if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 10fe58: 8b 55 e4 mov -0x1c(%ebp),%edx 10fe5b: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); 10fe5d: 09 f8 or %edi,%eax 10fe5f: 8b 4d e0 mov -0x20(%ebp),%ecx 10fe62: 89 01 mov %eax,(%ecx) *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 10fe64: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 10fe6b: 74 0b je 10fe78 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 10fe6d: f7 45 08 00 01 00 00 testl $0x100,0x8(%ebp) 10fe74: 0f 94 46 70 sete 0x70(%esi) if ( mask & RTEMS_TIMESLICE_MASK ) { 10fe78: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 10fe7f: 74 21 je 10fea2 if ( _Modes_Is_timeslice(mode_set) ) { 10fe81: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 10fe88: 74 11 je 10fe9b executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 10fe8a: c7 46 78 01 00 00 00 movl $0x1,0x78(%esi) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10fe91: a1 78 f2 12 00 mov 0x12f278,%eax 10fe96: 89 46 74 mov %eax,0x74(%esi) 10fe99: eb 07 jmp 10fea2 } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 10fe9b: c7 46 78 00 00 00 00 movl $0x0,0x78(%esi) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 10fea2: f6 45 0c 01 testb $0x1,0xc(%ebp) 10fea6: 74 0a je 10feb2 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 10fea8: f6 45 08 01 testb $0x1,0x8(%ebp) 10feac: 74 03 je 10feb1 10feae: fa cli 10feaf: eb 01 jmp 10feb2 10feb1: fb sti /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 10feb2: 31 c9 xor %ecx,%ecx if ( mask & RTEMS_ASR_MASK ) { 10feb4: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 10febb: 74 2a je 10fee7 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 10febd: f7 45 08 00 04 00 00 testl $0x400,0x8(%ebp) 10fec4: 0f 94 c0 sete %al is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { 10fec7: 3a 43 08 cmp 0x8(%ebx),%al 10feca: 74 1b je 10fee7 asr->is_enabled = is_asr_enabled; 10fecc: 88 43 08 mov %al,0x8(%ebx) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 10fecf: 9c pushf 10fed0: fa cli 10fed1: 58 pop %eax _signals = information->signals_pending; 10fed2: 8b 53 18 mov 0x18(%ebx),%edx information->signals_pending = information->signals_posted; 10fed5: 8b 4b 14 mov 0x14(%ebx),%ecx 10fed8: 89 4b 18 mov %ecx,0x18(%ebx) information->signals_posted = _signals; 10fedb: 89 53 14 mov %edx,0x14(%ebx) _ISR_Enable( _level ); 10fede: 50 push %eax 10fedf: 9d popf /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 10fee0: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10fee4: 0f 95 c1 setne %cl if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; 10fee7: 31 c0 xor %eax,%eax needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 10fee9: 83 3d f8 f3 12 00 03 cmpl $0x3,0x12f3f8 10fef0: 75 26 jne 10ff18 bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; 10fef2: 8b 15 b8 f4 12 00 mov 0x12f4b8,%edx if ( are_signals_pending || 10fef8: 84 c9 test %cl,%cl 10fefa: 75 0e jne 10ff0a 10fefc: 3b 15 bc f4 12 00 cmp 0x12f4bc,%edx 10ff02: 74 14 je 10ff18 (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { 10ff04: 80 7a 70 00 cmpb $0x0,0x70(%edx) 10ff08: 74 0e je 10ff18 <== NEVER TAKEN _Thread_Dispatch_necessary = true; 10ff0a: c6 05 c4 f4 12 00 01 movb $0x1,0x12f4c4 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); 10ff11: e8 fe b9 ff ff call 10b914 <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; 10ff16: 31 c0 xor %eax,%eax } 10ff18: 83 c4 1c add $0x1c,%esp 10ff1b: 5b pop %ebx 10ff1c: 5e pop %esi 10ff1d: 5f pop %edi 10ff1e: 5d pop %ebp 10ff1f: c3 ret =============================================================================== 0010d25c : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10d25c: 55 push %ebp 10d25d: 89 e5 mov %esp,%ebp 10d25f: 56 push %esi 10d260: 53 push %ebx 10d261: 83 ec 10 sub $0x10,%esp 10d264: 8b 5d 0c mov 0xc(%ebp),%ebx 10d267: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10d26a: 85 db test %ebx,%ebx 10d26c: 74 10 je 10d27e RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 10d26e: 0f b6 15 3c f4 12 00 movzbl 0x12f43c,%edx !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; 10d275: b8 13 00 00 00 mov $0x13,%eax ) { register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10d27a: 39 d3 cmp %edx,%ebx 10d27c: 77 52 ja 10d2d0 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) return RTEMS_INVALID_ADDRESS; 10d27e: b8 09 00 00 00 mov $0x9,%eax if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10d283: 85 f6 test %esi,%esi 10d285: 74 49 je 10d2d0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10d287: 51 push %ecx 10d288: 51 push %ecx 10d289: 8d 45 f4 lea -0xc(%ebp),%eax 10d28c: 50 push %eax 10d28d: ff 75 08 pushl 0x8(%ebp) 10d290: e8 ab 1d 00 00 call 10f040 <_Thread_Get> switch ( location ) { 10d295: 83 c4 10 add $0x10,%esp 10d298: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10d29c: 75 2d jne 10d2cb case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10d29e: 8b 50 14 mov 0x14(%eax),%edx 10d2a1: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10d2a3: 85 db test %ebx,%ebx 10d2a5: 74 1b je 10d2c2 the_thread->real_priority = new_priority; 10d2a7: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10d2aa: 83 78 1c 00 cmpl $0x0,0x1c(%eax) 10d2ae: 74 05 je 10d2b5 10d2b0: 39 58 14 cmp %ebx,0x14(%eax) 10d2b3: 76 0d jbe 10d2c2 <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); 10d2b5: 52 push %edx 10d2b6: 6a 00 push $0x0 10d2b8: 53 push %ebx 10d2b9: 50 push %eax 10d2ba: e8 6d 19 00 00 call 10ec2c <_Thread_Change_priority> 10d2bf: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10d2c2: e8 59 1d 00 00 call 10f020 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d2c7: 31 c0 xor %eax,%eax 10d2c9: eb 05 jmp 10d2d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d2cb: b8 04 00 00 00 mov $0x4,%eax } 10d2d0: 8d 65 f8 lea -0x8(%ebp),%esp 10d2d3: 5b pop %ebx 10d2d4: 5e pop %esi 10d2d5: 5d pop %ebp 10d2d6: c3 ret =============================================================================== 00115c24 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 115c24: 55 push %ebp 115c25: 89 e5 mov %esp,%ebp 115c27: 83 ec 1c sub $0x1c,%esp Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); 115c2a: 8d 45 f4 lea -0xc(%ebp),%eax RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 115c2d: 50 push %eax 115c2e: ff 75 08 pushl 0x8(%ebp) 115c31: 68 f0 d8 14 00 push $0x14d8f0 115c36: e8 39 27 00 00 call 118374 <_Objects_Get> switch ( location ) { 115c3b: 83 c4 10 add $0x10,%esp 115c3e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 115c42: 75 1e jne 115c62 case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 115c44: 83 78 38 04 cmpl $0x4,0x38(%eax) 115c48: 74 0f je 115c59 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 115c4a: 83 ec 0c sub $0xc,%esp 115c4d: 83 c0 10 add $0x10,%eax 115c50: 50 push %eax 115c51: e8 de 3f 00 00 call 119c34 <_Watchdog_Remove> 115c56: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 115c59: e8 26 32 00 00 call 118e84 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115c5e: 31 c0 xor %eax,%eax 115c60: eb 05 jmp 115c67 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115c62: b8 04 00 00 00 mov $0x4,%eax } 115c67: c9 leave 115c68: c3 ret =============================================================================== 001160b8 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 1160b8: 55 push %ebp 1160b9: 89 e5 mov %esp,%ebp 1160bb: 57 push %edi 1160bc: 56 push %esi 1160bd: 53 push %ebx 1160be: 83 ec 2c sub $0x2c,%esp 1160c1: 8b 55 0c mov 0xc(%ebp),%edx 1160c4: 8b 7d 10 mov 0x10(%ebp),%edi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 1160c7: 8b 35 30 d9 14 00 mov 0x14d930,%esi if ( !timer_server ) return RTEMS_INCORRECT_STATE; 1160cd: bb 0e 00 00 00 mov $0xe,%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 1160d2: 85 f6 test %esi,%esi 1160d4: 0f 84 e0 00 00 00 je 1161ba return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 1160da: b3 0b mov $0xb,%bl Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 1160dc: 80 3d 64 d6 14 00 00 cmpb $0x0,0x14d664 1160e3: 0f 84 d1 00 00 00 je 1161ba <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; 1160e9: b3 09 mov $0x9,%bl return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) 1160eb: 85 ff test %edi,%edi 1160ed: 0f 84 c7 00 00 00 je 1161ba return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 1160f3: 83 ec 0c sub $0xc,%esp 1160f6: 52 push %edx 1160f7: 89 55 d0 mov %edx,-0x30(%ebp) 1160fa: e8 fd d4 ff ff call 1135fc <_TOD_Validate> 1160ff: 83 c4 10 add $0x10,%esp return RTEMS_INVALID_CLOCK; 116102: b3 14 mov $0x14,%bl return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 116104: 84 c0 test %al,%al 116106: 8b 55 d0 mov -0x30(%ebp),%edx 116109: 0f 84 ab 00 00 00 je 1161ba return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 11610f: 83 ec 0c sub $0xc,%esp 116112: 52 push %edx 116113: e8 70 d4 ff ff call 113588 <_TOD_To_seconds> 116118: 89 45 d4 mov %eax,-0x2c(%ebp) 11611b: 6a 00 push $0x0 11611d: 68 00 ca 9a 3b push $0x3b9aca00 116122: ff 35 e4 d6 14 00 pushl 0x14d6e4 116128: ff 35 e0 d6 14 00 pushl 0x14d6e0 11612e: e8 bd 3d 01 00 call 129ef0 <__divdi3> if ( seconds <= _TOD_Seconds_since_epoch() ) 116133: 83 c4 20 add $0x20,%esp 116136: 39 45 d4 cmp %eax,-0x2c(%ebp) 116139: 76 7f jbe 1161ba 11613b: 50 push %eax return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); 11613c: 8d 45 e4 lea -0x1c(%ebp),%eax 11613f: 50 push %eax 116140: ff 75 08 pushl 0x8(%ebp) 116143: 68 f0 d8 14 00 push $0x14d8f0 116148: e8 27 22 00 00 call 118374 <_Objects_Get> 11614d: 89 c3 mov %eax,%ebx switch ( location ) { 11614f: 83 c4 10 add $0x10,%esp 116152: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 116156: 75 5d jne 1161b5 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 116158: 83 ec 0c sub $0xc,%esp 11615b: 8d 40 10 lea 0x10(%eax),%eax 11615e: 50 push %eax 11615f: e8 d0 3a 00 00 call 119c34 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 116164: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11616b: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) the_watchdog->routine = routine; 116172: 89 7b 2c mov %edi,0x2c(%ebx) the_watchdog->id = id; 116175: 8b 45 08 mov 0x8(%ebp),%eax 116178: 89 43 30 mov %eax,0x30(%ebx) the_watchdog->user_data = user_data; 11617b: 8b 45 14 mov 0x14(%ebp),%eax 11617e: 89 43 34 mov %eax,0x34(%ebx) 116181: 6a 00 push $0x0 116183: 68 00 ca 9a 3b push $0x3b9aca00 116188: ff 35 e4 d6 14 00 pushl 0x14d6e4 11618e: ff 35 e0 d6 14 00 pushl 0x14d6e0 116194: e8 57 3d 01 00 call 129ef0 <__divdi3> _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 116199: 8b 55 d4 mov -0x2c(%ebp),%edx 11619c: 29 c2 sub %eax,%edx 11619e: 89 53 1c mov %edx,0x1c(%ebx) (*timer_server->schedule_operation)( timer_server, the_timer ); 1161a1: 83 c4 18 add $0x18,%esp 1161a4: 53 push %ebx 1161a5: 56 push %esi 1161a6: ff 56 04 call *0x4(%esi) _Thread_Enable_dispatch(); 1161a9: e8 d6 2c 00 00 call 118e84 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1161ae: 83 c4 10 add $0x10,%esp 1161b1: 31 db xor %ebx,%ebx 1161b3: eb 05 jmp 1161ba #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1161b5: bb 04 00 00 00 mov $0x4,%ebx } 1161ba: 89 d8 mov %ebx,%eax 1161bc: 8d 65 f4 lea -0xc(%ebp),%esp 1161bf: 5b pop %ebx 1161c0: 5e pop %esi 1161c1: 5f pop %edi 1161c2: 5d pop %ebp 1161c3: c3 ret