=============================================================================== 00117a60 <_CORE_message_queue_Broadcast>: Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 117a60: 55 push %ebp 117a61: 89 e5 mov %esp,%ebp 117a63: 57 push %edi 117a64: 56 push %esi 117a65: 53 push %ebx 117a66: 83 ec 1c sub $0x1c,%esp 117a69: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 117a6c: b8 01 00 00 00 mov $0x1,%eax 117a71: 8b 55 10 mov 0x10(%ebp),%edx 117a74: 3b 53 4c cmp 0x4c(%ebx),%edx 117a77: 77 4c ja 117ac5 <_CORE_message_queue_Broadcast+0x65><== NEVER TAKEN * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 117a79: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 117a80: 83 7b 48 00 cmpl $0x0,0x48(%ebx) 117a84: 74 23 je 117aa9 <_CORE_message_queue_Broadcast+0x49> *count = 0; 117a86: 8b 45 1c mov 0x1c(%ebp),%eax 117a89: c7 00 00 00 00 00 movl $0x0,(%eax) 117a8f: eb 32 jmp 117ac3 <_CORE_message_queue_Broadcast+0x63> */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 117a91: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 117a94: 8b 42 2c mov 0x2c(%edx),%eax 117a97: 89 c7 mov %eax,%edi 117a99: 8b 75 0c mov 0xc(%ebp),%esi 117a9c: 8b 4d 10 mov 0x10(%ebp),%ecx 117a9f: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 117aa1: 8b 42 28 mov 0x28(%edx),%eax 117aa4: 8b 55 10 mov 0x10(%ebp),%edx 117aa7: 89 10 mov %edx,(%eax) * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 117aa9: 83 ec 0c sub $0xc,%esp 117aac: 53 push %ebx 117aad: e8 ae 20 00 00 call 119b60 <_Thread_queue_Dequeue> 117ab2: 89 c2 mov %eax,%edx /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 117ab4: 83 c4 10 add $0x10,%esp 117ab7: 85 c0 test %eax,%eax 117ab9: 75 d6 jne 117a91 <_CORE_message_queue_Broadcast+0x31> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 117abb: 8b 55 e4 mov -0x1c(%ebp),%edx 117abe: 8b 45 1c mov 0x1c(%ebp),%eax 117ac1: 89 10 mov %edx,(%eax) 117ac3: 31 c0 xor %eax,%eax return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 117ac5: 8d 65 f4 lea -0xc(%ebp),%esp 117ac8: 5b pop %ebx 117ac9: 5e pop %esi 117aca: 5f pop %edi 117acb: c9 leave 117acc: c3 ret =============================================================================== 001128d0 <_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 ) { 1128d0: 55 push %ebp 1128d1: 89 e5 mov %esp,%ebp 1128d3: 57 push %edi 1128d4: 56 push %esi 1128d5: 53 push %ebx 1128d6: 83 ec 0c sub $0xc,%esp 1128d9: 8b 5d 08 mov 0x8(%ebp),%ebx 1128dc: 8b 75 10 mov 0x10(%ebp),%esi 1128df: 8b 55 14 mov 0x14(%ebp),%edx size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 1128e2: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 1128e5: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 1128ec: 89 53 4c mov %edx,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)) { 1128ef: 89 d0 mov %edx,%eax 1128f1: f6 c2 03 test $0x3,%dl 1128f4: 74 0a je 112900 <_CORE_message_queue_Initialize+0x30> allocated_message_size += sizeof(uint32_t); 1128f6: 8d 42 04 lea 0x4(%edx),%eax allocated_message_size &= ~(sizeof(uint32_t) - 1); 1128f9: 83 e0 fc and $0xfffffffc,%eax } if (allocated_message_size < maximum_message_size) 1128fc: 39 d0 cmp %edx,%eax 1128fe: 72 5f jb 11295f <_CORE_message_queue_Initialize+0x8f><== NEVER TAKEN /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 112900: 8d 78 10 lea 0x10(%eax),%edi /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 112903: 89 fa mov %edi,%edx 112905: 0f af d6 imul %esi,%edx (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 112908: 39 c2 cmp %eax,%edx 11290a: 72 53 jb 11295f <_CORE_message_queue_Initialize+0x8f><== NEVER TAKEN return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 11290c: 83 ec 0c sub $0xc,%esp 11290f: 52 push %edx 112910: e8 5f 25 00 00 call 114e74 <_Workspace_Allocate> 112915: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 112918: 83 c4 10 add $0x10,%esp 11291b: 85 c0 test %eax,%eax 11291d: 74 40 je 11295f <_CORE_message_queue_Initialize+0x8f> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 11291f: 57 push %edi 112920: 56 push %esi 112921: 50 push %eax 112922: 8d 43 60 lea 0x60(%ebx),%eax 112925: 50 push %eax 112926: e8 21 4a 00 00 call 11734c <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11292b: 8d 43 54 lea 0x54(%ebx),%eax 11292e: 89 43 50 mov %eax,0x50(%ebx) the_chain->permanent_null = NULL; 112931: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_chain->last = _Chain_Head(the_chain); 112938: 8d 43 50 lea 0x50(%ebx),%eax 11293b: 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( 11293e: 6a 06 push $0x6 112940: 68 80 00 00 00 push $0x80 112945: 8b 45 0c mov 0xc(%ebp),%eax 112948: 83 38 01 cmpl $0x1,(%eax) 11294b: 0f 94 c0 sete %al 11294e: 0f b6 c0 movzbl %al,%eax 112951: 50 push %eax 112952: 53 push %ebx 112953: e8 28 1c 00 00 call 114580 <_Thread_queue_Initialize> 112958: b0 01 mov $0x1,%al THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 11295a: 83 c4 20 add $0x20,%esp 11295d: eb 02 jmp 112961 <_CORE_message_queue_Initialize+0x91> 11295f: 31 c0 xor %eax,%eax } 112961: 8d 65 f4 lea -0xc(%ebp),%esp 112964: 5b pop %ebx 112965: 5e pop %esi 112966: 5f pop %edi 112967: c9 leave 112968: c3 ret =============================================================================== 0011296c <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 11296c: 55 push %ebp 11296d: 89 e5 mov %esp,%ebp 11296f: 57 push %edi 112970: 56 push %esi 112971: 53 push %ebx 112972: 83 ec 2c sub $0x2c,%esp 112975: 8b 45 08 mov 0x8(%ebp),%eax 112978: 8b 55 0c mov 0xc(%ebp),%edx 11297b: 89 55 dc mov %edx,-0x24(%ebp) 11297e: 8b 55 10 mov 0x10(%ebp),%edx 112981: 89 55 e0 mov %edx,-0x20(%ebp) 112984: 8b 7d 14 mov 0x14(%ebp),%edi 112987: 8b 55 1c mov 0x1c(%ebp),%edx 11298a: 89 55 d4 mov %edx,-0x2c(%ebp) 11298d: 8a 55 18 mov 0x18(%ebp),%dl 112990: 88 55 db mov %dl,-0x25(%ebp) ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 112993: 8b 0d 14 dc 12 00 mov 0x12dc14,%ecx executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 112999: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) _ISR_Disable( level ); 1129a0: 9c pushf 1129a1: fa cli 1129a2: 8f 45 e4 popl -0x1c(%ebp) */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1129a5: 8b 50 50 mov 0x50(%eax),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1129a8: 8d 58 54 lea 0x54(%eax),%ebx 1129ab: 39 da cmp %ebx,%edx 1129ad: 74 47 je 1129f6 <_CORE_message_queue_Seize+0x8a> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 1129af: 8b 32 mov (%edx),%esi the_chain->first = new_first; 1129b1: 89 70 50 mov %esi,0x50(%eax) new_first->previous = _Chain_Head(the_chain); 1129b4: 8d 58 50 lea 0x50(%eax),%ebx 1129b7: 89 5e 04 mov %ebx,0x4(%esi) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 1129ba: 85 d2 test %edx,%edx 1129bc: 74 38 je 1129f6 <_CORE_message_queue_Seize+0x8a><== NEVER TAKEN the_message_queue->number_of_pending_messages -= 1; 1129be: ff 48 48 decl 0x48(%eax) _ISR_Enable( level ); 1129c1: ff 75 e4 pushl -0x1c(%ebp) 1129c4: 9d popf *size_p = the_message->Contents.size; 1129c5: 8b 4a 08 mov 0x8(%edx),%ecx 1129c8: 89 0f mov %ecx,(%edi) _Thread_Executing->Wait.count = 1129ca: 8b 0d 14 dc 12 00 mov 0x12dc14,%ecx 1129d0: c7 41 24 00 00 00 00 movl $0x0,0x24(%ecx) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 1129d7: 8d 72 0c lea 0xc(%edx),%esi 1129da: 8b 0f mov (%edi),%ecx 1129dc: 8b 7d e0 mov -0x20(%ebp),%edi 1129df: f3 a4 rep movsb %ds:(%esi),%es:(%edi) RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 1129e1: 89 55 0c mov %edx,0xc(%ebp) 1129e4: 83 c0 60 add $0x60,%eax 1129e7: 89 45 08 mov %eax,0x8(%ebp) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 1129ea: 83 c4 2c add $0x2c,%esp 1129ed: 5b pop %ebx 1129ee: 5e pop %esi 1129ef: 5f pop %edi 1129f0: c9 leave 1129f1: e9 5a fe ff ff jmp 112850 <_Chain_Append> return; } #endif } if ( !wait ) { 1129f6: 80 7d db 00 cmpb $0x0,-0x25(%ebp) 1129fa: 75 13 jne 112a0f <_CORE_message_queue_Seize+0xa3> _ISR_Enable( level ); 1129fc: ff 75 e4 pushl -0x1c(%ebp) 1129ff: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 112a00: c7 41 34 04 00 00 00 movl $0x4,0x34(%ecx) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 112a07: 83 c4 2c add $0x2c,%esp 112a0a: 5b pop %ebx 112a0b: 5e pop %esi 112a0c: 5f pop %edi 112a0d: c9 leave 112a0e: c3 ret 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; 112a0f: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax) executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 112a16: 89 41 44 mov %eax,0x44(%ecx) executing->Wait.id = id; 112a19: 8b 55 dc mov -0x24(%ebp),%edx 112a1c: 89 51 20 mov %edx,0x20(%ecx) executing->Wait.return_argument_second.mutable_object = buffer; 112a1f: 8b 55 e0 mov -0x20(%ebp),%edx 112a22: 89 51 2c mov %edx,0x2c(%ecx) executing->Wait.return_argument = size_p; 112a25: 89 79 28 mov %edi,0x28(%ecx) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 112a28: ff 75 e4 pushl -0x1c(%ebp) 112a2b: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 112a2c: c7 45 10 24 46 11 00 movl $0x114624,0x10(%ebp) 112a33: 8b 55 d4 mov -0x2c(%ebp),%edx 112a36: 89 55 0c mov %edx,0xc(%ebp) 112a39: 89 45 08 mov %eax,0x8(%ebp) } 112a3c: 83 c4 2c add $0x2c,%esp 112a3f: 5b pop %ebx 112a40: 5e pop %esi 112a41: 5f pop %edi 112a42: c9 leave executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 112a43: e9 20 19 00 00 jmp 114368 <_Thread_queue_Enqueue_with_handler> =============================================================================== 0010afe5 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10afe5: 55 push %ebp 10afe6: 89 e5 mov %esp,%ebp 10afe8: 53 push %ebx 10afe9: 83 ec 14 sub $0x14,%esp 10afec: 8b 5d 08 mov 0x8(%ebp),%ebx 10afef: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10aff2: a1 50 56 12 00 mov 0x125650,%eax 10aff7: 85 c0 test %eax,%eax 10aff9: 74 19 je 10b014 <_CORE_mutex_Seize+0x2f> 10affb: 84 d2 test %dl,%dl 10affd: 74 15 je 10b014 <_CORE_mutex_Seize+0x2f><== NEVER TAKEN 10afff: 83 3d e8 57 12 00 01 cmpl $0x1,0x1257e8 10b006: 76 0c jbe 10b014 <_CORE_mutex_Seize+0x2f> 10b008: 53 push %ebx 10b009: 6a 13 push $0x13 10b00b: 6a 00 push $0x0 10b00d: 6a 00 push $0x0 10b00f: e8 bc 05 00 00 call 10b5d0 <_Internal_error_Occurred> 10b014: 51 push %ecx 10b015: 51 push %ecx 10b016: 8d 45 18 lea 0x18(%ebp),%eax 10b019: 50 push %eax 10b01a: 53 push %ebx 10b01b: 88 55 f4 mov %dl,-0xc(%ebp) 10b01e: e8 d9 47 00 00 call 10f7fc <_CORE_mutex_Seize_interrupt_trylock> 10b023: 83 c4 10 add $0x10,%esp 10b026: 85 c0 test %eax,%eax 10b028: 8a 55 f4 mov -0xc(%ebp),%dl 10b02b: 74 48 je 10b075 <_CORE_mutex_Seize+0x90> 10b02d: 84 d2 test %dl,%dl 10b02f: 75 12 jne 10b043 <_CORE_mutex_Seize+0x5e> 10b031: ff 75 18 pushl 0x18(%ebp) 10b034: 9d popf 10b035: a1 0c 57 12 00 mov 0x12570c,%eax 10b03a: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) 10b041: eb 32 jmp 10b075 <_CORE_mutex_Seize+0x90> 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; 10b043: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10b04a: a1 0c 57 12 00 mov 0x12570c,%eax 10b04f: 89 58 44 mov %ebx,0x44(%eax) 10b052: 8b 55 0c mov 0xc(%ebp),%edx 10b055: 89 50 20 mov %edx,0x20(%eax) 10b058: a1 50 56 12 00 mov 0x125650,%eax 10b05d: 40 inc %eax 10b05e: a3 50 56 12 00 mov %eax,0x125650 10b063: ff 75 18 pushl 0x18(%ebp) 10b066: 9d popf 10b067: 50 push %eax 10b068: 50 push %eax 10b069: ff 75 14 pushl 0x14(%ebp) 10b06c: 53 push %ebx 10b06d: e8 26 ff ff ff call 10af98 <_CORE_mutex_Seize_interrupt_blocking> 10b072: 83 c4 10 add $0x10,%esp } 10b075: 8b 5d fc mov -0x4(%ebp),%ebx 10b078: c9 leave 10b079: c3 ret =============================================================================== 0010f7fc <_CORE_mutex_Seize_interrupt_trylock>: #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 10f7fc: 55 push %ebp 10f7fd: 89 e5 mov %esp,%ebp 10f7ff: 53 push %ebx 10f800: 83 ec 04 sub $0x4,%esp 10f803: 8b 45 08 mov 0x8(%ebp),%eax 10f806: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10f809: 8b 15 0c 57 12 00 mov 0x12570c,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 10f80f: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 10f816: 83 78 50 00 cmpl $0x0,0x50(%eax) 10f81a: 0f 84 87 00 00 00 je 10f8a7 <_CORE_mutex_Seize_interrupt_trylock+0xab> the_mutex->lock = CORE_MUTEX_LOCKED; 10f820: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 10f827: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 10f82a: 8b 5a 08 mov 0x8(%edx),%ebx 10f82d: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 10f830: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10f837: 8b 58 48 mov 0x48(%eax),%ebx if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10f83a: 83 fb 02 cmp $0x2,%ebx 10f83d: 74 05 je 10f844 <_CORE_mutex_Seize_interrupt_trylock+0x48> 10f83f: 83 fb 03 cmp $0x3,%ebx 10f842: 75 08 jne 10f84c <_CORE_mutex_Seize_interrupt_trylock+0x50> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 10f844: ff 42 1c incl 0x1c(%edx) } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 10f847: 83 fb 03 cmp $0x3,%ebx 10f84a: 74 05 je 10f851 <_CORE_mutex_Seize_interrupt_trylock+0x55> _ISR_Enable( *level_p ); 10f84c: ff 31 pushl (%ecx) 10f84e: 9d popf 10f84f: eb 7b jmp 10f8cc <_CORE_mutex_Seize_interrupt_trylock+0xd0> { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 10f851: 8b 5a 14 mov 0x14(%edx),%ebx if ( current == ceiling ) { 10f854: 3b 58 4c cmp 0x4c(%eax),%ebx 10f857: 75 05 jne 10f85e <_CORE_mutex_Seize_interrupt_trylock+0x62> _ISR_Enable( *level_p ); 10f859: ff 31 pushl (%ecx) 10f85b: 9d popf 10f85c: eb 6e jmp 10f8cc <_CORE_mutex_Seize_interrupt_trylock+0xd0> return 0; } if ( current > ceiling ) { 10f85e: 76 2a jbe 10f88a <_CORE_mutex_Seize_interrupt_trylock+0x8e> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10f860: 8b 15 50 56 12 00 mov 0x125650,%edx 10f866: 42 inc %edx 10f867: 89 15 50 56 12 00 mov %edx,0x125650 _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 10f86d: ff 31 pushl (%ecx) 10f86f: 9d popf _Thread_Change_priority( 10f870: 52 push %edx 10f871: 6a 00 push $0x0 10f873: ff 70 4c pushl 0x4c(%eax) 10f876: ff 70 5c pushl 0x5c(%eax) 10f879: e8 26 c5 ff ff call 10bda4 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 10f87e: e8 be c9 ff ff call 10c241 <_Thread_Enable_dispatch> 10f883: 31 c0 xor %eax,%eax 10f885: 83 c4 10 add $0x10,%esp 10f888: eb 4b jmp 10f8d5 <_CORE_mutex_Seize_interrupt_trylock+0xd9> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 10f88a: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 10f891: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 10f898: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 10f89f: ff 4a 1c decl 0x1c(%edx) _ISR_Enable( *level_p ); 10f8a2: ff 31 pushl (%ecx) 10f8a4: 9d popf 10f8a5: eb 25 jmp 10f8cc <_CORE_mutex_Seize_interrupt_trylock+0xd0> /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 10f8a7: 8b 58 5c mov 0x5c(%eax),%ebx 10f8aa: 39 d3 cmp %edx,%ebx 10f8ac: 75 22 jne 10f8d0 <_CORE_mutex_Seize_interrupt_trylock+0xd4> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 10f8ae: 8b 50 40 mov 0x40(%eax),%edx 10f8b1: 85 d2 test %edx,%edx 10f8b3: 74 05 je 10f8ba <_CORE_mutex_Seize_interrupt_trylock+0xbe> 10f8b5: 4a dec %edx 10f8b6: 75 18 jne 10f8d0 <_CORE_mutex_Seize_interrupt_trylock+0xd4><== ALWAYS TAKEN 10f8b8: eb 08 jmp 10f8c2 <_CORE_mutex_Seize_interrupt_trylock+0xc6><== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 10f8ba: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 10f8bd: ff 31 pushl (%ecx) 10f8bf: 9d popf 10f8c0: eb 0a jmp 10f8cc <_CORE_mutex_Seize_interrupt_trylock+0xd0> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 10f8c2: c7 43 34 02 00 00 00 movl $0x2,0x34(%ebx) <== NOT EXECUTED _ISR_Enable( *level_p ); 10f8c9: ff 31 pushl (%ecx) <== NOT EXECUTED 10f8cb: 9d popf <== NOT EXECUTED 10f8cc: 31 c0 xor %eax,%eax 10f8ce: eb 05 jmp 10f8d5 <_CORE_mutex_Seize_interrupt_trylock+0xd9> 10f8d0: b8 01 00 00 00 mov $0x1,%eax return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 10f8d5: 8b 5d fc mov -0x4(%ebp),%ebx 10f8d8: c9 leave 10f8d9: c3 ret =============================================================================== 0010b1a8 <_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 ) { 10b1a8: 55 push %ebp 10b1a9: 89 e5 mov %esp,%ebp 10b1ab: 53 push %ebx 10b1ac: 83 ec 10 sub $0x10,%esp 10b1af: 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)) ) { 10b1b2: 53 push %ebx 10b1b3: e8 10 14 00 00 call 10c5c8 <_Thread_queue_Dequeue> 10b1b8: 89 c2 mov %eax,%edx 10b1ba: 83 c4 10 add $0x10,%esp 10b1bd: 31 c0 xor %eax,%eax 10b1bf: 85 d2 test %edx,%edx 10b1c1: 75 15 jne 10b1d8 <_CORE_semaphore_Surrender+0x30> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 10b1c3: 9c pushf 10b1c4: fa cli 10b1c5: 59 pop %ecx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10b1c6: 8b 53 48 mov 0x48(%ebx),%edx 10b1c9: b0 04 mov $0x4,%al 10b1cb: 3b 53 40 cmp 0x40(%ebx),%edx 10b1ce: 73 06 jae 10b1d6 <_CORE_semaphore_Surrender+0x2e><== NEVER TAKEN the_semaphore->count += 1; 10b1d0: 42 inc %edx 10b1d1: 89 53 48 mov %edx,0x48(%ebx) 10b1d4: 30 c0 xor %al,%al else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10b1d6: 51 push %ecx 10b1d7: 9d popf } return status; } 10b1d8: 8b 5d fc mov -0x4(%ebp),%ebx 10b1db: c9 leave 10b1dc: c3 ret =============================================================================== 0010a070 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10a070: 55 push %ebp 10a071: 89 e5 mov %esp,%ebp 10a073: 57 push %edi 10a074: 56 push %esi 10a075: 53 push %ebx 10a076: 83 ec 1c sub $0x1c,%esp 10a079: 8b 45 08 mov 0x8(%ebp),%eax 10a07c: 8b 75 0c mov 0xc(%ebp),%esi 10a07f: 8b 55 10 mov 0x10(%ebp),%edx 10a082: 89 55 dc mov %edx,-0x24(%ebp) 10a085: 8b 4d 14 mov 0x14(%ebp),%ecx rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 10a088: 8b 1d 0c 57 12 00 mov 0x12570c,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10a08e: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10a095: 8b bb f0 00 00 00 mov 0xf0(%ebx),%edi _ISR_Disable( level ); 10a09b: 9c pushf 10a09c: fa cli 10a09d: 8f 45 e4 popl -0x1c(%ebp) pending_events = api->pending_events; 10a0a0: 8b 17 mov (%edi),%edx 10a0a2: 89 55 e0 mov %edx,-0x20(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10a0a5: 21 c2 and %eax,%edx 10a0a7: 74 1b je 10a0c4 <_Event_Seize+0x54> 10a0a9: 39 c2 cmp %eax,%edx 10a0ab: 74 08 je 10a0b5 <_Event_Seize+0x45> 10a0ad: f7 c6 02 00 00 00 test $0x2,%esi 10a0b3: 74 0f je 10a0c4 <_Event_Seize+0x54> <== NEVER TAKEN (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 10a0b5: 89 d0 mov %edx,%eax 10a0b7: f7 d0 not %eax 10a0b9: 23 45 e0 and -0x20(%ebp),%eax 10a0bc: 89 07 mov %eax,(%edi) _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 10a0be: ff 75 e4 pushl -0x1c(%ebp) 10a0c1: 9d popf 10a0c2: eb 13 jmp 10a0d7 <_Event_Seize+0x67> *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10a0c4: f7 c6 01 00 00 00 test $0x1,%esi 10a0ca: 74 12 je 10a0de <_Event_Seize+0x6e> _ISR_Enable( level ); 10a0cc: ff 75 e4 pushl -0x1c(%ebp) 10a0cf: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10a0d0: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10a0d7: 89 11 mov %edx,(%ecx) return; 10a0d9: e9 91 00 00 00 jmp 10a16f <_Event_Seize+0xff> * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; 10a0de: 89 73 30 mov %esi,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10a0e1: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10a0e4: 89 4b 28 mov %ecx,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10a0e7: c7 05 e4 58 12 00 01 movl $0x1,0x1258e4 10a0ee: 00 00 00 _ISR_Enable( level ); 10a0f1: ff 75 e4 pushl -0x1c(%ebp) 10a0f4: 9d popf if ( ticks ) { 10a0f5: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) 10a0f9: 74 34 je 10a12f <_Event_Seize+0xbf> _Watchdog_Initialize( 10a0fb: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10a0fe: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10a105: c7 43 64 ac a2 10 00 movl $0x10a2ac,0x64(%ebx) the_watchdog->id = id; 10a10c: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10a10f: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10a116: 8b 45 dc mov -0x24(%ebp),%eax 10a119: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10a11c: 52 push %edx 10a11d: 52 push %edx 10a11e: 8d 43 48 lea 0x48(%ebx),%eax 10a121: 50 push %eax 10a122: 68 2c 57 12 00 push $0x12572c 10a127: e8 98 2e 00 00 call 10cfc4 <_Watchdog_Insert> 10a12c: 83 c4 10 add $0x10,%esp NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10a12f: 50 push %eax 10a130: 50 push %eax 10a131: 68 00 01 00 00 push $0x100 10a136: 53 push %ebx 10a137: e8 e8 28 00 00 call 10ca24 <_Thread_Set_state> _ISR_Disable( level ); 10a13c: 9c pushf 10a13d: fa cli 10a13e: 5a pop %edx sync_state = _Event_Sync_state; 10a13f: a1 e4 58 12 00 mov 0x1258e4,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10a144: c7 05 e4 58 12 00 00 movl $0x0,0x1258e4 10a14b: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10a14e: 83 c4 10 add $0x10,%esp 10a151: 83 f8 01 cmp $0x1,%eax 10a154: 75 04 jne 10a15a <_Event_Seize+0xea> _ISR_Enable( level ); 10a156: 52 push %edx 10a157: 9d popf 10a158: eb 15 jmp 10a16f <_Event_Seize+0xff> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 10a15a: 89 55 10 mov %edx,0x10(%ebp) 10a15d: 89 5d 0c mov %ebx,0xc(%ebp) 10a160: 89 45 08 mov %eax,0x8(%ebp) } 10a163: 8d 65 f4 lea -0xc(%ebp),%esp 10a166: 5b pop %ebx 10a167: 5e pop %esi 10a168: 5f pop %edi 10a169: c9 leave * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 10a16a: e9 e9 1b 00 00 jmp 10bd58 <_Thread_blocking_operation_Cancel> } 10a16f: 8d 65 f4 lea -0xc(%ebp),%esp 10a172: 5b pop %ebx 10a173: 5e pop %esi 10a174: 5f pop %edi 10a175: c9 leave 10a176: c3 ret =============================================================================== 0010a1c4 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10a1c4: 55 push %ebp 10a1c5: 89 e5 mov %esp,%ebp 10a1c7: 57 push %edi 10a1c8: 56 push %esi 10a1c9: 53 push %ebx 10a1ca: 83 ec 2c sub $0x2c,%esp 10a1cd: 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 ]; 10a1d0: 8b bb f0 00 00 00 mov 0xf0(%ebx),%edi option_set = (rtems_option) the_thread->Wait.option; 10a1d6: 8b 43 30 mov 0x30(%ebx),%eax 10a1d9: 89 45 e0 mov %eax,-0x20(%ebp) _ISR_Disable( level ); 10a1dc: 9c pushf 10a1dd: fa cli 10a1de: 58 pop %eax pending_events = api->pending_events; 10a1df: 8b 17 mov (%edi),%edx 10a1e1: 89 55 d4 mov %edx,-0x2c(%ebp) event_condition = (rtems_event_set) the_thread->Wait.count; 10a1e4: 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 ) ) { 10a1e7: 21 f2 and %esi,%edx 10a1e9: 75 07 jne 10a1f2 <_Event_Surrender+0x2e> _ISR_Enable( level ); 10a1eb: 50 push %eax 10a1ec: 9d popf return; 10a1ed: e9 b0 00 00 00 jmp 10a2a2 <_Event_Surrender+0xde> /* * 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() && 10a1f2: 8b 0d e8 56 12 00 mov 0x1256e8,%ecx 10a1f8: 85 c9 test %ecx,%ecx 10a1fa: 74 49 je 10a245 <_Event_Surrender+0x81> 10a1fc: 3b 1d 0c 57 12 00 cmp 0x12570c,%ebx 10a202: 75 41 jne 10a245 <_Event_Surrender+0x81> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 10a204: 8b 0d e4 58 12 00 mov 0x1258e4,%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() && 10a20a: 83 f9 02 cmp $0x2,%ecx 10a20d: 74 09 je 10a218 <_Event_Surrender+0x54> <== NEVER TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 10a20f: 8b 0d e4 58 12 00 mov 0x1258e4,%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() && 10a215: 49 dec %ecx 10a216: 75 2d jne 10a245 <_Event_Surrender+0x81> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 10a218: 39 f2 cmp %esi,%edx 10a21a: 74 06 je 10a222 <_Event_Surrender+0x5e> 10a21c: f6 45 e0 02 testb $0x2,-0x20(%ebp) 10a220: 74 1f je 10a241 <_Event_Surrender+0x7d> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 10a222: 89 d6 mov %edx,%esi 10a224: f7 d6 not %esi 10a226: 23 75 d4 and -0x2c(%ebp),%esi 10a229: 89 37 mov %esi,(%edi) the_thread->Wait.count = 0; 10a22b: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10a232: 8b 4b 28 mov 0x28(%ebx),%ecx 10a235: 89 11 mov %edx,(%ecx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10a237: c7 05 e4 58 12 00 03 movl $0x3,0x1258e4 10a23e: 00 00 00 } _ISR_Enable( level ); 10a241: 50 push %eax 10a242: 9d popf return; 10a243: eb 5d jmp 10a2a2 <_Event_Surrender+0xde> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10a245: f6 43 11 01 testb $0x1,0x11(%ebx) 10a249: 74 55 je 10a2a0 <_Event_Surrender+0xdc> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 10a24b: 39 f2 cmp %esi,%edx 10a24d: 74 06 je 10a255 <_Event_Surrender+0x91> 10a24f: f6 45 e0 02 testb $0x2,-0x20(%ebp) 10a253: 74 4b je 10a2a0 <_Event_Surrender+0xdc> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 10a255: 89 d6 mov %edx,%esi 10a257: f7 d6 not %esi 10a259: 23 75 d4 and -0x2c(%ebp),%esi 10a25c: 89 37 mov %esi,(%edi) the_thread->Wait.count = 0; 10a25e: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10a265: 8b 4b 28 mov 0x28(%ebx),%ecx 10a268: 89 11 mov %edx,(%ecx) _ISR_Flash( level ); 10a26a: 50 push %eax 10a26b: 9d popf 10a26c: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10a26d: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10a271: 74 06 je 10a279 <_Event_Surrender+0xb5> _ISR_Enable( level ); 10a273: 50 push %eax 10a274: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10a275: 51 push %ecx 10a276: 51 push %ecx 10a277: eb 17 jmp 10a290 <_Event_Surrender+0xcc> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10a279: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10a280: 50 push %eax 10a281: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10a282: 83 ec 0c sub $0xc,%esp 10a285: 8d 43 48 lea 0x48(%ebx),%eax 10a288: 50 push %eax 10a289: e8 4e 2e 00 00 call 10d0dc <_Watchdog_Remove> 10a28e: 58 pop %eax 10a28f: 5a pop %edx 10a290: 68 f8 ff 03 10 push $0x1003fff8 10a295: 53 push %ebx 10a296: e8 29 1c 00 00 call 10bec4 <_Thread_Clear_state> 10a29b: 83 c4 10 add $0x10,%esp 10a29e: eb 02 jmp 10a2a2 <_Event_Surrender+0xde> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10a2a0: 50 push %eax 10a2a1: 9d popf } 10a2a2: 8d 65 f4 lea -0xc(%ebp),%esp 10a2a5: 5b pop %ebx 10a2a6: 5e pop %esi 10a2a7: 5f pop %edi 10a2a8: c9 leave 10a2a9: c3 ret =============================================================================== 0010a2ac <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10a2ac: 55 push %ebp 10a2ad: 89 e5 mov %esp,%ebp 10a2af: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10a2b2: 8d 45 f4 lea -0xc(%ebp),%eax 10a2b5: 50 push %eax 10a2b6: ff 75 08 pushl 0x8(%ebp) 10a2b9: e8 a6 1f 00 00 call 10c264 <_Thread_Get> switch ( location ) { 10a2be: 83 c4 10 add $0x10,%esp 10a2c1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a2c5: 75 49 jne 10a310 <_Event_Timeout+0x64> <== 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 ); 10a2c7: 9c pushf 10a2c8: fa cli 10a2c9: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10a2ca: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10a2d1: 3b 05 0c 57 12 00 cmp 0x12570c,%eax 10a2d7: 75 13 jne 10a2ec <_Event_Timeout+0x40> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10a2d9: 8b 0d e4 58 12 00 mov 0x1258e4,%ecx 10a2df: 49 dec %ecx 10a2e0: 75 0a jne 10a2ec <_Event_Timeout+0x40> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10a2e2: c7 05 e4 58 12 00 02 movl $0x2,0x1258e4 10a2e9: 00 00 00 } the_thread->Wait.return_code = RTEMS_TIMEOUT; 10a2ec: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10a2f3: 52 push %edx 10a2f4: 9d popf 10a2f5: 52 push %edx 10a2f6: 52 push %edx 10a2f7: 68 f8 ff 03 10 push $0x1003fff8 10a2fc: 50 push %eax 10a2fd: e8 c2 1b 00 00 call 10bec4 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10a302: a1 50 56 12 00 mov 0x125650,%eax 10a307: 48 dec %eax 10a308: a3 50 56 12 00 mov %eax,0x125650 10a30d: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10a310: c9 leave 10a311: c3 ret =============================================================================== 0010f938 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 10f938: 55 push %ebp 10f939: 89 e5 mov %esp,%ebp 10f93b: 57 push %edi 10f93c: 56 push %esi 10f93d: 53 push %ebx 10f93e: 83 ec 2c sub $0x2c,%esp 10f941: 8b 75 08 mov 0x8(%ebp),%esi return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10f944: 8b 4e 08 mov 0x8(%esi),%ecx Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; 10f947: 8b 46 10 mov 0x10(%esi),%eax 10f94a: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 10f94d: 8b 45 0c mov 0xc(%ebp),%eax 10f950: 83 c0 04 add $0x4,%eax 10f953: 89 45 cc mov %eax,-0x34(%ebp) 10f956: 0f 82 2f 01 00 00 jb 10fa8b <_Heap_Allocate_aligned_with_boundary+0x153> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 10f95c: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10f960: 74 18 je 10f97a <_Heap_Allocate_aligned_with_boundary+0x42> if ( boundary < alloc_size ) { 10f962: 8b 45 0c mov 0xc(%ebp),%eax 10f965: 39 45 14 cmp %eax,0x14(%ebp) 10f968: 0f 82 1d 01 00 00 jb 10fa8b <_Heap_Allocate_aligned_with_boundary+0x153> return NULL; } if ( alignment == 0 ) { 10f96e: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10f972: 75 06 jne 10f97a <_Heap_Allocate_aligned_with_boundary+0x42> 10f974: 8b 45 e0 mov -0x20(%ebp),%eax 10f977: 89 45 10 mov %eax,0x10(%ebp) 10f97a: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 10f981: 8b 45 e0 mov -0x20(%ebp),%eax 10f984: 83 c0 07 add $0x7,%eax 10f987: 89 45 c8 mov %eax,-0x38(%ebp) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 10f98a: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp) 10f991: 8b 45 0c mov 0xc(%ebp),%eax 10f994: 29 45 d8 sub %eax,-0x28(%ebp) 10f997: 89 f7 mov %esi,%edi 10f999: e9 ba 00 00 00 jmp 10fa58 <_Heap_Allocate_aligned_with_boundary+0x120> while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 10f99e: ff 45 e4 incl -0x1c(%ebp) /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 10f9a1: 8b 59 04 mov 0x4(%ecx),%ebx 10f9a4: 3b 5d cc cmp -0x34(%ebp),%ebx 10f9a7: 0f 86 a8 00 00 00 jbe 10fa55 <_Heap_Allocate_aligned_with_boundary+0x11d> if ( alignment == 0 ) { 10f9ad: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10f9b1: 8d 41 08 lea 0x8(%ecx),%eax 10f9b4: 89 45 dc mov %eax,-0x24(%ebp) 10f9b7: 75 07 jne 10f9c0 <_Heap_Allocate_aligned_with_boundary+0x88> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10f9b9: 89 c3 mov %eax,%ebx 10f9bb: e9 91 00 00 00 jmp 10fa51 <_Heap_Allocate_aligned_with_boundary+0x119> uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 10f9c0: 8b 47 14 mov 0x14(%edi),%eax 10f9c3: 89 45 d4 mov %eax,-0x2c(%ebp) uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 10f9c6: 83 e3 fe and $0xfffffffe,%ebx 10f9c9: 8d 1c 19 lea (%ecx,%ebx,1),%ebx uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 10f9cc: 8b 75 c8 mov -0x38(%ebp),%esi 10f9cf: 29 c6 sub %eax,%esi 10f9d1: 01 de add %ebx,%esi uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 10f9d3: 03 5d d8 add -0x28(%ebp),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10f9d6: 89 d8 mov %ebx,%eax 10f9d8: 31 d2 xor %edx,%edx 10f9da: f7 75 10 divl 0x10(%ebp) 10f9dd: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { 10f9df: 39 f3 cmp %esi,%ebx 10f9e1: 76 0b jbe 10f9ee <_Heap_Allocate_aligned_with_boundary+0xb6> 10f9e3: 89 f0 mov %esi,%eax 10f9e5: 31 d2 xor %edx,%edx 10f9e7: f7 75 10 divl 0x10(%ebp) 10f9ea: 89 f3 mov %esi,%ebx 10f9ec: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 10f9ee: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10f9f2: 74 3f je 10fa33 <_Heap_Allocate_aligned_with_boundary+0xfb> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 10f9f4: 8b 45 0c mov 0xc(%ebp),%eax 10f9f7: 8d 34 03 lea (%ebx,%eax,1),%esi /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 10f9fa: 8b 45 dc mov -0x24(%ebp),%eax 10f9fd: 03 45 0c add 0xc(%ebp),%eax 10fa00: 89 45 d0 mov %eax,-0x30(%ebp) 10fa03: eb 19 jmp 10fa1e <_Heap_Allocate_aligned_with_boundary+0xe6> uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 10fa05: 3b 55 d0 cmp -0x30(%ebp),%edx 10fa08: 72 4b jb 10fa55 <_Heap_Allocate_aligned_with_boundary+0x11d> return 0; } alloc_begin = boundary_line - alloc_size; 10fa0a: 89 d3 mov %edx,%ebx 10fa0c: 2b 5d 0c sub 0xc(%ebp),%ebx 10fa0f: 89 d8 mov %ebx,%eax 10fa11: 31 d2 xor %edx,%edx 10fa13: f7 75 10 divl 0x10(%ebp) 10fa16: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 10fa18: 8b 45 0c mov 0xc(%ebp),%eax 10fa1b: 8d 34 03 lea (%ebx,%eax,1),%esi 10fa1e: 89 f0 mov %esi,%eax 10fa20: 31 d2 xor %edx,%edx 10fa22: f7 75 14 divl 0x14(%ebp) 10fa25: 89 f0 mov %esi,%eax 10fa27: 29 d0 sub %edx,%eax 10fa29: 89 c2 mov %eax,%edx /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 10fa2b: 39 f0 cmp %esi,%eax 10fa2d: 73 04 jae 10fa33 <_Heap_Allocate_aligned_with_boundary+0xfb> 10fa2f: 39 c3 cmp %eax,%ebx 10fa31: 72 d2 jb 10fa05 <_Heap_Allocate_aligned_with_boundary+0xcd> boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 10fa33: 3b 5d dc cmp -0x24(%ebp),%ebx 10fa36: 72 1d jb 10fa55 <_Heap_Allocate_aligned_with_boundary+0x11d> uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; 10fa38: be f8 ff ff ff mov $0xfffffff8,%esi 10fa3d: 29 ce sub %ecx,%esi 10fa3f: 01 de add %ebx,%esi 10fa41: 89 d8 mov %ebx,%eax 10fa43: 31 d2 xor %edx,%edx 10fa45: f7 75 e0 divl -0x20(%ebp) if ( free_size >= min_block_size || free_size == 0 ) { 10fa48: 29 d6 sub %edx,%esi 10fa4a: 74 05 je 10fa51 <_Heap_Allocate_aligned_with_boundary+0x119> 10fa4c: 3b 75 d4 cmp -0x2c(%ebp),%esi 10fa4f: 72 04 jb 10fa55 <_Heap_Allocate_aligned_with_boundary+0x11d> boundary ); } } if ( alloc_begin != 0 ) { 10fa51: 85 db test %ebx,%ebx 10fa53: 75 11 jne 10fa66 <_Heap_Allocate_aligned_with_boundary+0x12e><== ALWAYS TAKEN break; } block = block->next; 10fa55: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 10fa58: 39 f9 cmp %edi,%ecx 10fa5a: 0f 85 3e ff ff ff jne 10f99e <_Heap_Allocate_aligned_with_boundary+0x66> 10fa60: 89 fe mov %edi,%esi 10fa62: 31 db xor %ebx,%ebx 10fa64: eb 16 jmp 10fa7c <_Heap_Allocate_aligned_with_boundary+0x144> 10fa66: 89 fe mov %edi,%esi block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 10fa68: 8b 45 e4 mov -0x1c(%ebp),%eax 10fa6b: 01 47 4c add %eax,0x4c(%edi) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 10fa6e: ff 75 0c pushl 0xc(%ebp) 10fa71: 53 push %ebx 10fa72: 51 push %ecx 10fa73: 57 push %edi 10fa74: e8 7b ba ff ff call 10b4f4 <_Heap_Block_allocate> 10fa79: 83 c4 10 add $0x10,%esp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 10fa7c: 8b 45 e4 mov -0x1c(%ebp),%eax 10fa7f: 39 46 44 cmp %eax,0x44(%esi) 10fa82: 73 03 jae 10fa87 <_Heap_Allocate_aligned_with_boundary+0x14f> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 10fa84: 89 46 44 mov %eax,0x44(%esi) } return (void *) alloc_begin; 10fa87: 89 d8 mov %ebx,%eax 10fa89: eb 02 jmp 10fa8d <_Heap_Allocate_aligned_with_boundary+0x155> 10fa8b: 31 c0 xor %eax,%eax } 10fa8d: 8d 65 f4 lea -0xc(%ebp),%esp 10fa90: 5b pop %ebx 10fa91: 5e pop %esi 10fa92: 5f pop %edi 10fa93: c9 leave 10fa94: c3 ret =============================================================================== 00112d80 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 112d80: 55 push %ebp 112d81: 89 e5 mov %esp,%ebp 112d83: 56 push %esi 112d84: 53 push %ebx 112d85: 8b 4d 08 mov 0x8(%ebp),%ecx 112d88: 8b 55 0c mov 0xc(%ebp),%edx Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; 112d8b: 8b 71 1c mov 0x1c(%ecx),%esi uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block; 112d8e: 8b 59 24 mov 0x24(%ecx),%ebx * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { 112d91: 39 f2 cmp %esi,%edx 112d93: 73 0a jae 112d9f <_Heap_Extend+0x1f> uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; 112d95: b8 01 00 00 00 mov $0x1,%eax 112d9a: 3b 51 18 cmp 0x18(%ecx),%edx 112d9d: 73 5f jae 112dfe <_Heap_Extend+0x7e> * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 112d9f: b8 02 00 00 00 mov $0x2,%eax 112da4: 39 f2 cmp %esi,%edx 112da6: 75 56 jne 112dfe <_Heap_Extend+0x7e> { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; 112da8: 03 55 10 add 0x10(%ebp),%edx * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ heap->area_end = new_heap_area_end; 112dab: 89 51 1c mov %edx,0x1c(%ecx) extend_size = new_heap_area_end 112dae: 29 da sub %ebx,%edx 112db0: 8d 72 f8 lea -0x8(%edx),%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 112db3: 89 f0 mov %esi,%eax 112db5: 31 d2 xor %edx,%edx 112db7: f7 71 10 divl 0x10(%ecx) 112dba: 29 d6 sub %edx,%esi - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; 112dbc: 8b 45 14 mov 0x14(%ebp),%eax 112dbf: 89 30 mov %esi,(%eax) if( extend_size >= heap->min_block_size ) { 112dc1: 31 c0 xor %eax,%eax 112dc3: 3b 71 14 cmp 0x14(%ecx),%esi 112dc6: 72 36 jb 112dfe <_Heap_Extend+0x7e> <== NEVER TAKEN RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 112dc8: 8d 14 1e lea (%esi,%ebx,1),%edx uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 112dcb: 8b 43 04 mov 0x4(%ebx),%eax 112dce: 83 e0 01 and $0x1,%eax 112dd1: 09 f0 or %esi,%eax 112dd3: 89 43 04 mov %eax,0x4(%ebx) Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 112dd6: 8b 41 20 mov 0x20(%ecx),%eax 112dd9: 29 d0 sub %edx,%eax 112ddb: 83 c8 01 or $0x1,%eax 112dde: 89 42 04 mov %eax,0x4(%edx) ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 112de1: 89 51 24 mov %edx,0x24(%ecx) /* Statistics */ stats->size += extend_size; 112de4: 01 71 2c add %esi,0x2c(%ecx) ++stats->used_blocks; 112de7: ff 41 40 incl 0x40(%ecx) --stats->frees; /* Do not count subsequent call as actual free() */ 112dea: ff 49 50 decl 0x50(%ecx) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 112ded: 50 push %eax 112dee: 50 push %eax 112def: 83 c3 08 add $0x8,%ebx 112df2: 53 push %ebx 112df3: 51 push %ecx 112df4: e8 eb b0 ff ff call 10dee4 <_Heap_Free> 112df9: 31 c0 xor %eax,%eax 112dfb: 83 c4 10 add $0x10,%esp } return HEAP_EXTEND_SUCCESSFUL; } 112dfe: 8d 65 f8 lea -0x8(%ebp),%esp 112e01: 5b pop %ebx 112e02: 5e pop %esi 112e03: c9 leave 112e04: c3 ret =============================================================================== 0010fa98 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 10fa98: 55 push %ebp 10fa99: 89 e5 mov %esp,%ebp 10fa9b: 57 push %edi 10fa9c: 56 push %esi 10fa9d: 53 push %ebx 10fa9e: 83 ec 14 sub $0x14,%esp 10faa1: 8b 4d 08 mov 0x8(%ebp),%ecx 10faa4: 8b 45 0c mov 0xc(%ebp),%eax 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 ) 10faa7: 8d 58 f8 lea -0x8(%eax),%ebx 10faaa: 31 d2 xor %edx,%edx 10faac: f7 71 10 divl 0x10(%ecx) 10faaf: 29 d3 sub %edx,%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; 10fab1: 8b 41 20 mov 0x20(%ecx),%eax 10fab4: 89 45 f0 mov %eax,-0x10(%ebp) 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 10fab7: 31 c0 xor %eax,%eax 10fab9: 3b 5d f0 cmp -0x10(%ebp),%ebx 10fabc: 72 08 jb 10fac6 <_Heap_Free+0x2e> 10fabe: 31 c0 xor %eax,%eax 10fac0: 39 59 24 cmp %ebx,0x24(%ecx) 10fac3: 0f 93 c0 setae %al Heap_Block *next_block = NULL; uintptr_t block_size = 0; uintptr_t next_block_size = 0; bool next_is_free = false; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 10fac6: 85 c0 test %eax,%eax 10fac8: 0f 84 2d 01 00 00 je 10fbfb <_Heap_Free+0x163> - 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; 10face: 8b 7b 04 mov 0x4(%ebx),%edi 10fad1: 89 fa mov %edi,%edx 10fad3: 83 e2 fe and $0xfffffffe,%edx 10fad6: 89 55 e0 mov %edx,-0x20(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10fad9: 8d 04 13 lea (%ebx,%edx,1),%eax 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 10fadc: 31 f6 xor %esi,%esi 10fade: 3b 45 f0 cmp -0x10(%ebp),%eax 10fae1: 72 0e jb 10faf1 <_Heap_Free+0x59> <== NEVER TAKEN 10fae3: 39 41 24 cmp %eax,0x24(%ecx) 10fae6: 0f 93 c2 setae %dl 10fae9: 89 d6 mov %edx,%esi 10faeb: 81 e6 ff 00 00 00 and $0xff,%esi } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 10faf1: 85 f6 test %esi,%esi 10faf3: 0f 84 02 01 00 00 je 10fbfb <_Heap_Free+0x163> <== NEVER TAKEN 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; 10faf9: 8b 70 04 mov 0x4(%eax),%esi _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10fafc: f7 c6 01 00 00 00 test $0x1,%esi 10fb02: 0f 84 f3 00 00 00 je 10fbfb <_Heap_Free+0x163> <== NEVER TAKEN - 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; 10fb08: 83 e6 fe and $0xfffffffe,%esi 10fb0b: 89 75 e8 mov %esi,-0x18(%ebp) return false; } 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 )); 10fb0e: 8b 51 24 mov 0x24(%ecx),%edx 10fb11: 89 55 e4 mov %edx,-0x1c(%ebp) _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 10fb14: 31 f6 xor %esi,%esi 10fb16: 39 d0 cmp %edx,%eax 10fb18: 74 0d je 10fb27 <_Heap_Free+0x8f> 10fb1a: 8b 55 e8 mov -0x18(%ebp),%edx 10fb1d: 8b 74 10 04 mov 0x4(%eax,%edx,1),%esi 10fb21: 83 e6 01 and $0x1,%esi 10fb24: 83 f6 01 xor $0x1,%esi && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 10fb27: 83 e7 01 and $0x1,%edi 10fb2a: 75 64 jne 10fb90 <_Heap_Free+0xf8> uintptr_t const prev_size = block->prev_size; 10fb2c: 8b 13 mov (%ebx),%edx 10fb2e: 89 55 ec mov %edx,-0x14(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10fb31: 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 10fb33: 31 ff xor %edi,%edi 10fb35: 3b 5d f0 cmp -0x10(%ebp),%ebx 10fb38: 72 0e jb 10fb48 <_Heap_Free+0xb0> <== NEVER TAKEN 10fb3a: 39 5d e4 cmp %ebx,-0x1c(%ebp) 10fb3d: 0f 93 c2 setae %dl 10fb40: 89 d7 mov %edx,%edi 10fb42: 81 e7 ff 00 00 00 and $0xff,%edi Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { 10fb48: 85 ff test %edi,%edi 10fb4a: 0f 84 ab 00 00 00 je 10fbfb <_Heap_Free+0x163> <== 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) ) { 10fb50: f6 43 04 01 testb $0x1,0x4(%ebx) 10fb54: 0f 84 a1 00 00 00 je 10fbfb <_Heap_Free+0x163> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 10fb5a: 89 f2 mov %esi,%edx 10fb5c: 84 d2 test %dl,%dl 10fb5e: 74 1a je 10fb7a <_Heap_Free+0xe2> uintptr_t const size = block_size + prev_size + next_block_size; 10fb60: 8b 75 e0 mov -0x20(%ebp),%esi 10fb63: 03 75 e8 add -0x18(%ebp),%esi 10fb66: 03 75 ec add -0x14(%ebp),%esi return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 10fb69: 8b 78 08 mov 0x8(%eax),%edi Heap_Block *prev = block->prev; 10fb6c: 8b 40 0c mov 0xc(%eax),%eax prev->next = next; 10fb6f: 89 78 08 mov %edi,0x8(%eax) next->prev = prev; 10fb72: 89 47 0c mov %eax,0xc(%edi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 10fb75: ff 49 38 decl 0x38(%ecx) 10fb78: eb 34 jmp 10fbae <_Heap_Free+0x116> prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 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; 10fb7a: 8b 75 e0 mov -0x20(%ebp),%esi 10fb7d: 03 75 ec add -0x14(%ebp),%esi prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10fb80: 89 f7 mov %esi,%edi 10fb82: 83 cf 01 or $0x1,%edi 10fb85: 89 7b 04 mov %edi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10fb88: 83 60 04 fe andl $0xfffffffe,0x4(%eax) next_block->prev_size = size; 10fb8c: 89 30 mov %esi,(%eax) 10fb8e: eb 5b jmp 10fbeb <_Heap_Free+0x153> } } else if ( next_is_free ) { /* coalesce next */ 10fb90: 89 f2 mov %esi,%edx 10fb92: 84 d2 test %dl,%dl 10fb94: 74 25 je 10fbbb <_Heap_Free+0x123> uintptr_t const size = block_size + next_block_size; 10fb96: 8b 75 e8 mov -0x18(%ebp),%esi 10fb99: 03 75 e0 add -0x20(%ebp),%esi RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 10fb9c: 8b 78 08 mov 0x8(%eax),%edi Heap_Block *prev = old_block->prev; 10fb9f: 8b 40 0c mov 0xc(%eax),%eax new_block->next = next; 10fba2: 89 7b 08 mov %edi,0x8(%ebx) new_block->prev = prev; 10fba5: 89 43 0c mov %eax,0xc(%ebx) next->prev = new_block; 10fba8: 89 5f 0c mov %ebx,0xc(%edi) prev->next = new_block; 10fbab: 89 58 08 mov %ebx,0x8(%eax) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10fbae: 89 f0 mov %esi,%eax 10fbb0: 83 c8 01 or $0x1,%eax 10fbb3: 89 43 04 mov %eax,0x4(%ebx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 10fbb6: 89 34 33 mov %esi,(%ebx,%esi,1) 10fbb9: eb 30 jmp 10fbeb <_Heap_Free+0x153> RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10fbbb: 8b 71 08 mov 0x8(%ecx),%esi new_block->next = next; 10fbbe: 89 73 08 mov %esi,0x8(%ebx) new_block->prev = block_before; 10fbc1: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10fbc4: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10fbc7: 89 5e 0c mov %ebx,0xc(%esi) } 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; 10fbca: 8b 75 e0 mov -0x20(%ebp),%esi 10fbcd: 83 ce 01 or $0x1,%esi 10fbd0: 89 73 04 mov %esi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10fbd3: 83 60 04 fe andl $0xfffffffe,0x4(%eax) next_block->prev_size = block_size; 10fbd7: 8b 55 e0 mov -0x20(%ebp),%edx 10fbda: 89 10 mov %edx,(%eax) /* Statistics */ ++stats->free_blocks; 10fbdc: 8b 41 38 mov 0x38(%ecx),%eax 10fbdf: 40 inc %eax 10fbe0: 89 41 38 mov %eax,0x38(%ecx) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 10fbe3: 39 41 3c cmp %eax,0x3c(%ecx) 10fbe6: 73 03 jae 10fbeb <_Heap_Free+0x153> next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 10fbe8: 89 41 3c mov %eax,0x3c(%ecx) } } /* Statistics */ --stats->used_blocks; 10fbeb: ff 49 40 decl 0x40(%ecx) ++stats->frees; 10fbee: ff 41 50 incl 0x50(%ecx) stats->free_size += block_size; 10fbf1: 8b 45 e0 mov -0x20(%ebp),%eax 10fbf4: 01 41 30 add %eax,0x30(%ecx) 10fbf7: b0 01 mov $0x1,%al return( true ); 10fbf9: eb 02 jmp 10fbfd <_Heap_Free+0x165> 10fbfb: 31 c0 xor %eax,%eax } 10fbfd: 83 c4 14 add $0x14,%esp 10fc00: 5b pop %ebx 10fc01: 5e pop %esi 10fc02: 5f pop %edi 10fc03: c9 leave 10fc04: c3 ret =============================================================================== 0011d534 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11d534: 55 push %ebp 11d535: 89 e5 mov %esp,%ebp 11d537: 56 push %esi 11d538: 53 push %ebx 11d539: 8b 5d 08 mov 0x8(%ebp),%ebx 11d53c: 8b 75 0c mov 0xc(%ebp),%esi 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 ) 11d53f: 8d 4e f8 lea -0x8(%esi),%ecx 11d542: 89 f0 mov %esi,%eax 11d544: 31 d2 xor %edx,%edx 11d546: f7 73 10 divl 0x10(%ebx) 11d549: 29 d1 sub %edx,%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; 11d54b: 8b 53 20 mov 0x20(%ebx),%edx 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 11d54e: 31 c0 xor %eax,%eax 11d550: 39 d1 cmp %edx,%ecx 11d552: 72 08 jb 11d55c <_Heap_Size_of_alloc_area+0x28> 11d554: 31 c0 xor %eax,%eax 11d556: 39 4b 24 cmp %ecx,0x24(%ebx) 11d559: 0f 93 c0 setae %al 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 ) ) { 11d55c: 85 c0 test %eax,%eax 11d55e: 74 2e je 11d58e <_Heap_Size_of_alloc_area+0x5a> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11d560: 8b 41 04 mov 0x4(%ecx),%eax 11d563: 83 e0 fe and $0xfffffffe,%eax 11d566: 01 c1 add %eax,%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 11d568: 31 c0 xor %eax,%eax 11d56a: 39 d1 cmp %edx,%ecx 11d56c: 72 08 jb 11d576 <_Heap_Size_of_alloc_area+0x42><== NEVER TAKEN 11d56e: 31 c0 xor %eax,%eax 11d570: 39 4b 24 cmp %ecx,0x24(%ebx) 11d573: 0f 93 c0 setae %al } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 11d576: 85 c0 test %eax,%eax 11d578: 74 14 je 11d58e <_Heap_Size_of_alloc_area+0x5a><== NEVER TAKEN 11d57a: f6 41 04 01 testb $0x1,0x4(%ecx) 11d57e: 74 0e je 11d58e <_Heap_Size_of_alloc_area+0x5a><== NEVER TAKEN || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 11d580: 29 f1 sub %esi,%ecx 11d582: 8d 51 04 lea 0x4(%ecx),%edx 11d585: 8b 45 10 mov 0x10(%ebp),%eax 11d588: 89 10 mov %edx,(%eax) 11d58a: b0 01 mov $0x1,%al return true; 11d58c: eb 02 jmp 11d590 <_Heap_Size_of_alloc_area+0x5c> 11d58e: 31 c0 xor %eax,%eax } 11d590: 5b pop %ebx 11d591: 5e pop %esi 11d592: c9 leave 11d593: c3 ret =============================================================================== 0010bfe1 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10bfe1: 55 push %ebp 10bfe2: 89 e5 mov %esp,%ebp 10bfe4: 57 push %edi 10bfe5: 56 push %esi 10bfe6: 53 push %ebx 10bfe7: 83 ec 4c sub $0x4c,%esp 10bfea: 8b 7d 08 mov 0x8(%ebp),%edi 10bfed: 8b 75 0c mov 0xc(%ebp),%esi uintptr_t const page_size = heap->page_size; 10bff0: 8b 4f 10 mov 0x10(%edi),%ecx uintptr_t const min_block_size = heap->min_block_size; 10bff3: 8b 47 14 mov 0x14(%edi),%eax 10bff6: 89 45 dc mov %eax,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10bff9: 8b 57 24 mov 0x24(%edi),%edx 10bffc: 89 55 d0 mov %edx,-0x30(%ebp) Heap_Block *block = heap->first_block; 10bfff: 8b 5f 20 mov 0x20(%edi),%ebx Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10c002: c7 45 e4 f3 c2 10 00 movl $0x10c2f3,-0x1c(%ebp) 10c009: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10c00d: 75 07 jne 10c016 <_Heap_Walk+0x35> 10c00f: c7 45 e4 dc bf 10 00 movl $0x10bfdc,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10c016: 83 3d 50 7c 12 00 03 cmpl $0x3,0x127c50 10c01d: 0f 85 c6 02 00 00 jne 10c2e9 <_Heap_Walk+0x308> 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)( 10c023: 50 push %eax 10c024: ff 77 0c pushl 0xc(%edi) 10c027: ff 77 08 pushl 0x8(%edi) 10c02a: ff 75 d0 pushl -0x30(%ebp) 10c02d: 53 push %ebx 10c02e: ff 77 1c pushl 0x1c(%edi) 10c031: ff 77 18 pushl 0x18(%edi) 10c034: ff 75 dc pushl -0x24(%ebp) 10c037: 51 push %ecx 10c038: 68 60 00 12 00 push $0x120060 10c03d: 6a 00 push $0x0 10c03f: 56 push %esi 10c040: 89 4d bc mov %ecx,-0x44(%ebp) 10c043: 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 ) { 10c046: 83 c4 30 add $0x30,%esp 10c049: 8b 4d bc mov -0x44(%ebp),%ecx 10c04c: 85 c9 test %ecx,%ecx 10c04e: 75 0b jne 10c05b <_Heap_Walk+0x7a> (*printer)( source, true, "page size is zero\n" ); 10c050: 53 push %ebx 10c051: 68 f1 00 12 00 push $0x1200f1 10c056: e9 5b 02 00 00 jmp 10c2b6 <_Heap_Walk+0x2d5> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10c05b: f6 c1 03 test $0x3,%cl 10c05e: 74 0b je 10c06b <_Heap_Walk+0x8a> (*printer)( 10c060: 51 push %ecx 10c061: 68 04 01 12 00 push $0x120104 10c066: e9 4b 02 00 00 jmp 10c2b6 <_Heap_Walk+0x2d5> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10c06b: 8b 45 dc mov -0x24(%ebp),%eax 10c06e: 31 d2 xor %edx,%edx 10c070: f7 f1 div %ecx 10c072: 85 d2 test %edx,%edx 10c074: 74 0d je 10c083 <_Heap_Walk+0xa2> (*printer)( 10c076: ff 75 dc pushl -0x24(%ebp) 10c079: 68 22 01 12 00 push $0x120122 10c07e: e9 33 02 00 00 jmp 10c2b6 <_Heap_Walk+0x2d5> ); return false; } if ( 10c083: 8d 43 08 lea 0x8(%ebx),%eax 10c086: 31 d2 xor %edx,%edx 10c088: f7 f1 div %ecx 10c08a: 85 d2 test %edx,%edx 10c08c: 74 0b je 10c099 <_Heap_Walk+0xb8> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10c08e: 53 push %ebx 10c08f: 68 46 01 12 00 push $0x120146 10c094: e9 1d 02 00 00 jmp 10c2b6 <_Heap_Walk+0x2d5> ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10c099: f6 43 04 01 testb $0x1,0x4(%ebx) 10c09d: 75 0b jne 10c0aa <_Heap_Walk+0xc9> (*printer)( 10c09f: 51 push %ecx 10c0a0: 68 77 01 12 00 push $0x120177 10c0a5: e9 0c 02 00 00 jmp 10c2b6 <_Heap_Walk+0x2d5> ); return false; } if ( first_block->prev_size != page_size ) { 10c0aa: 8b 03 mov (%ebx),%eax 10c0ac: 89 45 d4 mov %eax,-0x2c(%ebp) 10c0af: 39 c8 cmp %ecx,%eax 10c0b1: 74 0f je 10c0c2 <_Heap_Walk+0xe1> (*printer)( 10c0b3: 83 ec 0c sub $0xc,%esp 10c0b6: 51 push %ecx 10c0b7: 50 push %eax 10c0b8: 68 a5 01 12 00 push $0x1201a5 10c0bd: e9 3d 01 00 00 jmp 10c1ff <_Heap_Walk+0x21e> ); return false; } if ( _Heap_Is_free( last_block ) ) { 10c0c2: 8b 55 d0 mov -0x30(%ebp),%edx 10c0c5: 8b 42 04 mov 0x4(%edx),%eax 10c0c8: 83 e0 fe and $0xfffffffe,%eax 10c0cb: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1) 10c0d0: 75 0b jne 10c0dd <_Heap_Walk+0xfc> (*printer)( 10c0d2: 52 push %edx 10c0d3: 68 d0 01 12 00 push $0x1201d0 10c0d8: e9 d9 01 00 00 jmp 10c2b6 <_Heap_Walk+0x2d5> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10c0dd: 8b 4f 10 mov 0x10(%edi),%ecx 10c0e0: 89 4d d8 mov %ecx,-0x28(%ebp) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10c0e3: 8b 4f 08 mov 0x8(%edi),%ecx 10c0e6: 89 7d e0 mov %edi,-0x20(%ebp) 10c0e9: eb 6a jmp 10c155 <_Heap_Walk+0x174> 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 10c0eb: 31 c0 xor %eax,%eax 10c0ed: 39 4f 20 cmp %ecx,0x20(%edi) 10c0f0: 77 08 ja 10c0fa <_Heap_Walk+0x119> 10c0f2: 31 c0 xor %eax,%eax 10c0f4: 39 4f 24 cmp %ecx,0x24(%edi) 10c0f7: 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 ) ) { 10c0fa: 85 c0 test %eax,%eax 10c0fc: 75 0b jne 10c109 <_Heap_Walk+0x128> (*printer)( 10c0fe: 51 push %ecx 10c0ff: 68 e5 01 12 00 push $0x1201e5 10c104: e9 ad 01 00 00 jmp 10c2b6 <_Heap_Walk+0x2d5> ); return false; } if ( 10c109: 8d 41 08 lea 0x8(%ecx),%eax 10c10c: 31 d2 xor %edx,%edx 10c10e: f7 75 d8 divl -0x28(%ebp) 10c111: 85 d2 test %edx,%edx 10c113: 74 0b je 10c120 <_Heap_Walk+0x13f> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10c115: 51 push %ecx 10c116: 68 05 02 12 00 push $0x120205 10c11b: e9 96 01 00 00 jmp 10c2b6 <_Heap_Walk+0x2d5> ); return false; } if ( _Heap_Is_used( free_block ) ) { 10c120: 8b 41 04 mov 0x4(%ecx),%eax 10c123: 83 e0 fe and $0xfffffffe,%eax 10c126: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10c12b: 74 0b je 10c138 <_Heap_Walk+0x157> (*printer)( 10c12d: 51 push %ecx 10c12e: 68 35 02 12 00 push $0x120235 10c133: e9 7e 01 00 00 jmp 10c2b6 <_Heap_Walk+0x2d5> ); return false; } if ( free_block->prev != prev_block ) { 10c138: 8b 41 0c mov 0xc(%ecx),%eax 10c13b: 3b 45 e0 cmp -0x20(%ebp),%eax 10c13e: 74 0f je 10c14f <_Heap_Walk+0x16e> (*printer)( 10c140: 83 ec 0c sub $0xc,%esp 10c143: 50 push %eax 10c144: 51 push %ecx 10c145: 68 51 02 12 00 push $0x120251 10c14a: e9 b0 00 00 00 jmp 10c1ff <_Heap_Walk+0x21e> return false; } prev_block = free_block; free_block = free_block->next; 10c14f: 89 4d e0 mov %ecx,-0x20(%ebp) 10c152: 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 ) { 10c155: 39 f9 cmp %edi,%ecx 10c157: 75 92 jne 10c0eb <_Heap_Walk+0x10a> 10c159: 89 75 e0 mov %esi,-0x20(%ebp) 10c15c: e9 7f 01 00 00 jmp 10c2e0 <_Heap_Walk+0x2ff> - 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; 10c161: 8b 43 04 mov 0x4(%ebx),%eax 10c164: 89 c1 mov %eax,%ecx 10c166: 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); 10c169: 8d 34 0b lea (%ebx,%ecx,1),%esi 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; if ( prev_used ) { 10c16c: a8 01 test $0x1,%al 10c16e: 74 0c je 10c17c <_Heap_Walk+0x19b> (*printer)( 10c170: 83 ec 0c sub $0xc,%esp 10c173: 51 push %ecx 10c174: 53 push %ebx 10c175: 68 83 02 12 00 push $0x120283 10c17a: eb 0b jmp 10c187 <_Heap_Walk+0x1a6> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10c17c: 50 push %eax 10c17d: 50 push %eax 10c17e: ff 33 pushl (%ebx) 10c180: 51 push %ecx 10c181: 53 push %ebx 10c182: 68 9a 02 12 00 push $0x12029a 10c187: 6a 00 push $0x0 10c189: ff 75 e0 pushl -0x20(%ebp) 10c18c: 89 4d bc mov %ecx,-0x44(%ebp) 10c18f: ff 55 e4 call *-0x1c(%ebp) 10c192: 83 c4 20 add $0x20,%esp 10c195: 8b 4d bc mov -0x44(%ebp),%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 10c198: 31 c0 xor %eax,%eax 10c19a: 39 77 20 cmp %esi,0x20(%edi) 10c19d: 77 08 ja 10c1a7 <_Heap_Walk+0x1c6> <== NEVER TAKEN 10c19f: 31 c0 xor %eax,%eax 10c1a1: 39 77 24 cmp %esi,0x24(%edi) 10c1a4: 0f 93 c0 setae %al block_size, block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 10c1a7: 85 c0 test %eax,%eax 10c1a9: 75 11 jne 10c1bc <_Heap_Walk+0x1db> 10c1ab: 89 f1 mov %esi,%ecx 10c1ad: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c1b0: 83 ec 0c sub $0xc,%esp 10c1b3: 51 push %ecx 10c1b4: 53 push %ebx 10c1b5: 68 bf 02 12 00 push $0x1202bf 10c1ba: eb 43 jmp 10c1ff <_Heap_Walk+0x21e> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 10c1bc: 89 c8 mov %ecx,%eax 10c1be: 31 d2 xor %edx,%edx 10c1c0: f7 75 d4 divl -0x2c(%ebp) 10c1c3: 85 d2 test %edx,%edx 10c1c5: 74 0f je 10c1d6 <_Heap_Walk+0x1f5> 10c1c7: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c1ca: 83 ec 0c sub $0xc,%esp 10c1cd: 51 push %ecx 10c1ce: 53 push %ebx 10c1cf: 68 ec 02 12 00 push $0x1202ec 10c1d4: eb 29 jmp 10c1ff <_Heap_Walk+0x21e> ); return false; } if ( block_size < min_block_size ) { 10c1d6: 3b 4d dc cmp -0x24(%ebp),%ecx 10c1d9: 73 11 jae 10c1ec <_Heap_Walk+0x20b> 10c1db: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c1de: 57 push %edi 10c1df: 57 push %edi 10c1e0: ff 75 dc pushl -0x24(%ebp) 10c1e3: 51 push %ecx 10c1e4: 53 push %ebx 10c1e5: 68 1a 03 12 00 push $0x12031a 10c1ea: eb 13 jmp 10c1ff <_Heap_Walk+0x21e> ); return false; } if ( next_block_begin <= block_begin ) { 10c1ec: 39 de cmp %ebx,%esi 10c1ee: 77 1f ja 10c20f <_Heap_Walk+0x22e> 10c1f0: 89 f1 mov %esi,%ecx 10c1f2: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c1f5: 83 ec 0c sub $0xc,%esp 10c1f8: 51 push %ecx 10c1f9: 53 push %ebx 10c1fa: 68 45 03 12 00 push $0x120345 10c1ff: 6a 01 push $0x1 10c201: 56 push %esi 10c202: ff 55 e4 call *-0x1c(%ebp) 10c205: 31 c0 xor %eax,%eax "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 10c207: 83 c4 20 add $0x20,%esp 10c20a: e9 dc 00 00 00 jmp 10c2eb <_Heap_Walk+0x30a> } if ( !_Heap_Is_prev_used( next_block ) ) { 10c20f: f6 46 04 01 testb $0x1,0x4(%esi) 10c213: 0f 85 c5 00 00 00 jne 10c2de <_Heap_Walk+0x2fd> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10c219: 8b 47 08 mov 0x8(%edi),%eax 10c21c: 89 45 c0 mov %eax,-0x40(%ebp) 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; 10c21f: 8b 53 04 mov 0x4(%ebx),%edx 10c222: 89 55 c4 mov %edx,-0x3c(%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; 10c225: 83 e2 fe and $0xfffffffe,%edx 10c228: 89 55 cc mov %edx,-0x34(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c22b: 01 da add %ebx,%edx 10c22d: 89 55 c8 mov %edx,-0x38(%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)( 10c230: 8b 4b 08 mov 0x8(%ebx),%ecx 10c233: 89 4d b4 mov %ecx,-0x4c(%ebp) return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 10c236: ba 79 03 12 00 mov $0x120379,%edx 10c23b: 3b 4f 0c cmp 0xc(%edi),%ecx 10c23e: 74 0e je 10c24e <_Heap_Walk+0x26d> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10c240: ba 83 03 12 00 mov $0x120383,%edx 10c245: 39 f9 cmp %edi,%ecx 10c247: 74 05 je 10c24e <_Heap_Walk+0x26d> 10c249: ba ad ff 11 00 mov $0x11ffad,%edx 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)( 10c24e: 8b 43 0c mov 0xc(%ebx),%eax 10c251: 89 45 d8 mov %eax,-0x28(%ebp) 10c254: b8 8d 03 12 00 mov $0x12038d,%eax 10c259: 8b 4d c0 mov -0x40(%ebp),%ecx 10c25c: 39 4d d8 cmp %ecx,-0x28(%ebp) 10c25f: 74 0f je 10c270 <_Heap_Walk+0x28f> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 10c261: b8 98 03 12 00 mov $0x120398,%eax 10c266: 39 7d d8 cmp %edi,-0x28(%ebp) 10c269: 74 05 je 10c270 <_Heap_Walk+0x28f> 10c26b: b8 ad ff 11 00 mov $0x11ffad,%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)( 10c270: 52 push %edx 10c271: ff 75 b4 pushl -0x4c(%ebp) 10c274: 50 push %eax 10c275: ff 75 d8 pushl -0x28(%ebp) 10c278: 53 push %ebx 10c279: 68 a2 03 12 00 push $0x1203a2 10c27e: 6a 00 push $0x0 10c280: ff 75 e0 pushl -0x20(%ebp) 10c283: ff 55 e4 call *-0x1c(%ebp) block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 10c286: 8b 55 c8 mov -0x38(%ebp),%edx 10c289: 8b 02 mov (%edx),%eax 10c28b: 83 c4 20 add $0x20,%esp 10c28e: 39 45 cc cmp %eax,-0x34(%ebp) 10c291: 74 14 je 10c2a7 <_Heap_Walk+0x2c6> 10c293: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c296: 51 push %ecx 10c297: 52 push %edx 10c298: 50 push %eax 10c299: ff 75 cc pushl -0x34(%ebp) 10c29c: 53 push %ebx 10c29d: 68 ce 03 12 00 push $0x1203ce 10c2a2: e9 58 ff ff ff jmp 10c1ff <_Heap_Walk+0x21e> ); return false; } if ( !prev_used ) { 10c2a7: f6 45 c4 01 testb $0x1,-0x3c(%ebp) 10c2ab: 75 16 jne 10c2c3 <_Heap_Walk+0x2e2> 10c2ad: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c2b0: 53 push %ebx 10c2b1: 68 07 04 12 00 push $0x120407 10c2b6: 6a 01 push $0x1 10c2b8: 56 push %esi 10c2b9: ff 55 e4 call *-0x1c(%ebp) 10c2bc: 31 c0 xor %eax,%eax 10c2be: 83 c4 10 add $0x10,%esp 10c2c1: eb 28 jmp 10c2eb <_Heap_Walk+0x30a> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10c2c3: 8b 47 08 mov 0x8(%edi),%eax 10c2c6: eb 07 jmp 10c2cf <_Heap_Walk+0x2ee> { 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 ) { 10c2c8: 39 d8 cmp %ebx,%eax 10c2ca: 74 12 je 10c2de <_Heap_Walk+0x2fd> return true; } free_block = free_block->next; 10c2cc: 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 ) { 10c2cf: 39 f8 cmp %edi,%eax 10c2d1: 75 f5 jne 10c2c8 <_Heap_Walk+0x2e7> 10c2d3: 8b 75 e0 mov -0x20(%ebp),%esi return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10c2d6: 53 push %ebx 10c2d7: 68 36 04 12 00 push $0x120436 10c2dc: eb d8 jmp 10c2b6 <_Heap_Walk+0x2d5> ) { 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 ) { 10c2de: 89 f3 mov %esi,%ebx if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10c2e0: 3b 5d d0 cmp -0x30(%ebp),%ebx 10c2e3: 0f 85 78 fe ff ff jne 10c161 <_Heap_Walk+0x180> 10c2e9: b0 01 mov $0x1,%al block = next_block; } return true; } 10c2eb: 8d 65 f4 lea -0xc(%ebp),%esp 10c2ee: 5b pop %ebx 10c2ef: 5e pop %esi 10c2f0: 5f pop %edi 10c2f1: c9 leave 10c2f2: c3 ret =============================================================================== 0010b5d0 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10b5d0: 55 push %ebp 10b5d1: 89 e5 mov %esp,%ebp 10b5d3: 53 push %ebx 10b5d4: 83 ec 08 sub $0x8,%esp 10b5d7: 8b 45 08 mov 0x8(%ebp),%eax 10b5da: 8b 55 0c mov 0xc(%ebp),%edx 10b5dd: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10b5e0: a3 f4 56 12 00 mov %eax,0x1256f4 _Internal_errors_What_happened.is_internal = is_internal; 10b5e5: 88 15 f8 56 12 00 mov %dl,0x1256f8 _Internal_errors_What_happened.the_error = the_error; 10b5eb: 89 1d fc 56 12 00 mov %ebx,0x1256fc _User_extensions_Fatal( the_source, is_internal, the_error ); 10b5f1: 53 push %ebx 10b5f2: 0f b6 d2 movzbl %dl,%edx 10b5f5: 52 push %edx 10b5f6: 50 push %eax 10b5f7: e8 ab 18 00 00 call 10cea7 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10b5fc: c7 05 e8 57 12 00 05 movl $0x5,0x1257e8 <== NOT EXECUTED 10b603: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10b606: fa cli <== NOT EXECUTED 10b607: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10b609: f4 hlt <== NOT EXECUTED 10b60a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b60d: eb fe jmp 10b60d <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 0010b668 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10b668: 55 push %ebp 10b669: 89 e5 mov %esp,%ebp 10b66b: 56 push %esi 10b66c: 53 push %ebx 10b66d: 8b 5d 08 mov 0x8(%ebp),%ebx * 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 ) 10b670: 31 c9 xor %ecx,%ecx 10b672: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 10b676: 74 53 je 10b6cb <_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 ); 10b678: 8d 73 20 lea 0x20(%ebx),%esi 10b67b: 83 ec 0c sub $0xc,%esp 10b67e: 56 push %esi 10b67f: e8 b0 f7 ff ff call 10ae34 <_Chain_Get> 10b684: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10b686: 83 c4 10 add $0x10,%esp 10b689: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b68d: 74 3c je 10b6cb <_Objects_Allocate+0x63> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10b68f: 85 c0 test %eax,%eax 10b691: 75 1a jne 10b6ad <_Objects_Allocate+0x45> _Objects_Extend_information( information ); 10b693: 83 ec 0c sub $0xc,%esp 10b696: 53 push %ebx 10b697: e8 60 00 00 00 call 10b6fc <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10b69c: 89 34 24 mov %esi,(%esp) 10b69f: e8 90 f7 ff ff call 10ae34 <_Chain_Get> 10b6a4: 89 c1 mov %eax,%ecx } if ( the_object ) { 10b6a6: 83 c4 10 add $0x10,%esp 10b6a9: 85 c0 test %eax,%eax 10b6ab: 74 1e je 10b6cb <_Objects_Allocate+0x63> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10b6ad: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10b6b1: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10b6b5: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 10b6b7: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10b6bb: 31 d2 xor %edx,%edx 10b6bd: f7 f6 div %esi 10b6bf: c1 e0 02 shl $0x2,%eax 10b6c2: 03 43 30 add 0x30(%ebx),%eax 10b6c5: ff 08 decl (%eax) information->inactive--; 10b6c7: 66 ff 4b 2c decw 0x2c(%ebx) } } return the_object; } 10b6cb: 89 c8 mov %ecx,%eax 10b6cd: 8d 65 f8 lea -0x8(%ebp),%esp 10b6d0: 5b pop %ebx 10b6d1: 5e pop %esi 10b6d2: c9 leave 10b6d3: c3 ret =============================================================================== 0010b6fc <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10b6fc: 55 push %ebp 10b6fd: 89 e5 mov %esp,%ebp 10b6ff: 57 push %edi 10b700: 56 push %esi 10b701: 53 push %ebx 10b702: 83 ec 4c sub $0x4c,%esp 10b705: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); 10b708: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10b70c: 89 45 c8 mov %eax,-0x38(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10b70f: 8b 4b 34 mov 0x34(%ebx),%ecx 10b712: 85 c9 test %ecx,%ecx 10b714: 75 0e jne 10b724 <_Objects_Extend_information+0x28> 10b716: 89 45 d4 mov %eax,-0x2c(%ebp) 10b719: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10b720: 31 d2 xor %edx,%edx 10b722: eb 31 jmp 10b755 <_Objects_Extend_information+0x59> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10b724: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10b728: 8b 43 10 mov 0x10(%ebx),%eax 10b72b: 31 d2 xor %edx,%edx 10b72d: 66 f7 f6 div %si 10b730: 0f b7 d0 movzwl %ax,%edx 10b733: 8b 7d c8 mov -0x38(%ebp),%edi 10b736: 89 7d d4 mov %edi,-0x2c(%ebp) 10b739: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10b740: 31 c0 xor %eax,%eax for ( ; block < block_count; block++ ) { 10b742: eb 0a jmp 10b74e <_Objects_Extend_information+0x52> if ( information->object_blocks[ block ] == NULL ) 10b744: 83 3c 81 00 cmpl $0x0,(%ecx,%eax,4) 10b748: 74 08 je 10b752 <_Objects_Extend_information+0x56> 10b74a: 01 75 d4 add %esi,-0x2c(%ebp) if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10b74d: 40 inc %eax 10b74e: 39 d0 cmp %edx,%eax 10b750: 72 f2 jb 10b744 <_Objects_Extend_information+0x48> 10b752: 89 45 cc mov %eax,-0x34(%ebp) else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10b755: 0f b7 43 14 movzwl 0x14(%ebx),%eax 10b759: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10b75d: 8d 0c 08 lea (%eax,%ecx,1),%ecx 10b760: 89 4d b8 mov %ecx,-0x48(%ebp) /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 10b763: 81 f9 ff ff 00 00 cmp $0xffff,%ecx 10b769: 0f 87 db 01 00 00 ja 10b94a <_Objects_Extend_information+0x24e><== NEVER TAKEN /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 10b76f: 0f af 43 18 imul 0x18(%ebx),%eax if ( information->auto_extend ) { 10b773: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b777: 74 1e je 10b797 <_Objects_Extend_information+0x9b> new_object_block = _Workspace_Allocate( block_size ); 10b779: 83 ec 0c sub $0xc,%esp 10b77c: 50 push %eax 10b77d: 89 55 b4 mov %edx,-0x4c(%ebp) 10b780: e8 53 1a 00 00 call 10d1d8 <_Workspace_Allocate> 10b785: 89 45 bc mov %eax,-0x44(%ebp) if ( !new_object_block ) 10b788: 83 c4 10 add $0x10,%esp 10b78b: 85 c0 test %eax,%eax 10b78d: 8b 55 b4 mov -0x4c(%ebp),%edx 10b790: 75 1a jne 10b7ac <_Objects_Extend_information+0xb0> 10b792: e9 b3 01 00 00 jmp 10b94a <_Objects_Extend_information+0x24e> return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 10b797: 83 ec 0c sub $0xc,%esp 10b79a: 50 push %eax 10b79b: 89 55 b4 mov %edx,-0x4c(%ebp) 10b79e: e8 09 1a 00 00 call 10d1ac <_Workspace_Allocate_or_fatal_error> 10b7a3: 89 45 bc mov %eax,-0x44(%ebp) 10b7a6: 83 c4 10 add $0x10,%esp 10b7a9: 8b 55 b4 mov -0x4c(%ebp),%edx } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 10b7ac: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10b7b0: 39 45 d4 cmp %eax,-0x2c(%ebp) 10b7b3: 0f 82 14 01 00 00 jb 10b8cd <_Objects_Extend_information+0x1d1> */ /* * Up the block count and maximum */ block_count++; 10b7b9: 8d 72 01 lea 0x1(%edx),%esi * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 10b7bc: 83 ec 0c sub $0xc,%esp 10b7bf: 8b 4d b8 mov -0x48(%ebp),%ecx 10b7c2: 03 4d c8 add -0x38(%ebp),%ecx 10b7c5: 8d 04 76 lea (%esi,%esi,2),%eax 10b7c8: 8d 04 01 lea (%ecx,%eax,1),%eax 10b7cb: c1 e0 02 shl $0x2,%eax 10b7ce: 50 push %eax 10b7cf: 89 55 b4 mov %edx,-0x4c(%ebp) 10b7d2: e8 01 1a 00 00 call 10d1d8 <_Workspace_Allocate> if ( !object_blocks ) { 10b7d7: 83 c4 10 add $0x10,%esp 10b7da: 85 c0 test %eax,%eax 10b7dc: 8b 55 b4 mov -0x4c(%ebp),%edx 10b7df: 75 13 jne 10b7f4 <_Objects_Extend_information+0xf8> _Workspace_Free( new_object_block ); 10b7e1: 83 ec 0c sub $0xc,%esp 10b7e4: ff 75 bc pushl -0x44(%ebp) 10b7e7: e8 05 1a 00 00 call 10d1f1 <_Workspace_Free> return; 10b7ec: 83 c4 10 add $0x10,%esp 10b7ef: e9 56 01 00 00 jmp 10b94a <_Objects_Extend_information+0x24e> RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 10b7f4: 8d 0c b0 lea (%eax,%esi,4),%ecx 10b7f7: 89 4d c0 mov %ecx,-0x40(%ebp) 10b7fa: 8d 34 f0 lea (%eax,%esi,8),%esi 10b7fd: 89 75 c4 mov %esi,-0x3c(%ebp) * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 10b800: 0f b7 73 10 movzwl 0x10(%ebx),%esi 10b804: 31 c9 xor %ecx,%ecx 10b806: 3b 75 c8 cmp -0x38(%ebp),%esi 10b809: 76 3e jbe 10b849 <_Objects_Extend_information+0x14d> /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 10b80b: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi 10b812: 89 75 d0 mov %esi,-0x30(%ebp) 10b815: 8b 73 34 mov 0x34(%ebx),%esi 10b818: 89 c7 mov %eax,%edi 10b81a: 8b 4d d0 mov -0x30(%ebp),%ecx 10b81d: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10b81f: 8b 73 30 mov 0x30(%ebx),%esi 10b822: 8b 7d c0 mov -0x40(%ebp),%edi 10b825: 8b 4d d0 mov -0x30(%ebp),%ecx 10b828: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10b82a: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10b82e: 03 4d c8 add -0x38(%ebp),%ecx 10b831: c1 e1 02 shl $0x2,%ecx 10b834: 8b 73 1c mov 0x1c(%ebx),%esi 10b837: 8b 7d c4 mov -0x3c(%ebp),%edi 10b83a: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10b83c: eb 10 jmp 10b84e <_Objects_Extend_information+0x152> /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 10b83e: 8b 7d c4 mov -0x3c(%ebp),%edi 10b841: c7 04 8f 00 00 00 00 movl $0x0,(%edi,%ecx,4) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10b848: 41 inc %ecx 10b849: 3b 4d c8 cmp -0x38(%ebp),%ecx 10b84c: 72 f0 jb 10b83e <_Objects_Extend_information+0x142> } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10b84e: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) inactive_per_block[block_count] = 0; 10b855: 8b 4d c0 mov -0x40(%ebp),%ecx 10b858: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,4) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10b85f: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b863: 8b 75 d4 mov -0x2c(%ebp),%esi 10b866: 01 d6 add %edx,%esi 10b868: 8b 7d d4 mov -0x2c(%ebp),%edi 10b86b: 8b 55 c4 mov -0x3c(%ebp),%edx 10b86e: 8d 0c ba lea (%edx,%edi,4),%ecx 10b871: 89 fa mov %edi,%edx * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10b873: eb 0a jmp 10b87f <_Objects_Extend_information+0x183> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10b875: c7 01 00 00 00 00 movl $0x0,(%ecx) object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 10b87b: 42 inc %edx 10b87c: 83 c1 04 add $0x4,%ecx * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10b87f: 39 f2 cmp %esi,%edx 10b881: 72 f2 jb 10b875 <_Objects_Extend_information+0x179> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10b883: 9c pushf 10b884: fa cli 10b885: 5e pop %esi old_tables = information->object_blocks; 10b886: 8b 53 34 mov 0x34(%ebx),%edx information->object_blocks = object_blocks; 10b889: 89 43 34 mov %eax,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10b88c: 8b 4d c0 mov -0x40(%ebp),%ecx 10b88f: 89 4b 30 mov %ecx,0x30(%ebx) information->local_table = local_table; 10b892: 8b 7d c4 mov -0x3c(%ebp),%edi 10b895: 89 7b 1c mov %edi,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10b898: 8b 45 b8 mov -0x48(%ebp),%eax 10b89b: 66 89 43 10 mov %ax,0x10(%ebx) information->maximum_id = _Objects_Build_id( 10b89f: 8b 03 mov (%ebx),%eax 10b8a1: c1 e0 18 shl $0x18,%eax 10b8a4: 0d 00 00 01 00 or $0x10000,%eax 10b8a9: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10b8ad: c1 e1 1b shl $0x1b,%ecx 10b8b0: 09 c8 or %ecx,%eax 10b8b2: 0f b7 4d b8 movzwl -0x48(%ebp),%ecx 10b8b6: 09 c8 or %ecx,%eax 10b8b8: 89 43 0c mov %eax,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10b8bb: 56 push %esi 10b8bc: 9d popf if ( old_tables ) 10b8bd: 85 d2 test %edx,%edx 10b8bf: 74 0c je 10b8cd <_Objects_Extend_information+0x1d1> _Workspace_Free( old_tables ); 10b8c1: 83 ec 0c sub $0xc,%esp 10b8c4: 52 push %edx 10b8c5: e8 27 19 00 00 call 10d1f1 <_Workspace_Free> 10b8ca: 83 c4 10 add $0x10,%esp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10b8cd: 8b 55 cc mov -0x34(%ebp),%edx 10b8d0: c1 e2 02 shl $0x2,%edx 10b8d3: 89 55 d0 mov %edx,-0x30(%ebp) 10b8d6: 8b 43 34 mov 0x34(%ebx),%eax 10b8d9: 8b 75 bc mov -0x44(%ebp),%esi 10b8dc: 8b 4d cc mov -0x34(%ebp),%ecx 10b8df: 89 34 88 mov %esi,(%eax,%ecx,4) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10b8e2: ff 73 18 pushl 0x18(%ebx) 10b8e5: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b8e9: 52 push %edx 10b8ea: ff 34 88 pushl (%eax,%ecx,4) 10b8ed: 8d 45 dc lea -0x24(%ebp),%eax 10b8f0: 50 push %eax 10b8f1: 89 45 b4 mov %eax,-0x4c(%ebp) 10b8f4: e8 9f 3d 00 00 call 10f698 <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b8f9: 8d 7b 20 lea 0x20(%ebx),%edi 10b8fc: 8b 75 d4 mov -0x2c(%ebp),%esi 10b8ff: eb 23 jmp 10b924 <_Objects_Extend_information+0x228> */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 10b901: 8b 13 mov (%ebx),%edx 10b903: c1 e2 18 shl $0x18,%edx 10b906: 81 ca 00 00 01 00 or $0x10000,%edx 10b90c: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10b910: c1 e1 1b shl $0x1b,%ecx 10b913: 09 ca or %ecx,%edx 10b915: 09 f2 or %esi,%edx 10b917: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b91a: 52 push %edx 10b91b: 52 push %edx 10b91c: 50 push %eax 10b91d: 57 push %edi 10b91e: e8 d5 f4 ff ff call 10adf8 <_Chain_Append> index++; 10b923: 46 inc %esi /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10b924: 8d 45 dc lea -0x24(%ebp),%eax 10b927: 89 04 24 mov %eax,(%esp) 10b92a: e8 05 f5 ff ff call 10ae34 <_Chain_Get> 10b92f: 83 c4 10 add $0x10,%esp 10b932: 85 c0 test %eax,%eax 10b934: 75 cb jne 10b901 <_Objects_Extend_information+0x205> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10b936: 8b 43 30 mov 0x30(%ebx),%eax 10b939: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b93d: 8b 4d d0 mov -0x30(%ebp),%ecx 10b940: 89 14 08 mov %edx,(%eax,%ecx,1) information->inactive = 10b943: 8b 43 14 mov 0x14(%ebx),%eax 10b946: 66 01 43 2c add %ax,0x2c(%ebx) (Objects_Maximum)(information->inactive + information->allocation_size); } 10b94a: 8d 65 f4 lea -0xc(%ebp),%esp 10b94d: 5b pop %ebx 10b94e: 5e pop %esi 10b94f: 5f pop %edi 10b950: c9 leave 10b951: c3 ret =============================================================================== 0010b9e4 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10b9e4: 55 push %ebp 10b9e5: 89 e5 mov %esp,%ebp 10b9e7: 56 push %esi 10b9e8: 53 push %ebx 10b9e9: 8b 75 08 mov 0x8(%ebp),%esi 10b9ec: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10b9ef: 85 db test %ebx,%ebx 10b9f1: 74 2d je 10ba20 <_Objects_Get_information+0x3c> /* * 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 ); 10b9f3: 83 ec 0c sub $0xc,%esp 10b9f6: 56 push %esi 10b9f7: e8 0c 42 00 00 call 10fc08 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10b9fc: 83 c4 10 add $0x10,%esp 10b9ff: 85 c0 test %eax,%eax 10ba01: 74 1d je 10ba20 <_Objects_Get_information+0x3c> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10ba03: 39 c3 cmp %eax,%ebx 10ba05: 77 19 ja 10ba20 <_Objects_Get_information+0x3c> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10ba07: 8b 04 b5 24 56 12 00 mov 0x125624(,%esi,4),%eax 10ba0e: 85 c0 test %eax,%eax 10ba10: 74 0e je 10ba20 <_Objects_Get_information+0x3c><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10ba12: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !info ) 10ba15: 85 c0 test %eax,%eax 10ba17: 74 09 je 10ba22 <_Objects_Get_information+0x3e><== NEVER TAKEN * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 10ba19: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10ba1e: 75 02 jne 10ba22 <_Objects_Get_information+0x3e> 10ba20: 31 c0 xor %eax,%eax return NULL; #endif return info; } 10ba22: 8d 65 f8 lea -0x8(%ebp),%esp 10ba25: 5b pop %ebx 10ba26: 5e pop %esi 10ba27: c9 leave 10ba28: c3 ret =============================================================================== 00118f40 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 118f40: 55 push %ebp 118f41: 89 e5 mov %esp,%ebp 118f43: 53 push %ebx 118f44: 8b 55 08 mov 0x8(%ebp),%edx 118f47: 8b 4d 10 mov 0x10(%ebp),%ecx /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 118f4a: b8 01 00 00 00 mov $0x1,%eax 118f4f: 2b 42 08 sub 0x8(%edx),%eax 118f52: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 118f55: 0f b7 5a 10 movzwl 0x10(%edx),%ebx 118f59: 39 c3 cmp %eax,%ebx 118f5b: 72 12 jb 118f6f <_Objects_Get_no_protection+0x2f> if ( (the_object = information->local_table[ index ]) != NULL ) { 118f5d: 8b 52 1c mov 0x1c(%edx),%edx 118f60: 8b 04 82 mov (%edx,%eax,4),%eax 118f63: 85 c0 test %eax,%eax 118f65: 74 08 je 118f6f <_Objects_Get_no_protection+0x2f><== NEVER TAKEN *location = OBJECTS_LOCAL; 118f67: c7 01 00 00 00 00 movl $0x0,(%ecx) return the_object; 118f6d: eb 08 jmp 118f77 <_Objects_Get_no_protection+0x37> /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 118f6f: c7 01 01 00 00 00 movl $0x1,(%ecx) 118f75: 31 c0 xor %eax,%eax return NULL; } 118f77: 5b pop %ebx 118f78: c9 leave 118f79: c3 ret =============================================================================== 0010cbd0 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10cbd0: 55 push %ebp 10cbd1: 89 e5 mov %esp,%ebp 10cbd3: 83 ec 18 sub $0x18,%esp /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10cbd6: 8b 45 08 mov 0x8(%ebp),%eax 10cbd9: 85 c0 test %eax,%eax 10cbdb: 75 08 jne 10cbe5 <_Objects_Id_to_name+0x15> 10cbdd: a1 98 72 12 00 mov 0x127298,%eax 10cbe2: 8b 40 08 mov 0x8(%eax),%eax */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 10cbe5: 89 c2 mov %eax,%edx 10cbe7: c1 ea 18 shr $0x18,%edx 10cbea: 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 ) 10cbed: 8d 4a ff lea -0x1(%edx),%ecx 10cbf0: 83 f9 03 cmp $0x3,%ecx 10cbf3: 77 32 ja 10cc27 <_Objects_Id_to_name+0x57> 10cbf5: eb 37 jmp 10cc2e <_Objects_Id_to_name+0x5e> if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10cbf7: 89 c1 mov %eax,%ecx 10cbf9: c1 e9 1b shr $0x1b,%ecx 10cbfc: 8b 14 8a mov (%edx,%ecx,4),%edx if ( !information ) 10cbff: 85 d2 test %edx,%edx 10cc01: 74 24 je 10cc27 <_Objects_Id_to_name+0x57><== 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 ); 10cc03: 51 push %ecx 10cc04: 8d 4d f4 lea -0xc(%ebp),%ecx 10cc07: 51 push %ecx 10cc08: 50 push %eax 10cc09: 52 push %edx 10cc0a: e8 69 ff ff ff call 10cb78 <_Objects_Get> if ( !the_object ) 10cc0f: 83 c4 10 add $0x10,%esp 10cc12: 85 c0 test %eax,%eax 10cc14: 74 11 je 10cc27 <_Objects_Id_to_name+0x57> return OBJECTS_INVALID_ID; *name = the_object->name; 10cc16: 8b 50 0c mov 0xc(%eax),%edx 10cc19: 8b 45 0c mov 0xc(%ebp),%eax 10cc1c: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10cc1e: e8 86 07 00 00 call 10d3a9 <_Thread_Enable_dispatch> 10cc23: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10cc25: eb 05 jmp 10cc2c <_Objects_Id_to_name+0x5c> 10cc27: b8 03 00 00 00 mov $0x3,%eax } 10cc2c: c9 leave 10cc2d: 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 ] ) 10cc2e: 8b 14 95 b0 71 12 00 mov 0x1271b0(,%edx,4),%edx 10cc35: 85 d2 test %edx,%edx 10cc37: 75 be jne 10cbf7 <_Objects_Id_to_name+0x27> 10cc39: eb ec jmp 10cc27 <_Objects_Id_to_name+0x57> =============================================================================== 0010bad4 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10bad4: 55 push %ebp 10bad5: 89 e5 mov %esp,%ebp 10bad7: 57 push %edi 10bad8: 56 push %esi 10bad9: 53 push %ebx 10bada: 83 ec 1c sub $0x1c,%esp 10badd: 8b 45 08 mov 0x8(%ebp),%eax 10bae0: 8b 55 0c mov 0xc(%ebp),%edx 10bae3: 8b 75 10 mov 0x10(%ebp),%esi 10bae6: 8b 5d 14 mov 0x14(%ebp),%ebx 10bae9: 8b 4d 20 mov 0x20(%ebp),%ecx 10baec: 89 4d e4 mov %ecx,-0x1c(%ebp) 10baef: 0f b7 7d 18 movzwl 0x18(%ebp),%edi uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 10baf3: 89 10 mov %edx,(%eax) information->the_class = the_class; 10baf5: 66 89 70 04 mov %si,0x4(%eax) information->size = size; 10baf9: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10bafc: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10bb03: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10bb0a: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10bb11: 66 c7 40 2c 00 00 movw $0x0,0x2c(%eax) /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; 10bb17: 66 c7 40 10 00 00 movw $0x0,0x10(%eax) /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 10bb1d: 8b 3c 95 24 56 12 00 mov 0x125624(,%edx,4),%edi 10bb24: 89 04 b7 mov %eax,(%edi,%esi,4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 10bb27: 89 df mov %ebx,%edi 10bb29: c1 ef 1f shr $0x1f,%edi _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 10bb2c: 89 f9 mov %edi,%ecx 10bb2e: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10bb31: 89 d9 mov %ebx,%ecx 10bb33: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10bb39: 85 ff test %edi,%edi 10bb3b: 74 10 je 10bb4d <_Objects_Initialize_information+0x79> 10bb3d: 85 c9 test %ecx,%ecx 10bb3f: 75 0c jne 10bb4d <_Objects_Initialize_information+0x79> _Internal_error_Occurred( 10bb41: 50 push %eax 10bb42: 6a 14 push $0x14 10bb44: 6a 01 push $0x1 10bb46: 6a 00 push $0x0 10bb48: e8 83 fa ff ff call 10b5d0 <_Internal_error_Occurred> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10bb4d: 66 89 48 14 mov %cx,0x14(%eax) /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 10bb51: c7 40 1c f8 52 12 00 movl $0x1252f8,0x1c(%eax) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 10bb58: c1 e2 18 shl $0x18,%edx 10bb5b: 81 ca 00 00 01 00 or $0x10000,%edx 10bb61: c1 e6 1b shl $0x1b,%esi 10bb64: 09 f2 or %esi,%edx 10bb66: 85 c9 test %ecx,%ecx 10bb68: 0f 95 c3 setne %bl 10bb6b: 89 de mov %ebx,%esi 10bb6d: 81 e6 ff 00 00 00 and $0xff,%esi 10bb73: 09 f2 or %esi,%edx 10bb75: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10bb78: 8b 55 e4 mov -0x1c(%ebp),%edx 10bb7b: f6 c2 03 test $0x3,%dl 10bb7e: 74 06 je 10bb86 <_Objects_Initialize_information+0xb2><== ALWAYS TAKEN name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 10bb80: 83 c2 04 add $0x4,%edx <== NOT EXECUTED 10bb83: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10bb86: 66 89 50 38 mov %dx,0x38(%eax) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10bb8a: 8d 50 24 lea 0x24(%eax),%edx 10bb8d: 89 50 20 mov %edx,0x20(%eax) the_chain->permanent_null = NULL; 10bb90: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) the_chain->last = _Chain_Head(the_chain); 10bb97: 8d 50 20 lea 0x20(%eax),%edx 10bb9a: 89 50 28 mov %edx,0x28(%eax) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10bb9d: 85 c9 test %ecx,%ecx 10bb9f: 74 0f je 10bbb0 <_Objects_Initialize_information+0xdc> /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 10bba1: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10bba4: 8d 65 f4 lea -0xc(%ebp),%esp 10bba7: 5b pop %ebx 10bba8: 5e pop %esi 10bba9: 5f pop %edi 10bbaa: c9 leave /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 10bbab: e9 4c fb ff ff jmp 10b6fc <_Objects_Extend_information> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10bbb0: 8d 65 f4 lea -0xc(%ebp),%esp 10bbb3: 5b pop %ebx 10bbb4: 5e pop %esi 10bbb5: 5f pop %edi 10bbb6: c9 leave 10bbb7: c3 ret =============================================================================== 0010f45a <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 10f45a: 55 push %ebp 10f45b: 89 e5 mov %esp,%ebp 10f45d: 57 push %edi 10f45e: 56 push %esi 10f45f: 53 push %ebx 10f460: 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 ]; 10f463: 8b 45 08 mov 0x8(%ebp),%eax 10f466: 8b 98 f0 00 00 00 mov 0xf0(%eax),%ebx if ( !api ) 10f46c: 85 db test %ebx,%ebx 10f46e: 74 45 je 10f4b5 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 10f470: 9c pushf 10f471: fa cli 10f472: 58 pop %eax signal_set = asr->signals_posted; 10f473: 8b 7b 14 mov 0x14(%ebx),%edi asr->signals_posted = 0; 10f476: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 10f47d: 50 push %eax 10f47e: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 10f47f: 85 ff test %edi,%edi 10f481: 74 32 je 10f4b5 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN return; asr->nest_level += 1; 10f483: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10f486: 50 push %eax 10f487: 8d 75 e4 lea -0x1c(%ebp),%esi 10f48a: 56 push %esi 10f48b: 68 ff ff 00 00 push $0xffff 10f490: ff 73 10 pushl 0x10(%ebx) 10f493: e8 d4 20 00 00 call 11156c (*asr->handler)( signal_set ); 10f498: 89 3c 24 mov %edi,(%esp) 10f49b: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 10f49e: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10f4a1: 83 c4 0c add $0xc,%esp 10f4a4: 56 push %esi 10f4a5: 68 ff ff 00 00 push $0xffff 10f4aa: ff 75 e4 pushl -0x1c(%ebp) 10f4ad: e8 ba 20 00 00 call 11156c 10f4b2: 83 c4 10 add $0x10,%esp } 10f4b5: 8d 65 f4 lea -0xc(%ebp),%esp 10f4b8: 5b pop %ebx 10f4b9: 5e pop %esi 10f4ba: 5f pop %edi 10f4bb: c9 leave 10f4bc: c3 ret =============================================================================== 0010b7e0 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 10b7e0: 55 push %ebp 10b7e1: 89 e5 mov %esp,%ebp 10b7e3: 53 push %ebx 10b7e4: 83 ec 18 sub $0x18,%esp 10b7e7: 8d 45 f4 lea -0xc(%ebp),%eax 10b7ea: 50 push %eax 10b7eb: ff 75 08 pushl 0x8(%ebp) 10b7ee: 68 9c 71 12 00 push $0x12719c 10b7f3: e8 a0 19 00 00 call 10d198 <_Objects_Get> 10b7f8: 89 c3 mov %eax,%ebx /* * 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 ); switch ( location ) { 10b7fa: 83 c4 10 add $0x10,%esp 10b7fd: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10b801: 75 64 jne 10b867 <_Rate_monotonic_Timeout+0x87><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 10b803: 8b 40 40 mov 0x40(%eax),%eax if ( _States_Is_waiting_for_period( the_thread->current_state ) && 10b806: f6 40 11 40 testb $0x40,0x11(%eax) 10b80a: 74 18 je 10b824 <_Rate_monotonic_Timeout+0x44> the_thread->Wait.id == the_period->Object.id ) { 10b80c: 8b 50 20 mov 0x20(%eax),%edx 10b80f: 3b 53 08 cmp 0x8(%ebx),%edx 10b812: 75 10 jne 10b824 <_Rate_monotonic_Timeout+0x44> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b814: 52 push %edx 10b815: 52 push %edx 10b816: 68 f8 ff 03 10 push $0x1003fff8 10b81b: 50 push %eax 10b81c: e8 bf 1d 00 00 call 10d5e0 <_Thread_Clear_state> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 10b821: 59 pop %ecx 10b822: eb 10 jmp 10b834 <_Rate_monotonic_Timeout+0x54> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 10b824: 83 7b 38 01 cmpl $0x1,0x38(%ebx) 10b828: 75 2b jne 10b855 <_Rate_monotonic_Timeout+0x75> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 10b82a: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) _Rate_monotonic_Initiate_statistics( the_period ); 10b831: 83 ec 0c sub $0xc,%esp 10b834: 53 push %ebx 10b835: e8 56 fa ff ff call 10b290 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b83a: 8b 43 3c mov 0x3c(%ebx),%eax 10b83d: 89 43 1c mov %eax,0x1c(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b840: 58 pop %eax 10b841: 5a pop %edx 10b842: 83 c3 10 add $0x10,%ebx 10b845: 53 push %ebx 10b846: 68 70 73 12 00 push $0x127370 10b84b: e8 54 30 00 00 call 10e8a4 <_Watchdog_Insert> 10b850: 83 c4 10 add $0x10,%esp 10b853: eb 07 jmp 10b85c <_Rate_monotonic_Timeout+0x7c> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 10b855: c7 43 38 04 00 00 00 movl $0x4,0x38(%ebx) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b85c: a1 94 72 12 00 mov 0x127294,%eax 10b861: 48 dec %eax 10b862: a3 94 72 12 00 mov %eax,0x127294 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b867: 8b 5d fc mov -0x4(%ebp),%ebx 10b86a: c9 leave 10b86b: c3 ret =============================================================================== 0010b108 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10b108: 55 push %ebp 10b109: 89 e5 mov %esp,%ebp 10b10b: 53 push %ebx 10b10c: 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(); 10b10f: 8b 1d 04 42 12 00 mov 0x124204,%ebx if ((!the_tod) || 10b115: 85 c9 test %ecx,%ecx 10b117: 74 59 je 10b172 <_TOD_Validate+0x6a> <== NEVER TAKEN (the_tod->ticks >= ticks_per_second) || 10b119: b8 40 42 0f 00 mov $0xf4240,%eax 10b11e: 31 d2 xor %edx,%edx 10b120: f7 f3 div %ebx 10b122: 39 41 18 cmp %eax,0x18(%ecx) 10b125: 73 4b jae 10b172 <_TOD_Validate+0x6a> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10b127: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10b12b: 77 45 ja 10b172 <_TOD_Validate+0x6a> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10b12d: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10b131: 77 3f ja 10b172 <_TOD_Validate+0x6a> (the_tod->hour >= TOD_HOURS_PER_DAY) || 10b133: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10b137: 77 39 ja 10b172 <_TOD_Validate+0x6a> (the_tod->month == 0) || 10b139: 8b 41 04 mov 0x4(%ecx),%eax 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) || 10b13c: 85 c0 test %eax,%eax 10b13e: 74 32 je 10b172 <_TOD_Validate+0x6a> <== NEVER TAKEN 10b140: 83 f8 0c cmp $0xc,%eax 10b143: 77 2d ja 10b172 <_TOD_Validate+0x6a> (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) || 10b145: 8b 19 mov (%ecx),%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) || 10b147: 81 fb c3 07 00 00 cmp $0x7c3,%ebx 10b14d: 76 23 jbe 10b172 <_TOD_Validate+0x6a> (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) || (the_tod->day == 0) ) 10b14f: 8b 51 08 mov 0x8(%ecx),%edx 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) || 10b152: 85 d2 test %edx,%edx 10b154: 74 1c je 10b172 <_TOD_Validate+0x6a> <== NEVER TAKEN (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10b156: 80 e3 03 and $0x3,%bl 10b159: 75 09 jne 10b164 <_TOD_Validate+0x5c> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10b15b: 8b 04 85 28 19 12 00 mov 0x121928(,%eax,4),%eax 10b162: eb 07 jmp 10b16b <_TOD_Validate+0x63> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 10b164: 8b 04 85 f4 18 12 00 mov 0x1218f4(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10b16b: 39 c2 cmp %eax,%edx 10b16d: 0f 96 c0 setbe %al 10b170: eb 02 jmp 10b174 <_TOD_Validate+0x6c> 10b172: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10b174: 5b pop %ebx 10b175: c9 leave 10b176: c3 ret =============================================================================== 0010bda4 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10bda4: 55 push %ebp 10bda5: 89 e5 mov %esp,%ebp 10bda7: 57 push %edi 10bda8: 56 push %esi 10bda9: 53 push %ebx 10bdaa: 83 ec 28 sub $0x28,%esp 10bdad: 8b 5d 08 mov 0x8(%ebp),%ebx 10bdb0: 8b 7d 0c mov 0xc(%ebp),%edi 10bdb3: 8a 45 10 mov 0x10(%ebp),%al 10bdb6: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10bdb9: 8b 73 10 mov 0x10(%ebx),%esi /* * 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 ); 10bdbc: 53 push %ebx 10bdbd: e8 32 0d 00 00 call 10caf4 <_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 ) 10bdc2: 83 c4 10 add $0x10,%esp 10bdc5: 39 7b 14 cmp %edi,0x14(%ebx) 10bdc8: 74 0c je 10bdd6 <_Thread_Change_priority+0x32> _Thread_Set_priority( the_thread, new_priority ); 10bdca: 50 push %eax 10bdcb: 50 push %eax 10bdcc: 57 push %edi 10bdcd: 53 push %ebx 10bdce: e8 e9 0b 00 00 call 10c9bc <_Thread_Set_priority> 10bdd3: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10bdd6: 9c pushf 10bdd7: fa cli 10bdd8: 59 pop %ecx /* * 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; 10bdd9: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10bddc: 83 f8 04 cmp $0x4,%eax 10bddf: 74 2f je 10be10 <_Thread_Change_priority+0x6c> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10bde1: 83 e6 04 and $0x4,%esi 10bde4: 75 08 jne 10bdee <_Thread_Change_priority+0x4a><== NEVER TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10bde6: 89 c2 mov %eax,%edx 10bde8: 83 e2 fb and $0xfffffffb,%edx 10bdeb: 89 53 10 mov %edx,0x10(%ebx) _ISR_Enable( level ); 10bdee: 51 push %ecx 10bdef: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10bdf0: a9 e0 be 03 00 test $0x3bee0,%eax 10bdf5: 0f 84 c0 00 00 00 je 10bebb <_Thread_Change_priority+0x117> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 10bdfb: 89 5d 0c mov %ebx,0xc(%ebp) 10bdfe: 8b 43 44 mov 0x44(%ebx),%eax 10be01: 89 45 08 mov %eax,0x8(%ebp) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10be04: 8d 65 f4 lea -0xc(%ebp),%esp 10be07: 5b pop %ebx 10be08: 5e pop %esi 10be09: 5f pop %edi 10be0a: c9 leave /* 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 ); 10be0b: e9 24 0b 00 00 jmp 10c934 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10be10: 83 e6 04 and $0x4,%esi 10be13: 75 53 jne 10be68 <_Thread_Change_priority+0xc4><== 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 ); 10be15: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10be1c: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10be22: 66 8b 93 96 00 00 00 mov 0x96(%ebx),%dx 10be29: 66 09 10 or %dx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10be2c: 66 a1 00 57 12 00 mov 0x125700,%ax 10be32: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10be38: 66 a3 00 57 12 00 mov %ax,0x125700 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10be3e: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10be42: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax 10be48: 74 0e je 10be58 <_Thread_Change_priority+0xb4> Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10be4a: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10be4d: 8b 10 mov (%eax),%edx after_node->next = the_node; 10be4f: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10be51: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10be53: 89 5a 04 mov %ebx,0x4(%edx) 10be56: eb 10 jmp 10be68 <_Thread_Change_priority+0xc4> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10be58: 8d 50 04 lea 0x4(%eax),%edx 10be5b: 89 13 mov %edx,(%ebx) old_last_node = the_chain->last; 10be5d: 8b 50 08 mov 0x8(%eax),%edx the_chain->last = the_node; 10be60: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10be63: 89 1a mov %ebx,(%edx) the_node->previous = old_last_node; 10be65: 89 53 04 mov %edx,0x4(%ebx) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 10be68: 51 push %ecx 10be69: 9d popf 10be6a: fa cli RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10be6b: 66 8b 1d 00 57 12 00 mov 0x125700,%bx 10be72: 31 c0 xor %eax,%eax 10be74: 89 c2 mov %eax,%edx 10be76: 66 0f bc d3 bsf %bx,%dx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10be7a: 0f b7 d2 movzwl %dx,%edx 10be7d: 66 8b 9c 12 78 57 12 mov 0x125778(%edx,%edx,1),%bx 10be84: 00 10be85: 66 0f bc c3 bsf %bx,%ax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10be89: c1 e2 04 shl $0x4,%edx 10be8c: 0f b7 c0 movzwl %ax,%eax 10be8f: 01 c2 add %eax,%edx 10be91: 6b d2 0c imul $0xc,%edx,%edx 10be94: 8b 1d 18 56 12 00 mov 0x125618,%ebx 10be9a: 8b 14 1a mov (%edx,%ebx,1),%edx 10be9d: 89 15 dc 56 12 00 mov %edx,0x1256dc * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10bea3: a1 0c 57 12 00 mov 0x12570c,%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. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 10bea8: 39 d0 cmp %edx,%eax 10beaa: 74 0d je 10beb9 <_Thread_Change_priority+0x115> _Thread_Executing->is_preemptible ) 10beac: 80 78 75 00 cmpb $0x0,0x75(%eax) 10beb0: 74 07 je 10beb9 <_Thread_Change_priority+0x115> _Context_Switch_necessary = true; 10beb2: c6 05 1c 57 12 00 01 movb $0x1,0x12571c _ISR_Enable( level ); 10beb9: 51 push %ecx 10beba: 9d popf } 10bebb: 8d 65 f4 lea -0xc(%ebp),%esp 10bebe: 5b pop %ebx 10bebf: 5e pop %esi 10bec0: 5f pop %edi 10bec1: c9 leave 10bec2: c3 ret =============================================================================== 0010bec4 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10bec4: 55 push %ebp 10bec5: 89 e5 mov %esp,%ebp 10bec7: 53 push %ebx 10bec8: 8b 45 08 mov 0x8(%ebp),%eax 10becb: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10bece: 9c pushf 10becf: fa cli 10bed0: 59 pop %ecx current_state = the_thread->current_state; 10bed1: 8b 58 10 mov 0x10(%eax),%ebx if ( current_state & state ) { 10bed4: 85 da test %ebx,%edx 10bed6: 74 71 je 10bf49 <_Thread_Clear_state+0x85> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10bed8: f7 d2 not %edx 10beda: 21 da and %ebx,%edx current_state = 10bedc: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 10bedf: 85 d2 test %edx,%edx 10bee1: 75 66 jne 10bf49 <_Thread_Clear_state+0x85> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10bee3: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10bee9: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 10bef0: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10bef3: 66 8b 15 00 57 12 00 mov 0x125700,%dx 10befa: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10bf00: 66 89 15 00 57 12 00 mov %dx,0x125700 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10bf07: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10bf0d: 8d 5a 04 lea 0x4(%edx),%ebx 10bf10: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10bf12: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10bf15: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10bf18: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10bf1a: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 10bf1d: 51 push %ecx 10bf1e: 9d popf 10bf1f: fa cli * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 10bf20: 8b 50 14 mov 0x14(%eax),%edx 10bf23: 8b 1d dc 56 12 00 mov 0x1256dc,%ebx 10bf29: 3b 53 14 cmp 0x14(%ebx),%edx 10bf2c: 73 1b jae 10bf49 <_Thread_Clear_state+0x85> _Thread_Heir = the_thread; 10bf2e: a3 dc 56 12 00 mov %eax,0x1256dc if ( _Thread_Executing->is_preemptible || 10bf33: a1 0c 57 12 00 mov 0x12570c,%eax 10bf38: 80 78 75 00 cmpb $0x0,0x75(%eax) 10bf3c: 75 04 jne 10bf42 <_Thread_Clear_state+0x7e> 10bf3e: 85 d2 test %edx,%edx 10bf40: 75 07 jne 10bf49 <_Thread_Clear_state+0x85><== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10bf42: c6 05 1c 57 12 00 01 movb $0x1,0x12571c } } } _ISR_Enable( level ); 10bf49: 51 push %ecx 10bf4a: 9d popf } 10bf4b: 5b pop %ebx 10bf4c: c9 leave 10bf4d: c3 ret =============================================================================== 0010c0c4 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10c0c4: 55 push %ebp 10c0c5: 89 e5 mov %esp,%ebp 10c0c7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c0ca: 8d 45 f4 lea -0xc(%ebp),%eax 10c0cd: 50 push %eax 10c0ce: ff 75 08 pushl 0x8(%ebp) 10c0d1: e8 8e 01 00 00 call 10c264 <_Thread_Get> switch ( location ) { 10c0d6: 83 c4 10 add $0x10,%esp 10c0d9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10c0dd: 75 1b jne 10c0fa <_Thread_Delay_ended+0x36><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10c0df: 52 push %edx 10c0e0: 52 push %edx 10c0e1: 68 18 00 00 10 push $0x10000018 10c0e6: 50 push %eax 10c0e7: e8 d8 fd ff ff call 10bec4 <_Thread_Clear_state> 10c0ec: a1 50 56 12 00 mov 0x125650,%eax 10c0f1: 48 dec %eax 10c0f2: a3 50 56 12 00 mov %eax,0x125650 10c0f7: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10c0fa: c9 leave 10c0fb: c3 ret =============================================================================== 0010c0fc <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10c0fc: 55 push %ebp 10c0fd: 89 e5 mov %esp,%ebp 10c0ff: 57 push %edi 10c100: 56 push %esi 10c101: 53 push %ebx 10c102: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10c105: 8b 1d 0c 57 12 00 mov 0x12570c,%ebx _ISR_Disable( level ); 10c10b: 9c pushf 10c10c: fa cli 10c10d: 58 pop %eax #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 10c10e: 8d 7d d8 lea -0x28(%ebp),%edi Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10c111: e9 f1 00 00 00 jmp 10c207 <_Thread_Dispatch+0x10b> heir = _Thread_Heir; 10c116: 8b 35 dc 56 12 00 mov 0x1256dc,%esi _Thread_Dispatch_disable_level = 1; 10c11c: c7 05 50 56 12 00 01 movl $0x1,0x125650 10c123: 00 00 00 _Context_Switch_necessary = false; 10c126: c6 05 1c 57 12 00 00 movb $0x0,0x12571c _Thread_Executing = heir; 10c12d: 89 35 0c 57 12 00 mov %esi,0x12570c #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 ) 10c133: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10c137: 75 09 jne 10c142 <_Thread_Dispatch+0x46> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10c139: 8b 15 1c 56 12 00 mov 0x12561c,%edx 10c13f: 89 56 78 mov %edx,0x78(%esi) _ISR_Enable( level ); 10c142: 50 push %eax 10c143: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10c144: 83 ec 0c sub $0xc,%esp 10c147: 8d 45 e0 lea -0x20(%ebp),%eax 10c14a: 50 push %eax 10c14b: e8 8c 37 00 00 call 10f8dc <_TOD_Get_uptime> _Timestamp_Subtract( 10c150: 83 c4 0c add $0xc,%esp 10c153: 57 push %edi 10c154: 8d 45 e0 lea -0x20(%ebp),%eax 10c157: 50 push %eax 10c158: 68 14 57 12 00 push $0x125714 10c15d: e8 fe 0b 00 00 call 10cd60 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10c162: 58 pop %eax 10c163: 5a pop %edx 10c164: 57 push %edi 10c165: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10c16b: 50 push %eax 10c16c: e8 bf 0b 00 00 call 10cd30 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10c171: 8b 45 e0 mov -0x20(%ebp),%eax 10c174: 8b 55 e4 mov -0x1c(%ebp),%edx 10c177: a3 14 57 12 00 mov %eax,0x125714 10c17c: 89 15 18 57 12 00 mov %edx,0x125718 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10c182: a1 d8 56 12 00 mov 0x1256d8,%eax 10c187: 83 c4 10 add $0x10,%esp 10c18a: 85 c0 test %eax,%eax 10c18c: 74 10 je 10c19e <_Thread_Dispatch+0xa2> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10c18e: 8b 10 mov (%eax),%edx 10c190: 89 93 ec 00 00 00 mov %edx,0xec(%ebx) *_Thread_libc_reent = heir->libc_reent; 10c196: 8b 96 ec 00 00 00 mov 0xec(%esi),%edx 10c19c: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10c19e: 51 push %ecx 10c19f: 51 push %ecx 10c1a0: 56 push %esi 10c1a1: 53 push %ebx 10c1a2: e8 e9 0d 00 00 call 10cf90 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10c1a7: 58 pop %eax 10c1a8: 5a pop %edx 10c1a9: 81 c6 d0 00 00 00 add $0xd0,%esi 10c1af: 56 push %esi 10c1b0: 8d 83 d0 00 00 00 lea 0xd0(%ebx),%eax 10c1b6: 50 push %eax 10c1b7: e8 94 10 00 00 call 10d250 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10c1bc: 83 c4 10 add $0x10,%esp 10c1bf: 83 bb e8 00 00 00 00 cmpl $0x0,0xe8(%ebx) 10c1c6: 74 36 je 10c1fe <_Thread_Dispatch+0x102> #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 ); 10c1c8: a1 d4 56 12 00 mov 0x1256d4,%eax 10c1cd: 39 c3 cmp %eax,%ebx 10c1cf: 74 2d je 10c1fe <_Thread_Dispatch+0x102> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10c1d1: 85 c0 test %eax,%eax 10c1d3: 74 11 je 10c1e6 <_Thread_Dispatch+0xea> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10c1d5: 83 ec 0c sub $0xc,%esp 10c1d8: 05 e8 00 00 00 add $0xe8,%eax 10c1dd: 50 push %eax 10c1de: e8 a1 10 00 00 call 10d284 <_CPU_Context_save_fp> 10c1e3: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10c1e6: 83 ec 0c sub $0xc,%esp 10c1e9: 8d 83 e8 00 00 00 lea 0xe8(%ebx),%eax 10c1ef: 50 push %eax 10c1f0: e8 99 10 00 00 call 10d28e <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10c1f5: 89 1d d4 56 12 00 mov %ebx,0x1256d4 10c1fb: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10c1fe: 8b 1d 0c 57 12 00 mov 0x12570c,%ebx _ISR_Disable( level ); 10c204: 9c pushf 10c205: fa cli 10c206: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10c207: 8a 15 1c 57 12 00 mov 0x12571c,%dl 10c20d: 84 d2 test %dl,%dl 10c20f: 0f 85 01 ff ff ff jne 10c116 <_Thread_Dispatch+0x1a> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 10c215: c7 05 50 56 12 00 00 movl $0x0,0x125650 10c21c: 00 00 00 _ISR_Enable( level ); 10c21f: 50 push %eax 10c220: 9d popf if ( _Thread_Do_post_task_switch_extension || 10c221: 83 3d f0 56 12 00 00 cmpl $0x0,0x1256f0 10c228: 75 06 jne 10c230 <_Thread_Dispatch+0x134><== NEVER TAKEN executing->do_post_task_switch_extension ) { 10c22a: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10c22e: 74 09 je 10c239 <_Thread_Dispatch+0x13d> executing->do_post_task_switch_extension = false; 10c230: c6 43 74 00 movb $0x0,0x74(%ebx) _API_extensions_Run_postswitch(); 10c234: e8 aa ea ff ff call 10ace3 <_API_extensions_Run_postswitch> } } 10c239: 8d 65 f4 lea -0xc(%ebp),%esp 10c23c: 5b pop %ebx 10c23d: 5e pop %esi 10c23e: 5f pop %edi 10c23f: c9 leave 10c240: c3 ret =============================================================================== 00111774 <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 111774: 55 push %ebp 111775: 89 e5 mov %esp,%ebp Thread_Control *executing; executing = _Thread_Executing; 111777: a1 0c 57 12 00 mov 0x12570c,%eax if ( !_States_Is_ready( executing->current_state ) || 11177c: 83 78 10 00 cmpl $0x0,0x10(%eax) 111780: 75 0e jne 111790 <_Thread_Evaluate_mode+0x1c><== NEVER TAKEN 111782: 3b 05 dc 56 12 00 cmp 0x1256dc,%eax 111788: 74 11 je 11179b <_Thread_Evaluate_mode+0x27> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 11178a: 80 78 75 00 cmpb $0x0,0x75(%eax) 11178e: 74 0b je 11179b <_Thread_Evaluate_mode+0x27><== NEVER TAKEN _Context_Switch_necessary = true; 111790: c6 05 1c 57 12 00 01 movb $0x1,0x12571c 111797: b0 01 mov $0x1,%al return true; 111799: eb 02 jmp 11179d <_Thread_Evaluate_mode+0x29> 11179b: 31 c0 xor %eax,%eax } return false; } 11179d: c9 leave 11179e: c3 ret =============================================================================== 001117a0 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 1117a0: 55 push %ebp 1117a1: 89 e5 mov %esp,%ebp 1117a3: 53 push %ebx 1117a4: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 1117a7: 8b 1d 0c 57 12 00 mov 0x12570c,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 1117ad: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 1117b3: 85 c0 test %eax,%eax 1117b5: 74 03 je 1117ba <_Thread_Handler+0x1a> 1117b7: fa cli 1117b8: eb 01 jmp 1117bb <_Thread_Handler+0x1b> 1117ba: fb sti #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 1117bb: a0 08 53 12 00 mov 0x125308,%al 1117c0: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 1117c3: c6 05 08 53 12 00 01 movb $0x1,0x125308 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 1117ca: 83 bb e8 00 00 00 00 cmpl $0x0,0xe8(%ebx) 1117d1: 74 24 je 1117f7 <_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 ); 1117d3: a1 d4 56 12 00 mov 0x1256d4,%eax 1117d8: 39 c3 cmp %eax,%ebx 1117da: 74 1b je 1117f7 <_Thread_Handler+0x57> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 1117dc: 85 c0 test %eax,%eax 1117de: 74 11 je 1117f1 <_Thread_Handler+0x51> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 1117e0: 83 ec 0c sub $0xc,%esp 1117e3: 05 e8 00 00 00 add $0xe8,%eax 1117e8: 50 push %eax 1117e9: e8 96 ba ff ff call 10d284 <_CPU_Context_save_fp> 1117ee: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 1117f1: 89 1d d4 56 12 00 mov %ebx,0x1256d4 /* * 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 ); 1117f7: 83 ec 0c sub $0xc,%esp 1117fa: 53 push %ebx 1117fb: e8 44 b6 ff ff call 10ce44 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 111800: e8 3c aa ff ff call 10c241 <_Thread_Enable_dispatch> /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { 111805: 83 c4 10 add $0x10,%esp 111808: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 11180c: 75 05 jne 111813 <_Thread_Handler+0x73> INIT_NAME (); 11180e: e8 8d bf 00 00 call 11d7a0 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 111813: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx) 11181a: 75 15 jne 111831 <_Thread_Handler+0x91> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 11181c: 83 ec 0c sub $0xc,%esp 11181f: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 111825: ff 93 9c 00 00 00 call *0x9c(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 11182b: 89 43 28 mov %eax,0x28(%ebx) 11182e: 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 ); 111831: 83 ec 0c sub $0xc,%esp 111834: 53 push %ebx 111835: e8 3b b6 ff ff call 10ce75 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 11183a: 83 c4 0c add $0xc,%esp 11183d: 6a 06 push $0x6 11183f: 6a 01 push $0x1 111841: 6a 00 push $0x0 111843: e8 88 9d ff ff call 10b5d0 <_Internal_error_Occurred> =============================================================================== 0010c2d8 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10c2d8: 55 push %ebp 10c2d9: 89 e5 mov %esp,%ebp 10c2db: 57 push %edi 10c2dc: 56 push %esi 10c2dd: 53 push %ebx 10c2de: 83 ec 24 sub $0x24,%esp 10c2e1: 8b 5d 0c mov 0xc(%ebp),%ebx 10c2e4: 8b 75 14 mov 0x14(%ebp),%esi 10c2e7: 8a 55 18 mov 0x18(%ebp),%dl 10c2ea: 8a 45 20 mov 0x20(%ebp),%al 10c2ed: 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; 10c2f0: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10c2f7: 00 00 00 10c2fa: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10c301: 00 00 00 10c304: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10c30b: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10c30e: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10c315: 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 ); 10c318: 56 push %esi 10c319: 53 push %ebx 10c31a: 88 55 e0 mov %dl,-0x20(%ebp) 10c31d: e8 46 08 00 00 call 10cb68 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10c322: 83 c4 10 add $0x10,%esp 10c325: 39 f0 cmp %esi,%eax 10c327: 8a 55 e0 mov -0x20(%ebp),%dl 10c32a: 72 04 jb 10c330 <_Thread_Initialize+0x58> 10c32c: 85 c0 test %eax,%eax 10c32e: 75 07 jne 10c337 <_Thread_Initialize+0x5f><== ALWAYS TAKEN 10c330: 31 c0 xor %eax,%eax 10c332: e9 b9 01 00 00 jmp 10c4f0 <_Thread_Initialize+0x218> Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10c337: 8b 8b cc 00 00 00 mov 0xcc(%ebx),%ecx 10c33d: 89 8b c4 00 00 00 mov %ecx,0xc4(%ebx) the_stack->size = size; 10c343: 89 83 c0 00 00 00 mov %eax,0xc0(%ebx) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 10c349: 31 ff xor %edi,%edi 10c34b: 84 d2 test %dl,%dl 10c34d: 74 19 je 10c368 <_Thread_Initialize+0x90> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10c34f: 83 ec 0c sub $0xc,%esp 10c352: 6a 6c push $0x6c 10c354: e8 7f 0e 00 00 call 10d1d8 <_Workspace_Allocate> 10c359: 89 c7 mov %eax,%edi if ( !fp_area ) 10c35b: 83 c4 10 add $0x10,%esp 10c35e: 31 f6 xor %esi,%esi 10c360: 85 c0 test %eax,%eax 10c362: 0f 84 02 01 00 00 je 10c46a <_Thread_Initialize+0x192> goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 10c368: 89 bb e8 00 00 00 mov %edi,0xe8(%ebx) the_thread->Start.fp_context = fp_area; 10c36e: 89 bb c8 00 00 00 mov %edi,0xc8(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10c374: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10c37b: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10c382: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10c389: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10c390: a1 ec 56 12 00 mov 0x1256ec,%eax 10c395: 31 f6 xor %esi,%esi 10c397: 85 c0 test %eax,%eax 10c399: 74 1d je 10c3b8 <_Thread_Initialize+0xe0> extensions_area = _Workspace_Allocate( 10c39b: 83 ec 0c sub $0xc,%esp 10c39e: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10c3a5: 50 push %eax 10c3a6: e8 2d 0e 00 00 call 10d1d8 <_Workspace_Allocate> 10c3ab: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10c3ad: 83 c4 10 add $0x10,%esp 10c3b0: 85 c0 test %eax,%eax 10c3b2: 0f 84 b2 00 00 00 je 10c46a <_Thread_Initialize+0x192> goto failed; } the_thread->extensions = (void **) extensions_area; 10c3b8: 89 b3 fc 00 00 00 mov %esi,0xfc(%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 ) { 10c3be: 85 f6 test %esi,%esi 10c3c0: 74 1c je 10c3de <_Thread_Initialize+0x106> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10c3c2: 8b 0d ec 56 12 00 mov 0x1256ec,%ecx 10c3c8: 31 c0 xor %eax,%eax 10c3ca: eb 0e jmp 10c3da <_Thread_Initialize+0x102> the_thread->extensions[i] = NULL; 10c3cc: 8b 93 fc 00 00 00 mov 0xfc(%ebx),%edx 10c3d2: 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++ ) 10c3d9: 40 inc %eax 10c3da: 39 c8 cmp %ecx,%eax 10c3dc: 76 ee jbe 10c3cc <_Thread_Initialize+0xf4> /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10c3de: 8a 45 e7 mov -0x19(%ebp),%al 10c3e1: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10c3e7: 8b 45 24 mov 0x24(%ebp),%eax 10c3ea: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10c3f0: 8b 45 28 mov 0x28(%ebp),%eax 10c3f3: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10c3f9: 8b 45 2c mov 0x2c(%ebp),%eax 10c3fc: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10c402: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10c409: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10c410: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 10c417: 8b 45 1c mov 0x1c(%ebp),%eax 10c41a: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10c41d: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10c423: 52 push %edx 10c424: 52 push %edx 10c425: 50 push %eax 10c426: 53 push %ebx 10c427: e8 90 05 00 00 call 10c9bc <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10c42c: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10c433: 00 00 00 10c436: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10c43d: 00 00 00 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c440: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10c444: 8b 45 08 mov 0x8(%ebp),%eax 10c447: 8b 40 1c mov 0x1c(%eax),%eax 10c44a: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c44d: 8b 45 30 mov 0x30(%ebp),%eax 10c450: 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 ); 10c453: 89 1c 24 mov %ebx,(%esp) 10c456: e8 89 0a 00 00 call 10cee4 <_User_extensions_Thread_create> 10c45b: 88 c2 mov %al,%dl if ( extension_status ) 10c45d: 83 c4 10 add $0x10,%esp 10c460: b0 01 mov $0x1,%al 10c462: 84 d2 test %dl,%dl 10c464: 0f 85 86 00 00 00 jne 10c4f0 <_Thread_Initialize+0x218> return true; failed: if ( the_thread->libc_reent ) 10c46a: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 10c470: 85 c0 test %eax,%eax 10c472: 74 0c je 10c480 <_Thread_Initialize+0x1a8> _Workspace_Free( the_thread->libc_reent ); 10c474: 83 ec 0c sub $0xc,%esp 10c477: 50 push %eax 10c478: e8 74 0d 00 00 call 10d1f1 <_Workspace_Free> 10c47d: 83 c4 10 add $0x10,%esp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10c480: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10c486: 85 c0 test %eax,%eax 10c488: 74 0c je 10c496 <_Thread_Initialize+0x1be> _Workspace_Free( the_thread->API_Extensions[i] ); 10c48a: 83 ec 0c sub $0xc,%esp 10c48d: 50 push %eax 10c48e: e8 5e 0d 00 00 call 10d1f1 <_Workspace_Free> 10c493: 83 c4 10 add $0x10,%esp failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10c496: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax 10c49c: 85 c0 test %eax,%eax 10c49e: 74 0c je 10c4ac <_Thread_Initialize+0x1d4><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10c4a0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10c4a3: 50 push %eax <== NOT EXECUTED 10c4a4: e8 48 0d 00 00 call 10d1f1 <_Workspace_Free> <== NOT EXECUTED 10c4a9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10c4ac: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax 10c4b2: 85 c0 test %eax,%eax 10c4b4: 74 0c je 10c4c2 <_Thread_Initialize+0x1ea><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10c4b6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10c4b9: 50 push %eax <== NOT EXECUTED 10c4ba: e8 32 0d 00 00 call 10d1f1 <_Workspace_Free> <== NOT EXECUTED 10c4bf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( extensions_area ) 10c4c2: 85 f6 test %esi,%esi 10c4c4: 74 0c je 10c4d2 <_Thread_Initialize+0x1fa> (void) _Workspace_Free( extensions_area ); 10c4c6: 83 ec 0c sub $0xc,%esp 10c4c9: 56 push %esi 10c4ca: e8 22 0d 00 00 call 10d1f1 <_Workspace_Free> 10c4cf: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10c4d2: 85 ff test %edi,%edi 10c4d4: 74 0c je 10c4e2 <_Thread_Initialize+0x20a> (void) _Workspace_Free( fp_area ); 10c4d6: 83 ec 0c sub $0xc,%esp 10c4d9: 57 push %edi 10c4da: e8 12 0d 00 00 call 10d1f1 <_Workspace_Free> 10c4df: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10c4e2: 83 ec 0c sub $0xc,%esp 10c4e5: 53 push %ebx 10c4e6: e8 cd 06 00 00 call 10cbb8 <_Thread_Stack_Free> 10c4eb: 31 c0 xor %eax,%eax return false; 10c4ed: 83 c4 10 add $0x10,%esp } 10c4f0: 8d 65 f4 lea -0xc(%ebp),%esp 10c4f3: 5b pop %ebx 10c4f4: 5e pop %esi 10c4f5: 5f pop %edi 10c4f6: c9 leave 10c4f7: c3 ret =============================================================================== 0010ff28 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 10ff28: 55 push %ebp 10ff29: 89 e5 mov %esp,%ebp 10ff2b: 56 push %esi 10ff2c: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10ff2d: a1 0c 57 12 00 mov 0x12570c,%eax ready = executing->ready; 10ff32: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10ff38: 9c pushf 10ff39: fa cli 10ff3a: 59 pop %ecx if ( _Chain_Has_only_one_node( ready ) ) { 10ff3b: 8b 1a mov (%edx),%ebx 10ff3d: 3b 5a 08 cmp 0x8(%edx),%ebx 10ff40: 75 04 jne 10ff46 <_Thread_Reset_timeslice+0x1e> _ISR_Enable( level ); 10ff42: 51 push %ecx 10ff43: 9d popf return; 10ff44: eb 35 jmp 10ff7b <_Thread_Reset_timeslice+0x53> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10ff46: 8b 30 mov (%eax),%esi previous = the_node->previous; 10ff48: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10ff4b: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10ff4e: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10ff50: 8d 5a 04 lea 0x4(%edx),%ebx 10ff53: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10ff55: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10ff58: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10ff5b: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10ff5d: 89 58 04 mov %ebx,0x4(%eax) } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10ff60: 51 push %ecx 10ff61: 9d popf 10ff62: fa cli if ( _Thread_Is_heir( executing ) ) 10ff63: 3b 05 dc 56 12 00 cmp 0x1256dc,%eax 10ff69: 75 07 jne 10ff72 <_Thread_Reset_timeslice+0x4a><== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; 10ff6b: 8b 02 mov (%edx),%eax 10ff6d: a3 dc 56 12 00 mov %eax,0x1256dc _Context_Switch_necessary = true; 10ff72: c6 05 1c 57 12 00 01 movb $0x1,0x12571c _ISR_Enable( level ); 10ff79: 51 push %ecx 10ff7a: 9d popf } 10ff7b: 5b pop %ebx 10ff7c: 5e pop %esi 10ff7d: c9 leave 10ff7e: c3 ret =============================================================================== 0010f7cc <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 10f7cc: 55 push %ebp 10f7cd: 89 e5 mov %esp,%ebp 10f7cf: 53 push %ebx 10f7d0: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10f7d3: 9c pushf 10f7d4: fa cli 10f7d5: 59 pop %ecx _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 10f7d6: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 10f7d9: f6 c2 02 test $0x2,%dl 10f7dc: 74 70 je 10f84e <_Thread_Resume+0x82> <== NEVER TAKEN 10f7de: 83 e2 fd and $0xfffffffd,%edx current_state = 10f7e1: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 10f7e4: 85 d2 test %edx,%edx 10f7e6: 75 66 jne 10f84e <_Thread_Resume+0x82> <== NEVER TAKEN RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10f7e8: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10f7ee: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 10f7f5: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10f7f8: 66 8b 15 f0 88 12 00 mov 0x1288f0,%dx 10f7ff: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10f805: 66 89 15 f0 88 12 00 mov %dx,0x1288f0 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10f80c: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10f812: 8d 5a 04 lea 0x4(%edx),%ebx 10f815: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10f817: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10f81a: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10f81d: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10f81f: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 10f822: 51 push %ecx 10f823: 9d popf 10f824: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 10f825: 8b 50 14 mov 0x14(%eax),%edx 10f828: 8b 1d cc 88 12 00 mov 0x1288cc,%ebx 10f82e: 3b 53 14 cmp 0x14(%ebx),%edx 10f831: 73 1b jae 10f84e <_Thread_Resume+0x82> _Thread_Heir = the_thread; 10f833: a3 cc 88 12 00 mov %eax,0x1288cc if ( _Thread_Executing->is_preemptible || 10f838: a1 fc 88 12 00 mov 0x1288fc,%eax 10f83d: 80 78 75 00 cmpb $0x0,0x75(%eax) 10f841: 75 04 jne 10f847 <_Thread_Resume+0x7b> 10f843: 85 d2 test %edx,%edx 10f845: 75 07 jne 10f84e <_Thread_Resume+0x82> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10f847: c6 05 0c 89 12 00 01 movb $0x1,0x12890c } } } _ISR_Enable( level ); 10f84e: 51 push %ecx 10f84f: 9d popf } 10f850: 5b pop %ebx 10f851: c9 leave 10f852: c3 ret =============================================================================== 0010ccd0 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10ccd0: 55 push %ebp 10ccd1: 89 e5 mov %esp,%ebp 10ccd3: 56 push %esi 10ccd4: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10ccd5: a1 0c 57 12 00 mov 0x12570c,%eax ready = executing->ready; 10ccda: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10cce0: 9c pushf 10cce1: fa cli 10cce2: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10cce3: 8b 1a mov (%edx),%ebx 10cce5: 3b 5a 08 cmp 0x8(%edx),%ebx 10cce8: 74 2e je 10cd18 <_Thread_Yield_processor+0x48> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10ccea: 8b 30 mov (%eax),%esi previous = the_node->previous; 10ccec: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10ccef: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10ccf2: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10ccf4: 8d 5a 04 lea 0x4(%edx),%ebx 10ccf7: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10ccf9: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10ccfc: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10ccff: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10cd01: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10cd04: 51 push %ecx 10cd05: 9d popf 10cd06: fa cli if ( _Thread_Is_heir( executing ) ) 10cd07: 3b 05 dc 56 12 00 cmp 0x1256dc,%eax 10cd0d: 75 11 jne 10cd20 <_Thread_Yield_processor+0x50><== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; 10cd0f: 8b 02 mov (%edx),%eax 10cd11: a3 dc 56 12 00 mov %eax,0x1256dc 10cd16: eb 08 jmp 10cd20 <_Thread_Yield_processor+0x50> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10cd18: 3b 05 dc 56 12 00 cmp 0x1256dc,%eax 10cd1e: 74 07 je 10cd27 <_Thread_Yield_processor+0x57><== ALWAYS TAKEN _Context_Switch_necessary = true; 10cd20: c6 05 1c 57 12 00 01 movb $0x1,0x12571c _ISR_Enable( level ); 10cd27: 51 push %ecx 10cd28: 9d popf } 10cd29: 5b pop %ebx 10cd2a: 5e pop %esi 10cd2b: c9 leave 10cd2c: c3 ret =============================================================================== 0010c758 <_Thread_queue_Enqueue_priority>: Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 10c758: 55 push %ebp 10c759: 89 e5 mov %esp,%ebp 10c75b: 57 push %edi 10c75c: 56 push %esi 10c75d: 53 push %ebx 10c75e: 83 ec 10 sub $0x10,%esp 10c761: 8b 4d 08 mov 0x8(%ebp),%ecx 10c764: 8b 45 0c mov 0xc(%ebp),%eax */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c767: 8d 50 3c lea 0x3c(%eax),%edx 10c76a: 89 50 38 mov %edx,0x38(%eax) the_chain->permanent_null = NULL; 10c76d: c7 40 3c 00 00 00 00 movl $0x0,0x3c(%eax) the_chain->last = _Chain_Head(the_chain); 10c774: 8d 50 38 lea 0x38(%eax),%edx 10c777: 89 50 40 mov %edx,0x40(%eax) Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 10c77a: 8b 58 14 mov 0x14(%eax),%ebx header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10c77d: 89 de mov %ebx,%esi 10c77f: c1 ee 06 shr $0x6,%esi 10c782: 6b f6 0c imul $0xc,%esi,%esi 10c785: 8d 34 31 lea (%ecx,%esi,1),%esi block_state = the_thread_queue->state; 10c788: 8b 79 38 mov 0x38(%ecx),%edi if ( _Thread_queue_Is_reverse_search( priority ) ) 10c78b: f6 c3 20 test $0x20,%bl 10c78e: 75 70 jne 10c800 <_Thread_queue_Enqueue_priority+0xa8> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10c790: 8d 56 04 lea 0x4(%esi),%edx 10c793: 89 55 e8 mov %edx,-0x18(%ebp) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10c796: 9c pushf 10c797: fa cli 10c798: 8f 45 f0 popl -0x10(%ebp) search_thread = (Thread_Control *) header->first; 10c79b: 8b 16 mov (%esi),%edx 10c79d: c7 45 ec ff ff ff ff movl $0xffffffff,-0x14(%ebp) 10c7a4: 89 75 e4 mov %esi,-0x1c(%ebp) while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10c7a7: eb 1f jmp 10c7c8 <_Thread_queue_Enqueue_priority+0x70> search_priority = search_thread->current_priority; 10c7a9: 8b 72 14 mov 0x14(%edx),%esi 10c7ac: 89 75 ec mov %esi,-0x14(%ebp) if ( priority <= search_priority ) 10c7af: 39 f3 cmp %esi,%ebx 10c7b1: 76 1a jbe 10c7cd <_Thread_queue_Enqueue_priority+0x75> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10c7b3: ff 75 f0 pushl -0x10(%ebp) 10c7b6: 9d popf 10c7b7: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c7b8: 85 7a 10 test %edi,0x10(%edx) 10c7bb: 75 09 jne 10c7c6 <_Thread_queue_Enqueue_priority+0x6e><== ALWAYS TAKEN 10c7bd: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED _ISR_Enable( level ); 10c7c0: ff 75 f0 pushl -0x10(%ebp) <== NOT EXECUTED 10c7c3: 9d popf <== NOT EXECUTED goto restart_forward_search; 10c7c4: eb d0 jmp 10c796 <_Thread_queue_Enqueue_priority+0x3e><== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10c7c6: 8b 12 mov (%edx),%edx restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10c7c8: 3b 55 e8 cmp -0x18(%ebp),%edx 10c7cb: 75 dc jne 10c7a9 <_Thread_queue_Enqueue_priority+0x51> 10c7cd: 8b 75 f0 mov -0x10(%ebp),%esi } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10c7d0: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10c7d4: 0f 85 a9 00 00 00 jne 10c883 <_Thread_queue_Enqueue_priority+0x12b> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c7da: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10c7e1: 3b 5d ec cmp -0x14(%ebp),%ebx 10c7e4: 0f 84 82 00 00 00 je 10c86c <_Thread_queue_Enqueue_priority+0x114> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10c7ea: 8b 5a 04 mov 0x4(%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10c7ed: 89 10 mov %edx,(%eax) the_node->previous = previous_node; 10c7ef: 89 58 04 mov %ebx,0x4(%eax) previous_node->next = the_node; 10c7f2: 89 03 mov %eax,(%ebx) search_node->previous = the_node; 10c7f4: 89 42 04 mov %eax,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10c7f7: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c7fa: ff 75 f0 pushl -0x10(%ebp) 10c7fd: 9d popf 10c7fe: eb 65 jmp 10c865 <_Thread_queue_Enqueue_priority+0x10d> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 10c800: 0f b6 15 d4 16 12 00 movzbl 0x1216d4,%edx 10c807: 42 inc %edx 10c808: 89 55 ec mov %edx,-0x14(%ebp) _ISR_Disable( level ); 10c80b: 9c pushf 10c80c: fa cli 10c80d: 8f 45 f0 popl -0x10(%ebp) search_thread = (Thread_Control *) header->last; 10c810: 8b 56 08 mov 0x8(%esi),%edx 10c813: 89 75 e8 mov %esi,-0x18(%ebp) while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10c816: eb 20 jmp 10c838 <_Thread_queue_Enqueue_priority+0xe0> search_priority = search_thread->current_priority; 10c818: 8b 72 14 mov 0x14(%edx),%esi 10c81b: 89 75 ec mov %esi,-0x14(%ebp) if ( priority >= search_priority ) 10c81e: 39 f3 cmp %esi,%ebx 10c820: 73 1b jae 10c83d <_Thread_queue_Enqueue_priority+0xe5> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10c822: ff 75 f0 pushl -0x10(%ebp) 10c825: 9d popf 10c826: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c827: 85 7a 10 test %edi,0x10(%edx) 10c82a: 75 09 jne 10c835 <_Thread_queue_Enqueue_priority+0xdd> 10c82c: 8b 75 e8 mov -0x18(%ebp),%esi _ISR_Enable( level ); 10c82f: ff 75 f0 pushl -0x10(%ebp) 10c832: 9d popf goto restart_reverse_search; 10c833: eb cb jmp 10c800 <_Thread_queue_Enqueue_priority+0xa8> } search_thread = (Thread_Control *) 10c835: 8b 52 04 mov 0x4(%edx),%edx restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10c838: 3b 55 e8 cmp -0x18(%ebp),%edx 10c83b: 75 db jne 10c818 <_Thread_queue_Enqueue_priority+0xc0> 10c83d: 8b 75 f0 mov -0x10(%ebp),%esi } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10c840: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10c844: 75 3d jne 10c883 <_Thread_queue_Enqueue_priority+0x12b> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c846: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10c84d: 3b 5d ec cmp -0x14(%ebp),%ebx 10c850: 74 1a je 10c86c <_Thread_queue_Enqueue_priority+0x114> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10c852: 8b 1a mov (%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10c854: 89 18 mov %ebx,(%eax) the_node->previous = search_node; 10c856: 89 50 04 mov %edx,0x4(%eax) search_node->next = the_node; 10c859: 89 02 mov %eax,(%edx) next_node->previous = the_node; 10c85b: 89 43 04 mov %eax,0x4(%ebx) the_thread->Wait.queue = the_thread_queue; 10c85e: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c861: ff 75 f0 pushl -0x10(%ebp) 10c864: 9d popf 10c865: b8 01 00 00 00 mov $0x1,%eax return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10c86a: eb 1f jmp 10c88b <_Thread_queue_Enqueue_priority+0x133> 10c86c: 83 c2 3c add $0x3c,%edx equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 10c86f: 8b 5a 04 mov 0x4(%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10c872: 89 10 mov %edx,(%eax) the_node->previous = previous_node; 10c874: 89 58 04 mov %ebx,0x4(%eax) previous_node->next = the_node; 10c877: 89 03 mov %eax,(%ebx) search_node->previous = the_node; 10c879: 89 42 04 mov %eax,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10c87c: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c87f: 56 push %esi 10c880: 9d popf 10c881: eb e2 jmp 10c865 <_Thread_queue_Enqueue_priority+0x10d> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 10c883: 8b 45 10 mov 0x10(%ebp),%eax 10c886: 89 30 mov %esi,(%eax) return the_thread_queue->sync_state; 10c888: 8b 41 30 mov 0x30(%ecx),%eax } 10c88b: 83 c4 10 add $0x10,%esp 10c88e: 5b pop %ebx 10c88f: 5e pop %esi 10c890: 5f pop %edi 10c891: c9 leave 10c892: c3 ret =============================================================================== 0010c934 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10c934: 55 push %ebp 10c935: 89 e5 mov %esp,%ebp 10c937: 57 push %edi 10c938: 56 push %esi 10c939: 53 push %ebx 10c93a: 83 ec 1c sub $0x1c,%esp 10c93d: 8b 75 08 mov 0x8(%ebp),%esi 10c940: 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 ) 10c943: 85 f6 test %esi,%esi 10c945: 74 36 je 10c97d <_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 ) { 10c947: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10c94b: 75 30 jne 10c97d <_Thread_queue_Requeue+0x49><== NEVER TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10c94d: 9c pushf 10c94e: fa cli 10c94f: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10c950: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10c957: 74 22 je 10c97b <_Thread_queue_Requeue+0x47><== NEVER TAKEN 10c959: 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 ); 10c960: 50 push %eax 10c961: 6a 01 push $0x1 10c963: 57 push %edi 10c964: 56 push %esi 10c965: e8 1a 34 00 00 call 10fd84 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10c96a: 83 c4 0c add $0xc,%esp 10c96d: 8d 45 e4 lea -0x1c(%ebp),%eax 10c970: 50 push %eax 10c971: 57 push %edi 10c972: 56 push %esi 10c973: e8 e0 fd ff ff call 10c758 <_Thread_queue_Enqueue_priority> 10c978: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10c97b: 53 push %ebx 10c97c: 9d popf } } 10c97d: 8d 65 f4 lea -0xc(%ebp),%esp 10c980: 5b pop %ebx 10c981: 5e pop %esi 10c982: 5f pop %edi 10c983: c9 leave 10c984: c3 ret =============================================================================== 0010c988 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10c988: 55 push %ebp 10c989: 89 e5 mov %esp,%ebp 10c98b: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c98e: 8d 45 f4 lea -0xc(%ebp),%eax 10c991: 50 push %eax 10c992: ff 75 08 pushl 0x8(%ebp) 10c995: e8 ca f8 ff ff call 10c264 <_Thread_Get> switch ( location ) { 10c99a: 83 c4 10 add $0x10,%esp 10c99d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10c9a1: 75 17 jne 10c9ba <_Thread_queue_Timeout+0x32><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10c9a3: 83 ec 0c sub $0xc,%esp 10c9a6: 50 push %eax 10c9a7: e8 90 34 00 00 call 10fe3c <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10c9ac: a1 50 56 12 00 mov 0x125650,%eax 10c9b1: 48 dec %eax 10c9b2: a3 50 56 12 00 mov %eax,0x125650 10c9b7: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10c9ba: c9 leave 10c9bb: c3 ret =============================================================================== 00117248 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 117248: 55 push %ebp 117249: 89 e5 mov %esp,%ebp 11724b: 57 push %edi 11724c: 56 push %esi 11724d: 53 push %ebx 11724e: 83 ec 4c sub $0x4c,%esp 117251: 8b 5d 08 mov 0x8(%ebp),%ebx 117254: 8d 45 dc lea -0x24(%ebp),%eax 117257: 8d 55 e0 lea -0x20(%ebp),%edx 11725a: 89 55 b4 mov %edx,-0x4c(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11725d: 89 55 dc mov %edx,-0x24(%ebp) the_chain->permanent_null = NULL; 117260: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_chain->last = _Chain_Head(the_chain); 117267: 89 45 e4 mov %eax,-0x1c(%ebp) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11726a: 8d 75 d0 lea -0x30(%ebp),%esi 11726d: 8d 55 d4 lea -0x2c(%ebp),%edx 117270: 89 55 b0 mov %edx,-0x50(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 117273: 89 55 d0 mov %edx,-0x30(%ebp) the_chain->permanent_null = NULL; 117276: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 11727d: 89 75 d8 mov %esi,-0x28(%ebp) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 117280: 8d 53 30 lea 0x30(%ebx),%edx 117283: 89 55 c0 mov %edx,-0x40(%ebp) /* * 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 ); 117286: 8d 7b 68 lea 0x68(%ebx),%edi static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 117289: 8d 4b 08 lea 0x8(%ebx),%ecx 11728c: 89 4d b8 mov %ecx,-0x48(%ebp) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 11728f: 8d 53 40 lea 0x40(%ebx),%edx 117292: 89 55 bc mov %edx,-0x44(%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; 117295: 8d 4d dc lea -0x24(%ebp),%ecx 117298: 89 4b 78 mov %ecx,0x78(%ebx) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 11729b: a1 b0 e6 13 00 mov 0x13e6b0,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 1172a0: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 1172a3: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1172a6: 51 push %ecx 1172a7: 8d 4d d0 lea -0x30(%ebp),%ecx 1172aa: 51 push %ecx 1172ab: 29 d0 sub %edx,%eax 1172ad: 50 push %eax 1172ae: ff 75 c0 pushl -0x40(%ebp) 1172b1: e8 6e 35 00 00 call 11a824 <_Watchdog_Adjust_to_chain> static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 1172b6: a1 f4 e5 13 00 mov 0x13e5f4,%eax 1172bb: 89 45 c4 mov %eax,-0x3c(%ebp) Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 1172be: 8b 43 74 mov 0x74(%ebx),%eax /* * 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 ) { 1172c1: 83 c4 10 add $0x10,%esp 1172c4: 39 45 c4 cmp %eax,-0x3c(%ebp) 1172c7: 76 13 jbe 1172dc <_Timer_server_Body+0x94> /* * 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 ); 1172c9: 52 push %edx 1172ca: 8d 55 d0 lea -0x30(%ebp),%edx 1172cd: 52 push %edx 1172ce: 8b 4d c4 mov -0x3c(%ebp),%ecx 1172d1: 29 c1 sub %eax,%ecx 1172d3: 51 push %ecx 1172d4: 57 push %edi 1172d5: e8 4a 35 00 00 call 11a824 <_Watchdog_Adjust_to_chain> 1172da: eb 0f jmp 1172eb <_Timer_server_Body+0xa3> } else if ( snapshot < last_snapshot ) { 1172dc: 73 10 jae 1172ee <_Timer_server_Body+0xa6> /* * 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 ); 1172de: 51 push %ecx 1172df: 2b 45 c4 sub -0x3c(%ebp),%eax 1172e2: 50 push %eax 1172e3: 6a 01 push $0x1 1172e5: 57 push %edi 1172e6: e8 cd 34 00 00 call 11a7b8 <_Watchdog_Adjust> 1172eb: 83 c4 10 add $0x10,%esp } watchdogs->last_snapshot = snapshot; 1172ee: 8b 45 c4 mov -0x3c(%ebp),%eax 1172f1: 89 43 74 mov %eax,0x74(%ebx) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 1172f4: 8b 43 78 mov 0x78(%ebx),%eax 1172f7: 83 ec 0c sub $0xc,%esp 1172fa: 50 push %eax 1172fb: e8 04 07 00 00 call 117a04 <_Chain_Get> if ( timer == NULL ) { 117300: 83 c4 10 add $0x10,%esp 117303: 85 c0 test %eax,%eax 117305: 74 29 je 117330 <_Timer_server_Body+0xe8><== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 117307: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 11730a: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 11730d: 75 0b jne 11731a <_Timer_server_Body+0xd2><== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 11730f: 52 push %edx <== NOT EXECUTED 117310: 52 push %edx <== NOT EXECUTED 117311: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 117314: 50 push %eax <== NOT EXECUTED 117315: ff 75 c0 pushl -0x40(%ebp) <== NOT EXECUTED 117318: eb 0c jmp 117326 <_Timer_server_Body+0xde><== NOT EXECUTED } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 11731a: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 11731d: 75 d5 jne 1172f4 <_Timer_server_Body+0xac><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 11731f: 51 push %ecx <== NOT EXECUTED 117320: 51 push %ecx <== NOT EXECUTED 117321: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 117324: 50 push %eax <== NOT EXECUTED 117325: 57 push %edi <== NOT EXECUTED 117326: e8 81 35 00 00 call 11a8ac <_Watchdog_Insert> <== NOT EXECUTED 11732b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11732e: eb c4 jmp 1172f4 <_Timer_server_Body+0xac><== 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 ); 117330: 9c pushf 117331: fa cli 117332: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 117333: 8b 55 b4 mov -0x4c(%ebp),%edx 117336: 39 55 dc cmp %edx,-0x24(%ebp) 117339: 75 13 jne 11734e <_Timer_server_Body+0x106><== NEVER TAKEN ts->insert_chain = NULL; 11733b: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 117342: 50 push %eax 117343: 9d popf _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 ) ) { 117344: 8b 4d b0 mov -0x50(%ebp),%ecx 117347: 39 4d d0 cmp %ecx,-0x30(%ebp) 11734a: 75 09 jne 117355 <_Timer_server_Body+0x10d> 11734c: eb 3e jmp 11738c <_Timer_server_Body+0x144> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 11734e: 50 push %eax <== NOT EXECUTED 11734f: 9d popf <== NOT EXECUTED 117350: e9 46 ff ff ff jmp 11729b <_Timer_server_Body+0x53><== 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 ); 117355: 9c pushf 117356: fa cli 117357: 5a pop %edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 117358: 8b 45 d0 mov -0x30(%ebp),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 11735b: 3b 45 b0 cmp -0x50(%ebp),%eax 11735e: 74 25 je 117385 <_Timer_server_Body+0x13d> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 117360: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 117362: 89 4d d0 mov %ecx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 117365: 89 71 04 mov %esi,0x4(%ecx) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 117368: 85 c0 test %eax,%eax 11736a: 74 19 je 117385 <_Timer_server_Body+0x13d><== NEVER TAKEN watchdog->state = WATCHDOG_INACTIVE; 11736c: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 117373: 52 push %edx 117374: 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 ); 117375: 52 push %edx 117376: 52 push %edx 117377: ff 70 24 pushl 0x24(%eax) 11737a: ff 70 20 pushl 0x20(%eax) 11737d: ff 50 1c call *0x1c(%eax) } 117380: 83 c4 10 add $0x10,%esp 117383: eb d0 jmp 117355 <_Timer_server_Body+0x10d> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 117385: 52 push %edx 117386: 9d popf 117387: e9 09 ff ff ff jmp 117295 <_Timer_server_Body+0x4d> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 11738c: c6 43 7c 00 movb $0x0,0x7c(%ebx) 117390: a1 64 e5 13 00 mov 0x13e564,%eax 117395: 40 inc %eax 117396: a3 64 e5 13 00 mov %eax,0x13e564 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 11739b: 50 push %eax 11739c: 50 push %eax 11739d: 6a 08 push $0x8 11739f: ff 33 pushl (%ebx) 1173a1: e8 22 2d 00 00 call 11a0c8 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 1173a6: 89 d8 mov %ebx,%eax 1173a8: e8 0f fe ff ff call 1171bc <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 1173ad: 89 d8 mov %ebx,%eax 1173af: e8 4e fe ff ff call 117202 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 1173b4: e8 f4 23 00 00 call 1197ad <_Thread_Enable_dispatch> ts->active = true; 1173b9: 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 ); 1173bd: 59 pop %ecx 1173be: ff 75 b8 pushl -0x48(%ebp) 1173c1: e8 fe 35 00 00 call 11a9c4 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 1173c6: 5a pop %edx 1173c7: ff 75 bc pushl -0x44(%ebp) 1173ca: e8 f5 35 00 00 call 11a9c4 <_Watchdog_Remove> 1173cf: 83 c4 10 add $0x10,%esp 1173d2: e9 be fe ff ff jmp 117295 <_Timer_server_Body+0x4d> =============================================================================== 001173d7 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 1173d7: 55 push %ebp 1173d8: 89 e5 mov %esp,%ebp 1173da: 57 push %edi 1173db: 56 push %esi 1173dc: 53 push %ebx 1173dd: 83 ec 2c sub $0x2c,%esp 1173e0: 8b 5d 08 mov 0x8(%ebp),%ebx 1173e3: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 1173e6: 8b 53 78 mov 0x78(%ebx),%edx 1173e9: 85 d2 test %edx,%edx 1173eb: 0f 85 e6 00 00 00 jne 1174d7 <_Timer_server_Schedule_operation_method+0x100><== NEVER TAKEN 1173f1: 8b 15 64 e5 13 00 mov 0x13e564,%edx 1173f7: 42 inc %edx 1173f8: 89 15 64 e5 13 00 mov %edx,0x13e564 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 1173fe: 8b 50 38 mov 0x38(%eax),%edx 117401: 83 fa 01 cmp $0x1,%edx 117404: 75 5a jne 117460 <_Timer_server_Schedule_operation_method+0x89> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 117406: 9c pushf 117407: fa cli 117408: 8f 45 e0 popl -0x20(%ebp) snapshot = _Watchdog_Ticks_since_boot; 11740b: 8b 0d b0 e6 13 00 mov 0x13e6b0,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 117411: 8b 73 3c mov 0x3c(%ebx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 117414: 8b 53 30 mov 0x30(%ebx),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 117417: 8d 7b 34 lea 0x34(%ebx),%edi 11741a: 39 fa cmp %edi,%edx 11741c: 74 19 je 117437 <_Timer_server_Schedule_operation_method+0x60> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 11741e: 89 cf mov %ecx,%edi 117420: 29 f7 sub %esi,%edi 117422: 89 7d e4 mov %edi,-0x1c(%ebp) delta_interval = first_watchdog->delta_interval; 117425: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 117428: 31 f6 xor %esi,%esi 11742a: 3b 7d e4 cmp -0x1c(%ebp),%edi 11742d: 76 05 jbe 117434 <_Timer_server_Schedule_operation_method+0x5d> delta_interval -= delta; 11742f: 89 fe mov %edi,%esi 117431: 2b 75 e4 sub -0x1c(%ebp),%esi } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 117434: 89 72 10 mov %esi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 117437: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 11743a: ff 75 e0 pushl -0x20(%ebp) 11743d: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 11743e: 57 push %edi 11743f: 57 push %edi 117440: 83 c0 10 add $0x10,%eax 117443: 50 push %eax 117444: 8d 43 30 lea 0x30(%ebx),%eax 117447: 50 push %eax 117448: e8 5f 34 00 00 call 11a8ac <_Watchdog_Insert> if ( !ts->active ) { 11744d: 8a 43 7c mov 0x7c(%ebx),%al 117450: 83 c4 10 add $0x10,%esp 117453: 84 c0 test %al,%al 117455: 75 74 jne 1174cb <_Timer_server_Schedule_operation_method+0xf4> _Timer_server_Reset_interval_system_watchdog( ts ); 117457: 89 d8 mov %ebx,%eax 117459: e8 5e fd ff ff call 1171bc <_Timer_server_Reset_interval_system_watchdog> 11745e: eb 6b jmp 1174cb <_Timer_server_Schedule_operation_method+0xf4> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 117460: 83 fa 03 cmp $0x3,%edx 117463: 75 66 jne 1174cb <_Timer_server_Schedule_operation_method+0xf4> /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 117465: 9c pushf 117466: fa cli 117467: 8f 45 e0 popl -0x20(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 11746a: 8b 0d f4 e5 13 00 mov 0x13e5f4,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 117470: 8b 53 74 mov 0x74(%ebx),%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 117473: 8b 73 68 mov 0x68(%ebx),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 117476: 8d 7b 6c lea 0x6c(%ebx),%edi 117479: 39 fe cmp %edi,%esi 11747b: 74 27 je 1174a4 <_Timer_server_Schedule_operation_method+0xcd> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 11747d: 8b 7e 10 mov 0x10(%esi),%edi 117480: 89 7d d4 mov %edi,-0x2c(%ebp) if ( snapshot > last_snapshot ) { 117483: 39 d1 cmp %edx,%ecx 117485: 76 15 jbe 11749c <_Timer_server_Schedule_operation_method+0xc5> /* * We advanced in time. */ delta = snapshot - last_snapshot; 117487: 89 cf mov %ecx,%edi 117489: 29 d7 sub %edx,%edi 11748b: 89 7d e4 mov %edi,-0x1c(%ebp) if (delta_interval > delta) { 11748e: 31 d2 xor %edx,%edx 117490: 39 7d d4 cmp %edi,-0x2c(%ebp) 117493: 76 0c jbe 1174a1 <_Timer_server_Schedule_operation_method+0xca><== NEVER TAKEN delta_interval -= delta; 117495: 8b 55 d4 mov -0x2c(%ebp),%edx 117498: 29 fa sub %edi,%edx 11749a: eb 05 jmp 1174a1 <_Timer_server_Schedule_operation_method+0xca> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 11749c: 03 55 d4 add -0x2c(%ebp),%edx delta_interval += delta; 11749f: 29 ca sub %ecx,%edx } first_watchdog->delta_interval = delta_interval; 1174a1: 89 56 10 mov %edx,0x10(%esi) } ts->TOD_watchdogs.last_snapshot = snapshot; 1174a4: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 1174a7: ff 75 e0 pushl -0x20(%ebp) 1174aa: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 1174ab: 56 push %esi 1174ac: 56 push %esi 1174ad: 83 c0 10 add $0x10,%eax 1174b0: 50 push %eax 1174b1: 8d 43 68 lea 0x68(%ebx),%eax 1174b4: 50 push %eax 1174b5: e8 f2 33 00 00 call 11a8ac <_Watchdog_Insert> if ( !ts->active ) { 1174ba: 8a 43 7c mov 0x7c(%ebx),%al 1174bd: 83 c4 10 add $0x10,%esp 1174c0: 84 c0 test %al,%al 1174c2: 75 07 jne 1174cb <_Timer_server_Schedule_operation_method+0xf4> _Timer_server_Reset_tod_system_watchdog( ts ); 1174c4: 89 d8 mov %ebx,%eax 1174c6: e8 37 fd ff ff call 117202 <_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 ); } } 1174cb: 8d 65 f4 lea -0xc(%ebp),%esp 1174ce: 5b pop %ebx 1174cf: 5e pop %esi 1174d0: 5f pop %edi 1174d1: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 1174d2: e9 d6 22 00 00 jmp 1197ad <_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 ); 1174d7: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 1174da: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 1174dd: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 1174e0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1174e3: 5b pop %ebx <== NOT EXECUTED 1174e4: 5e pop %esi <== NOT EXECUTED 1174e5: 5f pop %edi <== NOT EXECUTED 1174e6: c9 leave <== 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 ); 1174e7: e9 dc 04 00 00 jmp 1179c8 <_Chain_Append> <== NOT EXECUTED =============================================================================== 0010ce75 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10ce75: 55 push %ebp 10ce76: 89 e5 mov %esp,%ebp 10ce78: 56 push %esi 10ce79: 53 push %ebx 10ce7a: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10ce7d: 8b 1d 68 58 12 00 mov 0x125868,%ebx 10ce83: eb 13 jmp 10ce98 <_User_extensions_Thread_exitted+0x23> !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) 10ce85: 8b 43 2c mov 0x2c(%ebx),%eax 10ce88: 85 c0 test %eax,%eax 10ce8a: 74 09 je 10ce95 <_User_extensions_Thread_exitted+0x20> (*the_extension->Callouts.thread_exitted)( executing ); 10ce8c: 83 ec 0c sub $0xc,%esp 10ce8f: 56 push %esi 10ce90: ff d0 call *%eax 10ce92: 83 c4 10 add $0x10,%esp <== NOT EXECUTED Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10ce95: 8b 5b 04 mov 0x4(%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 10ce98: 81 fb 60 58 12 00 cmp $0x125860,%ebx 10ce9e: 75 e5 jne 10ce85 <_User_extensions_Thread_exitted+0x10> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 10cea0: 8d 65 f8 lea -0x8(%ebp),%esp 10cea3: 5b pop %ebx 10cea4: 5e pop %esi 10cea5: c9 leave 10cea6: c3 ret =============================================================================== 0010e7a8 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10e7a8: 55 push %ebp 10e7a9: 89 e5 mov %esp,%ebp 10e7ab: 57 push %edi 10e7ac: 56 push %esi 10e7ad: 53 push %ebx 10e7ae: 83 ec 1c sub $0x1c,%esp 10e7b1: 8b 75 08 mov 0x8(%ebp),%esi 10e7b4: 8b 7d 0c mov 0xc(%ebp),%edi 10e7b7: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10e7ba: 9c pushf 10e7bb: fa cli 10e7bc: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e7bd: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e7bf: 8d 4e 04 lea 0x4(%esi),%ecx * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 10e7c2: 39 ca cmp %ecx,%edx 10e7c4: 74 44 je 10e80a <_Watchdog_Adjust+0x62> switch ( direction ) { 10e7c6: 85 ff test %edi,%edi 10e7c8: 74 3c je 10e806 <_Watchdog_Adjust+0x5e> 10e7ca: 4f dec %edi 10e7cb: 75 3d jne 10e80a <_Watchdog_Adjust+0x62> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10e7cd: 01 5a 10 add %ebx,0x10(%edx) break; 10e7d0: eb 38 jmp 10e80a <_Watchdog_Adjust+0x62> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10e7d2: 8b 16 mov (%esi),%edx case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 10e7d4: 8b 7a 10 mov 0x10(%edx),%edi 10e7d7: 39 fb cmp %edi,%ebx 10e7d9: 73 07 jae 10e7e2 <_Watchdog_Adjust+0x3a> _Watchdog_First( header )->delta_interval -= units; 10e7db: 29 df sub %ebx,%edi 10e7dd: 89 7a 10 mov %edi,0x10(%edx) break; 10e7e0: eb 28 jmp 10e80a <_Watchdog_Adjust+0x62> } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10e7e2: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10e7e9: 50 push %eax 10e7ea: 9d popf _Watchdog_Tickle( header ); 10e7eb: 83 ec 0c sub $0xc,%esp 10e7ee: 56 push %esi 10e7ef: 89 4d e4 mov %ecx,-0x1c(%ebp) 10e7f2: e8 9d 01 00 00 call 10e994 <_Watchdog_Tickle> _ISR_Disable( level ); 10e7f7: 9c pushf 10e7f8: fa cli 10e7f9: 58 pop %eax if ( _Chain_Is_empty( header ) ) 10e7fa: 83 c4 10 add $0x10,%esp 10e7fd: 8b 4d e4 mov -0x1c(%ebp),%ecx 10e800: 39 0e cmp %ecx,(%esi) 10e802: 74 06 je 10e80a <_Watchdog_Adjust+0x62> while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 10e804: 29 fb sub %edi,%ebx switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10e806: 85 db test %ebx,%ebx 10e808: 75 c8 jne 10e7d2 <_Watchdog_Adjust+0x2a> <== ALWAYS TAKEN } break; } } _ISR_Enable( level ); 10e80a: 50 push %eax 10e80b: 9d popf } 10e80c: 8d 65 f4 lea -0xc(%ebp),%esp 10e80f: 5b pop %ebx 10e810: 5e pop %esi 10e811: 5f pop %edi 10e812: c9 leave 10e813: c3 ret =============================================================================== 0010d0dc <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10d0dc: 55 push %ebp 10d0dd: 89 e5 mov %esp,%ebp 10d0df: 56 push %esi 10d0e0: 53 push %ebx 10d0e1: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10d0e4: 9c pushf 10d0e5: fa cli 10d0e6: 5e pop %esi previous_state = the_watchdog->state; 10d0e7: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10d0ea: 83 f8 01 cmp $0x1,%eax 10d0ed: 74 09 je 10d0f8 <_Watchdog_Remove+0x1c> 10d0ef: 72 44 jb 10d135 <_Watchdog_Remove+0x59> 10d0f1: 83 f8 03 cmp $0x3,%eax 10d0f4: 77 3f ja 10d135 <_Watchdog_Remove+0x59> <== NEVER TAKEN 10d0f6: eb 09 jmp 10d101 <_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; 10d0f8: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10d0ff: eb 34 jmp 10d135 <_Watchdog_Remove+0x59> case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10d101: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 10d108: 8b 0a mov (%edx),%ecx next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10d10a: 83 39 00 cmpl $0x0,(%ecx) 10d10d: 74 06 je 10d115 <_Watchdog_Remove+0x39> next_watchdog->delta_interval += the_watchdog->delta_interval; 10d10f: 8b 5a 10 mov 0x10(%edx),%ebx 10d112: 01 59 10 add %ebx,0x10(%ecx) if ( _Watchdog_Sync_count ) 10d115: 8b 0d 98 57 12 00 mov 0x125798,%ecx 10d11b: 85 c9 test %ecx,%ecx 10d11d: 74 0c je 10d12b <_Watchdog_Remove+0x4f> _Watchdog_Sync_level = _ISR_Nest_level; 10d11f: 8b 0d e8 56 12 00 mov 0x1256e8,%ecx 10d125: 89 0d 08 57 12 00 mov %ecx,0x125708 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10d12b: 8b 1a mov (%edx),%ebx previous = the_node->previous; 10d12d: 8b 4a 04 mov 0x4(%edx),%ecx next->previous = previous; 10d130: 89 4b 04 mov %ecx,0x4(%ebx) previous->next = next; 10d133: 89 19 mov %ebx,(%ecx) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10d135: 8b 0d 9c 57 12 00 mov 0x12579c,%ecx 10d13b: 89 4a 18 mov %ecx,0x18(%edx) _ISR_Enable( level ); 10d13e: 56 push %esi 10d13f: 9d popf return( previous_state ); } 10d140: 5b pop %ebx 10d141: 5e pop %esi 10d142: c9 leave 10d143: c3 ret =============================================================================== 0010e324 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10e324: 55 push %ebp 10e325: 89 e5 mov %esp,%ebp 10e327: 57 push %edi 10e328: 56 push %esi 10e329: 53 push %ebx 10e32a: 83 ec 20 sub $0x20,%esp 10e32d: 8b 7d 08 mov 0x8(%ebp),%edi 10e330: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10e333: 9c pushf 10e334: fa cli 10e335: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10e338: 56 push %esi 10e339: 57 push %edi 10e33a: 68 88 14 12 00 push $0x121488 10e33f: e8 54 ab ff ff call 108e98 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e344: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e346: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10e349: 83 c4 10 add $0x10,%esp 10e34c: 39 f3 cmp %esi,%ebx 10e34e: 74 1d je 10e36d <_Watchdog_Report_chain+0x49> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10e350: 52 push %edx 10e351: 52 push %edx 10e352: 53 push %ebx 10e353: 6a 00 push $0x0 10e355: e8 32 00 00 00 call 10e38c <_Watchdog_Report> _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; node != _Chain_Tail(header) ; node = node->next ) 10e35a: 8b 1b mov (%ebx),%ebx Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; 10e35c: 83 c4 10 add $0x10,%esp 10e35f: 39 f3 cmp %esi,%ebx 10e361: 75 ed jne 10e350 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10e363: 50 push %eax 10e364: 50 push %eax 10e365: 57 push %edi 10e366: 68 9f 14 12 00 push $0x12149f 10e36b: eb 08 jmp 10e375 <_Watchdog_Report_chain+0x51> } else { printk( "Chain is empty\n" ); 10e36d: 83 ec 0c sub $0xc,%esp 10e370: 68 ae 14 12 00 push $0x1214ae 10e375: e8 1e ab ff ff call 108e98 10e37a: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10e37d: ff 75 e4 pushl -0x1c(%ebp) 10e380: 9d popf } 10e381: 8d 65 f4 lea -0xc(%ebp),%esp 10e384: 5b pop %ebx 10e385: 5e pop %esi 10e386: 5f pop %edi 10e387: c9 leave 10e388: c3 ret =============================================================================== 0010d144 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10d144: 55 push %ebp 10d145: 89 e5 mov %esp,%ebp 10d147: 57 push %edi 10d148: 56 push %esi 10d149: 53 push %ebx 10d14a: 83 ec 1c sub $0x1c,%esp 10d14d: 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 ); 10d150: 9c pushf 10d151: fa cli 10d152: 5e pop %esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10d153: 8b 1f mov (%edi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10d155: 8d 47 04 lea 0x4(%edi),%eax 10d158: 89 45 e4 mov %eax,-0x1c(%ebp) if ( _Chain_Is_empty( header ) ) 10d15b: 39 c3 cmp %eax,%ebx 10d15d: 74 40 je 10d19f <_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) { 10d15f: 8b 43 10 mov 0x10(%ebx),%eax 10d162: 85 c0 test %eax,%eax 10d164: 74 08 je 10d16e <_Watchdog_Tickle+0x2a> the_watchdog->delta_interval--; 10d166: 48 dec %eax 10d167: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10d16a: 85 c0 test %eax,%eax 10d16c: 75 31 jne 10d19f <_Watchdog_Tickle+0x5b> goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10d16e: 83 ec 0c sub $0xc,%esp 10d171: 53 push %ebx 10d172: e8 65 ff ff ff call 10d0dc <_Watchdog_Remove> _ISR_Enable( level ); 10d177: 56 push %esi 10d178: 9d popf switch( watchdog_state ) { 10d179: 83 c4 10 add $0x10,%esp 10d17c: 83 f8 02 cmp $0x2,%eax 10d17f: 75 0e jne 10d18f <_Watchdog_Tickle+0x4b> <== NEVER TAKEN case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10d181: 50 push %eax 10d182: 50 push %eax 10d183: ff 73 24 pushl 0x24(%ebx) 10d186: ff 73 20 pushl 0x20(%ebx) 10d189: ff 53 1c call *0x1c(%ebx) 10d18c: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10d18f: 9c pushf 10d190: fa cli 10d191: 5e pop %esi RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10d192: 8b 1f mov (%edi),%ebx the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10d194: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10d197: 74 06 je 10d19f <_Watchdog_Tickle+0x5b> 10d199: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10d19d: eb cd jmp 10d16c <_Watchdog_Tickle+0x28> leave: _ISR_Enable(level); 10d19f: 56 push %esi 10d1a0: 9d popf } 10d1a1: 8d 65 f4 lea -0xc(%ebp),%esp 10d1a4: 5b pop %ebx 10d1a5: 5e pop %esi 10d1a6: 5f pop %edi 10d1a7: c9 leave 10d1a8: c3 ret =============================================================================== 0010f138 : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 10f138: 55 push %ebp 10f139: 89 e5 mov %esp,%ebp 10f13b: 53 push %ebx 10f13c: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 10f13f: 8d 45 f4 lea -0xc(%ebp),%eax 10f142: 50 push %eax 10f143: ff 75 08 pushl 0x8(%ebp) 10f146: 68 a4 58 12 00 push $0x1258a4 10f14b: e8 2c c9 ff ff call 10ba7c <_Objects_Get> 10f150: 89 c3 mov %eax,%ebx Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 10f152: 83 c4 10 add $0x10,%esp 10f155: b8 04 00 00 00 mov $0x4,%eax 10f15a: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10f15e: 75 32 jne 10f192 <== NEVER TAKEN case OBJECTS_LOCAL: _CORE_barrier_Flush( 10f160: 52 push %edx 10f161: 6a 02 push $0x2 10f163: 6a 00 push $0x0 10f165: 8d 43 14 lea 0x14(%ebx),%eax 10f168: 50 push %eax 10f169: e8 4e d7 ff ff call 10c8bc <_Thread_queue_Flush> &the_barrier->Barrier, NULL, CORE_BARRIER_WAS_DELETED ); _Objects_Close( &_Barrier_Information, &the_barrier->Object ); 10f16e: 59 pop %ecx 10f16f: 58 pop %eax 10f170: 53 push %ebx 10f171: 68 a4 58 12 00 push $0x1258a4 10f176: e8 59 c5 ff ff call 10b6d4 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 10f17b: 58 pop %eax 10f17c: 5a pop %edx 10f17d: 53 push %ebx 10f17e: 68 a4 58 12 00 push $0x1258a4 10f183: e8 cc c7 ff ff call 10b954 <_Objects_Free> _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 10f188: e8 b4 d0 ff ff call 10c241 <_Thread_Enable_dispatch> 10f18d: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f18f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f192: 8b 5d fc mov -0x4(%ebp),%ebx 10f195: c9 leave 10f196: c3 ret =============================================================================== 0010cab0 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10cab0: 55 push %ebp 10cab1: 89 e5 mov %esp,%ebp 10cab3: 57 push %edi 10cab4: 56 push %esi 10cab5: 53 push %ebx 10cab6: 83 ec 0c sub $0xc,%esp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10cab9: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 10cabd: 74 41 je 10cb00 <== NEVER TAKEN 10cabf: bb 01 00 00 00 mov $0x1,%ebx return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 10cac4: 8b 04 9d 68 85 12 00 mov 0x128568(,%ebx,4),%eax 10cacb: 85 c0 test %eax,%eax 10cacd: 74 2b je 10cafa continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10cacf: 8b 78 04 mov 0x4(%eax),%edi if ( !information ) 10cad2: be 01 00 00 00 mov $0x1,%esi 10cad7: 85 ff test %edi,%edi 10cad9: 75 17 jne 10caf2 10cadb: eb 1d jmp 10cafa continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 10cadd: 8b 47 1c mov 0x1c(%edi),%eax 10cae0: 8b 04 b0 mov (%eax,%esi,4),%eax if ( !the_thread ) 10cae3: 85 c0 test %eax,%eax 10cae5: 74 0a je 10caf1 <== NEVER TAKEN continue; (*routine)(the_thread); 10cae7: 83 ec 0c sub $0xc,%esp 10caea: 50 push %eax 10caeb: ff 55 08 call *0x8(%ebp) 10caee: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10caf1: 46 inc %esi 10caf2: 0f b7 47 10 movzwl 0x10(%edi),%eax 10caf6: 39 c6 cmp %eax,%esi 10caf8: 76 e3 jbe 10cadd Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10cafa: 43 inc %ebx 10cafb: 83 fb 05 cmp $0x5,%ebx 10cafe: 75 c4 jne 10cac4 (*routine)(the_thread); } } } 10cb00: 8d 65 f4 lea -0xc(%ebp),%esp 10cb03: 5b pop %ebx 10cb04: 5e pop %esi 10cb05: 5f pop %edi 10cb06: c9 leave 10cb07: c3 ret =============================================================================== 00114f08 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 114f08: 55 push %ebp 114f09: 89 e5 mov %esp,%ebp 114f0b: 57 push %edi 114f0c: 56 push %esi 114f0d: 53 push %ebx 114f0e: 83 ec 1c sub $0x1c,%esp 114f11: 8b 75 0c mov 0xc(%ebp),%esi 114f14: 8b 55 10 mov 0x10(%ebp),%edx 114f17: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 114f1a: b8 03 00 00 00 mov $0x3,%eax 114f1f: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 114f23: 0f 84 cf 00 00 00 je 114ff8 return RTEMS_INVALID_NAME; if ( !starting_address ) 114f29: 85 f6 test %esi,%esi 114f2b: 0f 84 bb 00 00 00 je 114fec return RTEMS_INVALID_ADDRESS; if ( !id ) 114f31: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp) 114f35: 0f 84 b1 00 00 00 je 114fec <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 114f3b: 85 ff test %edi,%edi 114f3d: 0f 84 b0 00 00 00 je 114ff3 114f43: 85 d2 test %edx,%edx 114f45: 0f 84 a8 00 00 00 je 114ff3 114f4b: 39 fa cmp %edi,%edx 114f4d: 0f 82 a0 00 00 00 jb 114ff3 114f53: f7 c7 03 00 00 00 test $0x3,%edi 114f59: 0f 85 94 00 00 00 jne 114ff3 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 114f5f: f7 c6 03 00 00 00 test $0x3,%esi 114f65: 0f 85 81 00 00 00 jne 114fec 114f6b: a1 64 e5 13 00 mov 0x13e564,%eax 114f70: 40 inc %eax 114f71: a3 64 e5 13 00 mov %eax,0x13e564 * 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 ); 114f76: 83 ec 0c sub $0xc,%esp 114f79: 68 ec e3 13 00 push $0x13e3ec 114f7e: 89 55 e4 mov %edx,-0x1c(%ebp) 114f81: e8 a6 3b 00 00 call 118b2c <_Objects_Allocate> 114f86: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 114f88: 83 c4 10 add $0x10,%esp 114f8b: 85 c0 test %eax,%eax 114f8d: 8b 55 e4 mov -0x1c(%ebp),%edx 114f90: 75 0c jne 114f9e _Thread_Enable_dispatch(); 114f92: e8 16 48 00 00 call 1197ad <_Thread_Enable_dispatch> 114f97: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 114f9c: eb 5a jmp 114ff8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 114f9e: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 114fa1: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 114fa4: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 114fa7: 8b 45 18 mov 0x18(%ebp),%eax 114faa: 89 43 1c mov %eax,0x1c(%ebx) the_partition->number_of_used_blocks = 0; 114fad: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) _Chain_Initialize( &the_partition->Memory, starting_address, 114fb4: 57 push %edi 114fb5: 89 d0 mov %edx,%eax 114fb7: 31 d2 xor %edx,%edx 114fb9: f7 f7 div %edi 114fbb: 50 push %eax 114fbc: 56 push %esi 114fbd: 8d 43 24 lea 0x24(%ebx),%eax 114fc0: 50 push %eax 114fc1: e8 62 2a 00 00 call 117a28 <_Chain_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 114fc6: 8b 43 08 mov 0x8(%ebx),%eax 114fc9: 0f b7 c8 movzwl %ax,%ecx 114fcc: 8b 15 08 e4 13 00 mov 0x13e408,%edx 114fd2: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 114fd5: 8b 55 08 mov 0x8(%ebp),%edx 114fd8: 89 53 0c mov %edx,0xc(%ebx) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 114fdb: 8b 55 1c mov 0x1c(%ebp),%edx 114fde: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 114fe0: e8 c8 47 00 00 call 1197ad <_Thread_Enable_dispatch> 114fe5: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 114fe7: 83 c4 10 add $0x10,%esp 114fea: eb 0c jmp 114ff8 114fec: b8 09 00 00 00 mov $0x9,%eax 114ff1: eb 05 jmp 114ff8 114ff3: b8 08 00 00 00 mov $0x8,%eax } 114ff8: 8d 65 f4 lea -0xc(%ebp),%esp 114ffb: 5b pop %ebx 114ffc: 5e pop %esi 114ffd: 5f pop %edi 114ffe: c9 leave 114fff: c3 ret =============================================================================== 0010b465 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 10b465: 55 push %ebp 10b466: 89 e5 mov %esp,%ebp 10b468: 57 push %edi 10b469: 56 push %esi 10b46a: 53 push %ebx 10b46b: 83 ec 30 sub $0x30,%esp 10b46e: 8b 75 08 mov 0x8(%ebp),%esi 10b471: 8b 5d 0c mov 0xc(%ebp),%ebx RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 10b474: 8d 45 e4 lea -0x1c(%ebp),%eax 10b477: 50 push %eax 10b478: 56 push %esi 10b479: 68 9c 71 12 00 push $0x12719c 10b47e: e8 15 1d 00 00 call 10d198 <_Objects_Get> 10b483: 89 c7 mov %eax,%edi rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 10b485: 83 c4 10 add $0x10,%esp 10b488: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10b48c: 0f 85 40 01 00 00 jne 10b5d2 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 10b492: 8b 40 40 mov 0x40(%eax),%eax 10b495: 3b 05 50 73 12 00 cmp 0x127350,%eax 10b49b: 74 0f je 10b4ac _Thread_Enable_dispatch(); 10b49d: e8 bb 24 00 00 call 10d95d <_Thread_Enable_dispatch> 10b4a2: bb 17 00 00 00 mov $0x17,%ebx return RTEMS_NOT_OWNER_OF_RESOURCE; 10b4a7: e9 2b 01 00 00 jmp 10b5d7 } if ( length == RTEMS_PERIOD_STATUS ) { 10b4ac: 85 db test %ebx,%ebx 10b4ae: 75 19 jne 10b4c9 switch ( the_period->state ) { 10b4b0: 8b 47 38 mov 0x38(%edi),%eax 10b4b3: 83 f8 04 cmp $0x4,%eax 10b4b6: 77 07 ja 10b4bf <== NEVER TAKEN 10b4b8: 8b 1c 85 60 11 12 00 mov 0x121160(,%eax,4),%ebx case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 10b4bf: e8 99 24 00 00 call 10d95d <_Thread_Enable_dispatch> return( return_value ); 10b4c4: e9 0e 01 00 00 jmp 10b5d7 } _ISR_Disable( level ); 10b4c9: 9c pushf 10b4ca: fa cli 10b4cb: 8f 45 d4 popl -0x2c(%ebp) switch ( the_period->state ) { 10b4ce: 8b 47 38 mov 0x38(%edi),%eax 10b4d1: 83 f8 02 cmp $0x2,%eax 10b4d4: 74 5f je 10b535 10b4d6: 83 f8 04 cmp $0x4,%eax 10b4d9: 0f 84 ba 00 00 00 je 10b599 10b4df: 85 c0 test %eax,%eax 10b4e1: 0f 85 eb 00 00 00 jne 10b5d2 <== NEVER TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 10b4e7: ff 75 d4 pushl -0x2c(%ebp) 10b4ea: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 10b4eb: 83 ec 0c sub $0xc,%esp 10b4ee: 57 push %edi 10b4ef: e8 9c fd ff ff call 10b290 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 10b4f4: 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; 10b4fb: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 10b502: c7 47 2c e0 b7 10 00 movl $0x10b7e0,0x2c(%edi) the_watchdog->id = id; 10b509: 89 77 30 mov %esi,0x30(%edi) the_watchdog->user_data = user_data; 10b50c: c7 47 34 00 00 00 00 movl $0x0,0x34(%edi) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 10b513: 89 5f 3c mov %ebx,0x3c(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b516: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b519: 5b pop %ebx 10b51a: 5e pop %esi 10b51b: 83 c7 10 add $0x10,%edi 10b51e: 57 push %edi 10b51f: 68 70 73 12 00 push $0x127370 10b524: e8 7b 33 00 00 call 10e8a4 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 10b529: e8 2f 24 00 00 call 10d95d <_Thread_Enable_dispatch> 10b52e: 31 db xor %ebx,%ebx 10b530: e9 98 00 00 00 jmp 10b5cd case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 10b535: 83 ec 0c sub $0xc,%esp 10b538: 57 push %edi 10b539: e8 4c fe ff ff call 10b38a <_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; 10b53e: c7 47 38 01 00 00 00 movl $0x1,0x38(%edi) the_period->next_length = length; 10b545: 89 5f 3c mov %ebx,0x3c(%edi) _ISR_Enable( level ); 10b548: ff 75 d4 pushl -0x2c(%ebp) 10b54b: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 10b54c: a1 50 73 12 00 mov 0x127350,%eax 10b551: 8b 57 08 mov 0x8(%edi),%edx 10b554: 89 50 20 mov %edx,0x20(%eax) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10b557: 5a pop %edx 10b558: 59 pop %ecx 10b559: 68 00 40 00 00 push $0x4000 10b55e: 50 push %eax 10b55f: e8 08 2c 00 00 call 10e16c <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 10b564: 9c pushf 10b565: fa cli 10b566: 5a pop %edx local_state = the_period->state; 10b567: 8b 47 38 mov 0x38(%edi),%eax the_period->state = RATE_MONOTONIC_ACTIVE; 10b56a: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) _ISR_Enable( level ); 10b571: 52 push %edx 10b572: 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 ) 10b573: 83 c4 10 add $0x10,%esp 10b576: 83 f8 03 cmp $0x3,%eax 10b579: 75 15 jne 10b590 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10b57b: 56 push %esi 10b57c: 56 push %esi 10b57d: 68 00 40 00 00 push $0x4000 10b582: ff 35 50 73 12 00 pushl 0x127350 10b588: e8 53 20 00 00 call 10d5e0 <_Thread_Clear_state> 10b58d: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 10b590: e8 c8 23 00 00 call 10d95d <_Thread_Enable_dispatch> 10b595: 31 db xor %ebx,%ebx return RTEMS_SUCCESSFUL; 10b597: eb 3e jmp 10b5d7 case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 10b599: 83 ec 0c sub $0xc,%esp 10b59c: 57 push %edi 10b59d: e8 e8 fd ff ff call 10b38a <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 10b5a2: ff 75 d4 pushl -0x2c(%ebp) 10b5a5: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 10b5a6: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) the_period->next_length = length; 10b5ad: 89 5f 3c mov %ebx,0x3c(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b5b0: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b5b3: 59 pop %ecx 10b5b4: 5b pop %ebx 10b5b5: 83 c7 10 add $0x10,%edi 10b5b8: 57 push %edi 10b5b9: 68 70 73 12 00 push $0x127370 10b5be: e8 e1 32 00 00 call 10e8a4 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 10b5c3: e8 95 23 00 00 call 10d95d <_Thread_Enable_dispatch> 10b5c8: bb 06 00 00 00 mov $0x6,%ebx return RTEMS_TIMEOUT; 10b5cd: 83 c4 10 add $0x10,%esp 10b5d0: eb 05 jmp 10b5d7 10b5d2: bb 04 00 00 00 mov $0x4,%ebx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b5d7: 89 d8 mov %ebx,%eax 10b5d9: 8d 65 f4 lea -0xc(%ebp),%esp 10b5dc: 5b pop %ebx 10b5dd: 5e pop %esi 10b5de: 5f pop %edi 10b5df: c9 leave 10b5e0: c3 ret =============================================================================== 0010b5e4 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 10b5e4: 55 push %ebp 10b5e5: 89 e5 mov %esp,%ebp 10b5e7: 57 push %edi 10b5e8: 56 push %esi 10b5e9: 53 push %ebx 10b5ea: 83 ec 7c sub $0x7c,%esp 10b5ed: 8b 5d 08 mov 0x8(%ebp),%ebx 10b5f0: 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 ) 10b5f3: 85 ff test %edi,%edi 10b5f5: 0f 84 2b 01 00 00 je 10b726 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 10b5fb: 52 push %edx 10b5fc: 52 push %edx 10b5fd: 68 74 11 12 00 push $0x121174 10b602: 53 push %ebx 10b603: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 10b605: 5e pop %esi 10b606: 58 pop %eax 10b607: 68 92 11 12 00 push $0x121192 10b60c: 53 push %ebx 10b60d: ff d7 call *%edi (*print)( context, "--- Wall times are in seconds ---\n" ); 10b60f: 5a pop %edx 10b610: 59 pop %ecx 10b611: 68 b4 11 12 00 push $0x1211b4 10b616: 53 push %ebx 10b617: ff d7 call *%edi Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 10b619: 5e pop %esi 10b61a: 58 pop %eax 10b61b: 68 d7 11 12 00 push $0x1211d7 10b620: 53 push %ebx 10b621: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 10b623: 5a pop %edx 10b624: 59 pop %ecx 10b625: 68 22 12 12 00 push $0x121222 10b62a: 53 push %ebx 10b62b: 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 ; 10b62d: 8b 35 a4 71 12 00 mov 0x1271a4,%esi 10b633: 83 c4 10 add $0x10,%esp 10b636: e9 df 00 00 00 jmp 10b71a id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 10b63b: 50 push %eax 10b63c: 50 push %eax 10b63d: 8d 45 88 lea -0x78(%ebp),%eax 10b640: 50 push %eax 10b641: 56 push %esi 10b642: e8 29 56 00 00 call 110c70 if ( status != RTEMS_SUCCESSFUL ) 10b647: 83 c4 10 add $0x10,%esp 10b64a: 85 c0 test %eax,%eax 10b64c: 0f 85 c7 00 00 00 jne 10b719 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 10b652: 51 push %ecx 10b653: 51 push %ecx 10b654: 8d 55 c0 lea -0x40(%ebp),%edx 10b657: 52 push %edx 10b658: 56 push %esi 10b659: e8 b6 56 00 00 call 110d14 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 10b65e: 83 c4 0c add $0xc,%esp 10b661: 8d 45 e3 lea -0x1d(%ebp),%eax 10b664: 50 push %eax 10b665: 6a 05 push $0x5 10b667: ff 75 c0 pushl -0x40(%ebp) 10b66a: e8 fd 01 00 00 call 10b86c /* * Print part of report line that is not dependent on granularity */ (*print)( context, 10b66f: 58 pop %eax 10b670: 5a pop %edx 10b671: ff 75 8c pushl -0x74(%ebp) 10b674: ff 75 88 pushl -0x78(%ebp) 10b677: 8d 55 e3 lea -0x1d(%ebp),%edx 10b67a: 52 push %edx 10b67b: 56 push %esi 10b67c: 68 6e 12 12 00 push $0x12126e 10b681: 53 push %ebx 10b682: ff d7 call *%edi ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 10b684: 8b 45 88 mov -0x78(%ebp),%eax 10b687: 83 c4 20 add $0x20,%esp 10b68a: 85 c0 test %eax,%eax 10b68c: 75 0f jne 10b69d (*print)( context, "\n" ); 10b68e: 51 push %ecx 10b68f: 51 push %ecx 10b690: 68 e8 14 12 00 push $0x1214e8 10b695: 53 push %ebx 10b696: ff d7 call *%edi continue; 10b698: 83 c4 10 add $0x10,%esp 10b69b: eb 7c jmp 10b719 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 ); 10b69d: 52 push %edx 10b69e: 8d 55 d8 lea -0x28(%ebp),%edx 10b6a1: 52 push %edx 10b6a2: 50 push %eax 10b6a3: 8d 45 a0 lea -0x60(%ebp),%eax 10b6a6: 50 push %eax 10b6a7: e8 cc 2e 00 00 call 10e578 <_Timespec_Divide_by_integer> (*print)( context, 10b6ac: 8b 45 dc mov -0x24(%ebp),%eax 10b6af: b9 e8 03 00 00 mov $0x3e8,%ecx 10b6b4: 99 cltd 10b6b5: f7 f9 idiv %ecx 10b6b7: 50 push %eax 10b6b8: ff 75 d8 pushl -0x28(%ebp) 10b6bb: 8b 45 9c mov -0x64(%ebp),%eax 10b6be: 99 cltd 10b6bf: f7 f9 idiv %ecx 10b6c1: 50 push %eax 10b6c2: ff 75 98 pushl -0x68(%ebp) 10b6c5: 8b 45 94 mov -0x6c(%ebp),%eax 10b6c8: 99 cltd 10b6c9: f7 f9 idiv %ecx 10b6cb: 50 push %eax 10b6cc: ff 75 90 pushl -0x70(%ebp) 10b6cf: 68 85 12 12 00 push $0x121285 10b6d4: 53 push %ebx 10b6d5: 89 4d 84 mov %ecx,-0x7c(%ebp) 10b6d8: ff d7 call *%edi 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); 10b6da: 83 c4 2c add $0x2c,%esp 10b6dd: 8d 55 d8 lea -0x28(%ebp),%edx 10b6e0: 52 push %edx 10b6e1: ff 75 88 pushl -0x78(%ebp) 10b6e4: 8d 45 b8 lea -0x48(%ebp),%eax 10b6e7: 50 push %eax 10b6e8: e8 8b 2e 00 00 call 10e578 <_Timespec_Divide_by_integer> (*print)( context, 10b6ed: 8b 45 dc mov -0x24(%ebp),%eax 10b6f0: 8b 4d 84 mov -0x7c(%ebp),%ecx 10b6f3: 99 cltd 10b6f4: f7 f9 idiv %ecx 10b6f6: 50 push %eax 10b6f7: ff 75 d8 pushl -0x28(%ebp) 10b6fa: 8b 45 b4 mov -0x4c(%ebp),%eax 10b6fd: 99 cltd 10b6fe: f7 f9 idiv %ecx 10b700: 50 push %eax 10b701: ff 75 b0 pushl -0x50(%ebp) 10b704: 8b 45 ac mov -0x54(%ebp),%eax 10b707: 99 cltd 10b708: f7 f9 idiv %ecx 10b70a: 50 push %eax 10b70b: ff 75 a8 pushl -0x58(%ebp) 10b70e: 68 a4 12 12 00 push $0x1212a4 10b713: 53 push %ebx 10b714: ff d7 call *%edi 10b716: 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++ ) { 10b719: 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 ; 10b71a: 3b 35 a8 71 12 00 cmp 0x1271a8,%esi 10b720: 0f 86 15 ff ff ff jbe 10b63b the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 10b726: 8d 65 f4 lea -0xc(%ebp),%esp 10b729: 5b pop %ebx 10b72a: 5e pop %esi 10b72b: 5f pop %edi 10b72c: c9 leave 10b72d: c3 ret =============================================================================== 0010a3b8 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 10a3b8: 55 push %ebp 10a3b9: 89 e5 mov %esp,%ebp 10a3bb: 57 push %edi 10a3bc: 56 push %esi 10a3bd: 53 push %ebx 10a3be: 83 ec 3c sub $0x3c,%esp 10a3c1: 8b 7d 0c mov 0xc(%ebp),%edi 10a3c4: 8b 5d 10 mov 0x10(%ebp),%ebx 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 ) ) 10a3c7: b8 03 00 00 00 mov $0x3,%eax 10a3cc: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 10a3d0: 0f 84 74 01 00 00 je 10a54a <== NEVER TAKEN return RTEMS_INVALID_NAME; if ( !id ) 10a3d6: b0 09 mov $0x9,%al 10a3d8: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 10a3dc: 0f 84 68 01 00 00 je 10a54a <== NEVER TAKEN return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 10a3e2: 89 d8 mov %ebx,%eax 10a3e4: 25 c0 00 00 00 and $0xc0,%eax 10a3e9: 74 22 je 10a40d _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10a3eb: 89 da mov %ebx,%edx 10a3ed: 83 e2 30 and $0x30,%edx 10a3f0: 83 fa 10 cmp $0x10,%edx 10a3f3: 0f 85 4c 01 00 00 jne 10a545 <== NEVER TAKEN 10a3f9: f6 c3 04 test $0x4,%bl 10a3fc: 0f 84 43 01 00 00 je 10a545 <== NEVER TAKEN _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 10a402: 3d c0 00 00 00 cmp $0xc0,%eax 10a407: 0f 84 38 01 00 00 je 10a545 <== NEVER TAKEN _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 10a40d: 89 da mov %ebx,%edx 10a40f: 83 e2 30 and $0x30,%edx 10a412: 74 0e je 10a422 10a414: b8 0a 00 00 00 mov $0xa,%eax 10a419: 83 ff 01 cmp $0x1,%edi 10a41c: 0f 87 28 01 00 00 ja 10a54a <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a422: a1 50 56 12 00 mov 0x125650,%eax 10a427: 40 inc %eax 10a428: a3 50 56 12 00 mov %eax,0x125650 * 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 ); 10a42d: 83 ec 0c sub $0xc,%esp 10a430: 68 98 55 12 00 push $0x125598 10a435: 89 55 c4 mov %edx,-0x3c(%ebp) 10a438: e8 2b 12 00 00 call 10b668 <_Objects_Allocate> 10a43d: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 10a43f: 83 c4 10 add $0x10,%esp 10a442: 85 c0 test %eax,%eax 10a444: 8b 55 c4 mov -0x3c(%ebp),%edx 10a447: 75 0f jne 10a458 _Thread_Enable_dispatch(); 10a449: e8 f3 1d 00 00 call 10c241 <_Thread_Enable_dispatch> 10a44e: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10a453: e9 f2 00 00 00 jmp 10a54a _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 10a458: 89 58 10 mov %ebx,0x10(%eax) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 10a45b: 85 d2 test %edx,%edx 10a45d: 75 37 jne 10a496 /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 10a45f: 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; 10a466: 31 c0 xor %eax,%eax 10a468: f6 c3 04 test $0x4,%bl 10a46b: 0f 95 c0 setne %al 10a46e: 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; 10a471: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 10a478: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) _CORE_semaphore_Initialize( 10a47f: 51 push %ecx 10a480: 57 push %edi 10a481: 8d 45 e0 lea -0x20(%ebp),%eax 10a484: 50 push %eax 10a485: 8d 46 14 lea 0x14(%esi),%eax 10a488: 50 push %eax 10a489: e8 da 0c 00 00 call 10b168 <_CORE_semaphore_Initialize> 10a48e: 83 c4 10 add $0x10,%esp 10a491: e9 8c 00 00 00 jmp 10a522 /* * 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; 10a496: 31 c0 xor %eax,%eax 10a498: f6 c3 04 test $0x4,%bl 10a49b: 0f 95 c0 setne %al 10a49e: 89 45 d8 mov %eax,-0x28(%ebp) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 10a4a1: 83 fa 10 cmp $0x10,%edx 10a4a4: 75 36 jne 10a4dc the_mutex_attr.priority_ceiling = priority_ceiling; 10a4a6: 8b 45 14 mov 0x14(%ebp),%eax 10a4a9: 89 45 dc mov %eax,-0x24(%ebp) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10a4ac: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10a4b3: c6 45 d4 00 movb $0x0,-0x2c(%ebp) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 10a4b7: 83 7d d8 01 cmpl $0x1,-0x28(%ebp) 10a4bb: 75 2a jne 10a4e7 if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 10a4bd: f6 c3 40 test $0x40,%bl 10a4c0: 74 09 je 10a4cb the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10a4c2: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp) 10a4c9: eb 0b jmp 10a4d6 the_mutex_attr.only_owner_release = true; } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { 10a4cb: 84 db test %bl,%bl 10a4cd: 79 18 jns 10a4e7 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 10a4cf: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10a4d6: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10a4da: eb 0b jmp 10a4e7 } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 10a4dc: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10a4e3: c6 45 d4 00 movb $0x0,-0x2c(%ebp) } mutex_status = _CORE_mutex_Initialize( 10a4e7: 52 push %edx 10a4e8: 31 c0 xor %eax,%eax 10a4ea: 83 ff 01 cmp $0x1,%edi 10a4ed: 0f 94 c0 sete %al 10a4f0: 50 push %eax 10a4f1: 8d 45 d0 lea -0x30(%ebp),%eax 10a4f4: 50 push %eax 10a4f5: 8d 46 14 lea 0x14(%esi),%eax 10a4f8: 50 push %eax 10a4f9: e8 fe 09 00 00 call 10aefc <_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 ) { 10a4fe: 83 c4 10 add $0x10,%esp 10a501: 83 f8 06 cmp $0x6,%eax 10a504: 75 1c jne 10a522 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10a506: 50 push %eax 10a507: 50 push %eax 10a508: 56 push %esi 10a509: 68 98 55 12 00 push $0x125598 10a50e: e8 41 14 00 00 call 10b954 <_Objects_Free> _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 10a513: e8 29 1d 00 00 call 10c241 <_Thread_Enable_dispatch> 10a518: b8 13 00 00 00 mov $0x13,%eax return RTEMS_INVALID_PRIORITY; 10a51d: 83 c4 10 add $0x10,%esp 10a520: eb 28 jmp 10a54a #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10a522: 8b 46 08 mov 0x8(%esi),%eax 10a525: 0f b7 c8 movzwl %ax,%ecx 10a528: 8b 15 b4 55 12 00 mov 0x1255b4,%edx 10a52e: 89 34 8a mov %esi,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10a531: 8b 55 08 mov 0x8(%ebp),%edx 10a534: 89 56 0c mov %edx,0xc(%esi) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 10a537: 8b 55 18 mov 0x18(%ebp),%edx 10a53a: 89 02 mov %eax,(%edx) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 10a53c: e8 00 1d 00 00 call 10c241 <_Thread_Enable_dispatch> 10a541: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10a543: eb 05 jmp 10a54a 10a545: b8 0b 00 00 00 mov $0xb,%eax } 10a54a: 8d 65 f4 lea -0xc(%ebp),%esp 10a54d: 5b pop %ebx 10a54e: 5e pop %esi 10a54f: 5f pop %edi 10a550: c9 leave 10a551: c3 ret =============================================================================== 001162b0 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 1162b0: 55 push %ebp 1162b1: 89 e5 mov %esp,%ebp 1162b3: 53 push %ebx 1162b4: 83 ec 14 sub $0x14,%esp 1162b7: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 1162ba: b8 0a 00 00 00 mov $0xa,%eax 1162bf: 85 db test %ebx,%ebx 1162c1: 74 71 je 116334 return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 1162c3: 50 push %eax 1162c4: 50 push %eax 1162c5: 8d 45 f4 lea -0xc(%ebp),%eax 1162c8: 50 push %eax 1162c9: ff 75 08 pushl 0x8(%ebp) 1162cc: e8 2b 35 00 00 call 1197fc <_Thread_Get> 1162d1: 89 c1 mov %eax,%ecx switch ( location ) { 1162d3: 83 c4 10 add $0x10,%esp 1162d6: b8 04 00 00 00 mov $0x4,%eax 1162db: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 1162df: 75 53 jne 116334 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 1162e1: 8b 91 f0 00 00 00 mov 0xf0(%ecx),%edx asr = &api->Signal; 1162e7: 83 7a 0c 00 cmpl $0x0,0xc(%edx) 1162eb: 74 3d je 11632a if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 1162ed: 80 7a 08 00 cmpb $0x0,0x8(%edx) 1162f1: 74 26 je 116319 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 1162f3: 9c pushf 1162f4: fa cli 1162f5: 58 pop %eax *signal_set |= signals; 1162f6: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 1162f9: 50 push %eax 1162fa: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 1162fb: c6 41 74 01 movb $0x1,0x74(%ecx) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 1162ff: a1 fc e5 13 00 mov 0x13e5fc,%eax 116304: 85 c0 test %eax,%eax 116306: 74 19 je 116321 116308: 3b 0d 20 e6 13 00 cmp 0x13e620,%ecx 11630e: 75 11 jne 116321 <== NEVER TAKEN _ISR_Signals_to_thread_executing = true; 116310: c6 05 b4 e6 13 00 01 movb $0x1,0x13e6b4 116317: eb 08 jmp 116321 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 116319: 9c pushf 11631a: fa cli 11631b: 58 pop %eax *signal_set |= signals; 11631c: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 11631f: 50 push %eax 116320: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 116321: e8 87 34 00 00 call 1197ad <_Thread_Enable_dispatch> 116326: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116328: eb 0a jmp 116334 } _Thread_Enable_dispatch(); 11632a: e8 7e 34 00 00 call 1197ad <_Thread_Enable_dispatch> 11632f: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116334: 8b 5d fc mov -0x4(%ebp),%ebx 116337: c9 leave 116338: c3 ret =============================================================================== 0011156c : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 11156c: 55 push %ebp 11156d: 89 e5 mov %esp,%ebp 11156f: 57 push %edi 111570: 56 push %esi 111571: 53 push %ebx 111572: 83 ec 1c sub $0x1c,%esp 111575: 8b 4d 10 mov 0x10(%ebp),%ecx ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 111578: b8 09 00 00 00 mov $0x9,%eax 11157d: 85 c9 test %ecx,%ecx 11157f: 0f 84 f4 00 00 00 je 111679 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 111585: 8b 1d 0c 57 12 00 mov 0x12570c,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 11158b: 8b b3 f0 00 00 00 mov 0xf0(%ebx),%esi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 111591: 80 7b 75 01 cmpb $0x1,0x75(%ebx) 111595: 19 ff sbb %edi,%edi 111597: 81 e7 00 01 00 00 and $0x100,%edi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 11159d: 83 7b 7c 00 cmpl $0x0,0x7c(%ebx) 1115a1: 74 06 je 1115a9 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 1115a3: 81 cf 00 02 00 00 or $0x200,%edi if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 1115a9: 80 7e 08 01 cmpb $0x1,0x8(%esi) 1115ad: 19 d2 sbb %edx,%edx 1115af: 81 e2 00 04 00 00 and $0x400,%edx old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); 1115b5: 89 55 e4 mov %edx,-0x1c(%ebp) 1115b8: 89 4d e0 mov %ecx,-0x20(%ebp) 1115bb: e8 7b be ff ff call 10d43b <_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; 1115c0: 8b 55 e4 mov -0x1c(%ebp),%edx 1115c3: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 1115c5: 09 f8 or %edi,%eax 1115c7: 8b 4d e0 mov -0x20(%ebp),%ecx 1115ca: 89 01 mov %eax,(%ecx) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 1115cc: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 1115d3: 74 0f je 1115e4 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 1115d5: 8b 45 08 mov 0x8(%ebp),%eax 1115d8: c1 e8 08 shr $0x8,%eax 1115db: 83 f0 01 xor $0x1,%eax 1115de: 83 e0 01 and $0x1,%eax 1115e1: 88 43 75 mov %al,0x75(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 1115e4: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 1115eb: 74 21 je 11160e if ( _Modes_Is_timeslice(mode_set) ) { 1115ed: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 1115f4: 74 11 je 111607 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 1115f6: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 1115fd: a1 1c 56 12 00 mov 0x12561c,%eax 111602: 89 43 78 mov %eax,0x78(%ebx) 111605: eb 07 jmp 11160e } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 111607: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 11160e: f6 45 0c 01 testb $0x1,0xc(%ebp) 111612: 74 0a je 11161e */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 111614: f6 45 08 01 testb $0x1,0x8(%ebp) 111618: 74 03 je 11161d 11161a: fa cli 11161b: eb 01 jmp 11161e 11161d: fb sti */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 11161e: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 111625: 74 33 je 11165a * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 111627: 8b 45 08 mov 0x8(%ebp),%eax 11162a: c1 e8 0a shr $0xa,%eax 11162d: 83 f0 01 xor $0x1,%eax 111630: 83 e0 01 and $0x1,%eax if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 111633: 3a 46 08 cmp 0x8(%esi),%al 111636: 74 22 je 11165a 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 ) { asr->is_enabled = is_asr_enabled; 111638: 88 46 08 mov %al,0x8(%esi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 11163b: 9c pushf 11163c: fa cli 11163d: 58 pop %eax _signals = information->signals_pending; 11163e: 8b 56 18 mov 0x18(%esi),%edx information->signals_pending = information->signals_posted; 111641: 8b 4e 14 mov 0x14(%esi),%ecx 111644: 89 4e 18 mov %ecx,0x18(%esi) information->signals_posted = _signals; 111647: 89 56 14 mov %edx,0x14(%esi) _ISR_Enable( _level ); 11164a: 50 push %eax 11164b: 9d popf if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 11164c: 83 7e 14 00 cmpl $0x0,0x14(%esi) 111650: 74 08 je 11165a if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; 111652: c6 43 74 01 movb $0x1,0x74(%ebx) 111656: b3 01 mov $0x1,%bl 111658: eb 02 jmp 11165c 11165a: 31 db xor %ebx,%ebx } } } if ( _System_state_Is_up( _System_state_Get() ) ) 11165c: 83 3d e8 57 12 00 03 cmpl $0x3,0x1257e8 111663: 75 12 jne 111677 <== NEVER TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 111665: e8 0a 01 00 00 call 111774 <_Thread_Evaluate_mode> 11166a: 84 c0 test %al,%al 11166c: 75 04 jne 111672 11166e: 84 db test %bl,%bl 111670: 74 05 je 111677 _Thread_Dispatch(); 111672: e8 85 aa ff ff call 10c0fc <_Thread_Dispatch> 111677: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 111679: 83 c4 1c add $0x1c,%esp 11167c: 5b pop %ebx 11167d: 5e pop %esi 11167e: 5f pop %edi 11167f: c9 leave 111680: c3 ret =============================================================================== 0010e200 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10e200: 55 push %ebp 10e201: 89 e5 mov %esp,%ebp 10e203: 56 push %esi 10e204: 53 push %ebx 10e205: 83 ec 10 sub $0x10,%esp 10e208: 8b 5d 0c mov 0xc(%ebp),%ebx 10e20b: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10e20e: 85 db test %ebx,%ebx 10e210: 74 10 je 10e222 10e212: 0f b6 05 f4 41 12 00 movzbl 0x1241f4,%eax 10e219: ba 13 00 00 00 mov $0x13,%edx 10e21e: 39 c3 cmp %eax,%ebx 10e220: 77 50 ja 10e272 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10e222: ba 09 00 00 00 mov $0x9,%edx 10e227: 85 f6 test %esi,%esi 10e229: 74 47 je 10e272 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10e22b: 51 push %ecx 10e22c: 51 push %ecx 10e22d: 8d 45 f4 lea -0xc(%ebp),%eax 10e230: 50 push %eax 10e231: ff 75 08 pushl 0x8(%ebp) 10e234: e8 17 1b 00 00 call 10fd50 <_Thread_Get> switch ( location ) { 10e239: 83 c4 10 add $0x10,%esp 10e23c: ba 04 00 00 00 mov $0x4,%edx 10e241: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10e245: 75 2b jne 10e272 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10e247: 8b 50 14 mov 0x14(%eax),%edx 10e24a: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10e24c: 85 db test %ebx,%ebx 10e24e: 74 1b je 10e26b the_thread->real_priority = new_priority; 10e250: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10e253: 83 78 1c 00 cmpl $0x0,0x1c(%eax) 10e257: 74 05 je 10e25e the_thread->current_priority > new_priority ) 10e259: 39 58 14 cmp %ebx,0x14(%eax) 10e25c: 76 0d jbe 10e26b <== ALWAYS TAKEN _Thread_Change_priority( the_thread, new_priority, false ); 10e25e: 52 push %edx 10e25f: 6a 00 push $0x0 10e261: 53 push %ebx 10e262: 50 push %eax 10e263: e8 fc 15 00 00 call 10f864 <_Thread_Change_priority> 10e268: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10e26b: e8 91 1a 00 00 call 10fd01 <_Thread_Enable_dispatch> 10e270: 31 d2 xor %edx,%edx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10e272: 89 d0 mov %edx,%eax 10e274: 8d 65 f8 lea -0x8(%ebp),%esp 10e277: 5b pop %ebx 10e278: 5e pop %esi 10e279: c9 leave 10e27a: c3 ret =============================================================================== 00116af8 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 116af8: 55 push %ebp 116af9: 89 e5 mov %esp,%ebp 116afb: 83 ec 1c sub $0x1c,%esp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 116afe: 8d 45 f4 lea -0xc(%ebp),%eax 116b01: 50 push %eax 116b02: ff 75 08 pushl 0x8(%ebp) 116b05: 68 44 e8 13 00 push $0x13e844 116b0a: e8 6d 24 00 00 call 118f7c <_Objects_Get> 116b0f: 89 c2 mov %eax,%edx Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 116b11: 83 c4 10 add $0x10,%esp 116b14: b8 04 00 00 00 mov $0x4,%eax 116b19: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 116b1d: 75 1c jne 116b3b case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 116b1f: 83 7a 38 04 cmpl $0x4,0x38(%edx) 116b23: 74 0f je 116b34 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 116b25: 83 ec 0c sub $0xc,%esp 116b28: 83 c2 10 add $0x10,%edx 116b2b: 52 push %edx 116b2c: e8 93 3e 00 00 call 11a9c4 <_Watchdog_Remove> 116b31: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 116b34: e8 74 2c 00 00 call 1197ad <_Thread_Enable_dispatch> 116b39: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116b3b: c9 leave 116b3c: c3 ret =============================================================================== 00116f60 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 116f60: 55 push %ebp 116f61: 89 e5 mov %esp,%ebp 116f63: 57 push %edi 116f64: 56 push %esi 116f65: 53 push %ebx 116f66: 83 ec 1c sub $0x1c,%esp 116f69: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 116f6c: 8b 35 84 e8 13 00 mov 0x13e884,%esi if ( !timer_server ) 116f72: b8 0e 00 00 00 mov $0xe,%eax 116f77: 85 f6 test %esi,%esi 116f79: 0f 84 b4 00 00 00 je 117033 <== NEVER TAKEN return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 116f7f: b0 0b mov $0xb,%al 116f81: 80 3d 78 e5 13 00 00 cmpb $0x0,0x13e578 116f88: 0f 84 a5 00 00 00 je 117033 <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 116f8e: b0 09 mov $0x9,%al 116f90: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 116f94: 0f 84 99 00 00 00 je 117033 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 116f9a: 83 ec 0c sub $0xc,%esp 116f9d: 53 push %ebx 116f9e: e8 61 d6 ff ff call 114604 <_TOD_Validate> 116fa3: 83 c4 10 add $0x10,%esp 116fa6: 84 c0 test %al,%al 116fa8: 0f 84 80 00 00 00 je 11702e <== NEVER TAKEN return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 116fae: 83 ec 0c sub $0xc,%esp 116fb1: 53 push %ebx 116fb2: e8 e5 d5 ff ff call 11459c <_TOD_To_seconds> 116fb7: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 116fb9: 83 c4 10 add $0x10,%esp 116fbc: 3b 05 f4 e5 13 00 cmp 0x13e5f4,%eax 116fc2: 76 6a jbe 11702e <== NEVER TAKEN 116fc4: 51 push %ecx 116fc5: 8d 45 e4 lea -0x1c(%ebp),%eax 116fc8: 50 push %eax 116fc9: ff 75 08 pushl 0x8(%ebp) 116fcc: 68 44 e8 13 00 push $0x13e844 116fd1: e8 a6 1f 00 00 call 118f7c <_Objects_Get> 116fd6: 89 c3 mov %eax,%ebx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 116fd8: 83 c4 10 add $0x10,%esp 116fdb: b8 04 00 00 00 mov $0x4,%eax 116fe0: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 116fe4: 75 4d jne 117033 <== NEVER TAKEN case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 116fe6: 83 ec 0c sub $0xc,%esp 116fe9: 8d 43 10 lea 0x10(%ebx),%eax 116fec: 50 push %eax 116fed: e8 d2 39 00 00 call 11a9c4 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 116ff2: 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; 116ff9: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) the_watchdog->routine = routine; 117000: 8b 45 10 mov 0x10(%ebp),%eax 117003: 89 43 2c mov %eax,0x2c(%ebx) the_watchdog->id = id; 117006: 8b 45 08 mov 0x8(%ebp),%eax 117009: 89 43 30 mov %eax,0x30(%ebx) the_watchdog->user_data = user_data; 11700c: 8b 45 14 mov 0x14(%ebp),%eax 11700f: 89 43 34 mov %eax,0x34(%ebx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 117012: 2b 3d f4 e5 13 00 sub 0x13e5f4,%edi 117018: 89 7b 1c mov %edi,0x1c(%ebx) (*timer_server->schedule_operation)( timer_server, the_timer ); 11701b: 58 pop %eax 11701c: 5a pop %edx 11701d: 53 push %ebx 11701e: 56 push %esi 11701f: ff 56 04 call *0x4(%esi) _Thread_Enable_dispatch(); 117022: e8 86 27 00 00 call 1197ad <_Thread_Enable_dispatch> 117027: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 117029: 83 c4 10 add $0x10,%esp 11702c: eb 05 jmp 117033 11702e: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117033: 8d 65 f4 lea -0xc(%ebp),%esp 117036: 5b pop %ebx 117037: 5e pop %esi 117038: 5f pop %edi 117039: c9 leave 11703a: c3 ret