00111d6c <_CORE_barrier_Wait>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 111d6c: 55 push %ebp 111d6d: 89 e5 mov %esp,%ebp 111d6f: 57 push %edi 111d70: 56 push %esi 111d71: 53 push %ebx 111d72: 83 ec 1c sub $0x1c,%esp 111d75: 8b 45 08 mov 0x8(%ebp),%eax 111d78: 8b 5d 0c mov 0xc(%ebp),%ebx 111d7b: 8b 75 14 mov 0x14(%ebp),%esi 111d7e: 8b 7d 18 mov 0x18(%ebp),%edi Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 111d81: 8b 15 18 54 12 00 mov 0x125418,%edx executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 111d87: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 111d8e: 9c pushf 111d8f: fa cli 111d90: 8f 45 e4 popl -0x1c(%ebp) the_barrier->number_of_waiting_threads++; 111d93: 8b 48 48 mov 0x48(%eax),%ecx 111d96: 41 inc %ecx 111d97: 89 48 48 mov %ecx,0x48(%eax) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 111d9a: 83 78 40 00 cmpl $0x0,0x40(%eax) 111d9e: 75 05 jne 111da5 <_CORE_barrier_Wait+0x39> if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { 111da0: 3b 48 44 cmp 0x44(%eax),%ecx 111da3: 74 2b je 111dd0 <_CORE_barrier_Wait+0x64> 111da5: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 111dac: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 111daf: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( level ); 111db2: ff 75 e4 pushl -0x1c(%ebp) 111db5: 9d popf _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 111db6: c7 45 10 dc db 10 00 movl $0x10dbdc,0x10(%ebp) 111dbd: 89 75 0c mov %esi,0xc(%ebp) 111dc0: 89 45 08 mov %eax,0x8(%ebp) } 111dc3: 83 c4 1c add $0x1c,%esp 111dc6: 5b pop %ebx 111dc7: 5e pop %esi 111dc8: 5f pop %edi 111dc9: c9 leave _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 111dca: e9 fd ba ff ff jmp 10d8cc <_Thread_queue_Enqueue_with_handler> 111dcf: 90 nop <== NOT EXECUTED _ISR_Disable( level ); the_barrier->number_of_waiting_threads++; if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 111dd0: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) _ISR_Enable( level ); 111dd7: ff 75 e4 pushl -0x1c(%ebp) 111dda: 9d popf _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 111ddb: 89 7d 10 mov %edi,0x10(%ebp) 111dde: 89 5d 0c mov %ebx,0xc(%ebp) 111de1: 89 45 08 mov %eax,0x8(%ebp) executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); } 111de4: 83 c4 1c add $0x1c,%esp 111de7: 5b pop %ebx 111de8: 5e pop %esi 111de9: 5f pop %edi 111dea: c9 leave if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; _ISR_Enable( level ); _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 111deb: e9 4c ff ff ff jmp 111d3c <_CORE_barrier_Release> 00119430 <_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 ) { 119430: 55 push %ebp 119431: 89 e5 mov %esp,%ebp 119433: 57 push %edi 119434: 56 push %esi 119435: 53 push %ebx 119436: 83 ec 1c sub $0x1c,%esp 119439: 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 ) { 11943c: 8b 45 10 mov 0x10(%ebp),%eax 11943f: 39 43 4c cmp %eax,0x4c(%ebx) 119442: 72 60 jb 1194a4 <_CORE_message_queue_Broadcast+0x74> * 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 ) { 119444: 8b 43 48 mov 0x48(%ebx),%eax 119447: 85 c0 test %eax,%eax 119449: 75 45 jne 119490 <_CORE_message_queue_Broadcast+0x60> * 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))) { 11944b: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 119452: eb 18 jmp 11946c <_CORE_message_queue_Broadcast+0x3c> waitp = &the_thread->Wait; number_broadcasted += 1; 119454: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 119457: 8b 42 2c mov 0x2c(%edx),%eax 11945a: 89 c7 mov %eax,%edi 11945c: 8b 75 0c mov 0xc(%ebp),%esi 11945f: 8b 4d 10 mov 0x10(%ebp),%ecx 119462: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 119464: 8b 42 28 mov 0x28(%edx),%eax 119467: 8b 55 10 mov 0x10(%ebp),%edx 11946a: 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))) { 11946c: 83 ec 0c sub $0xc,%esp 11946f: 53 push %ebx 119470: e8 83 23 00 00 call 11b7f8 <_Thread_queue_Dequeue> 119475: 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 = 119477: 83 c4 10 add $0x10,%esp 11947a: 85 c0 test %eax,%eax 11947c: 75 d6 jne 119454 <_CORE_message_queue_Broadcast+0x24> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 11947e: 8b 55 e4 mov -0x1c(%ebp),%edx 119481: 8b 45 1c mov 0x1c(%ebp),%eax 119484: 89 10 mov %edx,(%eax) 119486: 31 c0 xor %eax,%eax return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 119488: 8d 65 f4 lea -0xc(%ebp),%esp 11948b: 5b pop %ebx 11948c: 5e pop %esi 11948d: 5f pop %edi 11948e: c9 leave 11948f: c3 ret * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 119490: 8b 55 1c mov 0x1c(%ebp),%edx 119493: c7 02 00 00 00 00 movl $0x0,(%edx) 119499: 31 c0 xor %eax,%eax #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 11949b: 8d 65 f4 lea -0xc(%ebp),%esp 11949e: 5b pop %ebx 11949f: 5e pop %esi 1194a0: 5f pop %edi 1194a1: c9 leave 1194a2: c3 ret 1194a3: 90 nop <== NOT EXECUTED { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 1194a4: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 1194a9: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1194ac: 5b pop %ebx <== NOT EXECUTED 1194ad: 5e pop %esi <== NOT EXECUTED 1194ae: 5f pop %edi <== NOT EXECUTED 1194af: c9 leave <== NOT EXECUTED 1194b0: c3 ret <== NOT EXECUTED 00114b60 <_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 ) { 114b60: 55 push %ebp 114b61: 89 e5 mov %esp,%ebp 114b63: 57 push %edi 114b64: 56 push %esi 114b65: 53 push %ebx 114b66: 83 ec 0c sub $0xc,%esp 114b69: 8b 5d 08 mov 0x8(%ebp),%ebx 114b6c: 8b 75 10 mov 0x10(%ebp),%esi 114b6f: 8b 45 14 mov 0x14(%ebp),%eax size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 114b72: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 114b75: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 114b7c: 89 43 4c mov %eax,0x4c(%ebx) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 114b7f: a8 03 test $0x3,%al 114b81: 75 19 jne 114b9c <_CORE_message_queue_Initialize+0x3c> 114b83: 89 c2 mov %eax,%edx /* * 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)); 114b85: 8d 7a 10 lea 0x10(%edx),%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 * 114b88: 89 f8 mov %edi,%eax 114b8a: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 114b8d: 39 d0 cmp %edx,%eax 114b8f: 73 23 jae 114bb4 <_CORE_message_queue_Initialize+0x54> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 114b91: 31 c0 xor %eax,%eax } 114b93: 8d 65 f4 lea -0xc(%ebp),%esp 114b96: 5b pop %ebx 114b97: 5e pop %esi 114b98: 5f pop %edi 114b99: c9 leave 114b9a: c3 ret 114b9b: 90 nop <== NOT EXECUTED * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { allocated_message_size += sizeof(uint32_t); 114b9c: 8d 50 04 lea 0x4(%eax),%edx allocated_message_size &= ~(sizeof(uint32_t) - 1); 114b9f: 83 e2 fc and $0xfffffffc,%edx } if (allocated_message_size < maximum_message_size) 114ba2: 39 d0 cmp %edx,%eax 114ba4: 77 eb ja 114b91 <_CORE_message_queue_Initialize+0x31> /* * 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)); 114ba6: 8d 7a 10 lea 0x10(%edx),%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 * 114ba9: 89 f8 mov %edi,%eax 114bab: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 114bae: 39 d0 cmp %edx,%eax 114bb0: 72 df jb 114b91 <_CORE_message_queue_Initialize+0x31> 114bb2: 66 90 xchg %ax,%ax return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 114bb4: 83 ec 0c sub $0xc,%esp 114bb7: 50 push %eax 114bb8: e8 2f 28 00 00 call 1173ec <_Workspace_Allocate> 114bbd: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 114bc0: 83 c4 10 add $0x10,%esp 114bc3: 85 c0 test %eax,%eax 114bc5: 74 ca je 114b91 <_CORE_message_queue_Initialize+0x31> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 114bc7: 57 push %edi 114bc8: 56 push %esi 114bc9: 50 push %eax 114bca: 8d 43 60 lea 0x60(%ebx),%eax 114bcd: 50 push %eax 114bce: e8 05 43 00 00 call 118ed8 <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 114bd3: 8d 43 54 lea 0x54(%ebx),%eax 114bd6: 89 43 50 mov %eax,0x50(%ebx) the_chain->permanent_null = NULL; 114bd9: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_chain->last = _Chain_Head(the_chain); 114be0: 8d 43 50 lea 0x50(%ebx),%eax 114be3: 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( 114be6: 6a 06 push $0x6 114be8: 68 80 00 00 00 push $0x80 114bed: 8b 45 0c mov 0xc(%ebp),%eax 114bf0: 83 38 01 cmpl $0x1,(%eax) 114bf3: 0f 94 c0 sete %al 114bf6: 0f b6 c0 movzbl %al,%eax 114bf9: 50 push %eax 114bfa: 53 push %ebx 114bfb: e8 0c 1e 00 00 call 116a0c <_Thread_queue_Initialize> 114c00: b0 01 mov $0x1,%al THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 114c02: 83 c4 20 add $0x20,%esp } 114c05: 8d 65 f4 lea -0xc(%ebp),%esp 114c08: 5b pop %ebx 114c09: 5e pop %esi 114c0a: 5f pop %edi 114c0b: c9 leave 114c0c: c3 ret 00110078 <_CORE_message_queue_Insert_message>: void _CORE_message_queue_Insert_message( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message, CORE_message_queue_Submit_types submit_type ) { 110078: 55 push %ebp 110079: 89 e5 mov %esp,%ebp 11007b: 53 push %ebx 11007c: 8b 45 08 mov 0x8(%ebp),%eax 11007f: 8b 55 0c mov 0xc(%ebp),%edx #endif _CORE_message_queue_Set_message_priority( the_message, submit_type ); #if !defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) _ISR_Disable( level ); 110082: 9c pushf 110083: fa cli 110084: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 110085: ff 40 48 incl 0x48(%eax) if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) 110088: 81 7d 10 ff ff ff 7f cmpl $0x7fffffff,0x10(%ebp) 11008f: 74 17 je 1100a8 <_CORE_message_queue_Insert_message+0x30> 110091: 8d 48 50 lea 0x50(%eax),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 110094: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 110097: 8b 48 50 mov 0x50(%eax),%ecx after_node->next = the_node; 11009a: 89 50 50 mov %edx,0x50(%eax) the_node->next = before_node; 11009d: 89 0a mov %ecx,(%edx) before_node->previous = the_node; 11009f: 89 51 04 mov %edx,0x4(%ecx) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); else _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 1100a2: 53 push %ebx 1100a3: 9d popf * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) (*the_message_queue->notify_handler)(the_message_queue->notify_argument); #endif } 1100a4: 5b pop %ebx 1100a5: c9 leave 1100a6: c3 ret 1100a7: 90 nop <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 1100a8: 8d 48 54 lea 0x54(%eax),%ecx 1100ab: 89 0a mov %ecx,(%edx) old_last_node = the_chain->last; 1100ad: 8b 48 58 mov 0x58(%eax),%ecx the_chain->last = the_node; 1100b0: 89 50 58 mov %edx,0x58(%eax) old_last_node->next = the_node; 1100b3: 89 11 mov %edx,(%ecx) the_node->previous = old_last_node; 1100b5: 89 4a 04 mov %ecx,0x4(%edx) 1100b8: eb e8 jmp 1100a2 <_CORE_message_queue_Insert_message+0x2a> 00114c10 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 114c10: 55 push %ebp 114c11: 89 e5 mov %esp,%ebp 114c13: 57 push %edi 114c14: 56 push %esi 114c15: 53 push %ebx 114c16: 83 ec 1c sub $0x1c,%esp 114c19: 8b 45 08 mov 0x8(%ebp),%eax 114c1c: 8b 55 0c mov 0xc(%ebp),%edx 114c1f: 89 55 dc mov %edx,-0x24(%ebp) 114c22: 8b 55 10 mov 0x10(%ebp),%edx 114c25: 89 55 e4 mov %edx,-0x1c(%ebp) 114c28: 8b 7d 14 mov 0x14(%ebp),%edi 114c2b: 8b 55 1c mov 0x1c(%ebp),%edx 114c2e: 89 55 d8 mov %edx,-0x28(%ebp) 114c31: 8a 5d 18 mov 0x18(%ebp),%bl ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 114c34: 8b 0d 98 fa 12 00 mov 0x12fa98,%ecx executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 114c3a: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) _ISR_Disable( level ); 114c41: 9c pushf 114c42: fa cli 114c43: 8f 45 e0 popl -0x20(%ebp) */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 114c46: 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; 114c49: 8d 70 54 lea 0x54(%eax),%esi 114c4c: 39 f2 cmp %esi,%edx 114c4e: 74 44 je 114c94 <_CORE_message_queue_Seize+0x84> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 114c50: 8b 0a mov (%edx),%ecx the_chain->first = new_first; 114c52: 89 48 50 mov %ecx,0x50(%eax) new_first->previous = _Chain_Head(the_chain); 114c55: 8d 58 50 lea 0x50(%eax),%ebx 114c58: 89 59 04 mov %ebx,0x4(%ecx) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 114c5b: ff 48 48 decl 0x48(%eax) _ISR_Enable( level ); 114c5e: ff 75 e0 pushl -0x20(%ebp) 114c61: 9d popf *size_p = the_message->Contents.size; 114c62: 8b 4a 08 mov 0x8(%edx),%ecx 114c65: 89 0f mov %ecx,(%edi) _Thread_Executing->Wait.count = 114c67: 8b 0d 98 fa 12 00 mov 0x12fa98,%ecx 114c6d: c7 41 24 00 00 00 00 movl $0x0,0x24(%ecx) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 114c74: 8d 72 0c lea 0xc(%edx),%esi 114c77: 8b 0f mov (%edi),%ecx 114c79: 8b 7d e4 mov -0x1c(%ebp),%edi 114c7c: 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 ); 114c7e: 89 55 0c mov %edx,0xc(%ebp) 114c81: 83 c0 60 add $0x60,%eax 114c84: 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 ); } 114c87: 83 c4 1c add $0x1c,%esp 114c8a: 5b pop %ebx 114c8b: 5e pop %esi 114c8c: 5f pop %edi 114c8d: c9 leave 114c8e: e9 4d fe ff ff jmp 114ae0 <_Chain_Append> 114c93: 90 nop <== NOT EXECUTED return; } #endif } if ( !wait ) { 114c94: 84 db test %bl,%bl 114c96: 75 14 jne 114cac <_CORE_message_queue_Seize+0x9c> _ISR_Enable( level ); 114c98: ff 75 e0 pushl -0x20(%ebp) 114c9b: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 114c9c: 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 ); } 114ca3: 83 c4 1c add $0x1c,%esp 114ca6: 5b pop %ebx 114ca7: 5e pop %esi 114ca8: 5f pop %edi 114ca9: c9 leave 114caa: c3 ret 114cab: 90 nop <== NOT EXECUTED 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; 114cac: 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; 114cb3: 89 41 44 mov %eax,0x44(%ecx) executing->Wait.id = id; 114cb6: 8b 55 dc mov -0x24(%ebp),%edx 114cb9: 89 51 20 mov %edx,0x20(%ecx) executing->Wait.return_argument_second.mutable_object = buffer; 114cbc: 8b 55 e4 mov -0x1c(%ebp),%edx 114cbf: 89 51 2c mov %edx,0x2c(%ecx) executing->Wait.return_argument = size_p; 114cc2: 89 79 28 mov %edi,0x28(%ecx) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 114cc5: ff 75 e0 pushl -0x20(%ebp) 114cc8: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 114cc9: c7 45 10 bc 6a 11 00 movl $0x116abc,0x10(%ebp) 114cd0: 8b 55 d8 mov -0x28(%ebp),%edx 114cd3: 89 55 0c mov %edx,0xc(%ebp) 114cd6: 89 45 08 mov %eax,0x8(%ebp) } 114cd9: 83 c4 1c add $0x1c,%esp 114cdc: 5b pop %ebx 114cdd: 5e pop %esi 114cde: 5f pop %edi 114cdf: 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 ); 114ce0: e9 c7 1a 00 00 jmp 1167ac <_Thread_queue_Enqueue_with_handler> 0010beb4 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 10beb4: 55 push %ebp 10beb5: 89 e5 mov %esp,%ebp 10beb7: 57 push %edi 10beb8: 56 push %esi 10beb9: 53 push %ebx 10beba: 83 ec 0c sub $0xc,%esp 10bebd: 8b 5d 08 mov 0x8(%ebp),%ebx 10bec0: 8b 75 0c mov 0xc(%ebp),%esi CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 10bec3: 8b 45 10 mov 0x10(%ebp),%eax 10bec6: 39 43 4c cmp %eax,0x4c(%ebx) 10bec9: 72 51 jb 10bf1c <_CORE_message_queue_Submit+0x68> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 10becb: 8b 43 48 mov 0x48(%ebx),%eax 10bece: 85 c0 test %eax,%eax 10bed0: 74 5a je 10bf2c <_CORE_message_queue_Submit+0x78> /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < the_message_queue->maximum_pending_messages ) { 10bed2: 39 43 44 cmp %eax,0x44(%ebx) 10bed5: 77 0d ja 10bee4 <_CORE_message_queue_Submit+0x30> 10bed7: b8 02 00 00 00 mov $0x2,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10bedc: 8d 65 f4 lea -0xc(%ebp),%esp 10bedf: 5b pop %ebx 10bee0: 5e pop %esi 10bee1: 5f pop %edi 10bee2: c9 leave 10bee3: c3 ret RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 10bee4: 83 ec 0c sub $0xc,%esp 10bee7: 8d 43 60 lea 0x60(%ebx),%eax 10beea: 50 push %eax 10beeb: e8 a0 ff ff ff call 10be90 <_Chain_Get> 10bef0: 89 c2 mov %eax,%edx const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10bef2: 8d 40 0c lea 0xc(%eax),%eax 10bef5: 89 c7 mov %eax,%edi 10bef7: 8b 4d 10 mov 0x10(%ebp),%ecx 10befa: f3 a4 rep movsb %ds:(%esi),%es:(%edi) _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 10befc: 8b 4d 10 mov 0x10(%ebp),%ecx 10beff: 89 4a 08 mov %ecx,0x8(%edx) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 10bf02: 83 c4 0c add $0xc,%esp 10bf05: ff 75 1c pushl 0x1c(%ebp) 10bf08: 52 push %edx 10bf09: 53 push %ebx 10bf0a: e8 69 41 00 00 call 110078 <_CORE_message_queue_Insert_message> 10bf0f: 31 c0 xor %eax,%eax the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10bf11: 83 c4 10 add $0x10,%esp _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10bf14: 8d 65 f4 lea -0xc(%ebp),%esp 10bf17: 5b pop %ebx 10bf18: 5e pop %esi 10bf19: 5f pop %edi 10bf1a: c9 leave 10bf1b: c3 ret ) { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 10bf1c: b8 01 00 00 00 mov $0x1,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10bf21: 8d 65 f4 lea -0xc(%ebp),%esp 10bf24: 5b pop %ebx 10bf25: 5e pop %esi 10bf26: 5f pop %edi 10bf27: c9 leave 10bf28: c3 ret 10bf29: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 10bf2c: 83 ec 0c sub $0xc,%esp 10bf2f: 53 push %ebx 10bf30: e8 7b 18 00 00 call 10d7b0 <_Thread_queue_Dequeue> 10bf35: 89 c2 mov %eax,%edx if ( the_thread ) { 10bf37: 83 c4 10 add $0x10,%esp 10bf3a: 85 c0 test %eax,%eax 10bf3c: 74 1e je 10bf5c <_CORE_message_queue_Submit+0xa8> 10bf3e: 8b 40 2c mov 0x2c(%eax),%eax 10bf41: 89 c7 mov %eax,%edi 10bf43: 8b 4d 10 mov 0x10(%ebp),%ecx 10bf46: f3 a4 rep movsb %ds:(%esi),%es:(%edi) _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 10bf48: 8b 42 28 mov 0x28(%edx),%eax 10bf4b: 8b 4d 10 mov 0x10(%ebp),%ecx 10bf4e: 89 08 mov %ecx,(%eax) the_thread->Wait.count = (uint32_t) submit_type; 10bf50: 8b 45 1c mov 0x1c(%ebp),%eax 10bf53: 89 42 24 mov %eax,0x24(%edx) 10bf56: 31 c0 xor %eax,%eax #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10bf58: eb 82 jmp 10bedc <_CORE_message_queue_Submit+0x28> 10bf5a: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); if ( the_thread ) { 10bf5c: 8b 43 48 mov 0x48(%ebx),%eax 10bf5f: e9 6e ff ff ff jmp 10bed2 <_CORE_message_queue_Submit+0x1e> 0010bf70 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10bf70: 55 push %ebp 10bf71: 89 e5 mov %esp,%ebp 10bf73: 57 push %edi 10bf74: 56 push %esi 10bf75: 53 push %ebx 10bf76: 83 ec 0c sub $0xc,%esp 10bf79: 8b 45 08 mov 0x8(%ebp),%eax 10bf7c: 8b 5d 0c mov 0xc(%ebp),%ebx 10bf7f: 8b 55 10 mov 0x10(%ebp),%edx /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 10bf82: 8d 78 40 lea 0x40(%eax),%edi 10bf85: b9 04 00 00 00 mov $0x4,%ecx 10bf8a: 89 de mov %ebx,%esi 10bf8c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10bf8e: 89 50 50 mov %edx,0x50(%eax) the_mutex->blocked_count = 0; 10bf91: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10bf98: 85 d2 test %edx,%edx 10bf9a: 75 30 jne 10bfcc <_CORE_mutex_Initialize+0x5c> the_mutex->nest_count = 1; 10bf9c: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) the_mutex->holder = _Thread_Executing; 10bfa3: 8b 15 18 54 12 00 mov 0x125418,%edx 10bfa9: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = _Thread_Executing->Object.id; 10bfac: 8b 4a 08 mov 0x8(%edx),%ecx 10bfaf: 89 48 60 mov %ecx,0x60(%eax) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10bfb2: 8b 48 48 mov 0x48(%eax),%ecx if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10bfb5: 83 f9 02 cmp $0x2,%ecx 10bfb8: 74 05 je 10bfbf <_CORE_mutex_Initialize+0x4f> 10bfba: 83 f9 03 cmp $0x3,%ecx 10bfbd: 75 22 jne 10bfe1 <_CORE_mutex_Initialize+0x71> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 10bfbf: 8b 4a 14 mov 0x14(%edx),%ecx 10bfc2: 3b 48 4c cmp 0x4c(%eax),%ecx 10bfc5: 72 41 jb 10c008 <_CORE_mutex_Initialize+0x98> _Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = _Thread_Executing->current_priority; #endif _Thread_Executing->resource_count++; 10bfc7: ff 42 1c incl 0x1c(%edx) 10bfca: eb 15 jmp 10bfe1 <_CORE_mutex_Initialize+0x71> } } else { the_mutex->nest_count = 0; 10bfcc: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_mutex->holder = NULL; 10bfd3: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) the_mutex->holder_id = 0; 10bfda: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) } _Thread_queue_Initialize( 10bfe1: 6a 05 push $0x5 10bfe3: 68 00 04 00 00 push $0x400 10bfe8: 31 d2 xor %edx,%edx 10bfea: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10bfee: 0f 95 c2 setne %dl 10bff1: 52 push %edx 10bff2: 50 push %eax 10bff3: e8 34 1b 00 00 call 10db2c <_Thread_queue_Initialize> 10bff8: 31 c0 xor %eax,%eax THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 10bffa: 83 c4 10 add $0x10,%esp } 10bffd: 8d 65 f4 lea -0xc(%ebp),%esp 10c000: 5b pop %ebx 10c001: 5e pop %esi 10c002: 5f pop %edi 10c003: c9 leave 10c004: c3 ret 10c005: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 10c008: b8 06 00 00 00 mov $0x6,%eax STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c00d: 8d 65 f4 lea -0xc(%ebp),%esp 10c010: 5b pop %ebx 10c011: 5e pop %esi 10c012: 5f pop %edi 10c013: c9 leave 10c014: c3 ret 0010c068 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10c068: 55 push %ebp 10c069: 89 e5 mov %esp,%ebp 10c06b: 53 push %ebx 10c06c: 83 ec 14 sub $0x14,%esp 10c06f: 8b 5d 08 mov 0x8(%ebp),%ebx 10c072: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c075: a1 58 53 12 00 mov 0x125358,%eax 10c07a: 85 c0 test %eax,%eax 10c07c: 74 04 je 10c082 <_CORE_mutex_Seize+0x1a> 10c07e: 84 d2 test %dl,%dl 10c080: 75 36 jne 10c0b8 <_CORE_mutex_Seize+0x50> 10c082: 83 ec 08 sub $0x8,%esp 10c085: 8d 45 18 lea 0x18(%ebp),%eax 10c088: 50 push %eax 10c089: 53 push %ebx 10c08a: 88 55 f4 mov %dl,-0xc(%ebp) 10c08d: e8 2a 40 00 00 call 1100bc <_CORE_mutex_Seize_interrupt_trylock> 10c092: 83 c4 10 add $0x10,%esp 10c095: 85 c0 test %eax,%eax 10c097: 8a 55 f4 mov -0xc(%ebp),%dl 10c09a: 74 14 je 10c0b0 <_CORE_mutex_Seize+0x48> 10c09c: 84 d2 test %dl,%dl 10c09e: 75 30 jne 10c0d0 <_CORE_mutex_Seize+0x68> 10c0a0: ff 75 18 pushl 0x18(%ebp) 10c0a3: 9d popf 10c0a4: a1 18 54 12 00 mov 0x125418,%eax 10c0a9: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) } 10c0b0: 8b 5d fc mov -0x4(%ebp),%ebx 10c0b3: c9 leave 10c0b4: c3 ret 10c0b5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c0b8: 83 3d 20 55 12 00 01 cmpl $0x1,0x125520 10c0bf: 76 c1 jbe 10c082 <_CORE_mutex_Seize+0x1a> 10c0c1: 53 push %ebx 10c0c2: 6a 13 push $0x13 10c0c4: 6a 00 push $0x0 10c0c6: 6a 00 push $0x0 10c0c8: e8 9b 05 00 00 call 10c668 <_Internal_error_Occurred> 10c0cd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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; 10c0d0: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10c0d7: a1 18 54 12 00 mov 0x125418,%eax 10c0dc: 89 58 44 mov %ebx,0x44(%eax) 10c0df: 8b 55 0c mov 0xc(%ebp),%edx 10c0e2: 89 50 20 mov %edx,0x20(%eax) 10c0e5: a1 58 53 12 00 mov 0x125358,%eax 10c0ea: 40 inc %eax 10c0eb: a3 58 53 12 00 mov %eax,0x125358 10c0f0: ff 75 18 pushl 0x18(%ebp) 10c0f3: 9d popf 10c0f4: 83 ec 08 sub $0x8,%esp 10c0f7: ff 75 14 pushl 0x14(%ebp) 10c0fa: 53 push %ebx 10c0fb: e8 18 ff ff ff call 10c018 <_CORE_mutex_Seize_interrupt_blocking> 10c100: 83 c4 10 add $0x10,%esp } 10c103: 8b 5d fc mov -0x4(%ebp),%ebx 10c106: c9 leave 10c107: c3 ret 001100bc <_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 ) { 1100bc: 55 push %ebp 1100bd: 89 e5 mov %esp,%ebp 1100bf: 56 push %esi 1100c0: 53 push %ebx 1100c1: 8b 45 08 mov 0x8(%ebp),%eax 1100c4: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 1100c7: 8b 15 18 54 12 00 mov 0x125418,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 1100cd: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 1100d4: 8b 58 50 mov 0x50(%eax),%ebx 1100d7: 85 db test %ebx,%ebx 1100d9: 74 31 je 11010c <_CORE_mutex_Seize_interrupt_trylock+0x50> the_mutex->lock = CORE_MUTEX_LOCKED; 1100db: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 1100e2: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 1100e5: 8b 5a 08 mov 0x8(%edx),%ebx 1100e8: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 1100eb: 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; 1100f2: 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 ) || 1100f5: 83 fb 02 cmp $0x2,%ebx 1100f8: 74 26 je 110120 <_CORE_mutex_Seize_interrupt_trylock+0x64> 1100fa: 83 fb 03 cmp $0x3,%ebx 1100fd: 74 3d je 11013c <_CORE_mutex_Seize_interrupt_trylock+0x80> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 1100ff: ff 31 pushl (%ecx) 110101: 9d popf 110102: 31 c0 xor %eax,%eax return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 110104: 8d 65 f8 lea -0x8(%ebp),%esp 110107: 5b pop %ebx 110108: 5e pop %esi 110109: c9 leave 11010a: c3 ret 11010b: 90 nop <== NOT EXECUTED /* * 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 ) ) { 11010c: 3b 50 5c cmp 0x5c(%eax),%edx 11010f: 74 17 je 110128 <_CORE_mutex_Seize_interrupt_trylock+0x6c> the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; _ISR_Enable( *level_p ); 110111: b8 01 00 00 00 mov $0x1,%eax 110116: 8d 65 f8 lea -0x8(%ebp),%esp 110119: 5b pop %ebx 11011a: 5e pop %esi 11011b: c9 leave 11011c: c3 ret 11011d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 110120: ff 42 1c incl 0x1c(%edx) 110123: eb da jmp 1100ff <_CORE_mutex_Seize_interrupt_trylock+0x43> 110125: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 110128: 8b 58 40 mov 0x40(%eax),%ebx 11012b: 85 db test %ebx,%ebx 11012d: 75 45 jne 110174 <_CORE_mutex_Seize_interrupt_trylock+0xb8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 11012f: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 110132: ff 31 pushl (%ecx) 110134: 9d popf 110135: 31 c0 xor %eax,%eax 110137: eb dd jmp 110116 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 110139: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 11013c: 8b 5a 1c mov 0x1c(%edx),%ebx 11013f: 8d 73 01 lea 0x1(%ebx),%esi 110142: 89 72 1c mov %esi,0x1c(%edx) { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 110145: 8b 72 14 mov 0x14(%edx),%esi if ( current == ceiling ) { 110148: 39 70 4c cmp %esi,0x4c(%eax) 11014b: 74 6b je 1101b8 <_CORE_mutex_Seize_interrupt_trylock+0xfc> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 11014d: 72 39 jb 110188 <_CORE_mutex_Seize_interrupt_trylock+0xcc> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 11014f: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 110156: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 11015d: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 110164: 89 5a 1c mov %ebx,0x1c(%edx) _ISR_Enable( *level_p ); 110167: ff 31 pushl (%ecx) 110169: 9d popf 11016a: 31 c0 xor %eax,%eax 11016c: 8d 65 f8 lea -0x8(%ebp),%esp 11016f: 5b pop %ebx 110170: 5e pop %esi 110171: c9 leave 110172: c3 ret 110173: 90 nop <== NOT EXECUTED * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 110174: 4b dec %ebx 110175: 75 9a jne 110111 <_CORE_mutex_Seize_interrupt_trylock+0x55> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 110177: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) <== NOT EXECUTED _ISR_Enable( *level_p ); 11017e: ff 31 pushl (%ecx) <== NOT EXECUTED 110180: 9d popf <== NOT EXECUTED 110181: 31 c0 xor %eax,%eax <== NOT EXECUTED 110183: eb 91 jmp 110116 <_CORE_mutex_Seize_interrupt_trylock+0x5a> <== NOT EXECUTED 110185: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 110188: 8b 15 58 53 12 00 mov 0x125358,%edx 11018e: 42 inc %edx 11018f: 89 15 58 53 12 00 mov %edx,0x125358 return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 110195: ff 31 pushl (%ecx) 110197: 9d popf _Thread_Change_priority( 110198: 52 push %edx 110199: 6a 00 push $0x0 11019b: ff 70 4c pushl 0x4c(%eax) 11019e: ff 70 5c pushl 0x5c(%eax) 1101a1: e8 6a cd ff ff call 10cf10 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 1101a6: e8 4d d2 ff ff call 10d3f8 <_Thread_Enable_dispatch> 1101ab: 31 c0 xor %eax,%eax 1101ad: 83 c4 10 add $0x10,%esp 1101b0: e9 61 ff ff ff jmp 110116 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 1101b5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); 1101b8: ff 31 pushl (%ecx) 1101ba: 9d popf 1101bb: 31 c0 xor %eax,%eax 1101bd: e9 54 ff ff ff jmp 110116 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 0010c108 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 10c108: 55 push %ebp 10c109: 89 e5 mov %esp,%ebp 10c10b: 53 push %ebx 10c10c: 83 ec 04 sub $0x4,%esp 10c10f: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; Thread_Control *holder; #ifdef __RTEMS_STRICT_ORDER_MUTEX__ Chain_Node *first_node; #endif holder = the_mutex->holder; 10c112: 8b 43 5c mov 0x5c(%ebx),%eax * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 10c115: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10c119: 74 15 je 10c130 <_CORE_mutex_Surrender+0x28> if ( !_Thread_Is_executing( holder ) ) 10c11b: 3b 05 18 54 12 00 cmp 0x125418,%eax 10c121: 74 0d je 10c130 <_CORE_mutex_Surrender+0x28> 10c123: b8 03 00 00 00 mov $0x3,%eax } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c128: 8b 5d fc mov -0x4(%ebp),%ebx 10c12b: c9 leave 10c12c: c3 ret 10c12d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 10c130: 8b 53 54 mov 0x54(%ebx),%edx 10c133: 85 d2 test %edx,%edx 10c135: 74 65 je 10c19c <_CORE_mutex_Surrender+0x94> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10c137: 4a dec %edx 10c138: 89 53 54 mov %edx,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10c13b: 85 d2 test %edx,%edx 10c13d: 75 5d jne 10c19c <_CORE_mutex_Surrender+0x94> 10c13f: 8b 53 48 mov 0x48(%ebx),%edx /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c142: 83 fa 02 cmp $0x2,%edx 10c145: 0f 84 99 00 00 00 je 10c1e4 <_CORE_mutex_Surrender+0xdc> 10c14b: 83 fa 03 cmp $0x3,%edx 10c14e: 0f 84 90 00 00 00 je 10c1e4 <_CORE_mutex_Surrender+0xdc> } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 10c154: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10c15b: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c162: 83 fa 02 cmp $0x2,%edx 10c165: 74 5d je 10c1c4 <_CORE_mutex_Surrender+0xbc> 10c167: 83 fa 03 cmp $0x3,%edx 10c16a: 74 58 je 10c1c4 <_CORE_mutex_Surrender+0xbc> /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 10c16c: 83 ec 0c sub $0xc,%esp 10c16f: 53 push %ebx 10c170: e8 3b 16 00 00 call 10d7b0 <_Thread_queue_Dequeue> 10c175: 83 c4 10 add $0x10,%esp 10c178: 85 c0 test %eax,%eax 10c17a: 74 7c je 10c1f8 <_CORE_mutex_Surrender+0xf0> } else #endif { the_mutex->holder = the_thread; 10c17c: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10c17f: 8b 50 08 mov 0x8(%eax),%edx 10c182: 89 53 60 mov %edx,0x60(%ebx) the_mutex->nest_count = 1; 10c185: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10c18c: 8b 53 48 mov 0x48(%ebx),%edx 10c18f: 83 fa 02 cmp $0x2,%edx 10c192: 74 58 je 10c1ec <_CORE_mutex_Surrender+0xe4> 10c194: 83 fa 03 cmp $0x3,%edx 10c197: 74 0b je 10c1a4 <_CORE_mutex_Surrender+0x9c> 10c199: 8d 76 00 lea 0x0(%esi),%esi } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c19c: 31 c0 xor %eax,%eax return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c19e: 8b 5d fc mov -0x4(%ebp),%ebx 10c1a1: c9 leave 10c1a2: c3 ret 10c1a3: 90 nop <== NOT EXECUTED case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 10c1a4: ff 40 1c incl 0x1c(%eax) if (the_mutex->Attributes.priority_ceiling < 10c1a7: 8b 53 4c mov 0x4c(%ebx),%edx the_thread->current_priority){ 10c1aa: 3b 50 14 cmp 0x14(%eax),%edx 10c1ad: 73 ed jae 10c19c <_CORE_mutex_Surrender+0x94> _Thread_Change_priority( 10c1af: 51 push %ecx 10c1b0: 6a 00 push $0x0 10c1b2: 52 push %edx 10c1b3: 50 push %eax 10c1b4: e8 57 0d 00 00 call 10cf10 <_Thread_Change_priority> 10c1b9: 31 c0 xor %eax,%eax 10c1bb: 83 c4 10 add $0x10,%esp 10c1be: e9 65 ff ff ff jmp 10c128 <_CORE_mutex_Surrender+0x20> 10c1c3: 90 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,true); #endif if ( holder->resource_count == 0 && 10c1c4: 8b 50 1c mov 0x1c(%eax),%edx 10c1c7: 85 d2 test %edx,%edx 10c1c9: 75 a1 jne 10c16c <_CORE_mutex_Surrender+0x64> holder->real_priority != holder->current_priority ) { 10c1cb: 8b 50 18 mov 0x18(%eax),%edx 10c1ce: 3b 50 14 cmp 0x14(%eax),%edx 10c1d1: 74 99 je 10c16c <_CORE_mutex_Surrender+0x64> _Thread_Change_priority( holder, holder->real_priority, true ); 10c1d3: 51 push %ecx 10c1d4: 6a 01 push $0x1 10c1d6: 52 push %edx 10c1d7: 50 push %eax 10c1d8: e8 33 0d 00 00 call 10cf10 <_Thread_Change_priority> 10c1dd: 83 c4 10 add $0x10,%esp 10c1e0: eb 8a jmp 10c16c <_CORE_mutex_Surrender+0x64> 10c1e2: 66 90 xchg %ax,%ax <== NOT EXECUTED the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 10c1e4: ff 48 1c decl 0x1c(%eax) 10c1e7: e9 68 ff ff ff jmp 10c154 <_CORE_mutex_Surrender+0x4c> case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 10c1ec: ff 40 1c incl 0x1c(%eax) 10c1ef: 31 c0 xor %eax,%eax break; 10c1f1: e9 32 ff ff ff jmp 10c128 <_CORE_mutex_Surrender+0x20> 10c1f6: 66 90 xchg %ax,%ax <== NOT EXECUTED } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c1f8: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) 10c1ff: 31 c0 xor %eax,%eax 10c201: e9 22 ff ff ff jmp 10c128 <_CORE_mutex_Surrender+0x20> 0010c254 <_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 ) { 10c254: 55 push %ebp 10c255: 89 e5 mov %esp,%ebp 10c257: 53 push %ebx 10c258: 83 ec 10 sub $0x10,%esp 10c25b: 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)) ) { 10c25e: 53 push %ebx 10c25f: e8 4c 15 00 00 call 10d7b0 <_Thread_queue_Dequeue> 10c264: 83 c4 10 add $0x10,%esp 10c267: 85 c0 test %eax,%eax 10c269: 74 09 je 10c274 <_CORE_semaphore_Surrender+0x20> 10c26b: 31 c0 xor %eax,%eax status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 10c26d: 8b 5d fc mov -0x4(%ebp),%ebx 10c270: c9 leave 10c271: c3 ret 10c272: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 10c274: 9c pushf 10c275: fa cli 10c276: 5a pop %edx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10c277: 8b 43 48 mov 0x48(%ebx),%eax 10c27a: 3b 43 40 cmp 0x40(%ebx),%eax 10c27d: 72 0d jb 10c28c <_CORE_semaphore_Surrender+0x38> 10c27f: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10c284: 52 push %edx 10c285: 9d popf } return status; } 10c286: 8b 5d fc mov -0x4(%ebp),%ebx 10c289: c9 leave 10c28a: c3 ret 10c28b: 90 nop <== NOT EXECUTED #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 10c28c: 40 inc %eax 10c28d: 89 43 48 mov %eax,0x48(%ebx) 10c290: 31 c0 xor %eax,%eax 10c292: eb f0 jmp 10c284 <_CORE_semaphore_Surrender+0x30> 0010be90 <_Chain_Get>: */ Chain_Node *_Chain_Get( Chain_Control *the_chain ) { 10be90: 55 push %ebp 10be91: 89 e5 mov %esp,%ebp 10be93: 53 push %ebx 10be94: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 10be97: 9c pushf 10be98: fa cli 10be99: 5b pop %ebx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10be9a: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10be9c: 8d 4a 04 lea 0x4(%edx),%ecx 10be9f: 39 c8 cmp %ecx,%eax 10bea1: 74 0d je 10beb0 <_Chain_Get+0x20> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 10bea3: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 10bea5: 89 0a mov %ecx,(%edx) new_first->previous = _Chain_Head(the_chain); 10bea7: 89 51 04 mov %edx,0x4(%ecx) if ( !_Chain_Is_empty( the_chain ) ) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level ); 10beaa: 53 push %ebx 10beab: 9d popf return return_node; } 10beac: 5b pop %ebx 10bead: c9 leave 10beae: c3 ret 10beaf: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10beb0: 31 c0 xor %eax,%eax 10beb2: eb f6 jmp 10beaa <_Chain_Get+0x1a> 00110038 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 110038: 55 push %ebp 110039: 89 e5 mov %esp,%ebp 11003b: 57 push %edi 11003c: 56 push %esi 11003d: 53 push %ebx 11003e: 8b 7d 08 mov 0x8(%ebp),%edi 110041: 8b 4d 10 mov 0x10(%ebp),%ecx 110044: 8b 75 14 mov 0x14(%ebp),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 110047: 89 fa mov %edi,%edx Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 110049: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) next = starting_address; while ( count-- ) { 110050: 85 c9 test %ecx,%ecx 110052: 74 17 je 11006b <_Chain_Initialize+0x33> Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 110054: 8b 45 0c mov 0xc(%ebp),%eax 110057: eb 05 jmp 11005e <_Chain_Initialize+0x26> 110059: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED while ( count-- ) { 11005c: 89 d8 mov %ebx,%eax current->next = next; 11005e: 89 02 mov %eax,(%edx) next->previous = current; 110060: 89 50 04 mov %edx,0x4(%eax) 110063: 8d 1c 30 lea (%eax,%esi,1),%ebx current = next; next = (Chain_Node *) 110066: 89 c2 mov %eax,%edx count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 110068: 49 dec %ecx 110069: 75 f1 jne 11005c <_Chain_Initialize+0x24> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 11006b: 8d 47 04 lea 0x4(%edi),%eax 11006e: 89 02 mov %eax,(%edx) the_chain->last = current; 110070: 89 57 08 mov %edx,0x8(%edi) } 110073: 5b pop %ebx 110074: 5e pop %esi 110075: 5f pop %edi 110076: c9 leave 110077: c3 ret 0010af64 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10af64: 55 push %ebp 10af65: 89 e5 mov %esp,%ebp 10af67: 57 push %edi 10af68: 56 push %esi 10af69: 53 push %ebx 10af6a: 83 ec 2c sub $0x2c,%esp 10af6d: 8b 45 08 mov 0x8(%ebp),%eax 10af70: 8b 4d 0c mov 0xc(%ebp),%ecx 10af73: 8b 55 10 mov 0x10(%ebp),%edx 10af76: 89 55 dc mov %edx,-0x24(%ebp) 10af79: 8b 7d 14 mov 0x14(%ebp),%edi rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 10af7c: 8b 1d 18 54 12 00 mov 0x125418,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10af82: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10af89: 8b b3 f0 00 00 00 mov 0xf0(%ebx),%esi _ISR_Disable( level ); 10af8f: 9c pushf 10af90: fa cli 10af91: 8f 45 e0 popl -0x20(%ebp) pending_events = api->pending_events; 10af94: 8b 16 mov (%esi),%edx 10af96: 89 55 d4 mov %edx,-0x2c(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10af99: 21 c2 and %eax,%edx 10af9b: 89 55 e4 mov %edx,-0x1c(%ebp) 10af9e: 74 0d je 10afad <_Event_Seize+0x49> 10afa0: 39 d0 cmp %edx,%eax 10afa2: 0f 84 84 00 00 00 je 10b02c <_Event_Seize+0xc8> 10afa8: f6 c1 02 test $0x2,%cl 10afab: 75 7f jne 10b02c <_Event_Seize+0xc8> _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10afad: f6 c1 01 test $0x1,%cl 10afb0: 75 62 jne 10b014 <_Event_Seize+0xb0> * 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; 10afb2: 89 4b 30 mov %ecx,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10afb5: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10afb8: 89 7b 28 mov %edi,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10afbb: c7 05 0c 56 12 00 01 movl $0x1,0x12560c 10afc2: 00 00 00 _ISR_Enable( level ); 10afc5: ff 75 e0 pushl -0x20(%ebp) 10afc8: 9d popf if ( ticks ) { 10afc9: 8b 45 dc mov -0x24(%ebp),%eax 10afcc: 85 c0 test %eax,%eax 10afce: 0f 85 80 00 00 00 jne 10b054 <_Event_Seize+0xf0> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10afd4: 83 ec 08 sub $0x8,%esp 10afd7: 68 00 01 00 00 push $0x100 10afdc: 53 push %ebx 10afdd: e8 9e 2c 00 00 call 10dc80 <_Thread_Set_state> _ISR_Disable( level ); 10afe2: 9c pushf 10afe3: fa cli 10afe4: 5a pop %edx sync_state = _Event_Sync_state; 10afe5: a1 0c 56 12 00 mov 0x12560c,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10afea: c7 05 0c 56 12 00 00 movl $0x0,0x12560c 10aff1: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10aff4: 83 c4 10 add $0x10,%esp 10aff7: 83 f8 01 cmp $0x1,%eax 10affa: 74 4c je 10b048 <_Event_Seize+0xe4> * 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 ); 10affc: 89 55 10 mov %edx,0x10(%ebp) 10afff: 89 5d 0c mov %ebx,0xc(%ebp) 10b002: 89 45 08 mov %eax,0x8(%ebp) } 10b005: 8d 65 f4 lea -0xc(%ebp),%esp 10b008: 5b pop %ebx 10b009: 5e pop %esi 10b00a: 5f pop %edi 10b00b: 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 ); 10b00c: e9 b3 1e 00 00 jmp 10cec4 <_Thread_blocking_operation_Cancel> 10b011: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 10b014: ff 75 e0 pushl -0x20(%ebp) 10b017: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10b018: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10b01f: 8b 55 e4 mov -0x1c(%ebp),%edx 10b022: 89 17 mov %edx,(%edi) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 10b024: 8d 65 f4 lea -0xc(%ebp),%esp 10b027: 5b pop %ebx 10b028: 5e pop %esi 10b029: 5f pop %edi 10b02a: c9 leave 10b02b: c3 ret pending_events = api->pending_events; seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 10b02c: 8b 45 e4 mov -0x1c(%ebp),%eax 10b02f: f7 d0 not %eax 10b031: 23 45 d4 and -0x2c(%ebp),%eax 10b034: 89 06 mov %eax,(%esi) _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 10b036: ff 75 e0 pushl -0x20(%ebp) 10b039: 9d popf *event_out = seized_events; 10b03a: 8b 45 e4 mov -0x1c(%ebp),%eax 10b03d: 89 07 mov %eax,(%edi) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 10b03f: 8d 65 f4 lea -0xc(%ebp),%esp 10b042: 5b pop %ebx 10b043: 5e pop %esi 10b044: 5f pop %edi 10b045: c9 leave 10b046: c3 ret 10b047: 90 nop <== NOT EXECUTED _ISR_Disable( level ); sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { _ISR_Enable( level ); 10b048: 52 push %edx 10b049: 9d popf * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 10b04a: 8d 65 f4 lea -0xc(%ebp),%esp 10b04d: 5b pop %ebx 10b04e: 5e pop %esi 10b04f: 5f pop %edi 10b050: c9 leave 10b051: c3 ret 10b052: 66 90 xchg %ax,%ax <== NOT EXECUTED _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 10b054: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b057: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10b05e: c7 43 64 08 b2 10 00 movl $0x10b208,0x64(%ebx) the_watchdog->id = id; 10b065: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10b068: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b06f: 8b 45 dc mov -0x24(%ebp),%eax 10b072: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b075: 83 ec 08 sub $0x8,%esp 10b078: 8d 43 48 lea 0x48(%ebx),%eax 10b07b: 50 push %eax 10b07c: 68 38 54 12 00 push $0x125438 10b081: e8 4a 32 00 00 call 10e2d0 <_Watchdog_Insert> 10b086: 83 c4 10 add $0x10,%esp 10b089: e9 46 ff ff ff jmp 10afd4 <_Event_Seize+0x70> 0010b0e4 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10b0e4: 55 push %ebp 10b0e5: 89 e5 mov %esp,%ebp 10b0e7: 57 push %edi 10b0e8: 56 push %esi 10b0e9: 53 push %ebx 10b0ea: 83 ec 1c sub $0x1c,%esp 10b0ed: 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 ]; 10b0f0: 8b 8b f0 00 00 00 mov 0xf0(%ebx),%ecx option_set = (rtems_option) the_thread->Wait.option; 10b0f6: 8b 73 30 mov 0x30(%ebx),%esi _ISR_Disable( level ); 10b0f9: 9c pushf 10b0fa: fa cli 10b0fb: 8f 45 e4 popl -0x1c(%ebp) pending_events = api->pending_events; 10b0fe: 8b 11 mov (%ecx),%edx event_condition = (rtems_event_set) the_thread->Wait.count; 10b100: 8b 43 24 mov 0x24(%ebx),%eax seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 10b103: 89 c7 mov %eax,%edi 10b105: 21 d7 and %edx,%edi 10b107: 89 7d e0 mov %edi,-0x20(%ebp) 10b10a: 74 74 je 10b180 <_Event_Surrender+0x9c> /* * 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() && 10b10c: 8b 3d f4 53 12 00 mov 0x1253f4,%edi 10b112: 85 ff test %edi,%edi 10b114: 74 0c je 10b122 <_Event_Surrender+0x3e> 10b116: 3b 1d 18 54 12 00 cmp 0x125418,%ebx 10b11c: 0f 84 96 00 00 00 je 10b1b8 <_Event_Surrender+0xd4> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10b122: f6 43 11 01 testb $0x1,0x11(%ebx) 10b126: 74 4c je 10b174 <_Event_Surrender+0x90> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 10b128: 3b 45 e0 cmp -0x20(%ebp),%eax 10b12b: 74 05 je 10b132 <_Event_Surrender+0x4e> 10b12d: 83 e6 02 and $0x2,%esi 10b130: 74 42 je 10b174 <_Event_Surrender+0x90> api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 10b132: 8b 45 e0 mov -0x20(%ebp),%eax 10b135: f7 d0 not %eax 10b137: 21 d0 and %edx,%eax 10b139: 89 01 mov %eax,(%ecx) the_thread->Wait.count = 0; 10b13b: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b142: 8b 43 28 mov 0x28(%ebx),%eax 10b145: 8b 7d e0 mov -0x20(%ebp),%edi 10b148: 89 38 mov %edi,(%eax) _ISR_Flash( level ); 10b14a: ff 75 e4 pushl -0x1c(%ebp) 10b14d: 9d popf 10b14e: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10b14f: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b153: 74 37 je 10b18c <_Event_Surrender+0xa8> _ISR_Enable( level ); 10b155: ff 75 e4 pushl -0x1c(%ebp) 10b158: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b159: 83 ec 08 sub $0x8,%esp 10b15c: 68 f8 ff 03 10 push $0x1003fff8 10b161: 53 push %ebx 10b162: e8 e9 1e 00 00 call 10d050 <_Thread_Clear_state> 10b167: 83 c4 10 add $0x10,%esp } return; } } _ISR_Enable( level ); } 10b16a: 8d 65 f4 lea -0xc(%ebp),%esp 10b16d: 5b pop %ebx 10b16e: 5e pop %esi 10b16f: 5f pop %edi 10b170: c9 leave 10b171: c3 ret 10b172: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10b174: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 10b177: 9d popf <== NOT EXECUTED } 10b178: 8d 65 f4 lea -0xc(%ebp),%esp 10b17b: 5b pop %ebx 10b17c: 5e pop %esi 10b17d: 5f pop %edi 10b17e: c9 leave 10b17f: c3 ret /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 10b180: ff 75 e4 pushl -0x1c(%ebp) 10b183: 9d popf } return; } } _ISR_Enable( level ); } 10b184: 8d 65 f4 lea -0xc(%ebp),%esp 10b187: 5b pop %ebx 10b188: 5e pop %esi 10b189: 5f pop %edi 10b18a: c9 leave 10b18b: c3 ret RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10b18c: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10b193: ff 75 e4 pushl -0x1c(%ebp) 10b196: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10b197: 83 ec 0c sub $0xc,%esp 10b19a: 8d 43 48 lea 0x48(%ebx),%eax 10b19d: 50 push %eax 10b19e: e8 65 32 00 00 call 10e408 <_Watchdog_Remove> 10b1a3: 58 pop %eax 10b1a4: 5a pop %edx 10b1a5: 68 f8 ff 03 10 push $0x1003fff8 10b1aa: 53 push %ebx 10b1ab: e8 a0 1e 00 00 call 10d050 <_Thread_Clear_state> 10b1b0: 83 c4 10 add $0x10,%esp 10b1b3: eb c3 jmp 10b178 <_Event_Surrender+0x94> 10b1b5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 10b1b8: 8b 3d 0c 56 12 00 mov 0x12560c,%edi /* * 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() && 10b1be: 83 ff 02 cmp $0x2,%edi 10b1c1: 74 0d je 10b1d0 <_Event_Surrender+0xec> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 10b1c3: 8b 3d 0c 56 12 00 mov 0x12560c,%edi /* * 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() && 10b1c9: 4f dec %edi 10b1ca: 0f 85 52 ff ff ff jne 10b122 <_Event_Surrender+0x3e> _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) ) { 10b1d0: 3b 45 e0 cmp -0x20(%ebp),%eax 10b1d3: 74 05 je 10b1da <_Event_Surrender+0xf6> 10b1d5: 83 e6 02 and $0x2,%esi 10b1d8: 74 22 je 10b1fc <_Event_Surrender+0x118> api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 10b1da: 8b 45 e0 mov -0x20(%ebp),%eax 10b1dd: f7 d0 not %eax 10b1df: 21 d0 and %edx,%eax 10b1e1: 89 01 mov %eax,(%ecx) the_thread->Wait.count = 0; 10b1e3: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b1ea: 8b 43 28 mov 0x28(%ebx),%eax 10b1ed: 8b 55 e0 mov -0x20(%ebp),%edx 10b1f0: 89 10 mov %edx,(%eax) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10b1f2: c7 05 0c 56 12 00 03 movl $0x3,0x12560c 10b1f9: 00 00 00 } _ISR_Enable( level ); 10b1fc: ff 75 e4 pushl -0x1c(%ebp) 10b1ff: 9d popf return; 10b200: e9 73 ff ff ff jmp 10b178 <_Event_Surrender+0x94> 0010b208 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10b208: 55 push %ebp 10b209: 89 e5 mov %esp,%ebp 10b20b: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10b20e: 8d 45 f4 lea -0xc(%ebp),%eax 10b211: 50 push %eax 10b212: ff 75 08 pushl 0x8(%ebp) 10b215: e8 02 22 00 00 call 10d41c <_Thread_Get> switch ( location ) { 10b21a: 83 c4 10 add $0x10,%esp 10b21d: 8b 55 f4 mov -0xc(%ebp),%edx 10b220: 85 d2 test %edx,%edx 10b222: 75 37 jne 10b25b <_Event_Timeout+0x53> * * 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 ); 10b224: 9c pushf 10b225: fa cli 10b226: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10b227: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10b22e: 3b 05 18 54 12 00 cmp 0x125418,%eax 10b234: 74 2a je 10b260 <_Event_Timeout+0x58> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 10b236: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10b23d: 52 push %edx 10b23e: 9d popf 10b23f: 83 ec 08 sub $0x8,%esp 10b242: 68 f8 ff 03 10 push $0x1003fff8 10b247: 50 push %eax 10b248: e8 03 1e 00 00 call 10d050 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b24d: a1 58 53 12 00 mov 0x125358,%eax 10b252: 48 dec %eax 10b253: a3 58 53 12 00 mov %eax,0x125358 10b258: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b25b: c9 leave 10b25c: c3 ret 10b25d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10b260: 8b 0d 0c 56 12 00 mov 0x12560c,%ecx 10b266: 49 dec %ecx 10b267: 75 cd jne 10b236 <_Event_Timeout+0x2e> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10b269: c7 05 0c 56 12 00 02 movl $0x2,0x12560c 10b270: 00 00 00 10b273: eb c1 jmp 10b236 <_Event_Timeout+0x2e> 00110274 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 110274: 55 push %ebp 110275: 89 e5 mov %esp,%ebp 110277: 57 push %edi 110278: 56 push %esi 110279: 53 push %ebx 11027a: 83 ec 2c sub $0x2c,%esp 11027d: 8b 7d 0c mov 0xc(%ebp),%edi return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 110280: 8b 45 08 mov 0x8(%ebp),%eax 110283: 8b 48 08 mov 0x8(%eax),%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; 110286: 8b 50 10 mov 0x10(%eax),%edx 110289: 89 55 d4 mov %edx,-0x2c(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 11028c: 89 f8 mov %edi,%eax 11028e: 83 c0 04 add $0x4,%eax 110291: 89 45 e0 mov %eax,-0x20(%ebp) 110294: 0f 82 5a 01 00 00 jb 1103f4 <_Heap_Allocate_aligned_with_boundary+0x180> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 11029a: 8b 75 14 mov 0x14(%ebp),%esi 11029d: 85 f6 test %esi,%esi 11029f: 0f 85 48 01 00 00 jne 1103ed <_Heap_Allocate_aligned_with_boundary+0x179> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 1102a5: 39 4d 08 cmp %ecx,0x8(%ebp) 1102a8: 0f 84 50 01 00 00 je 1103fe <_Heap_Allocate_aligned_with_boundary+0x18a> 1102ae: 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; 1102b5: 8b 55 d4 mov -0x2c(%ebp),%edx 1102b8: 83 c2 07 add $0x7,%edx 1102bb: 89 55 c8 mov %edx,-0x38(%ebp) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 1102be: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp) 1102c5: 29 7d d8 sub %edi,-0x28(%ebp) 1102c8: eb 19 jmp 1102e3 <_Heap_Allocate_aligned_with_boundary+0x6f> 1102ca: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 1102cc: 8d 59 08 lea 0x8(%ecx),%ebx boundary ); } } if ( alloc_begin != 0 ) { 1102cf: 85 db test %ebx,%ebx 1102d1: 0f 85 e9 00 00 00 jne 1103c0 <_Heap_Allocate_aligned_with_boundary+0x14c> break; } block = block->next; 1102d7: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 1102da: 39 4d 08 cmp %ecx,0x8(%ebp) 1102dd: 0f 84 25 01 00 00 je 110408 <_Heap_Allocate_aligned_with_boundary+0x194> _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 1102e3: 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 ) { 1102e6: 8b 59 04 mov 0x4(%ecx),%ebx 1102e9: 39 5d e0 cmp %ebx,-0x20(%ebp) 1102ec: 73 e9 jae 1102d7 <_Heap_Allocate_aligned_with_boundary+0x63> if ( alignment == 0 ) { 1102ee: 8b 55 10 mov 0x10(%ebp),%edx 1102f1: 85 d2 test %edx,%edx 1102f3: 74 d7 je 1102cc <_Heap_Allocate_aligned_with_boundary+0x58> uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 1102f5: 8b 45 08 mov 0x8(%ebp),%eax 1102f8: 8b 40 14 mov 0x14(%eax),%eax 1102fb: 89 45 d0 mov %eax,-0x30(%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; 1102fe: 83 e3 fe and $0xfffffffe,%ebx 110301: 8d 1c 19 lea (%ecx,%ebx,1),%ebx 110304: 8d 51 08 lea 0x8(%ecx),%edx 110307: 89 55 cc mov %edx,-0x34(%ebp) 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; 11030a: 8b 75 c8 mov -0x38(%ebp),%esi 11030d: 29 c6 sub %eax,%esi 11030f: 01 de add %ebx,%esi uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 110311: 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); 110314: 89 d8 mov %ebx,%eax 110316: 31 d2 xor %edx,%edx 110318: f7 75 10 divl 0x10(%ebp) 11031b: 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 ) { 11031d: 39 de cmp %ebx,%esi 11031f: 73 0b jae 11032c <_Heap_Allocate_aligned_with_boundary+0xb8> 110321: 89 f0 mov %esi,%eax 110323: 31 d2 xor %edx,%edx 110325: f7 75 10 divl 0x10(%ebp) 110328: 89 f3 mov %esi,%ebx 11032a: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 11032c: 8b 45 14 mov 0x14(%ebp),%eax 11032f: 85 c0 test %eax,%eax 110331: 74 59 je 11038c <_Heap_Allocate_aligned_with_boundary+0x118> /* 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; 110333: 8d 34 3b lea (%ebx,%edi,1),%esi 110336: 89 f0 mov %esi,%eax 110338: 31 d2 xor %edx,%edx 11033a: f7 75 14 divl 0x14(%ebp) 11033d: 89 f0 mov %esi,%eax 11033f: 29 d0 sub %edx,%eax 110341: 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 ) { 110343: 39 c3 cmp %eax,%ebx 110345: 73 45 jae 11038c <_Heap_Allocate_aligned_with_boundary+0x118> 110347: 39 c6 cmp %eax,%esi 110349: 76 41 jbe 11038c <_Heap_Allocate_aligned_with_boundary+0x118> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 11034b: 8b 45 cc mov -0x34(%ebp),%eax 11034e: 01 f8 add %edi,%eax 110350: 89 45 dc mov %eax,-0x24(%ebp) uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 110353: 39 d0 cmp %edx,%eax 110355: 77 80 ja 1102d7 <_Heap_Allocate_aligned_with_boundary+0x63> 110357: 89 ce mov %ecx,%esi 110359: eb 0e jmp 110369 <_Heap_Allocate_aligned_with_boundary+0xf5> 11035b: 90 nop <== NOT EXECUTED /* 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 ) { 11035c: 39 c1 cmp %eax,%ecx 11035e: 76 2a jbe 11038a <_Heap_Allocate_aligned_with_boundary+0x116> if ( boundary_line < boundary_floor ) { 110360: 39 55 dc cmp %edx,-0x24(%ebp) 110363: 0f 87 a3 00 00 00 ja 11040c <_Heap_Allocate_aligned_with_boundary+0x198> return 0; } alloc_begin = boundary_line - alloc_size; 110369: 89 d3 mov %edx,%ebx 11036b: 29 fb sub %edi,%ebx 11036d: 89 d8 mov %ebx,%eax 11036f: 31 d2 xor %edx,%edx 110371: f7 75 10 divl 0x10(%ebp) 110374: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 110376: 8d 0c 3b lea (%ebx,%edi,1),%ecx 110379: 89 c8 mov %ecx,%eax 11037b: 31 d2 xor %edx,%edx 11037d: f7 75 14 divl 0x14(%ebp) 110380: 89 c8 mov %ecx,%eax 110382: 29 d0 sub %edx,%eax 110384: 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 ) { 110386: 39 c3 cmp %eax,%ebx 110388: 72 d2 jb 11035c <_Heap_Allocate_aligned_with_boundary+0xe8> 11038a: 89 f1 mov %esi,%ecx 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 ) { 11038c: 39 5d cc cmp %ebx,-0x34(%ebp) 11038f: 0f 87 42 ff ff ff ja 1102d7 <_Heap_Allocate_aligned_with_boundary+0x63> 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; 110395: be f8 ff ff ff mov $0xfffffff8,%esi 11039a: 29 ce sub %ecx,%esi 11039c: 01 de add %ebx,%esi 11039e: 89 d8 mov %ebx,%eax 1103a0: 31 d2 xor %edx,%edx 1103a2: f7 75 d4 divl -0x2c(%ebp) 1103a5: 29 d6 sub %edx,%esi if ( free_size >= min_block_size || free_size == 0 ) { 1103a7: 39 75 d0 cmp %esi,-0x30(%ebp) 1103aa: 0f 86 1f ff ff ff jbe 1102cf <_Heap_Allocate_aligned_with_boundary+0x5b> 1103b0: 85 f6 test %esi,%esi 1103b2: 0f 85 1f ff ff ff jne 1102d7 <_Heap_Allocate_aligned_with_boundary+0x63> boundary ); } } if ( alloc_begin != 0 ) { 1103b8: 85 db test %ebx,%ebx 1103ba: 0f 84 17 ff ff ff je 1102d7 <_Heap_Allocate_aligned_with_boundary+0x63> block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 1103c0: 8b 55 e4 mov -0x1c(%ebp),%edx 1103c3: 8b 45 08 mov 0x8(%ebp),%eax 1103c6: 01 50 4c add %edx,0x4c(%eax) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 1103c9: 57 push %edi 1103ca: 53 push %ebx 1103cb: 51 push %ecx 1103cc: 50 push %eax 1103cd: e8 a6 c1 ff ff call 10c578 <_Heap_Block_allocate> 1103d2: 89 d8 mov %ebx,%eax 1103d4: 83 c4 10 add $0x10,%esp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 1103d7: 8b 4d e4 mov -0x1c(%ebp),%ecx 1103da: 8b 55 08 mov 0x8(%ebp),%edx 1103dd: 39 4a 44 cmp %ecx,0x44(%edx) 1103e0: 73 14 jae 1103f6 <_Heap_Allocate_aligned_with_boundary+0x182> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 1103e2: 89 4a 44 mov %ecx,0x44(%edx) } return (void *) alloc_begin; } 1103e5: 8d 65 f4 lea -0xc(%ebp),%esp 1103e8: 5b pop %ebx 1103e9: 5e pop %esi 1103ea: 5f pop %edi 1103eb: c9 leave 1103ec: c3 ret /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 1103ed: 3b 7d 14 cmp 0x14(%ebp),%edi 1103f0: 76 21 jbe 110413 <_Heap_Allocate_aligned_with_boundary+0x19f> 1103f2: 66 90 xchg %ax,%ax ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 1103f4: 31 c0 xor %eax,%eax } return (void *) alloc_begin; } 1103f6: 8d 65 f4 lea -0xc(%ebp),%esp 1103f9: 5b pop %ebx 1103fa: 5e pop %esi 1103fb: 5f pop %edi 1103fc: c9 leave 1103fd: c3 ret if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 1103fe: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 110405: 8d 76 00 lea 0x0(%esi),%esi 110408: 31 c0 xor %eax,%eax 11040a: eb cb jmp 1103d7 <_Heap_Allocate_aligned_with_boundary+0x163> 11040c: 89 f1 mov %esi,%ecx <== NOT EXECUTED 11040e: e9 c4 fe ff ff jmp 1102d7 <_Heap_Allocate_aligned_with_boundary+0x63> <== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 110413: 8b 5d 10 mov 0x10(%ebp),%ebx 110416: 85 db test %ebx,%ebx 110418: 0f 85 87 fe ff ff jne 1102a5 <_Heap_Allocate_aligned_with_boundary+0x31> 11041e: 89 55 10 mov %edx,0x10(%ebp) 110421: e9 7f fe ff ff jmp 1102a5 <_Heap_Allocate_aligned_with_boundary+0x31> 0010c578 <_Heap_Block_allocate>: Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 10c578: 55 push %ebp 10c579: 89 e5 mov %esp,%ebp 10c57b: 57 push %edi 10c57c: 56 push %esi 10c57d: 53 push %ebx 10c57e: 83 ec 10 sub $0x10,%esp 10c581: 8b 75 08 mov 0x8(%ebp),%esi 10c584: 8b 5d 0c mov 0xc(%ebp),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10c587: 89 5d ec mov %ebx,-0x14(%ebp) 10c58a: 8b 7d 10 mov 0x10(%ebp),%edi 10c58d: 83 ef 08 sub $0x8,%edi Heap_Statistics *const stats = &heap->stats; uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin; 10c590: 89 f8 mov %edi,%eax 10c592: 29 d8 sub %ebx,%eax Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 10c594: 8b 53 04 mov 0x4(%ebx),%edx 10c597: 83 e2 fe and $0xfffffffe,%edx 10c59a: f6 44 13 04 01 testb $0x1,0x4(%ebx,%edx,1) 10c59f: 0f 85 8b 00 00 00 jne 10c630 <_Heap_Block_allocate+0xb8> free_list_anchor = block->prev; 10c5a5: 8b 4b 0c mov 0xc(%ebx),%ecx return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 10c5a8: 8b 53 08 mov 0x8(%ebx),%edx Heap_Block *prev = block->prev; prev->next = next; 10c5ab: 89 51 08 mov %edx,0x8(%ecx) next->prev = prev; 10c5ae: 89 4a 0c mov %ecx,0xc(%edx) _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 10c5b1: ff 4e 38 decl 0x38(%esi) ++stats->used_blocks; 10c5b4: ff 46 40 incl 0x40(%esi) stats->free_size -= _Heap_Block_size( block ); 10c5b7: 8b 53 04 mov 0x4(%ebx),%edx 10c5ba: 83 e2 fe and $0xfffffffe,%edx 10c5bd: 29 56 30 sub %edx,0x30(%esi) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 10c5c0: 8b 56 10 mov 0x10(%esi),%edx 10c5c3: 89 55 e4 mov %edx,-0x1c(%ebp) 10c5c6: 39 d0 cmp %edx,%eax 10c5c8: 72 72 jb 10c63c <_Heap_Block_allocate+0xc4> - 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; 10c5ca: 8b 43 04 mov 0x4(%ebx),%eax 10c5cd: 89 45 f0 mov %eax,-0x10(%ebp) 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 ) 10c5d0: 8b 45 10 mov 0x10(%ebp),%eax 10c5d3: 31 d2 xor %edx,%edx 10c5d5: f7 75 e4 divl -0x1c(%ebp) 10c5d8: 29 d7 sub %edx,%edi _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); uintptr_t const new_block_begin = (uintptr_t) new_block; uintptr_t const new_block_size = block_end - new_block_begin; block_end = new_block_begin; block_size = block_end - block_begin; 10c5da: 89 f8 mov %edi,%eax 10c5dc: 29 d8 sub %ebx,%eax _HAssert( block_size >= heap->min_block_size ); _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; 10c5de: 01 46 30 add %eax,0x30(%esi) if ( _Heap_Is_prev_used( block ) ) { 10c5e1: f6 43 04 01 testb $0x1,0x4(%ebx) 10c5e5: 75 69 jne 10c650 <_Heap_Block_allocate+0xd8> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); 10c5e7: 2b 1b sub (%ebx),%ebx Heap_Block *const prev_block = _Heap_Prev_block( block ); uintptr_t const prev_block_size = _Heap_Block_size( prev_block ); block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; 10c5e9: 8b 53 04 mov 0x4(%ebx),%edx 10c5ec: 83 e2 fe and $0xfffffffe,%edx 10c5ef: 01 d0 add %edx,%eax } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 10c5f1: 89 c2 mov %eax,%edx 10c5f3: 83 ca 01 or $0x1,%edx 10c5f6: 89 53 04 mov %edx,0x4(%ebx) new_block->prev_size = block_size; 10c5f9: 89 07 mov %eax,(%edi) new_block->size_and_flag = new_block_size; 10c5fb: 8b 45 f0 mov -0x10(%ebp),%eax 10c5fe: 83 e0 fe and $0xfffffffe,%eax 10c601: 03 45 ec add -0x14(%ebp),%eax 10c604: 29 f8 sub %edi,%eax 10c606: 89 47 04 mov %eax,0x4(%edi) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 10c609: ff 75 14 pushl 0x14(%ebp) 10c60c: 51 push %ecx 10c60d: 57 push %edi 10c60e: 56 push %esi 10c60f: e8 80 fe ff ff call 10c494 <_Heap_Block_split> 10c614: 89 fb mov %edi,%ebx 10c616: 83 c4 10 add $0x10,%esp alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 10c619: 8b 46 30 mov 0x30(%esi),%eax Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 10c61c: 39 46 34 cmp %eax,0x34(%esi) 10c61f: 76 03 jbe 10c624 <_Heap_Block_allocate+0xac> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 10c621: 89 46 34 mov %eax,0x34(%esi) } return block; } 10c624: 89 d8 mov %ebx,%eax 10c626: 8d 65 f4 lea -0xc(%ebp),%esp 10c629: 5b pop %ebx 10c62a: 5e pop %esi 10c62b: 5f pop %edi 10c62c: c9 leave 10c62d: c3 ret 10c62e: 66 90 xchg %ax,%ax <== NOT EXECUTED /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); 10c630: 89 f1 mov %esi,%ecx } if ( alloc_area_offset < heap->page_size ) { 10c632: 8b 56 10 mov 0x10(%esi),%edx 10c635: 89 55 e4 mov %edx,-0x1c(%ebp) 10c638: 39 d0 cmp %edx,%eax 10c63a: 73 8e jae 10c5ca <_Heap_Block_allocate+0x52> Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); 10c63c: 03 45 14 add 0x14(%ebp),%eax 10c63f: 50 push %eax 10c640: 51 push %ecx 10c641: 53 push %ebx 10c642: 56 push %esi 10c643: e8 4c fe ff ff call 10c494 <_Heap_Block_split> 10c648: 83 c4 10 add $0x10,%esp 10c64b: eb cc jmp 10c619 <_Heap_Block_allocate+0xa1> 10c64d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10c650: 8b 51 08 mov 0x8(%ecx),%edx new_block->next = next; 10c653: 89 53 08 mov %edx,0x8(%ebx) new_block->prev = block_before; 10c656: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10c659: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10c65c: 89 5a 0c mov %ebx,0xc(%edx) _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 10c65f: ff 46 38 incl 0x38(%esi) 10c662: 89 d9 mov %ebx,%ecx 10c664: eb 8b jmp 10c5f1 <_Heap_Block_allocate+0x79> 0010c494 <_Heap_Block_split>: Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 10c494: 55 push %ebp 10c495: 89 e5 mov %esp,%ebp 10c497: 57 push %edi 10c498: 56 push %esi 10c499: 53 push %ebx 10c49a: 83 ec 14 sub $0x14,%esp 10c49d: 8b 4d 08 mov 0x8(%ebp),%ecx 10c4a0: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; 10c4a3: 8b 79 10 mov 0x10(%ecx),%edi uintptr_t const min_block_size = heap->min_block_size; 10c4a6: 8b 41 14 mov 0x14(%ecx),%eax 10c4a9: 89 45 e8 mov %eax,-0x18(%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; 10c4ac: 8b 43 04 mov 0x4(%ebx),%eax 10c4af: 89 45 e4 mov %eax,-0x1c(%ebp) 10c4b2: 89 c6 mov %eax,%esi 10c4b4: 83 e6 fe and $0xfffffffe,%esi uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const used_size = _Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE; 10c4b7: 8b 55 e8 mov -0x18(%ebp),%edx 10c4ba: 83 ea 08 sub $0x8,%edx 10c4bd: 8b 45 14 mov 0x14(%ebp),%eax 10c4c0: 39 d0 cmp %edx,%eax 10c4c2: 73 02 jae 10c4c6 <_Heap_Block_split+0x32> 10c4c4: 89 d0 mov %edx,%eax 10c4c6: 83 c0 08 add $0x8,%eax 10c4c9: 89 45 f0 mov %eax,-0x10(%ebp) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10c4cc: 31 d2 xor %edx,%edx 10c4ce: f7 f7 div %edi if ( remainder != 0 ) { 10c4d0: 85 d2 test %edx,%edx 10c4d2: 75 70 jne 10c544 <_Heap_Block_split+0xb0> 10c4d4: 8b 7d f0 mov -0x10(%ebp),%edi 10c4d7: 89 7d ec mov %edi,-0x14(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c4da: 8d 04 33 lea (%ebx,%esi,1),%eax 10c4dd: 89 45 e0 mov %eax,-0x20(%ebp) Heap_Block *next_block = _Heap_Block_at( block, block_size ); _HAssert( used_size <= block_size + HEAP_BLOCK_SIZE_OFFSET ); _HAssert( used_size + free_size == block_size + HEAP_BLOCK_SIZE_OFFSET ); if ( free_size >= free_size_limit ) { 10c4e0: 8d 56 04 lea 0x4(%esi),%edx 10c4e3: 2b 55 f0 sub -0x10(%ebp),%edx 10c4e6: 8b 7d e8 mov -0x18(%ebp),%edi 10c4e9: 83 c7 04 add $0x4,%edi 10c4ec: 39 fa cmp %edi,%edx 10c4ee: 72 60 jb 10c550 <_Heap_Block_split+0xbc> 10c4f0: 8b 55 ec mov -0x14(%ebp),%edx 10c4f3: 01 da add %ebx,%edx Heap_Block *const free_block = _Heap_Block_at( block, used_block_size ); uintptr_t free_block_size = block_size - used_block_size; 10c4f5: 2b 75 ec sub -0x14(%ebp),%esi uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 10c4f8: 8b 7d e4 mov -0x1c(%ebp),%edi 10c4fb: 83 e7 01 and $0x1,%edi 10c4fe: 0b 7d ec or -0x14(%ebp),%edi 10c501: 89 7b 04 mov %edi,0x4(%ebx) _HAssert( used_block_size + free_block_size == block_size ); _Heap_Block_set_size( block, used_block_size ); /* Statistics */ stats->free_size += free_block_size; 10c504: 01 71 30 add %esi,0x30(%ecx) - 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; 10c507: 8b 58 04 mov 0x4(%eax),%ebx 10c50a: 83 e3 fe and $0xfffffffe,%ebx if ( _Heap_Is_used( next_block ) ) { 10c50d: f6 44 18 04 01 testb $0x1,0x4(%eax,%ebx,1) 10c512: 75 4c jne 10c560 <_Heap_Block_split+0xcc> RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 10c514: 8b 48 08 mov 0x8(%eax),%ecx Heap_Block *prev = old_block->prev; 10c517: 8b 40 0c mov 0xc(%eax),%eax new_block->next = next; 10c51a: 89 4a 08 mov %ecx,0x8(%edx) new_block->prev = prev; 10c51d: 89 42 0c mov %eax,0xc(%edx) next->prev = new_block; 10c520: 89 51 0c mov %edx,0xc(%ecx) prev->next = new_block; 10c523: 89 50 08 mov %edx,0x8(%eax) } else { uintptr_t const next_block_size = _Heap_Block_size( next_block ); _Heap_Free_list_replace( next_block, free_block ); free_block_size += next_block_size; 10c526: 01 de add %ebx,%esi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c528: 8d 04 16 lea (%esi,%edx,1),%eax next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; 10c52b: 89 f1 mov %esi,%ecx 10c52d: 83 c9 01 or $0x1,%ecx 10c530: 89 4a 04 mov %ecx,0x4(%edx) next_block->prev_size = free_block_size; 10c533: 89 30 mov %esi,(%eax) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10c535: 83 60 04 fe andl $0xfffffffe,0x4(%eax) } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; } } 10c539: 83 c4 14 add $0x14,%esp 10c53c: 5b pop %ebx 10c53d: 5e pop %esi 10c53e: 5f pop %edi 10c53f: c9 leave 10c540: c3 ret 10c541: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; 10c544: 03 7d f0 add -0x10(%ebp),%edi 10c547: 29 d7 sub %edx,%edi 10c549: 89 7d ec mov %edi,-0x14(%ebp) 10c54c: eb 8c jmp 10c4da <_Heap_Block_split+0x46> 10c54e: 66 90 xchg %ax,%ax <== NOT EXECUTED free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 10c550: 8b 45 e0 mov -0x20(%ebp),%eax 10c553: 83 48 04 01 orl $0x1,0x4(%eax) } } 10c557: 83 c4 14 add $0x14,%esp 10c55a: 5b pop %ebx 10c55b: 5e pop %esi 10c55c: 5f pop %edi 10c55d: c9 leave 10c55e: c3 ret 10c55f: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10c560: 8b 7d 10 mov 0x10(%ebp),%edi 10c563: 8b 5f 08 mov 0x8(%edi),%ebx new_block->next = next; 10c566: 89 5a 08 mov %ebx,0x8(%edx) new_block->prev = block_before; 10c569: 89 7a 0c mov %edi,0xc(%edx) block_before->next = new_block; 10c56c: 89 57 08 mov %edx,0x8(%edi) next->prev = new_block; 10c56f: 89 53 0c mov %edx,0xc(%ebx) if ( _Heap_Is_used( next_block ) ) { _Heap_Free_list_insert_after( free_list_anchor, free_block ); /* Statistics */ ++stats->free_blocks; 10c572: ff 41 38 incl 0x38(%ecx) 10c575: eb b4 jmp 10c52b <_Heap_Block_split+0x97> 00113b74 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 113b74: 55 push %ebp 113b75: 89 e5 mov %esp,%ebp 113b77: 56 push %esi 113b78: 53 push %ebx 113b79: 8b 4d 08 mov 0x8(%ebp),%ecx 113b7c: 8b 45 0c mov 0xc(%ebp),%eax 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; 113b7f: 8b 51 1c mov 0x1c(%ecx),%edx 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; 113b82: 8b 59 24 mov 0x24(%ecx),%ebx 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; 113b85: 3b 41 18 cmp 0x18(%ecx),%eax 113b88: 73 3a jae 113bc4 <_Heap_Extend+0x50> * 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 ) { 113b8a: 39 d0 cmp %edx,%eax 113b8c: 74 0e je 113b9c <_Heap_Extend+0x28> 113b8e: b8 02 00 00 00 mov $0x2,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 113b93: 8d 65 f8 lea -0x8(%ebp),%esp 113b96: 5b pop %ebx 113b97: 5e pop %esi 113b98: c9 leave 113b99: c3 ret 113b9a: 66 90 xchg %ax,%ax <== NOT EXECUTED { 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; 113b9c: 03 45 10 add 0x10(%ebp),%eax * 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; 113b9f: 89 41 1c mov %eax,0x1c(%ecx) extend_size = new_heap_area_end 113ba2: 29 d8 sub %ebx,%eax 113ba4: 8d 70 f8 lea -0x8(%eax),%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 113ba7: 89 f0 mov %esi,%eax 113ba9: 31 d2 xor %edx,%edx 113bab: f7 71 10 divl 0x10(%ecx) 113bae: 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; 113bb0: 8b 45 14 mov 0x14(%ebp),%eax 113bb3: 89 30 mov %esi,(%eax) if( extend_size >= heap->min_block_size ) { 113bb5: 39 71 14 cmp %esi,0x14(%ecx) 113bb8: 76 1a jbe 113bd4 <_Heap_Extend+0x60> 113bba: 31 c0 xor %eax,%eax <== NOT EXECUTED _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 113bbc: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 113bbf: 5b pop %ebx <== NOT EXECUTED 113bc0: 5e pop %esi <== NOT EXECUTED 113bc1: c9 leave <== NOT EXECUTED 113bc2: c3 ret <== NOT EXECUTED 113bc3: 90 nop <== NOT EXECUTED * 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 ) { 113bc4: 39 d0 cmp %edx,%eax 113bc6: 73 c2 jae 113b8a <_Heap_Extend+0x16> 113bc8: b8 01 00 00 00 mov $0x1,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 113bcd: 8d 65 f8 lea -0x8(%ebp),%esp 113bd0: 5b pop %ebx 113bd1: 5e pop %esi 113bd2: c9 leave 113bd3: c3 ret RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 113bd4: 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; 113bd7: 8b 43 04 mov 0x4(%ebx),%eax 113bda: 83 e0 01 and $0x1,%eax 113bdd: 09 f0 or %esi,%eax 113bdf: 89 43 04 mov %eax,0x4(%ebx) if( extend_size >= heap->min_block_size ) { Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 113be2: 8b 41 20 mov 0x20(%ecx),%eax 113be5: 29 d0 sub %edx,%eax 113be7: 83 c8 01 or $0x1,%eax 113bea: 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; 113bed: 89 51 24 mov %edx,0x24(%ecx) /* Statistics */ stats->size += extend_size; 113bf0: 01 71 2c add %esi,0x2c(%ecx) ++stats->used_blocks; 113bf3: ff 41 40 incl 0x40(%ecx) --stats->frees; /* Do not count subsequent call as actual free() */ 113bf6: ff 49 50 decl 0x50(%ecx) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 113bf9: 83 ec 08 sub $0x8,%esp 113bfc: 83 c3 08 add $0x8,%ebx 113bff: 53 push %ebx 113c00: 51 push %ecx 113c01: e8 3e b7 ff ff call 10f344 <_Heap_Free> 113c06: 31 c0 xor %eax,%eax 113c08: 83 c4 10 add $0x10,%esp } return HEAP_EXTEND_SUCCESSFUL; } 113c0b: 8d 65 f8 lea -0x8(%ebp),%esp 113c0e: 5b pop %ebx 113c0f: 5e pop %esi 113c10: c9 leave 113c11: c3 ret 00110428 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 110428: 55 push %ebp 110429: 89 e5 mov %esp,%ebp 11042b: 57 push %edi 11042c: 56 push %esi 11042d: 53 push %ebx 11042e: 83 ec 18 sub $0x18,%esp 110431: 8b 5d 08 mov 0x8(%ebp),%ebx 110434: 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 ) 110437: 8d 48 f8 lea -0x8(%eax),%ecx 11043a: 31 d2 xor %edx,%edx 11043c: f7 73 10 divl 0x10(%ebx) 11043f: 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; 110441: 8b 43 20 mov 0x20(%ebx),%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 110444: 39 c1 cmp %eax,%ecx 110446: 72 07 jb 11044f <_Heap_Free+0x27> && (uintptr_t) block <= (uintptr_t) heap->last_block; 110448: 8b 73 24 mov 0x24(%ebx),%esi 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 11044b: 39 f1 cmp %esi,%ecx 11044d: 76 0d jbe 11045c <_Heap_Free+0x34> /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 11044f: 31 c0 xor %eax,%eax } 110451: 83 c4 18 add $0x18,%esp 110454: 5b pop %ebx 110455: 5e pop %esi 110456: 5f pop %edi 110457: c9 leave 110458: c3 ret 110459: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED - 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; 11045c: 8b 51 04 mov 0x4(%ecx),%edx 11045f: 89 55 f0 mov %edx,-0x10(%ebp) 110462: 83 e2 fe and $0xfffffffe,%edx 110465: 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); 110468: 01 ca add %ecx,%edx 11046a: 89 55 dc mov %edx,-0x24(%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 11046d: 39 d0 cmp %edx,%eax 11046f: 77 de ja 11044f <_Heap_Free+0x27> 110471: 39 d6 cmp %edx,%esi 110473: 72 da jb 11044f <_Heap_Free+0x27> 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; 110475: 8b 7a 04 mov 0x4(%edx),%edi if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 110478: f7 c7 01 00 00 00 test $0x1,%edi 11047e: 74 cf je 11044f <_Heap_Free+0x27> - 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; 110480: 83 e7 fe and $0xfffffffe,%edi 110483: 89 7d e8 mov %edi,-0x18(%ebp) _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 110486: 39 d6 cmp %edx,%esi 110488: 0f 84 e2 00 00 00 je 110570 <_Heap_Free+0x148> #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 11048e: 8b 55 dc mov -0x24(%ebp),%edx 110491: 8b 7d e8 mov -0x18(%ebp),%edi 110494: 8b 7c 3a 04 mov 0x4(%edx,%edi,1),%edi 110498: 89 7d e0 mov %edi,-0x20(%ebp) 11049b: 8a 55 e0 mov -0x20(%ebp),%dl 11049e: 83 e2 01 and $0x1,%edx 1104a1: 88 55 e7 mov %dl,-0x19(%ebp) 1104a4: 80 75 e7 01 xorb $0x1,-0x19(%ebp) 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 )); if ( !_Heap_Is_prev_used( block ) ) { 1104a8: f6 45 f0 01 testb $0x1,-0x10(%ebp) 1104ac: 75 46 jne 1104f4 <_Heap_Free+0xcc> uintptr_t const prev_size = block->prev_size; 1104ae: 8b 39 mov (%ecx),%edi 1104b0: 89 7d f0 mov %edi,-0x10(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 1104b3: 29 f9 sub %edi,%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 1104b5: 39 c8 cmp %ecx,%eax 1104b7: 77 96 ja 11044f <_Heap_Free+0x27> 1104b9: 39 ce cmp %ecx,%esi 1104bb: 72 92 jb 11044f <_Heap_Free+0x27> 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) ) { 1104bd: f6 41 04 01 testb $0x1,0x4(%ecx) 1104c1: 74 8c je 11044f <_Heap_Free+0x27> _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 1104c3: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 1104c7: 0f 84 af 00 00 00 je 11057c <_Heap_Free+0x154> uintptr_t const size = block_size + prev_size + next_block_size; 1104cd: 8b 45 ec mov -0x14(%ebp),%eax 1104d0: 03 45 e8 add -0x18(%ebp),%eax 1104d3: 01 f8 add %edi,%eax return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 1104d5: 8b 55 dc mov -0x24(%ebp),%edx 1104d8: 8b 72 08 mov 0x8(%edx),%esi Heap_Block *prev = block->prev; 1104db: 8b 52 0c mov 0xc(%edx),%edx prev->next = next; 1104de: 89 72 08 mov %esi,0x8(%edx) next->prev = prev; 1104e1: 89 56 0c mov %edx,0xc(%esi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 1104e4: ff 4b 38 decl 0x38(%ebx) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 1104e7: 89 c2 mov %eax,%edx 1104e9: 83 ca 01 or $0x1,%edx 1104ec: 89 51 04 mov %edx,0x4(%ecx) next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 1104ef: 89 04 01 mov %eax,(%ecx,%eax,1) 1104f2: eb 2c jmp 110520 <_Heap_Free+0xf8> uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 1104f4: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 1104f8: 74 3e je 110538 <_Heap_Free+0x110> uintptr_t const size = block_size + next_block_size; 1104fa: 8b 7d e8 mov -0x18(%ebp),%edi 1104fd: 03 7d ec add -0x14(%ebp),%edi RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 110500: 8b 75 dc mov -0x24(%ebp),%esi 110503: 8b 46 08 mov 0x8(%esi),%eax Heap_Block *prev = old_block->prev; 110506: 8b 56 0c mov 0xc(%esi),%edx new_block->next = next; 110509: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = prev; 11050c: 89 51 0c mov %edx,0xc(%ecx) next->prev = new_block; 11050f: 89 48 0c mov %ecx,0xc(%eax) prev->next = new_block; 110512: 89 4a 08 mov %ecx,0x8(%edx) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 110515: 89 f8 mov %edi,%eax 110517: 83 c8 01 or $0x1,%eax 11051a: 89 41 04 mov %eax,0x4(%ecx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 11051d: 89 3c 39 mov %edi,(%ecx,%edi,1) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 110520: ff 4b 40 decl 0x40(%ebx) ++stats->frees; 110523: ff 43 50 incl 0x50(%ebx) stats->free_size += block_size; 110526: 8b 55 ec mov -0x14(%ebp),%edx 110529: 01 53 30 add %edx,0x30(%ebx) 11052c: b0 01 mov $0x1,%al return( true ); } 11052e: 83 c4 18 add $0x18,%esp 110531: 5b pop %ebx 110532: 5e pop %esi 110533: 5f pop %edi 110534: c9 leave 110535: c3 ret 110536: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 110538: 8b 43 08 mov 0x8(%ebx),%eax new_block->next = next; 11053b: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = block_before; 11053e: 89 59 0c mov %ebx,0xc(%ecx) block_before->next = new_block; 110541: 89 4b 08 mov %ecx,0x8(%ebx) next->prev = new_block; 110544: 89 48 0c mov %ecx,0xc(%eax) next_block->prev_size = size; } 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; 110547: 8b 45 ec mov -0x14(%ebp),%eax 11054a: 83 c8 01 or $0x1,%eax 11054d: 89 41 04 mov %eax,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 110550: 8b 7d dc mov -0x24(%ebp),%edi 110553: 83 67 04 fe andl $0xfffffffe,0x4(%edi) next_block->prev_size = block_size; 110557: 8b 45 ec mov -0x14(%ebp),%eax 11055a: 89 07 mov %eax,(%edi) /* Statistics */ ++stats->free_blocks; 11055c: 8b 43 38 mov 0x38(%ebx),%eax 11055f: 40 inc %eax 110560: 89 43 38 mov %eax,0x38(%ebx) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 110563: 3b 43 3c cmp 0x3c(%ebx),%eax 110566: 76 b8 jbe 110520 <_Heap_Free+0xf8> 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; 110568: 89 43 3c mov %eax,0x3c(%ebx) 11056b: eb b3 jmp 110520 <_Heap_Free+0xf8> 11056d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 110570: c6 45 e7 00 movb $0x0,-0x19(%ebp) 110574: e9 2f ff ff ff jmp 1104a8 <_Heap_Free+0x80> 110579: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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; 11057c: 8b 45 ec mov -0x14(%ebp),%eax 11057f: 03 45 f0 add -0x10(%ebp),%eax prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 110582: 89 c6 mov %eax,%esi 110584: 83 ce 01 or $0x1,%esi 110587: 89 71 04 mov %esi,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 11058a: 8b 55 dc mov -0x24(%ebp),%edx 11058d: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 110591: 89 02 mov %eax,(%edx) 110593: eb 8b jmp 110520 <_Heap_Free+0xf8> 0013cac4 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 13cac4: 55 push %ebp 13cac5: 89 e5 mov %esp,%ebp 13cac7: 57 push %edi 13cac8: 56 push %esi 13cac9: 53 push %ebx 13caca: 83 ec 04 sub $0x4,%esp 13cacd: 8b 45 08 mov 0x8(%ebp),%eax 13cad0: 8b 75 0c mov 0xc(%ebp),%esi Heap_Block *the_block = the_heap->first_block; 13cad3: 8b 58 20 mov 0x20(%eax),%ebx Heap_Block *const end = the_heap->last_block; 13cad6: 8b 78 24 mov 0x24(%eax),%edi _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 13cad9: c7 06 00 00 00 00 movl $0x0,(%esi) the_info->Free.total = 0; 13cadf: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi) the_info->Free.largest = 0; 13cae6: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) the_info->Used.number = 0; 13caed: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) the_info->Used.total = 0; 13caf4: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) the_info->Used.largest = 0; 13cafb: c7 46 10 00 00 00 00 movl $0x0,0x10(%esi) while ( the_block != end ) { 13cb02: 39 fb cmp %edi,%ebx 13cb04: 74 45 je 13cb4b <_Heap_Get_information+0x87> 13cb06: 8b 4b 04 mov 0x4(%ebx),%ecx uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; 13cb09: 8d 46 0c lea 0xc(%esi),%eax 13cb0c: 89 45 f0 mov %eax,-0x10(%ebp) 13cb0f: eb 16 jmp 13cb27 <_Heap_Get_information+0x63> 13cb11: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED while ( the_block != end ) { uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) 13cb14: 89 f0 mov %esi,%eax info = &the_info->Used; else info = &the_info->Free; info->number++; 13cb16: ff 00 incl (%eax) info->total += the_size; 13cb18: 01 50 08 add %edx,0x8(%eax) if ( info->largest < the_size ) 13cb1b: 39 50 04 cmp %edx,0x4(%eax) 13cb1e: 73 03 jae 13cb23 <_Heap_Get_information+0x5f> info->largest = the_size; 13cb20: 89 50 04 mov %edx,0x4(%eax) the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 13cb23: 39 df cmp %ebx,%edi 13cb25: 74 15 je 13cb3c <_Heap_Get_information+0x78> - 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; 13cb27: 89 ca mov %ecx,%edx 13cb29: 83 e2 fe and $0xfffffffe,%edx RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 13cb2c: 01 d3 add %edx,%ebx 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; 13cb2e: 8b 4b 04 mov 0x4(%ebx),%ecx uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) 13cb31: f6 c1 01 test $0x1,%cl 13cb34: 74 de je 13cb14 <_Heap_Get_information+0x50> 13cb36: 8b 45 f0 mov -0x10(%ebp),%eax 13cb39: eb db jmp 13cb16 <_Heap_Get_information+0x52> 13cb3b: 90 nop <== NOT EXECUTED the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 13cb3c: 8b 46 14 mov 0x14(%esi),%eax 13cb3f: 83 c0 08 add $0x8,%eax /* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE; 13cb42: 89 46 14 mov %eax,0x14(%esi) } 13cb45: 58 pop %eax 13cb46: 5b pop %ebx 13cb47: 5e pop %esi 13cb48: 5f pop %edi 13cb49: c9 leave 13cb4a: c3 ret the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 13cb4b: b8 08 00 00 00 mov $0x8,%eax <== NOT EXECUTED 13cb50: eb f0 jmp 13cb42 <_Heap_Get_information+0x7e> <== NOT EXECUTED 0010c344 <_Heap_Initialize>: Heap_Control *heap, void *heap_area_begin_ptr, uintptr_t heap_area_size, uintptr_t page_size ) { 10c344: 55 push %ebp 10c345: 89 e5 mov %esp,%ebp 10c347: 57 push %edi 10c348: 56 push %esi 10c349: 53 push %ebx 10c34a: 83 ec 10 sub $0x10,%esp 10c34d: 8b 5d 08 mov 0x8(%ebp),%ebx 10c350: 8b 4d 14 mov 0x14(%ebp),%ecx uintptr_t min_block_size = 0; uintptr_t overhead = 0; Heap_Block *first_block = NULL; Heap_Block *last_block = NULL; if ( page_size == 0 ) { 10c353: 85 c9 test %ecx,%ecx 10c355: 0f 85 f5 00 00 00 jne 10c450 <_Heap_Initialize+0x10c> 10c35b: b1 04 mov $0x4,%cl 10c35d: c7 45 f0 10 00 00 00 movl $0x10,-0x10(%ebp) ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr; uintptr_t const heap_area_end = heap_area_begin + heap_area_size; uintptr_t alloc_area_begin = heap_area_begin + HEAP_BLOCK_HEADER_SIZE; 10c364: 8b 75 0c mov 0xc(%ebp),%esi 10c367: 83 c6 08 add $0x8,%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10c36a: 89 f0 mov %esi,%eax 10c36c: 31 d2 xor %edx,%edx 10c36e: f7 f1 div %ecx if ( remainder != 0 ) { 10c370: 85 d2 test %edx,%edx 10c372: 74 05 je 10c379 <_Heap_Initialize+0x35> return value - remainder + alignment; 10c374: 8d 34 31 lea (%ecx,%esi,1),%esi 10c377: 29 d6 sub %edx,%esi overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( 10c379: 8b 55 0c mov 0xc(%ebp),%edx 10c37c: 03 55 10 add 0x10(%ebp),%edx 10c37f: 89 55 ec mov %edx,-0x14(%ebp) 10c382: 0f 82 d9 00 00 00 jb 10c461 <_Heap_Initialize+0x11d> } min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); 10c388: 8d 7e f8 lea -0x8(%esi),%edi 10c38b: 2b 75 0c sub 0xc(%ebp),%esi first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( 10c38e: 39 75 10 cmp %esi,0x10(%ebp) 10c391: 0f 86 ca 00 00 00 jbe 10c461 <_Heap_Initialize+0x11d> min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; 10c397: 8b 45 10 mov 0x10(%ebp),%eax 10c39a: 29 f0 sub %esi,%eax 10c39c: 89 c6 mov %eax,%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10c39e: 31 d2 xor %edx,%edx 10c3a0: f7 f1 div %ecx 10c3a2: 29 d6 sub %edx,%esi 10c3a4: 89 75 e4 mov %esi,-0x1c(%ebp) first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( 10c3a7: 39 75 f0 cmp %esi,-0x10(%ebp) 10c3aa: 0f 87 b1 00 00 00 ja 10c461 <_Heap_Initialize+0x11d> alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; 10c3b0: 89 f0 mov %esi,%eax 10c3b2: 83 e8 08 sub $0x8,%eax return 0; } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; 10c3b5: 89 0f mov %ecx,(%edi) first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 10c3b7: 89 f2 mov %esi,%edx 10c3b9: 83 ca 01 or $0x1,%edx 10c3bc: 89 57 04 mov %edx,0x4(%edi) first_block->next = _Heap_Free_list_tail( heap ); 10c3bf: 89 5f 08 mov %ebx,0x8(%edi) first_block->prev = _Heap_Free_list_head( heap ); 10c3c2: 89 5f 0c mov %ebx,0xc(%edi) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c3c5: 01 fe add %edi,%esi 10c3c7: 89 73 24 mov %esi,0x24(%ebx) * block indicates that the previous block is used, this ensures that the * last block appears as used for the _Heap_Is_used() and _Heap_Is_free() * functions. */ last_block = _Heap_Block_at( first_block, first_block_size ); last_block->prev_size = first_block_size; 10c3ca: 8b 55 e4 mov -0x1c(%ebp),%edx 10c3cd: 89 16 mov %edx,(%esi) last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; 10c3cf: 89 fa mov %edi,%edx 10c3d1: 29 f2 sub %esi,%edx 10c3d3: 89 56 04 mov %edx,0x4(%esi) /* Heap control */ heap->page_size = page_size; 10c3d6: 89 4b 10 mov %ecx,0x10(%ebx) heap->min_block_size = min_block_size; 10c3d9: 8b 75 f0 mov -0x10(%ebp),%esi 10c3dc: 89 73 14 mov %esi,0x14(%ebx) heap->area_begin = heap_area_begin; 10c3df: 8b 55 0c mov 0xc(%ebp),%edx 10c3e2: 89 53 18 mov %edx,0x18(%ebx) heap->area_end = heap_area_end; 10c3e5: 8b 75 ec mov -0x14(%ebp),%esi 10c3e8: 89 73 1c mov %esi,0x1c(%ebx) heap->first_block = first_block; 10c3eb: 89 7b 20 mov %edi,0x20(%ebx) heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block; 10c3ee: 89 7b 08 mov %edi,0x8(%ebx) _Heap_Free_list_tail( heap )->prev = first_block; 10c3f1: 89 7b 0c mov %edi,0xc(%ebx) /* Statistics */ stats->size = first_block_size; 10c3f4: 8b 55 e4 mov -0x1c(%ebp),%edx 10c3f7: 89 53 2c mov %edx,0x2c(%ebx) stats->free_size = first_block_size; 10c3fa: 89 53 30 mov %edx,0x30(%ebx) stats->min_free_size = first_block_size; 10c3fd: 89 53 34 mov %edx,0x34(%ebx) stats->free_blocks = 1; 10c400: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) stats->max_free_blocks = 1; 10c407: c7 43 3c 01 00 00 00 movl $0x1,0x3c(%ebx) stats->used_blocks = 0; 10c40e: c7 43 40 00 00 00 00 movl $0x0,0x40(%ebx) stats->max_search = 0; 10c415: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) stats->allocs = 0; 10c41c: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) stats->searches = 0; 10c423: c7 43 4c 00 00 00 00 movl $0x0,0x4c(%ebx) stats->frees = 0; 10c42a: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) stats->resizes = 0; 10c431: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) stats->instance = instance++; 10c438: 8b 15 80 4f 12 00 mov 0x124f80,%edx 10c43e: 89 53 28 mov %edx,0x28(%ebx) 10c441: 42 inc %edx 10c442: 89 15 80 4f 12 00 mov %edx,0x124f80 _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; } 10c448: 83 c4 10 add $0x10,%esp 10c44b: 5b pop %ebx 10c44c: 5e pop %esi 10c44d: 5f pop %edi 10c44e: c9 leave 10c44f: c3 ret uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { 10c450: 89 c8 mov %ecx,%eax 10c452: 83 e0 03 and $0x3,%eax 10c455: 74 05 je 10c45c <_Heap_Initialize+0x118> return value - remainder + alignment; 10c457: 83 c1 04 add $0x4,%ecx 10c45a: 29 c1 sub %eax,%ecx if ( page_size == 0 ) { page_size = CPU_ALIGNMENT; } else { page_size = _Heap_Align_up( page_size, CPU_ALIGNMENT ); if ( page_size < CPU_ALIGNMENT ) { 10c45c: 83 f9 03 cmp $0x3,%ecx 10c45f: 77 0b ja 10c46c <_Heap_Initialize+0x128> ); _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; 10c461: 31 c0 xor %eax,%eax } 10c463: 83 c4 10 add $0x10,%esp 10c466: 5b pop %ebx 10c467: 5e pop %esi 10c468: 5f pop %edi 10c469: c9 leave 10c46a: c3 ret 10c46b: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10c46c: b8 10 00 00 00 mov $0x10,%eax 10c471: 31 d2 xor %edx,%edx 10c473: f7 f1 div %ecx if ( remainder != 0 ) { 10c475: 85 d2 test %edx,%edx 10c477: 74 0d je 10c486 <_Heap_Initialize+0x142> return value - remainder + alignment; 10c479: 8d 41 10 lea 0x10(%ecx),%eax 10c47c: 29 d0 sub %edx,%eax 10c47e: 89 45 f0 mov %eax,-0x10(%ebp) 10c481: e9 de fe ff ff jmp 10c364 <_Heap_Initialize+0x20> uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { 10c486: c7 45 f0 10 00 00 00 movl $0x10,-0x10(%ebp) 10c48d: e9 d2 fe ff ff jmp 10c364 <_Heap_Initialize+0x20> 0011dbf0 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 11dbf0: 55 push %ebp 11dbf1: 89 e5 mov %esp,%ebp 11dbf3: 57 push %edi 11dbf4: 56 push %esi 11dbf5: 53 push %ebx 11dbf6: 83 ec 2c sub $0x2c,%esp 11dbf9: 8b 5d 08 mov 0x8(%ebp),%ebx 11dbfc: 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 ) 11dbff: 8d 4e f8 lea -0x8(%esi),%ecx 11dc02: 89 f0 mov %esi,%eax 11dc04: 31 d2 xor %edx,%edx 11dc06: f7 73 10 divl 0x10(%ebx) 11dc09: 29 d1 sub %edx,%ecx uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); *old_size = 0; 11dc0b: 8b 45 14 mov 0x14(%ebp),%eax 11dc0e: c7 00 00 00 00 00 movl $0x0,(%eax) *new_size = 0; 11dc14: 8b 55 18 mov 0x18(%ebp),%edx 11dc17: c7 02 00 00 00 00 movl $0x0,(%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 11dc1d: 39 4b 20 cmp %ecx,0x20(%ebx) 11dc20: 76 0e jbe 11dc30 <_Heap_Resize_block+0x40> block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; /* Statistics */ ++stats->resizes; 11dc22: b8 02 00 00 00 mov $0x2,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11dc27: 8d 65 f4 lea -0xc(%ebp),%esp 11dc2a: 5b pop %ebx 11dc2b: 5e pop %esi 11dc2c: 5f pop %edi 11dc2d: c9 leave 11dc2e: c3 ret 11dc2f: 90 nop <== NOT EXECUTED 11dc30: 39 4b 24 cmp %ecx,0x24(%ebx) 11dc33: 72 ed jb 11dc22 <_Heap_Resize_block+0x32> - 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; 11dc35: 8b 41 04 mov 0x4(%ecx),%eax 11dc38: 83 e0 fe and $0xfffffffe,%eax { Heap_Statistics *const stats = &heap->stats; uintptr_t const block_begin = (uintptr_t) block; uintptr_t block_size = _Heap_Block_size( block ); uintptr_t block_end = block_begin + block_size; 11dc3b: 8d 3c 01 lea (%ecx,%eax,1),%edi 11dc3e: 89 7d d4 mov %edi,-0x2c(%ebp) uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 11dc41: 89 fa mov %edi,%edx 11dc43: 29 f2 sub %esi,%edx 11dc45: 83 c2 04 add $0x4,%edx 11dc48: 89 55 dc mov %edx,-0x24(%ebp) 11dc4b: 8b 57 04 mov 0x4(%edi),%edx 11dc4e: 83 e2 fe and $0xfffffffe,%edx 11dc51: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 11dc54: 8b 54 17 04 mov 0x4(%edi,%edx,1),%edx 11dc58: 83 e2 01 and $0x1,%edx 11dc5b: 89 55 e0 mov %edx,-0x20(%ebp) bool next_block_is_free = _Heap_Is_free( next_block );; _HAssert( _Heap_Is_block_in_heap( heap, next_block ) ); _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; 11dc5e: 8b 55 dc mov -0x24(%ebp),%edx 11dc61: 8b 7d 14 mov 0x14(%ebp),%edi 11dc64: 89 17 mov %edx,(%edi) if ( next_block_is_free ) { 11dc66: 8a 55 e0 mov -0x20(%ebp),%dl 11dc69: 80 f2 01 xor $0x1,%dl 11dc6c: 88 55 e0 mov %dl,-0x20(%ebp) 11dc6f: 75 17 jne 11dc88 <_Heap_Resize_block+0x98> block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { 11dc71: 8b 55 dc mov -0x24(%ebp),%edx 11dc74: 39 55 10 cmp %edx,0x10(%ebp) 11dc77: 76 20 jbe 11dc99 <_Heap_Resize_block+0xa9> 11dc79: b8 01 00 00 00 mov $0x1,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11dc7e: 8d 65 f4 lea -0xc(%ebp),%esp 11dc81: 5b pop %ebx 11dc82: 5e pop %esi 11dc83: 5f pop %edi 11dc84: c9 leave 11dc85: c3 ret 11dc86: 66 90 xchg %ax,%ax <== NOT EXECUTED _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; if ( next_block_is_free ) { block_size += next_block_size; 11dc88: 03 45 d0 add -0x30(%ebp),%eax alloc_size += next_block_size; 11dc8b: 8b 7d d0 mov -0x30(%ebp),%edi 11dc8e: 01 7d dc add %edi,-0x24(%ebp) } if ( new_alloc_size > alloc_size ) { 11dc91: 8b 55 dc mov -0x24(%ebp),%edx 11dc94: 39 55 10 cmp %edx,0x10(%ebp) 11dc97: 77 e0 ja 11dc79 <_Heap_Resize_block+0x89> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 11dc99: 80 7d e0 00 cmpb $0x0,-0x20(%ebp) 11dc9d: 74 31 je 11dcd0 <_Heap_Resize_block+0xe0> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 11dc9f: 8b 79 04 mov 0x4(%ecx),%edi 11dca2: 83 e7 01 and $0x1,%edi 11dca5: 09 c7 or %eax,%edi 11dca7: 89 79 04 mov %edi,0x4(%ecx) return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 11dcaa: 8b 7d d4 mov -0x2c(%ebp),%edi 11dcad: 8b 7f 08 mov 0x8(%edi),%edi 11dcb0: 89 7d e4 mov %edi,-0x1c(%ebp) Heap_Block *prev = block->prev; 11dcb3: 8b 55 d4 mov -0x2c(%ebp),%edx 11dcb6: 8b 7a 0c mov 0xc(%edx),%edi prev->next = next; 11dcb9: 8b 55 e4 mov -0x1c(%ebp),%edx 11dcbc: 89 57 08 mov %edx,0x8(%edi) next->prev = prev; 11dcbf: 89 7a 0c mov %edi,0xc(%edx) _Heap_Block_set_size( block, block_size ); _Heap_Free_list_remove( next_block ); next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 11dcc2: 83 4c 08 04 01 orl $0x1,0x4(%eax,%ecx,1) /* Statistics */ --stats->free_blocks; 11dcc7: ff 4b 38 decl 0x38(%ebx) stats->free_size -= next_block_size; 11dcca: 8b 7d d0 mov -0x30(%ebp),%edi 11dccd: 29 7b 30 sub %edi,0x30(%ebx) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 11dcd0: ff 75 10 pushl 0x10(%ebp) 11dcd3: 56 push %esi 11dcd4: 51 push %ecx 11dcd5: 53 push %ebx 11dcd6: e8 9d e8 fe ff call 10c578 <_Heap_Block_allocate> block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 11dcdb: 8b 50 04 mov 0x4(%eax),%edx 11dcde: 83 e2 fe and $0xfffffffe,%edx 11dce1: 29 f0 sub %esi,%eax 11dce3: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 11dce7: 8b 55 18 mov 0x18(%ebp),%edx 11dcea: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->resizes; 11dcec: ff 43 54 incl 0x54(%ebx) 11dcef: 31 c0 xor %eax,%eax 11dcf1: 83 c4 10 add $0x10,%esp new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11dcf4: 8d 65 f4 lea -0xc(%ebp),%esp 11dcf7: 5b pop %ebx 11dcf8: 5e pop %esi 11dcf9: 5f pop %edi 11dcfa: c9 leave 11dcfb: c3 ret 0011dcfc <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11dcfc: 55 push %ebp 11dcfd: 89 e5 mov %esp,%ebp 11dcff: 56 push %esi 11dd00: 53 push %ebx 11dd01: 8b 5d 08 mov 0x8(%ebp),%ebx 11dd04: 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 ) 11dd07: 8d 4e f8 lea -0x8(%esi),%ecx 11dd0a: 89 f0 mov %esi,%eax 11dd0c: 31 d2 xor %edx,%edx 11dd0e: f7 73 10 divl 0x10(%ebx) 11dd11: 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; 11dd13: 8b 43 20 mov 0x20(%ebx),%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 11dd16: 39 c1 cmp %eax,%ecx 11dd18: 72 07 jb 11dd21 <_Heap_Size_of_alloc_area+0x25> && (uintptr_t) block <= (uintptr_t) heap->last_block; 11dd1a: 8b 53 24 mov 0x24(%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 11dd1d: 39 d1 cmp %edx,%ecx 11dd1f: 76 07 jbe 11dd28 <_Heap_Size_of_alloc_area+0x2c> return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; return true; 11dd21: 31 c0 xor %eax,%eax } 11dd23: 5b pop %ebx 11dd24: 5e pop %esi 11dd25: c9 leave 11dd26: c3 ret 11dd27: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11dd28: 8b 59 04 mov 0x4(%ecx),%ebx 11dd2b: 83 e3 fe and $0xfffffffe,%ebx 11dd2e: 01 d9 add %ebx,%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 11dd30: 39 c8 cmp %ecx,%eax 11dd32: 77 ed ja 11dd21 <_Heap_Size_of_alloc_area+0x25> 11dd34: 39 ca cmp %ecx,%edx 11dd36: 72 e9 jb 11dd21 <_Heap_Size_of_alloc_area+0x25> } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 11dd38: f6 41 04 01 testb $0x1,0x4(%ecx) 11dd3c: 74 e3 je 11dd21 <_Heap_Size_of_alloc_area+0x25> || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 11dd3e: 29 f1 sub %esi,%ecx 11dd40: 8d 51 04 lea 0x4(%ecx),%edx 11dd43: 8b 45 10 mov 0x10(%ebp),%eax 11dd46: 89 10 mov %edx,(%eax) 11dd48: b0 01 mov $0x1,%al return true; } 11dd4a: 5b pop %ebx 11dd4b: 5e pop %esi 11dd4c: c9 leave 11dd4d: c3 ret 0010d0e0 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10d0e0: 55 push %ebp 10d0e1: 89 e5 mov %esp,%ebp 10d0e3: 57 push %edi 10d0e4: 56 push %esi 10d0e5: 53 push %ebx 10d0e6: 83 ec 3c sub $0x3c,%esp 10d0e9: 8b 5d 08 mov 0x8(%ebp),%ebx uintptr_t const page_size = heap->page_size; 10d0ec: 8b 43 10 mov 0x10(%ebx),%eax 10d0ef: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10d0f2: 8b 53 14 mov 0x14(%ebx),%edx 10d0f5: 89 55 dc mov %edx,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10d0f8: 8b 43 24 mov 0x24(%ebx),%eax 10d0fb: 89 45 d8 mov %eax,-0x28(%ebp) Heap_Block *block = heap->first_block; 10d0fe: 8b 73 20 mov 0x20(%ebx),%esi Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d101: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10d105: 75 1d jne 10d124 <_Heap_Walk+0x44> 10d107: c7 45 e4 d8 d0 10 00 movl $0x10d0d8,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d10e: 83 3d 20 87 12 00 03 cmpl $0x3,0x128720 10d115: 74 1d je 10d134 <_Heap_Walk+0x54> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10d117: b0 01 mov $0x1,%al block = next_block; } return true; } 10d119: 8d 65 f4 lea -0xc(%ebp),%esp 10d11c: 5b pop %ebx 10d11d: 5e pop %esi 10d11e: 5f pop %edi 10d11f: c9 leave 10d120: c3 ret 10d121: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d124: c7 45 e4 a8 d4 10 00 movl $0x10d4a8,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d12b: 83 3d 20 87 12 00 03 cmpl $0x3,0x128720 10d132: 75 e3 jne 10d117 <_Heap_Walk+0x37> 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)( 10d134: 52 push %edx 10d135: ff 73 0c pushl 0xc(%ebx) 10d138: ff 73 08 pushl 0x8(%ebx) 10d13b: ff 75 d8 pushl -0x28(%ebp) 10d13e: 56 push %esi 10d13f: ff 73 1c pushl 0x1c(%ebx) 10d142: ff 73 18 pushl 0x18(%ebx) 10d145: ff 75 dc pushl -0x24(%ebp) 10d148: ff 75 e0 pushl -0x20(%ebp) 10d14b: 68 b0 0a 12 00 push $0x120ab0 10d150: 6a 00 push $0x0 10d152: ff 75 0c pushl 0xc(%ebp) 10d155: 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 ) { 10d158: 83 c4 30 add $0x30,%esp 10d15b: 8b 45 e0 mov -0x20(%ebp),%eax 10d15e: 85 c0 test %eax,%eax 10d160: 0f 84 b2 00 00 00 je 10d218 <_Heap_Walk+0x138> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10d166: f6 45 e0 03 testb $0x3,-0x20(%ebp) 10d16a: 0f 85 b0 00 00 00 jne 10d220 <_Heap_Walk+0x140> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10d170: 8b 45 dc mov -0x24(%ebp),%eax 10d173: 31 d2 xor %edx,%edx 10d175: f7 75 e0 divl -0x20(%ebp) 10d178: 85 d2 test %edx,%edx 10d17a: 0f 85 ac 00 00 00 jne 10d22c <_Heap_Walk+0x14c> ); return false; } if ( 10d180: 8d 46 08 lea 0x8(%esi),%eax 10d183: 31 d2 xor %edx,%edx 10d185: f7 75 e0 divl -0x20(%ebp) 10d188: 85 d2 test %edx,%edx 10d18a: 0f 85 a8 00 00 00 jne 10d238 <_Heap_Walk+0x158> 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; 10d190: 8b 56 04 mov 0x4(%esi),%edx 10d193: 89 55 cc mov %edx,-0x34(%ebp) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10d196: 83 e2 01 and $0x1,%edx 10d199: 0f 84 a1 00 00 00 je 10d240 <_Heap_Walk+0x160> ); return false; } if ( first_block->prev_size != page_size ) { 10d19f: 8b 06 mov (%esi),%eax 10d1a1: 39 45 e0 cmp %eax,-0x20(%ebp) 10d1a4: 75 4e jne 10d1f4 <_Heap_Walk+0x114> ); return false; } if ( _Heap_Is_free( last_block ) ) { 10d1a6: 8b 55 d8 mov -0x28(%ebp),%edx 10d1a9: 8b 42 04 mov 0x4(%edx),%eax 10d1ac: 83 e0 fe and $0xfffffffe,%eax 10d1af: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1) 10d1b4: 0f 84 bd 02 00 00 je 10d477 <_Heap_Walk+0x397> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10d1ba: 8b 43 10 mov 0x10(%ebx),%eax 10d1bd: 89 45 d4 mov %eax,-0x2c(%ebp) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10d1c0: 8b 4b 08 mov 0x8(%ebx),%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 ) { 10d1c3: 39 cb cmp %ecx,%ebx 10d1c5: 0f 84 08 01 00 00 je 10d2d3 <_Heap_Walk+0x1f3> 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; 10d1cb: 8b 7b 20 mov 0x20(%ebx),%edi 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 10d1ce: 39 cf cmp %ecx,%edi 10d1d0: 76 76 jbe 10d248 <_Heap_Walk+0x168> 10d1d2: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 10d1d4: 51 push %ecx 10d1d5: 68 f8 0b 12 00 push $0x120bf8 10d1da: 66 90 xchg %ax,%ax return false; } if ( !prev_used ) { (*printer)( 10d1dc: 6a 01 push $0x1 10d1de: ff 75 0c pushl 0xc(%ebp) 10d1e1: ff 55 e4 call *-0x1c(%ebp) 10d1e4: 31 c0 xor %eax,%eax 10d1e6: 83 c4 10 add $0x10,%esp block = next_block; } return true; } 10d1e9: 8d 65 f4 lea -0xc(%ebp),%esp 10d1ec: 5b pop %ebx 10d1ed: 5e pop %esi 10d1ee: 5f pop %edi 10d1ef: c9 leave 10d1f0: c3 ret 10d1f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return false; } if ( first_block->prev_size != page_size ) { (*printer)( 10d1f4: 83 ec 0c sub $0xc,%esp 10d1f7: ff 75 e0 pushl -0x20(%ebp) 10d1fa: 50 push %eax 10d1fb: 68 cc 0b 12 00 push $0x120bcc return false; } if ( free_block->prev != prev_block ) { (*printer)( 10d200: 6a 01 push $0x1 10d202: ff 75 0c pushl 0xc(%ebp) 10d205: ff 55 e4 call *-0x1c(%ebp) 10d208: 31 c0 xor %eax,%eax 10d20a: 83 c4 20 add $0x20,%esp block = next_block; } return true; } 10d20d: 8d 65 f4 lea -0xc(%ebp),%esp 10d210: 5b pop %ebx 10d211: 5e pop %esi 10d212: 5f pop %edi 10d213: c9 leave 10d214: c3 ret 10d215: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 10d218: 57 push %edi 10d219: 68 27 0e 12 00 push $0x120e27 10d21e: eb bc jmp 10d1dc <_Heap_Walk+0xfc> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 10d220: ff 75 e0 pushl -0x20(%ebp) 10d223: 68 3a 0e 12 00 push $0x120e3a 10d228: eb b2 jmp 10d1dc <_Heap_Walk+0xfc> 10d22a: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 10d22c: ff 75 dc pushl -0x24(%ebp) 10d22f: 68 44 0b 12 00 push $0x120b44 10d234: eb a6 jmp 10d1dc <_Heap_Walk+0xfc> 10d236: 66 90 xchg %ax,%ax <== NOT EXECUTED } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10d238: 56 push %esi 10d239: 68 68 0b 12 00 push $0x120b68 10d23e: eb 9c jmp 10d1dc <_Heap_Walk+0xfc> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 10d240: 56 push %esi 10d241: 68 9c 0b 12 00 push $0x120b9c 10d246: eb 94 jmp 10d1dc <_Heap_Walk+0xfc> && (uintptr_t) block <= (uintptr_t) heap->last_block; 10d248: 8b 53 24 mov 0x24(%ebx),%edx 10d24b: 89 55 d0 mov %edx,-0x30(%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 10d24e: 39 ca cmp %ecx,%edx 10d250: 72 82 jb 10d1d4 <_Heap_Walk+0xf4> ); return false; } if ( 10d252: 8d 41 08 lea 0x8(%ecx),%eax 10d255: 31 d2 xor %edx,%edx 10d257: f7 75 d4 divl -0x2c(%ebp) 10d25a: 85 d2 test %edx,%edx 10d25c: 0f 85 20 02 00 00 jne 10d482 <_Heap_Walk+0x3a2> ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d262: 8b 41 04 mov 0x4(%ecx),%eax 10d265: 83 e0 fe and $0xfffffffe,%eax 10d268: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d26d: 0f 85 29 02 00 00 jne 10d49c <_Heap_Walk+0x3bc> ); return false; } if ( free_block->prev != prev_block ) { 10d273: 8b 41 0c mov 0xc(%ecx),%eax 10d276: 39 c3 cmp %eax,%ebx 10d278: 0f 85 0f 02 00 00 jne 10d48d <_Heap_Walk+0x3ad> 10d27e: 89 75 c8 mov %esi,-0x38(%ebp) 10d281: 89 de mov %ebx,%esi 10d283: eb 40 jmp 10d2c5 <_Heap_Walk+0x1e5> 10d285: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10d288: 39 f9 cmp %edi,%ecx 10d28a: 0f 82 44 ff ff ff jb 10d1d4 <_Heap_Walk+0xf4> 10d290: 39 4d d0 cmp %ecx,-0x30(%ebp) 10d293: 0f 82 3b ff ff ff jb 10d1d4 <_Heap_Walk+0xf4> ); return false; } if ( 10d299: 8d 41 08 lea 0x8(%ecx),%eax 10d29c: 31 d2 xor %edx,%edx 10d29e: f7 75 d4 divl -0x2c(%ebp) 10d2a1: 85 d2 test %edx,%edx 10d2a3: 0f 85 d9 01 00 00 jne 10d482 <_Heap_Walk+0x3a2> ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d2a9: 8b 41 04 mov 0x4(%ecx),%eax 10d2ac: 83 e0 fe and $0xfffffffe,%eax 10d2af: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d2b4: 0f 85 e2 01 00 00 jne 10d49c <_Heap_Walk+0x3bc> ); return false; } if ( free_block->prev != prev_block ) { 10d2ba: 8b 41 0c mov 0xc(%ecx),%eax 10d2bd: 39 d8 cmp %ebx,%eax 10d2bf: 0f 85 c8 01 00 00 jne 10d48d <_Heap_Walk+0x3ad> (*printer)( 10d2c5: 89 cb mov %ecx,%ebx return false; } prev_block = free_block; free_block = free_block->next; 10d2c7: 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 ) { 10d2ca: 39 ce cmp %ecx,%esi 10d2cc: 75 ba jne 10d288 <_Heap_Walk+0x1a8> 10d2ce: 89 f3 mov %esi,%ebx 10d2d0: 8b 75 c8 mov -0x38(%ebp),%esi if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10d2d3: 39 75 d8 cmp %esi,-0x28(%ebp) 10d2d6: 0f 84 3b fe ff ff je 10d117 <_Heap_Walk+0x37> 10d2dc: 8b 45 cc mov -0x34(%ebp),%eax 10d2df: 90 nop - 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; 10d2e0: 89 c1 mov %eax,%ecx 10d2e2: 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); 10d2e5: 8d 3c 31 lea (%ecx,%esi,1),%edi 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 ) { 10d2e8: a8 01 test $0x1,%al 10d2ea: 74 30 je 10d31c <_Heap_Walk+0x23c> (*printer)( 10d2ec: 83 ec 0c sub $0xc,%esp 10d2ef: 51 push %ecx 10d2f0: 56 push %esi 10d2f1: 68 89 0e 12 00 push $0x120e89 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10d2f6: 6a 00 push $0x0 10d2f8: ff 75 0c pushl 0xc(%ebp) 10d2fb: 89 4d c4 mov %ecx,-0x3c(%ebp) 10d2fe: ff 55 e4 call *-0x1c(%ebp) 10d301: 83 c4 20 add $0x20,%esp 10d304: 8b 4d c4 mov -0x3c(%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 10d307: 39 7b 20 cmp %edi,0x20(%ebx) 10d30a: 76 20 jbe 10d32c <_Heap_Walk+0x24c> block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 10d30c: 83 ec 0c sub $0xc,%esp 10d30f: 57 push %edi 10d310: 56 push %esi 10d311: 68 a4 0c 12 00 push $0x120ca4 10d316: e9 e5 fe ff ff jmp 10d200 <_Heap_Walk+0x120> 10d31b: 90 nop <== NOT EXECUTED "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10d31c: 83 ec 08 sub $0x8,%esp 10d31f: ff 36 pushl (%esi) 10d321: 51 push %ecx 10d322: 56 push %esi 10d323: 68 7c 0c 12 00 push $0x120c7c 10d328: eb cc jmp 10d2f6 <_Heap_Walk+0x216> 10d32a: 66 90 xchg %ax,%ax <== NOT EXECUTED 10d32c: 39 7b 24 cmp %edi,0x24(%ebx) 10d32f: 72 db jb 10d30c <_Heap_Walk+0x22c> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 10d331: 89 c8 mov %ecx,%eax 10d333: 31 d2 xor %edx,%edx 10d335: f7 75 e0 divl -0x20(%ebp) 10d338: 85 d2 test %edx,%edx 10d33a: 0f 85 02 01 00 00 jne 10d442 <_Heap_Walk+0x362> ); return false; } if ( block_size < min_block_size ) { 10d340: 39 4d dc cmp %ecx,-0x24(%ebp) 10d343: 0f 87 0b 01 00 00 ja 10d454 <_Heap_Walk+0x374> ); return false; } if ( next_block_begin <= block_begin ) { 10d349: 39 fe cmp %edi,%esi 10d34b: 0f 83 17 01 00 00 jae 10d468 <_Heap_Walk+0x388> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10d351: f6 47 04 01 testb $0x1,0x4(%edi) 10d355: 0f 85 91 00 00 00 jne 10d3ec <_Heap_Walk+0x30c> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10d35b: 8b 4b 08 mov 0x8(%ebx),%ecx 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; 10d35e: 8b 46 04 mov 0x4(%esi),%eax 10d361: 89 45 cc mov %eax,-0x34(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10d364: 83 e0 fe and $0xfffffffe,%eax 10d367: 89 45 d4 mov %eax,-0x2c(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10d36a: 01 f0 add %esi,%eax 10d36c: 89 45 d0 mov %eax,-0x30(%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)( 10d36f: 8b 56 08 mov 0x8(%esi),%edx 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; 10d372: 39 53 0c cmp %edx,0xc(%ebx) 10d375: 0f 84 99 00 00 00 je 10d414 <_Heap_Walk+0x334> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10d37b: 39 da cmp %ebx,%edx 10d37d: 0f 84 a9 00 00 00 je 10d42c <_Heap_Walk+0x34c> 10d383: c7 45 c8 f9 09 12 00 movl $0x1209f9,-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)( 10d38a: 8b 46 0c mov 0xc(%esi),%eax 10d38d: 39 c1 cmp %eax,%ecx 10d38f: 74 7b je 10d40c <_Heap_Walk+0x32c> "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)" : ""), 10d391: 39 d8 cmp %ebx,%eax 10d393: 0f 84 9f 00 00 00 je 10d438 <_Heap_Walk+0x358> 10d399: b9 f9 09 12 00 mov $0x1209f9,%ecx 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)( 10d39e: ff 75 c8 pushl -0x38(%ebp) 10d3a1: 52 push %edx 10d3a2: 51 push %ecx 10d3a3: 50 push %eax 10d3a4: 56 push %esi 10d3a5: 68 64 0d 12 00 push $0x120d64 10d3aa: 6a 00 push $0x0 10d3ac: ff 75 0c pushl 0xc(%ebp) 10d3af: 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 ) { 10d3b2: 8b 55 d0 mov -0x30(%ebp),%edx 10d3b5: 8b 02 mov (%edx),%eax 10d3b7: 83 c4 20 add $0x20,%esp 10d3ba: 39 45 d4 cmp %eax,-0x2c(%ebp) 10d3bd: 74 11 je 10d3d0 <_Heap_Walk+0x2f0> (*printer)( 10d3bf: 51 push %ecx 10d3c0: 52 push %edx 10d3c1: 50 push %eax 10d3c2: ff 75 d4 pushl -0x2c(%ebp) 10d3c5: 56 push %esi 10d3c6: 68 90 0d 12 00 push $0x120d90 10d3cb: e9 30 fe ff ff jmp 10d200 <_Heap_Walk+0x120> ); return false; } if ( !prev_used ) { 10d3d0: f6 45 cc 01 testb $0x1,-0x34(%ebp) 10d3d4: 74 4a je 10d420 <_Heap_Walk+0x340> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10d3d6: 8b 43 08 mov 0x8(%ebx),%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 ) { 10d3d9: 39 d8 cmp %ebx,%eax 10d3db: 75 0a jne 10d3e7 <_Heap_Walk+0x307> 10d3dd: eb 21 jmp 10d400 <_Heap_Walk+0x320> <== NOT EXECUTED 10d3df: 90 nop <== NOT EXECUTED if ( free_block == block ) { return true; } free_block = free_block->next; 10d3e0: 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 ) { 10d3e3: 39 d8 cmp %ebx,%eax 10d3e5: 74 19 je 10d400 <_Heap_Walk+0x320> if ( free_block == block ) { 10d3e7: 39 f0 cmp %esi,%eax 10d3e9: 75 f5 jne 10d3e0 <_Heap_Walk+0x300> 10d3eb: 90 nop if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10d3ec: 39 7d d8 cmp %edi,-0x28(%ebp) 10d3ef: 0f 84 22 fd ff ff je 10d117 <_Heap_Walk+0x37> 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 ) { 10d3f5: 8b 47 04 mov 0x4(%edi),%eax 10d3f8: 89 fe mov %edi,%esi 10d3fa: e9 e1 fe ff ff jmp 10d2e0 <_Heap_Walk+0x200> 10d3ff: 90 nop <== NOT EXECUTED return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10d400: 56 push %esi 10d401: 68 fc 0d 12 00 push $0x120dfc 10d406: e9 d1 fd ff ff jmp 10d1dc <_Heap_Walk+0xfc> 10d40b: 90 nop <== NOT EXECUTED 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)( 10d40c: b9 b4 0e 12 00 mov $0x120eb4,%ecx 10d411: eb 8b jmp 10d39e <_Heap_Walk+0x2be> 10d413: 90 nop <== NOT EXECUTED } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 10d414: c7 45 c8 a0 0e 12 00 movl $0x120ea0,-0x38(%ebp) 10d41b: e9 6a ff ff ff jmp 10d38a <_Heap_Walk+0x2aa> return false; } if ( !prev_used ) { (*printer)( 10d420: 56 push %esi 10d421: 68 cc 0d 12 00 push $0x120dcc 10d426: e9 b1 fd ff ff jmp 10d1dc <_Heap_Walk+0xfc> 10d42b: 90 nop <== NOT EXECUTED " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10d42c: c7 45 c8 aa 0e 12 00 movl $0x120eaa,-0x38(%ebp) 10d433: e9 52 ff ff ff jmp 10d38a <_Heap_Walk+0x2aa> "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)" : ""), 10d438: b9 bf 0e 12 00 mov $0x120ebf,%ecx 10d43d: e9 5c ff ff ff jmp 10d39e <_Heap_Walk+0x2be> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 10d442: 83 ec 0c sub $0xc,%esp 10d445: 51 push %ecx 10d446: 56 push %esi 10d447: 68 d4 0c 12 00 push $0x120cd4 10d44c: e9 af fd ff ff jmp 10d200 <_Heap_Walk+0x120> 10d451: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return false; } if ( block_size < min_block_size ) { (*printer)( 10d454: 83 ec 08 sub $0x8,%esp 10d457: ff 75 dc pushl -0x24(%ebp) 10d45a: 51 push %ecx 10d45b: 56 push %esi 10d45c: 68 04 0d 12 00 push $0x120d04 10d461: e9 9a fd ff ff jmp 10d200 <_Heap_Walk+0x120> 10d466: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( next_block_begin <= block_begin ) { (*printer)( 10d468: 83 ec 0c sub $0xc,%esp 10d46b: 57 push %edi 10d46c: 56 push %esi 10d46d: 68 30 0d 12 00 push $0x120d30 10d472: e9 89 fd ff ff jmp 10d200 <_Heap_Walk+0x120> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 10d477: 53 push %ebx 10d478: 68 58 0e 12 00 push $0x120e58 10d47d: e9 5a fd ff ff jmp 10d1dc <_Heap_Walk+0xfc> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10d482: 51 push %ecx 10d483: 68 18 0c 12 00 push $0x120c18 10d488: e9 4f fd ff ff jmp 10d1dc <_Heap_Walk+0xfc> return false; } if ( free_block->prev != prev_block ) { (*printer)( 10d48d: 83 ec 0c sub $0xc,%esp 10d490: 50 push %eax 10d491: 51 push %ecx 10d492: 68 48 0c 12 00 push $0x120c48 10d497: e9 64 fd ff ff jmp 10d200 <_Heap_Walk+0x120> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 10d49c: 51 push %ecx 10d49d: 68 6d 0e 12 00 push $0x120e6d 10d4a2: e9 35 fd ff ff jmp 10d1dc <_Heap_Walk+0xfc> 0010bc1c <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 10bc1c: 55 push %ebp 10bc1d: 89 e5 mov %esp,%ebp 10bc1f: 57 push %edi 10bc20: 56 push %esi 10bc21: 53 push %ebx 10bc22: 83 ec 1c sub $0x1c,%esp uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; 10bc25: 8b 1d 54 12 12 00 mov 0x121254,%ebx drivers_in_table = Configuration.number_of_device_drivers; 10bc2b: a1 50 12 12 00 mov 0x121250,%eax 10bc30: 89 45 e4 mov %eax,-0x1c(%ebp) number_of_drivers = Configuration.maximum_drivers; 10bc33: 8b 35 4c 12 12 00 mov 0x12124c,%esi /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 10bc39: 39 f0 cmp %esi,%eax 10bc3b: 72 17 jb 10bc54 <_IO_Manager_initialization+0x38> * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 10bc3d: 89 1d a4 56 12 00 mov %ebx,0x1256a4 _IO_Number_of_drivers = number_of_drivers; 10bc43: 8b 45 e4 mov -0x1c(%ebp),%eax 10bc46: a3 a0 56 12 00 mov %eax,0x1256a0 ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10bc4b: 8d 65 f4 lea -0xc(%ebp),%esp 10bc4e: 5b pop %ebx 10bc4f: 5e pop %esi 10bc50: 5f pop %edi 10bc51: c9 leave 10bc52: c3 ret 10bc53: 90 nop <== NOT EXECUTED /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 10bc54: 8d 0c 76 lea (%esi,%esi,2),%ecx 10bc57: c1 e1 03 shl $0x3,%ecx 10bc5a: 83 ec 0c sub $0xc,%esp 10bc5d: 51 push %ecx 10bc5e: 89 4d dc mov %ecx,-0x24(%ebp) 10bc61: e8 7a 28 00 00 call 10e4e0 <_Workspace_Allocate_or_fatal_error> 10bc66: 89 c2 mov %eax,%edx 10bc68: a3 a4 56 12 00 mov %eax,0x1256a4 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 10bc6d: 89 35 a0 56 12 00 mov %esi,0x1256a0 memset( 10bc73: 31 c0 xor %eax,%eax 10bc75: 8b 4d dc mov -0x24(%ebp),%ecx 10bc78: 89 d7 mov %edx,%edi 10bc7a: f3 aa rep stos %al,%es:(%edi) _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 10bc7c: 83 c4 10 add $0x10,%esp 10bc7f: 8b 4d e4 mov -0x1c(%ebp),%ecx 10bc82: 85 c9 test %ecx,%ecx 10bc84: 74 c5 je 10bc4b <_IO_Manager_initialization+0x2f> 10bc86: a1 a4 56 12 00 mov 0x1256a4,%eax 10bc8b: 89 45 e0 mov %eax,-0x20(%ebp) 10bc8e: 31 c0 xor %eax,%eax 10bc90: 31 d2 xor %edx,%edx 10bc92: 66 90 xchg %ax,%ax _IO_Driver_address_table[index] = driver_table[index]; 10bc94: 8b 7d e0 mov -0x20(%ebp),%edi 10bc97: 01 c7 add %eax,%edi 10bc99: 8d 34 03 lea (%ebx,%eax,1),%esi 10bc9c: b9 06 00 00 00 mov $0x6,%ecx 10bca1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 10bca3: 42 inc %edx 10bca4: 83 c0 18 add $0x18,%eax 10bca7: 39 55 e4 cmp %edx,-0x1c(%ebp) 10bcaa: 77 e8 ja 10bc94 <_IO_Manager_initialization+0x78> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10bcac: 8d 65 f4 lea -0xc(%ebp),%esp 10bcaf: 5b pop %ebx 10bcb0: 5e pop %esi 10bcb1: 5f pop %edi 10bcb2: c9 leave 10bcb3: c3 ret 0010c668 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10c668: 55 push %ebp 10c669: 89 e5 mov %esp,%ebp 10c66b: 53 push %ebx 10c66c: 83 ec 08 sub $0x8,%esp 10c66f: 8b 45 08 mov 0x8(%ebp),%eax 10c672: 8b 55 0c mov 0xc(%ebp),%edx 10c675: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10c678: a3 00 54 12 00 mov %eax,0x125400 _Internal_errors_What_happened.is_internal = is_internal; 10c67d: 88 15 04 54 12 00 mov %dl,0x125404 _Internal_errors_What_happened.the_error = the_error; 10c683: 89 1d 08 54 12 00 mov %ebx,0x125408 _User_extensions_Fatal( the_source, is_internal, the_error ); 10c689: 53 push %ebx 10c68a: 0f b6 d2 movzbl %dl,%edx 10c68d: 52 push %edx 10c68e: 50 push %eax 10c68f: e8 e4 1a 00 00 call 10e178 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10c694: c7 05 20 55 12 00 05 movl $0x5,0x125520 <== NOT EXECUTED 10c69b: 00 00 00 <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10c69e: fa cli <== NOT EXECUTED 10c69f: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10c6a1: f4 hlt <== NOT EXECUTED 10c6a2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10c6a5: eb fe jmp 10c6a5 <_Internal_error_Occurred+0x3d> <== NOT EXECUTED 00110598 <_Objects_API_maximum_class>: #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 110598: 55 push %ebp 110599: 89 e5 mov %esp,%ebp case OBJECTS_NO_API: default: break; } return 0; } 11059b: 8b 45 08 mov 0x8(%ebp),%eax 11059e: 48 dec %eax 11059f: 83 f8 03 cmp $0x3,%eax 1105a2: 77 0c ja 1105b0 <_Objects_API_maximum_class+0x18> 1105a4: 8b 04 85 70 ff 11 00 mov 0x11ff70(,%eax,4),%eax 1105ab: c9 leave 1105ac: c3 ret 1105ad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 1105b0: 31 c0 xor %eax,%eax 1105b2: c9 leave 1105b3: c3 ret 0010c700 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10c700: 55 push %ebp 10c701: 89 e5 mov %esp,%ebp 10c703: 56 push %esi 10c704: 53 push %ebx 10c705: 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 ) 10c708: 8b 43 18 mov 0x18(%ebx),%eax 10c70b: 85 c0 test %eax,%eax 10c70d: 75 0d jne 10c71c <_Objects_Allocate+0x1c> 10c70f: 31 c9 xor %ecx,%ecx <== NOT EXECUTED information->inactive--; } } return the_object; } 10c711: 89 c8 mov %ecx,%eax 10c713: 8d 65 f8 lea -0x8(%ebp),%esp 10c716: 5b pop %ebx 10c717: 5e pop %esi 10c718: c9 leave 10c719: c3 ret 10c71a: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * 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 ); 10c71c: 8d 73 20 lea 0x20(%ebx),%esi 10c71f: 83 ec 0c sub $0xc,%esp 10c722: 56 push %esi 10c723: e8 68 f7 ff ff call 10be90 <_Chain_Get> 10c728: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10c72a: 83 c4 10 add $0x10,%esp 10c72d: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10c731: 74 de je 10c711 <_Objects_Allocate+0x11> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10c733: 85 c0 test %eax,%eax 10c735: 74 29 je 10c760 <_Objects_Allocate+0x60> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10c737: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10c73b: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10c73f: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 10c741: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10c745: 31 d2 xor %edx,%edx 10c747: f7 f6 div %esi 10c749: c1 e0 02 shl $0x2,%eax 10c74c: 03 43 30 add 0x30(%ebx),%eax 10c74f: ff 08 decl (%eax) information->inactive--; 10c751: 66 ff 4b 2c decw 0x2c(%ebx) } } return the_object; } 10c755: 89 c8 mov %ecx,%eax 10c757: 8d 65 f8 lea -0x8(%ebp),%esp 10c75a: 5b pop %ebx 10c75b: 5e pop %esi 10c75c: c9 leave 10c75d: c3 ret 10c75e: 66 90 xchg %ax,%ax <== NOT EXECUTED * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 10c760: 83 ec 0c sub $0xc,%esp 10c763: 53 push %ebx 10c764: e8 3b 00 00 00 call 10c7a4 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10c769: 89 34 24 mov %esi,(%esp) 10c76c: e8 1f f7 ff ff call 10be90 <_Chain_Get> 10c771: 89 c1 mov %eax,%ecx } if ( the_object ) { 10c773: 83 c4 10 add $0x10,%esp 10c776: 85 c0 test %eax,%eax 10c778: 74 97 je 10c711 <_Objects_Allocate+0x11> 10c77a: eb bb jmp 10c737 <_Objects_Allocate+0x37> 0010c7a4 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10c7a4: 55 push %ebp 10c7a5: 89 e5 mov %esp,%ebp 10c7a7: 57 push %edi 10c7a8: 56 push %esi 10c7a9: 53 push %ebx 10c7aa: 83 ec 4c sub $0x4c,%esp 10c7ad: 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 ); 10c7b0: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10c7b4: 89 45 d0 mov %eax,-0x30(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10c7b7: 8b 4b 34 mov 0x34(%ebx),%ecx 10c7ba: 85 c9 test %ecx,%ecx 10c7bc: 0f 84 72 02 00 00 je 10ca34 <_Objects_Extend_information+0x290> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10c7c2: 8b 7b 10 mov 0x10(%ebx),%edi 10c7c5: 66 89 7d d4 mov %di,-0x2c(%ebp) 10c7c9: 8b 7b 14 mov 0x14(%ebx),%edi 10c7cc: 31 d2 xor %edx,%edx 10c7ce: 8b 45 d4 mov -0x2c(%ebp),%eax 10c7d1: 66 f7 f7 div %di 10c7d4: 0f b7 f0 movzwl %ax,%esi for ( ; block < block_count; block++ ) { 10c7d7: 85 f6 test %esi,%esi 10c7d9: 0f 84 6c 02 00 00 je 10ca4b <_Objects_Extend_information+0x2a7> if ( information->object_blocks[ block ] == NULL ) 10c7df: 8b 01 mov (%ecx),%eax 10c7e1: 85 c0 test %eax,%eax 10c7e3: 0f 84 72 02 00 00 je 10ca5b <_Objects_Extend_information+0x2b7> 10c7e9: 0f b7 ff movzwl %di,%edi 10c7ec: 8b 55 d0 mov -0x30(%ebp),%edx 10c7ef: 89 55 cc mov %edx,-0x34(%ebp) 10c7f2: 31 d2 xor %edx,%edx 10c7f4: 8b 45 cc mov -0x34(%ebp),%eax 10c7f7: eb 09 jmp 10c802 <_Objects_Extend_information+0x5e> 10c7f9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c7fc: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4) 10c800: 74 07 je 10c809 <_Objects_Extend_information+0x65> break; else index_base += information->allocation_size; 10c802: 01 f8 add %edi,%eax if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10c804: 42 inc %edx 10c805: 39 d6 cmp %edx,%esi 10c807: 77 f3 ja 10c7fc <_Objects_Extend_information+0x58> 10c809: 89 45 cc mov %eax,-0x34(%ebp) else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10c80c: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax 10c810: 01 f8 add %edi,%eax 10c812: 89 45 d4 mov %eax,-0x2c(%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 ) { 10c815: 3d ff ff 00 00 cmp $0xffff,%eax 10c81a: 0f 87 b1 01 00 00 ja 10c9d1 <_Objects_Extend_information+0x22d> /* * 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; 10c820: 0f af 7b 18 imul 0x18(%ebx),%edi if ( information->auto_extend ) { 10c824: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10c828: 0f 85 ae 01 00 00 jne 10c9dc <_Objects_Extend_information+0x238> new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 10c82e: 83 ec 0c sub $0xc,%esp 10c831: 57 push %edi 10c832: 89 55 b4 mov %edx,-0x4c(%ebp) 10c835: e8 a6 1c 00 00 call 10e4e0 <_Workspace_Allocate_or_fatal_error> 10c83a: 89 45 c4 mov %eax,-0x3c(%ebp) 10c83d: 83 c4 10 add $0x10,%esp 10c840: 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 ) { 10c843: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10c847: 39 45 cc cmp %eax,-0x34(%ebp) 10c84a: 0f 82 fe 00 00 00 jb 10c94e <_Objects_Extend_information+0x1aa> */ /* * Up the block count and maximum */ block_count++; 10c850: 8d 7e 01 lea 0x1(%esi),%edi * 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 ); 10c853: 83 ec 0c sub $0xc,%esp 10c856: 8d 04 7f lea (%edi,%edi,2),%eax 10c859: 03 45 d4 add -0x2c(%ebp),%eax 10c85c: 03 45 d0 add -0x30(%ebp),%eax 10c85f: c1 e0 02 shl $0x2,%eax 10c862: 50 push %eax 10c863: 89 55 b4 mov %edx,-0x4c(%ebp) 10c866: e8 a1 1c 00 00 call 10e50c <_Workspace_Allocate> 10c86b: 89 45 c8 mov %eax,-0x38(%ebp) if ( !object_blocks ) { 10c86e: 83 c4 10 add $0x10,%esp 10c871: 85 c0 test %eax,%eax 10c873: 8b 55 b4 mov -0x4c(%ebp),%edx 10c876: 0f 84 ef 01 00 00 je 10ca6b <_Objects_Extend_information+0x2c7> RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 10c87c: 8b 45 c8 mov -0x38(%ebp),%eax 10c87f: 8d 04 b8 lea (%eax,%edi,4),%eax 10c882: 89 45 b8 mov %eax,-0x48(%ebp) 10c885: 8b 4d c8 mov -0x38(%ebp),%ecx 10c888: 8d 3c f9 lea (%ecx,%edi,8),%edi 10c88b: 89 7d bc mov %edi,-0x44(%ebp) * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 10c88e: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10c892: 39 45 d0 cmp %eax,-0x30(%ebp) 10c895: 0f 82 60 01 00 00 jb 10c9fb <_Objects_Extend_information+0x257> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10c89b: 8b 45 d0 mov -0x30(%ebp),%eax 10c89e: 85 c0 test %eax,%eax 10c8a0: 74 16 je 10c8b8 <_Objects_Extend_information+0x114> information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10c8a2: 31 c0 xor %eax,%eax 10c8a4: 8b 4d bc mov -0x44(%ebp),%ecx 10c8a7: 8b 7d d0 mov -0x30(%ebp),%edi 10c8aa: 66 90 xchg %ax,%ax /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 10c8ac: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10c8b3: 40 inc %eax 10c8b4: 39 c7 cmp %eax,%edi 10c8b6: 77 f4 ja 10c8ac <_Objects_Extend_information+0x108> 10c8b8: c1 e6 02 shl $0x2,%esi 10c8bb: 89 75 c0 mov %esi,-0x40(%ebp) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10c8be: 8b 45 c8 mov -0x38(%ebp),%eax 10c8c1: 8b 7d c0 mov -0x40(%ebp),%edi 10c8c4: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) inactive_per_block[block_count] = 0; 10c8cb: 8b 4d b8 mov -0x48(%ebp),%ecx 10c8ce: c7 04 39 00 00 00 00 movl $0x0,(%ecx,%edi,1) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10c8d5: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10c8d9: 03 75 cc add -0x34(%ebp),%esi * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10c8dc: 39 75 cc cmp %esi,-0x34(%ebp) 10c8df: 73 19 jae 10c8fa <_Objects_Extend_information+0x156> 10c8e1: 8b 7d cc mov -0x34(%ebp),%edi 10c8e4: 8b 45 bc mov -0x44(%ebp),%eax 10c8e7: 8d 0c b8 lea (%eax,%edi,4),%ecx 10c8ea: 89 f8 mov %edi,%eax index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10c8ec: 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++ ) { 10c8f2: 40 inc %eax 10c8f3: 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 ; 10c8f6: 39 f0 cmp %esi,%eax 10c8f8: 72 f2 jb 10c8ec <_Objects_Extend_information+0x148> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10c8fa: 9c pushf 10c8fb: fa cli 10c8fc: 5f pop %edi old_tables = information->object_blocks; 10c8fd: 8b 4b 34 mov 0x34(%ebx),%ecx information->object_blocks = object_blocks; 10c900: 8b 45 c8 mov -0x38(%ebp),%eax 10c903: 89 43 34 mov %eax,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10c906: 8b 45 b8 mov -0x48(%ebp),%eax 10c909: 89 43 30 mov %eax,0x30(%ebx) information->local_table = local_table; 10c90c: 8b 45 bc mov -0x44(%ebp),%eax 10c90f: 89 43 1c mov %eax,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10c912: 8b 45 d4 mov -0x2c(%ebp),%eax 10c915: 66 89 43 10 mov %ax,0x10(%ebx) information->maximum_id = _Objects_Build_id( 10c919: 8b 33 mov (%ebx),%esi 10c91b: c1 e6 18 shl $0x18,%esi 10c91e: 81 ce 00 00 01 00 or $0x10000,%esi 10c924: 0f b7 43 04 movzwl 0x4(%ebx),%eax 10c928: c1 e0 1b shl $0x1b,%eax 10c92b: 09 c6 or %eax,%esi 10c92d: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax 10c931: 09 c6 or %eax,%esi 10c933: 89 73 0c mov %esi,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10c936: 57 push %edi 10c937: 9d popf if ( old_tables ) 10c938: 85 c9 test %ecx,%ecx 10c93a: 74 12 je 10c94e <_Objects_Extend_information+0x1aa> _Workspace_Free( old_tables ); 10c93c: 83 ec 0c sub $0xc,%esp 10c93f: 51 push %ecx 10c940: 89 55 b4 mov %edx,-0x4c(%ebp) 10c943: e8 e0 1b 00 00 call 10e528 <_Workspace_Free> 10c948: 83 c4 10 add $0x10,%esp 10c94b: 8b 55 b4 mov -0x4c(%ebp),%edx } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10c94e: c1 e2 02 shl $0x2,%edx 10c951: 89 55 d0 mov %edx,-0x30(%ebp) 10c954: 8b 43 34 mov 0x34(%ebx),%eax 10c957: 8b 4d c4 mov -0x3c(%ebp),%ecx 10c95a: 89 0c 10 mov %ecx,(%eax,%edx,1) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10c95d: ff 73 18 pushl 0x18(%ebx) 10c960: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10c964: 52 push %edx 10c965: 8b 7d d0 mov -0x30(%ebp),%edi 10c968: ff 34 38 pushl (%eax,%edi,1) 10c96b: 8d 7d dc lea -0x24(%ebp),%edi 10c96e: 57 push %edi 10c96f: e8 c4 36 00 00 call 110038 <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10c974: 8d 43 20 lea 0x20(%ebx),%eax 10c977: 89 45 d4 mov %eax,-0x2c(%ebp) 10c97a: 8b 75 cc mov -0x34(%ebp),%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 ) { 10c97d: 83 c4 10 add $0x10,%esp 10c980: eb 2b jmp 10c9ad <_Objects_Extend_information+0x209> 10c982: 66 90 xchg %ax,%ax <== NOT EXECUTED the_object->id = _Objects_Build_id( 10c984: 8b 13 mov (%ebx),%edx 10c986: c1 e2 18 shl $0x18,%edx 10c989: 81 ca 00 00 01 00 or $0x10000,%edx 10c98f: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10c993: c1 e1 1b shl $0x1b,%ecx 10c996: 09 ca or %ecx,%edx 10c998: 09 f2 or %esi,%edx 10c99a: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10c99d: 83 ec 08 sub $0x8,%esp 10c9a0: 50 push %eax 10c9a1: ff 75 d4 pushl -0x2c(%ebp) 10c9a4: e8 c3 f4 ff ff call 10be6c <_Chain_Append> index++; 10c9a9: 46 inc %esi 10c9aa: 83 c4 10 add $0x10,%esp /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10c9ad: 83 ec 0c sub $0xc,%esp 10c9b0: 57 push %edi 10c9b1: e8 da f4 ff ff call 10be90 <_Chain_Get> 10c9b6: 83 c4 10 add $0x10,%esp 10c9b9: 85 c0 test %eax,%eax 10c9bb: 75 c7 jne 10c984 <_Objects_Extend_information+0x1e0> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10c9bd: 8b 43 30 mov 0x30(%ebx),%eax 10c9c0: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10c9c4: 8b 4d d0 mov -0x30(%ebp),%ecx 10c9c7: 89 14 08 mov %edx,(%eax,%ecx,1) information->inactive = 10c9ca: 8b 43 14 mov 0x14(%ebx),%eax 10c9cd: 66 01 43 2c add %ax,0x2c(%ebx) (Objects_Maximum)(information->inactive + information->allocation_size); } 10c9d1: 8d 65 f4 lea -0xc(%ebp),%esp 10c9d4: 5b pop %ebx 10c9d5: 5e pop %esi 10c9d6: 5f pop %edi 10c9d7: c9 leave 10c9d8: c3 ret 10c9d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); 10c9dc: 83 ec 0c sub $0xc,%esp 10c9df: 57 push %edi 10c9e0: 89 55 b4 mov %edx,-0x4c(%ebp) 10c9e3: e8 24 1b 00 00 call 10e50c <_Workspace_Allocate> 10c9e8: 89 45 c4 mov %eax,-0x3c(%ebp) if ( !new_object_block ) 10c9eb: 83 c4 10 add $0x10,%esp 10c9ee: 85 c0 test %eax,%eax 10c9f0: 8b 55 b4 mov -0x4c(%ebp),%edx 10c9f3: 0f 85 4a fe ff ff jne 10c843 <_Objects_Extend_information+0x9f> 10c9f9: eb d6 jmp 10c9d1 <_Objects_Extend_information+0x22d> /* * 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, 10c9fb: c1 e6 02 shl $0x2,%esi 10c9fe: 89 75 c0 mov %esi,-0x40(%ebp) 10ca01: 8b 73 34 mov 0x34(%ebx),%esi 10ca04: 8b 7d c8 mov -0x38(%ebp),%edi 10ca07: 8b 4d c0 mov -0x40(%ebp),%ecx 10ca0a: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10ca0c: 8b 73 30 mov 0x30(%ebx),%esi 10ca0f: 8b 7d b8 mov -0x48(%ebp),%edi 10ca12: 8b 4d c0 mov -0x40(%ebp),%ecx 10ca15: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10ca17: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10ca1b: 03 45 d0 add -0x30(%ebp),%eax 10ca1e: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx 10ca25: 8b 73 1c mov 0x1c(%ebx),%esi 10ca28: 8b 7d bc mov -0x44(%ebp),%edi 10ca2b: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10ca2d: e9 8c fe ff ff jmp 10c8be <_Objects_Extend_information+0x11a> 10ca32: 66 90 xchg %ax,%ax <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10ca34: 8b 53 10 mov 0x10(%ebx),%edx 10ca37: 66 89 55 d4 mov %dx,-0x2c(%ebp) 10ca3b: 0f b7 7b 14 movzwl 0x14(%ebx),%edi 10ca3f: 89 45 cc mov %eax,-0x34(%ebp) 10ca42: 31 d2 xor %edx,%edx 10ca44: 31 f6 xor %esi,%esi 10ca46: e9 c1 fd ff ff jmp 10c80c <_Objects_Extend_information+0x68> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10ca4b: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED 10ca4e: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 10ca51: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED 10ca54: 31 d2 xor %edx,%edx <== NOT EXECUTED 10ca56: e9 b1 fd ff ff jmp 10c80c <_Objects_Extend_information+0x68> <== NOT EXECUTED if ( information->object_blocks[ block ] == NULL ) 10ca5b: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED 10ca5e: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10ca61: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED 10ca64: 31 d2 xor %edx,%edx <== NOT EXECUTED 10ca66: e9 a1 fd ff ff jmp 10c80c <_Objects_Extend_information+0x68> <== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 10ca6b: 83 ec 0c sub $0xc,%esp 10ca6e: ff 75 c4 pushl -0x3c(%ebp) 10ca71: e8 b2 1a 00 00 call 10e528 <_Workspace_Free> return; 10ca76: 83 c4 10 add $0x10,%esp 10ca79: e9 53 ff ff ff jmp 10c9d1 <_Objects_Extend_information+0x22d> 0010cbb0 <_Objects_Get>: Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 10cbb0: 55 push %ebp 10cbb1: 89 e5 mov %esp,%ebp 10cbb3: 53 push %ebx 10cbb4: 83 ec 14 sub $0x14,%esp 10cbb7: 8b 55 08 mov 0x8(%ebp),%edx 10cbba: 8b 5d 10 mov 0x10(%ebp),%ebx * always NULL. * * If the Id is valid but the object has not been created yet, then * the local_table entry will be NULL. */ index = id - information->minimum_id + 1; 10cbbd: b8 01 00 00 00 mov $0x1,%eax 10cbc2: 2b 42 08 sub 0x8(%edx),%eax 10cbc5: 03 45 0c add 0xc(%ebp),%eax /* * If the index is less than maximum, then it is OK to use it to * index into the local_table array. */ if ( index <= information->maximum ) { 10cbc8: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10cbcc: 39 c8 cmp %ecx,%eax 10cbce: 77 24 ja 10cbf4 <_Objects_Get+0x44> 10cbd0: 8b 0d 58 53 12 00 mov 0x125358,%ecx 10cbd6: 41 inc %ecx 10cbd7: 89 0d 58 53 12 00 mov %ecx,0x125358 _Thread_Disable_dispatch(); if ( (the_object = information->local_table[ index ]) != NULL ) { 10cbdd: 8b 52 1c mov 0x1c(%edx),%edx 10cbe0: 8b 04 82 mov (%edx,%eax,4),%eax 10cbe3: 85 c0 test %eax,%eax 10cbe5: 74 1b je 10cc02 <_Objects_Get+0x52> *location = OBJECTS_LOCAL; 10cbe7: c7 03 00 00 00 00 movl $0x0,(%ebx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cbed: 83 c4 14 add $0x14,%esp 10cbf0: 5b pop %ebx 10cbf1: c9 leave 10cbf2: c3 ret 10cbf3: 90 nop <== NOT EXECUTED /* * Object Id is not within this API and Class on this node. So * it may be global in a multiprocessing system. But it is clearly * invalid on a single processor system. */ *location = OBJECTS_ERROR; 10cbf4: c7 03 01 00 00 00 movl $0x1,(%ebx) 10cbfa: 31 c0 xor %eax,%eax _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cbfc: 83 c4 14 add $0x14,%esp 10cbff: 5b pop %ebx 10cc00: c9 leave 10cc01: c3 ret /* * Valid Id for this API, Class and Node but the object has not * been allocated yet. */ _Thread_Enable_dispatch(); 10cc02: 89 45 f4 mov %eax,-0xc(%ebp) 10cc05: e8 ee 07 00 00 call 10d3f8 <_Thread_Enable_dispatch> *location = OBJECTS_ERROR; 10cc0a: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10cc10: 8b 45 f4 mov -0xc(%ebp),%eax 10cc13: eb d8 jmp 10cbed <_Objects_Get+0x3d> 0010cb58 <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10cb58: 55 push %ebp 10cb59: 89 e5 mov %esp,%ebp 10cb5b: 56 push %esi 10cb5c: 53 push %ebx 10cb5d: 8b 55 08 mov 0x8(%ebp),%edx 10cb60: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 10cb63: b8 01 00 00 00 mov $0x1,%eax 10cb68: 2b 42 08 sub 0x8(%edx),%eax 10cb6b: 03 45 0c add 0xc(%ebp),%eax _ISR_Disable( level ); 10cb6e: 9c pushf 10cb6f: fa cli 10cb70: 5e pop %esi if ( information->maximum >= index ) { 10cb71: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10cb75: 39 c8 cmp %ecx,%eax 10cb77: 77 1b ja 10cb94 <_Objects_Get_isr_disable+0x3c> if ( (the_object = information->local_table[ index ]) != NULL ) { 10cb79: 8b 52 1c mov 0x1c(%edx),%edx 10cb7c: 8b 04 82 mov (%edx,%eax,4),%eax 10cb7f: 85 c0 test %eax,%eax 10cb81: 74 21 je 10cba4 <_Objects_Get_isr_disable+0x4c> *location = OBJECTS_LOCAL; 10cb83: c7 03 00 00 00 00 movl $0x0,(%ebx) *level_p = level; 10cb89: 8b 55 14 mov 0x14(%ebp),%edx 10cb8c: 89 32 mov %esi,(%edx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cb8e: 5b pop %ebx 10cb8f: 5e pop %esi 10cb90: c9 leave 10cb91: c3 ret 10cb92: 66 90 xchg %ax,%ax <== NOT EXECUTED } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 10cb94: 56 push %esi 10cb95: 9d popf *location = OBJECTS_ERROR; 10cb96: c7 03 01 00 00 00 movl $0x1,(%ebx) 10cb9c: 31 c0 xor %eax,%eax _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cb9e: 5b pop %ebx 10cb9f: 5e pop %esi 10cba0: c9 leave 10cba1: c3 ret 10cba2: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( (the_object = information->local_table[ index ]) != NULL ) { *location = OBJECTS_LOCAL; *level_p = level; return the_object; } _ISR_Enable( level ); 10cba4: 56 push %esi 10cba5: 9d popf *location = OBJECTS_ERROR; 10cba6: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10cbac: eb e0 jmp 10cb8e <_Objects_Get_isr_disable+0x36> 00117d54 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 117d54: 55 push %ebp 117d55: 89 e5 mov %esp,%ebp 117d57: 57 push %edi 117d58: 56 push %esi 117d59: 53 push %ebx 117d5a: 83 ec 2c sub $0x2c,%esp 117d5d: 8b 7d 08 mov 0x8(%ebp),%edi 117d60: 8b 75 0c mov 0xc(%ebp),%esi 117d63: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 117d66: 85 f6 test %esi,%esi 117d68: 75 0e jne 117d78 <_Objects_Get_name_as_string+0x24> } } *d = '\0'; _Thread_Enable_dispatch(); return name; 117d6a: 31 db xor %ebx,%ebx } return NULL; /* unreachable path */ } 117d6c: 89 d8 mov %ebx,%eax 117d6e: 8d 65 f4 lea -0xc(%ebp),%esp 117d71: 5b pop %ebx 117d72: 5e pop %esi 117d73: 5f pop %edi 117d74: c9 leave 117d75: c3 ret 117d76: 66 90 xchg %ax,%ax <== NOT EXECUTED Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 117d78: 85 db test %ebx,%ebx 117d7a: 74 f0 je 117d6c <_Objects_Get_name_as_string+0x18> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 117d7c: 85 ff test %edi,%edi 117d7e: 75 08 jne 117d88 <_Objects_Get_name_as_string+0x34> 117d80: a1 b8 3a 13 00 mov 0x133ab8,%eax 117d85: 8b 78 08 mov 0x8(%eax),%edi information = _Objects_Get_information_id( tmpId ); 117d88: 83 ec 0c sub $0xc,%esp 117d8b: 57 push %edi 117d8c: e8 2f 9a ff ff call 1117c0 <_Objects_Get_information_id> if ( !information ) 117d91: 83 c4 10 add $0x10,%esp 117d94: 85 c0 test %eax,%eax 117d96: 74 d2 je 117d6a <_Objects_Get_name_as_string+0x16> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 117d98: 51 push %ecx 117d99: 8d 55 e4 lea -0x1c(%ebp),%edx 117d9c: 52 push %edx 117d9d: 57 push %edi 117d9e: 50 push %eax 117d9f: e8 dc 9a ff ff call 111880 <_Objects_Get> switch ( location ) { 117da4: 83 c4 10 add $0x10,%esp 117da7: 8b 55 e4 mov -0x1c(%ebp),%edx 117daa: 85 d2 test %edx,%edx 117dac: 75 bc jne 117d6a <_Objects_Get_name_as_string+0x16> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 117dae: 8b 50 0c mov 0xc(%eax),%edx lname[ 0 ] = (u32_name >> 24) & 0xff; 117db1: 89 d1 mov %edx,%ecx 117db3: c1 e9 18 shr $0x18,%ecx 117db6: 88 c8 mov %cl,%al 117db8: 88 4d df mov %cl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 117dbb: 89 d1 mov %edx,%ecx 117dbd: c1 e9 10 shr $0x10,%ecx 117dc0: 88 4d e0 mov %cl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 117dc3: 89 d1 mov %edx,%ecx 117dc5: c1 e9 08 shr $0x8,%ecx 117dc8: 88 4d e1 mov %cl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 117dcb: 88 55 e2 mov %dl,-0x1e(%ebp) lname[ 4 ] = '\0'; 117dce: c6 45 e3 00 movb $0x0,-0x1d(%ebp) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 117dd2: 4e dec %esi 117dd3: 89 75 d4 mov %esi,-0x2c(%ebp) 117dd6: 74 3c je 117e14 <_Objects_Get_name_as_string+0xc0> 117dd8: 84 c0 test %al,%al 117dda: 74 38 je 117e14 <_Objects_Get_name_as_string+0xc0> 117ddc: 89 d9 mov %ebx,%ecx 117dde: 31 d2 xor %edx,%edx 117de0: eb 0a jmp 117dec <_Objects_Get_name_as_string+0x98> 117de2: 66 90 xchg %ax,%ax <== NOT EXECUTED 117de4: 8a 44 15 df mov -0x21(%ebp,%edx,1),%al 117de8: 84 c0 test %al,%al 117dea: 74 1b je 117e07 <_Objects_Get_name_as_string+0xb3> *d = (isprint((unsigned char)*s)) ? *s : '*'; 117dec: 0f b6 f0 movzbl %al,%esi 117def: 8b 3d 58 10 13 00 mov 0x131058,%edi 117df5: f6 44 37 01 97 testb $0x97,0x1(%edi,%esi,1) 117dfa: 75 02 jne 117dfe <_Objects_Get_name_as_string+0xaa> 117dfc: b0 2a mov $0x2a,%al 117dfe: 88 01 mov %al,(%ecx) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 117e00: 42 inc %edx 117e01: 41 inc %ecx 117e02: 3b 55 d4 cmp -0x2c(%ebp),%edx 117e05: 72 dd jb 117de4 <_Objects_Get_name_as_string+0x90> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 117e07: c6 01 00 movb $0x0,(%ecx) _Thread_Enable_dispatch(); 117e0a: e8 21 a3 ff ff call 112130 <_Thread_Enable_dispatch> return name; 117e0f: e9 58 ff ff ff jmp 117d6c <_Objects_Get_name_as_string+0x18> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 117e14: 89 d9 mov %ebx,%ecx 117e16: eb ef jmp 117e07 <_Objects_Get_name_as_string+0xb3> 0011a390 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 11a390: 55 push %ebp 11a391: 89 e5 mov %esp,%ebp 11a393: 57 push %edi 11a394: 56 push %esi 11a395: 53 push %ebx 11a396: 83 ec 0c sub $0xc,%esp 11a399: 8b 5d 08 mov 0x8(%ebp),%ebx 11a39c: 8b 75 0c mov 0xc(%ebp),%esi 11a39f: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Control *object; Objects_Id next_id; if ( !information ) 11a3a2: 85 db test %ebx,%ebx 11a3a4: 75 0a jne 11a3b0 <_Objects_Get_next+0x20> *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; 11a3a6: 31 c0 xor %eax,%eax } 11a3a8: 8d 65 f4 lea -0xc(%ebp),%esp 11a3ab: 5b pop %ebx 11a3ac: 5e pop %esi 11a3ad: 5f pop %edi 11a3ae: c9 leave 11a3af: c3 ret Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 11a3b0: 85 ff test %edi,%edi 11a3b2: 74 f2 je 11a3a6 <_Objects_Get_next+0x16> return NULL; if ( !next_id_p ) 11a3b4: 8b 45 14 mov 0x14(%ebp),%eax 11a3b7: 85 c0 test %eax,%eax 11a3b9: 74 eb je 11a3a6 <_Objects_Get_next+0x16> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 11a3bb: 66 85 f6 test %si,%si 11a3be: 75 04 jne 11a3c4 <_Objects_Get_next+0x34> next_id = information->minimum_id; 11a3c0: 8b 73 08 mov 0x8(%ebx),%esi 11a3c3: 90 nop else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 11a3c4: 66 39 73 10 cmp %si,0x10(%ebx) 11a3c8: 72 22 jb 11a3ec <_Objects_Get_next+0x5c> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 11a3ca: 51 push %ecx 11a3cb: 57 push %edi 11a3cc: 56 push %esi 11a3cd: 53 push %ebx 11a3ce: e8 ad 74 ff ff call 111880 <_Objects_Get> next_id++; 11a3d3: 46 inc %esi } while (*location_p != OBJECTS_LOCAL); 11a3d4: 83 c4 10 add $0x10,%esp 11a3d7: 8b 17 mov (%edi),%edx 11a3d9: 85 d2 test %edx,%edx 11a3db: 75 e7 jne 11a3c4 <_Objects_Get_next+0x34> *next_id_p = next_id; 11a3dd: 8b 55 14 mov 0x14(%ebp),%edx 11a3e0: 89 32 mov %esi,(%edx) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 11a3e2: 8d 65 f4 lea -0xc(%ebp),%esp 11a3e5: 5b pop %ebx 11a3e6: 5e pop %esi 11a3e7: 5f pop %edi 11a3e8: c9 leave 11a3e9: c3 ret 11a3ea: 66 90 xchg %ax,%ax <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 11a3ec: c7 07 01 00 00 00 movl $0x1,(%edi) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 11a3f2: 8b 45 14 mov 0x14(%ebp),%eax 11a3f5: c7 00 ff ff ff ff movl $0xffffffff,(%eax) 11a3fb: 31 c0 xor %eax,%eax return 0; 11a3fd: eb a9 jmp 11a3a8 <_Objects_Get_next+0x18> 0010cc18 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10cc18: 55 push %ebp 10cc19: 89 e5 mov %esp,%ebp 10cc1b: 57 push %edi 10cc1c: 56 push %esi 10cc1d: 53 push %ebx 10cc1e: 83 ec 0c sub $0xc,%esp 10cc21: 8b 45 08 mov 0x8(%ebp),%eax 10cc24: 8b 55 0c mov 0xc(%ebp),%edx 10cc27: 8b 5d 10 mov 0x10(%ebp),%ebx 10cc2a: 8b 75 20 mov 0x20(%ebp),%esi 10cc2d: 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; 10cc31: 89 10 mov %edx,(%eax) information->the_class = the_class; 10cc33: 66 89 58 04 mov %bx,0x4(%eax) information->size = size; 10cc37: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10cc3a: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10cc41: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10cc48: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10cc4f: 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; 10cc55: 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; 10cc5b: 8b 3c 95 2c 53 12 00 mov 0x12532c(,%edx,4),%edi 10cc62: 89 04 9f mov %eax,(%edi,%ebx,4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 10cc65: 8b 7d 14 mov 0x14(%ebp),%edi 10cc68: 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 = 10cc6b: 89 f9 mov %edi,%ecx 10cc6d: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10cc70: 8b 4d 14 mov 0x14(%ebp),%ecx 10cc73: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10cc79: 85 ff test %edi,%edi 10cc7b: 74 04 je 10cc81 <_Objects_Initialize_information+0x69> 10cc7d: 85 c9 test %ecx,%ecx 10cc7f: 74 6a je 10cceb <_Objects_Initialize_information+0xd3> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10cc81: 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; 10cc85: c7 40 1c 84 4f 12 00 movl $0x124f84,0x1c(%eax) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 10cc8c: c1 e2 18 shl $0x18,%edx 10cc8f: 81 ca 00 00 01 00 or $0x10000,%edx 10cc95: c1 e3 1b shl $0x1b,%ebx 10cc98: 09 da or %ebx,%edx 10cc9a: 31 db xor %ebx,%ebx 10cc9c: 85 c9 test %ecx,%ecx 10cc9e: 0f 95 c3 setne %bl 10cca1: 09 da or %ebx,%edx 10cca3: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10cca6: f7 c6 03 00 00 00 test $0x3,%esi 10ccac: 75 26 jne 10ccd4 <_Objects_Initialize_information+0xbc> name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10ccae: 66 89 70 38 mov %si,0x38(%eax) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10ccb2: 8d 50 24 lea 0x24(%eax),%edx 10ccb5: 89 50 20 mov %edx,0x20(%eax) the_chain->permanent_null = NULL; 10ccb8: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) the_chain->last = _Chain_Head(the_chain); 10ccbf: 8d 50 20 lea 0x20(%eax),%edx 10ccc2: 89 50 28 mov %edx,0x28(%eax) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10ccc5: 85 c9 test %ecx,%ecx 10ccc7: 75 13 jne 10ccdc <_Objects_Initialize_information+0xc4> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10ccc9: 8d 65 f4 lea -0xc(%ebp),%esp 10cccc: 5b pop %ebx 10cccd: 5e pop %esi 10ccce: 5f pop %edi 10cccf: c9 leave 10ccd0: c3 ret 10ccd1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 10ccd4: 83 c6 04 add $0x4,%esi <== NOT EXECUTED 10ccd7: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED 10ccda: eb d2 jmp 10ccae <_Objects_Initialize_information+0x96> <== NOT EXECUTED /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 10ccdc: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10ccdf: 8d 65 f4 lea -0xc(%ebp),%esp 10cce2: 5b pop %ebx 10cce3: 5e pop %esi 10cce4: 5f pop %edi 10cce5: 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 ); 10cce6: e9 b9 fa ff ff jmp 10c7a4 <_Objects_Extend_information> /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 10cceb: 50 push %eax 10ccec: 6a 14 push $0x14 10ccee: 6a 01 push $0x1 10ccf0: 6a 00 push $0x0 10ccf2: e8 71 f9 ff ff call 10c668 <_Internal_error_Occurred> 0010cd08 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10cd08: 55 push %ebp 10cd09: 89 e5 mov %esp,%ebp 10cd0b: 57 push %edi 10cd0c: 56 push %esi 10cd0d: 53 push %ebx 10cd0e: 8b 45 08 mov 0x8(%ebp),%eax 10cd11: 8b 4d 0c mov 0xc(%ebp),%ecx 10cd14: 8b 55 10 mov 0x10(%ebp),%edx 10cd17: 8b 7d 14 mov 0x14(%ebp),%edi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10cd1a: 85 ff test %edi,%edi 10cd1c: 74 56 je 10cd74 <_Objects_Name_to_id_u32+0x6c> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10cd1e: 85 c9 test %ecx,%ecx 10cd20: 74 08 je 10cd2a <_Objects_Name_to_id_u32+0x22> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10cd22: 8b 70 10 mov 0x10(%eax),%esi 10cd25: 66 85 f6 test %si,%si 10cd28: 75 0a jne 10cd34 <_Objects_Name_to_id_u32+0x2c> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10cd2a: b8 01 00 00 00 mov $0x1,%eax name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 10cd2f: 5b pop %ebx 10cd30: 5e pop %esi 10cd31: 5f pop %edi 10cd32: c9 leave 10cd33: c3 ret if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10cd34: 85 d2 test %edx,%edx 10cd36: 75 20 jne 10cd58 <_Objects_Name_to_id_u32+0x50> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10cd38: 0f b7 f6 movzwl %si,%esi 10cd3b: 8b 58 1c mov 0x1c(%eax),%ebx 10cd3e: b8 01 00 00 00 mov $0x1,%eax 10cd43: 90 nop the_object = information->local_table[ index ]; 10cd44: 8b 14 83 mov (%ebx,%eax,4),%edx if ( !the_object ) 10cd47: 85 d2 test %edx,%edx 10cd49: 74 05 je 10cd50 <_Objects_Name_to_id_u32+0x48> continue; if ( name == the_object->name.name_u32 ) { 10cd4b: 39 4a 0c cmp %ecx,0xc(%edx) 10cd4e: 74 18 je 10cd68 <_Objects_Name_to_id_u32+0x60> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10cd50: 40 inc %eax 10cd51: 39 c6 cmp %eax,%esi 10cd53: 73 ef jae 10cd44 <_Objects_Name_to_id_u32+0x3c> 10cd55: eb d3 jmp 10cd2a <_Objects_Name_to_id_u32+0x22> 10cd57: 90 nop <== NOT EXECUTED if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10cd58: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10cd5e: 74 d8 je 10cd38 <_Objects_Name_to_id_u32+0x30> 10cd60: 4a dec %edx 10cd61: 75 c7 jne 10cd2a <_Objects_Name_to_id_u32+0x22> 10cd63: eb d3 jmp 10cd38 <_Objects_Name_to_id_u32+0x30> 10cd65: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_object = information->local_table[ index ]; if ( !the_object ) continue; if ( name == the_object->name.name_u32 ) { *id = the_object->id; 10cd68: 8b 42 08 mov 0x8(%edx),%eax 10cd6b: 89 07 mov %eax,(%edi) 10cd6d: 31 c0 xor %eax,%eax name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 10cd6f: 5b pop %ebx 10cd70: 5e pop %esi 10cd71: 5f pop %edi 10cd72: c9 leave 10cd73: c3 ret Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10cd74: b8 02 00 00 00 mov $0x2,%eax name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 10cd79: 5b pop %ebx 10cd7a: 5e pop %esi 10cd7b: 5f pop %edi 10cd7c: c9 leave 10cd7d: c3 ret 0010eaf8 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10eaf8: 55 push %ebp 10eaf9: 89 e5 mov %esp,%ebp 10eafb: 53 push %ebx 10eafc: 83 ec 0c sub $0xc,%esp 10eaff: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10eb02: 8b 45 08 mov 0x8(%ebp),%eax 10eb05: 0f b7 40 38 movzwl 0x38(%eax),%eax 10eb09: 50 push %eax 10eb0a: 53 push %ebx 10eb0b: e8 68 66 00 00 call 115178 d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10eb10: 0f be 0b movsbl (%ebx),%ecx 10eb13: c1 e1 18 shl $0x18,%ecx 10eb16: 83 c4 10 add $0x10,%esp 10eb19: 83 f8 01 cmp $0x1,%eax 10eb1c: 76 32 jbe 10eb50 <_Objects_Set_name+0x58> 10eb1e: 0f be 53 01 movsbl 0x1(%ebx),%edx 10eb22: c1 e2 10 shl $0x10,%edx 10eb25: 09 ca or %ecx,%edx 10eb27: 83 f8 02 cmp $0x2,%eax 10eb2a: 74 2c je 10eb58 <_Objects_Set_name+0x60> 10eb2c: 0f be 4b 02 movsbl 0x2(%ebx),%ecx 10eb30: c1 e1 08 shl $0x8,%ecx 10eb33: 09 d1 or %edx,%ecx 10eb35: 83 f8 03 cmp $0x3,%eax 10eb38: 74 37 je 10eb71 <_Objects_Set_name+0x79> 10eb3a: 0f be 43 03 movsbl 0x3(%ebx),%eax 10eb3e: 09 c1 or %eax,%ecx 10eb40: 8b 55 0c mov 0xc(%ebp),%edx 10eb43: 89 4a 0c mov %ecx,0xc(%edx) ); } return true; } 10eb46: b0 01 mov $0x1,%al 10eb48: 8b 5d fc mov -0x4(%ebp),%ebx 10eb4b: c9 leave 10eb4c: c3 ret 10eb4d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10eb50: 89 ca mov %ecx,%edx 10eb52: 81 ca 00 00 20 00 or $0x200000,%edx 10eb58: 89 d1 mov %edx,%ecx 10eb5a: 80 cd 20 or $0x20,%ch 10eb5d: b8 20 00 00 00 mov $0x20,%eax 10eb62: 09 c1 or %eax,%ecx 10eb64: 8b 55 0c mov 0xc(%ebp),%edx 10eb67: 89 4a 0c mov %ecx,0xc(%edx) ); } return true; } 10eb6a: b0 01 mov $0x1,%al 10eb6c: 8b 5d fc mov -0x4(%ebp),%ebx 10eb6f: c9 leave 10eb70: c3 ret d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10eb71: b0 20 mov $0x20,%al 10eb73: eb c9 jmp 10eb3e <_Objects_Set_name+0x46> 0010cd80 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10cd80: 55 push %ebp 10cd81: 89 e5 mov %esp,%ebp 10cd83: 57 push %edi 10cd84: 56 push %esi 10cd85: 53 push %ebx 10cd86: 83 ec 1c sub $0x1c,%esp /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 10cd89: 8b 45 08 mov 0x8(%ebp),%eax 10cd8c: 0f b7 58 08 movzwl 0x8(%eax),%ebx block_count = (information->maximum - index_base) / 10cd90: 0f b7 48 14 movzwl 0x14(%eax),%ecx 10cd94: 0f b7 40 10 movzwl 0x10(%eax),%eax 10cd98: 29 d8 sub %ebx,%eax 10cd9a: 31 d2 xor %edx,%edx 10cd9c: f7 f1 div %ecx information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10cd9e: 85 c0 test %eax,%eax 10cda0: 74 21 je 10cdc3 <_Objects_Shrink_information+0x43> if ( information->inactive_per_block[ block ] == 10cda2: 8b 55 08 mov 0x8(%ebp),%edx 10cda5: 8b 7a 30 mov 0x30(%edx),%edi 10cda8: 3b 0f cmp (%edi),%ecx 10cdaa: 74 1f je 10cdcb <_Objects_Shrink_information+0x4b> information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 10cdac: 31 d2 xor %edx,%edx 10cdae: eb 0e jmp 10cdbe <_Objects_Shrink_information+0x3e> } index_base += information->allocation_size; 10cdb0: 01 cb add %ecx,%ebx 10cdb2: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 10cdb9: 3b 0c 97 cmp (%edi,%edx,4),%ecx 10cdbc: 74 12 je 10cdd0 <_Objects_Shrink_information+0x50> index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10cdbe: 42 inc %edx 10cdbf: 39 d0 cmp %edx,%eax 10cdc1: 77 ed ja 10cdb0 <_Objects_Shrink_information+0x30> return; } index_base += information->allocation_size; } } 10cdc3: 8d 65 f4 lea -0xc(%ebp),%esp 10cdc6: 5b pop %ebx 10cdc7: 5e pop %esi 10cdc8: 5f pop %edi 10cdc9: c9 leave 10cdca: c3 ret index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 10cdcb: 31 f6 xor %esi,%esi <== NOT EXECUTED 10cdcd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 10cdd0: 8b 55 08 mov 0x8(%ebp),%edx 10cdd3: 8b 42 20 mov 0x20(%edx),%eax 10cdd6: 89 75 e4 mov %esi,-0x1c(%ebp) 10cdd9: eb 07 jmp 10cde2 <_Objects_Shrink_information+0x62> 10cddb: 90 nop <== NOT EXECUTED if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 10cddc: 85 ff test %edi,%edi 10cdde: 74 2c je 10ce0c <_Objects_Shrink_information+0x8c> 10cde0: 89 f8 mov %edi,%eax * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id ); 10cde2: 0f b7 50 08 movzwl 0x8(%eax),%edx /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 10cde6: 8b 38 mov (%eax),%edi if ((index >= index_base) && 10cde8: 39 da cmp %ebx,%edx 10cdea: 72 f0 jb 10cddc <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { 10cdec: 8b 75 08 mov 0x8(%ebp),%esi 10cdef: 0f b7 4e 14 movzwl 0x14(%esi),%ecx 10cdf3: 8d 0c 0b lea (%ebx,%ecx,1),%ecx 10cdf6: 39 ca cmp %ecx,%edx 10cdf8: 73 e2 jae 10cddc <_Objects_Shrink_information+0x5c> _Chain_Extract( &extract_me->Node ); 10cdfa: 83 ec 0c sub $0xc,%esp 10cdfd: 50 push %eax 10cdfe: e8 1d 32 00 00 call 110020 <_Chain_Extract> 10ce03: 83 c4 10 add $0x10,%esp } } while ( the_object ); 10ce06: 85 ff test %edi,%edi 10ce08: 75 d6 jne 10cde0 <_Objects_Shrink_information+0x60> 10ce0a: 66 90 xchg %ax,%ax 10ce0c: 8b 75 e4 mov -0x1c(%ebp),%esi /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10ce0f: 83 ec 0c sub $0xc,%esp 10ce12: 8b 55 08 mov 0x8(%ebp),%edx 10ce15: 8b 42 34 mov 0x34(%edx),%eax 10ce18: ff 34 30 pushl (%eax,%esi,1) 10ce1b: e8 08 17 00 00 call 10e528 <_Workspace_Free> information->object_blocks[ block ] = NULL; 10ce20: 8b 55 08 mov 0x8(%ebp),%edx 10ce23: 8b 42 34 mov 0x34(%edx),%eax 10ce26: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive_per_block[ block ] = 0; 10ce2d: 8b 42 30 mov 0x30(%edx),%eax 10ce30: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive -= information->allocation_size; 10ce37: 8b 42 14 mov 0x14(%edx),%eax 10ce3a: 66 29 42 2c sub %ax,0x2c(%edx) return; 10ce3e: 83 c4 10 add $0x10,%esp } index_base += information->allocation_size; } } 10ce41: 8d 65 f4 lea -0xc(%ebp),%esp 10ce44: 5b pop %ebx 10ce45: 5e pop %esi 10ce46: 5f pop %edi 10ce47: c9 leave 10ce48: c3 ret 0012e4a4 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 12e4a4: 55 push %ebp 12e4a5: 89 e5 mov %esp,%ebp 12e4a7: 56 push %esi 12e4a8: 53 push %ebx 12e4a9: 8b 5d 08 mov 0x8(%ebp),%ebx 12e4ac: 8b 75 0c mov 0xc(%ebp),%esi if ( !the_heap ) 12e4af: 85 db test %ebx,%ebx 12e4b1: 74 35 je 12e4e8 <_Protected_heap_Get_information+0x44> return false; if ( !the_info ) 12e4b3: 85 f6 test %esi,%esi 12e4b5: 74 31 je 12e4e8 <_Protected_heap_Get_information+0x44> return false; _RTEMS_Lock_allocator(); 12e4b7: 83 ec 0c sub $0xc,%esp 12e4ba: ff 35 b0 df 16 00 pushl 0x16dfb0 12e4c0: e8 77 38 fe ff call 111d3c <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 12e4c5: 5a pop %edx 12e4c6: 59 pop %ecx 12e4c7: 56 push %esi 12e4c8: 53 push %ebx 12e4c9: e8 f6 e5 00 00 call 13cac4 <_Heap_Get_information> _RTEMS_Unlock_allocator(); 12e4ce: 58 pop %eax 12e4cf: ff 35 b0 df 16 00 pushl 0x16dfb0 12e4d5: e8 aa 38 fe ff call 111d84 <_API_Mutex_Unlock> 12e4da: b0 01 mov $0x1,%al return true; 12e4dc: 83 c4 10 add $0x10,%esp } 12e4df: 8d 65 f8 lea -0x8(%ebp),%esp 12e4e2: 5b pop %ebx 12e4e3: 5e pop %esi 12e4e4: c9 leave 12e4e5: c3 ret 12e4e6: 66 90 xchg %ax,%ax <== NOT EXECUTED _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); return true; 12e4e8: 31 c0 xor %eax,%eax } 12e4ea: 8d 65 f8 lea -0x8(%ebp),%esp 12e4ed: 5b pop %ebx 12e4ee: 5e pop %esi 12e4ef: c9 leave 12e4f0: c3 ret 0011069c <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 11069c: 55 push %ebp 11069d: 89 e5 mov %esp,%ebp 11069f: 56 push %esi 1106a0: 53 push %ebx 1106a1: 83 ec 10 sub $0x10,%esp 1106a4: 8b 5d 08 mov 0x8(%ebp),%ebx 1106a7: 8b 75 0c mov 0xc(%ebp),%esi 1106aa: 8a 45 10 mov 0x10(%ebp),%al * then it is forbidden to lock a mutex. But since we are inside * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { 1106ad: 8b 15 78 ca 12 00 mov 0x12ca78,%edx 1106b3: 85 d2 test %edx,%edx 1106b5: 74 19 je 1106d0 <_Protected_heap_Walk+0x34> _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 1106b7: 0f b6 c0 movzbl %al,%eax 1106ba: 89 45 10 mov %eax,0x10(%ebp) 1106bd: 89 75 0c mov %esi,0xc(%ebp) 1106c0: 89 5d 08 mov %ebx,0x8(%ebp) } return status; } 1106c3: 8d 65 f8 lea -0x8(%ebp),%esp 1106c6: 5b pop %ebx 1106c7: 5e pop %esi 1106c8: c9 leave if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 1106c9: e9 1e f2 ff ff jmp 10f8ec <_Heap_Walk> 1106ce: 66 90 xchg %ax,%ax <== NOT EXECUTED * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); 1106d0: 83 ec 0c sub $0xc,%esp 1106d3: ff 35 30 cb 12 00 pushl 0x12cb30 1106d9: 88 45 f4 mov %al,-0xc(%ebp) 1106dc: e8 9b e4 ff ff call 10eb7c <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 1106e1: 83 c4 0c add $0xc,%esp 1106e4: 8a 45 f4 mov -0xc(%ebp),%al 1106e7: 0f b6 c0 movzbl %al,%eax 1106ea: 50 push %eax 1106eb: 56 push %esi 1106ec: 53 push %ebx 1106ed: e8 fa f1 ff ff call 10f8ec <_Heap_Walk> _RTEMS_Unlock_allocator(); 1106f2: 5a pop %edx 1106f3: ff 35 30 cb 12 00 pushl 0x12cb30 1106f9: 88 45 f4 mov %al,-0xc(%ebp) 1106fc: e8 c3 e4 ff ff call 10ebc4 <_API_Mutex_Unlock> 110701: 83 c4 10 add $0x10,%esp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 110704: 8a 45 f4 mov -0xc(%ebp),%al 110707: 8d 65 f8 lea -0x8(%ebp),%esp 11070a: 5b pop %ebx 11070b: 5e pop %esi 11070c: c9 leave 11070d: c3 ret 0010fd60 <_RTEMS_tasks_Initialize_user_tasks>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks( void ) { 10fd60: 55 push %ebp 10fd61: 89 e5 mov %esp,%ebp 10fd63: 83 ec 08 sub $0x8,%esp if ( _RTEMS_tasks_Initialize_user_tasks_p ) 10fd66: a1 60 12 12 00 mov 0x121260,%eax 10fd6b: 85 c0 test %eax,%eax 10fd6d: 74 05 je 10fd74 <_RTEMS_tasks_Initialize_user_tasks+0x14> (*_RTEMS_tasks_Initialize_user_tasks_p)(); } 10fd6f: c9 leave */ void _RTEMS_tasks_Initialize_user_tasks( void ) { if ( _RTEMS_tasks_Initialize_user_tasks_p ) (*_RTEMS_tasks_Initialize_user_tasks_p)(); 10fd70: ff e0 jmp *%eax 10fd72: 66 90 xchg %ax,%ax <== NOT EXECUTED } 10fd74: c9 leave 10fd75: c3 ret 0013c560 <_Rate_monotonic_Get_status>: bool _Rate_monotonic_Get_status( Rate_monotonic_Control *the_period, Rate_monotonic_Period_time_t *wall_since_last_period, Thread_CPU_usage_t *cpu_since_last_period ) { 13c560: 55 push %ebp 13c561: 89 e5 mov %esp,%ebp 13c563: 57 push %edi 13c564: 56 push %esi 13c565: 53 push %ebx 13c566: 83 ec 38 sub $0x38,%esp 13c569: 8b 5d 08 mov 0x8(%ebp),%ebx #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; 13c56c: 8b 7b 40 mov 0x40(%ebx),%edi /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 13c56f: 8d 75 e0 lea -0x20(%ebp),%esi 13c572: 56 push %esi 13c573: e8 4c 19 ff ff call 12dec4 <_TOD_Get_uptime> _Timestamp_Subtract( 13c578: 83 c4 0c add $0xc,%esp 13c57b: ff 75 0c pushl 0xc(%ebp) 13c57e: 56 push %esi 13c57f: 8d 43 4c lea 0x4c(%ebx),%eax 13c582: 50 push %eax 13c583: e8 18 7e fd ff call 1143a0 <_Timespec_Subtract> #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; 13c588: 8b 87 84 00 00 00 mov 0x84(%edi),%eax 13c58e: 8b 97 88 00 00 00 mov 0x88(%edi),%edx 13c594: 89 45 d8 mov %eax,-0x28(%ebp) 13c597: 89 55 dc mov %edx,-0x24(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 13c59a: 83 c4 10 add $0x10,%esp 13c59d: 3b 3d b8 df 16 00 cmp 0x16dfb8,%edi 13c5a3: 74 0b je 13c5b0 <_Rate_monotonic_Get_status+0x50> 13c5a5: b0 01 mov $0x1,%al return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } 13c5a7: 8d 65 f4 lea -0xc(%ebp),%esp 13c5aa: 5b pop %ebx 13c5ab: 5e pop %esi 13c5ac: 5f pop %edi 13c5ad: c9 leave 13c5ae: c3 ret 13c5af: 90 nop <== NOT EXECUTED if (owning_thread == _Thread_Executing) { Thread_CPU_usage_t ran; /* How much time time since last context switch */ _Timestamp_Subtract( 13c5b0: 57 push %edi 13c5b1: 8d 7d d0 lea -0x30(%ebp),%edi 13c5b4: 57 push %edi 13c5b5: 56 push %esi 13c5b6: 68 c0 df 16 00 push $0x16dfc0 13c5bb: e8 e0 7d fd ff call 1143a0 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); /* cpu usage += ran */ _Timestamp_Add_to( &used, &ran ); 13c5c0: 59 pop %ecx 13c5c1: 5e pop %esi 13c5c2: 57 push %edi 13c5c3: 8d 75 d8 lea -0x28(%ebp),%esi 13c5c6: 56 push %esi 13c5c7: e8 98 7d fd ff call 114364 <_Timespec_Add_to> /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) 13c5cc: 83 c3 44 add $0x44,%ebx 13c5cf: 58 pop %eax 13c5d0: 5a pop %edx 13c5d1: 53 push %ebx 13c5d2: 56 push %esi 13c5d3: e8 c4 06 00 00 call 13cc9c <_Timespec_Less_than> 13c5d8: 83 c4 10 add $0x10,%esp 13c5db: 84 c0 test %al,%al 13c5dd: 74 05 je 13c5e4 <_Rate_monotonic_Get_status+0x84> 13c5df: 31 c0 xor %eax,%eax 13c5e1: eb c4 jmp 13c5a7 <_Rate_monotonic_Get_status+0x47> 13c5e3: 90 nop <== NOT EXECUTED return false; /* used = current cpu usage - cpu usage at start of period */ _Timestamp_Subtract( 13c5e4: 57 push %edi 13c5e5: ff 75 10 pushl 0x10(%ebp) 13c5e8: 56 push %esi 13c5e9: 53 push %ebx 13c5ea: e8 b1 7d fd ff call 1143a0 <_Timespec_Subtract> 13c5ef: b0 01 mov $0x1,%al 13c5f1: 83 c4 10 add $0x10,%esp 13c5f4: eb b1 jmp 13c5a7 <_Rate_monotonic_Get_status+0x47> 0013c4ec <_Rate_monotonic_Initiate_statistics>: } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { 13c4ec: 55 push %ebp 13c4ed: 89 e5 mov %esp,%ebp 13c4ef: 57 push %edi 13c4f0: 56 push %esi 13c4f1: 53 push %ebx 13c4f2: 83 ec 28 sub $0x28,%esp 13c4f5: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *owning_thread = the_period->owner; 13c4f8: 8b 73 40 mov 0x40(%ebx),%esi * If using nanosecond statistics, we need to obtain the uptime. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; _TOD_Get_uptime( &uptime ); 13c4fb: 8d 7d e0 lea -0x20(%ebp),%edi 13c4fe: 57 push %edi 13c4ff: e8 c0 19 ff ff call 12dec4 <_TOD_Get_uptime> /* * Set the starting point and the CPU time used for the statistics. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ the_period->time_period_initiated = uptime; 13c504: 8b 45 e0 mov -0x20(%ebp),%eax 13c507: 8b 55 e4 mov -0x1c(%ebp),%edx 13c50a: 89 43 4c mov %eax,0x4c(%ebx) 13c50d: 89 53 50 mov %edx,0x50(%ebx) #else the_period->time_period_initiated = _Watchdog_Ticks_since_boot; #endif the_period->cpu_usage_period_initiated = owning_thread->cpu_time_used; 13c510: 8b 86 84 00 00 00 mov 0x84(%esi),%eax 13c516: 8b 96 88 00 00 00 mov 0x88(%esi),%edx 13c51c: 89 43 44 mov %eax,0x44(%ebx) 13c51f: 89 53 48 mov %edx,0x48(%ebx) * routine is invoked from rtems_rate_monotonic_period, the owner will * be the executing thread. When this routine is invoked from * _Rate_monotonic_Timeout, it will not. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 13c522: 83 c4 10 add $0x10,%esp 13c525: 3b 35 b8 df 16 00 cmp 0x16dfb8,%esi 13c52b: 74 0b je 13c538 <_Rate_monotonic_Initiate_statistics+0x4c> ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); } #endif } 13c52d: 8d 65 f4 lea -0xc(%ebp),%esp 13c530: 5b pop %ebx 13c531: 5e pop %esi 13c532: 5f pop %edi 13c533: c9 leave 13c534: c3 ret 13c535: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 13c538: 51 push %ecx 13c539: 8d 75 d8 lea -0x28(%ebp),%esi 13c53c: 56 push %esi 13c53d: 57 push %edi 13c53e: 68 c0 df 16 00 push $0x16dfc0 13c543: e8 58 7e fd ff call 1143a0 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); 13c548: 58 pop %eax 13c549: 5a pop %edx 13c54a: 56 push %esi 13c54b: 83 c3 44 add $0x44,%ebx 13c54e: 53 push %ebx 13c54f: e8 10 7e fd ff call 114364 <_Timespec_Add_to> 13c554: 83 c4 10 add $0x10,%esp } #endif } 13c557: 8d 65 f4 lea -0xc(%ebp),%esp 13c55a: 5b pop %ebx 13c55b: 5e pop %esi 13c55c: 5f pop %edi 13c55d: c9 leave 13c55e: c3 ret 0013c898 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 13c898: 55 push %ebp 13c899: 89 e5 mov %esp,%ebp 13c89b: 83 ec 2c sub $0x2c,%esp 13c89e: 8d 45 f4 lea -0xc(%ebp),%eax 13c8a1: 50 push %eax 13c8a2: ff 75 08 pushl 0x8(%ebp) 13c8a5: 68 80 e4 16 00 push $0x16e480 13c8aa: e8 f1 65 fd ff call 112ea0 <_Objects_Get> /* * 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 ) { 13c8af: 83 c4 10 add $0x10,%esp 13c8b2: 8b 55 f4 mov -0xc(%ebp),%edx 13c8b5: 85 d2 test %edx,%edx 13c8b7: 75 29 jne 13c8e2 <_Rate_monotonic_Timeout+0x4a> case OBJECTS_LOCAL: the_thread = the_period->owner; 13c8b9: 8b 50 40 mov 0x40(%eax),%edx if ( _States_Is_waiting_for_period( the_thread->current_state ) && 13c8bc: f6 42 11 40 testb $0x40,0x11(%edx) 13c8c0: 74 08 je 13c8ca <_Rate_monotonic_Timeout+0x32> the_thread->Wait.id == the_period->Object.id ) { 13c8c2: 8b 4a 20 mov 0x20(%edx),%ecx 13c8c5: 3b 48 08 cmp 0x8(%eax),%ecx 13c8c8: 74 4e je 13c918 <_Rate_monotonic_Timeout+0x80> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 13c8ca: 83 78 38 01 cmpl $0x1,0x38(%eax) 13c8ce: 74 14 je 13c8e4 <_Rate_monotonic_Timeout+0x4c> _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 13c8d0: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 13c8d7: a1 f8 de 16 00 mov 0x16def8,%eax 13c8dc: 48 dec %eax 13c8dd: a3 f8 de 16 00 mov %eax,0x16def8 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 13c8e2: c9 leave 13c8e3: c3 ret _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 13c8e4: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax) _Rate_monotonic_Initiate_statistics( the_period ); 13c8eb: 83 ec 0c sub $0xc,%esp 13c8ee: 50 push %eax 13c8ef: 89 45 e4 mov %eax,-0x1c(%ebp) 13c8f2: e8 f5 fb ff ff call 13c4ec <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 13c8f7: 8b 45 e4 mov -0x1c(%ebp),%eax 13c8fa: 8b 50 3c mov 0x3c(%eax),%edx 13c8fd: 89 50 1c mov %edx,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 13c900: 5a pop %edx 13c901: 59 pop %ecx 13c902: 83 c0 10 add $0x10,%eax 13c905: 50 push %eax 13c906: 68 d8 df 16 00 push $0x16dfd8 13c90b: e8 60 7d fd ff call 114670 <_Watchdog_Insert> 13c910: 83 c4 10 add $0x10,%esp 13c913: eb c2 jmp 13c8d7 <_Rate_monotonic_Timeout+0x3f> 13c915: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 13c918: 83 ec 08 sub $0x8,%esp 13c91b: 68 f8 ff 03 10 push $0x1003fff8 13c920: 52 push %edx 13c921: 89 45 e4 mov %eax,-0x1c(%ebp) 13c924: e8 c7 6a fd ff call 1133f0 <_Thread_Clear_state> the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 13c929: 8b 45 e4 mov -0x1c(%ebp),%eax 13c92c: 89 04 24 mov %eax,(%esp) 13c92f: eb c1 jmp 13c8f2 <_Rate_monotonic_Timeout+0x5a> 0013c5f8 <_Rate_monotonic_Update_statistics>: } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 13c5f8: 55 push %ebp 13c5f9: 89 e5 mov %esp,%ebp 13c5fb: 57 push %edi 13c5fc: 56 push %esi 13c5fd: 53 push %ebx 13c5fe: 83 ec 1c sub $0x1c,%esp 13c601: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 13c604: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 13c607: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 13c60b: 0f 84 bf 00 00 00 je 13c6d0 <_Rate_monotonic_Update_statistics+0xd8> /* * Grab status for time statistics. */ valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 13c611: 52 push %edx 13c612: 8d 7d e0 lea -0x20(%ebp),%edi 13c615: 57 push %edi 13c616: 8d 75 d8 lea -0x28(%ebp),%esi 13c619: 56 push %esi 13c61a: 53 push %ebx 13c61b: e8 40 ff ff ff call 13c560 <_Rate_monotonic_Get_status> if (!valid_status) 13c620: 83 c4 10 add $0x10,%esp 13c623: 84 c0 test %al,%al 13c625: 75 09 jne 13c630 <_Rate_monotonic_Update_statistics+0x38> stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } 13c627: 8d 65 f4 lea -0xc(%ebp),%esp 13c62a: 5b pop %ebx 13c62b: 5e pop %esi 13c62c: 5f pop %edi 13c62d: c9 leave 13c62e: c3 ret 13c62f: 90 nop <== NOT EXECUTED /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 13c630: 83 ec 08 sub $0x8,%esp 13c633: 57 push %edi 13c634: 8d 43 6c lea 0x6c(%ebx),%eax 13c637: 50 push %eax 13c638: e8 27 7d fd ff call 114364 <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 13c63d: 59 pop %ecx 13c63e: 58 pop %eax 13c63f: 8d 43 5c lea 0x5c(%ebx),%eax 13c642: 50 push %eax 13c643: 57 push %edi 13c644: e8 53 06 00 00 call 13cc9c <_Timespec_Less_than> 13c649: 83 c4 10 add $0x10,%esp 13c64c: 84 c0 test %al,%al 13c64e: 74 0c je 13c65c <_Rate_monotonic_Update_statistics+0x64> stats->min_cpu_time = executed; 13c650: 8b 45 e0 mov -0x20(%ebp),%eax 13c653: 8b 55 e4 mov -0x1c(%ebp),%edx 13c656: 89 43 5c mov %eax,0x5c(%ebx) 13c659: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 13c65c: 83 ec 08 sub $0x8,%esp 13c65f: 8d 43 64 lea 0x64(%ebx),%eax 13c662: 50 push %eax 13c663: 57 push %edi 13c664: e8 0f 06 00 00 call 13cc78 <_Timespec_Greater_than> 13c669: 83 c4 10 add $0x10,%esp 13c66c: 84 c0 test %al,%al 13c66e: 74 0c je 13c67c <_Rate_monotonic_Update_statistics+0x84> stats->max_cpu_time = executed; 13c670: 8b 45 e0 mov -0x20(%ebp),%eax 13c673: 8b 55 e4 mov -0x1c(%ebp),%edx 13c676: 89 43 64 mov %eax,0x64(%ebx) 13c679: 89 53 68 mov %edx,0x68(%ebx) /* * Update Wall time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); 13c67c: 83 ec 08 sub $0x8,%esp 13c67f: 56 push %esi 13c680: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 13c686: 50 push %eax 13c687: e8 d8 7c fd ff call 114364 <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 13c68c: 58 pop %eax 13c68d: 5a pop %edx 13c68e: 8d 43 74 lea 0x74(%ebx),%eax 13c691: 50 push %eax 13c692: 56 push %esi 13c693: e8 04 06 00 00 call 13cc9c <_Timespec_Less_than> 13c698: 83 c4 10 add $0x10,%esp 13c69b: 84 c0 test %al,%al 13c69d: 75 39 jne 13c6d8 <_Rate_monotonic_Update_statistics+0xe0> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 13c69f: 83 ec 08 sub $0x8,%esp 13c6a2: 8d 43 7c lea 0x7c(%ebx),%eax 13c6a5: 50 push %eax 13c6a6: 56 push %esi 13c6a7: e8 cc 05 00 00 call 13cc78 <_Timespec_Greater_than> 13c6ac: 83 c4 10 add $0x10,%esp 13c6af: 84 c0 test %al,%al 13c6b1: 0f 84 70 ff ff ff je 13c627 <_Rate_monotonic_Update_statistics+0x2f> stats->max_wall_time = since_last_period; 13c6b7: 8b 45 d8 mov -0x28(%ebp),%eax 13c6ba: 8b 55 dc mov -0x24(%ebp),%edx 13c6bd: 89 43 7c mov %eax,0x7c(%ebx) 13c6c0: 89 93 80 00 00 00 mov %edx,0x80(%ebx) stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } 13c6c6: 8d 65 f4 lea -0xc(%ebp),%esp 13c6c9: 5b pop %ebx 13c6ca: 5e pop %esi 13c6cb: 5f pop %edi 13c6cc: c9 leave 13c6cd: c3 ret 13c6ce: 66 90 xchg %ax,%ax <== NOT EXECUTED */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 13c6d0: ff 43 58 incl 0x58(%ebx) 13c6d3: e9 39 ff ff ff jmp 13c611 <_Rate_monotonic_Update_statistics+0x19> */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) stats->min_wall_time = since_last_period; 13c6d8: 8b 45 d8 mov -0x28(%ebp),%eax 13c6db: 8b 55 dc mov -0x24(%ebp),%edx 13c6de: 89 43 74 mov %eax,0x74(%ebx) 13c6e1: 89 53 78 mov %edx,0x78(%ebx) 13c6e4: eb b9 jmp 13c69f <_Rate_monotonic_Update_statistics+0xa7> 0010d83c <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 10d83c: 55 push %ebp 10d83d: 89 e5 mov %esp,%ebp 10d83f: 53 push %ebx 10d840: 83 ec 04 sub $0x4,%esp 10d843: 8b 5d 08 mov 0x8(%ebp),%ebx 10d846: a1 98 01 13 00 mov 0x130198,%eax 10d84b: 40 inc %eax 10d84c: a3 98 01 13 00 mov %eax,0x130198 long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 10d851: a1 2c 02 13 00 mov 0x13022c,%eax if ( time->tv_sec < seconds ) 10d856: 8b 13 mov (%ebx),%edx 10d858: 39 d0 cmp %edx,%eax 10d85a: 7f 34 jg 10d890 <_TOD_Set+0x54> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 10d85c: 51 push %ecx 10d85d: 29 c2 sub %eax,%edx 10d85f: 52 push %edx 10d860: 6a 00 push $0x0 10d862: 68 6c 02 13 00 push $0x13026c 10d867: e8 1c 24 00 00 call 10fc88 <_Watchdog_Adjust> 10d86c: 83 c4 10 add $0x10,%esp _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 10d86f: 8b 03 mov (%ebx),%eax 10d871: a3 2c 02 13 00 mov %eax,0x13022c 10d876: 8b 43 04 mov 0x4(%ebx),%eax 10d879: a3 30 02 13 00 mov %eax,0x130230 _TOD_Is_set = true; 10d87e: c6 05 ac 01 13 00 01 movb $0x1,0x1301ac _TOD_Activate(); _Thread_Enable_dispatch(); } 10d885: 8b 5d fc mov -0x4(%ebp),%ebx 10d888: c9 leave _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); 10d889: e9 76 12 00 00 jmp 10eb04 <_Thread_Enable_dispatch> 10d88e: 66 90 xchg %ax,%ax <== NOT EXECUTED 10d890: 51 push %ecx 10d891: 29 d0 sub %edx,%eax 10d893: 50 push %eax 10d894: 6a 01 push $0x1 10d896: 68 6c 02 13 00 push $0x13026c 10d89b: e8 e8 23 00 00 call 10fc88 <_Watchdog_Adjust> 10d8a0: 83 c4 10 add $0x10,%esp 10d8a3: eb ca jmp 10d86f <_TOD_Set+0x33> 0010c05c <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 10c05c: 55 push %ebp 10c05d: 89 e5 mov %esp,%ebp 10c05f: 56 push %esi 10c060: 53 push %ebx 10c061: 8b 55 08 mov 0x8(%ebp),%edx uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 10c064: 8b 72 08 mov 0x8(%edx),%esi 10c067: 4e dec %esi year_mod_4 = the_tod->year & 3; 10c068: 8b 02 mov (%edx),%eax if ( year_mod_4 == 0 ) 10c06a: 89 c3 mov %eax,%ebx 10c06c: 83 e3 03 and $0x3,%ebx 10c06f: 74 67 je 10c0d8 <_TOD_To_seconds+0x7c> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 10c071: 8b 4a 04 mov 0x4(%edx),%ecx 10c074: 0f b7 8c 09 a0 23 12 movzwl 0x1223a0(%ecx,%ecx,1),%ecx 10c07b: 00 10c07c: 8d 34 31 lea (%ecx,%esi,1),%esi time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 10c07f: 0f b7 8c 1b d4 23 12 movzwl 0x1223d4(%ebx,%ebx,1),%ecx 10c086: 00 10c087: 2d c4 07 00 00 sub $0x7c4,%eax 10c08c: c1 e8 02 shr $0x2,%eax 10c08f: 8d 1c c0 lea (%eax,%eax,8),%ebx 10c092: 8d 1c d8 lea (%eax,%ebx,8),%ebx 10c095: 8d 1c 9b lea (%ebx,%ebx,4),%ebx 10c098: 8d 04 98 lea (%eax,%ebx,4),%eax 10c09b: 01 c1 add %eax,%ecx ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10c09d: 01 f1 add %esi,%ecx time *= TOD_SECONDS_PER_DAY; 10c09f: 8d 04 89 lea (%ecx,%ecx,4),%eax 10c0a2: 8d 04 81 lea (%ecx,%eax,4),%eax 10c0a5: 8d 04 c1 lea (%ecx,%eax,8),%eax 10c0a8: c1 e0 02 shl $0x2,%eax 10c0ab: 29 c8 sub %ecx,%eax 10c0ad: c1 e0 07 shl $0x7,%eax time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 10c0b0: 8b 5a 14 mov 0x14(%edx),%ebx * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 10c0b3: 8b 4a 0c mov 0xc(%edx),%ecx 10c0b6: 8d 0c 49 lea (%ecx,%ecx,2),%ecx 10c0b9: 8d 0c 89 lea (%ecx,%ecx,4),%ecx 10c0bc: c1 e1 02 shl $0x2,%ecx 10c0bf: 03 4a 10 add 0x10(%edx),%ecx 10c0c2: 8d 14 49 lea (%ecx,%ecx,2),%edx 10c0c5: 8d 14 92 lea (%edx,%edx,4),%edx 10c0c8: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx 10c0cf: 8d 04 02 lea (%edx,%eax,1),%eax time += TOD_SECONDS_1970_THROUGH_1988; return( time ); } 10c0d2: 5b pop %ebx 10c0d3: 5e pop %esi 10c0d4: c9 leave 10c0d5: c3 ret 10c0d6: 66 90 xchg %ax,%ax <== NOT EXECUTED time = the_tod->day - 1; year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; 10c0d8: 8b 4a 04 mov 0x4(%edx),%ecx 10c0db: 0f b7 8c 09 ba 23 12 movzwl 0x1223ba(%ecx,%ecx,1),%ecx 10c0e2: 00 10c0e3: 8d 34 31 lea (%ecx,%esi,1),%esi 10c0e6: eb 97 jmp 10c07f <_TOD_To_seconds+0x23> 0010c0e8 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10c0e8: 55 push %ebp 10c0e9: 89 e5 mov %esp,%ebp 10c0eb: 53 push %ebx 10c0ec: 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(); 10c0ef: 8b 1d 2c 42 12 00 mov 0x12422c,%ebx if ((!the_tod) || 10c0f5: 85 c9 test %ecx,%ecx 10c0f7: 74 53 je 10c14c <_TOD_Validate+0x64> 10c0f9: b8 40 42 0f 00 mov $0xf4240,%eax 10c0fe: 31 d2 xor %edx,%edx 10c100: f7 f3 div %ebx (the_tod->ticks >= ticks_per_second) || 10c102: 3b 41 18 cmp 0x18(%ecx),%eax 10c105: 76 45 jbe 10c14c <_TOD_Validate+0x64> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10c107: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10c10b: 77 3f ja 10c14c <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10c10d: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10c111: 77 39 ja 10c14c <_TOD_Validate+0x64> (the_tod->hour >= TOD_HOURS_PER_DAY) || 10c113: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10c117: 77 33 ja 10c14c <_TOD_Validate+0x64> (the_tod->month == 0) || 10c119: 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) || 10c11c: 85 c0 test %eax,%eax 10c11e: 74 2c je 10c14c <_TOD_Validate+0x64> 10c120: 83 f8 0c cmp $0xc,%eax 10c123: 77 27 ja 10c14c <_TOD_Validate+0x64> (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) || 10c125: 8b 11 mov (%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) || 10c127: 81 fa c3 07 00 00 cmp $0x7c3,%edx 10c12d: 76 1d jbe 10c14c <_TOD_Validate+0x64> (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) ) 10c12f: 8b 49 08 mov 0x8(%ecx),%ecx 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) || 10c132: 85 c9 test %ecx,%ecx 10c134: 74 16 je 10c14c <_TOD_Validate+0x64> (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 ) 10c136: 83 e2 03 and $0x3,%edx 10c139: 75 16 jne 10c151 <_TOD_Validate+0x69> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10c13b: 8b 04 85 14 24 12 00 mov 0x122414(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10c142: 39 c8 cmp %ecx,%eax 10c144: 0f 93 c0 setae %al 10c147: eb 05 jmp 10c14e <_TOD_Validate+0x66> 10c149: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c14c: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10c14e: 5b pop %ebx 10c14f: c9 leave 10c150: c3 ret return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 10c151: 8b 04 85 e0 23 12 00 mov 0x1223e0(,%eax,4),%eax 10c158: eb e8 jmp 10c142 <_TOD_Validate+0x5a> 0010cf10 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10cf10: 55 push %ebp 10cf11: 89 e5 mov %esp,%ebp 10cf13: 57 push %edi 10cf14: 56 push %esi 10cf15: 53 push %ebx 10cf16: 83 ec 28 sub $0x28,%esp 10cf19: 8b 5d 08 mov 0x8(%ebp),%ebx 10cf1c: 8b 75 0c mov 0xc(%ebp),%esi 10cf1f: 8a 45 10 mov 0x10(%ebp),%al 10cf22: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10cf25: 8b 7b 10 mov 0x10(%ebx),%edi /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 10cf28: 53 push %ebx 10cf29: e8 2e 0e 00 00 call 10dd5c <_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 ) 10cf2e: 83 c4 10 add $0x10,%esp 10cf31: 39 73 14 cmp %esi,0x14(%ebx) 10cf34: 74 0d je 10cf43 <_Thread_Change_priority+0x33> _Thread_Set_priority( the_thread, new_priority ); 10cf36: 83 ec 08 sub $0x8,%esp 10cf39: 56 push %esi 10cf3a: 53 push %ebx 10cf3b: e8 d4 0c 00 00 call 10dc14 <_Thread_Set_priority> 10cf40: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10cf43: 9c pushf 10cf44: fa cli 10cf45: 5a pop %edx /* * 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; 10cf46: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10cf49: 83 f8 04 cmp $0x4,%eax 10cf4c: 74 26 je 10cf74 <_Thread_Change_priority+0x64> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10cf4e: 83 e7 04 and $0x4,%edi 10cf51: 74 15 je 10cf68 <_Thread_Change_priority+0x58> the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10cf53: 52 push %edx 10cf54: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10cf55: a9 e0 be 03 00 test $0x3bee0,%eax 10cf5a: 0f 85 bc 00 00 00 jne 10d01c <_Thread_Change_priority+0x10c> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10cf60: 8d 65 f4 lea -0xc(%ebp),%esp 10cf63: 5b pop %ebx 10cf64: 5e pop %esi 10cf65: 5f pop %edi 10cf66: c9 leave 10cf67: c3 ret */ state = the_thread->current_state; if ( state != STATES_TRANSIENT ) { /* 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 ); 10cf68: 89 c1 mov %eax,%ecx 10cf6a: 83 e1 fb and $0xfffffffb,%ecx 10cf6d: 89 4b 10 mov %ecx,0x10(%ebx) 10cf70: eb e1 jmp 10cf53 <_Thread_Change_priority+0x43> 10cf72: 66 90 xchg %ax,%ax <== NOT EXECUTED } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10cf74: 83 e7 04 and $0x4,%edi 10cf77: 75 45 jne 10cfbe <_Thread_Change_priority+0xae> * 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 ); 10cf79: 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; 10cf80: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10cf86: 66 8b 8b 96 00 00 00 mov 0x96(%ebx),%cx 10cf8d: 66 09 08 or %cx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10cf90: 66 a1 0c 54 12 00 mov 0x12540c,%ax 10cf96: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10cf9c: 66 a3 0c 54 12 00 mov %ax,0x12540c _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10cfa2: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10cfa6: 0f 84 88 00 00 00 je 10d034 <_Thread_Change_priority+0x124> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10cfac: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10cfb2: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10cfb5: 8b 08 mov (%eax),%ecx after_node->next = the_node; 10cfb7: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10cfb9: 89 0b mov %ecx,(%ebx) before_node->previous = the_node; 10cfbb: 89 59 04 mov %ebx,0x4(%ecx) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 10cfbe: 52 push %edx 10cfbf: 9d popf 10cfc0: 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 ); 10cfc1: 66 8b 1d 0c 54 12 00 mov 0x12540c,%bx 10cfc8: 31 c0 xor %eax,%eax 10cfca: 89 c1 mov %eax,%ecx 10cfcc: 66 0f bc cb bsf %bx,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10cfd0: 0f b7 c9 movzwl %cx,%ecx 10cfd3: 66 8b 9c 09 a0 54 12 mov 0x1254a0(%ecx,%ecx,1),%bx 10cfda: 00 10cfdb: 66 0f bc c3 bsf %bx,%ax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10cfdf: c1 e1 04 shl $0x4,%ecx 10cfe2: 0f b7 c0 movzwl %ax,%eax 10cfe5: 8d 04 01 lea (%ecx,%eax,1),%eax 10cfe8: 8d 0c 40 lea (%eax,%eax,2),%ecx 10cfeb: a1 20 53 12 00 mov 0x125320,%eax 10cff0: 8b 04 88 mov (%eax,%ecx,4),%eax 10cff3: a3 e8 53 12 00 mov %eax,0x1253e8 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10cff8: 8b 0d 18 54 12 00 mov 0x125418,%ecx * 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() && 10cffe: 39 c8 cmp %ecx,%eax 10d000: 74 0d je 10d00f <_Thread_Change_priority+0xff> _Thread_Executing->is_preemptible ) 10d002: 80 79 75 00 cmpb $0x0,0x75(%ecx) 10d006: 74 07 je 10d00f <_Thread_Change_priority+0xff> _Context_Switch_necessary = true; 10d008: c6 05 28 54 12 00 01 movb $0x1,0x125428 _ISR_Enable( level ); 10d00f: 52 push %edx 10d010: 9d popf } 10d011: 8d 65 f4 lea -0xc(%ebp),%esp 10d014: 5b pop %ebx 10d015: 5e pop %esi 10d016: 5f pop %edi 10d017: c9 leave 10d018: c3 ret 10d019: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* 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 ); 10d01c: 89 5d 0c mov %ebx,0xc(%ebp) 10d01f: 8b 43 44 mov 0x44(%ebx),%eax 10d022: 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 ); } 10d025: 8d 65 f4 lea -0xc(%ebp),%esp 10d028: 5b pop %ebx 10d029: 5e pop %esi 10d02a: 5f pop %edi 10d02b: 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 ); 10d02c: e9 4b 0b 00 00 jmp 10db7c <_Thread_queue_Requeue> 10d031: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 10d034: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10d03a: 8d 48 04 lea 0x4(%eax),%ecx 10d03d: 89 0b mov %ecx,(%ebx) old_last_node = the_chain->last; 10d03f: 8b 48 08 mov 0x8(%eax),%ecx the_chain->last = the_node; 10d042: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10d045: 89 19 mov %ebx,(%ecx) the_node->previous = old_last_node; 10d047: 89 4b 04 mov %ecx,0x4(%ebx) 10d04a: e9 6f ff ff ff jmp 10cfbe <_Thread_Change_priority+0xae> 0010d050 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10d050: 55 push %ebp 10d051: 89 e5 mov %esp,%ebp 10d053: 53 push %ebx 10d054: 8b 45 08 mov 0x8(%ebp),%eax 10d057: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10d05a: 9c pushf 10d05b: fa cli 10d05c: 5b pop %ebx current_state = the_thread->current_state; 10d05d: 8b 48 10 mov 0x10(%eax),%ecx if ( current_state & state ) { 10d060: 85 ca test %ecx,%edx 10d062: 74 70 je 10d0d4 <_Thread_Clear_state+0x84> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10d064: f7 d2 not %edx 10d066: 21 ca and %ecx,%edx current_state = 10d068: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 10d06b: 85 d2 test %edx,%edx 10d06d: 75 65 jne 10d0d4 <_Thread_Clear_state+0x84> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10d06f: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10d075: 66 8b 88 96 00 00 00 mov 0x96(%eax),%cx 10d07c: 66 09 0a or %cx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d07f: 66 8b 15 0c 54 12 00 mov 0x12540c,%dx 10d086: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10d08c: 66 89 15 0c 54 12 00 mov %dx,0x12540c _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10d093: 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); 10d099: 8d 4a 04 lea 0x4(%edx),%ecx 10d09c: 89 08 mov %ecx,(%eax) old_last_node = the_chain->last; 10d09e: 8b 4a 08 mov 0x8(%edx),%ecx the_chain->last = the_node; 10d0a1: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10d0a4: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10d0a6: 89 48 04 mov %ecx,0x4(%eax) _ISR_Flash( level ); 10d0a9: 53 push %ebx 10d0aa: 9d popf 10d0ab: 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 ) { 10d0ac: 8b 50 14 mov 0x14(%eax),%edx 10d0af: 8b 0d e8 53 12 00 mov 0x1253e8,%ecx 10d0b5: 3b 51 14 cmp 0x14(%ecx),%edx 10d0b8: 73 1a jae 10d0d4 <_Thread_Clear_state+0x84> _Thread_Heir = the_thread; 10d0ba: a3 e8 53 12 00 mov %eax,0x1253e8 if ( _Thread_Executing->is_preemptible || 10d0bf: a1 18 54 12 00 mov 0x125418,%eax 10d0c4: 80 78 75 00 cmpb $0x0,0x75(%eax) 10d0c8: 74 12 je 10d0dc <_Thread_Clear_state+0x8c> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10d0ca: c6 05 28 54 12 00 01 movb $0x1,0x125428 10d0d1: 8d 76 00 lea 0x0(%esi),%esi } } } _ISR_Enable( level ); 10d0d4: 53 push %ebx 10d0d5: 9d popf } 10d0d6: 5b pop %ebx 10d0d7: c9 leave 10d0d8: c3 ret 10d0d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 10d0dc: 85 d2 test %edx,%edx 10d0de: 74 ea je 10d0ca <_Thread_Clear_state+0x7a> 10d0e0: eb f2 jmp 10d0d4 <_Thread_Clear_state+0x84> 0010d0e4 <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 10d0e4: 55 push %ebp 10d0e5: 89 e5 mov %esp,%ebp 10d0e7: 56 push %esi 10d0e8: 53 push %ebx 10d0e9: 8b 75 08 mov 0x8(%ebp),%esi 10d0ec: 8b 5d 0c mov 0xc(%ebp),%ebx 10d0ef: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10d0f3: 8b 46 1c mov 0x1c(%esi),%eax 10d0f6: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10d0fd: a1 58 53 12 00 mov 0x125358,%eax 10d102: 48 dec %eax 10d103: a3 58 53 12 00 mov %eax,0x125358 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 10d108: 83 ec 0c sub $0xc,%esp 10d10b: 53 push %ebx 10d10c: e8 ff 10 00 00 call 10e210 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d111: a1 58 53 12 00 mov 0x125358,%eax 10d116: 40 inc %eax 10d117: a3 58 53 12 00 mov %eax,0x125358 /* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object ); 10d11c: 59 pop %ecx 10d11d: 58 pop %eax 10d11e: 53 push %ebx 10d11f: 56 push %esi 10d120: e8 57 f6 ff ff call 10c77c <_Objects_Close> /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); 10d125: 58 pop %eax 10d126: 5a pop %edx 10d127: 6a 01 push $0x1 10d129: 53 push %ebx 10d12a: e8 51 0b 00 00 call 10dc80 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 10d12f: 89 1c 24 mov %ebx,(%esp) 10d132: e8 9d 09 00 00 call 10dad4 <_Thread_queue_Extract_with_proxy> 10d137: 83 c4 10 add $0x10,%esp 10d13a: 84 c0 test %al,%al 10d13c: 75 06 jne 10d144 <_Thread_Close+0x60> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 10d13e: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d142: 74 68 je 10d1ac <_Thread_Close+0xc8> /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 10d144: 3b 1d e0 53 12 00 cmp 0x1253e0,%ebx 10d14a: 74 74 je 10d1c0 <_Thread_Close+0xdc> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 10d14c: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx) 10d153: 00 00 00 if ( the_thread->Start.fp_context ) 10d156: 8b 83 c8 00 00 00 mov 0xc8(%ebx),%eax 10d15c: 85 c0 test %eax,%eax 10d15e: 74 0c je 10d16c <_Thread_Close+0x88> (void) _Workspace_Free( the_thread->Start.fp_context ); 10d160: 83 ec 0c sub $0xc,%esp 10d163: 50 push %eax 10d164: e8 bf 13 00 00 call 10e528 <_Workspace_Free> 10d169: 83 c4 10 add $0x10,%esp /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 10d16c: 83 ec 0c sub $0xc,%esp 10d16f: 53 push %ebx 10d170: e8 bf 0c 00 00 call 10de34 <_Thread_Stack_Free> the_thread->Start.stack = NULL; 10d175: c7 83 cc 00 00 00 00 movl $0x0,0xcc(%ebx) 10d17c: 00 00 00 if ( the_thread->extensions ) 10d17f: 8b 83 fc 00 00 00 mov 0xfc(%ebx),%eax 10d185: 83 c4 10 add $0x10,%esp 10d188: 85 c0 test %eax,%eax 10d18a: 74 0c je 10d198 <_Thread_Close+0xb4> (void) _Workspace_Free( the_thread->extensions ); 10d18c: 83 ec 0c sub $0xc,%esp 10d18f: 50 push %eax 10d190: e8 93 13 00 00 call 10e528 <_Workspace_Free> 10d195: 83 c4 10 add $0x10,%esp the_thread->extensions = NULL; 10d198: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10d19f: 00 00 00 } 10d1a2: 8d 65 f8 lea -0x8(%ebp),%esp 10d1a5: 5b pop %ebx 10d1a6: 5e pop %esi 10d1a7: c9 leave 10d1a8: c3 ret 10d1a9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ _Thread_Set_state( the_thread, STATES_DORMANT ); if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 10d1ac: 83 ec 0c sub $0xc,%esp 10d1af: 8d 43 48 lea 0x48(%ebx),%eax 10d1b2: 50 push %eax 10d1b3: e8 50 12 00 00 call 10e408 <_Watchdog_Remove> 10d1b8: 83 c4 10 add $0x10,%esp 10d1bb: eb 87 jmp 10d144 <_Thread_Close+0x60> 10d1bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 10d1c0: c7 05 e0 53 12 00 00 movl $0x0,0x1253e0 10d1c7: 00 00 00 10d1ca: eb 80 jmp 10d14c <_Thread_Close+0x68> 0010d29c <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10d29c: 55 push %ebp 10d29d: 89 e5 mov %esp,%ebp 10d29f: 57 push %edi 10d2a0: 56 push %esi 10d2a1: 53 push %ebx 10d2a2: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10d2a5: 8b 1d 18 54 12 00 mov 0x125418,%ebx _ISR_Disable( level ); 10d2ab: 9c pushf 10d2ac: fa cli 10d2ad: 58 pop %eax while ( _Context_Switch_necessary == true ) { 10d2ae: 8a 15 28 54 12 00 mov 0x125428,%dl 10d2b4: 84 d2 test %dl,%dl 10d2b6: 0f 84 10 01 00 00 je 10d3cc <_Thread_Dispatch+0x130> 10d2bc: 8d 7d d8 lea -0x28(%ebp),%edi 10d2bf: e9 d1 00 00 00 jmp 10d395 <_Thread_Dispatch+0xf9> 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 ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; _ISR_Enable( level ); 10d2c4: 50 push %eax 10d2c5: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10d2c6: 83 ec 0c sub $0xc,%esp 10d2c9: 8d 45 e0 lea -0x20(%ebp),%eax 10d2cc: 50 push %eax 10d2cd: e8 4a 2f 00 00 call 11021c <_TOD_Get_uptime> _Timestamp_Subtract( 10d2d2: 83 c4 0c add $0xc,%esp 10d2d5: 57 push %edi 10d2d6: 8d 45 e0 lea -0x20(%ebp),%eax 10d2d9: 50 push %eax 10d2da: 68 20 54 12 00 push $0x125420 10d2df: e8 1c 0d 00 00 call 10e000 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10d2e4: 5a pop %edx 10d2e5: 59 pop %ecx 10d2e6: 57 push %edi 10d2e7: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10d2ed: 50 push %eax 10d2ee: e8 d1 0c 00 00 call 10dfc4 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10d2f3: 8b 45 e0 mov -0x20(%ebp),%eax 10d2f6: 8b 55 e4 mov -0x1c(%ebp),%edx 10d2f9: a3 20 54 12 00 mov %eax,0x125420 10d2fe: 89 15 24 54 12 00 mov %edx,0x125424 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10d304: a1 e4 53 12 00 mov 0x1253e4,%eax 10d309: 83 c4 10 add $0x10,%esp 10d30c: 85 c0 test %eax,%eax 10d30e: 74 10 je 10d320 <_Thread_Dispatch+0x84> executing->libc_reent = *_Thread_libc_reent; 10d310: 8b 10 mov (%eax),%edx 10d312: 89 93 ec 00 00 00 mov %edx,0xec(%ebx) *_Thread_libc_reent = heir->libc_reent; 10d318: 8b 96 ec 00 00 00 mov 0xec(%esi),%edx 10d31e: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10d320: 83 ec 08 sub $0x8,%esp 10d323: 56 push %esi 10d324: 53 push %ebx 10d325: e8 66 0f 00 00 call 10e290 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10d32a: 59 pop %ecx 10d32b: 58 pop %eax 10d32c: 81 c6 d0 00 00 00 add $0xd0,%esi 10d332: 56 push %esi 10d333: 8d 83 d0 00 00 00 lea 0xd0(%ebx),%eax 10d339: 50 push %eax 10d33a: e8 51 12 00 00 call 10e590 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10d33f: 83 c4 10 add $0x10,%esp 10d342: 8b 93 e8 00 00 00 mov 0xe8(%ebx),%edx 10d348: 85 d2 test %edx,%edx 10d34a: 74 36 je 10d382 <_Thread_Dispatch+0xe6> #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 ); 10d34c: a1 e0 53 12 00 mov 0x1253e0,%eax 10d351: 39 c3 cmp %eax,%ebx 10d353: 74 2d je 10d382 <_Thread_Dispatch+0xe6> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10d355: 85 c0 test %eax,%eax 10d357: 74 11 je 10d36a <_Thread_Dispatch+0xce> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10d359: 83 ec 0c sub $0xc,%esp 10d35c: 05 e8 00 00 00 add $0xe8,%eax 10d361: 50 push %eax 10d362: e8 5d 12 00 00 call 10e5c4 <_CPU_Context_save_fp> 10d367: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10d36a: 83 ec 0c sub $0xc,%esp 10d36d: 8d 83 e8 00 00 00 lea 0xe8(%ebx),%eax 10d373: 50 push %eax 10d374: e8 55 12 00 00 call 10e5ce <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10d379: 89 1d e0 53 12 00 mov %ebx,0x1253e0 10d37f: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10d382: 8b 1d 18 54 12 00 mov 0x125418,%ebx _ISR_Disable( level ); 10d388: 9c pushf 10d389: fa cli 10d38a: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10d38b: 8a 15 28 54 12 00 mov 0x125428,%dl 10d391: 84 d2 test %dl,%dl 10d393: 74 37 je 10d3cc <_Thread_Dispatch+0x130> heir = _Thread_Heir; 10d395: 8b 35 e8 53 12 00 mov 0x1253e8,%esi _Thread_Dispatch_disable_level = 1; 10d39b: c7 05 58 53 12 00 01 movl $0x1,0x125358 10d3a2: 00 00 00 _Context_Switch_necessary = false; 10d3a5: c6 05 28 54 12 00 00 movb $0x0,0x125428 _Thread_Executing = heir; 10d3ac: 89 35 18 54 12 00 mov %esi,0x125418 #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 ) 10d3b2: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10d3b6: 0f 85 08 ff ff ff jne 10d2c4 <_Thread_Dispatch+0x28> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10d3bc: 8b 15 24 53 12 00 mov 0x125324,%edx 10d3c2: 89 56 78 mov %edx,0x78(%esi) 10d3c5: e9 fa fe ff ff jmp 10d2c4 <_Thread_Dispatch+0x28> 10d3ca: 66 90 xchg %ax,%ax <== NOT EXECUTED executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 10d3cc: c7 05 58 53 12 00 00 movl $0x0,0x125358 10d3d3: 00 00 00 _ISR_Enable( level ); 10d3d6: 50 push %eax 10d3d7: 9d popf if ( _Thread_Do_post_task_switch_extension || 10d3d8: a1 fc 53 12 00 mov 0x1253fc,%eax 10d3dd: 85 c0 test %eax,%eax 10d3df: 75 06 jne 10d3e7 <_Thread_Dispatch+0x14b> executing->do_post_task_switch_extension ) { 10d3e1: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10d3e5: 74 09 je 10d3f0 <_Thread_Dispatch+0x154> executing->do_post_task_switch_extension = false; 10d3e7: c6 43 74 00 movb $0x0,0x74(%ebx) _API_extensions_Run_postswitch(); 10d3eb: e8 5c e9 ff ff call 10bd4c <_API_extensions_Run_postswitch> } } 10d3f0: 8d 65 f4 lea -0xc(%ebp),%esp 10d3f3: 5b pop %ebx 10d3f4: 5e pop %esi 10d3f5: 5f pop %edi 10d3f6: c9 leave 10d3f7: c3 ret 0010d41c <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10d41c: 55 push %ebp 10d41d: 89 e5 mov %esp,%ebp 10d41f: 53 push %ebx 10d420: 83 ec 04 sub $0x4,%esp 10d423: 8b 45 08 mov 0x8(%ebp),%eax 10d426: 8b 4d 0c mov 0xc(%ebp),%ecx uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 10d429: 85 c0 test %eax,%eax 10d42b: 74 4b je 10d478 <_Thread_Get+0x5c> */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 10d42d: 89 c2 mov %eax,%edx 10d42f: c1 ea 18 shr $0x18,%edx 10d432: 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 ) 10d435: 8d 5a ff lea -0x1(%edx),%ebx 10d438: 83 fb 03 cmp $0x3,%ebx 10d43b: 77 2b ja 10d468 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 10d43d: 89 c3 mov %eax,%ebx 10d43f: c1 eb 1b shr $0x1b,%ebx 10d442: 4b dec %ebx 10d443: 75 23 jne 10d468 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 10d445: 8b 14 95 2c 53 12 00 mov 0x12532c(,%edx,4),%edx if ( !api_information ) { 10d44c: 85 d2 test %edx,%edx 10d44e: 74 18 je 10d468 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 10d450: 8b 52 04 mov 0x4(%edx),%edx if ( !information ) { 10d453: 85 d2 test %edx,%edx 10d455: 74 11 je 10d468 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10d457: 53 push %ebx 10d458: 51 push %ecx 10d459: 50 push %eax 10d45a: 52 push %edx 10d45b: e8 50 f7 ff ff call 10cbb0 <_Objects_Get> 10d460: 83 c4 10 add $0x10,%esp done: return tp; } 10d463: 8b 5d fc mov -0x4(%ebp),%ebx 10d466: c9 leave 10d467: c3 ret goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 10d468: c7 01 01 00 00 00 movl $0x1,(%ecx) 10d46e: 31 c0 xor %eax,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d470: 8b 5d fc mov -0x4(%ebp),%ebx 10d473: c9 leave 10d474: c3 ret 10d475: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d478: a1 58 53 12 00 mov 0x125358,%eax 10d47d: 40 inc %eax 10d47e: a3 58 53 12 00 mov %eax,0x125358 Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 10d483: c7 01 00 00 00 00 movl $0x0,(%ecx) tp = _Thread_Executing; 10d489: a1 18 54 12 00 mov 0x125418,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d48e: 8b 5d fc mov -0x4(%ebp),%ebx 10d491: c9 leave 10d492: c3 ret 00111e1c <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 111e1c: 55 push %ebp 111e1d: 89 e5 mov %esp,%ebp 111e1f: 53 push %ebx 111e20: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 111e23: 8b 1d 18 54 12 00 mov 0x125418,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 111e29: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 111e2f: 85 c0 test %eax,%eax 111e31: 74 79 je 111eac <_Thread_Handler+0x90> 111e33: fa cli #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 111e34: a0 90 4f 12 00 mov 0x124f90,%al 111e39: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 111e3c: c6 05 90 4f 12 00 01 movb $0x1,0x124f90 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 111e43: 8b 93 e8 00 00 00 mov 0xe8(%ebx),%edx 111e49: 85 d2 test %edx,%edx 111e4b: 74 24 je 111e71 <_Thread_Handler+0x55> #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 ); 111e4d: a1 e0 53 12 00 mov 0x1253e0,%eax 111e52: 39 c3 cmp %eax,%ebx 111e54: 74 1b je 111e71 <_Thread_Handler+0x55> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 111e56: 85 c0 test %eax,%eax 111e58: 74 11 je 111e6b <_Thread_Handler+0x4f> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 111e5a: 83 ec 0c sub $0xc,%esp 111e5d: 05 e8 00 00 00 add $0xe8,%eax 111e62: 50 push %eax 111e63: e8 5c c7 ff ff call 10e5c4 <_CPU_Context_save_fp> 111e68: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 111e6b: 89 1d e0 53 12 00 mov %ebx,0x1253e0 /* * 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 ); 111e71: 83 ec 0c sub $0xc,%esp 111e74: 53 push %ebx 111e75: e8 86 c2 ff ff call 10e100 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 111e7a: e8 79 b5 ff ff call 10d3f8 <_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) */ { 111e7f: 83 c4 10 add $0x10,%esp 111e82: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 111e86: 74 28 je 111eb0 <_Thread_Handler+0x94> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 111e88: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 111e8e: 85 c0 test %eax,%eax 111e90: 74 2d je 111ebf <_Thread_Handler+0xa3> * 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 ); 111e92: 83 ec 0c sub $0xc,%esp 111e95: 53 push %ebx 111e96: e8 a1 c2 ff ff call 10e13c <_User_extensions_Thread_exitted> _Internal_error_Occurred( 111e9b: 83 c4 0c add $0xc,%esp 111e9e: 6a 06 push $0x6 111ea0: 6a 01 push $0x1 111ea2: 6a 00 push $0x0 111ea4: e8 bf a7 ff ff call 10c668 <_Internal_error_Occurred> 111ea9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; _ISR_Set_level(level); 111eac: fb sti 111ead: eb 85 jmp 111e34 <_Thread_Handler+0x18> 111eaf: 90 nop <== NOT EXECUTED * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { INIT_NAME (); 111eb0: e8 9b c0 00 00 call 11df50 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 111eb5: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 111ebb: 85 c0 test %eax,%eax 111ebd: 75 d3 jne 111e92 <_Thread_Handler+0x76> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 111ebf: 83 ec 0c sub $0xc,%esp 111ec2: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 111ec8: ff 93 9c 00 00 00 call *0x9c(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 111ece: 89 43 28 mov %eax,0x28(%ebx) 111ed1: 83 c4 10 add $0x10,%esp 111ed4: eb bc jmp 111e92 <_Thread_Handler+0x76> 0010d494 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10d494: 55 push %ebp 10d495: 89 e5 mov %esp,%ebp 10d497: 57 push %edi 10d498: 56 push %esi 10d499: 53 push %ebx 10d49a: 83 ec 24 sub $0x24,%esp 10d49d: 8b 5d 0c mov 0xc(%ebp),%ebx 10d4a0: 8b 75 14 mov 0x14(%ebp),%esi 10d4a3: 0f b6 7d 18 movzbl 0x18(%ebp),%edi 10d4a7: 8a 45 20 mov 0x20(%ebp),%al 10d4aa: 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; 10d4ad: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10d4b4: 00 00 00 10d4b7: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10d4be: 00 00 00 10d4c1: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10d4c8: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10d4cb: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10d4d2: 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 ); 10d4d5: 56 push %esi 10d4d6: 53 push %ebx 10d4d7: e8 f4 08 00 00 call 10ddd0 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10d4dc: 83 c4 10 add $0x10,%esp 10d4df: 85 c0 test %eax,%eax 10d4e1: 0f 84 65 01 00 00 je 10d64c <_Thread_Initialize+0x1b8> 10d4e7: 39 c6 cmp %eax,%esi 10d4e9: 0f 87 5d 01 00 00 ja 10d64c <_Thread_Initialize+0x1b8> Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10d4ef: 8b 93 cc 00 00 00 mov 0xcc(%ebx),%edx 10d4f5: 89 93 c4 00 00 00 mov %edx,0xc4(%ebx) the_stack->size = size; 10d4fb: 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 ) { 10d501: 89 f8 mov %edi,%eax 10d503: 84 c0 test %al,%al 10d505: 0f 85 59 01 00 00 jne 10d664 <_Thread_Initialize+0x1d0> 10d50b: 31 c0 xor %eax,%eax 10d50d: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 10d514: 89 83 e8 00 00 00 mov %eax,0xe8(%ebx) the_thread->Start.fp_context = fp_area; 10d51a: 89 83 c8 00 00 00 mov %eax,0xc8(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10d520: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10d527: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10d52e: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10d535: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10d53c: a1 f8 53 12 00 mov 0x1253f8,%eax 10d541: 85 c0 test %eax,%eax 10d543: 0f 85 37 01 00 00 jne 10d680 <_Thread_Initialize+0x1ec> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10d549: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10d550: 00 00 00 10d553: 31 ff xor %edi,%edi /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10d555: 8a 45 e7 mov -0x19(%ebp),%al 10d558: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10d55e: 8b 45 24 mov 0x24(%ebp),%eax 10d561: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10d567: 8b 45 28 mov 0x28(%ebp),%eax 10d56a: 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; 10d570: 8b 45 2c mov 0x2c(%ebp),%eax 10d573: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10d579: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10d580: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10d587: 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; 10d58e: 8b 45 1c mov 0x1c(%ebp),%eax 10d591: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10d594: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10d59a: 83 ec 08 sub $0x8,%esp 10d59d: 50 push %eax 10d59e: 53 push %ebx 10d59f: e8 70 06 00 00 call 10dc14 <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10d5a4: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10d5ab: 00 00 00 10d5ae: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10d5b5: 00 00 00 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d5b8: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10d5bc: 8b 45 08 mov 0x8(%ebp),%eax 10d5bf: 8b 40 1c mov 0x1c(%eax),%eax 10d5c2: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10d5c5: 8b 45 30 mov 0x30(%ebp),%eax 10d5c8: 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 ); 10d5cb: 89 1c 24 mov %ebx,(%esp) 10d5ce: e8 f5 0b 00 00 call 10e1c8 <_User_extensions_Thread_create> if ( extension_status ) 10d5d3: 83 c4 10 add $0x10,%esp 10d5d6: 84 c0 test %al,%al 10d5d8: 75 7e jne 10d658 <_Thread_Initialize+0x1c4> return true; failed: if ( the_thread->libc_reent ) 10d5da: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 10d5e0: 85 c0 test %eax,%eax 10d5e2: 74 0c je 10d5f0 <_Thread_Initialize+0x15c> _Workspace_Free( the_thread->libc_reent ); 10d5e4: 83 ec 0c sub $0xc,%esp 10d5e7: 50 push %eax 10d5e8: e8 3b 0f 00 00 call 10e528 <_Workspace_Free> 10d5ed: 83 c4 10 add $0x10,%esp 10d5f0: 31 f6 xor %esi,%esi for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10d5f2: 8b 84 b3 f0 00 00 00 mov 0xf0(%ebx,%esi,4),%eax 10d5f9: 85 c0 test %eax,%eax 10d5fb: 74 0c je 10d609 <_Thread_Initialize+0x175> _Workspace_Free( the_thread->API_Extensions[i] ); 10d5fd: 83 ec 0c sub $0xc,%esp 10d600: 50 push %eax 10d601: e8 22 0f 00 00 call 10e528 <_Workspace_Free> 10d606: 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++ ) 10d609: 46 inc %esi 10d60a: 83 fe 03 cmp $0x3,%esi 10d60d: 75 e3 jne 10d5f2 <_Thread_Initialize+0x15e> if ( the_thread->API_Extensions[i] ) _Workspace_Free( the_thread->API_Extensions[i] ); if ( extensions_area ) 10d60f: 85 ff test %edi,%edi 10d611: 74 0c je 10d61f <_Thread_Initialize+0x18b> (void) _Workspace_Free( extensions_area ); 10d613: 83 ec 0c sub $0xc,%esp 10d616: 57 push %edi 10d617: e8 0c 0f 00 00 call 10e528 <_Workspace_Free> 10d61c: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10d61f: 8b 45 e0 mov -0x20(%ebp),%eax 10d622: 85 c0 test %eax,%eax 10d624: 74 0e je 10d634 <_Thread_Initialize+0x1a0> (void) _Workspace_Free( fp_area ); 10d626: 83 ec 0c sub $0xc,%esp 10d629: ff 75 e0 pushl -0x20(%ebp) 10d62c: e8 f7 0e 00 00 call 10e528 <_Workspace_Free> 10d631: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10d634: 83 ec 0c sub $0xc,%esp 10d637: 53 push %ebx 10d638: e8 f7 07 00 00 call 10de34 <_Thread_Stack_Free> 10d63d: 31 c0 xor %eax,%eax return false; 10d63f: 83 c4 10 add $0x10,%esp } 10d642: 8d 65 f4 lea -0xc(%ebp),%esp 10d645: 5b pop %ebx 10d646: 5e pop %esi 10d647: 5f pop %edi 10d648: c9 leave 10d649: c3 ret 10d64a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return false; 10d64c: 31 c0 xor %eax,%eax } 10d64e: 8d 65 f4 lea -0xc(%ebp),%esp 10d651: 5b pop %ebx 10d652: 5e pop %esi 10d653: 5f pop %edi 10d654: c9 leave 10d655: c3 ret 10d656: 66 90 xchg %ax,%ax <== NOT EXECUTED * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) 10d658: b0 01 mov $0x1,%al _Thread_Stack_Free( the_thread ); return false; } 10d65a: 8d 65 f4 lea -0xc(%ebp),%esp 10d65d: 5b pop %ebx 10d65e: 5e pop %esi 10d65f: 5f pop %edi 10d660: c9 leave 10d661: c3 ret 10d662: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10d664: 83 ec 0c sub $0xc,%esp 10d667: 6a 6c push $0x6c 10d669: e8 9e 0e 00 00 call 10e50c <_Workspace_Allocate> 10d66e: 89 45 e0 mov %eax,-0x20(%ebp) if ( !fp_area ) 10d671: 83 c4 10 add $0x10,%esp 10d674: 85 c0 test %eax,%eax 10d676: 74 55 je 10d6cd <_Thread_Initialize+0x239> 10d678: 8b 45 e0 mov -0x20(%ebp),%eax 10d67b: e9 94 fe ff ff jmp 10d514 <_Thread_Initialize+0x80> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 10d680: 83 ec 0c sub $0xc,%esp 10d683: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10d68a: 50 push %eax 10d68b: e8 7c 0e 00 00 call 10e50c <_Workspace_Allocate> 10d690: 89 c7 mov %eax,%edi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10d692: 83 c4 10 add $0x10,%esp 10d695: 85 c0 test %eax,%eax 10d697: 0f 84 3d ff ff ff je 10d5da <_Thread_Initialize+0x146> goto failed; } the_thread->extensions = (void **) extensions_area; 10d69d: 89 c1 mov %eax,%ecx 10d69f: 89 83 fc 00 00 00 mov %eax,0xfc(%ebx) * 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++ ) 10d6a5: 8b 35 f8 53 12 00 mov 0x1253f8,%esi 10d6ab: 31 d2 xor %edx,%edx 10d6ad: 31 c0 xor %eax,%eax 10d6af: eb 09 jmp 10d6ba <_Thread_Initialize+0x226> 10d6b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10d6b4: 8b 8b fc 00 00 00 mov 0xfc(%ebx),%ecx the_thread->extensions[i] = NULL; 10d6ba: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,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++ ) 10d6c1: 40 inc %eax 10d6c2: 89 c2 mov %eax,%edx 10d6c4: 39 f0 cmp %esi,%eax 10d6c6: 76 ec jbe 10d6b4 <_Thread_Initialize+0x220> 10d6c8: e9 88 fe ff ff jmp 10d555 <_Thread_Initialize+0xc1> * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) 10d6cd: 31 ff xor %edi,%edi 10d6cf: e9 06 ff ff ff jmp 10d5da <_Thread_Initialize+0x146> 00111510 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 111510: 55 push %ebp 111511: 89 e5 mov %esp,%ebp 111513: 53 push %ebx 111514: 83 ec 10 sub $0x10,%esp 111517: 8b 5d 08 mov 0x8(%ebp),%ebx the_thread->resource_count = 0; 11151a: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->is_preemptible = the_thread->Start.is_preemptible; 111521: 8a 83 ac 00 00 00 mov 0xac(%ebx),%al 111527: 88 43 75 mov %al,0x75(%ebx) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 11152a: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 111530: 89 43 7c mov %eax,0x7c(%ebx) the_thread->budget_callout = the_thread->Start.budget_callout; 111533: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax 111539: 89 83 80 00 00 00 mov %eax,0x80(%ebx) the_thread->Start.pointer_argument = pointer_argument; 11153f: 8b 45 0c mov 0xc(%ebp),%eax 111542: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 111548: 8b 45 10 mov 0x10(%ebp),%eax 11154b: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 111551: 53 push %ebx 111552: e8 55 d0 ff ff call 10e5ac <_Thread_queue_Extract_with_proxy> 111557: 83 c4 10 add $0x10,%esp 11155a: 84 c0 test %al,%al 11155c: 75 06 jne 111564 <_Thread_Reset+0x54> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 11155e: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 111562: 74 28 je 11158c <_Thread_Reset+0x7c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 111564: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax 11156a: 39 43 14 cmp %eax,0x14(%ebx) 11156d: 74 15 je 111584 <_Thread_Reset+0x74> the_thread->real_priority = the_thread->Start.initial_priority; 11156f: 89 43 18 mov %eax,0x18(%ebx) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 111572: 89 45 0c mov %eax,0xc(%ebp) 111575: 89 5d 08 mov %ebx,0x8(%ebp) } } 111578: 8b 5d fc mov -0x4(%ebp),%ebx 11157b: c9 leave (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 11157c: e9 f7 d1 ff ff jmp 10e778 <_Thread_Set_priority> 111581: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } 111584: 8b 5d fc mov -0x4(%ebp),%ebx 111587: c9 leave 111588: c3 ret 111589: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 11158c: 83 ec 0c sub $0xc,%esp 11158f: 8d 43 48 lea 0x48(%ebx),%eax 111592: 50 push %eax 111593: e8 14 da ff ff call 10efac <_Watchdog_Remove> 111598: 83 c4 10 add $0x10,%esp 11159b: eb c7 jmp 111564 <_Thread_Reset+0x54> 001108d8 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 1108d8: 55 push %ebp 1108d9: 89 e5 mov %esp,%ebp 1108db: 56 push %esi 1108dc: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 1108dd: a1 18 54 12 00 mov 0x125418,%eax ready = executing->ready; 1108e2: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 1108e8: 9c pushf 1108e9: fa cli 1108ea: 59 pop %ecx if ( _Chain_Has_only_one_node( ready ) ) { 1108eb: 8b 1a mov (%edx),%ebx 1108ed: 3b 5a 08 cmp 0x8(%edx),%ebx 1108f0: 74 3e je 110930 <_Thread_Reset_timeslice+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 1108f2: 8b 30 mov (%eax),%esi previous = the_node->previous; 1108f4: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 1108f7: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 1108fa: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 1108fc: 8d 5a 04 lea 0x4(%edx),%ebx 1108ff: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 110901: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 110904: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 110907: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 110909: 89 58 04 mov %ebx,0x4(%eax) return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 11090c: 51 push %ecx 11090d: 9d popf 11090e: fa cli if ( _Thread_Is_heir( executing ) ) 11090f: 3b 05 e8 53 12 00 cmp 0x1253e8,%eax 110915: 74 0d je 110924 <_Thread_Reset_timeslice+0x4c> _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 110917: c6 05 28 54 12 00 01 movb $0x1,0x125428 _ISR_Enable( level ); 11091e: 51 push %ecx 11091f: 9d popf } 110920: 5b pop %ebx 110921: 5e pop %esi 110922: c9 leave 110923: c3 ret _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 110924: 8b 02 mov (%edx),%eax 110926: a3 e8 53 12 00 mov %eax,0x1253e8 11092b: eb ea jmp 110917 <_Thread_Reset_timeslice+0x3f> 11092d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 110930: 51 push %ecx 110931: 9d popf _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; _ISR_Enable( level ); } 110932: 5b pop %ebx 110933: 5e pop %esi 110934: c9 leave 110935: c3 ret 0010e6ec <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10e6ec: 55 push %ebp 10e6ed: 89 e5 mov %esp,%ebp 10e6ef: 53 push %ebx 10e6f0: 83 ec 04 sub $0x4,%esp 10e6f3: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !_States_Is_dormant( the_thread->current_state ) ) { 10e6f6: f6 43 10 01 testb $0x1,0x10(%ebx) 10e6fa: 74 08 je 10e704 <_Thread_Restart+0x18> 10e6fc: 31 c0 xor %eax,%eax return true; } return false; } 10e6fe: 8b 5d fc mov -0x4(%ebp),%ebx 10e701: c9 leave 10e702: c3 ret 10e703: 90 nop <== NOT EXECUTED Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 10e704: 83 ec 0c sub $0xc,%esp 10e707: 53 push %ebx 10e708: e8 b3 01 00 00 call 10e8c0 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 10e70d: 83 c4 0c add $0xc,%esp 10e710: ff 75 10 pushl 0x10(%ebp) 10e713: ff 75 0c pushl 0xc(%ebp) 10e716: 53 push %ebx 10e717: e8 f4 2d 00 00 call 111510 <_Thread_Reset> _Thread_Load_environment( the_thread ); 10e71c: 89 1c 24 mov %ebx,(%esp) 10e71f: e8 c8 2a 00 00 call 1111ec <_Thread_Load_environment> _Thread_Ready( the_thread ); 10e724: 89 1c 24 mov %ebx,(%esp) 10e727: e8 40 2d 00 00 call 11146c <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 10e72c: 89 1c 24 mov %ebx,(%esp) 10e72f: e8 80 06 00 00 call 10edb4 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 10e734: 83 c4 10 add $0x10,%esp 10e737: 3b 1d 78 74 12 00 cmp 0x127478,%ebx 10e73d: 74 07 je 10e746 <_Thread_Restart+0x5a> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) _Context_Restore_fp( &_Thread_Executing->fp_context ); #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 10e73f: b0 01 mov $0x1,%al return true; } return false; } 10e741: 8b 5d fc mov -0x4(%ebp),%ebx 10e744: c9 leave 10e745: c3 ret */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 10e746: 83 bb e8 00 00 00 00 cmpl $0x0,0xe8(%ebx) 10e74d: 74 18 je 10e767 <_Thread_Restart+0x7b> _Context_Restore_fp( &_Thread_Executing->fp_context ); 10e74f: 83 ec 0c sub $0xc,%esp 10e752: 81 c3 e8 00 00 00 add $0xe8,%ebx 10e758: 53 push %ebx 10e759: e8 20 0a 00 00 call 10f17e <_CPU_Context_restore_fp> 10e75e: 8b 1d 78 74 12 00 mov 0x127478,%ebx 10e764: 83 c4 10 add $0x10,%esp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 10e767: 83 ec 0c sub $0xc,%esp 10e76a: 81 c3 d0 00 00 00 add $0xd0,%ebx 10e770: 53 push %ebx 10e771: e8 f7 09 00 00 call 10f16d <_CPU_Context_restore> 0011153c <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 11153c: 55 push %ebp 11153d: 89 e5 mov %esp,%ebp 11153f: 53 push %ebx 111540: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 111543: 9c pushf 111544: fa cli 111545: 59 pop %ecx _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 111546: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 111549: f6 c2 02 test $0x2,%dl 11154c: 74 6e je 1115bc <_Thread_Resume+0x80> 11154e: 83 e2 fd and $0xfffffffd,%edx current_state = 111551: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 111554: 85 d2 test %edx,%edx 111556: 75 64 jne 1115bc <_Thread_Resume+0x80> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 111558: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 11155e: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 111565: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 111568: 66 8b 15 0c a5 12 00 mov 0x12a50c,%dx 11156f: 0b 90 94 00 00 00 or 0x94(%eax),%edx 111575: 66 89 15 0c a5 12 00 mov %dx,0x12a50c _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 11157c: 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); 111582: 8d 5a 04 lea 0x4(%edx),%ebx 111585: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 111587: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 11158a: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 11158d: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 11158f: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 111592: 51 push %ecx 111593: 9d popf 111594: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 111595: 8b 50 14 mov 0x14(%eax),%edx 111598: 8b 1d e8 a4 12 00 mov 0x12a4e8,%ebx 11159e: 3b 53 14 cmp 0x14(%ebx),%edx 1115a1: 73 19 jae 1115bc <_Thread_Resume+0x80> _Thread_Heir = the_thread; 1115a3: a3 e8 a4 12 00 mov %eax,0x12a4e8 if ( _Thread_Executing->is_preemptible || 1115a8: a1 18 a5 12 00 mov 0x12a518,%eax 1115ad: 80 78 75 00 cmpb $0x0,0x75(%eax) 1115b1: 74 11 je 1115c4 <_Thread_Resume+0x88> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 1115b3: c6 05 28 a5 12 00 01 movb $0x1,0x12a528 1115ba: 66 90 xchg %ax,%ax } } } _ISR_Enable( level ); 1115bc: 51 push %ecx 1115bd: 9d popf } 1115be: 5b pop %ebx 1115bf: c9 leave 1115c0: c3 ret 1115c1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 1115c4: 85 d2 test %edx,%edx 1115c6: 74 eb je 1115b3 <_Thread_Resume+0x77> 1115c8: eb f2 jmp 1115bc <_Thread_Resume+0x80> 0010dc80 <_Thread_Set_state>: void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 10dc80: 55 push %ebp 10dc81: 89 e5 mov %esp,%ebp 10dc83: 56 push %esi 10dc84: 53 push %ebx 10dc85: 8b 45 08 mov 0x8(%ebp),%eax 10dc88: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10dc8b: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10dc91: 9c pushf 10dc92: fa cli 10dc93: 59 pop %ecx if ( !_States_Is_ready( the_thread->current_state ) ) { 10dc94: 8b 58 10 mov 0x10(%eax),%ebx 10dc97: 85 db test %ebx,%ebx 10dc99: 75 2d jne 10dcc8 <_Thread_Set_state+0x48> _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; 10dc9b: 89 70 10 mov %esi,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 10dc9e: 8b 1a mov (%edx),%ebx 10dca0: 3b 5a 08 cmp 0x8(%edx),%ebx 10dca3: 74 3b je 10dce0 <_Thread_Set_state+0x60> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10dca5: 8b 18 mov (%eax),%ebx previous = the_node->previous; 10dca7: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10dcaa: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 10dcad: 89 1a mov %ebx,(%edx) _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 10dcaf: 51 push %ecx 10dcb0: 9d popf 10dcb1: fa cli if ( _Thread_Is_heir( the_thread ) ) 10dcb2: 3b 05 e8 53 12 00 cmp 0x1253e8,%eax 10dcb8: 74 62 je 10dd1c <_Thread_Set_state+0x9c> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10dcba: 3b 05 18 54 12 00 cmp 0x125418,%eax 10dcc0: 74 12 je 10dcd4 <_Thread_Set_state+0x54> _Context_Switch_necessary = true; _ISR_Enable( level ); 10dcc2: 51 push %ecx 10dcc3: 9d popf } 10dcc4: 5b pop %ebx 10dcc5: 5e pop %esi 10dcc6: c9 leave 10dcc7: c3 ret Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = 10dcc8: 09 f3 or %esi,%ebx 10dcca: 89 58 10 mov %ebx,0x10(%eax) _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 10dccd: 51 push %ecx 10dcce: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10dccf: 5b pop %ebx 10dcd0: 5e pop %esi 10dcd1: c9 leave 10dcd2: c3 ret 10dcd3: 90 nop <== NOT EXECUTED if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 10dcd4: c6 05 28 54 12 00 01 movb $0x1,0x125428 10dcdb: eb e5 jmp 10dcc2 <_Thread_Set_state+0x42> 10dcdd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10dce0: 8d 5a 04 lea 0x4(%edx),%ebx 10dce3: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 10dce5: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10dcec: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10dcef: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10dcf5: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 10dcfc: 66 21 1a and %bx,(%edx) the_thread->current_state = state; if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 10dcff: 66 83 3a 00 cmpw $0x0,(%edx) 10dd03: 75 aa jne 10dcaf <_Thread_Set_state+0x2f> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10dd05: 66 8b 15 0c 54 12 00 mov 0x12540c,%dx 10dd0c: 23 90 98 00 00 00 and 0x98(%eax),%edx 10dd12: 66 89 15 0c 54 12 00 mov %dx,0x12540c 10dd19: eb 94 jmp 10dcaf <_Thread_Set_state+0x2f> 10dd1b: 90 nop <== NOT EXECUTED 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 ); 10dd1c: 66 8b 35 0c 54 12 00 mov 0x12540c,%si 10dd23: 31 d2 xor %edx,%edx 10dd25: 89 d3 mov %edx,%ebx 10dd27: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10dd2b: 0f b7 db movzwl %bx,%ebx 10dd2e: 66 8b b4 1b a0 54 12 mov 0x1254a0(%ebx,%ebx,1),%si 10dd35: 00 10dd36: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10dd3a: c1 e3 04 shl $0x4,%ebx 10dd3d: 0f b7 d2 movzwl %dx,%edx 10dd40: 8d 14 13 lea (%ebx,%edx,1),%edx 10dd43: 8d 1c 52 lea (%edx,%edx,2),%ebx 10dd46: 8b 15 20 53 12 00 mov 0x125320,%edx 10dd4c: 8b 14 9a mov (%edx,%ebx,4),%edx 10dd4f: 89 15 e8 53 12 00 mov %edx,0x1253e8 10dd55: e9 60 ff ff ff jmp 10dcba <_Thread_Set_state+0x3a> 0010dd5c <_Thread_Set_transient>: */ void _Thread_Set_transient( Thread_Control *the_thread ) { 10dd5c: 55 push %ebp 10dd5d: 89 e5 mov %esp,%ebp 10dd5f: 56 push %esi 10dd60: 53 push %ebx 10dd61: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; uint32_t old_state; Chain_Control *ready; ready = the_thread->ready; 10dd64: 8b 88 8c 00 00 00 mov 0x8c(%eax),%ecx _ISR_Disable( level ); 10dd6a: 9c pushf 10dd6b: fa cli 10dd6c: 5b pop %ebx old_state = the_thread->current_state; 10dd6d: 8b 50 10 mov 0x10(%eax),%edx the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state ); 10dd70: 89 d6 mov %edx,%esi 10dd72: 83 ce 04 or $0x4,%esi 10dd75: 89 70 10 mov %esi,0x10(%eax) if ( _States_Is_ready( old_state ) ) { 10dd78: 85 d2 test %edx,%edx 10dd7a: 75 11 jne 10dd8d <_Thread_Set_transient+0x31> if ( _Chain_Has_only_one_node( ready ) ) { 10dd7c: 8b 11 mov (%ecx),%edx 10dd7e: 3b 51 08 cmp 0x8(%ecx),%edx 10dd81: 74 11 je 10dd94 <_Thread_Set_transient+0x38> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10dd83: 8b 10 mov (%eax),%edx previous = the_node->previous; 10dd85: 8b 40 04 mov 0x4(%eax),%eax next->previous = previous; 10dd88: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 10dd8b: 89 10 mov %edx,(%eax) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); } _ISR_Enable( level ); 10dd8d: 53 push %ebx 10dd8e: 9d popf } 10dd8f: 5b pop %ebx 10dd90: 5e pop %esi 10dd91: c9 leave 10dd92: c3 ret 10dd93: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10dd94: 8d 51 04 lea 0x4(%ecx),%edx 10dd97: 89 11 mov %edx,(%ecx) the_chain->permanent_null = NULL; 10dd99: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) the_chain->last = _Chain_Head(the_chain); 10dda0: 89 49 08 mov %ecx,0x8(%ecx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10dda3: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10dda9: 66 8b 88 9a 00 00 00 mov 0x9a(%eax),%cx 10ddb0: 66 21 0a and %cx,(%edx) if ( _States_Is_ready( old_state ) ) { if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 10ddb3: 66 83 3a 00 cmpw $0x0,(%edx) 10ddb7: 75 d4 jne 10dd8d <_Thread_Set_transient+0x31> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10ddb9: 66 8b 15 0c 54 12 00 mov 0x12540c,%dx 10ddc0: 23 90 98 00 00 00 and 0x98(%eax),%edx 10ddc6: 66 89 15 0c 54 12 00 mov %dx,0x12540c 10ddcd: eb be jmp 10dd8d <_Thread_Set_transient+0x31> 0010ddd0 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10ddd0: 55 push %ebp 10ddd1: 89 e5 mov %esp,%ebp 10ddd3: 53 push %ebx 10ddd4: 83 ec 04 sub $0x4,%esp 10ddd7: a1 10 12 12 00 mov 0x121210,%eax 10dddc: 8b 5d 0c mov 0xc(%ebp),%ebx 10dddf: 39 c3 cmp %eax,%ebx 10dde1: 73 02 jae 10dde5 <_Thread_Stack_Allocate+0x15> 10dde3: 89 c3 mov %eax,%ebx * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( Configuration.stack_allocate_hook ) { 10dde5: a1 40 12 12 00 mov 0x121240,%eax 10ddea: 85 c0 test %eax,%eax 10ddec: 74 32 je 10de20 <_Thread_Stack_Allocate+0x50> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 10ddee: 83 ec 0c sub $0xc,%esp 10ddf1: 53 push %ebx 10ddf2: ff d0 call *%eax 10ddf4: 83 c4 10 add $0x10,%esp the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 10ddf7: 85 c0 test %eax,%eax 10ddf9: 74 11 je 10de0c <_Thread_Stack_Allocate+0x3c> the_stack_size = 0; the_thread->Start.stack = stack_addr; 10ddfb: 8b 55 08 mov 0x8(%ebp),%edx 10ddfe: 89 82 cc 00 00 00 mov %eax,0xcc(%edx) return the_stack_size; } 10de04: 89 d8 mov %ebx,%eax 10de06: 8b 5d fc mov -0x4(%ebp),%ebx 10de09: c9 leave 10de0a: c3 ret 10de0b: 90 nop <== NOT EXECUTED the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 10de0c: 31 db xor %ebx,%ebx the_stack_size = 0; the_thread->Start.stack = stack_addr; 10de0e: 8b 55 08 mov 0x8(%ebp),%edx 10de11: 89 82 cc 00 00 00 mov %eax,0xcc(%edx) return the_stack_size; } 10de17: 89 d8 mov %ebx,%eax 10de19: 8b 5d fc mov -0x4(%ebp),%ebx 10de1c: c9 leave 10de1d: c3 ret 10de1e: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 10de20: 83 c3 10 add $0x10,%ebx * get and keep the stack adjust factor, the stack alignment, and * the context initialization sequence in sync. */ the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); 10de23: 83 ec 0c sub $0xc,%esp 10de26: 53 push %ebx 10de27: e8 e0 06 00 00 call 10e50c <_Workspace_Allocate> 10de2c: 83 c4 10 add $0x10,%esp 10de2f: eb c6 jmp 10ddf7 <_Thread_Stack_Allocate+0x27> 0010de34 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10de34: 55 push %ebp 10de35: 89 e5 mov %esp,%ebp 10de37: 83 ec 08 sub $0x8,%esp 10de3a: 8b 55 08 mov 0x8(%ebp),%edx * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) 10de3d: a1 44 12 12 00 mov 0x121244,%eax 10de42: 85 c0 test %eax,%eax 10de44: 74 0e je 10de54 <_Thread_Stack_Free+0x20> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10de46: 8b 92 c4 00 00 00 mov 0xc4(%edx),%edx 10de4c: 89 55 08 mov %edx,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10de4f: c9 leave * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10de50: ff e0 jmp *%eax 10de52: 66 90 xchg %ax,%ax <== NOT EXECUTED else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10de54: 8b 82 c4 00 00 00 mov 0xc4(%edx),%eax 10de5a: 89 45 08 mov %eax,0x8(%ebp) } 10de5d: c9 leave */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10de5e: e9 c5 06 00 00 jmp 10e528 <_Workspace_Free> 0010dec0 <_Thread_Start>: Thread_Start_types the_prototype, void *entry_point, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10dec0: 55 push %ebp 10dec1: 89 e5 mov %esp,%ebp 10dec3: 53 push %ebx 10dec4: 83 ec 04 sub $0x4,%esp 10dec7: 8b 5d 08 mov 0x8(%ebp),%ebx if ( _States_Is_dormant( the_thread->current_state ) ) { 10deca: f6 43 10 01 testb $0x1,0x10(%ebx) 10dece: 75 08 jne 10ded8 <_Thread_Start+0x18> 10ded0: 31 c0 xor %eax,%eax return true; } return false; } 10ded2: 8b 5d fc mov -0x4(%ebp),%ebx 10ded5: c9 leave 10ded6: c3 ret 10ded7: 90 nop <== NOT EXECUTED Thread_Entry_numeric_type numeric_argument ) { if ( _States_Is_dormant( the_thread->current_state ) ) { the_thread->Start.entry_point = (Thread_Entry) entry_point; 10ded8: 8b 45 10 mov 0x10(%ebp),%eax 10dedb: 89 83 9c 00 00 00 mov %eax,0x9c(%ebx) the_thread->Start.prototype = the_prototype; 10dee1: 8b 45 0c mov 0xc(%ebp),%eax 10dee4: 89 83 a0 00 00 00 mov %eax,0xa0(%ebx) the_thread->Start.pointer_argument = pointer_argument; 10deea: 8b 45 14 mov 0x14(%ebp),%eax 10deed: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 10def3: 8b 45 18 mov 0x18(%ebp),%eax 10def6: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) _Thread_Load_environment( the_thread ); 10defc: 83 ec 0c sub $0xc,%esp 10deff: 53 push %ebx 10df00: e8 af 26 00 00 call 1105b4 <_Thread_Load_environment> _Thread_Ready( the_thread ); 10df05: 89 1c 24 mov %ebx,(%esp) 10df08: e8 27 29 00 00 call 110834 <_Thread_Ready> _User_extensions_Thread_start( the_thread ); 10df0d: 89 1c 24 mov %ebx,(%esp) 10df10: e8 3b 03 00 00 call 10e250 <_User_extensions_Thread_start> 10df15: b0 01 mov $0x1,%al return true; 10df17: 83 c4 10 add $0x10,%esp } return false; } 10df1a: 8b 5d fc mov -0x4(%ebp),%ebx 10df1d: c9 leave 10df1e: c3 ret 00110938 <_Thread_Suspend>: */ void _Thread_Suspend( Thread_Control *the_thread ) { 110938: 55 push %ebp 110939: 89 e5 mov %esp,%ebp 11093b: 56 push %esi 11093c: 53 push %ebx 11093d: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 110940: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 110946: 9c pushf 110947: fa cli 110948: 59 pop %ecx #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { 110949: 8b 58 10 mov 0x10(%eax),%ebx 11094c: 85 db test %ebx,%ebx 11094e: 75 34 jne 110984 <_Thread_Suspend+0x4c> _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 110950: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 110957: 8b 1a mov (%edx),%ebx 110959: 3b 5a 08 cmp 0x8(%edx),%ebx 11095c: 74 3e je 11099c <_Thread_Suspend+0x64> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 11095e: 8b 18 mov (%eax),%ebx previous = the_node->previous; 110960: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 110963: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 110966: 89 1a mov %ebx,(%edx) _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 110968: 51 push %ecx 110969: 9d popf 11096a: fa cli if ( _Thread_Is_heir( the_thread ) ) 11096b: 3b 05 e8 53 12 00 cmp 0x1253e8,%eax 110971: 74 65 je 1109d8 <_Thread_Suspend+0xa0> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 110973: 3b 05 18 54 12 00 cmp 0x125418,%eax 110979: 74 15 je 110990 <_Thread_Suspend+0x58> _Context_Switch_necessary = true; _ISR_Enable( level ); 11097b: 51 push %ecx 11097c: 9d popf } 11097d: 5b pop %ebx 11097e: 5e pop %esi 11097f: c9 leave 110980: c3 ret 110981: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _ISR_Disable( level ); #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = 110984: 83 cb 02 or $0x2,%ebx 110987: 89 58 10 mov %ebx,0x10(%eax) _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 11098a: 51 push %ecx 11098b: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 11098c: 5b pop %ebx 11098d: 5e pop %esi 11098e: c9 leave 11098f: c3 ret if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 110990: c6 05 28 54 12 00 01 movb $0x1,0x125428 110997: eb e2 jmp 11097b <_Thread_Suspend+0x43> 110999: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11099c: 8d 5a 04 lea 0x4(%edx),%ebx 11099f: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 1109a1: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 1109a8: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 1109ab: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 1109b1: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 1109b8: 66 21 1a and %bx,(%edx) the_thread->current_state = STATES_SUSPENDED; if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 1109bb: 66 83 3a 00 cmpw $0x0,(%edx) 1109bf: 75 a7 jne 110968 <_Thread_Suspend+0x30> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 1109c1: 66 8b 15 0c 54 12 00 mov 0x12540c,%dx 1109c8: 23 90 98 00 00 00 and 0x98(%eax),%edx 1109ce: 66 89 15 0c 54 12 00 mov %dx,0x12540c 1109d5: eb 91 jmp 110968 <_Thread_Suspend+0x30> 1109d7: 90 nop <== NOT EXECUTED 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 ); 1109d8: 66 8b 35 0c 54 12 00 mov 0x12540c,%si 1109df: 31 d2 xor %edx,%edx 1109e1: 89 d3 mov %edx,%ebx 1109e3: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 1109e7: 0f b7 db movzwl %bx,%ebx 1109ea: 66 8b b4 1b a0 54 12 mov 0x1254a0(%ebx,%ebx,1),%si 1109f1: 00 1109f2: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 1109f6: c1 e3 04 shl $0x4,%ebx 1109f9: 0f b7 d2 movzwl %dx,%edx 1109fc: 8d 14 13 lea (%ebx,%edx,1),%edx 1109ff: 8d 1c 52 lea (%edx,%edx,2),%ebx 110a02: 8b 15 20 53 12 00 mov 0x125320,%edx 110a08: 8b 14 9a mov (%edx,%ebx,4),%edx 110a0b: 89 15 e8 53 12 00 mov %edx,0x1253e8 110a11: e9 5d ff ff ff jmp 110973 <_Thread_Suspend+0x3b> 0010df60 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10df60: 55 push %ebp 10df61: 89 e5 mov %esp,%ebp 10df63: 56 push %esi 10df64: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10df65: a1 18 54 12 00 mov 0x125418,%eax ready = executing->ready; 10df6a: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10df70: 9c pushf 10df71: fa cli 10df72: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10df73: 8b 1a mov (%edx),%ebx 10df75: 3b 5a 08 cmp 0x8(%edx),%ebx 10df78: 74 3e je 10dfb8 <_Thread_Yield_processor+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10df7a: 8b 30 mov (%eax),%esi previous = the_node->previous; 10df7c: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10df7f: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10df82: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10df84: 8d 5a 04 lea 0x4(%edx),%ebx 10df87: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10df89: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10df8c: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10df8f: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10df91: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10df94: 51 push %ecx 10df95: 9d popf 10df96: fa cli if ( _Thread_Is_heir( executing ) ) 10df97: 3b 05 e8 53 12 00 cmp 0x1253e8,%eax 10df9d: 74 0d je 10dfac <_Thread_Yield_processor+0x4c> _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 10df9f: c6 05 28 54 12 00 01 movb $0x1,0x125428 _ISR_Enable( level ); 10dfa6: 51 push %ecx 10dfa7: 9d popf } 10dfa8: 5b pop %ebx 10dfa9: 5e pop %esi 10dfaa: c9 leave 10dfab: c3 ret _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 10dfac: 8b 02 mov (%edx),%eax 10dfae: a3 e8 53 12 00 mov %eax,0x1253e8 10dfb3: eb ea jmp 10df9f <_Thread_Yield_processor+0x3f> 10dfb5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10dfb8: 3b 05 e8 53 12 00 cmp 0x1253e8,%eax 10dfbe: 75 df jne 10df9f <_Thread_Yield_processor+0x3f> 10dfc0: eb e4 jmp 10dfa6 <_Thread_Yield_processor+0x46> 0010cec4 <_Thread_blocking_operation_Cancel>: Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 10cec4: 55 push %ebp 10cec5: 89 e5 mov %esp,%ebp 10cec7: 53 push %ebx 10cec8: 83 ec 04 sub $0x4,%esp 10cecb: 8b 5d 0c mov 0xc(%ebp),%ebx 10cece: 8b 45 10 mov 0x10(%ebp),%eax #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 10ced1: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 10ced8: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10cedc: 74 16 je 10cef4 <_Thread_blocking_operation_Cancel+0x30> _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 10cede: 50 push %eax 10cedf: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10cee0: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10cee7: 89 5d 08 mov %ebx,0x8(%ebp) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 10ceea: 8b 5d fc mov -0x4(%ebp),%ebx 10ceed: c9 leave 10ceee: e9 5d 01 00 00 jmp 10d050 <_Thread_Clear_state> 10cef3: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10cef4: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10cefb: 50 push %eax 10cefc: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10cefd: 83 ec 0c sub $0xc,%esp 10cf00: 8d 43 48 lea 0x48(%ebx),%eax 10cf03: 50 push %eax 10cf04: e8 ff 14 00 00 call 10e408 <_Watchdog_Remove> 10cf09: 83 c4 10 add $0x10,%esp 10cf0c: eb d2 jmp 10cee0 <_Thread_blocking_operation_Cancel+0x1c> 0010d7b0 <_Thread_queue_Dequeue>: */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { 10d7b0: 55 push %ebp 10d7b1: 89 e5 mov %esp,%ebp 10d7b3: 53 push %ebx 10d7b4: 83 ec 04 sub $0x4,%esp 10d7b7: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10d7ba: 83 7b 34 01 cmpl $0x1,0x34(%ebx) 10d7be: 74 1c je 10d7dc <_Thread_queue_Dequeue+0x2c> 10d7c0: b8 44 06 11 00 mov $0x110644,%eax dequeue_p = _Thread_queue_Dequeue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ dequeue_p = _Thread_queue_Dequeue_fifo; the_thread = (*dequeue_p)( the_thread_queue ); 10d7c5: 83 ec 0c sub $0xc,%esp 10d7c8: 53 push %ebx 10d7c9: ff d0 call *%eax _ISR_Disable( level ); 10d7cb: 9c pushf 10d7cc: fa cli 10d7cd: 5a pop %edx if ( !the_thread ) { 10d7ce: 83 c4 10 add $0x10,%esp 10d7d1: 85 c0 test %eax,%eax 10d7d3: 74 0f je 10d7e4 <_Thread_queue_Dequeue+0x34> (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; the_thread = _Thread_Executing; } } _ISR_Enable( level ); 10d7d5: 52 push %edx 10d7d6: 9d popf return the_thread; } 10d7d7: 8b 5d fc mov -0x4(%ebp),%ebx 10d7da: c9 leave 10d7db: c3 ret Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10d7dc: b8 fc d7 10 00 mov $0x10d7fc,%eax 10d7e1: eb e2 jmp 10d7c5 <_Thread_queue_Dequeue+0x15> 10d7e3: 90 nop <== NOT EXECUTED dequeue_p = _Thread_queue_Dequeue_fifo; the_thread = (*dequeue_p)( the_thread_queue ); _ISR_Disable( level ); if ( !the_thread ) { sync_state = the_thread_queue->sync_state; 10d7e4: 8b 4b 30 mov 0x30(%ebx),%ecx 10d7e7: 49 dec %ecx 10d7e8: 83 f9 01 cmp $0x1,%ecx 10d7eb: 77 e8 ja 10d7d5 <_Thread_queue_Dequeue+0x25> if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10d7ed: c7 43 30 03 00 00 00 movl $0x3,0x30(%ebx) the_thread = _Thread_Executing; 10d7f4: a1 18 54 12 00 mov 0x125418,%eax 10d7f9: eb da jmp 10d7d5 <_Thread_queue_Dequeue+0x25> 0010d7fc <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10d7fc: 55 push %ebp 10d7fd: 89 e5 mov %esp,%ebp 10d7ff: 57 push %edi 10d800: 56 push %esi 10d801: 53 push %ebx 10d802: 83 ec 1c sub $0x1c,%esp 10d805: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 10d808: 9c pushf 10d809: fa cli 10d80a: 58 pop %eax 10d80b: 89 f2 mov %esi,%edx 10d80d: 31 c9 xor %ecx,%ecx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10d80f: 8d 5a 04 lea 0x4(%edx),%ebx 10d812: 39 1a cmp %ebx,(%edx) 10d814: 75 1a jne 10d830 <_Thread_queue_Dequeue_priority+0x34> for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10d816: 41 inc %ecx 10d817: 83 c2 0c add $0xc,%edx Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 10d81a: 83 f9 04 cmp $0x4,%ecx 10d81d: 75 f0 jne 10d80f <_Thread_queue_Dequeue_priority+0x13> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10d81f: 50 push %eax 10d820: 9d popf 10d821: 31 db xor %ebx,%ebx #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 10d823: 89 d8 mov %ebx,%eax 10d825: 8d 65 f4 lea -0xc(%ebp),%esp 10d828: 5b pop %ebx 10d829: 5e pop %esi 10d82a: 5f pop %edi 10d82b: c9 leave 10d82c: c3 ret 10d82d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { the_thread = (Thread_Control *) 10d830: 8d 14 49 lea (%ecx,%ecx,2),%edx 10d833: 8b 1c 96 mov (%esi,%edx,4),%ebx */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10d836: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) new_first_node = the_thread->Wait.Block2n.first; 10d83d: 8b 53 38 mov 0x38(%ebx),%edx new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 10d840: 8b 0b mov (%ebx),%ecx previous_node = the_thread->Object.Node.previous; 10d842: 8b 73 04 mov 0x4(%ebx),%esi 10d845: 8d 7b 3c lea 0x3c(%ebx),%edi 10d848: 39 fa cmp %edi,%edx 10d84a: 74 76 je 10d8c2 <_Thread_queue_Dequeue_priority+0xc6> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; 10d84c: 8b 7b 40 mov 0x40(%ebx),%edi 10d84f: 89 7d e4 mov %edi,-0x1c(%ebp) new_second_node = new_first_node->next; 10d852: 8b 3a mov (%edx),%edi previous_node->next = new_first_node; 10d854: 89 16 mov %edx,(%esi) next_node->previous = new_first_node; 10d856: 89 51 04 mov %edx,0x4(%ecx) new_first_node->next = next_node; 10d859: 89 0a mov %ecx,(%edx) new_first_node->previous = previous_node; 10d85b: 89 72 04 mov %esi,0x4(%edx) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10d85e: 8b 4b 38 mov 0x38(%ebx),%ecx 10d861: 3b 4b 40 cmp 0x40(%ebx),%ecx 10d864: 74 14 je 10d87a <_Thread_queue_Dequeue_priority+0x7e> /* > two threads on 2-n */ new_second_node->previous = 10d866: 8d 4a 38 lea 0x38(%edx),%ecx 10d869: 89 4f 04 mov %ecx,0x4(%edi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 10d86c: 89 7a 38 mov %edi,0x38(%edx) new_first_thread->Wait.Block2n.last = last_node; 10d86f: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d872: 89 4a 40 mov %ecx,0x40(%edx) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 10d875: 83 c2 3c add $0x3c,%edx 10d878: 89 11 mov %edx,(%ecx) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10d87a: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d87e: 74 18 je 10d898 <_Thread_queue_Dequeue_priority+0x9c> _ISR_Enable( level ); 10d880: 50 push %eax 10d881: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10d882: 83 ec 08 sub $0x8,%esp 10d885: 68 f8 ff 03 10 push $0x1003fff8 10d88a: 53 push %ebx 10d88b: e8 c0 f7 ff ff call 10d050 <_Thread_Clear_state> 10d890: 83 c4 10 add $0x10,%esp 10d893: eb 8e jmp 10d823 <_Thread_queue_Dequeue_priority+0x27> 10d895: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10d898: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10d89f: 50 push %eax 10d8a0: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10d8a1: 83 ec 0c sub $0xc,%esp 10d8a4: 8d 43 48 lea 0x48(%ebx),%eax 10d8a7: 50 push %eax 10d8a8: e8 5b 0b 00 00 call 10e408 <_Watchdog_Remove> 10d8ad: 58 pop %eax 10d8ae: 5a pop %edx 10d8af: 68 f8 ff 03 10 push $0x1003fff8 10d8b4: 53 push %ebx 10d8b5: e8 96 f7 ff ff call 10d050 <_Thread_Clear_state> 10d8ba: 83 c4 10 add $0x10,%esp 10d8bd: e9 61 ff ff ff jmp 10d823 <_Thread_queue_Dequeue_priority+0x27> new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 10d8c2: 89 0e mov %ecx,(%esi) next_node->previous = previous_node; 10d8c4: 89 71 04 mov %esi,0x4(%ecx) 10d8c7: eb b1 jmp 10d87a <_Thread_queue_Dequeue_priority+0x7e> 001106bc <_Thread_queue_Enqueue_fifo>: Thread_blocking_operation_States _Thread_queue_Enqueue_fifo ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 1106bc: 55 push %ebp 1106bd: 89 e5 mov %esp,%ebp 1106bf: 56 push %esi 1106c0: 53 push %ebx 1106c1: 8b 55 08 mov 0x8(%ebp),%edx 1106c4: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 1106c7: 9c pushf 1106c8: fa cli 1106c9: 59 pop %ecx sync_state = the_thread_queue->sync_state; 1106ca: 8b 42 30 mov 0x30(%edx),%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 1106cd: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 1106d4: 83 f8 01 cmp $0x1,%eax 1106d7: 74 0b je 1106e4 <_Thread_queue_Enqueue_fifo+0x28> * 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; 1106d9: 8b 55 10 mov 0x10(%ebp),%edx 1106dc: 89 0a mov %ecx,(%edx) return sync_state; } 1106de: 5b pop %ebx 1106df: 5e pop %esi 1106e0: c9 leave 1106e1: c3 ret 1106e2: 66 90 xchg %ax,%ax <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 1106e4: 8d 72 04 lea 0x4(%edx),%esi 1106e7: 89 33 mov %esi,(%ebx) old_last_node = the_chain->last; 1106e9: 8b 72 08 mov 0x8(%edx),%esi the_chain->last = the_node; 1106ec: 89 5a 08 mov %ebx,0x8(%edx) old_last_node->next = the_node; 1106ef: 89 1e mov %ebx,(%esi) the_node->previous = old_last_node; 1106f1: 89 73 04 mov %esi,0x4(%ebx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { _Chain_Append_unprotected( &the_thread_queue->Queues.Fifo, &the_thread->Object.Node ); the_thread->Wait.queue = the_thread_queue; 1106f4: 89 53 44 mov %edx,0x44(%ebx) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 1106f7: 51 push %ecx 1106f8: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return sync_state; } 1106f9: 5b pop %ebx 1106fa: 5e pop %esi 1106fb: c9 leave 1106fc: c3 ret 0010d964 <_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 ) { 10d964: 55 push %ebp 10d965: 89 e5 mov %esp,%ebp 10d967: 57 push %edi 10d968: 56 push %esi 10d969: 53 push %ebx 10d96a: 83 ec 08 sub $0x8,%esp 10d96d: 8b 7d 0c mov 0xc(%ebp),%edi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10d970: 8d 47 3c lea 0x3c(%edi),%eax 10d973: 89 47 38 mov %eax,0x38(%edi) the_chain->permanent_null = NULL; 10d976: c7 47 3c 00 00 00 00 movl $0x0,0x3c(%edi) the_chain->last = _Chain_Head(the_chain); 10d97d: 8d 47 38 lea 0x38(%edi),%eax 10d980: 89 47 40 mov %eax,0x40(%edi) Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 10d983: 8b 57 14 mov 0x14(%edi),%edx header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10d986: 89 d0 mov %edx,%eax 10d988: c1 e8 06 shr $0x6,%eax 10d98b: 8d 04 40 lea (%eax,%eax,2),%eax 10d98e: 8b 4d 08 mov 0x8(%ebp),%ecx 10d991: 8d 34 81 lea (%ecx,%eax,4),%esi block_state = the_thread_queue->state; 10d994: 8b 59 38 mov 0x38(%ecx),%ebx if ( _Thread_queue_Is_reverse_search( priority ) ) 10d997: f6 c2 20 test $0x20,%dl 10d99a: 75 60 jne 10d9fc <_Thread_queue_Enqueue_priority+0x98> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10d99c: 8d 46 04 lea 0x4(%esi),%eax 10d99f: 89 75 f0 mov %esi,-0x10(%ebp) 10d9a2: 89 7d ec mov %edi,-0x14(%ebp) 10d9a5: 89 c7 mov %eax,%edi goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10d9a7: 9c pushf 10d9a8: fa cli 10d9a9: 5e pop %esi search_thread = (Thread_Control *) header->first; 10d9aa: 8b 4d f0 mov -0x10(%ebp),%ecx 10d9ad: 8b 01 mov (%ecx),%eax while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10d9af: 39 f8 cmp %edi,%eax 10d9b1: 75 17 jne 10d9ca <_Thread_queue_Enqueue_priority+0x66> 10d9b3: e9 09 01 00 00 jmp 10dac1 <_Thread_queue_Enqueue_priority+0x15d> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10d9b8: 56 push %esi 10d9b9: 9d popf 10d9ba: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10d9bb: 85 58 10 test %ebx,0x10(%eax) 10d9be: 0f 84 a8 00 00 00 je 10da6c <_Thread_queue_Enqueue_priority+0x108> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10d9c4: 8b 00 mov (%eax),%eax 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 ) ) { 10d9c6: 39 f8 cmp %edi,%eax 10d9c8: 74 07 je 10d9d1 <_Thread_queue_Enqueue_priority+0x6d> search_priority = search_thread->current_priority; 10d9ca: 8b 48 14 mov 0x14(%eax),%ecx if ( priority <= search_priority ) 10d9cd: 39 ca cmp %ecx,%edx 10d9cf: 77 e7 ja 10d9b8 <_Thread_queue_Enqueue_priority+0x54> 10d9d1: 89 4d f0 mov %ecx,-0x10(%ebp) 10d9d4: 8b 7d ec mov -0x14(%ebp),%edi 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 ) ) { 10d9d7: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10d9d9: 8b 4d 08 mov 0x8(%ebp),%ecx 10d9dc: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10d9e0: 0f 84 8e 00 00 00 je 10da74 <_Thread_queue_Enqueue_priority+0x110> * 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; 10d9e6: 8b 45 10 mov 0x10(%ebp),%eax 10d9e9: 89 18 mov %ebx,(%eax) return the_thread_queue->sync_state; 10d9eb: 8b 55 08 mov 0x8(%ebp),%edx 10d9ee: 8b 42 30 mov 0x30(%edx),%eax } 10d9f1: 83 c4 08 add $0x8,%esp 10d9f4: 5b pop %ebx 10d9f5: 5e pop %esi 10d9f6: 5f pop %edi 10d9f7: c9 leave 10d9f8: c3 ret 10d9f9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10d9fc: 89 7d f0 mov %edi,-0x10(%ebp) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 10d9ff: 0f b6 0d 14 12 12 00 movzbl 0x121214,%ecx 10da06: 41 inc %ecx _ISR_Disable( level ); 10da07: 9c pushf 10da08: fa cli 10da09: 5f pop %edi search_thread = (Thread_Control *) header->last; 10da0a: 8b 46 08 mov 0x8(%esi),%eax while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10da0d: 39 f0 cmp %esi,%eax 10da0f: 75 12 jne 10da23 <_Thread_queue_Enqueue_priority+0xbf> 10da11: eb 17 jmp 10da2a <_Thread_queue_Enqueue_priority+0xc6> 10da13: 90 nop <== NOT EXECUTED break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10da14: 57 push %edi 10da15: 9d popf 10da16: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10da17: 85 58 10 test %ebx,0x10(%eax) 10da1a: 74 4c je 10da68 <_Thread_queue_Enqueue_priority+0x104> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 10da1c: 8b 40 04 mov 0x4(%eax),%eax 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 ) ) { 10da1f: 39 f0 cmp %esi,%eax 10da21: 74 07 je 10da2a <_Thread_queue_Enqueue_priority+0xc6> search_priority = search_thread->current_priority; 10da23: 8b 48 14 mov 0x14(%eax),%ecx if ( priority >= search_priority ) 10da26: 39 ca cmp %ecx,%edx 10da28: 72 ea jb 10da14 <_Thread_queue_Enqueue_priority+0xb0> 10da2a: 89 fe mov %edi,%esi 10da2c: 89 4d ec mov %ecx,-0x14(%ebp) 10da2f: 8b 7d f0 mov -0x10(%ebp),%edi 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 ) ) { 10da32: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10da34: 8b 4d 08 mov 0x8(%ebp),%ecx 10da37: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10da3b: 75 a9 jne 10d9e6 <_Thread_queue_Enqueue_priority+0x82> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10da3d: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10da44: 3b 55 ec cmp -0x14(%ebp),%edx 10da47: 74 56 je 10da9f <_Thread_queue_Enqueue_priority+0x13b> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10da49: 8b 10 mov (%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10da4b: 89 17 mov %edx,(%edi) the_node->previous = search_node; 10da4d: 89 47 04 mov %eax,0x4(%edi) search_node->next = the_node; 10da50: 89 38 mov %edi,(%eax) next_node->previous = the_node; 10da52: 89 7a 04 mov %edi,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10da55: 89 4f 44 mov %ecx,0x44(%edi) _ISR_Enable( level ); 10da58: 56 push %esi 10da59: 9d popf 10da5a: b8 01 00 00 00 mov $0x1,%eax * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10da5f: 83 c4 08 add $0x8,%esp 10da62: 5b pop %ebx 10da63: 5e pop %esi 10da64: 5f pop %edi 10da65: c9 leave 10da66: c3 ret 10da67: 90 nop <== NOT EXECUTED if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10da68: 57 push %edi 10da69: 9d popf goto restart_reverse_search; 10da6a: eb 93 jmp 10d9ff <_Thread_queue_Enqueue_priority+0x9b> if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10da6c: 56 push %esi <== NOT EXECUTED 10da6d: 9d popf <== NOT EXECUTED goto restart_forward_search; 10da6e: e9 34 ff ff ff jmp 10d9a7 <_Thread_queue_Enqueue_priority+0x43> <== NOT EXECUTED 10da73: 90 nop <== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10da74: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10da7b: 3b 55 f0 cmp -0x10(%ebp),%edx 10da7e: 74 1f je 10da9f <_Thread_queue_Enqueue_priority+0x13b> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10da80: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10da83: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10da85: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10da88: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10da8a: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10da8d: 89 4f 44 mov %ecx,0x44(%edi) _ISR_Enable( level ); 10da90: 56 push %esi 10da91: 9d popf 10da92: b8 01 00 00 00 mov $0x1,%eax * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10da97: 83 c4 08 add $0x8,%esp 10da9a: 5b pop %ebx 10da9b: 5e pop %esi 10da9c: 5f pop %edi 10da9d: c9 leave 10da9e: c3 ret 10da9f: 83 c0 3c add $0x3c,%eax _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 10daa2: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10daa5: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10daa7: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10daaa: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10daac: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10daaf: 8b 45 08 mov 0x8(%ebp),%eax 10dab2: 89 47 44 mov %eax,0x44(%edi) _ISR_Enable( level ); 10dab5: 53 push %ebx 10dab6: 9d popf 10dab7: b8 01 00 00 00 mov $0x1,%eax return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10dabc: e9 30 ff ff ff jmp 10d9f1 <_Thread_queue_Enqueue_priority+0x8d> 10dac1: 8b 7d ec mov -0x14(%ebp),%edi 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 ) ) { 10dac4: 89 f3 mov %esi,%ebx 10dac6: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp) 10dacd: e9 07 ff ff ff jmp 10d9d9 <_Thread_queue_Enqueue_priority+0x75> 0010d8cc <_Thread_queue_Enqueue_with_handler>: void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { 10d8cc: 55 push %ebp 10d8cd: 89 e5 mov %esp,%ebp 10d8cf: 57 push %edi 10d8d0: 56 push %esi 10d8d1: 53 push %ebx 10d8d2: 83 ec 24 sub $0x24,%esp 10d8d5: 8b 75 08 mov 0x8(%ebp),%esi 10d8d8: 8b 7d 0c mov 0xc(%ebp),%edi Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; 10d8db: 8b 1d 18 54 12 00 mov 0x125418,%ebx else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 10d8e1: ff 76 38 pushl 0x38(%esi) 10d8e4: 53 push %ebx 10d8e5: e8 96 03 00 00 call 10dc80 <_Thread_Set_state> /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 10d8ea: 83 c4 10 add $0x10,%esp 10d8ed: 85 ff test %edi,%edi 10d8ef: 75 33 jne 10d924 <_Thread_queue_Enqueue_with_handler+0x58> } /* * Now enqueue the thread per the discipline for this thread queue. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10d8f1: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10d8f5: 74 64 je 10d95b <_Thread_queue_Enqueue_with_handler+0x8f> 10d8f7: b8 bc 06 11 00 mov $0x1106bc,%eax enqueue_p = _Thread_queue_Enqueue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ enqueue_p = _Thread_queue_Enqueue_fifo; sync_state = (*enqueue_p)( the_thread_queue, the_thread, &level ); 10d8fc: 51 push %ecx 10d8fd: 8d 55 e4 lea -0x1c(%ebp),%edx 10d900: 52 push %edx 10d901: 53 push %ebx 10d902: 56 push %esi 10d903: ff d0 call *%eax if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10d905: 83 c4 10 add $0x10,%esp 10d908: 83 f8 01 cmp $0x1,%eax 10d90b: 74 0e je 10d91b <_Thread_queue_Enqueue_with_handler+0x4f> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); 10d90d: 52 push %edx 10d90e: ff 75 e4 pushl -0x1c(%ebp) 10d911: 53 push %ebx 10d912: 50 push %eax 10d913: e8 ac f5 ff ff call 10cec4 <_Thread_blocking_operation_Cancel> 10d918: 83 c4 10 add $0x10,%esp } 10d91b: 8d 65 f4 lea -0xc(%ebp),%esp 10d91e: 5b pop %ebx 10d91f: 5e pop %esi 10d920: 5f pop %edi 10d921: c9 leave 10d922: c3 ret 10d923: 90 nop <== NOT EXECUTED /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { _Watchdog_Initialize( 10d924: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10d927: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10d92e: 8b 55 10 mov 0x10(%ebp),%edx 10d931: 89 53 64 mov %edx,0x64(%ebx) the_watchdog->id = id; 10d934: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10d937: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10d93e: 89 7b 54 mov %edi,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10d941: 83 ec 08 sub $0x8,%esp 10d944: 8d 43 48 lea 0x48(%ebx),%eax 10d947: 50 push %eax 10d948: 68 38 54 12 00 push $0x125438 10d94d: e8 7e 09 00 00 call 10e2d0 <_Watchdog_Insert> 10d952: 83 c4 10 add $0x10,%esp } /* * Now enqueue the thread per the discipline for this thread queue. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10d955: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10d959: 75 9c jne 10d8f7 <_Thread_queue_Enqueue_with_handler+0x2b> 10d95b: b8 64 d9 10 00 mov $0x10d964,%eax 10d960: eb 9a jmp 10d8fc <_Thread_queue_Enqueue_with_handler+0x30> 00110700 <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 110700: 55 push %ebp 110701: 89 e5 mov %esp,%ebp 110703: 83 ec 08 sub $0x8,%esp 110706: 8b 45 08 mov 0x8(%ebp),%eax 110709: 8b 55 0c mov 0xc(%ebp),%edx /* * Can not use indirect function pointer here since Extract priority * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 11070c: 83 78 34 01 cmpl $0x1,0x34(%eax) 110710: 74 0e je 110720 <_Thread_queue_Extract+0x20> _Thread_queue_Extract_priority( the_thread_queue, the_thread ); else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); 110712: 89 55 0c mov %edx,0xc(%ebp) 110715: 89 45 08 mov %eax,0x8(%ebp) } 110718: c9 leave * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) _Thread_queue_Extract_priority( the_thread_queue, the_thread ); else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); 110719: e9 ba 17 00 00 jmp 111ed8 <_Thread_queue_Extract_fifo> 11071e: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Can not use indirect function pointer here since Extract priority * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) _Thread_queue_Extract_priority( the_thread_queue, the_thread ); 110720: 51 push %ecx 110721: 6a 00 push $0x0 110723: 52 push %edx 110724: 50 push %eax 110725: e8 06 00 00 00 call 110730 <_Thread_queue_Extract_priority_helper> 11072a: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 11072d: c9 leave 11072e: c3 ret 00111ed8 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 111ed8: 55 push %ebp 111ed9: 89 e5 mov %esp,%ebp 111edb: 53 push %ebx 111edc: 83 ec 04 sub $0x4,%esp 111edf: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 111ee2: 9c pushf 111ee3: fa cli 111ee4: 58 pop %eax if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 111ee5: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 111eec: 74 2e je 111f1c <_Thread_queue_Extract_fifo+0x44> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 111eee: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 111ef0: 8b 53 04 mov 0x4(%ebx),%edx next->previous = previous; 111ef3: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 111ef6: 89 0a mov %ecx,(%edx) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 111ef8: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 111eff: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 111f03: 74 1f je 111f24 <_Thread_queue_Extract_fifo+0x4c> _ISR_Enable( level ); 111f05: 50 push %eax 111f06: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 111f07: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 111f0e: 89 5d 08 mov %ebx,0x8(%ebp) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 111f11: 8b 5d fc mov -0x4(%ebp),%ebx 111f14: c9 leave 111f15: e9 36 b1 ff ff jmp 10d050 <_Thread_Clear_state> 111f1a: 66 90 xchg %ax,%ax <== NOT EXECUTED ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 111f1c: 50 push %eax 111f1d: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 111f1e: 8b 5d fc mov -0x4(%ebp),%ebx 111f21: c9 leave 111f22: c3 ret 111f23: 90 nop <== NOT EXECUTED 111f24: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 111f2b: 50 push %eax 111f2c: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 111f2d: 83 ec 0c sub $0xc,%esp 111f30: 8d 43 48 lea 0x48(%ebx),%eax 111f33: 50 push %eax 111f34: e8 cf c4 ff ff call 10e408 <_Watchdog_Remove> 111f39: 83 c4 10 add $0x10,%esp 111f3c: eb c9 jmp 111f07 <_Thread_queue_Extract_fifo+0x2f> 00110730 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread, bool requeuing ) { 110730: 55 push %ebp 110731: 89 e5 mov %esp,%ebp 110733: 57 push %edi 110734: 56 push %esi 110735: 53 push %ebx 110736: 83 ec 1c sub $0x1c,%esp 110739: 8b 5d 0c mov 0xc(%ebp),%ebx 11073c: 8a 45 10 mov 0x10(%ebp),%al 11073f: 88 45 e3 mov %al,-0x1d(%ebp) Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 110742: 9c pushf 110743: fa cli 110744: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 110747: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 11074e: 74 6c je 1107bc <_Thread_queue_Extract_priority_helper+0x8c> /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 110750: 8b 13 mov (%ebx),%edx previous_node = the_node->previous; 110752: 8b 4b 04 mov 0x4(%ebx),%ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 110755: 8b 43 38 mov 0x38(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 110758: 8d 73 3c lea 0x3c(%ebx),%esi 11075b: 39 f0 cmp %esi,%eax 11075d: 74 69 je 1107c8 <_Thread_queue_Extract_priority_helper+0x98> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 11075f: 8b 7b 40 mov 0x40(%ebx),%edi new_second_node = new_first_node->next; 110762: 8b 30 mov (%eax),%esi previous_node->next = new_first_node; 110764: 89 01 mov %eax,(%ecx) next_node->previous = new_first_node; 110766: 89 42 04 mov %eax,0x4(%edx) new_first_node->next = next_node; 110769: 89 10 mov %edx,(%eax) new_first_node->previous = previous_node; 11076b: 89 48 04 mov %ecx,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 11076e: 8b 53 38 mov 0x38(%ebx),%edx 110771: 3b 53 40 cmp 0x40(%ebx),%edx 110774: 74 11 je 110787 <_Thread_queue_Extract_priority_helper+0x57> /* > two threads on 2-n */ new_second_node->previous = 110776: 8d 50 38 lea 0x38(%eax),%edx 110779: 89 56 04 mov %edx,0x4(%esi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 11077c: 89 70 38 mov %esi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 11077f: 89 78 40 mov %edi,0x40(%eax) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 110782: 83 c0 3c add $0x3c,%eax 110785: 89 07 mov %eax,(%edi) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 110787: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 11078b: 75 23 jne 1107b0 <_Thread_queue_Extract_priority_helper+0x80> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 11078d: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 110791: 74 3d je 1107d0 <_Thread_queue_Extract_priority_helper+0xa0> _ISR_Enable( level ); 110793: ff 75 e4 pushl -0x1c(%ebp) 110796: 9d popf 110797: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 11079e: 89 5d 08 mov %ebx,0x8(%ebp) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 1107a1: 8d 65 f4 lea -0xc(%ebp),%esp 1107a4: 5b pop %ebx 1107a5: 5e pop %esi 1107a6: 5f pop %edi 1107a7: c9 leave 1107a8: e9 a3 c8 ff ff jmp 10d050 <_Thread_Clear_state> 1107ad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 1107b0: ff 75 e4 pushl -0x1c(%ebp) 1107b3: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 1107b4: 8d 65 f4 lea -0xc(%ebp),%esp 1107b7: 5b pop %ebx 1107b8: 5e pop %esi 1107b9: 5f pop %edi 1107ba: c9 leave 1107bb: c3 ret Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 1107bc: ff 75 e4 pushl -0x1c(%ebp) 1107bf: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 1107c0: 8d 65 f4 lea -0xc(%ebp),%esp 1107c3: 5b pop %ebx 1107c4: 5e pop %esi 1107c5: 5f pop %edi 1107c6: c9 leave 1107c7: c3 ret new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 1107c8: 89 11 mov %edx,(%ecx) next_node->previous = previous_node; 1107ca: 89 4a 04 mov %ecx,0x4(%edx) 1107cd: eb b8 jmp 110787 <_Thread_queue_Extract_priority_helper+0x57> 1107cf: 90 nop <== NOT EXECUTED 1107d0: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 1107d7: ff 75 e4 pushl -0x1c(%ebp) 1107da: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 1107db: 83 ec 0c sub $0xc,%esp 1107de: 8d 43 48 lea 0x48(%ebx),%eax 1107e1: 50 push %eax 1107e2: e8 21 dc ff ff call 10e408 <_Watchdog_Remove> 1107e7: 83 c4 10 add $0x10,%esp 1107ea: eb ab jmp 110797 <_Thread_queue_Extract_priority_helper+0x67> 0010dad4 <_Thread_queue_Extract_with_proxy>: */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 10dad4: 55 push %ebp 10dad5: 89 e5 mov %esp,%ebp 10dad7: 83 ec 08 sub $0x8,%esp 10dada: 8b 45 08 mov 0x8(%ebp),%eax States_Control state; state = the_thread->current_state; 10dadd: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax) 10dae4: 75 06 jne 10daec <_Thread_queue_Extract_with_proxy+0x18> 10dae6: 31 c0 xor %eax,%eax _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); return true; } return false; } 10dae8: c9 leave 10dae9: c3 ret 10daea: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( proxy_extract_callout ) (*proxy_extract_callout)( the_thread ); } #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 10daec: 83 ec 08 sub $0x8,%esp 10daef: 50 push %eax 10daf0: ff 70 44 pushl 0x44(%eax) 10daf3: e8 08 2c 00 00 call 110700 <_Thread_queue_Extract> 10daf8: b0 01 mov $0x1,%al return true; 10dafa: 83 c4 10 add $0x10,%esp } return false; } 10dafd: c9 leave 10dafe: c3 ret 0011e7f8 <_Thread_queue_First>: */ Thread_Control *_Thread_queue_First( Thread_queue_Control *the_thread_queue ) { 11e7f8: 55 push %ebp 11e7f9: 89 e5 mov %esp,%ebp 11e7fb: 83 ec 08 sub $0x8,%esp 11e7fe: 8b 45 08 mov 0x8(%ebp),%eax Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 11e801: 83 78 34 01 cmpl $0x1,0x34(%eax) 11e805: 74 0d je 11e814 <_Thread_queue_First+0x1c> 11e807: ba 74 fc 11 00 mov $0x11fc74,%edx first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 11e80c: 89 45 08 mov %eax,0x8(%ebp) } 11e80f: c9 leave if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 11e810: ff e2 jmp *%edx 11e812: 66 90 xchg %ax,%ax <== NOT EXECUTED Thread_queue_Control *the_thread_queue ) { Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 11e814: ba 20 e8 11 00 mov $0x11e820,%edx first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 11e819: 89 45 08 mov %eax,0x8(%ebp) } 11e81c: c9 leave if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 11e81d: ff e2 jmp *%edx 0011fc74 <_Thread_queue_First_fifo>: */ Thread_Control *_Thread_queue_First_fifo( Thread_queue_Control *the_thread_queue ) { 11fc74: 55 push %ebp 11fc75: 89 e5 mov %esp,%ebp 11fc77: 8b 55 08 mov 0x8(%ebp),%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11fc7a: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11fc7c: 83 c2 04 add $0x4,%edx 11fc7f: 39 d0 cmp %edx,%eax 11fc81: 74 05 je 11fc88 <_Thread_queue_First_fifo+0x14> if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) return (Thread_Control *) the_thread_queue->Queues.Fifo.first; return NULL; } 11fc83: c9 leave 11fc84: c3 ret 11fc85: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 11fc88: 31 c0 xor %eax,%eax 11fc8a: c9 leave 11fc8b: c3 ret 0010db00 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 10db00: 55 push %ebp 10db01: 89 e5 mov %esp,%ebp 10db03: 56 push %esi 10db04: 53 push %ebx 10db05: 8b 5d 08 mov 0x8(%ebp),%ebx 10db08: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10db0b: eb 06 jmp 10db13 <_Thread_queue_Flush+0x13> 10db0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; 10db10: 89 70 34 mov %esi,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10db13: 83 ec 0c sub $0xc,%esp 10db16: 53 push %ebx 10db17: e8 94 fc ff ff call 10d7b0 <_Thread_queue_Dequeue> 10db1c: 83 c4 10 add $0x10,%esp 10db1f: 85 c0 test %eax,%eax 10db21: 75 ed jne 10db10 <_Thread_queue_Flush+0x10> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10db23: 8d 65 f8 lea -0x8(%ebp),%esp 10db26: 5b pop %ebx 10db27: 5e pop %esi 10db28: c9 leave 10db29: c3 ret 0010db2c <_Thread_queue_Initialize>: Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 10db2c: 55 push %ebp 10db2d: 89 e5 mov %esp,%ebp 10db2f: 8b 45 08 mov 0x8(%ebp),%eax 10db32: 8b 55 0c mov 0xc(%ebp),%edx the_thread_queue->state = state; 10db35: 8b 4d 10 mov 0x10(%ebp),%ecx 10db38: 89 48 38 mov %ecx,0x38(%eax) the_thread_queue->discipline = the_discipline; 10db3b: 89 50 34 mov %edx,0x34(%eax) the_thread_queue->timeout_status = timeout_status; 10db3e: 8b 4d 14 mov 0x14(%ebp),%ecx 10db41: 89 48 3c mov %ecx,0x3c(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10db44: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10db4b: 4a dec %edx 10db4c: 74 12 je 10db60 <_Thread_queue_Initialize+0x34> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10db4e: 8d 50 04 lea 0x4(%eax),%edx 10db51: 89 10 mov %edx,(%eax) the_chain->permanent_null = NULL; 10db53: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10db5a: 89 40 08 mov %eax,0x8(%eax) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); } else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); } } 10db5d: c9 leave 10db5e: c3 ret 10db5f: 90 nop <== NOT EXECUTED * timeout_status - return on a timeout * * Output parameters: NONE */ void _Thread_queue_Initialize( 10db60: 8d 48 30 lea 0x30(%eax),%ecx */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10db63: 8d 50 04 lea 0x4(%eax),%edx 10db66: 89 10 mov %edx,(%eax) the_chain->permanent_null = NULL; 10db68: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10db6f: 89 40 08 mov %eax,0x8(%eax) 10db72: 83 c0 0c add $0xc,%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 10db75: 39 c8 cmp %ecx,%eax 10db77: 75 ea jne 10db63 <_Thread_queue_Initialize+0x37> _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); } else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); } } 10db79: c9 leave 10db7a: c3 ret 001107ec <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 1107ec: 55 push %ebp 1107ed: 89 e5 mov %esp,%ebp 1107ef: 83 ec 08 sub $0x8,%esp 1107f2: 8b 45 08 mov 0x8(%ebp),%eax Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 1107f5: 8b 50 44 mov 0x44(%eax),%edx * 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. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && 1107f8: 8b 4a 30 mov 0x30(%edx),%ecx 1107fb: 85 c9 test %ecx,%ecx 1107fd: 74 08 je 110807 <_Thread_queue_Process_timeout+0x1b> 1107ff: 3b 05 18 54 12 00 cmp 0x125418,%eax 110805: 74 19 je 110820 <_Thread_queue_Process_timeout+0x34> if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 110807: 8b 52 3c mov 0x3c(%edx),%edx 11080a: 89 50 34 mov %edx,0x34(%eax) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 11080d: 83 ec 08 sub $0x8,%esp 110810: 50 push %eax 110811: ff 70 44 pushl 0x44(%eax) 110814: e8 e7 fe ff ff call 110700 <_Thread_queue_Extract> 110819: 83 c4 10 add $0x10,%esp } } 11081c: c9 leave 11081d: c3 ret 11081e: 66 90 xchg %ax,%ax <== NOT EXECUTED * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 110820: 83 f9 03 cmp $0x3,%ecx 110823: 74 f7 je 11081c <_Thread_queue_Process_timeout+0x30> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 110825: 8b 4a 3c mov 0x3c(%edx),%ecx 110828: 89 48 34 mov %ecx,0x34(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 11082b: c7 42 30 02 00 00 00 movl $0x2,0x30(%edx) } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); } } 110832: c9 leave 110833: c3 ret 0010db7c <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10db7c: 55 push %ebp 10db7d: 89 e5 mov %esp,%ebp 10db7f: 57 push %edi 10db80: 56 push %esi 10db81: 53 push %ebx 10db82: 83 ec 1c sub $0x1c,%esp 10db85: 8b 75 08 mov 0x8(%ebp),%esi 10db88: 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 ) 10db8b: 85 f6 test %esi,%esi 10db8d: 74 06 je 10db95 <_Thread_queue_Requeue+0x19> /* * 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 ) { 10db8f: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10db93: 74 0b je 10dba0 <_Thread_queue_Requeue+0x24> _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 10db95: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10db98: 5b pop %ebx <== NOT EXECUTED 10db99: 5e pop %esi <== NOT EXECUTED 10db9a: 5f pop %edi <== NOT EXECUTED 10db9b: c9 leave <== NOT EXECUTED 10db9c: c3 ret <== NOT EXECUTED 10db9d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10dba0: 9c pushf 10dba1: fa cli 10dba2: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10dba3: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10dbaa: 75 0c jne 10dbb8 <_Thread_queue_Requeue+0x3c> _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 10dbac: 53 push %ebx 10dbad: 9d popf } } 10dbae: 8d 65 f4 lea -0xc(%ebp),%esp 10dbb1: 5b pop %ebx 10dbb2: 5e pop %esi 10dbb3: 5f pop %edi 10dbb4: c9 leave 10dbb5: c3 ret 10dbb6: 66 90 xchg %ax,%ax <== NOT EXECUTED 10dbb8: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi) ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 10dbbf: 50 push %eax 10dbc0: 6a 01 push $0x1 10dbc2: 57 push %edi 10dbc3: 56 push %esi 10dbc4: e8 67 2b 00 00 call 110730 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10dbc9: 83 c4 0c add $0xc,%esp 10dbcc: 8d 45 e4 lea -0x1c(%ebp),%eax 10dbcf: 50 push %eax 10dbd0: 57 push %edi 10dbd1: 56 push %esi 10dbd2: e8 8d fd ff ff call 10d964 <_Thread_queue_Enqueue_priority> 10dbd7: 83 c4 10 add $0x10,%esp 10dbda: eb d0 jmp 10dbac <_Thread_queue_Requeue+0x30> 00118b04 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 118b04: 55 push %ebp 118b05: 89 e5 mov %esp,%ebp 118b07: 57 push %edi 118b08: 56 push %esi 118b09: 53 push %ebx 118b0a: 83 ec 4c sub $0x4c,%esp 118b0d: 8b 5d 08 mov 0x8(%ebp),%ebx 118b10: 8d 45 e0 lea -0x20(%ebp),%eax 118b13: 89 45 b4 mov %eax,-0x4c(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 118b16: 89 45 dc mov %eax,-0x24(%ebp) the_chain->permanent_null = NULL; 118b19: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_chain->last = _Chain_Head(the_chain); 118b20: 8d 4d dc lea -0x24(%ebp),%ecx 118b23: 89 4d e4 mov %ecx,-0x1c(%ebp) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 118b26: 8d 7d d0 lea -0x30(%ebp),%edi 118b29: 8d 45 d4 lea -0x2c(%ebp),%eax 118b2c: 89 45 b0 mov %eax,-0x50(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 118b2f: 89 45 d0 mov %eax,-0x30(%ebp) the_chain->permanent_null = NULL; 118b32: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 118b39: 89 7d d8 mov %edi,-0x28(%ebp) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118b3c: 8d 73 30 lea 0x30(%ebx),%esi /* * 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 ); 118b3f: 8d 4b 68 lea 0x68(%ebx),%ecx 118b42: 89 4d c4 mov %ecx,-0x3c(%ebp) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 118b45: 8d 43 08 lea 0x8(%ebx),%eax 118b48: 89 45 bc mov %eax,-0x44(%ebp) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 118b4b: 8d 53 40 lea 0x40(%ebx),%edx 118b4e: 89 55 c0 mov %edx,-0x40(%ebp) 118b51: 8d 76 00 lea 0x0(%esi),%esi { /* * 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; 118b54: 8d 4d dc lea -0x24(%ebp),%ecx 118b57: 89 4b 78 mov %ecx,0x78(%ebx) 118b5a: 66 90 xchg %ax,%ax static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 118b5c: a1 e4 f8 13 00 mov 0x13f8e4,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 118b61: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 118b64: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118b67: 51 push %ecx 118b68: 57 push %edi 118b69: 29 d0 sub %edx,%eax 118b6b: 50 push %eax 118b6c: 56 push %esi 118b6d: e8 a2 3a 00 00 call 11c614 <_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(); 118b72: a1 0c f8 13 00 mov 0x13f80c,%eax Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 118b77: 8b 53 74 mov 0x74(%ebx),%edx /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 118b7a: 83 c4 10 add $0x10,%esp 118b7d: 39 d0 cmp %edx,%eax 118b7f: 77 63 ja 118be4 <_Timer_server_Body+0xe0> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 118b81: 72 7d jb 118c00 <_Timer_server_Body+0xfc> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 118b83: 89 43 74 mov %eax,0x74(%ebx) 118b86: 66 90 xchg %ax,%ax } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 118b88: 8b 43 78 mov 0x78(%ebx),%eax 118b8b: 83 ec 0c sub $0xc,%esp 118b8e: 50 push %eax 118b8f: e8 38 08 00 00 call 1193cc <_Chain_Get> if ( timer == NULL ) { 118b94: 83 c4 10 add $0x10,%esp 118b97: 85 c0 test %eax,%eax 118b99: 74 35 je 118bd0 <_Timer_server_Body+0xcc> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118b9b: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 118b9e: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 118ba1: 74 19 je 118bbc <_Timer_server_Body+0xb8> <== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 118ba3: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 118ba6: 75 e0 jne 118b88 <_Timer_server_Body+0x84> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 118ba8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118bab: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 118bae: 50 push %eax <== NOT EXECUTED 118baf: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 118bb2: e8 f5 3a 00 00 call 11c6ac <_Watchdog_Insert> <== NOT EXECUTED 118bb7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118bba: eb cc jmp 118b88 <_Timer_server_Body+0x84> <== NOT EXECUTED Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 118bbc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118bbf: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 118bc2: 50 push %eax <== NOT EXECUTED 118bc3: 56 push %esi <== NOT EXECUTED 118bc4: e8 e3 3a 00 00 call 11c6ac <_Watchdog_Insert> <== NOT EXECUTED 118bc9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118bcc: eb ba jmp 118b88 <_Timer_server_Body+0x84> <== NOT EXECUTED 118bce: 66 90 xchg %ax,%ax <== 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 ); 118bd0: 9c pushf 118bd1: fa cli 118bd2: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 118bd3: 8b 55 b4 mov -0x4c(%ebp),%edx 118bd6: 3b 55 dc cmp -0x24(%ebp),%edx 118bd9: 74 41 je 118c1c <_Timer_server_Body+0x118> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 118bdb: 50 push %eax <== NOT EXECUTED 118bdc: 9d popf <== NOT EXECUTED 118bdd: e9 7a ff ff ff jmp 118b5c <_Timer_server_Body+0x58> <== NOT EXECUTED 118be2: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118be4: 51 push %ecx 118be5: 57 push %edi 118be6: 89 c1 mov %eax,%ecx 118be8: 29 d1 sub %edx,%ecx 118bea: 51 push %ecx 118beb: ff 75 c4 pushl -0x3c(%ebp) 118bee: 89 45 b8 mov %eax,-0x48(%ebp) 118bf1: e8 1e 3a 00 00 call 11c614 <_Watchdog_Adjust_to_chain> 118bf6: 83 c4 10 add $0x10,%esp 118bf9: 8b 45 b8 mov -0x48(%ebp),%eax 118bfc: eb 85 jmp 118b83 <_Timer_server_Body+0x7f> 118bfe: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * 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 ); 118c00: 51 push %ecx 118c01: 29 c2 sub %eax,%edx 118c03: 52 push %edx 118c04: 6a 01 push $0x1 118c06: ff 75 c4 pushl -0x3c(%ebp) 118c09: 89 45 b8 mov %eax,-0x48(%ebp) 118c0c: e8 8b 39 00 00 call 11c59c <_Watchdog_Adjust> 118c11: 83 c4 10 add $0x10,%esp 118c14: 8b 45 b8 mov -0x48(%ebp),%eax 118c17: e9 67 ff ff ff jmp 118b83 <_Timer_server_Body+0x7f> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 118c1c: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 118c23: 50 push %eax 118c24: 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 ) ) { 118c25: 8b 4d b0 mov -0x50(%ebp),%ecx 118c28: 3b 4d d0 cmp -0x30(%ebp),%ecx 118c2b: 75 23 jne 118c50 <_Timer_server_Body+0x14c> 118c2d: eb 33 jmp 118c62 <_Timer_server_Body+0x15e> 118c2f: 90 nop <== NOT EXECUTED { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 118c30: 8b 10 mov (%eax),%edx the_chain->first = new_first; 118c32: 89 55 d0 mov %edx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 118c35: 89 7a 04 mov %edi,0x4(%edx) * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 118c38: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 118c3f: 51 push %ecx 118c40: 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 ); 118c41: 83 ec 08 sub $0x8,%esp 118c44: ff 70 24 pushl 0x24(%eax) 118c47: ff 70 20 pushl 0x20(%eax) 118c4a: ff 50 1c call *0x1c(%eax) } 118c4d: 83 c4 10 add $0x10,%esp /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 118c50: 9c pushf 118c51: fa cli 118c52: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118c53: 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)) 118c56: 39 45 b0 cmp %eax,-0x50(%ebp) 118c59: 75 d5 jne 118c30 <_Timer_server_Body+0x12c> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 118c5b: 51 push %ecx 118c5c: 9d popf 118c5d: e9 f2 fe ff ff jmp 118b54 <_Timer_server_Body+0x50> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 118c62: c6 43 7c 00 movb $0x0,0x7c(%ebx) 118c66: a1 78 f7 13 00 mov 0x13f778,%eax 118c6b: 40 inc %eax 118c6c: a3 78 f7 13 00 mov %eax,0x13f778 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 118c71: 83 ec 08 sub $0x8,%esp 118c74: 6a 08 push $0x8 118c76: ff 33 pushl (%ebx) 118c78: e8 67 31 00 00 call 11bde4 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 118c7d: 89 d8 mov %ebx,%eax 118c7f: e8 e0 fd ff ff call 118a64 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 118c84: 89 d8 mov %ebx,%eax 118c86: e8 29 fe ff ff call 118ab4 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 118c8b: e8 84 27 00 00 call 11b414 <_Thread_Enable_dispatch> ts->active = true; 118c90: 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 ); 118c94: 58 pop %eax 118c95: ff 75 bc pushl -0x44(%ebp) 118c98: e8 47 3b 00 00 call 11c7e4 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 118c9d: 59 pop %ecx 118c9e: ff 75 c0 pushl -0x40(%ebp) 118ca1: e8 3e 3b 00 00 call 11c7e4 <_Watchdog_Remove> 118ca6: 83 c4 10 add $0x10,%esp 118ca9: e9 a6 fe ff ff jmp 118b54 <_Timer_server_Body+0x50> 00118a64 <_Timer_server_Reset_interval_system_watchdog>: } static void _Timer_server_Reset_interval_system_watchdog( Timer_server_Control *ts ) { 118a64: 55 push %ebp 118a65: 89 e5 mov %esp,%ebp 118a67: 56 push %esi 118a68: 53 push %ebx 118a69: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 118a6b: 8d 70 08 lea 0x8(%eax),%esi 118a6e: 83 ec 0c sub $0xc,%esp 118a71: 56 push %esi 118a72: e8 6d 3d 00 00 call 11c7e4 <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_interval_system_watchdog( ts ); _ISR_Disable( level ); 118a77: 9c pushf 118a78: fa cli 118a79: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118a7a: 8b 43 30 mov 0x30(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 118a7d: 8d 53 34 lea 0x34(%ebx),%edx 118a80: 83 c4 10 add $0x10,%esp 118a83: 39 d0 cmp %edx,%eax 118a85: 74 21 je 118aa8 <_Timer_server_Reset_interval_system_watchdog+0x44> if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { Watchdog_Interval delta_interval = _Watchdog_First( &ts->Interval_watchdogs.Chain )->delta_interval; 118a87: 8b 40 10 mov 0x10(%eax),%eax _ISR_Enable( level ); 118a8a: 51 push %ecx 118a8b: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118a8c: 89 43 14 mov %eax,0x14(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 118a8f: 83 ec 08 sub $0x8,%esp 118a92: 56 push %esi 118a93: 68 58 f8 13 00 push $0x13f858 118a98: e8 0f 3c 00 00 call 11c6ac <_Watchdog_Insert> 118a9d: 83 c4 10 add $0x10,%esp delta_interval ); } else { _ISR_Enable( level ); } } 118aa0: 8d 65 f8 lea -0x8(%ebp),%esp 118aa3: 5b pop %ebx 118aa4: 5e pop %esi 118aa5: c9 leave 118aa6: c3 ret 118aa7: 90 nop <== NOT EXECUTED _Watchdog_Insert_ticks( &ts->Interval_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 118aa8: 51 push %ecx 118aa9: 9d popf } } 118aaa: 8d 65 f8 lea -0x8(%ebp),%esp 118aad: 5b pop %ebx 118aae: 5e pop %esi 118aaf: c9 leave 118ab0: c3 ret 00118ab4 <_Timer_server_Reset_tod_system_watchdog>: } static void _Timer_server_Reset_tod_system_watchdog( Timer_server_Control *ts ) { 118ab4: 55 push %ebp 118ab5: 89 e5 mov %esp,%ebp 118ab7: 56 push %esi 118ab8: 53 push %ebx 118ab9: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 118abb: 8d 70 40 lea 0x40(%eax),%esi 118abe: 83 ec 0c sub $0xc,%esp 118ac1: 56 push %esi 118ac2: e8 1d 3d 00 00 call 11c7e4 <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_tod_system_watchdog( ts ); _ISR_Disable( level ); 118ac7: 9c pushf 118ac8: fa cli 118ac9: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118aca: 8b 43 68 mov 0x68(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 118acd: 8d 53 6c lea 0x6c(%ebx),%edx 118ad0: 83 c4 10 add $0x10,%esp 118ad3: 39 d0 cmp %edx,%eax 118ad5: 74 21 je 118af8 <_Timer_server_Reset_tod_system_watchdog+0x44> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { Watchdog_Interval delta_interval = _Watchdog_First( &ts->TOD_watchdogs.Chain )->delta_interval; 118ad7: 8b 40 10 mov 0x10(%eax),%eax _ISR_Enable( level ); 118ada: 51 push %ecx 118adb: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118adc: 89 43 4c mov %eax,0x4c(%ebx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 118adf: 83 ec 08 sub $0x8,%esp 118ae2: 56 push %esi 118ae3: 68 4c f8 13 00 push $0x13f84c 118ae8: e8 bf 3b 00 00 call 11c6ac <_Watchdog_Insert> 118aed: 83 c4 10 add $0x10,%esp delta_interval ); } else { _ISR_Enable( level ); } } 118af0: 8d 65 f8 lea -0x8(%ebp),%esp 118af3: 5b pop %ebx 118af4: 5e pop %esi 118af5: c9 leave 118af6: c3 ret 118af7: 90 nop <== NOT EXECUTED _Watchdog_Insert_seconds( &ts->TOD_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 118af8: 51 push %ecx 118af9: 9d popf } } 118afa: 8d 65 f8 lea -0x8(%ebp),%esp 118afd: 5b pop %ebx 118afe: 5e pop %esi 118aff: c9 leave 118b00: c3 ret 00118cb0 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 118cb0: 55 push %ebp 118cb1: 89 e5 mov %esp,%ebp 118cb3: 57 push %edi 118cb4: 56 push %esi 118cb5: 53 push %ebx 118cb6: 83 ec 2c sub $0x2c,%esp 118cb9: 8b 5d 08 mov 0x8(%ebp),%ebx 118cbc: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 118cbf: 8b 53 78 mov 0x78(%ebx),%edx 118cc2: 85 d2 test %edx,%edx 118cc4: 74 16 je 118cdc <_Timer_server_Schedule_operation_method+0x2c> * 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 ); 118cc6: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 118cc9: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 118ccc: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 118ccf: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 118cd2: 5b pop %ebx <== NOT EXECUTED 118cd3: 5e pop %esi <== NOT EXECUTED 118cd4: 5f pop %edi <== NOT EXECUTED 118cd5: 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 ); 118cd6: e9 cd 06 00 00 jmp 1193a8 <_Chain_Append> <== NOT EXECUTED 118cdb: 90 nop <== NOT EXECUTED 118cdc: 8b 15 78 f7 13 00 mov 0x13f778,%edx 118ce2: 42 inc %edx 118ce3: 89 15 78 f7 13 00 mov %edx,0x13f778 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118ce9: 8b 50 38 mov 0x38(%eax),%edx 118cec: 83 fa 01 cmp $0x1,%edx 118cef: 74 77 je 118d68 <_Timer_server_Schedule_operation_method+0xb8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 118cf1: 83 fa 03 cmp $0x3,%edx 118cf4: 74 0e je 118d04 <_Timer_server_Schedule_operation_method+0x54> * 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 ); } } 118cf6: 8d 65 f4 lea -0xc(%ebp),%esp 118cf9: 5b pop %ebx 118cfa: 5e pop %esi 118cfb: 5f pop %edi 118cfc: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 118cfd: e9 12 27 00 00 jmp 11b414 <_Thread_Enable_dispatch> 118d02: 66 90 xchg %ax,%ax <== NOT EXECUTED } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 118d04: 9c pushf 118d05: fa cli 118d06: 8f 45 e4 popl -0x1c(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 118d09: 8b 0d 0c f8 13 00 mov 0x13f80c,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 118d0f: 8b 73 74 mov 0x74(%ebx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118d12: 8b 53 68 mov 0x68(%ebx),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 118d15: 8d 7b 6c lea 0x6c(%ebx),%edi 118d18: 39 fa cmp %edi,%edx 118d1a: 74 22 je 118d3e <_Timer_server_Schedule_operation_method+0x8e> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 118d1c: 8b 7a 10 mov 0x10(%edx),%edi 118d1f: 89 7d d4 mov %edi,-0x2c(%ebp) if ( snapshot > last_snapshot ) { 118d22: 39 f1 cmp %esi,%ecx 118d24: 0f 86 9e 00 00 00 jbe 118dc8 <_Timer_server_Schedule_operation_method+0x118> /* * We advanced in time. */ delta = snapshot - last_snapshot; 118d2a: 89 cf mov %ecx,%edi 118d2c: 29 f7 sub %esi,%edi 118d2e: 89 fe mov %edi,%esi if (delta_interval > delta) { 118d30: 39 7d d4 cmp %edi,-0x2c(%ebp) 118d33: 0f 87 9b 00 00 00 ja 118dd4 <_Timer_server_Schedule_operation_method+0x124> 118d39: 31 ff xor %edi,%edi <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 118d3b: 89 7a 10 mov %edi,0x10(%edx) } ts->TOD_watchdogs.last_snapshot = snapshot; 118d3e: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 118d41: ff 75 e4 pushl -0x1c(%ebp) 118d44: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 118d45: 83 ec 08 sub $0x8,%esp 118d48: 83 c0 10 add $0x10,%eax 118d4b: 50 push %eax 118d4c: 8d 43 68 lea 0x68(%ebx),%eax 118d4f: 50 push %eax 118d50: e8 57 39 00 00 call 11c6ac <_Watchdog_Insert> if ( !ts->active ) { 118d55: 8a 43 7c mov 0x7c(%ebx),%al 118d58: 83 c4 10 add $0x10,%esp 118d5b: 84 c0 test %al,%al 118d5d: 75 97 jne 118cf6 <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_tod_system_watchdog( ts ); 118d5f: 89 d8 mov %ebx,%eax 118d61: e8 4e fd ff ff call 118ab4 <_Timer_server_Reset_tod_system_watchdog> 118d66: eb 8e jmp 118cf6 <_Timer_server_Schedule_operation_method+0x46> if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 118d68: 9c pushf 118d69: fa cli 118d6a: 8f 45 e4 popl -0x1c(%ebp) snapshot = _Watchdog_Ticks_since_boot; 118d6d: 8b 0d e4 f8 13 00 mov 0x13f8e4,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 118d73: 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)); 118d76: 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; 118d79: 8d 7b 34 lea 0x34(%ebx),%edi 118d7c: 39 fa cmp %edi,%edx 118d7e: 74 12 je 118d92 <_Timer_server_Schedule_operation_method+0xe2> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 118d80: 89 cf mov %ecx,%edi 118d82: 29 f7 sub %esi,%edi 118d84: 89 fe mov %edi,%esi delta_interval = first_watchdog->delta_interval; 118d86: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 118d89: 39 fe cmp %edi,%esi 118d8b: 72 37 jb 118dc4 <_Timer_server_Schedule_operation_method+0x114> 118d8d: 31 ff xor %edi,%edi delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 118d8f: 89 7a 10 mov %edi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 118d92: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 118d95: ff 75 e4 pushl -0x1c(%ebp) 118d98: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 118d99: 83 ec 08 sub $0x8,%esp 118d9c: 83 c0 10 add $0x10,%eax 118d9f: 50 push %eax 118da0: 8d 43 30 lea 0x30(%ebx),%eax 118da3: 50 push %eax 118da4: e8 03 39 00 00 call 11c6ac <_Watchdog_Insert> if ( !ts->active ) { 118da9: 8a 43 7c mov 0x7c(%ebx),%al 118dac: 83 c4 10 add $0x10,%esp 118daf: 84 c0 test %al,%al 118db1: 0f 85 3f ff ff ff jne 118cf6 <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_interval_system_watchdog( ts ); 118db7: 89 d8 mov %ebx,%eax 118db9: e8 a6 fc ff ff call 118a64 <_Timer_server_Reset_interval_system_watchdog> 118dbe: e9 33 ff ff ff jmp 118cf6 <_Timer_server_Schedule_operation_method+0x46> 118dc3: 90 nop <== NOT EXECUTED */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; 118dc4: 29 f7 sub %esi,%edi 118dc6: eb c7 jmp 118d8f <_Timer_server_Schedule_operation_method+0xdf> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 118dc8: 8b 7d d4 mov -0x2c(%ebp),%edi 118dcb: 01 f7 add %esi,%edi delta_interval += delta; 118dcd: 29 cf sub %ecx,%edi 118dcf: e9 67 ff ff ff jmp 118d3b <_Timer_server_Schedule_operation_method+0x8b> /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; 118dd4: 8b 7d d4 mov -0x2c(%ebp),%edi 118dd7: 29 f7 sub %esi,%edi 118dd9: e9 5d ff ff ff jmp 118d3b <_Timer_server_Schedule_operation_method+0x8b> 0010f8a8 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 10f8a8: 55 push %ebp 10f8a9: 89 e5 mov %esp,%ebp 10f8ab: 57 push %edi 10f8ac: 56 push %esi 10f8ad: 53 push %ebx 10f8ae: 83 ec 2c sub $0x2c,%esp 10f8b1: 8b 45 08 mov 0x8(%ebp),%eax 10f8b4: 8b 5d 0c mov 0xc(%ebp),%ebx /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10f8b7: 8b 10 mov (%eax),%edx 10f8b9: 89 55 e0 mov %edx,-0x20(%ebp) left += lhs->tv_nsec; 10f8bc: 8b 78 04 mov 0x4(%eax),%edi right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10f8bf: b9 00 ca 9a 3b mov $0x3b9aca00,%ecx 10f8c4: 8b 03 mov (%ebx),%eax 10f8c6: f7 e9 imul %ecx 10f8c8: 89 45 d0 mov %eax,-0x30(%ebp) 10f8cb: 89 55 d4 mov %edx,-0x2c(%ebp) right += rhs->tv_nsec; 10f8ce: 8b 5b 04 mov 0x4(%ebx),%ebx 10f8d1: 89 de mov %ebx,%esi 10f8d3: c1 fe 1f sar $0x1f,%esi 10f8d6: 01 5d d0 add %ebx,-0x30(%ebp) 10f8d9: 11 75 d4 adc %esi,-0x2c(%ebp) if ( right == 0 ) { 10f8dc: 8b 55 d4 mov -0x2c(%ebp),%edx 10f8df: 0b 55 d0 or -0x30(%ebp),%edx 10f8e2: 74 7c je 10f960 <_Timespec_Divide+0xb8> /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10f8e4: 8b 45 e0 mov -0x20(%ebp),%eax 10f8e7: f7 e9 imul %ecx 10f8e9: 89 45 e0 mov %eax,-0x20(%ebp) 10f8ec: 89 55 e4 mov %edx,-0x1c(%ebp) * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 10f8ef: 89 fb mov %edi,%ebx 10f8f1: c1 fb 1f sar $0x1f,%ebx 10f8f4: 01 7d e0 add %edi,-0x20(%ebp) 10f8f7: 11 5d e4 adc %ebx,-0x1c(%ebp) 10f8fa: 69 5d e4 a0 86 01 00 imul $0x186a0,-0x1c(%ebp),%ebx 10f901: b9 a0 86 01 00 mov $0x186a0,%ecx 10f906: 8b 45 e0 mov -0x20(%ebp),%eax 10f909: f7 e1 mul %ecx 10f90b: 89 45 e0 mov %eax,-0x20(%ebp) 10f90e: 01 da add %ebx,%edx 10f910: 89 55 e4 mov %edx,-0x1c(%ebp) 10f913: ff 75 d4 pushl -0x2c(%ebp) 10f916: ff 75 d0 pushl -0x30(%ebp) 10f919: ff 75 e4 pushl -0x1c(%ebp) 10f91c: ff 75 e0 pushl -0x20(%ebp) 10f91f: e8 08 fc 00 00 call 11f52c <__udivdi3> 10f924: 83 c4 10 add $0x10,%esp 10f927: 89 c3 mov %eax,%ebx 10f929: 89 d6 mov %edx,%esi *ival_percentage = answer / 1000; 10f92b: 6a 00 push $0x0 10f92d: 68 e8 03 00 00 push $0x3e8 10f932: 52 push %edx 10f933: 50 push %eax 10f934: e8 f3 fb 00 00 call 11f52c <__udivdi3> 10f939: 83 c4 10 add $0x10,%esp 10f93c: 8b 55 10 mov 0x10(%ebp),%edx 10f93f: 89 02 mov %eax,(%edx) *fval_percentage = answer % 1000; 10f941: 6a 00 push $0x0 10f943: 68 e8 03 00 00 push $0x3e8 10f948: 56 push %esi 10f949: 53 push %ebx 10f94a: e8 ed fc 00 00 call 11f63c <__umoddi3> 10f94f: 83 c4 10 add $0x10,%esp 10f952: 8b 55 14 mov 0x14(%ebp),%edx 10f955: 89 02 mov %eax,(%edx) } 10f957: 8d 65 f4 lea -0xc(%ebp),%esp 10f95a: 5b pop %ebx 10f95b: 5e pop %esi 10f95c: 5f pop %edi 10f95d: c9 leave 10f95e: c3 ret 10f95f: 90 nop <== NOT EXECUTED left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; if ( right == 0 ) { *ival_percentage = 0; 10f960: 8b 45 10 mov 0x10(%ebp),%eax 10f963: c7 00 00 00 00 00 movl $0x0,(%eax) *fval_percentage = 0; 10f969: 8b 55 14 mov 0x14(%ebp),%edx 10f96c: c7 02 00 00 00 00 movl $0x0,(%edx) answer = (left * 100000) / right; *ival_percentage = answer / 1000; *fval_percentage = answer % 1000; } 10f972: 8d 65 f4 lea -0xc(%ebp),%esp 10f975: 5b pop %ebx 10f976: 5e pop %esi 10f977: 5f pop %edi 10f978: c9 leave 10f979: c3 ret 00127da4 <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 127da4: 55 push %ebp 127da5: 89 e5 mov %esp,%ebp 127da7: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 127daa: 85 c0 test %eax,%eax 127dac: 74 1a je 127dc8 <_Timespec_Is_valid+0x24> return false; if ( time->tv_sec < 0 ) 127dae: 8b 10 mov (%eax),%edx 127db0: 85 d2 test %edx,%edx 127db2: 78 14 js 127dc8 <_Timespec_Is_valid+0x24> return false; if ( time->tv_nsec < 0 ) 127db4: 8b 40 04 mov 0x4(%eax),%eax 127db7: 85 c0 test %eax,%eax 127db9: 78 0d js 127dc8 <_Timespec_Is_valid+0x24> #include #include #include bool _Timespec_Is_valid( 127dbb: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 127dc0: 0f 96 c0 setbe %al if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 127dc3: c9 leave 127dc4: c3 ret 127dc5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #include #include #include bool _Timespec_Is_valid( 127dc8: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 127dca: c9 leave 127dcb: c3 ret 00127dcc <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 127dcc: 55 push %ebp 127dcd: 89 e5 mov %esp,%ebp 127dcf: 56 push %esi 127dd0: 53 push %ebx 127dd1: 8b 5d 08 mov 0x8(%ebp),%ebx uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 127dd4: 8b 33 mov (%ebx),%esi 127dd6: 85 f6 test %esi,%esi 127dd8: 75 07 jne 127de1 <_Timespec_To_ticks+0x15> 127dda: 8b 43 04 mov 0x4(%ebx),%eax 127ddd: 85 c0 test %eax,%eax 127ddf: 74 37 je 127e18 <_Timespec_To_ticks+0x4c> return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 127de1: e8 da 00 00 00 call 127ec0 127de6: 89 c1 mov %eax,%ecx 127de8: 0f af ce imul %esi,%ecx ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 127deb: a1 cc ef 12 00 mov 0x12efcc,%eax 127df0: 8d 04 80 lea (%eax,%eax,4),%eax 127df3: 8d 04 80 lea (%eax,%eax,4),%eax 127df6: 8d 34 80 lea (%eax,%eax,4),%esi 127df9: c1 e6 03 shl $0x3,%esi 127dfc: 8b 43 04 mov 0x4(%ebx),%eax 127dff: 31 d2 xor %edx,%edx 127e01: f7 f6 div %esi if (ticks) 127e03: 01 c8 add %ecx,%eax 127e05: 74 05 je 127e0c <_Timespec_To_ticks+0x40> return ticks; return 1; } 127e07: 5b pop %ebx 127e08: 5e pop %esi 127e09: c9 leave 127e0a: c3 ret 127e0b: 90 nop <== NOT EXECUTED ticks = time->tv_sec * TOD_TICKS_PER_SECOND; ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); if (ticks) 127e0c: b8 01 00 00 00 mov $0x1,%eax return ticks; return 1; } 127e11: 5b pop %ebx 127e12: 5e pop %esi 127e13: c9 leave 127e14: c3 ret 127e15: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED const struct timespec *time ) { uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 127e18: 31 c0 xor %eax,%eax if (ticks) return ticks; return 1; } 127e1a: 5b pop %ebx 127e1b: 5e pop %esi 127e1c: c9 leave 127e1d: c3 ret 00112ea0 <_User_extensions_Remove_set>: #include void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 112ea0: 55 push %ebp 112ea1: 89 e5 mov %esp,%ebp 112ea3: 53 push %ebx 112ea4: 83 ec 10 sub $0x10,%esp 112ea7: 8b 5d 08 mov 0x8(%ebp),%ebx _Chain_Extract( &the_extension->Node ); 112eaa: 53 push %ebx 112eab: e8 b4 47 00 00 call 117664 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 112eb0: 83 c4 10 add $0x10,%esp 112eb3: 8b 43 24 mov 0x24(%ebx),%eax 112eb6: 85 c0 test %eax,%eax 112eb8: 74 12 je 112ecc <_User_extensions_Remove_set+0x2c> _Chain_Extract( &the_extension->Switch.Node ); 112eba: 83 c3 08 add $0x8,%ebx 112ebd: 89 5d 08 mov %ebx,0x8(%ebp) } 112ec0: 8b 5d fc mov -0x4(%ebp),%ebx 112ec3: c9 leave /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 112ec4: e9 9b 47 00 00 jmp 117664 <_Chain_Extract> 112ec9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } 112ecc: 8b 5d fc mov -0x4(%ebp),%ebx 112ecf: c9 leave 112ed0: c3 ret 0010e13c <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10e13c: 55 push %ebp 10e13d: 89 e5 mov %esp,%ebp 10e13f: 56 push %esi 10e140: 53 push %ebx 10e141: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e144: 8b 1d b4 55 12 00 mov 0x1255b4,%ebx 10e14a: 81 fb ac 55 12 00 cmp $0x1255ac,%ebx 10e150: 74 1d je 10e16f <_User_extensions_Thread_exitted+0x33> 10e152: 66 90 xchg %ax,%ax !_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 ) 10e154: 8b 43 2c mov 0x2c(%ebx),%eax 10e157: 85 c0 test %eax,%eax 10e159: 74 09 je 10e164 <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 10e15b: 83 ec 0c sub $0xc,%esp 10e15e: 56 push %esi 10e15f: ff d0 call *%eax 10e161: 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 ) { 10e164: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e167: 81 fb ac 55 12 00 cmp $0x1255ac,%ebx 10e16d: 75 e5 jne 10e154 <_User_extensions_Thread_exitted+0x18> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 10e16f: 8d 65 f8 lea -0x8(%ebp),%esp 10e172: 5b pop %ebx 10e173: 5e pop %esi 10e174: c9 leave 10e175: c3 ret 0010fc88 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10fc88: 55 push %ebp 10fc89: 89 e5 mov %esp,%ebp 10fc8b: 57 push %edi 10fc8c: 56 push %esi 10fc8d: 53 push %ebx 10fc8e: 83 ec 1c sub $0x1c,%esp 10fc91: 8b 75 08 mov 0x8(%ebp),%esi 10fc94: 8b 4d 0c mov 0xc(%ebp),%ecx 10fc97: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10fc9a: 9c pushf 10fc9b: fa cli 10fc9c: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10fc9d: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10fc9f: 8d 7e 04 lea 0x4(%esi),%edi 10fca2: 89 7d e4 mov %edi,-0x1c(%ebp) * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 10fca5: 39 fa cmp %edi,%edx 10fca7: 74 3d je 10fce6 <_Watchdog_Adjust+0x5e> switch ( direction ) { 10fca9: 85 c9 test %ecx,%ecx 10fcab: 75 43 jne 10fcf0 <_Watchdog_Adjust+0x68> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10fcad: 85 db test %ebx,%ebx 10fcaf: 74 35 je 10fce6 <_Watchdog_Adjust+0x5e> if ( units < _Watchdog_First( header )->delta_interval ) { 10fcb1: 8b 7a 10 mov 0x10(%edx),%edi 10fcb4: 39 fb cmp %edi,%ebx 10fcb6: 73 0f jae 10fcc7 <_Watchdog_Adjust+0x3f> 10fcb8: eb 3e jmp 10fcf8 <_Watchdog_Adjust+0x70> <== NOT EXECUTED 10fcba: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10fcbc: 29 fb sub %edi,%ebx 10fcbe: 74 26 je 10fce6 <_Watchdog_Adjust+0x5e> if ( units < _Watchdog_First( header )->delta_interval ) { 10fcc0: 8b 7a 10 mov 0x10(%edx),%edi 10fcc3: 39 df cmp %ebx,%edi 10fcc5: 77 31 ja 10fcf8 <_Watchdog_Adjust+0x70> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10fcc7: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10fcce: 50 push %eax 10fccf: 9d popf _Watchdog_Tickle( header ); 10fcd0: 83 ec 0c sub $0xc,%esp 10fcd3: 56 push %esi 10fcd4: e8 cb 01 00 00 call 10fea4 <_Watchdog_Tickle> _ISR_Disable( level ); 10fcd9: 9c pushf 10fcda: fa cli 10fcdb: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10fcdc: 8b 16 mov (%esi),%edx if ( _Chain_Is_empty( header ) ) 10fcde: 83 c4 10 add $0x10,%esp 10fce1: 39 55 e4 cmp %edx,-0x1c(%ebp) 10fce4: 75 d6 jne 10fcbc <_Watchdog_Adjust+0x34> } break; } } _ISR_Enable( level ); 10fce6: 50 push %eax 10fce7: 9d popf } 10fce8: 8d 65 f4 lea -0xc(%ebp),%esp 10fceb: 5b pop %ebx 10fcec: 5e pop %esi 10fced: 5f pop %edi 10fcee: c9 leave 10fcef: c3 ret * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 10fcf0: 49 dec %ecx 10fcf1: 75 f3 jne 10fce6 <_Watchdog_Adjust+0x5e> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10fcf3: 01 5a 10 add %ebx,0x10(%edx) break; 10fcf6: eb ee jmp 10fce6 <_Watchdog_Adjust+0x5e> case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 10fcf8: 29 df sub %ebx,%edi 10fcfa: 89 7a 10 mov %edi,0x10(%edx) break; 10fcfd: eb e7 jmp 10fce6 <_Watchdog_Adjust+0x5e> 0011c614 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 11c614: 55 push %ebp 11c615: 89 e5 mov %esp,%ebp 11c617: 57 push %edi 11c618: 56 push %esi 11c619: 53 push %ebx 11c61a: 83 ec 0c sub $0xc,%esp 11c61d: 8b 75 08 mov 0x8(%ebp),%esi 11c620: 8b 55 0c mov 0xc(%ebp),%edx 11c623: 8b 5d 10 mov 0x10(%ebp),%ebx Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { 11c626: 85 d2 test %edx,%edx 11c628: 74 63 je 11c68d <_Watchdog_Adjust_to_chain+0x79> return; } _ISR_Disable( level ); 11c62a: 9c pushf 11c62b: fa cli 11c62c: 8f 45 ec popl -0x14(%ebp) 11c62f: 8b 06 mov (%esi),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11c631: 8d 4e 04 lea 0x4(%esi),%ecx 11c634: 89 4d f0 mov %ecx,-0x10(%ebp) 11c637: 8d 7b 04 lea 0x4(%ebx),%edi 11c63a: 89 55 e8 mov %edx,-0x18(%ebp) 11c63d: 8d 76 00 lea 0x0(%esi),%esi while ( 1 ) { if ( units <= 0 ) { break; } if ( _Chain_Is_empty( header ) ) { 11c640: 39 45 f0 cmp %eax,-0x10(%ebp) 11c643: 74 44 je 11c689 <_Watchdog_Adjust_to_chain+0x75> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { 11c645: 8b 50 10 mov 0x10(%eax),%edx 11c648: 3b 55 e8 cmp -0x18(%ebp),%edx 11c64b: 77 57 ja 11c6a4 <_Watchdog_Adjust_to_chain+0x90> /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; 11c64d: 29 55 e8 sub %edx,-0x18(%ebp) first->delta_interval = 0; 11c650: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) 11c657: 90 nop ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 11c658: 8b 08 mov (%eax),%ecx previous = the_node->previous; 11c65a: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 11c65d: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 11c660: 89 0a mov %ecx,(%edx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 11c662: 89 38 mov %edi,(%eax) old_last_node = the_chain->last; 11c664: 8b 53 08 mov 0x8(%ebx),%edx the_chain->last = the_node; 11c667: 89 43 08 mov %eax,0x8(%ebx) old_last_node->next = the_node; 11c66a: 89 02 mov %eax,(%edx) the_node->previous = old_last_node; 11c66c: 89 50 04 mov %edx,0x4(%eax) while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 11c66f: ff 75 ec pushl -0x14(%ebp) 11c672: 9d popf 11c673: fa cli */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11c674: 8b 06 mov (%esi),%eax if ( _Chain_Is_empty( header ) ) 11c676: 39 45 f0 cmp %eax,-0x10(%ebp) 11c679: 74 1d je 11c698 <_Watchdog_Adjust_to_chain+0x84> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 11c67b: 8b 50 10 mov 0x10(%eax),%edx 11c67e: 85 d2 test %edx,%edx 11c680: 74 d6 je 11c658 <_Watchdog_Adjust_to_chain+0x44> } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 11c682: 8b 4d e8 mov -0x18(%ebp),%ecx 11c685: 85 c9 test %ecx,%ecx 11c687: 75 b7 jne 11c640 <_Watchdog_Adjust_to_chain+0x2c> if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 11c689: ff 75 ec pushl -0x14(%ebp) 11c68c: 9d popf } 11c68d: 83 c4 0c add $0xc,%esp 11c690: 5b pop %ebx 11c691: 5e pop %esi 11c692: 5f pop %edi 11c693: c9 leave 11c694: c3 ret 11c695: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11c698: 8b 45 f0 mov -0x10(%ebp),%eax } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 11c69b: 8b 4d e8 mov -0x18(%ebp),%ecx 11c69e: 85 c9 test %ecx,%ecx 11c6a0: 75 9e jne 11c640 <_Watchdog_Adjust_to_chain+0x2c> 11c6a2: eb e5 jmp 11c689 <_Watchdog_Adjust_to_chain+0x75> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { first->delta_interval -= units; 11c6a4: 2b 55 e8 sub -0x18(%ebp),%edx 11c6a7: 89 50 10 mov %edx,0x10(%eax) break; 11c6aa: eb dd jmp 11c689 <_Watchdog_Adjust_to_chain+0x75> 0010e2d0 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10e2d0: 55 push %ebp 10e2d1: 89 e5 mov %esp,%ebp 10e2d3: 57 push %edi 10e2d4: 56 push %esi 10e2d5: 53 push %ebx 10e2d6: 83 ec 04 sub $0x4,%esp 10e2d9: 8b 5d 0c mov 0xc(%ebp),%ebx Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 10e2dc: 8b 3d f4 53 12 00 mov 0x1253f4,%edi _ISR_Disable( level ); 10e2e2: 9c pushf 10e2e3: fa cli 10e2e4: 8f 45 f0 popl -0x10(%ebp) /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { 10e2e7: 8b 43 08 mov 0x8(%ebx),%eax 10e2ea: 85 c0 test %eax,%eax 10e2ec: 0f 85 9e 00 00 00 jne 10e390 <_Watchdog_Insert+0xc0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10e2f2: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx) _Watchdog_Sync_count++; 10e2f9: a1 c0 54 12 00 mov 0x1254c0,%eax 10e2fe: 40 inc %eax 10e2ff: a3 c0 54 12 00 mov %eax,0x1254c0 restart: delta_interval = the_watchdog->initial; 10e304: 8b 43 0c mov 0xc(%ebx),%eax * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 10e307: 8b 4d 08 mov 0x8(%ebp),%ecx 10e30a: 8b 11 mov (%ecx),%edx ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10e30c: 85 c0 test %eax,%eax 10e30e: 74 5d je 10e36d <_Watchdog_Insert+0x9d> 10e310: 8b 32 mov (%edx),%esi 10e312: 85 f6 test %esi,%esi 10e314: 74 57 je 10e36d <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e316: 8b 4a 10 mov 0x10(%edx),%ecx 10e319: 39 c8 cmp %ecx,%eax 10e31b: 73 22 jae 10e33f <_Watchdog_Insert+0x6f> 10e31d: eb 49 jmp 10e368 <_Watchdog_Insert+0x98> 10e31f: 90 nop <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10e320: 8b 35 14 54 12 00 mov 0x125414,%esi 10e326: 39 f7 cmp %esi,%edi 10e328: 72 72 jb 10e39c <_Watchdog_Insert+0xcc> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10e32a: 29 c8 sub %ecx,%eax RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 10e32c: 8b 12 mov (%edx),%edx */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10e32e: 85 c0 test %eax,%eax 10e330: 74 3b je 10e36d <_Watchdog_Insert+0x9d> 10e332: 8b 0a mov (%edx),%ecx 10e334: 85 c9 test %ecx,%ecx 10e336: 74 35 je 10e36d <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e338: 8b 4a 10 mov 0x10(%edx),%ecx 10e33b: 39 c1 cmp %eax,%ecx 10e33d: 77 29 ja 10e368 <_Watchdog_Insert+0x98> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 10e33f: ff 75 f0 pushl -0x10(%ebp) 10e342: 9d popf 10e343: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10e344: 83 7b 08 01 cmpl $0x1,0x8(%ebx) 10e348: 74 d6 je 10e320 <_Watchdog_Insert+0x50> _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 10e34a: 89 3d 14 54 12 00 mov %edi,0x125414 _Watchdog_Sync_count--; 10e350: a1 c0 54 12 00 mov 0x1254c0,%eax 10e355: 48 dec %eax 10e356: a3 c0 54 12 00 mov %eax,0x1254c0 _ISR_Enable( level ); 10e35b: ff 75 f0 pushl -0x10(%ebp) 10e35e: 9d popf } 10e35f: 58 pop %eax 10e360: 5b pop %ebx 10e361: 5e pop %esi 10e362: 5f pop %edi 10e363: c9 leave 10e364: c3 ret 10e365: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 10e368: 29 c1 sub %eax,%ecx 10e36a: 89 4a 10 mov %ecx,0x10(%edx) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 10e36d: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10e374: 89 43 10 mov %eax,0x10(%ebx) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10e377: 8b 42 04 mov 0x4(%edx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10e37a: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10e37d: 8b 10 mov (%eax),%edx after_node->next = the_node; 10e37f: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10e381: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10e383: 89 5a 04 mov %ebx,0x4(%edx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10e386: a1 c4 54 12 00 mov 0x1254c4,%eax 10e38b: 89 43 14 mov %eax,0x14(%ebx) 10e38e: eb ba jmp 10e34a <_Watchdog_Insert+0x7a> * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 10e390: ff 75 f0 pushl -0x10(%ebp) 10e393: 9d popf exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10e394: 58 pop %eax 10e395: 5b pop %ebx 10e396: 5e pop %esi 10e397: 5f pop %edi 10e398: c9 leave 10e399: c3 ret 10e39a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; 10e39c: 89 3d 14 54 12 00 mov %edi,0x125414 goto restart; 10e3a2: e9 5d ff ff ff jmp 10e304 <_Watchdog_Insert+0x34> 0010e408 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10e408: 55 push %ebp 10e409: 89 e5 mov %esp,%ebp 10e40b: 56 push %esi 10e40c: 53 push %ebx 10e40d: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10e410: 9c pushf 10e411: fa cli 10e412: 59 pop %ecx previous_state = the_watchdog->state; 10e413: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10e416: 83 f8 01 cmp $0x1,%eax 10e419: 74 4d je 10e468 <_Watchdog_Remove+0x60> 10e41b: 73 0f jae 10e42c <_Watchdog_Remove+0x24> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10e41d: 8b 1d c4 54 12 00 mov 0x1254c4,%ebx 10e423: 89 5a 18 mov %ebx,0x18(%edx) _ISR_Enable( level ); 10e426: 51 push %ecx 10e427: 9d popf return( previous_state ); } 10e428: 5b pop %ebx 10e429: 5e pop %esi 10e42a: c9 leave 10e42b: c3 ret Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 10e42c: 83 f8 03 cmp $0x3,%eax 10e42f: 77 ec ja 10e41d <_Watchdog_Remove+0x15> break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10e431: 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 ); 10e438: 8b 1a mov (%edx),%ebx next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10e43a: 8b 33 mov (%ebx),%esi 10e43c: 85 f6 test %esi,%esi 10e43e: 74 06 je 10e446 <_Watchdog_Remove+0x3e> next_watchdog->delta_interval += the_watchdog->delta_interval; 10e440: 8b 72 10 mov 0x10(%edx),%esi 10e443: 01 73 10 add %esi,0x10(%ebx) if ( _Watchdog_Sync_count ) 10e446: 8b 35 c0 54 12 00 mov 0x1254c0,%esi 10e44c: 85 f6 test %esi,%esi 10e44e: 74 0c je 10e45c <_Watchdog_Remove+0x54> _Watchdog_Sync_level = _ISR_Nest_level; 10e450: 8b 35 f4 53 12 00 mov 0x1253f4,%esi 10e456: 89 35 14 54 12 00 mov %esi,0x125414 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10e45c: 8b 72 04 mov 0x4(%edx),%esi next->previous = previous; 10e45f: 89 73 04 mov %esi,0x4(%ebx) previous->next = next; 10e462: 89 1e mov %ebx,(%esi) 10e464: eb b7 jmp 10e41d <_Watchdog_Remove+0x15> 10e466: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * 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; 10e468: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10e46f: eb ac jmp 10e41d <_Watchdog_Remove+0x15> 0010f89c <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 10f89c: 55 push %ebp 10f89d: 89 e5 mov %esp,%ebp 10f89f: 57 push %edi 10f8a0: 56 push %esi 10f8a1: 53 push %ebx 10f8a2: 83 ec 2c sub $0x2c,%esp 10f8a5: 8b 55 08 mov 0x8(%ebp),%edx 10f8a8: 8b 45 0c mov 0xc(%ebp),%eax printk( 10f8ab: 8b 78 24 mov 0x24(%eax),%edi 10f8ae: 8b 70 20 mov 0x20(%eax),%esi 10f8b1: 8b 58 1c mov 0x1c(%eax),%ebx 10f8b4: 8b 48 0c mov 0xc(%eax),%ecx 10f8b7: 89 4d d4 mov %ecx,-0x2c(%ebp) 10f8ba: 8b 48 10 mov 0x10(%eax),%ecx 10f8bd: 89 4d e0 mov %ecx,-0x20(%ebp) 10f8c0: 85 d2 test %edx,%edx 10f8c2: 74 2c je 10f8f0 <_Watchdog_Report+0x54> 10f8c4: b9 63 16 12 00 mov $0x121663,%ecx 10f8c9: 83 ec 0c sub $0xc,%esp 10f8cc: 57 push %edi 10f8cd: 56 push %esi 10f8ce: 53 push %ebx 10f8cf: 50 push %eax 10f8d0: ff 75 d4 pushl -0x2c(%ebp) 10f8d3: ff 75 e0 pushl -0x20(%ebp) 10f8d6: 51 push %ecx 10f8d7: 52 push %edx 10f8d8: 68 e6 1f 12 00 push $0x121fe6 10f8dd: e8 f2 9f ff ff call 1098d4 10f8e2: 83 c4 30 add $0x30,%esp watch, watch->routine, watch->id, watch->user_data ); } 10f8e5: 8d 65 f4 lea -0xc(%ebp),%esp 10f8e8: 5b pop %ebx 10f8e9: 5e pop %esi 10f8ea: 5f pop %edi 10f8eb: c9 leave 10f8ec: c3 ret 10f8ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( 10f8f0: b9 45 1e 12 00 mov $0x121e45,%ecx 10f8f5: 89 ca mov %ecx,%edx 10f8f7: eb d0 jmp 10f8c9 <_Watchdog_Report+0x2d> 0010e540 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 10e540: 55 push %ebp 10e541: 89 e5 mov %esp,%ebp 10e543: 57 push %edi 10e544: 53 push %ebx uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 10e545: 8b 1d 20 12 12 00 mov 0x121220,%ebx uintptr_t size = Configuration.work_space_size; 10e54b: 8b 15 24 12 12 00 mov 0x121224,%edx if ( Configuration.do_zero_of_workspace ) 10e551: 80 3d 48 12 12 00 00 cmpb $0x0,0x121248 10e558: 75 1e jne 10e578 <_Workspace_Handler_initialization+0x38> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 10e55a: 6a 04 push $0x4 10e55c: 52 push %edx 10e55d: 53 push %ebx 10e55e: 68 80 53 12 00 push $0x125380 10e563: e8 dc dd ff ff call 10c344 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 10e568: 83 c4 10 add $0x10,%esp 10e56b: 85 c0 test %eax,%eax 10e56d: 74 13 je 10e582 <_Workspace_Handler_initialization+0x42> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 10e56f: 8d 65 f8 lea -0x8(%ebp),%esp 10e572: 5b pop %ebx 10e573: 5f pop %edi 10e574: c9 leave 10e575: c3 ret 10e576: 66 90 xchg %ax,%ax <== NOT EXECUTED uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace ) memset( starting_address, 0, size ); 10e578: 31 c0 xor %eax,%eax 10e57a: 89 df mov %ebx,%edi 10e57c: 89 d1 mov %edx,%ecx 10e57e: f3 aa rep stos %al,%es:(%edi) 10e580: eb d8 jmp 10e55a <_Workspace_Handler_initialization+0x1a> size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 10e582: 52 push %edx 10e583: 6a 03 push $0x3 10e585: 6a 01 push $0x1 10e587: 6a 00 push $0x0 10e589: e8 da e0 ff ff call 10c668 <_Internal_error_Occurred> 00111834 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 111834: 55 push %ebp 111835: 89 e5 mov %esp,%ebp 111837: 57 push %edi 111838: 56 push %esi 111839: 53 push %ebx 11183a: 83 ec 2c sub $0x2c,%esp 11183d: 8b 5d 08 mov 0x8(%ebp),%ebx 111840: 8b 7d 0c mov 0xc(%ebp),%edi 111843: 8b 45 10 mov 0x10(%ebp),%eax 111846: 8b 75 14 mov 0x14(%ebp),%esi Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 111849: 85 db test %ebx,%ebx 11184b: 0f 84 87 00 00 00 je 1118d8 return RTEMS_INVALID_NAME; if ( !id ) 111851: 85 f6 test %esi,%esi 111853: 0f 84 bb 00 00 00 je 111914 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 111859: f7 c7 10 00 00 00 test $0x10,%edi 11185f: 0f 84 83 00 00 00 je 1118e8 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 111865: 85 c0 test %eax,%eax 111867: 0f 84 87 00 00 00 je 1118f4 if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 11186d: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 111874: 89 45 e4 mov %eax,-0x1c(%ebp) 111877: a1 58 53 12 00 mov 0x125358,%eax 11187c: 40 inc %eax 11187d: a3 58 53 12 00 mov %eax,0x125358 * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void ) { return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information ); 111882: 83 ec 0c sub $0xc,%esp 111885: 68 c0 56 12 00 push $0x1256c0 11188a: e8 71 ae ff ff call 10c700 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 11188f: 83 c4 10 add $0x10,%esp 111892: 85 c0 test %eax,%eax 111894: 74 6a je 111900 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 111896: 89 78 10 mov %edi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 111899: 83 ec 08 sub $0x8,%esp 11189c: 8d 55 e0 lea -0x20(%ebp),%edx 11189f: 52 push %edx 1118a0: 8d 50 14 lea 0x14(%eax),%edx 1118a3: 52 push %edx 1118a4: 89 45 d4 mov %eax,-0x2c(%ebp) 1118a7: e8 5c 04 00 00 call 111d08 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1118ac: 8b 45 d4 mov -0x2c(%ebp),%eax 1118af: 8b 50 08 mov 0x8(%eax),%edx 1118b2: 0f b7 fa movzwl %dx,%edi 1118b5: 8b 0d dc 56 12 00 mov 0x1256dc,%ecx 1118bb: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1118be: 89 58 0c mov %ebx,0xc(%eax) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 1118c1: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 1118c3: e8 30 bb ff ff call 10d3f8 <_Thread_Enable_dispatch> 1118c8: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1118ca: 83 c4 10 add $0x10,%esp } 1118cd: 8d 65 f4 lea -0xc(%ebp),%esp 1118d0: 5b pop %ebx 1118d1: 5e pop %esi 1118d2: 5f pop %edi 1118d3: c9 leave 1118d4: c3 ret 1118d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 1118d8: b8 03 00 00 00 mov $0x3,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1118dd: 8d 65 f4 lea -0xc(%ebp),%esp 1118e0: 5b pop %ebx 1118e1: 5e pop %esi 1118e2: 5f pop %edi 1118e3: c9 leave 1118e4: c3 ret 1118e5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 1118e8: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) 1118ef: eb 83 jmp 111874 1118f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 1118f4: b0 0a mov $0xa,%al *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1118f6: 8d 65 f4 lea -0xc(%ebp),%esp 1118f9: 5b pop %ebx 1118fa: 5e pop %esi 1118fb: 5f pop %edi 1118fc: c9 leave 1118fd: c3 ret 1118fe: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 111900: e8 f3 ba ff ff call 10d3f8 <_Thread_Enable_dispatch> 111905: b8 05 00 00 00 mov $0x5,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11190a: 8d 65 f4 lea -0xc(%ebp),%esp 11190d: 5b pop %ebx 11190e: 5e pop %esi 11190f: 5f pop %edi 111910: c9 leave 111911: c3 ret 111912: 66 90 xchg %ax,%ax <== NOT EXECUTED CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 111914: b8 09 00 00 00 mov $0x9,%eax 111919: eb b2 jmp 1118cd 0011191c : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 11191c: 55 push %ebp 11191d: 89 e5 mov %esp,%ebp 11191f: 53 push %ebx 111920: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 111923: 8d 45 f4 lea -0xc(%ebp),%eax 111926: 50 push %eax 111927: ff 75 08 pushl 0x8(%ebp) 11192a: 68 c0 56 12 00 push $0x1256c0 11192f: e8 7c b2 ff ff call 10cbb0 <_Objects_Get> 111934: 89 c3 mov %eax,%ebx Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 111936: 83 c4 10 add $0x10,%esp 111939: 8b 4d f4 mov -0xc(%ebp),%ecx 11193c: 85 c9 test %ecx,%ecx 11193e: 75 38 jne 111978 case OBJECTS_LOCAL: _CORE_barrier_Flush( 111940: 52 push %edx 111941: 6a 02 push $0x2 111943: 6a 00 push $0x0 111945: 8d 40 14 lea 0x14(%eax),%eax 111948: 50 push %eax 111949: e8 b2 c1 ff ff call 10db00 <_Thread_queue_Flush> &the_barrier->Barrier, NULL, CORE_BARRIER_WAS_DELETED ); _Objects_Close( &_Barrier_Information, &the_barrier->Object ); 11194e: 59 pop %ecx 11194f: 58 pop %eax 111950: 53 push %ebx 111951: 68 c0 56 12 00 push $0x1256c0 111956: e8 21 ae ff ff call 10c77c <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 11195b: 58 pop %eax 11195c: 5a pop %edx 11195d: 53 push %ebx 11195e: 68 c0 56 12 00 push $0x1256c0 111963: e8 18 b1 ff ff call 10ca80 <_Objects_Free> _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 111968: e8 8b ba ff ff call 10d3f8 <_Thread_Enable_dispatch> 11196d: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11196f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111972: 8b 5d fc mov -0x4(%ebp),%ebx 111975: c9 leave 111976: c3 ret 111977: 90 nop <== NOT EXECUTED { Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 111978: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11197d: 8b 5d fc mov -0x4(%ebp),%ebx 111980: c9 leave 111981: c3 ret 001119e8 : rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout ) { 1119e8: 55 push %ebp 1119e9: 89 e5 mov %esp,%ebp 1119eb: 53 push %ebx 1119ec: 83 ec 18 sub $0x18,%esp 1119ef: 8b 5d 08 mov 0x8(%ebp),%ebx 1119f2: 8d 45 f4 lea -0xc(%ebp),%eax 1119f5: 50 push %eax 1119f6: 53 push %ebx 1119f7: 68 c0 56 12 00 push $0x1256c0 1119fc: e8 af b1 ff ff call 10cbb0 <_Objects_Get> Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 111a01: 83 c4 10 add $0x10,%esp 111a04: 8b 55 f4 mov -0xc(%ebp),%edx 111a07: 85 d2 test %edx,%edx 111a09: 75 35 jne 111a40 case OBJECTS_LOCAL: _CORE_barrier_Wait( 111a0b: 83 ec 0c sub $0xc,%esp 111a0e: 6a 00 push $0x0 111a10: ff 75 0c pushl 0xc(%ebp) 111a13: 6a 01 push $0x1 111a15: 53 push %ebx 111a16: 83 c0 14 add $0x14,%eax 111a19: 50 push %eax 111a1a: e8 4d 03 00 00 call 111d6c <_CORE_barrier_Wait> id, true, timeout, NULL ); _Thread_Enable_dispatch(); 111a1f: 83 c4 20 add $0x20,%esp 111a22: e8 d1 b9 ff ff call 10d3f8 <_Thread_Enable_dispatch> return _Barrier_Translate_core_barrier_return_code( 111a27: 83 ec 0c sub $0xc,%esp 111a2a: a1 18 54 12 00 mov 0x125418,%eax 111a2f: ff 70 34 pushl 0x34(%eax) 111a32: e8 41 09 00 00 call 112378 <_Barrier_Translate_core_barrier_return_code> 111a37: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111a3a: 8b 5d fc mov -0x4(%ebp),%ebx 111a3d: c9 leave 111a3e: c3 ret 111a3f: 90 nop <== NOT EXECUTED { Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 111a40: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111a45: 8b 5d fc mov -0x4(%ebp),%ebx 111a48: c9 leave 111a49: c3 ret 00110a40 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 110a40: 55 push %ebp 110a41: 89 e5 mov %esp,%ebp 110a43: 53 push %ebx 110a44: 83 ec 04 sub $0x4,%esp 110a47: 8b 45 08 mov 0x8(%ebp),%eax 110a4a: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !time_buffer ) 110a4d: 85 db test %ebx,%ebx 110a4f: 74 3b je 110a8c return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 110a51: 85 c0 test %eax,%eax 110a53: 74 2b je 110a80 return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 110a55: 83 f8 01 cmp $0x1,%eax 110a58: 74 3e je 110a98 return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 110a5a: 83 f8 02 cmp $0x2,%eax 110a5d: 74 45 je 110aa4 *interval = rtems_clock_get_ticks_since_boot(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 110a5f: 83 f8 03 cmp $0x3,%eax 110a62: 74 4c je 110ab0 *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 110a64: 83 f8 04 cmp $0x4,%eax 110a67: 74 0b je 110a74 110a69: b8 0a 00 00 00 mov $0xa,%eax return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 110a6e: 5a pop %edx 110a6f: 5b pop %ebx 110a70: c9 leave 110a71: c3 ret 110a72: 66 90 xchg %ax,%ax <== NOT EXECUTED *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 110a74: 89 5d 08 mov %ebx,0x8(%ebp) return RTEMS_INVALID_NUMBER; } 110a77: 59 pop %ecx 110a78: 5b pop %ebx 110a79: c9 leave *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 110a7a: e9 49 01 00 00 jmp 110bc8 110a7f: 90 nop <== NOT EXECUTED { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 110a80: 89 5d 08 mov %ebx,0x8(%ebp) if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 110a83: 58 pop %eax 110a84: 5b pop %ebx 110a85: c9 leave { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 110a86: e9 7d 00 00 00 jmp 110b08 110a8b: 90 nop <== NOT EXECUTED rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { if ( !time_buffer ) 110a8c: b8 09 00 00 00 mov $0x9,%eax if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 110a91: 5a pop %edx 110a92: 5b pop %ebx 110a93: c9 leave 110a94: c3 ret 110a95: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 110a98: 89 5d 08 mov %ebx,0x8(%ebp) if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 110a9b: 5b pop %ebx 110a9c: 5b pop %ebx 110a9d: c9 leave if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 110a9e: e9 19 00 00 00 jmp 110abc 110aa3: 90 nop <== NOT EXECUTED if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 110aa4: e8 53 00 00 00 call 110afc 110aa9: 89 03 mov %eax,(%ebx) 110aab: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 110aad: eb bf jmp 110a6e 110aaf: 90 nop <== NOT EXECUTED } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 110ab0: e8 33 00 00 00 call 110ae8 110ab5: 89 03 mov %eax,(%ebx) 110ab7: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 110ab9: eb b3 jmp 110a6e 0010be74 : #include rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { 10be74: 55 push %ebp 10be75: 89 e5 mov %esp,%ebp 10be77: 8b 45 08 mov 0x8(%ebp),%eax if ( !the_interval ) 10be7a: 85 c0 test %eax,%eax 10be7c: 74 1e je 10be9c return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 10be7e: 80 3d ac 01 13 00 00 cmpb $0x0,0x1301ac 10be85: 74 0d je 10be94 return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); 10be87: 8b 15 2c 02 13 00 mov 0x13022c,%edx 10be8d: 89 10 mov %edx,(%eax) 10be8f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10be91: c9 leave 10be92: c3 ret 10be93: 90 nop <== NOT EXECUTED ) { if ( !the_interval ) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 10be94: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); return RTEMS_SUCCESSFUL; } 10be99: c9 leave 10be9a: c3 ret 10be9b: 90 nop <== NOT EXECUTED rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { if ( !the_interval ) 10be9c: b0 09 mov $0x9,%al if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); return RTEMS_SUCCESSFUL; } 10be9e: c9 leave 10be9f: c3 ret 0010bec0 : #include rtems_status_code rtems_clock_get_tod( rtems_time_of_day *time_buffer ) { 10bec0: 55 push %ebp 10bec1: 89 e5 mov %esp,%ebp 10bec3: 56 push %esi 10bec4: 53 push %ebx 10bec5: 83 ec 50 sub $0x50,%esp 10bec8: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 10becb: 85 db test %ebx,%ebx 10becd: 0f 84 a1 00 00 00 je 10bf74 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 10bed3: 80 3d ac 01 13 00 00 cmpb $0x0,0x1301ac 10beda: 75 0c jne 10bee8 10bedc: b8 0b 00 00 00 mov $0xb,%eax tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; } 10bee1: 8d 65 f8 lea -0x8(%ebp),%esp 10bee4: 5b pop %ebx 10bee5: 5e pop %esi 10bee6: c9 leave 10bee7: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 10bee8: 9c pushf 10bee9: fa cli 10beea: 5e pop %esi _TOD_Get( &now ); 10beeb: 83 ec 0c sub $0xc,%esp 10beee: 8d 45 e8 lea -0x18(%ebp),%eax 10bef1: 50 push %eax 10bef2: e8 61 18 00 00 call 10d758 <_TOD_Get> _ISR_Enable(level); 10bef7: 56 push %esi 10bef8: 9d popf useconds = (suseconds_t)now.tv_nsec; 10bef9: 8b 4d ec mov -0x14(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 10befc: 8b 45 e8 mov -0x18(%ebp),%eax 10beff: 89 45 f0 mov %eax,-0x10(%ebp) time->tv_usec = useconds; 10bf02: be d3 4d 62 10 mov $0x10624dd3,%esi 10bf07: 89 c8 mov %ecx,%eax 10bf09: f7 ee imul %esi 10bf0b: 89 45 b0 mov %eax,-0x50(%ebp) 10bf0e: 89 55 b4 mov %edx,-0x4c(%ebp) 10bf11: 8b 75 b4 mov -0x4c(%ebp),%esi 10bf14: c1 fe 06 sar $0x6,%esi 10bf17: 89 c8 mov %ecx,%eax 10bf19: 99 cltd 10bf1a: 29 d6 sub %edx,%esi 10bf1c: 89 75 f4 mov %esi,-0xc(%ebp) /* Obtain the current time */ _TOD_Get_timeval( &now ); /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); 10bf1f: 58 pop %eax 10bf20: 5a pop %edx 10bf21: 8d 45 c4 lea -0x3c(%ebp),%eax 10bf24: 50 push %eax 10bf25: 8d 45 f0 lea -0x10(%ebp),%eax 10bf28: 50 push %eax 10bf29: e8 ea 83 00 00 call 114318 /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 10bf2e: 8b 45 d8 mov -0x28(%ebp),%eax 10bf31: 05 6c 07 00 00 add $0x76c,%eax 10bf36: 89 03 mov %eax,(%ebx) tmbuf->month = time.tm_mon + 1; 10bf38: 8b 45 d4 mov -0x2c(%ebp),%eax 10bf3b: 40 inc %eax 10bf3c: 89 43 04 mov %eax,0x4(%ebx) tmbuf->day = time.tm_mday; 10bf3f: 8b 45 d0 mov -0x30(%ebp),%eax 10bf42: 89 43 08 mov %eax,0x8(%ebx) tmbuf->hour = time.tm_hour; 10bf45: 8b 45 cc mov -0x34(%ebp),%eax 10bf48: 89 43 0c mov %eax,0xc(%ebx) tmbuf->minute = time.tm_min; 10bf4b: 8b 45 c8 mov -0x38(%ebp),%eax 10bf4e: 89 43 10 mov %eax,0x10(%ebx) tmbuf->second = time.tm_sec; 10bf51: 8b 45 c4 mov -0x3c(%ebp),%eax 10bf54: 89 43 14 mov %eax,0x14(%ebx) tmbuf->ticks = now.tv_usec / 10bf57: 8b 45 f4 mov -0xc(%ebp),%eax 10bf5a: 31 d2 xor %edx,%edx 10bf5c: f7 35 2c 42 12 00 divl 0x12422c 10bf62: 89 43 18 mov %eax,0x18(%ebx) 10bf65: 31 c0 xor %eax,%eax rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; 10bf67: 83 c4 10 add $0x10,%esp } 10bf6a: 8d 65 f8 lea -0x8(%ebp),%esp 10bf6d: 5b pop %ebx 10bf6e: 5e pop %esi 10bf6f: c9 leave 10bf70: c3 ret 10bf71: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 10bf74: b8 09 00 00 00 mov $0x9,%eax 10bf79: e9 63 ff ff ff jmp 10bee1 00110bc8 : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 110bc8: 55 push %ebp 110bc9: 89 e5 mov %esp,%ebp 110bcb: 56 push %esi 110bcc: 53 push %ebx 110bcd: 83 ec 20 sub $0x20,%esp 110bd0: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !time ) 110bd3: 85 db test %ebx,%ebx 110bd5: 74 59 je 110c30 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 110bd7: 80 3d 0c df 16 00 00 cmpb $0x0,0x16df0c 110bde: 75 0c jne 110bec 110be0: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 110be5: 8d 65 f8 lea -0x8(%ebp),%esp 110be8: 5b pop %ebx 110be9: 5e pop %esi 110bea: c9 leave 110beb: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 110bec: 9c pushf 110bed: fa cli 110bee: 5e pop %esi _TOD_Get( &now ); 110bef: 83 ec 0c sub $0xc,%esp 110bf2: 8d 45 f0 lea -0x10(%ebp),%eax 110bf5: 50 push %eax 110bf6: e8 05 18 00 00 call 112400 <_TOD_Get> _ISR_Enable(level); 110bfb: 56 push %esi 110bfc: 9d popf useconds = (suseconds_t)now.tv_nsec; 110bfd: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 110c00: 8b 45 f0 mov -0x10(%ebp),%eax 110c03: 89 03 mov %eax,(%ebx) time->tv_usec = useconds; 110c05: be d3 4d 62 10 mov $0x10624dd3,%esi 110c0a: 89 c8 mov %ecx,%eax 110c0c: f7 ee imul %esi 110c0e: 89 45 e0 mov %eax,-0x20(%ebp) 110c11: 89 55 e4 mov %edx,-0x1c(%ebp) 110c14: 8b 75 e4 mov -0x1c(%ebp),%esi 110c17: c1 fe 06 sar $0x6,%esi 110c1a: 89 c8 mov %ecx,%eax 110c1c: 99 cltd 110c1d: 29 d6 sub %edx,%esi 110c1f: 89 73 04 mov %esi,0x4(%ebx) 110c22: 31 c0 xor %eax,%eax if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; 110c24: 83 c4 10 add $0x10,%esp } 110c27: 8d 65 f8 lea -0x8(%ebp),%esp 110c2a: 5b pop %ebx 110c2b: 5e pop %esi 110c2c: c9 leave 110c2d: c3 ret 110c2e: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { if ( !time ) 110c30: b8 09 00 00 00 mov $0x9,%eax 110c35: eb ae jmp 110be5 0012cf8c : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 12cf8c: 55 push %ebp 12cf8d: 89 e5 mov %esp,%ebp 12cf8f: 83 ec 08 sub $0x8,%esp 12cf92: 8b 45 08 mov 0x8(%ebp),%eax if ( !uptime ) 12cf95: 85 c0 test %eax,%eax 12cf97: 74 13 je 12cfac return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 12cf99: 83 ec 0c sub $0xc,%esp 12cf9c: 50 push %eax 12cf9d: e8 7a 0f 00 00 call 12df1c <_TOD_Get_uptime_as_timespec> 12cfa2: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 12cfa4: 83 c4 10 add $0x10,%esp } 12cfa7: c9 leave 12cfa8: c3 ret 12cfa9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime ) 12cfac: b0 09 mov $0x9,%al return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); return RTEMS_SUCCESSFUL; } 12cfae: c9 leave 12cfaf: c3 ret 0010bf98 : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 10bf98: 55 push %ebp 10bf99: 89 e5 mov %esp,%ebp 10bf9b: 53 push %ebx 10bf9c: 83 ec 14 sub $0x14,%esp 10bf9f: 8b 5d 08 mov 0x8(%ebp),%ebx struct timespec newtime; if ( !time_buffer ) 10bfa2: 85 db test %ebx,%ebx 10bfa4: 74 66 je 10c00c return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 10bfa6: 83 ec 0c sub $0xc,%esp 10bfa9: 53 push %ebx 10bfaa: e8 39 01 00 00 call 10c0e8 <_TOD_Validate> 10bfaf: 83 c4 10 add $0x10,%esp 10bfb2: 84 c0 test %al,%al 10bfb4: 75 0a jne 10bfc0 10bfb6: b8 14 00 00 00 mov $0x14,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10bfbb: 8b 5d fc mov -0x4(%ebp),%ebx 10bfbe: c9 leave 10bfbf: c3 ret if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 10bfc0: 83 ec 0c sub $0xc,%esp 10bfc3: 53 push %ebx 10bfc4: e8 93 00 00 00 call 10c05c <_TOD_To_seconds> 10bfc9: 89 45 f0 mov %eax,-0x10(%ebp) newtime.tv_nsec = time_buffer->ticks * 10bfcc: 8b 43 18 mov 0x18(%ebx),%eax 10bfcf: 0f af 05 2c 42 12 00 imul 0x12422c,%eax 10bfd6: 8d 04 80 lea (%eax,%eax,4),%eax 10bfd9: 8d 04 80 lea (%eax,%eax,4),%eax 10bfdc: 8d 04 80 lea (%eax,%eax,4),%eax 10bfdf: c1 e0 03 shl $0x3,%eax 10bfe2: 89 45 f4 mov %eax,-0xc(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10bfe5: a1 98 01 13 00 mov 0x130198,%eax 10bfea: 40 inc %eax 10bfeb: a3 98 01 13 00 mov %eax,0x130198 rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 10bff0: 8d 45 f0 lea -0x10(%ebp),%eax 10bff3: 89 04 24 mov %eax,(%esp) 10bff6: e8 41 18 00 00 call 10d83c <_TOD_Set> _Thread_Enable_dispatch(); 10bffb: e8 04 2b 00 00 call 10eb04 <_Thread_Enable_dispatch> 10c000: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10c002: 83 c4 10 add $0x10,%esp } return RTEMS_INVALID_CLOCK; } 10c005: 8b 5d fc mov -0x4(%ebp),%ebx 10c008: c9 leave 10c009: c3 ret 10c00a: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_time_of_day *time_buffer ) { struct timespec newtime; if ( !time_buffer ) 10c00c: b8 09 00 00 00 mov $0x9,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10c011: 8b 5d fc mov -0x4(%ebp),%ebx 10c014: c9 leave 10c015: c3 ret 0010aeb0 : * error code - if unsuccessful */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { 10aeb0: 55 push %ebp 10aeb1: 89 e5 mov %esp,%ebp 10aeb3: 8b 45 08 mov 0x8(%ebp),%eax if ( !routine ) 10aeb6: 85 c0 test %eax,%eax 10aeb8: 74 0a je 10aec4 return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; 10aeba: a3 24 55 12 00 mov %eax,0x125524 10aebf: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10aec1: c9 leave 10aec2: c3 ret 10aec3: 90 nop <== NOT EXECUTED */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { if ( !routine ) 10aec4: b0 09 mov $0x9,%al return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; return RTEMS_SUCCESSFUL; } 10aec6: c9 leave 10aec7: c3 ret 0010aec8 : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { 10aec8: 55 push %ebp 10aec9: 89 e5 mov %esp,%ebp 10aecb: 83 ec 08 sub $0x8,%esp _TOD_Tickle_ticks(); 10aece: e8 f5 13 00 00 call 10c2c8 <_TOD_Tickle_ticks> */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); 10aed3: 83 ec 0c sub $0xc,%esp 10aed6: 68 38 54 12 00 push $0x125438 10aedb: e8 94 35 00 00 call 10e474 <_Watchdog_Tickle> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 10aee0: e8 3b 30 00 00 call 10df20 <_Thread_Tickle_timeslice> * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void ) { return ( _Context_Switch_necessary ); 10aee5: a0 28 54 12 00 mov 0x125428,%al if ( _Thread_Is_context_switch_necessary() && 10aeea: 83 c4 10 add $0x10,%esp 10aeed: 84 c0 test %al,%al 10aeef: 74 09 je 10aefa * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); 10aef1: a1 58 53 12 00 mov 0x125358,%eax 10aef6: 85 c0 test %eax,%eax 10aef8: 74 06 je 10af00 _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 10aefa: 31 c0 xor %eax,%eax 10aefc: c9 leave 10aefd: c3 ret 10aefe: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Tickle_timeslice(); if ( _Thread_Is_context_switch_necessary() && _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); 10af00: e8 97 23 00 00 call 10d29c <_Thread_Dispatch> return RTEMS_SUCCESSFUL; } 10af05: 31 c0 xor %eax,%eax 10af07: c9 leave 10af08: c3 ret 0010b090 : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { 10b090: 55 push %ebp 10b091: 89 e5 mov %esp,%ebp 10b093: 53 push %ebx 10b094: 83 ec 1c sub $0x1c,%esp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); 10b097: 8d 45 f4 lea -0xc(%ebp),%eax 10b09a: 50 push %eax 10b09b: ff 75 08 pushl 0x8(%ebp) 10b09e: e8 79 23 00 00 call 10d41c <_Thread_Get> switch ( location ) { 10b0a3: 83 c4 10 add $0x10,%esp 10b0a6: 8b 55 f4 mov -0xc(%ebp),%edx 10b0a9: 85 d2 test %edx,%edx 10b0ab: 75 2b jne 10b0d8 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 10b0ad: 8b 90 f0 00 00 00 mov 0xf0(%eax),%edx rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 10b0b3: 9c pushf 10b0b4: fa cli 10b0b5: 59 pop %ecx *the_event_set |= the_new_events; 10b0b6: 8b 5d 0c mov 0xc(%ebp),%ebx 10b0b9: 09 1a or %ebx,(%edx) _ISR_Enable( level ); 10b0bb: 51 push %ecx 10b0bc: 9d popf _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 10b0bd: 83 ec 0c sub $0xc,%esp 10b0c0: 50 push %eax 10b0c1: e8 1e 00 00 00 call 10b0e4 <_Event_Surrender> _Thread_Enable_dispatch(); 10b0c6: e8 2d 23 00 00 call 10d3f8 <_Thread_Enable_dispatch> 10b0cb: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b0cd: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b0d0: 8b 5d fc mov -0x4(%ebp),%ebx 10b0d3: c9 leave 10b0d4: c3 ret 10b0d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); switch ( location ) { 10b0d8: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b0dd: 8b 5d fc mov -0x4(%ebp),%ebx 10b0e0: c9 leave 10b0e1: c3 ret 00110774 : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { 110774: 55 push %ebp 110775: 89 e5 mov %esp,%ebp 110777: 57 push %edi 110778: 56 push %esi 110779: 53 push %ebx 11077a: 83 ec 1c sub $0x1c,%esp 11077d: 8b 75 0c mov 0xc(%ebp),%esi 110780: 8b 5d 10 mov 0x10(%ebp),%ebx Extension_Control *the_extension; if ( !id ) 110783: 85 db test %ebx,%ebx 110785: 0f 84 85 00 00 00 je 110810 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 11078b: 8b 45 08 mov 0x8(%ebp),%eax 11078e: 85 c0 test %eax,%eax 110790: 75 0e jne 1107a0 110792: b8 03 00 00 00 mov $0x3,%eax ); *id = the_extension->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 110797: 8d 65 f4 lea -0xc(%ebp),%esp 11079a: 5b pop %ebx 11079b: 5e pop %esi 11079c: 5f pop %edi 11079d: c9 leave 11079e: c3 ret 11079f: 90 nop <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1107a0: a1 f8 39 13 00 mov 0x1339f8,%eax 1107a5: 40 inc %eax 1107a6: a3 f8 39 13 00 mov %eax,0x1339f8 #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 1107ab: 83 ec 0c sub $0xc,%esp 1107ae: 68 80 3c 13 00 push $0x133c80 1107b3: e8 18 0c 00 00 call 1113d0 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 1107b8: 83 c4 10 add $0x10,%esp 1107bb: 85 c0 test %eax,%eax 1107bd: 74 45 je 110804 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 1107bf: 8d 78 24 lea 0x24(%eax),%edi 1107c2: b9 08 00 00 00 mov $0x8,%ecx 1107c7: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 1107c9: 83 ec 0c sub $0xc,%esp 1107cc: 8d 50 10 lea 0x10(%eax),%edx 1107cf: 52 push %edx 1107d0: 89 45 e4 mov %eax,-0x1c(%ebp) 1107d3: e8 c8 25 00 00 call 112da0 <_User_extensions_Add_set> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1107d8: 8b 45 e4 mov -0x1c(%ebp),%eax 1107db: 8b 50 08 mov 0x8(%eax),%edx 1107de: 0f b7 f2 movzwl %dx,%esi 1107e1: 8b 0d 9c 3c 13 00 mov 0x133c9c,%ecx 1107e7: 89 04 b1 mov %eax,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1107ea: 8b 4d 08 mov 0x8(%ebp),%ecx 1107ed: 89 48 0c mov %ecx,0xc(%eax) &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 1107f0: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 1107f2: e8 39 19 00 00 call 112130 <_Thread_Enable_dispatch> 1107f7: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1107f9: 83 c4 10 add $0x10,%esp } 1107fc: 8d 65 f4 lea -0xc(%ebp),%esp 1107ff: 5b pop %ebx 110800: 5e pop %esi 110801: 5f pop %edi 110802: c9 leave 110803: c3 ret _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { _Thread_Enable_dispatch(); 110804: e8 27 19 00 00 call 112130 <_Thread_Enable_dispatch> 110809: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 11080e: eb 87 jmp 110797 rtems_id *id ) { Extension_Control *the_extension; if ( !id ) 110810: b8 09 00 00 00 mov $0x9,%eax 110815: eb 80 jmp 110797 00110818 : #include rtems_status_code rtems_extension_delete( rtems_id id ) { 110818: 55 push %ebp 110819: 89 e5 mov %esp,%ebp 11081b: 53 push %ebx 11081c: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get ( Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) 11081f: 8d 45 f4 lea -0xc(%ebp),%eax 110822: 50 push %eax 110823: ff 75 08 pushl 0x8(%ebp) 110826: 68 80 3c 13 00 push $0x133c80 11082b: e8 50 10 00 00 call 111880 <_Objects_Get> 110830: 89 c3 mov %eax,%ebx Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 110832: 83 c4 10 add $0x10,%esp 110835: 8b 55 f4 mov -0xc(%ebp),%edx 110838: 85 d2 test %edx,%edx 11083a: 75 38 jne 110874 case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 11083c: 83 ec 0c sub $0xc,%esp 11083f: 8d 40 10 lea 0x10(%eax),%eax 110842: 50 push %eax 110843: e8 58 26 00 00 call 112ea0 <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 110848: 59 pop %ecx 110849: 58 pop %eax 11084a: 53 push %ebx 11084b: 68 80 3c 13 00 push $0x133c80 110850: e8 f7 0b 00 00 call 11144c <_Objects_Close> RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 110855: 58 pop %eax 110856: 5a pop %edx 110857: 53 push %ebx 110858: 68 80 3c 13 00 push $0x133c80 11085d: e8 ee 0e 00 00 call 111750 <_Objects_Free> _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 110862: e8 c9 18 00 00 call 112130 <_Thread_Enable_dispatch> 110867: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 110869: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11086c: 8b 5d fc mov -0x4(%ebp),%ebx 11086f: c9 leave 110870: c3 ret 110871: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 110874: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110879: 8b 5d fc mov -0x4(%ebp),%ebx 11087c: c9 leave 11087d: c3 ret 00111b8c : rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 111b8c: 55 push %ebp 111b8d: 89 e5 mov %esp,%ebp 111b8f: 56 push %esi 111b90: 53 push %ebx 111b91: 8b 45 08 mov 0x8(%ebp),%eax 111b94: 8b 4d 0c mov 0xc(%ebp),%ecx 111b97: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111b9a: 39 05 a0 56 12 00 cmp %eax,0x1256a0 111ba0: 76 22 jbe 111bc4 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; 111ba2: 8d 34 40 lea (%eax,%eax,2),%esi 111ba5: 8b 15 a4 56 12 00 mov 0x1256a4,%edx 111bab: 8b 54 f2 08 mov 0x8(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111baf: 85 d2 test %edx,%edx 111bb1: 74 1d je 111bd0 111bb3: 89 5d 10 mov %ebx,0x10(%ebp) 111bb6: 89 4d 0c mov %ecx,0xc(%ebp) 111bb9: 89 45 08 mov %eax,0x8(%ebp) } 111bbc: 5b pop %ebx 111bbd: 5e pop %esi 111bbe: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111bbf: ff e2 jmp *%edx 111bc1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111bc4: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 111bc9: 5b pop %ebx 111bca: 5e pop %esi 111bcb: c9 leave 111bcc: c3 ret 111bcd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111bd0: 31 c0 xor %eax,%eax } 111bd2: 5b pop %ebx 111bd3: 5e pop %esi 111bd4: c9 leave 111bd5: c3 ret 00111bd8 : rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 111bd8: 55 push %ebp 111bd9: 89 e5 mov %esp,%ebp 111bdb: 56 push %esi 111bdc: 53 push %ebx 111bdd: 8b 45 08 mov 0x8(%ebp),%eax 111be0: 8b 4d 0c mov 0xc(%ebp),%ecx 111be3: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111be6: 39 05 a0 56 12 00 cmp %eax,0x1256a0 111bec: 76 22 jbe 111c10 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; 111bee: 8d 34 40 lea (%eax,%eax,2),%esi 111bf1: 8b 15 a4 56 12 00 mov 0x1256a4,%edx 111bf7: 8b 54 f2 14 mov 0x14(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111bfb: 85 d2 test %edx,%edx 111bfd: 74 1d je 111c1c 111bff: 89 5d 10 mov %ebx,0x10(%ebp) 111c02: 89 4d 0c mov %ecx,0xc(%ebp) 111c05: 89 45 08 mov %eax,0x8(%ebp) } 111c08: 5b pop %ebx 111c09: 5e pop %esi 111c0a: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111c0b: ff e2 jmp *%edx 111c0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111c10: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 111c15: 5b pop %ebx 111c16: 5e pop %esi 111c17: c9 leave 111c18: c3 ret 111c19: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111c1c: 31 c0 xor %eax,%eax } 111c1e: 5b pop %ebx 111c1f: 5e pop %esi 111c20: c9 leave 111c21: c3 ret 0010ffd8 : rtems_status_code rtems_io_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 10ffd8: 55 push %ebp 10ffd9: 89 e5 mov %esp,%ebp 10ffdb: 56 push %esi 10ffdc: 53 push %ebx 10ffdd: 8b 45 08 mov 0x8(%ebp),%eax 10ffe0: 8b 4d 0c mov 0xc(%ebp),%ecx 10ffe3: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 10ffe6: 39 05 a0 56 12 00 cmp %eax,0x1256a0 10ffec: 76 1e jbe 11000c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; 10ffee: 8d 34 40 lea (%eax,%eax,2),%esi 10fff1: 8b 15 a4 56 12 00 mov 0x1256a4,%edx 10fff7: 8b 14 f2 mov (%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 10fffa: 85 d2 test %edx,%edx 10fffc: 74 1a je 110018 10fffe: 89 5d 10 mov %ebx,0x10(%ebp) 110001: 89 4d 0c mov %ecx,0xc(%ebp) 110004: 89 45 08 mov %eax,0x8(%ebp) } 110007: 5b pop %ebx 110008: 5e pop %esi 110009: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11000a: ff e2 jmp *%edx void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 11000c: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 110011: 5b pop %ebx 110012: 5e pop %esi 110013: c9 leave 110014: c3 ret 110015: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 110018: 31 c0 xor %eax,%eax } 11001a: 5b pop %ebx 11001b: 5e pop %esi 11001c: c9 leave 11001d: c3 ret 00111c24 : rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 111c24: 55 push %ebp 111c25: 89 e5 mov %esp,%ebp 111c27: 56 push %esi 111c28: 53 push %ebx 111c29: 8b 45 08 mov 0x8(%ebp),%eax 111c2c: 8b 4d 0c mov 0xc(%ebp),%ecx 111c2f: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111c32: 39 05 a0 56 12 00 cmp %eax,0x1256a0 111c38: 76 22 jbe 111c5c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; 111c3a: 8d 34 40 lea (%eax,%eax,2),%esi 111c3d: 8b 15 a4 56 12 00 mov 0x1256a4,%edx 111c43: 8b 54 f2 04 mov 0x4(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111c47: 85 d2 test %edx,%edx 111c49: 74 1d je 111c68 111c4b: 89 5d 10 mov %ebx,0x10(%ebp) 111c4e: 89 4d 0c mov %ecx,0xc(%ebp) 111c51: 89 45 08 mov %eax,0x8(%ebp) } 111c54: 5b pop %ebx 111c55: 5e pop %esi 111c56: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111c57: ff e2 jmp *%edx 111c59: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111c5c: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 111c61: 5b pop %ebx 111c62: 5e pop %esi 111c63: c9 leave 111c64: c3 ret 111c65: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111c68: 31 c0 xor %eax,%eax } 111c6a: 5b pop %ebx 111c6b: 5e pop %esi 111c6c: c9 leave 111c6d: c3 ret 00111c70 : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 111c70: 55 push %ebp 111c71: 89 e5 mov %esp,%ebp 111c73: 56 push %esi 111c74: 53 push %ebx 111c75: 8b 45 08 mov 0x8(%ebp),%eax 111c78: 8b 4d 0c mov 0xc(%ebp),%ecx 111c7b: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111c7e: 39 05 a0 56 12 00 cmp %eax,0x1256a0 111c84: 76 22 jbe 111ca8 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; 111c86: 8d 34 40 lea (%eax,%eax,2),%esi 111c89: 8b 15 a4 56 12 00 mov 0x1256a4,%edx 111c8f: 8b 54 f2 0c mov 0xc(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111c93: 85 d2 test %edx,%edx 111c95: 74 1d je 111cb4 111c97: 89 5d 10 mov %ebx,0x10(%ebp) 111c9a: 89 4d 0c mov %ecx,0xc(%ebp) 111c9d: 89 45 08 mov %eax,0x8(%ebp) } 111ca0: 5b pop %ebx 111ca1: 5e pop %esi 111ca2: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111ca3: ff e2 jmp *%edx 111ca5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111ca8: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 111cad: 5b pop %ebx 111cae: 5e pop %esi 111caf: c9 leave 111cb0: c3 ret 111cb1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111cb4: 31 c0 xor %eax,%eax } 111cb6: 5b pop %ebx 111cb7: 5e pop %esi 111cb8: c9 leave 111cb9: c3 ret 0010d3c0 : rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 10d3c0: 55 push %ebp 10d3c1: 89 e5 mov %esp,%ebp 10d3c3: 57 push %edi 10d3c4: 56 push %esi 10d3c5: 53 push %ebx 10d3c6: 83 ec 0c sub $0xc,%esp 10d3c9: 8b 5d 08 mov 0x8(%ebp),%ebx 10d3cc: 8b 75 0c mov 0xc(%ebp),%esi 10d3cf: 8b 55 10 mov 0x10(%ebp),%edx rtems_device_major_number major_limit = _IO_Number_of_drivers; 10d3d2: a1 80 b9 12 00 mov 0x12b980,%eax if ( rtems_interrupt_is_in_progress() ) 10d3d7: 8b 0d 74 b6 12 00 mov 0x12b674,%ecx 10d3dd: 85 c9 test %ecx,%ecx 10d3df: 0f 85 ab 00 00 00 jne 10d490 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 10d3e5: 85 d2 test %edx,%edx 10d3e7: 0f 84 e3 00 00 00 je 10d4d0 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 10d3ed: 89 02 mov %eax,(%edx) if ( driver_table == NULL ) 10d3ef: 85 f6 test %esi,%esi 10d3f1: 0f 84 d9 00 00 00 je 10d4d0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d3f7: 8b 3e mov (%esi),%edi 10d3f9: 85 ff test %edi,%edi 10d3fb: 0f 84 c3 00 00 00 je 10d4c4 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10d401: 39 d8 cmp %ebx,%eax 10d403: 76 7b jbe 10d480 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d405: a1 d8 b5 12 00 mov 0x12b5d8,%eax 10d40a: 40 inc %eax 10d40b: a3 d8 b5 12 00 mov %eax,0x12b5d8 return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 10d410: 85 db test %ebx,%ebx 10d412: 0f 85 88 00 00 00 jne 10d4a0 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 10d418: 8b 0d 80 b9 12 00 mov 0x12b980,%ecx rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 10d41e: 85 c9 test %ecx,%ecx 10d420: 0f 84 b7 00 00 00 je 10d4dd 10d426: 8b 3d 84 b9 12 00 mov 0x12b984,%edi 10d42c: 89 f8 mov %edi,%eax 10d42e: eb 08 jmp 10d438 10d430: 43 inc %ebx 10d431: 83 c0 18 add $0x18,%eax 10d434: 39 d9 cmp %ebx,%ecx 10d436: 76 0b jbe 10d443 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d438: 83 38 00 cmpl $0x0,(%eax) 10d43b: 75 f3 jne 10d430 10d43d: 83 78 04 00 cmpl $0x0,0x4(%eax) 10d441: 75 ed jne 10d430 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10d443: 89 1a mov %ebx,(%edx) if ( m != n ) 10d445: 39 d9 cmp %ebx,%ecx 10d447: 0f 84 97 00 00 00 je 10d4e4 10d44d: 8d 04 5b lea (%ebx,%ebx,2),%eax 10d450: 8d 04 c7 lea (%edi,%eax,8),%eax } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 10d453: b9 06 00 00 00 mov $0x6,%ecx 10d458: 89 c7 mov %eax,%edi 10d45a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10d45c: e8 37 19 00 00 call 10ed98 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 10d461: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10d468: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10d46f: 89 5d 08 mov %ebx,0x8(%ebp) } 10d472: 83 c4 0c add $0xc,%esp 10d475: 5b pop %ebx 10d476: 5e pop %esi 10d477: 5f pop %edi 10d478: c9 leave _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10d479: e9 3a 7a 00 00 jmp 114eb8 10d47e: 66 90 xchg %ax,%ax <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10d480: b8 0a 00 00 00 mov $0xa,%eax _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 10d485: 83 c4 0c add $0xc,%esp 10d488: 5b pop %ebx 10d489: 5e pop %esi 10d48a: 5f pop %edi 10d48b: c9 leave 10d48c: c3 ret 10d48d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 10d490: b8 12 00 00 00 mov $0x12,%eax _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 10d495: 83 c4 0c add $0xc,%esp 10d498: 5b pop %ebx 10d499: 5e pop %esi 10d49a: 5f pop %edi 10d49b: c9 leave 10d49c: c3 ret 10d49d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 10d4a0: 8d 04 5b lea (%ebx,%ebx,2),%eax 10d4a3: c1 e0 03 shl $0x3,%eax 10d4a6: 03 05 84 b9 12 00 add 0x12b984,%eax static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d4ac: 8b 38 mov (%eax),%edi 10d4ae: 85 ff test %edi,%edi 10d4b0: 74 3e je 10d4f0 major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); 10d4b2: e8 e1 18 00 00 call 10ed98 <_Thread_Enable_dispatch> 10d4b7: b8 0c 00 00 00 mov $0xc,%eax _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 10d4bc: 83 c4 0c add $0xc,%esp 10d4bf: 5b pop %ebx 10d4c0: 5e pop %esi 10d4c1: 5f pop %edi 10d4c2: c9 leave 10d4c3: c3 ret static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d4c4: 8b 4e 04 mov 0x4(%esi),%ecx 10d4c7: 85 c9 test %ecx,%ecx 10d4c9: 0f 85 32 ff ff ff jne 10d401 10d4cf: 90 nop _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10d4d0: b8 09 00 00 00 mov $0x9,%eax } 10d4d5: 83 c4 0c add $0xc,%esp 10d4d8: 5b pop %ebx 10d4d9: 5e pop %esi 10d4da: 5f pop %edi 10d4db: c9 leave 10d4dc: c3 ret if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10d4dd: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED 10d4e3: 90 nop <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 10d4e4: e8 af 18 00 00 call 10ed98 <_Thread_Enable_dispatch> 10d4e9: b8 05 00 00 00 mov $0x5,%eax return sc; 10d4ee: eb 95 jmp 10d485 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d4f0: 8b 48 04 mov 0x4(%eax),%ecx 10d4f3: 85 c9 test %ecx,%ecx 10d4f5: 75 bb jne 10d4b2 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 10d4f7: 89 1a mov %ebx,(%edx) 10d4f9: e9 55 ff ff ff jmp 10d453 0010d500 : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 10d500: 55 push %ebp 10d501: 89 e5 mov %esp,%ebp 10d503: 57 push %edi 10d504: 83 ec 04 sub $0x4,%esp 10d507: 8b 45 08 mov 0x8(%ebp),%eax if ( rtems_interrupt_is_in_progress() ) 10d50a: 8b 15 74 b6 12 00 mov 0x12b674,%edx 10d510: 85 d2 test %edx,%edx 10d512: 75 44 jne 10d558 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 10d514: 39 05 80 b9 12 00 cmp %eax,0x12b980 10d51a: 77 0c ja 10d528 10d51c: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d521: 5a pop %edx 10d522: 5f pop %edi 10d523: c9 leave 10d524: c3 ret 10d525: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10d528: 8b 15 d8 b5 12 00 mov 0x12b5d8,%edx 10d52e: 42 inc %edx 10d52f: 89 15 d8 b5 12 00 mov %edx,0x12b5d8 if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( 10d535: 8d 14 40 lea (%eax,%eax,2),%edx 10d538: c1 e2 03 shl $0x3,%edx 10d53b: 03 15 84 b9 12 00 add 0x12b984,%edx 10d541: b9 18 00 00 00 mov $0x18,%ecx 10d546: 31 c0 xor %eax,%eax 10d548: 89 d7 mov %edx,%edi 10d54a: f3 aa rep stos %al,%es:(%edi) &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 10d54c: e8 47 18 00 00 call 10ed98 <_Thread_Enable_dispatch> 10d551: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d553: 5a pop %edx 10d554: 5f pop %edi 10d555: c9 leave 10d556: c3 ret 10d557: 90 nop <== NOT EXECUTED rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { if ( rtems_interrupt_is_in_progress() ) 10d558: b8 12 00 00 00 mov $0x12,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d55d: 5a pop %edx 10d55e: 5f pop %edi 10d55f: c9 leave 10d560: c3 ret 00111cbc : rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 111cbc: 55 push %ebp 111cbd: 89 e5 mov %esp,%ebp 111cbf: 56 push %esi 111cc0: 53 push %ebx 111cc1: 8b 45 08 mov 0x8(%ebp),%eax 111cc4: 8b 4d 0c mov 0xc(%ebp),%ecx 111cc7: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111cca: 39 05 a0 56 12 00 cmp %eax,0x1256a0 111cd0: 76 22 jbe 111cf4 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; 111cd2: 8d 34 40 lea (%eax,%eax,2),%esi 111cd5: 8b 15 a4 56 12 00 mov 0x1256a4,%edx 111cdb: 8b 54 f2 10 mov 0x10(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111cdf: 85 d2 test %edx,%edx 111ce1: 74 1d je 111d00 111ce3: 89 5d 10 mov %ebx,0x10(%ebp) 111ce6: 89 4d 0c mov %ecx,0xc(%ebp) 111ce9: 89 45 08 mov %eax,0x8(%ebp) } 111cec: 5b pop %ebx 111ced: 5e pop %esi 111cee: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111cef: ff e2 jmp *%edx 111cf1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111cf4: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 111cf9: 5b pop %ebx 111cfa: 5e pop %esi 111cfb: c9 leave 111cfc: c3 ret 111cfd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111d00: 31 c0 xor %eax,%eax } 111d02: 5b pop %ebx 111d03: 5e pop %esi 111d04: c9 leave 111d05: c3 ret 00115f50 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 115f50: 55 push %ebp 115f51: 89 e5 mov %esp,%ebp 115f53: 57 push %edi 115f54: 56 push %esi 115f55: 53 push %ebx 115f56: 83 ec 1c sub $0x1c,%esp 115f59: 8b 7d 08 mov 0x8(%ebp),%edi 115f5c: 8b 5d 0c mov 0xc(%ebp),%ebx 115f5f: 8b 75 14 mov 0x14(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer ) 115f62: 85 db test %ebx,%ebx 115f64: 74 62 je 115fc8 return RTEMS_INVALID_ADDRESS; if ( !count ) 115f66: 85 f6 test %esi,%esi 115f68: 74 5e je 115fc8 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 115f6a: 51 push %ecx 115f6b: 8d 45 e4 lea -0x1c(%ebp),%eax 115f6e: 50 push %eax 115f6f: 57 push %edi 115f70: 68 40 fa 13 00 push $0x13fa40 115f75: e8 ea 4b 00 00 call 11ab64 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 115f7a: 83 c4 10 add $0x10,%esp 115f7d: 8b 55 e4 mov -0x1c(%ebp),%edx 115f80: 85 d2 test %edx,%edx 115f82: 74 10 je 115f94 115f84: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115f89: 8d 65 f4 lea -0xc(%ebp),%esp 115f8c: 5b pop %ebx 115f8d: 5e pop %esi 115f8e: 5f pop %edi 115f8f: c9 leave 115f90: c3 ret 115f91: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( 115f94: 83 ec 08 sub $0x8,%esp 115f97: 56 push %esi 115f98: 6a 00 push $0x0 115f9a: 57 push %edi 115f9b: ff 75 10 pushl 0x10(%ebp) 115f9e: 53 push %ebx 115f9f: 83 c0 14 add $0x14,%eax 115fa2: 50 push %eax 115fa3: e8 88 34 00 00 call 119430 <_CORE_message_queue_Broadcast> 115fa8: 89 c3 mov %eax,%ebx NULL, #endif count ); _Thread_Enable_dispatch(); 115faa: 83 c4 20 add $0x20,%esp 115fad: e8 62 54 00 00 call 11b414 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( core_status ); 115fb2: 83 ec 0c sub $0xc,%esp 115fb5: 53 push %ebx 115fb6: e8 69 03 00 00 call 116324 <_Message_queue_Translate_core_message_queue_return_code> #endif count ); _Thread_Enable_dispatch(); return 115fbb: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115fbe: 8d 65 f4 lea -0xc(%ebp),%esp 115fc1: 5b pop %ebx 115fc2: 5e pop %esi 115fc3: 5f pop %edi 115fc4: c9 leave 115fc5: c3 ret 115fc6: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif count ); _Thread_Enable_dispatch(); return 115fc8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115fcd: 8d 65 f4 lea -0xc(%ebp),%esp 115fd0: 5b pop %ebx 115fd1: 5e pop %esi 115fd2: 5f pop %edi 115fd3: c9 leave 115fd4: c3 ret 00113a24 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { 113a24: 55 push %ebp 113a25: 89 e5 mov %esp,%ebp 113a27: 57 push %edi 113a28: 56 push %esi 113a29: 53 push %ebx 113a2a: 83 ec 2c sub $0x2c,%esp 113a2d: 8b 5d 08 mov 0x8(%ebp),%ebx 113a30: 8b 75 0c mov 0xc(%ebp),%esi 113a33: 8b 4d 10 mov 0x10(%ebp),%ecx 113a36: 8b 7d 18 mov 0x18(%ebp),%edi CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) 113a39: 85 db test %ebx,%ebx 113a3b: 74 2f je 113a6c return RTEMS_INVALID_NAME; if ( !id ) 113a3d: 85 ff test %edi,%edi 113a3f: 0f 84 a3 00 00 00 je 113ae8 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 113a45: 85 f6 test %esi,%esi 113a47: 74 13 je 113a5c return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 113a49: 85 c9 test %ecx,%ecx 113a4b: 75 2f jne 113a7c 113a4d: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113a52: 8d 65 f4 lea -0xc(%ebp),%esp 113a55: 5b pop %ebx 113a56: 5e pop %esi 113a57: 5f pop %edi 113a58: c9 leave 113a59: c3 ret 113a5a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 113a5c: b8 0a 00 00 00 mov $0xa,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113a61: 8d 65 f4 lea -0xc(%ebp),%esp 113a64: 5b pop %ebx 113a65: 5e pop %esi 113a66: 5f pop %edi 113a67: c9 leave 113a68: c3 ret 113a69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) 113a6c: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113a71: 8d 65 f4 lea -0xc(%ebp),%esp 113a74: 5b pop %ebx 113a75: 5e pop %esi 113a76: 5f pop %edi 113a77: c9 leave 113a78: c3 ret 113a79: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 113a7c: a1 d8 f9 12 00 mov 0x12f9d8,%eax 113a81: 40 inc %eax 113a82: a3 d8 f9 12 00 mov %eax,0x12f9d8 #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 113a87: 89 4d d4 mov %ecx,-0x2c(%ebp) 113a8a: e8 41 50 00 00 call 118ad0 <_Message_queue_Allocate> 113a8f: 89 c2 mov %eax,%edx if ( !the_message_queue ) { 113a91: 85 c0 test %eax,%eax 113a93: 8b 4d d4 mov -0x2c(%ebp),%ecx 113a96: 74 7c je 113b14 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 113a98: 8b 45 14 mov 0x14(%ebp),%eax 113a9b: 89 42 10 mov %eax,0x10(%edx) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 113a9e: a8 04 test $0x4,%al 113aa0: 0f 95 c0 setne %al 113aa3: 0f b6 c0 movzbl %al,%eax 113aa6: 89 45 e4 mov %eax,-0x1c(%ebp) else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 113aa9: 51 push %ecx 113aaa: 56 push %esi 113aab: 8d 45 e4 lea -0x1c(%ebp),%eax 113aae: 50 push %eax 113aaf: 8d 42 14 lea 0x14(%edx),%eax 113ab2: 50 push %eax 113ab3: 89 55 d4 mov %edx,-0x2c(%ebp) 113ab6: e8 a5 10 00 00 call 114b60 <_CORE_message_queue_Initialize> 113abb: 83 c4 10 add $0x10,%esp 113abe: 84 c0 test %al,%al 113ac0: 8b 55 d4 mov -0x2c(%ebp),%edx 113ac3: 75 2f jne 113af4 */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 113ac5: 83 ec 08 sub $0x8,%esp 113ac8: 52 push %edx 113ac9: 68 a0 fc 12 00 push $0x12fca0 113ace: e8 e1 1d 00 00 call 1158b4 <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 113ad3: e8 d4 27 00 00 call 1162ac <_Thread_Enable_dispatch> 113ad8: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 113add: 83 c4 10 add $0x10,%esp 113ae0: e9 6d ff ff ff jmp 113a52 113ae5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 113ae8: b8 09 00 00 00 mov $0x9,%eax 113aed: e9 60 ff ff ff jmp 113a52 113af2: 66 90 xchg %ax,%ax <== NOT EXECUTED #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 113af4: 8b 42 08 mov 0x8(%edx),%eax 113af7: 0f b7 f0 movzwl %ax,%esi 113afa: 8b 0d bc fc 12 00 mov 0x12fcbc,%ecx 113b00: 89 14 b1 mov %edx,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 113b03: 89 5a 0c mov %ebx,0xc(%edx) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 113b06: 89 07 mov %eax,(%edi) name, 0 ); #endif _Thread_Enable_dispatch(); 113b08: e8 9f 27 00 00 call 1162ac <_Thread_Enable_dispatch> 113b0d: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 113b0f: e9 3e ff ff ff jmp 113a52 _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); if ( !the_message_queue ) { _Thread_Enable_dispatch(); 113b14: e8 93 27 00 00 call 1162ac <_Thread_Enable_dispatch> 113b19: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 113b1e: e9 2f ff ff ff jmp 113a52 0011716c : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 11716c: 55 push %ebp 11716d: 89 e5 mov %esp,%ebp 11716f: 53 push %ebx 117170: 83 ec 18 sub $0x18,%esp 117173: 8d 45 f4 lea -0xc(%ebp),%eax 117176: 50 push %eax 117177: ff 75 08 pushl 0x8(%ebp) 11717a: 68 20 3d 13 00 push $0x133d20 11717f: e8 fc a6 ff ff call 111880 <_Objects_Get> 117184: 89 c3 mov %eax,%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 117186: 83 c4 10 add $0x10,%esp 117189: 8b 4d f4 mov -0xc(%ebp),%ecx 11718c: 85 c9 test %ecx,%ecx 11718e: 75 3c jne 1171cc case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 117190: 83 ec 08 sub $0x8,%esp 117193: 50 push %eax 117194: 68 20 3d 13 00 push $0x133d20 117199: e8 ae a2 ff ff call 11144c <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 11719e: 83 c4 0c add $0xc,%esp 1171a1: 6a 05 push $0x5 1171a3: 6a 00 push $0x0 1171a5: 8d 43 14 lea 0x14(%ebx),%eax 1171a8: 50 push %eax 1171a9: e8 0e 05 00 00 call 1176bc <_CORE_message_queue_Close> */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 1171ae: 58 pop %eax 1171af: 5a pop %edx 1171b0: 53 push %ebx 1171b1: 68 20 3d 13 00 push $0x133d20 1171b6: e8 95 a5 ff ff call 111750 <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 1171bb: e8 70 af ff ff call 112130 <_Thread_Enable_dispatch> 1171c0: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1171c2: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1171c5: 8b 5d fc mov -0x4(%ebp),%ebx 1171c8: c9 leave 1171c9: c3 ret 1171ca: 66 90 xchg %ax,%ax <== NOT EXECUTED { register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 1171cc: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1171d1: 8b 5d fc mov -0x4(%ebp),%ebx 1171d4: c9 leave 1171d5: c3 ret 00116144 : rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { 116144: 55 push %ebp 116145: 89 e5 mov %esp,%ebp 116147: 53 push %ebx 116148: 83 ec 14 sub $0x14,%esp 11614b: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 11614e: 85 db test %ebx,%ebx 116150: 74 46 je 116198 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 116152: 51 push %ecx 116153: 8d 45 f4 lea -0xc(%ebp),%eax 116156: 50 push %eax 116157: ff 75 08 pushl 0x8(%ebp) 11615a: 68 40 fa 13 00 push $0x13fa40 11615f: e8 00 4a 00 00 call 11ab64 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 116164: 83 c4 10 add $0x10,%esp 116167: 8b 55 f4 mov -0xc(%ebp),%edx 11616a: 85 d2 test %edx,%edx 11616c: 74 0a je 116178 11616e: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116173: 8b 5d fc mov -0x4(%ebp),%ebx 116176: c9 leave 116177: c3 ret the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *count = _CORE_message_queue_Flush( &the_message_queue->message_queue ); 116178: 83 ec 0c sub $0xc,%esp 11617b: 83 c0 14 add $0x14,%eax 11617e: 50 push %eax 11617f: e8 6c 33 00 00 call 1194f0 <_CORE_message_queue_Flush> 116184: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 116186: e8 89 52 00 00 call 11b414 <_Thread_Enable_dispatch> 11618b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11618d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116190: 8b 5d fc mov -0x4(%ebp),%ebx 116193: c9 leave 116194: c3 ret 116195: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116198: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11619d: 8b 5d fc mov -0x4(%ebp),%ebx 1161a0: c9 leave 1161a1: c3 ret 001161a4 : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { 1161a4: 55 push %ebp 1161a5: 89 e5 mov %esp,%ebp 1161a7: 53 push %ebx 1161a8: 83 ec 14 sub $0x14,%esp 1161ab: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 1161ae: 85 db test %ebx,%ebx 1161b0: 74 3a je 1161ec 1161b2: 51 push %ecx 1161b3: 8d 45 f4 lea -0xc(%ebp),%eax 1161b6: 50 push %eax 1161b7: ff 75 08 pushl 0x8(%ebp) 1161ba: 68 40 fa 13 00 push $0x13fa40 1161bf: e8 a0 49 00 00 call 11ab64 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 1161c4: 83 c4 10 add $0x10,%esp 1161c7: 8b 55 f4 mov -0xc(%ebp),%edx 1161ca: 85 d2 test %edx,%edx 1161cc: 74 0a je 1161d8 1161ce: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1161d3: 8b 5d fc mov -0x4(%ebp),%ebx 1161d6: c9 leave 1161d7: c3 ret the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages; 1161d8: 8b 40 5c mov 0x5c(%eax),%eax 1161db: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 1161dd: e8 32 52 00 00 call 11b414 <_Thread_Enable_dispatch> 1161e2: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1161e4: 8b 5d fc mov -0x4(%ebp),%ebx 1161e7: c9 leave 1161e8: c3 ret 1161e9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 1161ec: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1161f1: 8b 5d fc mov -0x4(%ebp),%ebx 1161f4: c9 leave 1161f5: c3 ret 00113b48 : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 113b48: 55 push %ebp 113b49: 89 e5 mov %esp,%ebp 113b4b: 56 push %esi 113b4c: 53 push %ebx 113b4d: 83 ec 10 sub $0x10,%esp 113b50: 8b 5d 0c mov 0xc(%ebp),%ebx 113b53: 8b 75 10 mov 0x10(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 113b56: 85 db test %ebx,%ebx 113b58: 74 6e je 113bc8 return RTEMS_INVALID_ADDRESS; if ( !size ) 113b5a: 85 f6 test %esi,%esi 113b5c: 74 6a je 113bc8 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 113b5e: 51 push %ecx 113b5f: 8d 45 f4 lea -0xc(%ebp),%eax 113b62: 50 push %eax 113b63: ff 75 08 pushl 0x8(%ebp) 113b66: 68 a0 fc 12 00 push $0x12fca0 113b6b: e8 74 1e 00 00 call 1159e4 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 113b70: 83 c4 10 add $0x10,%esp 113b73: 8b 55 f4 mov -0xc(%ebp),%edx 113b76: 85 d2 test %edx,%edx 113b78: 75 42 jne 113bbc if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 113b7a: 83 ec 08 sub $0x8,%esp 113b7d: ff 75 18 pushl 0x18(%ebp) 113b80: 8b 55 14 mov 0x14(%ebp),%edx 113b83: 83 e2 01 and $0x1,%edx 113b86: 83 f2 01 xor $0x1,%edx 113b89: 52 push %edx 113b8a: 56 push %esi 113b8b: 53 push %ebx 113b8c: ff 70 08 pushl 0x8(%eax) 113b8f: 83 c0 14 add $0x14,%eax 113b92: 50 push %eax 113b93: e8 78 10 00 00 call 114c10 <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 113b98: 83 c4 20 add $0x20,%esp 113b9b: e8 0c 27 00 00 call 1162ac <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 113ba0: 83 ec 0c sub $0xc,%esp 113ba3: a1 98 fa 12 00 mov 0x12fa98,%eax 113ba8: ff 70 34 pushl 0x34(%eax) 113bab: e8 a0 00 00 00 call 113c50 <_Message_queue_Translate_core_message_queue_return_code> 113bb0: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113bb3: 8d 65 f8 lea -0x8(%ebp),%esp 113bb6: 5b pop %ebx 113bb7: 5e pop %esi 113bb8: c9 leave 113bb9: c3 ret 113bba: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !size ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 113bbc: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113bc1: 8d 65 f8 lea -0x8(%ebp),%esp 113bc4: 5b pop %ebx 113bc5: 5e pop %esi 113bc6: c9 leave 113bc7: c3 ret size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 113bc8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113bcd: 8d 65 f8 lea -0x8(%ebp),%esp 113bd0: 5b pop %ebx 113bd1: 5e pop %esi 113bd2: c9 leave 113bd3: c3 ret 0010b29c : rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { 10b29c: 55 push %ebp 10b29d: 89 e5 mov %esp,%ebp 10b29f: 56 push %esi 10b2a0: 53 push %ebx 10b2a1: 83 ec 10 sub $0x10,%esp 10b2a4: 8b 75 08 mov 0x8(%ebp),%esi 10b2a7: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10b2aa: 85 db test %ebx,%ebx 10b2ac: 74 5e je 10b30c RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 10b2ae: 51 push %ecx 10b2af: 8d 45 f4 lea -0xc(%ebp),%eax 10b2b2: 50 push %eax 10b2b3: 56 push %esi 10b2b4: 68 20 56 12 00 push $0x125620 10b2b9: e8 f2 18 00 00 call 10cbb0 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 10b2be: 83 c4 10 add $0x10,%esp 10b2c1: 8b 55 f4 mov -0xc(%ebp),%edx 10b2c4: 85 d2 test %edx,%edx 10b2c6: 74 0c je 10b2d4 10b2c8: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b2cd: 8d 65 f8 lea -0x8(%ebp),%esp 10b2d0: 5b pop %ebx 10b2d1: 5e pop %esi 10b2d2: c9 leave 10b2d3: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 10b2d4: 6a 00 push $0x0 10b2d6: 6a 00 push $0x0 10b2d8: 68 ff ff ff 7f push $0x7fffffff 10b2dd: 6a 00 push $0x0 10b2df: 56 push %esi 10b2e0: ff 75 10 pushl 0x10(%ebp) 10b2e3: 53 push %ebx 10b2e4: 83 c0 14 add $0x14,%eax 10b2e7: 50 push %eax 10b2e8: e8 c7 0b 00 00 call 10beb4 <_CORE_message_queue_Submit> 10b2ed: 89 c3 mov %eax,%ebx MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 10b2ef: 83 c4 20 add $0x20,%esp 10b2f2: e8 01 21 00 00 call 10d3f8 <_Thread_Enable_dispatch> /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); 10b2f7: 83 ec 0c sub $0xc,%esp 10b2fa: 53 push %ebx 10b2fb: e8 18 00 00 00 call 10b318 <_Message_queue_Translate_core_message_queue_return_code> 10b300: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b303: 8d 65 f8 lea -0x8(%ebp),%esp 10b306: 5b pop %ebx 10b307: 5e pop %esi 10b308: c9 leave 10b309: c3 ret 10b30a: 66 90 xchg %ax,%ax <== NOT EXECUTED { register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10b30c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b311: 8d 65 f8 lea -0x8(%ebp),%esp 10b314: 5b pop %ebx 10b315: 5e pop %esi 10b316: c9 leave 10b317: c3 ret 00116334 : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { 116334: 55 push %ebp 116335: 89 e5 mov %esp,%ebp 116337: 56 push %esi 116338: 53 push %ebx 116339: 83 ec 10 sub $0x10,%esp 11633c: 8b 75 08 mov 0x8(%ebp),%esi 11633f: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 116342: 85 db test %ebx,%ebx 116344: 74 5e je 1163a4 116346: 51 push %ecx 116347: 8d 45 f4 lea -0xc(%ebp),%eax 11634a: 50 push %eax 11634b: 56 push %esi 11634c: 68 40 fa 13 00 push $0x13fa40 116351: e8 0e 48 00 00 call 11ab64 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 116356: 83 c4 10 add $0x10,%esp 116359: 8b 55 f4 mov -0xc(%ebp),%edx 11635c: 85 d2 test %edx,%edx 11635e: 74 0c je 11636c 116360: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116365: 8d 65 f8 lea -0x8(%ebp),%esp 116368: 5b pop %ebx 116369: 5e pop %esi 11636a: c9 leave 11636b: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 11636c: 6a 00 push $0x0 11636e: 6a 00 push $0x0 116370: 68 00 00 00 80 push $0x80000000 116375: 6a 00 push $0x0 116377: 56 push %esi 116378: ff 75 10 pushl 0x10(%ebp) 11637b: 53 push %ebx 11637c: 83 c0 14 add $0x14,%eax 11637f: 50 push %eax 116380: e8 5b 33 00 00 call 1196e0 <_CORE_message_queue_Submit> 116385: 89 c3 mov %eax,%ebx id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 116387: 83 c4 20 add $0x20,%esp 11638a: e8 85 50 00 00 call 11b414 <_Thread_Enable_dispatch> /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); 11638f: 83 ec 0c sub $0xc,%esp 116392: 53 push %ebx 116393: e8 8c ff ff ff call 116324 <_Message_queue_Translate_core_message_queue_return_code> 116398: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11639b: 8d 65 f8 lea -0x8(%ebp),%esp 11639e: 5b pop %ebx 11639f: 5e pop %esi 1163a0: c9 leave 1163a1: c3 ret 1163a2: 66 90 xchg %ax,%ax <== NOT EXECUTED { register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 1163a4: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1163a9: 8d 65 f8 lea -0x8(%ebp),%esp 1163ac: 5b pop %ebx 1163ad: 5e pop %esi 1163ae: c9 leave 1163af: c3 ret 0010ccbc : const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 10ccbc: 55 push %ebp 10ccbd: 89 e5 mov %esp,%ebp 10ccbf: 83 ec 08 sub $0x8,%esp 10ccc2: 8b 45 08 mov 0x8(%ebp),%eax const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 10ccc5: 83 f8 01 cmp $0x1,%eax 10ccc8: 74 2a je 10ccf4 api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 10ccca: 83 f8 02 cmp $0x2,%eax 10cccd: 74 09 je 10ccd8 10cccf: b8 f7 2c 12 00 mov $0x122cf7,%eax return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; } 10ccd4: c9 leave 10ccd5: c3 ret 10ccd6: 66 90 xchg %ax,%ax <== NOT EXECUTED const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 10ccd8: b8 60 70 12 00 mov $0x127060,%eax else if ( the_api == OBJECTS_ITRON_API ) api_assoc = rtems_object_api_itron_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); 10ccdd: 83 ec 08 sub $0x8,%esp 10cce0: ff 75 0c pushl 0xc(%ebp) 10cce3: 50 push %eax 10cce4: e8 ab 48 00 00 call 111594 if ( class_assoc ) 10cce9: 83 c4 10 add $0x10,%esp 10ccec: 85 c0 test %eax,%eax 10ccee: 74 0c je 10ccfc return class_assoc->name; 10ccf0: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10ccf2: c9 leave 10ccf3: c3 ret ) { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 10ccf4: b8 40 70 12 00 mov $0x127040,%eax 10ccf9: eb e2 jmp 10ccdd 10ccfb: 90 nop <== NOT EXECUTED api_assoc = rtems_object_api_itron_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) 10ccfc: b8 ff 2c 12 00 mov $0x122cff,%eax return class_assoc->name; return "BAD CLASS"; } 10cd01: c9 leave 10cd02: c3 ret 0010cd04 : }; const char *rtems_object_get_api_name( int api ) { 10cd04: 55 push %ebp 10cd05: 89 e5 mov %esp,%ebp 10cd07: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); 10cd0a: ff 75 08 pushl 0x8(%ebp) 10cd0d: 68 e0 70 12 00 push $0x1270e0 10cd12: e8 7d 48 00 00 call 111594 if ( api_assoc ) 10cd17: 83 c4 10 add $0x10,%esp 10cd1a: 85 c0 test %eax,%eax 10cd1c: 74 06 je 10cd24 return api_assoc->name; 10cd1e: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10cd20: c9 leave 10cd21: c3 ret 10cd22: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); if ( api_assoc ) 10cd24: b8 ff 2c 12 00 mov $0x122cff,%eax return api_assoc->name; return "BAD CLASS"; } 10cd29: c9 leave 10cd2a: c3 ret 0010cd6c : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 10cd6c: 55 push %ebp 10cd6d: 89 e5 mov %esp,%ebp 10cd6f: 57 push %edi 10cd70: 56 push %esi 10cd71: 53 push %ebx 10cd72: 83 ec 0c sub $0xc,%esp 10cd75: 8b 5d 10 mov 0x10(%ebp),%ebx int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10cd78: 85 db test %ebx,%ebx 10cd7a: 74 5c je 10cdd8 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 10cd7c: 83 ec 08 sub $0x8,%esp 10cd7f: ff 75 0c pushl 0xc(%ebp) 10cd82: ff 75 08 pushl 0x8(%ebp) 10cd85: e8 d2 19 00 00 call 10e75c <_Objects_Get_information> if ( !obj_info ) 10cd8a: 83 c4 10 add $0x10,%esp 10cd8d: 85 c0 test %eax,%eax 10cd8f: 74 57 je 10cde8 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 10cd91: 8b 50 08 mov 0x8(%eax),%edx 10cd94: 89 13 mov %edx,(%ebx) info->maximum_id = obj_info->maximum_id; 10cd96: 8b 50 0c mov 0xc(%eax),%edx 10cd99: 89 53 04 mov %edx,0x4(%ebx) info->auto_extend = obj_info->auto_extend; 10cd9c: 8a 50 12 mov 0x12(%eax),%dl 10cd9f: 88 53 0c mov %dl,0xc(%ebx) info->maximum = obj_info->maximum; 10cda2: 0f b7 70 10 movzwl 0x10(%eax),%esi 10cda6: 89 73 08 mov %esi,0x8(%ebx) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10cda9: 85 f6 test %esi,%esi 10cdab: 74 3f je 10cdec 10cdad: 8b 78 1c mov 0x1c(%eax),%edi 10cdb0: b9 01 00 00 00 mov $0x1,%ecx 10cdb5: b8 01 00 00 00 mov $0x1,%eax 10cdba: 31 d2 xor %edx,%edx if ( !obj_info->local_table[i] ) unallocated++; 10cdbc: 83 3c 8f 01 cmpl $0x1,(%edi,%ecx,4) 10cdc0: 83 d2 00 adc $0x0,%edx info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10cdc3: 40 inc %eax 10cdc4: 89 c1 mov %eax,%ecx 10cdc6: 39 c6 cmp %eax,%esi 10cdc8: 73 f2 jae 10cdbc if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 10cdca: 89 53 10 mov %edx,0x10(%ebx) 10cdcd: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10cdcf: 8d 65 f4 lea -0xc(%ebp),%esp 10cdd2: 5b pop %ebx 10cdd3: 5e pop %esi 10cdd4: 5f pop %edi 10cdd5: c9 leave 10cdd6: c3 ret 10cdd7: 90 nop <== NOT EXECUTED int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10cdd8: b8 09 00 00 00 mov $0x9,%eax unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 10cddd: 8d 65 f4 lea -0xc(%ebp),%esp 10cde0: 5b pop %ebx 10cde1: 5e pop %esi 10cde2: 5f pop %edi 10cde3: c9 leave 10cde4: c3 ret 10cde5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) 10cde8: b0 0a mov $0xa,%al 10cdea: eb e3 jmp 10cdcf info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10cdec: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cdee: eb da jmp 10cdca <== NOT EXECUTED 0010fcb0 : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { 10fcb0: 55 push %ebp 10fcb1: 89 e5 mov %esp,%ebp 10fcb3: 53 push %ebx 10fcb4: 83 ec 14 sub $0x14,%esp 10fcb7: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10fcba: 85 db test %ebx,%ebx 10fcbc: 74 26 je 10fce4 return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); 10fcbe: 83 ec 08 sub $0x8,%esp 10fcc1: 8d 45 f4 lea -0xc(%ebp),%eax 10fcc4: 50 push %eax 10fcc5: ff 75 08 pushl 0x8(%ebp) 10fcc8: e8 1b 1c 00 00 call 1118e8 <_Objects_Id_to_name> *name = name_u.name_u32; 10fccd: 8b 55 f4 mov -0xc(%ebp),%edx 10fcd0: 89 13 mov %edx,(%ebx) return _Status_Object_name_errors_to_status[ status ]; 10fcd2: 8b 04 85 ec ab 12 00 mov 0x12abec(,%eax,4),%eax 10fcd9: 83 c4 10 add $0x10,%esp } 10fcdc: 8b 5d fc mov -0x4(%ebp),%ebx 10fcdf: c9 leave 10fce0: c3 ret 10fce1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10fce4: b8 09 00 00 00 mov $0x9,%eax status = _Objects_Id_to_name( id, &name_u ); *name = name_u.name_u32; return _Status_Object_name_errors_to_status[ status ]; } 10fce9: 8b 5d fc mov -0x4(%ebp),%ebx 10fcec: c9 leave 10fced: c3 ret 0010ce48 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 10ce48: 55 push %ebp 10ce49: 89 e5 mov %esp,%ebp 10ce4b: 57 push %edi 10ce4c: 56 push %esi 10ce4d: 53 push %ebx 10ce4e: 83 ec 1c sub $0x1c,%esp 10ce51: 8b 75 08 mov 0x8(%ebp),%esi 10ce54: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10ce57: 85 ff test %edi,%edi 10ce59: 74 61 je 10cebc return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10ce5b: 85 f6 test %esi,%esi 10ce5d: 74 35 je 10ce94 information = _Objects_Get_information_id( tmpId ); 10ce5f: 83 ec 0c sub $0xc,%esp 10ce62: 56 push %esi 10ce63: e8 d4 18 00 00 call 10e73c <_Objects_Get_information_id> 10ce68: 89 c3 mov %eax,%ebx if ( !information ) 10ce6a: 83 c4 10 add $0x10,%esp 10ce6d: 85 c0 test %eax,%eax 10ce6f: 74 16 je 10ce87 return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10ce71: 50 push %eax 10ce72: 8d 45 e4 lea -0x1c(%ebp),%eax 10ce75: 50 push %eax 10ce76: 56 push %esi 10ce77: 53 push %ebx 10ce78: e8 43 1a 00 00 call 10e8c0 <_Objects_Get> switch ( location ) { 10ce7d: 83 c4 10 add $0x10,%esp 10ce80: 8b 4d e4 mov -0x1c(%ebp),%ecx 10ce83: 85 c9 test %ecx,%ecx 10ce85: 74 19 je 10cea0 case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10ce87: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ce8c: 8d 65 f4 lea -0xc(%ebp),%esp 10ce8f: 5b pop %ebx 10ce90: 5e pop %esi 10ce91: 5f pop %edi 10ce92: c9 leave 10ce93: c3 ret Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10ce94: a1 38 95 12 00 mov 0x129538,%eax 10ce99: 8b 70 08 mov 0x8(%eax),%esi 10ce9c: eb c1 jmp 10ce5f 10ce9e: 66 90 xchg %ax,%ax <== NOT EXECUTED the_object = _Objects_Get( information, tmpId, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 10cea0: 52 push %edx 10cea1: 57 push %edi 10cea2: 50 push %eax 10cea3: 53 push %ebx 10cea4: e8 4f 1c 00 00 call 10eaf8 <_Objects_Set_name> _Thread_Enable_dispatch(); 10cea9: e8 42 23 00 00 call 10f1f0 <_Thread_Enable_dispatch> 10ceae: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10ceb0: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ceb3: 8d 65 f4 lea -0xc(%ebp),%esp 10ceb6: 5b pop %ebx 10ceb7: 5e pop %esi 10ceb8: 5f pop %edi 10ceb9: c9 leave 10ceba: c3 ret 10cebb: 90 nop <== NOT EXECUTED Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10cebc: b8 09 00 00 00 mov $0x9,%eax 10cec1: eb c9 jmp 10ce8c 001163b0 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 1163b0: 55 push %ebp 1163b1: 89 e5 mov %esp,%ebp 1163b3: 57 push %edi 1163b4: 56 push %esi 1163b5: 53 push %ebx 1163b6: 83 ec 1c sub $0x1c,%esp 1163b9: 8b 5d 08 mov 0x8(%ebp),%ebx 1163bc: 8b 75 0c mov 0xc(%ebp),%esi 1163bf: 8b 55 10 mov 0x10(%ebp),%edx 1163c2: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 1163c5: 85 db test %ebx,%ebx 1163c7: 74 47 je 116410 return RTEMS_INVALID_NAME; if ( !starting_address ) 1163c9: 85 f6 test %esi,%esi 1163cb: 74 23 je 1163f0 return RTEMS_INVALID_ADDRESS; if ( !id ) 1163cd: 8b 45 1c mov 0x1c(%ebp),%eax 1163d0: 85 c0 test %eax,%eax 1163d2: 74 1c je 1163f0 return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 1163d4: 85 d2 test %edx,%edx 1163d6: 74 28 je 116400 1163d8: 85 ff test %edi,%edi 1163da: 74 24 je 116400 1163dc: 39 fa cmp %edi,%edx 1163de: 72 20 jb 116400 1163e0: f7 c7 03 00 00 00 test $0x3,%edi 1163e6: 75 18 jne 116400 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 1163e8: f7 c6 03 00 00 00 test $0x3,%esi 1163ee: 74 30 je 116420 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 1163f0: b8 09 00 00 00 mov $0x9,%eax } 1163f5: 8d 65 f4 lea -0xc(%ebp),%esp 1163f8: 5b pop %ebx 1163f9: 5e pop %esi 1163fa: 5f pop %edi 1163fb: c9 leave 1163fc: c3 ret 1163fd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 116400: b8 08 00 00 00 mov $0x8,%eax } 116405: 8d 65 f4 lea -0xc(%ebp),%esp 116408: 5b pop %ebx 116409: 5e pop %esi 11640a: 5f pop %edi 11640b: c9 leave 11640c: c3 ret 11640d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_id *id ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 116410: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 116415: 8d 65 f4 lea -0xc(%ebp),%esp 116418: 5b pop %ebx 116419: 5e pop %esi 11641a: 5f pop %edi 11641b: c9 leave 11641c: c3 ret 11641d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 116420: a1 78 f7 13 00 mov 0x13f778,%eax 116425: 40 inc %eax 116426: a3 78 f7 13 00 mov %eax,0x13f778 * 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 ); 11642b: 83 ec 0c sub $0xc,%esp 11642e: 68 00 f6 13 00 push $0x13f600 116433: 89 55 e0 mov %edx,-0x20(%ebp) 116436: e8 3d 42 00 00 call 11a678 <_Objects_Allocate> 11643b: 89 45 e4 mov %eax,-0x1c(%ebp) _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 11643e: 83 c4 10 add $0x10,%esp 116441: 85 c0 test %eax,%eax 116443: 8b 55 e0 mov -0x20(%ebp),%edx 116446: 74 58 je 1164a0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 116448: 8b 45 e4 mov -0x1c(%ebp),%eax 11644b: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 11644e: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 116451: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 116454: 8b 4d 18 mov 0x18(%ebp),%ecx 116457: 89 48 1c mov %ecx,0x1c(%eax) the_partition->number_of_used_blocks = 0; 11645a: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) _Chain_Initialize( &the_partition->Memory, starting_address, 116461: 57 push %edi 116462: 89 d0 mov %edx,%eax 116464: 31 d2 xor %edx,%edx 116466: f7 f7 div %edi 116468: 50 push %eax 116469: 56 push %esi 11646a: 8b 45 e4 mov -0x1c(%ebp),%eax 11646d: 83 c0 24 add $0x24,%eax 116470: 50 push %eax 116471: e8 7a 2f 00 00 call 1193f0 <_Chain_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 116476: 8b 7d e4 mov -0x1c(%ebp),%edi 116479: 8b 47 08 mov 0x8(%edi),%eax 11647c: 0f b7 f0 movzwl %ax,%esi 11647f: 8b 15 1c f6 13 00 mov 0x13f61c,%edx 116485: 89 3c b2 mov %edi,(%edx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 116488: 89 5f 0c mov %ebx,0xc(%edi) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 11648b: 8b 55 1c mov 0x1c(%ebp),%edx 11648e: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 116490: e8 7f 4f 00 00 call 11b414 <_Thread_Enable_dispatch> 116495: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116497: 83 c4 10 add $0x10,%esp 11649a: e9 66 ff ff ff jmp 116405 11649f: 90 nop <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 1164a0: e8 6f 4f 00 00 call 11b414 <_Thread_Enable_dispatch> 1164a5: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 1164aa: e9 56 ff ff ff jmp 116405 001164b0 : */ rtems_status_code rtems_partition_delete( rtems_id id ) { 1164b0: 55 push %ebp 1164b1: 89 e5 mov %esp,%ebp 1164b3: 83 ec 2c sub $0x2c,%esp RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 1164b6: 8d 45 f4 lea -0xc(%ebp),%eax 1164b9: 50 push %eax 1164ba: ff 75 08 pushl 0x8(%ebp) 1164bd: 68 00 f6 13 00 push $0x13f600 1164c2: e8 9d 46 00 00 call 11ab64 <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 1164c7: 83 c4 10 add $0x10,%esp 1164ca: 8b 55 f4 mov -0xc(%ebp),%edx 1164cd: 85 d2 test %edx,%edx 1164cf: 74 07 je 1164d8 1164d1: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1164d6: c9 leave 1164d7: c3 ret the_partition = _Partition_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { 1164d8: 8b 48 20 mov 0x20(%eax),%ecx 1164db: 85 c9 test %ecx,%ecx 1164dd: 74 0d je 1164ec #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 1164df: e8 30 4f 00 00 call 11b414 <_Thread_Enable_dispatch> 1164e4: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1164e9: c9 leave 1164ea: c3 ret 1164eb: 90 nop <== NOT EXECUTED the_partition = _Partition_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { _Objects_Close( &_Partition_Information, &the_partition->Object ); 1164ec: 83 ec 08 sub $0x8,%esp 1164ef: 50 push %eax 1164f0: 68 00 f6 13 00 push $0x13f600 1164f5: 89 45 e4 mov %eax,-0x1c(%ebp) 1164f8: e8 f7 41 00 00 call 11a6f4 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); 1164fd: 58 pop %eax 1164fe: 5a pop %edx 1164ff: 8b 45 e4 mov -0x1c(%ebp),%eax 116502: 50 push %eax 116503: 68 00 f6 13 00 push $0x13f600 116508: e8 eb 44 00 00 call 11a9f8 <_Objects_Free> 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 11650d: e8 02 4f 00 00 call 11b414 <_Thread_Enable_dispatch> 116512: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116514: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116517: c9 leave 116518: c3 ret 0011651c : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 11651c: 55 push %ebp 11651d: 89 e5 mov %esp,%ebp 11651f: 56 push %esi 116520: 53 push %ebx 116521: 83 ec 20 sub $0x20,%esp 116524: 8b 5d 0c mov 0xc(%ebp),%ebx register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 116527: 85 db test %ebx,%ebx 116529: 74 59 je 116584 RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 11652b: 52 push %edx 11652c: 8d 45 f4 lea -0xc(%ebp),%eax 11652f: 50 push %eax 116530: ff 75 08 pushl 0x8(%ebp) 116533: 68 00 f6 13 00 push $0x13f600 116538: e8 27 46 00 00 call 11ab64 <_Objects_Get> 11653d: 89 c6 mov %eax,%esi return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 11653f: 83 c4 10 add $0x10,%esp 116542: 8b 45 f4 mov -0xc(%ebp),%eax 116545: 85 c0 test %eax,%eax 116547: 75 2f jne 116578 */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 116549: 83 ec 0c sub $0xc,%esp 11654c: 8d 46 24 lea 0x24(%esi),%eax 11654f: 50 push %eax 116550: e8 77 2e 00 00 call 1193cc <_Chain_Get> case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 116555: 83 c4 10 add $0x10,%esp 116558: 85 c0 test %eax,%eax 11655a: 74 34 je 116590 the_partition->number_of_used_blocks += 1; 11655c: ff 46 20 incl 0x20(%esi) _Thread_Enable_dispatch(); 11655f: 89 45 e4 mov %eax,-0x1c(%ebp) 116562: e8 ad 4e 00 00 call 11b414 <_Thread_Enable_dispatch> *buffer = the_buffer; 116567: 8b 45 e4 mov -0x1c(%ebp),%eax 11656a: 89 03 mov %eax,(%ebx) 11656c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11656e: 8d 65 f8 lea -0x8(%ebp),%esp 116571: 5b pop %ebx 116572: 5e pop %esi 116573: c9 leave 116574: c3 ret 116575: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !buffer ) return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 116578: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11657d: 8d 65 f8 lea -0x8(%ebp),%esp 116580: 5b pop %ebx 116581: 5e pop %esi 116582: c9 leave 116583: c3 ret { register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 116584: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116589: 8d 65 f8 lea -0x8(%ebp),%esp 11658c: 5b pop %ebx 11658d: 5e pop %esi 11658e: c9 leave 11658f: c3 ret the_partition->number_of_used_blocks += 1; _Thread_Enable_dispatch(); *buffer = the_buffer; return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 116590: e8 7f 4e 00 00 call 11b414 <_Thread_Enable_dispatch> 116595: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 11659a: eb e1 jmp 11657d 001165c0 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 1165c0: 55 push %ebp 1165c1: 89 e5 mov %esp,%ebp 1165c3: 56 push %esi 1165c4: 53 push %ebx 1165c5: 83 ec 14 sub $0x14,%esp 1165c8: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 1165cb: 8d 45 f4 lea -0xc(%ebp),%eax 1165ce: 50 push %eax 1165cf: ff 75 08 pushl 0x8(%ebp) 1165d2: 68 00 f6 13 00 push $0x13f600 1165d7: e8 88 45 00 00 call 11ab64 <_Objects_Get> 1165dc: 89 c3 mov %eax,%ebx register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 1165de: 83 c4 10 add $0x10,%esp 1165e1: 8b 45 f4 mov -0xc(%ebp),%eax 1165e4: 85 c0 test %eax,%eax 1165e6: 74 0c je 1165f4 1165e8: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1165ed: 8d 65 f8 lea -0x8(%ebp),%esp 1165f0: 5b pop %ebx 1165f1: 5e pop %esi 1165f2: c9 leave 1165f3: c3 ret ) { void *starting; void *ending; starting = the_partition->starting_address; 1165f4: 8b 43 10 mov 0x10(%ebx),%eax ending = _Addresses_Add_offset( starting, the_partition->length ); 1165f7: 8b 53 14 mov 0x14(%ebx),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 1165fa: 39 c6 cmp %eax,%esi 1165fc: 72 3a jb 116638 1165fe: 8d 14 10 lea (%eax,%edx,1),%edx 116601: 39 d6 cmp %edx,%esi 116603: 77 33 ja 116638 return ( 116605: 89 f2 mov %esi,%edx 116607: 29 c2 sub %eax,%edx 116609: 89 d0 mov %edx,%eax 11660b: 31 d2 xor %edx,%edx 11660d: f7 73 18 divl 0x18(%ebx) 116610: 85 d2 test %edx,%edx 116612: 75 24 jne 116638 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 116614: 83 ec 08 sub $0x8,%esp 116617: 56 push %esi 116618: 8d 43 24 lea 0x24(%ebx),%eax 11661b: 50 push %eax 11661c: e8 87 2d 00 00 call 1193a8 <_Chain_Append> switch ( location ) { case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; 116621: ff 4b 20 decl 0x20(%ebx) _Thread_Enable_dispatch(); 116624: e8 eb 4d 00 00 call 11b414 <_Thread_Enable_dispatch> 116629: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11662b: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11662e: 8d 65 f8 lea -0x8(%ebp),%esp 116631: 5b pop %ebx 116632: 5e pop %esi 116633: c9 leave 116634: c3 ret 116635: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 116638: e8 d7 4d 00 00 call 11b414 <_Thread_Enable_dispatch> 11663d: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116642: 8d 65 f8 lea -0x8(%ebp),%esp 116645: 5b pop %ebx 116646: 5e pop %esi 116647: c9 leave 116648: c3 ret 001159e8 : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 1159e8: 55 push %ebp 1159e9: 89 e5 mov %esp,%ebp 1159eb: 57 push %edi 1159ec: 56 push %esi 1159ed: 53 push %ebx 1159ee: 83 ec 1c sub $0x1c,%esp 1159f1: 8b 5d 08 mov 0x8(%ebp),%ebx 1159f4: 8b 55 0c mov 0xc(%ebp),%edx 1159f7: 8b 7d 10 mov 0x10(%ebp),%edi 1159fa: 8b 75 18 mov 0x18(%ebp),%esi register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 1159fd: 85 db test %ebx,%ebx 1159ff: 74 1b je 115a1c return RTEMS_INVALID_NAME; if ( !id ) 115a01: 85 f6 test %esi,%esi 115a03: 74 08 je 115a0d return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 115a05: 89 f8 mov %edi,%eax 115a07: 09 d0 or %edx,%eax 115a09: a8 03 test $0x3,%al 115a0b: 74 1f je 115a2c (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 115a0d: b8 09 00 00 00 mov $0x9,%eax } 115a12: 8d 65 f4 lea -0xc(%ebp),%esp 115a15: 5b pop %ebx 115a16: 5e pop %esi 115a17: 5f pop %edi 115a18: c9 leave 115a19: c3 ret 115a1a: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_id *id ) { register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 115a1c: b8 03 00 00 00 mov $0x3,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 115a21: 8d 65 f4 lea -0xc(%ebp),%esp 115a24: 5b pop %ebx 115a25: 5e pop %esi 115a26: 5f pop %edi 115a27: c9 leave 115a28: c3 ret 115a29: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 115a2c: a1 78 f7 13 00 mov 0x13f778,%eax 115a31: 40 inc %eax 115a32: a3 78 f7 13 00 mov %eax,0x13f778 * of free port control blocks. */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) 115a37: 83 ec 0c sub $0xc,%esp 115a3a: 68 c0 f5 13 00 push $0x13f5c0 115a3f: 89 55 e4 mov %edx,-0x1c(%ebp) 115a42: e8 31 4c 00 00 call 11a678 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 115a47: 83 c4 10 add $0x10,%esp 115a4a: 85 c0 test %eax,%eax 115a4c: 8b 55 e4 mov -0x1c(%ebp),%edx 115a4f: 74 33 je 115a84 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 115a51: 89 50 10 mov %edx,0x10(%eax) the_port->external_base = external_start; 115a54: 89 78 14 mov %edi,0x14(%eax) the_port->length = length - 1; 115a57: 8b 55 14 mov 0x14(%ebp),%edx 115a5a: 4a dec %edx 115a5b: 89 50 18 mov %edx,0x18(%eax) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 115a5e: 8b 50 08 mov 0x8(%eax),%edx 115a61: 0f b7 fa movzwl %dx,%edi 115a64: 8b 0d dc f5 13 00 mov 0x13f5dc,%ecx 115a6a: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 115a6d: 89 58 0c mov %ebx,0xc(%eax) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 115a70: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 115a72: e8 9d 59 00 00 call 11b414 <_Thread_Enable_dispatch> 115a77: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 115a79: 8d 65 f4 lea -0xc(%ebp),%esp 115a7c: 5b pop %ebx 115a7d: 5e pop %esi 115a7e: 5f pop %edi 115a7f: c9 leave 115a80: c3 ret 115a81: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { _Thread_Enable_dispatch(); 115a84: e8 8b 59 00 00 call 11b414 <_Thread_Enable_dispatch> 115a89: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 115a8e: eb 82 jmp 115a12 00115a90 : */ rtems_status_code rtems_port_delete( rtems_id id ) { 115a90: 55 push %ebp 115a91: 89 e5 mov %esp,%ebp 115a93: 83 ec 2c sub $0x2c,%esp RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 115a96: 8d 45 f4 lea -0xc(%ebp),%eax 115a99: 50 push %eax 115a9a: ff 75 08 pushl 0x8(%ebp) 115a9d: 68 c0 f5 13 00 push $0x13f5c0 115aa2: e8 bd 50 00 00 call 11ab64 <_Objects_Get> register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 115aa7: 83 c4 10 add $0x10,%esp 115aaa: 8b 4d f4 mov -0xc(%ebp),%ecx 115aad: 85 c9 test %ecx,%ecx 115aaf: 75 2f jne 115ae0 case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); 115ab1: 83 ec 08 sub $0x8,%esp 115ab4: 50 push %eax 115ab5: 68 c0 f5 13 00 push $0x13f5c0 115aba: 89 45 e4 mov %eax,-0x1c(%ebp) 115abd: e8 32 4c 00 00 call 11a6f4 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Dual_ported_memory_Free ( Dual_ported_memory_Control *the_port ) { _Objects_Free( &_Dual_ported_memory_Information, &the_port->Object ); 115ac2: 58 pop %eax 115ac3: 5a pop %edx 115ac4: 8b 45 e4 mov -0x1c(%ebp),%eax 115ac7: 50 push %eax 115ac8: 68 c0 f5 13 00 push $0x13f5c0 115acd: e8 26 4f 00 00 call 11a9f8 <_Objects_Free> _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 115ad2: e8 3d 59 00 00 call 11b414 <_Thread_Enable_dispatch> 115ad7: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 115ad9: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115adc: c9 leave 115add: c3 ret 115ade: 66 90 xchg %ax,%ax <== NOT EXECUTED { register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 115ae0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115ae5: c9 leave 115ae6: c3 ret 00115ae8 : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 115ae8: 55 push %ebp 115ae9: 89 e5 mov %esp,%ebp 115aeb: 56 push %esi 115aec: 53 push %ebx 115aed: 83 ec 10 sub $0x10,%esp 115af0: 8b 75 0c mov 0xc(%ebp),%esi 115af3: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 115af6: 85 db test %ebx,%ebx 115af8: 74 4e je 115b48 RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 115afa: 51 push %ecx 115afb: 8d 45 f4 lea -0xc(%ebp),%eax 115afe: 50 push %eax 115aff: ff 75 08 pushl 0x8(%ebp) 115b02: 68 c0 f5 13 00 push $0x13f5c0 115b07: e8 58 50 00 00 call 11ab64 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 115b0c: 83 c4 10 add $0x10,%esp 115b0f: 8b 55 f4 mov -0xc(%ebp),%edx 115b12: 85 d2 test %edx,%edx 115b14: 74 0e je 115b24 115b16: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115b1b: 8d 65 f8 lea -0x8(%ebp),%esp 115b1e: 5b pop %ebx 115b1f: 5e pop %esi 115b20: c9 leave 115b21: c3 ret 115b22: 66 90 xchg %ax,%ax <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); 115b24: 89 f2 mov %esi,%edx 115b26: 2b 50 14 sub 0x14(%eax),%edx if ( ending > the_port->length ) 115b29: 3b 50 18 cmp 0x18(%eax),%edx 115b2c: 77 16 ja 115b44 *internal = external; else *internal = _Addresses_Add_offset( the_port->internal_base, 115b2e: 03 50 10 add 0x10(%eax),%edx 115b31: 89 13 mov %edx,(%ebx) ending ); _Thread_Enable_dispatch(); 115b33: e8 dc 58 00 00 call 11b414 <_Thread_Enable_dispatch> 115b38: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115b3a: 8d 65 f8 lea -0x8(%ebp),%esp 115b3d: 5b pop %ebx 115b3e: 5e pop %esi 115b3f: c9 leave 115b40: c3 ret 115b41: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); if ( ending > the_port->length ) *internal = external; 115b44: 89 33 mov %esi,(%ebx) 115b46: eb eb jmp 115b33 { register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 115b48: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115b4d: 8d 65 f8 lea -0x8(%ebp),%esp 115b50: 5b pop %ebx 115b51: 5e pop %esi 115b52: c9 leave 115b53: c3 ret 00115b78 : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 115b78: 55 push %ebp 115b79: 89 e5 mov %esp,%ebp 115b7b: 56 push %esi 115b7c: 53 push %ebx 115b7d: 83 ec 10 sub $0x10,%esp 115b80: 8b 75 0c mov 0xc(%ebp),%esi 115b83: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 115b86: 85 db test %ebx,%ebx 115b88: 74 4e je 115bd8 115b8a: 51 push %ecx 115b8b: 8d 45 f4 lea -0xc(%ebp),%eax 115b8e: 50 push %eax 115b8f: ff 75 08 pushl 0x8(%ebp) 115b92: 68 c0 f5 13 00 push $0x13f5c0 115b97: e8 c8 4f 00 00 call 11ab64 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 115b9c: 83 c4 10 add $0x10,%esp 115b9f: 8b 55 f4 mov -0xc(%ebp),%edx 115ba2: 85 d2 test %edx,%edx 115ba4: 74 0e je 115bb4 115ba6: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115bab: 8d 65 f8 lea -0x8(%ebp),%esp 115bae: 5b pop %ebx 115baf: 5e pop %esi 115bb0: c9 leave 115bb1: c3 ret 115bb2: 66 90 xchg %ax,%ax <== NOT EXECUTED the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); 115bb4: 89 f2 mov %esi,%edx 115bb6: 2b 50 10 sub 0x10(%eax),%edx if ( ending > the_port->length ) 115bb9: 3b 50 18 cmp 0x18(%eax),%edx 115bbc: 77 16 ja 115bd4 *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, 115bbe: 03 50 14 add 0x14(%eax),%edx 115bc1: 89 13 mov %edx,(%ebx) ending ); _Thread_Enable_dispatch(); 115bc3: e8 4c 58 00 00 call 11b414 <_Thread_Enable_dispatch> 115bc8: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115bca: 8d 65 f8 lea -0x8(%ebp),%esp 115bcd: 5b pop %ebx 115bce: 5e pop %esi 115bcf: c9 leave 115bd0: c3 ret 115bd1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) *external = internal; 115bd4: 89 33 mov %esi,(%ebx) 115bd6: eb eb jmp 115bc3 { register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 115bd8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115bdd: 8d 65 f8 lea -0x8(%ebp),%esp 115be0: 5b pop %ebx 115be1: 5e pop %esi 115be2: c9 leave 115be3: c3 ret 0011664c : */ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { 11664c: 55 push %ebp 11664d: 89 e5 mov %esp,%ebp 11664f: 53 push %ebx 116650: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 116653: 8d 45 f4 lea -0xc(%ebp),%eax 116656: 50 push %eax 116657: ff 75 08 pushl 0x8(%ebp) 11665a: 68 40 f6 13 00 push $0x13f640 11665f: e8 00 45 00 00 call 11ab64 <_Objects_Get> 116664: 89 c3 mov %eax,%ebx Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 116666: 83 c4 10 add $0x10,%esp 116669: 8b 45 f4 mov -0xc(%ebp),%eax 11666c: 85 c0 test %eax,%eax 11666e: 74 0c je 11667c 116670: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116675: 8b 5d fc mov -0x4(%ebp),%ebx 116678: c9 leave 116679: c3 ret 11667a: 66 90 xchg %ax,%ax <== NOT EXECUTED the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 11667c: 8b 43 40 mov 0x40(%ebx),%eax 11667f: 3b 05 38 f8 13 00 cmp 0x13f838,%eax 116685: 74 11 je 116698 _Thread_Enable_dispatch(); 116687: e8 88 4d 00 00 call 11b414 <_Thread_Enable_dispatch> 11668c: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116691: 8b 5d fc mov -0x4(%ebp),%ebx 116694: c9 leave 116695: c3 ret 116696: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } (void) _Watchdog_Remove( &the_period->Timer ); 116698: 83 ec 0c sub $0xc,%esp 11669b: 8d 43 10 lea 0x10(%ebx),%eax 11669e: 50 push %eax 11669f: e8 40 61 00 00 call 11c7e4 <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 1166a4: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) _Thread_Enable_dispatch(); 1166ab: e8 64 4d 00 00 call 11b414 <_Thread_Enable_dispatch> 1166b0: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1166b2: 83 c4 10 add $0x10,%esp 1166b5: eb be jmp 116675 0010c1e8 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 10c1e8: 55 push %ebp 10c1e9: 89 e5 mov %esp,%ebp 10c1eb: 57 push %edi 10c1ec: 56 push %esi 10c1ed: 53 push %ebx 10c1ee: 83 ec 1c sub $0x1c,%esp 10c1f1: 8b 5d 08 mov 0x8(%ebp),%ebx 10c1f4: 8b 75 0c mov 0xc(%ebp),%esi Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10c1f7: 85 db test %ebx,%ebx 10c1f9: 0f 84 a9 00 00 00 je 10c2a8 return RTEMS_INVALID_NAME; if ( !id ) 10c1ff: 85 f6 test %esi,%esi 10c201: 0f 84 c5 00 00 00 je 10c2cc rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c207: a1 78 84 12 00 mov 0x128478,%eax 10c20c: 40 inc %eax 10c20d: a3 78 84 12 00 mov %eax,0x128478 * This function allocates a period control block from * the inactive chain of free period control blocks. */ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void ) { return (Rate_monotonic_Control *) 10c212: 83 ec 0c sub $0xc,%esp 10c215: 68 80 83 12 00 push $0x128380 10c21a: e8 81 1d 00 00 call 10dfa0 <_Objects_Allocate> 10c21f: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 10c221: 83 c4 10 add $0x10,%esp 10c224: 85 c0 test %eax,%eax 10c226: 0f 84 8c 00 00 00 je 10c2b8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 10c22c: a1 38 85 12 00 mov 0x128538,%eax 10c231: 89 42 40 mov %eax,0x40(%edx) the_period->state = RATE_MONOTONIC_INACTIVE; 10c234: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10c23b: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 10c242: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx) the_watchdog->id = id; 10c249: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) the_watchdog->user_data = user_data; 10c250: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); 10c257: 8d 42 54 lea 0x54(%edx),%eax 10c25a: 89 45 e4 mov %eax,-0x1c(%ebp) 10c25d: b9 38 00 00 00 mov $0x38,%ecx 10c262: 31 c0 xor %eax,%eax 10c264: 8b 7d e4 mov -0x1c(%ebp),%edi 10c267: f3 aa rep stos %al,%es:(%edi) 10c269: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10c270: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10c277: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10c27e: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c285: 8b 42 08 mov 0x8(%edx),%eax 10c288: 0f b7 f8 movzwl %ax,%edi 10c28b: 8b 0d 9c 83 12 00 mov 0x12839c,%ecx 10c291: 89 14 b9 mov %edx,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c294: 89 5a 0c mov %ebx,0xc(%edx) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 10c297: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10c299: e8 be 2a 00 00 call 10ed5c <_Thread_Enable_dispatch> 10c29e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10c2a0: 8d 65 f4 lea -0xc(%ebp),%esp 10c2a3: 5b pop %ebx 10c2a4: 5e pop %esi 10c2a5: 5f pop %edi 10c2a6: c9 leave 10c2a7: c3 ret rtems_id *id ) { Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10c2a8: b8 03 00 00 00 mov $0x3,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c2ad: 8d 65 f4 lea -0xc(%ebp),%esp 10c2b0: 5b pop %ebx 10c2b1: 5e pop %esi 10c2b2: 5f pop %edi 10c2b3: c9 leave 10c2b4: c3 ret 10c2b5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { _Thread_Enable_dispatch(); 10c2b8: e8 9f 2a 00 00 call 10ed5c <_Thread_Enable_dispatch> 10c2bd: b8 05 00 00 00 mov $0x5,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c2c2: 8d 65 f4 lea -0xc(%ebp),%esp 10c2c5: 5b pop %ebx 10c2c6: 5e pop %esi 10c2c7: 5f pop %edi 10c2c8: c9 leave 10c2c9: c3 ret 10c2ca: 66 90 xchg %ax,%ax <== NOT EXECUTED Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10c2cc: b8 09 00 00 00 mov $0x9,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c2d1: 8d 65 f4 lea -0xc(%ebp),%esp 10c2d4: 5b pop %ebx 10c2d5: 5e pop %esi 10c2d6: 5f pop %edi 10c2d7: c9 leave 10c2d8: c3 ret 0013c42c : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 13c42c: 55 push %ebp 13c42d: 89 e5 mov %esp,%ebp 13c42f: 53 push %ebx 13c430: 83 ec 24 sub $0x24,%esp 13c433: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) 13c436: 85 db test %ebx,%ebx 13c438: 0f 84 92 00 00 00 je 13c4d0 13c43e: 50 push %eax 13c43f: 8d 45 f4 lea -0xc(%ebp),%eax 13c442: 50 push %eax 13c443: ff 75 08 pushl 0x8(%ebp) 13c446: 68 80 e4 16 00 push $0x16e480 13c44b: e8 50 6a fd ff call 112ea0 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 13c450: 83 c4 10 add $0x10,%esp 13c453: 8b 4d f4 mov -0xc(%ebp),%ecx 13c456: 85 c9 test %ecx,%ecx 13c458: 74 0a je 13c464 13c45a: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13c45f: 8b 5d fc mov -0x4(%ebp),%ebx 13c462: c9 leave 13c463: c3 ret the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 13c464: 8b 50 40 mov 0x40(%eax),%edx 13c467: 8b 52 08 mov 0x8(%edx),%edx 13c46a: 89 13 mov %edx,(%ebx) status->state = the_period->state; 13c46c: 8b 50 38 mov 0x38(%eax),%edx 13c46f: 89 53 04 mov %edx,0x4(%ebx) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 13c472: 85 d2 test %edx,%edx 13c474: 75 2a jne 13c4a0 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 13c476: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 13c47d: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Timespec_Set_to_zero( &status->executed_since_last_period ); 13c484: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) 13c48b: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) status->since_last_period = since_last_period; status->executed_since_last_period = executed; #endif } _Thread_Enable_dispatch(); 13c492: e8 01 73 fd ff call 113798 <_Thread_Enable_dispatch> 13c497: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13c499: 8b 5d fc mov -0x4(%ebp),%ebx 13c49c: c9 leave 13c49d: c3 ret 13c49e: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Grab the current status. */ valid_status = _Rate_monotonic_Get_status( 13c4a0: 52 push %edx 13c4a1: 8d 55 ec lea -0x14(%ebp),%edx 13c4a4: 52 push %edx 13c4a5: 8d 55 e4 lea -0x1c(%ebp),%edx 13c4a8: 52 push %edx 13c4a9: 50 push %eax 13c4aa: e8 b1 00 00 00 call 13c560 <_Rate_monotonic_Get_status> the_period, &since_last_period, &executed ); if (!valid_status) { 13c4af: 83 c4 10 add $0x10,%esp 13c4b2: 84 c0 test %al,%al 13c4b4: 74 26 je 13c4dc _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 13c4b6: 8b 45 e4 mov -0x1c(%ebp),%eax 13c4b9: 8b 55 e8 mov -0x18(%ebp),%edx 13c4bc: 89 43 08 mov %eax,0x8(%ebx) 13c4bf: 89 53 0c mov %edx,0xc(%ebx) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 13c4c2: 8b 45 ec mov -0x14(%ebp),%eax 13c4c5: 8b 55 f0 mov -0x10(%ebp),%edx 13c4c8: 89 43 10 mov %eax,0x10(%ebx) 13c4cb: 89 53 14 mov %edx,0x14(%ebx) 13c4ce: eb c2 jmp 13c492 Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) 13c4d0: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13c4d5: 8b 5d fc mov -0x4(%ebp),%ebx 13c4d8: c9 leave 13c4d9: c3 ret 13c4da: 66 90 xchg %ax,%ax <== NOT EXECUTED valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { _Thread_Enable_dispatch(); 13c4dc: e8 b7 72 fd ff call 113798 <_Thread_Enable_dispatch> 13c4e1: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; 13c4e6: e9 74 ff ff ff jmp 13c45f 0013c6e8 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 13c6e8: 55 push %ebp 13c6e9: 89 e5 mov %esp,%ebp 13c6eb: 57 push %edi 13c6ec: 56 push %esi 13c6ed: 53 push %ebx 13c6ee: 83 ec 30 sub $0x30,%esp 13c6f1: 8b 5d 08 mov 0x8(%ebp),%ebx 13c6f4: 8b 75 0c mov 0xc(%ebp),%esi 13c6f7: 8d 45 e4 lea -0x1c(%ebp),%eax 13c6fa: 50 push %eax 13c6fb: 53 push %ebx 13c6fc: 68 80 e4 16 00 push $0x16e480 13c701: e8 9a 67 fd ff call 112ea0 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 13c706: 83 c4 10 add $0x10,%esp 13c709: 8b 7d e4 mov -0x1c(%ebp),%edi 13c70c: 85 ff test %edi,%edi 13c70e: 74 10 je 13c720 the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 13c710: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13c715: 8d 65 f4 lea -0xc(%ebp),%esp 13c718: 5b pop %ebx 13c719: 5e pop %esi 13c71a: 5f pop %edi 13c71b: c9 leave 13c71c: c3 ret 13c71d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 13c720: 8b 50 40 mov 0x40(%eax),%edx 13c723: 3b 15 b8 df 16 00 cmp 0x16dfb8,%edx 13c729: 74 15 je 13c740 _Thread_Enable_dispatch(); 13c72b: e8 68 70 fd ff call 113798 <_Thread_Enable_dispatch> 13c730: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13c735: 8d 65 f4 lea -0xc(%ebp),%esp 13c738: 5b pop %ebx 13c739: 5e pop %esi 13c73a: 5f pop %edi 13c73b: c9 leave 13c73c: c3 ret 13c73d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 13c740: 85 f6 test %esi,%esi 13c742: 0f 84 b0 00 00 00 je 13c7f8 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 13c748: 9c pushf 13c749: fa cli 13c74a: 5f pop %edi switch ( the_period->state ) { 13c74b: 8b 50 38 mov 0x38(%eax),%edx 13c74e: 83 fa 02 cmp $0x2,%edx 13c751: 0f 84 bd 00 00 00 je 13c814 13c757: 83 fa 04 cmp $0x4,%edx 13c75a: 74 5c je 13c7b8 13c75c: 85 d2 test %edx,%edx 13c75e: 75 b0 jne 13c710 case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 13c760: 57 push %edi 13c761: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 13c762: 83 ec 0c sub $0xc,%esp 13c765: 50 push %eax 13c766: 89 45 d4 mov %eax,-0x2c(%ebp) 13c769: e8 7e fd ff ff call 13c4ec <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 13c76e: 8b 45 d4 mov -0x2c(%ebp),%eax 13c771: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 13c778: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 13c77f: c7 40 2c 98 c8 13 00 movl $0x13c898,0x2c(%eax) the_watchdog->id = id; 13c786: 89 58 30 mov %ebx,0x30(%eax) the_watchdog->user_data = user_data; 13c789: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 13c790: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 13c793: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 13c796: 5a pop %edx 13c797: 59 pop %ecx 13c798: 83 c0 10 add $0x10,%eax 13c79b: 50 push %eax 13c79c: 68 d8 df 16 00 push $0x16dfd8 13c7a1: e8 ca 7e fd ff call 114670 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 13c7a6: e8 ed 6f fd ff call 113798 <_Thread_Enable_dispatch> 13c7ab: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 13c7ad: 83 c4 10 add $0x10,%esp 13c7b0: e9 60 ff ff ff jmp 13c715 13c7b5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 13c7b8: 83 ec 0c sub $0xc,%esp 13c7bb: 50 push %eax 13c7bc: 89 45 d4 mov %eax,-0x2c(%ebp) 13c7bf: e8 34 fe ff ff call 13c5f8 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 13c7c4: 57 push %edi 13c7c5: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 13c7c6: 8b 45 d4 mov -0x2c(%ebp),%eax 13c7c9: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) the_period->next_length = length; 13c7d0: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 13c7d3: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 13c7d6: 59 pop %ecx 13c7d7: 5b pop %ebx 13c7d8: 83 c0 10 add $0x10,%eax 13c7db: 50 push %eax 13c7dc: 68 d8 df 16 00 push $0x16dfd8 13c7e1: e8 8a 7e fd ff call 114670 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 13c7e6: e8 ad 6f fd ff call 113798 <_Thread_Enable_dispatch> 13c7eb: b8 06 00 00 00 mov $0x6,%eax return RTEMS_TIMEOUT; 13c7f0: 83 c4 10 add $0x10,%esp 13c7f3: e9 1d ff ff ff jmp 13c715 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 13c7f8: 8b 40 38 mov 0x38(%eax),%eax 13c7fb: 83 f8 04 cmp $0x4,%eax 13c7fe: 76 74 jbe 13c874 13c800: 31 c0 xor %eax,%eax <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 13c802: 89 45 d4 mov %eax,-0x2c(%ebp) 13c805: e8 8e 6f fd ff call 113798 <_Thread_Enable_dispatch> return( return_value ); 13c80a: 8b 45 d4 mov -0x2c(%ebp),%eax 13c80d: e9 03 ff ff ff jmp 13c715 13c812: 66 90 xchg %ax,%ax <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 13c814: 83 ec 0c sub $0xc,%esp 13c817: 50 push %eax 13c818: 89 45 d4 mov %eax,-0x2c(%ebp) 13c81b: e8 d8 fd ff ff call 13c5f8 <_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; 13c820: 8b 45 d4 mov -0x2c(%ebp),%eax 13c823: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) the_period->next_length = length; 13c82a: 89 70 3c mov %esi,0x3c(%eax) _ISR_Enable( level ); 13c82d: 57 push %edi 13c82e: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 13c82f: 8b 15 b8 df 16 00 mov 0x16dfb8,%edx 13c835: 8b 48 08 mov 0x8(%eax),%ecx 13c838: 89 4a 20 mov %ecx,0x20(%edx) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 13c83b: 5e pop %esi 13c83c: 5f pop %edi 13c83d: 68 00 40 00 00 push $0x4000 13c842: 52 push %edx 13c843: 89 45 d4 mov %eax,-0x2c(%ebp) 13c846: e8 d5 77 fd ff call 114020 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 13c84b: 9c pushf 13c84c: fa cli 13c84d: 59 pop %ecx local_state = the_period->state; 13c84e: 8b 45 d4 mov -0x2c(%ebp),%eax 13c851: 8b 50 38 mov 0x38(%eax),%edx the_period->state = RATE_MONOTONIC_ACTIVE; 13c854: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) _ISR_Enable( level ); 13c85b: 51 push %ecx 13c85c: 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 ) 13c85d: 83 c4 10 add $0x10,%esp 13c860: 83 fa 03 cmp $0x3,%edx 13c863: 74 18 je 13c87d _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 13c865: e8 2e 6f fd ff call 113798 <_Thread_Enable_dispatch> 13c86a: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 13c86c: e9 a4 fe ff ff jmp 13c715 13c871: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 13c874: 8b 04 85 74 28 16 00 mov 0x162874(,%eax,4),%eax 13c87b: eb 85 jmp 13c802 /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 13c87d: 83 ec 08 sub $0x8,%esp 13c880: 68 00 40 00 00 push $0x4000 13c885: ff 35 b8 df 16 00 pushl 0x16dfb8 13c88b: e8 60 6b fd ff call 1133f0 <_Thread_Clear_state> 13c890: 83 c4 10 add $0x10,%esp 13c893: eb d0 jmp 13c865 0012d1f4 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 12d1f4: 55 push %ebp 12d1f5: 89 e5 mov %esp,%ebp 12d1f7: 57 push %edi 12d1f8: 56 push %esi 12d1f9: 53 push %ebx 12d1fa: 83 ec 7c sub $0x7c,%esp 12d1fd: 8b 7d 08 mov 0x8(%ebp),%edi 12d200: 8b 75 0c mov 0xc(%ebp),%esi rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 12d203: 85 f6 test %esi,%esi 12d205: 0f 84 bd 00 00 00 je 12d2c8 return; (*print)( context, "Period information by period\n" ); 12d20b: 83 ec 08 sub $0x8,%esp 12d20e: 68 28 ef 15 00 push $0x15ef28 12d213: 57 push %edi 12d214: ff d6 call *%esi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 12d216: 59 pop %ecx 12d217: 5b pop %ebx 12d218: 68 60 ef 15 00 push $0x15ef60 12d21d: 57 push %edi 12d21e: ff d6 call *%esi (*print)( context, "--- Wall times are in seconds ---\n" ); 12d220: 58 pop %eax 12d221: 5a pop %edx 12d222: 68 84 ef 15 00 push $0x15ef84 12d227: 57 push %edi 12d228: ff d6 call *%esi Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 12d22a: 59 pop %ecx 12d22b: 5b pop %ebx 12d22c: 68 a8 ef 15 00 push $0x15efa8 12d231: 57 push %edi 12d232: ff d6 call *%esi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 12d234: 58 pop %eax 12d235: 5a pop %edx 12d236: 68 f4 ef 15 00 push $0x15eff4 12d23b: 57 push %edi 12d23c: ff d6 call *%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 ; 12d23e: 8b 1d 88 e4 16 00 mov 0x16e488,%ebx 12d244: 83 c4 10 add $0x10,%esp 12d247: 3b 1d 8c e4 16 00 cmp 0x16e48c,%ebx 12d24d: 77 79 ja 12d2c8 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); 12d24f: 89 75 84 mov %esi,-0x7c(%ebp) 12d252: eb 09 jmp 12d25d * 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++ ) { 12d254: 43 inc %ebx /* * 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 ; 12d255: 39 1d 8c e4 16 00 cmp %ebx,0x16e48c 12d25b: 72 6b jb 12d2c8 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 12d25d: 83 ec 08 sub $0x8,%esp 12d260: 8d 45 88 lea -0x78(%ebp),%eax 12d263: 50 push %eax 12d264: 53 push %ebx 12d265: e8 16 f1 00 00 call 13c380 if ( status != RTEMS_SUCCESSFUL ) 12d26a: 83 c4 10 add $0x10,%esp 12d26d: 85 c0 test %eax,%eax 12d26f: 75 e3 jne 12d254 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 12d271: 83 ec 08 sub $0x8,%esp 12d274: 8d 55 c0 lea -0x40(%ebp),%edx 12d277: 52 push %edx 12d278: 53 push %ebx 12d279: e8 ae f1 00 00 call 13c42c #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 12d27e: 83 c4 0c add $0xc,%esp 12d281: 8d 45 e3 lea -0x1d(%ebp),%eax 12d284: 50 push %eax 12d285: 6a 05 push $0x5 12d287: ff 75 c0 pushl -0x40(%ebp) 12d28a: e8 19 40 fe ff call 1112a8 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 12d28f: 59 pop %ecx 12d290: 5e pop %esi 12d291: ff 75 8c pushl -0x74(%ebp) 12d294: ff 75 88 pushl -0x78(%ebp) 12d297: 8d 55 e3 lea -0x1d(%ebp),%edx 12d29a: 52 push %edx 12d29b: 53 push %ebx 12d29c: 68 46 ef 15 00 push $0x15ef46 12d2a1: 57 push %edi 12d2a2: ff 55 84 call *-0x7c(%ebp) ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 12d2a5: 8b 45 88 mov -0x78(%ebp),%eax 12d2a8: 83 c4 20 add $0x20,%esp 12d2ab: 85 c0 test %eax,%eax 12d2ad: 75 21 jne 12d2d0 (*print)( context, "\n" ); 12d2af: 83 ec 08 sub $0x8,%esp 12d2b2: 68 21 0d 16 00 push $0x160d21 12d2b7: 57 push %edi 12d2b8: ff 55 84 call *-0x7c(%ebp) continue; 12d2bb: 83 c4 10 add $0x10,%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++ ) { 12d2be: 43 inc %ebx /* * 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 ; 12d2bf: 39 1d 8c e4 16 00 cmp %ebx,0x16e48c 12d2c5: 73 96 jae 12d25d 12d2c7: 90 nop <== NOT EXECUTED the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 12d2c8: 8d 65 f4 lea -0xc(%ebp),%esp 12d2cb: 5b pop %ebx 12d2cc: 5e pop %esi 12d2cd: 5f pop %edi 12d2ce: c9 leave 12d2cf: c3 ret 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 ); 12d2d0: 52 push %edx 12d2d1: 8d 55 d8 lea -0x28(%ebp),%edx 12d2d4: 52 push %edx 12d2d5: 50 push %eax 12d2d6: 8d 45 a0 lea -0x60(%ebp),%eax 12d2d9: 50 push %eax 12d2da: e8 a5 16 00 00 call 12e984 <_Timespec_Divide_by_integer> (*print)( context, 12d2df: 8b 4d dc mov -0x24(%ebp),%ecx 12d2e2: be d3 4d 62 10 mov $0x10624dd3,%esi 12d2e7: 89 c8 mov %ecx,%eax 12d2e9: f7 ee imul %esi 12d2eb: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12d2f1: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12d2f7: c1 f8 06 sar $0x6,%eax 12d2fa: c1 f9 1f sar $0x1f,%ecx 12d2fd: 29 c8 sub %ecx,%eax 12d2ff: 50 push %eax 12d300: ff 75 d8 pushl -0x28(%ebp) 12d303: 8b 4d 9c mov -0x64(%ebp),%ecx 12d306: 89 c8 mov %ecx,%eax 12d308: f7 ee imul %esi 12d30a: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12d310: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12d316: c1 f8 06 sar $0x6,%eax 12d319: c1 f9 1f sar $0x1f,%ecx 12d31c: 29 c8 sub %ecx,%eax 12d31e: 50 push %eax 12d31f: ff 75 98 pushl -0x68(%ebp) 12d322: 8b 4d 94 mov -0x6c(%ebp),%ecx 12d325: 89 c8 mov %ecx,%eax 12d327: f7 ee imul %esi 12d329: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) 12d32f: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12d335: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12d33b: c1 f8 06 sar $0x6,%eax 12d33e: c1 f9 1f sar $0x1f,%ecx 12d341: 29 c8 sub %ecx,%eax 12d343: 50 push %eax 12d344: ff 75 90 pushl -0x70(%ebp) 12d347: 68 40 f0 15 00 push $0x15f040 12d34c: 57 push %edi 12d34d: ff 55 84 call *-0x7c(%ebp) struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 12d350: 83 c4 2c add $0x2c,%esp 12d353: 8d 55 d8 lea -0x28(%ebp),%edx 12d356: 52 push %edx 12d357: ff 75 88 pushl -0x78(%ebp) 12d35a: 8d 45 b8 lea -0x48(%ebp),%eax 12d35d: 50 push %eax 12d35e: e8 21 16 00 00 call 12e984 <_Timespec_Divide_by_integer> (*print)( context, 12d363: 8b 4d dc mov -0x24(%ebp),%ecx 12d366: 89 c8 mov %ecx,%eax 12d368: f7 ee imul %esi 12d36a: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12d370: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12d376: c1 f8 06 sar $0x6,%eax 12d379: c1 f9 1f sar $0x1f,%ecx 12d37c: 29 c8 sub %ecx,%eax 12d37e: 50 push %eax 12d37f: ff 75 d8 pushl -0x28(%ebp) 12d382: 8b 4d b4 mov -0x4c(%ebp),%ecx 12d385: 89 c8 mov %ecx,%eax 12d387: f7 ee imul %esi 12d389: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12d38f: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12d395: c1 f8 06 sar $0x6,%eax 12d398: c1 f9 1f sar $0x1f,%ecx 12d39b: 29 c8 sub %ecx,%eax 12d39d: 50 push %eax 12d39e: ff 75 b0 pushl -0x50(%ebp) 12d3a1: 8b 4d ac mov -0x54(%ebp),%ecx 12d3a4: 89 c8 mov %ecx,%eax 12d3a6: f7 ee imul %esi 12d3a8: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) 12d3ae: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12d3b4: 8b b5 7c ff ff ff mov -0x84(%ebp),%esi 12d3ba: c1 fe 06 sar $0x6,%esi 12d3bd: 89 c8 mov %ecx,%eax 12d3bf: 99 cltd 12d3c0: 29 d6 sub %edx,%esi 12d3c2: 56 push %esi 12d3c3: ff 75 a8 pushl -0x58(%ebp) 12d3c6: 68 60 f0 15 00 push $0x15f060 12d3cb: 57 push %edi 12d3cc: ff 55 84 call *-0x7c(%ebp) 12d3cf: 83 c4 30 add $0x30,%esp 12d3d2: e9 7d fe ff ff jmp 12d254 0012d430 : */ rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id ) { 12d430: 55 push %ebp 12d431: 89 e5 mov %esp,%ebp 12d433: 57 push %edi 12d434: 53 push %ebx 12d435: 83 ec 14 sub $0x14,%esp RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 12d438: 8d 45 f4 lea -0xc(%ebp),%eax 12d43b: 50 push %eax 12d43c: ff 75 08 pushl 0x8(%ebp) 12d43f: 68 80 e4 16 00 push $0x16e480 12d444: e8 57 5a fe ff call 112ea0 <_Objects_Get> 12d449: 89 c2 mov %eax,%edx Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 12d44b: 83 c4 10 add $0x10,%esp 12d44e: 8b 45 f4 mov -0xc(%ebp),%eax 12d451: 85 c0 test %eax,%eax 12d453: 75 3b jne 12d490 case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 12d455: 8d 5a 54 lea 0x54(%edx),%ebx 12d458: b9 38 00 00 00 mov $0x38,%ecx 12d45d: 31 c0 xor %eax,%eax 12d45f: 89 df mov %ebx,%edi 12d461: f3 aa rep stos %al,%es:(%edi) 12d463: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 12d46a: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 12d471: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 12d478: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) _Thread_Enable_dispatch(); 12d47f: e8 14 63 fe ff call 113798 <_Thread_Enable_dispatch> 12d484: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12d486: 8d 65 f8 lea -0x8(%ebp),%esp 12d489: 5b pop %ebx 12d48a: 5f pop %edi 12d48b: c9 leave 12d48c: c3 ret 12d48d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 12d490: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12d495: 8d 65 f8 lea -0x8(%ebp),%esp 12d498: 5b pop %ebx 12d499: 5f pop %edi 12d49a: c9 leave 12d49b: c3 ret 00116df0 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 116df0: 55 push %ebp 116df1: 89 e5 mov %esp,%ebp 116df3: 57 push %edi 116df4: 56 push %esi 116df5: 53 push %ebx 116df6: 83 ec 1c sub $0x1c,%esp 116df9: 8b 75 08 mov 0x8(%ebp),%esi 116dfc: 8b 5d 0c mov 0xc(%ebp),%ebx 116dff: 8b 7d 1c mov 0x1c(%ebp),%edi rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 116e02: 85 f6 test %esi,%esi 116e04: 0f 84 92 00 00 00 je 116e9c return RTEMS_INVALID_NAME; if ( !starting_address ) 116e0a: 85 db test %ebx,%ebx 116e0c: 74 09 je 116e17 return RTEMS_INVALID_ADDRESS; if ( !id ) 116e0e: 85 ff test %edi,%edi 116e10: 74 05 je 116e17 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 116e12: f6 c3 03 test $0x3,%bl 116e15: 74 0d je 116e24 return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); return return_status; 116e17: b8 09 00 00 00 mov $0x9,%eax } 116e1c: 8d 65 f4 lea -0xc(%ebp),%esp 116e1f: 5b pop %ebx 116e20: 5e pop %esi 116e21: 5f pop %edi 116e22: c9 leave 116e23: c3 ret return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 116e24: 83 ec 0c sub $0xc,%esp 116e27: ff 35 30 f8 13 00 pushl 0x13f830 116e2d: e8 fe 24 00 00 call 119330 <_API_Mutex_Lock> * This function allocates a region control block from * the inactive chain of free region control blocks. */ RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void ) { return (Region_Control *) _Objects_Allocate( &_Region_Information ); 116e32: c7 04 24 80 f6 13 00 movl $0x13f680,(%esp) 116e39: e8 3a 38 00 00 call 11a678 <_Objects_Allocate> 116e3e: 89 c2 mov %eax,%edx the_region = _Region_Allocate(); if ( !the_region ) 116e40: 83 c4 10 add $0x10,%esp 116e43: 85 c0 test %eax,%eax 116e45: 74 65 je 116eac return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 116e47: ff 75 14 pushl 0x14(%ebp) 116e4a: ff 75 10 pushl 0x10(%ebp) 116e4d: 53 push %ebx 116e4e: 8d 40 68 lea 0x68(%eax),%eax 116e51: 50 push %eax 116e52: 89 55 e4 mov %edx,-0x1c(%ebp) 116e55: e8 02 33 00 00 call 11a15c <_Heap_Initialize> 116e5a: 8b 55 e4 mov -0x1c(%ebp),%edx 116e5d: 89 42 5c mov %eax,0x5c(%edx) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 116e60: 83 c4 10 add $0x10,%esp 116e63: 85 c0 test %eax,%eax 116e65: 75 4d jne 116eb4 */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 116e67: 83 ec 08 sub $0x8,%esp 116e6a: 52 push %edx 116e6b: 68 80 f6 13 00 push $0x13f680 116e70: e8 83 3b 00 00 call 11a9f8 <_Objects_Free> 116e75: b8 08 00 00 00 mov $0x8,%eax 116e7a: 83 c4 10 add $0x10,%esp *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 116e7d: 83 ec 0c sub $0xc,%esp 116e80: ff 35 30 f8 13 00 pushl 0x13f830 116e86: 89 45 e4 mov %eax,-0x1c(%ebp) 116e89: e8 ea 24 00 00 call 119378 <_API_Mutex_Unlock> return return_status; 116e8e: 83 c4 10 add $0x10,%esp 116e91: 8b 45 e4 mov -0x1c(%ebp),%eax } 116e94: 8d 65 f4 lea -0xc(%ebp),%esp 116e97: 5b pop %ebx 116e98: 5e pop %esi 116e99: 5f pop %edi 116e9a: c9 leave 116e9b: c3 ret ) { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 116e9c: b8 03 00 00 00 mov $0x3,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 116ea1: 8d 65 f4 lea -0xc(%ebp),%esp 116ea4: 5b pop %ebx 116ea5: 5e pop %esi 116ea6: 5f pop %edi 116ea7: c9 leave 116ea8: c3 ret 116ea9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region ) 116eac: b8 05 00 00 00 mov $0x5,%eax 116eb1: eb ca jmp 116e7d 116eb3: 90 nop <== NOT EXECUTED return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 116eb4: 89 5a 50 mov %ebx,0x50(%edx) the_region->length = length; 116eb7: 8b 45 10 mov 0x10(%ebp),%eax 116eba: 89 42 54 mov %eax,0x54(%edx) the_region->page_size = page_size; 116ebd: 8b 45 14 mov 0x14(%ebp),%eax 116ec0: 89 42 58 mov %eax,0x58(%edx) the_region->attribute_set = attribute_set; 116ec3: 8b 45 18 mov 0x18(%ebp),%eax 116ec6: 89 42 60 mov %eax,0x60(%edx) the_region->number_of_used_blocks = 0; 116ec9: c7 42 64 00 00 00 00 movl $0x0,0x64(%edx) _Thread_queue_Initialize( 116ed0: 6a 06 push $0x6 116ed2: 6a 40 push $0x40 116ed4: 8b 45 18 mov 0x18(%ebp),%eax 116ed7: c1 e8 02 shr $0x2,%eax 116eda: 83 e0 01 and $0x1,%eax 116edd: 50 push %eax 116ede: 8d 42 10 lea 0x10(%edx),%eax 116ee1: 50 push %eax 116ee2: 89 55 e4 mov %edx,-0x1c(%ebp) 116ee5: e8 8a 4c 00 00 call 11bb74 <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 116eea: 8b 55 e4 mov -0x1c(%ebp),%edx 116eed: 8b 42 08 mov 0x8(%edx),%eax 116ef0: 0f b7 d8 movzwl %ax,%ebx 116ef3: 8b 0d 9c f6 13 00 mov 0x13f69c,%ecx 116ef9: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 116efc: 89 72 0c mov %esi,0xc(%edx) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 116eff: 89 07 mov %eax,(%edi) 116f01: 31 c0 xor %eax,%eax 116f03: 83 c4 10 add $0x10,%esp 116f06: e9 72 ff ff ff jmp 116e7d 00116f0c : */ rtems_status_code rtems_region_delete( rtems_id id ) { 116f0c: 55 push %ebp 116f0d: 89 e5 mov %esp,%ebp 116f0f: 53 push %ebx 116f10: 83 ec 30 sub $0x30,%esp Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 116f13: ff 35 30 f8 13 00 pushl 0x13f830 116f19: e8 12 24 00 00 call 119330 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 116f1e: 83 c4 0c add $0xc,%esp 116f21: 8d 45 f4 lea -0xc(%ebp),%eax 116f24: 50 push %eax 116f25: ff 75 08 pushl 0x8(%ebp) 116f28: 68 80 f6 13 00 push $0x13f680 116f2d: e8 f6 3b 00 00 call 11ab28 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 116f32: 83 c4 10 add $0x10,%esp 116f35: 8b 5d f4 mov -0xc(%ebp),%ebx 116f38: 85 db test %ebx,%ebx 116f3a: 74 1c je 116f58 116f3c: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 116f41: 83 ec 0c sub $0xc,%esp 116f44: ff 35 30 f8 13 00 pushl 0x13f830 116f4a: e8 29 24 00 00 call 119378 <_API_Mutex_Unlock> return return_status; } 116f4f: 89 d8 mov %ebx,%eax 116f51: 8b 5d fc mov -0x4(%ebp),%ebx 116f54: c9 leave 116f55: c3 ret 116f56: 66 90 xchg %ax,%ax <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 ) 116f58: 8b 48 64 mov 0x64(%eax),%ecx 116f5b: 85 c9 test %ecx,%ecx 116f5d: 74 09 je 116f68 116f5f: bb 0c 00 00 00 mov $0xc,%ebx 116f64: eb db jmp 116f41 116f66: 66 90 xchg %ax,%ax <== NOT EXECUTED return_status = RTEMS_RESOURCE_IN_USE; else { _Objects_Close( &_Region_Information, &the_region->Object ); 116f68: 83 ec 08 sub $0x8,%esp 116f6b: 50 push %eax 116f6c: 68 80 f6 13 00 push $0x13f680 116f71: 89 45 e4 mov %eax,-0x1c(%ebp) 116f74: e8 7b 37 00 00 call 11a6f4 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 116f79: 58 pop %eax 116f7a: 5a pop %edx 116f7b: 8b 45 e4 mov -0x1c(%ebp),%eax 116f7e: 50 push %eax 116f7f: 68 80 f6 13 00 push $0x13f680 116f84: e8 6f 3a 00 00 call 11a9f8 <_Objects_Free> 116f89: 31 db xor %ebx,%ebx 116f8b: 83 c4 10 add $0x10,%esp 116f8e: eb b1 jmp 116f41 00116f90 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 116f90: 55 push %ebp 116f91: 89 e5 mov %esp,%ebp 116f93: 56 push %esi 116f94: 53 push %ebx 116f95: 83 ec 10 sub $0x10,%esp 116f98: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 116f9b: 85 db test %ebx,%ebx 116f9d: 74 71 je 117010 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 116f9f: 83 ec 0c sub $0xc,%esp 116fa2: ff 35 30 f8 13 00 pushl 0x13f830 116fa8: e8 83 23 00 00 call 119330 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 116fad: 83 c4 0c add $0xc,%esp 116fb0: 8d 45 f0 lea -0x10(%ebp),%eax 116fb3: 50 push %eax 116fb4: ff 75 08 pushl 0x8(%ebp) 116fb7: 68 80 f6 13 00 push $0x13f680 116fbc: e8 67 3b 00 00 call 11ab28 <_Objects_Get_no_protection> 116fc1: 89 c6 mov %eax,%esi the_region = _Region_Get( id, &location ); switch ( location ) { 116fc3: 83 c4 10 add $0x10,%esp 116fc6: 8b 45 f0 mov -0x10(%ebp),%eax 116fc9: 85 c0 test %eax,%eax 116fcb: 74 1f je 116fec 116fcd: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 116fd2: 83 ec 0c sub $0xc,%esp 116fd5: ff 35 30 f8 13 00 pushl 0x13f830 116fdb: e8 98 23 00 00 call 119378 <_API_Mutex_Unlock> return return_status; 116fe0: 83 c4 10 add $0x10,%esp } 116fe3: 89 d8 mov %ebx,%eax 116fe5: 8d 65 f8 lea -0x8(%ebp),%esp 116fe8: 5b pop %ebx 116fe9: 5e pop %esi 116fea: c9 leave 116feb: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: heap_status = _Heap_Extend( 116fec: 8d 45 f4 lea -0xc(%ebp),%eax 116fef: 50 push %eax 116ff0: ff 75 10 pushl 0x10(%ebp) 116ff3: 53 push %ebx 116ff4: 8d 46 68 lea 0x68(%esi),%eax 116ff7: 50 push %eax 116ff8: e8 67 2e 00 00 call 119e64 <_Heap_Extend> starting_address, length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { 116ffd: 83 c4 10 add $0x10,%esp 117000: 85 c0 test %eax,%eax 117002: 74 18 je 11701c the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 117004: 48 dec %eax 117005: 74 25 je 11702c 117007: bb 18 00 00 00 mov $0x18,%ebx 11700c: eb c4 jmp 116fd2 11700e: 66 90 xchg %ax,%ax <== NOT EXECUTED Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 117010: b3 09 mov $0x9,%bl break; } _RTEMS_Unlock_allocator(); return return_status; } 117012: 89 d8 mov %ebx,%eax 117014: 8d 65 f8 lea -0x8(%ebp),%esp 117017: 5b pop %ebx 117018: 5e pop %esi 117019: c9 leave 11701a: c3 ret 11701b: 90 nop <== NOT EXECUTED length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; 11701c: 8b 45 f4 mov -0xc(%ebp),%eax 11701f: 01 46 54 add %eax,0x54(%esi) the_region->maximum_segment_size += amount_extended; 117022: 01 46 5c add %eax,0x5c(%esi) 117025: 31 db xor %ebx,%ebx 117027: eb a9 jmp 116fd2 117029: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 11702c: bb 09 00 00 00 mov $0x9,%ebx 117031: eb 9f jmp 116fd2 00117034 : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { 117034: 55 push %ebp 117035: 89 e5 mov %esp,%ebp 117037: 53 push %ebx 117038: 83 ec 14 sub $0x14,%esp 11703b: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 11703e: 85 db test %ebx,%ebx 117040: 74 76 je 1170b8 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 117042: 83 ec 0c sub $0xc,%esp 117045: ff 35 30 f8 13 00 pushl 0x13f830 11704b: e8 e0 22 00 00 call 119330 <_API_Mutex_Lock> 117050: 83 c4 0c add $0xc,%esp 117053: 8d 45 f4 lea -0xc(%ebp),%eax 117056: 50 push %eax 117057: ff 75 08 pushl 0x8(%ebp) 11705a: 68 80 f6 13 00 push $0x13f680 11705f: e8 c4 3a 00 00 call 11ab28 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 117064: 83 c4 10 add $0x10,%esp 117067: 8b 55 f4 mov -0xc(%ebp),%edx 11706a: 85 d2 test %edx,%edx 11706c: 74 1e je 11708c 11706e: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117073: 83 ec 0c sub $0xc,%esp 117076: ff 35 30 f8 13 00 pushl 0x13f830 11707c: e8 f7 22 00 00 call 119378 <_API_Mutex_Unlock> return return_status; 117081: 83 c4 10 add $0x10,%esp } 117084: 89 d8 mov %ebx,%eax 117086: 8b 5d fc mov -0x4(%ebp),%ebx 117089: c9 leave 11708a: c3 ret 11708b: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; 11708c: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) the_info->Used.total = 0; 117093: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) the_info->Used.largest = 0; 11709a: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 1170a1: 83 ec 08 sub $0x8,%esp 1170a4: 53 push %ebx 1170a5: 83 c0 68 add $0x68,%eax 1170a8: 50 push %eax 1170a9: e8 c6 2f 00 00 call 11a074 <_Heap_Get_free_information> 1170ae: 31 db xor %ebx,%ebx return_status = RTEMS_SUCCESSFUL; break; 1170b0: 83 c4 10 add $0x10,%esp 1170b3: eb be jmp 117073 1170b5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 1170b8: b3 09 mov $0x9,%bl break; } _RTEMS_Unlock_allocator(); return return_status; } 1170ba: 89 d8 mov %ebx,%eax 1170bc: 8b 5d fc mov -0x4(%ebp),%ebx 1170bf: c9 leave 1170c0: c3 ret 001170c4 : rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { 1170c4: 55 push %ebp 1170c5: 89 e5 mov %esp,%ebp 1170c7: 53 push %ebx 1170c8: 83 ec 14 sub $0x14,%esp 1170cb: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 1170ce: 85 db test %ebx,%ebx 1170d0: 74 5e je 117130 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 1170d2: 83 ec 0c sub $0xc,%esp 1170d5: ff 35 30 f8 13 00 pushl 0x13f830 1170db: e8 50 22 00 00 call 119330 <_API_Mutex_Lock> 1170e0: 83 c4 0c add $0xc,%esp 1170e3: 8d 45 f4 lea -0xc(%ebp),%eax 1170e6: 50 push %eax 1170e7: ff 75 08 pushl 0x8(%ebp) 1170ea: 68 80 f6 13 00 push $0x13f680 1170ef: e8 34 3a 00 00 call 11ab28 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 1170f4: 83 c4 10 add $0x10,%esp 1170f7: 8b 55 f4 mov -0xc(%ebp),%edx 1170fa: 85 d2 test %edx,%edx 1170fc: 74 1e je 11711c 1170fe: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117103: 83 ec 0c sub $0xc,%esp 117106: ff 35 30 f8 13 00 pushl 0x13f830 11710c: e8 67 22 00 00 call 119378 <_API_Mutex_Unlock> return return_status; 117111: 83 c4 10 add $0x10,%esp } 117114: 89 d8 mov %ebx,%eax 117116: 8b 5d fc mov -0x4(%ebp),%ebx 117119: c9 leave 11711a: c3 ret 11711b: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); 11711c: 83 ec 08 sub $0x8,%esp 11711f: 53 push %ebx 117120: 83 c0 68 add $0x68,%eax 117123: 50 push %eax 117124: e8 a3 2f 00 00 call 11a0cc <_Heap_Get_information> 117129: 31 db xor %ebx,%ebx return_status = RTEMS_SUCCESSFUL; break; 11712b: 83 c4 10 add $0x10,%esp 11712e: eb d3 jmp 117103 { Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 117130: b3 09 mov $0x9,%bl break; } _RTEMS_Unlock_allocator(); return return_status; } 117132: 89 d8 mov %ebx,%eax 117134: 8b 5d fc mov -0x4(%ebp),%ebx 117137: c9 leave 117138: c3 ret 0011713c : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 11713c: 55 push %ebp 11713d: 89 e5 mov %esp,%ebp 11713f: 57 push %edi 117140: 56 push %esi 117141: 53 push %ebx 117142: 83 ec 2c sub $0x2c,%esp 117145: 8b 75 0c mov 0xc(%ebp),%esi 117148: 8b 5d 18 mov 0x18(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 11714b: 85 db test %ebx,%ebx 11714d: 0f 84 a1 00 00 00 je 1171f4 return RTEMS_INVALID_ADDRESS; *segment = NULL; 117153: c7 03 00 00 00 00 movl $0x0,(%ebx) if ( size == 0 ) 117159: 85 f6 test %esi,%esi 11715b: 75 0f jne 11716c 11715d: b8 08 00 00 00 mov $0x8,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117162: 8d 65 f4 lea -0xc(%ebp),%esp 117165: 5b pop %ebx 117166: 5e pop %esi 117167: 5f pop %edi 117168: c9 leave 117169: c3 ret 11716a: 66 90 xchg %ax,%ax <== NOT EXECUTED *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 11716c: 83 ec 0c sub $0xc,%esp 11716f: ff 35 30 f8 13 00 pushl 0x13f830 117175: e8 b6 21 00 00 call 119330 <_API_Mutex_Lock> executing = _Thread_Executing; 11717a: a1 38 f8 13 00 mov 0x13f838,%eax 11717f: 89 45 d4 mov %eax,-0x2c(%ebp) 117182: 83 c4 0c add $0xc,%esp 117185: 8d 45 e4 lea -0x1c(%ebp),%eax 117188: 50 push %eax 117189: ff 75 08 pushl 0x8(%ebp) 11718c: 68 80 f6 13 00 push $0x13f680 117191: e8 92 39 00 00 call 11ab28 <_Objects_Get_no_protection> 117196: 89 c7 mov %eax,%edi the_region = _Region_Get( id, &location ); switch ( location ) { 117198: 83 c4 10 add $0x10,%esp 11719b: 8b 45 e4 mov -0x1c(%ebp),%eax 11719e: 85 c0 test %eax,%eax 1171a0: 75 2a jne 1171cc case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 1171a2: 3b 77 5c cmp 0x5c(%edi),%esi 1171a5: 76 2d jbe 1171d4 1171a7: b8 08 00 00 00 mov $0x8,%eax default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1171ac: 83 ec 0c sub $0xc,%esp 1171af: ff 35 30 f8 13 00 pushl 0x13f830 1171b5: 89 45 d0 mov %eax,-0x30(%ebp) 1171b8: e8 bb 21 00 00 call 119378 <_API_Mutex_Unlock> return return_status; 1171bd: 83 c4 10 add $0x10,%esp 1171c0: 8b 45 d0 mov -0x30(%ebp),%eax } 1171c3: 8d 65 f4 lea -0xc(%ebp),%esp 1171c6: 5b pop %ebx 1171c7: 5e pop %esi 1171c8: 5f pop %edi 1171c9: c9 leave 1171ca: c3 ret 1171cb: 90 nop <== NOT EXECUTED _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; 1171cc: b8 04 00 00 00 mov $0x4,%eax 1171d1: eb d9 jmp 1171ac 1171d3: 90 nop <== NOT EXECUTED * @brief See _Heap_Allocate_aligned_with_boundary() with alignment and * boundary equals zero. */ RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 1171d4: 6a 00 push $0x0 1171d6: 6a 00 push $0x0 1171d8: 56 push %esi 1171d9: 8d 47 68 lea 0x68(%edi),%eax 1171dc: 50 push %eax 1171dd: e8 ce 2a 00 00 call 119cb0 <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 1171e2: 83 c4 10 add $0x10,%esp 1171e5: 85 c0 test %eax,%eax 1171e7: 74 17 je 117200 the_region->number_of_used_blocks += 1; 1171e9: ff 47 64 incl 0x64(%edi) *segment = the_segment; 1171ec: 89 03 mov %eax,(%ebx) 1171ee: 31 c0 xor %eax,%eax 1171f0: eb ba jmp 1171ac 1171f2: 66 90 xchg %ax,%ax <== NOT EXECUTED Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 1171f4: b8 09 00 00 00 mov $0x9,%eax 1171f9: e9 64 ff ff ff jmp 117162 1171fe: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( the_segment ) { the_region->number_of_used_blocks += 1; *segment = the_segment; return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) { 117200: f6 45 10 01 testb $0x1,0x10(%ebp) 117204: 74 07 je 11720d 117206: b8 0d 00 00 00 mov $0xd,%eax 11720b: eb 9f jmp 1171ac rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 11720d: a1 78 f7 13 00 mov 0x13f778,%eax 117212: 40 inc %eax 117213: a3 78 f7 13 00 mov %eax,0x13f778 * Switch from using the memory allocation mutex to using a * dispatching disabled critical section. We have to do this * because this thread is going to block. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 117218: 83 ec 0c sub $0xc,%esp 11721b: ff 35 30 f8 13 00 pushl 0x13f830 117221: e8 52 21 00 00 call 119378 <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 117226: 8d 47 10 lea 0x10(%edi),%eax 117229: 8b 55 d4 mov -0x2c(%ebp),%edx 11722c: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 11722f: 8b 4d 08 mov 0x8(%ebp),%ecx 117232: 89 4a 20 mov %ecx,0x20(%edx) executing->Wait.count = size; 117235: 89 72 24 mov %esi,0x24(%edx) executing->Wait.return_argument = segment; 117238: 89 5a 28 mov %ebx,0x28(%edx) 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; 11723b: c7 47 40 01 00 00 00 movl $0x1,0x40(%edi) _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 117242: 83 c4 0c add $0xc,%esp 117245: 68 24 bc 11 00 push $0x11bc24 11724a: ff 75 14 pushl 0x14(%ebp) 11724d: 50 push %eax 11724e: e8 c1 46 00 00 call 11b914 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 117253: e8 bc 41 00 00 call 11b414 <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 117258: 8b 55 d4 mov -0x2c(%ebp),%edx 11725b: 8b 42 34 mov 0x34(%edx),%eax 11725e: 83 c4 10 add $0x10,%esp 117261: e9 fc fe ff ff jmp 117162 00117268 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 117268: 55 push %ebp 117269: 89 e5 mov %esp,%ebp 11726b: 56 push %esi 11726c: 53 push %ebx 11726d: 83 ec 20 sub $0x20,%esp 117270: 8b 5d 0c mov 0xc(%ebp),%ebx 117273: 8b 75 10 mov 0x10(%ebp),%esi Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 117276: 85 db test %ebx,%ebx 117278: 74 72 je 1172ec return RTEMS_INVALID_ADDRESS; if ( !size ) 11727a: 85 f6 test %esi,%esi 11727c: 74 6e je 1172ec return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 11727e: 83 ec 0c sub $0xc,%esp 117281: ff 35 30 f8 13 00 pushl 0x13f830 117287: e8 a4 20 00 00 call 119330 <_API_Mutex_Lock> 11728c: 83 c4 0c add $0xc,%esp 11728f: 8d 45 f4 lea -0xc(%ebp),%eax 117292: 50 push %eax 117293: ff 75 08 pushl 0x8(%ebp) 117296: 68 80 f6 13 00 push $0x13f680 11729b: e8 88 38 00 00 call 11ab28 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 1172a0: 83 c4 10 add $0x10,%esp 1172a3: 8b 55 f4 mov -0xc(%ebp),%edx 1172a6: 85 d2 test %edx,%edx 1172a8: 75 36 jne 1172e0 case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 1172aa: 52 push %edx 1172ab: 56 push %esi 1172ac: 53 push %ebx 1172ad: 83 c0 68 add $0x68,%eax 1172b0: 50 push %eax 1172b1: e8 d6 32 00 00 call 11a58c <_Heap_Size_of_alloc_area> 1172b6: 83 c4 10 add $0x10,%esp 1172b9: 84 c0 test %al,%al 1172bb: 74 3b je 1172f8 1172bd: 31 c0 xor %eax,%eax case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1172bf: 83 ec 0c sub $0xc,%esp 1172c2: ff 35 30 f8 13 00 pushl 0x13f830 1172c8: 89 45 e4 mov %eax,-0x1c(%ebp) 1172cb: e8 a8 20 00 00 call 119378 <_API_Mutex_Unlock> return return_status; 1172d0: 83 c4 10 add $0x10,%esp 1172d3: 8b 45 e4 mov -0x1c(%ebp),%eax } 1172d6: 8d 65 f8 lea -0x8(%ebp),%esp 1172d9: 5b pop %ebx 1172da: 5e pop %esi 1172db: c9 leave 1172dc: c3 ret 1172dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 1172e0: 4a dec %edx 1172e1: 75 da jne 1172bd 1172e3: b8 04 00 00 00 mov $0x4,%eax 1172e8: eb d5 jmp 1172bf 1172ea: 66 90 xchg %ax,%ax <== NOT EXECUTED return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 1172ec: b8 09 00 00 00 mov $0x9,%eax } 1172f1: 8d 65 f8 lea -0x8(%ebp),%esp 1172f4: 5b pop %ebx 1172f5: 5e pop %esi 1172f6: c9 leave 1172f7: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 1172f8: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED 1172fd: eb c0 jmp 1172bf <== NOT EXECUTED 00117324 : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 117324: 55 push %ebp 117325: 89 e5 mov %esp,%ebp 117327: 56 push %esi 117328: 53 push %ebx 117329: 83 ec 20 sub $0x20,%esp 11732c: 8b 5d 14 mov 0x14(%ebp),%ebx uintptr_t osize; rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 11732f: 85 db test %ebx,%ebx 117331: 0f 84 a5 00 00 00 je 1173dc return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 117337: 83 ec 0c sub $0xc,%esp 11733a: ff 35 30 f8 13 00 pushl 0x13f830 117340: e8 eb 1f 00 00 call 119330 <_API_Mutex_Lock> 117345: 83 c4 0c add $0xc,%esp 117348: 8d 45 f0 lea -0x10(%ebp),%eax 11734b: 50 push %eax 11734c: ff 75 08 pushl 0x8(%ebp) 11734f: 68 80 f6 13 00 push $0x13f680 117354: e8 cf 37 00 00 call 11ab28 <_Objects_Get_no_protection> 117359: 89 c6 mov %eax,%esi the_region = _Region_Get( id, &location ); switch ( location ) { 11735b: 83 c4 10 add $0x10,%esp 11735e: 8b 45 f0 mov -0x10(%ebp),%eax 117361: 85 c0 test %eax,%eax 117363: 74 1f je 117384 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117365: 83 ec 0c sub $0xc,%esp 117368: ff 35 30 f8 13 00 pushl 0x13f830 11736e: e8 05 20 00 00 call 119378 <_API_Mutex_Unlock> 117373: b8 04 00 00 00 mov $0x4,%eax return return_status; 117378: 83 c4 10 add $0x10,%esp } 11737b: 8d 65 f8 lea -0x8(%ebp),%esp 11737e: 5b pop %ebx 11737f: 5e pop %esi 117380: c9 leave 117381: c3 ret 117382: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 117384: 83 ec 0c sub $0xc,%esp 117387: 8d 45 f4 lea -0xc(%ebp),%eax 11738a: 50 push %eax 11738b: 8d 45 ec lea -0x14(%ebp),%eax 11738e: 50 push %eax 11738f: ff 75 10 pushl 0x10(%ebp) 117392: ff 75 0c pushl 0xc(%ebp) 117395: 8d 46 68 lea 0x68(%esi),%eax 117398: 50 push %eax 117399: e8 e2 30 00 00 call 11a480 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 11739e: 8b 55 ec mov -0x14(%ebp),%edx 1173a1: 89 13 mov %edx,(%ebx) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 1173a3: 83 c4 20 add $0x20,%esp 1173a6: 85 c0 test %eax,%eax 1173a8: 75 16 jne 1173c0 _Region_Process_queue( the_region ); /* unlocks allocator */ 1173aa: 83 ec 0c sub $0xc,%esp 1173ad: 56 push %esi 1173ae: e8 6d 6d 00 00 call 11e120 <_Region_Process_queue> 1173b3: 31 c0 xor %eax,%eax 1173b5: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return return_status; } 1173b8: 8d 65 f8 lea -0x8(%ebp),%esp 1173bb: 5b pop %ebx 1173bc: 5e pop %esi 1173bd: c9 leave 1173be: c3 ret 1173bf: 90 nop <== NOT EXECUTED _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 1173c0: 83 ec 0c sub $0xc,%esp 1173c3: ff 35 30 f8 13 00 pushl 0x13f830 1173c9: 89 45 e4 mov %eax,-0x1c(%ebp) 1173cc: e8 a7 1f 00 00 call 119378 <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 1173d1: 83 c4 10 add $0x10,%esp 1173d4: 8b 45 e4 mov -0x1c(%ebp),%eax 1173d7: 83 f8 01 cmp $0x1,%eax 1173da: 74 0c je 1173e8 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 1173dc: b8 09 00 00 00 mov $0x9,%eax } 1173e1: 8d 65 f8 lea -0x8(%ebp),%esp 1173e4: 5b pop %ebx 1173e5: 5e pop %esi 1173e6: c9 leave 1173e7: c3 ret _RTEMS_Unlock_allocator(); if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 1173e8: b0 0d mov $0xd,%al 1173ea: eb 8f jmp 11737b 001173ec : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 1173ec: 55 push %ebp 1173ed: 89 e5 mov %esp,%ebp 1173ef: 53 push %ebx 1173f0: 83 ec 20 sub $0x20,%esp uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 1173f3: ff 35 30 f8 13 00 pushl 0x13f830 1173f9: e8 32 1f 00 00 call 119330 <_API_Mutex_Lock> 1173fe: 83 c4 0c add $0xc,%esp 117401: 8d 45 f4 lea -0xc(%ebp),%eax 117404: 50 push %eax 117405: ff 75 08 pushl 0x8(%ebp) 117408: 68 80 f6 13 00 push $0x13f680 11740d: e8 16 37 00 00 call 11ab28 <_Objects_Get_no_protection> 117412: 89 c3 mov %eax,%ebx the_region = _Region_Get( id, &location ); switch ( location ) { 117414: 83 c4 10 add $0x10,%esp 117417: 8b 45 f4 mov -0xc(%ebp),%eax 11741a: 85 c0 test %eax,%eax 11741c: 74 1e je 11743c 11741e: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117423: 83 ec 0c sub $0xc,%esp 117426: ff 35 30 f8 13 00 pushl 0x13f830 11742c: e8 47 1f 00 00 call 119378 <_API_Mutex_Unlock> return return_status; 117431: 83 c4 10 add $0x10,%esp } 117434: 89 d8 mov %ebx,%eax 117436: 8b 5d fc mov -0x4(%ebp),%ebx 117439: c9 leave 11743a: c3 ret 11743b: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 11743c: 83 ec 08 sub $0x8,%esp 11743f: ff 75 0c pushl 0xc(%ebp) 117442: 8d 43 68 lea 0x68(%ebx),%eax 117445: 50 push %eax 117446: e8 b9 2a 00 00 call 119f04 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 11744b: 83 c4 10 add $0x10,%esp 11744e: 84 c0 test %al,%al 117450: 75 0a jne 11745c else { the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator */ return RTEMS_SUCCESSFUL; 117452: bb 09 00 00 00 mov $0x9,%ebx 117457: eb ca jmp 117423 117459: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Region_Debug_Walk( the_region, 4 ); if ( !status ) return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; 11745c: ff 4b 64 decl 0x64(%ebx) _Region_Process_queue(the_region); /* unlocks allocator */ 11745f: 83 ec 0c sub $0xc,%esp 117462: 53 push %ebx 117463: e8 b8 6c 00 00 call 11e120 <_Region_Process_queue> 117468: 31 db xor %ebx,%ebx return RTEMS_SUCCESSFUL; 11746a: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return return_status; } 11746d: 89 d8 mov %ebx,%eax 11746f: 8b 5d fc mov -0x4(%ebp),%ebx 117472: c9 leave 117473: c3 ret 0010b328 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 10b328: 55 push %ebp 10b329: 89 e5 mov %esp,%ebp 10b32b: 57 push %edi 10b32c: 56 push %esi 10b32d: 53 push %ebx 10b32e: 83 ec 3c sub $0x3c,%esp 10b331: 8b 75 08 mov 0x8(%ebp),%esi 10b334: 8b 5d 10 mov 0x10(%ebp),%ebx 10b337: 8b 7d 18 mov 0x18(%ebp),%edi 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 ) ) 10b33a: 85 f6 test %esi,%esi 10b33c: 74 4a je 10b388 return RTEMS_INVALID_NAME; if ( !id ) 10b33e: 85 ff test %edi,%edi 10b340: 0f 84 f6 00 00 00 je 10b43c return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 10b346: 89 da mov %ebx,%edx 10b348: 81 e2 c0 00 00 00 and $0xc0,%edx 10b34e: 74 48 je 10b398 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10b350: 89 d8 mov %ebx,%eax 10b352: 83 e0 30 and $0x30,%eax 10b355: 83 f8 10 cmp $0x10,%eax 10b358: 74 0e je 10b368 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10b35a: b8 0b 00 00 00 mov $0xb,%eax } 10b35f: 8d 65 f4 lea -0xc(%ebp),%esp 10b362: 5b pop %ebx 10b363: 5e pop %esi 10b364: 5f pop %edi 10b365: c9 leave 10b366: c3 ret 10b367: 90 nop <== NOT EXECUTED #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10b368: f6 c3 04 test $0x4,%bl 10b36b: 74 ed je 10b35a _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 10b36d: 81 fa c0 00 00 00 cmp $0xc0,%edx 10b373: 74 e5 je 10b35a 10b375: b9 10 00 00 00 mov $0x10,%ecx _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 10b37a: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b37e: 76 1f jbe 10b39f 10b380: b8 0a 00 00 00 mov $0xa,%eax 10b385: eb d8 jmp 10b35f 10b387: 90 nop <== NOT EXECUTED 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 ) ) 10b388: b8 03 00 00 00 mov $0x3,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b38d: 8d 65 f4 lea -0xc(%ebp),%esp 10b390: 5b pop %ebx 10b391: 5e pop %esi 10b392: 5f pop %edi 10b393: c9 leave 10b394: c3 ret 10b395: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 10b398: 89 d9 mov %ebx,%ecx 10b39a: 83 e1 30 and $0x30,%ecx 10b39d: 75 db jne 10b37a rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b39f: a1 58 53 12 00 mov 0x125358,%eax 10b3a4: 40 inc %eax 10b3a5: a3 58 53 12 00 mov %eax,0x125358 * 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 ); 10b3aa: 83 ec 0c sub $0xc,%esp 10b3ad: 68 a0 52 12 00 push $0x1252a0 10b3b2: 89 4d c4 mov %ecx,-0x3c(%ebp) 10b3b5: e8 46 13 00 00 call 10c700 <_Objects_Allocate> 10b3ba: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 10b3bc: 83 c4 10 add $0x10,%esp 10b3bf: 85 c0 test %eax,%eax 10b3c1: 8b 4d c4 mov -0x3c(%ebp),%ecx 10b3c4: 0f 84 ba 00 00 00 je 10b484 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 10b3ca: 89 58 10 mov %ebx,0x10(%eax) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 10b3cd: 85 c9 test %ecx,%ecx 10b3cf: 74 77 je 10b448 /* * 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; 10b3d1: 31 c0 xor %eax,%eax 10b3d3: f6 c3 04 test $0x4,%bl 10b3d6: 0f 95 c0 setne %al 10b3d9: 89 45 d8 mov %eax,-0x28(%ebp) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 10b3dc: 83 f9 10 cmp $0x10,%ecx 10b3df: 0f 84 ae 00 00 00 je 10b493 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; the_mutex_attr.only_owner_release = true; } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 10b3e5: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b3ec: c6 45 d4 00 movb $0x0,-0x2c(%ebp) } mutex_status = _CORE_mutex_Initialize( 10b3f0: 50 push %eax 10b3f1: 31 c0 xor %eax,%eax 10b3f3: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b3f7: 0f 94 c0 sete %al 10b3fa: 50 push %eax 10b3fb: 8d 45 d0 lea -0x30(%ebp),%eax 10b3fe: 50 push %eax 10b3ff: 8d 42 14 lea 0x14(%edx),%eax 10b402: 50 push %eax 10b403: 89 55 c4 mov %edx,-0x3c(%ebp) 10b406: e8 65 0b 00 00 call 10bf70 <_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 ) { 10b40b: 83 c4 10 add $0x10,%esp 10b40e: 83 f8 06 cmp $0x6,%eax 10b411: 8b 55 c4 mov -0x3c(%ebp),%edx 10b414: 0f 84 a9 00 00 00 je 10b4c3 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b41a: 8b 42 08 mov 0x8(%edx),%eax 10b41d: 0f b7 d8 movzwl %ax,%ebx 10b420: 8b 0d bc 52 12 00 mov 0x1252bc,%ecx 10b426: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10b429: 89 72 0c mov %esi,0xc(%edx) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 10b42c: 89 07 mov %eax,(%edi) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 10b42e: e8 c5 1f 00 00 call 10d3f8 <_Thread_Enable_dispatch> 10b433: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b435: e9 25 ff ff ff jmp 10b35f 10b43a: 66 90 xchg %ax,%ax <== NOT EXECUTED CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10b43c: b8 09 00 00 00 mov $0x9,%eax 10b441: e9 19 ff ff ff jmp 10b35f 10b446: 66 90 xchg %ax,%ax <== NOT EXECUTED */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 10b448: 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; 10b44f: 31 c0 xor %eax,%eax 10b451: f6 c3 04 test $0x4,%bl 10b454: 0f 95 c0 setne %al 10b457: 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; 10b45a: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 10b461: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) _CORE_semaphore_Initialize( 10b468: 51 push %ecx 10b469: ff 75 0c pushl 0xc(%ebp) 10b46c: 8d 45 e0 lea -0x20(%ebp),%eax 10b46f: 50 push %eax 10b470: 8d 42 14 lea 0x14(%edx),%eax 10b473: 50 push %eax 10b474: 89 55 c4 mov %edx,-0x3c(%ebp) 10b477: e8 98 0d 00 00 call 10c214 <_CORE_semaphore_Initialize> 10b47c: 83 c4 10 add $0x10,%esp 10b47f: 8b 55 c4 mov -0x3c(%ebp),%edx 10b482: eb 96 jmp 10b41a _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 10b484: e8 6f 1f 00 00 call 10d3f8 <_Thread_Enable_dispatch> 10b489: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10b48e: e9 cc fe ff ff jmp 10b35f the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; 10b493: 8b 45 14 mov 0x14(%ebp),%eax 10b496: 89 45 dc mov %eax,-0x24(%ebp) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10b499: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b4a0: c6 45 d4 00 movb $0x0,-0x2c(%ebp) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 10b4a4: 83 7d d8 01 cmpl $0x1,-0x28(%ebp) 10b4a8: 0f 85 42 ff ff ff jne 10b3f0 if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 10b4ae: f6 c3 40 test $0x40,%bl 10b4b1: 74 30 je 10b4e3 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10b4b3: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b4ba: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b4be: e9 2d ff ff ff jmp 10b3f0 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b4c3: 83 ec 08 sub $0x8,%esp 10b4c6: 52 push %edx 10b4c7: 68 a0 52 12 00 push $0x1252a0 10b4cc: e8 af 15 00 00 call 10ca80 <_Objects_Free> (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 10b4d1: e8 22 1f 00 00 call 10d3f8 <_Thread_Enable_dispatch> 10b4d6: b8 13 00 00 00 mov $0x13,%eax return RTEMS_INVALID_PRIORITY; 10b4db: 83 c4 10 add $0x10,%esp 10b4de: e9 7c fe ff ff jmp 10b35f if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { if ( _Attributes_Is_inherit_priority( attribute_set ) ) { the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; the_mutex_attr.only_owner_release = true; } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { 10b4e3: 84 db test %bl,%bl 10b4e5: 0f 89 05 ff ff ff jns 10b3f0 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 10b4eb: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b4f2: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b4f6: e9 f5 fe ff ff jmp 10b3f0 0010b4fc : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 10b4fc: 55 push %ebp 10b4fd: 89 e5 mov %esp,%ebp 10b4ff: 53 push %ebx 10b500: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 10b503: 8d 45 f4 lea -0xc(%ebp),%eax 10b506: 50 push %eax 10b507: ff 75 08 pushl 0x8(%ebp) 10b50a: 68 a0 52 12 00 push $0x1252a0 10b50f: e8 9c 16 00 00 call 10cbb0 <_Objects_Get> 10b514: 89 c3 mov %eax,%ebx register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 10b516: 83 c4 10 add $0x10,%esp 10b519: 8b 4d f4 mov -0xc(%ebp),%ecx 10b51c: 85 c9 test %ecx,%ecx 10b51e: 74 0c je 10b52c 10b520: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b525: 8b 5d fc mov -0x4(%ebp),%ebx 10b528: c9 leave 10b529: c3 ret 10b52a: 66 90 xchg %ax,%ax <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); 10b52c: 8b 40 10 mov 0x10(%eax),%eax the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10b52f: 83 e0 30 and $0x30,%eax 10b532: 74 58 je 10b58c if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 10b534: 8b 53 64 mov 0x64(%ebx),%edx 10b537: 85 d2 test %edx,%edx 10b539: 75 15 jne 10b550 10b53b: 83 f8 20 cmp $0x20,%eax 10b53e: 74 10 je 10b550 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 10b540: e8 b3 1e 00 00 call 10d3f8 <_Thread_Enable_dispatch> 10b545: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b54a: 8b 5d fc mov -0x4(%ebp),%ebx 10b54d: c9 leave 10b54e: c3 ret 10b54f: 90 nop <== NOT EXECUTED !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 10b550: 50 push %eax 10b551: 6a 04 push $0x4 10b553: 6a 00 push $0x0 10b555: 8d 43 14 lea 0x14(%ebx),%eax 10b558: 50 push %eax 10b559: e8 06 0a 00 00 call 10bf64 <_CORE_mutex_Flush> 10b55e: 83 c4 10 add $0x10,%esp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 10b561: 83 ec 08 sub $0x8,%esp 10b564: 53 push %ebx 10b565: 68 a0 52 12 00 push $0x1252a0 10b56a: e8 0d 12 00 00 call 10c77c <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b56f: 58 pop %eax 10b570: 5a pop %edx 10b571: 53 push %ebx 10b572: 68 a0 52 12 00 push $0x1252a0 10b577: e8 04 15 00 00 call 10ca80 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 10b57c: e8 77 1e 00 00 call 10d3f8 <_Thread_Enable_dispatch> 10b581: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b583: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b586: 8b 5d fc mov -0x4(%ebp),%ebx 10b589: c9 leave 10b58a: c3 ret 10b58b: 90 nop <== NOT EXECUTED &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 10b58c: 51 push %ecx 10b58d: 6a 02 push $0x2 10b58f: 6a 00 push $0x0 10b591: 8d 43 14 lea 0x14(%ebx),%eax 10b594: 50 push %eax 10b595: e8 6e 0c 00 00 call 10c208 <_CORE_semaphore_Flush> 10b59a: 83 c4 10 add $0x10,%esp 10b59d: eb c2 jmp 10b561 0010b5a0 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 10b5a0: 55 push %ebp 10b5a1: 89 e5 mov %esp,%ebp 10b5a3: 57 push %edi 10b5a4: 56 push %esi 10b5a5: 53 push %ebx 10b5a6: 83 ec 1c sub $0x1c,%esp 10b5a9: 8b 5d 08 mov 0x8(%ebp),%ebx 10b5ac: 8b 75 0c mov 0xc(%ebp),%esi 10b5af: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Id id, Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) 10b5b2: 8d 45 e0 lea -0x20(%ebp),%eax 10b5b5: 50 push %eax 10b5b6: 8d 45 e4 lea -0x1c(%ebp),%eax 10b5b9: 50 push %eax 10b5ba: 53 push %ebx 10b5bb: 68 a0 52 12 00 push $0x1252a0 10b5c0: e8 93 15 00 00 call 10cb58 <_Objects_Get_isr_disable> register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { 10b5c5: 83 c4 10 add $0x10,%esp 10b5c8: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b5cb: 85 c9 test %ecx,%ecx 10b5cd: 74 0d je 10b5dc 10b5cf: b8 04 00 00 00 mov $0x4,%eax break; } return RTEMS_INVALID_ID; } 10b5d4: 8d 65 f4 lea -0xc(%ebp),%esp 10b5d7: 5b pop %ebx 10b5d8: 5e pop %esi 10b5d9: 5f pop %edi 10b5da: c9 leave 10b5db: c3 ret the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10b5dc: f6 40 10 30 testb $0x30,0x10(%eax) 10b5e0: 74 36 je 10b618 _CORE_mutex_Seize( 10b5e2: 83 ec 0c sub $0xc,%esp 10b5e5: ff 75 e0 pushl -0x20(%ebp) 10b5e8: 57 push %edi 10b5e9: 83 e6 01 and $0x1,%esi 10b5ec: 83 f6 01 xor $0x1,%esi 10b5ef: 56 push %esi 10b5f0: 53 push %ebx 10b5f1: 83 c0 14 add $0x14,%eax 10b5f4: 50 push %eax 10b5f5: e8 6e 0a 00 00 call 10c068 <_CORE_mutex_Seize> id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10b5fa: 83 c4 14 add $0x14,%esp 10b5fd: a1 18 54 12 00 mov 0x125418,%eax 10b602: ff 70 34 pushl 0x34(%eax) 10b605: e8 12 01 00 00 call 10b71c <_Semaphore_Translate_core_mutex_return_code> 10b60a: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b60d: 8d 65 f4 lea -0xc(%ebp),%esp 10b610: 5b pop %ebx 10b611: 5e pop %esi 10b612: 5f pop %edi 10b613: c9 leave 10b614: c3 ret 10b615: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10b618: 8b 15 18 54 12 00 mov 0x125418,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10b61e: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( the_semaphore->count != 0 ) { 10b625: 8b 48 5c mov 0x5c(%eax),%ecx 10b628: 85 c9 test %ecx,%ecx 10b62a: 75 2c jne 10b658 the_semaphore->count -= 1; _ISR_Enable( *level_p ); return; } if ( !wait ) { 10b62c: 83 e6 01 and $0x1,%esi 10b62f: 74 33 je 10b664 _ISR_Enable( *level_p ); 10b631: ff 75 e0 pushl -0x20(%ebp) 10b634: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 10b635: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 10b63c: 83 ec 0c sub $0xc,%esp 10b63f: a1 18 54 12 00 mov 0x125418,%eax 10b644: ff 70 34 pushl 0x34(%eax) 10b647: e8 e0 00 00 00 call 10b72c <_Semaphore_Translate_core_semaphore_return_code> 10b64c: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b64f: 8d 65 f4 lea -0xc(%ebp),%esp 10b652: 5b pop %ebx 10b653: 5e pop %esi 10b654: 5f pop %edi 10b655: c9 leave 10b656: c3 ret 10b657: 90 nop <== NOT EXECUTED /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( the_semaphore->count != 0 ) { the_semaphore->count -= 1; 10b658: 49 dec %ecx 10b659: 89 48 5c mov %ecx,0x5c(%eax) _ISR_Enable( *level_p ); 10b65c: ff 75 e0 pushl -0x20(%ebp) 10b65f: 9d popf 10b660: eb da jmp 10b63c 10b662: 66 90 xchg %ax,%ax <== NOT EXECUTED 10b664: 8b 0d 58 53 12 00 mov 0x125358,%ecx 10b66a: 41 inc %ecx 10b66b: 89 0d 58 53 12 00 mov %ecx,0x125358 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; 10b671: c7 40 44 01 00 00 00 movl $0x1,0x44(%eax) return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 10b678: 83 c0 14 add $0x14,%eax 10b67b: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10b67e: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( *level_p ); 10b681: ff 75 e0 pushl -0x20(%ebp) 10b684: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 10b685: 52 push %edx 10b686: 68 dc db 10 00 push $0x10dbdc 10b68b: 57 push %edi 10b68c: 50 push %eax 10b68d: e8 3a 22 00 00 call 10d8cc <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10b692: e8 61 1d 00 00 call 10d3f8 <_Thread_Enable_dispatch> 10b697: 83 c4 10 add $0x10,%esp 10b69a: eb a0 jmp 10b63c 0010b69c : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 10b69c: 55 push %ebp 10b69d: 89 e5 mov %esp,%ebp 10b69f: 53 push %ebx 10b6a0: 83 ec 18 sub $0x18,%esp 10b6a3: 8b 5d 08 mov 0x8(%ebp),%ebx RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 10b6a6: 8d 45 f4 lea -0xc(%ebp),%eax 10b6a9: 50 push %eax 10b6aa: 53 push %ebx 10b6ab: 68 a0 52 12 00 push $0x1252a0 10b6b0: e8 fb 14 00 00 call 10cbb0 <_Objects_Get> Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 10b6b5: 83 c4 10 add $0x10,%esp 10b6b8: 8b 55 f4 mov -0xc(%ebp),%edx 10b6bb: 85 d2 test %edx,%edx 10b6bd: 74 0d je 10b6cc 10b6bf: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b6c4: 8b 5d fc mov -0x4(%ebp),%ebx 10b6c7: c9 leave 10b6c8: c3 ret 10b6c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10b6cc: f6 40 10 30 testb $0x30,0x10(%eax) 10b6d0: 75 26 jne 10b6f8 MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); } else { semaphore_status = _CORE_semaphore_Surrender( 10b6d2: 52 push %edx 10b6d3: 6a 00 push $0x0 10b6d5: 53 push %ebx 10b6d6: 83 c0 14 add $0x14,%eax 10b6d9: 50 push %eax 10b6da: e8 75 0b 00 00 call 10c254 <_CORE_semaphore_Surrender> 10b6df: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b6e1: e8 12 1d 00 00 call 10d3f8 <_Thread_Enable_dispatch> return _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); 10b6e6: 89 1c 24 mov %ebx,(%esp) 10b6e9: e8 3e 00 00 00 call 10b72c <_Semaphore_Translate_core_semaphore_return_code> &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return 10b6ee: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b6f1: 8b 5d fc mov -0x4(%ebp),%ebx 10b6f4: c9 leave 10b6f5: c3 ret 10b6f6: 66 90 xchg %ax,%ax <== NOT EXECUTED the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { mutex_status = _CORE_mutex_Surrender( 10b6f8: 51 push %ecx 10b6f9: 6a 00 push $0x0 10b6fb: 53 push %ebx 10b6fc: 83 c0 14 add $0x14,%eax 10b6ff: 50 push %eax 10b700: e8 03 0a 00 00 call 10c108 <_CORE_mutex_Surrender> 10b705: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b707: e8 ec 1c 00 00 call 10d3f8 <_Thread_Enable_dispatch> return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 10b70c: 89 1c 24 mov %ebx,(%esp) 10b70f: e8 08 00 00 00 call 10b71c <_Semaphore_Translate_core_mutex_return_code> 10b714: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b717: 8b 5d fc mov -0x4(%ebp),%ebx 10b71a: c9 leave 10b71b: c3 ret 0010c63c : rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { 10c63c: 55 push %ebp 10c63d: 89 e5 mov %esp,%ebp 10c63f: 83 ec 08 sub $0x8,%esp 10c642: 8b 55 08 mov 0x8(%ebp),%edx RTEMS_API_Control *api; ASR_Information *asr; /* XXX normalize mode */ executing = _Thread_Executing; api = (RTEMS_API_Control*)executing->API_Extensions[ THREAD_API_RTEMS ]; 10c645: a1 d8 86 12 00 mov 0x1286d8,%eax 10c64a: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10c650: 8b 0d 18 86 12 00 mov 0x128618,%ecx 10c656: 41 inc %ecx 10c657: 89 0d 18 86 12 00 mov %ecx,0x128618 asr = &api->Signal; _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { 10c65d: 85 d2 test %edx,%edx 10c65f: 74 13 je 10c674 asr->mode_set = mode_set; 10c661: 8b 4d 0c mov 0xc(%ebp),%ecx 10c664: 89 48 10 mov %ecx,0x10(%eax) asr->handler = asr_handler; 10c667: 89 50 0c mov %edx,0xc(%eax) } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 10c66a: e8 45 20 00 00 call 10e6b4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10c66f: 31 c0 xor %eax,%eax 10c671: c9 leave 10c672: c3 ret 10c673: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 10c674: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 10c678: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 10c67f: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 10c686: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 10c68d: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 10c694: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) asr->mode_set = mode_set; asr->handler = asr_handler; } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 10c69b: e8 14 20 00 00 call 10e6b4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10c6a0: 31 c0 xor %eax,%eax 10c6a2: c9 leave 10c6a3: c3 ret 00117948 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 117948: 55 push %ebp 117949: 89 e5 mov %esp,%ebp 11794b: 53 push %ebx 11794c: 83 ec 14 sub $0x14,%esp 11794f: 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 ) 117952: 85 db test %ebx,%ebx 117954: 75 0a jne 117960 117956: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11795b: 8b 5d fc mov -0x4(%ebp),%ebx 11795e: c9 leave 11795f: c3 ret ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 117960: 83 ec 08 sub $0x8,%esp 117963: 8d 45 f4 lea -0xc(%ebp),%eax 117966: 50 push %eax 117967: ff 75 08 pushl 0x8(%ebp) 11796a: e8 f5 3a 00 00 call 11b464 <_Thread_Get> switch ( location ) { 11796f: 83 c4 10 add $0x10,%esp 117972: 8b 55 f4 mov -0xc(%ebp),%edx 117975: 85 d2 test %edx,%edx 117977: 74 0b je 117984 117979: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11797e: 8b 5d fc mov -0x4(%ebp),%ebx 117981: c9 leave 117982: c3 ret 117983: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 117984: 8b 90 f0 00 00 00 mov 0xf0(%eax),%edx asr = &api->Signal; 11798a: 8b 4a 0c mov 0xc(%edx),%ecx 11798d: 85 c9 test %ecx,%ecx 11798f: 74 43 je 1179d4 if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 117991: 80 7a 08 00 cmpb $0x0,0x8(%edx) 117995: 74 29 je 1179c0 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 117997: 9c pushf 117998: fa cli 117999: 59 pop %ecx *signal_set |= signals; 11799a: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 11799d: 51 push %ecx 11799e: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 11799f: c6 40 74 01 movb $0x1,0x74(%eax) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 1179a3: 8b 15 14 f8 13 00 mov 0x13f814,%edx 1179a9: 85 d2 test %edx,%edx 1179ab: 74 1b je 1179c8 1179ad: 3b 05 38 f8 13 00 cmp 0x13f838,%eax 1179b3: 75 13 jne 1179c8 _ISR_Signals_to_thread_executing = true; 1179b5: c6 05 e8 f8 13 00 01 movb $0x1,0x13f8e8 1179bc: eb 0a jmp 1179c8 1179be: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 1179c0: 9c pushf 1179c1: fa cli 1179c2: 58 pop %eax *signal_set |= signals; 1179c3: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 1179c6: 50 push %eax 1179c7: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 1179c8: e8 47 3a 00 00 call 11b414 <_Thread_Enable_dispatch> 1179cd: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1179cf: 8b 5d fc mov -0x4(%ebp),%ebx 1179d2: c9 leave 1179d3: c3 ret _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 1179d4: e8 3b 3a 00 00 call 11b414 <_Thread_Enable_dispatch> 1179d9: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; 1179de: e9 78 ff ff ff jmp 11795b 0010b73c : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { 10b73c: 55 push %ebp 10b73d: 89 e5 mov %esp,%ebp 10b73f: 57 push %edi 10b740: 56 push %esi 10b741: 53 push %ebx 10b742: 83 ec 1c sub $0x1c,%esp 10b745: 8b 5d 08 mov 0x8(%ebp),%ebx 10b748: 8b 4d 0c mov 0xc(%ebp),%ecx 10b74b: 8b 7d 18 mov 0x18(%ebp),%edi 10b74e: 8b 75 1c mov 0x1c(%ebp),%esi Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10b751: 85 f6 test %esi,%esi 10b753: 0f 84 37 01 00 00 je 10b890 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10b759: 85 db test %ebx,%ebx 10b75b: 0f 84 cb 00 00 00 je 10b82c /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 10b761: 66 85 ff test %di,%di 10b764: 78 1d js 10b783 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10b766: 85 c9 test %ecx,%ecx 10b768: 75 0e jne 10b778 } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; 10b76a: b8 13 00 00 00 mov $0x13,%eax } 10b76f: 8d 65 f4 lea -0xc(%ebp),%esp 10b772: 5b pop %ebx 10b773: 5e pop %esi 10b774: 5f pop %edi 10b775: c9 leave 10b776: c3 ret 10b777: 90 nop <== NOT EXECUTED 10b778: 0f b6 05 14 12 12 00 movzbl 0x121214,%eax 10b77f: 39 c1 cmp %eax,%ecx 10b781: 77 e7 ja 10b76a */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10b783: 83 ec 0c sub $0xc,%esp 10b786: ff 35 10 54 12 00 pushl 0x125410 10b78c: 89 4d e4 mov %ecx,-0x1c(%ebp) 10b78f: e8 60 06 00 00 call 10bdf4 <_API_Mutex_Lock> * This function allocates a task control block from * the inactive chain of free task control blocks. */ RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information ); 10b794: c7 04 24 e0 52 12 00 movl $0x1252e0,(%esp) 10b79b: e8 60 0f 00 00 call 10c700 <_Objects_Allocate> 10b7a0: 89 c2 mov %eax,%edx * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 10b7a2: 83 c4 10 add $0x10,%esp 10b7a5: 85 c0 test %eax,%eax 10b7a7: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b7aa: 0f 84 c0 00 00 00 je 10b870 /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 10b7b0: 50 push %eax 10b7b1: 53 push %ebx 10b7b2: 8b 45 14 mov 0x14(%ebp),%eax 10b7b5: 83 e0 01 and $0x1,%eax 10b7b8: 50 push %eax 10b7b9: 6a 00 push $0x0 10b7bb: 8b 45 14 mov 0x14(%ebp),%eax 10b7be: c1 e8 09 shr $0x9,%eax 10b7c1: 83 e0 01 and $0x1,%eax 10b7c4: 50 push %eax 10b7c5: 8b 45 14 mov 0x14(%ebp),%eax 10b7c8: c1 e8 08 shr $0x8,%eax 10b7cb: 83 f0 01 xor $0x1,%eax 10b7ce: 83 e0 01 and $0x1,%eax 10b7d1: 50 push %eax 10b7d2: 51 push %ecx 10b7d3: 83 e7 01 and $0x1,%edi 10b7d6: 57 push %edi 10b7d7: ff 75 10 pushl 0x10(%ebp) 10b7da: 6a 00 push $0x0 10b7dc: 52 push %edx 10b7dd: 68 e0 52 12 00 push $0x1252e0 10b7e2: 89 55 e4 mov %edx,-0x1c(%ebp) 10b7e5: e8 aa 1c 00 00 call 10d494 <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 10b7ea: 83 c4 30 add $0x30,%esp 10b7ed: 84 c0 test %al,%al 10b7ef: 8b 55 e4 mov -0x1c(%ebp),%edx 10b7f2: 74 48 je 10b83c } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 10b7f4: 8b 8a f0 00 00 00 mov 0xf0(%edx),%ecx 10b7fa: 8b 45 14 mov 0x14(%ebp),%eax 10b7fd: c1 e8 0a shr $0xa,%eax 10b800: 83 f0 01 xor $0x1,%eax 10b803: 83 e0 01 and $0x1,%eax 10b806: 88 41 08 mov %al,0x8(%ecx) *id = the_thread->Object.id; 10b809: 8b 42 08 mov 0x8(%edx),%eax 10b80c: 89 06 mov %eax,(%esi) ); } #endif _RTEMS_Unlock_allocator(); 10b80e: 83 ec 0c sub $0xc,%esp 10b811: ff 35 10 54 12 00 pushl 0x125410 10b817: e8 20 06 00 00 call 10be3c <_API_Mutex_Unlock> 10b81c: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b81e: 83 c4 10 add $0x10,%esp } 10b821: 8d 65 f4 lea -0xc(%ebp),%esp 10b824: 5b pop %ebx 10b825: 5e pop %esi 10b826: 5f pop %edi 10b827: c9 leave 10b828: c3 ret 10b829: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10b82c: b8 03 00 00 00 mov $0x3,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b831: 8d 65 f4 lea -0xc(%ebp),%esp 10b834: 5b pop %ebx 10b835: 5e pop %esi 10b836: 5f pop %edi 10b837: c9 leave 10b838: c3 ret 10b839: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 10b83c: 83 ec 0c sub $0xc,%esp 10b83f: ff 72 08 pushl 0x8(%edx) 10b842: e8 a9 12 00 00 call 10caf0 <_Objects_Get_information_id> 10b847: 5a pop %edx 10b848: 59 pop %ecx 10b849: 8b 55 e4 mov -0x1c(%ebp),%edx 10b84c: 52 push %edx 10b84d: 50 push %eax 10b84e: e8 2d 12 00 00 call 10ca80 <_Objects_Free> #if defined(RTEMS_MULTIPROCESSING) if ( is_global ) _Objects_MP_Free_global_object( the_global_object ); #endif _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10b853: 58 pop %eax 10b854: ff 35 10 54 12 00 pushl 0x125410 10b85a: e8 dd 05 00 00 call 10be3c <_API_Mutex_Unlock> 10b85f: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 10b864: 83 c4 10 add $0x10,%esp } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b867: 8d 65 f4 lea -0xc(%ebp),%esp 10b86a: 5b pop %ebx 10b86b: 5e pop %esi 10b86c: 5f pop %edi 10b86d: c9 leave 10b86e: c3 ret 10b86f: 90 nop <== NOT EXECUTED */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10b870: 83 ec 0c sub $0xc,%esp 10b873: ff 35 10 54 12 00 pushl 0x125410 10b879: e8 be 05 00 00 call 10be3c <_API_Mutex_Unlock> 10b87e: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10b883: 83 c4 10 add $0x10,%esp } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b886: 8d 65 f4 lea -0xc(%ebp),%esp 10b889: 5b pop %ebx 10b88a: 5e pop %esi 10b88b: 5f pop %edi 10b88c: c9 leave 10b88d: c3 ret 10b88e: 66 90 xchg %ax,%ax <== NOT EXECUTED Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10b890: b8 09 00 00 00 mov $0x9,%eax 10b895: e9 d5 fe ff ff jmp 10b76f 0010b89c : */ rtems_status_code rtems_task_delete( rtems_id id ) { 10b89c: 55 push %ebp 10b89d: 89 e5 mov %esp,%ebp 10b89f: 53 push %ebx 10b8a0: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 10b8a3: ff 35 10 54 12 00 pushl 0x125410 10b8a9: e8 46 05 00 00 call 10bdf4 <_API_Mutex_Lock> the_thread = _Thread_Get( id, &location ); 10b8ae: 5a pop %edx 10b8af: 59 pop %ecx 10b8b0: 8d 45 f4 lea -0xc(%ebp),%eax 10b8b3: 50 push %eax 10b8b4: ff 75 08 pushl 0x8(%ebp) 10b8b7: e8 60 1b 00 00 call 10d41c <_Thread_Get> 10b8bc: 89 c3 mov %eax,%ebx switch ( location ) { 10b8be: 83 c4 10 add $0x10,%esp 10b8c1: 8b 45 f4 mov -0xc(%ebp),%eax 10b8c4: 85 c0 test %eax,%eax 10b8c6: 75 44 jne 10b90c case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 10b8c8: 83 ec 0c sub $0xc,%esp 10b8cb: ff 73 08 pushl 0x8(%ebx) 10b8ce: e8 1d 12 00 00 call 10caf0 <_Objects_Get_information_id> 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 10b8d3: 5a pop %edx 10b8d4: 59 pop %ecx 10b8d5: 53 push %ebx 10b8d6: 50 push %eax 10b8d7: e8 08 18 00 00 call 10d0e4 <_Thread_Close> 10b8dc: 58 pop %eax 10b8dd: ff 73 08 pushl 0x8(%ebx) 10b8e0: e8 0b 12 00 00 call 10caf0 <_Objects_Get_information_id> 10b8e5: 5a pop %edx 10b8e6: 59 pop %ecx 10b8e7: 53 push %ebx 10b8e8: 50 push %eax 10b8e9: e8 92 11 00 00 call 10ca80 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10b8ee: 58 pop %eax 10b8ef: ff 35 10 54 12 00 pushl 0x125410 10b8f5: e8 42 05 00 00 call 10be3c <_API_Mutex_Unlock> _Thread_Enable_dispatch(); 10b8fa: e8 f9 1a 00 00 call 10d3f8 <_Thread_Enable_dispatch> 10b8ff: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b901: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } 10b904: 8b 5d fc mov -0x4(%ebp),%ebx 10b907: c9 leave 10b908: c3 ret 10b909: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 10b90c: 83 ec 0c sub $0xc,%esp 10b90f: ff 35 10 54 12 00 pushl 0x125410 10b915: e8 22 05 00 00 call 10be3c <_API_Mutex_Unlock> 10b91a: b8 04 00 00 00 mov $0x4,%eax return RTEMS_INVALID_ID; 10b91f: 83 c4 10 add $0x10,%esp } 10b922: 8b 5d fc mov -0x4(%ebp),%ebx 10b925: c9 leave 10b926: c3 ret 0010d2e8 : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 10d2e8: 55 push %ebp 10d2e9: 89 e5 mov %esp,%ebp 10d2eb: 56 push %esi 10d2ec: 53 push %ebx 10d2ed: 83 ec 10 sub $0x10,%esp 10d2f0: 8b 45 08 mov 0x8(%ebp),%eax 10d2f3: 8b 75 0c mov 0xc(%ebp),%esi 10d2f6: 8b 5d 10 mov 0x10(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10d2f9: 80 3d e4 51 12 00 00 cmpb $0x0,0x1251e4 10d300: 74 6e je 10d370 return RTEMS_NOT_CONFIGURED; if ( !note ) 10d302: 85 db test %ebx,%ebx 10d304: 74 7e je 10d384 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 10d306: 83 fe 0f cmp $0xf,%esi 10d309: 77 3d ja 10d348 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d30b: 85 c0 test %eax,%eax 10d30d: 74 45 je 10d354 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d30f: 8b 15 f8 96 12 00 mov 0x1296f8,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d315: 3b 42 08 cmp 0x8(%edx),%eax 10d318: 74 40 je 10d35a api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d31a: 83 ec 08 sub $0x8,%esp 10d31d: 8d 55 f4 lea -0xc(%ebp),%edx 10d320: 52 push %edx 10d321: 50 push %eax 10d322: e8 49 1e 00 00 call 10f170 <_Thread_Get> switch ( location ) { 10d327: 83 c4 10 add $0x10,%esp 10d32a: 8b 55 f4 mov -0xc(%ebp),%edx 10d32d: 85 d2 test %edx,%edx 10d32f: 75 4b jne 10d37c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d331: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax <== NOT EXECUTED 10d337: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax <== NOT EXECUTED 10d33b: 89 03 mov %eax,(%ebx) <== NOT EXECUTED _Thread_Enable_dispatch(); 10d33d: e8 0a 1e 00 00 call 10f14c <_Thread_Enable_dispatch> <== NOT EXECUTED 10d342: 31 c0 xor %eax,%eax <== NOT EXECUTED return RTEMS_SUCCESSFUL; 10d344: eb 07 jmp 10d34d <== NOT EXECUTED 10d346: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 10d348: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d34d: 8d 65 f8 lea -0x8(%ebp),%esp 10d350: 5b pop %ebx 10d351: 5e pop %esi 10d352: c9 leave 10d353: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d354: 8b 15 f8 96 12 00 mov 0x1296f8,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d35a: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax 10d360: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d364: 89 03 mov %eax,(%ebx) 10d366: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d368: 8d 65 f8 lea -0x8(%ebp),%esp 10d36b: 5b pop %ebx 10d36c: 5e pop %esi 10d36d: c9 leave 10d36e: c3 ret 10d36f: 90 nop <== NOT EXECUTED { register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10d370: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d375: 8d 65 f8 lea -0x8(%ebp),%esp 10d378: 5b pop %ebx 10d379: 5e pop %esi 10d37a: c9 leave 10d37b: c3 ret *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 10d37c: b8 04 00 00 00 mov $0x4,%eax 10d381: eb ca jmp 10d34d 10d383: 90 nop <== NOT EXECUTED RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; if ( !note ) 10d384: b8 09 00 00 00 mov $0x9,%eax 10d389: eb c2 jmp 10d34d 0010b928 : rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, rtems_id *id ) { 10b928: 55 push %ebp 10b929: 89 e5 mov %esp,%ebp 10b92b: 83 ec 08 sub $0x8,%esp 10b92e: 8b 55 08 mov 0x8(%ebp),%edx 10b931: 8b 45 10 mov 0x10(%ebp),%eax Objects_Name_or_id_lookup_errors status; if ( !id ) 10b934: 85 c0 test %eax,%eax 10b936: 74 30 je 10b968 return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { 10b938: 85 d2 test %edx,%edx 10b93a: 75 10 jne 10b94c *id = _Thread_Executing->Object.id; 10b93c: 8b 15 18 54 12 00 mov 0x125418,%edx 10b942: 8b 52 08 mov 0x8(%edx),%edx 10b945: 89 10 mov %edx,(%eax) 10b947: 31 c0 xor %eax,%eax } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; } 10b949: c9 leave 10b94a: c3 ret 10b94b: 90 nop <== NOT EXECUTED if ( name == OBJECTS_ID_OF_SELF ) { *id = _Thread_Executing->Object.id; return RTEMS_SUCCESSFUL; } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); 10b94c: 50 push %eax 10b94d: ff 75 0c pushl 0xc(%ebp) 10b950: 52 push %edx 10b951: 68 e0 52 12 00 push $0x1252e0 10b956: e8 ad 13 00 00 call 10cd08 <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; 10b95b: 8b 04 85 0c fa 11 00 mov 0x11fa0c(,%eax,4),%eax 10b962: 83 c4 10 add $0x10,%esp } 10b965: c9 leave 10b966: c3 ret 10b967: 90 nop <== NOT EXECUTED rtems_id *id ) { Objects_Name_or_id_lookup_errors status; if ( !id ) 10b968: b0 09 mov $0x9,%al } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; } 10b96a: c9 leave 10b96b: c3 ret 00117d2c : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { 117d2c: 55 push %ebp 117d2d: 89 e5 mov %esp,%ebp 117d2f: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 117d32: 8d 45 f4 lea -0xc(%ebp),%eax 117d35: 50 push %eax 117d36: ff 75 08 pushl 0x8(%ebp) 117d39: e8 26 37 00 00 call 11b464 <_Thread_Get> switch ( location ) { 117d3e: 83 c4 10 add $0x10,%esp 117d41: 8b 55 f4 mov -0xc(%ebp),%edx 117d44: 85 d2 test %edx,%edx 117d46: 74 08 je 117d50 117d48: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117d4d: c9 leave 117d4e: c3 ret 117d4f: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 117d50: f6 40 10 02 testb $0x2,0x10(%eax) 117d54: 74 0e je 117d64 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 117d56: e8 b9 36 00 00 call 11b414 <_Thread_Enable_dispatch> 117d5b: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117d60: c9 leave 117d61: c3 ret 117d62: 66 90 xchg %ax,%ax <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Enable_dispatch(); 117d64: e8 ab 36 00 00 call 11b414 <_Thread_Enable_dispatch> 117d69: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117d6b: c9 leave 117d6c: c3 ret 00111a4c : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 111a4c: 55 push %ebp 111a4d: 89 e5 mov %esp,%ebp 111a4f: 57 push %edi 111a50: 56 push %esi 111a51: 53 push %ebx 111a52: 83 ec 1c sub $0x1c,%esp 111a55: 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 ) 111a58: 85 c9 test %ecx,%ecx 111a5a: 0f 84 1c 01 00 00 je 111b7c return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 111a60: 8b 1d 18 54 12 00 mov 0x125418,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 111a66: 8b bb f0 00 00 00 mov 0xf0(%ebx),%edi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 111a6c: 80 7b 75 01 cmpb $0x1,0x75(%ebx) 111a70: 19 f6 sbb %esi,%esi 111a72: 81 e6 00 01 00 00 and $0x100,%esi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 111a78: 8b 53 7c mov 0x7c(%ebx),%edx 111a7b: 85 d2 test %edx,%edx 111a7d: 0f 85 b5 00 00 00 jne 111b38 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 111a83: 80 7f 08 01 cmpb $0x1,0x8(%edi) 111a87: 19 d2 sbb %edx,%edx 111a89: 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(); 111a8f: 89 55 e4 mov %edx,-0x1c(%ebp) 111a92: 89 4d e0 mov %ecx,-0x20(%ebp) 111a95: e8 e2 cc ff ff call 10e77c <_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; 111a9a: 8b 55 e4 mov -0x1c(%ebp),%edx 111a9d: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 111a9f: 09 f0 or %esi,%eax 111aa1: 8b 4d e0 mov -0x20(%ebp),%ecx 111aa4: 89 01 mov %eax,(%ecx) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 111aa6: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 111aad: 74 0f je 111abe executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 111aaf: 8b 45 08 mov 0x8(%ebp),%eax 111ab2: c1 e8 08 shr $0x8,%eax 111ab5: 83 f0 01 xor $0x1,%eax 111ab8: 83 e0 01 and $0x1,%eax 111abb: 88 43 75 mov %al,0x75(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 111abe: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 111ac5: 74 18 je 111adf if ( _Modes_Is_timeslice(mode_set) ) { 111ac7: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 111ace: 74 74 je 111b44 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 111ad0: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 111ad7: a1 24 53 12 00 mov 0x125324,%eax 111adc: 89 43 78 mov %eax,0x78(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 111adf: f6 45 0c 01 testb $0x1,0xc(%ebp) 111ae3: 74 07 je 111aec */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 111ae5: f6 45 08 01 testb $0x1,0x8(%ebp) 111ae9: 74 69 je 111b54 111aeb: fa cli */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 111aec: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 111af3: 74 2c je 111b21 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 111af5: 8b 45 08 mov 0x8(%ebp),%eax 111af8: c1 e8 0a shr $0xa,%eax 111afb: 83 f0 01 xor $0x1,%eax 111afe: 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; 111b01: 38 47 08 cmp %al,0x8(%edi) 111b04: 74 1b je 111b21 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; 111b06: 88 47 08 mov %al,0x8(%edi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 111b09: 9c pushf 111b0a: fa cli 111b0b: 58 pop %eax _signals = information->signals_pending; 111b0c: 8b 57 18 mov 0x18(%edi),%edx information->signals_pending = information->signals_posted; 111b0f: 8b 4f 14 mov 0x14(%edi),%ecx 111b12: 89 4f 18 mov %ecx,0x18(%edi) information->signals_posted = _signals; 111b15: 89 57 14 mov %edx,0x14(%edi) _ISR_Enable( _level ); 111b18: 50 push %eax 111b19: 9d popf if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 111b1a: 8b 47 14 mov 0x14(%edi),%eax 111b1d: 85 c0 test %eax,%eax 111b1f: 75 53 jne 111b74 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; 111b21: 31 db xor %ebx,%ebx } } } if ( _System_state_Is_up( _System_state_Get() ) ) 111b23: 83 3d 20 55 12 00 03 cmpl $0x3,0x125520 111b2a: 74 2c je 111b58 if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); 111b2c: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 111b2e: 83 c4 1c add $0x1c,%esp 111b31: 5b pop %ebx 111b32: 5e pop %esi 111b33: 5f pop %edi 111b34: c9 leave 111b35: c3 ret 111b36: 66 90 xchg %ax,%ax <== NOT EXECUTED old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 111b38: 81 ce 00 02 00 00 or $0x200,%esi 111b3e: e9 40 ff ff ff jmp 111a83 111b43: 90 nop <== NOT EXECUTED if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 111b44: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 111b4b: f6 45 0c 01 testb $0x1,0xc(%ebp) 111b4f: 74 9b je 111aec 111b51: eb 92 jmp 111ae5 111b53: 90 nop <== NOT EXECUTED 111b54: fb sti 111b55: eb 95 jmp 111aec 111b57: 90 nop <== NOT EXECUTED } } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 111b58: e8 93 02 00 00 call 111df0 <_Thread_Evaluate_mode> 111b5d: 84 c0 test %al,%al 111b5f: 75 04 jne 111b65 111b61: 84 db test %bl,%bl 111b63: 74 c7 je 111b2c _Thread_Dispatch(); 111b65: e8 32 b7 ff ff call 10d29c <_Thread_Dispatch> 111b6a: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 111b6c: 83 c4 1c add $0x1c,%esp 111b6f: 5b pop %ebx 111b70: 5e pop %esi 111b71: 5f pop %edi 111b72: c9 leave 111b73: c3 ret 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; 111b74: c6 43 74 01 movb $0x1,0x74(%ebx) 111b78: b3 01 mov $0x1,%bl 111b7a: eb a7 jmp 111b23 ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 111b7c: b8 09 00 00 00 mov $0x9,%eax if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 111b81: 83 c4 1c add $0x1c,%esp 111b84: 5b pop %ebx 111b85: 5e pop %esi 111b86: 5f pop %edi 111b87: c9 leave 111b88: c3 ret 0010c3ac : rtems_status_code rtems_task_restart( rtems_id id, uint32_t argument ) { 10c3ac: 55 push %ebp 10c3ad: 89 e5 mov %esp,%ebp 10c3af: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c3b2: 8d 45 f4 lea -0xc(%ebp),%eax 10c3b5: 50 push %eax 10c3b6: ff 75 08 pushl 0x8(%ebp) 10c3b9: e8 36 1b 00 00 call 10def4 <_Thread_Get> switch ( location ) { 10c3be: 83 c4 10 add $0x10,%esp 10c3c1: 8b 4d f4 mov -0xc(%ebp),%ecx 10c3c4: 85 c9 test %ecx,%ecx 10c3c6: 75 20 jne 10c3e8 case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { 10c3c8: 52 push %edx 10c3c9: ff 75 0c pushl 0xc(%ebp) 10c3cc: 6a 00 push $0x0 10c3ce: 50 push %eax 10c3cf: e8 18 23 00 00 call 10e6ec <_Thread_Restart> 10c3d4: 83 c4 10 add $0x10,%esp 10c3d7: 84 c0 test %al,%al 10c3d9: 75 15 jne 10c3f0 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10c3db: e8 f0 1a 00 00 call 10ded0 <_Thread_Enable_dispatch> 10c3e0: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c3e5: c9 leave 10c3e6: c3 ret 10c3e7: 90 nop <== NOT EXECUTED { register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 10c3e8: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c3ed: c9 leave 10c3ee: c3 ret 10c3ef: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { _Thread_Enable_dispatch(); 10c3f0: e8 db 1a 00 00 call 10ded0 <_Thread_Enable_dispatch> 10c3f5: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c3f7: c9 leave 10c3f8: c3 ret 0010f11c : */ rtems_status_code rtems_task_resume( rtems_id id ) { 10f11c: 55 push %ebp 10f11d: 89 e5 mov %esp,%ebp 10f11f: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10f122: 8d 45 f4 lea -0xc(%ebp),%eax 10f125: 50 push %eax 10f126: ff 75 08 pushl 0x8(%ebp) 10f129: e8 16 1c 00 00 call 110d44 <_Thread_Get> switch ( location ) { 10f12e: 83 c4 10 add $0x10,%esp 10f131: 8b 55 f4 mov -0xc(%ebp),%edx 10f134: 85 d2 test %edx,%edx 10f136: 74 08 je 10f140 10f138: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f13d: c9 leave 10f13e: c3 ret 10f13f: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 10f140: f6 40 10 02 testb $0x2,0x10(%eax) 10f144: 75 0e jne 10f154 _Thread_Resume( the_thread, true ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10f146: e8 a9 1b 00 00 call 110cf4 <_Thread_Enable_dispatch> 10f14b: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f150: c9 leave 10f151: c3 ret 10f152: 66 90 xchg %ax,%ax <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { _Thread_Resume( the_thread, true ); 10f154: 83 ec 08 sub $0x8,%esp 10f157: 6a 01 push $0x1 10f159: 50 push %eax 10f15a: e8 dd 23 00 00 call 11153c <_Thread_Resume> _Thread_Enable_dispatch(); 10f15f: e8 90 1b 00 00 call 110cf4 <_Thread_Enable_dispatch> 10f164: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f166: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f169: c9 leave 10f16a: c3 ret 0010d460 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 10d460: 55 push %ebp 10d461: 89 e5 mov %esp,%ebp 10d463: 56 push %esi 10d464: 53 push %ebx 10d465: 83 ec 10 sub $0x10,%esp 10d468: 8b 45 08 mov 0x8(%ebp),%eax 10d46b: 8b 5d 0c mov 0xc(%ebp),%ebx 10d46e: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10d471: 80 3d e4 51 12 00 00 cmpb $0x0,0x1251e4 10d478: 74 66 je 10d4e0 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 10d47a: 83 fb 0f cmp $0xf,%ebx 10d47d: 77 39 ja 10d4b8 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d47f: 85 c0 test %eax,%eax 10d481: 74 41 je 10d4c4 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d483: 8b 15 f8 96 12 00 mov 0x1296f8,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d489: 3b 42 08 cmp 0x8(%edx),%eax 10d48c: 74 3c je 10d4ca api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d48e: 83 ec 08 sub $0x8,%esp 10d491: 8d 55 f4 lea -0xc(%ebp),%edx 10d494: 52 push %edx 10d495: 50 push %eax 10d496: e8 d5 1c 00 00 call 10f170 <_Thread_Get> switch ( location ) { 10d49b: 83 c4 10 add $0x10,%esp 10d49e: 8b 55 f4 mov -0xc(%ebp),%edx 10d4a1: 85 d2 test %edx,%edx 10d4a3: 75 47 jne 10d4ec case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d4a5: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10d4ab: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) _Thread_Enable_dispatch(); 10d4af: e8 98 1c 00 00 call 10f14c <_Thread_Enable_dispatch> 10d4b4: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10d4b6: eb 05 jmp 10d4bd /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 10d4b8: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d4bd: 8d 65 f8 lea -0x8(%ebp),%esp 10d4c0: 5b pop %ebx 10d4c1: 5e pop %esi 10d4c2: c9 leave 10d4c3: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d4c4: 8b 15 f8 96 12 00 mov 0x1296f8,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d4ca: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax 10d4d0: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) 10d4d4: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d4d6: 8d 65 f8 lea -0x8(%ebp),%esp 10d4d9: 5b pop %ebx 10d4da: 5e pop %esi 10d4db: c9 leave 10d4dc: c3 ret 10d4dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10d4e0: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d4e5: 8d 65 f8 lea -0x8(%ebp),%esp 10d4e8: 5b pop %ebx 10d4e9: 5e pop %esi 10d4ea: c9 leave 10d4eb: c3 ret api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 10d4ec: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d4f1: 8d 65 f8 lea -0x8(%ebp),%esp 10d4f4: 5b pop %ebx 10d4f5: 5e pop %esi 10d4f6: c9 leave 10d4f7: c3 ret 0010fdd8 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10fdd8: 55 push %ebp 10fdd9: 89 e5 mov %esp,%ebp 10fddb: 56 push %esi 10fddc: 53 push %ebx 10fddd: 83 ec 10 sub $0x10,%esp 10fde0: 8b 5d 0c mov 0xc(%ebp),%ebx 10fde3: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10fde6: 85 db test %ebx,%ebx 10fde8: 74 0b je 10fdf5 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10fdea: 0f b6 05 b4 77 12 00 movzbl 0x1277b4,%eax 10fdf1: 39 c3 cmp %eax,%ebx 10fdf3: 77 5f ja 10fe54 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10fdf5: 85 f6 test %esi,%esi 10fdf7: 74 67 je 10fe60 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10fdf9: 83 ec 08 sub $0x8,%esp 10fdfc: 8d 45 f4 lea -0xc(%ebp),%eax 10fdff: 50 push %eax 10fe00: ff 75 08 pushl 0x8(%ebp) 10fe03: e8 6c 1d 00 00 call 111b74 <_Thread_Get> switch ( location ) { 10fe08: 83 c4 10 add $0x10,%esp 10fe0b: 8b 55 f4 mov -0xc(%ebp),%edx 10fe0e: 85 d2 test %edx,%edx 10fe10: 75 36 jne 10fe48 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10fe12: 8b 50 14 mov 0x14(%eax),%edx 10fe15: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10fe17: 85 db test %ebx,%ebx 10fe19: 74 1c je 10fe37 the_thread->real_priority = new_priority; 10fe1b: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10fe1e: 8b 48 1c mov 0x1c(%eax),%ecx 10fe21: 85 c9 test %ecx,%ecx 10fe23: 74 05 je 10fe2a the_thread->current_priority > new_priority ) 10fe25: 3b 58 14 cmp 0x14(%eax),%ebx 10fe28: 73 0d jae 10fe37 _Thread_Change_priority( the_thread, new_priority, false ); 10fe2a: 52 push %edx 10fe2b: 6a 00 push $0x0 10fe2d: 53 push %ebx 10fe2e: 50 push %eax 10fe2f: e8 08 18 00 00 call 11163c <_Thread_Change_priority> 10fe34: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10fe37: e8 e8 1c 00 00 call 111b24 <_Thread_Enable_dispatch> 10fe3c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fe3e: 8d 65 f8 lea -0x8(%ebp),%esp 10fe41: 5b pop %ebx 10fe42: 5e pop %esi 10fe43: c9 leave 10fe44: c3 ret 10fe45: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !old_priority ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 10fe48: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fe4d: 8d 65 f8 lea -0x8(%ebp),%esp 10fe50: 5b pop %ebx 10fe51: 5e pop %esi 10fe52: c9 leave 10fe53: c3 ret 10fe54: b8 13 00 00 00 mov $0x13,%eax 10fe59: 8d 65 f8 lea -0x8(%ebp),%esp 10fe5c: 5b pop %ebx 10fe5d: 5e pop %esi 10fe5e: c9 leave 10fe5f: c3 ret if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10fe60: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fe65: 8d 65 f8 lea -0x8(%ebp),%esp 10fe68: 5b pop %ebx 10fe69: 5e pop %esi 10fe6a: c9 leave 10fe6b: c3 ret 0010b9e0 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 10b9e0: 55 push %ebp 10b9e1: 89 e5 mov %esp,%ebp 10b9e3: 53 push %ebx 10b9e4: 83 ec 14 sub $0x14,%esp 10b9e7: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10b9ea: 85 db test %ebx,%ebx 10b9ec: 74 4e je 10ba3c return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10b9ee: 83 ec 08 sub $0x8,%esp 10b9f1: 8d 45 f4 lea -0xc(%ebp),%eax 10b9f4: 50 push %eax 10b9f5: ff 75 08 pushl 0x8(%ebp) 10b9f8: e8 1f 1a 00 00 call 10d41c <_Thread_Get> switch ( location ) { 10b9fd: 83 c4 10 add $0x10,%esp 10ba00: 8b 55 f4 mov -0xc(%ebp),%edx 10ba03: 85 d2 test %edx,%edx 10ba05: 75 29 jne 10ba30 case OBJECTS_LOCAL: if ( _Thread_Start( 10ba07: 83 ec 0c sub $0xc,%esp 10ba0a: ff 75 10 pushl 0x10(%ebp) 10ba0d: 6a 00 push $0x0 10ba0f: 53 push %ebx 10ba10: 6a 00 push $0x0 10ba12: 50 push %eax 10ba13: e8 a8 24 00 00 call 10dec0 <_Thread_Start> 10ba18: 83 c4 20 add $0x20,%esp 10ba1b: 84 c0 test %al,%al 10ba1d: 75 29 jne 10ba48 the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10ba1f: e8 d4 19 00 00 call 10d3f8 <_Thread_Enable_dispatch> 10ba24: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba29: 8b 5d fc mov -0x4(%ebp),%ebx 10ba2c: c9 leave 10ba2d: c3 ret 10ba2e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 10ba30: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba35: 8b 5d fc mov -0x4(%ebp),%ebx 10ba38: c9 leave 10ba39: c3 ret 10ba3a: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10ba3c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba41: 8b 5d fc mov -0x4(%ebp),%ebx 10ba44: c9 leave 10ba45: c3 ret 10ba46: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Start( the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); 10ba48: e8 ab 19 00 00 call 10d3f8 <_Thread_Enable_dispatch> 10ba4d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba4f: 8b 5d fc mov -0x4(%ebp),%ebx 10ba52: c9 leave 10ba53: c3 ret 0010ff04 : */ rtems_status_code rtems_task_suspend( rtems_id id ) { 10ff04: 55 push %ebp 10ff05: 89 e5 mov %esp,%ebp 10ff07: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10ff0a: 8d 45 f4 lea -0xc(%ebp),%eax 10ff0d: 50 push %eax 10ff0e: ff 75 08 pushl 0x8(%ebp) 10ff11: e8 06 d5 ff ff call 10d41c <_Thread_Get> switch ( location ) { 10ff16: 83 c4 10 add $0x10,%esp 10ff19: 8b 55 f4 mov -0xc(%ebp),%edx 10ff1c: 85 d2 test %edx,%edx 10ff1e: 74 08 je 10ff28 10ff20: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ff25: c9 leave 10ff26: c3 ret 10ff27: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 10ff28: f6 40 10 02 testb $0x2,0x10(%eax) 10ff2c: 74 0e je 10ff3c _Thread_Suspend( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10ff2e: e8 c5 d4 ff ff call 10d3f8 <_Thread_Enable_dispatch> 10ff33: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ff38: c9 leave 10ff39: c3 ret 10ff3a: 66 90 xchg %ax,%ax <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Suspend( the_thread ); 10ff3c: 83 ec 0c sub $0xc,%esp 10ff3f: 50 push %eax 10ff40: e8 f3 09 00 00 call 110938 <_Thread_Suspend> _Thread_Enable_dispatch(); 10ff45: e8 ae d4 ff ff call 10d3f8 <_Thread_Enable_dispatch> 10ff4a: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10ff4c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ff4f: c9 leave 10ff50: c3 ret 0012d964 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 12d964: 55 push %ebp 12d965: 89 e5 mov %esp,%ebp 12d967: 57 push %edi 12d968: 56 push %esi 12d969: 53 push %ebx 12d96a: 83 ec 1c sub $0x1c,%esp 12d96d: 8b 5d 0c mov 0xc(%ebp),%ebx 12d970: 8b 7d 10 mov 0x10(%ebp),%edi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 12d973: 85 db test %ebx,%ebx 12d975: 0f 84 9d 00 00 00 je 12da18 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 12d97b: 83 ec 08 sub $0x8,%esp 12d97e: 8d 45 e4 lea -0x1c(%ebp),%eax 12d981: 50 push %eax 12d982: ff 75 08 pushl 0x8(%ebp) 12d985: e8 32 5e fe ff call 1137bc <_Thread_Get> 12d98a: 89 c6 mov %eax,%esi switch (location) { 12d98c: 83 c4 10 add $0x10,%esp 12d98f: 8b 45 e4 mov -0x1c(%ebp),%eax 12d992: 85 c0 test %eax,%eax 12d994: 74 0e je 12d9a4 12d996: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12d99b: 8d 65 f4 lea -0xc(%ebp),%esp 12d99e: 5b pop %ebx 12d99f: 5e pop %esi 12d9a0: 5f pop %edi 12d9a1: c9 leave 12d9a2: c3 ret 12d9a3: 90 nop <== NOT EXECUTED case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 12d9a4: 8b 86 00 01 00 00 mov 0x100(%esi),%eax while (tvp) { 12d9aa: 85 c0 test %eax,%eax 12d9ac: 75 44 jne 12d9f2 12d9ae: 66 90 xchg %ax,%ax } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 12d9b0: 83 ec 0c sub $0xc,%esp 12d9b3: 6a 14 push $0x14 12d9b5: e8 f2 6e fe ff call 1148ac <_Workspace_Allocate> _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 12d9ba: 83 c4 10 add $0x10,%esp 12d9bd: 85 c0 test %eax,%eax 12d9bf: 74 4b je 12da0c _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 12d9c1: 8b 13 mov (%ebx),%edx 12d9c3: 89 50 08 mov %edx,0x8(%eax) new->ptr = ptr; 12d9c6: 89 58 04 mov %ebx,0x4(%eax) new->dtor = dtor; 12d9c9: 89 78 10 mov %edi,0x10(%eax) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 12d9cc: 8b 96 00 01 00 00 mov 0x100(%esi),%edx 12d9d2: 89 10 mov %edx,(%eax) the_thread->task_variables = new; 12d9d4: 89 86 00 01 00 00 mov %eax,0x100(%esi) _Thread_Enable_dispatch(); 12d9da: e8 b9 5d fe ff call 113798 <_Thread_Enable_dispatch> 12d9df: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12d9e1: 8d 65 f4 lea -0xc(%ebp),%esp 12d9e4: 5b pop %ebx 12d9e5: 5e pop %esi 12d9e6: 5f pop %edi 12d9e7: c9 leave 12d9e8: c3 ret 12d9e9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (tvp->ptr == ptr) { tvp->dtor = dtor; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 12d9ec: 8b 00 mov (%eax),%eax case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 12d9ee: 85 c0 test %eax,%eax 12d9f0: 74 be je 12d9b0 if (tvp->ptr == ptr) { 12d9f2: 39 58 04 cmp %ebx,0x4(%eax) 12d9f5: 75 f5 jne 12d9ec tvp->dtor = dtor; 12d9f7: 89 78 10 mov %edi,0x10(%eax) _Thread_Enable_dispatch(); 12d9fa: e8 99 5d fe ff call 113798 <_Thread_Enable_dispatch> 12d9ff: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12da01: 8d 65 f4 lea -0xc(%ebp),%esp 12da04: 5b pop %ebx 12da05: 5e pop %esi 12da06: 5f pop %edi 12da07: c9 leave 12da08: c3 ret 12da09: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); 12da0c: e8 87 5d fe ff call 113798 <_Thread_Enable_dispatch> 12da11: b8 1a 00 00 00 mov $0x1a,%eax return RTEMS_NO_MEMORY; 12da16: eb 83 jmp 12d99b { Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 12da18: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12da1d: 8d 65 f4 lea -0xc(%ebp),%esp 12da20: 5b pop %ebx 12da21: 5e pop %esi 12da22: 5f pop %edi 12da23: c9 leave 12da24: c3 ret 0012da28 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 12da28: 55 push %ebp 12da29: 89 e5 mov %esp,%ebp 12da2b: 53 push %ebx 12da2c: 83 ec 14 sub $0x14,%esp 12da2f: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 12da32: 85 db test %ebx,%ebx 12da34: 74 4c je 12da82 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 12da36: 83 ec 08 sub $0x8,%esp 12da39: 8d 45 f4 lea -0xc(%ebp),%eax 12da3c: 50 push %eax 12da3d: ff 75 08 pushl 0x8(%ebp) 12da40: e8 77 5d fe ff call 1137bc <_Thread_Get> switch (location) { 12da45: 83 c4 10 add $0x10,%esp 12da48: 8b 55 f4 mov -0xc(%ebp),%edx 12da4b: 85 d2 test %edx,%edx 12da4d: 74 0d je 12da5c 12da4f: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12da54: 8b 5d fc mov -0x4(%ebp),%ebx 12da57: c9 leave 12da58: c3 ret 12da59: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; 12da5c: 8b 90 00 01 00 00 mov 0x100(%eax),%edx while (tvp) { 12da62: 85 d2 test %edx,%edx 12da64: 74 17 je 12da7d if (tvp->ptr == ptr) { 12da66: 39 5a 04 cmp %ebx,0x4(%edx) 12da69: 75 0a jne 12da75 12da6b: eb 3c jmp 12daa9 12da6d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 12da70: 39 5a 04 cmp %ebx,0x4(%edx) 12da73: 74 17 je 12da8c else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 12da75: 89 d1 mov %edx,%ecx } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 12da77: 8b 12 mov (%edx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 12da79: 85 d2 test %edx,%edx 12da7b: 75 f3 jne 12da70 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 12da7d: e8 16 5d fe ff call 113798 <_Thread_Enable_dispatch> 12da82: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12da87: 8b 5d fc mov -0x4(%ebp),%ebx 12da8a: c9 leave 12da8b: c3 ret case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 12da8c: 8b 1a mov (%edx),%ebx 12da8e: 89 19 mov %ebx,(%ecx) else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 12da90: 83 ec 08 sub $0x8,%esp 12da93: 52 push %edx 12da94: 50 push %eax 12da95: e8 a2 00 00 00 call 12db3c <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 12da9a: e8 f9 5c fe ff call 113798 <_Thread_Enable_dispatch> 12da9f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 12daa1: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12daa4: 8b 5d fc mov -0x4(%ebp),%ebx 12daa7: c9 leave 12daa8: c3 ret while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 12daa9: 8b 0a mov (%edx),%ecx 12daab: 89 88 00 01 00 00 mov %ecx,0x100(%eax) 12dab1: eb dd jmp 12da90 0012dab4 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 12dab4: 55 push %ebp 12dab5: 89 e5 mov %esp,%ebp 12dab7: 56 push %esi 12dab8: 53 push %ebx 12dab9: 83 ec 10 sub $0x10,%esp 12dabc: 8b 5d 0c mov 0xc(%ebp),%ebx 12dabf: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 12dac2: 85 db test %ebx,%ebx 12dac4: 74 56 je 12db1c return RTEMS_INVALID_ADDRESS; if ( !result ) 12dac6: 85 f6 test %esi,%esi 12dac8: 74 52 je 12db1c return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 12daca: 83 ec 08 sub $0x8,%esp 12dacd: 8d 45 f4 lea -0xc(%ebp),%eax 12dad0: 50 push %eax 12dad1: ff 75 08 pushl 0x8(%ebp) 12dad4: e8 e3 5c fe ff call 1137bc <_Thread_Get> switch (location) { 12dad9: 83 c4 10 add $0x10,%esp 12dadc: 8b 55 f4 mov -0xc(%ebp),%edx 12dadf: 85 d2 test %edx,%edx 12dae1: 75 2d jne 12db10 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 12dae3: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 12dae9: 85 c0 test %eax,%eax 12daeb: 75 09 jne 12daf6 12daed: eb 39 jmp 12db28 12daef: 90 nop <== NOT EXECUTED */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 12daf0: 8b 00 mov (%eax),%eax case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 12daf2: 85 c0 test %eax,%eax 12daf4: 74 32 je 12db28 if (tvp->ptr == ptr) { 12daf6: 39 58 04 cmp %ebx,0x4(%eax) 12daf9: 75 f5 jne 12daf0 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 12dafb: 8b 40 0c mov 0xc(%eax),%eax 12dafe: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 12db00: e8 93 5c fe ff call 113798 <_Thread_Enable_dispatch> 12db05: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12db07: 8d 65 f8 lea -0x8(%ebp),%esp 12db0a: 5b pop %ebx 12db0b: 5e pop %esi 12db0c: c9 leave 12db0d: c3 ret 12db0e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 12db10: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12db15: 8d 65 f8 lea -0x8(%ebp),%esp 12db18: 5b pop %ebx 12db19: 5e pop %esi 12db1a: c9 leave 12db1b: c3 ret return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; 12db1c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12db21: 8d 65 f8 lea -0x8(%ebp),%esp 12db24: 5b pop %ebx 12db25: 5e pop %esi 12db26: c9 leave 12db27: c3 ret _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 12db28: e8 6b 5c fe ff call 113798 <_Thread_Enable_dispatch> 12db2d: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12db32: 8d 65 f8 lea -0x8(%ebp),%esp 12db35: 5b pop %ebx 12db36: 5e pop %esi 12db37: c9 leave 12db38: c3 ret 0010ba54 : */ rtems_status_code rtems_task_wake_after( rtems_interval ticks ) { 10ba54: 55 push %ebp 10ba55: 89 e5 mov %esp,%ebp 10ba57: 53 push %ebx 10ba58: 83 ec 04 sub $0x4,%esp 10ba5b: 8b 5d 08 mov 0x8(%ebp),%ebx 10ba5e: a1 58 53 12 00 mov 0x125358,%eax 10ba63: 40 inc %eax 10ba64: a3 58 53 12 00 mov %eax,0x125358 _Thread_Disable_dispatch(); if ( ticks == 0 ) { 10ba69: 85 db test %ebx,%ebx 10ba6b: 74 53 je 10bac0 _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); 10ba6d: 83 ec 08 sub $0x8,%esp 10ba70: 6a 08 push $0x8 10ba72: ff 35 18 54 12 00 pushl 0x125418 10ba78: e8 03 22 00 00 call 10dc80 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10ba7d: a1 18 54 12 00 mov 0x125418,%eax _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); _Watchdog_Initialize( 10ba82: 8b 50 08 mov 0x8(%eax),%edx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10ba85: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_watchdog->routine = routine; 10ba8c: c7 40 64 60 d2 10 00 movl $0x10d260,0x64(%eax) the_watchdog->id = id; 10ba93: 89 50 68 mov %edx,0x68(%eax) the_watchdog->user_data = user_data; 10ba96: c7 40 6c 00 00 00 00 movl $0x0,0x6c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10ba9d: 89 58 54 mov %ebx,0x54(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10baa0: 5a pop %edx 10baa1: 59 pop %ecx 10baa2: 83 c0 48 add $0x48,%eax 10baa5: 50 push %eax 10baa6: 68 38 54 12 00 push $0x125438 10baab: e8 20 28 00 00 call 10e2d0 <_Watchdog_Insert> 10bab0: 83 c4 10 add $0x10,%esp _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 10bab3: e8 40 19 00 00 call 10d3f8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10bab8: 31 c0 xor %eax,%eax 10baba: 8b 5d fc mov -0x4(%ebp),%ebx 10babd: c9 leave 10babe: c3 ret 10babf: 90 nop <== NOT EXECUTED rtems_interval ticks ) { _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); 10bac0: e8 9b 24 00 00 call 10df60 <_Thread_Yield_processor> _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 10bac5: e8 2e 19 00 00 call 10d3f8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10baca: 31 c0 xor %eax,%eax 10bacc: 8b 5d fc mov -0x4(%ebp),%ebx 10bacf: c9 leave 10bad0: c3 ret 0010c850 : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 10c850: 55 push %ebp 10c851: 89 e5 mov %esp,%ebp 10c853: 53 push %ebx 10c854: 83 ec 14 sub $0x14,%esp 10c857: 8b 5d 08 mov 0x8(%ebp),%ebx Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10c85a: 80 3d 4c 88 12 00 00 cmpb $0x0,0x12884c 10c861: 0f 84 a9 00 00 00 je 10c910 return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10c867: 85 db test %ebx,%ebx 10c869: 0f 84 ad 00 00 00 je 10c91c return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 10c86f: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) if ( !_TOD_Validate( time_buffer ) ) 10c876: 83 ec 0c sub $0xc,%esp 10c879: 53 push %ebx 10c87a: e8 d9 f3 ff ff call 10bc58 <_TOD_Validate> 10c87f: 83 c4 10 add $0x10,%esp 10c882: 84 c0 test %al,%al 10c884: 75 0a jne 10c890 _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10c886: b8 14 00 00 00 mov $0x14,%eax } 10c88b: 8b 5d fc mov -0x4(%ebp),%ebx 10c88e: c9 leave 10c88f: c3 ret time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 10c890: 83 ec 0c sub $0xc,%esp 10c893: 53 push %ebx 10c894: e8 33 f3 ff ff call 10bbcc <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 10c899: 83 c4 10 add $0x10,%esp 10c89c: 3b 05 cc 88 12 00 cmp 0x1288cc,%eax 10c8a2: 76 e2 jbe 10c886 10c8a4: 8b 15 38 88 12 00 mov 0x128838,%edx 10c8aa: 42 inc %edx 10c8ab: 89 15 38 88 12 00 mov %edx,0x128838 return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 10c8b1: 83 ec 08 sub $0x8,%esp 10c8b4: 6a 10 push $0x10 10c8b6: ff 35 f8 88 12 00 pushl 0x1288f8 10c8bc: 89 45 f4 mov %eax,-0xc(%ebp) 10c8bf: e8 fc 22 00 00 call 10ebc0 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10c8c4: 8b 15 f8 88 12 00 mov 0x1288f8,%edx if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); _Watchdog_Initialize( 10c8ca: 8b 4a 08 mov 0x8(%edx),%ecx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10c8cd: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 10c8d4: c7 42 64 a0 e1 10 00 movl $0x10e1a0,0x64(%edx) the_watchdog->id = id; 10c8db: 89 4a 68 mov %ecx,0x68(%edx) the_watchdog->user_data = user_data; 10c8de: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c8e5: 8b 45 f4 mov -0xc(%ebp),%eax 10c8e8: 2b 05 cc 88 12 00 sub 0x1288cc,%eax 10c8ee: 89 42 54 mov %eax,0x54(%edx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 10c8f1: 58 pop %eax 10c8f2: 59 pop %ecx 10c8f3: 83 c2 48 add $0x48,%edx 10c8f6: 52 push %edx 10c8f7: 68 0c 89 12 00 push $0x12890c 10c8fc: e8 87 29 00 00 call 10f288 <_Watchdog_Insert> ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 10c901: e8 32 1a 00 00 call 10e338 <_Thread_Enable_dispatch> 10c906: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10c908: 83 c4 10 add $0x10,%esp 10c90b: e9 7b ff ff ff jmp 10c88b rtems_time_of_day *time_buffer ) { Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10c910: b8 0b 00 00 00 mov $0xb,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c915: 8b 5d fc mov -0x4(%ebp),%ebx 10c918: c9 leave 10c919: c3 ret 10c91a: 66 90 xchg %ax,%ax <== NOT EXECUTED Watchdog_Interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10c91c: b8 09 00 00 00 mov $0x9,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c921: 8b 5d fc mov -0x4(%ebp),%ebx 10c924: c9 leave 10c925: c3 ret 001182e0 : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 1182e0: 55 push %ebp 1182e1: 89 e5 mov %esp,%ebp 1182e3: 57 push %edi 1182e4: 56 push %esi 1182e5: 53 push %ebx 1182e6: 83 ec 0c sub $0xc,%esp 1182e9: 8b 5d 08 mov 0x8(%ebp),%ebx 1182ec: 8b 75 0c mov 0xc(%ebp),%esi Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 1182ef: 85 db test %ebx,%ebx 1182f1: 74 6d je 118360 return RTEMS_INVALID_NAME; if ( !id ) 1182f3: 85 f6 test %esi,%esi 1182f5: 0f 84 89 00 00 00 je 118384 1182fb: a1 78 f7 13 00 mov 0x13f778,%eax 118300: 40 inc %eax 118301: a3 78 f7 13 00 mov %eax,0x13f778 * This function allocates a timer control block from * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void ) { return (Timer_Control *) _Objects_Allocate( &_Timer_Information ); 118306: 83 ec 0c sub $0xc,%esp 118309: 68 80 fa 13 00 push $0x13fa80 11830e: e8 65 23 00 00 call 11a678 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 118313: 83 c4 10 add $0x10,%esp 118316: 85 c0 test %eax,%eax 118318: 74 56 je 118370 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 11831a: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 118321: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 118328: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 11832f: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 118336: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 11833d: 8b 50 08 mov 0x8(%eax),%edx 118340: 0f b7 fa movzwl %dx,%edi 118343: 8b 0d 9c fa 13 00 mov 0x13fa9c,%ecx 118349: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 11834c: 89 58 0c mov %ebx,0xc(%eax) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 11834f: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 118351: e8 be 30 00 00 call 11b414 <_Thread_Enable_dispatch> 118356: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 118358: 8d 65 f4 lea -0xc(%ebp),%esp 11835b: 5b pop %ebx 11835c: 5e pop %esi 11835d: 5f pop %edi 11835e: c9 leave 11835f: c3 ret rtems_id *id ) { Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 118360: b8 03 00 00 00 mov $0x3,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 118365: 8d 65 f4 lea -0xc(%ebp),%esp 118368: 5b pop %ebx 118369: 5e pop %esi 11836a: 5f pop %edi 11836b: c9 leave 11836c: c3 ret 11836d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { _Thread_Enable_dispatch(); 118370: e8 9f 30 00 00 call 11b414 <_Thread_Enable_dispatch> 118375: b8 05 00 00 00 mov $0x5,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11837a: 8d 65 f4 lea -0xc(%ebp),%esp 11837d: 5b pop %ebx 11837e: 5e pop %esi 11837f: 5f pop %edi 118380: c9 leave 118381: c3 ret 118382: 66 90 xchg %ax,%ax <== NOT EXECUTED Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 118384: b8 09 00 00 00 mov $0x9,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 118389: 8d 65 f4 lea -0xc(%ebp),%esp 11838c: 5b pop %ebx 11838d: 5e pop %esi 11838e: 5f pop %edi 11838f: c9 leave 118390: c3 ret 00118394 : */ rtems_status_code rtems_timer_delete( rtems_id id ) { 118394: 55 push %ebp 118395: 89 e5 mov %esp,%ebp 118397: 53 push %ebx 118398: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 11839b: 8d 45 f4 lea -0xc(%ebp),%eax 11839e: 50 push %eax 11839f: ff 75 08 pushl 0x8(%ebp) 1183a2: 68 80 fa 13 00 push $0x13fa80 1183a7: e8 b8 27 00 00 call 11ab64 <_Objects_Get> 1183ac: 89 c3 mov %eax,%ebx Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1183ae: 83 c4 10 add $0x10,%esp 1183b1: 8b 4d f4 mov -0xc(%ebp),%ecx 1183b4: 85 c9 test %ecx,%ecx 1183b6: 75 38 jne 1183f0 case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); 1183b8: 83 ec 08 sub $0x8,%esp 1183bb: 50 push %eax 1183bc: 68 80 fa 13 00 push $0x13fa80 1183c1: e8 2e 23 00 00 call 11a6f4 <_Objects_Close> (void) _Watchdog_Remove( &the_timer->Ticker ); 1183c6: 8d 43 10 lea 0x10(%ebx),%eax 1183c9: 89 04 24 mov %eax,(%esp) 1183cc: e8 13 44 00 00 call 11c7e4 <_Watchdog_Remove> */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 1183d1: 58 pop %eax 1183d2: 5a pop %edx 1183d3: 53 push %ebx 1183d4: 68 80 fa 13 00 push $0x13fa80 1183d9: e8 1a 26 00 00 call 11a9f8 <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 1183de: e8 31 30 00 00 call 11b414 <_Thread_Enable_dispatch> 1183e3: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1183e5: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1183e8: 8b 5d fc mov -0x4(%ebp),%ebx 1183eb: c9 leave 1183ec: c3 ret 1183ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1183f0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1183f5: 8b 5d fc mov -0x4(%ebp),%ebx 1183f8: c9 leave 1183f9: c3 ret 001183fc : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 1183fc: 55 push %ebp 1183fd: 89 e5 mov %esp,%ebp 1183ff: 57 push %edi 118400: 56 push %esi 118401: 53 push %ebx 118402: 83 ec 2c sub $0x2c,%esp 118405: 8b 5d 0c mov 0xc(%ebp),%ebx 118408: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 11840b: 85 db test %ebx,%ebx 11840d: 0f 84 99 00 00 00 je 1184ac return RTEMS_INVALID_NUMBER; if ( !routine ) 118413: 85 f6 test %esi,%esi 118415: 0f 84 b1 00 00 00 je 1184cc RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 11841b: 57 push %edi 11841c: 8d 45 e4 lea -0x1c(%ebp),%eax 11841f: 50 push %eax 118420: ff 75 08 pushl 0x8(%ebp) 118423: 68 80 fa 13 00 push $0x13fa80 118428: e8 37 27 00 00 call 11ab64 <_Objects_Get> 11842d: 89 c7 mov %eax,%edi return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 11842f: 83 c4 10 add $0x10,%esp 118432: 8b 4d e4 mov -0x1c(%ebp),%ecx 118435: 85 c9 test %ecx,%ecx 118437: 74 0f je 118448 118439: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11843e: 8d 65 f4 lea -0xc(%ebp),%esp 118441: 5b pop %ebx 118442: 5e pop %esi 118443: 5f pop %edi 118444: c9 leave 118445: c3 ret 118446: 66 90 xchg %ax,%ax <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118448: 8d 50 10 lea 0x10(%eax),%edx 11844b: 83 ec 0c sub $0xc,%esp 11844e: 52 push %edx 11844f: 89 55 d4 mov %edx,-0x2c(%ebp) 118452: e8 8d 43 00 00 call 11c7e4 <_Watchdog_Remove> _ISR_Disable( level ); 118457: 9c pushf 118458: fa cli 118459: 58 pop %eax /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 11845a: 83 c4 10 add $0x10,%esp 11845d: 8b 57 18 mov 0x18(%edi),%edx 118460: 85 d2 test %edx,%edx 118462: 8b 55 d4 mov -0x2c(%ebp),%edx 118465: 75 55 jne 1184bc /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL; 118467: c7 47 38 00 00 00 00 movl $0x0,0x38(%edi) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11846e: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 118475: 89 77 2c mov %esi,0x2c(%edi) the_watchdog->id = id; 118478: 8b 4d 08 mov 0x8(%ebp),%ecx 11847b: 89 4f 30 mov %ecx,0x30(%edi) the_watchdog->user_data = user_data; 11847e: 8b 4d 14 mov 0x14(%ebp),%ecx 118481: 89 4f 34 mov %ecx,0x34(%edi) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 118484: 50 push %eax 118485: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118486: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 118489: 83 ec 08 sub $0x8,%esp 11848c: 52 push %edx 11848d: 68 58 f8 13 00 push $0x13f858 118492: e8 15 42 00 00 call 11c6ac <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 118497: e8 78 2f 00 00 call 11b414 <_Thread_Enable_dispatch> 11849c: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11849e: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1184a1: 8d 65 f4 lea -0xc(%ebp),%esp 1184a4: 5b pop %ebx 1184a5: 5e pop %esi 1184a6: 5f pop %edi 1184a7: c9 leave 1184a8: c3 ret 1184a9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 1184ac: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1184b1: 8d 65 f4 lea -0xc(%ebp),%esp 1184b4: 5b pop %ebx 1184b5: 5e pop %esi 1184b6: 5f pop %edi 1184b7: c9 leave 1184b8: c3 ret 1184b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 1184bc: 50 push %eax 1184bd: 9d popf _Thread_Enable_dispatch(); 1184be: e8 51 2f 00 00 call 11b414 <_Thread_Enable_dispatch> 1184c3: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1184c5: e9 74 ff ff ff jmp 11843e 1184ca: 66 90 xchg %ax,%ax <== NOT EXECUTED ISR_Level level; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) 1184cc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1184d1: 8d 65 f4 lea -0xc(%ebp),%esp 1184d4: 5b pop %ebx 1184d5: 5e pop %esi 1184d6: 5f pop %edi 1184d7: c9 leave 1184d8: c3 ret 001184dc : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 1184dc: 55 push %ebp 1184dd: 89 e5 mov %esp,%ebp 1184df: 57 push %edi 1184e0: 56 push %esi 1184e1: 53 push %ebx 1184e2: 83 ec 2c sub $0x2c,%esp 1184e5: 8b 75 08 mov 0x8(%ebp),%esi 1184e8: 8b 7d 0c mov 0xc(%ebp),%edi 1184eb: 8b 5d 10 mov 0x10(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 1184ee: 80 3d 8c f7 13 00 00 cmpb $0x0,0x13f78c 1184f5: 75 0d jne 118504 1184f7: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1184fc: 8d 65 f4 lea -0xc(%ebp),%esp 1184ff: 5b pop %ebx 118500: 5e pop %esi 118501: 5f pop %edi 118502: c9 leave 118503: c3 ret rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 118504: 83 ec 0c sub $0xc,%esp 118507: 57 push %edi 118508: e8 67 d4 ff ff call 115974 <_TOD_Validate> 11850d: 83 c4 10 add $0x10,%esp 118510: 84 c0 test %al,%al 118512: 74 1e je 118532 return RTEMS_INVALID_CLOCK; if ( !routine ) 118514: 85 db test %ebx,%ebx 118516: 0f 84 a4 00 00 00 je 1185c0 return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 11851c: 83 ec 0c sub $0xc,%esp 11851f: 57 push %edi 118520: e8 c3 d3 ff ff call 1158e8 <_TOD_To_seconds> 118525: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 118527: 83 c4 10 add $0x10,%esp 11852a: 3b 05 0c f8 13 00 cmp 0x13f80c,%eax 118530: 77 0e ja 118540 _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 118532: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118537: 8d 65 f4 lea -0xc(%ebp),%esp 11853a: 5b pop %ebx 11853b: 5e pop %esi 11853c: 5f pop %edi 11853d: c9 leave 11853e: c3 ret 11853f: 90 nop <== NOT EXECUTED 118540: 50 push %eax 118541: 8d 45 e4 lea -0x1c(%ebp),%eax 118544: 50 push %eax 118545: 56 push %esi 118546: 68 80 fa 13 00 push $0x13fa80 11854b: e8 14 26 00 00 call 11ab64 <_Objects_Get> seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 118550: 83 c4 10 add $0x10,%esp 118553: 8b 4d e4 mov -0x1c(%ebp),%ecx 118556: 85 c9 test %ecx,%ecx 118558: 75 5a jne 1185b4 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 11855a: 8d 48 10 lea 0x10(%eax),%ecx 11855d: 83 ec 0c sub $0xc,%esp 118560: 51 push %ecx 118561: 89 45 d4 mov %eax,-0x2c(%ebp) 118564: 89 4d d0 mov %ecx,-0x30(%ebp) 118567: e8 78 42 00 00 call 11c7e4 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY; 11856c: 8b 55 d4 mov -0x2c(%ebp),%edx 11856f: c7 42 38 02 00 00 00 movl $0x2,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 118576: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 11857d: 89 5a 2c mov %ebx,0x2c(%edx) the_watchdog->id = id; 118580: 89 72 30 mov %esi,0x30(%edx) the_watchdog->user_data = user_data; 118583: 8b 45 14 mov 0x14(%ebp),%eax 118586: 89 42 34 mov %eax,0x34(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118589: 2b 3d 0c f8 13 00 sub 0x13f80c,%edi 11858f: 89 7a 1c mov %edi,0x1c(%edx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 118592: 58 pop %eax 118593: 5a pop %edx 118594: 8b 4d d0 mov -0x30(%ebp),%ecx 118597: 51 push %ecx 118598: 68 4c f8 13 00 push $0x13f84c 11859d: e8 0a 41 00 00 call 11c6ac <_Watchdog_Insert> _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 1185a2: e8 6d 2e 00 00 call 11b414 <_Thread_Enable_dispatch> 1185a7: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1185a9: 83 c4 10 add $0x10,%esp 1185ac: e9 4b ff ff ff jmp 1184fc 1185b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1185b4: b8 04 00 00 00 mov $0x4,%eax 1185b9: e9 3e ff ff ff jmp 1184fc 1185be: 66 90 xchg %ax,%ax <== NOT EXECUTED return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) 1185c0: b8 09 00 00 00 mov $0x9,%eax 1185c5: e9 32 ff ff ff jmp 1184fc 001185cc : rtems_status_code rtems_timer_get_information( rtems_id id, rtems_timer_information *the_info ) { 1185cc: 55 push %ebp 1185cd: 89 e5 mov %esp,%ebp 1185cf: 53 push %ebx 1185d0: 83 ec 14 sub $0x14,%esp 1185d3: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 1185d6: 85 db test %ebx,%ebx 1185d8: 74 4a je 118624 1185da: 51 push %ecx 1185db: 8d 45 f4 lea -0xc(%ebp),%eax 1185de: 50 push %eax 1185df: ff 75 08 pushl 0x8(%ebp) 1185e2: 68 80 fa 13 00 push $0x13fa80 1185e7: e8 78 25 00 00 call 11ab64 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1185ec: 83 c4 10 add $0x10,%esp 1185ef: 8b 55 f4 mov -0xc(%ebp),%edx 1185f2: 85 d2 test %edx,%edx 1185f4: 74 0a je 118600 1185f6: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1185fb: 8b 5d fc mov -0x4(%ebp),%ebx 1185fe: c9 leave 1185ff: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 118600: 8b 50 38 mov 0x38(%eax),%edx 118603: 89 13 mov %edx,(%ebx) the_info->initial = the_timer->Ticker.initial; 118605: 8b 50 1c mov 0x1c(%eax),%edx 118608: 89 53 04 mov %edx,0x4(%ebx) the_info->start_time = the_timer->Ticker.start_time; 11860b: 8b 50 24 mov 0x24(%eax),%edx 11860e: 89 53 08 mov %edx,0x8(%ebx) the_info->stop_time = the_timer->Ticker.stop_time; 118611: 8b 40 28 mov 0x28(%eax),%eax 118614: 89 43 0c mov %eax,0xc(%ebx) _Thread_Enable_dispatch(); 118617: e8 f8 2d 00 00 call 11b414 <_Thread_Enable_dispatch> 11861c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11861e: 8b 5d fc mov -0x4(%ebp),%ebx 118621: c9 leave 118622: c3 ret 118623: 90 nop <== NOT EXECUTED ) { Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 118624: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118629: 8b 5d fc mov -0x4(%ebp),%ebx 11862c: c9 leave 11862d: c3 ret 001188dc : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 1188dc: 55 push %ebp 1188dd: 89 e5 mov %esp,%ebp 1188df: 56 push %esi 1188e0: 53 push %ebx 1188e1: 83 ec 10 sub $0x10,%esp 1188e4: 8b 45 08 mov 0x8(%ebp),%eax 1188e7: 85 c0 test %eax,%eax 1188e9: 75 0d jne 1188f8 if (status) { initialized = false; } #endif return status; 1188eb: b8 13 00 00 00 mov $0x13,%eax } 1188f0: 8d 65 f8 lea -0x8(%ebp),%esp 1188f3: 5b pop %ebx 1188f4: 5e pop %esi 1188f5: c9 leave 1188f6: c3 ret 1188f7: 90 nop <== NOT EXECUTED 1188f8: 0f b6 15 14 72 13 00 movzbl 0x137214,%edx 1188ff: 39 d0 cmp %edx,%eax 118901: 76 35 jbe 118938 * structured so we check it is invalid before looking for * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 118903: 40 inc %eax 118904: 75 e5 jne 1188eb 118906: 31 f6 xor %esi,%esi 118908: 8b 15 78 f7 13 00 mov 0x13f778,%edx 11890e: 42 inc %edx 11890f: 89 15 78 f7 13 00 mov %edx,0x13f778 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 118915: 8a 1d e0 af 13 00 mov 0x13afe0,%bl initialized = true; 11891b: c6 05 e0 af 13 00 01 movb $0x1,0x13afe0 _Thread_Enable_dispatch(); 118922: e8 ed 2a 00 00 call 11b414 <_Thread_Enable_dispatch> if ( tmpInitialized ) 118927: 84 db test %bl,%bl 118929: 74 11 je 11893c 11892b: b8 0e 00 00 00 mov $0xe,%eax initialized = false; } #endif return status; } 118930: 8d 65 f8 lea -0x8(%ebp),%esp 118933: 5b pop %ebx 118934: 5e pop %esi 118935: c9 leave 118936: c3 ret 118937: 90 nop <== NOT EXECUTED 118938: 89 c6 mov %eax,%esi 11893a: eb cc jmp 118908 * other library rules. For example, if using a TSR written in Ada the * Server should run at the same priority as the priority Ada task. * Otherwise, the priority ceiling for the mutex used to protect the * GNAT run-time is violated. */ status = rtems_task_create( 11893c: 83 ec 08 sub $0x8,%esp 11893f: 8d 45 f4 lea -0xc(%ebp),%eax 118942: 50 push %eax 118943: 8b 45 10 mov 0x10(%ebp),%eax 118946: 80 cc 80 or $0x80,%ah 118949: 50 push %eax 11894a: 68 00 01 00 00 push $0x100 11894f: ff 75 0c pushl 0xc(%ebp) 118952: 56 push %esi 118953: 68 45 4d 49 54 push $0x54494d45 118958: e8 87 f0 ff ff call 1179e4 /* user may want floating point but we need */ /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { 11895d: 83 c4 20 add $0x20,%esp 118960: 85 c0 test %eax,%eax 118962: 74 10 je 118974 initialized = false; 118964: c6 05 e0 af 13 00 00 movb $0x0,0x13afe0 initialized = false; } #endif return status; } 11896b: 8d 65 f8 lea -0x8(%ebp),%esp 11896e: 5b pop %ebx 11896f: 5e pop %esi 118970: c9 leave 118971: c3 ret 118972: 66 90 xchg %ax,%ax <== NOT EXECUTED * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( &_RTEMS_tasks_Information, _Objects_Get_index(id) 118974: 8b 45 f4 mov -0xc(%ebp),%eax /* * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( 118977: 0f b7 c8 movzwl %ax,%ecx 11897a: 8b 15 1c f7 13 00 mov 0x13f71c,%edx 118980: 8b 14 8a mov (%edx,%ecx,4),%edx 118983: 89 15 00 b0 13 00 mov %edx,0x13b000 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 118989: c7 05 30 b0 13 00 34 movl $0x13b034,0x13b030 118990: b0 13 00 the_chain->permanent_null = NULL; 118993: c7 05 34 b0 13 00 00 movl $0x0,0x13b034 11899a: 00 00 00 the_chain->last = _Chain_Head(the_chain); 11899d: c7 05 38 b0 13 00 30 movl $0x13b030,0x13b038 1189a4: b0 13 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1189a7: c7 05 68 b0 13 00 6c movl $0x13b06c,0x13b068 1189ae: b0 13 00 the_chain->permanent_null = NULL; 1189b1: c7 05 6c b0 13 00 00 movl $0x0,0x13b06c 1189b8: 00 00 00 the_chain->last = _Chain_Head(the_chain); 1189bb: c7 05 70 b0 13 00 68 movl $0x13b068,0x13b070 1189c2: b0 13 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 1189c5: c7 05 10 b0 13 00 00 movl $0x0,0x13b010 1189cc: 00 00 00 the_watchdog->routine = routine; 1189cf: c7 05 24 b0 13 00 7c movl $0x11b27c,0x13b024 1189d6: b2 11 00 the_watchdog->id = id; 1189d9: a3 28 b0 13 00 mov %eax,0x13b028 the_watchdog->user_data = user_data; 1189de: c7 05 2c b0 13 00 00 movl $0x0,0x13b02c 1189e5: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 1189e8: c7 05 48 b0 13 00 00 movl $0x0,0x13b048 1189ef: 00 00 00 the_watchdog->routine = routine; 1189f2: c7 05 5c b0 13 00 7c movl $0x11b27c,0x13b05c 1189f9: b2 11 00 the_watchdog->id = id; 1189fc: a3 60 b0 13 00 mov %eax,0x13b060 the_watchdog->user_data = user_data; 118a01: c7 05 64 b0 13 00 00 movl $0x0,0x13b064 118a08: 00 00 00 /* * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; 118a0b: c7 05 04 b0 13 00 b0 movl $0x118cb0,0x13b004 118a12: 8c 11 00 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 118a15: 8b 15 e4 f8 13 00 mov 0x13f8e4,%edx 118a1b: 89 15 3c b0 13 00 mov %edx,0x13b03c ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 118a21: 8b 15 0c f8 13 00 mov 0x13f80c,%edx 118a27: 89 15 74 b0 13 00 mov %edx,0x13b074 ts->insert_chain = NULL; 118a2d: c7 05 78 b0 13 00 00 movl $0x0,0x13b078 118a34: 00 00 00 ts->active = false; 118a37: c6 05 7c b0 13 00 00 movb $0x0,0x13b07c /* * The default timer server is now available. */ _Timer_server = ts; 118a3e: c7 05 c0 fa 13 00 00 movl $0x13b000,0x13fac0 118a45: b0 13 00 /* * Start the timer server */ status = rtems_task_start( 118a48: 52 push %edx 118a49: 68 00 b0 13 00 push $0x13b000 118a4e: 68 04 8b 11 00 push $0x118b04 118a53: 50 push %eax 118a54: e8 23 f6 ff ff call 11807c if (status) { initialized = false; } #endif return status; 118a59: 83 c4 10 add $0x10,%esp 118a5c: e9 8f fe ff ff jmp 1188f0 00118654 : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 118654: 55 push %ebp 118655: 89 e5 mov %esp,%ebp 118657: 56 push %esi 118658: 53 push %ebx 118659: 83 ec 24 sub $0x24,%esp 11865c: 8d 45 f4 lea -0xc(%ebp),%eax 11865f: 50 push %eax 118660: ff 75 08 pushl 0x8(%ebp) 118663: 68 80 fa 13 00 push $0x13fa80 118668: e8 f7 24 00 00 call 11ab64 <_Objects_Get> 11866d: 89 c3 mov %eax,%ebx Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); switch ( location ) { 11866f: 83 c4 10 add $0x10,%esp 118672: 8b 45 f4 mov -0xc(%ebp),%eax 118675: 85 c0 test %eax,%eax 118677: 74 0f je 118688 118679: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11867e: 8d 65 f8 lea -0x8(%ebp),%esp 118681: 5b pop %ebx 118682: 5e pop %esi 118683: c9 leave 118684: c3 ret 118685: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { 118688: 8b 43 38 mov 0x38(%ebx),%eax 11868b: 85 c0 test %eax,%eax 11868d: 74 1d je 1186ac _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 11868f: 48 dec %eax 118690: 74 3a je 1186cc 118692: b8 0b 00 00 00 mov $0xb,%eax * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 118697: 89 45 e4 mov %eax,-0x1c(%ebp) 11869a: e8 75 2d 00 00 call 11b414 <_Thread_Enable_dispatch> 11869f: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1186a2: 8d 65 f8 lea -0x8(%ebp),%esp 1186a5: 5b pop %ebx 1186a6: 5e pop %esi 1186a7: c9 leave 1186a8: c3 ret 1186a9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); 1186ac: 83 c3 10 add $0x10,%ebx 1186af: 83 ec 0c sub $0xc,%esp 1186b2: 53 push %ebx 1186b3: e8 2c 41 00 00 call 11c7e4 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 1186b8: 59 pop %ecx 1186b9: 5e pop %esi 1186ba: 53 push %ebx 1186bb: 68 58 f8 13 00 push $0x13f858 1186c0: e8 e7 3f 00 00 call 11c6ac <_Watchdog_Insert> 1186c5: 31 c0 xor %eax,%eax 1186c7: 83 c4 10 add $0x10,%esp 1186ca: eb cb jmp 118697 } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { Timer_server_Control *timer_server = _Timer_server; 1186cc: 8b 35 c0 fa 13 00 mov 0x13fac0,%esi if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 1186d2: 83 ec 0c sub $0xc,%esp 1186d5: 8d 43 10 lea 0x10(%ebx),%eax 1186d8: 50 push %eax 1186d9: e8 06 41 00 00 call 11c7e4 <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 1186de: 58 pop %eax 1186df: 5a pop %edx 1186e0: 53 push %ebx 1186e1: 56 push %esi 1186e2: ff 56 04 call *0x4(%esi) 1186e5: 31 c0 xor %eax,%eax 1186e7: 83 c4 10 add $0x10,%esp 1186ea: eb ab jmp 118697 001186ec : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 1186ec: 55 push %ebp 1186ed: 89 e5 mov %esp,%ebp 1186ef: 57 push %edi 1186f0: 56 push %esi 1186f1: 53 push %ebx 1186f2: 83 ec 2c sub $0x2c,%esp 1186f5: 8b 7d 0c mov 0xc(%ebp),%edi 1186f8: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 1186fb: 8b 1d c0 fa 13 00 mov 0x13fac0,%ebx if ( !timer_server ) 118701: 85 db test %ebx,%ebx 118703: 0f 84 9f 00 00 00 je 1187a8 return RTEMS_INCORRECT_STATE; if ( !routine ) 118709: 85 f6 test %esi,%esi 11870b: 0f 84 a3 00 00 00 je 1187b4 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 118711: 85 ff test %edi,%edi 118713: 75 0f jne 118724 118715: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11871a: 8d 65 f4 lea -0xc(%ebp),%esp 11871d: 5b pop %ebx 11871e: 5e pop %esi 11871f: 5f pop %edi 118720: c9 leave 118721: c3 ret 118722: 66 90 xchg %ax,%ax <== NOT EXECUTED 118724: 52 push %edx 118725: 8d 45 e4 lea -0x1c(%ebp),%eax 118728: 50 push %eax 118729: ff 75 08 pushl 0x8(%ebp) 11872c: 68 80 fa 13 00 push $0x13fa80 118731: e8 2e 24 00 00 call 11ab64 <_Objects_Get> 118736: 89 c2 mov %eax,%edx if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 118738: 83 c4 10 add $0x10,%esp 11873b: 8b 45 e4 mov -0x1c(%ebp),%eax 11873e: 85 c0 test %eax,%eax 118740: 75 56 jne 118798 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118742: 83 ec 0c sub $0xc,%esp 118745: 8d 42 10 lea 0x10(%edx),%eax 118748: 50 push %eax 118749: 89 55 d4 mov %edx,-0x2c(%ebp) 11874c: e8 93 40 00 00 call 11c7e4 <_Watchdog_Remove> _ISR_Disable( level ); 118751: 9c pushf 118752: fa cli 118753: 58 pop %eax /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 118754: 83 c4 10 add $0x10,%esp 118757: 8b 55 d4 mov -0x2c(%ebp),%edx 11875a: 8b 4a 18 mov 0x18(%edx),%ecx 11875d: 85 c9 test %ecx,%ecx 11875f: 75 5f jne 1187c0 /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; 118761: c7 42 38 01 00 00 00 movl $0x1,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 118768: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 11876f: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118772: 8b 4d 08 mov 0x8(%ebp),%ecx 118775: 89 4a 30 mov %ecx,0x30(%edx) the_watchdog->user_data = user_data; 118778: 8b 4d 14 mov 0x14(%ebp),%ecx 11877b: 89 4a 34 mov %ecx,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 11877e: 89 7a 1c mov %edi,0x1c(%edx) _ISR_Enable( level ); 118781: 50 push %eax 118782: 9d popf (*timer_server->schedule_operation)( timer_server, the_timer ); 118783: 83 ec 08 sub $0x8,%esp 118786: 52 push %edx 118787: 53 push %ebx 118788: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 11878b: e8 84 2c 00 00 call 11b414 <_Thread_Enable_dispatch> 118790: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 118792: 83 c4 10 add $0x10,%esp 118795: eb 83 jmp 11871a 118797: 90 nop <== NOT EXECUTED if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 118798: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11879d: 8d 65 f4 lea -0xc(%ebp),%esp 1187a0: 5b pop %ebx 1187a1: 5e pop %esi 1187a2: 5f pop %edi 1187a3: c9 leave 1187a4: c3 ret 1187a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 1187a8: b8 0e 00 00 00 mov $0xe,%eax 1187ad: e9 68 ff ff ff jmp 11871a 1187b2: 66 90 xchg %ax,%ax <== NOT EXECUTED return RTEMS_INCORRECT_STATE; if ( !routine ) 1187b4: b8 09 00 00 00 mov $0x9,%eax 1187b9: e9 5c ff ff ff jmp 11871a 1187be: 66 90 xchg %ax,%ax <== NOT EXECUTED * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 1187c0: 50 push %eax 1187c1: 9d popf _Thread_Enable_dispatch(); 1187c2: e8 4d 2c 00 00 call 11b414 <_Thread_Enable_dispatch> 1187c7: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1187c9: e9 4c ff ff ff jmp 11871a 001187d0 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 1187d0: 55 push %ebp 1187d1: 89 e5 mov %esp,%ebp 1187d3: 57 push %edi 1187d4: 56 push %esi 1187d5: 53 push %ebx 1187d6: 83 ec 2c sub $0x2c,%esp 1187d9: 8b 7d 0c mov 0xc(%ebp),%edi 1187dc: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 1187df: 8b 1d c0 fa 13 00 mov 0x13fac0,%ebx if ( !timer_server ) 1187e5: 85 db test %ebx,%ebx 1187e7: 0f 84 d7 00 00 00 je 1188c4 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 1187ed: 80 3d 8c f7 13 00 00 cmpb $0x0,0x13f78c 1187f4: 0f 84 aa 00 00 00 je 1188a4 return RTEMS_NOT_DEFINED; if ( !routine ) 1187fa: 85 f6 test %esi,%esi 1187fc: 0f 84 b2 00 00 00 je 1188b4 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 118802: 83 ec 0c sub $0xc,%esp 118805: 57 push %edi 118806: e8 69 d1 ff ff call 115974 <_TOD_Validate> 11880b: 83 c4 10 add $0x10,%esp 11880e: 84 c0 test %al,%al 118810: 75 0e jne 118820 the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 118812: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118817: 8d 65 f4 lea -0xc(%ebp),%esp 11881a: 5b pop %ebx 11881b: 5e pop %esi 11881c: 5f pop %edi 11881d: c9 leave 11881e: c3 ret 11881f: 90 nop <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 118820: 83 ec 0c sub $0xc,%esp 118823: 57 push %edi 118824: e8 bf d0 ff ff call 1158e8 <_TOD_To_seconds> 118829: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 11882b: 83 c4 10 add $0x10,%esp 11882e: 3b 05 0c f8 13 00 cmp 0x13f80c,%eax 118834: 76 dc jbe 118812 118836: 52 push %edx 118837: 8d 45 e4 lea -0x1c(%ebp),%eax 11883a: 50 push %eax 11883b: ff 75 08 pushl 0x8(%ebp) 11883e: 68 80 fa 13 00 push $0x13fa80 118843: e8 1c 23 00 00 call 11ab64 <_Objects_Get> 118848: 89 c2 mov %eax,%edx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 11884a: 83 c4 10 add $0x10,%esp 11884d: 8b 45 e4 mov -0x1c(%ebp),%eax 118850: 85 c0 test %eax,%eax 118852: 75 7c jne 1188d0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118854: 83 ec 0c sub $0xc,%esp 118857: 8d 42 10 lea 0x10(%edx),%eax 11885a: 50 push %eax 11885b: 89 55 d4 mov %edx,-0x2c(%ebp) 11885e: e8 81 3f 00 00 call 11c7e4 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 118863: 8b 55 d4 mov -0x2c(%ebp),%edx 118866: c7 42 38 03 00 00 00 movl $0x3,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11886d: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118874: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118877: 8b 45 08 mov 0x8(%ebp),%eax 11887a: 89 42 30 mov %eax,0x30(%edx) the_watchdog->user_data = user_data; 11887d: 8b 45 14 mov 0x14(%ebp),%eax 118880: 89 42 34 mov %eax,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 118883: 2b 3d 0c f8 13 00 sub 0x13f80c,%edi 118889: 89 7a 1c mov %edi,0x1c(%edx) (*timer_server->schedule_operation)( timer_server, the_timer ); 11888c: 58 pop %eax 11888d: 59 pop %ecx 11888e: 52 push %edx 11888f: 53 push %ebx 118890: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 118893: e8 7c 2b 00 00 call 11b414 <_Thread_Enable_dispatch> 118898: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11889a: 83 c4 10 add $0x10,%esp 11889d: e9 75 ff ff ff jmp 118817 1188a2: 66 90 xchg %ax,%ax <== NOT EXECUTED Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 1188a4: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1188a9: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1188ac: 5b pop %ebx <== NOT EXECUTED 1188ad: 5e pop %esi <== NOT EXECUTED 1188ae: 5f pop %edi <== NOT EXECUTED 1188af: c9 leave <== NOT EXECUTED 1188b0: c3 ret <== NOT EXECUTED 1188b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) 1188b4: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1188b9: 8d 65 f4 lea -0xc(%ebp),%esp 1188bc: 5b pop %ebx 1188bd: 5e pop %esi 1188be: 5f pop %edi 1188bf: c9 leave 1188c0: c3 ret 1188c1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 1188c4: b8 0e 00 00 00 mov $0xe,%eax 1188c9: e9 49 ff ff ff jmp 118817 1188ce: 66 90 xchg %ax,%ax <== NOT EXECUTED seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1188d0: b8 04 00 00 00 mov $0x4,%eax 1188d5: e9 3d ff ff ff jmp 118817