=============================================================================== 00109909 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 109909: 55 push %ebp 10990a: 89 e5 mov %esp,%ebp 10990c: 53 push %ebx 10990d: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 109910: 8b 1d 04 cd 11 00 mov 0x11cd04,%ebx 109916: eb 0b jmp 109923 <_API_extensions_Run_postdriver+0x1a> !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) 109918: 8b 43 0c mov 0xc(%ebx),%eax 10991b: 85 c0 test %eax,%eax 10991d: 74 02 je 109921 <_API_extensions_Run_postdriver+0x18><== NEVER TAKEN (*the_extension->postdriver_hook)(); 10991f: ff d0 call *%eax Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 109921: 8b 1b mov (%ebx),%ebx { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 109923: 81 fb 08 cd 11 00 cmp $0x11cd08,%ebx 109929: 75 ed jne 109918 <_API_extensions_Run_postdriver+0xf> the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) (*the_extension->postdriver_hook)(); } } 10992b: 5a pop %edx 10992c: 5b pop %ebx 10992d: c9 leave 10992e: c3 ret =============================================================================== 0010992f <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 10992f: 55 push %ebp 109930: 89 e5 mov %esp,%ebp 109932: 53 push %ebx 109933: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 109936: 8b 1d 04 cd 11 00 mov 0x11cd04,%ebx 10993c: eb 17 jmp 109955 <_API_extensions_Run_postswitch+0x26> !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) 10993e: 8b 43 10 mov 0x10(%ebx),%eax 109941: 85 c0 test %eax,%eax 109943: 74 0e je 109953 <_API_extensions_Run_postswitch+0x24><== NEVER TAKEN (*the_extension->postswitch_hook)( _Thread_Executing ); 109945: 83 ec 0c sub $0xc,%esp 109948: ff 35 a0 cb 11 00 pushl 0x11cba0 10994e: ff d0 call *%eax 109950: 83 c4 10 add $0x10,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 109953: 8b 1b mov (%ebx),%ebx { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 109955: 81 fb 08 cd 11 00 cmp $0x11cd08,%ebx 10995b: 75 e1 jne 10993e <_API_extensions_Run_postswitch+0xf> the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10995d: 8b 5d fc mov -0x4(%ebp),%ebx 109960: c9 leave 109961: c3 ret =============================================================================== 001098e3 <_API_extensions_Run_predriver>: * * _API_extensions_Run_predriver */ void _API_extensions_Run_predriver( void ) { 1098e3: 55 push %ebp 1098e4: 89 e5 mov %esp,%ebp 1098e6: 53 push %ebx 1098e7: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 1098ea: 8b 1d 04 cd 11 00 mov 0x11cd04,%ebx 1098f0: eb 0b jmp 1098fd <_API_extensions_Run_predriver+0x1a> !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) 1098f2: 8b 43 08 mov 0x8(%ebx),%eax 1098f5: 85 c0 test %eax,%eax 1098f7: 74 02 je 1098fb <_API_extensions_Run_predriver+0x18><== ALWAYS TAKEN (*the_extension->predriver_hook)(); 1098f9: ff d0 call *%eax <== NOT EXECUTED Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 1098fb: 8b 1b mov (%ebx),%ebx { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 1098fd: 81 fb 08 cd 11 00 cmp $0x11cd08,%ebx 109903: 75 ed jne 1098f2 <_API_extensions_Run_predriver+0xf> the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) (*the_extension->predriver_hook)(); } } 109905: 58 pop %eax 109906: 5b pop %ebx 109907: c9 leave 109908: c3 ret =============================================================================== 0010a8c4 <_CORE_barrier_Wait>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 10a8c4: 55 push %ebp 10a8c5: 89 e5 mov %esp,%ebp 10a8c7: 57 push %edi 10a8c8: 56 push %esi 10a8c9: 53 push %ebx 10a8ca: 83 ec 04 sub $0x4,%esp 10a8cd: 8b 55 08 mov 0x8(%ebp),%edx 10a8d0: 8b 75 0c mov 0xc(%ebp),%esi 10a8d3: 8b 45 14 mov 0x14(%ebp),%eax 10a8d6: 89 45 f0 mov %eax,-0x10(%ebp) 10a8d9: 8b 7d 18 mov 0x18(%ebp),%edi Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 10a8dc: 8b 0d b4 f5 11 00 mov 0x11f5b4,%ecx executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 10a8e2: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) _ISR_Disable( level ); 10a8e9: 9c pushf 10a8ea: fa cli 10a8eb: 5b pop %ebx the_barrier->number_of_waiting_threads++; 10a8ec: 8b 42 48 mov 0x48(%edx),%eax 10a8ef: 40 inc %eax 10a8f0: 89 42 48 mov %eax,0x48(%edx) if ( the_barrier->number_of_waiting_threads == 10a8f3: 3b 42 44 cmp 0x44(%edx),%eax 10a8f6: 75 22 jne 10a91a <_CORE_barrier_Wait+0x56> the_barrier->Attributes.maximum_count) { if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 10a8f8: 83 7a 40 00 cmpl $0x0,0x40(%edx) 10a8fc: 75 1c jne 10a91a <_CORE_barrier_Wait+0x56><== NEVER TAKEN executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 10a8fe: c7 41 34 01 00 00 00 movl $0x1,0x34(%ecx) _ISR_Enable( level ); 10a905: 53 push %ebx 10a906: 9d popf _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 10a907: 89 7d 10 mov %edi,0x10(%ebp) 10a90a: 89 75 0c mov %esi,0xc(%ebp) 10a90d: 89 55 08 mov %edx,0x8(%ebp) executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); } 10a910: 5a pop %edx 10a911: 5b pop %ebx 10a912: 5e pop %esi 10a913: 5f pop %edi 10a914: c9 leave if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; _ISR_Enable( level ); _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 10a915: e9 7a ff ff ff jmp 10a894 <_CORE_barrier_Release> { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** * This routine grows @a the_heap memory area using the size bytes which 10a91a: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 10a921: 89 51 44 mov %edx,0x44(%ecx) executing->Wait.id = id; 10a924: 89 71 20 mov %esi,0x20(%ecx) _ISR_Enable( level ); 10a927: 53 push %ebx 10a928: 9d popf _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 10a929: c7 45 10 ec c3 10 00 movl $0x10c3ec,0x10(%ebp) 10a930: 8b 45 f0 mov -0x10(%ebp),%eax 10a933: 89 45 0c mov %eax,0xc(%ebp) 10a936: 89 55 08 mov %edx,0x8(%ebp) } 10a939: 58 pop %eax 10a93a: 5b pop %ebx 10a93b: 5e pop %esi 10a93c: 5f pop %edi 10a93d: 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 ); 10a93e: e9 a5 17 00 00 jmp 10c0e8 <_Thread_queue_Enqueue_with_handler> =============================================================================== 00113a68 <_CORE_message_queue_Broadcast>: size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count ) { 113a68: 55 push %ebp 113a69: 89 e5 mov %esp,%ebp 113a6b: 57 push %edi 113a6c: 56 push %esi 113a6d: 53 push %ebx 113a6e: 83 ec 0c sub $0xc,%esp Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 113a71: b8 01 00 00 00 mov $0x1,%eax 113a76: 8b 4d 10 mov 0x10(%ebp),%ecx 113a79: 8b 55 08 mov 0x8(%ebp),%edx 113a7c: 3b 4a 4c cmp 0x4c(%edx),%ecx 113a7f: 77 43 ja 113ac4 <_CORE_message_queue_Broadcast+0x5c><== NEVER TAKEN * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 113a81: 31 db xor %ebx,%ebx * 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 ) { 113a83: 8b 75 08 mov 0x8(%ebp),%esi 113a86: 83 7e 48 00 cmpl $0x0,0x48(%esi) 113a8a: 74 21 je 113aad <_CORE_message_queue_Broadcast+0x45><== ALWAYS TAKEN *count = 0; 113a8c: 8b 45 1c mov 0x1c(%ebp),%eax <== NOT EXECUTED 113a8f: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED 113a95: 31 c0 xor %eax,%eax <== NOT EXECUTED 113a97: eb 2b jmp 113ac4 <_CORE_message_queue_Broadcast+0x5c><== NOT EXECUTED */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 113a99: 43 inc %ebx * alignments are possible. * Returns pointer to the start of the memory block if success, NULL if * failure. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes 113a9a: 8b 78 2c mov 0x2c(%eax),%edi 113a9d: 8b 75 0c mov 0xc(%ebp),%esi 113aa0: 8b 4d 10 mov 0x10(%ebp),%ecx 113aa3: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 113aa5: 8b 40 28 mov 0x28(%eax),%eax 113aa8: 8b 55 10 mov 0x10(%ebp),%edx 113aab: 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))) { 113aad: 83 ec 0c sub $0xc,%esp 113ab0: ff 75 08 pushl 0x8(%ebp) 113ab3: e8 98 1f 00 00 call 115a50 <_Thread_queue_Dequeue> 113ab8: 83 c4 10 add $0x10,%esp 113abb: 85 c0 test %eax,%eax 113abd: 75 da jne 113a99 <_CORE_message_queue_Broadcast+0x31> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 113abf: 8b 4d 1c mov 0x1c(%ebp),%ecx 113ac2: 89 19 mov %ebx,(%ecx) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 113ac4: 8d 65 f4 lea -0xc(%ebp),%esp 113ac7: 5b pop %ebx 113ac8: 5e pop %esi 113ac9: 5f pop %edi 113aca: c9 leave 113acb: c3 ret =============================================================================== 00113b6c <_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 ) { 113b6c: 55 push %ebp 113b6d: 89 e5 mov %esp,%ebp 113b6f: 57 push %edi 113b70: 56 push %esi 113b71: 53 push %ebx 113b72: 83 ec 0c sub $0xc,%esp 113b75: 8b 5d 08 mov 0x8(%ebp),%ebx 113b78: 8b 7d 10 mov 0x10(%ebp),%edi 113b7b: 8b 55 14 mov 0x14(%ebp),%edx size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 113b7e: 89 7b 44 mov %edi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 113b81: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 113b88: 89 53 4c mov %edx,0x4c(%ebx) 113b8b: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) 113b92: c7 43 64 00 00 00 00 movl $0x0,0x64(%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)) { 113b99: 89 d0 mov %edx,%eax 113b9b: f6 c2 03 test $0x3,%dl 113b9e: 74 0a je 113baa <_CORE_message_queue_Initialize+0x3e> allocated_message_size += sizeof(uint32_t); 113ba0: 8d 42 04 lea 0x4(%edx),%eax allocated_message_size &= ~(sizeof(uint32_t) - 1); 113ba3: 83 e0 fc and $0xfffffffc,%eax } if (allocated_message_size < maximum_message_size) 113ba6: 39 d0 cmp %edx,%eax 113ba8: 72 5f jb 113c09 <_CORE_message_queue_Initialize+0x9d><== NEVER TAKEN /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 113baa: 8d 70 14 lea 0x14(%eax),%esi 113bad: 89 f2 mov %esi,%edx 113baf: 0f af d7 imul %edi,%edx (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 113bb2: 39 c2 cmp %eax,%edx 113bb4: 72 53 jb 113c09 <_CORE_message_queue_Initialize+0x9d><== NEVER TAKEN return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 113bb6: 83 ec 0c sub $0xc,%esp 113bb9: 52 push %edx 113bba: e8 76 2e 00 00 call 116a35 <_Workspace_Allocate> 113bbf: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 113bc2: 83 c4 10 add $0x10,%esp 113bc5: 85 c0 test %eax,%eax 113bc7: 74 40 je 113c09 <_CORE_message_queue_Initialize+0x9d> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 113bc9: 56 push %esi 113bca: 57 push %edi 113bcb: 50 push %eax 113bcc: 8d 43 68 lea 0x68(%ebx),%eax 113bcf: 50 push %eax 113bd0: e8 5b fe ff ff call 113a30 <_Chain_Initialize> 113bd5: 8d 43 54 lea 0x54(%ebx),%eax 113bd8: 89 43 50 mov %eax,0x50(%ebx) 113bdb: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) 113be2: 8d 43 50 lea 0x50(%ebx),%eax 113be5: 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( 113be8: 6a 06 push $0x6 113bea: 68 80 00 00 00 push $0x80 113bef: 8b 45 0c mov 0xc(%ebp),%eax 113bf2: 83 38 01 cmpl $0x1,(%eax) 113bf5: 0f 94 c0 sete %al 113bf8: 0f b6 c0 movzbl %al,%eax 113bfb: 50 push %eax 113bfc: 53 push %ebx 113bfd: e8 9a 21 00 00 call 115d9c <_Thread_queue_Initialize> 113c02: b0 01 mov $0x1,%al 113c04: 83 c4 20 add $0x20,%esp 113c07: eb 02 jmp 113c0b <_CORE_message_queue_Initialize+0x9f> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 113c09: 31 c0 xor %eax,%eax } 113c0b: 8d 65 f4 lea -0xc(%ebp),%esp 113c0e: 5b pop %ebx 113c0f: 5e pop %esi 113c10: 5f pop %edi 113c11: c9 leave 113c12: c3 ret =============================================================================== 0010d6c0 <_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 ) { 10d6c0: 55 push %ebp 10d6c1: 89 e5 mov %esp,%ebp 10d6c3: 57 push %edi 10d6c4: 56 push %esi 10d6c5: 53 push %ebx 10d6c6: 83 ec 08 sub $0x8,%esp 10d6c9: 8b 5d 08 mov 0x8(%ebp),%ebx 10d6cc: 8b 75 0c mov 0xc(%ebp),%esi 10d6cf: 8b 45 10 mov 0x10(%ebp),%eax ISR_Level level; bool notify = false; the_message->priority = submit_type; 10d6d2: 89 46 08 mov %eax,0x8(%esi) switch ( submit_type ) { 10d6d5: 3d 00 00 00 80 cmp $0x80000000,%eax 10d6da: 74 33 je 10d70f <_CORE_message_queue_Insert_message+0x4f> 10d6dc: 3d ff ff ff 7f cmp $0x7fffffff,%eax 10d6e1: 8d 53 54 lea 0x54(%ebx),%edx 10d6e4: 89 55 ec mov %edx,-0x14(%ebp) 10d6e7: 75 4d jne 10d736 <_CORE_message_queue_Insert_message+0x76><== NEVER TAKEN case CORE_MESSAGE_QUEUE_SEND_REQUEST: _ISR_Disable( level ); 10d6e9: 9c pushf 10d6ea: fa cli 10d6eb: 59 pop %ecx if ( the_message_queue->number_of_pending_messages++ == 0 ) 10d6ec: 8b 53 48 mov 0x48(%ebx),%edx 10d6ef: 8d 42 01 lea 0x1(%edx),%eax 10d6f2: 89 43 48 mov %eax,0x48(%ebx) 10d6f5: 85 d2 test %edx,%edx 10d6f7: 0f 94 45 f3 sete -0xd(%ebp) 10d6fb: 8b 45 ec mov -0x14(%ebp),%eax 10d6fe: 89 06 mov %eax,(%esi) 10d700: 8b 43 58 mov 0x58(%ebx),%eax 10d703: 89 73 58 mov %esi,0x58(%ebx) 10d706: 89 30 mov %esi,(%eax) 10d708: 89 46 04 mov %eax,0x4(%esi) notify = true; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 10d70b: 51 push %ecx 10d70c: 9d popf 10d70d: eb 5b jmp 10d76a <_CORE_message_queue_Insert_message+0xaa> break; case CORE_MESSAGE_QUEUE_URGENT_REQUEST: _ISR_Disable( level ); 10d70f: 9c pushf 10d710: fa cli 10d711: 59 pop %ecx if ( the_message_queue->number_of_pending_messages++ == 0 ) 10d712: 8b 53 48 mov 0x48(%ebx),%edx 10d715: 8d 42 01 lea 0x1(%edx),%eax 10d718: 89 43 48 mov %eax,0x48(%ebx) 10d71b: 85 d2 test %edx,%edx 10d71d: 0f 94 45 f3 sete -0xd(%ebp) size_t size ); /** * This function attempts to allocate a memory block of @a size bytes from * @a the_heap so that the start of the user memory is aligned on the 10d721: 8d 43 50 lea 0x50(%ebx),%eax 10d724: 89 46 04 mov %eax,0x4(%esi) 10d727: 8b 43 50 mov 0x50(%ebx),%eax 10d72a: 89 73 50 mov %esi,0x50(%ebx) 10d72d: 89 06 mov %eax,(%esi) 10d72f: 89 70 04 mov %esi,0x4(%eax) notify = true; _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 10d732: 51 push %ecx 10d733: 9d popf 10d734: eb 34 jmp 10d76a <_CORE_message_queue_Insert_message+0xaa> CORE_message_queue_Buffer_control *this_message; Chain_Node *the_node; Chain_Control *the_header; the_header = &the_message_queue->Pending_messages; the_node = the_header->first; 10d736: 8b 7b 50 mov 0x50(%ebx),%edi <== NOT EXECUTED 10d739: eb 07 jmp 10d742 <_CORE_message_queue_Insert_message+0x82><== NOT EXECUTED while ( !_Chain_Is_tail( the_header, the_node ) ) { this_message = (CORE_message_queue_Buffer_control *) the_node; if ( this_message->priority <= the_message->priority ) { 10d73b: 39 47 08 cmp %eax,0x8(%edi) <== NOT EXECUTED 10d73e: 7f 07 jg 10d747 <_CORE_message_queue_Insert_message+0x87><== NOT EXECUTED the_node = the_node->next; 10d740: 8b 3f mov (%edi),%edi <== NOT EXECUTED Chain_Node *the_node; Chain_Control *the_header; the_header = &the_message_queue->Pending_messages; the_node = the_header->first; while ( !_Chain_Is_tail( the_header, the_node ) ) { 10d742: 3b 7d ec cmp -0x14(%ebp),%edi <== NOT EXECUTED 10d745: 75 f4 jne 10d73b <_CORE_message_queue_Insert_message+0x7b><== NOT EXECUTED continue; } break; } _ISR_Disable( level ); 10d747: 9c pushf <== NOT EXECUTED 10d748: fa cli <== NOT EXECUTED 10d749: 59 pop %ecx <== NOT EXECUTED if ( the_message_queue->number_of_pending_messages++ == 0 ) 10d74a: 8b 53 48 mov 0x48(%ebx),%edx <== NOT EXECUTED 10d74d: 8d 42 01 lea 0x1(%edx),%eax <== NOT EXECUTED 10d750: 89 43 48 mov %eax,0x48(%ebx) <== NOT EXECUTED 10d753: 85 d2 test %edx,%edx <== NOT EXECUTED 10d755: 0f 94 45 f3 sete -0xd(%ebp) <== NOT EXECUTED notify = true; _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); 10d759: 8b 47 04 mov 0x4(%edi),%eax <== NOT EXECUTED 10d75c: 89 46 04 mov %eax,0x4(%esi) <== NOT EXECUTED 10d75f: 8b 10 mov (%eax),%edx <== NOT EXECUTED 10d761: 89 30 mov %esi,(%eax) <== NOT EXECUTED 10d763: 89 16 mov %edx,(%esi) <== NOT EXECUTED 10d765: 89 72 04 mov %esi,0x4(%edx) <== NOT EXECUTED _ISR_Enable( level ); 10d768: 51 push %ecx <== NOT EXECUTED 10d769: 9d popf <== NOT EXECUTED * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) 10d76a: 80 7d f3 00 cmpb $0x0,-0xd(%ebp) 10d76e: 74 15 je 10d785 <_CORE_message_queue_Insert_message+0xc5> 10d770: 8b 4b 60 mov 0x60(%ebx),%ecx 10d773: 85 c9 test %ecx,%ecx 10d775: 74 0e je 10d785 <_CORE_message_queue_Insert_message+0xc5><== ALWAYS TAKEN (*the_message_queue->notify_handler)( the_message_queue->notify_argument ); 10d777: 8b 43 64 mov 0x64(%ebx),%eax <== NOT EXECUTED 10d77a: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 10d77d: 5b pop %ebx <== NOT EXECUTED 10d77e: 5e pop %esi <== NOT EXECUTED 10d77f: 5b pop %ebx <== NOT EXECUTED 10d780: 5e pop %esi <== NOT EXECUTED 10d781: 5f pop %edi <== NOT EXECUTED 10d782: c9 leave <== NOT EXECUTED * is actually enqueued. It is logical to think afterwards, because * 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 ); 10d783: ff e1 jmp *%ecx <== NOT EXECUTED } 10d785: 58 pop %eax 10d786: 5a pop %edx 10d787: 5b pop %ebx 10d788: 5e pop %esi 10d789: 5f pop %edi 10d78a: c9 leave 10d78b: c3 ret =============================================================================== 00113c14 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 113c14: 55 push %ebp 113c15: 89 e5 mov %esp,%ebp 113c17: 57 push %edi 113c18: 56 push %esi 113c19: 53 push %ebx 113c1a: 83 ec 2c sub $0x2c,%esp 113c1d: 8b 45 08 mov 0x8(%ebp),%eax 113c20: 89 45 d0 mov %eax,-0x30(%ebp) 113c23: 8b 55 0c mov 0xc(%ebp),%edx 113c26: 89 55 ec mov %edx,-0x14(%ebp) 113c29: 8b 7d 10 mov 0x10(%ebp),%edi 113c2c: 89 7d e8 mov %edi,-0x18(%ebp) 113c2f: 8b 45 14 mov 0x14(%ebp),%eax 113c32: 89 45 e4 mov %eax,-0x1c(%ebp) 113c35: 8b 55 1c mov 0x1c(%ebp),%edx 113c38: 89 55 dc mov %edx,-0x24(%ebp) 113c3b: 8a 45 18 mov 0x18(%ebp),%al 113c3e: 88 45 e3 mov %al,-0x1d(%ebp) ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; Thread_Control *the_thread; executing = _Thread_Executing; 113c41: 8b 35 a0 28 13 00 mov 0x1328a0,%esi executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 113c47: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) _ISR_Disable( level ); 113c4e: 9c pushf 113c4f: fa cli 113c50: 59 pop %ecx * to obtain the size of * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( 113c51: 8b 55 d0 mov -0x30(%ebp),%edx 113c54: 8b 5a 50 mov 0x50(%edx),%ebx 113c57: 89 d0 mov %edx,%eax 113c59: 83 c0 54 add $0x54,%eax 113c5c: 39 c3 cmp %eax,%ebx 113c5e: 0f 84 9e 00 00 00 je 113d02 <_CORE_message_queue_Seize+0xee> 113c64: 8b 13 mov (%ebx),%edx 113c66: 8b 7d d0 mov -0x30(%ebp),%edi 113c69: 89 57 50 mov %edx,0x50(%edi) 113c6c: 89 f8 mov %edi,%eax 113c6e: 83 c0 50 add $0x50,%eax 113c71: 89 42 04 mov %eax,0x4(%edx) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 113c74: 85 db test %ebx,%ebx 113c76: 0f 84 86 00 00 00 je 113d02 <_CORE_message_queue_Seize+0xee><== NEVER TAKEN the_message_queue->number_of_pending_messages -= 1; 113c7c: ff 4f 48 decl 0x48(%edi) _ISR_Enable( level ); 113c7f: 51 push %ecx 113c80: 9d popf *size_p = the_message->Contents.size; 113c81: 8b 43 0c mov 0xc(%ebx),%eax 113c84: 8b 55 e4 mov -0x1c(%ebp),%edx 113c87: 89 02 mov %eax,(%edx) _Thread_Executing->Wait.count = the_message->priority; 113c89: 8b 53 08 mov 0x8(%ebx),%edx 113c8c: a1 a0 28 13 00 mov 0x1328a0,%eax 113c91: 89 50 24 mov %edx,0x24(%eax) _CORE_message_queue_Copy_buffer(the_message->Contents.buffer,buffer,*size_p); 113c94: 8d 7b 10 lea 0x10(%ebx),%edi 113c97: 89 7d f0 mov %edi,-0x10(%ebp) * alignments are possible. * Returns pointer to the start of the memory block if success, NULL if * failure. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes 113c9a: 8b 45 e4 mov -0x1c(%ebp),%eax 113c9d: 8b 08 mov (%eax),%ecx 113c9f: 8b 7d e8 mov -0x18(%ebp),%edi 113ca2: 8b 75 f0 mov -0x10(%ebp),%esi 113ca5: f3 a4 rep movsb %ds:(%esi),%es:(%edi) * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 113ca7: 83 ec 0c sub $0xc,%esp 113caa: ff 75 d0 pushl -0x30(%ebp) 113cad: e8 9e 1d 00 00 call 115a50 <_Thread_queue_Dequeue> 113cb2: 89 c2 mov %eax,%edx if ( !the_thread ) { 113cb4: 83 c4 10 add $0x10,%esp 113cb7: 85 c0 test %eax,%eax 113cb9: 75 18 jne 113cd3 <_CORE_message_queue_Seize+0xbf><== NEVER TAKEN * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( Heap_Control *the_heap, void *starting_address, size_t *size 113cbb: 89 5d 0c mov %ebx,0xc(%ebp) 113cbe: 8b 45 d0 mov -0x30(%ebp),%eax 113cc1: 83 c0 68 add $0x68,%eax 113cc4: 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 ); } 113cc7: 8d 65 f4 lea -0xc(%ebp),%esp 113cca: 5b pop %ebx 113ccb: 5e pop %esi 113ccc: 5f pop %edi 113ccd: c9 leave 113cce: e9 11 fd ff ff jmp 1139e4 <_Chain_Append> * There was a thread waiting to send a message. This code * puts the messages in the message queue on behalf of the * waiting task. */ the_message->priority = the_thread->Wait.count; 113cd3: 8b 40 24 mov 0x24(%eax),%eax <== NOT EXECUTED 113cd6: 89 43 08 mov %eax,0x8(%ebx) <== NOT EXECUTED the_message->Contents.size = (size_t) the_thread->Wait.option; 113cd9: 8b 4a 30 mov 0x30(%edx),%ecx <== NOT EXECUTED 113cdc: 89 4b 0c mov %ecx,0xc(%ebx) <== NOT EXECUTED * alignments are possible. * Returns pointer to the start of the memory block if success, NULL if * failure. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes 113cdf: 8b 72 2c mov 0x2c(%edx),%esi <== NOT EXECUTED 113ce2: 8b 7d f0 mov -0x10(%ebp),%edi <== NOT EXECUTED 113ce5: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 113ce7: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED 113cea: 89 45 10 mov %eax,0x10(%ebp) <== NOT EXECUTED 113ced: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED 113cf0: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 113cf3: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 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 ); } 113cf6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 113cf9: 5b pop %ebx <== NOT EXECUTED 113cfa: 5e pop %esi <== NOT EXECUTED 113cfb: 5f pop %edi <== NOT EXECUTED 113cfc: c9 leave <== NOT EXECUTED the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 113cfd: e9 ba 46 00 00 jmp 1183bc <_CORE_message_queue_Insert_message><== NOT EXECUTED the_message->priority ); return; } if ( !wait ) { 113d02: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 113d06: 75 11 jne 113d19 <_CORE_message_queue_Seize+0x105> _ISR_Enable( level ); 113d08: 51 push %ecx 113d09: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 113d0a: c7 46 34 04 00 00 00 movl $0x4,0x34(%esi) 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 ); } 113d11: 8d 65 f4 lea -0xc(%ebp),%esp 113d14: 5b pop %ebx 113d15: 5e pop %esi 113d16: 5f pop %edi 113d17: c9 leave 113d18: c3 ret { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** * This routine grows @a the_heap memory area using the size bytes which 113d19: 8b 55 d0 mov -0x30(%ebp),%edx 113d1c: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx) 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; 113d23: 89 56 44 mov %edx,0x44(%esi) executing->Wait.id = id; 113d26: 8b 7d ec mov -0x14(%ebp),%edi 113d29: 89 7e 20 mov %edi,0x20(%esi) executing->Wait.return_argument_second.mutable_object = buffer; 113d2c: 8b 45 e8 mov -0x18(%ebp),%eax 113d2f: 89 46 2c mov %eax,0x2c(%esi) executing->Wait.return_argument = size_p; 113d32: 8b 55 e4 mov -0x1c(%ebp),%edx 113d35: 89 56 28 mov %edx,0x28(%esi) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 113d38: 51 push %ecx 113d39: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 113d3a: c7 45 10 6c 5e 11 00 movl $0x115e6c,0x10(%ebp) 113d41: 8b 7d dc mov -0x24(%ebp),%edi 113d44: 89 7d 0c mov %edi,0xc(%ebp) 113d47: 8b 45 d0 mov -0x30(%ebp),%eax 113d4a: 89 45 08 mov %eax,0x8(%ebp) } 113d4d: 8d 65 f4 lea -0xc(%ebp),%esp 113d50: 5b pop %ebx 113d51: 5e pop %esi 113d52: 5f pop %edi 113d53: 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 ); 113d54: e9 0f 1e 00 00 jmp 115b68 <_Thread_queue_Enqueue_with_handler> =============================================================================== 00109a98 <_CORE_message_queue_Submit>: CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 109a98: 55 push %ebp 109a99: 89 e5 mov %esp,%ebp 109a9b: 57 push %edi 109a9c: 56 push %esi 109a9d: 53 push %ebx 109a9e: 83 ec 1c sub $0x1c,%esp 109aa1: 8b 5d 10 mov 0x10(%ebp),%ebx 109aa4: 8a 45 20 mov 0x20(%ebp),%al 109aa7: 88 45 f3 mov %al,-0xd(%ebp) ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 109aaa: b8 01 00 00 00 mov $0x1,%eax 109aaf: 8b 55 08 mov 0x8(%ebp),%edx 109ab2: 3b 5a 4c cmp 0x4c(%edx),%ebx 109ab5: 0f 87 d9 00 00 00 ja 109b94 <_CORE_message_queue_Submit+0xfc><== NEVER TAKEN /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 109abb: 8b 75 08 mov 0x8(%ebp),%esi 109abe: 83 7e 48 00 cmpl $0x0,0x48(%esi) 109ac2: 75 2e jne 109af2 <_CORE_message_queue_Submit+0x5a> the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 109ac4: 83 ec 0c sub $0xc,%esp 109ac7: 56 push %esi 109ac8: e8 57 16 00 00 call 10b124 <_Thread_queue_Dequeue> 109acd: 89 c2 mov %eax,%edx if ( the_thread ) { 109acf: 83 c4 10 add $0x10,%esp 109ad2: 85 c0 test %eax,%eax 109ad4: 74 1c je 109af2 <_CORE_message_queue_Submit+0x5a> * alignments are possible. * Returns pointer to the start of the memory block if success, NULL if * failure. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes 109ad6: 8b 78 2c mov 0x2c(%eax),%edi 109ad9: 8b 75 0c mov 0xc(%ebp),%esi 109adc: 89 d9 mov %ebx,%ecx 109ade: 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; 109ae0: 8b 40 28 mov 0x28(%eax),%eax 109ae3: 89 18 mov %ebx,(%eax) the_thread->Wait.count = submit_type; 109ae5: 8b 45 1c mov 0x1c(%ebp),%eax 109ae8: 89 42 24 mov %eax,0x24(%edx) 109aeb: 31 c0 xor %eax,%eax 109aed: e9 a2 00 00 00 jmp 109b94 <_CORE_message_queue_Submit+0xfc> /* * 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 < 109af2: 8b 55 08 mov 0x8(%ebp),%edx 109af5: 8b 42 48 mov 0x48(%edx),%eax 109af8: 3b 42 44 cmp 0x44(%edx),%eax 109afb: 73 37 jae 109b34 <_CORE_message_queue_Submit+0x9c> ); /** * This function sets @a *size to the size of the block of user memory * which begins at @a starting_address. The size returned in @a *size could * be greater than the size requested for allocation. 109afd: 83 ec 0c sub $0xc,%esp 109b00: 89 d0 mov %edx,%eax 109b02: 83 c0 68 add $0x68,%eax 109b05: 50 push %eax 109b06: e8 65 ff ff ff call 109a70 <_Chain_Get> /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 109b0b: 83 c4 10 add $0x10,%esp 109b0e: 85 c0 test %eax,%eax 109b10: 74 7d je 109b8f <_CORE_message_queue_Submit+0xf7><== NEVER TAKEN * alignments are possible. * Returns pointer to the start of the memory block if success, NULL if * failure. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes 109b12: 8d 78 10 lea 0x10(%eax),%edi 109b15: 8b 75 0c mov 0xc(%ebp),%esi 109b18: 89 d9 mov %ebx,%ecx 109b1a: f3 a4 rep movsb %ds:(%esi),%es:(%edi) _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 109b1c: 89 58 0c mov %ebx,0xc(%eax) the_message->priority = submit_type; 109b1f: 8b 55 1c mov 0x1c(%ebp),%edx 109b22: 89 50 08 mov %edx,0x8(%eax) _CORE_message_queue_Insert_message( 109b25: 51 push %ecx 109b26: 52 push %edx 109b27: 50 push %eax 109b28: ff 75 08 pushl 0x8(%ebp) 109b2b: e8 90 3b 00 00 call 10d6c0 <_CORE_message_queue_Insert_message> 109b30: 31 c0 xor %eax,%eax 109b32: eb 56 jmp 109b8a <_CORE_message_queue_Submit+0xf2> * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) { 109b34: b8 02 00 00 00 mov $0x2,%eax 109b39: 80 7d f3 00 cmpb $0x0,-0xd(%ebp) 109b3d: 74 55 je 109b94 <_CORE_message_queue_Submit+0xfc><== ALWAYS TAKEN /* * Do NOT block on a send if the caller is in an ISR. It is * deadly to block in an ISR. */ if ( _ISR_Is_in_progress() ) { 109b3f: a1 7c cb 11 00 mov 0x11cb7c,%eax <== NOT EXECUTED 109b44: 85 c0 test %eax,%eax <== NOT EXECUTED 109b46: 75 47 jne 109b8f <_CORE_message_queue_Submit+0xf7><== NOT EXECUTED * it as a variable. Doing this emphasizes how dangerous it * would be to use this variable prior to here. */ { Thread_Control *executing = _Thread_Executing; 109b48: a1 a0 cb 11 00 mov 0x11cba0,%eax <== NOT EXECUTED _ISR_Disable( level ); 109b4d: 9c pushf <== NOT EXECUTED 109b4e: fa cli <== NOT EXECUTED 109b4f: 59 pop %ecx <== NOT EXECUTED { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** * This routine grows @a the_heap memory area using the size bytes which 109b50: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 109b53: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi) <== NOT EXECUTED _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 109b5a: 89 70 44 mov %esi,0x44(%eax) <== NOT EXECUTED executing->Wait.id = id; 109b5d: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED 109b60: 89 50 20 mov %edx,0x20(%eax) <== NOT EXECUTED executing->Wait.return_argument_second.immutable_object = buffer; 109b63: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 109b66: 89 50 2c mov %edx,0x2c(%eax) <== NOT EXECUTED executing->Wait.option = (uint32_t) size; 109b69: 89 58 30 mov %ebx,0x30(%eax) <== NOT EXECUTED executing->Wait.count = submit_type; 109b6c: 8b 75 1c mov 0x1c(%ebp),%esi <== NOT EXECUTED 109b6f: 89 70 24 mov %esi,0x24(%eax) <== NOT EXECUTED _ISR_Enable( level ); 109b72: 51 push %ecx <== NOT EXECUTED 109b73: 9d popf <== NOT EXECUTED _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 109b74: 50 push %eax <== NOT EXECUTED 109b75: 68 40 b5 10 00 push $0x10b540 <== NOT EXECUTED 109b7a: ff 75 24 pushl 0x24(%ebp) <== NOT EXECUTED 109b7d: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 109b80: e8 b7 16 00 00 call 10b23c <_Thread_queue_Enqueue_with_handler><== NOT EXECUTED 109b85: b8 07 00 00 00 mov $0x7,%eax <== NOT EXECUTED 109b8a: 83 c4 10 add $0x10,%esp 109b8d: eb 05 jmp 109b94 <_CORE_message_queue_Submit+0xfc> } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 109b8f: b8 03 00 00 00 mov $0x3,%eax <== NOT EXECUTED } 109b94: 8d 65 f4 lea -0xc(%ebp),%esp 109b97: 5b pop %ebx 109b98: 5e pop %esi 109b99: 5f pop %edi 109b9a: c9 leave 109b9b: c3 ret =============================================================================== 00109ba8 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 109ba8: 55 push %ebp 109ba9: 89 e5 mov %esp,%ebp 109bab: 57 push %edi 109bac: 56 push %esi 109bad: 53 push %ebx 109bae: 83 ec 0c sub $0xc,%esp 109bb1: 8b 5d 08 mov 0x8(%ebp),%ebx 109bb4: 8b 45 10 mov 0x10(%ebp),%eax /* 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; 109bb7: 8d 7b 40 lea 0x40(%ebx),%edi 109bba: b9 04 00 00 00 mov $0x4,%ecx 109bbf: 8b 75 0c mov 0xc(%ebp),%esi 109bc2: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 109bc4: 89 43 50 mov %eax,0x50(%ebx) the_mutex->blocked_count = 0; 109bc7: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx) if ( initial_lock == CORE_MUTEX_LOCKED ) { 109bce: 85 c0 test %eax,%eax 109bd0: 75 35 jne 109c07 <_CORE_mutex_Initialize+0x5f> the_mutex->nest_count = 1; 109bd2: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) the_mutex->holder = _Thread_Executing; 109bd9: 8b 15 a0 cb 11 00 mov 0x11cba0,%edx 109bdf: 89 53 5c mov %edx,0x5c(%ebx) the_mutex->holder_id = _Thread_Executing->Object.id; 109be2: 8b 42 08 mov 0x8(%edx),%eax 109be5: 89 43 60 mov %eax,0x60(%ebx) /** * This function attempts to allocate a memory block of @a size bytes from * @a the_heap so that the start of the user memory is aligned on the * @a alignment boundary. If @a alignment is 0, it is set to CPU_ALIGNMENT. * Any other value of @a alignment is taken "as is", i.e., even odd 109be8: 8b 43 48 mov 0x48(%ebx),%eax if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 109beb: 83 f8 02 cmp $0x2,%eax 109bee: 74 05 je 109bf5 <_CORE_mutex_Initialize+0x4d> 109bf0: 83 f8 03 cmp $0x3,%eax 109bf3: 75 27 jne 109c1c <_CORE_mutex_Initialize+0x74><== ALWAYS TAKEN _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 109bf5: 8b 42 14 mov 0x14(%edx),%eax 109bf8: b9 06 00 00 00 mov $0x6,%ecx 109bfd: 3b 43 4c cmp 0x4c(%ebx),%eax 109c00: 72 3a jb 109c3c <_CORE_mutex_Initialize+0x94><== NEVER TAKEN _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++; 109c02: ff 42 1c incl 0x1c(%edx) 109c05: eb 15 jmp 109c1c <_CORE_mutex_Initialize+0x74> } } else { the_mutex->nest_count = 0; 109c07: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_mutex->holder = NULL; 109c0e: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 109c15: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) } _Thread_queue_Initialize( 109c1c: 6a 05 push $0x5 109c1e: 68 00 04 00 00 push $0x400 109c23: 8b 45 0c mov 0xc(%ebp),%eax 109c26: 83 78 08 00 cmpl $0x0,0x8(%eax) 109c2a: 0f 95 c0 setne %al 109c2d: 0f b6 c0 movzbl %al,%eax 109c30: 50 push %eax 109c31: 53 push %ebx 109c32: e8 39 18 00 00 call 10b470 <_Thread_queue_Initialize> 109c37: 31 c9 xor %ecx,%ecx 109c39: 83 c4 10 add $0x10,%esp STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 109c3c: 89 c8 mov %ecx,%eax 109c3e: 8d 65 f4 lea -0xc(%ebp),%esp 109c41: 5b pop %ebx 109c42: 5e pop %esi 109c43: 5f pop %edi 109c44: c9 leave 109c45: c3 ret =============================================================================== 00109c94 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 109c94: 55 push %ebp 109c95: 89 e5 mov %esp,%ebp 109c97: 56 push %esi 109c98: 53 push %ebx 109c99: 8b 75 08 mov 0x8(%ebp),%esi 109c9c: 8a 5d 10 mov 0x10(%ebp),%bl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 109c9f: a1 e0 ca 11 00 mov 0x11cae0,%eax 109ca4: 85 c0 test %eax,%eax 109ca6: 74 19 je 109cc1 <_CORE_mutex_Seize+0x2d> 109ca8: 84 db test %bl,%bl 109caa: 74 15 je 109cc1 <_CORE_mutex_Seize+0x2d><== NEVER TAKEN 109cac: 83 3d 80 cc 11 00 01 cmpl $0x1,0x11cc80 109cb3: 76 0c jbe 109cc1 <_CORE_mutex_Seize+0x2d> 109cb5: 50 push %eax 109cb6: 6a 13 push $0x13 109cb8: 6a 00 push $0x0 109cba: 6a 00 push $0x0 109cbc: e8 93 04 00 00 call 10a154 <_Internal_error_Occurred> 109cc1: 50 push %eax 109cc2: 50 push %eax 109cc3: 8d 45 18 lea 0x18(%ebp),%eax 109cc6: 50 push %eax 109cc7: 56 push %esi 109cc8: e8 bf 3a 00 00 call 10d78c <_CORE_mutex_Seize_interrupt_trylock> 109ccd: 83 c4 10 add $0x10,%esp 109cd0: 85 c0 test %eax,%eax 109cd2: 74 49 je 109d1d <_CORE_mutex_Seize+0x89> 109cd4: 84 db test %bl,%bl 109cd6: 75 12 jne 109cea <_CORE_mutex_Seize+0x56> 109cd8: ff 75 18 pushl 0x18(%ebp) 109cdb: 9d popf 109cdc: a1 a0 cb 11 00 mov 0x11cba0,%eax 109ce1: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) 109ce8: eb 33 jmp 109d1d <_CORE_mutex_Seize+0x89> { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** * This routine grows @a the_heap memory area using the size bytes which 109cea: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi) 109cf1: 8b 15 a0 cb 11 00 mov 0x11cba0,%edx 109cf7: 89 72 44 mov %esi,0x44(%edx) 109cfa: 8b 45 0c mov 0xc(%ebp),%eax 109cfd: 89 42 20 mov %eax,0x20(%edx) /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 109d00: a1 e0 ca 11 00 mov 0x11cae0,%eax 109d05: 40 inc %eax 109d06: a3 e0 ca 11 00 mov %eax,0x11cae0 109d0b: ff 75 18 pushl 0x18(%ebp) 109d0e: 9d popf 109d0f: 53 push %ebx 109d10: 53 push %ebx 109d11: ff 75 14 pushl 0x14(%ebp) 109d14: 56 push %esi 109d15: e8 2e ff ff ff call 109c48 <_CORE_mutex_Seize_interrupt_blocking> 109d1a: 83 c4 10 add $0x10,%esp } 109d1d: 8d 65 f8 lea -0x8(%ebp),%esp 109d20: 5b pop %ebx 109d21: 5e pop %esi 109d22: c9 leave 109d23: c3 ret =============================================================================== 0010d78c <_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 ) { 10d78c: 55 push %ebp 10d78d: 89 e5 mov %esp,%ebp 10d78f: 56 push %esi 10d790: 53 push %ebx 10d791: 8b 4d 08 mov 0x8(%ebp),%ecx bool _Protected_heap_Get_block_size( Heap_Control *the_heap, void *starting_address, size_t *size ); 10d794: 8b 45 0c mov 0xc(%ebp),%eax 10d797: 8b 30 mov (%eax),%esi /** * This function tries to resize in place the block that is pointed to by the * @a starting_address to the new @a size. * 10d799: 8b 15 a0 cb 11 00 mov 0x11cba0,%edx * @param[in] the_heap is the heap to operate upon 10d79f: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) * @param[in] starting_address is the starting address of the user block 10d7a6: 83 79 50 00 cmpl $0x0,0x50(%ecx) 10d7aa: 0f 84 82 00 00 00 je 10d832 <_CORE_mutex_Seize_interrupt_trylock+0xa6> * to be resized 10d7b0: c7 41 50 00 00 00 00 movl $0x0,0x50(%ecx) * @param[in] size is the new size 10d7b7: 89 51 5c mov %edx,0x5c(%ecx) * 10d7ba: 8b 42 08 mov 0x8(%edx),%eax 10d7bd: 89 41 60 mov %eax,0x60(%ecx) * @return TRUE if successfully able to resize the block. 10d7c0: c7 41 54 01 00 00 00 movl $0x1,0x54(%ecx) /** * This function attempts to allocate a memory block of @a size bytes from * @a the_heap so that the start of the user memory is aligned on the * @a alignment boundary. If @a alignment is 0, it is set to CPU_ALIGNMENT. * Any other value of @a alignment is taken "as is", i.e., even odd 10d7c7: 8b 41 48 mov 0x48(%ecx),%eax * @param[in] starting_address is the starting address of the user block * to be resized * @param[in] size is the new size * * @return TRUE if successfully able to resize the block. * FALSE if the block can't be resized in place. 10d7ca: 83 f8 02 cmp $0x2,%eax 10d7cd: 74 05 je 10d7d4 <_CORE_mutex_Seize_interrupt_trylock+0x48><== ALWAYS TAKEN 10d7cf: 83 f8 03 cmp $0x3,%eax <== NOT EXECUTED 10d7d2: 75 03 jne 10d7d7 <_CORE_mutex_Seize_interrupt_trylock+0x4b><== NOT EXECUTED void *starting_address, size_t size ); /** * This routine returns the block of memory which begins 10d7d4: ff 42 1c incl 0x1c(%edx) * at @a starting_address to @a the_heap. Any coalescing which is * possible with the freeing of this routine is performed. * 10d7d7: 83 79 48 03 cmpl $0x3,0x48(%ecx) 10d7db: 74 04 je 10d7e1 <_CORE_mutex_Seize_interrupt_trylock+0x55><== NEVER TAKEN * @param[in] the_heap is the heap to operate upon 10d7dd: 56 push %esi 10d7de: 9d popf 10d7df: eb 74 jmp 10d855 <_CORE_mutex_Seize_interrupt_trylock+0xc9> void *start_address ); /** * This routine walks the heap to verify its integrity. * 10d7e1: 8b 42 14 mov 0x14(%edx),%eax <== NOT EXECUTED * @param[in] the_heap is the heap to operate upon 10d7e4: 3b 41 4c cmp 0x4c(%ecx),%eax <== NOT EXECUTED 10d7e7: 75 04 jne 10d7ed <_CORE_mutex_Seize_interrupt_trylock+0x61><== NOT EXECUTED * @param[in] source is a user specified integer which may be used to 10d7e9: 56 push %esi <== NOT EXECUTED 10d7ea: 9d popf <== NOT EXECUTED 10d7eb: eb 68 jmp 10d855 <_CORE_mutex_Seize_interrupt_trylock+0xc9><== NOT EXECUTED * indicate where in the application this was invoked from * @param[in] do_dump is set to TRUE if errors should be printed * @return TRUE if the test passed fine, FALSE otherwise. */ 10d7ed: 76 27 jbe 10d816 <_CORE_mutex_Seize_interrupt_trylock+0x8a><== NOT EXECUTED /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10d7ef: a1 e0 ca 11 00 mov 0x11cae0,%eax <== NOT EXECUTED 10d7f4: 40 inc %eax <== NOT EXECUTED 10d7f5: a3 e0 ca 11 00 mov %eax,0x11cae0 <== NOT EXECUTED * indicate where in the application this was invoked from * @param[in] do_dump is set to TRUE if errors should be printed * @return TRUE if the test passed fine, FALSE otherwise. */ bool _Protected_heap_Walk( Heap_Control *the_heap, 10d7fa: 56 push %esi <== NOT EXECUTED 10d7fb: 9d popf <== NOT EXECUTED int source, 10d7fc: 50 push %eax <== NOT EXECUTED 10d7fd: 6a 00 push $0x0 <== NOT EXECUTED 10d7ff: ff 71 4c pushl 0x4c(%ecx) <== NOT EXECUTED 10d802: ff 71 5c pushl 0x5c(%ecx) <== NOT EXECUTED 10d805: e8 42 d1 ff ff call 10a94c <_Thread_Change_priority><== NOT EXECUTED bool do_dump ); /** * This routine walks the heap and tots up the free and allocated 10d80a: e8 dd d5 ff ff call 10adec <_Thread_Enable_dispatch><== NOT EXECUTED 10d80f: 31 c0 xor %eax,%eax <== NOT EXECUTED 10d811: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10d814: eb 48 jmp 10d85e <_CORE_mutex_Seize_interrupt_trylock+0xd2><== NOT EXECUTED * sizes. * * @param[in] the_heap pointer to heap header * @param[in] the_info pointer to a status information area 10d816: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) <== NOT EXECUTED * 10d81d: c7 41 50 01 00 00 00 movl $0x1,0x50(%ecx) <== NOT EXECUTED * @return true if successfully able to return information 10d824: c7 41 54 00 00 00 00 movl $0x0,0x54(%ecx) <== NOT EXECUTED */ 10d82b: ff 4a 1c decl 0x1c(%edx) <== NOT EXECUTED bool _Protected_heap_Get_information( 10d82e: 56 push %esi <== NOT EXECUTED 10d82f: 9d popf <== NOT EXECUTED 10d830: eb 23 jmp 10d855 <_CORE_mutex_Seize_interrupt_trylock+0xc9><== NOT EXECUTED * in the specified heap. * * @param[in] the_heap pointer to heap header. * @param[in] info pointer to the free block information. * * @return free block information filled in. 10d832: 8b 59 5c mov 0x5c(%ecx),%ebx 10d835: 39 d3 cmp %edx,%ebx 10d837: 75 20 jne 10d859 <_CORE_mutex_Seize_interrupt_trylock+0xcd> */ 10d839: 8b 41 40 mov 0x40(%ecx),%eax 10d83c: 85 c0 test %eax,%eax 10d83e: 74 05 je 10d845 <_CORE_mutex_Seize_interrupt_trylock+0xb9> 10d840: 48 dec %eax 10d841: 75 16 jne 10d859 <_CORE_mutex_Seize_interrupt_trylock+0xcd> 10d843: eb 07 jmp 10d84c <_CORE_mutex_Seize_interrupt_trylock+0xc0> bool _Protected_heap_Get_free_information( Heap_Control *the_heap, 10d845: ff 41 54 incl 0x54(%ecx) Heap_Information *info 10d848: 56 push %esi 10d849: 9d popf 10d84a: eb 09 jmp 10d855 <_CORE_mutex_Seize_interrupt_trylock+0xc9> ); #ifdef __cplusplus 10d84c: c7 43 34 02 00 00 00 movl $0x2,0x34(%ebx) } 10d853: 56 push %esi 10d854: 9d popf 10d855: 31 c0 xor %eax,%eax 10d857: eb 05 jmp 10d85e <_CORE_mutex_Seize_interrupt_trylock+0xd2> 10d859: b8 01 00 00 00 mov $0x1,%eax return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 10d85e: 8d 65 f8 lea -0x8(%ebp),%esp 10d861: 5b pop %ebx 10d862: 5e pop %esi 10d863: c9 leave 10d864: c3 ret =============================================================================== 00109d24 <_CORE_mutex_Surrender>: CORE_mutex_Status _CORE_mutex_Surrender( CORE_mutex_Control *the_mutex, Objects_Id id, CORE_mutex_API_mp_support_callout api_mutex_mp_support ) { 109d24: 55 push %ebp 109d25: 89 e5 mov %esp,%ebp 109d27: 53 push %ebx 109d28: 83 ec 04 sub $0x4,%esp 109d2b: 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; 109d2e: 8b 4b 5c mov 0x5c(%ebx),%ecx * 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 ) { 109d31: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 109d35: 74 11 je 109d48 <_CORE_mutex_Surrender+0x24> if ( !_Thread_Is_executing( holder ) ) 109d37: b8 03 00 00 00 mov $0x3,%eax 109d3c: 3b 0d a0 cb 11 00 cmp 0x11cba0,%ecx 109d42: 0f 85 cb 00 00 00 jne 109e13 <_CORE_mutex_Surrender+0xef> return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 109d48: 8b 43 54 mov 0x54(%ebx),%eax 109d4b: 85 c0 test %eax,%eax 109d4d: 0f 84 be 00 00 00 je 109e11 <_CORE_mutex_Surrender+0xed> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 109d53: 48 dec %eax 109d54: 89 43 54 mov %eax,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 109d57: 85 c0 test %eax,%eax 109d59: 74 17 je 109d72 <_CORE_mutex_Surrender+0x4e> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 109d5b: 8b 53 40 mov 0x40(%ebx),%edx 109d5e: 85 d2 test %edx,%edx 109d60: 0f 84 ab 00 00 00 je 109e11 <_CORE_mutex_Surrender+0xed><== ALWAYS TAKEN 109d66: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED 109d6b: 4a dec %edx <== NOT EXECUTED 109d6c: 0f 84 a1 00 00 00 je 109e13 <_CORE_mutex_Surrender+0xef><== NOT EXECUTED /** * This function attempts to allocate a memory block of @a size bytes from * @a the_heap so that the start of the user memory is aligned on the * @a alignment boundary. If @a alignment is 0, it is set to CPU_ALIGNMENT. * Any other value of @a alignment is taken "as is", i.e., even odd 109d72: 8b 43 48 mov 0x48(%ebx),%eax /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 109d75: 83 f8 02 cmp $0x2,%eax 109d78: 74 05 je 109d7f <_CORE_mutex_Surrender+0x5b> 109d7a: 83 f8 03 cmp $0x3,%eax 109d7d: 75 03 jne 109d82 <_CORE_mutex_Surrender+0x5e><== ALWAYS TAKEN the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 109d7f: ff 49 1c decl 0x1c(%ecx) } the_mutex->holder = NULL; 109d82: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 109d89: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) 109d90: 8b 43 48 mov 0x48(%ebx),%eax /* * 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 ) || 109d93: 83 f8 02 cmp $0x2,%eax 109d96: 74 05 je 109d9d <_CORE_mutex_Surrender+0x79> 109d98: 83 f8 03 cmp $0x3,%eax 109d9b: 75 1b jne 109db8 <_CORE_mutex_Surrender+0x94><== ALWAYS TAKEN _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 && 109d9d: 83 79 1c 00 cmpl $0x0,0x1c(%ecx) 109da1: 75 15 jne 109db8 <_CORE_mutex_Surrender+0x94> 109da3: 8b 41 18 mov 0x18(%ecx),%eax 109da6: 3b 41 14 cmp 0x14(%ecx),%eax 109da9: 74 0d je 109db8 <_CORE_mutex_Surrender+0x94> holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 109dab: 52 push %edx 109dac: 6a 01 push $0x1 109dae: 50 push %eax 109daf: 51 push %ecx 109db0: e8 97 0b 00 00 call 10a94c <_Thread_Change_priority> 109db5: 83 c4 10 add $0x10,%esp /* * 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 ) ) ) { 109db8: 83 ec 0c sub $0xc,%esp 109dbb: 53 push %ebx 109dbc: e8 63 13 00 00 call 10b124 <_Thread_queue_Dequeue> 109dc1: 89 c2 mov %eax,%edx 109dc3: 83 c4 10 add $0x10,%esp 109dc6: 85 c0 test %eax,%eax 109dc8: 74 40 je 109e0a <_CORE_mutex_Surrender+0xe6> } else #endif { the_mutex->holder = the_thread; 109dca: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 109dcd: 8b 40 08 mov 0x8(%eax),%eax 109dd0: 89 43 60 mov %eax,0x60(%ebx) the_mutex->nest_count = 1; 109dd3: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 109dda: 8b 43 48 mov 0x48(%ebx),%eax 109ddd: 83 f8 02 cmp $0x2,%eax 109de0: 74 07 je 109de9 <_CORE_mutex_Surrender+0xc5> 109de2: 83 f8 03 cmp $0x3,%eax 109de5: 75 2a jne 109e11 <_CORE_mutex_Surrender+0xed><== ALWAYS TAKEN 109de7: eb 05 jmp 109dee <_CORE_mutex_Surrender+0xca><== NOT EXECUTED 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++; 109de9: ff 42 1c incl 0x1c(%edx) 109dec: eb 23 jmp 109e11 <_CORE_mutex_Surrender+0xed> 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++; 109dee: ff 42 1c incl 0x1c(%edx) <== NOT EXECUTED if (the_mutex->Attributes.priority_ceiling < 109df1: 8b 43 4c mov 0x4c(%ebx),%eax <== NOT EXECUTED 109df4: 3b 42 14 cmp 0x14(%edx),%eax <== NOT EXECUTED 109df7: 73 18 jae 109e11 <_CORE_mutex_Surrender+0xed><== NOT EXECUTED the_thread->current_priority){ _Thread_Change_priority( 109df9: 51 push %ecx <== NOT EXECUTED 109dfa: 6a 00 push $0x0 <== NOT EXECUTED 109dfc: 50 push %eax <== NOT EXECUTED 109dfd: 52 push %edx <== NOT EXECUTED 109dfe: e8 49 0b 00 00 call 10a94c <_Thread_Change_priority><== NOT EXECUTED 109e03: 31 c0 xor %eax,%eax <== NOT EXECUTED 109e05: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109e08: eb 09 jmp 109e13 <_CORE_mutex_Surrender+0xef><== NOT EXECUTED } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 109e0a: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) 109e11: 31 c0 xor %eax,%eax return CORE_MUTEX_STATUS_SUCCESSFUL; } 109e13: 8b 5d fc mov -0x4(%ebp),%ebx 109e16: c9 leave 109e17: c3 ret =============================================================================== 00109e64 <_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 ) { 109e64: 55 push %ebp 109e65: 89 e5 mov %esp,%ebp 109e67: 53 push %ebx 109e68: 83 ec 10 sub $0x10,%esp 109e6b: 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)) ) { 109e6e: 53 push %ebx 109e6f: e8 b0 12 00 00 call 10b124 <_Thread_queue_Dequeue> 109e74: 83 c4 10 add $0x10,%esp 109e77: 31 d2 xor %edx,%edx 109e79: 85 c0 test %eax,%eax 109e7b: 75 18 jne 109e95 <_CORE_semaphore_Surrender+0x31> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 109e7d: 9c pushf 109e7e: fa cli 109e7f: 59 pop %ecx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 109e80: 8b 43 48 mov 0x48(%ebx),%eax 109e83: ba 04 00 00 00 mov $0x4,%edx 109e88: 3b 43 40 cmp 0x40(%ebx),%eax 109e8b: 73 06 jae 109e93 <_CORE_semaphore_Surrender+0x2f><== NEVER TAKEN the_semaphore->count += 1; 109e8d: 40 inc %eax 109e8e: 89 43 48 mov %eax,0x48(%ebx) 109e91: 31 d2 xor %edx,%edx else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 109e93: 51 push %ecx 109e94: 9d popf } return status; } 109e95: 89 d0 mov %edx,%eax 109e97: 8b 5d fc mov -0x4(%ebp),%ebx 109e9a: c9 leave 109e9b: c3 ret =============================================================================== 0010d61d <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 10d61d: 55 push %ebp <== NOT EXECUTED 10d61e: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10d620: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10d623: 85 05 a4 cb 11 00 test %eax,0x11cba4 <== NOT EXECUTED 10d629: 0f 95 c0 setne %al <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 10d62c: c9 leave <== NOT EXECUTED 10d62d: c3 ret <== NOT EXECUTED =============================================================================== 00108bcc <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 108bcc: 55 push %ebp 108bcd: 89 e5 mov %esp,%ebp 108bcf: 57 push %edi 108bd0: 56 push %esi 108bd1: 53 push %ebx 108bd2: 83 ec 0c sub $0xc,%esp 108bd5: 8b 45 08 mov 0x8(%ebp),%eax 108bd8: 8b 75 0c mov 0xc(%ebp),%esi 108bdb: 8b 55 10 mov 0x10(%ebp),%edx 108bde: 89 55 ec mov %edx,-0x14(%ebp) 108be1: 8b 4d 14 mov 0x14(%ebp),%ecx 108be4: 89 4d e8 mov %ecx,-0x18(%ebp) rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 108be7: 8b 1d a0 cb 11 00 mov 0x11cba0,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 108bed: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 108bf4: 8b 93 f4 00 00 00 mov 0xf4(%ebx),%edx 108bfa: 89 55 f0 mov %edx,-0x10(%ebp) _ISR_Disable( level ); 108bfd: 9c pushf 108bfe: fa cli 108bff: 5f pop %edi pending_events = api->pending_events; 108c00: 8b 4d f0 mov -0x10(%ebp),%ecx 108c03: 8b 11 mov (%ecx),%edx seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 108c05: 89 c1 mov %eax,%ecx 108c07: 21 d1 and %edx,%ecx 108c09: 74 23 je 108c2e <_Event_Seize+0x62> 108c0b: 39 c1 cmp %eax,%ecx 108c0d: 74 08 je 108c17 <_Event_Seize+0x4b> 108c0f: f7 c6 02 00 00 00 test $0x2,%esi 108c15: 74 17 je 108c2e <_Event_Seize+0x62> <== NEVER TAKEN (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 108c17: 89 c8 mov %ecx,%eax 108c19: f7 d0 not %eax 108c1b: 21 d0 and %edx,%eax 108c1d: 8b 55 f0 mov -0x10(%ebp),%edx 108c20: 89 02 mov %eax,(%edx) _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 108c22: 57 push %edi 108c23: 9d popf *event_out = seized_events; 108c24: 8b 45 e8 mov -0x18(%ebp),%eax 108c27: 89 08 mov %ecx,(%eax) 108c29: e9 ad 00 00 00 jmp 108cdb <_Event_Seize+0x10f> return; } if ( _Options_Is_no_wait( option_set ) ) { 108c2e: f7 c6 01 00 00 00 test $0x1,%esi 108c34: 74 13 je 108c49 <_Event_Seize+0x7d> _ISR_Enable( level ); 108c36: 57 push %edi 108c37: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 108c38: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 108c3f: 8b 55 e8 mov -0x18(%ebp),%edx 108c42: 89 0a mov %ecx,(%edx) 108c44: e9 92 00 00 00 jmp 108cdb <_Event_Seize+0x10f> return; } _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 108c49: c7 05 88 cd 11 00 01 movl $0x1,0x11cd88 108c50: 00 00 00 executing->Wait.option = (uint32_t) option_set; 108c53: 89 73 30 mov %esi,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 108c56: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 108c59: 8b 4d e8 mov -0x18(%ebp),%ecx 108c5c: 89 4b 28 mov %ecx,0x28(%ebx) _ISR_Enable( level ); 108c5f: 57 push %edi 108c60: 9d popf if ( ticks ) { 108c61: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 108c65: 74 34 je 108c9b <_Event_Seize+0xcf> _Watchdog_Initialize( 108c67: 8b 43 08 mov 0x8(%ebx),%eax * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 108c6a: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) * @param[in] the_heap is the heap to operate upon 108c71: c7 43 64 1c 8e 10 00 movl $0x108e1c,0x64(%ebx) * @param[in] starting_address is the starting address of the memory for 108c78: 89 43 68 mov %eax,0x68(%ebx) * the heap 108c7b: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( Heap_Control *the_heap, 108c82: 8b 45 ec mov -0x14(%ebp),%eax 108c85: 89 43 54 mov %eax,0x54(%ebx) void *starting_address, size_t *size 108c88: 52 push %edx 108c89: 52 push %edx 108c8a: 8d 43 48 lea 0x48(%ebx),%eax 108c8d: 50 push %eax 108c8e: 68 c0 cb 11 00 push $0x11cbc0 108c93: e8 f0 2e 00 00 call 10bb88 <_Watchdog_Insert> 108c98: 83 c4 10 add $0x10,%esp NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 108c9b: 50 push %eax 108c9c: 50 push %eax 108c9d: 68 00 01 00 00 push $0x100 108ca2: 53 push %ebx 108ca3: e8 34 29 00 00 call 10b5dc <_Thread_Set_state> _ISR_Disable( level ); 108ca8: 9c pushf 108ca9: fa cli 108caa: 5a pop %edx sync_state = _Event_Sync_state; 108cab: a1 88 cd 11 00 mov 0x11cd88,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 108cb0: c7 05 88 cd 11 00 00 movl $0x0,0x11cd88 108cb7: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 108cba: 83 c4 10 add $0x10,%esp 108cbd: 83 f8 01 cmp $0x1,%eax 108cc0: 75 04 jne 108cc6 <_Event_Seize+0xfa> _ISR_Enable( level ); 108cc2: 52 push %edx 108cc3: 9d popf 108cc4: eb 15 jmp 108cdb <_Event_Seize+0x10f> * 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 ); 108cc6: 89 55 10 mov %edx,0x10(%ebp) 108cc9: 89 5d 0c mov %ebx,0xc(%ebp) 108ccc: 89 45 08 mov %eax,0x8(%ebp) } 108ccf: 8d 65 f4 lea -0xc(%ebp),%esp 108cd2: 5b pop %ebx 108cd3: 5e pop %esi 108cd4: 5f pop %edi 108cd5: 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 ); 108cd6: e9 25 1c 00 00 jmp 10a900 <_Thread_blocking_operation_Cancel> } 108cdb: 8d 65 f4 lea -0xc(%ebp),%esp 108cde: 5b pop %ebx 108cdf: 5e pop %esi 108ce0: 5f pop %edi 108ce1: c9 leave 108ce2: c3 ret =============================================================================== 00108d30 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 108d30: 55 push %ebp 108d31: 89 e5 mov %esp,%ebp 108d33: 57 push %edi 108d34: 56 push %esi 108d35: 53 push %ebx 108d36: 83 ec 0c sub $0xc,%esp 108d39: 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 ]; 108d3c: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax 108d42: 89 45 f0 mov %eax,-0x10(%ebp) option_set = (rtems_option) the_thread->Wait.option; 108d45: 8b 53 30 mov 0x30(%ebx),%edx 108d48: 89 55 ec mov %edx,-0x14(%ebp) _ISR_Disable( level ); 108d4b: 9c pushf 108d4c: fa cli 108d4d: 5f pop %edi pending_events = api->pending_events; 108d4e: 8b 30 mov (%eax),%esi event_condition = (rtems_event_set) the_thread->Wait.count; 108d50: 8b 53 24 mov 0x24(%ebx),%edx seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 108d53: 89 d1 mov %edx,%ecx 108d55: 21 f1 and %esi,%ecx 108d57: 75 07 jne 108d60 <_Event_Surrender+0x30> _ISR_Enable( level ); 108d59: 57 push %edi 108d5a: 9d popf 108d5b: e9 b1 00 00 00 jmp 108e11 <_Event_Surrender+0xe1> /* * 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() && 108d60: a1 7c cb 11 00 mov 0x11cb7c,%eax 108d65: 85 c0 test %eax,%eax 108d67: 74 49 je 108db2 <_Event_Surrender+0x82> 108d69: 3b 1d a0 cb 11 00 cmp 0x11cba0,%ebx 108d6f: 75 41 jne 108db2 <_Event_Surrender+0x82> 108d71: a1 88 cd 11 00 mov 0x11cd88,%eax 108d76: 48 dec %eax 108d77: 74 0a je 108d83 <_Event_Surrender+0x53> <== ALWAYS TAKEN 108d79: a1 88 cd 11 00 mov 0x11cd88,%eax <== NOT EXECUTED 108d7e: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 108d81: 75 2f jne 108db2 <_Event_Surrender+0x82> <== NOT EXECUTED _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 108d83: 39 d1 cmp %edx,%ecx 108d85: 74 06 je 108d8d <_Event_Surrender+0x5d> <== ALWAYS TAKEN 108d87: f6 45 ec 02 testb $0x2,-0x14(%ebp) <== NOT EXECUTED 108d8b: 74 21 je 108dae <_Event_Surrender+0x7e> <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 108d8d: 89 c8 mov %ecx,%eax 108d8f: f7 d0 not %eax 108d91: 21 f0 and %esi,%eax 108d93: 8b 55 f0 mov -0x10(%ebp),%edx 108d96: 89 02 mov %eax,(%edx) the_thread->Wait.count = 0; 108d98: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 108d9f: 8b 43 28 mov 0x28(%ebx),%eax 108da2: 89 08 mov %ecx,(%eax) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 108da4: c7 05 88 cd 11 00 03 movl $0x3,0x11cd88 108dab: 00 00 00 } _ISR_Enable( level ); 108dae: 57 push %edi 108daf: 9d popf 108db0: eb 5f jmp 108e11 <_Event_Surrender+0xe1> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 108db2: f6 43 11 01 testb $0x1,0x11(%ebx) 108db6: 74 57 je 108e0f <_Event_Surrender+0xdf> <== NEVER TAKEN if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 108db8: 39 d1 cmp %edx,%ecx 108dba: 74 06 je 108dc2 <_Event_Surrender+0x92> 108dbc: f6 45 ec 02 testb $0x2,-0x14(%ebp) 108dc0: 74 4d je 108e0f <_Event_Surrender+0xdf> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 108dc2: 89 c8 mov %ecx,%eax 108dc4: f7 d0 not %eax 108dc6: 21 f0 and %esi,%eax 108dc8: 8b 55 f0 mov -0x10(%ebp),%edx 108dcb: 89 02 mov %eax,(%edx) the_thread->Wait.count = 0; 108dcd: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 108dd4: 8b 43 28 mov 0x28(%ebx),%eax 108dd7: 89 08 mov %ecx,(%eax) _ISR_Flash( level ); 108dd9: 57 push %edi 108dda: 9d popf 108ddb: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 108ddc: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 108de0: 74 06 je 108de8 <_Event_Surrender+0xb8> _ISR_Enable( level ); 108de2: 57 push %edi 108de3: 9d popf void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ); /** 108de4: 51 push %ecx 108de5: 51 push %ecx 108de6: eb 17 jmp 108dff <_Event_Surrender+0xcf> * a block of the requested size, then NULL is returned. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes * @return NULL if unsuccessful and a pointer to the block if successful */ 108de8: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 108def: 57 push %edi 108df0: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 108df1: 83 ec 0c sub $0xc,%esp 108df4: 8d 43 48 lea 0x48(%ebx),%eax 108df7: 50 push %eax 108df8: e8 a3 2e 00 00 call 10bca0 <_Watchdog_Remove> void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ); /** 108dfd: 58 pop %eax 108dfe: 5a pop %edx 108dff: 68 f8 ff 03 10 push $0x1003fff8 108e04: 53 push %ebx 108e05: e8 62 1c 00 00 call 10aa6c <_Thread_Clear_state> 108e0a: 83 c4 10 add $0x10,%esp 108e0d: eb 02 jmp 108e11 <_Event_Surrender+0xe1> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 108e0f: 57 push %edi <== NOT EXECUTED 108e10: 9d popf <== NOT EXECUTED } 108e11: 8d 65 f4 lea -0xc(%ebp),%esp 108e14: 5b pop %ebx 108e15: 5e pop %esi 108e16: 5f pop %edi 108e17: c9 leave 108e18: c3 ret =============================================================================== 00108e1c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 108e1c: 55 push %ebp 108e1d: 89 e5 mov %esp,%ebp 108e1f: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 108e22: 8d 45 fc lea -0x4(%ebp),%eax 108e25: 50 push %eax 108e26: ff 75 08 pushl 0x8(%ebp) 108e29: e8 de 1f 00 00 call 10ae0c <_Thread_Get> 108e2e: 89 c2 mov %eax,%edx switch ( location ) { 108e30: 83 c4 10 add $0x10,%esp 108e33: 83 7d fc 00 cmpl $0x0,-0x4(%ebp) 108e37: 75 5f jne 108e98 <_Event_Timeout+0x7c> <== NEVER TAKEN * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 108e39: 9c pushf 108e3a: fa cli 108e3b: 59 pop %ecx if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 108e3c: 83 78 24 00 cmpl $0x0,0x24(%eax) 108e40: 75 0f jne 108e51 <_Event_Timeout+0x35> <== ALWAYS TAKEN 108e42: a1 e0 ca 11 00 mov 0x11cae0,%eax <== NOT EXECUTED 108e47: 48 dec %eax <== NOT EXECUTED 108e48: a3 e0 ca 11 00 mov %eax,0x11cae0 <== NOT EXECUTED _Thread_Unnest_dispatch(); _ISR_Enable( level ); 108e4d: 51 push %ecx <== NOT EXECUTED 108e4e: 9d popf <== NOT EXECUTED 108e4f: eb 47 jmp 108e98 <_Event_Timeout+0x7c> <== NOT EXECUTED return; } the_thread->Wait.count = 0; 108e51: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 108e58: 3b 05 a0 cb 11 00 cmp 0x11cba0,%eax 108e5e: 75 14 jne 108e74 <_Event_Timeout+0x58> Thread_blocking_operation_States sync = _Event_Sync_state; 108e60: a1 88 cd 11 00 mov 0x11cd88,%eax if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 108e65: 83 f8 01 cmp $0x1,%eax 108e68: 77 0a ja 108e74 <_Event_Timeout+0x58> <== NEVER TAKEN (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 108e6a: c7 05 88 cd 11 00 02 movl $0x2,0x11cd88 108e71: 00 00 00 } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 108e74: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) _ISR_Enable( level ); 108e7b: 51 push %ecx 108e7c: 9d popf void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ); /** 108e7d: 50 push %eax 108e7e: 50 push %eax 108e7f: 68 f8 ff 03 10 push $0x1003fff8 108e84: 52 push %edx 108e85: e8 e2 1b 00 00 call 10aa6c <_Thread_Clear_state> 108e8a: a1 e0 ca 11 00 mov 0x11cae0,%eax 108e8f: 48 dec %eax 108e90: a3 e0 ca 11 00 mov %eax,0x11cae0 108e95: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 108e98: c9 leave 108e99: c3 ret =============================================================================== 0010d8bc <_Heap_Allocate>: void *_Heap_Allocate( Heap_Control *the_heap, size_t size ) { 10d8bc: 55 push %ebp 10d8bd: 89 e5 mov %esp,%ebp 10d8bf: 57 push %edi 10d8c0: 56 push %esi 10d8c1: 53 push %ebx 10d8c2: 83 ec 10 sub $0x10,%esp 10d8c5: 8b 75 08 mov 0x8(%ebp),%esi Heap_Block *the_block; void *ptr = NULL; Heap_Statistics *const stats = &the_heap->stats; Heap_Block *const tail = _Heap_Tail(the_heap); the_size = 10d8c8: ff 76 14 pushl 0x14(%esi) 10d8cb: ff 76 10 pushl 0x10(%esi) 10d8ce: ff 75 0c pushl 0xc(%ebp) 10d8d1: e8 c5 c7 ff ff call 10a09b <_Heap_Calc_block_size> _Heap_Calc_block_size(size, the_heap->page_size, the_heap->min_block_size); if(the_size == 0) 10d8d6: 83 c4 10 add $0x10,%esp 10d8d9: 31 d2 xor %edx,%edx 10d8db: 85 c0 test %eax,%eax 10d8dd: 74 3c je 10d91b <_Heap_Allocate+0x5f> <== NEVER TAKEN * @param[in] starting_address is the starting address of the memory * to add to the heap * @param[in] size is the size in bytes of the memory area to add * @return a status indicating success or the reason for failure */ bool _Protected_heap_Extend( 10d8df: 8b 5e 08 mov 0x8(%esi),%ebx 10d8e2: 31 ff xor %edi,%edi 10d8e4: eb 27 jmp 10d90d <_Heap_Allocate+0x51> /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); /* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the result of the comparison. */ if(the_block->size >= the_size) { 10d8e6: 39 43 04 cmp %eax,0x4(%ebx) 10d8e9: 72 1e jb 10d909 <_Heap_Allocate+0x4d> (void)_Heap_Block_allocate(the_heap, the_block, the_size ); 10d8eb: 52 push %edx 10d8ec: 50 push %eax 10d8ed: 53 push %ebx 10d8ee: 56 push %esi 10d8ef: e8 e4 c7 ff ff call 10a0d8 <_Heap_Block_allocate> * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory for * the heap 10d8f4: 8d 53 08 lea 0x8(%ebx),%edx ptr = _Heap_User_area(the_block); stats->allocs += 1; 10d8f7: ff 46 48 incl 0x48(%esi) stats->searches += search_count + 1; 10d8fa: 8b 46 4c mov 0x4c(%esi),%eax 10d8fd: 8d 44 07 01 lea 0x1(%edi,%eax,1),%eax 10d901: 89 46 4c mov %eax,0x4c(%esi) 10d904: 83 c4 10 add $0x10,%esp 10d907: eb 0a jmp 10d913 <_Heap_Allocate+0x57> return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; the_block = the_block->next, ++search_count) 10d909: 8b 5b 08 mov 0x8(%ebx),%ebx 10d90c: 47 inc %edi if(the_size == 0) return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 10d90d: 39 f3 cmp %esi,%ebx 10d90f: 75 d5 jne 10d8e6 <_Heap_Allocate+0x2a> 10d911: 31 d2 xor %edx,%edx _HAssert(_Heap_Is_aligned_ptr(ptr, the_heap->page_size)); break; } } if(stats->max_search < search_count) 10d913: 39 7e 44 cmp %edi,0x44(%esi) 10d916: 73 03 jae 10d91b <_Heap_Allocate+0x5f> stats->max_search = search_count; 10d918: 89 7e 44 mov %edi,0x44(%esi) return ptr; } 10d91b: 89 d0 mov %edx,%eax 10d91d: 8d 65 f4 lea -0xc(%ebp),%esp 10d920: 5b pop %ebx 10d921: 5e pop %esi 10d922: 5f pop %edi 10d923: c9 leave 10d924: c3 ret =============================================================================== 0010b758 <_Heap_Allocate_aligned>: void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 10b758: 55 push %ebp 10b759: 89 e5 mov %esp,%ebp 10b75b: 57 push %edi 10b75c: 56 push %esi 10b75d: 53 push %ebx 10b75e: 83 ec 30 sub $0x30,%esp 10b761: 8b 45 0c mov 0xc(%ebp),%eax uint32_t search_count; Heap_Block *the_block; void *user_ptr = NULL; uint32_t const page_size = the_heap->page_size; 10b764: 8b 55 08 mov 0x8(%ebp),%edx 10b767: 8b 52 10 mov 0x10(%edx),%edx 10b76a: 89 55 dc mov %edx,-0x24(%ebp) Heap_Statistics *const stats = &the_heap->stats; Heap_Block *const tail = _Heap_Tail(the_heap); uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET; 10b76d: 8d 48 fc lea -0x4(%eax),%ecx 10b770: 89 4d e0 mov %ecx,-0x20(%ebp) uint32_t const the_size = _Heap_Calc_block_size(size, page_size, the_heap->min_block_size); 10b773: 8b 55 08 mov 0x8(%ebp),%edx 10b776: ff 72 14 pushl 0x14(%edx) 10b779: ff 75 dc pushl -0x24(%ebp) 10b77c: 50 push %eax 10b77d: e8 2d 04 00 00 call 10bbaf <_Heap_Calc_block_size> 10b782: 89 45 e4 mov %eax,-0x1c(%ebp) if(the_size == 0) 10b785: 83 c4 10 add $0x10,%esp 10b788: 31 c0 xor %eax,%eax 10b78a: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10b78e: 0f 84 30 01 00 00 je 10b8c4 <_Heap_Allocate_aligned+0x16c><== NEVER TAKEN return NULL; if(alignment == 0) 10b794: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10b798: 75 07 jne 10b7a1 <_Heap_Allocate_aligned+0x49> 10b79a: c7 45 10 04 00 00 00 movl $0x4,0x10(%ebp) ) { return ( the_thread == _Thread_Heir ); } /** 10b7a1: 8b 4d 08 mov 0x8(%ebp),%ecx 10b7a4: 8b 59 08 mov 0x8(%ecx),%ebx 10b7a7: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp) 10b7ae: e9 f8 00 00 00 jmp 10b8ab <_Heap_Allocate_aligned+0x153> 10b7b3: 8b 43 04 mov 0x4(%ebx),%eax 10b7b6: 83 e0 fe and $0xfffffffe,%eax 10b7b9: 89 45 e8 mov %eax,-0x18(%ebp) uint32_t const block_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); if(block_size >= the_size) { /* the_block is large enough. */ 10b7bc: 8b 55 e4 mov -0x1c(%ebp),%edx 10b7bf: 39 d0 cmp %edx,%eax 10b7c1: 0f 82 de 00 00 00 jb 10b8a5 <_Heap_Allocate_aligned+0x14d> _H_uptr_t user_addr; _H_uptr_t aligned_user_addr; _H_uptr_t const user_area = _H_p2u(_Heap_User_area(the_block)); 10b7c7: 8d 4b 08 lea 0x8(%ebx),%ecx /* Calculate 'aligned_user_addr' that will become the user pointer we return. It should be at least 'end_to_user_offs' bytes less than the the 'block_end' and should be aligned on 'alignment' boundary. Calculations are from the 'block_end' as we are going to split free block so that the upper part of the block becomes used block. */ _H_uptr_t const block_end = _H_p2u(the_block) + block_size; 10b7ca: 01 d8 add %ebx,%eax 10b7cc: 89 45 ec mov %eax,-0x14(%ebp) aligned_user_addr = block_end - end_to_user_offs; 10b7cf: 89 c6 mov %eax,%esi 10b7d1: 2b 75 e0 sub -0x20(%ebp),%esi RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void ) { _Thread_Dispatch_disable_level = 1; } 10b7d4: 89 f0 mov %esi,%eax 10b7d6: 31 d2 xor %edx,%edx 10b7d8: f7 75 10 divl 0x10(%ebp) 10b7db: 89 f7 mov %esi,%edi 10b7dd: 29 d7 sub %edx,%edi 10b7df: 89 f8 mov %edi,%eax 10b7e1: 31 d2 xor %edx,%edx 10b7e3: f7 75 dc divl -0x24(%ebp) 10b7e6: 89 fe mov %edi,%esi 10b7e8: 29 d6 sub %edx,%esi only at 'page_size' aligned addresses */ user_addr = aligned_user_addr; _Heap_Align_down_uptr(&user_addr, page_size); /* Make sure 'user_addr' calculated didn't run out of 'the_block'. */ if(user_addr >= user_area) { 10b7ea: 39 ce cmp %ecx,%esi 10b7ec: 0f 82 b3 00 00 00 jb 10b8a5 <_Heap_Allocate_aligned+0x14d> /* The block seems to be acceptable. Check if the remainder of 'the_block' is less than 'min_block_size' so that 'the_block' won't actually be split at the address we assume. */ if(user_addr - user_area < the_heap->min_block_size) { 10b7f2: 8b 55 08 mov 0x8(%ebp),%edx 10b7f5: 8b 52 14 mov 0x14(%edx),%edx 10b7f8: 89 55 f0 mov %edx,-0x10(%ebp) 10b7fb: 89 f0 mov %esi,%eax 10b7fd: 29 c8 sub %ecx,%eax 10b7ff: 39 d0 cmp %edx,%eax 10b801: 73 2f jae 10b832 <_Heap_Allocate_aligned+0xda> 'aligned_user_addr' to be outside of [0,page_size) range. If we do, we will need to store this distance somewhere to be able to resurrect the block address from the user pointer. (Having the distance within [0,page_size) range allows resurrection by aligning user pointer down to the nearest 'page_size' boundary.) */ if(aligned_user_addr - user_addr >= page_size) { 10b803: 89 f8 mov %edi,%eax 10b805: 29 c8 sub %ecx,%eax 10b807: 89 ce mov %ecx,%esi 10b809: 3b 45 dc cmp -0x24(%ebp),%eax 10b80c: 72 24 jb 10b832 <_Heap_Allocate_aligned+0xda><== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); } /** 10b80e: 89 c8 mov %ecx,%eax 10b810: 31 d2 xor %edx,%edx 10b812: f7 75 10 divl 0x10(%ebp) 10b815: 89 d6 mov %edx,%esi * This function returns TRUE if dispatching is disabled, and FALSE 10b817: 89 ca mov %ecx,%edx 10b819: 85 f6 test %esi,%esi 10b81b: 74 08 je 10b825 <_Heap_Allocate_aligned+0xcd> 10b81d: 8b 45 10 mov 0x10(%ebp),%eax 10b820: 8d 14 01 lea (%ecx,%eax,1),%edx 10b823: 29 f2 sub %esi,%edx /* The user pointer will be too far from 'user_addr'. See if we can make 'aligned_user_addr' to be close enough to the 'user_addr'. */ aligned_user_addr = user_addr; _Heap_Align_up_uptr(&aligned_user_addr, alignment); if(aligned_user_addr - user_addr >= page_size) { 10b825: 89 d0 mov %edx,%eax 10b827: 29 c8 sub %ecx,%eax 10b829: 3b 45 dc cmp -0x24(%ebp),%eax 10b82c: 73 77 jae 10b8a5 <_Heap_Allocate_aligned+0x14d> 10b82e: 89 ce mov %ecx,%esi 10b830: 89 d7 mov %edx,%edi aligned_user_addr = 0; } } } if(aligned_user_addr) { 10b832: 85 ff test %edi,%edi 10b834: 74 6f je 10b8a5 <_Heap_Allocate_aligned+0x14d><== NEVER TAKEN /* The block is indeed acceptable: calculate the size of the block to be allocated and perform allocation. */ uint32_t const alloc_size = block_end - user_addr + HEAP_BLOCK_USER_OFFSET; 10b836: 8b 55 ec mov -0x14(%ebp),%edx 10b839: 83 c2 08 add $0x8,%edx 10b83c: 29 f2 sub %esi,%edx Heap_Block *the_block, uint32_t alloc_size) { Heap_Statistics *const stats = &the_heap->stats; uint32_t const block_size = _Heap_Block_size(the_block); uint32_t const the_rest = block_size - alloc_size; 10b83e: 8b 4d e8 mov -0x18(%ebp),%ecx 10b841: 29 d1 sub %edx,%ecx _HAssert(_Heap_Is_aligned(block_size, the_heap->page_size)); _HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size)); _HAssert(alloc_size <= block_size); _HAssert(_Heap_Is_prev_used(the_block)); if(the_rest >= the_heap->min_block_size) { 10b843: 3b 4d f0 cmp -0x10(%ebp),%ecx 10b846: 72 14 jb 10b85c <_Heap_Allocate_aligned+0x104> /* Split the block so that lower part is still free, and upper part becomes used. */ the_block->size = the_rest | HEAP_PREV_USED; 10b848: 89 c8 mov %ecx,%eax 10b84a: 83 c8 01 or $0x1,%eax 10b84d: 89 43 04 mov %eax,0x4(%ebx) Context_Control *context_p = &context_area; if ( _System_state_Is_up(_System_state_Get ()) ) context_p = &_Thread_Executing->Registers; _Context_Switch( context_p, &_Thread_BSP_context ); 10b850: 8d 04 0b lea (%ebx,%ecx,1),%eax /** @brief _Thread_Is_proxy_blocking * * status which indicates that a proxy is blocking, and FALSE otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_proxy_blocking ( uint32_t code 10b853: 89 c3 mov %eax,%ebx the_block = _Heap_Block_at(the_block, the_rest); the_block->prev_size = the_rest; 10b855: 89 08 mov %ecx,(%eax) the_block->size = alloc_size; 10b857: 89 50 04 mov %edx,0x4(%eax) 10b85a: eb 15 jmp 10b871 <_Heap_Allocate_aligned+0x119> * This routine resets the current context of the calling thread * to that of its initial state. */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { 10b85c: 8b 53 08 mov 0x8(%ebx),%edx #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) 10b85f: 8b 43 0c mov 0xc(%ebx),%eax if ( _Thread_Executing->fp_context != NULL ) 10b862: 89 50 08 mov %edx,0x8(%eax) _Context_Restore_fp( &_Thread_Executing->fp_context ); 10b865: 89 42 0c mov %eax,0xc(%edx) /* Don't split the block as remainder is either zero or too small to be used as a separate free block. Change 'alloc_size' to the size of the block and remove the block from the list of free blocks. */ _Heap_Block_remove(the_block); alloc_size = block_size; stats->free_blocks -= 1; 10b868: 8b 55 08 mov 0x8(%ebp),%edx 10b86b: ff 4a 38 decl 0x38(%edx) 10b86e: 8b 55 e8 mov -0x18(%ebp),%edx } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; 10b871: 83 4c 13 04 01 orl $0x1,0x4(%ebx,%edx,1) /* Update statistics */ stats->free_size -= alloc_size; 10b876: 8b 4d 08 mov 0x8(%ebp),%ecx 10b879: 8b 41 30 mov 0x30(%ecx),%eax 10b87c: 29 d0 sub %edx,%eax 10b87e: 89 41 30 mov %eax,0x30(%ecx) if(stats->min_free_size > stats->free_size) 10b881: 39 41 34 cmp %eax,0x34(%ecx) 10b884: 76 03 jbe 10b889 <_Heap_Allocate_aligned+0x131> stats->min_free_size = stats->free_size; 10b886: 89 41 34 mov %eax,0x34(%ecx) stats->used_blocks += 1; 10b889: 8b 45 08 mov 0x8(%ebp),%eax 10b88c: ff 40 40 incl 0x40(%eax) _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 10b88f: 89 c2 mov %eax,%edx 10b891: 8b 40 4c mov 0x4c(%eax),%eax 10b894: 8b 4d d8 mov -0x28(%ebp),%ecx 10b897: 8d 44 01 01 lea 0x1(%ecx,%eax,1),%eax 10b89b: 89 42 4c mov %eax,0x4c(%edx) stats->allocs += 1; 10b89e: ff 42 48 incl 0x48(%edx) check_result(the_heap, the_block, user_addr, aligned_user_addr, size); user_ptr = (void*)aligned_user_addr; 10b8a1: 89 f8 mov %edi,%eax 10b8a3: eb 11 jmp 10b8b6 <_Heap_Allocate_aligned+0x15e> /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; the_block = the_block->next, ++search_count) 10b8a5: 8b 5b 08 mov 0x8(%ebx),%ebx 10b8a8: ff 45 d8 incl -0x28(%ebp) alignment = CPU_ALIGNMENT; /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 10b8ab: 3b 5d 08 cmp 0x8(%ebp),%ebx 10b8ae: 0f 85 ff fe ff ff jne 10b7b3 <_Heap_Allocate_aligned+0x5b> 10b8b4: 31 c0 xor %eax,%eax } } } } if(stats->max_search < search_count) 10b8b6: 8b 55 d8 mov -0x28(%ebp),%edx 10b8b9: 8b 4d 08 mov 0x8(%ebp),%ecx 10b8bc: 39 51 44 cmp %edx,0x44(%ecx) 10b8bf: 73 03 jae 10b8c4 <_Heap_Allocate_aligned+0x16c> stats->max_search = search_count; 10b8c1: 89 51 44 mov %edx,0x44(%ecx) return user_ptr; } 10b8c4: 8d 65 f4 lea -0xc(%ebp),%esp 10b8c7: 5b pop %ebx 10b8c8: 5e pop %esi 10b8c9: 5f pop %edi 10b8ca: c9 leave 10b8cb: c3 ret =============================================================================== 0010f884 <_Heap_Extend>: Heap_Control *the_heap, void *starting_address, size_t size, uint32_t *amount_extended ) { 10f884: 55 push %ebp 10f885: 89 e5 mov %esp,%ebp 10f887: 57 push %edi 10f888: 56 push %esi 10f889: 53 push %ebx 10f88a: 83 ec 0c sub $0xc,%esp 10f88d: 8b 4d 08 mov 0x8(%ebp),%ecx 10f890: 8b 55 0c mov 0xc(%ebp),%edx 10f893: 8b 75 10 mov 0x10(%ebp),%esi * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( starting_address >= the_heap->begin && /* case 3 */ 10f896: 3b 51 18 cmp 0x18(%ecx),%edx 10f899: 72 0a jb 10f8a5 <_Heap_Extend+0x21> 10f89b: b8 01 00 00 00 mov $0x1,%eax 10f8a0: 3b 51 1c cmp 0x1c(%ecx),%edx 10f8a3: 72 5f jb 10f904 <_Heap_Extend+0x80> starting_address < the_heap->end ) return HEAP_EXTEND_ERROR; if ( starting_address != the_heap->end ) 10f8a5: b8 02 00 00 00 mov $0x2,%eax 10f8aa: 3b 51 1c cmp 0x1c(%ecx),%edx 10f8ad: 75 55 jne 10f904 <_Heap_Extend+0x80> * 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. */ old_final = the_heap->final; 10f8af: 8b 59 24 mov 0x24(%ecx),%ebx Context_Control *context_p = &context_area; if ( _System_state_Is_up(_System_state_Get ()) ) context_p = &_Thread_Executing->Registers; _Context_Switch( context_p, &_Thread_BSP_context ); 10f8b2: 8d 04 32 lea (%edx,%esi,1),%eax the_heap->end = _Addresses_Add_offset( the_heap->end, size ); 10f8b5: 89 41 1c mov %eax,0x1c(%ecx) the_size = _Addresses_Subtract( the_heap->end, old_final ) - HEAP_OVERHEAD; 10f8b8: 29 d8 sub %ebx,%eax 10f8ba: 8d 78 f8 lea -0x8(%eax),%edi * the outer most dispatching critical section, then a dispatching * operation will be performed and, if necessary, control of the * processor will be transferred to the heir thread. */ #if ( (CPU_INLINE_ENABLE_DISPATCH == FALSE) || \ 10f8bd: 89 f8 mov %edi,%eax 10f8bf: 31 d2 xor %edx,%edx 10f8c1: f7 71 10 divl 0x10(%ecx) 10f8c4: 29 d7 sub %edx,%edi _Heap_Align_down( &the_size, the_heap->page_size ); *amount_extended = size; 10f8c6: 8b 45 14 mov 0x14(%ebp),%eax 10f8c9: 89 30 mov %esi,(%eax) if( the_size < the_heap->min_block_size ) 10f8cb: 31 c0 xor %eax,%eax 10f8cd: 3b 79 14 cmp 0x14(%ecx),%edi 10f8d0: 72 32 jb 10f904 <_Heap_Extend+0x80> <== NEVER TAKEN return HEAP_EXTEND_SUCCESSFUL; old_final->size = the_size | (old_final->size & HEAP_PREV_USED); 10f8d2: 8b 43 04 mov 0x4(%ebx),%eax 10f8d5: 83 e0 01 and $0x1,%eax 10f8d8: 09 f8 or %edi,%eax 10f8da: 89 43 04 mov %eax,0x4(%ebx) /** @brief _Thread_Is_proxy_blocking * * status which indicates that a proxy is blocking, and FALSE otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_proxy_blocking ( uint32_t code 10f8dd: 8d 04 3b lea (%ebx,%edi,1),%eax new_final = _Heap_Block_at( old_final, the_size ); new_final->size = HEAP_PREV_USED; 10f8e0: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) the_heap->final = new_final; 10f8e7: 89 41 24 mov %eax,0x24(%ecx) stats->size += size; 10f8ea: 01 71 2c add %esi,0x2c(%ecx) stats->used_blocks += 1; 10f8ed: ff 41 40 incl 0x40(%ecx) stats->frees -= 1; /* Don't count subsequent call as actual free() */ 10f8f0: ff 49 50 decl 0x50(%ecx) _Heap_Free( the_heap, _Heap_User_area( old_final ) ); 10f8f3: 50 push %eax 10f8f4: 50 push %eax 10f8f5: 8d 43 08 lea 0x8(%ebx),%eax 10f8f8: 50 push %eax 10f8f9: 51 push %ecx 10f8fa: e8 39 c0 ff ff call 10b938 <_Heap_Free> 10f8ff: 31 c0 xor %eax,%eax 10f901: 83 c4 10 add $0x10,%esp return HEAP_EXTEND_SUCCESSFUL; } 10f904: 8d 65 f4 lea -0xc(%ebp),%esp 10f907: 5b pop %ebx 10f908: 5e pop %esi 10f909: 5f pop %edi 10f90a: c9 leave 10f90b: c3 ret =============================================================================== 0010d928 <_Heap_Free>: bool _Heap_Free( Heap_Control *the_heap, void *starting_address ) { 10d928: 55 push %ebp 10d929: 89 e5 mov %esp,%ebp 10d92b: 57 push %edi 10d92c: 56 push %esi 10d92d: 53 push %ebx 10d92e: 83 ec 14 sub $0x14,%esp 10d931: 8b 7d 08 mov 0x8(%ebp),%edi 10d934: 8b 4d 0c mov 0xc(%ebp),%ecx uint32_t the_size; uint32_t next_size; Heap_Statistics *const stats = &the_heap->stats; bool next_is_free; if ( !_Addresses_Is_in_range( 10d937: 8b 47 24 mov 0x24(%edi),%eax 10d93a: 89 45 e0 mov %eax,-0x20(%ebp) 10d93d: 8b 57 20 mov 0x20(%edi),%edx 10d940: 89 55 e4 mov %edx,-0x1c(%ebp) 10d943: 39 d1 cmp %edx,%ecx 10d945: 0f 93 c2 setae %dl 10d948: 39 c1 cmp %eax,%ecx 10d94a: 0f 96 c0 setbe %al 10d94d: 84 d0 test %dl,%al 10d94f: 0f 84 2f 01 00 00 je 10da84 <_Heap_Free+0x15c> 10d955: 8d 59 f8 lea -0x8(%ecx),%ebx 10d958: 89 c8 mov %ecx,%eax 10d95a: 31 d2 xor %edx,%edx 10d95c: f7 77 10 divl 0x10(%edi) 10d95f: 29 d3 sub %edx,%ebx return( FALSE ); } _Heap_Start_of_block( the_heap, starting_address, &the_block ); if ( !_Heap_Is_block_in( the_heap, the_block ) ) { 10d961: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10d964: 0f 93 c2 setae %dl 10d967: 3b 5d e0 cmp -0x20(%ebp),%ebx 10d96a: 0f 96 c0 setbe %al 10d96d: 84 d0 test %dl,%al 10d96f: 0f 84 0f 01 00 00 je 10da84 <_Heap_Free+0x15c> <== NEVER TAKEN 10d975: 8b 4b 04 mov 0x4(%ebx),%ecx 10d978: 89 c8 mov %ecx,%eax 10d97a: 83 e0 fe and $0xfffffffe,%eax 10d97d: 89 45 e8 mov %eax,-0x18(%ebp) 10d980: 8d 34 03 lea (%ebx,%eax,1),%esi } the_size = _Heap_Block_size( the_block ); next_block = _Heap_Block_at( the_block, the_size ); if ( !_Heap_Is_block_in( the_heap, next_block ) ) { 10d983: 3b 75 e4 cmp -0x1c(%ebp),%esi 10d986: 0f 93 c2 setae %dl 10d989: 3b 75 e0 cmp -0x20(%ebp),%esi 10d98c: 0f 96 c0 setbe %al 10d98f: 84 d0 test %dl,%al 10d991: 0f 84 ed 00 00 00 je 10da84 <_Heap_Free+0x15c> <== NEVER TAKEN 10d997: 8b 46 04 mov 0x4(%esi),%eax _HAssert( FALSE ); return( FALSE ); } if ( !_Heap_Is_prev_used( next_block ) ) { 10d99a: a8 01 test $0x1,%al 10d99c: 0f 84 e2 00 00 00 je 10da84 <_Heap_Free+0x15c> <== NEVER TAKEN 10d9a2: 83 e0 fe and $0xfffffffe,%eax 10d9a5: 89 45 ec mov %eax,-0x14(%ebp) _HAssert( FALSE ); return( FALSE ); } next_size = _Heap_Block_size( next_block ); next_is_free = next_block < the_heap->final && 10d9a8: 31 c0 xor %eax,%eax 10d9aa: 3b 75 e0 cmp -0x20(%ebp),%esi 10d9ad: 73 0c jae 10d9bb <_Heap_Free+0x93> 10d9af: 8b 55 ec mov -0x14(%ebp),%edx 10d9b2: 8b 44 16 04 mov 0x4(%esi,%edx,1),%eax 10d9b6: f7 d0 not %eax 10d9b8: 83 e0 01 and $0x1,%eax 10d9bb: 88 45 f3 mov %al,-0xd(%ebp) !_Heap_Is_prev_used(_Heap_Block_at(next_block, next_size)); if ( !_Heap_Is_prev_used( the_block ) ) { 10d9be: 80 e1 01 and $0x1,%cl 10d9c1: 75 56 jne 10da19 <_Heap_Free+0xf1> uint32_t const prev_size = the_block->prev_size; 10d9c3: 8b 0b mov (%ebx),%ecx 10d9c5: 29 cb sub %ecx,%ebx Heap_Block *const prev_block = _Heap_Block_at( the_block, -prev_size ); if ( !_Heap_Is_block_in( the_heap, prev_block ) ) { 10d9c7: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10d9ca: 0f 93 c2 setae %dl 10d9cd: 3b 5d e0 cmp -0x20(%ebp),%ebx 10d9d0: 0f 96 c0 setbe %al 10d9d3: 84 d0 test %dl,%al 10d9d5: 0f 84 a9 00 00 00 je 10da84 <_Heap_Free+0x15c> <== NEVER TAKEN return( FALSE ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { 10d9db: f6 43 04 01 testb $0x1,0x4(%ebx) 10d9df: 0f 84 9f 00 00 00 je 10da84 <_Heap_Free+0x15c> <== NEVER TAKEN _HAssert( FALSE ); return( FALSE ); } if ( next_is_free ) { /* coalesce both */ 10d9e5: 80 7d f3 00 cmpb $0x0,-0xd(%ebp) 10d9e9: 74 19 je 10da04 <_Heap_Free+0xdc> uint32_t const size = the_size + prev_size + next_size; 10d9eb: 8b 55 e8 mov -0x18(%ebp),%edx 10d9ee: 03 55 ec add -0x14(%ebp),%edx 10d9f1: 01 ca add %ecx,%edx * Any other value of @a alignment is taken "as is", i.e., even odd * alignments are possible. * Returns pointer to the start of the memory block if success, NULL if * failure. * * @param[in] the_heap is the heap to operate upon 10d9f3: 8b 4e 08 mov 0x8(%esi),%ecx * @param[in] size is the amount of memory to allocate in bytes 10d9f6: 8b 46 0c mov 0xc(%esi),%eax * @param[in] alignment the required alignment 10d9f9: 89 48 08 mov %ecx,0x8(%eax) * @return NULL if unsuccessful and a pointer to the block if successful 10d9fc: 89 41 0c mov %eax,0xc(%ecx) _Heap_Block_remove( next_block ); stats->free_blocks -= 1; 10d9ff: ff 4f 38 decl 0x38(%edi) 10da02: eb 33 jmp 10da37 <_Heap_Free+0x10f> next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uint32_t const size = the_size + prev_size; 10da04: 8b 55 e8 mov -0x18(%ebp),%edx 10da07: 01 ca add %ecx,%edx prev_block->size = size | HEAP_PREV_USED; 10da09: 89 d0 mov %edx,%eax 10da0b: 83 c8 01 or $0x1,%eax 10da0e: 89 43 04 mov %eax,0x4(%ebx) next_block->size &= ~HEAP_PREV_USED; 10da11: 83 66 04 fe andl $0xfffffffe,0x4(%esi) next_block->prev_size = size; 10da15: 89 16 mov %edx,(%esi) 10da17: eb 5b jmp 10da74 <_Heap_Free+0x14c> } } else if ( next_is_free ) { /* coalesce next */ 10da19: 80 7d f3 00 cmpb $0x0,-0xd(%ebp) 10da1d: 74 25 je 10da44 <_Heap_Free+0x11c> uint32_t const size = the_size + next_size; 10da1f: 8b 55 ec mov -0x14(%ebp),%edx 10da22: 03 55 e8 add -0x18(%ebp),%edx * @param[in] starting_address is the starting address of the user block * to obtain the size of * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ 10da25: 8b 4e 08 mov 0x8(%esi),%ecx bool _Protected_heap_Get_block_size( 10da28: 8b 46 0c mov 0xc(%esi),%eax Heap_Control *the_heap, void *starting_address, size_t *size 10da2b: 89 4b 08 mov %ecx,0x8(%ebx) ); 10da2e: 89 43 0c mov %eax,0xc(%ebx) 10da31: 89 58 08 mov %ebx,0x8(%eax) 10da34: 89 59 0c mov %ebx,0xc(%ecx) _Heap_Block_replace( next_block, the_block ); the_block->size = size | HEAP_PREV_USED; 10da37: 89 d0 mov %edx,%eax 10da39: 83 c8 01 or $0x1,%eax 10da3c: 89 43 04 mov %eax,0x4(%ebx) next_block = _Heap_Block_at( the_block, size ); next_block->prev_size = size; 10da3f: 89 14 13 mov %edx,(%ebx,%edx,1) 10da42: eb 30 jmp 10da74 <_Heap_Free+0x14c> bool _Protected_heap_Resize_block( Heap_Control *the_heap, void *starting_address, size_t size ); 10da44: 8b 47 08 mov 0x8(%edi),%eax /** 10da47: 89 43 08 mov %eax,0x8(%ebx) * This routine returns the block of memory which begins 10da4a: 89 7b 0c mov %edi,0xc(%ebx) * at @a starting_address to @a the_heap. Any coalescing which is 10da4d: 89 5f 08 mov %ebx,0x8(%edi) 10da50: 89 58 0c mov %ebx,0xc(%eax) } else { /* no coalesce */ /* Add 'the_block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Block_insert_after( _Heap_Head( the_heap), the_block ); the_block->size = the_size | HEAP_PREV_USED; 10da53: 8b 45 e8 mov -0x18(%ebp),%eax 10da56: 83 c8 01 or $0x1,%eax 10da59: 89 43 04 mov %eax,0x4(%ebx) next_block->size &= ~HEAP_PREV_USED; 10da5c: 83 66 04 fe andl $0xfffffffe,0x4(%esi) next_block->prev_size = the_size; 10da60: 8b 45 e8 mov -0x18(%ebp),%eax 10da63: 89 06 mov %eax,(%esi) stats->free_blocks += 1; 10da65: 8b 47 38 mov 0x38(%edi),%eax 10da68: 40 inc %eax 10da69: 89 47 38 mov %eax,0x38(%edi) if ( stats->max_free_blocks < stats->free_blocks ) 10da6c: 39 47 3c cmp %eax,0x3c(%edi) 10da6f: 73 03 jae 10da74 <_Heap_Free+0x14c> stats->max_free_blocks = stats->free_blocks; 10da71: 89 47 3c mov %eax,0x3c(%edi) } stats->used_blocks -= 1; 10da74: ff 4f 40 decl 0x40(%edi) stats->free_size += the_size; 10da77: 8b 55 e8 mov -0x18(%ebp),%edx 10da7a: 01 57 30 add %edx,0x30(%edi) stats->frees += 1; 10da7d: ff 47 50 incl 0x50(%edi) 10da80: b0 01 mov $0x1,%al 10da82: eb 02 jmp 10da86 <_Heap_Free+0x15e> return( TRUE ); 10da84: 31 c0 xor %eax,%eax } 10da86: 83 c4 14 add $0x14,%esp 10da89: 5b pop %ebx 10da8a: 5e pop %esi 10da8b: 5f pop %edi 10da8c: c9 leave 10da8d: c3 ret =============================================================================== 0010f90c <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 10f90c: 55 push %ebp 10f90d: 89 e5 mov %esp,%ebp 10f90f: 53 push %ebx 10f910: 8b 5d 08 mov 0x8(%ebp),%ebx 10f913: 8b 55 0c mov 0xc(%ebp),%edx Heap_Block *the_block; Heap_Block *const tail = _Heap_Tail(the_heap); info->number = 0; 10f916: c7 02 00 00 00 00 movl $0x0,(%edx) info->largest = 0; 10f91c: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) info->total = 0; 10f923: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) ) { return ( the_thread == _Thread_Heir ); } /** 10f92a: 8b 4b 08 mov 0x8(%ebx),%ecx 10f92d: eb 16 jmp 10f945 <_Heap_Get_free_information+0x39> 10f92f: 8b 41 04 mov 0x4(%ecx),%eax 10f932: 83 e0 fe and $0xfffffffe,%eax uint32_t const the_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; 10f935: ff 02 incl (%edx) info->total += the_size; 10f937: 01 42 08 add %eax,0x8(%edx) if ( info->largest < the_size ) 10f93a: 39 42 04 cmp %eax,0x4(%edx) 10f93d: 73 03 jae 10f942 <_Heap_Get_free_information+0x36><== NEVER TAKEN info->largest = the_size; 10f93f: 89 42 04 mov %eax,0x4(%edx) info->largest = 0; info->total = 0; for(the_block = _Heap_First(the_heap); the_block != tail; the_block = the_block->next) 10f942: 8b 49 08 mov 0x8(%ecx),%ecx info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_First(the_heap); the_block != tail; 10f945: 39 d9 cmp %ebx,%ecx 10f947: 75 e6 jne 10f92f <_Heap_Get_free_information+0x23> info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 10f949: 5b pop %ebx 10f94a: c9 leave 10f94b: c3 ret =============================================================================== 0010f94c <_Heap_Get_information>: Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 10f94c: 55 push %ebp 10f94d: 89 e5 mov %esp,%ebp 10f94f: 53 push %ebx 10f950: 8b 45 08 mov 0x8(%ebp),%eax 10f953: 8b 55 0c mov 0xc(%ebp),%edx Heap_Block *the_block = the_heap->start; 10f956: 8b 48 20 mov 0x20(%eax),%ecx Heap_Block *const end = the_heap->final; 10f959: 8b 58 24 mov 0x24(%eax),%ebx _HAssert(the_block->prev_size == HEAP_PREV_USED); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 10f95c: c7 02 00 00 00 00 movl $0x0,(%edx) the_info->Free.total = 0; 10f962: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) the_info->Free.largest = 0; 10f969: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_info->Used.number = 0; 10f970: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) the_info->Used.total = 0; 10f977: c7 42 14 00 00 00 00 movl $0x0,0x14(%edx) the_info->Used.largest = 0; 10f97e: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) 10f985: eb 36 jmp 10f9bd <_Heap_Get_information+0x71> 10f987: 8b 41 04 mov 0x4(%ecx),%eax 10f98a: 83 e0 fe and $0xfffffffe,%eax /** @brief _Thread_Is_proxy_blocking * * status which indicates that a proxy is blocking, and FALSE otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_proxy_blocking ( uint32_t code 10f98d: 01 c1 add %eax,%ecx while ( the_block != end ) { uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { 10f98f: f6 41 04 01 testb $0x1,0x4(%ecx) 10f993: 74 10 je 10f9a5 <_Heap_Get_information+0x59> the_info->Used.number++; 10f995: ff 42 0c incl 0xc(%edx) the_info->Used.total += the_size; 10f998: 01 42 14 add %eax,0x14(%edx) if ( the_info->Used.largest < the_size ) 10f99b: 39 42 10 cmp %eax,0x10(%edx) 10f99e: 73 1d jae 10f9bd <_Heap_Get_information+0x71> the_info->Used.largest = the_size; 10f9a0: 89 42 10 mov %eax,0x10(%edx) 10f9a3: eb 18 jmp 10f9bd <_Heap_Get_information+0x71> } else { the_info->Free.number++; 10f9a5: ff 02 incl (%edx) the_info->Free.total += the_size; 10f9a7: 01 42 08 add %eax,0x8(%edx) if ( the_info->Free.largest < the_size ) 10f9aa: 39 42 04 cmp %eax,0x4(%edx) 10f9ad: 73 03 jae 10f9b2 <_Heap_Get_information+0x66><== NEVER TAKEN the_info->Free.largest = the_size; 10f9af: 89 42 04 mov %eax,0x4(%edx) if ( the_size != next_block->prev_size ) 10f9b2: 3b 01 cmp (%ecx),%eax 10f9b4: 74 07 je 10f9bd <_Heap_Get_information+0x71><== ALWAYS TAKEN 10f9b6: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 10f9bb: eb 0a jmp 10f9c7 <_Heap_Get_information+0x7b><== 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 ) { 10f9bd: 39 d9 cmp %ebx,%ecx 10f9bf: 75 c6 jne 10f987 <_Heap_Get_information+0x3b> } /* 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_OVERHEAD; 10f9c1: 83 42 14 08 addl $0x8,0x14(%edx) 10f9c5: 31 c0 xor %eax,%eax return HEAP_GET_INFORMATION_SUCCESSFUL; } 10f9c7: 5b pop %ebx 10f9c8: c9 leave 10f9c9: c3 ret =============================================================================== 00109f8c <_Heap_Initialize>: Heap_Control *the_heap, void *starting_address, size_t size, uint32_t page_size ) { 109f8c: 55 push %ebp 109f8d: 89 e5 mov %esp,%ebp 109f8f: 57 push %edi 109f90: 56 push %esi 109f91: 53 push %ebx 109f92: 83 ec 0c sub $0xc,%esp 109f95: 8b 75 08 mov 0x8(%ebp),%esi 109f98: 8b 7d 0c mov 0xc(%ebp),%edi 109f9b: 8b 4d 14 mov 0x14(%ebp),%ecx _H_uptr_t start; _H_uptr_t aligned_start; uint32_t overhead; Heap_Statistics *const stats = &the_heap->stats; if (page_size == 0) 109f9e: 85 c9 test %ecx,%ecx 109fa0: 75 04 jne 109fa6 <_Heap_Initialize+0x1a> 109fa2: b1 04 mov $0x4,%cl 109fa4: eb 0c jmp 109fb2 <_Heap_Initialize+0x26> * * @param[in] the_heap pointer to heap header * @param[in] the_info pointer to a status information area * * @return true if successfully able to return information */ 109fa6: 89 c8 mov %ecx,%eax 109fa8: 83 e0 03 and $0x3,%eax 109fab: 74 05 je 109fb2 <_Heap_Initialize+0x26> 109fad: 83 c1 04 add $0x4,%ecx 109fb0: 29 c1 sub %eax,%ecx /* Calculate aligned_start so that aligned_start + HEAP_BLOCK_USER_OFFSET (value of user pointer) is aligned on 'page_size' boundary. Make sure resulting 'aligned_start' is not below 'starting_address'. */ start = _H_p2u(starting_address); aligned_start = start + HEAP_BLOCK_USER_OFFSET; 109fb2: 8d 5f 08 lea 0x8(%edi),%ebx 109fb5: 89 d8 mov %ebx,%eax 109fb7: 31 d2 xor %edx,%edx 109fb9: f7 f1 div %ecx 109fbb: 85 d2 test %edx,%edx 109fbd: 74 05 je 109fc4 <_Heap_Initialize+0x38> 109fbf: 8d 1c 19 lea (%ecx,%ebx,1),%ebx 109fc2: 29 d3 sub %edx,%ebx _Heap_Align_up_uptr ( &aligned_start, page_size ); aligned_start -= HEAP_BLOCK_USER_OFFSET; 109fc4: 83 eb 08 sub $0x8,%ebx * sizes. * * @param[in] the_heap pointer to heap header * @param[in] the_info pointer to a status information area * * @return true if successfully able to return information 109fc7: b8 10 00 00 00 mov $0x10,%eax 109fcc: 31 d2 xor %edx,%edx 109fce: f7 f1 div %ecx */ 109fd0: b8 10 00 00 00 mov $0x10,%eax 109fd5: 85 d2 test %edx,%edx 109fd7: 74 05 je 109fde <_Heap_Initialize+0x52> 109fd9: 8d 41 10 lea 0x10(%ecx),%eax 109fdc: 29 d0 sub %edx,%eax 109fde: 89 46 14 mov %eax,0x14(%esi) /* Calculate 'the_size' -- size of the first block so that there is enough space at the end for the permanent last block. It is equal to 'size' minus total overhead aligned down to the nearest multiple of 'page_size'. */ overhead = HEAP_OVERHEAD + (aligned_start - start); 109fe1: 89 d8 mov %ebx,%eax 109fe3: 29 f8 sub %edi,%eax 109fe5: 83 c0 08 add $0x8,%eax if ( size < overhead ) 109fe8: 39 45 10 cmp %eax,0x10(%ebp) 109feb: 0f 82 a0 00 00 00 jb 10a091 <_Heap_Initialize+0x105><== NEVER TAKEN return 0; /* Too small area for the heap */ the_size = size - overhead; 109ff1: 8b 55 10 mov 0x10(%ebp),%edx 109ff4: 29 c2 sub %eax,%edx 109ff6: 89 55 e8 mov %edx,-0x18(%ebp) * * @return free block information filled in. */ bool _Protected_heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info 109ff9: 89 d0 mov %edx,%eax 109ffb: 31 d2 xor %edx,%edx 109ffd: f7 f1 div %ecx _Heap_Align_down ( &the_size, page_size ); if ( the_size == 0 ) 109fff: 8b 45 e8 mov -0x18(%ebp),%eax 10a002: 29 d0 sub %edx,%eax 10a004: 89 c2 mov %eax,%edx 10a006: 0f 84 85 00 00 00 je 10a091 <_Heap_Initialize+0x105> return 0; /* Too small area for the heap */ the_heap->page_size = page_size; 10a00c: 89 4e 10 mov %ecx,0x10(%esi) the_heap->begin = starting_address; 10a00f: 89 7e 18 mov %edi,0x18(%esi) the_heap->end = starting_address + size; 10a012: 03 7d 10 add 0x10(%ebp),%edi 10a015: 89 7e 1c mov %edi,0x1c(%esi) the_block = (Heap_Block *) aligned_start; the_block->prev_size = page_size; 10a018: 89 0b mov %ecx,(%ebx) the_block->size = the_size | HEAP_PREV_USED; 10a01a: 83 c8 01 or $0x1,%eax 10a01d: 89 43 04 mov %eax,0x4(%ebx) the_block->next = _Heap_Tail( the_heap ); 10a020: 89 73 08 mov %esi,0x8(%ebx) the_block->prev = _Heap_Head( the_heap ); 10a023: 89 73 0c mov %esi,0xc(%ebx) _Heap_Head(the_heap)->next = the_block; 10a026: 89 5e 08 mov %ebx,0x8(%esi) _Heap_Tail(the_heap)->prev = the_block; 10a029: 89 5e 0c mov %ebx,0xc(%esi) the_heap->start = the_block; 10a02c: 89 5e 20 mov %ebx,0x20(%esi) * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory for * the heap 10a02f: 8d 04 13 lea (%ebx,%edx,1),%eax _HAssert(_Heap_Is_aligned(the_heap->page_size, CPU_ALIGNMENT)); _HAssert(_Heap_Is_aligned(the_heap->min_block_size, page_size)); _HAssert(_Heap_Is_aligned_ptr(_Heap_User_area(the_block), page_size)); the_block = _Heap_Block_at( the_block, the_size ); the_heap->final = the_block; /* Permanent final block of the heap */ 10a032: 89 46 24 mov %eax,0x24(%esi) the_block->prev_size = the_size; /* Previous block is free */ 10a035: 89 10 mov %edx,(%eax) the_block->size = page_size; 10a037: 89 48 04 mov %ecx,0x4(%eax) stats->size = size; 10a03a: 8b 45 10 mov 0x10(%ebp),%eax 10a03d: 89 46 2c mov %eax,0x2c(%esi) stats->free_size = the_size; 10a040: 89 56 30 mov %edx,0x30(%esi) stats->min_free_size = the_size; 10a043: 89 56 34 mov %edx,0x34(%esi) stats->free_blocks = 1; 10a046: c7 46 38 01 00 00 00 movl $0x1,0x38(%esi) stats->max_free_blocks = 1; 10a04d: c7 46 3c 01 00 00 00 movl $0x1,0x3c(%esi) stats->used_blocks = 0; 10a054: c7 46 40 00 00 00 00 movl $0x0,0x40(%esi) stats->max_search = 0; 10a05b: c7 46 44 00 00 00 00 movl $0x0,0x44(%esi) stats->allocs = 0; 10a062: c7 46 48 00 00 00 00 movl $0x0,0x48(%esi) stats->searches = 0; 10a069: c7 46 4c 00 00 00 00 movl $0x0,0x4c(%esi) stats->frees = 0; 10a070: c7 46 50 00 00 00 00 movl $0x0,0x50(%esi) stats->resizes = 0; 10a077: c7 46 54 00 00 00 00 movl $0x0,0x54(%esi) stats->instance = instance++; 10a07e: a1 94 c8 11 00 mov 0x11c894,%eax 10a083: 89 46 28 mov %eax,0x28(%esi) 10a086: 40 inc %eax 10a087: a3 94 c8 11 00 mov %eax,0x11c894 return ( the_size - HEAP_BLOCK_USED_OVERHEAD ); 10a08c: 8d 42 fc lea -0x4(%edx),%eax 10a08f: eb 02 jmp 10a093 <_Heap_Initialize+0x107> 10a091: 31 c0 xor %eax,%eax } 10a093: 83 c4 0c add $0xc,%esp 10a096: 5b pop %ebx 10a097: 5e pop %esi 10a098: 5f pop %edi 10a099: c9 leave 10a09a: c3 ret =============================================================================== 00115004 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 115004: 55 push %ebp 115005: 89 e5 mov %esp,%ebp 115007: 57 push %edi 115008: 56 push %esi 115009: 53 push %ebx 11500a: 83 ec 2c sub $0x2c,%esp Heap_Block *next_next_block; uint32_t old_block_size; uint32_t old_user_size; uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; 11500d: 8b 45 08 mov 0x8(%ebp),%eax 115010: 8b 40 14 mov 0x14(%eax),%eax 115013: 89 45 ec mov %eax,-0x14(%ebp) uint32_t const page_size = the_heap->page_size; 115016: 8b 55 08 mov 0x8(%ebp),%edx 115019: 8b 72 10 mov 0x10(%edx),%esi *old_mem_size = 0; 11501c: 8b 4d 14 mov 0x14(%ebp),%ecx 11501f: c7 01 00 00 00 00 movl $0x0,(%ecx) *avail_mem_size = 0; 115025: 8b 45 18 mov 0x18(%ebp),%eax 115028: c7 00 00 00 00 00 movl $0x0,(%eax) 11502e: 8b 55 0c mov 0xc(%ebp),%edx 115031: 83 ea 08 sub $0x8,%edx 115034: 89 55 f0 mov %edx,-0x10(%ebp) 115037: 8b 45 0c mov 0xc(%ebp),%eax 11503a: 8b 4d 08 mov 0x8(%ebp),%ecx 11503d: 31 d2 xor %edx,%edx 11503f: f7 71 10 divl 0x10(%ecx) 115042: 29 55 f0 sub %edx,-0x10(%ebp) 115045: 89 c8 mov %ecx,%eax 115047: 8b 49 24 mov 0x24(%ecx),%ecx 11504a: 8b 58 20 mov 0x20(%eax),%ebx _Heap_Start_of_block(the_heap, starting_address, &the_block); _HAssert(_Heap_Is_block_in(the_heap, the_block)); if (!_Heap_Is_block_in(the_heap, the_block)) 11504d: 39 5d f0 cmp %ebx,-0x10(%ebp) 115050: 0f 93 c2 setae %dl 115053: 39 4d f0 cmp %ecx,-0x10(%ebp) 115056: 0f 96 c0 setbe %al 115059: 84 d0 test %dl,%al 11505b: 0f 84 7e 01 00 00 je 1151df <_Heap_Resize_block+0x1db> return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 115061: 8b 55 f0 mov -0x10(%ebp),%edx 115064: 8b 52 04 mov 0x4(%edx),%edx 115067: 89 55 d8 mov %edx,-0x28(%ebp) 11506a: 83 e2 fe and $0xfffffffe,%edx 11506d: 89 55 e4 mov %edx,-0x1c(%ebp) 115070: 8b 7d f0 mov -0x10(%ebp),%edi 115073: 01 d7 add %edx,%edi old_block_size = _Heap_Block_size(the_block); next_block = _Heap_Block_at(the_block, old_block_size); _HAssert(_Heap_Is_block_in(the_heap, next_block)); _HAssert(_Heap_Is_prev_used(next_block)); if ( !_Heap_Is_block_in(the_heap, next_block) || 115075: 39 df cmp %ebx,%edi 115077: 0f 93 c2 setae %dl 11507a: 39 cf cmp %ecx,%edi 11507c: 0f 96 c0 setbe %al 11507f: 84 d0 test %dl,%al 115081: 0f 84 58 01 00 00 je 1151df <_Heap_Resize_block+0x1db><== NEVER TAKEN 115087: 8b 47 04 mov 0x4(%edi),%eax 11508a: a8 01 test $0x1,%al 11508c: 0f 84 4d 01 00 00 je 1151df <_Heap_Resize_block+0x1db><== NEVER TAKEN 115092: 83 e0 fe and $0xfffffffe,%eax 115095: 89 45 dc mov %eax,-0x24(%ebp) 115098: 01 f8 add %edi,%eax 11509a: 89 45 e0 mov %eax,-0x20(%ebp) !_Heap_Is_prev_used(next_block)) return HEAP_RESIZE_FATAL_ERROR; next_block_size = _Heap_Block_size(next_block); next_next_block = _Heap_Block_at(next_block, next_block_size); next_is_used = (next_block == the_heap->final) || 11509d: b8 01 00 00 00 mov $0x1,%eax 1150a2: 39 cf cmp %ecx,%edi 1150a4: 74 09 je 1150af <_Heap_Resize_block+0xab><== NEVER TAKEN 1150a6: 8b 4d e0 mov -0x20(%ebp),%ecx 1150a9: 8b 41 04 mov 0x4(%ecx),%eax 1150ac: 83 e0 01 and $0x1,%eax _Heap_Start_of_block(the_heap, starting_address, &the_block); _HAssert(_Heap_Is_block_in(the_heap, the_block)); if (!_Heap_Is_block_in(the_heap, the_block)) return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 1150af: 8b 55 d8 mov -0x28(%ebp),%edx 1150b2: 83 e2 01 and $0x1,%edx 1150b5: 89 55 e8 mov %edx,-0x18(%ebp) !_Heap_Is_prev_used(next_block)) return HEAP_RESIZE_FATAL_ERROR; next_block_size = _Heap_Block_size(next_block); next_next_block = _Heap_Block_at(next_block, next_block_size); next_is_used = (next_block == the_heap->final) || 1150b8: 88 c1 mov %al,%cl _Heap_Is_prev_used(next_next_block); /* See _Heap_Size_of_user_area() source for explanations */ old_user_size = _Addresses_Subtract(next_block, starting_address) 1150ba: 89 f8 mov %edi,%eax 1150bc: 2b 45 0c sub 0xc(%ebp),%eax 1150bf: 83 c0 04 add $0x4,%eax + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 1150c2: 8b 55 14 mov 0x14(%ebp),%edx 1150c5: 89 02 mov %eax,(%edx) if (size > old_user_size) { 1150c7: 39 45 10 cmp %eax,0x10(%ebp) 1150ca: 76 50 jbe 11511c <_Heap_Resize_block+0x118> /* Need to extend the block: allocate part of the next block and then merge 'the_block' and allocated block together. */ if (next_is_used) /* Next block is in use, -- no way to extend */ 1150cc: 84 c9 test %cl,%cl 1150ce: 0f 85 12 01 00 00 jne 1151e6 <_Heap_Resize_block+0x1e2> return HEAP_RESIZE_UNSATISFIED; else { uint32_t add_block_size = size - old_user_size; 1150d4: 8b 4d 10 mov 0x10(%ebp),%ecx 1150d7: 29 c1 sub %eax,%ecx 1150d9: 89 c8 mov %ecx,%eax 1150db: 31 d2 xor %edx,%edx 1150dd: f7 f6 div %esi 1150df: 85 d2 test %edx,%edx 1150e1: 74 04 je 1150e7 <_Heap_Resize_block+0xe3><== NEVER TAKEN 1150e3: 01 f1 add %esi,%ecx 1150e5: 29 d1 sub %edx,%ecx 1150e7: 89 c8 mov %ecx,%eax 1150e9: 3b 4d ec cmp -0x14(%ebp),%ecx 1150ec: 73 03 jae 1150f1 <_Heap_Resize_block+0xed><== NEVER TAKEN 1150ee: 8b 45 ec mov -0x14(%ebp),%eax _Heap_Align_up(&add_block_size, page_size); if (add_block_size < min_block_size) add_block_size = min_block_size; if (add_block_size > next_block_size) 1150f1: 3b 45 dc cmp -0x24(%ebp),%eax 1150f4: 0f 87 ec 00 00 00 ja 1151e6 <_Heap_Resize_block+0x1e2><== NEVER TAKEN return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 1150fa: 53 push %ebx 1150fb: 50 push %eax 1150fc: 57 push %edi 1150fd: ff 75 08 pushl 0x8(%ebp) 115100: e8 d3 4f ff ff call 10a0d8 <_Heap_Block_allocate> _Heap_Block_allocate(the_heap, next_block, add_block_size); /* Merge two subsequent blocks */ the_block->size = (old_block_size + add_block_size) | prev_used_flag; 115105: 03 45 e4 add -0x1c(%ebp),%eax 115108: 0b 45 e8 or -0x18(%ebp),%eax 11510b: 8b 55 f0 mov -0x10(%ebp),%edx 11510e: 89 42 04 mov %eax,0x4(%edx) --stats->used_blocks; 115111: 8b 4d 08 mov 0x8(%ebp),%ecx 115114: ff 49 40 decl 0x40(%ecx) 115117: e9 b6 00 00 00 jmp 1151d2 <_Heap_Resize_block+0x1ce> } } else { /* Calculate how much memory we could free */ uint32_t free_block_size = old_user_size - size; 11511c: 89 c3 mov %eax,%ebx 11511e: 2b 5d 10 sub 0x10(%ebp),%ebx 115121: 89 d8 mov %ebx,%eax 115123: 31 d2 xor %edx,%edx 115125: f7 f6 div %esi _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 115127: 89 de mov %ebx,%esi 115129: 29 d6 sub %edx,%esi 11512b: 0f 84 a4 00 00 00 je 1151d5 <_Heap_Resize_block+0x1d1> /* To free some memory the block should be shortened so that it can can hold 'size' user bytes and still remain not shorter than 'min_block_size'. */ uint32_t new_block_size = old_block_size - free_block_size; 115131: 8b 5d e4 mov -0x1c(%ebp),%ebx 115134: 29 f3 sub %esi,%ebx if (new_block_size < min_block_size) { 115136: 3b 5d ec cmp -0x14(%ebp),%ebx 115139: 73 16 jae 115151 <_Heap_Resize_block+0x14d> uint32_t delta = min_block_size - new_block_size; 11513b: 8b 45 ec mov -0x14(%ebp),%eax 11513e: 29 d8 sub %ebx,%eax _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 115140: 29 c6 sub %eax,%esi 115142: 75 0b jne 11514f <_Heap_Resize_block+0x14b><== NEVER TAKEN ++stats->resizes; 115144: 8b 55 08 mov 0x8(%ebp),%edx 115147: ff 42 54 incl 0x54(%edx) 11514a: e9 8c 00 00 00 jmp 1151db <_Heap_Resize_block+0x1d7> return HEAP_RESIZE_SUCCESSFUL; } new_block_size += delta; 11514f: 01 c3 add %eax,%ebx <== NOT EXECUTED _HAssert(new_block_size >= min_block_size); _HAssert(new_block_size + free_block_size == old_block_size); _HAssert(_Heap_Is_aligned(new_block_size, page_size)); _HAssert(_Heap_Is_aligned(free_block_size, page_size)); if (!next_is_used) { 115151: 84 c9 test %cl,%cl 115153: 75 43 jne 115198 <_Heap_Resize_block+0x194><== NEVER TAKEN 115155: 8b 55 f0 mov -0x10(%ebp),%edx 115158: 01 da add %ebx,%edx /* Extend the next block to the low addresses by 'free_block_size' */ Heap_Block *const new_next_block = _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; 11515a: 8b 45 dc mov -0x24(%ebp),%eax 11515d: 8d 0c 06 lea (%esi,%eax,1),%ecx _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 115160: 0b 5d e8 or -0x18(%ebp),%ebx 115163: 8b 45 f0 mov -0x10(%ebp),%eax 115166: 89 58 04 mov %ebx,0x4(%eax) new_next_block->size = new_next_block_size | HEAP_PREV_USED; 115169: 89 c8 mov %ecx,%eax 11516b: 83 c8 01 or $0x1,%eax 11516e: 89 42 04 mov %eax,0x4(%edx) next_next_block->prev_size = new_next_block_size; 115171: 8b 45 e0 mov -0x20(%ebp),%eax 115174: 89 08 mov %ecx,(%eax) { return (state == SYSTEM_STATE_FAILED); } /**@}*/ 115176: 8b 5f 08 mov 0x8(%edi),%ebx #endif 115179: 8b 47 0c mov 0xc(%edi),%eax /* end of include file */ 11517c: 89 5a 08 mov %ebx,0x8(%edx) 11517f: 89 42 0c mov %eax,0xc(%edx) 115182: 89 50 08 mov %edx,0x8(%eax) 115185: 89 53 0c mov %edx,0xc(%ebx) _Heap_Block_replace(next_block, new_next_block); the_heap->stats.free_size += free_block_size; 115188: 8b 55 08 mov 0x8(%ebp),%edx 11518b: 01 72 30 add %esi,0x30(%edx) *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 11518e: 83 e9 04 sub $0x4,%ecx 115191: 8b 45 18 mov 0x18(%ebp),%eax 115194: 89 08 mov %ecx,(%eax) 115196: eb 3d jmp 1151d5 <_Heap_Resize_block+0x1d1> } else if (free_block_size >= min_block_size) { 115198: 3b 75 ec cmp -0x14(%ebp),%esi <== NOT EXECUTED 11519b: 72 38 jb 1151d5 <_Heap_Resize_block+0x1d1><== NOT EXECUTED /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; 11519d: 09 5d e8 or %ebx,-0x18(%ebp) <== NOT EXECUTED 1151a0: 8b 4d e8 mov -0x18(%ebp),%ecx <== NOT EXECUTED 1151a3: 8b 55 f0 mov -0x10(%ebp),%edx <== NOT EXECUTED 1151a6: 89 4a 04 mov %ecx,0x4(%edx) <== NOT EXECUTED 1151a9: 89 d0 mov %edx,%eax <== NOT EXECUTED 1151ab: 01 d8 add %ebx,%eax <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 1151ad: 89 f2 mov %esi,%edx <== NOT EXECUTED 1151af: 83 ca 01 or $0x1,%edx <== NOT EXECUTED 1151b2: 89 50 04 mov %edx,0x4(%eax) <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 1151b5: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 1151b8: ff 42 40 incl 0x40(%edx) <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 1151bb: ff 4a 50 decl 0x50(%edx) <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 1151be: 51 push %ecx <== NOT EXECUTED 1151bf: 51 push %ecx <== NOT EXECUTED 1151c0: 83 c0 08 add $0x8,%eax <== NOT EXECUTED 1151c3: 50 push %eax <== NOT EXECUTED 1151c4: 52 push %edx <== NOT EXECUTED 1151c5: e8 5e 87 ff ff call 10d928 <_Heap_Free> <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 1151ca: 8d 46 fc lea -0x4(%esi),%eax <== NOT EXECUTED 1151cd: 8b 4d 18 mov 0x18(%ebp),%ecx <== NOT EXECUTED 1151d0: 89 01 mov %eax,(%ecx) <== NOT EXECUTED 1151d2: 83 c4 10 add $0x10,%esp } } } ++stats->resizes; 1151d5: 8b 45 08 mov 0x8(%ebp),%eax 1151d8: ff 40 54 incl 0x54(%eax) 1151db: 31 c0 xor %eax,%eax 1151dd: eb 0c jmp 1151eb <_Heap_Resize_block+0x1e7> return HEAP_RESIZE_SUCCESSFUL; 1151df: b8 02 00 00 00 mov $0x2,%eax 1151e4: eb 05 jmp 1151eb <_Heap_Resize_block+0x1e7> 1151e6: b8 01 00 00 00 mov $0x1,%eax } 1151eb: 8d 65 f4 lea -0xc(%ebp),%esp 1151ee: 5b pop %ebx 1151ef: 5e pop %esi 1151f0: 5f pop %edi 1151f1: c9 leave 1151f2: c3 ret =============================================================================== 001151f4 <_Heap_Size_of_user_area>: bool _Heap_Size_of_user_area( Heap_Control *the_heap, void *starting_address, size_t *size ) { 1151f4: 55 push %ebp 1151f5: 89 e5 mov %esp,%ebp 1151f7: 57 push %edi 1151f8: 56 push %esi 1151f9: 53 push %ebx 1151fa: 8b 75 08 mov 0x8(%ebp),%esi Heap_Block *the_block; Heap_Block *next_block; uint32_t the_size; if ( !_Addresses_Is_in_range( 1151fd: 8b 7e 24 mov 0x24(%esi),%edi 115200: 8b 5e 20 mov 0x20(%esi),%ebx 115203: 39 5d 0c cmp %ebx,0xc(%ebp) 115206: 0f 93 c2 setae %dl 115209: 39 7d 0c cmp %edi,0xc(%ebp) 11520c: 0f 96 c0 setbe %al 11520f: 84 d0 test %dl,%al 115211: 74 49 je 11525c <_Heap_Size_of_user_area+0x68> 115213: 8b 4d 0c mov 0xc(%ebp),%ecx 115216: 83 e9 08 sub $0x8,%ecx 115219: 8b 45 0c mov 0xc(%ebp),%eax 11521c: 31 d2 xor %edx,%edx 11521e: f7 76 10 divl 0x10(%esi) 115221: 29 d1 sub %edx,%ecx return( FALSE ); _Heap_Start_of_block( the_heap, starting_address, &the_block ); _HAssert(_Heap_Is_block_in( the_heap, the_block )); if ( !_Heap_Is_block_in( the_heap, the_block ) ) 115223: 39 d9 cmp %ebx,%ecx 115225: 0f 93 c2 setae %dl 115228: 39 f9 cmp %edi,%ecx 11522a: 0f 96 c0 setbe %al 11522d: 84 d0 test %dl,%al 11522f: 74 2b je 11525c <_Heap_Size_of_user_area+0x68><== NEVER TAKEN 115231: 8b 41 04 mov 0x4(%ecx),%eax 115234: 83 e0 fe and $0xfffffffe,%eax 115237: 01 c1 add %eax,%ecx the_size = _Heap_Block_size( the_block ); next_block = _Heap_Block_at( the_block, the_size ); _HAssert(_Heap_Is_block_in( the_heap, next_block )); _HAssert(_Heap_Is_prev_used( next_block )); if ( 115239: 39 d9 cmp %ebx,%ecx 11523b: 0f 93 c2 setae %dl 11523e: 39 f9 cmp %edi,%ecx 115240: 0f 96 c0 setbe %al 115243: 84 d0 test %dl,%al 115245: 74 15 je 11525c <_Heap_Size_of_user_area+0x68><== NEVER TAKEN 115247: f6 41 04 01 testb $0x1,0x4(%ecx) 11524b: 74 0f je 11525c <_Heap_Size_of_user_area+0x68><== NEVER TAKEN and then add correction equal to the offset of the 'size' field of the 'Heap_Block' structure. The correction is due to the fact that 'prev_size' field of the next block is actually used as user accessible area of 'the_block'. */ *size = _Addresses_Subtract ( next_block, starting_address ) 11524d: 2b 4d 0c sub 0xc(%ebp),%ecx 115250: 8d 51 04 lea 0x4(%ecx),%edx 115253: 8b 45 10 mov 0x10(%ebp),%eax 115256: 89 10 mov %edx,(%eax) 115258: b0 01 mov $0x1,%al 11525a: eb 02 jmp 11525e <_Heap_Size_of_user_area+0x6a> + HEAP_BLOCK_HEADER_OFFSET; return( TRUE ); 11525c: 31 c0 xor %eax,%eax } 11525e: 5b pop %ebx 11525f: 5e pop %esi 115260: 5f pop %edi 115261: c9 leave 115262: c3 ret =============================================================================== 0010fa3c <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 10fa3c: 55 push %ebp 10fa3d: 89 e5 mov %esp,%ebp 10fa3f: 57 push %edi 10fa40: 56 push %esi 10fa41: 53 push %ebx 10fa42: 83 ec 1c sub $0x1c,%esp 10fa45: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Block *the_block = the_heap->start; 10fa48: 8b 45 08 mov 0x8(%ebp),%eax 10fa4b: 8b 70 20 mov 0x20(%eax),%esi Heap_Block *const end = the_heap->final; 10fa4e: 8b 50 24 mov 0x24(%eax),%edx 10fa51: 89 55 e8 mov %edx,-0x18(%ebp) /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 10fa54: 85 db test %ebx,%ebx 10fa56: 79 03 jns 10fa5b <_Heap_Walk+0x1f> <== ALWAYS TAKEN source = the_heap->stats.instance; 10fa58: 8b 58 28 mov 0x28(%eax),%ebx <== NOT EXECUTED /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 10fa5b: 31 c9 xor %ecx,%ecx 10fa5d: f6 46 04 01 testb $0x1,0x4(%esi) 10fa61: 75 15 jne 10fa78 <_Heap_Walk+0x3c> <== ALWAYS TAKEN printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); 10fa63: 50 push %eax <== NOT EXECUTED 10fa64: 50 push %eax <== NOT EXECUTED 10fa65: 53 push %ebx <== NOT EXECUTED 10fa66: 68 ec aa 11 00 push $0x11aaec <== NOT EXECUTED 10fa6b: e8 66 8a ff ff call 1084d6 <== NOT EXECUTED 10fa70: b9 01 00 00 00 mov $0x1,%ecx <== NOT EXECUTED 10fa75: 83 c4 10 add $0x10,%esp <== NOT EXECUTED error = 1; } if (the_block->prev_size != the_heap->page_size) { 10fa78: 8b 06 mov (%esi),%eax 10fa7a: 8b 7d 08 mov 0x8(%ebp),%edi 10fa7d: 3b 47 10 cmp 0x10(%edi),%eax 10fa80: 0f 84 38 01 00 00 je 10fbbe <_Heap_Walk+0x182> <== ALWAYS TAKEN printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); 10fa86: 50 push %eax <== NOT EXECUTED 10fa87: 50 push %eax <== NOT EXECUTED 10fa88: 53 push %ebx <== NOT EXECUTED 10fa89: 68 22 ab 11 00 push $0x11ab22 <== NOT EXECUTED 10fa8e: e8 43 8a ff ff call 1084d6 <== NOT EXECUTED 10fa93: b9 01 00 00 00 mov $0x1,%ecx <== NOT EXECUTED 10fa98: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fa9b: e9 1e 01 00 00 jmp 10fbbe <_Heap_Walk+0x182> <== NOT EXECUTED 10faa0: 8b 46 04 mov 0x4(%esi),%eax 10faa3: 89 45 f0 mov %eax,-0x10(%ebp) 10faa6: 83 e0 fe and $0xfffffffe,%eax 10faa9: 89 45 ec mov %eax,-0x14(%ebp) /** @brief _Thread_Is_proxy_blocking * * status which indicates that a proxy is blocking, and FALSE otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_proxy_blocking ( uint32_t code 10faac: 01 f0 add %esi,%eax 10faae: 89 45 e0 mov %eax,-0x20(%ebp) printk(" prev_size %d", the_block->prev_size); else printk(" (prev_size) %d", the_block->prev_size); } if (!_Heap_Is_block_in(the_heap, next_block)) { 10fab1: 8b 55 08 mov 0x8(%ebp),%edx 10fab4: 3b 42 20 cmp 0x20(%edx),%eax 10fab7: 0f 93 c2 setae %dl 10faba: 8b 7d 08 mov 0x8(%ebp),%edi 10fabd: 3b 47 24 cmp 0x24(%edi),%eax 10fac0: 0f 96 c0 setbe %al 10fac3: 84 d0 test %dl,%al 10fac5: 75 0f jne 10fad6 <_Heap_Walk+0x9a> <== ALWAYS TAKEN if (do_dump) printk("\n"); printk("PASS: %d !block %p is out of heap\n", source, next_block); 10fac7: 50 push %eax <== NOT EXECUTED 10fac8: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 10facb: 53 push %ebx <== NOT EXECUTED 10facc: 68 54 ab 11 00 push $0x11ab54 <== NOT EXECUTED 10fad1: e9 d7 00 00 00 jmp 10fbad <_Heap_Walk+0x171> <== NOT EXECUTED error = 1; break; } if (!_Heap_Is_prev_used(next_block)) { 10fad6: 8b 45 e0 mov -0x20(%ebp),%eax 10fad9: f6 40 04 01 testb $0x1,0x4(%eax) 10fadd: 0f 85 85 00 00 00 jne 10fb68 <_Heap_Walk+0x12c> if (do_dump) printk( " prev %p next %p", the_block->prev, the_block->next); if (_Heap_Block_size(the_block) != next_block->prev_size) { 10fae3: 8b 55 ec mov -0x14(%ebp),%edx 10fae6: 3b 10 cmp (%eax),%edx 10fae8: 74 15 je 10faff <_Heap_Walk+0xc3> <== ALWAYS TAKEN if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 10faea: 50 push %eax <== NOT EXECUTED 10faeb: 50 push %eax <== NOT EXECUTED 10faec: 53 push %ebx <== NOT EXECUTED 10faed: 68 77 ab 11 00 push $0x11ab77 <== NOT EXECUTED 10faf2: e8 df 89 ff ff call 1084d6 <== NOT EXECUTED 10faf7: b9 01 00 00 00 mov $0x1,%ecx <== NOT EXECUTED 10fafc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED error = 1; } if (!prev_used) { 10faff: f6 45 f0 01 testb $0x1,-0x10(%ebp) 10fb03: 75 29 jne 10fb2e <_Heap_Walk+0xf2> <== ALWAYS TAKEN if (do_dump || error) printk("\n"); 10fb05: 85 c9 test %ecx,%ecx <== NOT EXECUTED 10fb07: 74 10 je 10fb19 <_Heap_Walk+0xdd> <== NOT EXECUTED 10fb09: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fb0c: 68 01 a8 11 00 push $0x11a801 <== NOT EXECUTED 10fb11: e8 c0 89 ff ff call 1084d6 <== NOT EXECUTED 10fb16: 83 c4 10 add $0x10,%esp <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 10fb19: 57 push %edi <== NOT EXECUTED 10fb1a: 57 push %edi <== NOT EXECUTED 10fb1b: 53 push %ebx <== NOT EXECUTED 10fb1c: 68 a2 ab 11 00 push $0x11aba2 <== NOT EXECUTED 10fb21: e8 b0 89 ff ff call 1084d6 <== NOT EXECUTED 10fb26: b9 01 00 00 00 mov $0x1,%ecx <== NOT EXECUTED 10fb2b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED ) { return ( the_thread == _Thread_Heir ); } /** 10fb2e: 8b 7d 08 mov 0x8(%ebp),%edi 10fb31: 8b 47 08 mov 0x8(%edi),%eax 10fb34: eb 03 jmp 10fb39 <_Heap_Walk+0xfd> } { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) block = block->next; 10fb36: 8b 40 08 mov 0x8(%eax),%eax error = 1; } { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) 10fb39: 39 f0 cmp %esi,%eax 10fb3b: 74 2b je 10fb68 <_Heap_Walk+0x12c> 10fb3d: 3b 45 08 cmp 0x8(%ebp),%eax 10fb40: 75 f4 jne 10fb36 <_Heap_Walk+0xfa> <== ALWAYS TAKEN block = block->next; if(block != the_block) { if (do_dump || error) printk("\n"); 10fb42: 85 c9 test %ecx,%ecx <== NOT EXECUTED 10fb44: 74 10 je 10fb56 <_Heap_Walk+0x11a> <== NOT EXECUTED 10fb46: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fb49: 68 01 a8 11 00 push $0x11a801 <== NOT EXECUTED 10fb4e: e8 83 89 ff ff call 1084d6 <== NOT EXECUTED 10fb53: 83 c4 10 add $0x10,%esp <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 10fb56: 51 push %ecx <== NOT EXECUTED 10fb57: 51 push %ecx <== NOT EXECUTED 10fb58: 53 push %ebx <== NOT EXECUTED 10fb59: 68 cc ab 11 00 push $0x11abcc <== NOT EXECUTED 10fb5e: e8 73 89 ff ff call 1084d6 <== NOT EXECUTED 10fb63: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fb66: eb 04 jmp 10fb6c <_Heap_Walk+0x130> <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 10fb68: 85 c9 test %ecx,%ecx 10fb6a: 74 15 je 10fb81 <_Heap_Walk+0x145> <== ALWAYS TAKEN 10fb6c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fb6f: 68 01 a8 11 00 push $0x11a801 <== NOT EXECUTED 10fb74: e8 5d 89 ff ff call 1084d6 <== NOT EXECUTED 10fb79: b9 01 00 00 00 mov $0x1,%ecx <== NOT EXECUTED 10fb7e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 10fb81: 8b 55 ec mov -0x14(%ebp),%edx 10fb84: 8b 45 08 mov 0x8(%ebp),%eax 10fb87: 3b 50 14 cmp 0x14(%eax),%edx 10fb8a: 73 0a jae 10fb96 <_Heap_Walk+0x15a> <== ALWAYS TAKEN printk("PASS: %d !block size is too small\n", source); 10fb8c: 52 push %edx <== NOT EXECUTED 10fb8d: 52 push %edx <== NOT EXECUTED 10fb8e: 53 push %ebx <== NOT EXECUTED 10fb8f: 68 f5 ab 11 00 push $0x11abf5 <== NOT EXECUTED 10fb94: eb 17 jmp 10fbad <_Heap_Walk+0x171> <== NOT EXECUTED error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { 10fb96: 8b 45 ec mov -0x14(%ebp),%eax 10fb99: 8b 7d 08 mov 0x8(%ebp),%edi 10fb9c: 31 d2 xor %edx,%edx 10fb9e: f7 77 10 divl 0x10(%edi) 10fba1: 85 d2 test %edx,%edx 10fba3: 74 12 je 10fbb7 <_Heap_Walk+0x17b> <== ALWAYS TAKEN printk("PASS: %d !block size is misaligned\n", source); 10fba5: 50 push %eax <== NOT EXECUTED 10fba6: 50 push %eax <== NOT EXECUTED 10fba7: 53 push %ebx <== NOT EXECUTED 10fba8: 68 18 ac 11 00 push $0x11ac18 <== NOT EXECUTED 10fbad: e8 24 89 ff ff call 1084d6 <== NOT EXECUTED 10fbb2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fbb5: eb 12 jmp 10fbc9 <_Heap_Walk+0x18d> <== NOT EXECUTED error = 1; } if (++passes > (do_dump ? 10 : 0) && error) 10fbb7: 85 c9 test %ecx,%ecx 10fbb9: 75 0e jne 10fbc9 <_Heap_Walk+0x18d> <== NEVER TAKEN break; 10fbbb: 8b 75 e0 mov -0x20(%ebp),%esi if (the_block->prev_size != the_heap->page_size) { printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); error = 1; } while ( the_block != end ) { 10fbbe: 3b 75 e8 cmp -0x18(%ebp),%esi 10fbc1: 0f 85 d9 fe ff ff jne 10faa0 <_Heap_Walk+0x64> 10fbc7: eb 17 jmp 10fbe0 <_Heap_Walk+0x1a4> the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", 10fbc9: ff 75 e8 pushl -0x18(%ebp) <== NOT EXECUTED 10fbcc: 56 push %esi <== NOT EXECUTED 10fbcd: 53 push %ebx <== NOT EXECUTED 10fbce: 68 3c ac 11 00 push $0x11ac3c <== NOT EXECUTED 10fbd3: e8 fe 88 ff ff call 1084d6 <== NOT EXECUTED 10fbd8: b9 01 00 00 00 mov $0x1,%ecx <== NOT EXECUTED 10fbdd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fbe0: 8b 46 04 mov 0x4(%esi),%eax 10fbe3: 83 e0 fe and $0xfffffffe,%eax source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { 10fbe6: 8b 75 08 mov 0x8(%ebp),%esi 10fbe9: 8b 56 10 mov 0x10(%esi),%edx 10fbec: 39 d0 cmp %edx,%eax 10fbee: 74 15 je 10fc05 <_Heap_Walk+0x1c9> <== ALWAYS TAKEN printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 10fbf0: 52 push %edx <== NOT EXECUTED 10fbf1: 50 push %eax <== NOT EXECUTED 10fbf2: 53 push %ebx <== NOT EXECUTED 10fbf3: 68 77 ac 11 00 push $0x11ac77 <== NOT EXECUTED 10fbf8: e8 d9 88 ff ff call 1084d6 <== NOT EXECUTED 10fbfd: b9 01 00 00 00 mov $0x1,%ecx <== NOT EXECUTED 10fc02: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fc05: 88 c8 mov %cl,%al if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } 10fc07: 8d 65 f4 lea -0xc(%ebp),%esp 10fc0a: 5b pop %ebx 10fc0b: 5e pop %esi 10fc0c: 5f pop %edi 10fc0d: c9 leave 10fc0e: c3 ret =============================================================================== 0010a154 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, uint32_t the_error ) { 10a154: 55 push %ebp 10a155: 89 e5 mov %esp,%ebp 10a157: 53 push %ebx 10a158: 83 ec 08 sub $0x8,%esp 10a15b: 8b 55 08 mov 0x8(%ebp),%edx 10a15e: 8b 45 0c mov 0xc(%ebp),%eax 10a161: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10a164: 89 15 88 cb 11 00 mov %edx,0x11cb88 _Internal_errors_What_happened.is_internal = is_internal; 10a16a: a2 8c cb 11 00 mov %al,0x11cb8c _Internal_errors_What_happened.the_error = the_error; 10a16f: 89 1d 90 cb 11 00 mov %ebx,0x11cb90 _User_extensions_Fatal( the_source, is_internal, the_error ); 10a175: 53 push %ebx 10a176: 0f b6 c0 movzbl %al,%eax 10a179: 50 push %eax 10a17a: 52 push %edx 10a17b: e8 eb 18 00 00 call 10ba6b <_User_extensions_Fatal> * @param[in] page_size is the size in bytes of the allocation unit * * @return This method returns the maximum memory available. If * unsuccessful, 0 will be returned. */ static inline uint32_t _Protected_heap_Initialize( 10a180: c7 05 80 cc 11 00 05 movl $0x5,0x11cc80 <== NOT EXECUTED 10a187: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10a18a: fa cli <== NOT EXECUTED 10a18b: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10a18d: f4 hlt <== NOT EXECUTED 10a18e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a191: eb fe jmp 10a191 <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 0010da90 <_Objects_API_maximum_class>: #include int _Objects_API_maximum_class( uint32_t api ) { 10da90: 55 push %ebp 10da91: 89 e5 mov %esp,%ebp 10da93: 8b 55 08 mov 0x8(%ebp),%edx switch (api) { 10da96: b8 0a 00 00 00 mov $0xa,%eax 10da9b: 83 fa 02 cmp $0x2,%edx 10da9e: 74 1b je 10dabb <_Objects_API_maximum_class+0x2b> 10daa0: 77 05 ja 10daa7 <_Objects_API_maximum_class+0x17> 10daa2: b0 02 mov $0x2,%al 10daa4: 4a dec %edx 10daa5: eb 0f jmp 10dab6 <_Objects_API_maximum_class+0x26> 10daa7: b8 0c 00 00 00 mov $0xc,%eax 10daac: 83 fa 03 cmp $0x3,%edx 10daaf: 74 0a je 10dabb <_Objects_API_maximum_class+0x2b><== NEVER TAKEN case OBJECTS_INTERNAL_API: return OBJECTS_INTERNAL_CLASSES_LAST; case OBJECTS_CLASSIC_API: return OBJECTS_RTEMS_CLASSES_LAST; case OBJECTS_POSIX_API: return OBJECTS_POSIX_CLASSES_LAST; 10dab1: b0 08 mov $0x8,%al int _Objects_API_maximum_class( uint32_t api ) { switch (api) { 10dab3: 83 fa 04 cmp $0x4,%edx 10dab6: 74 03 je 10dabb <_Objects_API_maximum_class+0x2b> case OBJECTS_CLASSIC_API: return OBJECTS_RTEMS_CLASSES_LAST; case OBJECTS_POSIX_API: return OBJECTS_POSIX_CLASSES_LAST; case OBJECTS_ITRON_API: return OBJECTS_ITRON_CLASSES_LAST; 10dab8: 83 c8 ff or $0xffffffff,%eax case OBJECTS_NO_API: default: break; } return -1; } 10dabb: c9 leave 10dabc: c3 ret =============================================================================== 0010a1e8 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10a1e8: 55 push %ebp 10a1e9: 89 e5 mov %esp,%ebp 10a1eb: 56 push %esi 10a1ec: 53 push %ebx 10a1ed: 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 ) 10a1f0: 31 c9 xor %ecx,%ecx 10a1f2: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 10a1f6: 74 59 je 10a251 <_Objects_Allocate+0x69><== NEVER TAKEN /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10a1f8: 8d 73 20 lea 0x20(%ebx),%esi 10a1fb: 83 ec 0c sub $0xc,%esp 10a1fe: 56 push %esi 10a1ff: e8 6c f8 ff ff call 109a70 <_Chain_Get> 10a204: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10a206: 83 c4 10 add $0x10,%esp 10a209: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10a20d: 74 42 je 10a251 <_Objects_Allocate+0x69> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10a20f: 85 c0 test %eax,%eax 10a211: 75 1a jne 10a22d <_Objects_Allocate+0x45> _Objects_Extend_information( information ); 10a213: 83 ec 0c sub $0xc,%esp 10a216: 53 push %ebx 10a217: e8 64 00 00 00 call 10a280 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10a21c: 89 34 24 mov %esi,(%esp) 10a21f: e8 4c f8 ff ff call 109a70 <_Chain_Get> 10a224: 89 c1 mov %eax,%ecx } if ( the_object ) { 10a226: 83 c4 10 add $0x10,%esp 10a229: 85 c0 test %eax,%eax 10a22b: 74 24 je 10a251 <_Objects_Allocate+0x69><== NEVER TAKEN uint32_t block; block = _Objects_Get_index( the_object->id ) - 10a22d: 8b 41 08 mov 0x8(%ecx),%eax 10a230: 25 ff ff 00 00 and $0xffff,%eax 10a235: 8b 53 08 mov 0x8(%ebx),%edx 10a238: 81 e2 ff ff 00 00 and $0xffff,%edx 10a23e: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 10a240: 31 d2 xor %edx,%edx 10a242: f7 73 14 divl 0x14(%ebx) 10a245: c1 e0 02 shl $0x2,%eax 10a248: 03 43 30 add 0x30(%ebx),%eax 10a24b: ff 08 decl (%eax) information->inactive--; 10a24d: 66 ff 4b 2c decw 0x2c(%ebx) } } return the_object; } 10a251: 89 c8 mov %ecx,%eax 10a253: 8d 65 f8 lea -0x8(%ebp),%esp 10a256: 5b pop %ebx 10a257: 5e pop %esi 10a258: c9 leave 10a259: c3 ret =============================================================================== 0010a280 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10a280: 55 push %ebp 10a281: 89 e5 mov %esp,%ebp 10a283: 57 push %edi 10a284: 56 push %esi 10a285: 53 push %ebx 10a286: 83 ec 5c sub $0x5c,%esp 10a289: 8b 5d 08 mov 0x8(%ebp),%ebx * alignments are possible. * Returns pointer to the start of the memory block if success, NULL if * failure. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes 10a28c: 8b 43 08 mov 0x8(%ebx),%eax 10a28f: 25 ff ff 00 00 and $0xffff,%eax 10a294: 89 45 c8 mov %eax,-0x38(%ebp) minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 10a297: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10a29b: 39 c1 cmp %eax,%ecx 10a29d: 73 13 jae 10a2b2 <_Objects_Extend_information+0x32> 10a29f: 89 45 c4 mov %eax,-0x3c(%ebp) 10a2a2: c7 45 bc 00 00 00 00 movl $0x0,-0x44(%ebp) 10a2a9: c7 45 c0 00 00 00 00 movl $0x0,-0x40(%ebp) 10a2b0: eb 35 jmp 10a2e7 <_Objects_Extend_information+0x67> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10a2b2: 8b 7b 14 mov 0x14(%ebx),%edi 10a2b5: 89 c8 mov %ecx,%eax 10a2b7: 31 d2 xor %edx,%edx 10a2b9: f7 f7 div %edi 10a2bb: 89 c6 mov %eax,%esi 10a2bd: 89 45 bc mov %eax,-0x44(%ebp) 10a2c0: 8b 45 c8 mov -0x38(%ebp),%eax 10a2c3: 89 45 c4 mov %eax,-0x3c(%ebp) 10a2c6: c7 45 c0 00 00 00 00 movl $0x0,-0x40(%ebp) 10a2cd: eb 13 jmp 10a2e2 <_Objects_Extend_information+0x62> for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 10a2cf: 8b 43 34 mov 0x34(%ebx),%eax 10a2d2: 8b 55 c0 mov -0x40(%ebp),%edx 10a2d5: 83 3c 90 00 cmpl $0x0,(%eax,%edx,4) 10a2d9: 74 0c je 10a2e7 <_Objects_Extend_information+0x67> break; else index_base += information->allocation_size; 10a2db: 01 7d c4 add %edi,-0x3c(%ebp) if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10a2de: 42 inc %edx 10a2df: 89 55 c0 mov %edx,-0x40(%ebp) 10a2e2: 39 75 c0 cmp %esi,-0x40(%ebp) 10a2e5: 72 e8 jb 10a2cf <_Objects_Extend_information+0x4f> /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 10a2e7: 39 4d c4 cmp %ecx,-0x3c(%ebp) 10a2ea: 0f 82 30 01 00 00 jb 10a420 <_Objects_Extend_information+0x1a0> /* * Up the block count and maximum */ block_count++; 10a2f0: 8b 75 bc mov -0x44(%ebp),%esi 10a2f3: 46 inc %esi maximum = information->maximum + information->allocation_size; 10a2f4: 03 4b 14 add 0x14(%ebx),%ecx 10a2f7: 89 4d d0 mov %ecx,-0x30(%ebp) /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 10a2fa: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10a2fe: 8b 7d c8 mov -0x38(%ebp),%edi 10a301: 8d 14 39 lea (%ecx,%edi,1),%edx 10a304: 74 21 je 10a327 <_Objects_Extend_information+0xa7> object_blocks = (void**) 10a306: 83 ec 0c sub $0xc,%esp 10a309: 8d 04 76 lea (%esi,%esi,2),%eax 10a30c: 8d 04 02 lea (%edx,%eax,1),%eax 10a30f: c1 e0 02 shl $0x2,%eax 10a312: 50 push %eax 10a313: e8 71 1a 00 00 call 10bd89 <_Workspace_Allocate> 10a318: 89 45 a0 mov %eax,-0x60(%ebp) block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)) ); if ( !object_blocks ) 10a31b: 83 c4 10 add $0x10,%esp 10a31e: 85 c0 test %eax,%eax 10a320: 75 1d jne 10a33f <_Objects_Extend_information+0xbf><== ALWAYS TAKEN 10a322: e9 c9 01 00 00 jmp 10a4f0 <_Objects_Extend_information+0x270><== NOT EXECUTED return; } else { object_blocks = (void**) 10a327: 83 ec 0c sub $0xc,%esp 10a32a: 8d 04 76 lea (%esi,%esi,2),%eax 10a32d: 8d 04 02 lea (%edx,%eax,1),%eax 10a330: c1 e0 02 shl $0x2,%eax 10a333: 50 push %eax 10a334: e8 65 1a 00 00 call 10bd9e <_Workspace_Allocate_or_fatal_error> 10a339: 89 45 a0 mov %eax,-0x60(%ebp) 10a33c: 83 c4 10 add $0x10,%esp /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 10a33f: 8b 45 a0 mov -0x60(%ebp),%eax 10a342: 8d 04 b0 lea (%eax,%esi,4),%eax 10a345: 89 45 cc mov %eax,-0x34(%ebp) * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory for * the heap 10a348: 8b 55 a0 mov -0x60(%ebp),%edx 10a34b: 8d 34 f2 lea (%edx,%esi,8),%esi 10a34e: 89 75 d4 mov %esi,-0x2c(%ebp) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 10a351: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10a355: 31 d2 xor %edx,%edx 10a357: 3b 45 c8 cmp -0x38(%ebp),%eax 10a35a: 76 39 jbe 10a395 <_Objects_Extend_information+0x115> /* * 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, 10a35c: 8b 45 bc mov -0x44(%ebp),%eax 10a35f: c1 e0 02 shl $0x2,%eax 10a362: 8b 73 34 mov 0x34(%ebx),%esi 10a365: 8b 7d a0 mov -0x60(%ebp),%edi 10a368: 89 c1 mov %eax,%ecx 10a36a: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10a36c: 8b 73 30 mov 0x30(%ebx),%esi 10a36f: 8b 7d cc mov -0x34(%ebp),%edi 10a372: 89 c1 mov %eax,%ecx 10a374: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10a376: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10a37a: 03 4d c8 add -0x38(%ebp),%ecx 10a37d: c1 e1 02 shl $0x2,%ecx 10a380: 8b 73 1c mov 0x1c(%ebx),%esi 10a383: 8b 7d d4 mov -0x2c(%ebp),%edi 10a386: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10a388: eb 10 jmp 10a39a <_Objects_Extend_information+0x11a> /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 10a38a: 8b 45 d4 mov -0x2c(%ebp),%eax 10a38d: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10a394: 42 inc %edx 10a395: 3b 55 c8 cmp -0x38(%ebp),%edx 10a398: 72 f0 jb 10a38a <_Objects_Extend_information+0x10a> /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10a39a: 8b 55 bc mov -0x44(%ebp),%edx 10a39d: 8b 4d a0 mov -0x60(%ebp),%ecx 10a3a0: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,4) inactive_per_block[block_count] = 0; 10a3a7: 8b 75 cc mov -0x34(%ebp),%esi 10a3aa: c7 04 96 00 00 00 00 movl $0x0,(%esi,%edx,4) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10a3b1: 8b 4d c4 mov -0x3c(%ebp),%ecx 10a3b4: 03 4b 14 add 0x14(%ebx),%ecx 10a3b7: 8b 7d c4 mov -0x3c(%ebp),%edi 10a3ba: 8b 45 d4 mov -0x2c(%ebp),%eax 10a3bd: 8d 14 b8 lea (%eax,%edi,4),%edx 10a3c0: 89 f8 mov %edi,%eax 10a3c2: eb 0a jmp 10a3ce <_Objects_Extend_information+0x14e> index++ ) { local_table[ index ] = NULL; 10a3c4: c7 02 00 00 00 00 movl $0x0,(%edx) object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 10a3ca: 40 inc %eax 10a3cb: 83 c2 04 add $0x4,%edx object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 10a3ce: 39 c8 cmp %ecx,%eax 10a3d0: 72 f2 jb 10a3c4 <_Objects_Extend_information+0x144> index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10a3d2: 9c pushf 10a3d3: fa cli 10a3d4: 59 pop %ecx old_tables = information->object_blocks; 10a3d5: 8b 73 34 mov 0x34(%ebx),%esi information->object_blocks = object_blocks; 10a3d8: 8b 55 a0 mov -0x60(%ebp),%edx 10a3db: 89 53 34 mov %edx,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10a3de: 8b 7d cc mov -0x34(%ebp),%edi 10a3e1: 89 7b 30 mov %edi,0x30(%ebx) information->local_table = local_table; 10a3e4: 8b 45 d4 mov -0x2c(%ebp),%eax 10a3e7: 89 43 1c mov %eax,0x1c(%ebx) information->maximum = maximum; 10a3ea: 8b 55 d0 mov -0x30(%ebp),%edx 10a3ed: 66 89 53 10 mov %dx,0x10(%ebx) information->maximum_id = _Objects_Build_id( 10a3f1: 8b 13 mov (%ebx),%edx 10a3f3: c1 e2 18 shl $0x18,%edx 10a3f6: 81 ca 00 00 01 00 or $0x10000,%edx 10a3fc: 0f b7 43 04 movzwl 0x4(%ebx),%eax 10a400: c1 e0 1b shl $0x1b,%eax 10a403: 09 c2 or %eax,%edx 10a405: 0f b7 45 d0 movzwl -0x30(%ebp),%eax 10a409: 09 c2 or %eax,%edx 10a40b: 89 53 0c mov %edx,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10a40e: 51 push %ecx 10a40f: 9d popf if ( old_tables ) 10a410: 85 f6 test %esi,%esi 10a412: 74 0c je 10a420 <_Objects_Extend_information+0x1a0> _Workspace_Free( old_tables ); 10a414: 83 ec 0c sub $0xc,%esp 10a417: 56 push %esi 10a418: e8 57 19 00 00 call 10bd74 <_Workspace_Free> 10a41d: 83 c4 10 add $0x10,%esp /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 10a420: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10a424: 8b 43 18 mov 0x18(%ebx),%eax 10a427: 74 32 je 10a45b <_Objects_Extend_information+0x1db> information->object_blocks[ block ] = 10a429: 8b 4d c0 mov -0x40(%ebp),%ecx 10a42c: 8b 73 34 mov 0x34(%ebx),%esi 10a42f: 8d 0c 8e lea (%esi,%ecx,4),%ecx 10a432: 89 4d d8 mov %ecx,-0x28(%ebp) 10a435: 83 ec 0c sub $0xc,%esp 10a438: 0f af 43 14 imul 0x14(%ebx),%eax 10a43c: 50 push %eax 10a43d: e8 47 19 00 00 call 10bd89 <_Workspace_Allocate> 10a442: 8b 7d d8 mov -0x28(%ebp),%edi 10a445: 89 07 mov %eax,(%edi) _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 10a447: 8b 43 34 mov 0x34(%ebx),%eax 10a44a: 83 c4 10 add $0x10,%esp 10a44d: 8b 55 c0 mov -0x40(%ebp),%edx 10a450: 83 3c 90 00 cmpl $0x0,(%eax,%edx,4) 10a454: 75 26 jne 10a47c <_Objects_Extend_information+0x1fc><== ALWAYS TAKEN 10a456: e9 95 00 00 00 jmp 10a4f0 <_Objects_Extend_information+0x270><== NOT EXECUTED return; } else { information->object_blocks[ block ] = 10a45b: 8b 4d c0 mov -0x40(%ebp),%ecx 10a45e: 8b 73 34 mov 0x34(%ebx),%esi 10a461: 8d 0c 8e lea (%esi,%ecx,4),%ecx 10a464: 89 4d dc mov %ecx,-0x24(%ebp) 10a467: 83 ec 0c sub $0xc,%esp 10a46a: 0f af 43 14 imul 0x14(%ebx),%eax 10a46e: 50 push %eax 10a46f: e8 2a 19 00 00 call 10bd9e <_Workspace_Allocate_or_fatal_error> 10a474: 8b 7d dc mov -0x24(%ebp),%edi 10a477: 89 07 mov %eax,(%edi) 10a479: 83 c4 10 add $0x10,%esp /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10a47c: 8b 45 c0 mov -0x40(%ebp),%eax 10a47f: c1 e0 02 shl $0x2,%eax 10a482: 89 45 e0 mov %eax,-0x20(%ebp) 10a485: ff 73 18 pushl 0x18(%ebx) 10a488: ff 73 14 pushl 0x14(%ebx) 10a48b: 8b 43 34 mov 0x34(%ebx),%eax 10a48e: 8b 55 c0 mov -0x40(%ebp),%edx 10a491: ff 34 90 pushl (%eax,%edx,4) 10a494: 8d 7d e8 lea -0x18(%ebp),%edi 10a497: 57 push %edi 10a498: e8 eb 31 00 00 call 10d688 <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10a49d: 8d 4b 20 lea 0x20(%ebx),%ecx 10a4a0: 89 4d b8 mov %ecx,-0x48(%ebp) 10a4a3: 8b 75 c4 mov -0x3c(%ebp),%esi 10a4a6: eb 24 jmp 10a4cc <_Objects_Extend_information+0x24c> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 10a4a8: 8b 03 mov (%ebx),%eax 10a4aa: c1 e0 18 shl $0x18,%eax 10a4ad: 0d 00 00 01 00 or $0x10000,%eax 10a4b2: 0f b7 53 04 movzwl 0x4(%ebx),%edx 10a4b6: c1 e2 1b shl $0x1b,%edx 10a4b9: 09 d0 or %edx,%eax 10a4bb: 09 f0 or %esi,%eax 10a4bd: 89 41 08 mov %eax,0x8(%ecx) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10a4c0: 50 push %eax 10a4c1: 50 push %eax 10a4c2: 51 push %ecx 10a4c3: ff 75 b8 pushl -0x48(%ebp) 10a4c6: e8 81 f5 ff ff call 109a4c <_Chain_Append> index++; 10a4cb: 46 inc %esi * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { 10a4cc: 89 3c 24 mov %edi,(%esp) 10a4cf: e8 9c f5 ff ff call 109a70 <_Chain_Get> 10a4d4: 89 c1 mov %eax,%ecx 10a4d6: 83 c4 10 add $0x10,%esp 10a4d9: 85 c0 test %eax,%eax 10a4db: 75 cb jne 10a4a8 <_Objects_Extend_information+0x228> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10a4dd: 8b 43 30 mov 0x30(%ebx),%eax 10a4e0: 8b 53 14 mov 0x14(%ebx),%edx 10a4e3: 8b 75 e0 mov -0x20(%ebp),%esi 10a4e6: 89 14 30 mov %edx,(%eax,%esi,1) information->inactive += information->allocation_size; 10a4e9: 8b 43 14 mov 0x14(%ebx),%eax 10a4ec: 66 01 43 2c add %ax,0x2c(%ebx) } 10a4f0: 8d 65 f4 lea -0xc(%ebp),%esp 10a4f3: 5b pop %ebx 10a4f4: 5e pop %esi 10a4f5: 5f pop %edi 10a4f6: c9 leave 10a4f7: c3 ret =============================================================================== 0010a58c <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10a58c: 55 push %ebp 10a58d: 89 e5 mov %esp,%ebp 10a58f: 56 push %esi 10a590: 53 push %ebx 10a591: 8b 5d 08 mov 0x8(%ebp),%ebx 10a594: 8b 75 0c mov 0xc(%ebp),%esi /** * This function sets @a *size to the size of the block of user memory * which begins at @a starting_address. The size returned in @a *size could * be greater than the size requested for allocation. * Returns TRUE if the @a starting_address is in the heap, and FALSE * otherwise. 10a597: 8d 43 ff lea -0x1(%ebx),%eax 10a59a: 83 f8 03 cmp $0x3,%eax 10a59d: 77 2f ja 10a5ce <_Objects_Get_information+0x42> 10a59f: eb 36 jmp 10a5d7 <_Objects_Get_information+0x4b> return NULL; if ( !the_class ) return NULL; the_class_api_maximum = _Objects_API_maximum_class( the_api ); 10a5a1: 83 ec 0c sub $0xc,%esp 10a5a4: 53 push %ebx 10a5a5: e8 e6 34 00 00 call 10da90 <_Objects_API_maximum_class> if ( the_class_api_maximum < 0 || 10a5aa: 83 c4 10 add $0x10,%esp 10a5ad: 85 c0 test %eax,%eax 10a5af: 78 1d js 10a5ce <_Objects_Get_information+0x42><== NEVER TAKEN 10a5b1: 39 c6 cmp %eax,%esi 10a5b3: 77 19 ja 10a5ce <_Objects_Get_information+0x42><== NEVER TAKEN the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 10a5b5: 8b 04 9d b4 ca 11 00 mov 0x11cab4(,%ebx,4),%eax 10a5bc: 85 c0 test %eax,%eax 10a5be: 74 0e je 10a5ce <_Objects_Get_information+0x42><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10a5c0: 8b 04 b0 mov (%eax,%esi,4),%eax if ( !info ) 10a5c3: 85 c0 test %eax,%eax 10a5c5: 74 09 je 10a5d0 <_Objects_Get_information+0x44><== NEVER TAKEN * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 10a5c7: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10a5cc: 75 02 jne 10a5d0 <_Objects_Get_information+0x44> 10a5ce: 31 c0 xor %eax,%eax return NULL; #endif return info; } 10a5d0: 8d 65 f8 lea -0x8(%ebp),%esp 10a5d3: 5b pop %ebx 10a5d4: 5e pop %esi 10a5d5: c9 leave 10a5d6: c3 ret int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; if ( !the_class ) 10a5d7: 85 f6 test %esi,%esi 10a5d9: 74 f3 je 10a5ce <_Objects_Get_information+0x42> 10a5db: eb c4 jmp 10a5a1 <_Objects_Get_information+0x15> =============================================================================== 0010a5e0 <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10a5e0: 55 push %ebp 10a5e1: 89 e5 mov %esp,%ebp 10a5e3: 56 push %esi 10a5e4: 53 push %ebx 10a5e5: 8b 75 08 mov 0x8(%ebp),%esi 10a5e8: 8b 5d 10 mov 0x10(%ebp),%ebx #if defined(RTEMS_MULTIPROCESSING) index = id - information->minimum_id + 1; #else /* index = _Objects_Get_index( id ); */ index = id & 0x0000ffff; 10a5eb: 0f b7 55 0c movzwl 0xc(%ebp),%edx /* This should work but doesn't always :( */ /* index = (uint16_t ) id; */ #endif _ISR_Disable( level ); 10a5ef: 9c pushf 10a5f0: fa cli 10a5f1: 59 pop %ecx if ( information->maximum >= index ) { 10a5f2: 0f b7 46 10 movzwl 0x10(%esi),%eax 10a5f6: 39 d0 cmp %edx,%eax 10a5f8: 72 21 jb 10a61b <_Objects_Get_isr_disable+0x3b> if ( (the_object = information->local_table[ index ]) != NULL ) { 10a5fa: 8b 46 1c mov 0x1c(%esi),%eax 10a5fd: 8b 14 90 mov (%eax,%edx,4),%edx 10a600: 85 d2 test %edx,%edx 10a602: 74 0d je 10a611 <_Objects_Get_isr_disable+0x31><== NEVER TAKEN *location = OBJECTS_LOCAL; 10a604: c7 03 00 00 00 00 movl $0x0,(%ebx) *level_p = level; 10a60a: 8b 45 14 mov 0x14(%ebp),%eax 10a60d: 89 08 mov %ecx,(%eax) 10a60f: eb 14 jmp 10a625 <_Objects_Get_isr_disable+0x45> return the_object; } _ISR_Enable( level ); 10a611: 51 push %ecx <== NOT EXECUTED 10a612: 9d popf <== NOT EXECUTED *location = OBJECTS_ERROR; 10a613: c7 03 01 00 00 00 movl $0x1,(%ebx) <== NOT EXECUTED 10a619: eb 0a jmp 10a625 <_Objects_Get_isr_disable+0x45><== NOT EXECUTED return NULL; } _ISR_Enable( level ); 10a61b: 51 push %ecx 10a61c: 9d popf *location = OBJECTS_ERROR; 10a61d: c7 03 01 00 00 00 movl $0x1,(%ebx) 10a623: 31 d2 xor %edx,%edx _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10a625: 89 d0 mov %edx,%eax 10a627: 5b pop %ebx 10a628: 5e pop %esi 10a629: c9 leave 10a62a: c3 ret =============================================================================== 0010b8d4 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 10b8d4: 55 push %ebp 10b8d5: 89 e5 mov %esp,%ebp 10b8d7: 57 push %edi 10b8d8: 56 push %esi 10b8d9: 53 push %ebx 10b8da: 83 ec 1c sub $0x1c,%esp char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 10b8dd: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 10b8e1: 0f 84 b3 00 00 00 je 10b99a <_Objects_Get_name_as_string+0xc6> return NULL; if ( name == NULL ) 10b8e7: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10b8eb: 0f 84 b0 00 00 00 je 10b9a1 <_Objects_Get_name_as_string+0xcd> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10b8f1: 8b 5d 08 mov 0x8(%ebp),%ebx 10b8f4: 85 db test %ebx,%ebx 10b8f6: 75 08 jne 10b900 <_Objects_Get_name_as_string+0x2c> 10b8f8: a1 5c 85 12 00 mov 0x12855c,%eax 10b8fd: 8b 58 08 mov 0x8(%eax),%ebx information = _Objects_Get_information_id( tmpId ); 10b900: 83 ec 0c sub $0xc,%esp 10b903: 53 push %ebx 10b904: e8 0b ff ff ff call 10b814 <_Objects_Get_information_id> 10b909: 89 c6 mov %eax,%esi if ( !information ) 10b90b: 83 c4 10 add $0x10,%esp 10b90e: 85 c0 test %eax,%eax 10b910: 0f 84 84 00 00 00 je 10b99a <_Objects_Get_name_as_string+0xc6> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 10b916: 50 push %eax 10b917: 8d 45 f0 lea -0x10(%ebp),%eax 10b91a: 50 push %eax 10b91b: 53 push %ebx 10b91c: 56 push %esi 10b91d: e8 8a 00 00 00 call 10b9ac <_Objects_Get> switch ( location ) { 10b922: 83 c4 10 add $0x10,%esp 10b925: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 10b929: 75 6f jne 10b99a <_Objects_Get_name_as_string+0xc6> case OBJECTS_ERROR: return NULL; case OBJECTS_LOCAL: if ( information->is_string ) { 10b92b: 80 7e 38 00 cmpb $0x0,0x38(%esi) 10b92f: 74 0c je 10b93d <_Objects_Get_name_as_string+0x69> s = the_object->name.name_p; 10b931: 8b 78 0c mov 0xc(%eax),%edi lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 10b934: 8b 75 10 mov 0x10(%ebp),%esi 10b937: 85 ff test %edi,%edi 10b939: 75 27 jne 10b962 <_Objects_Get_name_as_string+0x8e><== ALWAYS TAKEN 10b93b: eb 53 jmp 10b990 <_Objects_Get_name_as_string+0xbc><== NOT EXECUTED case OBJECTS_LOCAL: if ( information->is_string ) { s = the_object->name.name_p; } else { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 10b93d: 8b 50 0c mov 0xc(%eax),%edx lname[ 0 ] = (u32_name >> 24) & 0xff; 10b940: 89 d0 mov %edx,%eax 10b942: c1 e8 18 shr $0x18,%eax 10b945: 88 45 eb mov %al,-0x15(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 10b948: 89 d0 mov %edx,%eax 10b94a: c1 e8 10 shr $0x10,%eax 10b94d: 88 45 ec mov %al,-0x14(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 10b950: 89 d0 mov %edx,%eax 10b952: c1 e8 08 shr $0x8,%eax 10b955: 88 45 ed mov %al,-0x13(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 10b958: 88 55 ee mov %dl,-0x12(%ebp) lname[ 4 ] = '\0'; 10b95b: c6 45 ef 00 movb $0x0,-0x11(%ebp) 10b95f: 8d 7d eb lea -0x15(%ebp),%edi 10b962: 8b 75 10 mov 0x10(%ebp),%esi 10b965: 31 db xor %ebx,%ebx s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10b967: 8b 45 0c mov 0xc(%ebp),%eax 10b96a: 48 dec %eax 10b96b: 89 45 e0 mov %eax,-0x20(%ebp) 10b96e: eb 14 jmp 10b984 <_Objects_Get_name_as_string+0xb0> *d = (isprint(*s)) ? *s : '*'; 10b970: 0f be d1 movsbl %cl,%edx 10b973: a1 e0 e6 11 00 mov 0x11e6e0,%eax 10b978: f6 04 10 97 testb $0x97,(%eax,%edx,1) 10b97c: 75 02 jne 10b980 <_Objects_Get_name_as_string+0xac> 10b97e: b1 2a mov $0x2a,%cl 10b980: 88 0e mov %cl,(%esi) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10b982: 43 inc %ebx 10b983: 46 inc %esi 10b984: 3b 5d e0 cmp -0x20(%ebp),%ebx 10b987: 73 07 jae 10b990 <_Objects_Get_name_as_string+0xbc> 10b989: 8a 0c 1f mov (%edi,%ebx,1),%cl 10b98c: 84 c9 test %cl,%cl 10b98e: 75 e0 jne 10b970 <_Objects_Get_name_as_string+0x9c> *d = (isprint(*s)) ? *s : '*'; } } *d = '\0'; 10b990: c6 06 00 movb $0x0,(%esi) _Thread_Enable_dispatch(); 10b993: e8 d4 07 00 00 call 10c16c <_Thread_Enable_dispatch> 10b998: eb 07 jmp 10b9a1 <_Objects_Get_name_as_string+0xcd> return name; 10b99a: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) } return NULL; /* unreachable path */ } 10b9a1: 8b 45 10 mov 0x10(%ebp),%eax 10b9a4: 8d 65 f4 lea -0xc(%ebp),%esp 10b9a7: 5b pop %ebx 10b9a8: 5e pop %esi 10b9a9: 5f pop %edi 10b9aa: c9 leave 10b9ab: c3 ret =============================================================================== 00114f1c <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 114f1c: 55 push %ebp 114f1d: 89 e5 mov %esp,%ebp 114f1f: 53 push %ebx 114f20: 8b 4d 08 mov 0x8(%ebp),%ecx 114f23: 8b 5d 10 mov 0x10(%ebp),%ebx /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 114f26: ba 01 00 00 00 mov $0x1,%edx 114f2b: 2b 51 08 sub 0x8(%ecx),%edx 114f2e: 03 55 0c add 0xc(%ebp),%edx if ( information->maximum >= index ) { 114f31: 0f b7 41 10 movzwl 0x10(%ecx),%eax 114f35: 39 d0 cmp %edx,%eax 114f37: 72 12 jb 114f4b <_Objects_Get_no_protection+0x2f> if ( (the_object = information->local_table[ index ]) != NULL ) { 114f39: 8b 41 1c mov 0x1c(%ecx),%eax 114f3c: 8b 04 90 mov (%eax,%edx,4),%eax 114f3f: 85 c0 test %eax,%eax 114f41: 74 08 je 114f4b <_Objects_Get_no_protection+0x2f><== NEVER TAKEN *location = OBJECTS_LOCAL; 114f43: c7 03 00 00 00 00 movl $0x0,(%ebx) 114f49: eb 08 jmp 114f53 <_Objects_Get_no_protection+0x37> /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 114f4b: c7 03 01 00 00 00 movl $0x1,(%ebx) 114f51: 31 c0 xor %eax,%eax return NULL; } 114f53: 5b pop %ebx 114f54: c9 leave 114f55: c3 ret =============================================================================== 0010b5cc <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10b5cc: 55 push %ebp 10b5cd: 89 e5 mov %esp,%ebp 10b5cf: 53 push %ebx 10b5d0: 83 ec 14 sub $0x14,%esp 10b5d3: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Id tmpId; Objects_Information *information; Objects_Control *the_object = (Objects_Control *) 0; Objects_Locations ignored_location; if ( !name ) 10b5d6: b8 01 00 00 00 mov $0x1,%eax 10b5db: 85 db test %ebx,%ebx 10b5dd: 74 59 je 10b638 <_Objects_Id_to_name+0x6c><== NEVER TAKEN return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10b5df: 8b 4d 08 mov 0x8(%ebp),%ecx 10b5e2: 85 c9 test %ecx,%ecx 10b5e4: 75 08 jne 10b5ee <_Objects_Id_to_name+0x22> 10b5e6: a1 8c f5 11 00 mov 0x11f58c,%eax 10b5eb: 8b 48 08 mov 0x8(%eax),%ecx uint32_t page_size ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } 10b5ee: 89 ca mov %ecx,%edx 10b5f0: c1 ea 18 shr $0x18,%edx 10b5f3: 83 e2 07 and $0x7,%edx /** * This function sets @a *size to the size of the block of user memory * which begins at @a starting_address. The size returned in @a *size could * be greater than the size requested for allocation. * Returns TRUE if the @a starting_address is in the heap, and FALSE * otherwise. 10b5f6: 8d 42 ff lea -0x1(%edx),%eax 10b5f9: 83 f8 03 cmp $0x3,%eax 10b5fc: 77 35 ja 10b633 <_Objects_Id_to_name+0x67> 10b5fe: eb 3d jmp 10b63d <_Objects_Id_to_name+0x71> if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10b600: 89 c8 mov %ecx,%eax 10b602: c1 e8 1b shr $0x1b,%eax 10b605: 8b 14 82 mov (%edx,%eax,4),%edx if ( !information ) 10b608: 85 d2 test %edx,%edx 10b60a: 74 27 je 10b633 <_Objects_Id_to_name+0x67><== NEVER TAKEN return OBJECTS_INVALID_ID; if ( information->is_string ) 10b60c: 80 7a 38 00 cmpb $0x0,0x38(%edx) 10b610: 75 21 jne 10b633 <_Objects_Id_to_name+0x67><== NEVER TAKEN return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &ignored_location ); 10b612: 50 push %eax 10b613: 8d 45 f8 lea -0x8(%ebp),%eax 10b616: 50 push %eax 10b617: 51 push %ecx 10b618: 52 push %edx 10b619: e8 56 ff ff ff call 10b574 <_Objects_Get> if ( !the_object ) 10b61e: 83 c4 10 add $0x10,%esp 10b621: 85 c0 test %eax,%eax 10b623: 74 0e je 10b633 <_Objects_Id_to_name+0x67> return OBJECTS_INVALID_ID; *name = the_object->name; 10b625: 8b 40 0c mov 0xc(%eax),%eax 10b628: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10b62a: e8 85 07 00 00 call 10bdb4 <_Thread_Enable_dispatch> 10b62f: 31 c0 xor %eax,%eax 10b631: eb 05 jmp 10b638 <_Objects_Id_to_name+0x6c> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10b633: b8 03 00 00 00 mov $0x3,%eax } 10b638: 8b 5d fc mov -0x4(%ebp),%ebx 10b63b: c9 leave 10b63c: c3 ret the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 10b63d: 8b 14 95 a0 f4 11 00 mov 0x11f4a0(,%edx,4),%edx 10b644: 85 d2 test %edx,%edx 10b646: 75 b8 jne 10b600 <_Objects_Id_to_name+0x34><== ALWAYS TAKEN 10b648: eb e9 jmp 10b633 <_Objects_Id_to_name+0x67><== NOT EXECUTED =============================================================================== 0010a684 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10a684: 55 push %ebp 10a685: 89 e5 mov %esp,%ebp 10a687: 57 push %edi 10a688: 56 push %esi 10a689: 53 push %ebx 10a68a: 8b 7d 08 mov 0x8(%ebp),%edi 10a68d: 8b 55 0c mov 0xc(%ebp),%edx 10a690: 8b 5d 10 mov 0x10(%ebp),%ebx 10a693: 8b 75 20 mov 0x20(%ebp),%esi 10a696: 0f b7 4d 18 movzwl 0x18(%ebp),%ecx uint32_t name_length; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 10a69a: 89 17 mov %edx,(%edi) information->the_class = the_class; 10a69c: 66 89 5f 04 mov %bx,0x4(%edi) information->is_string = is_string; 10a6a0: 8b 45 1c mov 0x1c(%ebp),%eax 10a6a3: 88 47 38 mov %al,0x38(%edi) information->local_table = 0; information->inactive_per_block = 0; 10a6a6: c7 47 30 00 00 00 00 movl $0x0,0x30(%edi) information->object_blocks = 0; 10a6ad: c7 47 34 00 00 00 00 movl $0x0,0x34(%edi) information->inactive = 0; 10a6b4: 66 c7 47 2c 00 00 movw $0x0,0x2c(%edi) /* * Set the entry in the object information table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 10a6ba: 8b 04 95 b4 ca 11 00 mov 0x11cab4(,%edx,4),%eax 10a6c1: 89 3c 98 mov %edi,(%eax,%ebx,4) /* * Set the size of the object */ information->size = size; 10a6c4: 89 4f 18 mov %ecx,0x18(%edi) /* * Are we operating in unlimited, or auto-extend mode */ information->auto_extend = 10a6c7: 8b 45 14 mov 0x14(%ebp),%eax 10a6ca: c1 e8 1f shr $0x1f,%eax 10a6cd: 88 47 12 mov %al,0x12(%edi) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? TRUE : FALSE; maximum &= ~OBJECTS_UNLIMITED_OBJECTS; 10a6d0: 8b 4d 14 mov 0x14(%ebp),%ecx 10a6d3: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * The allocation unit is the maximum value */ information->allocation_size = maximum; 10a6d9: 89 4f 14 mov %ecx,0x14(%edi) /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 10a6dc: c7 47 1c 98 c8 11 00 movl $0x11c898,0x1c(%edi) */ if ( maximum == 0 ) minimum_index = 0; else minimum_index = 1; information->minimum_id = 10a6e3: c1 e2 18 shl $0x18,%edx 10a6e6: 81 ca 00 00 01 00 or $0x10000,%edx 10a6ec: c1 e3 1b shl $0x1b,%ebx 10a6ef: 09 da or %ebx,%edx 10a6f1: 31 c0 xor %eax,%eax 10a6f3: 85 c9 test %ecx,%ecx 10a6f5: 0f 95 c0 setne %al 10a6f8: 09 c2 or %eax,%edx 10a6fa: 89 57 08 mov %edx,0x8(%edi) * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10a6fd: 89 f0 mov %esi,%eax 10a6ff: f7 c6 03 00 00 00 test $0x3,%esi 10a705: 74 06 je 10a70d <_Objects_Initialize_information+0x89><== ALWAYS TAKEN name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 10a707: 8d 46 04 lea 0x4(%esi),%eax <== NOT EXECUTED 10a70a: 83 e0 fc and $0xfffffffc,%eax <== NOT EXECUTED ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10a70d: 66 89 47 3a mov %ax,0x3a(%edi) 10a711: 8d 47 24 lea 0x24(%edi),%eax 10a714: 89 47 20 mov %eax,0x20(%edi) 10a717: c7 47 24 00 00 00 00 movl $0x0,0x24(%edi) 10a71e: 8d 47 20 lea 0x20(%edi),%eax 10a721: 89 47 28 mov %eax,0x28(%edi) /* * Initialize objects .. if there are any */ if ( maximum ) { 10a724: 85 c9 test %ecx,%ecx 10a726: 74 12 je 10a73a <_Objects_Initialize_information+0xb6> /* * Reset the maximum value. It will be updated when the information is * extended. */ information->maximum = 0; 10a728: 66 c7 47 10 00 00 movw $0x0,0x10(%edi) * 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 ); 10a72e: 89 7d 08 mov %edi,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10a731: 5b pop %ebx 10a732: 5e pop %esi 10a733: 5f pop %edi 10a734: 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 ); 10a735: e9 46 fb ff ff jmp 10a280 <_Objects_Extend_information> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10a73a: 5b pop %ebx 10a73b: 5e pop %esi 10a73c: 5f pop %edi 10a73d: c9 leave 10a73e: c3 ret =============================================================================== 0010a774 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10a774: 55 push %ebp 10a775: 89 e5 mov %esp,%ebp 10a777: 57 push %edi 10a778: 56 push %esi 10a779: 53 push %ebx 10a77a: 8b 7d 08 mov 0x8(%ebp),%edi 10a77d: 8b 5d 0c mov 0xc(%ebp),%ebx 10a780: 8b 55 10 mov 0x10(%ebp),%edx 10a783: 8b 75 14 mov 0x14(%ebp),%esi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == FALSE */ if ( !id ) 10a786: b8 02 00 00 00 mov $0x2,%eax 10a78b: 85 f6 test %esi,%esi 10a78d: 74 49 je 10a7d8 <_Objects_Name_to_id_u32+0x64> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10a78f: 85 db test %ebx,%ebx 10a791: 74 40 je 10a7d3 <_Objects_Name_to_id_u32+0x5f> return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 10a793: 8b 47 10 mov 0x10(%edi),%eax 10a796: 66 85 c0 test %ax,%ax 10a799: 74 38 je 10a7d3 <_Objects_Name_to_id_u32+0x5f><== NEVER TAKEN 10a79b: 85 d2 test %edx,%edx 10a79d: 74 28 je 10a7c7 <_Objects_Name_to_id_u32+0x53> 10a79f: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10a7a5: 74 20 je 10a7c7 <_Objects_Name_to_id_u32+0x53> 10a7a7: 4a dec %edx 10a7a8: 75 29 jne 10a7d3 <_Objects_Name_to_id_u32+0x5f> 10a7aa: eb 1b jmp 10a7c7 <_Objects_Name_to_id_u32+0x53> if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; 10a7ac: 8b 47 1c mov 0x1c(%edi),%eax 10a7af: 8b 04 90 mov (%eax,%edx,4),%eax if ( !the_object ) 10a7b2: 85 c0 test %eax,%eax 10a7b4: 74 0e je 10a7c4 <_Objects_Name_to_id_u32+0x50> continue; if ( name == the_object->name.name_u32 ) { 10a7b6: 3b 58 0c cmp 0xc(%eax),%ebx 10a7b9: 75 09 jne 10a7c4 <_Objects_Name_to_id_u32+0x50> *id = the_object->id; 10a7bb: 8b 40 08 mov 0x8(%eax),%eax 10a7be: 89 06 mov %eax,(%esi) 10a7c0: 31 c0 xor %eax,%eax 10a7c2: eb 14 jmp 10a7d8 <_Objects_Name_to_id_u32+0x64> search_local_node = TRUE; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10a7c4: 42 inc %edx 10a7c5: eb 08 jmp 10a7cf <_Objects_Name_to_id_u32+0x5b> 10a7c7: ba 01 00 00 00 mov $0x1,%edx 10a7cc: 0f b7 c8 movzwl %ax,%ecx 10a7cf: 39 ca cmp %ecx,%edx 10a7d1: 76 d9 jbe 10a7ac <_Objects_Name_to_id_u32+0x38> 10a7d3: 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 } 10a7d8: 5b pop %ebx 10a7d9: 5e pop %esi 10a7da: 5f pop %edi 10a7db: c9 leave 10a7dc: c3 ret =============================================================================== 0010a740 <_Objects_Namespace_remove>: void _Objects_Namespace_remove( Objects_Information *information, Objects_Control *the_object ) { 10a740: 55 push %ebp 10a741: 89 e5 mov %esp,%ebp 10a743: 53 push %ebx 10a744: 83 ec 04 sub $0x4,%esp 10a747: 8b 5d 0c mov 0xc(%ebp),%ebx /* * If this is a string format name, then free the memory. */ if ( information->is_string && the_object->name.name_p ) 10a74a: 8b 45 08 mov 0x8(%ebp),%eax 10a74d: 80 78 38 00 cmpb $0x0,0x38(%eax) 10a751: 74 13 je 10a766 <_Objects_Namespace_remove+0x26><== ALWAYS TAKEN 10a753: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 10a756: 85 c0 test %eax,%eax <== NOT EXECUTED 10a758: 74 0c je 10a766 <_Objects_Namespace_remove+0x26><== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 10a75a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a75d: 50 push %eax <== NOT EXECUTED 10a75e: e8 11 16 00 00 call 10bd74 <_Workspace_Free> <== NOT EXECUTED 10a763: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* * Clear out either format. */ the_object->name.name_p = NULL; the_object->name.name_u32 = 0; 10a766: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) } 10a76d: 8b 5d fc mov -0x4(%ebp),%ebx 10a770: c9 leave 10a771: c3 ret =============================================================================== 0010bfb8 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10bfb8: 55 push %ebp 10bfb9: 89 e5 mov %esp,%ebp 10bfbb: 57 push %edi 10bfbc: 56 push %esi 10bfbd: 53 push %ebx 10bfbe: 83 ec 14 sub $0x14,%esp 10bfc1: 8b 5d 08 mov 0x8(%ebp),%ebx 10bfc4: 8b 7d 10 mov 0x10(%ebp),%edi size_t length; const char *s; s = name; length = strnlen( name, information->name_length ) + 1; 10bfc7: 0f b7 43 3a movzwl 0x3a(%ebx),%eax 10bfcb: 50 push %eax 10bfcc: 57 push %edi 10bfcd: e8 d2 56 00 00 call 1116a4 10bfd2: 89 45 f0 mov %eax,-0x10(%ebp) 10bfd5: 89 c6 mov %eax,%esi 10bfd7: 46 inc %esi if ( information->is_string ) { 10bfd8: 83 c4 10 add $0x10,%esp 10bfdb: 80 7b 38 00 cmpb $0x0,0x38(%ebx) 10bfdf: 74 56 je 10c037 <_Objects_Set_name+0x7f> char *d; d = _Workspace_Allocate( length ); 10bfe1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10bfe4: 56 push %esi <== NOT EXECUTED 10bfe5: e8 4f 16 00 00 call 10d639 <_Workspace_Allocate> <== NOT EXECUTED 10bfea: 89 c3 mov %eax,%ebx <== NOT EXECUTED if ( !d ) 10bfec: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10bfef: 31 c0 xor %eax,%eax <== NOT EXECUTED 10bff1: 85 db test %ebx,%ebx <== NOT EXECUTED 10bff3: 0f 84 81 00 00 00 je 10c07a <_Objects_Set_name+0xc2><== NOT EXECUTED return FALSE; if ( the_object->name.name_p ) { 10bff9: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10bffc: 8b 42 0c mov 0xc(%edx),%eax <== NOT EXECUTED 10bfff: 85 c0 test %eax,%eax <== NOT EXECUTED 10c001: 74 16 je 10c019 <_Objects_Set_name+0x61><== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 10c003: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10c006: 50 push %eax <== NOT EXECUTED 10c007: e8 18 16 00 00 call 10d624 <_Workspace_Free> <== NOT EXECUTED the_object->name.name_p = NULL; 10c00c: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10c00f: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) <== NOT EXECUTED 10c016: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } strncpy( d, name, length ); 10c019: 50 push %eax <== NOT EXECUTED 10c01a: 56 push %esi <== NOT EXECUTED 10c01b: 57 push %edi <== NOT EXECUTED 10c01c: 53 push %ebx <== NOT EXECUTED 10c01d: e8 fa 55 00 00 call 11161c <== NOT EXECUTED d[ length ] = '\0'; 10c022: 8b 55 f0 mov -0x10(%ebp),%edx <== NOT EXECUTED 10c025: c6 44 13 01 00 movb $0x0,0x1(%ebx,%edx,1) <== NOT EXECUTED the_object->name.name_p = d; 10c02a: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10c02d: 89 58 0c mov %ebx,0xc(%eax) <== NOT EXECUTED 10c030: b0 01 mov $0x1,%al <== NOT EXECUTED 10c032: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10c035: eb 43 jmp 10c07a <_Objects_Set_name+0xc2><== NOT EXECUTED } else { the_object->name.name_u32 = _Objects_Build_name( 10c037: b8 00 00 00 20 mov $0x20000000,%eax 10c03c: 85 f6 test %esi,%esi 10c03e: 74 4e je 10c08e <_Objects_Set_name+0xd6><== NEVER TAKEN 10c040: 0f be 07 movsbl (%edi),%eax 10c043: c1 e0 18 shl $0x18,%eax 10c046: 83 fe 01 cmp $0x1,%esi 10c049: 74 43 je 10c08e <_Objects_Set_name+0xd6> 10c04b: 0f be 5f 01 movsbl 0x1(%edi),%ebx 10c04f: c1 e3 10 shl $0x10,%ebx 10c052: 83 fe 02 cmp $0x2,%esi 10c055: 76 2b jbe 10c082 <_Objects_Set_name+0xca> 10c057: 0f be 57 02 movsbl 0x2(%edi),%edx 10c05b: c1 e2 08 shl $0x8,%edx 10c05e: b9 20 00 00 00 mov $0x20,%ecx 10c063: 83 fe 03 cmp $0x3,%esi 10c066: 76 04 jbe 10c06c <_Objects_Set_name+0xb4> 10c068: 0f be 4f 03 movsbl 0x3(%edi),%ecx 10c06c: 09 d8 or %ebx,%eax 10c06e: 09 d0 or %edx,%eax 10c070: 09 c8 or %ecx,%eax 10c072: 8b 55 0c mov 0xc(%ebp),%edx 10c075: 89 42 0c mov %eax,0xc(%edx) 10c078: b0 01 mov $0x1,%al ); } return TRUE; } 10c07a: 8d 65 f4 lea -0xc(%ebp),%esp 10c07d: 5b pop %ebx 10c07e: 5e pop %esi 10c07f: 5f pop %edi 10c080: c9 leave 10c081: c3 ret strncpy( d, name, length ); d[ length ] = '\0'; the_object->name.name_p = d; } else { the_object->name.name_u32 = _Objects_Build_name( 10c082: b9 20 00 00 00 mov $0x20,%ecx 10c087: ba 00 20 00 00 mov $0x2000,%edx 10c08c: eb de jmp 10c06c <_Objects_Set_name+0xb4> 10c08e: bb 00 00 20 00 mov $0x200000,%ebx 10c093: eb ed jmp 10c082 <_Objects_Set_name+0xca> =============================================================================== 0010a7e8 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10a7e8: 55 push %ebp 10a7e9: 89 e5 mov %esp,%ebp 10a7eb: 57 push %edi 10a7ec: 56 push %esi 10a7ed: 53 push %ebx 10a7ee: 83 ec 0c sub $0xc,%esp 10a7f1: 8b 75 08 mov 0x8(%ebp),%esi * alignments are possible. * Returns pointer to the start of the memory block if success, NULL if * failure. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes 10a7f4: 8b 46 08 mov 0x8(%esi),%eax 10a7f7: 0f b7 f8 movzwl %ax,%edi /* * Search the list to find block or chunnk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; 10a7fa: 8b 4e 14 mov 0x14(%esi),%ecx 10a7fd: 0f b7 46 10 movzwl 0x10(%esi),%eax 10a801: 29 f8 sub %edi,%eax 10a803: 31 d2 xor %edx,%edx 10a805: f7 f1 div %ecx 10a807: 89 c3 mov %eax,%ebx 10a809: 31 d2 xor %edx,%edx 10a80b: eb 7c jmp 10a889 <_Objects_Shrink_information+0xa1> for ( block = 0; block < block_count; block++ ) { 10a80d: 8d 04 95 00 00 00 00 lea 0x0(,%edx,4),%eax 10a814: 89 45 f0 mov %eax,-0x10(%ebp) if ( information->inactive_per_block[ block ] == information->allocation_size ) { 10a817: 8b 46 30 mov 0x30(%esi),%eax 10a81a: 39 0c 90 cmp %ecx,(%eax,%edx,4) 10a81d: 75 67 jne 10a886 <_Objects_Shrink_information+0x9e> /* * XXX - Not to sure how to use a chain where you need to iterate and * and remove elements. */ the_object = (Objects_Control *) information->Inactive.first; 10a81f: 8b 56 20 mov 0x20(%esi),%edx 10a822: 8b 42 08 mov 0x8(%edx),%eax 10a825: 0f b7 c8 movzwl %ax,%ecx */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 10a828: 39 f9 cmp %edi,%ecx 10a82a: 72 1b jb 10a847 <_Objects_Shrink_information+0x5f> 10a82c: 89 f8 mov %edi,%eax 10a82e: 03 46 14 add 0x14(%esi),%eax 10a831: 39 c1 cmp %eax,%ecx 10a833: 73 12 jae 10a847 <_Objects_Shrink_information+0x5f> * @param[in] start_address is the starting address of the user block * to free * @return TRUE if successfully freed, FALSE otherwise */ bool _Protected_heap_Free( Heap_Control *the_heap, 10a835: 8b 1a mov (%edx),%ebx if ( !_Chain_Is_last( &the_object->Node ) ) the_object = (Objects_Control *) the_object->Node.next; else the_object = NULL; _Chain_Extract( &extract_me->Node ); 10a837: 83 ec 0c sub $0xc,%esp 10a83a: 52 push %edx 10a83b: e8 30 2e 00 00 call 10d670 <_Chain_Extract> 10a840: 89 da mov %ebx,%edx 10a842: 83 c4 10 add $0x10,%esp 10a845: eb 02 jmp 10a849 <_Objects_Shrink_information+0x61> } else { the_object = (Objects_Control *) the_object->Node.next; 10a847: 8b 12 mov (%edx),%edx } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 10a849: 85 d2 test %edx,%edx 10a84b: 74 05 je 10a852 <_Objects_Shrink_information+0x6a><== NEVER TAKEN 10a84d: 83 3a 00 cmpl $0x0,(%edx) 10a850: 75 d0 jne 10a822 <_Objects_Shrink_information+0x3a> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10a852: 83 ec 0c sub $0xc,%esp 10a855: 8b 46 34 mov 0x34(%esi),%eax 10a858: 8b 55 f0 mov -0x10(%ebp),%edx 10a85b: ff 34 10 pushl (%eax,%edx,1) 10a85e: e8 11 15 00 00 call 10bd74 <_Workspace_Free> information->object_blocks[ block ] = NULL; 10a863: 8b 46 34 mov 0x34(%esi),%eax 10a866: 8b 55 f0 mov -0x10(%ebp),%edx 10a869: c7 04 10 00 00 00 00 movl $0x0,(%eax,%edx,1) information->inactive_per_block[ block ] = 0; 10a870: 8b 46 30 mov 0x30(%esi),%eax 10a873: c7 04 10 00 00 00 00 movl $0x0,(%eax,%edx,1) information->inactive -= information->allocation_size; 10a87a: 8b 46 14 mov 0x14(%esi),%eax 10a87d: 66 29 46 2c sub %ax,0x2c(%esi) 10a881: 83 c4 10 add $0x10,%esp 10a884: eb 07 jmp 10a88d <_Objects_Shrink_information+0xa5> return; } index_base += information->allocation_size; 10a886: 01 cf add %ecx,%edi */ index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10a888: 42 inc %edx 10a889: 39 da cmp %ebx,%edx 10a88b: 72 80 jb 10a80d <_Objects_Shrink_information+0x25> return; } index_base += information->allocation_size; } } 10a88d: 8d 65 f4 lea -0xc(%ebp),%esp 10a890: 5b pop %ebx 10a891: 5e pop %esi 10a892: 5f pop %edi 10a893: c9 leave 10a894: c3 ret =============================================================================== 0010c6e8 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 10c6e8: 55 push %ebp 10c6e9: 89 e5 mov %esp,%ebp 10c6eb: 56 push %esi 10c6ec: 53 push %ebx 10c6ed: 8b 75 08 mov 0x8(%ebp),%esi 10c6f0: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Get_information_status status; if ( !the_heap ) 10c6f3: 85 f6 test %esi,%esi 10c6f5: 74 33 je 10c72a <_Protected_heap_Get_information+0x42><== NEVER TAKEN return false; if ( !the_info ) 10c6f7: 85 db test %ebx,%ebx 10c6f9: 74 2f je 10c72a <_Protected_heap_Get_information+0x42><== NEVER TAKEN return false; _RTEMS_Lock_allocator(); 10c6fb: 83 ec 0c sub $0xc,%esp 10c6fe: ff 35 a4 1a 12 00 pushl 0x121aa4 10c704: e8 3f ea ff ff call 10b148 <_API_Mutex_Lock> status = _Heap_Get_information( the_heap, the_info ); 10c709: 5a pop %edx 10c70a: 59 pop %ecx 10c70b: 53 push %ebx 10c70c: 56 push %esi 10c70d: e8 3a 32 00 00 call 10f94c <_Heap_Get_information> 10c712: 89 c3 mov %eax,%ebx _RTEMS_Unlock_allocator(); 10c714: 58 pop %eax 10c715: ff 35 a4 1a 12 00 pushl 0x121aa4 10c71b: e8 70 ea ff ff call 10b190 <_API_Mutex_Unlock> if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 10c720: 83 c4 10 add $0x10,%esp 10c723: 85 db test %ebx,%ebx 10c725: 0f 94 c0 sete %al 10c728: eb 02 jmp 10c72c <_Protected_heap_Get_information+0x44> 10c72a: 31 c0 xor %eax,%eax return true; return false; } 10c72c: 8d 65 f8 lea -0x8(%ebp),%esp 10c72f: 5b pop %ebx 10c730: 5e pop %esi 10c731: c9 leave 10c732: c3 ret =============================================================================== 0010d51f <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 10d51f: 55 push %ebp 10d520: 89 e5 mov %esp,%ebp 10d522: 53 push %ebx 10d523: 83 ec 10 sub $0x10,%esp 10d526: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) 10d529: a1 78 cb 11 00 mov 0x11cb78,%eax 10d52e: 8b 40 40 mov 0x40(%eax),%eax 10d531: 80 78 04 01 cmpb $0x1,0x4(%eax) 10d535: 19 c0 sbb %eax,%eax 10d537: 83 e0 c0 and $0xffffffc0,%eax 10d53a: 83 c0 60 add $0x60,%eax to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 10d53d: 50 push %eax 10d53e: e8 46 e8 ff ff call 10bd89 <_Workspace_Allocate> 10d543: 89 c2 mov %eax,%edx if ( !api ) 10d545: 83 c4 10 add $0x10,%esp 10d548: 31 c0 xor %eax,%eax 10d54a: 85 d2 test %edx,%edx 10d54c: 74 5d je 10d5ab <_RTEMS_tasks_Create_extension+0x8c><== NEVER TAKEN return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 10d54e: 89 93 f4 00 00 00 mov %edx,0xf4(%ebx) api->pending_events = EVENT_SETS_NONE_PENDING; 10d554: c7 02 00 00 00 00 movl $0x0,(%edx) #endif /** * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of 10d55a: c6 42 08 01 movb $0x1,0x8(%edx) * @a page_size byte units. If @a page_size is 0 or is not multiple of 10d55e: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. 10d565: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) * 10d56c: c7 42 14 00 00 00 00 movl $0x0,0x14(%edx) * @param[in] the_heap is the heap to operate upon 10d573: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) * @param[in] starting_address is the starting address of the memory for 10d57a: c7 42 1c 00 00 00 00 movl $0x0,0x1c(%edx) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 10d581: c7 83 04 01 00 00 00 movl $0x0,0x104(%ebx) 10d588: 00 00 00 if ( rtems_configuration_get_notepads_enabled() ) { 10d58b: a1 78 cb 11 00 mov 0x11cb78,%eax 10d590: 8b 40 40 mov 0x40(%eax),%eax 10d593: 80 78 04 00 cmpb $0x0,0x4(%eax) 10d597: 74 10 je 10d5a9 <_RTEMS_tasks_Create_extension+0x8a> 10d599: 31 c0 xor %eax,%eax for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 10d59b: c7 44 82 20 00 00 00 movl $0x0,0x20(%edx,%eax,4) 10d5a2: 00 api->pending_events = EVENT_SETS_NONE_PENDING; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) 10d5a3: 40 inc %eax 10d5a4: 83 f8 10 cmp $0x10,%eax 10d5a7: 75 f2 jne 10d59b <_RTEMS_tasks_Create_extension+0x7c> 10d5a9: b0 01 mov $0x1,%al api->Notepads[i] = 0; } return true; } 10d5ab: 8b 5d fc mov -0x4(%ebp),%ebx 10d5ae: c9 leave 10d5af: c3 ret =============================================================================== 001094e4 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 1094e4: 55 push %ebp 1094e5: 89 e5 mov %esp,%ebp 1094e7: 57 push %edi 1094e8: 56 push %esi 1094e9: 53 push %ebx 1094ea: 83 ec 1c sub $0x1c,%esp rtems_status_code return_value; rtems_initialization_tasks_table *user_tasks; rtems_api_configuration_table *api_configuration; api_configuration = _Configuration_Table->RTEMS_api_configuration; 1094ed: a1 78 cb 11 00 mov 0x11cb78,%eax 1094f2: 8b 40 40 mov 0x40(%eax),%eax /* * NOTE: This is slightly different from the Ada implementation. */ user_tasks = api_configuration->User_initialization_tasks_table; 1094f5: 8b 50 2c mov 0x2c(%eax),%edx maximum = api_configuration->number_of_initialization_tasks; 1094f8: 8b 78 28 mov 0x28(%eax),%edi if ( !user_tasks || maximum == 0 ) 1094fb: 85 d2 test %edx,%edx 1094fd: 74 53 je 109552 <_RTEMS_tasks_Initialize_user_tasks_body+0x6e><== NEVER TAKEN 1094ff: 85 ff test %edi,%edi 109501: 74 4f je 109552 <_RTEMS_tasks_Initialize_user_tasks_body+0x6e><== NEVER TAKEN return; 109503: 89 d3 mov %edx,%ebx 109505: 31 f6 xor %esi,%esi 109507: eb 45 jmp 10954e <_RTEMS_tasks_Initialize_user_tasks_body+0x6a> for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 109509: 50 push %eax 10950a: 50 push %eax 10950b: 8d 45 f0 lea -0x10(%ebp),%eax 10950e: 50 push %eax 10950f: ff 73 0c pushl 0xc(%ebx) 109512: ff 73 14 pushl 0x14(%ebx) 109515: ff 73 04 pushl 0x4(%ebx) 109518: ff 73 08 pushl 0x8(%ebx) 10951b: ff 33 pushl (%ebx) 10951d: e8 ca fd ff ff call 1092ec user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 109522: 83 c4 20 add $0x20,%esp 109525: 85 c0 test %eax,%eax 109527: 75 19 jne 109542 <_RTEMS_tasks_Initialize_user_tasks_body+0x5e> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); return_value = rtems_task_start( 109529: 51 push %ecx 10952a: ff 73 18 pushl 0x18(%ebx) 10952d: ff 73 10 pushl 0x10(%ebx) 109530: ff 75 f0 pushl -0x10(%ebp) 109533: e8 24 00 00 00 call 10955c 109538: 83 c3 1c add $0x1c,%ebx id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 10953b: 83 c4 10 add $0x10,%esp 10953e: 85 c0 test %eax,%eax 109540: 74 0b je 10954d <_RTEMS_tasks_Initialize_user_tasks_body+0x69> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); 109542: 52 push %edx 109543: 50 push %eax 109544: 6a 01 push $0x1 109546: 6a 01 push $0x1 109548: e8 07 0c 00 00 call 10a154 <_Internal_error_Occurred> maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) return; for ( index=0 ; index < maximum ; index++ ) { 10954d: 46 inc %esi 10954e: 39 fe cmp %edi,%esi 109550: 72 b7 jb 109509 <_RTEMS_tasks_Initialize_user_tasks_body+0x25> ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); } } 109552: 8d 65 f4 lea -0xc(%ebp),%esp 109555: 5b pop %ebx 109556: 5e pop %esi 109557: 5f pop %edi 109558: c9 leave 109559: c3 ret =============================================================================== 0010d46c <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 10d46c: 55 push %ebp 10d46d: 89 e5 mov %esp,%ebp 10d46f: 57 push %edi 10d470: 56 push %esi 10d471: 53 push %ebx 10d472: 83 ec 1c sub $0x1c,%esp RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10d475: 8b 45 08 mov 0x8(%ebp),%eax 10d478: 8b b0 f4 00 00 00 mov 0xf4(%eax),%esi if ( !api ) 10d47e: 85 f6 test %esi,%esi 10d480: 74 45 je 10d4c7 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 10d482: 9c pushf 10d483: fa cli 10d484: 58 pop %eax signal_set = asr->signals_posted; 10d485: 8b 7e 14 mov 0x14(%esi),%edi asr->signals_posted = 0; 10d488: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) _ISR_Enable( level ); 10d48f: 50 push %eax 10d490: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 10d491: 85 ff test %edi,%edi 10d493: 74 32 je 10d4c7 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN return; asr->nest_level += 1; 10d495: ff 46 1c incl 0x1c(%esi) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10d498: 50 push %eax 10d499: 8d 5d f0 lea -0x10(%ebp),%ebx 10d49c: 53 push %ebx 10d49d: 68 ff ff 00 00 push $0xffff 10d4a2: ff 76 10 pushl 0x10(%esi) 10d4a5: e8 f6 0d 00 00 call 10e2a0 (*asr->handler)( signal_set ); 10d4aa: 89 3c 24 mov %edi,(%esp) 10d4ad: ff 56 0c call *0xc(%esi) asr->nest_level -= 1; 10d4b0: ff 4e 1c decl 0x1c(%esi) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10d4b3: 83 c4 0c add $0xc,%esp 10d4b6: 53 push %ebx 10d4b7: 68 ff ff 00 00 push $0xffff 10d4bc: ff 75 f0 pushl -0x10(%ebp) 10d4bf: e8 dc 0d 00 00 call 10e2a0 10d4c4: 83 c4 10 add $0x10,%esp } 10d4c7: 8d 65 f4 lea -0xc(%ebp),%esp 10d4ca: 5b pop %ebx 10d4cb: 5e pop %esi 10d4cc: 5f pop %edi 10d4cd: c9 leave 10d4ce: c3 ret =============================================================================== 0010a314 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 10a314: 55 push %ebp 10a315: 89 e5 mov %esp,%ebp 10a317: 53 push %ebx 10a318: 83 ec 18 sub $0x18,%esp 10a31b: 8d 45 f8 lea -0x8(%ebp),%eax 10a31e: 50 push %eax 10a31f: ff 75 08 pushl 0x8(%ebp) 10a322: 68 8c 04 12 00 push $0x12048c 10a327: e8 f8 19 00 00 call 10bd24 <_Objects_Get> 10a32c: 89 c3 mov %eax,%ebx /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 10a32e: 83 c4 10 add $0x10,%esp 10a331: 83 7d f8 00 cmpl $0x0,-0x8(%ebp) 10a335: 75 64 jne 10a39b <_Rate_monotonic_Timeout+0x87><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 10a337: 8b 50 50 mov 0x50(%eax),%edx if ( _States_Is_waiting_for_period( the_thread->current_state ) && 10a33a: f6 42 11 40 testb $0x40,0x11(%edx) 10a33e: 74 18 je 10a358 <_Rate_monotonic_Timeout+0x44> 10a340: 8b 42 20 mov 0x20(%edx),%eax 10a343: 3b 43 08 cmp 0x8(%ebx),%eax 10a346: 75 10 jne 10a358 <_Rate_monotonic_Timeout+0x44><== NEVER TAKEN void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ); /** 10a348: 50 push %eax 10a349: 50 push %eax 10a34a: 68 f8 ff 03 10 push $0x1003fff8 10a34f: 52 push %edx 10a350: e8 0f 1e 00 00 call 10c164 <_Thread_Clear_state> the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 10a355: 59 pop %ecx 10a356: eb 10 jmp 10a368 <_Rate_monotonic_Timeout+0x54> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 10a358: 83 7b 38 01 cmpl $0x1,0x38(%ebx) 10a35c: 75 2b jne 10a389 <_Rate_monotonic_Timeout+0x75><== ALWAYS TAKEN the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 10a35e: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 10a365: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a368: 53 push %ebx 10a369: e8 6a fa ff ff call 109dd8 <_Rate_monotonic_Initiate_statistics> * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( Heap_Control *the_heap, 10a36e: 8b 43 4c mov 0x4c(%ebx),%eax 10a371: 89 43 1c mov %eax,0x1c(%ebx) void *starting_address, size_t *size 10a374: 58 pop %eax 10a375: 5a pop %edx 10a376: 8d 43 10 lea 0x10(%ebx),%eax 10a379: 50 push %eax 10a37a: 68 64 06 12 00 push $0x120664 10a37f: e8 bc 30 00 00 call 10d440 <_Watchdog_Insert> 10a384: 83 c4 10 add $0x10,%esp 10a387: eb 07 jmp 10a390 <_Rate_monotonic_Timeout+0x7c> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 10a389: c7 43 38 04 00 00 00 movl $0x4,0x38(%ebx) 10a390: a1 84 05 12 00 mov 0x120584,%eax 10a395: 48 dec %eax 10a396: a3 84 05 12 00 mov %eax,0x120584 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10a39b: 8b 5d fc mov -0x4(%ebp),%ebx 10a39e: c9 leave 10a39f: c3 ret =============================================================================== 00109a64 <_TOD_Validate>: */ bool _TOD_Validate( rtems_time_of_day *the_tod ) { 109a64: 55 push %ebp 109a65: 89 e5 mov %esp,%ebp 109a67: 53 push %ebx 109a68: 83 ec 04 sub $0x4,%esp 109a6b: 8b 5d 08 mov 0x8(%ebp),%ebx uint32_t days_in_month; if ((!the_tod) || 109a6e: 85 db test %ebx,%ebx 109a70: 74 5d je 109acf <_TOD_Validate+0x6b> <== NEVER TAKEN 109a72: b8 40 42 0f 00 mov $0xf4240,%eax 109a77: 31 d2 xor %edx,%edx 109a79: f7 35 38 86 12 00 divl 0x128638 109a7f: 39 43 18 cmp %eax,0x18(%ebx) 109a82: 73 4b jae 109acf <_TOD_Validate+0x6b> 109a84: 83 7b 14 3b cmpl $0x3b,0x14(%ebx) 109a88: 77 45 ja 109acf <_TOD_Validate+0x6b> 109a8a: 83 7b 10 3b cmpl $0x3b,0x10(%ebx) 109a8e: 77 3f ja 109acf <_TOD_Validate+0x6b> 109a90: 83 7b 0c 17 cmpl $0x17,0xc(%ebx) 109a94: 77 39 ja 109acf <_TOD_Validate+0x6b> 109a96: 8b 43 04 mov 0x4(%ebx),%eax 109a99: 85 c0 test %eax,%eax 109a9b: 74 32 je 109acf <_TOD_Validate+0x6b> <== NEVER TAKEN 109a9d: 83 f8 0c cmp $0xc,%eax 109aa0: 77 2d ja 109acf <_TOD_Validate+0x6b> 109aa2: 8b 0b mov (%ebx),%ecx 109aa4: 81 f9 c3 07 00 00 cmp $0x7c3,%ecx 109aaa: 76 23 jbe 109acf <_TOD_Validate+0x6b> 109aac: 8b 53 08 mov 0x8(%ebx),%edx 109aaf: 85 d2 test %edx,%edx 109ab1: 74 1c je 109acf <_TOD_Validate+0x6b> <== NEVER TAKEN (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 109ab3: 80 e1 03 and $0x3,%cl 109ab6: 75 09 jne 109ac1 <_TOD_Validate+0x5d> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 109ab8: 8b 04 85 24 99 11 00 mov 0x119924(,%eax,4),%eax 109abf: eb 07 jmp 109ac8 <_TOD_Validate+0x64> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 109ac1: 8b 04 85 f0 98 11 00 mov 0x1198f0(,%eax,4),%eax 109ac8: 39 c2 cmp %eax,%edx 109aca: 0f 96 c0 setbe %al 109acd: eb 02 jmp 109ad1 <_TOD_Validate+0x6d> 109acf: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 109ad1: 5a pop %edx 109ad2: 5b pop %ebx 109ad3: c9 leave 109ad4: c3 ret =============================================================================== 0010a94c <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10a94c: 55 push %ebp 10a94d: 89 e5 mov %esp,%ebp 10a94f: 57 push %edi 10a950: 56 push %esi 10a951: 53 push %ebx 10a952: 83 ec 18 sub $0x18,%esp 10a955: 8b 5d 08 mov 0x8(%ebp),%ebx 10a958: 8b 75 0c mov 0xc(%ebp),%esi 10a95b: 8a 45 10 mov 0x10(%ebp),%al 10a95e: 88 45 f3 mov %al,-0xd(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10a961: 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 ); 10a964: 53 push %ebx 10a965: e8 3e 0d 00 00 call 10b6a8 <_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 ) 10a96a: 83 c4 10 add $0x10,%esp 10a96d: 39 73 14 cmp %esi,0x14(%ebx) 10a970: 74 0c je 10a97e <_Thread_Change_priority+0x32> _Thread_Set_priority( the_thread, new_priority ); 10a972: 50 push %eax 10a973: 50 push %eax 10a974: 56 push %esi 10a975: 53 push %ebx 10a976: e8 f9 0b 00 00 call 10b574 <_Thread_Set_priority> 10a97b: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10a97e: 9c pushf 10a97f: fa cli 10a980: 5e pop %esi /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 10a981: 8b 53 10 mov 0x10(%ebx),%edx if ( state != STATES_TRANSIENT ) { 10a984: 83 fa 04 cmp $0x4,%edx 10a987: 74 30 je 10a9b9 <_Thread_Change_priority+0x6d> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10a989: 83 e7 04 and $0x4,%edi 10a98c: 75 08 jne 10a996 <_Thread_Change_priority+0x4a><== NEVER TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10a98e: 89 d0 mov %edx,%eax 10a990: 83 e0 fb and $0xfffffffb,%eax 10a993: 89 43 10 mov %eax,0x10(%ebx) _ISR_Enable( level ); 10a996: 56 push %esi 10a997: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10a998: 81 e2 e0 be 03 00 and $0x3bee0,%edx 10a99e: 0f 84 c0 00 00 00 je 10aa64 <_Thread_Change_priority+0x118> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 10a9a4: 89 5d 0c mov %ebx,0xc(%ebp) 10a9a7: 8b 43 44 mov 0x44(%ebx),%eax 10a9aa: 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 ); } 10a9ad: 8d 65 f4 lea -0xc(%ebp),%esp 10a9b0: 5b pop %ebx 10a9b1: 5e pop %esi 10a9b2: 5f pop %edi 10a9b3: 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 ); 10a9b4: e9 33 0b 00 00 jmp 10b4ec <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10a9b9: 83 e7 04 and $0x4,%edi 10a9bc: 75 53 jne 10aa11 <_Thread_Change_priority+0xc5><== NEVER TAKEN * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10a9be: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) * otherwise. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the user block * to obtain the size of * @param[in] size points to a user area to return the size in 10a9c5: 8b 93 90 00 00 00 mov 0x90(%ebx),%edx 10a9cb: 66 8b 83 96 00 00 00 mov 0x96(%ebx),%ax 10a9d2: 66 09 02 or %ax,(%edx) * @return TRUE if successfully able to determine the size, FALSE otherwise 10a9d5: 66 a1 94 cb 11 00 mov 0x11cb94,%ax 10a9db: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10a9e1: 66 a3 94 cb 11 00 mov %ax,0x11cb94 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10a9e7: 80 7d f3 00 cmpb $0x0,-0xd(%ebp) 10a9eb: 8b 93 8c 00 00 00 mov 0x8c(%ebx),%edx 10a9f1: 74 0e je 10aa01 <_Thread_Change_priority+0xb5> 10a9f3: 89 53 04 mov %edx,0x4(%ebx) 10a9f6: 8b 02 mov (%edx),%eax 10a9f8: 89 1a mov %ebx,(%edx) 10a9fa: 89 03 mov %eax,(%ebx) 10a9fc: 89 58 04 mov %ebx,0x4(%eax) 10a9ff: eb 10 jmp 10aa11 <_Thread_Change_priority+0xc5> 10aa01: 8d 42 04 lea 0x4(%edx),%eax 10aa04: 89 03 mov %eax,(%ebx) 10aa06: 8b 42 08 mov 0x8(%edx),%eax 10aa09: 89 5a 08 mov %ebx,0x8(%edx) 10aa0c: 89 18 mov %ebx,(%eax) 10aa0e: 89 43 04 mov %eax,0x4(%ebx) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 10aa11: 56 push %esi 10aa12: 9d popf 10aa13: fa cli void *starting_address, size_t size ); /** * This routine returns the block of memory which begins 10aa14: 66 8b 0d 94 cb 11 00 mov 0x11cb94,%cx 10aa1b: 31 d2 xor %edx,%edx 10aa1d: 89 d0 mov %edx,%eax 10aa1f: 66 0f bc c1 bsf %cx,%ax * at @a starting_address to @a the_heap. Any coalescing which is 10aa23: 0f b7 c0 movzwl %ax,%eax 10aa26: 66 8b 8c 00 0c cc 11 mov 0x11cc0c(%eax,%eax,1),%cx 10aa2d: 00 10aa2e: 66 0f bc d1 bsf %cx,%dx /** * This function sets @a *size to the size of the block of user memory * which begins at @a starting_address. The size returned in @a *size could * be greater than the size requested for allocation. * Returns TRUE if the @a starting_address is in the heap, and FALSE * otherwise. 10aa32: c1 e0 04 shl $0x4,%eax 10aa35: 0f b7 d2 movzwl %dx,%edx 10aa38: 01 d0 add %edx,%eax 10aa3a: 6b c0 0c imul $0xc,%eax,%eax 10aa3d: 8b 15 a8 ca 11 00 mov 0x11caa8,%edx 10aa43: 8b 04 10 mov (%eax,%edx,1),%eax 10aa46: a3 6c cb 11 00 mov %eax,0x11cb6c void *starting_address, size_t size ); /** * This function attempts to allocate a block of @a size bytes from 10aa4b: 8b 15 a0 cb 11 00 mov 0x11cba0,%edx * 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() && 10aa51: 39 c2 cmp %eax,%edx 10aa53: 74 0d je 10aa62 <_Thread_Change_priority+0x116> 10aa55: 80 7a 76 00 cmpb $0x0,0x76(%edx) 10aa59: 74 07 je 10aa62 <_Thread_Change_priority+0x116><== NEVER TAKEN _Thread_Executing->is_preemptible ) _Context_Switch_necessary = TRUE; 10aa5b: c6 05 b0 cb 11 00 01 movb $0x1,0x11cbb0 _ISR_Enable( level ); 10aa62: 56 push %esi 10aa63: 9d popf } 10aa64: 8d 65 f4 lea -0xc(%ebp),%esp 10aa67: 5b pop %ebx 10aa68: 5e pop %esi 10aa69: 5f pop %edi 10aa6a: c9 leave 10aa6b: c3 ret =============================================================================== 0010aa6c <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10aa6c: 55 push %ebp 10aa6d: 89 e5 mov %esp,%ebp 10aa6f: 53 push %ebx 10aa70: 8b 4d 08 mov 0x8(%ebp),%ecx 10aa73: 8b 45 0c mov 0xc(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10aa76: 9c pushf 10aa77: fa cli 10aa78: 5b pop %ebx current_state = the_thread->current_state; 10aa79: 8b 51 10 mov 0x10(%ecx),%edx if ( current_state & state ) { 10aa7c: 85 d0 test %edx,%eax 10aa7e: 74 6f je 10aaef <_Thread_Clear_state+0x83> * @param[in] page_size is the size in bytes of the allocation unit * * @return This method returns the maximum memory available. If * unsuccessful, 0 will be returned. */ static inline uint32_t _Protected_heap_Initialize( 10aa80: f7 d0 not %eax 10aa82: 21 d0 and %edx,%eax current_state = 10aa84: 89 41 10 mov %eax,0x10(%ecx) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 10aa87: 85 c0 test %eax,%eax 10aa89: 75 64 jne 10aaef <_Thread_Clear_state+0x83> * otherwise. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the user block * to obtain the size of * @param[in] size points to a user area to return the size in 10aa8b: 8b 91 90 00 00 00 mov 0x90(%ecx),%edx 10aa91: 66 8b 81 96 00 00 00 mov 0x96(%ecx),%ax 10aa98: 66 09 02 or %ax,(%edx) * @return TRUE if successfully able to determine the size, FALSE otherwise 10aa9b: 66 a1 94 cb 11 00 mov 0x11cb94,%ax 10aaa1: 0b 81 94 00 00 00 or 0x94(%ecx),%eax 10aaa7: 66 a3 94 cb 11 00 mov %ax,0x11cb94 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10aaad: 8b 81 8c 00 00 00 mov 0x8c(%ecx),%eax 10aab3: 8d 50 04 lea 0x4(%eax),%edx 10aab6: 89 11 mov %edx,(%ecx) 10aab8: 8b 50 08 mov 0x8(%eax),%edx 10aabb: 89 48 08 mov %ecx,0x8(%eax) 10aabe: 89 0a mov %ecx,(%edx) 10aac0: 89 51 04 mov %edx,0x4(%ecx) _ISR_Flash( level ); 10aac3: 53 push %ebx 10aac4: 9d popf 10aac5: 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 ) { 10aac6: 8b 51 14 mov 0x14(%ecx),%edx 10aac9: a1 6c cb 11 00 mov 0x11cb6c,%eax 10aace: 3b 50 14 cmp 0x14(%eax),%edx 10aad1: 73 1c jae 10aaef <_Thread_Clear_state+0x83> _Thread_Heir = the_thread; 10aad3: 89 0d 6c cb 11 00 mov %ecx,0x11cb6c if ( _Thread_Executing->is_preemptible || 10aad9: a1 a0 cb 11 00 mov 0x11cba0,%eax 10aade: 80 78 76 00 cmpb $0x0,0x76(%eax) 10aae2: 75 04 jne 10aae8 <_Thread_Clear_state+0x7c> 10aae4: 85 d2 test %edx,%edx 10aae6: 75 07 jne 10aaef <_Thread_Clear_state+0x83><== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 10aae8: c6 05 b0 cb 11 00 01 movb $0x1,0x11cbb0 } } } _ISR_Enable( level ); 10aaef: 53 push %ebx 10aaf0: 9d popf } 10aaf1: 5b pop %ebx 10aaf2: c9 leave 10aaf3: c3 ret =============================================================================== 0010abd4 <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 10abd4: 55 push %ebp 10abd5: 89 e5 mov %esp,%ebp 10abd7: 83 ec 14 sub $0x14,%esp 10abda: 68 3c cc 11 00 push $0x11cc3c 10abdf: e8 04 f6 ff ff call 10a1e8 <_Objects_Allocate> /* * The entire workspace is zeroed during its initialization. Thus, all * fields not explicitly assigned were explicitly zeroed by * _Workspace_Initialization. */ _Thread_Idle = _Thread_Internal_allocate(); 10abe4: a3 88 cc 11 00 mov %eax,0x11cc88 /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10abe9: a1 e0 ca 11 00 mov 0x11cae0,%eax 10abee: 40 inc %eax 10abef: a3 e0 ca 11 00 mov %eax,0x11cae0 * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 10abf4: a1 78 cb 11 00 mov 0x11cb78,%eax 10abf9: 8b 50 18 mov 0x18(%eax),%edx 10abfc: 83 c4 0c add $0xc,%esp 10abff: 68 cc 68 11 00 push $0x1168cc 10ac04: 6a 00 push $0x0 10ac06: 6a 00 push $0x0 10ac08: 6a 00 push $0x0 10ac0a: 6a 01 push $0x1 10ac0c: 0f b6 05 64 87 11 00 movzbl 0x118764,%eax 10ac13: 50 push %eax 10ac14: 6a 00 push $0x0 10ac16: a1 60 87 11 00 mov 0x118760,%eax 10ac1b: 39 d0 cmp %edx,%eax 10ac1d: 73 02 jae 10ac21 <_Thread_Create_idle+0x4d><== ALWAYS TAKEN 10ac1f: 89 d0 mov %edx,%eax <== NOT EXECUTED 10ac21: 50 push %eax 10ac22: 6a 00 push $0x0 10ac24: ff 35 88 cc 11 00 pushl 0x11cc88 10ac2a: 68 3c cc 11 00 push $0x11cc3c 10ac2f: e8 50 02 00 00 call 10ae84 <_Thread_Initialize> 10ac34: a1 e0 ca 11 00 mov 0x11cae0,%eax 10ac39: 48 dec %eax 10ac3a: a3 e0 ca 11 00 mov %eax,0x11cae0 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 10ac3f: 8b 15 88 cc 11 00 mov 0x11cc88,%edx 10ac45: 89 15 a0 cb 11 00 mov %edx,0x11cba0 10ac4b: 89 15 6c cb 11 00 mov %edx,0x11cb6c _Thread_Executing = _Thread_Idle; _Thread_Start( 10ac51: 83 c4 24 add $0x24,%esp 10ac54: 6a 00 push $0x0 10ac56: 6a 00 push $0x0 10ac58: a1 78 cb 11 00 mov 0x11cb78,%eax 10ac5d: ff 70 14 pushl 0x14(%eax) 10ac60: 6a 00 push $0x0 10ac62: 52 push %edx 10ac63: e8 8c 0b 00 00 call 10b7f4 <_Thread_Start> 10ac68: 83 c4 20 add $0x20,%esp _Configuration_Table->idle_task, NULL, 0 ); } 10ac6b: c9 leave 10ac6c: c3 ret =============================================================================== 0010ac70 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored ) { 10ac70: 55 push %ebp 10ac71: 89 e5 mov %esp,%ebp 10ac73: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10ac76: 8d 45 fc lea -0x4(%ebp),%eax 10ac79: 50 push %eax 10ac7a: ff 75 08 pushl 0x8(%ebp) 10ac7d: e8 8a 01 00 00 call 10ae0c <_Thread_Get> switch ( location ) { 10ac82: 83 c4 10 add $0x10,%esp 10ac85: 83 7d fc 00 cmpl $0x0,-0x4(%ebp) 10ac89: 75 1b jne 10aca6 <_Thread_Delay_ended+0x36><== NEVER TAKEN void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ); /** 10ac8b: 52 push %edx 10ac8c: 52 push %edx 10ac8d: 68 f8 ff 03 10 push $0x1003fff8 10ac92: 50 push %eax 10ac93: e8 d4 fd ff ff call 10aa6c <_Thread_Clear_state> 10ac98: a1 e0 ca 11 00 mov 0x11cae0,%eax 10ac9d: 48 dec %eax 10ac9e: a3 e0 ca 11 00 mov %eax,0x11cae0 10aca3: 83 c4 10 add $0x10,%esp case OBJECTS_LOCAL: _Thread_Unblock( the_thread ); _Thread_Unnest_dispatch(); break; } } 10aca6: c9 leave 10aca7: c3 ret =============================================================================== 0010aca8 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10aca8: 55 push %ebp 10aca9: 89 e5 mov %esp,%ebp 10acab: 57 push %edi 10acac: 56 push %esi 10acad: 53 push %ebx 10acae: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10acb1: 8b 1d a0 cb 11 00 mov 0x11cba0,%ebx _ISR_Disable( level ); 10acb7: 9c pushf 10acb8: fa cli 10acb9: 5a pop %edx #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS { struct timespec uptime, ran; _TOD_Get_uptime( &uptime ); _Timespec_Subtract(&_Thread_Time_of_last_context_switch, &uptime, &ran); 10acba: 8d 7d e4 lea -0x1c(%ebp),%edi 10acbd: e9 f1 00 00 00 jmp 10adb3 <_Thread_Dispatch+0x10b> ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == TRUE ) { heir = _Thread_Heir; 10acc2: 8b 35 6c cb 11 00 mov 0x11cb6c,%esi _Thread_Dispatch_disable_level = 1; 10acc8: c7 05 e0 ca 11 00 01 movl $0x1,0x11cae0 10accf: 00 00 00 _Context_Switch_necessary = FALSE; 10acd2: c6 05 b0 cb 11 00 00 movb $0x0,0x11cbb0 _Thread_Executing = heir; 10acd9: 89 35 a0 cb 11 00 mov %esi,0x11cba0 #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 ) 10acdf: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10ace3: 75 08 jne 10aced <_Thread_Dispatch+0x45> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10ace5: a1 ac ca 11 00 mov 0x11caac,%eax 10acea: 89 46 78 mov %eax,0x78(%esi) _ISR_Enable( level ); 10aced: 52 push %edx 10acee: 9d popf #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS { struct timespec uptime, ran; _TOD_Get_uptime( &uptime ); 10acef: 83 ec 0c sub $0xc,%esp 10acf2: 8d 45 ec lea -0x14(%ebp),%eax 10acf5: 50 push %eax 10acf6: e8 6d 2b 00 00 call 10d868 <_TOD_Get_uptime> _Timespec_Subtract(&_Thread_Time_of_last_context_switch, &uptime, &ran); 10acfb: 83 c4 0c add $0xc,%esp 10acfe: 57 push %edi 10acff: 8d 45 ec lea -0x14(%ebp),%eax 10ad02: 50 push %eax 10ad03: 68 a8 cb 11 00 push $0x11cba8 10ad08: e8 37 0c 00 00 call 10b944 <_Timespec_Subtract> _Timespec_Add_to( &executing->cpu_time_used, &ran ); 10ad0d: 58 pop %eax 10ad0e: 5a pop %edx 10ad0f: 57 push %edi 10ad10: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10ad16: 50 push %eax 10ad17: e8 f8 0b 00 00 call 10b914 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10ad1c: 8b 45 ec mov -0x14(%ebp),%eax 10ad1f: 8b 55 f0 mov -0x10(%ebp),%edx 10ad22: a3 a8 cb 11 00 mov %eax,0x11cba8 10ad27: 89 15 ac cb 11 00 mov %edx,0x11cbac #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10ad2d: 8b 15 68 cb 11 00 mov 0x11cb68,%edx 10ad33: 83 c4 10 add $0x10,%esp 10ad36: 85 d2 test %edx,%edx 10ad38: 74 10 je 10ad4a <_Thread_Dispatch+0xa2> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10ad3a: 8b 02 mov (%edx),%eax 10ad3c: 89 83 f0 00 00 00 mov %eax,0xf0(%ebx) *_Thread_libc_reent = heir->libc_reent; 10ad42: 8b 86 f0 00 00 00 mov 0xf0(%esi),%eax 10ad48: 89 02 mov %eax,(%edx) } _User_extensions_Thread_switch( executing, heir ); 10ad4a: 51 push %ecx 10ad4b: 51 push %ecx 10ad4c: 56 push %esi 10ad4d: 53 push %ebx 10ad4e: e8 01 0e 00 00 call 10bb54 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10ad53: 58 pop %eax 10ad54: 5a pop %edx 10ad55: 8d 86 d4 00 00 00 lea 0xd4(%esi),%eax 10ad5b: 50 push %eax 10ad5c: 8d 83 d4 00 00 00 lea 0xd4(%ebx),%eax 10ad62: 50 push %eax 10ad63: e8 b8 10 00 00 call 10be20 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10ad68: 83 c4 10 add $0x10,%esp 10ad6b: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx) 10ad72: 74 36 je 10adaa <_Thread_Dispatch+0x102> Heap_Control *the_heap, void *starting_address, size_t *size ); /** 10ad74: a1 64 cb 11 00 mov 0x11cb64,%eax 10ad79: 39 c3 cmp %eax,%ebx 10ad7b: 74 2d je 10adaa <_Thread_Dispatch+0x102> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10ad7d: 85 c0 test %eax,%eax 10ad7f: 74 11 je 10ad92 <_Thread_Dispatch+0xea> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10ad81: 83 ec 0c sub $0xc,%esp 10ad84: 05 ec 00 00 00 add $0xec,%eax 10ad89: 50 push %eax 10ad8a: e8 c5 10 00 00 call 10be54 <_CPU_Context_save_fp> 10ad8f: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10ad92: 83 ec 0c sub $0xc,%esp 10ad95: 8d 83 ec 00 00 00 lea 0xec(%ebx),%eax 10ad9b: 50 push %eax 10ad9c: e8 bd 10 00 00 call 10be5e <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10ada1: 89 1d 64 cb 11 00 mov %ebx,0x11cb64 10ada7: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10adaa: 8b 1d a0 cb 11 00 mov 0x11cba0,%ebx _ISR_Disable( level ); 10adb0: 9c pushf 10adb1: fa cli 10adb2: 5a pop %edx Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == TRUE ) { 10adb3: a0 b0 cb 11 00 mov 0x11cbb0,%al 10adb8: 84 c0 test %al,%al 10adba: 0f 85 02 ff ff ff jne 10acc2 <_Thread_Dispatch+0x1a> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 10adc0: c7 05 e0 ca 11 00 00 movl $0x0,0x11cae0 10adc7: 00 00 00 _ISR_Enable( level ); 10adca: 52 push %edx 10adcb: 9d popf if ( _Thread_Do_post_task_switch_extension || 10adcc: 83 3d 84 cb 11 00 00 cmpl $0x0,0x11cb84 10add3: 75 06 jne 10addb <_Thread_Dispatch+0x133><== NEVER TAKEN 10add5: 80 7b 75 00 cmpb $0x0,0x75(%ebx) 10add9: 74 09 je 10ade4 <_Thread_Dispatch+0x13c> executing->do_post_task_switch_extension ) { executing->do_post_task_switch_extension = false; 10addb: c6 43 75 00 movb $0x0,0x75(%ebx) _API_extensions_Run_postswitch(); 10addf: e8 4b eb ff ff call 10992f <_API_extensions_Run_postswitch> } } 10ade4: 8d 65 f4 lea -0xc(%ebp),%esp 10ade7: 5b pop %ebx 10ade8: 5e pop %esi 10ade9: 5f pop %edi 10adea: c9 leave 10adeb: c3 ret =============================================================================== 0010e508 <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 10e508: 55 push %ebp 10e509: 89 e5 mov %esp,%ebp Thread_Control *executing; executing = _Thread_Executing; 10e50b: a1 a0 cb 11 00 mov 0x11cba0,%eax if ( !_States_Is_ready( executing->current_state ) || 10e510: 83 78 10 00 cmpl $0x0,0x10(%eax) 10e514: 75 0e jne 10e524 <_Thread_Evaluate_mode+0x1c><== NEVER TAKEN 10e516: 3b 05 6c cb 11 00 cmp 0x11cb6c,%eax 10e51c: 74 11 je 10e52f <_Thread_Evaluate_mode+0x27> 10e51e: 80 78 76 00 cmpb $0x0,0x76(%eax) 10e522: 74 0b je 10e52f <_Thread_Evaluate_mode+0x27><== NEVER TAKEN ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { _Context_Switch_necessary = TRUE; 10e524: c6 05 b0 cb 11 00 01 movb $0x1,0x11cbb0 10e52b: b0 01 mov $0x1,%al 10e52d: eb 02 jmp 10e531 <_Thread_Evaluate_mode+0x29> return TRUE; 10e52f: 31 c0 xor %eax,%eax } return FALSE; } 10e531: c9 leave 10e532: c3 ret =============================================================================== 0010ae0c <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10ae0c: 55 push %ebp 10ae0d: 89 e5 mov %esp,%ebp 10ae0f: 53 push %ebx 10ae10: 83 ec 04 sub $0x4,%esp 10ae13: 8b 5d 08 mov 0x8(%ebp),%ebx 10ae16: 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 ) ) { 10ae19: 85 db test %ebx,%ebx 10ae1b: 75 18 jne 10ae35 <_Thread_Get+0x29> /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10ae1d: a1 e0 ca 11 00 mov 0x11cae0,%eax 10ae22: 40 inc %eax 10ae23: a3 e0 ca 11 00 mov %eax,0x11cae0 _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 10ae28: c7 01 00 00 00 00 movl $0x0,(%ecx) tp = _Thread_Executing; 10ae2e: a1 a0 cb 11 00 mov 0x11cba0,%eax 10ae33: eb 40 jmp 10ae75 <_Thread_Get+0x69> uint32_t page_size ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } 10ae35: 89 da mov %ebx,%edx 10ae37: c1 ea 18 shr $0x18,%edx 10ae3a: 83 e2 07 and $0x7,%edx /** * This function sets @a *size to the size of the block of user memory * which begins at @a starting_address. The size returned in @a *size could * be greater than the size requested for allocation. * Returns TRUE if the @a starting_address is in the heap, and FALSE * otherwise. 10ae3d: 8d 42 ff lea -0x1(%edx),%eax 10ae40: 83 f8 03 cmp $0x3,%eax 10ae43: 76 35 jbe 10ae7a <_Thread_Get+0x6e> goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ *location = OBJECTS_ERROR; 10ae45: c7 01 01 00 00 00 movl $0x1,(%ecx) 10ae4b: 31 c0 xor %eax,%eax 10ae4d: eb 26 jmp 10ae75 <_Thread_Get+0x69> goto done; } api_information = _Objects_Information_table[ the_api ]; 10ae4f: 8b 04 95 b4 ca 11 00 mov 0x11cab4(,%edx,4),%eax if ( !api_information ) { 10ae56: 85 c0 test %eax,%eax 10ae58: 74 07 je 10ae61 <_Thread_Get+0x55> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 10ae5a: 8b 40 04 mov 0x4(%eax),%eax if ( !information ) { 10ae5d: 85 c0 test %eax,%eax 10ae5f: 75 08 jne 10ae69 <_Thread_Get+0x5d> <== ALWAYS TAKEN *location = OBJECTS_ERROR; 10ae61: c7 01 01 00 00 00 movl $0x1,(%ecx) 10ae67: eb 0c jmp 10ae75 <_Thread_Get+0x69> goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10ae69: 52 push %edx 10ae6a: 51 push %ecx 10ae6b: 53 push %ebx 10ae6c: 50 push %eax 10ae6d: e8 ba f7 ff ff call 10a62c <_Objects_Get> 10ae72: 83 c4 10 add $0x10,%esp done: return tp; } 10ae75: 8b 5d fc mov -0x4(%ebp),%ebx 10ae78: c9 leave 10ae79: c3 ret *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 10ae7a: 89 d8 mov %ebx,%eax 10ae7c: c1 e8 1b shr $0x1b,%eax 10ae7f: 48 dec %eax 10ae80: 74 cd je 10ae4f <_Thread_Get+0x43> 10ae82: eb c1 jmp 10ae45 <_Thread_Get+0x39> =============================================================================== 0010e534 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 10e534: 55 push %ebp 10e535: 89 e5 mov %esp,%ebp 10e537: 53 push %ebx 10e538: 83 ec 04 sub $0x4,%esp #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 10e53b: 8b 1d a0 cb 11 00 mov 0x11cba0,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 10e541: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 10e547: 85 c0 test %eax,%eax 10e549: 74 03 je 10e54e <_Thread_Handler+0x1a> 10e54b: fa cli 10e54c: eb 01 jmp 10e54f <_Thread_Handler+0x1b> 10e54e: fb sti #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 10e54f: a0 d8 c8 11 00 mov 0x11c8d8,%al 10e554: 88 45 fb mov %al,-0x5(%ebp) doneConstructors = 1; 10e557: c6 05 d8 c8 11 00 01 movb $0x1,0x11c8d8 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && !_Thread_Is_allocated_fp( executing ) ) { 10e55e: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx) 10e565: 74 24 je 10e58b <_Thread_Handler+0x57> Heap_Control *the_heap, void *starting_address, size_t *size ); /** 10e567: a1 64 cb 11 00 mov 0x11cb64,%eax 10e56c: 39 c3 cmp %eax,%ebx 10e56e: 74 1b je 10e58b <_Thread_Handler+0x57> if ( _Thread_Allocated_fp != NULL ) 10e570: 85 c0 test %eax,%eax 10e572: 74 11 je 10e585 <_Thread_Handler+0x51> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10e574: 83 ec 0c sub $0xc,%esp 10e577: 05 ec 00 00 00 add $0xec,%eax 10e57c: 50 push %eax 10e57d: e8 d2 d8 ff ff call 10be54 <_CPU_Context_save_fp> 10e582: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 10e585: 89 1d 64 cb 11 00 mov %ebx,0x11cb64 * 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 ); 10e58b: 83 ec 0c sub $0xc,%esp 10e58e: 53 push %ebx 10e58f: e8 74 d4 ff ff call 10ba08 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 10e594: e8 53 c8 ff ff call 10adec <_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) */ 10e599: 83 c4 10 add $0x10,%esp 10e59c: 80 7d fb 00 cmpb $0x0,-0x5(%ebp) 10e5a0: 75 05 jne 10e5a7 <_Thread_Handler+0x73> { _init (); 10e5a2: e8 69 6e 00 00 call 115410 <__start_set_sysctl_set> #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 10e5a7: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 10e5ad: 83 f8 01 cmp $0x1,%eax 10e5b0: 74 13 je 10e5c5 <_Thread_Handler+0x91> <== NEVER TAKEN 10e5b2: 72 0c jb 10e5c0 <_Thread_Handler+0x8c> <== ALWAYS TAKEN 10e5b4: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 10e5b7: 74 11 je 10e5ca <_Thread_Handler+0x96> <== NOT EXECUTED 10e5b9: 83 f8 03 cmp $0x3,%eax <== NOT EXECUTED 10e5bc: 75 36 jne 10e5f4 <_Thread_Handler+0xc0> <== NOT EXECUTED 10e5be: eb 1a jmp 10e5da <_Thread_Handler+0xa6> <== NOT EXECUTED case THREAD_START_NUMERIC: executing->Wait.return_argument = 10e5c0: 83 ec 0c sub $0xc,%esp 10e5c3: eb 1d jmp 10e5e2 <_Thread_Handler+0xae> (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); break; case THREAD_START_POINTER: executing->Wait.return_argument = 10e5c5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e5c8: eb 08 jmp 10e5d2 <_Thread_Handler+0x9e> <== NOT EXECUTED (*(Thread_Entry_pointer) executing->Start.entry_point)( executing->Start.pointer_argument ); break; case THREAD_START_BOTH_POINTER_FIRST: executing->Wait.return_argument = 10e5ca: 52 push %edx <== NOT EXECUTED 10e5cb: 52 push %edx <== NOT EXECUTED 10e5cc: ff b3 a8 00 00 00 pushl 0xa8(%ebx) <== NOT EXECUTED 10e5d2: ff b3 a4 00 00 00 pushl 0xa4(%ebx) <== NOT EXECUTED 10e5d8: eb 0e jmp 10e5e8 <_Thread_Handler+0xb4> <== NOT EXECUTED executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 10e5da: 50 push %eax <== NOT EXECUTED 10e5db: 50 push %eax <== NOT EXECUTED 10e5dc: ff b3 a4 00 00 00 pushl 0xa4(%ebx) <== NOT EXECUTED 10e5e2: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 10e5e8: ff 93 9c 00 00 00 call *0x9c(%ebx) 10e5ee: 89 43 28 mov %eax,0x28(%ebx) 10e5f1: 83 c4 10 add $0x10,%esp * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 10e5f4: 83 ec 0c sub $0xc,%esp 10e5f7: 53 push %ebx 10e5f8: e8 3c d4 ff ff call 10ba39 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 10e5fd: 83 c4 0c add $0xc,%esp 10e600: 6a 06 push $0x6 10e602: 6a 01 push $0x1 10e604: 6a 00 push $0x0 10e606: e8 49 bb ff ff call 10a154 <_Internal_error_Occurred> =============================================================================== 0010ae84 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10ae84: 55 push %ebp 10ae85: 89 e5 mov %esp,%ebp 10ae87: 57 push %edi 10ae88: 56 push %esi 10ae89: 53 push %ebx 10ae8a: 83 ec 0c sub $0xc,%esp 10ae8d: 8b 5d 0c mov 0xc(%ebp),%ebx 10ae90: 8b 55 10 mov 0x10(%ebp),%edx 10ae93: 8b 75 14 mov 0x14(%ebp),%esi 10ae96: 8a 45 18 mov 0x18(%ebp),%al 10ae99: 88 45 f3 mov %al,-0xd(%ebp) 10ae9c: 8a 45 20 mov 0x20(%ebp),%al 10ae9f: 88 45 f2 mov %al,-0xe(%ebp) /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 10aea2: 85 d2 test %edx,%edx 10aea4: 75 2a jne 10aed0 <_Thread_Initialize+0x4c><== NEVER TAKEN actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 10aea6: 51 push %ecx 10aea7: 51 push %ecx 10aea8: 56 push %esi 10aea9: 53 push %ebx 10aeaa: e8 69 08 00 00 call 10b718 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10aeaf: 83 c4 10 add $0x10,%esp 10aeb2: 85 c0 test %eax,%eax 10aeb4: 74 04 je 10aeba <_Thread_Initialize+0x36> 10aeb6: 39 f0 cmp %esi,%eax 10aeb8: 73 07 jae 10aec1 <_Thread_Initialize+0x3d><== ALWAYS TAKEN 10aeba: 31 d2 xor %edx,%edx 10aebc: e9 8c 01 00 00 jmp 10b04d <_Thread_Initialize+0x1c9> return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; 10aec1: 8b 93 d0 00 00 00 mov 0xd0(%ebx),%edx the_thread->Start.core_allocated_stack = TRUE; 10aec7: c6 83 c0 00 00 00 01 movb $0x1,0xc0(%ebx) 10aece: eb 09 jmp 10aed9 <_Thread_Initialize+0x55> } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = FALSE; 10aed0: c6 83 c0 00 00 00 00 movb $0x0,0xc0(%ebx) <== NOT EXECUTED 10aed7: 89 f0 mov %esi,%eax <== NOT EXECUTED /** * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of 10aed9: 89 93 c8 00 00 00 mov %edx,0xc8(%ebx) * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. 10aedf: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) { _Thread_Stack_Free( the_thread ); return FALSE; 10aee5: 31 f6 xor %esi,%esi /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 10aee7: 80 7d f3 00 cmpb $0x0,-0xd(%ebp) 10aeeb: 74 17 je 10af04 <_Thread_Initialize+0x80> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10aeed: 83 ec 0c sub $0xc,%esp 10aef0: 6a 6c push $0x6c 10aef2: e8 92 0e 00 00 call 10bd89 <_Workspace_Allocate> 10aef7: 89 c6 mov %eax,%esi if ( !fp_area ) { 10aef9: 83 c4 10 add $0x10,%esp 10aefc: 85 c0 test %eax,%eax 10aefe: 0f 84 3b 01 00 00 je 10b03f <_Thread_Initialize+0x1bb><== NEVER TAKEN fp_area = _Context_Fp_start( fp_area, 0 ); } else fp_area = NULL; the_thread->fp_context = fp_area; 10af04: 89 b3 ec 00 00 00 mov %esi,0xec(%ebx) the_thread->Start.fp_context = fp_area; 10af0a: 89 b3 cc 00 00 00 mov %esi,0xcc(%ebx) * 10af10: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) * @param[in] the_heap is the heap to operate upon 10af17: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) * @param[in] starting_address is the starting address of the memory for 10af1e: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) * the heap 10af25: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) /* * Clear the libc reent hook. */ the_thread->libc_reent = NULL; 10af2c: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10af33: 00 00 00 /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10af36: a1 80 cb 11 00 mov 0x11cb80,%eax (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return FALSE; 10af3b: 31 ff xor %edi,%edi /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10af3d: 85 c0 test %eax,%eax 10af3f: 74 1d je 10af5e <_Thread_Initialize+0xda> extensions_area = _Workspace_Allocate( 10af41: 83 ec 0c sub $0xc,%esp 10af44: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10af4b: 50 push %eax 10af4c: e8 38 0e 00 00 call 10bd89 <_Workspace_Allocate> 10af51: 89 c7 mov %eax,%edi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 10af53: 83 c4 10 add $0x10,%esp 10af56: 85 c0 test %eax,%eax 10af58: 0f 84 d1 00 00 00 je 10b02f <_Thread_Initialize+0x1ab><== NEVER TAKEN return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 10af5e: 89 bb 00 01 00 00 mov %edi,0x100(%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 ) { 10af64: 31 d2 xor %edx,%edx 10af66: 85 ff test %edi,%edi 10af68: 75 10 jne 10af7a <_Thread_Initialize+0xf6> 10af6a: eb 18 jmp 10af84 <_Thread_Initialize+0x100> uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) the_thread->extensions[i] = NULL; 10af6c: 8b 83 00 01 00 00 mov 0x100(%ebx),%eax 10af72: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 10af79: 42 inc %edx 10af7a: a1 80 cb 11 00 mov 0x11cb80,%eax 10af7f: 40 inc %eax 10af80: 39 c2 cmp %eax,%edx 10af82: 72 e8 jb 10af6c <_Thread_Initialize+0xe8> /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10af84: 8a 45 f2 mov -0xe(%ebp),%al 10af87: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10af8d: 8b 45 24 mov 0x24(%ebp),%eax 10af90: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10af96: 8b 45 28 mov 0x28(%ebp),%eax 10af99: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) switch ( budget_algorithm ) { 10af9f: 83 7d 24 02 cmpl $0x2,0x24(%ebp) 10afa3: 75 08 jne 10afad <_Thread_Initialize+0x129><== ALWAYS TAKEN case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 10afa5: a1 ac ca 11 00 mov 0x11caac,%eax <== NOT EXECUTED 10afaa: 89 43 78 mov %eax,0x78(%ebx) <== NOT EXECUTED break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 10afad: 8b 45 2c mov 0x2c(%ebp),%eax 10afb0: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10afb6: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10afbd: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10afc4: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->suspend_count = 0; 10afcb: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx) the_thread->real_priority = priority; 10afd2: 8b 45 1c mov 0x1c(%ebp),%eax 10afd5: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10afd8: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10afde: 52 push %edx 10afdf: 52 push %edx 10afe0: 50 push %eax 10afe1: 53 push %ebx 10afe2: e8 8d 05 00 00 call 10b574 <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS the_thread->cpu_time_used.tv_sec = 0; 10afe7: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10afee: 00 00 00 the_thread->cpu_time_used.tv_nsec = 0; 10aff1: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10aff8: 00 00 00 10affb: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10afff: 8b 45 08 mov 0x8(%ebp),%eax 10b002: 8b 40 1c mov 0x1c(%eax),%eax 10b005: 89 1c 90 mov %ebx,(%eax,%edx,4) 10b008: 8b 45 30 mov 0x30(%ebp),%eax 10b00b: 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 ); 10b00e: 89 1c 24 mov %ebx,(%esp) 10b011: e8 92 0a 00 00 call 10baa8 <_User_extensions_Thread_create> if ( !extension_status ) { 10b016: 83 c4 10 add $0x10,%esp 10b019: b2 01 mov $0x1,%dl 10b01b: 84 c0 test %al,%al 10b01d: 75 2e jne 10b04d <_Thread_Initialize+0x1c9><== ALWAYS TAKEN if ( extensions_area ) 10b01f: 85 ff test %edi,%edi <== NOT EXECUTED 10b021: 74 0c je 10b02f <_Thread_Initialize+0x1ab><== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 10b023: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b026: 57 push %edi <== NOT EXECUTED 10b027: e8 48 0d 00 00 call 10bd74 <_Workspace_Free> <== NOT EXECUTED 10b02c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10b02f: 85 f6 test %esi,%esi <== NOT EXECUTED 10b031: 74 0c je 10b03f <_Thread_Initialize+0x1bb><== NOT EXECUTED (void) _Workspace_Free( fp_area ); 10b033: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b036: 56 push %esi <== NOT EXECUTED 10b037: e8 38 0d 00 00 call 10bd74 <_Workspace_Free> <== NOT EXECUTED 10b03c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED #endif _Thread_Stack_Free( the_thread ); 10b03f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b042: 53 push %ebx <== NOT EXECUTED 10b043: e8 20 07 00 00 call 10b768 <_Thread_Stack_Free> <== NOT EXECUTED 10b048: 31 d2 xor %edx,%edx <== NOT EXECUTED 10b04a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return FALSE; } return TRUE; } 10b04d: 88 d0 mov %dl,%al 10b04f: 8d 65 f4 lea -0xc(%ebp),%esp 10b052: 5b pop %ebx 10b053: 5e pop %esi 10b054: 5f pop %edi 10b055: c9 leave 10b056: c3 ret =============================================================================== 0010e89c <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10e89c: 55 push %ebp 10e89d: 89 e5 mov %esp,%ebp 10e89f: 53 push %ebx 10e8a0: 83 ec 10 sub $0x10,%esp 10e8a3: 8b 5d 08 mov 0x8(%ebp),%ebx the_thread->resource_count = 0; 10e8a6: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->suspend_count = 0; 10e8ad: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx) the_thread->is_preemptible = the_thread->Start.is_preemptible; 10e8b4: 8a 83 ac 00 00 00 mov 0xac(%ebx),%al 10e8ba: 88 43 76 mov %al,0x76(%ebx) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 10e8bd: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 10e8c3: 89 43 7c mov %eax,0x7c(%ebx) the_thread->budget_callout = the_thread->Start.budget_callout; 10e8c6: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax 10e8cc: 89 83 80 00 00 00 mov %eax,0x80(%ebx) the_thread->Start.pointer_argument = pointer_argument; 10e8d2: 8b 45 0c mov 0xc(%ebp),%eax 10e8d5: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 10e8db: 8b 45 10 mov 0x10(%ebp),%eax 10e8de: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 10e8e4: 53 push %ebx 10e8e5: e8 d2 d4 ff ff call 10bdbc <_Thread_queue_Extract_with_proxy> 10e8ea: 83 c4 10 add $0x10,%esp 10e8ed: 84 c0 test %al,%al 10e8ef: 75 15 jne 10e906 <_Thread_Reset+0x6a> <== NEVER TAKEN if ( _Watchdog_Is_active( &the_thread->Timer ) ) 10e8f1: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10e8f5: 75 0f jne 10e906 <_Thread_Reset+0x6a> <== ALWAYS TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); 10e8f7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e8fa: 8d 43 48 lea 0x48(%ebx),%eax <== NOT EXECUTED 10e8fd: 50 push %eax <== NOT EXECUTED 10e8fe: e8 f9 dd ff ff call 10c6fc <_Watchdog_Remove> <== NOT EXECUTED 10e903: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 10e906: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax 10e90c: 39 43 14 cmp %eax,0x14(%ebx) 10e90f: 74 12 je 10e923 <_Thread_Reset+0x87> the_thread->real_priority = the_thread->Start.initial_priority; 10e911: 89 43 18 mov %eax,0x18(%ebx) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 10e914: 89 45 0c mov %eax,0xc(%ebp) 10e917: 89 5d 08 mov %ebx,0x8(%ebp) } } 10e91a: 8b 5d fc mov -0x4(%ebp),%ebx 10e91d: 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 ); 10e91e: e9 75 d6 ff ff jmp 10bf98 <_Thread_Set_priority> } } 10e923: 8b 5d fc mov -0x4(%ebp),%ebx 10e926: c9 leave 10e927: c3 ret =============================================================================== 0010ddc4 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 10ddc4: 55 push %ebp 10ddc5: 89 e5 mov %esp,%ebp 10ddc7: 56 push %esi 10ddc8: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10ddc9: 8b 0d a0 cb 11 00 mov 0x11cba0,%ecx ready = executing->ready; 10ddcf: 8b 99 8c 00 00 00 mov 0x8c(%ecx),%ebx _ISR_Disable( level ); 10ddd5: 9c pushf 10ddd6: fa cli 10ddd7: 5e pop %esi if ( _Chain_Has_only_one_node( ready ) ) { 10ddd8: 8b 03 mov (%ebx),%eax 10ddda: 3b 43 08 cmp 0x8(%ebx),%eax 10dddd: 75 04 jne 10dde3 <_Thread_Reset_timeslice+0x1f> _ISR_Enable( level ); 10dddf: 56 push %esi 10dde0: 9d popf 10dde1: eb 35 jmp 10de18 <_Thread_Reset_timeslice+0x54> 10dde3: 8b 11 mov (%ecx),%edx 10dde5: 8b 41 04 mov 0x4(%ecx),%eax 10dde8: 89 42 04 mov %eax,0x4(%edx) 10ddeb: 89 10 mov %edx,(%eax) 10dded: 8d 43 04 lea 0x4(%ebx),%eax 10ddf0: 89 01 mov %eax,(%ecx) 10ddf2: 8b 43 08 mov 0x8(%ebx),%eax 10ddf5: 89 4b 08 mov %ecx,0x8(%ebx) 10ddf8: 89 08 mov %ecx,(%eax) 10ddfa: 89 41 04 mov %eax,0x4(%ecx) return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10ddfd: 56 push %esi 10ddfe: 9d popf 10ddff: fa cli if ( _Thread_Is_heir( executing ) ) 10de00: 3b 0d 6c cb 11 00 cmp 0x11cb6c,%ecx 10de06: 75 07 jne 10de0f <_Thread_Reset_timeslice+0x4b><== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; 10de08: 8b 03 mov (%ebx),%eax 10de0a: a3 6c cb 11 00 mov %eax,0x11cb6c _Context_Switch_necessary = TRUE; 10de0f: c6 05 b0 cb 11 00 01 movb $0x1,0x11cbb0 _ISR_Enable( level ); 10de16: 56 push %esi 10de17: 9d popf } 10de18: 5b pop %ebx 10de19: 5e pop %esi 10de1a: c9 leave 10de1b: c3 ret =============================================================================== 0010bf10 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10bf10: 55 push %ebp 10bf11: 89 e5 mov %esp,%ebp 10bf13: 53 push %ebx 10bf14: 83 ec 04 sub $0x4,%esp 10bf17: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !_States_Is_dormant( the_thread->current_state ) ) { 10bf1a: 31 c0 xor %eax,%eax 10bf1c: f6 43 10 01 testb $0x1,0x10(%ebx) 10bf20: 75 70 jne 10bf92 <_Thread_Restart+0x82> _Thread_Set_transient( the_thread ); 10bf22: 83 ec 0c sub $0xc,%esp 10bf25: 53 push %ebx 10bf26: e8 a1 01 00 00 call 10c0cc <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 10bf2b: 83 c4 0c add $0xc,%esp 10bf2e: ff 75 10 pushl 0x10(%ebp) 10bf31: ff 75 0c pushl 0xc(%ebp) 10bf34: 53 push %ebx 10bf35: e8 62 29 00 00 call 10e89c <_Thread_Reset> _Thread_Load_environment( the_thread ); 10bf3a: 89 1c 24 mov %ebx,(%esp) 10bf3d: e8 56 26 00 00 call 10e598 <_Thread_Load_environment> _Thread_Ready( the_thread ); 10bf42: 89 1c 24 mov %ebx,(%esp) 10bf45: e8 b2 28 00 00 call 10e7fc <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 10bf4a: 89 1c 24 mov %ebx,(%esp) 10bf4d: e8 ee 05 00 00 call 10c540 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 10bf52: 83 c4 10 add $0x10,%esp 10bf55: b0 01 mov $0x1,%al 10bf57: 3b 1d 8c f5 11 00 cmp 0x11f58c,%ebx 10bf5d: 75 33 jne 10bf92 <_Thread_Restart+0x82> * Returns pointer to the start of the memory block if success, NULL if * failure. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes * @param[in] alignment the required alignment 10bf5f: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx) 10bf66: 74 12 je 10bf7a <_Thread_Restart+0x6a> * @return NULL if unsuccessful and a pointer to the block if successful 10bf68: 83 ec 0c sub $0xc,%esp 10bf6b: 8d 83 ec 00 00 00 lea 0xec(%ebx),%eax 10bf71: 50 push %eax 10bf72: e8 47 09 00 00 call 10c8be <_CPU_Context_restore_fp> 10bf77: 83 c4 10 add $0x10,%esp */ void *_Protected_heap_Allocate_aligned( Heap_Control *the_heap, 10bf7a: 83 ec 0c sub $0xc,%esp 10bf7d: a1 8c f5 11 00 mov 0x11f58c,%eax 10bf82: 05 d4 00 00 00 add $0xd4,%eax 10bf87: 50 push %eax 10bf88: e8 20 09 00 00 call 10c8ad <_CPU_Context_restore> 10bf8d: b0 01 mov $0x1,%al <== NOT EXECUTED 10bf8f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return TRUE; } return FALSE; } 10bf92: 8b 5d fc mov -0x4(%ebp),%ebx 10bf95: c9 leave 10bf96: c3 ret =============================================================================== 0010c920 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 10c920: 55 push %ebp 10c921: 89 e5 mov %esp,%ebp 10c923: 53 push %ebx 10c924: 8b 4d 08 mov 0x8(%ebp),%ecx 10c927: 8a 45 0c mov 0xc(%ebp),%al ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10c92a: 9c pushf 10c92b: fa cli 10c92c: 5b pop %ebx if ( force == TRUE ) 10c92d: 84 c0 test %al,%al 10c92f: 74 09 je 10c93a <_Thread_Resume+0x1a> <== NEVER TAKEN the_thread->suspend_count = 0; 10c931: c7 41 70 00 00 00 00 movl $0x0,0x70(%ecx) 10c938: eb 03 jmp 10c93d <_Thread_Resume+0x1d> else the_thread->suspend_count--; 10c93a: ff 49 70 decl 0x70(%ecx) <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 10c93d: 83 79 70 00 cmpl $0x0,0x70(%ecx) 10c941: 74 04 je 10c947 <_Thread_Resume+0x27> <== ALWAYS TAKEN _ISR_Enable( level ); 10c943: 53 push %ebx <== NOT EXECUTED 10c944: 9d popf <== NOT EXECUTED 10c945: eb 77 jmp 10c9be <_Thread_Resume+0x9e> <== NOT EXECUTED return; } current_state = the_thread->current_state; 10c947: 8b 41 10 mov 0x10(%ecx),%eax if ( current_state & STATES_SUSPENDED ) { 10c94a: a8 02 test $0x2,%al 10c94c: 74 6e je 10c9bc <_Thread_Resume+0x9c> <== NEVER TAKEN * @param[in] page_size is the size in bytes of the allocation unit * * @return This method returns the maximum memory available. If * unsuccessful, 0 will be returned. */ static inline uint32_t _Protected_heap_Initialize( 10c94e: 83 e0 fd and $0xfffffffd,%eax current_state = 10c951: 89 41 10 mov %eax,0x10(%ecx) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 10c954: 85 c0 test %eax,%eax 10c956: 75 64 jne 10c9bc <_Thread_Resume+0x9c> * otherwise. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the user block * to obtain the size of * @param[in] size points to a user area to return the size in 10c958: 8b 91 90 00 00 00 mov 0x90(%ecx),%edx 10c95e: 66 8b 81 96 00 00 00 mov 0x96(%ecx),%ax 10c965: 66 09 02 or %ax,(%edx) * @return TRUE if successfully able to determine the size, FALSE otherwise 10c968: 66 a1 50 85 12 00 mov 0x128550,%ax 10c96e: 0b 81 94 00 00 00 or 0x94(%ecx),%eax 10c974: 66 a3 50 85 12 00 mov %ax,0x128550 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10c97a: 8b 81 8c 00 00 00 mov 0x8c(%ecx),%eax 10c980: 8d 50 04 lea 0x4(%eax),%edx 10c983: 89 11 mov %edx,(%ecx) 10c985: 8b 50 08 mov 0x8(%eax),%edx 10c988: 89 48 08 mov %ecx,0x8(%eax) 10c98b: 89 0a mov %ecx,(%edx) 10c98d: 89 51 04 mov %edx,0x4(%ecx) _ISR_Flash( level ); 10c990: 53 push %ebx 10c991: 9d popf 10c992: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 10c993: 8b 51 14 mov 0x14(%ecx),%edx 10c996: a1 28 85 12 00 mov 0x128528,%eax 10c99b: 3b 50 14 cmp 0x14(%eax),%edx 10c99e: 73 1c jae 10c9bc <_Thread_Resume+0x9c> _Thread_Heir = the_thread; 10c9a0: 89 0d 28 85 12 00 mov %ecx,0x128528 if ( _Thread_Executing->is_preemptible || 10c9a6: a1 5c 85 12 00 mov 0x12855c,%eax 10c9ab: 80 78 76 00 cmpb $0x0,0x76(%eax) 10c9af: 75 04 jne 10c9b5 <_Thread_Resume+0x95> 10c9b1: 85 d2 test %edx,%edx 10c9b3: 75 07 jne 10c9bc <_Thread_Resume+0x9c> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 10c9b5: c6 05 6c 85 12 00 01 movb $0x1,0x12856c } } } _ISR_Enable( level ); 10c9bc: 53 push %ebx 10c9bd: 9d popf } 10c9be: 5b pop %ebx 10c9bf: c9 leave 10c9c0: c3 ret =============================================================================== 0010b718 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10b718: 55 push %ebp 10b719: 89 e5 mov %esp,%ebp 10b71b: 53 push %ebx 10b71c: 83 ec 04 sub $0x4,%esp 10b71f: a1 60 87 11 00 mov 0x118760,%eax 10b724: 8b 5d 0c mov 0xc(%ebp),%ebx 10b727: 39 c3 cmp %eax,%ebx 10b729: 73 02 jae 10b72d <_Thread_Stack_Allocate+0x15> 10b72b: 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_Table->stack_allocate_hook ) { 10b72d: a1 78 cb 11 00 mov 0x11cb78,%eax 10b732: 8b 40 20 mov 0x20(%eax),%eax 10b735: 85 c0 test %eax,%eax 10b737: 74 08 je 10b741 <_Thread_Stack_Allocate+0x29><== ALWAYS TAKEN stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 10b739: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b73c: 53 push %ebx <== NOT EXECUTED 10b73d: ff d0 call *%eax <== NOT EXECUTED 10b73f: eb 09 jmp 10b74a <_Thread_Stack_Allocate+0x32><== NOT EXECUTED * 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 ); 10b741: 83 ec 0c sub $0xc,%esp 10b744: 53 push %ebx 10b745: e8 3f 06 00 00 call 10bd89 <_Workspace_Allocate> 10b74a: 89 c1 mov %eax,%ecx 10b74c: 83 c4 10 add $0x10,%esp } if ( !stack_addr ) 10b74f: 31 c0 xor %eax,%eax 10b751: 85 c9 test %ecx,%ecx 10b753: 0f 95 c0 setne %al 10b756: f7 d8 neg %eax 10b758: 21 d8 and %ebx,%eax the_stack_size = 0; the_thread->Start.stack = stack_addr; 10b75a: 8b 55 08 mov 0x8(%ebp),%edx 10b75d: 89 8a d0 00 00 00 mov %ecx,0xd0(%edx) return the_stack_size; } 10b763: 8b 5d fc mov -0x4(%ebp),%ebx 10b766: c9 leave 10b767: c3 ret =============================================================================== 0010b768 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10b768: 55 push %ebp 10b769: 89 e5 mov %esp,%ebp 10b76b: 8b 55 08 mov 0x8(%ebp),%edx /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 10b76e: 80 ba c0 00 00 00 00 cmpb $0x0,0xc0(%edx) 10b775: 74 21 je 10b798 <_Thread_Stack_Free+0x30><== NEVER TAKEN * 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_Table->stack_free_hook ) 10b777: a1 78 cb 11 00 mov 0x11cb78,%eax 10b77c: 8b 48 24 mov 0x24(%eax),%ecx 10b77f: 85 c9 test %ecx,%ecx 10b781: 8b 82 c8 00 00 00 mov 0xc8(%edx),%eax 10b787: 74 06 je 10b78f <_Thread_Stack_Free+0x27><== ALWAYS TAKEN (*_Configuration_Table->stack_free_hook)( 10b789: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10b78c: c9 leave <== NOT EXECUTED * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( _Configuration_Table->stack_free_hook ) (*_Configuration_Table->stack_free_hook)( 10b78d: ff e1 jmp *%ecx <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10b78f: 89 45 08 mov %eax,0x8(%ebp) } 10b792: c9 leave if ( _Configuration_Table->stack_free_hook ) (*_Configuration_Table->stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10b793: e9 dc 05 00 00 jmp 10bd74 <_Workspace_Free> } 10b798: c9 leave <== NOT EXECUTED 10b799: c3 ret <== NOT EXECUTED =============================================================================== 0010b850 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 10b850: 55 push %ebp 10b851: 89 e5 mov %esp,%ebp 10b853: 53 push %ebx 10b854: 83 ec 04 sub $0x4,%esp Thread_Control *executing; executing = _Thread_Executing; 10b857: 8b 1d a0 cb 11 00 mov 0x11cba0,%ebx /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 10b85d: 80 7b 76 00 cmpb $0x0,0x76(%ebx) 10b861: 74 4c je 10b8af <_Thread_Tickle_timeslice+0x5f> return; if ( !_States_Is_ready( executing->current_state ) ) 10b863: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10b867: 75 46 jne 10b8af <_Thread_Tickle_timeslice+0x5f><== NEVER TAKEN /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 10b869: 8b 43 7c mov 0x7c(%ebx),%eax 10b86c: 83 f8 01 cmp $0x1,%eax 10b86f: 72 3e jb 10b8af <_Thread_Tickle_timeslice+0x5f> 10b871: 83 f8 02 cmp $0x2,%eax 10b874: 76 07 jbe 10b87d <_Thread_Tickle_timeslice+0x2d><== ALWAYS TAKEN 10b876: 83 f8 03 cmp $0x3,%eax <== NOT EXECUTED 10b879: 75 34 jne 10b8af <_Thread_Tickle_timeslice+0x5f><== NOT EXECUTED 10b87b: eb 1a jmp 10b897 <_Thread_Tickle_timeslice+0x47><== NOT EXECUTED case THREAD_CPU_BUDGET_ALGORITHM_NONE: break; case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: if ( (int)(--executing->cpu_time_budget) <= 0 ) { 10b87d: 8b 43 78 mov 0x78(%ebx),%eax 10b880: 48 dec %eax 10b881: 89 43 78 mov %eax,0x78(%ebx) 10b884: 85 c0 test %eax,%eax 10b886: 7f 27 jg 10b8af <_Thread_Tickle_timeslice+0x5f> _Thread_Reset_timeslice(); 10b888: e8 37 25 00 00 call 10ddc4 <_Thread_Reset_timeslice> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10b88d: a1 ac ca 11 00 mov 0x11caac,%eax 10b892: 89 43 78 mov %eax,0x78(%ebx) 10b895: eb 18 jmp 10b8af <_Thread_Tickle_timeslice+0x5f> } break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 10b897: 8b 43 78 mov 0x78(%ebx),%eax <== NOT EXECUTED 10b89a: 48 dec %eax <== NOT EXECUTED 10b89b: 89 43 78 mov %eax,0x78(%ebx) <== NOT EXECUTED 10b89e: 85 c0 test %eax,%eax <== NOT EXECUTED 10b8a0: 75 0d jne 10b8af <_Thread_Tickle_timeslice+0x5f><== NOT EXECUTED (*executing->budget_callout)( executing ); 10b8a2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b8a5: 53 push %ebx <== NOT EXECUTED 10b8a6: ff 93 80 00 00 00 call *0x80(%ebx) <== NOT EXECUTED 10b8ac: 83 c4 10 add $0x10,%esp <== NOT EXECUTED break; } } 10b8af: 8b 5d fc mov -0x4(%ebp),%ebx 10b8b2: c9 leave 10b8b3: c3 ret =============================================================================== 0010b8b4 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10b8b4: 55 push %ebp 10b8b5: 89 e5 mov %esp,%ebp 10b8b7: 56 push %esi 10b8b8: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10b8b9: 8b 0d a0 cb 11 00 mov 0x11cba0,%ecx ready = executing->ready; 10b8bf: 8b 99 8c 00 00 00 mov 0x8c(%ecx),%ebx _ISR_Disable( level ); 10b8c5: 9c pushf 10b8c6: fa cli 10b8c7: 5e pop %esi if ( !_Chain_Has_only_one_node( ready ) ) { 10b8c8: 8b 03 mov (%ebx),%eax 10b8ca: 3b 43 08 cmp 0x8(%ebx),%eax 10b8cd: 74 2e je 10b8fd <_Thread_Yield_processor+0x49> 10b8cf: 8b 11 mov (%ecx),%edx 10b8d1: 8b 41 04 mov 0x4(%ecx),%eax 10b8d4: 89 42 04 mov %eax,0x4(%edx) 10b8d7: 89 10 mov %edx,(%eax) 10b8d9: 8d 43 04 lea 0x4(%ebx),%eax 10b8dc: 89 01 mov %eax,(%ecx) 10b8de: 8b 43 08 mov 0x8(%ebx),%eax 10b8e1: 89 4b 08 mov %ecx,0x8(%ebx) 10b8e4: 89 08 mov %ecx,(%eax) 10b8e6: 89 41 04 mov %eax,0x4(%ecx) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10b8e9: 56 push %esi 10b8ea: 9d popf 10b8eb: fa cli if ( _Thread_Is_heir( executing ) ) 10b8ec: 3b 0d 6c cb 11 00 cmp 0x11cb6c,%ecx 10b8f2: 75 11 jne 10b905 <_Thread_Yield_processor+0x51><== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; 10b8f4: 8b 03 mov (%ebx),%eax 10b8f6: a3 6c cb 11 00 mov %eax,0x11cb6c 10b8fb: eb 08 jmp 10b905 <_Thread_Yield_processor+0x51> _Context_Switch_necessary = TRUE; } else if ( !_Thread_Is_heir( executing ) ) 10b8fd: 3b 0d 6c cb 11 00 cmp 0x11cb6c,%ecx 10b903: 74 07 je 10b90c <_Thread_Yield_processor+0x58><== ALWAYS TAKEN _Context_Switch_necessary = TRUE; 10b905: c6 05 b0 cb 11 00 01 movb $0x1,0x11cbb0 _ISR_Enable( level ); 10b90c: 56 push %esi 10b90d: 9d popf } 10b90e: 5b pop %ebx 10b90f: 5e pop %esi 10b910: c9 leave 10b911: c3 ret =============================================================================== 0010b2c8 <_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 ) { 10b2c8: 55 push %ebp 10b2c9: 89 e5 mov %esp,%ebp 10b2cb: 57 push %edi 10b2cc: 56 push %esi 10b2cd: 53 push %ebx 10b2ce: 83 ec 18 sub $0x18,%esp 10b2d1: 8b 4d 0c mov 0xc(%ebp),%ecx 10b2d4: 8d 41 3c lea 0x3c(%ecx),%eax 10b2d7: 89 41 38 mov %eax,0x38(%ecx) 10b2da: c7 41 3c 00 00 00 00 movl $0x0,0x3c(%ecx) 10b2e1: 8d 41 38 lea 0x38(%ecx),%eax 10b2e4: 89 41 40 mov %eax,0x40(%ecx) Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 10b2e7: 8b 79 14 mov 0x14(%ecx),%edi extern "C" { #endif /** * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. 10b2ea: 89 f8 mov %edi,%eax 10b2ec: c1 e8 06 shr $0x6,%eax header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10b2ef: 6b c0 0c imul $0xc,%eax,%eax 10b2f2: 8b 5d 08 mov 0x8(%ebp),%ebx 10b2f5: 01 c3 add %eax,%ebx block_state = the_thread_queue->state; 10b2f7: 8b 55 08 mov 0x8(%ebp),%edx 10b2fa: 8b 52 38 mov 0x38(%edx),%edx 10b2fd: 89 55 e8 mov %edx,-0x18(%ebp) if ( _Thread_queue_Is_reverse_search( priority ) ) 10b300: f7 c7 20 00 00 00 test $0x20,%edi 10b306: 75 77 jne 10b37f <_Thread_queue_Enqueue_priority+0xb7> * @return NULL if unsuccessful and a pointer to the block if successful */ void *_Protected_heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment 10b308: 83 c3 04 add $0x4,%ebx 10b30b: 89 5d ec mov %ebx,-0x14(%ebp) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 10b30e: 89 45 dc mov %eax,-0x24(%ebp) if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10b311: 9c pushf 10b312: fa cli 10b313: 5e pop %esi search_thread = (Thread_Control *) header->first; 10b314: 8b 45 dc mov -0x24(%ebp),%eax 10b317: 8b 5d 08 mov 0x8(%ebp),%ebx 10b31a: 8b 14 18 mov (%eax,%ebx,1),%edx 10b31d: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) 10b324: eb 1b jmp 10b341 <_Thread_queue_Enqueue_priority+0x79> while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; 10b326: 8b 5a 14 mov 0x14(%edx),%ebx 10b329: 89 5d e0 mov %ebx,-0x20(%ebp) if ( priority <= search_priority ) 10b32c: 39 df cmp %ebx,%edi 10b32e: 76 16 jbe 10b346 <_Thread_queue_Enqueue_priority+0x7e> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10b330: 56 push %esi 10b331: 9d popf 10b332: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10b333: 8b 45 e8 mov -0x18(%ebp),%eax 10b336: 85 42 10 test %eax,0x10(%edx) 10b339: 75 04 jne 10b33f <_Thread_queue_Enqueue_priority+0x77><== ALWAYS TAKEN _ISR_Enable( level ); 10b33b: 56 push %esi <== NOT EXECUTED 10b33c: 9d popf <== NOT EXECUTED 10b33d: eb d2 jmp 10b311 <_Thread_queue_Enqueue_priority+0x49><== NOT EXECUTED goto restart_forward_search; } search_thread = 10b33f: 8b 12 mov (%edx),%edx restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10b341: 3b 55 ec cmp -0x14(%ebp),%edx 10b344: 75 e0 jne 10b326 <_Thread_queue_Enqueue_priority+0x5e> 10b346: 89 55 f0 mov %edx,-0x10(%ebp) 10b349: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10b34b: 8b 45 08 mov 0x8(%ebp),%eax 10b34e: 83 78 30 01 cmpl $0x1,0x30(%eax) 10b352: 0f 85 b4 00 00 00 jne 10b40c <_Thread_queue_Enqueue_priority+0x144><== NEVER TAKEN THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10b358: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) if ( priority == search_priority ) 10b35f: 3b 7d e0 cmp -0x20(%ebp),%edi 10b362: 0f 84 87 00 00 00 je 10b3ef <_Thread_queue_Enqueue_priority+0x127> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10b368: 8b 42 04 mov 0x4(%edx),%eax the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10b36b: 89 11 mov %edx,(%ecx) the_node->previous = previous_node; 10b36d: 89 41 04 mov %eax,0x4(%ecx) previous_node->next = the_node; 10b370: 89 08 mov %ecx,(%eax) search_node->previous = the_node; 10b372: 89 4a 04 mov %ecx,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10b375: 8b 55 08 mov 0x8(%ebp),%edx 10b378: 89 51 44 mov %edx,0x44(%ecx) _ISR_Enable( level ); 10b37b: 56 push %esi 10b37c: 9d popf 10b37d: eb 69 jmp 10b3e8 <_Thread_queue_Enqueue_priority+0x120> restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 10b37f: 8d 43 08 lea 0x8(%ebx),%eax 10b382: 89 45 e4 mov %eax,-0x1c(%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; 10b385: 0f b6 05 64 87 11 00 movzbl 0x118764,%eax 10b38c: 40 inc %eax 10b38d: 89 45 e0 mov %eax,-0x20(%ebp) _ISR_Disable( level ); 10b390: 9c pushf 10b391: fa cli 10b392: 5e pop %esi search_thread = (Thread_Control *) header->last; 10b393: 8b 45 e4 mov -0x1c(%ebp),%eax 10b396: 8b 10 mov (%eax),%edx 10b398: eb 1c jmp 10b3b6 <_Thread_queue_Enqueue_priority+0xee> while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; 10b39a: 8b 42 14 mov 0x14(%edx),%eax 10b39d: 89 45 e0 mov %eax,-0x20(%ebp) if ( priority >= search_priority ) 10b3a0: 39 c7 cmp %eax,%edi 10b3a2: 73 16 jae 10b3ba <_Thread_queue_Enqueue_priority+0xf2> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10b3a4: 56 push %esi 10b3a5: 9d popf 10b3a6: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10b3a7: 8b 45 e8 mov -0x18(%ebp),%eax 10b3aa: 85 42 10 test %eax,0x10(%edx) 10b3ad: 75 04 jne 10b3b3 <_Thread_queue_Enqueue_priority+0xeb><== ALWAYS TAKEN _ISR_Enable( level ); 10b3af: 56 push %esi <== NOT EXECUTED 10b3b0: 9d popf <== NOT EXECUTED 10b3b1: eb d2 jmp 10b385 <_Thread_queue_Enqueue_priority+0xbd><== NOT EXECUTED goto restart_reverse_search; } search_thread = (Thread_Control *) 10b3b3: 8b 52 04 mov 0x4(%edx),%edx restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10b3b6: 39 da cmp %ebx,%edx 10b3b8: 75 e0 jne 10b39a <_Thread_queue_Enqueue_priority+0xd2> 10b3ba: 89 55 f0 mov %edx,-0x10(%ebp) 10b3bd: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10b3bf: 8b 45 08 mov 0x8(%ebp),%eax 10b3c2: 83 78 30 01 cmpl $0x1,0x30(%eax) 10b3c6: 75 44 jne 10b40c <_Thread_queue_Enqueue_priority+0x144><== NEVER TAKEN THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10b3c8: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) if ( priority == search_priority ) 10b3cf: 3b 7d e0 cmp -0x20(%ebp),%edi 10b3d2: 74 1b je 10b3ef <_Thread_queue_Enqueue_priority+0x127> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10b3d4: 8b 02 mov (%edx),%eax the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10b3d6: 89 01 mov %eax,(%ecx) the_node->previous = search_node; 10b3d8: 89 51 04 mov %edx,0x4(%ecx) search_node->next = the_node; 10b3db: 89 0a mov %ecx,(%edx) next_node->previous = the_node; 10b3dd: 89 48 04 mov %ecx,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10b3e0: 8b 55 08 mov 0x8(%ebp),%edx 10b3e3: 89 51 44 mov %edx,0x44(%ecx) _ISR_Enable( level ); 10b3e6: 56 push %esi 10b3e7: 9d popf 10b3e8: b8 01 00 00 00 mov $0x1,%eax 10b3ed: eb 28 jmp 10b417 <_Thread_queue_Enqueue_priority+0x14f> 10b3ef: 8b 45 f0 mov -0x10(%ebp),%eax 10b3f2: 83 c0 3c add $0x3c,%eax 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; 10b3f5: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10b3f8: 89 01 mov %eax,(%ecx) the_node->previous = previous_node; 10b3fa: 89 51 04 mov %edx,0x4(%ecx) previous_node->next = the_node; 10b3fd: 89 0a mov %ecx,(%edx) search_node->previous = the_node; 10b3ff: 89 48 04 mov %ecx,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10b402: 8b 45 08 mov 0x8(%ebp),%eax 10b405: 89 41 44 mov %eax,0x44(%ecx) _ISR_Enable( level ); 10b408: 53 push %ebx 10b409: 9d popf 10b40a: eb dc jmp 10b3e8 <_Thread_queue_Enqueue_priority+0x120> * 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; 10b40c: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 10b40f: 89 18 mov %ebx,(%eax) <== NOT EXECUTED return the_thread_queue->sync_state; 10b411: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10b414: 8b 42 30 mov 0x30(%edx),%eax <== NOT EXECUTED } 10b417: 83 c4 18 add $0x18,%esp 10b41a: 5b pop %ebx 10b41b: 5e pop %esi 10b41c: 5f pop %edi 10b41d: c9 leave 10b41e: c3 ret =============================================================================== 0010e60c <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10e60c: 55 push %ebp 10e60d: 89 e5 mov %esp,%ebp 10e60f: 53 push %ebx 10e610: 83 ec 04 sub $0x4,%esp 10e613: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10e616: 9c pushf 10e617: fa cli 10e618: 59 pop %ecx if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10e619: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 10e620: 75 07 jne 10e629 <_Thread_queue_Extract_fifo+0x1d><== ALWAYS TAKEN _ISR_Enable( level ); 10e622: 51 push %ecx <== NOT EXECUTED 10e623: 9d popf <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 10e624: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10e627: c9 leave <== NOT EXECUTED 10e628: c3 ret <== NOT EXECUTED 10e629: 8b 13 mov (%ebx),%edx 10e62b: 8b 43 04 mov 0x4(%ebx),%eax 10e62e: 89 42 04 mov %eax,0x4(%edx) 10e631: 89 10 mov %edx,(%eax) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 10e633: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10e63a: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10e63e: 74 04 je 10e644 <_Thread_queue_Extract_fifo+0x38> _ISR_Enable( level ); 10e640: 51 push %ecx 10e641: 9d popf 10e642: eb 18 jmp 10e65c <_Thread_queue_Extract_fifo+0x50> * a block of the requested size, then NULL is returned. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes * @return NULL if unsuccessful and a pointer to the block if successful */ 10e644: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10e64b: 51 push %ecx 10e64c: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10e64d: 83 ec 0c sub $0xc,%esp 10e650: 8d 43 48 lea 0x48(%ebx),%eax 10e653: 50 push %eax 10e654: e8 47 d6 ff ff call 10bca0 <_Watchdog_Remove> 10e659: 83 c4 10 add $0x10,%esp void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ); /** 10e65c: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10e663: 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 } 10e666: 8b 5d fc mov -0x4(%ebp),%ebx 10e669: c9 leave 10e66a: e9 fd c3 ff ff jmp 10aa6c <_Thread_Clear_state> =============================================================================== 0010dc1c <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { 10dc1c: 55 push %ebp 10dc1d: 89 e5 mov %esp,%ebp 10dc1f: 57 push %edi 10dc20: 56 push %esi 10dc21: 53 push %ebx 10dc22: 83 ec 0c sub $0xc,%esp 10dc25: 8b 5d 0c mov 0xc(%ebp),%ebx 10dc28: 8a 45 10 mov 0x10(%ebp),%al 10dc2b: 88 45 eb mov %al,-0x15(%ebp) Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 10dc2e: 9c pushf 10dc2f: fa cli 10dc30: 8f 45 ec popl -0x14(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10dc33: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 10dc3a: 75 09 jne 10dc45 <_Thread_queue_Extract_priority_helper+0x29><== ALWAYS TAKEN _ISR_Enable( level ); 10dc3c: ff 75 ec pushl -0x14(%ebp) <== NOT EXECUTED 10dc3f: 9d popf <== NOT EXECUTED 10dc40: e9 8f 00 00 00 jmp 10dcd4 <_Thread_queue_Extract_priority_helper+0xb8><== NOT EXECUTED /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 10dc45: 8b 33 mov (%ebx),%esi previous_node = the_node->previous; 10dc47: 8b 4b 04 mov 0x4(%ebx),%ecx * to obtain the size of * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( 10dc4a: 8b 53 38 mov 0x38(%ebx),%edx if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 10dc4d: 8d 43 3c lea 0x3c(%ebx),%eax 10dc50: 39 c2 cmp %eax,%edx 10dc52: 74 33 je 10dc87 <_Thread_queue_Extract_priority_helper+0x6b> new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 10dc54: 8b 43 40 mov 0x40(%ebx),%eax 10dc57: 89 45 f0 mov %eax,-0x10(%ebp) new_second_node = new_first_node->next; 10dc5a: 8b 3a mov (%edx),%edi previous_node->next = new_first_node; 10dc5c: 89 11 mov %edx,(%ecx) next_node->previous = new_first_node; 10dc5e: 89 56 04 mov %edx,0x4(%esi) new_first_node->next = next_node; 10dc61: 89 32 mov %esi,(%edx) new_first_node->previous = previous_node; 10dc63: 89 4a 04 mov %ecx,0x4(%edx) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10dc66: 8b 43 38 mov 0x38(%ebx),%eax 10dc69: 3b 43 40 cmp 0x40(%ebx),%eax 10dc6c: 74 1e je 10dc8c <_Thread_queue_Extract_priority_helper+0x70> /* > two threads on 2-n */ new_second_node->previous = 10dc6e: 8d 42 38 lea 0x38(%edx),%eax 10dc71: 89 47 04 mov %eax,0x4(%edi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 10dc74: 89 7a 38 mov %edi,0x38(%edx) new_first_thread->Wait.Block2n.last = last_node; 10dc77: 8b 45 f0 mov -0x10(%ebp),%eax 10dc7a: 89 42 40 mov %eax,0x40(%edx) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 10dc7d: 8d 42 3c lea 0x3c(%edx),%eax 10dc80: 8b 55 f0 mov -0x10(%ebp),%edx 10dc83: 89 02 mov %eax,(%edx) 10dc85: eb 05 jmp 10dc8c <_Thread_queue_Extract_priority_helper+0x70> } } else { previous_node->next = next_node; 10dc87: 89 31 mov %esi,(%ecx) next_node->previous = previous_node; 10dc89: 89 4e 04 mov %ecx,0x4(%esi) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 10dc8c: 80 7d eb 00 cmpb $0x0,-0x15(%ebp) 10dc90: 74 06 je 10dc98 <_Thread_queue_Extract_priority_helper+0x7c> _ISR_Enable( level ); 10dc92: ff 75 ec pushl -0x14(%ebp) 10dc95: 9d popf 10dc96: eb 3c jmp 10dcd4 <_Thread_queue_Extract_priority_helper+0xb8> return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10dc98: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10dc9c: 74 06 je 10dca4 <_Thread_queue_Extract_priority_helper+0x88><== NEVER TAKEN _ISR_Enable( level ); 10dc9e: ff 75 ec pushl -0x14(%ebp) 10dca1: 9d popf 10dca2: eb 1a jmp 10dcbe <_Thread_queue_Extract_priority_helper+0xa2> * a block of the requested size, then NULL is returned. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes * @return NULL if unsuccessful and a pointer to the block if successful */ 10dca4: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) <== NOT EXECUTED } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10dcab: ff 75 ec pushl -0x14(%ebp) <== NOT EXECUTED 10dcae: 9d popf <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 10dcaf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dcb2: 8d 43 48 lea 0x48(%ebx),%eax <== NOT EXECUTED 10dcb5: 50 push %eax <== NOT EXECUTED 10dcb6: e8 e5 df ff ff call 10bca0 <_Watchdog_Remove> <== NOT EXECUTED 10dcbb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ); /** 10dcbe: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10dcc5: 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 } 10dcc8: 8d 65 f4 lea -0xc(%ebp),%esp 10dccb: 5b pop %ebx 10dccc: 5e pop %esi 10dccd: 5f pop %edi 10dcce: c9 leave 10dccf: e9 98 cd ff ff jmp 10aa6c <_Thread_Clear_state> 10dcd4: 8d 65 f4 lea -0xc(%ebp),%esp 10dcd7: 5b pop %ebx 10dcd8: 5e pop %esi 10dcd9: 5f pop %edi 10dcda: c9 leave 10dcdb: c3 ret =============================================================================== 0010dcdc <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 10dcdc: 55 push %ebp 10dcdd: 89 e5 mov %esp,%ebp 10dcdf: 83 ec 08 sub $0x8,%esp 10dce2: 8b 4d 08 mov 0x8(%ebp),%ecx Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 10dce5: 8b 51 44 mov 0x44(%ecx),%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 && 10dce8: 8b 42 30 mov 0x30(%edx),%eax 10dceb: 85 c0 test %eax,%eax 10dced: 74 1c je 10dd0b <_Thread_queue_Process_timeout+0x2f> 10dcef: 3b 0d a0 cb 11 00 cmp 0x11cba0,%ecx 10dcf5: 75 14 jne 10dd0b <_Thread_queue_Process_timeout+0x2f><== NEVER TAKEN _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 10dcf7: 83 f8 03 cmp $0x3,%eax 10dcfa: 74 23 je 10dd1f <_Thread_queue_Process_timeout+0x43><== NEVER TAKEN the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 10dcfc: 8b 42 3c mov 0x3c(%edx),%eax 10dcff: 89 41 34 mov %eax,0x34(%ecx) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10dd02: c7 42 30 02 00 00 00 movl $0x2,0x30(%edx) 10dd09: eb 14 jmp 10dd1f <_Thread_queue_Process_timeout+0x43> } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 10dd0b: 8b 42 3c mov 0x3c(%edx),%eax 10dd0e: 89 41 34 mov %eax,0x34(%ecx) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 10dd11: 50 push %eax 10dd12: 50 push %eax 10dd13: 51 push %ecx 10dd14: ff 71 44 pushl 0x44(%ecx) 10dd17: e8 d0 fe ff ff call 10dbec <_Thread_queue_Extract> 10dd1c: 83 c4 10 add $0x10,%esp } } 10dd1f: c9 leave 10dd20: c3 ret =============================================================================== 0010b4ec <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10b4ec: 55 push %ebp 10b4ed: 89 e5 mov %esp,%ebp 10b4ef: 57 push %edi 10b4f0: 56 push %esi 10b4f1: 53 push %ebx 10b4f2: 83 ec 1c sub $0x1c,%esp 10b4f5: 8b 5d 08 mov 0x8(%ebp),%ebx 10b4f8: 8b 75 0c mov 0xc(%ebp),%esi /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 10b4fb: 85 db test %ebx,%ebx 10b4fd: 74 36 je 10b535 <_Thread_queue_Requeue+0x49><== NEVER TAKEN /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10b4ff: 83 7b 34 01 cmpl $0x1,0x34(%ebx) 10b503: 75 30 jne 10b535 <_Thread_queue_Requeue+0x49><== NEVER TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10b505: 9c pushf 10b506: fa cli 10b507: 5f pop %edi if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10b508: f7 46 10 e0 be 03 00 testl $0x3bee0,0x10(%esi) 10b50f: 74 22 je 10b533 <_Thread_queue_Requeue+0x47><== NEVER TAKEN { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** * This routine grows @a the_heap memory area using the size bytes which 10b511: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, TRUE ); 10b518: 50 push %eax 10b519: 6a 01 push $0x1 10b51b: 56 push %esi 10b51c: 53 push %ebx 10b51d: e8 fa 26 00 00 call 10dc1c <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10b522: 83 c4 0c add $0xc,%esp 10b525: 8d 45 f0 lea -0x10(%ebp),%eax 10b528: 50 push %eax 10b529: 56 push %esi 10b52a: 53 push %ebx 10b52b: e8 98 fd ff ff call 10b2c8 <_Thread_queue_Enqueue_priority> 10b530: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10b533: 57 push %edi 10b534: 9d popf } } 10b535: 8d 65 f4 lea -0xc(%ebp),%esp 10b538: 5b pop %ebx 10b539: 5e pop %esi 10b53a: 5f pop %edi 10b53b: c9 leave 10b53c: c3 ret =============================================================================== 0010b540 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored ) { 10b540: 55 push %ebp 10b541: 89 e5 mov %esp,%ebp 10b543: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10b546: 8d 45 fc lea -0x4(%ebp),%eax 10b549: 50 push %eax 10b54a: ff 75 08 pushl 0x8(%ebp) 10b54d: e8 ba f8 ff ff call 10ae0c <_Thread_Get> switch ( location ) { 10b552: 83 c4 10 add $0x10,%esp 10b555: 83 7d fc 00 cmpl $0x0,-0x4(%ebp) 10b559: 75 17 jne 10b572 <_Thread_queue_Timeout+0x32><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10b55b: 83 ec 0c sub $0xc,%esp 10b55e: 50 push %eax 10b55f: e8 78 27 00 00 call 10dcdc <_Thread_queue_Process_timeout> 10b564: a1 e0 ca 11 00 mov 0x11cae0,%eax 10b569: 48 dec %eax 10b56a: a3 e0 ca 11 00 mov %eax,0x11cae0 10b56f: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10b572: c9 leave 10b573: c3 ret =============================================================================== 00113240 <_Timer_Server_body>: * @param[in] ignored is the the task argument that is ignored */ Thread _Timer_Server_body( uint32_t ignored ) { 113240: 55 push %ebp 113241: 89 e5 mov %esp,%ebp 113243: 57 push %edi 113244: 56 push %esi 113245: 53 push %ebx 113246: 83 ec 1c sub $0x1c,%esp * @return NULL if unsuccessful and a pointer to the block if successful */ void *_Protected_heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment 113249: 8d 75 e8 lea -0x18(%ebp),%esi 11324c: 8d 45 ec lea -0x14(%ebp),%eax 11324f: 89 45 e0 mov %eax,-0x20(%ebp) 113252: 89 45 e8 mov %eax,-0x18(%ebp) 113255: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) 11325c: 89 75 f0 mov %esi,-0x10(%ebp) /* * Initialize the "last time" markers to indicate the timer that * the server was initiated. */ _Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot; 11325f: a1 30 29 13 00 mov 0x132930,%eax 113264: a3 64 27 13 00 mov %eax,0x132764 _Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch; 113269: a1 70 28 13 00 mov 0x132870,%eax 11326e: a3 60 27 13 00 mov %eax,0x132760 /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 113273: a1 e0 27 13 00 mov 0x1327e0,%eax 113278: 40 inc %eax 113279: a3 e0 27 13 00 mov %eax,0x1327e0 /* * Insert the timers that were inserted before we got to run. * This should be done with dispatching disabled. */ _Thread_Disable_dispatch(); _Timer_Server_process_insertions(); 11327e: e8 6d ff ff ff call 1131f0 <_Timer_Server_process_insertions> _Thread_Enable_dispatch(); 113283: e8 90 24 00 00 call 115718 <_Thread_Enable_dispatch> ticks = snapshot - _Timer_Server_ticks_last_time; else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; _Timer_Server_ticks_last_time = snapshot; _Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire ); 113288: 89 f7 mov %esi,%edi 11328a: a1 e0 27 13 00 mov 0x1327e0,%eax 11328f: 40 inc %eax 113290: a3 e0 27 13 00 mov %eax,0x1327e0 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( _Timer_Server, STATES_DELAYING ); 113295: 51 push %ecx 113296: 51 push %ecx 113297: 6a 08 push $0x8 113299: ff 35 18 2b 13 00 pushl 0x132b18 11329f: e8 90 2d 00 00 call 116034 <_Thread_Set_state> * to obtain the size of * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( 1132a4: 8b 15 54 27 13 00 mov 0x132754,%edx _Timer_Server_reset_ticks_timer(); 1132aa: 83 c4 10 add $0x10,%esp 1132ad: 81 fa 58 27 13 00 cmp $0x132758,%edx 1132b3: 74 1e je 1132d3 <_Timer_Server_body+0x93> 1132b5: a1 18 2b 13 00 mov 0x132b18,%eax Heap_Control *the_heap, 1132ba: 8b 52 10 mov 0x10(%edx),%edx 1132bd: 89 50 54 mov %edx,0x54(%eax) void *starting_address, size_t *size 1132c0: 52 push %edx 1132c1: 52 push %edx 1132c2: 83 c0 48 add $0x48,%eax 1132c5: 50 push %eax 1132c6: 68 c0 28 13 00 push $0x1328c0 1132cb: e8 64 35 00 00 call 116834 <_Watchdog_Insert> 1132d0: 83 c4 10 add $0x10,%esp * to obtain the size of * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( 1132d3: a1 68 27 13 00 mov 0x132768,%eax _Timer_Server_reset_seconds_timer(); 1132d8: 3d 6c 27 13 00 cmp $0x13276c,%eax 1132dd: 74 1c je 1132fb <_Timer_Server_body+0xbb> * @return TRUE if successfully able to resize the block. * FALSE if the block can't be resized in place. */ bool _Protected_heap_Resize_block( Heap_Control *the_heap, void *starting_address, 1132df: 8b 40 10 mov 0x10(%eax),%eax 1132e2: a3 8c 27 13 00 mov %eax,0x13278c size_t size ); 1132e7: 50 push %eax 1132e8: 50 push %eax 1132e9: 68 80 27 13 00 push $0x132780 1132ee: 68 b4 28 13 00 push $0x1328b4 1132f3: e8 3c 35 00 00 call 116834 <_Watchdog_Insert> 1132f8: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 1132fb: e8 18 24 00 00 call 115718 <_Thread_Enable_dispatch> /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 113300: a1 e0 27 13 00 mov 0x1327e0,%eax 113305: 40 inc %eax 113306: a3 e0 27 13 00 mov %eax,0x1327e0 /* * At this point, at least one of the timers this task relies * upon has fired. Stop them both while we process any outstanding * timers. Before we block, we will restart them. */ _Timer_Server_stop_ticks_timer(); 11330b: 83 ec 0c sub $0xc,%esp 11330e: a1 18 2b 13 00 mov 0x132b18,%eax 113313: 83 c0 48 add $0x48,%eax 113316: 50 push %eax 113317: e8 30 36 00 00 call 11694c <_Watchdog_Remove> _Timer_Server_stop_seconds_timer(); 11331c: c7 04 24 80 27 13 00 movl $0x132780,(%esp) 113323: e8 24 36 00 00 call 11694c <_Watchdog_Remove> ) { Watchdog_Interval snapshot; Watchdog_Interval ticks; snapshot = _Watchdog_Ticks_since_boot; 113328: 8b 15 30 29 13 00 mov 0x132930,%edx if ( snapshot >= _Timer_Server_ticks_last_time ) 11332e: a1 64 27 13 00 mov 0x132764,%eax 113333: 83 c4 10 add $0x10,%esp 113336: 39 c2 cmp %eax,%edx 113338: 72 08 jb 113342 <_Timer_Server_body+0x102><== NEVER TAKEN ticks = snapshot - _Timer_Server_ticks_last_time; 11333a: 89 d1 mov %edx,%ecx 11333c: 29 c1 sub %eax,%ecx 11333e: 89 c8 mov %ecx,%eax 113340: eb 04 jmp 113346 <_Timer_Server_body+0x106> else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; 113342: f7 d0 not %eax <== NOT EXECUTED 113344: 01 d0 add %edx,%eax <== NOT EXECUTED _Timer_Server_ticks_last_time = snapshot; 113346: 89 15 64 27 13 00 mov %edx,0x132764 _Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire ); 11334c: 53 push %ebx 11334d: 57 push %edi 11334e: 50 push %eax 11334f: 68 54 27 13 00 push $0x132754 113354: e8 4b 34 00 00 call 1167a4 <_Watchdog_Adjust_to_chain> /* * 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 _Timer_Seconds_chain to indicate this. */ snapshot = _TOD_Seconds_since_epoch; 113359: 8b 1d 70 28 13 00 mov 0x132870,%ebx if ( snapshot > _Timer_Server_seconds_last_time ) { 11335f: a1 60 27 13 00 mov 0x132760,%eax 113364: 83 c4 10 add $0x10,%esp 113367: 39 c3 cmp %eax,%ebx 113369: 76 13 jbe 11337e <_Timer_Server_body+0x13e> /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ ticks = snapshot - _Timer_Server_seconds_last_time; _Watchdog_Adjust_to_chain( &_Timer_Seconds_chain, ticks, to_fire ); 11336b: 51 push %ecx 11336c: 57 push %edi 11336d: 89 da mov %ebx,%edx 11336f: 29 c2 sub %eax,%edx 113371: 52 push %edx 113372: 68 68 27 13 00 push $0x132768 113377: e8 28 34 00 00 call 1167a4 <_Watchdog_Adjust_to_chain> 11337c: eb 12 jmp 113390 <_Timer_Server_body+0x150> } else if ( snapshot < _Timer_Server_seconds_last_time ) { 11337e: 73 13 jae 113393 <_Timer_Server_body+0x153> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ ticks = _Timer_Server_seconds_last_time - snapshot; _Watchdog_Adjust( &_Timer_Seconds_chain, WATCHDOG_BACKWARD, ticks ); 113380: 52 push %edx 113381: 29 d8 sub %ebx,%eax 113383: 50 push %eax 113384: 6a 01 push $0x1 113386: 68 68 27 13 00 push $0x132768 11338b: e8 a8 33 00 00 call 116738 <_Watchdog_Adjust> 113390: 83 c4 10 add $0x10,%esp } _Timer_Server_seconds_last_time = snapshot; 113393: 89 1d 60 27 13 00 mov %ebx,0x132760 _Timer_Server_process_seconds_chain( &to_fire ); /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 113399: e8 52 fe ff ff call 1131f0 <_Timer_Server_process_insertions> /* * Enable dispatching to process the set that are ready "to fire." */ _Thread_Enable_dispatch(); 11339e: e8 75 23 00 00 call 115718 <_Thread_Enable_dispatch> */ while (1) { Watchdog_Control *watch; ISR_Level level; _ISR_Disable( level ); 1133a3: 9c pushf 1133a4: fa cli 1133a5: 59 pop %ecx * to obtain the size of * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( 1133a6: 8b 55 e8 mov -0x18(%ebp),%edx 1133a9: 3b 55 e0 cmp -0x20(%ebp),%edx 1133ac: 74 0c je 1133ba <_Timer_Server_body+0x17a> 1133ae: 8b 02 mov (%edx),%eax 1133b0: 89 45 e8 mov %eax,-0x18(%ebp) 1133b3: 89 70 04 mov %esi,0x4(%eax) watch = (Watchdog_Control *) _Chain_Get_unprotected( &to_fire ); if ( watch == NULL ) { 1133b6: 85 d2 test %edx,%edx 1133b8: 75 07 jne 1133c1 <_Timer_Server_body+0x181><== ALWAYS TAKEN _ISR_Enable( level ); 1133ba: 51 push %ecx 1133bb: 9d popf 1133bc: e9 c9 fe ff ff jmp 11328a <_Timer_Server_body+0x4a> break; } watch->state = WATCHDOG_INACTIVE; 1133c1: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) _ISR_Enable( level ); 1133c8: 51 push %ecx 1133c9: 9d popf (*watch->routine)( watch->id, watch->user_data ); 1133ca: 53 push %ebx 1133cb: 53 push %ebx 1133cc: ff 72 24 pushl 0x24(%edx) 1133cf: ff 72 20 pushl 0x20(%edx) 1133d2: ff 52 1c call *0x1c(%edx) 1133d5: 83 c4 10 add $0x10,%esp 1133d8: eb c9 jmp 1133a3 <_Timer_Server_body+0x163> =============================================================================== 001131f0 <_Timer_Server_process_insertions>: * onto one of the Timer Server chains. * * @note It is only to be called from the Timer Server task. */ static void _Timer_Server_process_insertions(void) { 1131f0: 55 push %ebp 1131f1: 89 e5 mov %esp,%ebp 1131f3: 83 ec 08 sub $0x8,%esp Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 1131f6: 83 ec 0c sub $0xc,%esp 1131f9: 68 74 27 13 00 push $0x132774 1131fe: e8 05 08 00 00 call 113a08 <_Chain_Get> if ( the_timer == NULL ) 113203: 83 c4 10 add $0x10,%esp 113206: 85 c0 test %eax,%eax 113208: 74 34 je 11323e <_Timer_Server_process_insertions+0x4e> break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 11320a: 8b 50 38 mov 0x38(%eax),%edx 11320d: 83 fa 01 cmp $0x1,%edx 113210: 75 0d jne 11321f <_Timer_Server_process_insertions+0x2f> _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 113212: 51 push %ecx 113213: 51 push %ecx 113214: 83 c0 10 add $0x10,%eax 113217: 50 push %eax 113218: 68 54 27 13 00 push $0x132754 11321d: eb 10 jmp 11322f <_Timer_Server_process_insertions+0x3f> } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 11321f: 83 fa 03 cmp $0x3,%edx 113222: 75 13 jne 113237 <_Timer_Server_process_insertions+0x47><== NEVER TAKEN _Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker ); 113224: 52 push %edx 113225: 52 push %edx 113226: 83 c0 10 add $0x10,%eax 113229: 50 push %eax 11322a: 68 68 27 13 00 push $0x132768 11322f: e8 00 36 00 00 call 116834 <_Watchdog_Insert> 113234: 83 c4 10 add $0x10,%esp } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 113237: e8 b4 ff ff ff call 1131f0 <_Timer_Server_process_insertions> 11323c: eb b8 jmp 1131f6 <_Timer_Server_process_insertions+0x6> } } 11323e: c9 leave 11323f: c3 ret =============================================================================== 0010ce64 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 10ce64: 55 push %ebp 10ce65: 89 e5 mov %esp,%ebp 10ce67: 57 push %edi 10ce68: 56 push %esi 10ce69: 53 push %ebx 10ce6a: 83 ec 1c sub $0x1c,%esp 10ce6d: 8b 45 08 mov 0x8(%ebp),%eax /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10ce70: 8b 18 mov (%eax),%ebx left += lhs->tv_nsec; 10ce72: 8b 40 04 mov 0x4(%eax),%eax 10ce75: 89 45 e4 mov %eax,-0x1c(%ebp) right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10ce78: b8 00 ca 9a 3b mov $0x3b9aca00,%eax 10ce7d: 8b 4d 0c mov 0xc(%ebp),%ecx 10ce80: f7 29 imull (%ecx) 10ce82: 89 c6 mov %eax,%esi 10ce84: 89 d7 mov %edx,%edi right += rhs->tv_nsec; 10ce86: 8b 41 04 mov 0x4(%ecx),%eax 10ce89: 99 cltd 10ce8a: 01 c6 add %eax,%esi 10ce8c: 11 d7 adc %edx,%edi if ( right == 0 ) { 10ce8e: 89 f8 mov %edi,%eax 10ce90: 09 f0 or %esi,%eax 10ce92: 75 14 jne 10cea8 <_Timespec_Divide+0x44> <== ALWAYS TAKEN *ival_percentage = 0; 10ce94: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 10ce97: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED *fval_percentage = 0; 10ce9d: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 10cea0: c7 01 00 00 00 00 movl $0x0,(%ecx) <== NOT EXECUTED 10cea6: eb 70 jmp 10cf18 <_Timespec_Divide+0xb4> <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10cea8: b8 00 ca 9a 3b mov $0x3b9aca00,%eax 10cead: f7 eb imul %ebx 10ceaf: 89 45 e8 mov %eax,-0x18(%ebp) 10ceb2: 89 55 ec mov %edx,-0x14(%ebp) * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 10ceb5: 8b 45 e4 mov -0x1c(%ebp),%eax 10ceb8: 99 cltd 10ceb9: 01 45 e8 add %eax,-0x18(%ebp) 10cebc: 11 55 ec adc %edx,-0x14(%ebp) 10cebf: 69 5d ec a0 86 01 00 imul $0x186a0,-0x14(%ebp),%ebx 10cec6: b9 a0 86 01 00 mov $0x186a0,%ecx 10cecb: 8b 45 e8 mov -0x18(%ebp),%eax 10cece: f7 e1 mul %ecx 10ced0: 89 45 d8 mov %eax,-0x28(%ebp) 10ced3: 01 da add %ebx,%edx 10ced5: 89 55 dc mov %edx,-0x24(%ebp) 10ced8: 57 push %edi 10ced9: 56 push %esi 10ceda: ff 75 dc pushl -0x24(%ebp) 10cedd: ff 75 d8 pushl -0x28(%ebp) 10cee0: e8 73 a4 00 00 call 117358 <__udivdi3> 10cee5: 83 c4 10 add $0x10,%esp 10cee8: 89 c3 mov %eax,%ebx 10ceea: 89 d6 mov %edx,%esi *ival_percentage = answer / 1000; 10ceec: 6a 00 push $0x0 10ceee: 68 e8 03 00 00 push $0x3e8 10cef3: 52 push %edx 10cef4: 50 push %eax 10cef5: e8 5e a4 00 00 call 117358 <__udivdi3> 10cefa: 83 c4 10 add $0x10,%esp 10cefd: 8b 4d 10 mov 0x10(%ebp),%ecx 10cf00: 89 01 mov %eax,(%ecx) *fval_percentage = answer % 1000; 10cf02: 6a 00 push $0x0 10cf04: 68 e8 03 00 00 push $0x3e8 10cf09: 56 push %esi 10cf0a: 53 push %ebx 10cf0b: e8 54 a5 00 00 call 117464 <__umoddi3> 10cf10: 83 c4 10 add $0x10,%esp 10cf13: 8b 4d 14 mov 0x14(%ebp),%ecx 10cf16: 89 01 mov %eax,(%ecx) } 10cf18: 8d 65 f4 lea -0xc(%ebp),%esp 10cf1b: 5b pop %ebx 10cf1c: 5e pop %esi 10cf1d: 5f pop %edi 10cf1e: c9 leave 10cf1f: c3 ret =============================================================================== 0010d1ac <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 10d1ac: 55 push %ebp 10d1ad: 89 e5 mov %esp,%ebp 10d1af: 53 push %ebx 10d1b0: 8b 4d 08 mov 0x8(%ebp),%ecx 10d1b3: 8b 5d 0c mov 0xc(%ebp),%ebx if ( lhs->tv_sec > rhs->tv_sec ) 10d1b6: 8b 03 mov (%ebx),%eax 10d1b8: b2 01 mov $0x1,%dl 10d1ba: 39 01 cmp %eax,(%ecx) 10d1bc: 7f 0f jg 10d1cd <_Timespec_Greater_than+0x21><== NEVER TAKEN return TRUE; if ( lhs->tv_sec < rhs->tv_sec ) 10d1be: 7d 04 jge 10d1c4 <_Timespec_Greater_than+0x18><== ALWAYS TAKEN 10d1c0: 31 d2 xor %edx,%edx <== NOT EXECUTED 10d1c2: eb 09 jmp 10d1cd <_Timespec_Greater_than+0x21><== NOT EXECUTED return FALSE; /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) 10d1c4: 8b 41 04 mov 0x4(%ecx),%eax 10d1c7: 3b 43 04 cmp 0x4(%ebx),%eax 10d1ca: 0f 9f c2 setg %dl return TRUE; return FALSE; } 10d1cd: 88 d0 mov %dl,%al 10d1cf: 5b pop %ebx 10d1d0: c9 leave 10d1d1: c3 ret =============================================================================== 0010d1d4 <_Timespec_Less_than>: bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { 10d1d4: 55 push %ebp 10d1d5: 89 e5 mov %esp,%ebp 10d1d7: 53 push %ebx 10d1d8: 8b 4d 08 mov 0x8(%ebp),%ecx 10d1db: 8b 5d 0c mov 0xc(%ebp),%ebx if ( lhs->tv_sec < rhs->tv_sec ) 10d1de: 8b 03 mov (%ebx),%eax 10d1e0: b2 01 mov $0x1,%dl 10d1e2: 39 01 cmp %eax,(%ecx) 10d1e4: 7c 0f jl 10d1f5 <_Timespec_Less_than+0x21> return TRUE; if ( lhs->tv_sec > rhs->tv_sec ) 10d1e6: 7e 04 jle 10d1ec <_Timespec_Less_than+0x18><== ALWAYS TAKEN 10d1e8: 31 d2 xor %edx,%edx <== NOT EXECUTED 10d1ea: eb 09 jmp 10d1f5 <_Timespec_Less_than+0x21><== NOT EXECUTED return FALSE; /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) 10d1ec: 8b 41 04 mov 0x4(%ecx),%eax 10d1ef: 3b 43 04 cmp 0x4(%ebx),%eax 10d1f2: 0f 9c c2 setl %dl return TRUE; return FALSE; } 10d1f5: 88 d0 mov %dl,%al 10d1f7: 5b pop %ebx 10d1f8: c9 leave 10d1f9: c3 ret =============================================================================== 0010de1c <_User_extensions_Add_API_set>: */ void _User_extensions_Add_API_set ( User_extensions_Control *the_extension ) { 10de1c: 55 push %ebp 10de1d: 89 e5 mov %esp,%ebp 10de1f: 53 push %ebx 10de20: 83 ec 0c sub $0xc,%esp 10de23: 8b 5d 08 mov 0x8(%ebp),%ebx _Chain_Append( &_User_extensions_List, &the_extension->Node ); 10de26: 53 push %ebx 10de27: 68 f8 cc 11 00 push $0x11ccf8 10de2c: e8 1b bc ff ff call 109a4c <_Chain_Append> /* * If a switch handler is present, append it to the switch chain. */ if ( the_extension->Callouts.thread_switch != NULL ) { 10de31: 8b 43 24 mov 0x24(%ebx),%eax 10de34: 83 c4 10 add $0x10,%esp 10de37: 85 c0 test %eax,%eax 10de39: 74 16 je 10de51 <_User_extensions_Add_API_set+0x35><== NEVER TAKEN the_extension->Switch.thread_switch = the_extension->Callouts.thread_switch; 10de3b: 89 43 10 mov %eax,0x10(%ebx) _Chain_Append( 10de3e: 50 push %eax 10de3f: 50 push %eax 10de40: 8d 43 08 lea 0x8(%ebx),%eax 10de43: 50 push %eax 10de44: 68 e4 ca 11 00 push $0x11cae4 10de49: e8 fe bb ff ff call 109a4c <_Chain_Append> 10de4e: 83 c4 10 add $0x10,%esp &_User_extensions_Switches_list, &the_extension->Switch.Node ); } } 10de51: 8b 5d fc mov -0x4(%ebp),%ebx 10de54: c9 leave 10de55: c3 ret =============================================================================== 0010d480 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 10d480: 55 push %ebp 10d481: 89 e5 mov %esp,%ebp 10d483: 53 push %ebx 10d484: 83 ec 10 sub $0x10,%esp 10d487: 8b 5d 08 mov 0x8(%ebp),%ebx _Chain_Extract( &the_extension->Node ); 10d48a: 53 push %ebx 10d48b: e8 38 1d 00 00 call 10f1c8 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 10d490: 83 c4 10 add $0x10,%esp 10d493: 83 7b 24 00 cmpl $0x0,0x24(%ebx) 10d497: 74 0f je 10d4a8 <_User_extensions_Remove_set+0x28><== ALWAYS TAKEN _Chain_Extract( &the_extension->Switch.Node ); 10d499: 8d 43 08 lea 0x8(%ebx),%eax <== NOT EXECUTED 10d49c: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 10d49f: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10d4a2: c9 leave <== NOT EXECUTED /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 10d4a3: e9 20 1d 00 00 jmp 10f1c8 <_Chain_Extract> <== NOT EXECUTED } 10d4a8: 8b 5d fc mov -0x4(%ebp),%ebx 10d4ab: c9 leave 10d4ac: c3 ret =============================================================================== 0010baa8 <_User_extensions_Thread_create>: */ bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 10baa8: 55 push %ebp 10baa9: 89 e5 mov %esp,%ebp 10baab: 56 push %esi 10baac: 53 push %ebx 10baad: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 10bab0: 8b 1d f8 cc 11 00 mov 0x11ccf8,%ebx 10bab6: eb 1b jmp 10bad3 <_User_extensions_Thread_create+0x2b> !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { 10bab8: 8b 43 14 mov 0x14(%ebx),%eax 10babb: 85 c0 test %eax,%eax 10babd: 74 12 je 10bad1 <_User_extensions_Thread_create+0x29> status = (*the_extension->Callouts.thread_create)( 10babf: 52 push %edx 10bac0: 52 push %edx 10bac1: 56 push %esi 10bac2: ff 35 a0 cb 11 00 pushl 0x11cba0 10bac8: ff d0 call *%eax _Thread_Executing, the_thread ); if ( !status ) 10baca: 83 c4 10 add $0x10,%esp 10bacd: 84 c0 test %al,%al 10bacf: 74 0c je 10badd <_User_extensions_Thread_create+0x35><== NEVER TAKEN User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10bad1: 8b 1b mov (%ebx),%ebx Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 10bad3: 81 fb fc cc 11 00 cmp $0x11ccfc,%ebx 10bad9: 75 dd jne 10bab8 <_User_extensions_Thread_create+0x10> 10badb: b0 01 mov $0x1,%al return FALSE; } } return TRUE; } 10badd: 8d 65 f8 lea -0x8(%ebp),%esp 10bae0: 5b pop %ebx 10bae1: 5e pop %esi 10bae2: c9 leave 10bae3: c3 ret =============================================================================== 0010ba39 <_User_extensions_Thread_exitted>: */ void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10ba39: 55 push %ebp 10ba3a: 89 e5 mov %esp,%ebp 10ba3c: 56 push %esi 10ba3d: 53 push %ebx 10ba3e: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10ba41: 8b 1d 00 cd 11 00 mov 0x11cd00,%ebx 10ba47: eb 13 jmp 10ba5c <_User_extensions_Thread_exitted+0x23> !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) 10ba49: 8b 43 2c mov 0x2c(%ebx),%eax 10ba4c: 85 c0 test %eax,%eax 10ba4e: 74 09 je 10ba59 <_User_extensions_Thread_exitted+0x20> (*the_extension->Callouts.thread_exitted)( executing ); 10ba50: 83 ec 0c sub $0xc,%esp 10ba53: 56 push %esi 10ba54: ff d0 call *%eax 10ba56: 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 ) { 10ba59: 8b 5b 04 mov 0x4(%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 10ba5c: 81 fb f8 cc 11 00 cmp $0x11ccf8,%ebx 10ba62: 75 e5 jne 10ba49 <_User_extensions_Thread_exitted+0x10> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 10ba64: 8d 65 f8 lea -0x8(%ebp),%esp 10ba67: 5b pop %ebx 10ba68: 5e pop %esi 10ba69: c9 leave 10ba6a: c3 ret =============================================================================== 0010d1c0 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10d1c0: 55 push %ebp 10d1c1: 89 e5 mov %esp,%ebp 10d1c3: 57 push %edi 10d1c4: 56 push %esi 10d1c5: 53 push %ebx 10d1c6: 83 ec 0c sub $0xc,%esp 10d1c9: 8b 7d 08 mov 0x8(%ebp),%edi 10d1cc: 8b 4d 0c mov 0xc(%ebp),%ecx 10d1cf: 8b 75 10 mov 0x10(%ebp),%esi ISR_Level level; _ISR_Disable( level ); 10d1d2: 9c pushf 10d1d3: fa cli 10d1d4: 5a pop %edx * to obtain the size of * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( 10d1d5: 8b 07 mov (%edi),%eax * @return NULL if unsuccessful and a pointer to the block if successful */ void *_Protected_heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment 10d1d7: 8d 5f 04 lea 0x4(%edi),%ebx 10d1da: 89 5d f0 mov %ebx,-0x10(%ebp) * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 10d1dd: 39 d8 cmp %ebx,%eax 10d1df: 74 41 je 10d222 <_Watchdog_Adjust+0x62> switch ( direction ) { 10d1e1: 85 c9 test %ecx,%ecx 10d1e3: 74 39 je 10d21e <_Watchdog_Adjust+0x5e> 10d1e5: 49 dec %ecx 10d1e6: 75 3a jne 10d222 <_Watchdog_Adjust+0x62> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10d1e8: 01 70 10 add %esi,0x10(%eax) 10d1eb: eb 35 jmp 10d222 <_Watchdog_Adjust+0x62> 10d1ed: 8b 07 mov (%edi),%eax break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 10d1ef: 8b 58 10 mov 0x10(%eax),%ebx 10d1f2: 39 de cmp %ebx,%esi 10d1f4: 73 07 jae 10d1fd <_Watchdog_Adjust+0x3d> _Watchdog_First( header )->delta_interval -= units; 10d1f6: 29 f3 sub %esi,%ebx 10d1f8: 89 58 10 mov %ebx,0x10(%eax) 10d1fb: eb 25 jmp 10d222 <_Watchdog_Adjust+0x62> break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10d1fd: c7 40 10 01 00 00 00 movl $0x1,0x10(%eax) _ISR_Enable( level ); 10d204: 52 push %edx 10d205: 9d popf _Watchdog_Tickle( header ); 10d206: 83 ec 0c sub $0xc,%esp 10d209: 57 push %edi 10d20a: e8 9d 01 00 00 call 10d3ac <_Watchdog_Tickle> _ISR_Disable( level ); 10d20f: 9c pushf 10d210: fa cli 10d211: 5a pop %edx if ( _Chain_Is_empty( header ) ) 10d212: 83 c4 10 add $0x10,%esp 10d215: 8b 45 f0 mov -0x10(%ebp),%eax 10d218: 39 07 cmp %eax,(%edi) 10d21a: 74 06 je 10d222 <_Watchdog_Adjust+0x62> while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 10d21c: 29 de sub %ebx,%esi switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10d21e: 85 f6 test %esi,%esi 10d220: 75 cb jne 10d1ed <_Watchdog_Adjust+0x2d> <== ALWAYS TAKEN } break; } } _ISR_Enable( level ); 10d222: 52 push %edx 10d223: 9d popf } 10d224: 8d 65 f4 lea -0xc(%ebp),%esp 10d227: 5b pop %ebx 10d228: 5e pop %esi 10d229: 5f pop %edi 10d22a: c9 leave 10d22b: c3 ret =============================================================================== 001167a4 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 1167a4: 55 push %ebp 1167a5: 89 e5 mov %esp,%ebp 1167a7: 57 push %edi 1167a8: 56 push %esi 1167a9: 53 push %ebx 1167aa: 83 ec 0c sub $0xc,%esp 1167ad: 8b 75 08 mov 0x8(%ebp),%esi 1167b0: 8b 45 0c mov 0xc(%ebp),%eax Watchdog_Interval units = units_arg; ISR_Level level; Chain_Node *node; if ( !units ) { 1167b3: 85 c0 test %eax,%eax 1167b5: 74 74 je 11682b <_Watchdog_Adjust_to_chain+0x87> return; } _ISR_Disable( level ); 1167b7: 9c pushf 1167b8: fa cli 1167b9: 8f 45 ec popl -0x14(%ebp) * @return NULL if unsuccessful and a pointer to the block if successful */ void *_Protected_heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment 1167bc: 8d 7e 04 lea 0x4(%esi),%edi if ( !_Chain_Is_empty( header ) ) { 1167bf: 39 3e cmp %edi,(%esi) 1167c1: 74 64 je 116827 <_Watchdog_Adjust_to_chain+0x83> 1167c3: 8b 55 10 mov 0x10(%ebp),%edx 1167c6: 83 c2 04 add $0x4,%edx 1167c9: 89 55 f0 mov %edx,-0x10(%ebp) 1167cc: 89 c3 mov %eax,%ebx 1167ce: 8b 06 mov (%esi),%eax while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 1167d0: 8b 48 10 mov 0x10(%eax),%ecx 1167d3: 39 cb cmp %ecx,%ebx 1167d5: 73 07 jae 1167de <_Watchdog_Adjust_to_chain+0x3a> _Watchdog_First( header )->delta_interval -= units; 1167d7: 29 d9 sub %ebx,%ecx 1167d9: 89 48 10 mov %ecx,0x10(%eax) 1167dc: eb 49 jmp 116827 <_Watchdog_Adjust_to_chain+0x83> break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 0; 1167de: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) * to obtain the size of * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( 1167e5: 8b 16 mov (%esi),%edx 1167e7: 39 fa cmp %edi,%edx 1167e9: 75 04 jne 1167ef <_Watchdog_Adjust_to_chain+0x4b><== ALWAYS TAKEN 1167eb: 31 d2 xor %edx,%edx <== NOT EXECUTED 1167ed: eb 07 jmp 1167f6 <_Watchdog_Adjust_to_chain+0x52><== NOT EXECUTED 1167ef: 8b 02 mov (%edx),%eax 1167f1: 89 06 mov %eax,(%esi) 1167f3: 89 70 04 mov %esi,0x4(%eax) 1167f6: 8b 45 f0 mov -0x10(%ebp),%eax 1167f9: 89 02 mov %eax,(%edx) 1167fb: 8b 45 10 mov 0x10(%ebp),%eax 1167fe: 8b 40 08 mov 0x8(%eax),%eax 116801: 89 45 e8 mov %eax,-0x18(%ebp) 116804: 8b 45 10 mov 0x10(%ebp),%eax 116807: 89 50 08 mov %edx,0x8(%eax) 11680a: 8b 45 e8 mov -0x18(%ebp),%eax 11680d: 89 10 mov %edx,(%eax) 11680f: 89 42 04 mov %eax,0x4(%edx) do { node = _Chain_Get_unprotected( header ); _Chain_Append_unprotected( to_fire, node ); _ISR_Flash( level ); 116812: ff 75 ec pushl -0x14(%ebp) 116815: 9d popf 116816: fa cli * to obtain the size of * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( 116817: 8b 06 mov (%esi),%eax } while ( !_Chain_Is_empty( header ) && _Watchdog_First( header )->delta_interval == 0 ); 116819: 39 f8 cmp %edi,%eax 11681b: 74 0a je 116827 <_Watchdog_Adjust_to_chain+0x83> 11681d: 83 78 10 00 cmpl $0x0,0x10(%eax) 116821: 74 c2 je 1167e5 <_Watchdog_Adjust_to_chain+0x41> return; } _ISR_Disable( level ); if ( !_Chain_Is_empty( header ) ) { while ( units ) { 116823: 29 cb sub %ecx,%ebx 116825: 75 a7 jne 1167ce <_Watchdog_Adjust_to_chain+0x2a><== NEVER TAKEN break; } } } _ISR_Enable( level ); 116827: ff 75 ec pushl -0x14(%ebp) 11682a: 9d popf } 11682b: 83 c4 0c add $0xc,%esp 11682e: 5b pop %ebx 11682f: 5e pop %esi 116830: 5f pop %edi 116831: c9 leave 116832: c3 ret =============================================================================== 0010bb88 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10bb88: 55 push %ebp 10bb89: 89 e5 mov %esp,%ebp 10bb8b: 57 push %edi 10bb8c: 56 push %esi 10bb8d: 53 push %ebx 10bb8e: 83 ec 04 sub $0x4,%esp 10bb91: 8b 75 0c mov 0xc(%ebp),%esi Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 10bb94: 8b 3d 7c cb 11 00 mov 0x11cb7c,%edi _ISR_Disable( level ); 10bb9a: 9c pushf 10bb9b: fa cli 10bb9c: 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 ) { 10bb9f: 83 7e 08 00 cmpl $0x0,0x8(%esi) 10bba3: 74 09 je 10bbae <_Watchdog_Insert+0x26> <== ALWAYS TAKEN _ISR_Enable( level ); 10bba5: ff 75 f0 pushl -0x10(%ebp) <== NOT EXECUTED 10bba8: 9d popf <== NOT EXECUTED 10bba9: e9 89 00 00 00 jmp 10bc37 <_Watchdog_Insert+0xaf> <== NOT EXECUTED return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10bbae: c7 46 08 01 00 00 00 movl $0x1,0x8(%esi) _Watchdog_Sync_count++; 10bbb5: a1 2c cc 11 00 mov 0x11cc2c,%eax 10bbba: 40 inc %eax 10bbbb: a3 2c cc 11 00 mov %eax,0x11cc2c restart: delta_interval = the_watchdog->initial; 10bbc0: 8b 4e 0c mov 0xc(%esi),%ecx * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 10bbc3: 8b 45 08 mov 0x8(%ebp),%eax 10bbc6: 8b 18 mov (%eax),%ebx ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10bbc8: 85 c9 test %ecx,%ecx 10bbca: 74 35 je 10bc01 <_Watchdog_Insert+0x79> 10bbcc: 83 3b 00 cmpl $0x0,(%ebx) 10bbcf: 74 30 je 10bc01 <_Watchdog_Insert+0x79> break; if ( delta_interval < after->delta_interval ) { 10bbd1: 8b 53 10 mov 0x10(%ebx),%edx 10bbd4: 39 d1 cmp %edx,%ecx 10bbd6: 73 07 jae 10bbdf <_Watchdog_Insert+0x57> after->delta_interval -= delta_interval; 10bbd8: 29 ca sub %ecx,%edx 10bbda: 89 53 10 mov %edx,0x10(%ebx) 10bbdd: eb 22 jmp 10bc01 <_Watchdog_Insert+0x79> * 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 ); 10bbdf: ff 75 f0 pushl -0x10(%ebp) 10bbe2: 9d popf 10bbe3: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10bbe4: 83 7e 08 01 cmpl $0x1,0x8(%esi) 10bbe8: 75 38 jne 10bc22 <_Watchdog_Insert+0x9a> <== NEVER TAKEN goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10bbea: a1 9c cb 11 00 mov 0x11cb9c,%eax 10bbef: 39 f8 cmp %edi,%eax 10bbf1: 76 08 jbe 10bbfb <_Watchdog_Insert+0x73> _Watchdog_Sync_level = insert_isr_nest_level; 10bbf3: 89 3d 9c cb 11 00 mov %edi,0x11cb9c 10bbf9: eb c5 jmp 10bbc0 <_Watchdog_Insert+0x38> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10bbfb: 29 d1 sub %edx,%ecx ); #ifdef __cplusplus } #endif 10bbfd: 8b 1b mov (%ebx),%ebx 10bbff: eb c7 jmp 10bbc8 <_Watchdog_Insert+0x40> * @param[in] starting_address is the starting address of the memory * to add to the heap * @param[in] size is the size in bytes of the memory area to add * @return a status indicating success or the reason for failure */ bool _Protected_heap_Extend( 10bc01: c7 46 08 02 00 00 00 movl $0x2,0x8(%esi) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10bc08: 89 4e 10 mov %ecx,0x10(%esi) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10bc0b: 8b 43 04 mov 0x4(%ebx),%eax 10bc0e: 89 46 04 mov %eax,0x4(%esi) 10bc11: 8b 10 mov (%eax),%edx 10bc13: 89 30 mov %esi,(%eax) 10bc15: 89 16 mov %edx,(%esi) 10bc17: 89 72 04 mov %esi,0x4(%edx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10bc1a: a1 30 cc 11 00 mov 0x11cc30,%eax 10bc1f: 89 46 14 mov %eax,0x14(%esi) exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 10bc22: 89 3d 9c cb 11 00 mov %edi,0x11cb9c _Watchdog_Sync_count--; 10bc28: a1 2c cc 11 00 mov 0x11cc2c,%eax 10bc2d: 48 dec %eax 10bc2e: a3 2c cc 11 00 mov %eax,0x11cc2c _ISR_Enable( level ); 10bc33: ff 75 f0 pushl -0x10(%ebp) 10bc36: 9d popf } 10bc37: 58 pop %eax 10bc38: 5b pop %ebx 10bc39: 5e pop %esi 10bc3a: 5f pop %edi 10bc3b: c9 leave 10bc3c: c3 ret =============================================================================== 0010bca0 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10bca0: 55 push %ebp 10bca1: 89 e5 mov %esp,%ebp 10bca3: 56 push %esi 10bca4: 53 push %ebx 10bca5: 8b 4d 08 mov 0x8(%ebp),%ecx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10bca8: 9c pushf 10bca9: fa cli 10bcaa: 5e pop %esi previous_state = the_watchdog->state; 10bcab: 8b 59 08 mov 0x8(%ecx),%ebx switch ( previous_state ) { 10bcae: 83 fb 01 cmp $0x1,%ebx 10bcb1: 74 09 je 10bcbc <_Watchdog_Remove+0x1c> <== NEVER TAKEN 10bcb3: 72 41 jb 10bcf6 <_Watchdog_Remove+0x56> 10bcb5: 83 fb 03 cmp $0x3,%ebx 10bcb8: 77 3c ja 10bcf6 <_Watchdog_Remove+0x56> <== NEVER TAKEN 10bcba: eb 09 jmp 10bcc5 <_Watchdog_Remove+0x25> /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 10bcbc: c7 41 08 00 00 00 00 movl $0x0,0x8(%ecx) <== NOT EXECUTED 10bcc3: eb 31 jmp 10bcf6 <_Watchdog_Remove+0x56> <== NOT EXECUTED break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10bcc5: c7 41 08 00 00 00 00 movl $0x0,0x8(%ecx) ); #ifdef __cplusplus } #endif 10bccc: 8b 11 mov (%ecx),%edx next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10bcce: 83 3a 00 cmpl $0x0,(%edx) 10bcd1: 74 06 je 10bcd9 <_Watchdog_Remove+0x39> next_watchdog->delta_interval += the_watchdog->delta_interval; 10bcd3: 8b 41 10 mov 0x10(%ecx),%eax 10bcd6: 01 42 10 add %eax,0x10(%edx) if ( _Watchdog_Sync_count ) 10bcd9: a1 2c cc 11 00 mov 0x11cc2c,%eax 10bcde: 85 c0 test %eax,%eax 10bce0: 74 0a je 10bcec <_Watchdog_Remove+0x4c> <== ALWAYS TAKEN _Watchdog_Sync_level = _ISR_Nest_level; 10bce2: a1 7c cb 11 00 mov 0x11cb7c,%eax <== NOT EXECUTED 10bce7: a3 9c cb 11 00 mov %eax,0x11cb9c <== NOT EXECUTED 10bcec: 8b 11 mov (%ecx),%edx 10bcee: 8b 41 04 mov 0x4(%ecx),%eax 10bcf1: 89 42 04 mov %eax,0x4(%edx) 10bcf4: 89 10 mov %edx,(%eax) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10bcf6: a1 30 cc 11 00 mov 0x11cc30,%eax 10bcfb: 89 41 18 mov %eax,0x18(%ecx) _ISR_Enable( level ); 10bcfe: 56 push %esi 10bcff: 9d popf return( previous_state ); } 10bd00: 89 d8 mov %ebx,%eax 10bd02: 5b pop %ebx 10bd03: 5e pop %esi 10bd04: c9 leave 10bd05: c3 ret =============================================================================== 0010bd08 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10bd08: 55 push %ebp 10bd09: 89 e5 mov %esp,%ebp 10bd0b: 57 push %edi 10bd0c: 56 push %esi 10bd0d: 53 push %ebx 10bd0e: 83 ec 0c sub $0xc,%esp 10bd11: 8b 7d 08 mov 0x8(%ebp),%edi * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 10bd14: 9c pushf 10bd15: fa cli 10bd16: 5e pop %esi * to obtain the size of * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( 10bd17: 8b 17 mov (%edi),%edx * @return NULL if unsuccessful and a pointer to the block if successful */ void *_Protected_heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment 10bd19: 8d 47 04 lea 0x4(%edi),%eax 10bd1c: 89 45 f0 mov %eax,-0x10(%ebp) if ( _Chain_Is_empty( header ) ) 10bd1f: 39 c2 cmp %eax,%edx 10bd21: 74 44 je 10bd67 <_Watchdog_Tickle+0x5f> 10bd23: 89 d3 mov %edx,%ebx * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { 10bd25: 8b 42 10 mov 0x10(%edx),%eax 10bd28: 85 c0 test %eax,%eax 10bd2a: 74 08 je 10bd34 <_Watchdog_Tickle+0x2c> <== NEVER TAKEN the_watchdog->delta_interval--; 10bd2c: 48 dec %eax 10bd2d: 89 42 10 mov %eax,0x10(%edx) if ( the_watchdog->delta_interval != 0 ) 10bd30: 85 c0 test %eax,%eax 10bd32: 75 33 jne 10bd67 <_Watchdog_Tickle+0x5f> goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10bd34: 83 ec 0c sub $0xc,%esp 10bd37: 53 push %ebx 10bd38: e8 63 ff ff ff call 10bca0 <_Watchdog_Remove> _ISR_Enable( level ); 10bd3d: 56 push %esi 10bd3e: 9d popf switch( watchdog_state ) { 10bd3f: 83 c4 10 add $0x10,%esp 10bd42: 83 f8 02 cmp $0x2,%eax 10bd45: 75 0e jne 10bd55 <_Watchdog_Tickle+0x4d> <== NEVER TAKEN case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10bd47: 50 push %eax 10bd48: 50 push %eax 10bd49: ff 73 24 pushl 0x24(%ebx) 10bd4c: ff 73 20 pushl 0x20(%ebx) 10bd4f: ff 53 1c call *0x1c(%ebx) 10bd52: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10bd55: 9c pushf 10bd56: fa cli 10bd57: 5e pop %esi 10bd58: 8b 07 mov (%edi),%eax the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10bd5a: 3b 45 f0 cmp -0x10(%ebp),%eax 10bd5d: 74 08 je 10bd67 <_Watchdog_Tickle+0x5f> 10bd5f: 89 c3 mov %eax,%ebx 10bd61: 83 78 10 00 cmpl $0x0,0x10(%eax) 10bd65: eb cb jmp 10bd32 <_Watchdog_Tickle+0x2a> leave: _ISR_Enable(level); 10bd67: 56 push %esi 10bd68: 9d popf } 10bd69: 8d 65 f4 lea -0xc(%ebp),%esp 10bd6c: 5b pop %ebx 10bd6d: 5e pop %esi 10bd6e: 5f pop %edi 10bd6f: c9 leave 10bd70: c3 ret =============================================================================== 0010bdc6 <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 10bdc6: 55 push %ebp 10bdc7: 89 e5 mov %esp,%ebp 10bdc9: 57 push %edi 10bdca: 83 ec 14 sub $0x14,%esp 10bdcd: 8b 55 08 mov 0x8(%ebp),%edx uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 10bdd0: 85 d2 test %edx,%edx 10bdd2: 74 05 je 10bdd9 <_Workspace_Handler_initialization+0x13> 10bdd4: f6 c2 03 test $0x3,%dl 10bdd7: 74 05 je 10bdde <_Workspace_Handler_initialization+0x18><== ALWAYS TAKEN _Internal_error_Occurred( 10bdd9: 51 push %ecx 10bdda: 6a 02 push $0x2 10bddc: eb 2e jmp 10be0c <_Workspace_Handler_initialization+0x46> INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 10bdde: a1 78 cb 11 00 mov 0x11cb78,%eax 10bde3: 80 78 28 00 cmpb $0x0,0x28(%eax) 10bde7: 74 09 je 10bdf2 <_Workspace_Handler_initialization+0x2c><== ALWAYS TAKEN memset( starting_address, 0, size ); 10bde9: 31 c0 xor %eax,%eax 10bdeb: 89 d7 mov %edx,%edi <== NOT EXECUTED 10bded: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 10bdf0: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED memory_available = _Heap_Initialize( 10bdf2: 6a 04 push $0x4 10bdf4: ff 75 0c pushl 0xc(%ebp) 10bdf7: 52 push %edx 10bdf8: 68 04 cb 11 00 push $0x11cb04 10bdfd: e8 8a e1 ff ff call 109f8c <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 10be02: 83 c4 10 add $0x10,%esp 10be05: 85 c0 test %eax,%eax 10be07: 75 0c jne 10be15 <_Workspace_Handler_initialization+0x4f><== ALWAYS TAKEN _Internal_error_Occurred( 10be09: 52 push %edx <== NOT EXECUTED 10be0a: 6a 03 push $0x3 <== NOT EXECUTED 10be0c: 6a 01 push $0x1 10be0e: 6a 00 push $0x0 10be10: e8 3f e3 ff ff call 10a154 <_Internal_error_Occurred> INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 10be15: 8b 7d fc mov -0x4(%ebp),%edi 10be18: c9 leave 10be19: c3 ret =============================================================================== 00109568 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 109568: 55 push %ebp 109569: 89 e5 mov %esp,%ebp 10956b: 57 push %edi 10956c: 56 push %esi 10956d: 53 push %ebx 10956e: 83 ec 1c sub $0x1c,%esp 109571: 8b 75 0c mov 0xc(%ebp),%esi 109574: 8b 55 10 mov 0x10(%ebp),%edx 109577: 8b 7d 14 mov 0x14(%ebp),%edi Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 10957a: b8 03 00 00 00 mov $0x3,%eax 10957f: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 109583: 0f 84 90 00 00 00 je 109619 <== NEVER TAKEN return RTEMS_INVALID_NAME; if ( !id ) 109589: b8 09 00 00 00 mov $0x9,%eax 10958e: 85 ff test %edi,%edi 109590: 0f 84 83 00 00 00 je 109619 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 109596: f7 c6 10 00 00 00 test $0x10,%esi 10959c: 74 12 je 1095b0 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 10959e: b8 0a 00 00 00 mov $0xa,%eax 1095a3: 85 d2 test %edx,%edx 1095a5: 74 72 je 109619 if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 1095a7: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) 1095ae: eb 07 jmp 1095b7 if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 1095b0: c7 45 ec 01 00 00 00 movl $0x1,-0x14(%ebp) the_attributes.maximum_count = maximum_waiters; 1095b7: 89 55 f0 mov %edx,-0x10(%ebp) /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 1095ba: a1 f4 f4 11 00 mov 0x11f4f4,%eax 1095bf: 40 inc %eax 1095c0: a3 f4 f4 11 00 mov %eax,0x11f4f4 #ifdef __cplusplus extern "C" { #endif /** 1095c5: 83 ec 0c sub $0xc,%esp 1095c8: 68 fc f3 11 00 push $0x11f3fc 1095cd: e8 c2 1a 00 00 call 10b094 <_Objects_Allocate> 1095d2: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 1095d4: 83 c4 10 add $0x10,%esp 1095d7: 85 c0 test %eax,%eax 1095d9: 75 0c jne 1095e7 _Thread_Enable_dispatch(); 1095db: e8 b8 26 00 00 call 10bc98 <_Thread_Enable_dispatch> 1095e0: b8 05 00 00 00 mov $0x5,%eax 1095e5: eb 32 jmp 109619 return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 1095e7: 89 70 10 mov %esi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 1095ea: 50 push %eax 1095eb: 50 push %eax 1095ec: 8d 45 ec lea -0x14(%ebp),%eax 1095ef: 50 push %eax 1095f0: 8d 43 14 lea 0x14(%ebx),%eax 1095f3: 50 push %eax 1095f4: e8 67 12 00 00 call 10a860 <_CORE_barrier_Initialize> 1095f9: 8b 4b 08 mov 0x8(%ebx),%ecx 1095fc: 0f b7 d1 movzwl %cx,%edx 1095ff: a1 18 f4 11 00 mov 0x11f418,%eax 109604: 89 1c 90 mov %ebx,(%eax,%edx,4) 109607: 8b 45 08 mov 0x8(%ebp),%eax 10960a: 89 43 0c mov %eax,0xc(%ebx) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 10960d: 89 0f mov %ecx,(%edi) _Thread_Enable_dispatch(); 10960f: e8 84 26 00 00 call 10bc98 <_Thread_Enable_dispatch> 109614: 31 c0 xor %eax,%eax 109616: 83 c4 10 add $0x10,%esp return RTEMS_SUCCESSFUL; } 109619: 8d 65 f4 lea -0xc(%ebp),%esp 10961c: 5b pop %ebx 10961d: 5e pop %esi 10961e: 5f pop %edi 10961f: c9 leave 109620: c3 ret =============================================================================== 001096a8 : rtems_status_code rtems_barrier_release( rtems_id id, uint32_t *released ) { 1096a8: 55 push %ebp 1096a9: 89 e5 mov %esp,%ebp 1096ab: 56 push %esi 1096ac: 53 push %ebx 1096ad: 83 ec 10 sub $0x10,%esp 1096b0: 8b 5d 08 mov 0x8(%ebp),%ebx 1096b3: 8b 75 0c mov 0xc(%ebp),%esi Barrier_Control *the_barrier; Objects_Locations location; if ( !released ) 1096b6: b8 09 00 00 00 mov $0x9,%eax 1096bb: 85 f6 test %esi,%esi 1096bd: 74 39 je 1096f8 <== NEVER TAKEN * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory * to add to the heap 1096bf: 52 push %edx 1096c0: 8d 45 f4 lea -0xc(%ebp),%eax 1096c3: 50 push %eax 1096c4: 53 push %ebx 1096c5: 68 fc f3 11 00 push $0x11f3fc 1096ca: e8 09 1e 00 00 call 10b4d8 <_Objects_Get> 1096cf: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 1096d1: 83 c4 10 add $0x10,%esp 1096d4: b8 04 00 00 00 mov $0x4,%eax 1096d9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 1096dd: 75 19 jne 1096f8 case OBJECTS_LOCAL: *released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL ); 1096df: 50 push %eax 1096e0: 6a 00 push $0x0 1096e2: 53 push %ebx 1096e3: 8d 42 14 lea 0x14(%edx),%eax 1096e6: 50 push %eax 1096e7: e8 a8 11 00 00 call 10a894 <_CORE_barrier_Release> 1096ec: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 1096ee: e8 a5 25 00 00 call 10bc98 <_Thread_Enable_dispatch> 1096f3: 31 c0 xor %eax,%eax 1096f5: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1096f8: 8d 65 f8 lea -0x8(%ebp),%esp 1096fb: 5b pop %ebx 1096fc: 5e pop %esi 1096fd: c9 leave 1096fe: c3 ret =============================================================================== 00108984 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 108984: 55 push %ebp 108985: 89 e5 mov %esp,%ebp 108987: 53 push %ebx 108988: 83 ec 04 sub $0x4,%esp 10898b: 8b 55 08 mov 0x8(%ebp),%edx 10898e: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !time_buffer ) 108991: b8 09 00 00 00 mov $0x9,%eax 108996: 85 db test %ebx,%ebx 108998: 74 44 je 1089de <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; switch ( option ) { 10899a: b8 0a 00 00 00 mov $0xa,%eax 10899f: 83 fa 04 cmp $0x4,%edx 1089a2: 77 3a ja 1089de 1089a4: ff 24 95 18 68 11 00 jmp *0x116818(,%edx,4) case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 1089ab: 89 5d 08 mov %ebx,0x8(%ebp) break; } return RTEMS_INVALID_NUMBER; } 1089ae: 58 pop %eax 1089af: 5b pop %ebx 1089b0: c9 leave if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; switch ( option ) { case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 1089b1: e9 76 00 00 00 jmp 108a2c case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH: return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 1089b6: 89 5d 08 mov %ebx,0x8(%ebp) break; } return RTEMS_INVALID_NUMBER; } 1089b9: 5b pop %ebx 1089ba: 5b pop %ebx 1089bb: c9 leave switch ( option ) { case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH: return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 1089bc: e9 23 00 00 00 jmp 1089e4 case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 1089c1: e8 5a 00 00 00 call 108a20 1089c6: eb 05 jmp 1089cd return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TICKS_PER_SECOND: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 1089c8: e8 3f 00 00 00 call 108a0c 1089cd: 89 03 mov %eax,(%ebx) 1089cf: 31 c0 xor %eax,%eax 1089d1: eb 0b jmp 1089de return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TIME_VALUE: return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 1089d3: 89 5d 08 mov %ebx,0x8(%ebp) break; } return RTEMS_INVALID_NUMBER; } 1089d6: 59 pop %ecx 1089d7: 5b pop %ebx 1089d8: c9 leave *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TIME_VALUE: return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 1089d9: e9 ea 00 00 00 jmp 108ac8 break; } return RTEMS_INVALID_NUMBER; } 1089de: 5a pop %edx 1089df: 5b pop %ebx 1089e0: c9 leave 1089e1: c3 ret =============================================================================== 001089e4 : #include rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { 1089e4: 55 push %ebp 1089e5: 89 e5 mov %esp,%ebp 1089e7: 8b 55 08 mov 0x8(%ebp),%edx if ( !the_interval ) 1089ea: b8 09 00 00 00 mov $0x9,%eax 1089ef: 85 d2 test %edx,%edx 1089f1: 74 17 je 108a0a <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 1089f3: b8 0b 00 00 00 mov $0xb,%eax 1089f8: 80 3d f4 ca 11 00 00 cmpb $0x0,0x11caf4 1089ff: 74 09 je 108a0a return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch; 108a01: a1 70 cb 11 00 mov 0x11cb70,%eax 108a06: 89 02 mov %eax,(%edx) 108a08: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 108a0a: c9 leave 108a0b: c3 ret =============================================================================== 00108a2c : #include rtems_status_code rtems_clock_get_tod( rtems_time_of_day *time_buffer ) { 108a2c: 55 push %ebp 108a2d: 89 e5 mov %esp,%ebp 108a2f: 56 push %esi 108a30: 53 push %ebx 108a31: 83 ec 50 sub $0x50,%esp 108a34: 8b 75 08 mov 0x8(%ebp),%esi rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 108a37: b8 09 00 00 00 mov $0x9,%eax 108a3c: 85 f6 test %esi,%esi 108a3e: 74 7f je 108abf <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 108a40: b8 0b 00 00 00 mov $0xb,%eax 108a45: 80 3d f4 ca 11 00 00 cmpb $0x0,0x11caf4 108a4c: 74 71 je 108abf ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** 108a4e: 9c pushf 108a4f: fa cli 108a50: 5b pop %ebx * This routine grows @a the_heap memory area using the size bytes which 108a51: 83 ec 0c sub $0xc,%esp 108a54: 8d 45 e8 lea -0x18(%ebp),%eax 108a57: 50 push %eax 108a58: e8 3f 14 00 00 call 109e9c <_TOD_Get> * begin at @a starting_address. 108a5d: 53 push %ebx 108a5e: 9d popf * * @param[in] the_heap is the heap to operate upon 108a5f: 8b 45 e8 mov -0x18(%ebp),%eax 108a62: 89 45 f0 mov %eax,-0x10(%ebp) * @param[in] starting_address is the starting address of the memory 108a65: 8b 45 ec mov -0x14(%ebp),%eax 108a68: b9 e8 03 00 00 mov $0x3e8,%ecx 108a6d: 31 d2 xor %edx,%edx 108a6f: f7 f1 div %ecx 108a71: 89 45 f4 mov %eax,-0xc(%ebp) /* Obtain the current time */ _TOD_Get_timeval( &now ); /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); 108a74: 58 pop %eax 108a75: 5a pop %edx 108a76: 8d 45 c4 lea -0x3c(%ebp),%eax 108a79: 50 push %eax 108a7a: 8d 45 f0 lea -0x10(%ebp),%eax 108a7d: 50 push %eax 108a7e: e8 95 63 00 00 call 10ee18 /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 108a83: 8b 45 d8 mov -0x28(%ebp),%eax 108a86: 05 6c 07 00 00 add $0x76c,%eax 108a8b: 89 06 mov %eax,(%esi) tmbuf->month = time.tm_mon + 1; 108a8d: 8b 45 d4 mov -0x2c(%ebp),%eax 108a90: 40 inc %eax 108a91: 89 46 04 mov %eax,0x4(%esi) tmbuf->day = time.tm_mday; 108a94: 8b 45 d0 mov -0x30(%ebp),%eax 108a97: 89 46 08 mov %eax,0x8(%esi) tmbuf->hour = time.tm_hour; 108a9a: 8b 45 cc mov -0x34(%ebp),%eax 108a9d: 89 46 0c mov %eax,0xc(%esi) tmbuf->minute = time.tm_min; 108aa0: 8b 45 c8 mov -0x38(%ebp),%eax 108aa3: 89 46 10 mov %eax,0x10(%esi) tmbuf->second = time.tm_sec; 108aa6: 8b 45 c4 mov -0x3c(%ebp),%eax 108aa9: 89 46 14 mov %eax,0x14(%esi) tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick; 108aac: 8b 45 f4 mov -0xc(%ebp),%eax 108aaf: 31 d2 xor %edx,%edx 108ab1: f7 35 7c cc 11 00 divl 0x11cc7c 108ab7: 89 46 18 mov %eax,0x18(%esi) 108aba: 31 c0 xor %eax,%eax 108abc: 83 c4 10 add $0x10,%esp return RTEMS_SUCCESSFUL; } 108abf: 8d 65 f8 lea -0x8(%ebp),%esp 108ac2: 5b pop %ebx 108ac3: 5e pop %esi 108ac4: c9 leave 108ac5: c3 ret =============================================================================== 00108ac8 : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 108ac8: 55 push %ebp 108ac9: 89 e5 mov %esp,%ebp 108acb: 56 push %esi 108acc: 53 push %ebx 108acd: 83 ec 20 sub $0x20,%esp 108ad0: 8b 75 08 mov 0x8(%ebp),%esi if ( !time ) 108ad3: b8 09 00 00 00 mov $0x9,%eax 108ad8: 85 f6 test %esi,%esi 108ada: 74 38 je 108b14 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 108adc: b8 0b 00 00 00 mov $0xb,%eax 108ae1: 80 3d f4 ca 11 00 00 cmpb $0x0,0x11caf4 108ae8: 74 2a je 108b14 ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** 108aea: 9c pushf 108aeb: fa cli 108aec: 5b pop %ebx * This routine grows @a the_heap memory area using the size bytes which 108aed: 83 ec 0c sub $0xc,%esp 108af0: 8d 45 f0 lea -0x10(%ebp),%eax 108af3: 50 push %eax 108af4: e8 a3 13 00 00 call 109e9c <_TOD_Get> * begin at @a starting_address. 108af9: 53 push %ebx 108afa: 9d popf * * @param[in] the_heap is the heap to operate upon 108afb: 8b 45 f0 mov -0x10(%ebp),%eax 108afe: 89 06 mov %eax,(%esi) * @param[in] starting_address is the starting address of the memory 108b00: 8b 45 f4 mov -0xc(%ebp),%eax 108b03: b9 e8 03 00 00 mov $0x3e8,%ecx 108b08: 31 d2 xor %edx,%edx 108b0a: f7 f1 div %ecx 108b0c: 89 46 04 mov %eax,0x4(%esi) 108b0f: 31 c0 xor %eax,%eax 108b11: 83 c4 10 add $0x10,%esp return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 108b14: 8d 65 f8 lea -0x8(%ebp),%esp 108b17: 5b pop %ebx 108b18: 5e pop %esi 108b19: c9 leave 108b1a: c3 ret =============================================================================== 00108d1c : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 108d1c: 55 push %ebp 108d1d: 89 e5 mov %esp,%ebp 108d1f: 83 ec 08 sub $0x8,%esp 108d22: 8b 55 08 mov 0x8(%ebp),%edx if ( !uptime ) 108d25: b8 09 00 00 00 mov $0x9,%eax 108d2a: 85 d2 test %edx,%edx 108d2c: 74 0e je 108d3c <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime( uptime ); 108d2e: 83 ec 0c sub $0xc,%esp 108d31: 52 push %edx 108d32: e8 e5 14 00 00 call 10a21c <_TOD_Get_uptime> 108d37: 31 c0 xor %eax,%eax 108d39: 83 c4 10 add $0x10,%esp return RTEMS_SUCCESSFUL; } 108d3c: c9 leave 108d3d: c3 ret =============================================================================== 00109950 : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 109950: 55 push %ebp 109951: 89 e5 mov %esp,%ebp 109953: 53 push %ebx 109954: 83 ec 14 sub $0x14,%esp 109957: 8b 5d 08 mov 0x8(%ebp),%ebx struct timespec newtime; if ( !time_buffer ) 10995a: ba 09 00 00 00 mov $0x9,%edx 10995f: 85 db test %ebx,%ebx 109961: 74 54 je 1099b7 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 109963: 83 ec 0c sub $0xc,%esp 109966: 53 push %ebx 109967: e8 f8 00 00 00 call 109a64 <_TOD_Validate> 10996c: 83 c4 10 add $0x10,%esp 10996f: ba 14 00 00 00 mov $0x14,%edx 109974: 84 c0 test %al,%al 109976: 74 3f je 1099b7 newtime.tv_sec = _TOD_To_seconds( time_buffer ); 109978: 83 ec 0c sub $0xc,%esp 10997b: 53 push %ebx 10997c: e8 7b 00 00 00 call 1099fc <_TOD_To_seconds> 109981: 89 45 f4 mov %eax,-0xc(%ebp) newtime.tv_nsec = time_buffer->ticks * 109984: 8b 43 18 mov 0x18(%ebx),%eax 109987: 0f af 05 38 86 12 00 imul 0x128638,%eax 10998e: 69 c0 e8 03 00 00 imul $0x3e8,%eax,%eax 109994: 89 45 f8 mov %eax,-0x8(%ebp) /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 109997: a1 9c 84 12 00 mov 0x12849c,%eax 10999c: 40 inc %eax 10999d: a3 9c 84 12 00 mov %eax,0x12849c (_TOD_Microseconds_per_tick * TOD_NANOSECONDS_PER_MICROSECOND); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 1099a2: 8d 45 f4 lea -0xc(%ebp),%eax 1099a5: 89 04 24 mov %eax,(%esp) 1099a8: e8 73 17 00 00 call 10b120 <_TOD_Set> _Thread_Enable_dispatch(); 1099ad: e8 ba 27 00 00 call 10c16c <_Thread_Enable_dispatch> 1099b2: 31 d2 xor %edx,%edx 1099b4: 83 c4 10 add $0x10,%esp return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 1099b7: 89 d0 mov %edx,%eax 1099b9: 8b 5d fc mov -0x4(%ebp),%ebx 1099bc: c9 leave 1099bd: c3 ret =============================================================================== 00108b1c : * error code - if unsuccessful */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { 108b1c: 55 push %ebp 108b1d: 89 e5 mov %esp,%ebp 108b1f: 8b 55 08 mov 0x8(%ebp),%edx if ( !routine ) 108b22: b8 09 00 00 00 mov $0x9,%eax 108b27: 85 d2 test %edx,%edx 108b29: 74 08 je 108b33 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; 108b2b: 89 15 84 cc 11 00 mov %edx,0x11cc84 108b31: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 108b33: c9 leave 108b34: c3 ret =============================================================================== 00108b74 : rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 108b74: 55 push %ebp 108b75: 89 e5 mov %esp,%ebp 108b77: 83 ec 08 sub $0x8,%esp 108b7a: 8b 4d 08 mov 0x8(%ebp),%ecx 108b7d: 8b 55 14 mov 0x14(%ebp),%edx RTEMS_API_Control *api; if ( !event_out ) 108b80: b8 09 00 00 00 mov $0x9,%eax 108b85: 85 d2 test %edx,%edx 108b87: 74 3f je 108bc8 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; 108b89: a1 a0 cb 11 00 mov 0x11cba0,%eax 108b8e: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax if ( _Event_sets_Is_empty( event_in ) ) { 108b94: 85 c9 test %ecx,%ecx 108b96: 75 08 jne 108ba0 *event_out = api->pending_events; 108b98: 8b 00 mov (%eax),%eax 108b9a: 89 02 mov %eax,(%edx) 108b9c: 31 c0 xor %eax,%eax 108b9e: eb 28 jmp 108bc8 /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 108ba0: a1 e0 ca 11 00 mov 0x11cae0,%eax 108ba5: 40 inc %eax 108ba6: a3 e0 ca 11 00 mov %eax,0x11cae0 return RTEMS_SUCCESSFUL; } _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); 108bab: 52 push %edx 108bac: ff 75 10 pushl 0x10(%ebp) 108baf: ff 75 0c pushl 0xc(%ebp) 108bb2: 51 push %ecx 108bb3: e8 14 00 00 00 call 108bcc <_Event_Seize> _Thread_Enable_dispatch(); 108bb8: e8 2f 22 00 00 call 10adec <_Thread_Enable_dispatch> return( _Thread_Executing->Wait.return_code ); 108bbd: a1 a0 cb 11 00 mov 0x11cba0,%eax 108bc2: 8b 40 34 mov 0x34(%eax),%eax 108bc5: 83 c4 10 add $0x10,%esp } 108bc8: c9 leave 108bc9: c3 ret =============================================================================== 0010afa8 : */ rtems_status_code rtems_extension_delete( Objects_Id id ) { 10afa8: 55 push %ebp 10afa9: 89 e5 mov %esp,%ebp 10afab: 53 push %ebx 10afac: 83 ec 18 sub $0x18,%esp * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory * to add to the heap * @param[in] size is the size in bytes of the memory area to add * @return a status indicating success or the reason for failure 10afaf: 8d 45 f8 lea -0x8(%ebp),%eax 10afb2: 50 push %eax 10afb3: ff 75 08 pushl 0x8(%ebp) 10afb6: 68 84 19 12 00 push $0x121984 10afbb: e8 30 0f 00 00 call 10bef0 <_Objects_Get> 10afc0: 89 c3 mov %eax,%ebx Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 10afc2: 83 c4 10 add $0x10,%esp 10afc5: b8 04 00 00 00 mov $0x4,%eax 10afca: 83 7d f8 00 cmpl $0x0,-0x8(%ebp) 10afce: 75 30 jne 10b000 <== NEVER TAKEN case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 10afd0: 83 ec 0c sub $0xc,%esp 10afd3: 8d 43 10 lea 0x10(%ebx),%eax 10afd6: 50 push %eax 10afd7: e8 a4 24 00 00 call 10d480 <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 10afdc: 59 pop %ecx 10afdd: 58 pop %eax 10afde: 53 push %ebx 10afdf: 68 84 19 12 00 push $0x121984 10afe4: e8 37 0b 00 00 call 10bb20 <_Objects_Close> * @param[in] starting_address is the starting address of the memory for * the heap * @param[in] size is the size in bytes of the memory area for the heap * @param[in] page_size is the size in bytes of the allocation unit * * @return This method returns the maximum memory available. If 10afe9: 58 pop %eax 10afea: 5a pop %edx 10afeb: 53 push %ebx 10afec: 68 84 19 12 00 push $0x121984 10aff1: e8 c6 0d 00 00 call 10bdbc <_Objects_Free> _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 10aff6: e8 b5 16 00 00 call 10c6b0 <_Thread_Enable_dispatch> 10affb: 31 c0 xor %eax,%eax 10affd: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b000: 8b 5d fc mov -0x4(%ebp),%ebx 10b003: c9 leave 10b004: c3 ret =============================================================================== 001094d0 : rtems_status_code rtems_interrupt_catch( rtems_isr_entry new_isr_handler, rtems_vector_number vector, rtems_isr_entry *old_isr_handler ) { 1094d0: 55 push %ebp <== NOT EXECUTED 1094d1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1094d3: 53 push %ebx <== NOT EXECUTED 1094d4: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 1094d7: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 1094da: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED 1094dd: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED if ( !_ISR_Is_vector_number_valid( vector ) ) 1094e0: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 1094e5: 81 fb ff 00 00 00 cmp $0xff,%ebx <== NOT EXECUTED 1094eb: 77 1d ja 10950a <== NOT EXECUTED return RTEMS_INVALID_NUMBER; if ( !_ISR_Is_valid_user_handler( (void *) new_isr_handler ) ) 1094ed: 85 c9 test %ecx,%ecx <== NOT EXECUTED 1094ef: 74 14 je 109505 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( !_ISR_Is_valid_user_handler( (void *) old_isr_handler ) ) 1094f1: 85 d2 test %edx,%edx <== NOT EXECUTED 1094f3: 74 10 je 109505 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; _ISR_Install_vector( 1094f5: 50 push %eax <== NOT EXECUTED 1094f6: 52 push %edx <== NOT EXECUTED 1094f7: 51 push %ecx <== NOT EXECUTED 1094f8: 53 push %ebx <== NOT EXECUTED 1094f9: e8 44 cc ff ff call 106142 <_CPU_ISR_install_vector><== NOT EXECUTED 1094fe: 31 c0 xor %eax,%eax <== NOT EXECUTED 109500: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109503: eb 05 jmp 10950a <== NOT EXECUTED vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler ); return RTEMS_SUCCESSFUL; 109505: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED } 10950a: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10950d: c9 leave <== NOT EXECUTED 10950e: c3 ret <== NOT EXECUTED =============================================================================== 0010a504 : 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 ) { 10a504: 55 push %ebp 10a505: 89 e5 mov %esp,%ebp 10a507: 57 push %edi 10a508: 56 push %esi 10a509: 53 push %ebx 10a50a: 83 ec 08 sub $0x8,%esp 10a50d: 8b 5d 08 mov 0x8(%ebp),%ebx 10a510: 8b 75 0c mov 0xc(%ebp),%esi 10a513: 8b 45 10 mov 0x10(%ebp),%eax 10a516: 89 45 f0 mov %eax,-0x10(%ebp) /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 10a519: 85 f6 test %esi,%esi 10a51b: 0f 84 9a 00 00 00 je 10a5bb return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 10a521: 85 c0 test %eax,%eax 10a523: 0f 84 92 00 00 00 je 10a5bb return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 10a529: 83 3e 00 cmpl $0x0,(%esi) 10a52c: 75 0a jne 10a538 10a52e: 83 7e 04 00 cmpl $0x0,0x4(%esi) 10a532: 0f 84 83 00 00 00 je 10a5bb <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; *registered_major = 0; 10a538: 8b 45 f0 mov -0x10(%ebp),%eax 10a53b: c7 00 00 00 00 00 movl $0x0,(%eax) /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 10a541: 8b 15 58 f7 11 00 mov 0x11f758,%edx 10a547: b8 0a 00 00 00 mov $0xa,%eax 10a54c: 39 d3 cmp %edx,%ebx 10a54e: 73 77 jae 10a5c7 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 10a550: 85 db test %ebx,%ebx 10a552: 75 2b jne 10a57f bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 10a554: 8d 5a ff lea -0x1(%edx),%ebx 10a557: 6b c2 18 imul $0x18,%edx,%eax 10a55a: 83 e8 18 sub $0x18,%eax 10a55d: 03 05 5c f7 11 00 add 0x11f75c,%eax 10a563: eb 0f jmp 10a574 if ( !_IO_Driver_address_table[major].initialization_entry && 10a565: 83 38 00 cmpl $0x0,(%eax) 10a568: 75 06 jne 10a570 10a56a: 83 78 04 00 cmpl $0x0,0x4(%eax) 10a56e: 74 0f je 10a57f <== ALWAYS TAKEN * in use. */ if ( major == 0 ) { bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 10a570: 4b dec %ebx 10a571: 83 e8 18 sub $0x18,%eax 10a574: 85 db test %ebx,%ebx 10a576: 75 ed jne 10a565 10a578: b8 05 00 00 00 mov $0x5,%eax 10a57d: eb 48 jmp 10a5c7 if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 10a57f: 6b fb 18 imul $0x18,%ebx,%edi 10a582: 03 3d 5c f7 11 00 add 0x11f75c,%edi 10a588: 83 3f 00 cmpl $0x0,(%edi) 10a58b: 75 35 jne 10a5c2 10a58d: 83 7f 04 00 cmpl $0x0,0x4(%edi) 10a591: 75 2f jne 10a5c2 <== NEVER TAKEN _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 10a593: b9 06 00 00 00 mov $0x6,%ecx 10a598: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *registered_major = major; 10a59a: 8b 45 f0 mov -0x10(%ebp),%eax 10a59d: 89 18 mov %ebx,(%eax) return rtems_io_initialize( major, 0, NULL ); 10a59f: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10a5a6: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10a5ad: 89 5d 08 mov %ebx,0x8(%ebp) } 10a5b0: 5b pop %ebx 10a5b1: 5e pop %esi 10a5b2: 5b pop %ebx 10a5b3: 5e pop %esi 10a5b4: 5f pop %edi 10a5b5: c9 leave _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 10a5b6: e9 ed fd ff ff jmp 10a3a8 10a5bb: b8 09 00 00 00 mov $0x9,%eax 10a5c0: eb 05 jmp 10a5c7 10a5c2: b8 0c 00 00 00 mov $0xc,%eax } 10a5c7: 5a pop %edx 10a5c8: 59 pop %ecx 10a5c9: 5b pop %ebx 10a5ca: 5e pop %esi 10a5cb: 5f pop %edi 10a5cc: c9 leave 10a5cd: c3 ret =============================================================================== 0010a5d0 : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 10a5d0: 55 push %ebp 10a5d1: 89 e5 mov %esp,%ebp 10a5d3: 57 push %edi 10a5d4: 83 ec 04 sub $0x4,%esp 10a5d7: 8b 55 08 mov 0x8(%ebp),%edx if ( major < _IO_Number_of_drivers ) { 10a5da: b8 0d 00 00 00 mov $0xd,%eax 10a5df: 3b 15 58 f7 11 00 cmp 0x11f758,%edx 10a5e5: 73 12 jae 10a5f9 <== NEVER TAKEN memset( 10a5e7: 6b fa 18 imul $0x18,%edx,%edi 10a5ea: 03 3d 5c f7 11 00 add 0x11f75c,%edi 10a5f0: b9 06 00 00 00 mov $0x6,%ecx 10a5f5: 31 c0 xor %eax,%eax 10a5f7: f3 ab rep stos %eax,%es:(%edi) sizeof( rtems_driver_address_table ) ); return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10a5f9: 5a pop %edx 10a5fa: 5f pop %edi 10a5fb: c9 leave 10a5fc: c3 ret =============================================================================== 0010b438 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10b438: 55 push %ebp 10b439: 89 e5 mov %esp,%ebp 10b43b: 57 push %edi 10b43c: 56 push %esi 10b43d: 53 push %ebx 10b43e: 83 ec 0c sub $0xc,%esp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10b441: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 10b445: 74 41 je 10b488 <== NEVER TAKEN return; 10b447: bf 01 00 00 00 mov $0x1,%edi for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 10b44c: 8b 04 bd 70 84 12 00 mov 0x128470(,%edi,4),%eax 10b453: 85 c0 test %eax,%eax 10b455: 74 2b je 10b482 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10b457: 8b 70 04 mov 0x4(%eax),%esi if ( information ) { 10b45a: bb 01 00 00 00 mov $0x1,%ebx 10b45f: 85 f6 test %esi,%esi 10b461: 75 17 jne 10b47a <== ALWAYS TAKEN 10b463: eb 1d jmp 10b482 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 10b465: 8b 46 1c mov 0x1c(%esi),%eax 10b468: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !the_thread ) 10b46b: 85 c0 test %eax,%eax 10b46d: 74 0a je 10b479 <== NEVER TAKEN continue; (*routine)(the_thread); 10b46f: 83 ec 0c sub $0xc,%esp 10b472: 50 push %eax 10b473: ff 55 08 call *0x8(%ebp) 10b476: 83 c4 10 add $0x10,%esp api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 10b479: 43 inc %ebx 10b47a: 0f b7 46 10 movzwl 0x10(%esi),%eax 10b47e: 39 c3 cmp %eax,%ebx 10b480: 76 e3 jbe 10b465 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10b482: 47 inc %edi if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 10b483: 83 ff 05 cmp $0x5,%edi 10b486: 75 c4 jne 10b44c (*routine)(the_thread); } } } } 10b488: 8d 65 f4 lea -0xc(%ebp),%esp 10b48b: 5b pop %ebx 10b48c: 5e pop %esi 10b48d: 5f pop %edi 10b48e: c9 leave 10b48f: c3 ret =============================================================================== 00110d44 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, Objects_Id *id ) { 110d44: 55 push %ebp 110d45: 89 e5 mov %esp,%ebp 110d47: 57 push %edi 110d48: 56 push %esi 110d49: 53 push %ebx 110d4a: 83 ec 1c sub $0x1c,%esp 110d4d: 8b 7d 10 mov 0x10(%ebp),%edi 110d50: 8b 75 14 mov 0x14(%ebp),%esi CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) 110d53: b8 03 00 00 00 mov $0x3,%eax 110d58: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 110d5c: 0f 84 b2 00 00 00 je 110e14 return RTEMS_INVALID_NAME; if ( !id ) 110d62: b8 09 00 00 00 mov $0x9,%eax 110d67: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 110d6b: 0f 84 a3 00 00 00 je 110e14 <== NEVER TAKEN if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 110d71: b8 0a 00 00 00 mov $0xa,%eax 110d76: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 110d7a: 0f 84 94 00 00 00 je 110e14 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 110d80: b8 08 00 00 00 mov $0x8,%eax 110d85: 85 ff test %edi,%edi 110d87: 0f 84 87 00 00 00 je 110e14 <== NEVER TAKEN /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 110d8d: a1 e0 27 13 00 mov 0x1327e0,%eax 110d92: 40 inc %eax 110d93: a3 e0 27 13 00 mov %eax,0x1327e0 #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 110d98: e8 7b 72 00 00 call 118018 <_Message_queue_Allocate> 110d9d: 89 c3 mov %eax,%ebx if ( !the_message_queue ) { 110d9f: 85 c0 test %eax,%eax 110da1: 75 0c jne 110daf _Thread_Enable_dispatch(); 110da3: e8 70 49 00 00 call 115718 <_Thread_Enable_dispatch> 110da8: b8 05 00 00 00 mov $0x5,%eax 110dad: eb 65 jmp 110e14 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 110daf: 89 70 10 mov %esi,0x10(%eax) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 110db2: 31 c0 xor %eax,%eax 110db4: f7 c6 04 00 00 00 test $0x4,%esi 110dba: 0f 95 c0 setne %al 110dbd: 89 45 f0 mov %eax,-0x10(%ebp) else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 110dc0: 57 push %edi 110dc1: ff 75 0c pushl 0xc(%ebp) 110dc4: 8d 45 f0 lea -0x10(%ebp),%eax 110dc7: 50 push %eax 110dc8: 8d 43 14 lea 0x14(%ebx),%eax 110dcb: 50 push %eax 110dcc: e8 9b 2d 00 00 call 113b6c <_CORE_message_queue_Initialize> 110dd1: 83 c4 10 add $0x10,%esp 110dd4: 84 c0 test %al,%al 110dd6: 75 1c jne 110df4 * @return This method returns the maximum memory available. If * unsuccessful, 0 will be returned. */ static inline uint32_t _Protected_heap_Initialize( Heap_Control *the_heap, void *starting_address, 110dd8: 50 push %eax 110dd9: 50 push %eax 110dda: 53 push %ebx 110ddb: 68 94 2a 13 00 push $0x132a94 110de0: e8 03 40 00 00 call 114de8 <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 110de5: e8 2e 49 00 00 call 115718 <_Thread_Enable_dispatch> 110dea: b8 0d 00 00 00 mov $0xd,%eax 110def: 83 c4 10 add $0x10,%esp 110df2: eb 20 jmp 110e14 110df4: 8b 4b 08 mov 0x8(%ebx),%ecx 110df7: 0f b7 d1 movzwl %cx,%edx 110dfa: a1 b0 2a 13 00 mov 0x132ab0,%eax 110dff: 89 1c 90 mov %ebx,(%eax,%edx,4) 110e02: 8b 45 08 mov 0x8(%ebp),%eax 110e05: 89 43 0c mov %eax,0xc(%ebx) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 110e08: 8b 45 18 mov 0x18(%ebp),%eax 110e0b: 89 08 mov %ecx,(%eax) name, 0 ); #endif _Thread_Enable_dispatch(); 110e0d: e8 06 49 00 00 call 115718 <_Thread_Enable_dispatch> 110e12: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 110e14: 8d 65 f4 lea -0xc(%ebp),%esp 110e17: 5b pop %ebx 110e18: 5e pop %esi 110e19: 5f pop %edi 110e1a: c9 leave 110e1b: c3 ret =============================================================================== 00110e80 : rtems_status_code rtems_message_queue_flush( Objects_Id id, uint32_t *count ) { 110e80: 55 push %ebp 110e81: 89 e5 mov %esp,%ebp 110e83: 53 push %ebx 110e84: 83 ec 14 sub $0x14,%esp 110e87: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 110e8a: b8 09 00 00 00 mov $0x9,%eax 110e8f: 85 db test %ebx,%ebx 110e91: 74 3a je 110ecd <== NEVER TAKEN * @param[in] size is the size in bytes of the memory area to add * @return a status indicating success or the reason for failure */ bool _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, 110e93: 50 push %eax 110e94: 8d 45 f8 lea -0x8(%ebp),%eax 110e97: 50 push %eax 110e98: ff 75 08 pushl 0x8(%ebp) 110e9b: 68 94 2a 13 00 push $0x132a94 110ea0: e8 b3 40 00 00 call 114f58 <_Objects_Get> 110ea5: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 110ea7: 83 c4 10 add $0x10,%esp 110eaa: b8 04 00 00 00 mov $0x4,%eax 110eaf: 83 7d f8 00 cmpl $0x0,-0x8(%ebp) 110eb3: 75 18 jne 110ecd case OBJECTS_LOCAL: *count = _CORE_message_queue_Flush( &the_message_queue->message_queue ); 110eb5: 83 ec 0c sub $0xc,%esp 110eb8: 8d 42 14 lea 0x14(%edx),%eax 110ebb: 50 push %eax 110ebc: e8 47 2c 00 00 call 113b08 <_CORE_message_queue_Flush> 110ec1: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 110ec3: e8 50 48 00 00 call 115718 <_Thread_Enable_dispatch> 110ec8: 31 c0 xor %eax,%eax 110eca: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110ecd: 8b 5d fc mov -0x4(%ebp),%ebx 110ed0: c9 leave 110ed1: c3 ret =============================================================================== 00110ed4 : rtems_status_code rtems_message_queue_get_number_pending( Objects_Id id, uint32_t *count ) { 110ed4: 55 push %ebp 110ed5: 89 e5 mov %esp,%ebp 110ed7: 53 push %ebx 110ed8: 83 ec 14 sub $0x14,%esp 110edb: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 110ede: b8 09 00 00 00 mov $0x9,%eax 110ee3: 85 db test %ebx,%ebx 110ee5: 74 2e je 110f15 <== NEVER TAKEN 110ee7: 50 push %eax 110ee8: 8d 45 f8 lea -0x8(%ebp),%eax 110eeb: 50 push %eax 110eec: ff 75 08 pushl 0x8(%ebp) 110eef: 68 94 2a 13 00 push $0x132a94 110ef4: e8 5f 40 00 00 call 114f58 <_Objects_Get> 110ef9: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 110efb: 83 c4 10 add $0x10,%esp 110efe: b8 04 00 00 00 mov $0x4,%eax 110f03: 83 7d f8 00 cmpl $0x0,-0x8(%ebp) 110f07: 75 0c jne 110f15 case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages; 110f09: 8b 42 5c mov 0x5c(%edx),%eax 110f0c: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 110f0e: e8 05 48 00 00 call 115718 <_Thread_Enable_dispatch> 110f13: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110f15: 8b 5d fc mov -0x4(%ebp),%ebx 110f18: c9 leave 110f19: c3 ret =============================================================================== 00108ec0 : rtems_status_code rtems_message_queue_send( Objects_Id id, const void *buffer, size_t size ) { 108ec0: 55 push %ebp 108ec1: 89 e5 mov %esp,%ebp 108ec3: 56 push %esi 108ec4: 53 push %ebx 108ec5: 83 ec 10 sub $0x10,%esp 108ec8: 8b 5d 08 mov 0x8(%ebp),%ebx 108ecb: 8b 75 0c mov 0xc(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 108ece: b8 09 00 00 00 mov $0x9,%eax 108ed3: 85 f6 test %esi,%esi 108ed5: 74 4f je 108f26 <== NEVER TAKEN * @param[in] size is the size in bytes of the memory area to add * @return a status indicating success or the reason for failure */ bool _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, 108ed7: 50 push %eax 108ed8: 8d 45 f4 lea -0xc(%ebp),%eax 108edb: 50 push %eax 108edc: 53 push %ebx 108edd: 68 8c cd 11 00 push $0x11cd8c 108ee2: e8 45 17 00 00 call 10a62c <_Objects_Get> 108ee7: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 108ee9: 83 c4 10 add $0x10,%esp 108eec: b8 04 00 00 00 mov $0x4,%eax 108ef1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 108ef5: 75 2f jne 108f26 <== NEVER TAKEN * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory for * the heap 108ef7: 6a 00 push $0x0 108ef9: 6a 00 push $0x0 108efb: 68 ff ff ff 7f push $0x7fffffff 108f00: 6a 00 push $0x0 108f02: 53 push %ebx 108f03: ff 75 10 pushl 0x10(%ebp) 108f06: 56 push %esi 108f07: 8d 42 14 lea 0x14(%edx),%eax 108f0a: 50 push %eax 108f0b: e8 88 0b 00 00 call 109a98 <_CORE_message_queue_Submit> 108f10: 89 c3 mov %eax,%ebx MESSAGE_QUEUE_MP_HANDLER, FALSE, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 108f12: 83 c4 20 add $0x20,%esp 108f15: e8 d2 1e 00 00 call 10adec <_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); 108f1a: 83 ec 0c sub $0xc,%esp 108f1d: 53 push %ebx 108f1e: e8 0d 00 00 00 call 108f30 <_Message_queue_Translate_core_message_queue_return_code> 108f23: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 108f26: 8d 65 f8 lea -0x8(%ebp),%esp 108f29: 5b pop %ebx 108f2a: 5e pop %esi 108f2b: c9 leave 108f2c: c3 ret =============================================================================== 00111040 : rtems_status_code rtems_message_queue_urgent( Objects_Id id, const void *buffer, size_t size ) { 111040: 55 push %ebp 111041: 89 e5 mov %esp,%ebp 111043: 56 push %esi 111044: 53 push %ebx 111045: 83 ec 10 sub $0x10,%esp 111048: 8b 5d 08 mov 0x8(%ebp),%ebx 11104b: 8b 75 0c mov 0xc(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 11104e: b8 09 00 00 00 mov $0x9,%eax 111053: 85 f6 test %esi,%esi 111055: 74 4f je 1110a6 <== NEVER TAKEN * @param[in] size is the size in bytes of the memory area to add * @return a status indicating success or the reason for failure */ bool _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, 111057: 50 push %eax 111058: 8d 45 f4 lea -0xc(%ebp),%eax 11105b: 50 push %eax 11105c: 53 push %ebx 11105d: 68 94 2a 13 00 push $0x132a94 111062: e8 f1 3e 00 00 call 114f58 <_Objects_Get> 111067: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 111069: 83 c4 10 add $0x10,%esp 11106c: b8 04 00 00 00 mov $0x4,%eax 111071: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 111075: 75 2f jne 1110a6 size_t size 111077: 6a 00 push $0x0 111079: 6a 00 push $0x0 11107b: 68 00 00 00 80 push $0x80000000 111080: 6a 00 push $0x0 111082: 53 push %ebx 111083: ff 75 10 pushl 0x10(%ebp) 111086: 56 push %esi 111087: 8d 42 14 lea 0x14(%edx),%eax 11108a: 50 push %eax 11108b: e8 cc 2c 00 00 call 113d5c <_CORE_message_queue_Submit> 111090: 89 c3 mov %eax,%ebx id, MESSAGE_QUEUE_MP_HANDLER, FALSE, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 111092: 83 c4 20 add $0x20,%esp 111095: e8 7e 46 00 00 call 115718 <_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); 11109a: 83 ec 0c sub $0xc,%esp 11109d: 53 push %ebx 11109e: e8 8d ff ff ff call 111030 <_Message_queue_Translate_core_message_queue_return_code> 1110a3: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1110a6: 8d 65 f8 lea -0x8(%ebp),%esp 1110a9: 5b pop %ebx 1110aa: 5e pop %esi 1110ab: c9 leave 1110ac: c3 ret =============================================================================== 0010a510 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 10a510: 55 push %ebp 10a511: 89 e5 mov %esp,%ebp 10a513: 57 push %edi 10a514: 56 push %esi 10a515: 53 push %ebx 10a516: 83 ec 1c sub $0x1c,%esp 10a519: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10a51c: b8 09 00 00 00 mov $0x9,%eax 10a521: 85 ff test %edi,%edi 10a523: 74 50 je 10a575 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10a525: 8b 5d 08 mov 0x8(%ebp),%ebx 10a528: 85 db test %ebx,%ebx 10a52a: 75 08 jne 10a534 10a52c: a1 2c 06 12 00 mov 0x12062c,%eax 10a531: 8b 58 08 mov 0x8(%eax),%ebx information = _Objects_Get_information_id( tmpId ); 10a534: 83 ec 0c sub $0xc,%esp 10a537: 53 push %ebx 10a538: e8 a7 16 00 00 call 10bbe4 <_Objects_Get_information_id> 10a53d: 89 c6 mov %eax,%esi if ( !information ) 10a53f: 83 c4 10 add $0x10,%esp 10a542: 85 c0 test %eax,%eax 10a544: 74 2a je 10a570 return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10a546: 51 push %ecx 10a547: 8d 45 f0 lea -0x10(%ebp),%eax 10a54a: 50 push %eax 10a54b: 53 push %ebx 10a54c: 56 push %esi 10a54d: e8 2a 18 00 00 call 10bd7c <_Objects_Get> switch ( location ) { 10a552: 83 c4 10 add $0x10,%esp 10a555: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 10a559: 75 15 jne 10a570 case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 10a55b: 52 push %edx 10a55c: 57 push %edi 10a55d: 50 push %eax 10a55e: 56 push %esi 10a55f: e8 54 1a 00 00 call 10bfb8 <_Objects_Set_name> _Thread_Enable_dispatch(); 10a564: e8 33 21 00 00 call 10c69c <_Thread_Enable_dispatch> 10a569: 31 c0 xor %eax,%eax 10a56b: 83 c4 10 add $0x10,%esp 10a56e: eb 05 jmp 10a575 return RTEMS_SUCCESSFUL; 10a570: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a575: 8d 65 f4 lea -0xc(%ebp),%esp 10a578: 5b pop %ebx 10a579: 5e pop %esi 10a57a: 5f pop %edi 10a57b: c9 leave 10a57c: c3 ret =============================================================================== 001110b0 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, Objects_Id *id ) { 1110b0: 55 push %ebp 1110b1: 89 e5 mov %esp,%ebp 1110b3: 57 push %edi 1110b4: 56 push %esi 1110b5: 53 push %ebx 1110b6: 83 ec 0c sub $0xc,%esp 1110b9: 8b 7d 10 mov 0x10(%ebp),%edi 1110bc: 8b 75 14 mov 0x14(%ebp),%esi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 1110bf: b8 03 00 00 00 mov $0x3,%eax 1110c4: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 1110c8: 0f 84 c9 00 00 00 je 111197 return RTEMS_INVALID_NAME; if ( !starting_address ) 1110ce: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 1110d2: 0f 84 b3 00 00 00 je 11118b <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !id ) 1110d8: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp) 1110dc: 0f 84 a9 00 00 00 je 11118b <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 1110e2: 85 ff test %edi,%edi 1110e4: 0f 84 a8 00 00 00 je 111192 1110ea: 85 f6 test %esi,%esi 1110ec: 0f 84 a0 00 00 00 je 111192 1110f2: 39 f7 cmp %esi,%edi 1110f4: 0f 82 98 00 00 00 jb 111192 1110fa: f7 c6 03 00 00 00 test $0x3,%esi 111100: 0f 85 8c 00 00 00 jne 111192 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 111106: f6 45 0c 03 testb $0x3,0xc(%ebp) 11110a: 75 7f jne 11118b /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 11110c: a1 e0 27 13 00 mov 0x1327e0,%eax 111111: 40 inc %eax 111112: a3 e0 27 13 00 mov %eax,0x1327e0 * Returns TRUE if the @a starting_address is in the heap, and FALSE * otherwise. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the user block * to obtain the size of 111117: 83 ec 0c sub $0xc,%esp 11111a: 68 14 26 13 00 push $0x132614 11111f: e8 b4 39 00 00 call 114ad8 <_Objects_Allocate> 111124: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 111126: 83 c4 10 add $0x10,%esp 111129: 85 c0 test %eax,%eax 11112b: 75 0c jne 111139 _Thread_Enable_dispatch(); 11112d: e8 e6 45 00 00 call 115718 <_Thread_Enable_dispatch> 111132: b8 05 00 00 00 mov $0x5,%eax 111137: eb 5e jmp 111197 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 111139: 8b 45 0c mov 0xc(%ebp),%eax 11113c: 89 43 10 mov %eax,0x10(%ebx) the_partition->length = length; 11113f: 89 7b 14 mov %edi,0x14(%ebx) the_partition->buffer_size = buffer_size; 111142: 89 73 18 mov %esi,0x18(%ebx) the_partition->attribute_set = attribute_set; 111145: 8b 45 18 mov 0x18(%ebp),%eax 111148: 89 43 1c mov %eax,0x1c(%ebx) the_partition->number_of_used_blocks = 0; 11114b: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) _Chain_Initialize( &the_partition->Memory, starting_address, 111152: 56 push %esi 111153: 89 f8 mov %edi,%eax 111155: 31 d2 xor %edx,%edx 111157: f7 f6 div %esi 111159: 50 push %eax 11115a: ff 75 0c pushl 0xc(%ebp) 11115d: 8d 43 24 lea 0x24(%ebx),%eax 111160: 50 push %eax 111161: e8 ca 28 00 00 call 113a30 <_Chain_Initialize> 111166: 8b 4b 08 mov 0x8(%ebx),%ecx 111169: 0f b7 d1 movzwl %cx,%edx 11116c: a1 30 26 13 00 mov 0x132630,%eax 111171: 89 1c 90 mov %ebx,(%eax,%edx,4) 111174: 8b 45 08 mov 0x8(%ebp),%eax 111177: 89 43 0c mov %eax,0xc(%ebx) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 11117a: 8b 45 1c mov 0x1c(%ebp),%eax 11117d: 89 08 mov %ecx,(%eax) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 11117f: e8 94 45 00 00 call 115718 <_Thread_Enable_dispatch> 111184: 31 c0 xor %eax,%eax 111186: 83 c4 10 add $0x10,%esp 111189: eb 0c jmp 111197 return RTEMS_SUCCESSFUL; 11118b: b8 09 00 00 00 mov $0x9,%eax 111190: eb 05 jmp 111197 111192: b8 08 00 00 00 mov $0x8,%eax } 111197: 8d 65 f4 lea -0xc(%ebp),%esp 11119a: 5b pop %ebx 11119b: 5e pop %esi 11119c: 5f pop %edi 11119d: c9 leave 11119e: c3 ret =============================================================================== 00111204 : rtems_status_code rtems_partition_get_buffer( Objects_Id id, void **buffer ) { 111204: 55 push %ebp 111205: 89 e5 mov %esp,%ebp 111207: 57 push %edi 111208: 56 push %esi 111209: 53 push %ebx 11120a: 83 ec 1c sub $0x1c,%esp 11120d: 8b 7d 0c mov 0xc(%ebp),%edi register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 111210: b8 09 00 00 00 mov $0x9,%eax 111215: 85 ff test %edi,%edi 111217: 74 4f je 111268 <== NEVER TAKEN ); /** * This routine returns the block of memory which begins * at @a starting_address to @a the_heap. Any coalescing which is * possible with the freeing of this routine is performed. 111219: 50 push %eax 11121a: 8d 45 f0 lea -0x10(%ebp),%eax 11121d: 50 push %eax 11121e: ff 75 08 pushl 0x8(%ebp) 111221: 68 14 26 13 00 push $0x132614 111226: e8 2d 3d 00 00 call 114f58 <_Objects_Get> 11122b: 89 c3 mov %eax,%ebx return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 11122d: 83 c4 10 add $0x10,%esp 111230: b8 04 00 00 00 mov $0x4,%eax 111235: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 111239: 75 2d jne 111268 #endif /** * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of 11123b: 83 ec 0c sub $0xc,%esp 11123e: 8d 43 24 lea 0x24(%ebx),%eax 111241: 50 push %eax 111242: e8 c1 27 00 00 call 113a08 <_Chain_Get> 111247: 89 c6 mov %eax,%esi case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 111249: 83 c4 10 add $0x10,%esp 11124c: 85 c0 test %eax,%eax 11124e: 74 0e je 11125e the_partition->number_of_used_blocks += 1; 111250: ff 43 20 incl 0x20(%ebx) _Thread_Enable_dispatch(); 111253: e8 c0 44 00 00 call 115718 <_Thread_Enable_dispatch> *buffer = the_buffer; 111258: 89 37 mov %esi,(%edi) 11125a: 31 c0 xor %eax,%eax 11125c: eb 0a jmp 111268 return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 11125e: e8 b5 44 00 00 call 115718 <_Thread_Enable_dispatch> 111263: b8 0d 00 00 00 mov $0xd,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111268: 8d 65 f4 lea -0xc(%ebp),%esp 11126b: 5b pop %ebx 11126c: 5e pop %esi 11126d: 5f pop %edi 11126e: c9 leave 11126f: c3 ret =============================================================================== 001107e4 : void *internal_start, void *external_start, uint32_t length, Objects_Id *id ) { 1107e4: 55 push %ebp 1107e5: 89 e5 mov %esp,%ebp 1107e7: 57 push %edi 1107e8: 56 push %esi 1107e9: 53 push %ebx 1107ea: 83 ec 0c sub $0xc,%esp 1107ed: 8b 75 0c mov 0xc(%ebp),%esi 1107f0: 8b 7d 10 mov 0x10(%ebp),%edi register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name) ) 1107f3: b8 03 00 00 00 mov $0x3,%eax 1107f8: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 1107fc: 74 6f je 11086d return RTEMS_INVALID_NAME; if ( !id ) 1107fe: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 110802: 74 64 je 110868 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 110804: 89 f8 mov %edi,%eax 110806: 09 f0 or %esi,%eax 110808: a8 03 test $0x3,%al 11080a: 75 5c jne 110868 /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 11080c: a1 e0 27 13 00 mov 0x1327e0,%eax 110811: 40 inc %eax 110812: a3 e0 27 13 00 mov %eax,0x1327e0 #ifdef __cplusplus extern "C" { #endif /** * This routine initializes @a the_heap record to manage the 110817: 83 ec 0c sub $0xc,%esp 11081a: 68 d4 25 13 00 push $0x1325d4 11081f: e8 b4 42 00 00 call 114ad8 <_Objects_Allocate> 110824: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 110826: 83 c4 10 add $0x10,%esp 110829: 85 c0 test %eax,%eax 11082b: 75 0c jne 110839 _Thread_Enable_dispatch(); 11082d: e8 e6 4e 00 00 call 115718 <_Thread_Enable_dispatch> 110832: b8 05 00 00 00 mov $0x5,%eax 110837: eb 34 jmp 11086d return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 110839: 89 70 10 mov %esi,0x10(%eax) the_port->external_base = external_start; 11083c: 89 78 14 mov %edi,0x14(%eax) the_port->length = length - 1; 11083f: 8b 45 14 mov 0x14(%ebp),%eax 110842: 48 dec %eax 110843: 89 43 18 mov %eax,0x18(%ebx) 110846: 8b 4b 08 mov 0x8(%ebx),%ecx 110849: 0f b7 d1 movzwl %cx,%edx 11084c: a1 f0 25 13 00 mov 0x1325f0,%eax 110851: 89 1c 90 mov %ebx,(%eax,%edx,4) 110854: 8b 45 08 mov 0x8(%ebp),%eax 110857: 89 43 0c mov %eax,0xc(%ebx) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 11085a: 8b 45 18 mov 0x18(%ebp),%eax 11085d: 89 08 mov %ecx,(%eax) _Thread_Enable_dispatch(); 11085f: e8 b4 4e 00 00 call 115718 <_Thread_Enable_dispatch> 110864: 31 c0 xor %eax,%eax 110866: eb 05 jmp 11086d return RTEMS_SUCCESSFUL; 110868: b8 09 00 00 00 mov $0x9,%eax } 11086d: 8d 65 f4 lea -0xc(%ebp),%esp 110870: 5b pop %ebx 110871: 5e pop %esi 110872: 5f pop %edi 110873: c9 leave 110874: c3 ret =============================================================================== 001108cc : rtems_status_code rtems_port_external_to_internal( Objects_Id id, void *external, void **internal ) { 1108cc: 55 push %ebp 1108cd: 89 e5 mov %esp,%ebp 1108cf: 56 push %esi 1108d0: 53 push %ebx 1108d1: 83 ec 10 sub $0x10,%esp 1108d4: 8b 75 0c mov 0xc(%ebp),%esi 1108d7: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 1108da: b8 09 00 00 00 mov $0x9,%eax 1108df: 85 db test %ebx,%ebx 1108e1: 74 3c je 11091f <== NEVER TAKEN * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory * to add to the heap * @param[in] size is the size in bytes of the memory area to add 1108e3: 50 push %eax 1108e4: 8d 45 f4 lea -0xc(%ebp),%eax 1108e7: 50 push %eax 1108e8: ff 75 08 pushl 0x8(%ebp) 1108eb: 68 d4 25 13 00 push $0x1325d4 1108f0: e8 63 46 00 00 call 114f58 <_Objects_Get> 1108f5: 89 c1 mov %eax,%ecx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 1108f7: 83 c4 10 add $0x10,%esp 1108fa: b8 04 00 00 00 mov $0x4,%eax 1108ff: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 110903: 75 1a jne 11091f * a block of the requested size, then NULL is returned. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes * @return NULL if unsuccessful and a pointer to the block if successful */ 110905: 89 f2 mov %esi,%edx 110907: 2b 51 14 sub 0x14(%ecx),%edx case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); if ( ending > the_port->length ) 11090a: 3b 51 18 cmp 0x18(%ecx),%edx 11090d: 76 04 jbe 110913 *internal = external; 11090f: 89 33 mov %esi,(%ebx) 110911: eb 05 jmp 110918 else *internal = _Addresses_Add_offset( the_port->internal_base, 110913: 03 51 10 add 0x10(%ecx),%edx 110916: 89 13 mov %edx,(%ebx) ending ); _Thread_Enable_dispatch(); 110918: e8 fb 4d 00 00 call 115718 <_Thread_Enable_dispatch> 11091d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11091f: 8d 65 f8 lea -0x8(%ebp),%esp 110922: 5b pop %ebx 110923: 5e pop %esi 110924: c9 leave 110925: c3 ret =============================================================================== 0011094c : rtems_status_code rtems_port_internal_to_external( Objects_Id id, void *internal, void **external ) { 11094c: 55 push %ebp 11094d: 89 e5 mov %esp,%ebp 11094f: 56 push %esi 110950: 53 push %ebx 110951: 83 ec 10 sub $0x10,%esp 110954: 8b 75 0c mov 0xc(%ebp),%esi 110957: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 11095a: b8 09 00 00 00 mov $0x9,%eax 11095f: 85 db test %ebx,%ebx 110961: 74 3c je 11099f <== NEVER TAKEN * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory * to add to the heap * @param[in] size is the size in bytes of the memory area to add 110963: 50 push %eax 110964: 8d 45 f4 lea -0xc(%ebp),%eax 110967: 50 push %eax 110968: ff 75 08 pushl 0x8(%ebp) 11096b: 68 d4 25 13 00 push $0x1325d4 110970: e8 e3 45 00 00 call 114f58 <_Objects_Get> 110975: 89 c1 mov %eax,%ecx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 110977: 83 c4 10 add $0x10,%esp 11097a: b8 04 00 00 00 mov $0x4,%eax 11097f: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 110983: 75 1a jne 11099f * a block of the requested size, then NULL is returned. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes * @return NULL if unsuccessful and a pointer to the block if successful */ 110985: 89 f2 mov %esi,%edx 110987: 2b 51 10 sub 0x10(%ecx),%edx case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) 11098a: 3b 51 18 cmp 0x18(%ecx),%edx 11098d: 76 04 jbe 110993 *external = internal; 11098f: 89 33 mov %esi,(%ebx) 110991: eb 05 jmp 110998 else *external = _Addresses_Add_offset( the_port->external_base, 110993: 03 51 14 add 0x14(%ecx),%edx 110996: 89 13 mov %edx,(%ebx) ending ); _Thread_Enable_dispatch(); 110998: e8 7b 4d 00 00 call 115718 <_Thread_Enable_dispatch> 11099d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11099f: 8d 65 f8 lea -0x8(%ebp),%esp 1109a2: 5b pop %ebx 1109a3: 5e pop %esi 1109a4: c9 leave 1109a5: c3 ret =============================================================================== 00109ce4 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, Objects_Id *id ) { 109ce4: 55 push %ebp 109ce5: 89 e5 mov %esp,%ebp 109ce7: 57 push %edi 109ce8: 56 push %esi 109ce9: 53 push %ebx 109cea: 83 ec 0c sub $0xc,%esp 109ced: 8b 75 08 mov 0x8(%ebp),%esi Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 109cf0: b8 03 00 00 00 mov $0x3,%eax 109cf5: 85 f6 test %esi,%esi 109cf7: 0f 84 ac 00 00 00 je 109da9 return RTEMS_INVALID_NAME; if ( !id ) 109cfd: b8 09 00 00 00 mov $0x9,%eax 109d02: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 109d06: 0f 84 9d 00 00 00 je 109da9 <== NEVER TAKEN /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 109d0c: a1 84 05 12 00 mov 0x120584,%eax 109d11: 40 inc %eax 109d12: a3 84 05 12 00 mov %eax,0x120584 #ifdef __cplusplus extern "C" { #endif /** 109d17: 83 ec 0c sub $0xc,%esp 109d1a: 68 8c 04 12 00 push $0x12048c 109d1f: e8 e4 1a 00 00 call 10b808 <_Objects_Allocate> 109d24: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 109d26: 83 c4 10 add $0x10,%esp 109d29: 85 c0 test %eax,%eax 109d2b: 75 0c jne 109d39 _Thread_Enable_dispatch(); 109d2d: e8 b2 27 00 00 call 10c4e4 <_Thread_Enable_dispatch> 109d32: b8 05 00 00 00 mov $0x5,%eax 109d37: eb 70 jmp 109da9 return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 109d39: a1 44 06 12 00 mov 0x120644,%eax 109d3e: 89 43 50 mov %eax,0x50(%ebx) the_period->state = RATE_MONOTONIC_INACTIVE; 109d41: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 109d48: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) * @param[in] the_heap is the heap to operate upon 109d4f: c7 43 2c 00 00 00 00 movl $0x0,0x2c(%ebx) * @param[in] starting_address is the starting address of the memory for 109d56: c7 43 30 00 00 00 00 movl $0x0,0x30(%ebx) * the heap 109d5d: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); 109d64: 8d 7b 54 lea 0x54(%ebx),%edi 109d67: b9 0e 00 00 00 mov $0xe,%ecx 109d6c: 31 c0 xor %eax,%eax 109d6e: f3 ab rep stos %eax,%es:(%edi) 109d70: c7 43 5c ff ff ff 7f movl $0x7fffffff,0x5c(%ebx) 109d77: c7 43 60 ff ff ff 7f movl $0x7fffffff,0x60(%ebx) 109d7e: c7 43 74 ff ff ff 7f movl $0x7fffffff,0x74(%ebx) 109d85: c7 43 78 ff ff ff 7f movl $0x7fffffff,0x78(%ebx) 109d8c: 8b 4b 08 mov 0x8(%ebx),%ecx 109d8f: 0f b7 d1 movzwl %cx,%edx 109d92: a1 a8 04 12 00 mov 0x1204a8,%eax 109d97: 89 1c 90 mov %ebx,(%eax,%edx,4) 109d9a: 89 73 0c mov %esi,0xc(%ebx) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 109d9d: 8b 45 0c mov 0xc(%ebp),%eax 109da0: 89 08 mov %ecx,(%eax) _Thread_Enable_dispatch(); 109da2: e8 3d 27 00 00 call 10c4e4 <_Thread_Enable_dispatch> 109da7: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 109da9: 8d 65 f4 lea -0xc(%ebp),%esp 109dac: 5b pop %ebx 109dad: 5e pop %esi 109dae: 5f pop %edi 109daf: c9 leave 109db0: c3 ret =============================================================================== 0010ec64 : rtems_status_code rtems_rate_monotonic_get_statistics( Objects_Id id, rtems_rate_monotonic_period_statistics *statistics ) { 10ec64: 55 push %ebp 10ec65: 89 e5 mov %esp,%ebp 10ec67: 57 push %edi 10ec68: 56 push %esi 10ec69: 83 ec 20 sub $0x20,%esp 10ec6c: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Locations location; Rate_monotonic_Control *the_period; if ( !statistics ) 10ec6f: b8 09 00 00 00 mov $0x9,%eax 10ec74: 85 ff test %edi,%edi 10ec76: 74 33 je 10ecab <== NEVER TAKEN /** * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory 10ec78: 50 push %eax 10ec79: 8d 45 f4 lea -0xc(%ebp),%eax 10ec7c: 50 push %eax 10ec7d: ff 75 08 pushl 0x8(%ebp) 10ec80: 68 8c 04 12 00 push $0x12048c 10ec85: e8 9a d0 ff ff call 10bd24 <_Objects_Get> 10ec8a: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 10ec8c: 83 c4 10 add $0x10,%esp 10ec8f: b8 04 00 00 00 mov $0x4,%eax 10ec94: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10ec98: 75 11 jne 10ecab case OBJECTS_LOCAL: *statistics = the_period->Statistics; 10ec9a: 8d 72 54 lea 0x54(%edx),%esi 10ec9d: b9 0e 00 00 00 mov $0xe,%ecx 10eca2: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10eca4: e8 3b d8 ff ff call 10c4e4 <_Thread_Enable_dispatch> 10eca9: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ecab: 8d 65 f8 lea -0x8(%ebp),%esp 10ecae: 5e pop %esi 10ecaf: 5f pop %edi 10ecb0: c9 leave 10ecb1: c3 ret =============================================================================== 0010ecb4 : rtems_status_code rtems_rate_monotonic_get_status( Objects_Id id, rtems_rate_monotonic_period_status *status ) { 10ecb4: 55 push %ebp 10ecb5: 89 e5 mov %esp,%ebp 10ecb7: 57 push %edi 10ecb8: 56 push %esi 10ecb9: 53 push %ebx 10ecba: 83 ec 1c sub $0x1c,%esp 10ecbd: 8b 75 0c mov 0xc(%ebp),%esi Objects_Locations location; Rate_monotonic_Control *the_period; if ( !status ) 10ecc0: b8 09 00 00 00 mov $0x9,%eax 10ecc5: 85 f6 test %esi,%esi 10ecc7: 0f 84 91 00 00 00 je 10ed5e <== NEVER TAKEN 10eccd: 50 push %eax 10ecce: 8d 45 f0 lea -0x10(%ebp),%eax 10ecd1: 50 push %eax 10ecd2: ff 75 08 pushl 0x8(%ebp) 10ecd5: 68 8c 04 12 00 push $0x12048c 10ecda: e8 45 d0 ff ff call 10bd24 <_Objects_Get> 10ecdf: 89 c7 mov %eax,%edi return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 10ece1: 83 c4 10 add $0x10,%esp 10ece4: b8 04 00 00 00 mov $0x4,%eax 10ece9: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 10eced: 75 6f jne 10ed5e case OBJECTS_LOCAL: status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); 10ecef: 8b 47 50 mov 0x50(%edi),%eax 10ecf2: 31 d2 xor %edx,%edx 10ecf4: 85 c0 test %eax,%eax 10ecf6: 74 03 je 10ecfb <== NEVER TAKEN 10ecf8: 8b 50 08 mov 0x8(%eax),%edx 10ecfb: 89 16 mov %edx,(%esi) status->state = the_period->state; 10ecfd: 8b 47 38 mov 0x38(%edi),%eax 10ed00: 89 46 04 mov %eax,0x4(%esi) if ( status->state == RATE_MONOTONIC_INACTIVE ) { 10ed03: 85 c0 test %eax,%eax 10ed05: 75 1e jne 10ed25 #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS status->since_last_period.tv_sec = 0; 10ed07: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi) status->since_last_period.tv_nsec = 0; 10ed0e: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) #else status->since_last_period = 0; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS status->executed_since_last_period.tv_sec = 0; 10ed15: c7 46 10 00 00 00 00 movl $0x0,0x10(%esi) status->executed_since_last_period.tv_nsec = 0; 10ed1c: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) 10ed23: eb 32 jmp 10ed57 * This lets them share one single invocation of _TOD_Get_uptime(). */ #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \ defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) struct timespec uptime; _TOD_Get_uptime( &uptime ); 10ed25: 83 ec 0c sub $0xc,%esp 10ed28: 8d 5d e8 lea -0x18(%ebp),%ebx 10ed2b: 53 push %ebx 10ed2c: e8 8b c7 ff ff call 10b4bc <_TOD_Get_uptime> #endif #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS _Timespec_Subtract( 10ed31: 83 c4 0c add $0xc,%esp 10ed34: 8d 46 08 lea 0x8(%esi),%eax 10ed37: 50 push %eax 10ed38: 53 push %ebx 10ed39: 8d 47 44 lea 0x44(%edi),%eax 10ed3c: 50 push %eax 10ed3d: e8 ba e4 ff ff call 10d1fc <_Timespec_Subtract> status->since_last_period = _Watchdog_Ticks_since_boot - the_period->time_at_period; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS _Timespec_Subtract( 10ed42: 83 c4 0c add $0xc,%esp 10ed45: 8d 46 10 lea 0x10(%esi),%eax 10ed48: 50 push %eax 10ed49: 53 push %ebx 10ed4a: 68 4c 06 12 00 push $0x12064c 10ed4f: e8 a8 e4 ff ff call 10d1fc <_Timespec_Subtract> 10ed54: 83 c4 10 add $0x10,%esp the_period->owner->cpu_time_used - the_period->owner_executed_at_period; #endif } _Thread_Enable_dispatch(); 10ed57: e8 88 d7 ff ff call 10c4e4 <_Thread_Enable_dispatch> 10ed5c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ed5e: 8d 65 f4 lea -0xc(%ebp),%esp 10ed61: 5b pop %ebx 10ed62: 5e pop %esi 10ed63: 5f pop %edi 10ed64: c9 leave 10ed65: c3 ret =============================================================================== 00109f7e : rtems_status_code rtems_rate_monotonic_period( Objects_Id id, rtems_interval length ) { 109f7e: 55 push %ebp 109f7f: 89 e5 mov %esp,%ebp 109f81: 57 push %edi 109f82: 56 push %esi 109f83: 53 push %ebx 109f84: 83 ec 20 sub $0x20,%esp 109f87: 8b 7d 0c mov 0xc(%ebp),%edi /** * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory 109f8a: 8d 45 f0 lea -0x10(%ebp),%eax 109f8d: 50 push %eax 109f8e: ff 75 08 pushl 0x8(%ebp) 109f91: 68 8c 04 12 00 push $0x12048c 109f96: e8 89 1d 00 00 call 10bd24 <_Objects_Get> 109f9b: 89 c3 mov %eax,%ebx rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 109f9d: 83 c4 10 add $0x10,%esp 109fa0: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 109fa4: 0f 85 44 01 00 00 jne 10a0ee case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 109faa: 8b 40 50 mov 0x50(%eax),%eax 109fad: 3b 05 44 06 12 00 cmp 0x120644,%eax 109fb3: 74 0f je 109fc4 _Thread_Enable_dispatch(); 109fb5: e8 2a 25 00 00 call 10c4e4 <_Thread_Enable_dispatch> 109fba: bb 17 00 00 00 mov $0x17,%ebx 109fbf: e9 2f 01 00 00 jmp 10a0f3 return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 109fc4: 85 ff test %edi,%edi 109fc6: 75 21 jne 109fe9 switch ( the_period->state ) { 109fc8: 8b 43 38 mov 0x38(%ebx),%eax 109fcb: bb 0b 00 00 00 mov $0xb,%ebx 109fd0: 85 c0 test %eax,%eax 109fd2: 74 0b je 109fdf 109fd4: 83 e8 03 sub $0x3,%eax 109fd7: 83 f8 02 cmp $0x2,%eax 109fda: 19 db sbb %ebx,%ebx 109fdc: 83 e3 06 and $0x6,%ebx case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 109fdf: e8 00 25 00 00 call 10c4e4 <_Thread_Enable_dispatch> 109fe4: e9 0a 01 00 00 jmp 10a0f3 return( return_value ); } _ISR_Disable( level ); 109fe9: 9c pushf 109fea: fa cli 109feb: 5e pop %esi switch ( the_period->state ) { 109fec: 8b 43 38 mov 0x38(%ebx),%eax 109fef: 83 f8 02 cmp $0x2,%eax 109ff2: 74 60 je 10a054 109ff4: 83 f8 04 cmp $0x4,%eax 109ff7: 0f 84 ba 00 00 00 je 10a0b7 109ffd: 85 c0 test %eax,%eax 109fff: 0f 85 e9 00 00 00 jne 10a0ee <== NEVER TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 10a005: 56 push %esi 10a006: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 10a007: 83 ec 0c sub $0xc,%esp 10a00a: 53 push %ebx 10a00b: e8 c8 fd ff ff call 109dd8 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 10a010: c7 43 38 02 00 00 00 movl $0x2,0x38(%ebx) * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 10a017: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) * @param[in] the_heap is the heap to operate upon 10a01e: c7 43 2c 14 a3 10 00 movl $0x10a314,0x2c(%ebx) * @param[in] starting_address is the starting address of the memory for 10a025: 8b 45 08 mov 0x8(%ebp),%eax 10a028: 89 43 30 mov %eax,0x30(%ebx) * the heap 10a02b: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 10a032: 89 7b 4c mov %edi,0x4c(%ebx) * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( Heap_Control *the_heap, 10a035: 89 7b 1c mov %edi,0x1c(%ebx) void *starting_address, size_t *size 10a038: 58 pop %eax 10a039: 5a pop %edx 10a03a: 8d 43 10 lea 0x10(%ebx),%eax 10a03d: 50 push %eax 10a03e: 68 64 06 12 00 push $0x120664 10a043: e8 f8 33 00 00 call 10d440 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 10a048: e8 97 24 00 00 call 10c4e4 <_Thread_Enable_dispatch> 10a04d: 31 db xor %ebx,%ebx 10a04f: e9 95 00 00 00 jmp 10a0e9 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 10a054: 83 ec 0c sub $0xc,%esp 10a057: 53 push %ebx 10a058: e8 e3 fd ff ff call 109e40 <_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; 10a05d: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) the_period->next_length = length; 10a064: 89 7b 4c mov %edi,0x4c(%ebx) _ISR_Enable( level ); 10a067: 56 push %esi 10a068: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 10a069: 8b 15 44 06 12 00 mov 0x120644,%edx 10a06f: 8b 43 08 mov 0x8(%ebx),%eax 10a072: 89 42 20 mov %eax,0x20(%edx) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10a075: 5e pop %esi 10a076: 5f pop %edi 10a077: 68 00 40 00 00 push $0x4000 10a07c: 52 push %edx 10a07d: e8 7e 2c 00 00 call 10cd00 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 10a082: 9c pushf 10a083: fa cli 10a084: 58 pop %eax local_state = the_period->state; 10a085: 8b 53 38 mov 0x38(%ebx),%edx the_period->state = RATE_MONOTONIC_ACTIVE; 10a088: c7 43 38 02 00 00 00 movl $0x2,0x38(%ebx) _ISR_Enable( level ); 10a08f: 50 push %eax 10a090: 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 ) 10a091: 83 c4 10 add $0x10,%esp 10a094: 83 fa 03 cmp $0x3,%edx 10a097: 75 15 jne 10a0ae <== ALWAYS TAKEN _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10a099: 51 push %ecx <== NOT EXECUTED 10a09a: 51 push %ecx <== NOT EXECUTED 10a09b: 68 00 40 00 00 push $0x4000 <== NOT EXECUTED 10a0a0: ff 35 44 06 12 00 pushl 0x120644 <== NOT EXECUTED 10a0a6: e8 b9 20 00 00 call 10c164 <_Thread_Clear_state> <== NOT EXECUTED 10a0ab: 83 c4 10 add $0x10,%esp <== NOT EXECUTED _Thread_Enable_dispatch(); 10a0ae: e8 31 24 00 00 call 10c4e4 <_Thread_Enable_dispatch> 10a0b3: 31 db xor %ebx,%ebx 10a0b5: eb 3c jmp 10a0f3 case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 10a0b7: 83 ec 0c sub $0xc,%esp 10a0ba: 53 push %ebx 10a0bb: e8 80 fd ff ff call 109e40 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 10a0c0: 56 push %esi 10a0c1: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 10a0c2: c7 43 38 02 00 00 00 movl $0x2,0x38(%ebx) the_period->next_length = length; 10a0c9: 89 7b 4c mov %edi,0x4c(%ebx) * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( Heap_Control *the_heap, 10a0cc: 89 7b 1c mov %edi,0x1c(%ebx) void *starting_address, size_t *size 10a0cf: 58 pop %eax 10a0d0: 5a pop %edx 10a0d1: 8d 43 10 lea 0x10(%ebx),%eax 10a0d4: 50 push %eax 10a0d5: 68 64 06 12 00 push $0x120664 10a0da: e8 61 33 00 00 call 10d440 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 10a0df: e8 00 24 00 00 call 10c4e4 <_Thread_Enable_dispatch> 10a0e4: bb 06 00 00 00 mov $0x6,%ebx 10a0e9: 83 c4 10 add $0x10,%esp 10a0ec: eb 05 jmp 10a0f3 return RTEMS_TIMEOUT; 10a0ee: bb 04 00 00 00 mov $0x4,%ebx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a0f3: 89 d8 mov %ebx,%eax 10a0f5: 8d 65 f4 lea -0xc(%ebp),%esp 10a0f8: 5b pop %ebx 10a0f9: 5e pop %esi 10a0fa: 5f pop %edi 10a0fb: c9 leave 10a0fc: c3 ret =============================================================================== 0010a100 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 10a100: 55 push %ebp 10a101: 89 e5 mov %esp,%ebp 10a103: 57 push %edi 10a104: 56 push %esi 10a105: 53 push %ebx 10a106: 83 ec 6c sub $0x6c,%esp 10a109: 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 ) 10a10c: 85 f6 test %esi,%esi 10a10e: 0f 84 44 01 00 00 je 10a258 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 10a114: 51 push %ecx 10a115: 51 push %ecx 10a116: 68 a4 9b 11 00 push $0x119ba4 10a11b: ff 75 08 pushl 0x8(%ebp) 10a11e: ff d6 call *%esi #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) (*print)( context, "--- CPU times are in seconds ---\n" ); 10a120: 58 pop %eax 10a121: 5a pop %edx 10a122: 68 c2 9b 11 00 push $0x119bc2 10a127: ff 75 08 pushl 0x8(%ebp) 10a12a: ff d6 call *%esi #endif #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) (*print)( context, "--- Wall times are in seconds ---\n" ); 10a12c: 5f pop %edi 10a12d: 58 pop %eax 10a12e: 68 e4 9b 11 00 push $0x119be4 10a133: ff 75 08 pushl 0x8(%ebp) 10a136: ff d6 call *%esi Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 10a138: 59 pop %ecx 10a139: 5b pop %ebx 10a13a: 68 07 9c 11 00 push $0x119c07 10a13f: ff 75 08 pushl 0x8(%ebp) 10a142: ff d6 call *%esi #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS " " #endif " WALL TIME\n" ); (*print)( context, " " 10a144: 58 pop %eax 10a145: 5a pop %edx 10a146: 68 52 9c 11 00 push $0x119c52 10a14b: ff 75 08 pushl 0x8(%ebp) 10a14e: 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 ; 10a150: 8b 3d 94 04 12 00 mov 0x120494,%edi 10a156: 83 c4 10 add $0x10,%esp 10a159: e9 ee 00 00 00 jmp 10a24c id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 10a15e: 50 push %eax 10a15f: 50 push %eax 10a160: 8d 45 94 lea -0x6c(%ebp),%eax 10a163: 50 push %eax 10a164: 57 push %edi 10a165: e8 fa 4a 00 00 call 10ec64 if ( status != RTEMS_SUCCESSFUL ) 10a16a: 83 c4 10 add $0x10,%esp 10a16d: 85 c0 test %eax,%eax 10a16f: 0f 85 d6 00 00 00 jne 10a24b continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 10a175: 50 push %eax 10a176: 50 push %eax 10a177: 8d 55 cc lea -0x34(%ebp),%edx 10a17a: 52 push %edx 10a17b: 57 push %edi 10a17c: e8 33 4b 00 00 call 10ecb4 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif name[ 0 ] = '\0'; 10a181: c6 45 ef 00 movb $0x0,-0x11(%ebp) if ( the_status.owner ) { 10a185: 8b 55 cc mov -0x34(%ebp),%edx 10a188: 83 c4 10 add $0x10,%esp 10a18b: 85 d2 test %edx,%edx 10a18d: 74 10 je 10a19f <== NEVER TAKEN rtems_object_get_name( the_status.owner, sizeof(name), name ); 10a18f: 50 push %eax 10a190: 8d 45 ef lea -0x11(%ebp),%eax 10a193: 50 push %eax 10a194: 6a 05 push $0x5 10a196: 52 push %edx 10a197: e8 04 02 00 00 call 10a3a0 10a19c: 83 c4 10 add $0x10,%esp /* * Print part of report line that is not dependent on granularity */ (*print)( context, 10a19f: 53 push %ebx 10a1a0: 53 push %ebx 10a1a1: ff 75 98 pushl -0x68(%ebp) 10a1a4: ff 75 94 pushl -0x6c(%ebp) 10a1a7: 8d 45 ef lea -0x11(%ebp),%eax 10a1aa: 50 push %eax 10a1ab: 57 push %edi 10a1ac: 68 9e 9c 11 00 push $0x119c9e 10a1b1: ff 75 08 pushl 0x8(%ebp) 10a1b4: ff d6 call *%esi /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 10a1b6: 8b 45 94 mov -0x6c(%ebp),%eax 10a1b9: 83 c4 20 add $0x20,%esp 10a1bc: 85 c0 test %eax,%eax 10a1be: 75 11 jne 10a1d1 (*print)( context, "\n" ); 10a1c0: 51 push %ecx 10a1c1: 51 push %ecx 10a1c2: 68 1d 9f 11 00 push $0x119f1d 10a1c7: ff 75 08 pushl 0x8(%ebp) 10a1ca: ff d6 call *%esi 10a1cc: 83 c4 10 add $0x10,%esp 10a1cf: eb 7a jmp 10a24b */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 10a1d1: 52 push %edx 10a1d2: 8d 55 e4 lea -0x1c(%ebp),%edx 10a1d5: 52 push %edx 10a1d6: 50 push %eax 10a1d7: 8d 45 ac lea -0x54(%ebp),%eax 10a1da: 50 push %eax 10a1db: e8 58 2f 00 00 call 10d138 <_Timespec_Divide_by_integer> &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 10a1e0: 8b 45 e8 mov -0x18(%ebp),%eax 10a1e3: bb e8 03 00 00 mov $0x3e8,%ebx 10a1e8: 99 cltd 10a1e9: f7 fb idiv %ebx 10a1eb: 50 push %eax 10a1ec: ff 75 e4 pushl -0x1c(%ebp) 10a1ef: 8b 45 a8 mov -0x58(%ebp),%eax 10a1f2: 99 cltd 10a1f3: f7 fb idiv %ebx 10a1f5: 50 push %eax 10a1f6: ff 75 a4 pushl -0x5c(%ebp) 10a1f9: 8b 45 a0 mov -0x60(%ebp),%eax 10a1fc: 99 cltd 10a1fd: f7 fb idiv %ebx 10a1ff: 50 push %eax 10a200: ff 75 9c pushl -0x64(%ebp) 10a203: 68 b5 9c 11 00 push $0x119cb5 10a208: ff 75 08 pushl 0x8(%ebp) 10a20b: ff d6 call *%esi * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 10a20d: 83 c4 2c add $0x2c,%esp 10a210: 8d 45 e4 lea -0x1c(%ebp),%eax 10a213: 50 push %eax 10a214: ff 75 94 pushl -0x6c(%ebp) 10a217: 8d 45 c4 lea -0x3c(%ebp),%eax 10a21a: 50 push %eax 10a21b: e8 18 2f 00 00 call 10d138 <_Timespec_Divide_by_integer> &the_stats.total_wall_time, the_stats.count, &wall_average ); (*print)( context, 10a220: 8b 45 e8 mov -0x18(%ebp),%eax 10a223: 99 cltd 10a224: f7 fb idiv %ebx 10a226: 50 push %eax 10a227: ff 75 e4 pushl -0x1c(%ebp) 10a22a: 8b 45 c0 mov -0x40(%ebp),%eax 10a22d: 99 cltd 10a22e: f7 fb idiv %ebx 10a230: 50 push %eax 10a231: ff 75 bc pushl -0x44(%ebp) 10a234: 8b 45 b8 mov -0x48(%ebp),%eax 10a237: 99 cltd 10a238: f7 fb idiv %ebx 10a23a: 50 push %eax 10a23b: ff 75 b4 pushl -0x4c(%ebp) 10a23e: 68 d4 9c 11 00 push $0x119cd4 10a243: ff 75 08 pushl 0x8(%ebp) 10a246: ff d6 call *%esi 10a248: 83 c4 30 add $0x30,%esp * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 10a24b: 47 inc %edi /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 10a24c: 3b 3d 98 04 12 00 cmp 0x120498,%edi 10a252: 0f 86 06 ff ff ff jbe 10a15e the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 10a258: 8d 65 f4 lea -0xc(%ebp),%esp 10a25b: 5b pop %ebx 10a25c: 5e pop %esi 10a25d: 5f pop %edi 10a25e: c9 leave 10a25f: c3 ret =============================================================================== 00111ac0 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 111ac0: 55 push %ebp 111ac1: 89 e5 mov %esp,%ebp 111ac3: 57 push %edi 111ac4: 56 push %esi 111ac5: 53 push %ebx 111ac6: 83 ec 1c sub $0x1c,%esp 111ac9: 8b 7d 0c mov 0xc(%ebp),%edi Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Region_Control *the_region; if ( !starting_address ) 111acc: bb 09 00 00 00 mov $0x9,%ebx 111ad1: 85 ff test %edi,%edi 111ad3: 0f 84 82 00 00 00 je 111b5b <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 111ad9: 83 ec 0c sub $0xc,%esp 111adc: ff 35 98 28 13 00 pushl 0x132898 111ae2: e8 89 1e 00 00 call 113970 <_API_Mutex_Lock> /** * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon 111ae7: 83 c4 0c add $0xc,%esp 111aea: 8d 45 ec lea -0x14(%ebp),%eax 111aed: 50 push %eax 111aee: ff 75 08 pushl 0x8(%ebp) 111af1: 68 94 26 13 00 push $0x132694 111af6: e8 21 34 00 00 call 114f1c <_Objects_Get_no_protection> 111afb: 89 c6 mov %eax,%esi the_region = _Region_Get( id, &location ); switch ( location ) { 111afd: 83 c4 10 add $0x10,%esp 111b00: 8b 45 ec mov -0x14(%ebp),%eax 111b03: 85 c0 test %eax,%eax 111b05: 74 08 je 111b0f 111b07: bb 04 00 00 00 mov $0x4,%ebx 111b0c: 48 dec %eax 111b0d: eb 25 jmp 111b34 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 111b0f: 8d 45 f0 lea -0x10(%ebp),%eax 111b12: 50 push %eax 111b13: ff 75 10 pushl 0x10(%ebp) 111b16: 57 push %edi 111b17: 8d 46 68 lea 0x68(%esi),%eax 111b1a: 50 push %eax 111b1b: e8 4c 28 00 00 call 11436c <_Heap_Extend> starting_address, length, &amount_extended ); switch ( heap_status ) { 111b20: 83 c4 10 add $0x10,%esp 111b23: bb 09 00 00 00 mov $0x9,%ebx 111b28: 83 f8 01 cmp $0x1,%eax 111b2b: 74 1d je 111b4a 111b2d: 72 09 jb 111b38 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; break; 111b2f: b3 18 mov $0x18,%bl starting_address, length, &amount_extended ); switch ( heap_status ) { 111b31: 83 f8 02 cmp $0x2,%eax 111b34: 75 0f jne 111b45 <== NEVER TAKEN 111b36: eb 12 jmp 111b4a case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 111b38: 8b 45 f0 mov -0x10(%ebp),%eax 111b3b: 01 46 54 add %eax,0x54(%esi) the_region->maximum_segment_size += amount_extended; 111b3e: 01 46 5c add %eax,0x5c(%esi) 111b41: 31 db xor %ebx,%ebx 111b43: eb 05 jmp 111b4a return_status = RTEMS_SUCCESSFUL; break; 111b45: bb 19 00 00 00 mov $0x19,%ebx <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 111b4a: 83 ec 0c sub $0xc,%esp 111b4d: ff 35 98 28 13 00 pushl 0x132898 111b53: e8 60 1e 00 00 call 1139b8 <_API_Mutex_Unlock> 111b58: 83 c4 10 add $0x10,%esp return return_status; } 111b5b: 89 d8 mov %ebx,%eax 111b5d: 8d 65 f4 lea -0xc(%ebp),%esp 111b60: 5b pop %ebx 111b61: 5e pop %esi 111b62: 5f pop %edi 111b63: c9 leave 111b64: c3 ret =============================================================================== 00111c80 : uint32_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 111c80: 55 push %ebp 111c81: 89 e5 mov %esp,%ebp 111c83: 57 push %edi 111c84: 56 push %esi 111c85: 53 push %ebx 111c86: 83 ec 1c sub $0x1c,%esp Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; register Region_Control *the_region; void *the_segment; if ( !segment ) 111c89: bb 09 00 00 00 mov $0x9,%ebx 111c8e: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 111c92: 0f 84 fd 00 00 00 je 111d95 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; *segment = NULL; 111c98: 8b 45 18 mov 0x18(%ebp),%eax 111c9b: c7 00 00 00 00 00 movl $0x0,(%eax) if ( size == 0 ) 111ca1: bb 08 00 00 00 mov $0x8,%ebx 111ca6: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 111caa: 0f 84 e5 00 00 00 je 111d95 <== NEVER TAKEN return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 111cb0: 83 ec 0c sub $0xc,%esp 111cb3: ff 35 98 28 13 00 pushl 0x132898 111cb9: e8 b2 1c 00 00 call 113970 <_API_Mutex_Lock> executing = _Thread_Executing; 111cbe: 8b 3d a0 28 13 00 mov 0x1328a0,%edi 111cc4: 83 c4 0c add $0xc,%esp 111cc7: 8d 45 f0 lea -0x10(%ebp),%eax 111cca: 50 push %eax 111ccb: ff 75 08 pushl 0x8(%ebp) 111cce: 68 94 26 13 00 push $0x132694 111cd3: e8 44 32 00 00 call 114f1c <_Objects_Get_no_protection> 111cd8: 89 c6 mov %eax,%esi the_region = _Region_Get( id, &location ); switch ( location ) { 111cda: 83 c4 10 add $0x10,%esp 111cdd: 8b 45 f0 mov -0x10(%ebp),%eax 111ce0: 85 c0 test %eax,%eax 111ce2: 74 14 je 111cf8 111ce4: 31 db xor %ebx,%ebx 111ce6: 83 f8 01 cmp $0x1,%eax 111ce9: 0f 95 c3 setne %bl 111cec: 4b dec %ebx 111ced: 83 e3 eb and $0xffffffeb,%ebx 111cf0: 83 c3 19 add $0x19,%ebx 111cf3: e9 8c 00 00 00 jmp 111d84 case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 111cf8: bb 08 00 00 00 mov $0x8,%ebx 111cfd: 8b 55 0c mov 0xc(%ebp),%edx 111d00: 3b 56 5c cmp 0x5c(%esi),%edx 111d03: 77 7f ja 111d84 /** * This function attempts to allocate a block of @a size bytes from * @a the_heap. If insufficient memory is free in @a the_heap to allocate * a block of the requested size, then NULL is returned. * 111d05: 50 push %eax 111d06: 50 push %eax 111d07: ff 75 0c pushl 0xc(%ebp) 111d0a: 8d 46 68 lea 0x68(%esi),%eax 111d0d: 50 push %eax 111d0e: e8 ed 25 00 00 call 114300 <_Heap_Allocate> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 111d13: 83 c4 10 add $0x10,%esp 111d16: 85 c0 test %eax,%eax 111d18: 74 0c je 111d26 the_region->number_of_used_blocks += 1; 111d1a: ff 46 64 incl 0x64(%esi) *segment = the_segment; 111d1d: 8b 55 18 mov 0x18(%ebp),%edx 111d20: 89 02 mov %eax,(%edx) 111d22: 31 db xor %ebx,%ebx 111d24: eb 5e jmp 111d84 return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) { 111d26: bb 0d 00 00 00 mov $0xd,%ebx 111d2b: f6 45 10 01 testb $0x1,0x10(%ebp) 111d2f: 75 53 jne 111d84 /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 111d31: a1 e0 27 13 00 mov 0x1327e0,%eax 111d36: 40 inc %eax 111d37: a3 e0 27 13 00 mov %eax,0x1327e0 * 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(); 111d3c: 83 ec 0c sub $0xc,%esp 111d3f: ff 35 98 28 13 00 pushl 0x132898 111d45: e8 6e 1c 00 00 call 1139b8 <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 111d4a: 8d 46 10 lea 0x10(%esi),%eax 111d4d: 89 47 44 mov %eax,0x44(%edi) executing->Wait.id = id; 111d50: 8b 55 08 mov 0x8(%ebp),%edx 111d53: 89 57 20 mov %edx,0x20(%edi) executing->Wait.count = size; 111d56: 8b 55 0c mov 0xc(%ebp),%edx 111d59: 89 57 24 mov %edx,0x24(%edi) executing->Wait.return_argument = segment; 111d5c: 8b 55 18 mov 0x18(%ebp),%edx 111d5f: 89 57 28 mov %edx,0x28(%edi) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } /** * This routine grows @a the_heap memory area using the size bytes which 111d62: c7 46 40 01 00 00 00 movl $0x1,0x40(%esi) _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 111d69: 83 c4 0c add $0xc,%esp 111d6c: 68 6c 5e 11 00 push $0x115e6c 111d71: ff 75 14 pushl 0x14(%ebp) 111d74: 50 push %eax 111d75: e8 ee 3d 00 00 call 115b68 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 111d7a: e8 99 39 00 00 call 115718 <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 111d7f: 8b 5f 34 mov 0x34(%edi),%ebx 111d82: eb 0e jmp 111d92 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 111d84: 83 ec 0c sub $0xc,%esp 111d87: ff 35 98 28 13 00 pushl 0x132898 111d8d: e8 26 1c 00 00 call 1139b8 <_API_Mutex_Unlock> 111d92: 83 c4 10 add $0x10,%esp return return_status; } 111d95: 89 d8 mov %ebx,%eax 111d97: 8d 65 f4 lea -0xc(%ebp),%esp 111d9a: 5b pop %ebx 111d9b: 5e pop %esi 111d9c: 5f pop %edi 111d9d: c9 leave 111d9e: c3 ret =============================================================================== 00111e50 : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 111e50: 55 push %ebp 111e51: 89 e5 mov %esp,%ebp 111e53: 57 push %edi 111e54: 56 push %esi 111e55: 53 push %ebx 111e56: 83 ec 1c sub $0x1c,%esp 111e59: 8b 7d 14 mov 0x14(%ebp),%edi uint32_t osize; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 111e5c: 85 ff test %edi,%edi 111e5e: 0f 84 aa 00 00 00 je 111f0e return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 111e64: 83 ec 0c sub $0xc,%esp 111e67: ff 35 98 28 13 00 pushl 0x132898 111e6d: e8 fe 1a 00 00 call 113970 <_API_Mutex_Lock> 111e72: 83 c4 0c add $0xc,%esp 111e75: 8d 45 ec lea -0x14(%ebp),%eax 111e78: 50 push %eax 111e79: ff 75 08 pushl 0x8(%ebp) 111e7c: 68 94 26 13 00 push $0x132694 111e81: e8 96 30 00 00 call 114f1c <_Objects_Get_no_protection> 111e86: 89 c3 mov %eax,%ebx the_region = _Region_Get( id, &location ); switch ( location ) { 111e88: 83 c4 10 add $0x10,%esp 111e8b: 8b 45 ec mov -0x14(%ebp),%eax 111e8e: 85 c0 test %eax,%eax 111e90: 74 1f je 111eb1 111e92: 31 db xor %ebx,%ebx 111e94: 83 f8 01 cmp $0x1,%eax 111e97: 0f 95 c3 setne %bl 111e9a: 4b dec %ebx 111e9b: 83 e3 eb and $0xffffffeb,%ebx 111e9e: 83 c3 19 add $0x19,%ebx case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 111ea1: 83 ec 0c sub $0xc,%esp 111ea4: ff 35 98 28 13 00 pushl 0x132898 111eaa: e8 09 1b 00 00 call 1139b8 <_API_Mutex_Unlock> 111eaf: eb 39 jmp 111eea case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 111eb1: 83 ec 0c sub $0xc,%esp 111eb4: 8d 45 f0 lea -0x10(%ebp),%eax 111eb7: 50 push %eax 111eb8: 8d 45 e8 lea -0x18(%ebp),%eax 111ebb: 50 push %eax 111ebc: ff 75 10 pushl 0x10(%ebp) 111ebf: ff 75 0c pushl 0xc(%ebp) 111ec2: 8d 43 68 lea 0x68(%ebx),%eax 111ec5: 50 push %eax 111ec6: e8 19 29 00 00 call 1147e4 <_Heap_Resize_block> 111ecb: 89 c6 mov %eax,%esi segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 111ecd: 8b 45 e8 mov -0x18(%ebp),%eax 111ed0: 89 07 mov %eax,(%edi) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 111ed2: 83 c4 20 add $0x20,%esp 111ed5: 85 f6 test %esi,%esi 111ed7: 75 16 jne 111eef <== ALWAYS TAKEN 111ed9: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) <== NOT EXECUTED 111edd: 74 10 je 111eef <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ 111edf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111ee2: 53 push %ebx <== NOT EXECUTED 111ee3: e8 b8 61 00 00 call 1180a0 <_Region_Process_queue> <== NOT EXECUTED 111ee8: 31 db xor %ebx,%ebx <== NOT EXECUTED 111eea: 83 c4 10 add $0x10,%esp 111eed: eb 24 jmp 111f13 else _RTEMS_Unlock_allocator(); 111eef: 83 ec 0c sub $0xc,%esp 111ef2: ff 35 98 28 13 00 pushl 0x132898 111ef8: e8 bb 1a 00 00 call 1139b8 <_API_Mutex_Unlock> return 111efd: 83 c4 10 add $0x10,%esp 111f00: 31 db xor %ebx,%ebx 111f02: 85 f6 test %esi,%esi 111f04: 74 0d je 111f13 <== NEVER TAKEN 111f06: bb 0d 00 00 00 mov $0xd,%ebx 111f0b: 4e dec %esi 111f0c: 74 05 je 111f13 <== NEVER TAKEN return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 111f0e: bb 09 00 00 00 mov $0x9,%ebx } 111f13: 89 d8 mov %ebx,%eax 111f15: 8d 65 f4 lea -0xc(%ebp),%esp 111f18: 5b pop %ebx 111f19: 5e pop %esi 111f1a: 5f pop %edi 111f1b: c9 leave 111f1c: c3 ret =============================================================================== 00108f40 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 108f40: 55 push %ebp 108f41: 89 e5 mov %esp,%ebp 108f43: 57 push %edi 108f44: 56 push %esi 108f45: 53 push %ebx 108f46: 83 ec 2c sub $0x2c,%esp 108f49: 8b 5d 10 mov 0x10(%ebp),%ebx register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attributes; CORE_semaphore_Attributes the_semaphore_attributes; if ( !rtems_is_name_valid( name ) ) 108f4c: b8 03 00 00 00 mov $0x3,%eax 108f51: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 108f55: 0f 84 7f 01 00 00 je 1090da <== NEVER TAKEN return RTEMS_INVALID_NAME; if ( !id ) 108f5b: b8 09 00 00 00 mov $0x9,%eax 108f60: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 108f64: 0f 84 70 01 00 00 je 1090da <== NEVER TAKEN return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 108f6a: 89 da mov %ebx,%edx 108f6c: 81 e2 c0 00 00 00 and $0xc0,%edx 108f72: 74 28 je 108f9c * @param[in] alignment the required alignment * @return NULL if unsuccessful and a pointer to the block if successful */ void *_Protected_heap_Allocate_aligned( Heap_Control *the_heap, size_t size, 108f74: 89 d8 mov %ebx,%eax 108f76: 83 e0 30 and $0x30,%eax _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 108f79: 83 f8 10 cmp $0x10,%eax 108f7c: 74 09 je 108f87 108f7e: 83 f8 20 cmp $0x20,%eax 108f81: 0f 85 4e 01 00 00 jne 1090d5 <== NEVER TAKEN 108f87: f6 c3 04 test $0x4,%bl 108f8a: 0f 84 45 01 00 00 je 1090d5 <== NEVER TAKEN _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 108f90: 81 fa c0 00 00 00 cmp $0xc0,%edx 108f96: 0f 84 39 01 00 00 je 1090d5 _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 108f9c: 89 df mov %ebx,%edi 108f9e: 83 e7 30 and $0x30,%edi 108fa1: 74 0f je 108fb2 108fa3: b8 0a 00 00 00 mov $0xa,%eax 108fa8: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 108fac: 0f 87 28 01 00 00 ja 1090da /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 108fb2: a1 e0 ca 11 00 mov 0x11cae0,%eax 108fb7: 40 inc %eax 108fb8: a3 e0 ca 11 00 mov %eax,0x11cae0 #ifdef __cplusplus extern "C" { #endif /** 108fbd: 83 ec 0c sub $0xc,%esp 108fc0: 68 28 ca 11 00 push $0x11ca28 108fc5: e8 1e 12 00 00 call 10a1e8 <_Objects_Allocate> 108fca: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 108fcc: 83 c4 10 add $0x10,%esp 108fcf: 85 c0 test %eax,%eax 108fd1: 75 0f jne 108fe2 _Thread_Enable_dispatch(); 108fd3: e8 14 1e 00 00 call 10adec <_Thread_Enable_dispatch> 108fd8: b8 05 00 00 00 mov $0x5,%eax 108fdd: e9 f8 00 00 00 jmp 1090da _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 108fe2: 89 58 10 mov %ebx,0x10(%eax) * If it is not a counting semaphore, then it is either a * simple binary semaphore or a more powerful mutex style binary * semaphore. */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { 108fe5: 85 ff test %edi,%edi 108fe7: 0f 84 92 00 00 00 je 10907f CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 108fed: f6 c3 40 test $0x40,%bl 108ff0: 74 09 je 108ffb the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 108ff2: c7 45 e4 02 00 00 00 movl $0x2,-0x1c(%ebp) 108ff9: eb 18 jmp 109013 else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 108ffb: 84 db test %bl,%bl 108ffd: 79 09 jns 109008 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 108fff: c7 45 e4 03 00 00 00 movl $0x3,-0x1c(%ebp) 109006: eb 0b jmp 109013 else if ( _Attributes_Is_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 109008: 31 c0 xor %eax,%eax 10900a: f6 c3 04 test $0x4,%bl 10900d: 0f 95 c0 setne %al 109010: 89 45 e4 mov %eax,-0x1c(%ebp) else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 109013: 83 ff 10 cmp $0x10,%edi 109016: 75 1a jne 109032 the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 109018: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) switch ( the_mutex_attributes.discipline ) { 10901f: 8b 45 e4 mov -0x1c(%ebp),%eax 109022: 83 f8 01 cmp $0x1,%eax 109025: 76 12 jbe 109039 109027: 83 f8 03 cmp $0x3,%eax 10902a: 77 11 ja 10903d <== NEVER TAKEN case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; 10902c: c6 45 e0 01 movb $0x1,-0x20(%ebp) 109030: eb 0b jmp 10903d break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 109032: c7 45 dc 02 00 00 00 movl $0x2,-0x24(%ebp) the_mutex_attributes.only_owner_release = FALSE; 109039: c6 45 e0 00 movb $0x0,-0x20(%ebp) } the_mutex_attributes.priority_ceiling = priority_ceiling; 10903d: 8b 45 14 mov 0x14(%ebp),%eax 109040: 89 45 e8 mov %eax,-0x18(%ebp) mutex_status = _CORE_mutex_Initialize( 109043: 51 push %ecx 109044: 31 c0 xor %eax,%eax 109046: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10904a: 0f 94 c0 sete %al 10904d: 50 push %eax 10904e: 8d 45 dc lea -0x24(%ebp),%eax 109051: 50 push %eax 109052: 8d 46 14 lea 0x14(%esi),%eax 109055: 50 push %eax 109056: e8 4d 0b 00 00 call 109ba8 <_CORE_mutex_Initialize> &the_semaphore->Core_control.mutex, &the_mutex_attributes, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 10905b: 83 c4 10 add $0x10,%esp 10905e: 83 f8 06 cmp $0x6,%eax 109061: 75 50 jne 1090b3 <== ALWAYS TAKEN * @param[in] starting_address is the starting address of the memory for * the heap * @param[in] size is the size in bytes of the memory area for the heap * @param[in] page_size is the size in bytes of the allocation unit * * @return This method returns the maximum memory available. If 109063: 52 push %edx <== NOT EXECUTED 109064: 52 push %edx <== NOT EXECUTED 109065: 56 push %esi <== NOT EXECUTED 109066: 68 28 ca 11 00 push $0x11ca28 <== NOT EXECUTED 10906b: e8 88 14 00 00 call 10a4f8 <_Objects_Free> <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 109070: e8 77 1d 00 00 call 10adec <_Thread_Enable_dispatch><== NOT EXECUTED 109075: b8 13 00 00 00 mov $0x13,%eax <== NOT EXECUTED 10907a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10907d: eb 5b jmp 1090da <== NOT EXECUTED return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 10907f: 31 c0 xor %eax,%eax 109081: f6 c3 04 test $0x4,%bl 109084: 0f 95 c0 setne %al 109087: 89 45 f0 mov %eax,-0x10(%ebp) /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 10908a: c7 45 ec ff ff ff ff movl $0xffffffff,-0x14(%ebp) /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 109091: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 109098: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%ebp) _CORE_semaphore_Initialize( 10909f: 50 push %eax 1090a0: ff 75 0c pushl 0xc(%ebp) 1090a3: 8d 45 ec lea -0x14(%ebp),%eax 1090a6: 50 push %eax 1090a7: 8d 46 14 lea 0x14(%esi),%eax 1090aa: 50 push %eax 1090ab: e8 74 0d 00 00 call 109e24 <_CORE_semaphore_Initialize> 1090b0: 83 c4 10 add $0x10,%esp 1090b3: 8b 4e 08 mov 0x8(%esi),%ecx 1090b6: 0f b7 d1 movzwl %cx,%edx 1090b9: a1 44 ca 11 00 mov 0x11ca44,%eax 1090be: 89 34 90 mov %esi,(%eax,%edx,4) 1090c1: 8b 45 08 mov 0x8(%ebp),%eax 1090c4: 89 46 0c mov %eax,0xc(%esi) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 1090c7: 8b 45 18 mov 0x18(%ebp),%eax 1090ca: 89 08 mov %ecx,(%eax) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 1090cc: e8 1b 1d 00 00 call 10adec <_Thread_Enable_dispatch> 1090d1: 31 c0 xor %eax,%eax 1090d3: eb 05 jmp 1090da return RTEMS_SUCCESSFUL; 1090d5: b8 0b 00 00 00 mov $0xb,%eax } 1090da: 8d 65 f4 lea -0xc(%ebp),%esp 1090dd: 5b pop %ebx 1090de: 5e pop %esi 1090df: 5f pop %edi 1090e0: c9 leave 1090e1: c3 ret =============================================================================== 001121dc : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 1121dc: 55 push %ebp 1121dd: 89 e5 mov %esp,%ebp 1121df: 83 ec 1c sub $0x1c,%esp * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon * @param[in] starting_address is the starting address of the memory * to add to the heap 1121e2: 8d 45 fc lea -0x4(%ebp),%eax 1121e5: 50 push %eax 1121e6: ff 75 08 pushl 0x8(%ebp) 1121e9: 68 d4 26 13 00 push $0x1326d4 1121ee: e8 65 2d 00 00 call 114f58 <_Objects_Get> 1121f3: 89 c2 mov %eax,%edx register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 1121f5: 83 c4 10 add $0x10,%esp 1121f8: b8 04 00 00 00 mov $0x4,%eax 1121fd: 83 7d fc 00 cmpl $0x0,-0x4(%ebp) 112201: 75 2b jne 11222e case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 112203: f6 42 10 30 testb $0x30,0x10(%edx) 112207: 8d 42 14 lea 0x14(%edx),%eax 11220a: 74 0d je 112219 <== NEVER TAKEN _CORE_mutex_Flush( 11220c: 51 push %ecx 11220d: 6a 01 push $0x1 11220f: 6a 00 push $0x0 112211: 50 push %eax 112212: e8 49 1c 00 00 call 113e60 <_CORE_mutex_Flush> 112217: eb 0b jmp 112224 &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 112219: 52 push %edx <== NOT EXECUTED 11221a: 6a 01 push $0x1 <== NOT EXECUTED 11221c: 6a 00 push $0x0 <== NOT EXECUTED 11221e: 50 push %eax <== NOT EXECUTED 11221f: e8 b8 1e 00 00 call 1140dc <_CORE_semaphore_Flush> <== NOT EXECUTED 112224: 83 c4 10 add $0x10,%esp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 112227: e8 ec 34 00 00 call 115718 <_Thread_Enable_dispatch> 11222c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11222e: c9 leave 11222f: c3 ret =============================================================================== 00114ddc : */ void rtems_shutdown_executive( uint32_t result ) { 114ddc: 55 push %ebp 114ddd: 89 e5 mov %esp,%ebp 114ddf: 83 ec 28 sub $0x28,%esp if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 114de2: 83 3d 80 cc 11 00 04 cmpl $0x4,0x11cc80 114de9: 74 1d je 114e08 <== NEVER TAKEN RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 114deb: c7 05 80 cc 11 00 04 movl $0x4,0x11cc80 114df2: 00 00 00 #endif } /** * This routine sets the current system state to that specified by * the called. 114df5: 50 push %eax 114df6: 50 push %eax 114df7: 68 c8 ca 11 00 push $0x11cac8 114dfc: 8d 45 e8 lea -0x18(%ebp),%eax 114dff: 50 push %eax 114e00: e8 1b 70 ff ff call 10be20 <_CPU_Context_switch> 114e05: 83 c4 10 add $0x10,%esp <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } } 114e08: c9 leave <== NOT EXECUTED 114e09: c3 ret <== NOT EXECUTED =============================================================================== 00109ef0 : rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { 109ef0: 55 push %ebp 109ef1: 89 e5 mov %esp,%ebp 109ef3: 83 ec 08 sub $0x8,%esp 109ef6: 8b 4d 08 mov 0x8(%ebp),%ecx RTEMS_API_Control *api; ASR_Information *asr; /* XXX normalize mode */ executing = _Thread_Executing; api = (RTEMS_API_Control*)executing->API_Extensions[ THREAD_API_RTEMS ]; 109ef9: a1 ac f5 11 00 mov 0x11f5ac,%eax 109efe: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 109f04: a1 ec f4 11 00 mov 0x11f4ec,%eax 109f09: 40 inc %eax 109f0a: a3 ec f4 11 00 mov %eax,0x11f4ec asr = &api->Signal; _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { 109f0f: 85 c9 test %ecx,%ecx 109f11: 74 0b je 109f1e <== NEVER TAKEN asr->mode_set = mode_set; 109f13: 8b 45 0c mov 0xc(%ebp),%eax 109f16: 89 42 10 mov %eax,0x10(%edx) asr->handler = asr_handler; 109f19: 89 4a 0c mov %ecx,0xc(%edx) 109f1c: eb 27 jmp 109f45 #endif /** * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of 109f1e: c6 42 08 01 movb $0x1,0x8(%edx) <== NOT EXECUTED * @a page_size byte units. If @a page_size is 0 or is not multiple of 109f22: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) <== NOT EXECUTED * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. 109f29: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) <== NOT EXECUTED * 109f30: c7 42 14 00 00 00 00 movl $0x0,0x14(%edx) <== NOT EXECUTED * @param[in] the_heap is the heap to operate upon 109f37: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) <== NOT EXECUTED * @param[in] starting_address is the starting address of the memory for 109f3e: c7 42 1c 00 00 00 00 movl $0x0,0x1c(%edx) <== NOT EXECUTED } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 109f45: e8 ee 1d 00 00 call 10bd38 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 109f4a: 31 c0 xor %eax,%eax 109f4c: c9 leave 109f4d: c3 ret =============================================================================== 001123cc : rtems_status_code rtems_signal_send( Objects_Id id, rtems_signal_set signal_set ) { 1123cc: 55 push %ebp 1123cd: 89 e5 mov %esp,%ebp 1123cf: 53 push %ebx 1123d0: 83 ec 14 sub $0x14,%esp 1123d3: 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 ) 1123d6: b8 0a 00 00 00 mov $0xa,%eax 1123db: 85 db test %ebx,%ebx 1123dd: 74 71 je 112450 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 1123df: 50 push %eax 1123e0: 50 push %eax 1123e1: 8d 45 f8 lea -0x8(%ebp),%eax 1123e4: 50 push %eax 1123e5: ff 75 08 pushl 0x8(%ebp) 1123e8: e8 4b 33 00 00 call 115738 <_Thread_Get> 1123ed: 89 c1 mov %eax,%ecx switch ( location ) { 1123ef: 83 c4 10 add $0x10,%esp 1123f2: b8 04 00 00 00 mov $0x4,%eax 1123f7: 83 7d f8 00 cmpl $0x0,-0x8(%ebp) 1123fb: 75 53 jne 112450 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 1123fd: 8b 91 f4 00 00 00 mov 0xf4(%ecx),%edx asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 112403: 83 7a 0c 00 cmpl $0x0,0xc(%edx) 112407: 74 3d je 112446 if ( asr->is_enabled ) { 112409: 80 7a 08 00 cmpb $0x0,0x8(%edx) 11240d: 74 26 je 112435 <== NEVER TAKEN * @return NULL if unsuccessful and a pointer to the block if successful */ void *_Protected_heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment 11240f: 9c pushf 112410: fa cli 112411: 58 pop %eax ); 112412: 09 5a 14 or %ebx,0x14(%edx) 112415: 50 push %eax 112416: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 112417: c6 41 75 01 movb $0x1,0x75(%ecx) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 11241b: a1 7c 28 13 00 mov 0x13287c,%eax 112420: 85 c0 test %eax,%eax 112422: 74 19 je 11243d 112424: 3b 0d a0 28 13 00 cmp 0x1328a0,%ecx 11242a: 75 11 jne 11243d <== NEVER TAKEN _ISR_Signals_to_thread_executing = TRUE; 11242c: c6 05 34 29 13 00 01 movb $0x1,0x132934 112433: eb 08 jmp 11243d * @return NULL if unsuccessful and a pointer to the block if successful */ void *_Protected_heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment 112435: 9c pushf <== NOT EXECUTED 112436: fa cli <== NOT EXECUTED 112437: 58 pop %eax <== NOT EXECUTED ); 112438: 09 5a 18 or %ebx,0x18(%edx) <== NOT EXECUTED 11243b: 50 push %eax <== NOT EXECUTED 11243c: 9d popf <== NOT EXECUTED } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 11243d: e8 d6 32 00 00 call 115718 <_Thread_Enable_dispatch> 112442: 31 c0 xor %eax,%eax 112444: eb 0a jmp 112450 return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 112446: e8 cd 32 00 00 call 115718 <_Thread_Enable_dispatch> 11244b: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112450: 8b 5d fc mov -0x4(%ebp),%ebx 112453: c9 leave 112454: c3 ret =============================================================================== 001092ec : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, Objects_Id *id ) { 1092ec: 55 push %ebp 1092ed: 89 e5 mov %esp,%ebp 1092ef: 57 push %edi 1092f0: 56 push %esi 1092f1: 53 push %ebx 1092f2: 83 ec 0c sub $0xc,%esp 1092f5: 8b 5d 14 mov 0x14(%ebp),%ebx 1092f8: 8b 7d 18 mov 0x18(%ebp),%edi Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 1092fb: b8 09 00 00 00 mov $0x9,%eax 109300: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp) 109304: 0f 84 08 01 00 00 je 109412 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10930a: b8 03 00 00 00 mov $0x3,%eax 10930f: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 109313: 0f 84 f9 00 00 00 je 109412 /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 109319: 66 85 ff test %di,%di 10931c: 78 24 js 109342 bool _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, size_t size ); 10931e: 31 d2 xor %edx,%edx 109320: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 109324: 74 0f je 109335 109326: 0f b6 05 64 87 11 00 movzbl 0x118764,%eax 10932d: 31 d2 xor %edx,%edx 10932f: 39 45 0c cmp %eax,0xc(%ebp) 109332: 0f 96 c2 setbe %dl if ( !_RTEMS_tasks_Priority_is_valid( initial_priority ) ) 109335: b8 13 00 00 00 mov $0x13,%eax 10933a: 85 d2 test %edx,%edx 10933c: 0f 84 d0 00 00 00 je 109412 */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 109342: 83 ec 0c sub $0xc,%esp 109345: ff 35 98 cb 11 00 pushl 0x11cb98 10934b: e8 88 06 00 00 call 1099d8 <_API_Mutex_Lock> #ifdef __cplusplus extern "C" { #endif /** 109350: c7 04 24 68 ca 11 00 movl $0x11ca68,(%esp) 109357: e8 8c 0e 00 00 call 10a1e8 <_Objects_Allocate> 10935c: 89 c6 mov %eax,%esi * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 10935e: 83 c4 10 add $0x10,%esp 109361: 85 c0 test %eax,%eax 109363: 75 18 jne 10937d _RTEMS_Unlock_allocator(); 109365: 83 ec 0c sub $0xc,%esp 109368: ff 35 98 cb 11 00 pushl 0x11cb98 10936e: e8 ad 06 00 00 call 109a20 <_API_Mutex_Unlock> 109373: b8 05 00 00 00 mov $0x5,%eax 109378: e9 92 00 00 00 jmp 10940f /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 10937d: 50 push %eax 10937e: ff 75 08 pushl 0x8(%ebp) 109381: 89 d8 mov %ebx,%eax 109383: 83 e0 01 and $0x1,%eax 109386: 50 push %eax 109387: 6a 00 push $0x0 109389: 89 d8 mov %ebx,%eax 10938b: c1 e8 09 shr $0x9,%eax 10938e: 83 e0 01 and $0x1,%eax 109391: 50 push %eax 109392: 89 d8 mov %ebx,%eax 109394: c1 e8 08 shr $0x8,%eax 109397: 83 f0 01 xor $0x1,%eax 10939a: 83 e0 01 and $0x1,%eax 10939d: 50 push %eax 10939e: ff 75 0c pushl 0xc(%ebp) 1093a1: 83 e7 01 and $0x1,%edi 1093a4: 57 push %edi 1093a5: ff 75 10 pushl 0x10(%ebp) 1093a8: 6a 00 push $0x0 1093aa: 56 push %esi 1093ab: 68 68 ca 11 00 push $0x11ca68 1093b0: e8 cf 1a 00 00 call 10ae84 <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 1093b5: 83 c4 30 add $0x30,%esp 1093b8: 84 c0 test %al,%al 1093ba: 75 27 jne 1093e3 * @param[in] starting_address is the starting address of the memory for * the heap * @param[in] size is the size in bytes of the memory area for the heap * @param[in] page_size is the size in bytes of the allocation unit * * @return This method returns the maximum memory available. If 1093bc: 83 ec 0c sub $0xc,%esp 1093bf: ff 76 08 pushl 0x8(%esi) 1093c2: e8 a5 11 00 00 call 10a56c <_Objects_Get_information_id> 1093c7: 5a pop %edx 1093c8: 59 pop %ecx 1093c9: 56 push %esi 1093ca: 50 push %eax 1093cb: e8 28 11 00 00 call 10a4f8 <_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(); 1093d0: 58 pop %eax 1093d1: ff 35 98 cb 11 00 pushl 0x11cb98 1093d7: e8 44 06 00 00 call 109a20 <_API_Mutex_Unlock> 1093dc: b8 0d 00 00 00 mov $0xd,%eax 1093e1: eb 2c jmp 10940f } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 1093e3: 8b 86 f4 00 00 00 mov 0xf4(%esi),%eax 1093e9: c1 eb 0a shr $0xa,%ebx 1093ec: 83 f3 01 xor $0x1,%ebx 1093ef: 88 da mov %bl,%dl 1093f1: 83 e2 01 and $0x1,%edx 1093f4: 88 50 08 mov %dl,0x8(%eax) *id = the_thread->Object.id; 1093f7: 8b 46 08 mov 0x8(%esi),%eax 1093fa: 8b 55 1c mov 0x1c(%ebp),%edx 1093fd: 89 02 mov %eax,(%edx) ); } #endif _RTEMS_Unlock_allocator(); 1093ff: 83 ec 0c sub $0xc,%esp 109402: ff 35 98 cb 11 00 pushl 0x11cb98 109408: e8 13 06 00 00 call 109a20 <_API_Mutex_Unlock> 10940d: 31 c0 xor %eax,%eax 10940f: 83 c4 10 add $0x10,%esp return RTEMS_SUCCESSFUL; } 109412: 8d 65 f4 lea -0xc(%ebp),%esp 109415: 5b pop %ebx 109416: 5e pop %esi 109417: 5f pop %edi 109418: c9 leave 109419: c3 ret =============================================================================== 0010aa34 : rtems_status_code rtems_task_get_note( Objects_Id id, uint32_t notepad, uint32_t *note ) { 10aa34: 55 push %ebp 10aa35: 89 e5 mov %esp,%ebp 10aa37: 56 push %esi 10aa38: 53 push %ebx 10aa39: 83 ec 10 sub $0x10,%esp 10aa3c: 8b 4d 08 mov 0x8(%ebp),%ecx 10aa3f: 8b 5d 0c mov 0xc(%ebp),%ebx 10aa42: 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() ) 10aa45: a1 ec 17 12 00 mov 0x1217ec,%eax 10aa4a: 8b 40 40 mov 0x40(%eax),%eax 10aa4d: ba 16 00 00 00 mov $0x16,%edx 10aa52: 80 78 04 00 cmpb $0x0,0x4(%eax) 10aa56: 74 61 je 10aab9 <== NEVER TAKEN return RTEMS_NOT_CONFIGURED; if ( !note ) 10aa58: ba 09 00 00 00 mov $0x9,%edx 10aa5d: 85 f6 test %esi,%esi 10aa5f: 74 58 je 10aab9 <== NEVER TAKEN /* * 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 ) 10aa61: ba 0a 00 00 00 mov $0xa,%edx 10aa66: 83 fb 0f cmp $0xf,%ebx 10aa69: 77 4e ja 10aab9 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10aa6b: 85 c9 test %ecx,%ecx 10aa6d: 74 0a je 10aa79 10aa6f: a1 14 18 12 00 mov 0x121814,%eax 10aa74: 3b 48 08 cmp 0x8(%eax),%ecx 10aa77: 75 13 jne 10aa8c _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10aa79: a1 14 18 12 00 mov 0x121814,%eax 10aa7e: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10aa84: 8b 44 98 20 mov 0x20(%eax,%ebx,4),%eax 10aa88: 89 06 mov %eax,(%esi) 10aa8a: eb 2b jmp 10aab7 return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10aa8c: 50 push %eax 10aa8d: 50 push %eax 10aa8e: 8d 45 f4 lea -0xc(%ebp),%eax 10aa91: 50 push %eax 10aa92: 51 push %ecx 10aa93: e8 38 1c 00 00 call 10c6d0 <_Thread_Get> switch ( location ) { 10aa98: 83 c4 10 add $0x10,%esp 10aa9b: ba 04 00 00 00 mov $0x4,%edx 10aaa0: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10aaa4: 75 13 jne 10aab9 <== ALWAYS TAKEN case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10aaa6: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax <== NOT EXECUTED 10aaac: 8b 44 98 20 mov 0x20(%eax,%ebx,4),%eax <== NOT EXECUTED 10aab0: 89 06 mov %eax,(%esi) <== NOT EXECUTED _Thread_Enable_dispatch(); 10aab2: e8 f9 1b 00 00 call 10c6b0 <_Thread_Enable_dispatch><== NOT EXECUTED 10aab7: 31 d2 xor %edx,%edx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10aab9: 89 d0 mov %edx,%eax 10aabb: 8d 65 f8 lea -0x8(%ebp),%esp 10aabe: 5b pop %ebx 10aabf: 5e pop %esi 10aac0: c9 leave 10aac1: c3 ret =============================================================================== 001094a0 : rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, Objects_Id *id ) { 1094a0: 55 push %ebp 1094a1: 89 e5 mov %esp,%ebp 1094a3: 83 ec 08 sub $0x8,%esp 1094a6: 8b 4d 08 mov 0x8(%ebp),%ecx 1094a9: 8b 55 10 mov 0x10(%ebp),%edx Objects_Name_or_id_lookup_errors status; if ( !id ) 1094ac: b8 09 00 00 00 mov $0x9,%eax 1094b1: 85 d2 test %edx,%edx 1094b3: 74 2b je 1094e0 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { 1094b5: 85 c9 test %ecx,%ecx 1094b7: 75 0e jne 1094c7 *id = _Thread_Executing->Object.id; 1094b9: a1 a0 cb 11 00 mov 0x11cba0,%eax 1094be: 8b 40 08 mov 0x8(%eax),%eax 1094c1: 89 02 mov %eax,(%edx) 1094c3: 31 c0 xor %eax,%eax 1094c5: eb 19 jmp 1094e0 return RTEMS_SUCCESSFUL; } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); 1094c7: 52 push %edx 1094c8: ff 75 0c pushl 0xc(%ebp) 1094cb: 51 push %ecx 1094cc: 68 68 ca 11 00 push $0x11ca68 1094d1: e8 9e 12 00 00 call 10a774 <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; 1094d6: 8b 04 85 a8 68 11 00 mov 0x1168a8(,%eax,4),%eax 1094dd: 83 c4 10 add $0x10,%esp } 1094e0: c9 leave 1094e1: c3 ret =============================================================================== 001099ec : */ rtems_status_code rtems_task_is_suspended( Objects_Id id ) { 1099ec: 55 push %ebp 1099ed: 89 e5 mov %esp,%ebp 1099ef: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 1099f2: 8d 45 fc lea -0x4(%ebp),%eax 1099f5: 50 push %eax 1099f6: ff 75 08 pushl 0x8(%ebp) 1099f9: e8 a6 19 00 00 call 10b3a4 <_Thread_Get> 1099fe: 89 c2 mov %eax,%edx switch ( location ) { 109a00: 83 c4 10 add $0x10,%esp 109a03: b8 04 00 00 00 mov $0x4,%eax 109a08: 83 7d fc 00 cmpl $0x0,-0x4(%ebp) 109a0c: 75 19 jne 109a27 <== NEVER TAKEN case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 109a0e: f6 42 10 02 testb $0x2,0x10(%edx) 109a12: 75 09 jne 109a1d _Thread_Enable_dispatch(); 109a14: e8 6b 19 00 00 call 10b384 <_Thread_Enable_dispatch> 109a19: 31 c0 xor %eax,%eax 109a1b: eb 0a jmp 109a27 return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 109a1d: e8 62 19 00 00 call 10b384 <_Thread_Enable_dispatch> 109a22: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 109a27: c9 leave 109a28: c3 ret =============================================================================== 0010e2a0 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 10e2a0: 55 push %ebp 10e2a1: 89 e5 mov %esp,%ebp 10e2a3: 57 push %edi 10e2a4: 56 push %esi 10e2a5: 53 push %ebx 10e2a6: 83 ec 0c sub $0xc,%esp 10e2a9: 8b 7d 08 mov 0x8(%ebp),%edi ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 10e2ac: b8 09 00 00 00 mov $0x9,%eax 10e2b1: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10e2b5: 0f 84 04 01 00 00 je 10e3bf <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 10e2bb: a1 a0 cb 11 00 mov 0x11cba0,%eax 10e2c0: 89 45 ec mov %eax,-0x14(%ebp) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10e2c3: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx 10e2c9: 89 55 f0 mov %edx,-0x10(%ebp) asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 10e2cc: 80 78 76 01 cmpb $0x1,0x76(%eax) 10e2d0: 19 f6 sbb %esi,%esi 10e2d2: 81 e6 00 01 00 00 and $0x100,%esi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 10e2d8: 83 78 7c 00 cmpl $0x0,0x7c(%eax) 10e2dc: 74 06 je 10e2e4 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 10e2de: 81 ce 00 02 00 00 or $0x200,%esi old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 10e2e4: 8b 5d f0 mov -0x10(%ebp),%ebx 10e2e7: 80 7b 08 01 cmpb $0x1,0x8(%ebx) 10e2eb: 19 db sbb %ebx,%ebx 10e2ed: 81 e3 00 04 00 00 and $0x400,%ebx old_mode |= _ISR_Get_level(); 10e2f3: e8 03 dd ff ff call 10bffb <_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; 10e2f8: 09 c3 or %eax,%ebx old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 10e2fa: 09 f3 or %esi,%ebx 10e2fc: 8b 45 10 mov 0x10(%ebp),%eax 10e2ff: 89 18 mov %ebx,(%eax) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 10e301: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 10e308: 74 11 je 10e31b executing->is_preemptible = _Modes_Is_preempt(mode_set) ? TRUE : FALSE; 10e30a: 89 f8 mov %edi,%eax 10e30c: c1 e8 08 shr $0x8,%eax 10e30f: 83 f0 01 xor $0x1,%eax 10e312: 83 e0 01 and $0x1,%eax 10e315: 8b 55 ec mov -0x14(%ebp),%edx 10e318: 88 42 76 mov %al,0x76(%edx) if ( mask & RTEMS_TIMESLICE_MASK ) { 10e31b: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 10e322: 74 26 je 10e34a if ( _Modes_Is_timeslice(mode_set) ) { 10e324: f7 c7 00 02 00 00 test $0x200,%edi 10e32a: 74 14 je 10e340 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 10e32c: 8b 5d ec mov -0x14(%ebp),%ebx 10e32f: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10e336: a1 ac ca 11 00 mov 0x11caac,%eax 10e33b: 89 43 78 mov %eax,0x78(%ebx) 10e33e: eb 0a jmp 10e34a } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 10e340: 8b 45 ec mov -0x14(%ebp),%eax 10e343: c7 40 7c 00 00 00 00 movl $0x0,0x7c(%eax) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 10e34a: f6 45 0c 01 testb $0x1,0xc(%ebp) 10e34e: 74 0c je 10e35c * Returns pointer to the start of the memory block if success, NULL if * failure. * * @param[in] the_heap is the heap to operate upon * @param[in] size is the amount of memory to allocate in bytes * @param[in] alignment the required alignment 10e350: f7 c7 01 00 00 00 test $0x1,%edi 10e356: 74 03 je 10e35b 10e358: fa cli 10e359: eb 01 jmp 10e35c 10e35b: fb sti */ is_asr_enabled = FALSE; needs_asr_dispatching = FALSE; if ( mask & RTEMS_ASR_MASK ) { 10e35c: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 10e363: 74 3b je 10e3a0 10e365: c1 ef 0a shr $0xa,%edi 10e368: 83 f7 01 xor $0x1,%edi 10e36b: 89 f8 mov %edi,%eax 10e36d: 83 e0 01 and $0x1,%eax is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { 10e370: 8b 55 f0 mov -0x10(%ebp),%edx 10e373: 3a 42 08 cmp 0x8(%edx),%al 10e376: 74 28 je 10e3a0 asr->is_enabled = is_asr_enabled; 10e378: 88 42 08 mov %al,0x8(%edx) uint32_t page_size ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); } 10e37b: 9c pushf 10e37c: fa cli 10e37d: 59 pop %ecx /** 10e37e: 8b 5d f0 mov -0x10(%ebp),%ebx 10e381: 8b 53 18 mov 0x18(%ebx),%edx * This routine grows @a the_heap memory area using the size bytes which 10e384: 8b 43 14 mov 0x14(%ebx),%eax 10e387: 89 43 18 mov %eax,0x18(%ebx) * begin at @a starting_address. 10e38a: 89 53 14 mov %edx,0x14(%ebx) * 10e38d: 51 push %ecx 10e38e: 9d popf _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { 10e38f: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10e393: 74 0b je 10e3a0 <== ALWAYS TAKEN needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; 10e395: 8b 45 ec mov -0x14(%ebp),%eax <== NOT EXECUTED 10e398: c6 40 75 01 movb $0x1,0x75(%eax) <== NOT EXECUTED 10e39c: b3 01 mov $0x1,%bl <== NOT EXECUTED 10e39e: eb 02 jmp 10e3a2 <== NOT EXECUTED 10e3a0: 31 db xor %ebx,%ebx } } } if ( _System_state_Is_up(_System_state_Current) ) 10e3a2: 83 3d 80 cc 11 00 03 cmpl $0x3,0x11cc80 10e3a9: 75 12 jne 10e3bd <== NEVER TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 10e3ab: e8 58 01 00 00 call 10e508 <_Thread_Evaluate_mode> 10e3b0: 84 c0 test %al,%al 10e3b2: 75 04 jne 10e3b8 10e3b4: 84 db test %bl,%bl 10e3b6: 74 05 je 10e3bd <== ALWAYS TAKEN _Thread_Dispatch(); 10e3b8: e8 eb c8 ff ff call 10aca8 <_Thread_Dispatch> 10e3bd: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10e3bf: 83 c4 0c add $0xc,%esp 10e3c2: 5b pop %ebx 10e3c3: 5e pop %esi 10e3c4: 5f pop %edi 10e3c5: c9 leave 10e3c6: c3 ret =============================================================================== 0010ab98 : rtems_status_code rtems_task_set_note( Objects_Id id, uint32_t notepad, uint32_t note ) { 10ab98: 55 push %ebp 10ab99: 89 e5 mov %esp,%ebp 10ab9b: 56 push %esi 10ab9c: 53 push %ebx 10ab9d: 83 ec 10 sub $0x10,%esp 10aba0: 8b 4d 08 mov 0x8(%ebp),%ecx 10aba3: 8b 5d 0c mov 0xc(%ebp),%ebx 10aba6: 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() ) 10aba9: a1 ec 17 12 00 mov 0x1217ec,%eax 10abae: 8b 40 40 mov 0x40(%eax),%eax 10abb1: ba 16 00 00 00 mov $0x16,%edx 10abb6: 80 78 04 00 cmpb $0x0,0x4(%eax) 10abba: 74 54 je 10ac10 <== NEVER TAKEN /* * 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 ) 10abbc: ba 0a 00 00 00 mov $0xa,%edx 10abc1: 83 fb 0f cmp $0xf,%ebx 10abc4: 77 4a ja 10ac10 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10abc6: 85 c9 test %ecx,%ecx 10abc8: 74 0a je 10abd4 10abca: a1 14 18 12 00 mov 0x121814,%eax 10abcf: 3b 48 08 cmp 0x8(%eax),%ecx 10abd2: 75 11 jne 10abe5 <== ALWAYS TAKEN _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10abd4: a1 14 18 12 00 mov 0x121814,%eax 10abd9: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10abdf: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) 10abe3: eb 29 jmp 10ac0e return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10abe5: 50 push %eax 10abe6: 50 push %eax 10abe7: 8d 45 f4 lea -0xc(%ebp),%eax 10abea: 50 push %eax 10abeb: 51 push %ecx 10abec: e8 df 1a 00 00 call 10c6d0 <_Thread_Get> switch ( location ) { 10abf1: 83 c4 10 add $0x10,%esp 10abf4: ba 04 00 00 00 mov $0x4,%edx 10abf9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10abfd: 75 11 jne 10ac10 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10abff: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10ac05: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) _Thread_Enable_dispatch(); 10ac09: e8 a2 1a 00 00 call 10c6b0 <_Thread_Enable_dispatch> 10ac0e: 31 d2 xor %edx,%edx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ac10: 89 d0 mov %edx,%eax 10ac12: 8d 65 f8 lea -0x8(%ebp),%esp 10ac15: 5b pop %ebx 10ac16: 5e pop %esi 10ac17: c9 leave 10ac18: c3 ret =============================================================================== 0010a3a8 : rtems_status_code rtems_task_set_priority( Objects_Id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10a3a8: 55 push %ebp 10a3a9: 89 e5 mov %esp,%ebp 10a3ab: 56 push %esi 10a3ac: 53 push %ebx 10a3ad: 83 ec 10 sub $0x10,%esp 10a3b0: 8b 5d 0c mov 0xc(%ebp),%ebx 10a3b3: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10a3b6: 85 db test %ebx,%ebx 10a3b8: 74 10 je 10a3ca 10a3ba: 0f b6 05 e4 b0 11 00 movzbl 0x11b0e4,%eax 10a3c1: ba 13 00 00 00 mov $0x13,%edx 10a3c6: 39 c3 cmp %eax,%ebx 10a3c8: 77 52 ja 10a41c !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10a3ca: ba 09 00 00 00 mov $0x9,%edx 10a3cf: 85 f6 test %esi,%esi 10a3d1: 74 49 je 10a41c <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10a3d3: 52 push %edx 10a3d4: 52 push %edx 10a3d5: 8d 45 f4 lea -0xc(%ebp),%eax 10a3d8: 50 push %eax 10a3d9: ff 75 08 pushl 0x8(%ebp) 10a3dc: e8 f3 19 00 00 call 10bdd4 <_Thread_Get> 10a3e1: 89 c1 mov %eax,%ecx switch ( location ) { 10a3e3: 83 c4 10 add $0x10,%esp 10a3e6: ba 04 00 00 00 mov $0x4,%edx 10a3eb: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a3ef: 75 2b jne 10a41c case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10a3f1: 8b 40 14 mov 0x14(%eax),%eax 10a3f4: 89 06 mov %eax,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10a3f6: 85 db test %ebx,%ebx 10a3f8: 74 1b je 10a415 the_thread->real_priority = new_priority; 10a3fa: 89 59 18 mov %ebx,0x18(%ecx) if ( the_thread->resource_count == 0 || 10a3fd: 83 79 1c 00 cmpl $0x0,0x1c(%ecx) 10a401: 74 05 je 10a408 10a403: 39 59 14 cmp %ebx,0x14(%ecx) 10a406: 76 0d jbe 10a415 <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, FALSE ); 10a408: 50 push %eax 10a409: 6a 00 push $0x0 10a40b: 53 push %ebx 10a40c: 51 push %ecx 10a40d: e8 02 15 00 00 call 10b914 <_Thread_Change_priority> 10a412: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10a415: e8 9a 19 00 00 call 10bdb4 <_Thread_Enable_dispatch> 10a41a: 31 d2 xor %edx,%edx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a41c: 89 d0 mov %edx,%eax 10a41e: 8d 65 f8 lea -0x8(%ebp),%esp 10a421: 5b pop %ebx 10a422: 5e pop %esi 10a423: c9 leave 10a424: c3 ret =============================================================================== 0010a8f0 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 10a8f0: 55 push %ebp 10a8f1: 89 e5 mov %esp,%ebp 10a8f3: 57 push %edi 10a8f4: 56 push %esi 10a8f5: 53 push %ebx 10a8f6: 83 ec 1c sub $0x1c,%esp 10a8f9: 8b 75 0c mov 0xc(%ebp),%esi 10a8fc: 8b 7d 10 mov 0x10(%ebp),%edi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 10a8ff: b8 09 00 00 00 mov $0x9,%eax 10a904: 85 f6 test %esi,%esi 10a906: 74 75 je 10a97d <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10a908: 50 push %eax 10a909: 50 push %eax 10a90a: 8d 45 f0 lea -0x10(%ebp),%eax 10a90d: 50 push %eax 10a90e: ff 75 08 pushl 0x8(%ebp) 10a911: e8 16 1a 00 00 call 10c32c <_Thread_Get> 10a916: 89 c3 mov %eax,%ebx switch (location) { 10a918: 83 c4 10 add $0x10,%esp 10a91b: b8 04 00 00 00 mov $0x4,%eax 10a920: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 10a924: 75 57 jne 10a97d <== NEVER TAKEN case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 10a926: 8b 83 04 01 00 00 mov 0x104(%ebx),%eax 10a92c: eb 0c jmp 10a93a while (tvp) { if (tvp->ptr == ptr) { 10a92e: 39 70 04 cmp %esi,0x4(%eax) 10a931: 75 05 jne 10a938 tvp->dtor = dtor; 10a933: 89 78 10 mov %edi,0x10(%eax) 10a936: eb 3e jmp 10a976 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 10a938: 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) { 10a93a: 85 c0 test %eax,%eax 10a93c: 75 f0 jne 10a92e } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 10a93e: 83 ec 0c sub $0xc,%esp 10a941: 6a 14 push $0x14 10a943: e8 31 2a 00 00 call 10d379 <_Workspace_Allocate> 10a948: 89 c2 mov %eax,%edx _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 10a94a: 83 c4 10 add $0x10,%esp 10a94d: 85 c0 test %eax,%eax 10a94f: 75 0c jne 10a95d _Thread_Enable_dispatch(); 10a951: e8 b6 19 00 00 call 10c30c <_Thread_Enable_dispatch> 10a956: b8 1a 00 00 00 mov $0x1a,%eax 10a95b: eb 20 jmp 10a97d return RTEMS_NO_MEMORY; } new->gval = *ptr; 10a95d: 8b 06 mov (%esi),%eax 10a95f: 89 42 08 mov %eax,0x8(%edx) new->ptr = ptr; 10a962: 89 72 04 mov %esi,0x4(%edx) new->dtor = dtor; 10a965: 89 7a 10 mov %edi,0x10(%edx) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 10a968: 8b 83 04 01 00 00 mov 0x104(%ebx),%eax 10a96e: 89 02 mov %eax,(%edx) the_thread->task_variables = new; 10a970: 89 93 04 01 00 00 mov %edx,0x104(%ebx) _Thread_Enable_dispatch(); 10a976: e8 91 19 00 00 call 10c30c <_Thread_Enable_dispatch> 10a97b: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a97d: 8d 65 f4 lea -0xc(%ebp),%esp 10a980: 5b pop %ebx 10a981: 5e pop %esi 10a982: 5f pop %edi 10a983: c9 leave 10a984: c3 ret =============================================================================== 0010a988 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 10a988: 55 push %ebp 10a989: 89 e5 mov %esp,%ebp 10a98b: 56 push %esi 10a98c: 53 push %ebx 10a98d: 83 ec 10 sub $0x10,%esp 10a990: 8b 75 0c mov 0xc(%ebp),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 10a993: b8 09 00 00 00 mov $0x9,%eax 10a998: 85 f6 test %esi,%esi 10a99a: 74 64 je 10aa00 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 10a99c: 52 push %edx 10a99d: 52 push %edx 10a99e: 8d 45 f4 lea -0xc(%ebp),%eax 10a9a1: 50 push %eax 10a9a2: ff 75 08 pushl 0x8(%ebp) 10a9a5: e8 82 19 00 00 call 10c32c <_Thread_Get> 10a9aa: 89 c3 mov %eax,%ebx switch (location) { 10a9ac: 83 c4 10 add $0x10,%esp 10a9af: b8 04 00 00 00 mov $0x4,%eax 10a9b4: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a9b8: 75 46 jne 10aa00 <== NEVER TAKEN case OBJECTS_LOCAL: tvp = the_thread->task_variables; 10a9ba: 8b 93 04 01 00 00 mov 0x104(%ebx),%edx 10a9c0: 31 c0 xor %eax,%eax 10a9c2: eb 2e jmp 10a9f2 while (tvp) { if (tvp->ptr == ptr) { 10a9c4: 39 72 04 cmp %esi,0x4(%edx) 10a9c7: 75 25 jne 10a9ee if (prev) 10a9c9: 85 c0 test %eax,%eax 10a9cb: 8b 0a mov (%edx),%ecx 10a9cd: 74 04 je 10a9d3 prev->next = tvp->next; 10a9cf: 89 08 mov %ecx,(%eax) 10a9d1: eb 06 jmp 10a9d9 else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 10a9d3: 89 8b 04 01 00 00 mov %ecx,0x104(%ebx) _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 10a9d9: 50 push %eax 10a9da: 50 push %eax 10a9db: 52 push %edx 10a9dc: 53 push %ebx 10a9dd: e8 8e 00 00 00 call 10aa70 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 10a9e2: e8 25 19 00 00 call 10c30c <_Thread_Enable_dispatch> 10a9e7: 31 c0 xor %eax,%eax 10a9e9: 83 c4 10 add $0x10,%esp 10a9ec: eb 12 jmp 10aa00 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 10a9ee: 89 d0 mov %edx,%eax 10a9f0: 8b 12 mov (%edx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 10a9f2: 85 d2 test %edx,%edx 10a9f4: 75 ce jne 10a9c4 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10a9f6: e8 11 19 00 00 call 10c30c <_Thread_Enable_dispatch> 10a9fb: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10aa00: 8d 65 f8 lea -0x8(%ebp),%esp 10aa03: 5b pop %ebx 10aa04: 5e pop %esi 10aa05: c9 leave 10aa06: c3 ret =============================================================================== 0010aa08 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 10aa08: 55 push %ebp 10aa09: 89 e5 mov %esp,%ebp 10aa0b: 56 push %esi 10aa0c: 53 push %ebx 10aa0d: 83 ec 10 sub $0x10,%esp 10aa10: 8b 5d 0c mov 0xc(%ebp),%ebx 10aa13: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 10aa16: 85 db test %ebx,%ebx 10aa18: 74 48 je 10aa62 return RTEMS_INVALID_ADDRESS; if ( !result ) 10aa1a: 85 f6 test %esi,%esi 10aa1c: 74 44 je 10aa62 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10aa1e: 50 push %eax 10aa1f: 50 push %eax 10aa20: 8d 45 f4 lea -0xc(%ebp),%eax 10aa23: 50 push %eax 10aa24: ff 75 08 pushl 0x8(%ebp) 10aa27: e8 00 19 00 00 call 10c32c <_Thread_Get> 10aa2c: 89 c2 mov %eax,%edx switch (location) { 10aa2e: 83 c4 10 add $0x10,%esp 10aa31: b8 04 00 00 00 mov $0x4,%eax 10aa36: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10aa3a: 75 2b jne 10aa67 <== NEVER TAKEN case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 10aa3c: 8b 82 04 01 00 00 mov 0x104(%edx),%eax 10aa42: eb 15 jmp 10aa59 while (tvp) { if (tvp->ptr == ptr) { 10aa44: 39 58 04 cmp %ebx,0x4(%eax) 10aa47: 75 0e jne 10aa57 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 10aa49: 8b 40 0c mov 0xc(%eax),%eax 10aa4c: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10aa4e: e8 b9 18 00 00 call 10c30c <_Thread_Enable_dispatch> 10aa53: 31 c0 xor %eax,%eax 10aa55: eb 10 jmp 10aa67 return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 10aa57: 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) { 10aa59: 85 c0 test %eax,%eax 10aa5b: 75 e7 jne 10aa44 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10aa5d: e8 aa 18 00 00 call 10c30c <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 10aa62: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10aa67: 8d 65 f8 lea -0x8(%ebp),%esp 10aa6a: 5b pop %ebx 10aa6b: 5e pop %esi 10aa6c: c9 leave 10aa6d: c3 ret =============================================================================== 0010a150 : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 10a150: 55 push %ebp 10a151: 89 e5 mov %esp,%ebp 10a153: 53 push %ebx 10a154: 83 ec 04 sub $0x4,%esp 10a157: 8b 5d 08 mov 0x8(%ebp),%ebx Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10a15a: b8 0b 00 00 00 mov $0xb,%eax 10a15f: 80 3d d8 f4 11 00 00 cmpb $0x0,0x11f4d8 10a166: 0f 84 9e 00 00 00 je 10a20a return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10a16c: b8 09 00 00 00 mov $0x9,%eax 10a171: 85 db test %ebx,%ebx 10a173: 0f 84 91 00 00 00 je 10a20a <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 10a179: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) if ( !_TOD_Validate( time_buffer ) ) 10a180: 83 ec 0c sub $0xc,%esp 10a183: 53 push %ebx 10a184: e8 d7 f4 ff ff call 109660 <_TOD_Validate> 10a189: 83 c4 10 add $0x10,%esp 10a18c: 84 c0 test %al,%al 10a18e: 74 75 je 10a205 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 10a190: 83 ec 0c sub $0xc,%esp 10a193: 53 push %ebx 10a194: e8 5f f4 ff ff call 1095f8 <_TOD_To_seconds> 10a199: 89 c3 mov %eax,%ebx if ( seconds <= _TOD_Seconds_since_epoch ) 10a19b: 83 c4 10 add $0x10,%esp 10a19e: 3b 05 54 f5 11 00 cmp 0x11f554,%eax 10a1a4: 76 5f jbe 10a205 /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 10a1a6: a1 c4 f4 11 00 mov 0x11f4c4,%eax 10a1ab: 40 inc %eax 10a1ac: a3 c4 f4 11 00 mov %eax,0x11f4c4 return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 10a1b1: 50 push %eax 10a1b2: 50 push %eax 10a1b3: 6a 10 push $0x10 10a1b5: ff 35 84 f5 11 00 pushl 0x11f584 10a1bb: e8 84 20 00 00 call 10c244 <_Thread_Set_state> _Watchdog_Initialize( 10a1c0: a1 84 f5 11 00 mov 0x11f584,%eax 10a1c5: 8b 50 08 mov 0x8(%eax),%edx * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 10a1c8: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) * @param[in] the_heap is the heap to operate upon 10a1cf: c7 40 64 d8 b8 10 00 movl $0x10b8d8,0x64(%eax) * @param[in] starting_address is the starting address of the memory for 10a1d6: 89 50 68 mov %edx,0x68(%eax) * the heap 10a1d9: c7 40 6c 00 00 00 00 movl $0x0,0x6c(%eax) * @return TRUE if successfully able to resize the block. * FALSE if the block can't be resized in place. */ bool _Protected_heap_Resize_block( Heap_Control *the_heap, void *starting_address, 10a1e0: 2b 1d 54 f5 11 00 sub 0x11f554,%ebx 10a1e6: 89 58 54 mov %ebx,0x54(%eax) size_t size ); 10a1e9: 5a pop %edx 10a1ea: 59 pop %ecx 10a1eb: 83 c0 48 add $0x48,%eax 10a1ee: 50 push %eax 10a1ef: 68 98 f5 11 00 push $0x11f598 10a1f4: e8 63 26 00 00 call 10c85c <_Watchdog_Insert> ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch ); _Thread_Enable_dispatch(); 10a1f9: e8 56 18 00 00 call 10ba54 <_Thread_Enable_dispatch> 10a1fe: 31 c0 xor %eax,%eax 10a200: 83 c4 10 add $0x10,%esp 10a203: eb 05 jmp 10a20a return RTEMS_SUCCESSFUL; 10a205: b8 14 00 00 00 mov $0x14,%eax } 10a20a: 8b 5d fc mov -0x4(%ebp),%ebx 10a20d: c9 leave 10a20e: c3 ret =============================================================================== 00112ad8 : */ rtems_status_code rtems_timer_cancel( Objects_Id id ) { 112ad8: 55 push %ebp 112ad9: 89 e5 mov %esp,%ebp 112adb: 83 ec 1c sub $0x1c,%esp /** * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon 112ade: 8d 45 fc lea -0x4(%ebp),%eax 112ae1: 50 push %eax 112ae2: ff 75 08 pushl 0x8(%ebp) 112ae5: 68 d4 2a 13 00 push $0x132ad4 112aea: e8 69 24 00 00 call 114f58 <_Objects_Get> 112aef: 89 c2 mov %eax,%edx Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 112af1: 83 c4 10 add $0x10,%esp 112af4: b8 04 00 00 00 mov $0x4,%eax 112af9: 83 7d fc 00 cmpl $0x0,-0x4(%ebp) 112afd: 75 1c jne 112b1b case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 112aff: 83 7a 38 04 cmpl $0x4,0x38(%edx) 112b03: 74 0f je 112b14 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 112b05: 83 ec 0c sub $0xc,%esp 112b08: 8d 42 10 lea 0x10(%edx),%eax 112b0b: 50 push %eax 112b0c: e8 3b 3e 00 00 call 11694c <_Watchdog_Remove> 112b11: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 112b14: e8 ff 2b 00 00 call 115718 <_Thread_Enable_dispatch> 112b19: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112b1b: c9 leave 112b1c: c3 ret =============================================================================== 00112b20 : rtems_status_code rtems_timer_create( rtems_name name, Objects_Id *id ) { 112b20: 55 push %ebp 112b21: 89 e5 mov %esp,%ebp 112b23: 57 push %edi 112b24: 56 push %esi 112b25: 53 push %ebx 112b26: 83 ec 0c sub $0xc,%esp 112b29: 8b 75 08 mov 0x8(%ebp),%esi 112b2c: 8b 7d 0c mov 0xc(%ebp),%edi Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 112b2f: b8 03 00 00 00 mov $0x3,%eax 112b34: 85 f6 test %esi,%esi 112b36: 74 73 je 112bab return RTEMS_INVALID_NAME; if ( !id ) 112b38: b8 09 00 00 00 mov $0x9,%eax 112b3d: 85 ff test %edi,%edi 112b3f: 74 6a je 112bab <== NEVER TAKEN /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 112b41: a1 e0 27 13 00 mov 0x1327e0,%eax 112b46: 40 inc %eax 112b47: a3 e0 27 13 00 mov %eax,0x1327e0 #ifdef __cplusplus extern "C" { #endif /** 112b4c: 83 ec 0c sub $0xc,%esp 112b4f: 68 d4 2a 13 00 push $0x132ad4 112b54: e8 7f 1f 00 00 call 114ad8 <_Objects_Allocate> 112b59: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 112b5b: 83 c4 10 add $0x10,%esp 112b5e: 85 c0 test %eax,%eax 112b60: 75 0c jne 112b6e _Thread_Enable_dispatch(); 112b62: e8 b1 2b 00 00 call 115718 <_Thread_Enable_dispatch> 112b67: b8 05 00 00 00 mov $0x5,%eax 112b6c: eb 3d jmp 112bab return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 112b6e: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax) * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 112b75: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) * @param[in] the_heap is the heap to operate upon 112b7c: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) * @param[in] starting_address is the starting address of the memory for 112b83: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) * the heap 112b8a: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) 112b91: 8b 48 08 mov 0x8(%eax),%ecx 112b94: 0f b7 d1 movzwl %cx,%edx 112b97: a1 f0 2a 13 00 mov 0x132af0,%eax 112b9c: 89 1c 90 mov %ebx,(%eax,%edx,4) 112b9f: 89 73 0c mov %esi,0xc(%ebx) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 112ba2: 89 0f mov %ecx,(%edi) _Thread_Enable_dispatch(); 112ba4: e8 6f 2b 00 00 call 115718 <_Thread_Enable_dispatch> 112ba9: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 112bab: 8d 65 f4 lea -0xc(%ebp),%esp 112bae: 5b pop %ebx 112baf: 5e pop %esi 112bb0: 5f pop %edi 112bb1: c9 leave 112bb2: c3 ret =============================================================================== 00112c10 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 112c10: 55 push %ebp 112c11: 89 e5 mov %esp,%ebp 112c13: 57 push %edi 112c14: 56 push %esi 112c15: 53 push %ebx 112c16: 83 ec 1c sub $0x1c,%esp 112c19: 8b 7d 10 mov 0x10(%ebp),%edi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 112c1c: b8 0a 00 00 00 mov $0xa,%eax 112c21: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 112c25: 0f 84 8e 00 00 00 je 112cb9 return RTEMS_INVALID_NUMBER; if ( !routine ) 112c2b: b8 09 00 00 00 mov $0x9,%eax 112c30: 85 ff test %edi,%edi 112c32: 0f 84 81 00 00 00 je 112cb9 <== NEVER TAKEN /** * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon 112c38: 52 push %edx 112c39: 8d 45 f0 lea -0x10(%ebp),%eax 112c3c: 50 push %eax 112c3d: ff 75 08 pushl 0x8(%ebp) 112c40: 68 d4 2a 13 00 push $0x132ad4 112c45: e8 0e 23 00 00 call 114f58 <_Objects_Get> 112c4a: 89 c3 mov %eax,%ebx return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 112c4c: 83 c4 10 add $0x10,%esp 112c4f: b8 04 00 00 00 mov $0x4,%eax 112c54: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 112c58: 75 5f jne 112cb9 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 112c5a: 8d 73 10 lea 0x10(%ebx),%esi 112c5d: 83 ec 0c sub $0xc,%esp 112c60: 56 push %esi 112c61: e8 e6 3c 00 00 call 11694c <_Watchdog_Remove> _ISR_Disable( level ); 112c66: 9c pushf 112c67: fa cli 112c68: 5a pop %edx /* * 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 ) { 112c69: 83 c4 10 add $0x10,%esp 112c6c: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 112c70: 74 0b je 112c7d <== ALWAYS TAKEN _ISR_Enable( level ); 112c72: 52 push %edx <== NOT EXECUTED 112c73: 9d popf <== NOT EXECUTED _Thread_Enable_dispatch(); 112c74: e8 9f 2a 00 00 call 115718 <_Thread_Enable_dispatch><== NOT EXECUTED 112c79: 31 c0 xor %eax,%eax <== NOT EXECUTED 112c7b: eb 3c jmp 112cb9 <== NOT EXECUTED /* * 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; 112c7d: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 112c84: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) * @param[in] the_heap is the heap to operate upon 112c8b: 89 7b 2c mov %edi,0x2c(%ebx) * @param[in] starting_address is the starting address of the memory for 112c8e: 8b 45 08 mov 0x8(%ebp),%eax 112c91: 89 43 30 mov %eax,0x30(%ebx) * the heap 112c94: 8b 45 14 mov 0x14(%ebp),%eax 112c97: 89 43 34 mov %eax,0x34(%ebx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 112c9a: 52 push %edx 112c9b: 9d popf * @param[in] size points to a user area to return the size in * @return TRUE if successfully able to determine the size, FALSE otherwise * @return *size filled in with the size of the user area for this block */ bool _Protected_heap_Get_block_size( Heap_Control *the_heap, 112c9c: 8b 45 0c mov 0xc(%ebp),%eax 112c9f: 89 43 1c mov %eax,0x1c(%ebx) void *starting_address, size_t *size 112ca2: 50 push %eax 112ca3: 50 push %eax 112ca4: 56 push %esi 112ca5: 68 c0 28 13 00 push $0x1328c0 112caa: e8 85 3b 00 00 call 116834 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 112caf: e8 64 2a 00 00 call 115718 <_Thread_Enable_dispatch> 112cb4: 31 c0 xor %eax,%eax 112cb6: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112cb9: 8d 65 f4 lea -0xc(%ebp),%esp 112cbc: 5b pop %ebx 112cbd: 5e pop %esi 112cbe: 5f pop %edi 112cbf: c9 leave 112cc0: c3 ret =============================================================================== 00112cc4 : Objects_Id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 112cc4: 55 push %ebp 112cc5: 89 e5 mov %esp,%ebp 112cc7: 57 push %edi 112cc8: 56 push %esi 112cc9: 53 push %ebx 112cca: 83 ec 1c sub $0x1c,%esp 112ccd: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 112cd0: b8 0b 00 00 00 mov $0xb,%eax 112cd5: 80 3d f4 27 13 00 00 cmpb $0x0,0x1327f4 112cdc: 0f 84 ae 00 00 00 je 112d90 return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 112ce2: 83 ec 0c sub $0xc,%esp 112ce5: 53 push %ebx 112ce6: e8 85 da ff ff call 110770 <_TOD_Validate> 112ceb: 83 c4 10 add $0x10,%esp 112cee: 84 c0 test %al,%al 112cf0: 0f 84 95 00 00 00 je 112d8b return RTEMS_INVALID_CLOCK; if ( !routine ) 112cf6: b8 09 00 00 00 mov $0x9,%eax 112cfb: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 112cff: 0f 84 8b 00 00 00 je 112d90 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 112d05: 83 ec 0c sub $0xc,%esp 112d08: 53 push %ebx 112d09: e8 fa d9 ff ff call 110708 <_TOD_To_seconds> 112d0e: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch ) 112d10: 83 c4 10 add $0x10,%esp 112d13: 3b 05 70 28 13 00 cmp 0x132870,%eax 112d19: 76 70 jbe 112d8b /** * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon 112d1b: 51 push %ecx 112d1c: 8d 45 f0 lea -0x10(%ebp),%eax 112d1f: 50 push %eax 112d20: ff 75 08 pushl 0x8(%ebp) 112d23: 68 d4 2a 13 00 push $0x132ad4 112d28: e8 2b 22 00 00 call 114f58 <_Objects_Get> 112d2d: 89 c6 mov %eax,%esi return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 112d2f: 83 c4 10 add $0x10,%esp 112d32: b8 04 00 00 00 mov $0x4,%eax 112d37: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 112d3b: 75 53 jne 112d90 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 112d3d: 8d 5e 10 lea 0x10(%esi),%ebx 112d40: 83 ec 0c sub $0xc,%esp 112d43: 53 push %ebx 112d44: e8 03 3c 00 00 call 11694c <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY; 112d49: c7 46 38 02 00 00 00 movl $0x2,0x38(%esi) * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 112d50: c7 46 18 00 00 00 00 movl $0x0,0x18(%esi) * @param[in] the_heap is the heap to operate upon 112d57: 8b 45 10 mov 0x10(%ebp),%eax 112d5a: 89 46 2c mov %eax,0x2c(%esi) * @param[in] starting_address is the starting address of the memory for 112d5d: 8b 45 08 mov 0x8(%ebp),%eax 112d60: 89 46 30 mov %eax,0x30(%esi) * the heap 112d63: 8b 45 14 mov 0x14(%ebp),%eax 112d66: 89 46 34 mov %eax,0x34(%esi) * @return TRUE if successfully able to resize the block. * FALSE if the block can't be resized in place. */ bool _Protected_heap_Resize_block( Heap_Control *the_heap, void *starting_address, 112d69: 2b 3d 70 28 13 00 sub 0x132870,%edi 112d6f: 89 7e 1c mov %edi,0x1c(%esi) size_t size ); 112d72: 58 pop %eax 112d73: 5a pop %edx 112d74: 53 push %ebx 112d75: 68 b4 28 13 00 push $0x1328b4 112d7a: e8 b5 3a 00 00 call 116834 <_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(); 112d7f: e8 94 29 00 00 call 115718 <_Thread_Enable_dispatch> 112d84: 31 c0 xor %eax,%eax 112d86: 83 c4 10 add $0x10,%esp 112d89: eb 05 jmp 112d90 return RTEMS_SUCCESSFUL; 112d8b: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112d90: 8d 65 f4 lea -0xc(%ebp),%esp 112d93: 5b pop %ebx 112d94: 5e pop %esi 112d95: 5f pop %edi 112d96: c9 leave 112d97: c3 ret =============================================================================== 00112d98 : rtems_status_code rtems_timer_get_information( Objects_Id id, rtems_timer_information *the_info ) { 112d98: 55 push %ebp 112d99: 89 e5 mov %esp,%ebp 112d9b: 53 push %ebx 112d9c: 83 ec 14 sub $0x14,%esp 112d9f: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 112da2: b8 09 00 00 00 mov $0x9,%eax 112da7: 85 db test %ebx,%ebx 112da9: 74 40 je 112deb <== NEVER TAKEN /** * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon 112dab: 50 push %eax 112dac: 8d 45 f8 lea -0x8(%ebp),%eax 112daf: 50 push %eax 112db0: ff 75 08 pushl 0x8(%ebp) 112db3: 68 d4 2a 13 00 push $0x132ad4 112db8: e8 9b 21 00 00 call 114f58 <_Objects_Get> 112dbd: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 112dbf: 83 c4 10 add $0x10,%esp 112dc2: b8 04 00 00 00 mov $0x4,%eax 112dc7: 83 7d f8 00 cmpl $0x0,-0x8(%ebp) 112dcb: 75 1e jne 112deb case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 112dcd: 8b 42 38 mov 0x38(%edx),%eax 112dd0: 89 03 mov %eax,(%ebx) the_info->initial = the_timer->Ticker.initial; 112dd2: 8b 42 1c mov 0x1c(%edx),%eax 112dd5: 89 43 04 mov %eax,0x4(%ebx) the_info->start_time = the_timer->Ticker.start_time; 112dd8: 8b 42 24 mov 0x24(%edx),%eax 112ddb: 89 43 08 mov %eax,0x8(%ebx) the_info->stop_time = the_timer->Ticker.stop_time; 112dde: 8b 42 28 mov 0x28(%edx),%eax 112de1: 89 43 0c mov %eax,0xc(%ebx) _Thread_Enable_dispatch(); 112de4: e8 2f 29 00 00 call 115718 <_Thread_Enable_dispatch> 112de9: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112deb: 8b 5d fc mov -0x4(%ebp),%ebx 112dee: c9 leave 112def: c3 ret =============================================================================== 00113048 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 113048: 55 push %ebp 113049: 89 e5 mov %esp,%ebp 11304b: 57 push %edi 11304c: 56 push %esi 11304d: 53 push %ebx 11304e: 83 ec 1c sub $0x1c,%esp 113051: 8b 55 08 mov 0x8(%ebp),%edx 113054: 8b 75 10 mov 0x10(%ebp),%esi bool _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, size_t size ); 113057: 31 c0 xor %eax,%eax 113059: 85 d2 test %edx,%edx 11305b: 74 0f je 11306c 11305d: 0f b6 05 e4 a0 12 00 movzbl 0x12a0e4,%eax 113064: 39 c2 cmp %eax,%edx 113066: 0f 96 c0 setbe %al 113069: 0f b6 c0 movzbl %al,%eax * Make sure the requested priority is valid. The if is * 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 ) ) { 11306c: 89 d7 mov %edx,%edi 11306e: 85 c0 test %eax,%eax 113070: 75 0e jne 113080 <== NEVER TAKEN if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 113072: b8 13 00 00 00 mov $0x13,%eax 113077: 42 inc %edx 113078: 0f 85 31 01 00 00 jne 1131af 11307e: 31 ff xor %edi,%edi /** * This routine walks the heap and tots up the free and allocated * sizes. * * @param[in] the_heap pointer to heap header 113080: a1 e0 27 13 00 mov 0x1327e0,%eax 113085: 40 inc %eax 113086: a3 e0 27 13 00 mov %eax,0x1327e0 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 11308b: 8a 1d 54 e2 12 00 mov 0x12e254,%bl initialized = true; 113091: c6 05 54 e2 12 00 01 movb $0x1,0x12e254 _Thread_Enable_dispatch(); 113098: e8 7b 26 00 00 call 115718 <_Thread_Enable_dispatch> if ( tmpInitialized ) 11309d: b8 0e 00 00 00 mov $0xe,%eax 1130a2: 84 db test %bl,%bl 1130a4: 0f 85 05 01 00 00 jne 1131af 1130aa: c7 05 74 27 13 00 78 movl $0x132778,0x132774 1130b1: 27 13 00 1130b4: c7 05 78 27 13 00 00 movl $0x0,0x132778 1130bb: 00 00 00 1130be: c7 05 7c 27 13 00 74 movl $0x132774,0x13277c 1130c5: 27 13 00 * 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( 1130c8: 52 push %edx 1130c9: 52 push %edx 1130ca: 8d 45 f0 lea -0x10(%ebp),%eax 1130cd: 50 push %eax 1130ce: 81 ce 00 80 00 00 or $0x8000,%esi 1130d4: 56 push %esi 1130d5: 68 00 01 00 00 push $0x100 1130da: ff 75 0c pushl 0xc(%ebp) 1130dd: 57 push %edi 1130de: 68 45 4d 49 54 push $0x54494d45 1130e3: e8 70 f3 ff ff call 112458 /* 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) { 1130e8: 83 c4 20 add $0x20,%esp 1130eb: 85 c0 test %eax,%eax 1130ed: 0f 85 b5 00 00 00 jne 1131a8 * to a TCB pointer from here out. * * NOTE: Setting the pointer to the Timer Server TCB to a value other than * NULL indicates that task-based timer support is initialized. */ _Timer_Server = (Thread_Control *)_Objects_Get_local_object( 1130f3: 8b 4d f0 mov -0x10(%ebp),%ecx bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ); /** 1130f6: 31 c0 xor %eax,%eax 1130f8: 66 3b 0d 24 27 13 00 cmp 0x132724,%cx 1130ff: 77 0b ja 11310c <== NEVER TAKEN * This heap routine returns information about the free blocks * in the specified heap. 113101: 0f b7 d1 movzwl %cx,%edx 113104: a1 30 27 13 00 mov 0x132730,%eax 113109: 8b 04 90 mov (%eax,%edx,4),%eax 11310c: a3 18 2b 13 00 mov %eax,0x132b18 113111: c7 05 54 27 13 00 58 movl $0x132758,0x132754 113118: 27 13 00 11311b: c7 05 58 27 13 00 00 movl $0x0,0x132758 113122: 00 00 00 113125: c7 05 5c 27 13 00 54 movl $0x132754,0x13275c 11312c: 27 13 00 11312f: c7 05 68 27 13 00 6c movl $0x13276c,0x132768 113136: 27 13 00 113139: c7 05 6c 27 13 00 00 movl $0x0,0x13276c 113140: 00 00 00 113143: c7 05 70 27 13 00 68 movl $0x132768,0x132770 11314a: 27 13 00 * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 11314d: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) * @param[in] the_heap is the heap to operate upon 113154: c7 40 64 9c 55 11 00 movl $0x11559c,0x64(%eax) * @param[in] starting_address is the starting address of the memory for 11315b: 89 48 68 mov %ecx,0x68(%eax) * the heap 11315e: c7 40 6c 00 00 00 00 movl $0x0,0x6c(%eax) * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 113165: c7 05 88 27 13 00 00 movl $0x0,0x132788 11316c: 00 00 00 * @param[in] the_heap is the heap to operate upon 11316f: c7 05 9c 27 13 00 9c movl $0x11559c,0x13279c 113176: 55 11 00 * @param[in] starting_address is the starting address of the memory for 113179: 89 0d a0 27 13 00 mov %ecx,0x1327a0 * the heap 11317f: c7 05 a4 27 13 00 00 movl $0x0,0x1327a4 113186: 00 00 00 /* * Initialize the pointer to the timer reset method so applications * that do not use the Timer Server do not have to pull it in. */ _Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method; 113189: c7 05 14 2b 13 00 b7 movl $0x1131b7,0x132b14 113190: 31 11 00 /* * Start the timer server */ status = rtems_task_start( 113193: 50 push %eax 113194: 6a 00 push $0x0 113196: 68 40 32 11 00 push $0x113240 11319b: 51 push %ecx 11319c: e8 53 f7 ff ff call 1128f4 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 1131a1: 83 c4 10 add $0x10,%esp 1131a4: 85 c0 test %eax,%eax 1131a6: 74 07 je 1131af <== ALWAYS TAKEN * but there is actually no way (in normal circumstances) that the * start can fail. The id and starting address are known to be * be good. If this service fails, something is weirdly wrong on the * target such as a stray write in an ISR or incorrect memory layout. */ initialized = false; 1131a8: c6 05 54 e2 12 00 00 movb $0x0,0x12e254 } return status; } 1131af: 8d 65 f4 lea -0xc(%ebp),%esp 1131b2: 5b pop %ebx 1131b3: 5e pop %esi 1131b4: 5f pop %edi 1131b5: c9 leave 1131b6: c3 ret =============================================================================== 00112e14 : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 112e14: 55 push %ebp 112e15: 89 e5 mov %esp,%ebp 112e17: 53 push %ebx 112e18: 83 ec 18 sub $0x18,%esp 112e1b: 8d 45 f8 lea -0x8(%ebp),%eax 112e1e: 50 push %eax 112e1f: ff 75 08 pushl 0x8(%ebp) 112e22: 68 d4 2a 13 00 push $0x132ad4 112e27: e8 2c 21 00 00 call 114f58 <_Objects_Get> 112e2c: 89 c3 mov %eax,%ebx Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 112e2e: 83 c4 10 add $0x10,%esp 112e31: b8 04 00 00 00 mov $0x4,%eax 112e36: 83 7d f8 00 cmpl $0x0,-0x8(%ebp) 112e3a: 75 6e jne 112eaa case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 112e3c: 8b 43 38 mov 0x38(%ebx),%eax 112e3f: 83 f8 01 cmp $0x1,%eax 112e42: 74 24 je 112e68 112e44: 72 07 jb 112e4d 112e46: 83 f8 04 cmp $0x4,%eax 112e49: 77 58 ja 112ea3 <== NEVER TAKEN 112e4b: eb 4a jmp 112e97 case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 112e4d: 83 c3 10 add $0x10,%ebx 112e50: 83 ec 0c sub $0xc,%esp 112e53: 53 push %ebx 112e54: e8 f3 3a 00 00 call 11694c <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 112e59: 58 pop %eax 112e5a: 5a pop %edx 112e5b: 53 push %ebx 112e5c: 68 c0 28 13 00 push $0x1328c0 112e61: e8 ce 39 00 00 call 116834 <_Watchdog_Insert> 112e66: eb 2a jmp 112e92 break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { 112e68: 83 3d 14 2b 13 00 00 cmpl $0x0,0x132b14 112e6f: 75 0c jne 112e7d <== ALWAYS TAKEN _Thread_Enable_dispatch(); 112e71: e8 a2 28 00 00 call 115718 <_Thread_Enable_dispatch><== NOT EXECUTED 112e76: b8 0e 00 00 00 mov $0xe,%eax <== NOT EXECUTED 112e7b: eb 2d jmp 112eaa <== NOT EXECUTED return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 112e7d: 83 ec 0c sub $0xc,%esp 112e80: 8d 43 10 lea 0x10(%ebx),%eax 112e83: 50 push %eax 112e84: e8 c3 3a 00 00 call 11694c <_Watchdog_Remove> (*_Timer_Server_schedule_operation)( the_timer ); 112e89: 89 1c 24 mov %ebx,(%esp) 112e8c: ff 15 14 2b 13 00 call *0x132b14 112e92: 83 c4 10 add $0x10,%esp 112e95: eb 0c jmp 112ea3 break; case TIMER_TIME_OF_DAY: case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); 112e97: e8 7c 28 00 00 call 115718 <_Thread_Enable_dispatch> 112e9c: b8 0b 00 00 00 mov $0xb,%eax 112ea1: eb 07 jmp 112eaa return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 112ea3: e8 70 28 00 00 call 115718 <_Thread_Enable_dispatch> 112ea8: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112eaa: 8b 5d fc mov -0x4(%ebp),%ebx 112ead: c9 leave 112eae: c3 ret =============================================================================== 00112eb0 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 112eb0: 55 push %ebp 112eb1: 89 e5 mov %esp,%ebp 112eb3: 57 push %edi 112eb4: 56 push %esi 112eb5: 53 push %ebx 112eb6: 83 ec 1c sub $0x1c,%esp 112eb9: 8b 7d 08 mov 0x8(%ebp),%edi 112ebc: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 112ebf: b8 0e 00 00 00 mov $0xe,%eax 112ec4: 83 3d 18 2b 13 00 00 cmpl $0x0,0x132b18 112ecb: 0f 84 91 00 00 00 je 112f62 return RTEMS_INCORRECT_STATE; if ( !routine ) 112ed1: b8 09 00 00 00 mov $0x9,%eax 112ed6: 85 f6 test %esi,%esi 112ed8: 0f 84 84 00 00 00 je 112f62 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 112ede: b8 0a 00 00 00 mov $0xa,%eax 112ee3: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 112ee7: 74 79 je 112f62 112ee9: 50 push %eax 112eea: 8d 45 f0 lea -0x10(%ebp),%eax 112eed: 50 push %eax 112eee: 57 push %edi 112eef: 68 d4 2a 13 00 push $0x132ad4 112ef4: e8 5f 20 00 00 call 114f58 <_Objects_Get> 112ef9: 89 c3 mov %eax,%ebx return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 112efb: 83 c4 10 add $0x10,%esp 112efe: b8 04 00 00 00 mov $0x4,%eax 112f03: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 112f07: 75 59 jne 112f62 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 112f09: 83 ec 0c sub $0xc,%esp 112f0c: 8d 43 10 lea 0x10(%ebx),%eax 112f0f: 50 push %eax 112f10: e8 37 3a 00 00 call 11694c <_Watchdog_Remove> _ISR_Disable( level ); 112f15: 9c pushf 112f16: fa cli 112f17: 5a pop %edx /* * 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 ) { 112f18: 83 c4 10 add $0x10,%esp 112f1b: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 112f1f: 74 0b je 112f2c <== ALWAYS TAKEN _ISR_Enable( level ); 112f21: 52 push %edx <== NOT EXECUTED 112f22: 9d popf <== NOT EXECUTED _Thread_Enable_dispatch(); 112f23: e8 f0 27 00 00 call 115718 <_Thread_Enable_dispatch><== NOT EXECUTED 112f28: 31 c0 xor %eax,%eax <== NOT EXECUTED 112f2a: eb 36 jmp 112f62 <== NOT EXECUTED /* * 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; 112f2c: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 112f33: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) * @param[in] the_heap is the heap to operate upon 112f3a: 89 73 2c mov %esi,0x2c(%ebx) * @param[in] starting_address is the starting address of the memory for 112f3d: 89 7b 30 mov %edi,0x30(%ebx) * the heap 112f40: 8b 45 14 mov 0x14(%ebp),%eax 112f43: 89 43 34 mov %eax,0x34(%ebx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 112f46: 8b 45 0c mov 0xc(%ebp),%eax 112f49: 89 43 1c mov %eax,0x1c(%ebx) _ISR_Enable( level ); 112f4c: 52 push %edx 112f4d: 9d popf /* * _Timer_Server_schedule_operation != NULL because we checked that * _Timer_Server was != NULL above. Both are set at the same time. */ (*_Timer_Server_schedule_operation)( the_timer ); 112f4e: 83 ec 0c sub $0xc,%esp 112f51: 53 push %ebx 112f52: ff 15 14 2b 13 00 call *0x132b14 _Thread_Enable_dispatch(); 112f58: e8 bb 27 00 00 call 115718 <_Thread_Enable_dispatch> 112f5d: 31 c0 xor %eax,%eax 112f5f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112f62: 8d 65 f4 lea -0xc(%ebp),%esp 112f65: 5b pop %ebx 112f66: 5e pop %esi 112f67: 5f pop %edi 112f68: c9 leave 112f69: c3 ret =============================================================================== 00112f6c : Objects_Id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 112f6c: 55 push %ebp 112f6d: 89 e5 mov %esp,%ebp 112f6f: 57 push %edi 112f70: 56 push %esi 112f71: 53 push %ebx 112f72: 83 ec 1c sub $0x1c,%esp 112f75: 8b 5d 0c mov 0xc(%ebp),%ebx 112f78: 8b 7d 10 mov 0x10(%ebp),%edi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_Timer_Server ) 112f7b: b8 0e 00 00 00 mov $0xe,%eax 112f80: 83 3d 18 2b 13 00 00 cmpl $0x0,0x132b18 112f87: 0f 84 b3 00 00 00 je 113040 <== NEVER TAKEN return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 112f8d: b8 0b 00 00 00 mov $0xb,%eax 112f92: 80 3d f4 27 13 00 00 cmpb $0x0,0x1327f4 112f99: 0f 84 a1 00 00 00 je 113040 <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 112f9f: b8 09 00 00 00 mov $0x9,%eax 112fa4: 85 ff test %edi,%edi 112fa6: 0f 84 94 00 00 00 je 113040 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 112fac: 83 ec 0c sub $0xc,%esp 112faf: 53 push %ebx 112fb0: e8 bb d7 ff ff call 110770 <_TOD_Validate> 112fb5: 83 c4 10 add $0x10,%esp 112fb8: 84 c0 test %al,%al 112fba: 74 7f je 11303b <== NEVER TAKEN return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 112fbc: 83 ec 0c sub $0xc,%esp 112fbf: 53 push %ebx 112fc0: e8 43 d7 ff ff call 110708 <_TOD_To_seconds> 112fc5: 89 c6 mov %eax,%esi if ( seconds <= _TOD_Seconds_since_epoch ) 112fc7: 83 c4 10 add $0x10,%esp 112fca: 3b 05 70 28 13 00 cmp 0x132870,%eax 112fd0: 76 69 jbe 11303b <== NEVER TAKEN /** * This routine grows @a the_heap memory area using the size bytes which * begin at @a starting_address. * * @param[in] the_heap is the heap to operate upon 112fd2: 50 push %eax 112fd3: 8d 45 f0 lea -0x10(%ebp),%eax 112fd6: 50 push %eax 112fd7: ff 75 08 pushl 0x8(%ebp) 112fda: 68 d4 2a 13 00 push $0x132ad4 112fdf: e8 74 1f 00 00 call 114f58 <_Objects_Get> 112fe4: 89 c3 mov %eax,%ebx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 112fe6: 83 c4 10 add $0x10,%esp 112fe9: b8 04 00 00 00 mov $0x4,%eax 112fee: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 112ff2: 75 4c jne 113040 <== NEVER TAKEN case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 112ff4: 83 ec 0c sub $0xc,%esp 112ff7: 8d 43 10 lea 0x10(%ebx),%eax 112ffa: 50 push %eax 112ffb: e8 4c 39 00 00 call 11694c <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 113000: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) * This routine initializes @a the_heap record to manage the * contiguous heap of @a size bytes which starts at @a starting_address. * Blocks of memory are allocated from the heap in multiples of * @a page_size byte units. If @a page_size is 0 or is not multiple of * CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary. * 113007: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) * @param[in] the_heap is the heap to operate upon 11300e: 89 7b 2c mov %edi,0x2c(%ebx) * @param[in] starting_address is the starting address of the memory for 113011: 8b 45 08 mov 0x8(%ebp),%eax 113014: 89 43 30 mov %eax,0x30(%ebx) * the heap 113017: 8b 45 14 mov 0x14(%ebp),%eax 11301a: 89 43 34 mov %eax,0x34(%ebx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch; 11301d: 2b 35 70 28 13 00 sub 0x132870,%esi 113023: 89 73 1c mov %esi,0x1c(%ebx) /* * _Timer_Server_schedule_operation != NULL because we checked that * _Timer_Server was != NULL above. Both are set at the same time. */ (*_Timer_Server_schedule_operation)( the_timer ); 113026: 89 1c 24 mov %ebx,(%esp) 113029: ff 15 14 2b 13 00 call *0x132b14 _Thread_Enable_dispatch(); 11302f: e8 e4 26 00 00 call 115718 <_Thread_Enable_dispatch> 113034: 31 c0 xor %eax,%eax 113036: 83 c4 10 add $0x10,%esp 113039: eb 05 jmp 113040 return RTEMS_SUCCESSFUL; 11303b: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113040: 8d 65 f4 lea -0xc(%ebp),%esp 113043: 5b pop %ebx 113044: 5e pop %esi 113045: 5f pop %edi 113046: c9 leave 113047: c3 ret