=============================================================================== 0010bed4 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 10bed4: 55 push %ebp 10bed5: 89 e5 mov %esp,%ebp 10bed7: 53 push %ebx 10bed8: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10bedb: 8b 1d 18 66 12 00 mov 0x126618,%ebx 10bee1: 81 fb 1c 66 12 00 cmp $0x12661c,%ebx 10bee7: 74 10 je 10bef9 <_API_extensions_Run_postdriver+0x25><== NEVER TAKEN 10bee9: 8d 76 00 lea 0x0(%esi),%esi * Currently all APIs configure this hook so it is always non-NULL. */ #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); 10beec: ff 53 08 call *0x8(%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 ) ; the_node = the_node->next ) { 10beef: 8b 1b mov (%ebx),%ebx void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10bef1: 81 fb 1c 66 12 00 cmp $0x12661c,%ebx 10bef7: 75 f3 jne 10beec <_API_extensions_Run_postdriver+0x18><== NEVER TAKEN #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 10bef9: 58 pop %eax 10befa: 5b pop %ebx 10befb: c9 leave 10befc: c3 ret =============================================================================== 0010bf00 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 10bf00: 55 push %ebp 10bf01: 89 e5 mov %esp,%ebp 10bf03: 53 push %ebx 10bf04: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10bf07: 8b 1d 18 66 12 00 mov 0x126618,%ebx 10bf0d: 81 fb 1c 66 12 00 cmp $0x12661c,%ebx 10bf13: 74 1c je 10bf31 <_API_extensions_Run_postswitch+0x31><== NEVER TAKEN 10bf15: 8d 76 00 lea 0x0(%esi),%esi !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); 10bf18: 83 ec 0c sub $0xc,%esp 10bf1b: ff 35 78 66 12 00 pushl 0x126678 10bf21: ff 53 0c call *0xc(%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 ) ; the_node = the_node->next ) { 10bf24: 8b 1b mov (%ebx),%ebx void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10bf26: 83 c4 10 add $0x10,%esp 10bf29: 81 fb 1c 66 12 00 cmp $0x12661c,%ebx 10bf2f: 75 e7 jne 10bf18 <_API_extensions_Run_postswitch+0x18><== NEVER TAKEN the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10bf31: 8b 5d fc mov -0x4(%ebp),%ebx 10bf34: c9 leave 10bf35: c3 ret =============================================================================== 00112e14 <_CORE_barrier_Wait>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 112e14: 55 push %ebp 112e15: 89 e5 mov %esp,%ebp 112e17: 57 push %edi 112e18: 56 push %esi 112e19: 53 push %ebx 112e1a: 83 ec 1c sub $0x1c,%esp 112e1d: 8b 45 08 mov 0x8(%ebp),%eax 112e20: 8b 5d 0c mov 0xc(%ebp),%ebx 112e23: 8b 75 14 mov 0x14(%ebp),%esi 112e26: 8b 7d 18 mov 0x18(%ebp),%edi Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 112e29: 8b 15 18 76 12 00 mov 0x127618,%edx executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 112e2f: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 112e36: 9c pushf 112e37: fa cli 112e38: 8f 45 e4 popl -0x1c(%ebp) the_barrier->number_of_waiting_threads++; 112e3b: 8b 48 48 mov 0x48(%eax),%ecx 112e3e: 41 inc %ecx 112e3f: 89 48 48 mov %ecx,0x48(%eax) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 112e42: 83 78 40 00 cmpl $0x0,0x40(%eax) 112e46: 75 05 jne 112e4d <_CORE_barrier_Wait+0x39> if ( the_barrier->number_of_waiting_threads == 112e48: 3b 48 44 cmp 0x44(%eax),%ecx 112e4b: 74 2b je 112e78 <_CORE_barrier_Wait+0x64> 112e4d: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 112e54: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 112e57: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( level ); 112e5a: ff 75 e4 pushl -0x1c(%ebp) 112e5d: 9d popf _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 112e5e: c7 45 10 f0 f2 10 00 movl $0x10f2f0,0x10(%ebp) 112e65: 89 75 0c mov %esi,0xc(%ebp) 112e68: 89 45 08 mov %eax,0x8(%ebp) } 112e6b: 83 c4 1c add $0x1c,%esp 112e6e: 5b pop %ebx 112e6f: 5e pop %esi 112e70: 5f pop %edi 112e71: 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 ); 112e72: e9 29 c1 ff ff jmp 10efa0 <_Thread_queue_Enqueue_with_handler> 112e77: 90 nop <== NOT EXECUTED _ISR_Disable( level ); the_barrier->number_of_waiting_threads++; if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 112e78: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) _ISR_Enable( level ); 112e7f: ff 75 e4 pushl -0x1c(%ebp) 112e82: 9d popf _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 112e83: 89 7d 10 mov %edi,0x10(%ebp) 112e86: 89 5d 0c mov %ebx,0xc(%ebp) 112e89: 89 45 08 mov %eax,0x8(%ebp) executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); } 112e8c: 83 c4 1c add $0x1c,%esp 112e8f: 5b pop %ebx 112e90: 5e pop %esi 112e91: 5f pop %edi 112e92: c9 leave if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; _ISR_Enable( level ); _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 112e93: e9 4c ff ff ff jmp 112de4 <_CORE_barrier_Release> =============================================================================== 0011996c <_CORE_message_queue_Broadcast>: Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 11996c: 55 push %ebp 11996d: 89 e5 mov %esp,%ebp 11996f: 57 push %edi 119970: 56 push %esi 119971: 53 push %ebx 119972: 83 ec 1c sub $0x1c,%esp 119975: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 119978: 8b 45 10 mov 0x10(%ebp),%eax 11997b: 39 43 4c cmp %eax,0x4c(%ebx) 11997e: 72 60 jb 1199e0 <_CORE_message_queue_Broadcast+0x74><== NEVER TAKEN * 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 ) { 119980: 8b 43 48 mov 0x48(%ebx),%eax 119983: 85 c0 test %eax,%eax 119985: 75 45 jne 1199cc <_CORE_message_queue_Broadcast+0x60> 119987: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 11998e: eb 18 jmp 1199a8 <_CORE_message_queue_Broadcast+0x3c> */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 119990: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 119993: 8b 42 2c mov 0x2c(%edx),%eax 119996: 89 c7 mov %eax,%edi 119998: 8b 75 0c mov 0xc(%ebp),%esi 11999b: 8b 4d 10 mov 0x10(%ebp),%ecx 11999e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 1199a0: 8b 42 28 mov 0x28(%edx),%eax 1199a3: 8b 55 10 mov 0x10(%ebp),%edx 1199a6: 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 = 1199a8: 83 ec 0c sub $0xc,%esp 1199ab: 53 push %ebx 1199ac: e8 ab 24 00 00 call 11be5c <_Thread_queue_Dequeue> 1199b1: 89 c2 mov %eax,%edx 1199b3: 83 c4 10 add $0x10,%esp 1199b6: 85 c0 test %eax,%eax 1199b8: 75 d6 jne 119990 <_CORE_message_queue_Broadcast+0x24> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 1199ba: 8b 55 e4 mov -0x1c(%ebp),%edx 1199bd: 8b 45 1c mov 0x1c(%ebp),%eax 1199c0: 89 10 mov %edx,(%eax) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 1199c2: 31 c0 xor %eax,%eax } 1199c4: 8d 65 f4 lea -0xc(%ebp),%esp 1199c7: 5b pop %ebx 1199c8: 5e pop %esi 1199c9: 5f pop %edi 1199ca: c9 leave 1199cb: c3 ret * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 1199cc: 8b 55 1c mov 0x1c(%ebp),%edx 1199cf: c7 02 00 00 00 00 movl $0x0,(%edx) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 1199d5: 31 c0 xor %eax,%eax #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 1199d7: 8d 65 f4 lea -0xc(%ebp),%esp 1199da: 5b pop %ebx 1199db: 5e pop %esi 1199dc: 5f pop %edi 1199dd: c9 leave 1199de: c3 ret 1199df: 90 nop <== NOT EXECUTED Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; 1199e0: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 1199e5: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1199e8: 5b pop %ebx <== NOT EXECUTED 1199e9: 5e pop %esi <== NOT EXECUTED 1199ea: 5f pop %edi <== NOT EXECUTED 1199eb: c9 leave <== NOT EXECUTED 1199ec: c3 ret <== NOT EXECUTED =============================================================================== 00114a48 <_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 ) { 114a48: 55 push %ebp 114a49: 89 e5 mov %esp,%ebp 114a4b: 57 push %edi 114a4c: 56 push %esi 114a4d: 53 push %ebx 114a4e: 83 ec 0c sub $0xc,%esp 114a51: 8b 5d 08 mov 0x8(%ebp),%ebx 114a54: 8b 75 10 mov 0x10(%ebp),%esi 114a57: 8b 45 14 mov 0x14(%ebp),%eax size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 114a5a: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 114a5d: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 114a64: 89 43 4c mov %eax,0x4c(%ebx) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 114a67: a8 03 test $0x3,%al 114a69: 74 15 je 114a80 <_CORE_message_queue_Initialize+0x38> allocated_message_size += sizeof(uint32_t); 114a6b: 8d 50 04 lea 0x4(%eax),%edx allocated_message_size &= ~(sizeof(uint32_t) - 1); 114a6e: 83 e2 fc and $0xfffffffc,%edx } if (allocated_message_size < maximum_message_size) 114a71: 39 d0 cmp %edx,%eax 114a73: 76 0d jbe 114a82 <_CORE_message_queue_Initialize+0x3a><== ALWAYS TAKEN */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) return false; 114a75: 31 c0 xor %eax,%eax STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 114a77: 8d 65 f4 lea -0xc(%ebp),%esp 114a7a: 5b pop %ebx 114a7b: 5e pop %esi 114a7c: 5f pop %edi 114a7d: c9 leave 114a7e: c3 ret 114a7f: 90 nop <== NOT EXECUTED /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 114a80: 89 c2 mov %eax,%edx /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 114a82: 8d 7a 10 lea 0x10(%edx),%edi /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 114a85: 89 f8 mov %edi,%eax 114a87: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 114a8a: 39 d0 cmp %edx,%eax 114a8c: 72 e7 jb 114a75 <_CORE_message_queue_Initialize+0x2d><== NEVER TAKEN /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); 114a8e: 83 ec 0c sub $0xc,%esp 114a91: 50 push %eax 114a92: e8 f9 28 00 00 call 117390 <_Workspace_Allocate> return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 114a97: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 114a9a: 83 c4 10 add $0x10,%esp 114a9d: 85 c0 test %eax,%eax 114a9f: 74 d4 je 114a75 <_CORE_message_queue_Initialize+0x2d> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 114aa1: 57 push %edi 114aa2: 56 push %esi 114aa3: 50 push %eax 114aa4: 8d 43 60 lea 0x60(%ebx),%eax 114aa7: 50 push %eax 114aa8: e8 b7 45 00 00 call 119064 <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 114aad: 8d 43 54 lea 0x54(%ebx),%eax 114ab0: 89 43 50 mov %eax,0x50(%ebx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 114ab3: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_message_queue->message_buffers, (size_t) maximum_pending_messages, allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); 114aba: 8d 43 50 lea 0x50(%ebx),%eax 114abd: 89 43 58 mov %eax,0x58(%ebx) _Thread_queue_Initialize( 114ac0: 6a 06 push $0x6 114ac2: 68 80 00 00 00 push $0x80 114ac7: 8b 45 0c mov 0xc(%ebp),%eax 114aca: 83 38 01 cmpl $0x1,(%eax) 114acd: 0f 94 c0 sete %al 114ad0: 0f b6 c0 movzbl %al,%eax 114ad3: 50 push %eax 114ad4: 53 push %ebx 114ad5: e8 86 1e 00 00 call 116960 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 114ada: 83 c4 20 add $0x20,%esp 114add: b0 01 mov $0x1,%al } 114adf: 8d 65 f4 lea -0xc(%ebp),%esp 114ae2: 5b pop %ebx 114ae3: 5e pop %esi 114ae4: 5f pop %edi 114ae5: c9 leave 114ae6: c3 ret =============================================================================== 001104cc <_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 ) { 1104cc: 55 push %ebp 1104cd: 89 e5 mov %esp,%ebp 1104cf: 53 push %ebx 1104d0: 8b 45 08 mov 0x8(%ebp),%eax 1104d3: 8b 55 0c mov 0xc(%ebp),%edx #endif _CORE_message_queue_Set_message_priority( the_message, submit_type ); #if !defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) _ISR_Disable( level ); 1104d6: 9c pushf 1104d7: fa cli 1104d8: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 1104d9: ff 40 48 incl 0x48(%eax) if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) 1104dc: 81 7d 10 ff ff ff 7f cmpl $0x7fffffff,0x10(%ebp) 1104e3: 74 17 je 1104fc <_CORE_message_queue_Insert_message+0x30> RTEMS_INLINE_ROUTINE void _CORE_message_queue_Prepend_unprotected ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Prepend_unprotected( 1104e5: 8d 48 50 lea 0x50(%eax),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 1104e8: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 1104eb: 8b 48 50 mov 0x50(%eax),%ecx after_node->next = the_node; 1104ee: 89 50 50 mov %edx,0x50(%eax) the_node->next = before_node; 1104f1: 89 0a mov %ecx,(%edx) before_node->previous = the_node; 1104f3: 89 51 04 mov %edx,0x4(%ecx) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); else _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 1104f6: 53 push %ebx 1104f7: 9d popf * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) (*the_message_queue->notify_handler)(the_message_queue->notify_argument); #endif } 1104f8: 5b pop %ebx 1104f9: c9 leave 1104fa: c3 ret 1104fb: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1104fc: 8d 48 54 lea 0x54(%eax),%ecx 1104ff: 89 0a mov %ecx,(%edx) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 110501: 8b 48 58 mov 0x58(%eax),%ecx the_chain->last = the_node; 110504: 89 50 58 mov %edx,0x58(%eax) old_last_node->next = the_node; 110507: 89 11 mov %edx,(%ecx) the_node->previous = old_last_node; 110509: 89 4a 04 mov %ecx,0x4(%edx) 11050c: eb e8 jmp 1104f6 <_CORE_message_queue_Insert_message+0x2a> =============================================================================== 00114ae8 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 114ae8: 55 push %ebp 114ae9: 89 e5 mov %esp,%ebp 114aeb: 57 push %edi 114aec: 56 push %esi 114aed: 53 push %ebx 114aee: 83 ec 1c sub $0x1c,%esp 114af1: 8b 45 08 mov 0x8(%ebp),%eax 114af4: 8b 55 0c mov 0xc(%ebp),%edx 114af7: 89 55 dc mov %edx,-0x24(%ebp) 114afa: 8b 55 10 mov 0x10(%ebp),%edx 114afd: 89 55 e4 mov %edx,-0x1c(%ebp) 114b00: 8b 7d 14 mov 0x14(%ebp),%edi 114b03: 8b 55 1c mov 0x1c(%ebp),%edx 114b06: 89 55 d8 mov %edx,-0x28(%ebp) 114b09: 8a 5d 18 mov 0x18(%ebp),%bl ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 114b0c: 8b 0d f8 fc 12 00 mov 0x12fcf8,%ecx executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 114b12: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) _ISR_Disable( level ); 114b19: 9c pushf 114b1a: fa cli 114b1b: 8f 45 e0 popl -0x20(%ebp) */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 114b1e: 8b 50 50 mov 0x50(%eax),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 114b21: 8d 70 54 lea 0x54(%eax),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 114b24: 39 f2 cmp %esi,%edx 114b26: 74 44 je 114b6c <_CORE_message_queue_Seize+0x84> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 114b28: 8b 0a mov (%edx),%ecx the_chain->first = new_first; 114b2a: 89 48 50 mov %ecx,0x50(%eax) CORE_message_queue_Buffer_control *_CORE_message_queue_Get_pending_message ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) _Chain_Get_unprotected( &the_message_queue->Pending_messages ); 114b2d: 8d 58 50 lea 0x50(%eax),%ebx 114b30: 89 59 04 mov %ebx,0x4(%ecx) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 114b33: ff 48 48 decl 0x48(%eax) _ISR_Enable( level ); 114b36: ff 75 e0 pushl -0x20(%ebp) 114b39: 9d popf *size_p = the_message->Contents.size; 114b3a: 8b 4a 08 mov 0x8(%edx),%ecx 114b3d: 89 0f mov %ecx,(%edi) _Thread_Executing->Wait.count = 114b3f: 8b 0d f8 fc 12 00 mov 0x12fcf8,%ecx 114b45: c7 41 24 00 00 00 00 movl $0x0,0x24(%ecx) _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 114b4c: 8d 72 0c lea 0xc(%edx),%esi const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 114b4f: 8b 0f mov (%edi),%ecx 114b51: 8b 7d e4 mov -0x1c(%ebp),%edi 114b54: f3 a4 rep movsb %ds:(%esi),%es:(%edi) RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 114b56: 89 55 0c mov %edx,0xc(%ebp) 114b59: 83 c0 60 add $0x60,%eax 114b5c: 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 ); } 114b5f: 83 c4 1c add $0x1c,%esp 114b62: 5b pop %ebx 114b63: 5e pop %esi 114b64: 5f pop %edi 114b65: c9 leave 114b66: e9 5d fe ff ff jmp 1149c8 <_Chain_Append> 114b6b: 90 nop <== NOT EXECUTED return; } #endif } if ( !wait ) { 114b6c: 84 db test %bl,%bl 114b6e: 75 14 jne 114b84 <_CORE_message_queue_Seize+0x9c> _ISR_Enable( level ); 114b70: ff 75 e0 pushl -0x20(%ebp) 114b73: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 114b74: c7 41 34 04 00 00 00 movl $0x4,0x34(%ecx) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 114b7b: 83 c4 1c add $0x1c,%esp 114b7e: 5b pop %ebx 114b7f: 5e pop %esi 114b80: 5f pop %edi 114b81: c9 leave 114b82: c3 ret 114b83: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 114b84: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax) executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 114b8b: 89 41 44 mov %eax,0x44(%ecx) executing->Wait.id = id; 114b8e: 8b 55 dc mov -0x24(%ebp),%edx 114b91: 89 51 20 mov %edx,0x20(%ecx) executing->Wait.return_argument_second.mutable_object = buffer; 114b94: 8b 55 e4 mov -0x1c(%ebp),%edx 114b97: 89 51 2c mov %edx,0x2c(%ecx) executing->Wait.return_argument = size_p; 114b9a: 89 79 28 mov %edi,0x28(%ecx) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 114b9d: ff 75 e0 pushl -0x20(%ebp) 114ba0: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 114ba1: c7 45 10 24 6a 11 00 movl $0x116a24,0x10(%ebp) 114ba8: 8b 55 d8 mov -0x28(%ebp),%edx 114bab: 89 55 0c mov %edx,0xc(%ebp) 114bae: 89 45 08 mov %eax,0x8(%ebp) } 114bb1: 83 c4 1c add $0x1c,%esp 114bb4: 5b pop %ebx 114bb5: 5e pop %esi 114bb6: 5f pop %edi 114bb7: 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 ); 114bb8: e9 17 1b 00 00 jmp 1166d4 <_Thread_queue_Enqueue_with_handler> =============================================================================== 0010c068 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 10c068: 55 push %ebp 10c069: 89 e5 mov %esp,%ebp 10c06b: 57 push %edi 10c06c: 56 push %esi 10c06d: 53 push %ebx 10c06e: 83 ec 0c sub $0xc,%esp 10c071: 8b 5d 08 mov 0x8(%ebp),%ebx 10c074: 8b 75 0c mov 0xc(%ebp),%esi CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 10c077: 8b 45 10 mov 0x10(%ebp),%eax 10c07a: 39 43 4c cmp %eax,0x4c(%ebx) 10c07d: 72 51 jb 10c0d0 <_CORE_message_queue_Submit+0x68> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 10c07f: 8b 43 48 mov 0x48(%ebx),%eax 10c082: 85 c0 test %eax,%eax 10c084: 74 5a je 10c0e0 <_CORE_message_queue_Submit+0x78> /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < 10c086: 39 43 44 cmp %eax,0x44(%ebx) 10c089: 77 0d ja 10c098 <_CORE_message_queue_Submit+0x30> ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } #if !defined(RTEMS_SCORE_COREMSG_ENABLE_BLOCKING_SEND) return CORE_MESSAGE_QUEUE_STATUS_TOO_MANY; 10c08b: b8 02 00 00 00 mov $0x2,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c090: 8d 65 f4 lea -0xc(%ebp),%esp 10c093: 5b pop %ebx 10c094: 5e pop %esi 10c095: 5f pop %edi 10c096: c9 leave 10c097: c3 ret _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) _Chain_Get( &the_message_queue->Inactive_messages ); 10c098: 83 ec 0c sub $0xc,%esp 10c09b: 8d 43 60 lea 0x60(%ebx),%eax 10c09e: 50 push %eax 10c09f: e8 a0 ff ff ff call 10c044 <_Chain_Get> 10c0a4: 89 c2 mov %eax,%edx return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED; #endif _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, 10c0a6: 8d 40 0c lea 0xc(%eax),%eax const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10c0a9: 89 c7 mov %eax,%edi 10c0ab: 8b 4d 10 mov 0x10(%ebp),%ecx 10c0ae: f3 a4 rep movsb %ds:(%esi),%es:(%edi) size ); the_message->Contents.size = size; 10c0b0: 8b 4d 10 mov 0x10(%ebp),%ecx 10c0b3: 89 4a 08 mov %ecx,0x8(%edx) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 10c0b6: 83 c4 0c add $0xc,%esp 10c0b9: ff 75 1c pushl 0x1c(%ebp) 10c0bc: 52 push %edx 10c0bd: 53 push %ebx 10c0be: e8 09 44 00 00 call 1104cc <_CORE_message_queue_Insert_message> the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10c0c3: 83 c4 10 add $0x10,%esp 10c0c6: 31 c0 xor %eax,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c0c8: 8d 65 f4 lea -0xc(%ebp),%esp 10c0cb: 5b pop %ebx 10c0cc: 5e pop %esi 10c0cd: 5f pop %edi 10c0ce: c9 leave 10c0cf: c3 ret { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; 10c0d0: b8 01 00 00 00 mov $0x1,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c0d5: 8d 65 f4 lea -0xc(%ebp),%esp 10c0d8: 5b pop %ebx 10c0d9: 5e pop %esi 10c0da: 5f pop %edi 10c0db: c9 leave 10c0dc: c3 ret 10c0dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 10c0e0: 83 ec 0c sub $0xc,%esp 10c0e3: 53 push %ebx 10c0e4: e8 ef 18 00 00 call 10d9d8 <_Thread_queue_Dequeue> 10c0e9: 89 c2 mov %eax,%edx if ( the_thread ) { 10c0eb: 83 c4 10 add $0x10,%esp 10c0ee: 85 c0 test %eax,%eax 10c0f0: 74 1e je 10c110 <_CORE_message_queue_Submit+0xa8> 10c0f2: 8b 40 2c mov 0x2c(%eax),%eax 10c0f5: 89 c7 mov %eax,%edi 10c0f7: 8b 4d 10 mov 0x10(%ebp),%ecx 10c0fa: 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; 10c0fc: 8b 42 28 mov 0x28(%edx),%eax 10c0ff: 8b 4d 10 mov 0x10(%ebp),%ecx 10c102: 89 08 mov %ecx,(%eax) the_thread->Wait.count = (uint32_t) submit_type; 10c104: 8b 45 1c mov 0x1c(%ebp),%eax 10c107: 89 42 24 mov %eax,0x24(%edx) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10c10a: 31 c0 xor %eax,%eax 10c10c: eb 82 jmp 10c090 <_CORE_message_queue_Submit+0x28> 10c10e: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); if ( the_thread ) { 10c110: 8b 43 48 mov 0x48(%ebx),%eax 10c113: e9 6e ff ff ff jmp 10c086 <_CORE_message_queue_Submit+0x1e> =============================================================================== 0010c124 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10c124: 55 push %ebp 10c125: 89 e5 mov %esp,%ebp 10c127: 57 push %edi 10c128: 56 push %esi 10c129: 53 push %ebx 10c12a: 83 ec 0c sub $0xc,%esp 10c12d: 8b 45 08 mov 0x8(%ebp),%eax 10c130: 8b 5d 0c mov 0xc(%ebp),%ebx 10c133: 8b 55 10 mov 0x10(%ebp),%edx /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 10c136: 8d 78 40 lea 0x40(%eax),%edi 10c139: b9 04 00 00 00 mov $0x4,%ecx 10c13e: 89 de mov %ebx,%esi 10c140: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10c142: 89 50 50 mov %edx,0x50(%eax) the_mutex->blocked_count = 0; 10c145: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10c14c: 85 d2 test %edx,%edx 10c14e: 75 30 jne 10c180 <_CORE_mutex_Initialize+0x5c> the_mutex->nest_count = 1; 10c150: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) the_mutex->holder = _Thread_Executing; 10c157: 8b 15 78 66 12 00 mov 0x126678,%edx 10c15d: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = _Thread_Executing->Object.id; 10c160: 8b 4a 08 mov 0x8(%edx),%ecx 10c163: 89 48 60 mov %ecx,0x60(%eax) STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c166: 8b 48 48 mov 0x48(%eax),%ecx if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c169: 83 f9 02 cmp $0x2,%ecx 10c16c: 74 05 je 10c173 <_CORE_mutex_Initialize+0x4f> 10c16e: 83 f9 03 cmp $0x3,%ecx 10c171: 75 22 jne 10c195 <_CORE_mutex_Initialize+0x71> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 10c173: 8b 48 4c mov 0x4c(%eax),%ecx 10c176: 39 4a 14 cmp %ecx,0x14(%edx) 10c179: 72 41 jb 10c1bc <_CORE_mutex_Initialize+0x98> _Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = _Thread_Executing->current_priority; #endif _Thread_Executing->resource_count++; 10c17b: ff 42 1c incl 0x1c(%edx) 10c17e: eb 15 jmp 10c195 <_CORE_mutex_Initialize+0x71> } } else { the_mutex->nest_count = 0; 10c180: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_mutex->holder = NULL; 10c187: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) the_mutex->holder_id = 0; 10c18e: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) } _Thread_queue_Initialize( 10c195: 6a 05 push $0x5 10c197: 68 00 04 00 00 push $0x400 10c19c: 31 d2 xor %edx,%edx 10c19e: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10c1a2: 0f 95 c2 setne %dl 10c1a5: 52 push %edx 10c1a6: 50 push %eax 10c1a7: e8 dc 1b 00 00 call 10dd88 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 10c1ac: 83 c4 10 add $0x10,%esp 10c1af: 31 c0 xor %eax,%eax } 10c1b1: 8d 65 f4 lea -0xc(%ebp),%esp 10c1b4: 5b pop %ebx 10c1b5: 5e pop %esi 10c1b6: 5f pop %edi 10c1b7: c9 leave 10c1b8: c3 ret 10c1b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) return CORE_MUTEX_STATUS_CEILING_VIOLATED; 10c1bc: b8 06 00 00 00 mov $0x6,%eax STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c1c1: 8d 65 f4 lea -0xc(%ebp),%esp 10c1c4: 5b pop %ebx 10c1c5: 5e pop %esi 10c1c6: 5f pop %edi 10c1c7: c9 leave 10c1c8: c3 ret =============================================================================== 0010c21c <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10c21c: 55 push %ebp 10c21d: 89 e5 mov %esp,%ebp 10c21f: 53 push %ebx 10c220: 83 ec 14 sub $0x14,%esp 10c223: 8b 5d 08 mov 0x8(%ebp),%ebx 10c226: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c229: a1 d4 63 12 00 mov 0x1263d4,%eax 10c22e: 85 c0 test %eax,%eax 10c230: 74 04 je 10c236 <_CORE_mutex_Seize+0x1a> 10c232: 84 d2 test %dl,%dl 10c234: 75 36 jne 10c26c <_CORE_mutex_Seize+0x50><== ALWAYS TAKEN 10c236: 83 ec 08 sub $0x8,%esp 10c239: 8d 45 18 lea 0x18(%ebp),%eax 10c23c: 50 push %eax 10c23d: 53 push %ebx 10c23e: 88 55 f4 mov %dl,-0xc(%ebp) 10c241: e8 ca 42 00 00 call 110510 <_CORE_mutex_Seize_interrupt_trylock> 10c246: 83 c4 10 add $0x10,%esp 10c249: 85 c0 test %eax,%eax 10c24b: 8a 55 f4 mov -0xc(%ebp),%dl 10c24e: 74 14 je 10c264 <_CORE_mutex_Seize+0x48> 10c250: 84 d2 test %dl,%dl 10c252: 75 30 jne 10c284 <_CORE_mutex_Seize+0x68> 10c254: ff 75 18 pushl 0x18(%ebp) 10c257: 9d popf 10c258: a1 78 66 12 00 mov 0x126678,%eax 10c25d: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) } 10c264: 8b 5d fc mov -0x4(%ebp),%ebx 10c267: c9 leave 10c268: c3 ret 10c269: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c26c: 83 3d 80 65 12 00 01 cmpl $0x1,0x126580 10c273: 76 c1 jbe 10c236 <_CORE_mutex_Seize+0x1a> 10c275: 53 push %ebx 10c276: 6a 12 push $0x12 10c278: 6a 00 push $0x0 10c27a: 6a 00 push $0x0 10c27c: e8 17 06 00 00 call 10c898 <_Internal_error_Occurred> 10c281: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10c284: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10c28b: a1 78 66 12 00 mov 0x126678,%eax 10c290: 89 58 44 mov %ebx,0x44(%eax) 10c293: 8b 55 0c mov 0xc(%ebp),%edx 10c296: 89 50 20 mov %edx,0x20(%eax) 10c299: a1 d4 63 12 00 mov 0x1263d4,%eax 10c29e: 40 inc %eax 10c29f: a3 d4 63 12 00 mov %eax,0x1263d4 10c2a4: ff 75 18 pushl 0x18(%ebp) 10c2a7: 9d popf 10c2a8: 83 ec 08 sub $0x8,%esp 10c2ab: ff 75 14 pushl 0x14(%ebp) 10c2ae: 53 push %ebx 10c2af: e8 18 ff ff ff call 10c1cc <_CORE_mutex_Seize_interrupt_blocking> 10c2b4: 83 c4 10 add $0x10,%esp } 10c2b7: 8b 5d fc mov -0x4(%ebp),%ebx 10c2ba: c9 leave 10c2bb: c3 ret =============================================================================== 00110510 <_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 ) { 110510: 55 push %ebp 110511: 89 e5 mov %esp,%ebp 110513: 56 push %esi 110514: 53 push %ebx 110515: 8b 45 08 mov 0x8(%ebp),%eax 110518: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 11051b: 8b 15 78 66 12 00 mov 0x126678,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 110521: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 110528: 8b 58 50 mov 0x50(%eax),%ebx 11052b: 85 db test %ebx,%ebx 11052d: 74 31 je 110560 <_CORE_mutex_Seize_interrupt_trylock+0x50> the_mutex->lock = CORE_MUTEX_LOCKED; 11052f: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 110536: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 110539: 8b 5a 08 mov 0x8(%edx),%ebx 11053c: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 11053f: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 110546: 8b 58 48 mov 0x48(%eax),%ebx if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 110549: 83 fb 02 cmp $0x2,%ebx 11054c: 74 26 je 110574 <_CORE_mutex_Seize_interrupt_trylock+0x64> 11054e: 83 fb 03 cmp $0x3,%ebx 110551: 74 3d je 110590 <_CORE_mutex_Seize_interrupt_trylock+0x80> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 110553: ff 31 pushl (%ecx) 110555: 9d popf return 0; 110556: 31 c0 xor %eax,%eax 110558: 8d 65 f8 lea -0x8(%ebp),%esp 11055b: 5b pop %ebx 11055c: 5e pop %esi 11055d: c9 leave 11055e: c3 ret 11055f: 90 nop <== NOT EXECUTED /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 110560: 3b 50 5c cmp 0x5c(%eax),%edx 110563: 74 17 je 11057c <_CORE_mutex_Seize_interrupt_trylock+0x6c> /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; 110565: b8 01 00 00 00 mov $0x1,%eax 11056a: 8d 65 f8 lea -0x8(%ebp),%esp 11056d: 5b pop %ebx 11056e: 5e pop %esi 11056f: c9 leave 110570: c3 ret 110571: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 110574: ff 42 1c incl 0x1c(%edx) 110577: eb da jmp 110553 <_CORE_mutex_Seize_interrupt_trylock+0x43> 110579: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 11057c: 8b 58 40 mov 0x40(%eax),%ebx 11057f: 85 db test %ebx,%ebx 110581: 75 45 jne 1105c8 <_CORE_mutex_Seize_interrupt_trylock+0xb8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 110583: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 110586: ff 31 pushl (%ecx) 110588: 9d popf return 0; 110589: 31 c0 xor %eax,%eax 11058b: eb dd jmp 11056a <_CORE_mutex_Seize_interrupt_trylock+0x5a> 11058d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 110590: 8b 5a 1c mov 0x1c(%edx),%ebx 110593: 8d 73 01 lea 0x1(%ebx),%esi 110596: 89 72 1c mov %esi,0x1c(%edx) Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { 110599: 8b 72 14 mov 0x14(%edx),%esi 11059c: 39 70 4c cmp %esi,0x4c(%eax) 11059f: 74 6b je 11060c <_CORE_mutex_Seize_interrupt_trylock+0xfc> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 1105a1: 72 39 jb 1105dc <_CORE_mutex_Seize_interrupt_trylock+0xcc> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 1105a3: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 1105aa: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 1105b1: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 1105b8: 89 5a 1c mov %ebx,0x1c(%edx) _ISR_Enable( *level_p ); 1105bb: ff 31 pushl (%ecx) 1105bd: 9d popf return 0; 1105be: 31 c0 xor %eax,%eax 1105c0: 8d 65 f8 lea -0x8(%ebp),%esp 1105c3: 5b pop %ebx 1105c4: 5e pop %esi 1105c5: c9 leave 1105c6: c3 ret 1105c7: 90 nop <== NOT EXECUTED * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 1105c8: 4b dec %ebx 1105c9: 75 9a jne 110565 <_CORE_mutex_Seize_interrupt_trylock+0x55><== ALWAYS TAKEN case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 1105cb: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) <== NOT EXECUTED _ISR_Enable( *level_p ); 1105d2: ff 31 pushl (%ecx) <== NOT EXECUTED 1105d4: 9d popf <== NOT EXECUTED return 0; 1105d5: 31 c0 xor %eax,%eax <== NOT EXECUTED 1105d7: eb 91 jmp 11056a <_CORE_mutex_Seize_interrupt_trylock+0x5a><== NOT EXECUTED 1105d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1105dc: 8b 15 d4 63 12 00 mov 0x1263d4,%edx 1105e2: 42 inc %edx 1105e3: 89 15 d4 63 12 00 mov %edx,0x1263d4 return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 1105e9: ff 31 pushl (%ecx) 1105eb: 9d popf _Thread_Change_priority( 1105ec: 52 push %edx 1105ed: 6a 00 push $0x0 1105ef: ff 70 4c pushl 0x4c(%eax) 1105f2: ff 70 5c pushl 0x5c(%eax) 1105f5: e8 3e cb ff ff call 10d138 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 1105fa: e8 3d d0 ff ff call 10d63c <_Thread_Enable_dispatch> 1105ff: 83 c4 10 add $0x10,%esp return 0; 110602: 31 c0 xor %eax,%eax 110604: e9 61 ff ff ff jmp 11056a <_CORE_mutex_Seize_interrupt_trylock+0x5a> 110609: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); 11060c: ff 31 pushl (%ecx) 11060e: 9d popf return 0; 11060f: 31 c0 xor %eax,%eax 110611: e9 54 ff ff ff jmp 11056a <_CORE_mutex_Seize_interrupt_trylock+0x5a> =============================================================================== 0010c2bc <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 10c2bc: 55 push %ebp 10c2bd: 89 e5 mov %esp,%ebp 10c2bf: 53 push %ebx 10c2c0: 83 ec 04 sub $0x4,%esp 10c2c3: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; Thread_Control *holder; holder = the_mutex->holder; 10c2c6: 8b 43 5c mov 0x5c(%ebx),%eax * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 10c2c9: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10c2cd: 74 15 je 10c2e4 <_CORE_mutex_Surrender+0x28> if ( !_Thread_Is_executing( holder ) ) 10c2cf: 3b 05 78 66 12 00 cmp 0x126678,%eax 10c2d5: 74 0d je 10c2e4 <_CORE_mutex_Surrender+0x28> return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; 10c2d7: b8 03 00 00 00 mov $0x3,%eax } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c2dc: 8b 5d fc mov -0x4(%ebp),%ebx 10c2df: c9 leave 10c2e0: c3 ret 10c2e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 10c2e4: 8b 53 54 mov 0x54(%ebx),%edx 10c2e7: 85 d2 test %edx,%edx 10c2e9: 74 51 je 10c33c <_CORE_mutex_Surrender+0x80> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10c2eb: 4a dec %edx 10c2ec: 89 53 54 mov %edx,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10c2ef: 85 d2 test %edx,%edx 10c2f1: 75 49 jne 10c33c <_CORE_mutex_Surrender+0x80> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c2f3: 8b 53 48 mov 0x48(%ebx),%edx /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c2f6: 83 fa 02 cmp $0x2,%edx 10c2f9: 74 69 je 10c364 <_CORE_mutex_Surrender+0xa8> 10c2fb: 83 fa 03 cmp $0x3,%edx 10c2fe: 74 64 je 10c364 <_CORE_mutex_Surrender+0xa8> if ( holder->resource_count == 0 && holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, true ); } } the_mutex->holder = NULL; 10c300: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10c307: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) /* * 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 ) ) ) { 10c30e: 83 ec 0c sub $0xc,%esp 10c311: 53 push %ebx 10c312: e8 c1 16 00 00 call 10d9d8 <_Thread_queue_Dequeue> 10c317: 83 c4 10 add $0x10,%esp 10c31a: 85 c0 test %eax,%eax 10c31c: 74 7a je 10c398 <_CORE_mutex_Surrender+0xdc> } else #endif { the_mutex->holder = the_thread; 10c31e: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10c321: 8b 50 08 mov 0x8(%eax),%edx 10c324: 89 53 60 mov %edx,0x60(%ebx) the_mutex->nest_count = 1; 10c327: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10c32e: 8b 53 48 mov 0x48(%ebx),%edx 10c331: 83 fa 02 cmp $0x2,%edx 10c334: 74 56 je 10c38c <_CORE_mutex_Surrender+0xd0> 10c336: 83 fa 03 cmp $0x3,%edx 10c339: 74 09 je 10c344 <_CORE_mutex_Surrender+0x88> 10c33b: 90 nop } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10c33c: 31 c0 xor %eax,%eax } 10c33e: 8b 5d fc mov -0x4(%ebp),%ebx 10c341: c9 leave 10c342: c3 ret 10c343: 90 nop <== NOT EXECUTED _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; 10c344: ff 40 1c incl 0x1c(%eax) if (the_mutex->Attributes.priority_ceiling < 10c347: 8b 53 4c mov 0x4c(%ebx),%edx 10c34a: 3b 50 14 cmp 0x14(%eax),%edx 10c34d: 73 ed jae 10c33c <_CORE_mutex_Surrender+0x80> the_thread->current_priority){ _Thread_Change_priority( 10c34f: 51 push %ecx 10c350: 6a 00 push $0x0 10c352: 52 push %edx 10c353: 50 push %eax 10c354: e8 df 0d 00 00 call 10d138 <_Thread_Change_priority> 10c359: 83 c4 10 add $0x10,%esp } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10c35c: 31 c0 xor %eax,%eax 10c35e: e9 79 ff ff ff jmp 10c2dc <_CORE_mutex_Surrender+0x20> 10c363: 90 nop <== NOT EXECUTED _CORE_mutex_Pop_priority( the_mutex, holder ); if ( pop_status != CORE_MUTEX_STATUS_SUCCESSFUL ) return pop_status; holder->resource_count--; 10c364: 8b 50 1c mov 0x1c(%eax),%edx 10c367: 4a dec %edx 10c368: 89 50 1c mov %edx,0x1c(%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 ( holder->resource_count == 0 && 10c36b: 85 d2 test %edx,%edx 10c36d: 75 91 jne 10c300 <_CORE_mutex_Surrender+0x44> holder->real_priority != holder->current_priority ) { 10c36f: 8b 50 18 mov 0x18(%eax),%edx /* * 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 ( holder->resource_count == 0 && 10c372: 3b 50 14 cmp 0x14(%eax),%edx 10c375: 74 89 je 10c300 <_CORE_mutex_Surrender+0x44> holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, true ); 10c377: 51 push %ecx 10c378: 6a 01 push $0x1 10c37a: 52 push %edx 10c37b: 50 push %eax 10c37c: e8 b7 0d 00 00 call 10d138 <_Thread_Change_priority> 10c381: 83 c4 10 add $0x10,%esp 10c384: e9 77 ff ff ff jmp 10c300 <_CORE_mutex_Surrender+0x44> 10c389: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: break; case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; 10c38c: ff 40 1c incl 0x1c(%eax) } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10c38f: 31 c0 xor %eax,%eax case CORE_MUTEX_DISCIPLINES_PRIORITY: break; case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; break; 10c391: e9 46 ff ff ff jmp 10c2dc <_CORE_mutex_Surrender+0x20> 10c396: 66 90 xchg %ax,%ax <== NOT EXECUTED } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c398: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) return CORE_MUTEX_STATUS_SUCCESSFUL; 10c39f: 31 c0 xor %eax,%eax 10c3a1: e9 36 ff ff ff jmp 10c2dc <_CORE_mutex_Surrender+0x20> =============================================================================== 0010c3f4 <_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 ) { 10c3f4: 55 push %ebp 10c3f5: 89 e5 mov %esp,%ebp 10c3f7: 53 push %ebx 10c3f8: 83 ec 10 sub $0x10,%esp 10c3fb: 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)) ) { 10c3fe: 53 push %ebx 10c3ff: e8 d4 15 00 00 call 10d9d8 <_Thread_queue_Dequeue> 10c404: 83 c4 10 add $0x10,%esp 10c407: 85 c0 test %eax,%eax 10c409: 74 09 je 10c414 <_CORE_semaphore_Surrender+0x20> { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10c40b: 31 c0 xor %eax,%eax status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 10c40d: 8b 5d fc mov -0x4(%ebp),%ebx 10c410: c9 leave 10c411: c3 ret 10c412: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 10c414: 9c pushf 10c415: fa cli 10c416: 5a pop %edx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10c417: 8b 43 48 mov 0x48(%ebx),%eax 10c41a: 3b 43 40 cmp 0x40(%ebx),%eax 10c41d: 72 0d jb 10c42c <_CORE_semaphore_Surrender+0x38><== ALWAYS TAKEN the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; 10c41f: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED _ISR_Enable( level ); 10c424: 52 push %edx 10c425: 9d popf } return status; } 10c426: 8b 5d fc mov -0x4(%ebp),%ebx 10c429: c9 leave 10c42a: c3 ret 10c42b: 90 nop <== NOT EXECUTED #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 10c42c: 40 inc %eax 10c42d: 89 43 48 mov %eax,0x48(%ebx) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10c430: 31 c0 xor %eax,%eax 10c432: eb f0 jmp 10c424 <_CORE_semaphore_Surrender+0x30> =============================================================================== 0010c044 <_Chain_Get>: */ Chain_Node *_Chain_Get( Chain_Control *the_chain ) { 10c044: 55 push %ebp 10c045: 89 e5 mov %esp,%ebp 10c047: 53 push %ebx 10c048: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 10c04b: 9c pushf 10c04c: fa cli 10c04d: 5b pop %ebx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10c04e: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10c050: 8d 4a 04 lea 0x4(%edx),%ecx if ( !_Chain_Is_empty( the_chain ) ) 10c053: 39 c8 cmp %ecx,%eax 10c055: 74 0d je 10c064 <_Chain_Get+0x20> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 10c057: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 10c059: 89 0a mov %ecx,(%edx) new_first->previous = _Chain_Head(the_chain); 10c05b: 89 51 04 mov %edx,0x4(%ecx) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level ); 10c05e: 53 push %ebx 10c05f: 9d popf return return_node; } 10c060: 5b pop %ebx 10c061: c9 leave 10c062: c3 ret 10c063: 90 nop <== NOT EXECUTED ) { ISR_Level level; Chain_Node *return_node; return_node = NULL; 10c064: 31 c0 xor %eax,%eax 10c066: eb f6 jmp 10c05e <_Chain_Get+0x1a> =============================================================================== 00110480 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 110480: 55 push %ebp 110481: 89 e5 mov %esp,%ebp 110483: 57 push %edi 110484: 56 push %esi 110485: 53 push %ebx 110486: 8b 7d 08 mov 0x8(%ebp),%edi 110489: 8b 75 14 mov 0x14(%ebp),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 11048c: 89 fa mov %edi,%edx Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 11048e: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) next = starting_address; while ( count-- ) { 110495: 8b 45 10 mov 0x10(%ebp),%eax 110498: 85 c0 test %eax,%eax 11049a: 74 21 je 1104bd <_Chain_Initialize+0x3d><== NEVER TAKEN Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 11049c: 8b 4d 10 mov 0x10(%ebp),%ecx 11049f: 8b 45 0c mov 0xc(%ebp),%eax 1104a2: eb 04 jmp 1104a8 <_Chain_Initialize+0x28> while ( count-- ) { 1104a4: 89 c2 mov %eax,%edx current->next = next; next->previous = current; current = next; next = (Chain_Node *) 1104a6: 89 d8 mov %ebx,%eax count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { current->next = next; 1104a8: 89 02 mov %eax,(%edx) next->previous = current; 1104aa: 89 50 04 mov %edx,0x4(%eax) * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 1104ad: 8d 1c 30 lea (%eax,%esi,1),%ebx count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 1104b0: 49 dec %ecx 1104b1: 75 f1 jne 1104a4 <_Chain_Initialize+0x24> * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 1104b3: 8b 55 10 mov 0x10(%ebp),%edx 1104b6: 4a dec %edx 1104b7: 0f af d6 imul %esi,%edx 1104ba: 03 55 0c add 0xc(%ebp),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1104bd: 8d 47 04 lea 0x4(%edi),%eax 1104c0: 89 02 mov %eax,(%edx) current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); the_chain->last = current; 1104c2: 89 57 08 mov %edx,0x8(%edi) } 1104c5: 5b pop %ebx 1104c6: 5e pop %esi 1104c7: 5f pop %edi 1104c8: c9 leave 1104c9: c3 ret =============================================================================== 0010b0f8 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10b0f8: 55 push %ebp 10b0f9: 89 e5 mov %esp,%ebp 10b0fb: 57 push %edi 10b0fc: 56 push %esi 10b0fd: 53 push %ebx 10b0fe: 83 ec 2c sub $0x2c,%esp 10b101: 8b 45 08 mov 0x8(%ebp),%eax 10b104: 8b 4d 0c mov 0xc(%ebp),%ecx 10b107: 8b 55 10 mov 0x10(%ebp),%edx 10b10a: 89 55 dc mov %edx,-0x24(%ebp) 10b10d: 8b 7d 14 mov 0x14(%ebp),%edi rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 10b110: 8b 1d 78 66 12 00 mov 0x126678,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10b116: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10b11d: 8b b3 f0 00 00 00 mov 0xf0(%ebx),%esi _ISR_Disable( level ); 10b123: 9c pushf 10b124: fa cli 10b125: 8f 45 e0 popl -0x20(%ebp) pending_events = api->pending_events; 10b128: 8b 16 mov (%esi),%edx 10b12a: 89 55 d4 mov %edx,-0x2c(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10b12d: 21 c2 and %eax,%edx 10b12f: 89 55 e4 mov %edx,-0x1c(%ebp) 10b132: 74 0d je 10b141 <_Event_Seize+0x49> 10b134: 39 d0 cmp %edx,%eax 10b136: 0f 84 84 00 00 00 je 10b1c0 <_Event_Seize+0xc8> (seized_events == event_in || _Options_Is_any( option_set )) ) { 10b13c: f6 c1 02 test $0x2,%cl 10b13f: 75 7f jne 10b1c0 <_Event_Seize+0xc8> <== ALWAYS TAKEN _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10b141: f6 c1 01 test $0x1,%cl 10b144: 75 62 jne 10b1a8 <_Event_Seize+0xb0> * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; 10b146: 89 4b 30 mov %ecx,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10b149: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10b14c: 89 7b 28 mov %edi,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10b14f: c7 05 88 66 12 00 01 movl $0x1,0x126688 10b156: 00 00 00 _ISR_Enable( level ); 10b159: ff 75 e0 pushl -0x20(%ebp) 10b15c: 9d popf if ( ticks ) { 10b15d: 8b 45 dc mov -0x24(%ebp),%eax 10b160: 85 c0 test %eax,%eax 10b162: 0f 85 80 00 00 00 jne 10b1e8 <_Event_Seize+0xf0> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10b168: 83 ec 08 sub $0x8,%esp 10b16b: 68 00 01 00 00 push $0x100 10b170: 53 push %ebx 10b171: e8 7a 2d 00 00 call 10def0 <_Thread_Set_state> _ISR_Disable( level ); 10b176: 9c pushf 10b177: fa cli 10b178: 5a pop %edx sync_state = _Event_Sync_state; 10b179: a1 88 66 12 00 mov 0x126688,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10b17e: c7 05 88 66 12 00 00 movl $0x0,0x126688 10b185: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10b188: 83 c4 10 add $0x10,%esp 10b18b: 83 f8 01 cmp $0x1,%eax 10b18e: 74 4c je 10b1dc <_Event_Seize+0xe4> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 10b190: 89 55 10 mov %edx,0x10(%ebp) 10b193: 89 5d 0c mov %ebx,0xc(%ebp) 10b196: 89 45 08 mov %eax,0x8(%ebp) } 10b199: 8d 65 f4 lea -0xc(%ebp),%esp 10b19c: 5b pop %ebx 10b19d: 5e pop %esi 10b19e: 5f pop %edi 10b19f: 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 ); 10b1a0: e9 47 1f 00 00 jmp 10d0ec <_Thread_blocking_operation_Cancel> 10b1a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 10b1a8: ff 75 e0 pushl -0x20(%ebp) 10b1ab: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10b1ac: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10b1b3: 8b 55 e4 mov -0x1c(%ebp),%edx 10b1b6: 89 17 mov %edx,(%edi) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 10b1b8: 8d 65 f4 lea -0xc(%ebp),%esp 10b1bb: 5b pop %ebx 10b1bc: 5e pop %esi 10b1bd: 5f pop %edi 10b1be: c9 leave 10b1bf: c3 ret RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) { return ( the_event_set & ~(the_mask) ); 10b1c0: 8b 45 e4 mov -0x1c(%ebp),%eax 10b1c3: f7 d0 not %eax 10b1c5: 23 45 d4 and -0x2c(%ebp),%eax 10b1c8: 89 06 mov %eax,(%esi) if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 10b1ca: ff 75 e0 pushl -0x20(%ebp) 10b1cd: 9d popf *event_out = seized_events; 10b1ce: 8b 45 e4 mov -0x1c(%ebp),%eax 10b1d1: 89 07 mov %eax,(%edi) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 10b1d3: 8d 65 f4 lea -0xc(%ebp),%esp 10b1d6: 5b pop %ebx 10b1d7: 5e pop %esi 10b1d8: 5f pop %edi 10b1d9: c9 leave 10b1da: c3 ret 10b1db: 90 nop <== NOT EXECUTED _ISR_Disable( level ); sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { _ISR_Enable( level ); 10b1dc: 52 push %edx 10b1dd: 9d popf * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 10b1de: 8d 65 f4 lea -0xc(%ebp),%esp 10b1e1: 5b pop %ebx 10b1e2: 5e pop %esi 10b1e3: 5f pop %edi 10b1e4: c9 leave 10b1e5: c3 ret 10b1e6: 66 90 xchg %ax,%ax <== NOT EXECUTED _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 10b1e8: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b1eb: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10b1f2: c7 43 64 9c b3 10 00 movl $0x10b39c,0x64(%ebx) the_watchdog->id = id; 10b1f9: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10b1fc: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b203: 8b 45 dc mov -0x24(%ebp),%eax 10b206: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b209: 83 ec 08 sub $0x8,%esp &executing->Timer, _Event_Timeout, executing->Object.id, NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); 10b20c: 8d 43 48 lea 0x48(%ebx),%eax 10b20f: 50 push %eax 10b210: 68 a4 64 12 00 push $0x1264a4 10b215: e8 3e 33 00 00 call 10e558 <_Watchdog_Insert> 10b21a: 83 c4 10 add $0x10,%esp 10b21d: e9 46 ff ff ff jmp 10b168 <_Event_Seize+0x70> =============================================================================== 0010b278 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10b278: 55 push %ebp 10b279: 89 e5 mov %esp,%ebp 10b27b: 57 push %edi 10b27c: 56 push %esi 10b27d: 53 push %ebx 10b27e: 83 ec 2c sub $0x2c,%esp 10b281: 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 ]; 10b284: 8b 8b f0 00 00 00 mov 0xf0(%ebx),%ecx option_set = (rtems_option) the_thread->Wait.option; 10b28a: 8b 7b 30 mov 0x30(%ebx),%edi _ISR_Disable( level ); 10b28d: 9c pushf 10b28e: fa cli 10b28f: 8f 45 d4 popl -0x2c(%ebp) pending_events = api->pending_events; 10b292: 8b 11 mov (%ecx),%edx event_condition = (rtems_event_set) the_thread->Wait.count; 10b294: 8b 43 24 mov 0x24(%ebx),%eax seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 10b297: 89 c6 mov %eax,%esi 10b299: 21 d6 and %edx,%esi 10b29b: 89 75 e4 mov %esi,-0x1c(%ebp) 10b29e: 74 74 je 10b314 <_Event_Surrender+0x9c> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 10b2a0: 8b 35 74 66 12 00 mov 0x126674,%esi 10b2a6: 85 f6 test %esi,%esi 10b2a8: 74 0c je 10b2b6 <_Event_Surrender+0x3e> 10b2aa: 3b 1d 78 66 12 00 cmp 0x126678,%ebx 10b2b0: 0f 84 96 00 00 00 je 10b34c <_Event_Surrender+0xd4> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10b2b6: f6 43 11 01 testb $0x1,0x11(%ebx) 10b2ba: 74 4c je 10b308 <_Event_Surrender+0x90> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 10b2bc: 3b 45 e4 cmp -0x1c(%ebp),%eax 10b2bf: 74 05 je 10b2c6 <_Event_Surrender+0x4e> 10b2c1: 83 e7 02 and $0x2,%edi 10b2c4: 74 42 je 10b308 <_Event_Surrender+0x90> <== NEVER TAKEN RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) { return ( the_event_set & ~(the_mask) ); 10b2c6: 8b 45 e4 mov -0x1c(%ebp),%eax 10b2c9: f7 d0 not %eax 10b2cb: 21 d0 and %edx,%eax 10b2cd: 89 01 mov %eax,(%ecx) api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 10b2cf: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b2d6: 8b 43 28 mov 0x28(%ebx),%eax 10b2d9: 8b 75 e4 mov -0x1c(%ebp),%esi 10b2dc: 89 30 mov %esi,(%eax) _ISR_Flash( level ); 10b2de: ff 75 d4 pushl -0x2c(%ebp) 10b2e1: 9d popf 10b2e2: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10b2e3: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b2e7: 74 37 je 10b320 <_Event_Surrender+0xa8> _ISR_Enable( level ); 10b2e9: ff 75 d4 pushl -0x2c(%ebp) 10b2ec: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b2ed: 83 ec 08 sub $0x8,%esp 10b2f0: 68 f8 ff 03 10 push $0x1003fff8 10b2f5: 53 push %ebx 10b2f6: e8 7d 1f 00 00 call 10d278 <_Thread_Clear_state> 10b2fb: 83 c4 10 add $0x10,%esp } return; } } _ISR_Enable( level ); } 10b2fe: 8d 65 f4 lea -0xc(%ebp),%esp 10b301: 5b pop %ebx 10b302: 5e pop %esi 10b303: 5f pop %edi 10b304: c9 leave 10b305: c3 ret 10b306: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10b308: ff 75 d4 pushl -0x2c(%ebp) 10b30b: 9d popf } 10b30c: 8d 65 f4 lea -0xc(%ebp),%esp 10b30f: 5b pop %ebx 10b310: 5e pop %esi 10b311: 5f pop %edi 10b312: c9 leave 10b313: c3 ret /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 10b314: ff 75 d4 pushl -0x2c(%ebp) 10b317: 9d popf } return; } } _ISR_Enable( level ); } 10b318: 8d 65 f4 lea -0xc(%ebp),%esp 10b31b: 5b pop %ebx 10b31c: 5e pop %esi 10b31d: 5f pop %edi 10b31e: c9 leave 10b31f: c3 ret RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10b320: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10b327: ff 75 d4 pushl -0x2c(%ebp) 10b32a: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10b32b: 83 ec 0c sub $0xc,%esp 10b32e: 8d 43 48 lea 0x48(%ebx),%eax 10b331: 50 push %eax 10b332: e8 59 33 00 00 call 10e690 <_Watchdog_Remove> 10b337: 58 pop %eax 10b338: 5a pop %edx 10b339: 68 f8 ff 03 10 push $0x1003fff8 10b33e: 53 push %ebx 10b33f: e8 34 1f 00 00 call 10d278 <_Thread_Clear_state> 10b344: 83 c4 10 add $0x10,%esp 10b347: eb c3 jmp 10b30c <_Event_Surrender+0x94> 10b349: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 10b34c: 8b 35 88 66 12 00 mov 0x126688,%esi /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && 10b352: 83 fe 02 cmp $0x2,%esi 10b355: 74 0d je 10b364 <_Event_Surrender+0xec> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 10b357: 8b 35 88 66 12 00 mov 0x126688,%esi * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 10b35d: 4e dec %esi 10b35e: 0f 85 52 ff ff ff jne 10b2b6 <_Event_Surrender+0x3e> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 10b364: 3b 45 e4 cmp -0x1c(%ebp),%eax 10b367: 74 05 je 10b36e <_Event_Surrender+0xf6> 10b369: 83 e7 02 and $0x2,%edi 10b36c: 74 22 je 10b390 <_Event_Surrender+0x118><== NEVER TAKEN 10b36e: 8b 45 e4 mov -0x1c(%ebp),%eax 10b371: f7 d0 not %eax 10b373: 21 d0 and %edx,%eax 10b375: 89 01 mov %eax,(%ecx) api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 10b377: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b37e: 8b 43 28 mov 0x28(%ebx),%eax 10b381: 8b 55 e4 mov -0x1c(%ebp),%edx 10b384: 89 10 mov %edx,(%eax) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10b386: c7 05 88 66 12 00 03 movl $0x3,0x126688 10b38d: 00 00 00 } _ISR_Enable( level ); 10b390: ff 75 d4 pushl -0x2c(%ebp) 10b393: 9d popf return; 10b394: e9 73 ff ff ff jmp 10b30c <_Event_Surrender+0x94> =============================================================================== 0010b39c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10b39c: 55 push %ebp 10b39d: 89 e5 mov %esp,%ebp 10b39f: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10b3a2: 8d 45 f4 lea -0xc(%ebp),%eax 10b3a5: 50 push %eax 10b3a6: ff 75 08 pushl 0x8(%ebp) 10b3a9: e8 b2 22 00 00 call 10d660 <_Thread_Get> switch ( location ) { 10b3ae: 83 c4 10 add $0x10,%esp 10b3b1: 8b 55 f4 mov -0xc(%ebp),%edx 10b3b4: 85 d2 test %edx,%edx 10b3b6: 75 37 jne 10b3ef <_Event_Timeout+0x53> <== NEVER TAKEN * * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 10b3b8: 9c pushf 10b3b9: fa cli 10b3ba: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10b3bb: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10b3c2: 3b 05 78 66 12 00 cmp 0x126678,%eax 10b3c8: 74 2a je 10b3f4 <_Event_Timeout+0x58> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 10b3ca: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10b3d1: 52 push %edx 10b3d2: 9d popf 10b3d3: 83 ec 08 sub $0x8,%esp 10b3d6: 68 f8 ff 03 10 push $0x1003fff8 10b3db: 50 push %eax 10b3dc: e8 97 1e 00 00 call 10d278 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b3e1: a1 d4 63 12 00 mov 0x1263d4,%eax 10b3e6: 48 dec %eax 10b3e7: a3 d4 63 12 00 mov %eax,0x1263d4 _Thread_Unblock( the_thread ); _Thread_Unnest_dispatch(); break; 10b3ec: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b3ef: c9 leave 10b3f0: c3 ret 10b3f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10b3f4: 8b 0d 88 66 12 00 mov 0x126688,%ecx 10b3fa: 49 dec %ecx 10b3fb: 75 cd jne 10b3ca <_Event_Timeout+0x2e> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10b3fd: c7 05 88 66 12 00 02 movl $0x2,0x126688 10b404: 00 00 00 10b407: eb c1 jmp 10b3ca <_Event_Timeout+0x2e> =============================================================================== 00110674 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 110674: 55 push %ebp 110675: 89 e5 mov %esp,%ebp 110677: 57 push %edi 110678: 56 push %esi 110679: 53 push %ebx 11067a: 83 ec 2c sub $0x2c,%esp 11067d: 8b 7d 0c mov 0xc(%ebp),%edi if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 110680: 8b 45 08 mov 0x8(%ebp),%eax 110683: 8b 48 08 mov 0x8(%eax),%ecx ) { Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE 110686: 8d 57 04 lea 0x4(%edi),%edx 110689: 89 55 dc mov %edx,-0x24(%ebp) - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; 11068c: 8b 40 10 mov 0x10(%eax),%eax 11068f: 89 45 cc mov %eax,-0x34(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 110692: 39 d7 cmp %edx,%edi 110694: 0f 87 5a 01 00 00 ja 1107f4 <_Heap_Allocate_aligned_with_boundary+0x180> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 11069a: 8b 75 14 mov 0x14(%ebp),%esi 11069d: 85 f6 test %esi,%esi 11069f: 0f 85 48 01 00 00 jne 1107ed <_Heap_Allocate_aligned_with_boundary+0x179> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 1106a5: 39 4d 08 cmp %ecx,0x8(%ebp) 1106a8: 0f 84 46 01 00 00 je 1107f4 <_Heap_Allocate_aligned_with_boundary+0x180> 1106ae: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 1106b5: 8b 45 cc mov -0x34(%ebp),%eax 1106b8: 83 c0 07 add $0x7,%eax 1106bb: 89 45 c8 mov %eax,-0x38(%ebp) + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; 1106be: c7 45 d0 04 00 00 00 movl $0x4,-0x30(%ebp) 1106c5: 29 7d d0 sub %edi,-0x30(%ebp) 1106c8: eb 19 jmp 1106e3 <_Heap_Allocate_aligned_with_boundary+0x6f> 1106ca: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 1106cc: 8d 59 08 lea 0x8(%ecx),%ebx boundary ); } } if ( alloc_begin != 0 ) { 1106cf: 85 db test %ebx,%ebx 1106d1: 0f 85 e9 00 00 00 jne 1107c0 <_Heap_Allocate_aligned_with_boundary+0x14c><== ALWAYS TAKEN break; } block = block->next; 1106d7: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 1106da: 39 4d 08 cmp %ecx,0x8(%ebp) 1106dd: 0f 84 1d 01 00 00 je 110800 <_Heap_Allocate_aligned_with_boundary+0x18c> _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 1106e3: ff 45 e4 incl -0x1c(%ebp) /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 1106e6: 8b 59 04 mov 0x4(%ecx),%ebx 1106e9: 39 5d dc cmp %ebx,-0x24(%ebp) 1106ec: 73 e9 jae 1106d7 <_Heap_Allocate_aligned_with_boundary+0x63> if ( alignment == 0 ) { 1106ee: 8b 55 10 mov 0x10(%ebp),%edx 1106f1: 85 d2 test %edx,%edx 1106f3: 74 d7 je 1106cc <_Heap_Allocate_aligned_with_boundary+0x58> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 1106f5: 8b 55 08 mov 0x8(%ebp),%edx 1106f8: 8b 52 14 mov 0x14(%edx),%edx 1106fb: 89 55 d8 mov %edx,-0x28(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 1106fe: 83 e3 fe and $0xfffffffe,%ebx uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 110701: 8d 1c 19 lea (%ecx,%ebx,1),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 110704: 8d 41 08 lea 0x8(%ecx),%eax 110707: 89 45 d4 mov %eax,-0x2c(%ebp) uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 11070a: 8b 75 c8 mov -0x38(%ebp),%esi 11070d: 29 d6 sub %edx,%esi uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 11070f: 01 de add %ebx,%esi + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 110711: 03 5d d0 add -0x30(%ebp),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 110714: 89 d8 mov %ebx,%eax 110716: 31 d2 xor %edx,%edx 110718: f7 75 10 divl 0x10(%ebp) 11071b: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { 11071d: 39 de cmp %ebx,%esi 11071f: 73 0b jae 11072c <_Heap_Allocate_aligned_with_boundary+0xb8> 110721: 89 f0 mov %esi,%eax 110723: 31 d2 xor %edx,%edx 110725: f7 75 10 divl 0x10(%ebp) 110728: 89 f3 mov %esi,%ebx 11072a: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 11072c: 8b 45 14 mov 0x14(%ebp),%eax 11072f: 85 c0 test %eax,%eax 110731: 74 57 je 11078a <_Heap_Allocate_aligned_with_boundary+0x116> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 110733: 8d 34 3b lea (%ebx,%edi,1),%esi 110736: 89 f0 mov %esi,%eax 110738: 31 d2 xor %edx,%edx 11073a: f7 75 14 divl 0x14(%ebp) 11073d: 89 f0 mov %esi,%eax 11073f: 29 d0 sub %edx,%eax /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 110741: 39 c3 cmp %eax,%ebx 110743: 73 45 jae 11078a <_Heap_Allocate_aligned_with_boundary+0x116> 110745: 39 c6 cmp %eax,%esi 110747: 76 41 jbe 11078a <_Heap_Allocate_aligned_with_boundary+0x116> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 110749: 8b 55 d4 mov -0x2c(%ebp),%edx 11074c: 01 fa add %edi,%edx 11074e: 89 55 e0 mov %edx,-0x20(%ebp) uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 110751: 39 c2 cmp %eax,%edx 110753: 77 82 ja 1106d7 <_Heap_Allocate_aligned_with_boundary+0x63> 110755: 89 ce mov %ecx,%esi 110757: eb 10 jmp 110769 <_Heap_Allocate_aligned_with_boundary+0xf5> 110759: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 11075c: 39 c1 cmp %eax,%ecx 11075e: 76 28 jbe 110788 <_Heap_Allocate_aligned_with_boundary+0x114> if ( boundary_line < boundary_floor ) { 110760: 39 45 e0 cmp %eax,-0x20(%ebp) 110763: 0f 87 9b 00 00 00 ja 110804 <_Heap_Allocate_aligned_with_boundary+0x190><== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; 110769: 89 c3 mov %eax,%ebx 11076b: 29 fb sub %edi,%ebx 11076d: 89 d8 mov %ebx,%eax 11076f: 31 d2 xor %edx,%edx 110771: f7 75 10 divl 0x10(%ebp) 110774: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 110776: 8d 0c 3b lea (%ebx,%edi,1),%ecx 110779: 89 c8 mov %ecx,%eax 11077b: 31 d2 xor %edx,%edx 11077d: f7 75 14 divl 0x14(%ebp) 110780: 89 c8 mov %ecx,%eax 110782: 29 d0 sub %edx,%eax /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 110784: 39 c3 cmp %eax,%ebx 110786: 72 d4 jb 11075c <_Heap_Allocate_aligned_with_boundary+0xe8> 110788: 89 f1 mov %esi,%ecx boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 11078a: 39 5d d4 cmp %ebx,-0x2c(%ebp) 11078d: 0f 87 44 ff ff ff ja 1106d7 <_Heap_Allocate_aligned_with_boundary+0x63> 110793: be f8 ff ff ff mov $0xfffffff8,%esi 110798: 29 ce sub %ecx,%esi uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 11079a: 01 de add %ebx,%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 11079c: 89 d8 mov %ebx,%eax 11079e: 31 d2 xor %edx,%edx 1107a0: f7 75 cc divl -0x34(%ebp) uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; 1107a3: 29 d6 sub %edx,%esi if ( free_size >= min_block_size || free_size == 0 ) { 1107a5: 39 75 d8 cmp %esi,-0x28(%ebp) 1107a8: 0f 86 21 ff ff ff jbe 1106cf <_Heap_Allocate_aligned_with_boundary+0x5b> 1107ae: 85 f6 test %esi,%esi 1107b0: 0f 85 21 ff ff ff jne 1106d7 <_Heap_Allocate_aligned_with_boundary+0x63> boundary ); } } if ( alloc_begin != 0 ) { 1107b6: 85 db test %ebx,%ebx 1107b8: 0f 84 19 ff ff ff je 1106d7 <_Heap_Allocate_aligned_with_boundary+0x63><== NEVER TAKEN 1107be: 66 90 xchg %ax,%ax block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 1107c0: 8b 55 e4 mov -0x1c(%ebp),%edx 1107c3: 8b 45 08 mov 0x8(%ebp),%eax 1107c6: 01 50 4c add %edx,0x4c(%eax) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 1107c9: 57 push %edi 1107ca: 53 push %ebx 1107cb: 51 push %ecx 1107cc: 50 push %eax 1107cd: e8 d2 bf ff ff call 10c7a4 <_Heap_Block_allocate> 1107d2: 89 d8 mov %ebx,%eax 1107d4: 83 c4 10 add $0x10,%esp boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 1107d7: 8b 55 e4 mov -0x1c(%ebp),%edx 1107da: 8b 4d 08 mov 0x8(%ebp),%ecx 1107dd: 39 51 44 cmp %edx,0x44(%ecx) 1107e0: 73 14 jae 1107f6 <_Heap_Allocate_aligned_with_boundary+0x182> stats->max_search = search_count; 1107e2: 89 51 44 mov %edx,0x44(%ecx) } return (void *) alloc_begin; } 1107e5: 8d 65 f4 lea -0xc(%ebp),%esp 1107e8: 5b pop %ebx 1107e9: 5e pop %esi 1107ea: 5f pop %edi 1107eb: c9 leave 1107ec: c3 ret /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 1107ed: 3b 7d 14 cmp 0x14(%ebp),%edi 1107f0: 76 19 jbe 11080b <_Heap_Allocate_aligned_with_boundary+0x197> 1107f2: 66 90 xchg %ax,%ax if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 1107f4: 31 c0 xor %eax,%eax if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 1107f6: 8d 65 f4 lea -0xc(%ebp),%esp 1107f9: 5b pop %ebx 1107fa: 5e pop %esi 1107fb: 5f pop %edi 1107fc: c9 leave 1107fd: c3 ret 1107fe: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 110800: 31 c0 xor %eax,%eax 110802: eb d3 jmp 1107d7 <_Heap_Allocate_aligned_with_boundary+0x163> 110804: 89 f1 mov %esi,%ecx <== NOT EXECUTED 110806: e9 cc fe ff ff jmp 1106d7 <_Heap_Allocate_aligned_with_boundary+0x63><== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 11080b: 8b 5d 10 mov 0x10(%ebp),%ebx 11080e: 85 db test %ebx,%ebx 110810: 0f 85 8f fe ff ff jne 1106a5 <_Heap_Allocate_aligned_with_boundary+0x31> alignment = page_size; 110816: 89 45 10 mov %eax,0x10(%ebp) 110819: e9 87 fe ff ff jmp 1106a5 <_Heap_Allocate_aligned_with_boundary+0x31> =============================================================================== 0010c6c4 <_Heap_Block_split>: Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 10c6c4: 55 push %ebp 10c6c5: 89 e5 mov %esp,%ebp 10c6c7: 57 push %edi 10c6c8: 56 push %esi 10c6c9: 53 push %ebx 10c6ca: 83 ec 14 sub $0x14,%esp 10c6cd: 8b 4d 08 mov 0x8(%ebp),%ecx 10c6d0: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; 10c6d3: 8b 79 10 mov 0x10(%ecx),%edi uintptr_t const min_block_size = heap->min_block_size; 10c6d6: 8b 41 14 mov 0x14(%ecx),%eax 10c6d9: 89 45 e8 mov %eax,-0x18(%ebp) if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; } return block; } 10c6dc: 8b 43 04 mov 0x4(%ebx),%eax 10c6df: 89 45 e4 mov %eax,-0x1c(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10c6e2: 89 c6 mov %eax,%esi 10c6e4: 83 e6 fe and $0xfffffffe,%esi { Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE; 10c6e7: 8b 55 e8 mov -0x18(%ebp),%edx 10c6ea: 83 ea 08 sub $0x8,%edx return heap->stats.size; } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Max( uintptr_t a, uintptr_t b ) { return a > b ? a : b; 10c6ed: 8b 45 14 mov 0x14(%ebp),%eax 10c6f0: 39 d0 cmp %edx,%eax 10c6f2: 73 02 jae 10c6f6 <_Heap_Block_split+0x32> 10c6f4: 89 d0 mov %edx,%eax uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const used_size = 10c6f6: 83 c0 08 add $0x8,%eax 10c6f9: 89 45 f0 mov %eax,-0x10(%ebp) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10c6fc: 31 d2 xor %edx,%edx 10c6fe: f7 f7 div %edi if ( remainder != 0 ) { 10c700: 85 d2 test %edx,%edx 10c702: 74 70 je 10c774 <_Heap_Block_split+0xb0> return value - remainder + alignment; 10c704: 03 7d f0 add -0x10(%ebp),%edi 10c707: 29 d7 sub %edx,%edi 10c709: 89 7d ec mov %edi,-0x14(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c70c: 8d 04 33 lea (%ebx,%esi,1),%eax 10c70f: 89 45 e0 mov %eax,-0x20(%ebp) _Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE; uintptr_t const used_block_size = _Heap_Align_up( used_size, page_size ); uintptr_t const free_size = block_size + HEAP_BLOCK_SIZE_OFFSET - used_size; 10c712: 8d 56 04 lea 0x4(%esi),%edx 10c715: 2b 55 f0 sub -0x10(%ebp),%edx uintptr_t const free_size_limit = min_block_size + HEAP_BLOCK_SIZE_OFFSET; 10c718: 8b 7d e8 mov -0x18(%ebp),%edi 10c71b: 83 c7 04 add $0x4,%edi Heap_Block *next_block = _Heap_Block_at( block, block_size ); _HAssert( used_size <= block_size + HEAP_BLOCK_SIZE_OFFSET ); _HAssert( used_size + free_size == block_size + HEAP_BLOCK_SIZE_OFFSET ); if ( free_size >= free_size_limit ) { 10c71e: 39 fa cmp %edi,%edx 10c720: 72 5a jb 10c77c <_Heap_Block_split+0xb8> 10c722: 8b 55 ec mov -0x14(%ebp),%edx 10c725: 01 da add %ebx,%edx Heap_Block *const free_block = _Heap_Block_at( block, used_block_size ); uintptr_t free_block_size = block_size - used_block_size; 10c727: 2b 75 ec sub -0x14(%ebp),%esi RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 10c72a: 8b 7d e4 mov -0x1c(%ebp),%edi 10c72d: 83 e7 01 and $0x1,%edi block->size_and_flag = size | flag; 10c730: 0b 7d ec or -0x14(%ebp),%edi 10c733: 89 7b 04 mov %edi,0x4(%ebx) _HAssert( used_block_size + free_block_size == block_size ); _Heap_Block_set_size( block, used_block_size ); /* Statistics */ stats->free_size += free_block_size; 10c736: 01 71 30 add %esi,0x30(%ecx) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10c739: 8b 58 04 mov 0x4(%eax),%ebx 10c73c: 83 e3 fe and $0xfffffffe,%ebx if ( _Heap_Is_used( next_block ) ) { 10c73f: f6 44 18 04 01 testb $0x1,0x4(%eax,%ebx,1) 10c744: 75 46 jne 10c78c <_Heap_Block_split+0xc8> if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; } return block; } 10c746: 8b 48 08 mov 0x8(%eax),%ecx 10c749: 8b 40 0c mov 0xc(%eax),%eax ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 10c74c: 89 4a 08 mov %ecx,0x8(%edx) new_block->prev = prev; 10c74f: 89 42 0c mov %eax,0xc(%edx) next->prev = new_block; 10c752: 89 51 0c mov %edx,0xc(%ecx) prev->next = new_block; 10c755: 89 50 08 mov %edx,0x8(%eax) } else { uintptr_t const next_block_size = _Heap_Block_size( next_block ); _Heap_Free_list_replace( next_block, free_block ); free_block_size += next_block_size; 10c758: 01 de add %ebx,%esi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c75a: 8d 04 16 lea (%esi,%edx,1),%eax next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; 10c75d: 89 f1 mov %esi,%ecx 10c75f: 83 c9 01 or $0x1,%ecx 10c762: 89 4a 04 mov %ecx,0x4(%edx) next_block->prev_size = free_block_size; 10c765: 89 30 mov %esi,(%eax) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10c767: 83 60 04 fe andl $0xfffffffe,0x4(%eax) } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; } } 10c76b: 83 c4 14 add $0x14,%esp 10c76e: 5b pop %ebx 10c76f: 5e pop %esi 10c770: 5f pop %edi 10c771: c9 leave 10c772: c3 ret 10c773: 90 nop <== NOT EXECUTED uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; } else { return value; 10c774: 8b 7d f0 mov -0x10(%ebp),%edi 10c777: 89 7d ec mov %edi,-0x14(%ebp) 10c77a: eb 90 jmp 10c70c <_Heap_Block_split+0x48> free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 10c77c: 8b 45 e0 mov -0x20(%ebp),%eax 10c77f: 83 48 04 01 orl $0x1,0x4(%eax) } } 10c783: 83 c4 14 add $0x14,%esp 10c786: 5b pop %ebx 10c787: 5e pop %esi 10c788: 5f pop %edi 10c789: c9 leave 10c78a: c3 ret 10c78b: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10c78c: 8b 7d 10 mov 0x10(%ebp),%edi 10c78f: 8b 5f 08 mov 0x8(%edi),%ebx new_block->next = next; 10c792: 89 5a 08 mov %ebx,0x8(%edx) new_block->prev = block_before; 10c795: 89 7a 0c mov %edi,0xc(%edx) block_before->next = new_block; 10c798: 89 57 08 mov %edx,0x8(%edi) next->prev = new_block; 10c79b: 89 53 0c mov %edx,0xc(%ebx) if ( _Heap_Is_used( next_block ) ) { _Heap_Free_list_insert_after( free_list_anchor, free_block ); /* Statistics */ ++stats->free_blocks; 10c79e: ff 41 38 incl 0x38(%ecx) 10c7a1: eb ba jmp 10c75d <_Heap_Block_split+0x99> =============================================================================== 00110bdc <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 110bdc: 55 push %ebp 110bdd: 89 e5 mov %esp,%ebp 110bdf: 57 push %edi 110be0: 56 push %esi 110be1: 53 push %ebx 110be2: 83 ec 4c sub $0x4c,%esp 110be5: 8b 5d 08 mov 0x8(%ebp),%ebx 110be8: 8b 4d 10 mov 0x10(%ebp),%ecx Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; 110beb: 8b 43 20 mov 0x20(%ebx),%eax 110bee: 89 45 d0 mov %eax,-0x30(%ebp) Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; 110bf1: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) Heap_Block *extend_last_block = NULL; 110bf8: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) uintptr_t const page_size = heap->page_size; 110bff: 8b 53 10 mov 0x10(%ebx),%edx 110c02: 89 55 d4 mov %edx,-0x2c(%ebp) uintptr_t const min_block_size = heap->min_block_size; 110c05: 8b 43 14 mov 0x14(%ebx),%eax uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; uintptr_t const free_size = stats->free_size; 110c08: 8b 73 30 mov 0x30(%ebx),%esi 110c0b: 89 75 c0 mov %esi,-0x40(%ebp) uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { 110c0e: 8b 55 0c mov 0xc(%ebp),%edx 110c11: 01 ca add %ecx,%edx 110c13: 89 55 cc mov %edx,-0x34(%ebp) 110c16: 73 0c jae 110c24 <_Heap_Extend+0x48> _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; 110c18: 31 c0 xor %eax,%eax if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 110c1a: 8d 65 f4 lea -0xc(%ebp),%esp 110c1d: 5b pop %ebx 110c1e: 5e pop %esi 110c1f: 5f pop %edi 110c20: c9 leave 110c21: c3 ret 110c22: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( extend_area_end < extend_area_begin ) { return false; } extend_area_ok = _Heap_Get_first_and_last_block( 110c24: 83 ec 08 sub $0x8,%esp 110c27: 8d 55 e0 lea -0x20(%ebp),%edx 110c2a: 52 push %edx 110c2b: 8d 55 e4 lea -0x1c(%ebp),%edx 110c2e: 52 push %edx 110c2f: 50 push %eax 110c30: ff 75 d4 pushl -0x2c(%ebp) 110c33: 51 push %ecx 110c34: ff 75 0c pushl 0xc(%ebp) 110c37: e8 64 bc ff ff call 10c8a0 <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 110c3c: 83 c4 20 add $0x20,%esp 110c3f: 84 c0 test %al,%al 110c41: 74 d5 je 110c18 <_Heap_Extend+0x3c> 110c43: 8b 7d d0 mov -0x30(%ebp),%edi 110c46: c7 45 bc 00 00 00 00 movl $0x0,-0x44(%ebp) 110c4d: c7 45 b8 00 00 00 00 movl $0x0,-0x48(%ebp) 110c54: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) 110c5b: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 110c62: 8b 75 cc mov -0x34(%ebp),%esi 110c65: 89 5d b4 mov %ebx,-0x4c(%ebp) 110c68: eb 30 jmp 110c9a <_Heap_Extend+0xbe> 110c6a: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( extend_area_end == sub_area_begin ) { merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 110c6c: 39 ce cmp %ecx,%esi 110c6e: 73 03 jae 110c73 <_Heap_Extend+0x97> 110c70: 89 7d b8 mov %edi,-0x48(%ebp) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 110c73: 8d 59 f8 lea -0x8(%ecx),%ebx 110c76: 89 c8 mov %ecx,%eax 110c78: 31 d2 xor %edx,%edx 110c7a: f7 75 d4 divl -0x2c(%ebp) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 110c7d: 29 d3 sub %edx,%ebx link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 110c7f: 3b 4d 0c cmp 0xc(%ebp),%ecx 110c82: 74 3c je 110cc0 <_Heap_Extend+0xe4> start_block->prev_size = extend_area_end; merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 110c84: 39 4d 0c cmp %ecx,0xc(%ebp) 110c87: 76 03 jbe 110c8c <_Heap_Extend+0xb0> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 110c89: 89 5d bc mov %ebx,-0x44(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 110c8c: 8b 7b 04 mov 0x4(%ebx),%edi 110c8f: 83 e7 fe and $0xfffffffe,%edi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 110c92: 8d 3c 3b lea (%ebx,%edi,1),%edi link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 110c95: 39 7d d0 cmp %edi,-0x30(%ebp) 110c98: 74 39 je 110cd3 <_Heap_Extend+0xf7> return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 110c9a: 3b 7d d0 cmp -0x30(%ebp),%edi 110c9d: 0f 84 35 01 00 00 je 110dd8 <_Heap_Extend+0x1fc> 110ca3: 89 f8 mov %edi,%eax uintptr_t const sub_area_end = start_block->prev_size; 110ca5: 8b 0f mov (%edi),%ecx Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 110ca7: 39 4d 0c cmp %ecx,0xc(%ebp) 110caa: 73 08 jae 110cb4 <_Heap_Extend+0xd8> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin 110cac: 39 f0 cmp %esi,%eax 110cae: 0f 82 64 ff ff ff jb 110c18 <_Heap_Extend+0x3c> ) { return false; } if ( extend_area_end == sub_area_begin ) { 110cb4: 39 f0 cmp %esi,%eax 110cb6: 75 b4 jne 110c6c <_Heap_Extend+0x90> 110cb8: 89 7d c4 mov %edi,-0x3c(%ebp) 110cbb: eb b6 jmp 110c73 <_Heap_Extend+0x97> 110cbd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } else if ( extend_area_end < sub_area_end ) { link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { start_block->prev_size = extend_area_end; 110cc0: 89 37 mov %esi,(%edi) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 110cc2: 89 5d c8 mov %ebx,-0x38(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 110cc5: 8b 7b 04 mov 0x4(%ebx),%edi 110cc8: 83 e7 fe and $0xfffffffe,%edi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 110ccb: 8d 3c 3b lea (%ebx,%edi,1),%edi } else if ( sub_area_end < extend_area_begin ) { link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 110cce: 39 7d d0 cmp %edi,-0x30(%ebp) 110cd1: 75 c7 jne 110c9a <_Heap_Extend+0xbe> <== NEVER TAKEN 110cd3: 8b 5d b4 mov -0x4c(%ebp),%ebx if ( extend_area_begin < heap->area_begin ) { 110cd6: 8b 75 0c mov 0xc(%ebp),%esi 110cd9: 3b 73 18 cmp 0x18(%ebx),%esi 110cdc: 0f 82 02 01 00 00 jb 110de4 <_Heap_Extend+0x208> heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { 110ce2: 8b 45 cc mov -0x34(%ebp),%eax 110ce5: 3b 43 1c cmp 0x1c(%ebx),%eax 110ce8: 76 03 jbe 110ced <_Heap_Extend+0x111> heap->area_end = extend_area_end; 110cea: 89 43 1c mov %eax,0x1c(%ebx) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 110ced: 8b 55 e0 mov -0x20(%ebp),%edx 110cf0: 8b 45 e4 mov -0x1c(%ebp),%eax heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 110cf3: 89 d1 mov %edx,%ecx 110cf5: 29 c1 sub %eax,%ecx (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 110cf7: 8b 75 cc mov -0x34(%ebp),%esi 110cfa: 89 30 mov %esi,(%eax) extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 110cfc: 89 ce mov %ecx,%esi 110cfe: 83 ce 01 or $0x1,%esi 110d01: 89 70 04 mov %esi,0x4(%eax) extend_last_block->prev_size = extend_first_block_size; 110d04: 89 0a mov %ecx,(%edx) extend_last_block->size_and_flag = 0; 110d06: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 110d0d: 39 43 20 cmp %eax,0x20(%ebx) 110d10: 0f 86 d6 00 00 00 jbe 110dec <_Heap_Extend+0x210> heap->first_block = extend_first_block; 110d16: 89 43 20 mov %eax,0x20(%ebx) } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { 110d19: 8b 75 c4 mov -0x3c(%ebp),%esi 110d1c: 85 f6 test %esi,%esi 110d1e: 0f 84 04 01 00 00 je 110e28 <_Heap_Extend+0x24c> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 110d24: 8b 73 10 mov 0x10(%ebx),%esi uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); 110d27: 8b 4d 0c mov 0xc(%ebp),%ecx 110d2a: 83 c1 08 add $0x8,%ecx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 110d2d: 89 c8 mov %ecx,%eax 110d2f: 31 d2 xor %edx,%edx 110d31: f7 f6 div %esi if ( remainder != 0 ) { 110d33: 85 d2 test %edx,%edx 110d35: 74 04 je 110d3b <_Heap_Extend+0x15f> <== ALWAYS TAKEN return value - remainder + alignment; 110d37: 01 f1 add %esi,%ecx <== NOT EXECUTED 110d39: 29 d1 sub %edx,%ecx <== NOT EXECUTED uintptr_t const new_first_block_begin = 110d3b: 8d 51 f8 lea -0x8(%ecx),%edx uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; 110d3e: 8b 75 c4 mov -0x3c(%ebp),%esi 110d41: 8b 06 mov (%esi),%eax 110d43: 89 41 f8 mov %eax,-0x8(%ecx) uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const new_first_block_begin = new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = 110d46: 89 f0 mov %esi,%eax 110d48: 29 d0 sub %edx,%eax first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; 110d4a: 83 c8 01 or $0x1,%eax 110d4d: 89 42 04 mov %eax,0x4(%edx) _Heap_Free_block( heap, new_first_block ); 110d50: 89 d8 mov %ebx,%eax 110d52: e8 69 fe ff ff call 110bc0 <_Heap_Free_block> link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 110d57: 8b 45 c8 mov -0x38(%ebp),%eax 110d5a: 85 c0 test %eax,%eax 110d5c: 0f 84 9e 00 00 00 je 110e00 <_Heap_Extend+0x224> ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE, 110d62: 8b 4d cc mov -0x34(%ebp),%ecx 110d65: 83 e9 08 sub $0x8,%ecx uintptr_t extend_area_end ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( 110d68: 2b 4d c8 sub -0x38(%ebp),%ecx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 110d6b: 89 c8 mov %ecx,%eax 110d6d: 31 d2 xor %edx,%edx 110d6f: f7 73 10 divl 0x10(%ebx) 110d72: 29 d1 sub %edx,%ecx ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) 110d74: 8b 55 c8 mov -0x38(%ebp),%edx 110d77: 8b 42 04 mov 0x4(%edx),%eax 110d7a: 29 c8 sub %ecx,%eax | HEAP_PREV_BLOCK_USED; 110d7c: 83 c8 01 or $0x1,%eax 110d7f: 89 44 11 04 mov %eax,0x4(%ecx,%edx,1) RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 110d83: 8b 42 04 mov 0x4(%edx),%eax 110d86: 83 e0 01 and $0x1,%eax block->size_and_flag = size | flag; 110d89: 09 c8 or %ecx,%eax 110d8b: 89 42 04 mov %eax,0x4(%edx) _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 110d8e: 89 d8 mov %ebx,%eax 110d90: e8 2b fe ff ff call 110bc0 <_Heap_Free_block> extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 110d95: 8b 75 c4 mov -0x3c(%ebp),%esi 110d98: 85 f6 test %esi,%esi 110d9a: 0f 84 a4 00 00 00 je 110e44 <_Heap_Extend+0x268> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 110da0: 8b 53 24 mov 0x24(%ebx),%edx * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( 110da3: 8b 43 20 mov 0x20(%ebx),%eax 110da6: 29 d0 sub %edx,%eax RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 110da8: 8b 4a 04 mov 0x4(%edx),%ecx 110dab: 83 e1 01 and $0x1,%ecx block->size_and_flag = size | flag; 110dae: 09 c8 or %ecx,%eax 110db0: 89 42 04 mov %eax,0x4(%edx) _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 110db3: 8b 43 30 mov 0x30(%ebx),%eax 110db6: 2b 45 c0 sub -0x40(%ebp),%eax /* Statistics */ stats->size += extended_size; 110db9: 01 43 2c add %eax,0x2c(%ebx) if ( extended_size_ptr != NULL ) 110dbc: 8b 55 14 mov 0x14(%ebp),%edx 110dbf: 85 d2 test %edx,%edx 110dc1: 0f 84 99 00 00 00 je 110e60 <_Heap_Extend+0x284> <== NEVER TAKEN *extended_size_ptr = extended_size; 110dc7: 8b 55 14 mov 0x14(%ebp),%edx 110dca: 89 02 mov %eax,(%edx) return true; 110dcc: b0 01 mov $0x1,%al } 110dce: 8d 65 f4 lea -0xc(%ebp),%esp 110dd1: 5b pop %ebx 110dd2: 5e pop %esi 110dd3: 5f pop %edi 110dd4: c9 leave 110dd5: c3 ret 110dd6: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 110dd8: 8b 55 b4 mov -0x4c(%ebp),%edx 110ddb: 8b 42 18 mov 0x18(%edx),%eax 110dde: e9 c2 fe ff ff jmp 110ca5 <_Heap_Extend+0xc9> 110de3: 90 nop <== NOT EXECUTED start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); if ( extend_area_begin < heap->area_begin ) { heap->area_begin = extend_area_begin; 110de4: 89 73 18 mov %esi,0x18(%ebx) 110de7: e9 01 ff ff ff jmp 110ced <_Heap_Extend+0x111> extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { heap->first_block = extend_first_block; } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 110dec: 39 53 24 cmp %edx,0x24(%ebx) 110def: 0f 83 24 ff ff ff jae 110d19 <_Heap_Extend+0x13d> heap->last_block = extend_last_block; 110df5: 89 53 24 mov %edx,0x24(%ebx) 110df8: e9 1c ff ff ff jmp 110d19 <_Heap_Extend+0x13d> 110dfd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 110e00: 8b 7d bc mov -0x44(%ebp),%edi 110e03: 85 ff test %edi,%edi 110e05: 74 8e je 110d95 <_Heap_Extend+0x1b9> _Heap_Link_above( 110e07: 8b 4d e0 mov -0x20(%ebp),%ecx ) { uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); 110e0a: 8b 45 e4 mov -0x1c(%ebp),%eax 110e0d: 2b 45 bc sub -0x44(%ebp),%eax RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 110e10: 8b 75 bc mov -0x44(%ebp),%esi 110e13: 8b 56 04 mov 0x4(%esi),%edx 110e16: 83 e2 01 and $0x1,%edx block->size_and_flag = size | flag; 110e19: 09 d0 or %edx,%eax 110e1b: 89 46 04 mov %eax,0x4(%esi) last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 110e1e: 83 49 04 01 orl $0x1,0x4(%ecx) 110e22: e9 6e ff ff ff jmp 110d95 <_Heap_Extend+0x1b9> 110e27: 90 nop <== NOT EXECUTED heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { _Heap_Merge_below( heap, extend_area_begin, merge_below_block ); } else if ( link_below_block != NULL ) { 110e28: 8b 4d b8 mov -0x48(%ebp),%ecx 110e2b: 85 c9 test %ecx,%ecx 110e2d: 0f 84 24 ff ff ff je 110d57 <_Heap_Extend+0x17b> { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = (link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED; 110e33: 8b 45 b8 mov -0x48(%ebp),%eax 110e36: 29 d0 sub %edx,%eax 110e38: 83 c8 01 or $0x1,%eax 110e3b: 89 42 04 mov %eax,0x4(%edx) 110e3e: e9 14 ff ff ff jmp 110d57 <_Heap_Extend+0x17b> 110e43: 90 nop <== NOT EXECUTED extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 110e44: 8b 4d c8 mov -0x38(%ebp),%ecx 110e47: 85 c9 test %ecx,%ecx 110e49: 0f 85 51 ff ff ff jne 110da0 <_Heap_Extend+0x1c4> _Heap_Free_block( heap, extend_first_block ); 110e4f: 8b 55 e4 mov -0x1c(%ebp),%edx 110e52: 89 d8 mov %ebx,%eax 110e54: e8 67 fd ff ff call 110bc0 <_Heap_Free_block> 110e59: e9 42 ff ff ff jmp 110da0 <_Heap_Extend+0x1c4> 110e5e: 66 90 xchg %ax,%ax <== NOT EXECUTED stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 110e60: b0 01 mov $0x1,%al <== NOT EXECUTED 110e62: e9 b3 fd ff ff jmp 110c1a <_Heap_Extend+0x3e> <== NOT EXECUTED =============================================================================== 00110820 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 110820: 55 push %ebp 110821: 89 e5 mov %esp,%ebp 110823: 57 push %edi 110824: 56 push %esi 110825: 53 push %ebx 110826: 83 ec 10 sub $0x10,%esp 110829: 8b 5d 08 mov 0x8(%ebp),%ebx 11082c: 8b 45 0c mov 0xc(%ebp),%eax 11082f: 8d 48 f8 lea -0x8(%eax),%ecx 110832: 31 d2 xor %edx,%edx 110834: f7 73 10 divl 0x10(%ebx) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 110837: 29 d1 sub %edx,%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 110839: 8b 43 20 mov 0x20(%ebx),%eax && (uintptr_t) block <= (uintptr_t) heap->last_block; 11083c: 39 c1 cmp %eax,%ecx 11083e: 72 07 jb 110847 <_Heap_Free+0x27> 110840: 8b 73 24 mov 0x24(%ebx),%esi 110843: 39 f1 cmp %esi,%ecx 110845: 76 0d jbe 110854 <_Heap_Free+0x34> /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { _HAssert( false ); return( false ); 110847: 31 c0 xor %eax,%eax --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 110849: 83 c4 10 add $0x10,%esp 11084c: 5b pop %ebx 11084d: 5e pop %esi 11084e: 5f pop %edi 11084f: c9 leave 110850: c3 ret 110851: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 110854: 8b 51 04 mov 0x4(%ecx),%edx 110857: 89 55 f0 mov %edx,-0x10(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 11085a: 83 e2 fe and $0xfffffffe,%edx 11085d: 89 55 ec mov %edx,-0x14(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 110860: 8d 14 11 lea (%ecx,%edx,1),%edx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 110863: 39 d0 cmp %edx,%eax 110865: 77 e0 ja 110847 <_Heap_Free+0x27> <== NEVER TAKEN 110867: 39 d6 cmp %edx,%esi 110869: 72 dc jb 110847 <_Heap_Free+0x27> <== NEVER TAKEN 11086b: 8b 7a 04 mov 0x4(%edx),%edi if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 11086e: f7 c7 01 00 00 00 test $0x1,%edi 110874: 74 d1 je 110847 <_Heap_Free+0x27> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 110876: 83 e7 fe and $0xfffffffe,%edi 110879: 89 7d e4 mov %edi,-0x1c(%ebp) return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 11087c: 39 d6 cmp %edx,%esi 11087e: 0f 84 c8 00 00 00 je 11094c <_Heap_Free+0x12c> #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 110884: f6 44 3a 04 01 testb $0x1,0x4(%edx,%edi,1) 110889: 0f 94 45 eb sete -0x15(%ebp) next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 11088d: f6 45 f0 01 testb $0x1,-0x10(%ebp) 110891: 75 45 jne 1108d8 <_Heap_Free+0xb8> uintptr_t const prev_size = block->prev_size; 110893: 8b 39 mov (%ecx),%edi 110895: 89 7d f0 mov %edi,-0x10(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 110898: 29 f9 sub %edi,%ecx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 11089a: 39 c8 cmp %ecx,%eax 11089c: 77 a9 ja 110847 <_Heap_Free+0x27> <== NEVER TAKEN 11089e: 39 ce cmp %ecx,%esi 1108a0: 72 a5 jb 110847 <_Heap_Free+0x27> <== 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) ) { 1108a2: f6 41 04 01 testb $0x1,0x4(%ecx) 1108a6: 74 9f je 110847 <_Heap_Free+0x27> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 1108a8: 80 7d eb 00 cmpb $0x0,-0x15(%ebp) 1108ac: 0f 84 a6 00 00 00 je 110958 <_Heap_Free+0x138> uintptr_t const size = block_size + prev_size + next_block_size; 1108b2: 8b 7d e4 mov -0x1c(%ebp),%edi 1108b5: 03 7d ec add -0x14(%ebp),%edi 1108b8: 03 7d f0 add -0x10(%ebp),%edi --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 1108bb: 8b 42 08 mov 0x8(%edx),%eax 1108be: 8b 52 0c mov 0xc(%edx),%edx RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 1108c1: 89 42 08 mov %eax,0x8(%edx) next->prev = prev; 1108c4: 89 50 0c mov %edx,0xc(%eax) } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 1108c7: ff 4b 38 decl 0x38(%ebx) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 1108ca: 89 f8 mov %edi,%eax 1108cc: 83 c8 01 or $0x1,%eax 1108cf: 89 41 04 mov %eax,0x4(%ecx) next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 1108d2: 89 3c 39 mov %edi,(%ecx,%edi,1) 1108d5: eb 2a jmp 110901 <_Heap_Free+0xe1> 1108d7: 90 nop <== NOT EXECUTED uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 1108d8: 80 7d eb 00 cmpb $0x0,-0x15(%ebp) 1108dc: 74 3a je 110918 <_Heap_Free+0xf8> uintptr_t const size = block_size + next_block_size; 1108de: 8b 7d e4 mov -0x1c(%ebp),%edi 1108e1: 03 7d ec add -0x14(%ebp),%edi --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 1108e4: 8b 42 08 mov 0x8(%edx),%eax 1108e7: 8b 52 0c mov 0xc(%edx),%edx ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 1108ea: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = prev; 1108ed: 89 51 0c mov %edx,0xc(%ecx) next->prev = new_block; 1108f0: 89 48 0c mov %ecx,0xc(%eax) prev->next = new_block; 1108f3: 89 4a 08 mov %ecx,0x8(%edx) next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 1108f6: 89 f8 mov %edi,%eax 1108f8: 83 c8 01 or $0x1,%eax 1108fb: 89 41 04 mov %eax,0x4(%ecx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 1108fe: 89 3c 39 mov %edi,(%ecx,%edi,1) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 110901: ff 4b 40 decl 0x40(%ebx) ++stats->frees; 110904: ff 43 50 incl 0x50(%ebx) stats->free_size += block_size; 110907: 8b 55 ec mov -0x14(%ebp),%edx 11090a: 01 53 30 add %edx,0x30(%ebx) return( true ); 11090d: b0 01 mov $0x1,%al } 11090f: 83 c4 10 add $0x10,%esp 110912: 5b pop %ebx 110913: 5e pop %esi 110914: 5f pop %edi 110915: c9 leave 110916: c3 ret 110917: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 110918: 8b 43 08 mov 0x8(%ebx),%eax new_block->next = next; 11091b: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = block_before; 11091e: 89 59 0c mov %ebx,0xc(%ecx) block_before->next = new_block; 110921: 89 4b 08 mov %ecx,0x8(%ebx) next->prev = new_block; 110924: 89 48 0c mov %ecx,0xc(%eax) next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 110927: 8b 45 ec mov -0x14(%ebp),%eax 11092a: 83 c8 01 or $0x1,%eax 11092d: 89 41 04 mov %eax,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 110930: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = block_size; 110934: 8b 45 ec mov -0x14(%ebp),%eax 110937: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->free_blocks; 110939: 8b 43 38 mov 0x38(%ebx),%eax 11093c: 40 inc %eax 11093d: 89 43 38 mov %eax,0x38(%ebx) if ( stats->max_free_blocks < stats->free_blocks ) { 110940: 3b 43 3c cmp 0x3c(%ebx),%eax 110943: 76 bc jbe 110901 <_Heap_Free+0xe1> stats->max_free_blocks = stats->free_blocks; 110945: 89 43 3c mov %eax,0x3c(%ebx) 110948: eb b7 jmp 110901 <_Heap_Free+0xe1> 11094a: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 11094c: c6 45 eb 00 movb $0x0,-0x15(%ebp) 110950: e9 38 ff ff ff jmp 11088d <_Heap_Free+0x6d> 110955: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; 110958: 8b 45 ec mov -0x14(%ebp),%eax 11095b: 03 45 f0 add -0x10(%ebp),%eax prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 11095e: 89 c6 mov %eax,%esi 110960: 83 ce 01 or $0x1,%esi 110963: 89 71 04 mov %esi,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 110966: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 11096a: 89 02 mov %eax,(%edx) 11096c: eb 93 jmp 110901 <_Heap_Free+0xe1> =============================================================================== 0010c540 <_Heap_Get_first_and_last_block>: uintptr_t page_size, uintptr_t min_block_size, Heap_Block **first_block_ptr, Heap_Block **last_block_ptr ) { 10c540: 55 push %ebp 10c541: 89 e5 mov %esp,%ebp 10c543: 57 push %edi 10c544: 56 push %esi 10c545: 53 push %ebx 10c546: 8b 5d 08 mov 0x8(%ebp),%ebx 10c549: 8b 7d 0c mov 0xc(%ebp),%edi uintptr_t const heap_area_end = heap_area_begin + heap_area_size; 10c54c: 8d 34 1f lea (%edi,%ebx,1),%esi uintptr_t const alloc_area_begin = _Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); 10c54f: 8d 4b 08 lea 0x8(%ebx),%ecx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10c552: 89 c8 mov %ecx,%eax 10c554: 31 d2 xor %edx,%edx 10c556: f7 75 10 divl 0x10(%ebp) if ( remainder != 0 ) { 10c559: 85 d2 test %edx,%edx 10c55b: 74 05 je 10c562 <_Heap_Get_first_and_last_block+0x22> return value - remainder + alignment; 10c55d: 03 4d 10 add 0x10(%ebp),%ecx 10c560: 29 d1 sub %edx,%ecx _Heap_Align_down( heap_area_size - overhead, page_size ); Heap_Block *const first_block = (Heap_Block *) first_block_begin; Heap_Block *const last_block = _Heap_Block_at( first_block, first_block_size ); if ( 10c562: 39 f3 cmp %esi,%ebx 10c564: 77 2e ja 10c594 <_Heap_Get_first_and_last_block+0x54> uintptr_t const alloc_area_begin = _Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); 10c566: 8d 71 f8 lea -0x8(%ecx),%esi uintptr_t const heap_area_end = heap_area_begin + heap_area_size; uintptr_t const alloc_area_begin = _Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const overhead = 10c569: 29 d9 sub %ebx,%ecx Heap_Block *const last_block = _Heap_Block_at( first_block, first_block_size ); if ( heap_area_end < heap_area_begin || heap_area_size <= overhead 10c56b: 39 cf cmp %ecx,%edi 10c56d: 76 25 jbe 10c594 <_Heap_Get_first_and_last_block+0x54> uintptr_t const first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); uintptr_t const first_block_size = _Heap_Align_down( heap_area_size - overhead, page_size ); 10c56f: 29 cf sub %ecx,%edi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10c571: 89 f8 mov %edi,%eax 10c573: 31 d2 xor %edx,%edx 10c575: f7 75 10 divl 0x10(%ebp) 10c578: 29 d7 sub %edx,%edi _Heap_Block_at( first_block, first_block_size ); if ( heap_area_end < heap_area_begin || heap_area_size <= overhead || first_block_size < min_block_size 10c57a: 39 7d 14 cmp %edi,0x14(%ebp) 10c57d: 77 15 ja 10c594 <_Heap_Get_first_and_last_block+0x54> ) { /* Invalid area or area too small */ return false; } *first_block_ptr = first_block; 10c57f: 8b 45 18 mov 0x18(%ebp),%eax 10c582: 89 30 mov %esi,(%eax) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c584: 01 f7 add %esi,%edi 10c586: 8b 45 1c mov 0x1c(%ebp),%eax 10c589: 89 38 mov %edi,(%eax) *last_block_ptr = last_block; return true; 10c58b: b0 01 mov $0x1,%al } 10c58d: 5b pop %ebx 10c58e: 5e pop %esi 10c58f: 5f pop %edi 10c590: c9 leave 10c591: c3 ret 10c592: 66 90 xchg %ax,%ax <== NOT EXECUTED heap_area_end < heap_area_begin || heap_area_size <= overhead || first_block_size < min_block_size ) { /* Invalid area or area too small */ return false; 10c594: 31 c0 xor %eax,%eax *first_block_ptr = first_block; *last_block_ptr = last_block; return true; } 10c596: 5b pop %ebx 10c597: 5e pop %esi 10c598: 5f pop %edi 10c599: c9 leave 10c59a: c3 ret =============================================================================== 001144e4 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 1144e4: 55 push %ebp 1144e5: 89 e5 mov %esp,%ebp 1144e7: 57 push %edi 1144e8: 56 push %esi 1144e9: 53 push %ebx 1144ea: 8b 7d 0c mov 0xc(%ebp),%edi Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 1144ed: c7 07 00 00 00 00 movl $0x0,(%edi) info->largest = 0; 1144f3: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) info->total = 0; 1144fa: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 114501: 8b 45 08 mov 0x8(%ebp),%eax 114504: 8b 50 08 mov 0x8(%eax),%edx info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 114507: 39 d0 cmp %edx,%eax 114509: 74 31 je 11453c <_Heap_Get_free_information+0x58> 11450b: bb 01 00 00 00 mov $0x1,%ebx 114510: 31 f6 xor %esi,%esi 114512: 31 c9 xor %ecx,%ecx 114514: eb 07 jmp 11451d <_Heap_Get_free_information+0x39> 114516: 66 90 xchg %ax,%ax <== NOT EXECUTED 114518: 8b 77 04 mov 0x4(%edi),%esi 11451b: 89 c3 mov %eax,%ebx - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 11451d: 8b 42 04 mov 0x4(%edx),%eax 114520: 83 e0 fe and $0xfffffffe,%eax /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; info->total += the_size; 114523: 01 c1 add %eax,%ecx if ( info->largest < the_size ) 114525: 39 f0 cmp %esi,%eax 114527: 76 03 jbe 11452c <_Heap_Get_free_information+0x48> info->largest = the_size; 114529: 89 47 04 mov %eax,0x4(%edi) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 11452c: 8b 52 08 mov 0x8(%edx),%edx 11452f: 8d 43 01 lea 0x1(%ebx),%eax info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 114532: 39 55 08 cmp %edx,0x8(%ebp) 114535: 75 e1 jne 114518 <_Heap_Get_free_information+0x34> 114537: 89 1f mov %ebx,(%edi) 114539: 89 4f 08 mov %ecx,0x8(%edi) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 11453c: 5b pop %ebx 11453d: 5e pop %esi 11453e: 5f pop %edi 11453f: c9 leave 114540: c3 ret =============================================================================== 00114544 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 114544: 55 push %ebp 114545: 89 e5 mov %esp,%ebp 114547: 57 push %edi 114548: 56 push %esi 114549: 53 push %ebx 11454a: 8b 45 08 mov 0x8(%ebp),%eax 11454d: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Block *the_block = the_heap->first_block; 114550: 8b 50 20 mov 0x20(%eax),%edx Heap_Block *const end = the_heap->last_block; 114553: 8b 70 24 mov 0x24(%eax),%esi memset(the_info, 0, sizeof(*the_info)); 114556: b9 18 00 00 00 mov $0x18,%ecx 11455b: 31 c0 xor %eax,%eax 11455d: 89 df mov %ebx,%edi 11455f: f3 aa rep stos %al,%es:(%edi) while ( the_block != end ) { 114561: 39 f2 cmp %esi,%edx 114563: 74 33 je 114598 <_Heap_Get_information+0x54><== NEVER TAKEN 114565: 8b 7a 04 mov 0x4(%edx),%edi 114568: eb 16 jmp 114580 <_Heap_Get_information+0x3c> 11456a: 66 90 xchg %ax,%ax <== NOT EXECUTED uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; 11456c: 8d 43 0c lea 0xc(%ebx),%eax else info = &the_info->Free; info->number++; 11456f: ff 00 incl (%eax) info->total += the_size; 114571: 01 48 08 add %ecx,0x8(%eax) if ( info->largest < the_size ) 114574: 39 48 04 cmp %ecx,0x4(%eax) 114577: 73 03 jae 11457c <_Heap_Get_information+0x38> info->largest = the_size; 114579: 89 48 04 mov %ecx,0x4(%eax) Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; memset(the_info, 0, sizeof(*the_info)); while ( the_block != end ) { 11457c: 39 d6 cmp %edx,%esi 11457e: 74 18 je 114598 <_Heap_Get_information+0x54> 114580: 89 f9 mov %edi,%ecx 114582: 83 e1 fe and $0xfffffffe,%ecx RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 114585: 01 ca add %ecx,%edx if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 114587: 8b 7a 04 mov 0x4(%edx),%edi while ( the_block != end ) { uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) 11458a: f7 c7 01 00 00 00 test $0x1,%edi 114590: 75 da jne 11456c <_Heap_Get_information+0x28> info = &the_info->Used; else info = &the_info->Free; 114592: 89 d8 mov %ebx,%eax 114594: eb d9 jmp 11456f <_Heap_Get_information+0x2b> 114596: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 114598: 5b pop %ebx 114599: 5e pop %esi 11459a: 5f pop %edi 11459b: c9 leave 11459c: c3 ret =============================================================================== 0010c59c <_Heap_Initialize>: Heap_Control *heap, void *heap_area_begin_ptr, uintptr_t heap_area_size, uintptr_t page_size ) { 10c59c: 55 push %ebp 10c59d: 89 e5 mov %esp,%ebp 10c59f: 57 push %edi 10c5a0: 56 push %esi 10c5a1: 53 push %ebx 10c5a2: 83 ec 10 sub $0x10,%esp 10c5a5: 8b 5d 08 mov 0x8(%ebp),%ebx 10c5a8: 8b 75 14 mov 0x14(%ebp),%esi uintptr_t first_block_begin = 0; uintptr_t first_block_size = 0; uintptr_t last_block_begin = 0; uintptr_t min_block_size = 0; bool area_ok = false; Heap_Block *first_block = NULL; 10c5ab: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) Heap_Block *last_block = NULL; 10c5b2: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) if ( page_size == 0 ) { 10c5b9: 85 f6 test %esi,%esi 10c5bb: 74 2b je 10c5e8 <_Heap_Initialize+0x4c> uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { 10c5bd: 89 f0 mov %esi,%eax 10c5bf: 83 e0 03 and $0x3,%eax 10c5c2: 74 05 je 10c5c9 <_Heap_Initialize+0x2d> return value - remainder + alignment; 10c5c4: 83 c6 04 add $0x4,%esi 10c5c7: 29 c6 sub %eax,%esi page_size = CPU_ALIGNMENT; } else { page_size = _Heap_Align_up( page_size, CPU_ALIGNMENT ); if ( page_size < CPU_ALIGNMENT ) { 10c5c9: 83 fe 03 cmp $0x3,%esi 10c5cc: 76 40 jbe 10c60e <_Heap_Initialize+0x72> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10c5ce: b8 10 00 00 00 mov $0x10,%eax 10c5d3: 31 d2 xor %edx,%edx 10c5d5: f7 f6 div %esi if ( remainder != 0 ) { 10c5d7: 85 d2 test %edx,%edx 10c5d9: 0f 84 d8 00 00 00 je 10c6b7 <_Heap_Initialize+0x11b> return value - remainder + alignment; 10c5df: 8d 7e 10 lea 0x10(%esi),%edi 10c5e2: 29 d7 sub %edx,%edi 10c5e4: eb 0c jmp 10c5f2 <_Heap_Initialize+0x56> 10c5e6: 66 90 xchg %ax,%ax <== NOT EXECUTED bool area_ok = false; Heap_Block *first_block = NULL; Heap_Block *last_block = NULL; if ( page_size == 0 ) { page_size = CPU_ALIGNMENT; 10c5e8: be 04 00 00 00 mov $0x4,%esi } else { return value; 10c5ed: bf 10 00 00 00 mov $0x10,%edi return 0; } } min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); area_ok = _Heap_Get_first_and_last_block( 10c5f2: 8d 45 ec lea -0x14(%ebp),%eax 10c5f5: 50 push %eax 10c5f6: 8d 45 f0 lea -0x10(%ebp),%eax 10c5f9: 50 push %eax 10c5fa: 57 push %edi 10c5fb: 56 push %esi 10c5fc: ff 75 10 pushl 0x10(%ebp) 10c5ff: ff 75 0c pushl 0xc(%ebp) 10c602: e8 39 ff ff ff call 10c540 <_Heap_Get_first_and_last_block> page_size, min_block_size, &first_block, &last_block ); if ( !area_ok ) { 10c607: 83 c4 18 add $0x18,%esp 10c60a: 84 c0 test %al,%al 10c60c: 75 0a jne 10c618 <_Heap_Initialize+0x7c> return 0; 10c60e: 31 c0 xor %eax,%eax _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return first_block_size; } 10c610: 8d 65 f4 lea -0xc(%ebp),%esp 10c613: 5b pop %ebx 10c614: 5e pop %esi 10c615: 5f pop %edi 10c616: c9 leave 10c617: c3 ret uintptr_t page_size ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr; uintptr_t const heap_area_end = heap_area_begin + heap_area_size; 10c618: 8b 45 10 mov 0x10(%ebp),%eax 10c61b: 03 45 0c add 0xc(%ebp),%eax 10c61e: 89 43 1c mov %eax,0x1c(%ebx) ); if ( !area_ok ) { return 0; } first_block_begin = (uintptr_t) first_block; 10c621: 8b 55 f0 mov -0x10(%ebp),%edx last_block_begin = (uintptr_t) last_block; first_block_size = last_block_begin - first_block_begin; 10c624: 8b 45 ec mov -0x14(%ebp),%eax 10c627: 29 d0 sub %edx,%eax /* First block */ first_block->prev_size = heap_area_end; 10c629: 8b 4b 1c mov 0x1c(%ebx),%ecx 10c62c: 89 0a mov %ecx,(%edx) first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 10c62e: 89 c1 mov %eax,%ecx 10c630: 83 c9 01 or $0x1,%ecx 10c633: 89 4a 04 mov %ecx,0x4(%edx) first_block->next = _Heap_Free_list_tail( heap ); 10c636: 89 5a 08 mov %ebx,0x8(%edx) first_block->prev = _Heap_Free_list_head( heap ); 10c639: 89 5a 0c mov %ebx,0xc(%edx) /* Heap control */ heap->page_size = page_size; 10c63c: 89 73 10 mov %esi,0x10(%ebx) heap->min_block_size = min_block_size; 10c63f: 89 7b 14 mov %edi,0x14(%ebx) heap->area_begin = heap_area_begin; 10c642: 8b 4d 0c mov 0xc(%ebp),%ecx 10c645: 89 4b 18 mov %ecx,0x18(%ebx) heap->area_end = heap_area_end; heap->first_block = first_block; 10c648: 89 53 20 mov %edx,0x20(%ebx) heap->last_block = last_block; 10c64b: 8b 4d ec mov -0x14(%ebp),%ecx 10c64e: 89 4b 24 mov %ecx,0x24(%ebx) _Heap_Free_list_head( heap )->next = first_block; 10c651: 89 53 08 mov %edx,0x8(%ebx) _Heap_Free_list_tail( heap )->prev = first_block; 10c654: 89 53 0c mov %edx,0xc(%ebx) /* Last block */ last_block->prev_size = first_block_size; 10c657: 89 01 mov %eax,(%ecx) * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( 10c659: 29 ca sub %ecx,%edx 10c65b: 89 51 04 mov %edx,0x4(%ecx) last_block->size_and_flag = 0; _Heap_Set_last_block_size( heap ); /* Statistics */ stats->size = first_block_size; 10c65e: 89 43 2c mov %eax,0x2c(%ebx) stats->free_size = first_block_size; 10c661: 89 43 30 mov %eax,0x30(%ebx) stats->min_free_size = first_block_size; 10c664: 89 43 34 mov %eax,0x34(%ebx) stats->free_blocks = 1; 10c667: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) stats->max_free_blocks = 1; 10c66e: c7 43 3c 01 00 00 00 movl $0x1,0x3c(%ebx) stats->used_blocks = 0; 10c675: c7 43 40 00 00 00 00 movl $0x0,0x40(%ebx) stats->max_search = 0; 10c67c: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) stats->allocs = 0; 10c683: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) stats->searches = 0; 10c68a: c7 43 4c 00 00 00 00 movl $0x0,0x4c(%ebx) stats->frees = 0; 10c691: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) stats->resizes = 0; 10c698: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) stats->instance = instance++; 10c69f: 8b 15 40 60 12 00 mov 0x126040,%edx 10c6a5: 89 53 28 mov %edx,0x28(%ebx) 10c6a8: 42 inc %edx 10c6a9: 89 15 40 60 12 00 mov %edx,0x126040 _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return first_block_size; } 10c6af: 8d 65 f4 lea -0xc(%ebp),%esp 10c6b2: 5b pop %ebx 10c6b3: 5e pop %esi 10c6b4: 5f pop %edi 10c6b5: c9 leave 10c6b6: c3 ret uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; } else { return value; 10c6b7: bf 10 00 00 00 mov $0x10,%edi 10c6bc: e9 31 ff ff ff jmp 10c5f2 <_Heap_Initialize+0x56> =============================================================================== 0011dff0 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 11dff0: 55 push %ebp 11dff1: 89 e5 mov %esp,%ebp 11dff3: 57 push %edi 11dff4: 56 push %esi 11dff5: 53 push %ebx 11dff6: 83 ec 2c sub $0x2c,%esp 11dff9: 8b 5d 08 mov 0x8(%ebp),%ebx 11dffc: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 11dfff: 8d 4e f8 lea -0x8(%esi),%ecx 11e002: 89 f0 mov %esi,%eax 11e004: 31 d2 xor %edx,%edx 11e006: f7 73 10 divl 0x10(%ebx) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 11e009: 29 d1 sub %edx,%ecx uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); *old_size = 0; 11e00b: 8b 45 14 mov 0x14(%ebp),%eax 11e00e: c7 00 00 00 00 00 movl $0x0,(%eax) *new_size = 0; 11e014: 8b 55 18 mov 0x18(%ebp),%edx 11e017: c7 02 00 00 00 00 movl $0x0,(%edx) const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 11e01d: 39 4b 20 cmp %ecx,0x20(%ebx) 11e020: 77 05 ja 11e027 <_Heap_Resize_block+0x37> 11e022: 39 4b 24 cmp %ecx,0x24(%ebx) 11e025: 73 0d jae 11e034 <_Heap_Resize_block+0x44> new_alloc_size, old_size, new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; 11e027: b8 02 00 00 00 mov $0x2,%eax } } 11e02c: 8d 65 f4 lea -0xc(%ebp),%esp 11e02f: 5b pop %ebx 11e030: 5e pop %esi 11e031: 5f pop %edi 11e032: c9 leave 11e033: c3 ret - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 11e034: 8b 41 04 mov 0x4(%ecx),%eax 11e037: 83 e0 fe and $0xfffffffe,%eax { Heap_Statistics *const stats = &heap->stats; uintptr_t const block_begin = (uintptr_t) block; uintptr_t block_size = _Heap_Block_size( block ); uintptr_t block_end = block_begin + block_size; 11e03a: 8d 3c 01 lea (%ecx,%eax,1),%edi 11e03d: 89 7d d4 mov %edi,-0x2c(%ebp) uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 11e040: 89 fa mov %edi,%edx 11e042: 29 f2 sub %esi,%edx 11e044: 83 c2 04 add $0x4,%edx 11e047: 89 55 e0 mov %edx,-0x20(%ebp) 11e04a: 8b 57 04 mov 0x4(%edi),%edx 11e04d: 83 e2 fe and $0xfffffffe,%edx 11e050: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 11e053: f6 44 17 04 01 testb $0x1,0x4(%edi,%edx,1) 11e058: 0f 94 45 df sete -0x21(%ebp) bool next_block_is_free = _Heap_Is_free( next_block );; _HAssert( _Heap_Is_block_in_heap( heap, next_block ) ); _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; 11e05c: 8b 55 e0 mov -0x20(%ebp),%edx 11e05f: 8b 7d 14 mov 0x14(%ebp),%edi 11e062: 89 17 mov %edx,(%edi) if ( next_block_is_free ) { 11e064: 80 7d df 00 cmpb $0x0,-0x21(%ebp) 11e068: 75 6e jne 11e0d8 <_Heap_Resize_block+0xe8> block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { 11e06a: 8b 55 e0 mov -0x20(%ebp),%edx 11e06d: 39 55 10 cmp %edx,0x10(%ebp) 11e070: 77 79 ja 11e0eb <_Heap_Resize_block+0xfb> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 11e072: 80 7d df 00 cmpb $0x0,-0x21(%ebp) 11e076: 74 31 je 11e0a9 <_Heap_Resize_block+0xb9> RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 11e078: 8b 79 04 mov 0x4(%ecx),%edi 11e07b: 83 e7 01 and $0x1,%edi block->size_and_flag = size | flag; 11e07e: 09 c7 or %eax,%edi 11e080: 89 79 04 mov %edi,0x4(%ecx) new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11e083: 8b 7d d4 mov -0x2c(%ebp),%edi 11e086: 8b 7f 08 mov 0x8(%edi),%edi 11e089: 89 7d e4 mov %edi,-0x1c(%ebp) 11e08c: 8b 55 d4 mov -0x2c(%ebp),%edx 11e08f: 8b 7a 0c mov 0xc(%edx),%edi RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 11e092: 8b 55 e4 mov -0x1c(%ebp),%edx 11e095: 89 57 08 mov %edx,0x8(%edi) next->prev = prev; 11e098: 89 7a 0c mov %edi,0xc(%edx) _Heap_Block_set_size( block, block_size ); _Heap_Free_list_remove( next_block ); next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 11e09b: 83 4c 01 04 01 orl $0x1,0x4(%ecx,%eax,1) /* Statistics */ --stats->free_blocks; 11e0a0: ff 4b 38 decl 0x38(%ebx) stats->free_size -= next_block_size; 11e0a3: 8b 7d d0 mov -0x30(%ebp),%edi 11e0a6: 29 7b 30 sub %edi,0x30(%ebx) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 11e0a9: ff 75 10 pushl 0x10(%ebp) 11e0ac: 56 push %esi 11e0ad: 51 push %ecx 11e0ae: 53 push %ebx 11e0af: e8 f0 e6 fe ff call 10c7a4 <_Heap_Block_allocate> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 11e0b4: 8b 50 04 mov 0x4(%eax),%edx 11e0b7: 83 e2 fe and $0xfffffffe,%edx block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 11e0ba: 29 f0 sub %esi,%eax 11e0bc: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 11e0c0: 8b 55 18 mov 0x18(%ebp),%edx 11e0c3: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->resizes; 11e0c5: ff 43 54 incl 0x54(%ebx) 11e0c8: 83 c4 10 add $0x10,%esp return HEAP_RESIZE_SUCCESSFUL; 11e0cb: 31 c0 xor %eax,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11e0cd: 8d 65 f4 lea -0xc(%ebp),%esp 11e0d0: 5b pop %ebx 11e0d1: 5e pop %esi 11e0d2: 5f pop %edi 11e0d3: c9 leave 11e0d4: c3 ret 11e0d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; if ( next_block_is_free ) { block_size += next_block_size; 11e0d8: 03 45 d0 add -0x30(%ebp),%eax alloc_size += next_block_size; 11e0db: 8b 7d d0 mov -0x30(%ebp),%edi 11e0de: 01 fa add %edi,%edx 11e0e0: 89 55 e0 mov %edx,-0x20(%ebp) } if ( new_alloc_size > alloc_size ) { 11e0e3: 8b 55 e0 mov -0x20(%ebp),%edx 11e0e6: 39 55 10 cmp %edx,0x10(%ebp) 11e0e9: 76 87 jbe 11e072 <_Heap_Resize_block+0x82> return HEAP_RESIZE_UNSATISFIED; 11e0eb: b8 01 00 00 00 mov $0x1,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11e0f0: 8d 65 f4 lea -0xc(%ebp),%esp 11e0f3: 5b pop %ebx 11e0f4: 5e pop %esi 11e0f5: 5f pop %edi 11e0f6: c9 leave 11e0f7: c3 ret =============================================================================== 0011e0f8 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11e0f8: 55 push %ebp 11e0f9: 89 e5 mov %esp,%ebp 11e0fb: 56 push %esi 11e0fc: 53 push %ebx 11e0fd: 8b 5d 08 mov 0x8(%ebp),%ebx 11e100: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 11e103: 8d 4e f8 lea -0x8(%esi),%ecx 11e106: 89 f0 mov %esi,%eax 11e108: 31 d2 xor %edx,%edx 11e10a: f7 73 10 divl 0x10(%ebx) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 11e10d: 29 d1 sub %edx,%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11e10f: 8b 43 20 mov 0x20(%ebx),%eax && (uintptr_t) block <= (uintptr_t) heap->last_block; 11e112: 39 c1 cmp %eax,%ecx 11e114: 72 07 jb 11e11d <_Heap_Size_of_alloc_area+0x25> 11e116: 8b 53 24 mov 0x24(%ebx),%edx 11e119: 39 d1 cmp %edx,%ecx 11e11b: 76 07 jbe 11e124 <_Heap_Size_of_alloc_area+0x2c><== ALWAYS TAKEN if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; 11e11d: 31 c0 xor %eax,%eax } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; return true; } 11e11f: 5b pop %ebx 11e120: 5e pop %esi 11e121: c9 leave 11e122: c3 ret 11e123: 90 nop <== NOT EXECUTED - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 11e124: 8b 59 04 mov 0x4(%ecx),%ebx 11e127: 83 e3 fe and $0xfffffffe,%ebx RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11e12a: 01 d9 add %ebx,%ecx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 11e12c: 39 c8 cmp %ecx,%eax 11e12e: 77 ed ja 11e11d <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN 11e130: 39 ca cmp %ecx,%edx 11e132: 72 e9 jb 11e11d <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 11e134: f6 41 04 01 testb $0x1,0x4(%ecx) 11e138: 74 e3 je 11e11d <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 11e13a: 29 f1 sub %esi,%ecx 11e13c: 8d 51 04 lea 0x4(%ecx),%edx 11e13f: 8b 45 10 mov 0x10(%ebp),%eax 11e142: 89 10 mov %edx,(%eax) return true; 11e144: b0 01 mov $0x1,%al } 11e146: 5b pop %ebx 11e147: 5e pop %esi 11e148: c9 leave 11e149: c3 ret =============================================================================== 0010d2bc <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10d2bc: 55 push %ebp 10d2bd: 89 e5 mov %esp,%ebp 10d2bf: 57 push %edi 10d2c0: 56 push %esi 10d2c1: 53 push %ebx 10d2c2: 83 ec 4c sub $0x4c,%esp 10d2c5: 8b 5d 08 mov 0x8(%ebp),%ebx uintptr_t const page_size = heap->page_size; 10d2c8: 8b 43 10 mov 0x10(%ebx),%eax 10d2cb: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10d2ce: 8b 53 14 mov 0x14(%ebx),%edx 10d2d1: 89 55 d0 mov %edx,-0x30(%ebp) Heap_Block *const first_block = heap->first_block; 10d2d4: 8b 43 20 mov 0x20(%ebx),%eax 10d2d7: 89 45 dc mov %eax,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10d2da: 8b 53 24 mov 0x24(%ebx),%edx 10d2dd: 89 55 cc mov %edx,-0x34(%ebp) Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d2e0: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10d2e4: 74 1a je 10d300 <_Heap_Walk+0x44> 10d2e6: c7 45 d8 74 d2 10 00 movl $0x10d274,-0x28(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d2ed: 83 3d 80 8a 12 00 03 cmpl $0x3,0x128a80 10d2f4: 74 1a je 10d310 <_Heap_Walk+0x54> <== ALWAYS TAKEN } block = next_block; } while ( block != first_block ); return true; 10d2f6: b0 01 mov $0x1,%al } 10d2f8: 8d 65 f4 lea -0xc(%ebp),%esp 10d2fb: 5b pop %ebx 10d2fc: 5e pop %esi 10d2fd: 5f pop %edi 10d2fe: c9 leave 10d2ff: c3 ret uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d300: c7 45 d8 6c d2 10 00 movl $0x10d26c,-0x28(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d307: 83 3d 80 8a 12 00 03 cmpl $0x3,0x128a80 10d30e: 75 e6 jne 10d2f6 <_Heap_Walk+0x3a> Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 10d310: 52 push %edx 10d311: ff 73 0c pushl 0xc(%ebx) 10d314: ff 73 08 pushl 0x8(%ebx) 10d317: ff 75 cc pushl -0x34(%ebp) 10d31a: ff 75 dc pushl -0x24(%ebp) 10d31d: ff 73 1c pushl 0x1c(%ebx) 10d320: ff 73 18 pushl 0x18(%ebx) 10d323: ff 75 d0 pushl -0x30(%ebp) 10d326: ff 75 e0 pushl -0x20(%ebp) 10d329: 68 94 0f 12 00 push $0x120f94 10d32e: 6a 00 push $0x0 10d330: ff 75 0c pushl 0xc(%ebp) 10d333: ff 55 d8 call *-0x28(%ebp) heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 10d336: 83 c4 30 add $0x30,%esp 10d339: 8b 45 e0 mov -0x20(%ebp),%eax 10d33c: 85 c0 test %eax,%eax 10d33e: 74 70 je 10d3b0 <_Heap_Walk+0xf4> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10d340: f6 45 e0 03 testb $0x3,-0x20(%ebp) 10d344: 75 72 jne 10d3b8 <_Heap_Walk+0xfc> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d346: 8b 45 d0 mov -0x30(%ebp),%eax 10d349: 31 d2 xor %edx,%edx 10d34b: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10d34e: 85 d2 test %edx,%edx 10d350: 75 72 jne 10d3c4 <_Heap_Walk+0x108> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10d352: 8b 45 dc mov -0x24(%ebp),%eax 10d355: 83 c0 08 add $0x8,%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d358: 31 d2 xor %edx,%edx 10d35a: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( 10d35d: 85 d2 test %edx,%edx 10d35f: 75 6f jne 10d3d0 <_Heap_Walk+0x114> block = next_block; } while ( block != first_block ); return true; } 10d361: 8b 45 dc mov -0x24(%ebp),%eax 10d364: 8b 40 04 mov 0x4(%eax),%eax 10d367: 89 45 e4 mov %eax,-0x1c(%ebp) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10d36a: a8 01 test $0x1,%al 10d36c: 0f 84 8e 00 00 00 je 10d400 <_Heap_Walk+0x144> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10d372: 8b 55 cc mov -0x34(%ebp),%edx 10d375: 8b 42 04 mov 0x4(%edx),%eax 10d378: 83 e0 fe and $0xfffffffe,%eax RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10d37b: 01 d0 add %edx,%eax ); return false; } if ( _Heap_Is_free( last_block ) ) { 10d37d: f6 40 04 01 testb $0x1,0x4(%eax) 10d381: 74 25 je 10d3a8 <_Heap_Walk+0xec> ); return false; } if ( 10d383: 39 45 dc cmp %eax,-0x24(%ebp) 10d386: 74 54 je 10d3dc <_Heap_Walk+0x120> <== ALWAYS TAKEN _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 10d388: 51 push %ecx <== NOT EXECUTED 10d389: 68 b0 10 12 00 push $0x1210b0 <== NOT EXECUTED 10d38e: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10d390: 6a 01 push $0x1 10d392: ff 75 0c pushl 0xc(%ebp) 10d395: ff 55 d8 call *-0x28(%ebp) 10d398: 83 c4 10 add $0x10,%esp return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 10d39b: 31 c0 xor %eax,%eax block = next_block; } while ( block != first_block ); return true; } 10d39d: 8d 65 f4 lea -0xc(%ebp),%esp 10d3a0: 5b pop %ebx 10d3a1: 5e pop %esi 10d3a2: 5f pop %edi 10d3a3: c9 leave 10d3a4: c3 ret 10d3a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 10d3a8: 53 push %ebx 10d3a9: 68 4a 0f 12 00 push $0x120f4a 10d3ae: eb e0 jmp 10d390 <_Heap_Walk+0xd4> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 10d3b0: 57 push %edi 10d3b1: 68 19 0f 12 00 push $0x120f19 10d3b6: eb d8 jmp 10d390 <_Heap_Walk+0xd4> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 10d3b8: ff 75 e0 pushl -0x20(%ebp) 10d3bb: 68 2c 0f 12 00 push $0x120f2c 10d3c0: eb ce jmp 10d390 <_Heap_Walk+0xd4> 10d3c2: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 10d3c4: ff 75 d0 pushl -0x30(%ebp) 10d3c7: 68 28 10 12 00 push $0x121028 10d3cc: eb c2 jmp 10d390 <_Heap_Walk+0xd4> 10d3ce: 66 90 xchg %ax,%ax <== NOT EXECUTED } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10d3d0: ff 75 dc pushl -0x24(%ebp) 10d3d3: 68 4c 10 12 00 push $0x12104c 10d3d8: eb b6 jmp 10d390 <_Heap_Walk+0xd4> 10d3da: 66 90 xchg %ax,%ax <== NOT EXECUTED int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10d3dc: 8b 43 10 mov 0x10(%ebx),%eax 10d3df: 89 45 c8 mov %eax,-0x38(%ebp) block = next_block; } while ( block != first_block ); return true; } 10d3e2: 8b 4b 08 mov 0x8(%ebx),%ecx const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 10d3e5: 39 cb cmp %ecx,%ebx 10d3e7: 0f 84 a8 00 00 00 je 10d495 <_Heap_Walk+0x1d9> block = next_block; } while ( block != first_block ); return true; } 10d3ed: 8b 43 20 mov 0x20(%ebx),%eax 10d3f0: 89 45 d4 mov %eax,-0x2c(%ebp) const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 10d3f3: 39 c8 cmp %ecx,%eax 10d3f5: 76 11 jbe 10d408 <_Heap_Walk+0x14c> <== ALWAYS TAKEN 10d3f7: 90 nop <== NOT EXECUTED const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 10d3f8: 51 push %ecx 10d3f9: 68 e0 10 12 00 push $0x1210e0 10d3fe: eb 90 jmp 10d390 <_Heap_Walk+0xd4> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 10d400: 56 push %esi 10d401: 68 80 10 12 00 push $0x121080 10d406: eb 88 jmp 10d390 <_Heap_Walk+0xd4> 10d408: 8b 7b 24 mov 0x24(%ebx),%edi 10d40b: 39 cf cmp %ecx,%edi 10d40d: 72 e9 jb 10d3f8 <_Heap_Walk+0x13c> <== NEVER TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10d40f: 8d 41 08 lea 0x8(%ecx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d412: 31 d2 xor %edx,%edx 10d414: f7 75 c8 divl -0x38(%ebp) ); return false; } if ( 10d417: 85 d2 test %edx,%edx 10d419: 0f 85 44 02 00 00 jne 10d663 <_Heap_Walk+0x3a7> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10d41f: 8b 41 04 mov 0x4(%ecx),%eax 10d422: 83 e0 fe and $0xfffffffe,%eax ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d425: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d42a: 0f 85 3e 02 00 00 jne 10d66e <_Heap_Walk+0x3b2> <== NEVER TAKEN 10d430: 89 da mov %ebx,%edx 10d432: 89 ce mov %ecx,%esi 10d434: eb 37 jmp 10d46d <_Heap_Walk+0x1b1> 10d436: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } prev_block = free_block; free_block = free_block->next; 10d438: 8b 49 08 mov 0x8(%ecx),%ecx const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 10d43b: 39 cb cmp %ecx,%ebx 10d43d: 74 5c je 10d49b <_Heap_Walk+0x1df> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 10d43f: 39 4d d4 cmp %ecx,-0x2c(%ebp) 10d442: 77 b4 ja 10d3f8 <_Heap_Walk+0x13c> 10d444: 39 f9 cmp %edi,%ecx 10d446: 77 b0 ja 10d3f8 <_Heap_Walk+0x13c> <== NEVER TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10d448: 8d 41 08 lea 0x8(%ecx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d44b: 31 d2 xor %edx,%edx 10d44d: f7 75 c8 divl -0x38(%ebp) ); return false; } if ( 10d450: 85 d2 test %edx,%edx 10d452: 0f 85 0b 02 00 00 jne 10d663 <_Heap_Walk+0x3a7> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10d458: 8b 41 04 mov 0x4(%ecx),%eax 10d45b: 83 e0 fe and $0xfffffffe,%eax ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d45e: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d463: 0f 85 05 02 00 00 jne 10d66e <_Heap_Walk+0x3b2> 10d469: 89 f2 mov %esi,%edx 10d46b: 89 ce mov %ecx,%esi ); return false; } if ( free_block->prev != prev_block ) { 10d46d: 8b 41 0c mov 0xc(%ecx),%eax 10d470: 39 d0 cmp %edx,%eax 10d472: 74 c4 je 10d438 <_Heap_Walk+0x17c> (*printer)( 10d474: 83 ec 0c sub $0xc,%esp 10d477: 50 push %eax 10d478: 51 push %ecx 10d479: 68 30 11 12 00 push $0x121130 10d47e: 66 90 xchg %ax,%ax Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 10d480: 6a 01 push $0x1 10d482: ff 75 0c pushl 0xc(%ebp) 10d485: ff 55 d8 call *-0x28(%ebp) "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 10d488: 83 c4 20 add $0x20,%esp 10d48b: 31 c0 xor %eax,%eax block = next_block; } while ( block != first_block ); return true; } 10d48d: 8d 65 f4 lea -0xc(%ebp),%esp 10d490: 5b pop %ebx 10d491: 5e pop %esi 10d492: 5f pop %edi 10d493: c9 leave 10d494: c3 ret const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 10d495: 8b 53 20 mov 0x20(%ebx),%edx 10d498: 89 55 d4 mov %edx,-0x2c(%ebp) ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d49b: 8b 7d dc mov -0x24(%ebp),%edi 10d49e: 8b 45 d4 mov -0x2c(%ebp),%eax 10d4a1: 8d 76 00 lea 0x0(%esi),%esi 10d4a4: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d4a7: 83 e1 fe and $0xfffffffe,%ecx RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10d4aa: 8d 34 39 lea (%ecx,%edi,1),%esi const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 10d4ad: 39 f0 cmp %esi,%eax 10d4af: 76 0f jbe 10d4c0 <_Heap_Walk+0x204> <== ALWAYS TAKEN Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 10d4b1: 83 ec 0c sub $0xc,%esp 10d4b4: 56 push %esi 10d4b5: 57 push %edi 10d4b6: 68 64 11 12 00 push $0x121164 10d4bb: eb c3 jmp 10d480 <_Heap_Walk+0x1c4> 10d4bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10d4c0: 39 73 24 cmp %esi,0x24(%ebx) 10d4c3: 72 ec jb 10d4b1 <_Heap_Walk+0x1f5> uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; 10d4c5: 3b 7d cc cmp -0x34(%ebp),%edi 10d4c8: 0f 95 45 d4 setne -0x2c(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d4cc: 89 c8 mov %ecx,%eax 10d4ce: 31 d2 xor %edx,%edx 10d4d0: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 10d4d3: 85 d2 test %edx,%edx 10d4d5: 74 0a je 10d4e1 <_Heap_Walk+0x225> 10d4d7: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10d4db: 0f 85 52 01 00 00 jne 10d633 <_Heap_Walk+0x377> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 10d4e1: 39 4d d0 cmp %ecx,-0x30(%ebp) 10d4e4: 76 0a jbe 10d4f0 <_Heap_Walk+0x234> 10d4e6: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10d4ea: 0f 85 52 01 00 00 jne 10d642 <_Heap_Walk+0x386> <== ALWAYS TAKEN ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 10d4f0: 39 f7 cmp %esi,%edi 10d4f2: 72 0a jb 10d4fe <_Heap_Walk+0x242> 10d4f4: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10d4f8: 0f 85 56 01 00 00 jne 10d654 <_Heap_Walk+0x398> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 10d4fe: 8b 55 e4 mov -0x1c(%ebp),%edx 10d501: 83 e2 01 and $0x1,%edx ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10d504: f6 46 04 01 testb $0x1,0x4(%esi) 10d508: 74 4e je 10d558 <_Heap_Walk+0x29c> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 10d50a: 85 d2 test %edx,%edx 10d50c: 74 2e je 10d53c <_Heap_Walk+0x280> (*printer)( 10d50e: 83 ec 0c sub $0xc,%esp 10d511: 51 push %ecx 10d512: 57 push %edi 10d513: 68 7b 0f 12 00 push $0x120f7b 10d518: 6a 00 push $0x0 10d51a: ff 75 0c pushl 0xc(%ebp) 10d51d: ff 55 d8 call *-0x28(%ebp) 10d520: 83 c4 20 add $0x20,%esp block->prev_size ); } block = next_block; } while ( block != first_block ); 10d523: 39 75 dc cmp %esi,-0x24(%ebp) 10d526: 0f 84 ca fd ff ff je 10d2f6 <_Heap_Walk+0x3a> 10d52c: 8b 56 04 mov 0x4(%esi),%edx 10d52f: 89 55 e4 mov %edx,-0x1c(%ebp) 10d532: 8b 43 20 mov 0x20(%ebx),%eax 10d535: 89 f7 mov %esi,%edi 10d537: e9 68 ff ff ff jmp 10d4a4 <_Heap_Walk+0x1e8> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10d53c: 83 ec 08 sub $0x8,%esp 10d53f: ff 37 pushl (%edi) 10d541: 51 push %ecx 10d542: 57 push %edi 10d543: 68 c8 12 12 00 push $0x1212c8 10d548: 6a 00 push $0x0 10d54a: ff 75 0c pushl 0xc(%ebp) 10d54d: ff 55 d8 call *-0x28(%ebp) 10d550: 83 c4 20 add $0x20,%esp 10d553: eb ce jmp 10d523 <_Heap_Walk+0x267> 10d555: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED block = next_block; } while ( block != first_block ); return true; } 10d558: 8b 43 08 mov 0x8(%ebx),%eax 10d55b: 89 45 b4 mov %eax,-0x4c(%ebp) block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? 10d55e: 8b 47 08 mov 0x8(%edi),%eax 10d561: 89 45 e4 mov %eax,-0x1c(%ebp) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10d564: 39 43 0c cmp %eax,0xc(%ebx) 10d567: 0f 84 97 00 00 00 je 10d604 <_Heap_Walk+0x348> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 10d56d: 39 c3 cmp %eax,%ebx 10d56f: 0f 84 9b 00 00 00 je 10d610 <_Heap_Walk+0x354> 10d575: c7 45 c8 15 0e 12 00 movl $0x120e15,-0x38(%ebp) false, "block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n", block, block_size, block->prev, block->prev == first_free_block ? 10d57c: 8b 47 0c mov 0xc(%edi),%eax 10d57f: 89 45 d4 mov %eax,-0x2c(%ebp) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10d582: 39 45 b4 cmp %eax,-0x4c(%ebp) 10d585: 74 75 je 10d5fc <_Heap_Walk+0x340> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 10d587: 39 c3 cmp %eax,%ebx 10d589: 0f 84 8d 00 00 00 je 10d61c <_Heap_Walk+0x360> 10d58f: b8 15 0e 12 00 mov $0x120e15,%eax Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10d594: 83 ec 0c sub $0xc,%esp 10d597: ff 75 c8 pushl -0x38(%ebp) 10d59a: ff 75 e4 pushl -0x1c(%ebp) 10d59d: 50 push %eax 10d59e: ff 75 d4 pushl -0x2c(%ebp) 10d5a1: 51 push %ecx 10d5a2: 57 push %edi 10d5a3: 68 24 12 12 00 push $0x121224 10d5a8: 6a 00 push $0x0 10d5aa: ff 75 0c pushl 0xc(%ebp) 10d5ad: 89 55 c4 mov %edx,-0x3c(%ebp) 10d5b0: 89 4d c0 mov %ecx,-0x40(%ebp) 10d5b3: ff 55 d8 call *-0x28(%ebp) block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 10d5b6: 8b 06 mov (%esi),%eax 10d5b8: 83 c4 30 add $0x30,%esp 10d5bb: 8b 4d c0 mov -0x40(%ebp),%ecx 10d5be: 39 c1 cmp %eax,%ecx 10d5c0: 8b 55 c4 mov -0x3c(%ebp),%edx 10d5c3: 75 27 jne 10d5ec <_Heap_Walk+0x330> ); return false; } if ( !prev_used ) { 10d5c5: 85 d2 test %edx,%edx 10d5c7: 74 5f je 10d628 <_Heap_Walk+0x36c> block = next_block; } while ( block != first_block ); return true; } 10d5c9: 8b 43 08 mov 0x8(%ebx),%eax ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 10d5cc: 39 c3 cmp %eax,%ebx 10d5ce: 74 0f je 10d5df <_Heap_Walk+0x323> <== NEVER TAKEN if ( free_block == block ) { 10d5d0: 39 c7 cmp %eax,%edi 10d5d2: 0f 84 4b ff ff ff je 10d523 <_Heap_Walk+0x267> return true; } free_block = free_block->next; 10d5d8: 8b 40 08 mov 0x8(%eax),%eax ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 10d5db: 39 c3 cmp %eax,%ebx 10d5dd: 75 f1 jne 10d5d0 <_Heap_Walk+0x314> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10d5df: 57 push %edi 10d5e0: 68 f0 12 12 00 push $0x1212f0 10d5e5: e9 a6 fd ff ff jmp 10d390 <_Heap_Walk+0xd4> 10d5ea: 66 90 xchg %ax,%ax <== NOT EXECUTED " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( 10d5ec: 52 push %edx 10d5ed: 56 push %esi 10d5ee: 50 push %eax 10d5ef: 51 push %ecx 10d5f0: 57 push %edi 10d5f1: 68 5c 12 12 00 push $0x12125c 10d5f6: e9 85 fe ff ff jmp 10d480 <_Heap_Walk+0x1c4> 10d5fb: 90 nop <== NOT EXECUTED Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10d5fc: b8 ff 0e 12 00 mov $0x120eff,%eax 10d601: eb 91 jmp 10d594 <_Heap_Walk+0x2d8> 10d603: 90 nop <== NOT EXECUTED 10d604: c7 45 c8 e6 0e 12 00 movl $0x120ee6,-0x38(%ebp) 10d60b: e9 6c ff ff ff jmp 10d57c <_Heap_Walk+0x2c0> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 10d610: c7 45 c8 f5 0e 12 00 movl $0x120ef5,-0x38(%ebp) 10d617: e9 60 ff ff ff jmp 10d57c <_Heap_Walk+0x2c0> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 10d61c: b8 0f 0f 12 00 mov $0x120f0f,%eax 10d621: e9 6e ff ff ff jmp 10d594 <_Heap_Walk+0x2d8> 10d626: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !prev_used ) { (*printer)( 10d628: 57 push %edi 10d629: 68 98 12 12 00 push $0x121298 10d62e: e9 5d fd ff ff jmp 10d390 <_Heap_Walk+0xd4> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 10d633: 83 ec 0c sub $0xc,%esp 10d636: 51 push %ecx 10d637: 57 push %edi 10d638: 68 94 11 12 00 push $0x121194 10d63d: e9 3e fe ff ff jmp 10d480 <_Heap_Walk+0x1c4> return false; } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( 10d642: 83 ec 08 sub $0x8,%esp 10d645: ff 75 d0 pushl -0x30(%ebp) 10d648: 51 push %ecx 10d649: 57 push %edi 10d64a: 68 c4 11 12 00 push $0x1211c4 10d64f: e9 2c fe ff ff jmp 10d480 <_Heap_Walk+0x1c4> return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 10d654: 83 ec 0c sub $0xc,%esp 10d657: 56 push %esi 10d658: 57 push %edi 10d659: 68 f0 11 12 00 push $0x1211f0 10d65e: e9 1d fe ff ff jmp 10d480 <_Heap_Walk+0x1c4> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10d663: 51 push %ecx 10d664: 68 00 11 12 00 push $0x121100 10d669: e9 22 fd ff ff jmp 10d390 <_Heap_Walk+0xd4> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 10d66e: 51 push %ecx 10d66f: 68 5f 0f 12 00 push $0x120f5f 10d674: e9 17 fd ff ff jmp 10d390 <_Heap_Walk+0xd4> =============================================================================== 0010be20 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 10be20: 55 push %ebp 10be21: 89 e5 mov %esp,%ebp 10be23: 53 push %ebx 10be24: 83 ec 04 sub $0x4,%esp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10be27: 8b 0d 20 67 12 00 mov 0x126720,%ecx 10be2d: 85 c9 test %ecx,%ecx 10be2f: 74 1a je 10be4b <_IO_Initialize_all_drivers+0x2b><== NEVER TAKEN 10be31: 31 db xor %ebx,%ebx 10be33: 90 nop (void) rtems_io_initialize( major, 0, NULL ); 10be34: 52 push %edx 10be35: 6a 00 push $0x0 10be37: 6a 00 push $0x0 10be39: 53 push %ebx 10be3a: e8 01 46 00 00 call 110440 void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10be3f: 43 inc %ebx 10be40: 83 c4 10 add $0x10,%esp 10be43: 39 1d 20 67 12 00 cmp %ebx,0x126720 10be49: 77 e9 ja 10be34 <_IO_Initialize_all_drivers+0x14> (void) rtems_io_initialize( major, 0, NULL ); } 10be4b: 8b 5d fc mov -0x4(%ebp),%ebx 10be4e: c9 leave 10be4f: c3 ret =============================================================================== 0010bd88 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 10bd88: 55 push %ebp 10bd89: 89 e5 mov %esp,%ebp 10bd8b: 57 push %edi 10bd8c: 56 push %esi 10bd8d: 53 push %ebx 10bd8e: 83 ec 1c sub $0x1c,%esp uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; 10bd91: 8b 1d f4 22 12 00 mov 0x1222f4,%ebx drivers_in_table = Configuration.number_of_device_drivers; 10bd97: a1 f0 22 12 00 mov 0x1222f0,%eax 10bd9c: 89 45 e4 mov %eax,-0x1c(%ebp) number_of_drivers = Configuration.maximum_drivers; 10bd9f: 8b 35 ec 22 12 00 mov 0x1222ec,%esi /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 10bda5: 39 f0 cmp %esi,%eax 10bda7: 73 5f jae 10be08 <_IO_Manager_initialization+0x80> * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( 10bda9: 8d 0c 76 lea (%esi,%esi,2),%ecx 10bdac: c1 e1 03 shl $0x3,%ecx 10bdaf: 83 ec 0c sub $0xc,%esp 10bdb2: 51 push %ecx 10bdb3: 89 4d dc mov %ecx,-0x24(%ebp) 10bdb6: e8 31 2a 00 00 call 10e7ec <_Workspace_Allocate_or_fatal_error> 10bdbb: 89 c2 mov %eax,%edx /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 10bdbd: a3 24 67 12 00 mov %eax,0x126724 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 10bdc2: 89 35 20 67 12 00 mov %esi,0x126720 memset( 10bdc8: 31 c0 xor %eax,%eax 10bdca: 8b 4d dc mov -0x24(%ebp),%ecx 10bdcd: 89 d7 mov %edx,%edi 10bdcf: f3 aa rep stos %al,%es:(%edi) _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 10bdd1: 83 c4 10 add $0x10,%esp 10bdd4: 8b 45 e4 mov -0x1c(%ebp),%eax 10bdd7: 85 c0 test %eax,%eax 10bdd9: 74 25 je 10be00 <_IO_Manager_initialization+0x78><== NEVER TAKEN 10bddb: a1 24 67 12 00 mov 0x126724,%eax 10bde0: 89 45 e0 mov %eax,-0x20(%ebp) 10bde3: 31 c0 xor %eax,%eax 10bde5: 31 d2 xor %edx,%edx 10bde7: 90 nop _IO_Driver_address_table[index] = driver_table[index]; 10bde8: 8b 7d e0 mov -0x20(%ebp),%edi 10bdeb: 01 c7 add %eax,%edi 10bded: 8d 34 03 lea (%ebx,%eax,1),%esi 10bdf0: b9 06 00 00 00 mov $0x6,%ecx 10bdf5: f3 a5 rep movsl %ds:(%esi),%es:(%edi) memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 10bdf7: 42 inc %edx 10bdf8: 83 c0 18 add $0x18,%eax 10bdfb: 39 55 e4 cmp %edx,-0x1c(%ebp) 10bdfe: 77 e8 ja 10bde8 <_IO_Manager_initialization+0x60> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10be00: 8d 65 f4 lea -0xc(%ebp),%esp 10be03: 5b pop %ebx 10be04: 5e pop %esi 10be05: 5f pop %edi 10be06: c9 leave 10be07: c3 ret * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 10be08: 89 1d 24 67 12 00 mov %ebx,0x126724 _IO_Number_of_drivers = number_of_drivers; 10be0e: 8b 45 e4 mov -0x1c(%ebp),%eax 10be11: a3 20 67 12 00 mov %eax,0x126720 ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10be16: 8d 65 f4 lea -0xc(%ebp),%esp 10be19: 5b pop %ebx 10be1a: 5e pop %esi 10be1b: 5f pop %edi 10be1c: c9 leave 10be1d: c3 ret =============================================================================== 0010c898 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10c898: 55 push %ebp 10c899: 89 e5 mov %esp,%ebp 10c89b: 53 push %ebx 10c89c: 83 ec 08 sub $0x8,%esp 10c89f: 8b 45 08 mov 0x8(%ebp),%eax 10c8a2: 8b 55 0c mov 0xc(%ebp),%edx 10c8a5: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10c8a8: a3 74 64 12 00 mov %eax,0x126474 _Internal_errors_What_happened.is_internal = is_internal; 10c8ad: 88 15 78 64 12 00 mov %dl,0x126478 _Internal_errors_What_happened.the_error = the_error; 10c8b3: 89 1d 7c 64 12 00 mov %ebx,0x12647c _User_extensions_Fatal( the_source, is_internal, the_error ); 10c8b9: 53 push %ebx 10c8ba: 0f b6 d2 movzbl %dl,%edx 10c8bd: 52 push %edx 10c8be: 50 push %eax 10c8bf: e8 30 1b 00 00 call 10e3f4 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10c8c4: c7 05 80 65 12 00 05 movl $0x5,0x126580 <== NOT EXECUTED 10c8cb: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10c8ce: fa cli <== NOT EXECUTED 10c8cf: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10c8d1: f4 hlt <== NOT EXECUTED 10c8d2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10c8d5: eb fe jmp 10c8d5 <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 00110970 <_Objects_API_maximum_class>: #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 110970: 55 push %ebp 110971: 89 e5 mov %esp,%ebp 110973: 8b 45 08 mov 0x8(%ebp),%eax 110976: 48 dec %eax 110977: 83 f8 02 cmp $0x2,%eax 11097a: 77 0c ja 110988 <_Objects_API_maximum_class+0x18> 11097c: 8b 04 85 d0 03 12 00 mov 0x1203d0(,%eax,4),%eax case OBJECTS_NO_API: default: break; } return 0; } 110983: c9 leave 110984: c3 ret 110985: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 110988: 31 c0 xor %eax,%eax case OBJECTS_NO_API: default: break; } return 0; } 11098a: c9 leave 11098b: c3 ret =============================================================================== 0010c928 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10c928: 55 push %ebp 10c929: 89 e5 mov %esp,%ebp 10c92b: 56 push %esi 10c92c: 53 push %ebx 10c92d: 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 ) 10c930: 8b 43 18 mov 0x18(%ebx),%eax 10c933: 85 c0 test %eax,%eax 10c935: 75 0d jne 10c944 <_Objects_Allocate+0x1c><== ALWAYS TAKEN return NULL; 10c937: 31 c9 xor %ecx,%ecx <== NOT EXECUTED ); } #endif return the_object; } 10c939: 89 c8 mov %ecx,%eax 10c93b: 8d 65 f8 lea -0x8(%ebp),%esp 10c93e: 5b pop %ebx 10c93f: 5e pop %esi 10c940: c9 leave 10c941: c3 ret 10c942: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10c944: 8d 73 20 lea 0x20(%ebx),%esi 10c947: 83 ec 0c sub $0xc,%esp 10c94a: 56 push %esi 10c94b: e8 f4 f6 ff ff call 10c044 <_Chain_Get> 10c950: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10c952: 83 c4 10 add $0x10,%esp 10c955: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10c959: 74 de je 10c939 <_Objects_Allocate+0x11> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10c95b: 85 c0 test %eax,%eax 10c95d: 74 29 je 10c988 <_Objects_Allocate+0x60> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10c95f: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10c963: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10c967: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 10c969: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10c96d: 31 d2 xor %edx,%edx 10c96f: f7 f6 div %esi information->inactive_per_block[ block ]--; 10c971: c1 e0 02 shl $0x2,%eax 10c974: 03 43 30 add 0x30(%ebx),%eax 10c977: ff 08 decl (%eax) information->inactive--; 10c979: 66 ff 4b 2c decw 0x2c(%ebx) ); } #endif return the_object; } 10c97d: 89 c8 mov %ecx,%eax 10c97f: 8d 65 f8 lea -0x8(%ebp),%esp 10c982: 5b pop %ebx 10c983: 5e pop %esi 10c984: c9 leave 10c985: c3 ret 10c986: 66 90 xchg %ax,%ax <== NOT EXECUTED * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 10c988: 83 ec 0c sub $0xc,%esp 10c98b: 53 push %ebx 10c98c: e8 3b 00 00 00 call 10c9cc <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10c991: 89 34 24 mov %esi,(%esp) 10c994: e8 ab f6 ff ff call 10c044 <_Chain_Get> 10c999: 89 c1 mov %eax,%ecx } if ( the_object ) { 10c99b: 83 c4 10 add $0x10,%esp 10c99e: 85 c0 test %eax,%eax 10c9a0: 74 97 je 10c939 <_Objects_Allocate+0x11> 10c9a2: eb bb jmp 10c95f <_Objects_Allocate+0x37> =============================================================================== 0010c9cc <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10c9cc: 55 push %ebp 10c9cd: 89 e5 mov %esp,%ebp 10c9cf: 57 push %edi 10c9d0: 56 push %esi 10c9d1: 53 push %ebx 10c9d2: 83 ec 4c sub $0x4c,%esp 10c9d5: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 10c9d8: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10c9dc: 89 45 cc mov %eax,-0x34(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10c9df: 8b 4b 34 mov 0x34(%ebx),%ecx 10c9e2: 85 c9 test %ecx,%ecx 10c9e4: 0f 84 66 02 00 00 je 10cc50 <_Objects_Extend_information+0x284> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10c9ea: 8b 73 10 mov 0x10(%ebx),%esi 10c9ed: 66 89 75 d0 mov %si,-0x30(%ebp) 10c9f1: 8b 7b 14 mov 0x14(%ebx),%edi 10c9f4: 89 f0 mov %esi,%eax 10c9f6: 31 d2 xor %edx,%edx 10c9f8: 66 f7 f7 div %di 10c9fb: 0f b7 f0 movzwl %ax,%esi for ( ; block < block_count; block++ ) { 10c9fe: 85 f6 test %esi,%esi 10ca00: 0f 84 63 02 00 00 je 10cc69 <_Objects_Extend_information+0x29d><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) { 10ca06: 8b 01 mov (%ecx),%eax 10ca08: 85 c0 test %eax,%eax 10ca0a: 0f 84 6b 02 00 00 je 10cc7b <_Objects_Extend_information+0x2af><== NEVER TAKEN 10ca10: 0f b7 ff movzwl %di,%edi /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 10ca13: 8b 55 cc mov -0x34(%ebp),%edx 10ca16: 89 55 d4 mov %edx,-0x2c(%ebp) index_base = minimum_index; block = 0; 10ca19: 31 d2 xor %edx,%edx 10ca1b: 8b 45 d4 mov -0x2c(%ebp),%eax 10ca1e: eb 0a jmp 10ca2a <_Objects_Extend_information+0x5e> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 10ca20: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4) 10ca24: 0f 84 c6 01 00 00 je 10cbf0 <_Objects_Extend_information+0x224> do_extend = false; break; } else index_base += information->allocation_size; 10ca2a: 01 f8 add %edi,%eax if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10ca2c: 42 inc %edx 10ca2d: 39 d6 cmp %edx,%esi 10ca2f: 77 ef ja 10ca20 <_Objects_Extend_information+0x54> 10ca31: 89 45 d4 mov %eax,-0x2c(%ebp) /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 10ca34: b1 01 mov $0x1,%cl } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10ca36: 0f b7 45 d0 movzwl -0x30(%ebp),%eax 10ca3a: 01 f8 add %edi,%eax 10ca3c: 89 45 d0 mov %eax,-0x30(%ebp) /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 10ca3f: 3d ff ff 00 00 cmp $0xffff,%eax 10ca44: 0f 87 9e 01 00 00 ja 10cbe8 <_Objects_Extend_information+0x21c> /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 10ca4a: 0f af 7b 18 imul 0x18(%ebx),%edi if ( information->auto_extend ) { 10ca4e: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10ca52: 0f 84 a4 01 00 00 je 10cbfc <_Objects_Extend_information+0x230> new_object_block = _Workspace_Allocate( block_size ); 10ca58: 83 ec 0c sub $0xc,%esp 10ca5b: 57 push %edi 10ca5c: 89 55 b8 mov %edx,-0x48(%ebp) 10ca5f: 88 4d b4 mov %cl,-0x4c(%ebp) 10ca62: e8 51 1d 00 00 call 10e7b8 <_Workspace_Allocate> 10ca67: 89 45 c8 mov %eax,-0x38(%ebp) if ( !new_object_block ) 10ca6a: 83 c4 10 add $0x10,%esp 10ca6d: 85 c0 test %eax,%eax 10ca6f: 8b 55 b8 mov -0x48(%ebp),%edx 10ca72: 8a 4d b4 mov -0x4c(%ebp),%cl 10ca75: 0f 84 6d 01 00 00 je 10cbe8 <_Objects_Extend_information+0x21c> } /* * Do we need to grow the tables? */ if ( do_extend ) { 10ca7b: 84 c9 test %cl,%cl 10ca7d: 0f 84 ea 00 00 00 je 10cb6d <_Objects_Extend_information+0x1a1> */ /* * Up the block count and maximum */ block_count++; 10ca83: 8d 7e 01 lea 0x1(%esi),%edi * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 10ca86: 83 ec 0c sub $0xc,%esp /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 10ca89: 8d 04 7f lea (%edi,%edi,2),%eax ((maximum + minimum_index) * sizeof(Objects_Control *)); 10ca8c: 03 45 d0 add -0x30(%ebp),%eax /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 10ca8f: 03 45 cc add -0x34(%ebp),%eax block_count++; /* * Allocate the tables and break it up. */ block_size = block_count * 10ca92: c1 e0 02 shl $0x2,%eax (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 10ca95: 50 push %eax 10ca96: 89 55 b8 mov %edx,-0x48(%ebp) 10ca99: e8 1a 1d 00 00 call 10e7b8 <_Workspace_Allocate> 10ca9e: 89 45 c4 mov %eax,-0x3c(%ebp) if ( !object_blocks ) { 10caa1: 83 c4 10 add $0x10,%esp 10caa4: 85 c0 test %eax,%eax 10caa6: 8b 55 b8 mov -0x48(%ebp),%edx 10caa9: 0f 84 de 01 00 00 je 10cc8d <_Objects_Extend_information+0x2c1> 10caaf: 8b 45 c4 mov -0x3c(%ebp),%eax 10cab2: 8d 04 b8 lea (%eax,%edi,4),%eax 10cab5: 89 45 bc mov %eax,-0x44(%ebp) 10cab8: 8b 4d c4 mov -0x3c(%ebp),%ecx 10cabb: 8d 04 f9 lea (%ecx,%edi,8),%eax * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 10cabe: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10cac2: 39 4d cc cmp %ecx,-0x34(%ebp) 10cac5: 0f 82 51 01 00 00 jb 10cc1c <_Objects_Extend_information+0x250> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10cacb: 8b 4d cc mov -0x34(%ebp),%ecx 10cace: 85 c9 test %ecx,%ecx 10cad0: 74 12 je 10cae4 <_Objects_Extend_information+0x118><== NEVER TAKEN 10cad2: 31 c9 xor %ecx,%ecx 10cad4: 8b 7d cc mov -0x34(%ebp),%edi 10cad7: 90 nop local_table[ index ] = NULL; 10cad8: c7 04 88 00 00 00 00 movl $0x0,(%eax,%ecx,4) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10cadf: 41 inc %ecx 10cae0: 39 cf cmp %ecx,%edi 10cae2: 77 f4 ja 10cad8 <_Objects_Extend_information+0x10c><== NEVER TAKEN 10cae4: c1 e6 02 shl $0x2,%esi 10cae7: 89 75 c0 mov %esi,-0x40(%ebp) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10caea: 8b 4d c4 mov -0x3c(%ebp),%ecx 10caed: 8b 75 c0 mov -0x40(%ebp),%esi 10caf0: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1) inactive_per_block[block_count] = 0; 10caf7: 8b 4d bc mov -0x44(%ebp),%ecx 10cafa: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10cb01: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10cb05: 03 75 d4 add -0x2c(%ebp),%esi * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10cb08: 39 75 d4 cmp %esi,-0x2c(%ebp) 10cb0b: 73 0f jae 10cb1c <_Objects_Extend_information+0x150><== NEVER TAKEN 10cb0d: 8b 4d d4 mov -0x2c(%ebp),%ecx index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10cb10: c7 04 88 00 00 00 00 movl $0x0,(%eax,%ecx,4) object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 10cb17: 41 inc %ecx * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10cb18: 39 f1 cmp %esi,%ecx 10cb1a: 72 f4 jb 10cb10 <_Objects_Extend_information+0x144> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10cb1c: 9c pushf 10cb1d: fa cli 10cb1e: 5f pop %edi old_tables = information->object_blocks; 10cb1f: 8b 4b 34 mov 0x34(%ebx),%ecx information->object_blocks = object_blocks; 10cb22: 8b 75 c4 mov -0x3c(%ebp),%esi 10cb25: 89 73 34 mov %esi,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10cb28: 8b 75 bc mov -0x44(%ebp),%esi 10cb2b: 89 73 30 mov %esi,0x30(%ebx) information->local_table = local_table; 10cb2e: 89 43 1c mov %eax,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10cb31: 8b 45 d0 mov -0x30(%ebp),%eax 10cb34: 66 89 43 10 mov %ax,0x10(%ebx) uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10cb38: 8b 33 mov (%ebx),%esi 10cb3a: c1 e6 18 shl $0x18,%esi 10cb3d: 81 ce 00 00 01 00 or $0x10000,%esi information->maximum_id = _Objects_Build_id( 10cb43: 0f b7 43 04 movzwl 0x4(%ebx),%eax (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10cb47: c1 e0 1b shl $0x1b,%eax 10cb4a: 09 c6 or %eax,%esi 10cb4c: 0f b7 45 d0 movzwl -0x30(%ebp),%eax uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10cb50: 09 c6 or %eax,%esi 10cb52: 89 73 0c mov %esi,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10cb55: 57 push %edi 10cb56: 9d popf if ( old_tables ) 10cb57: 85 c9 test %ecx,%ecx 10cb59: 74 12 je 10cb6d <_Objects_Extend_information+0x1a1> _Workspace_Free( old_tables ); 10cb5b: 83 ec 0c sub $0xc,%esp 10cb5e: 51 push %ecx 10cb5f: 89 55 b8 mov %edx,-0x48(%ebp) 10cb62: e8 6d 1c 00 00 call 10e7d4 <_Workspace_Free> 10cb67: 83 c4 10 add $0x10,%esp 10cb6a: 8b 55 b8 mov -0x48(%ebp),%edx } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10cb6d: c1 e2 02 shl $0x2,%edx 10cb70: 89 55 d0 mov %edx,-0x30(%ebp) 10cb73: 8b 43 34 mov 0x34(%ebx),%eax 10cb76: 8b 4d c8 mov -0x38(%ebp),%ecx 10cb79: 89 0c 10 mov %ecx,(%eax,%edx,1) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10cb7c: ff 73 18 pushl 0x18(%ebx) 10cb7f: 0f b7 43 14 movzwl 0x14(%ebx),%eax 10cb83: 50 push %eax 10cb84: 51 push %ecx 10cb85: 8d 7d dc lea -0x24(%ebp),%edi 10cb88: 57 push %edi 10cb89: e8 f2 38 00 00 call 110480 <_Chain_Initialize> /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10cb8e: 83 c4 10 add $0x10,%esp 10cb91: 8b 75 d4 mov -0x2c(%ebp),%esi information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10cb94: 8d 43 20 lea 0x20(%ebx),%eax 10cb97: 89 45 d4 mov %eax,-0x2c(%ebp) /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10cb9a: eb 29 jmp 10cbc5 <_Objects_Extend_information+0x1f9> 10cb9c: 8b 13 mov (%ebx),%edx 10cb9e: c1 e2 18 shl $0x18,%edx 10cba1: 81 ca 00 00 01 00 or $0x10000,%edx the_object->id = _Objects_Build_id( 10cba7: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10cbab: c1 e1 1b shl $0x1b,%ecx 10cbae: 09 ca or %ecx,%edx uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10cbb0: 09 f2 or %esi,%edx 10cbb2: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10cbb5: 83 ec 08 sub $0x8,%esp 10cbb8: 50 push %eax 10cbb9: ff 75 d4 pushl -0x2c(%ebp) 10cbbc: e8 47 f4 ff ff call 10c008 <_Chain_Append> index++; 10cbc1: 46 inc %esi 10cbc2: 83 c4 10 add $0x10,%esp /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10cbc5: 83 ec 0c sub $0xc,%esp 10cbc8: 57 push %edi 10cbc9: e8 76 f4 ff ff call 10c044 <_Chain_Get> 10cbce: 83 c4 10 add $0x10,%esp 10cbd1: 85 c0 test %eax,%eax 10cbd3: 75 c7 jne 10cb9c <_Objects_Extend_information+0x1d0> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10cbd5: 8b 43 14 mov 0x14(%ebx),%eax 10cbd8: 8b 53 30 mov 0x30(%ebx),%edx 10cbdb: 0f b7 c8 movzwl %ax,%ecx 10cbde: 8b 75 d0 mov -0x30(%ebp),%esi 10cbe1: 89 0c 32 mov %ecx,(%edx,%esi,1) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 10cbe4: 66 01 43 2c add %ax,0x2c(%ebx) } 10cbe8: 8d 65 f4 lea -0xc(%ebp),%esp 10cbeb: 5b pop %ebx 10cbec: 5e pop %esi 10cbed: 5f pop %edi 10cbee: c9 leave 10cbef: c3 ret 10cbf0: 89 45 d4 mov %eax,-0x2c(%ebp) else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; 10cbf3: 31 c9 xor %ecx,%ecx 10cbf5: e9 3c fe ff ff jmp 10ca36 <_Objects_Extend_information+0x6a> 10cbfa: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 10cbfc: 83 ec 0c sub $0xc,%esp 10cbff: 57 push %edi 10cc00: 89 55 b8 mov %edx,-0x48(%ebp) 10cc03: 88 4d b4 mov %cl,-0x4c(%ebp) 10cc06: e8 e1 1b 00 00 call 10e7ec <_Workspace_Allocate_or_fatal_error> 10cc0b: 89 45 c8 mov %eax,-0x38(%ebp) 10cc0e: 83 c4 10 add $0x10,%esp 10cc11: 8a 4d b4 mov -0x4c(%ebp),%cl 10cc14: 8b 55 b8 mov -0x48(%ebp),%edx 10cc17: e9 5f fe ff ff jmp 10ca7b <_Objects_Extend_information+0xaf> /* * 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, 10cc1c: c1 e6 02 shl $0x2,%esi 10cc1f: 89 75 c0 mov %esi,-0x40(%ebp) 10cc22: 8b 73 34 mov 0x34(%ebx),%esi 10cc25: 8b 7d c4 mov -0x3c(%ebp),%edi 10cc28: 8b 4d c0 mov -0x40(%ebp),%ecx 10cc2b: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10cc2d: 8b 73 30 mov 0x30(%ebx),%esi 10cc30: 8b 7d bc mov -0x44(%ebp),%edi 10cc33: 8b 4d c0 mov -0x40(%ebp),%ecx 10cc36: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); 10cc38: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10cc3c: 03 4d cc add -0x34(%ebp),%ecx information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10cc3f: c1 e1 02 shl $0x2,%ecx 10cc42: 8b 73 1c mov 0x1c(%ebx),%esi 10cc45: 89 c7 mov %eax,%edi 10cc47: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10cc49: e9 9c fe ff ff jmp 10caea <_Objects_Extend_information+0x11e> 10cc4e: 66 90 xchg %ax,%ax <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10cc50: 8b 53 10 mov 0x10(%ebx),%edx 10cc53: 66 89 55 d0 mov %dx,-0x30(%ebp) 10cc57: 0f b7 7b 14 movzwl 0x14(%ebx),%edi /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 10cc5b: 89 45 d4 mov %eax,-0x2c(%ebp) /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 10cc5e: b1 01 mov $0x1,%cl minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10cc60: 31 d2 xor %edx,%edx /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; 10cc62: 31 f6 xor %esi,%esi 10cc64: e9 cd fd ff ff jmp 10ca36 <_Objects_Extend_information+0x6a> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10cc69: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 10cc6c: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 10cc6f: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 10cc72: b1 01 mov $0x1,%cl <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10cc74: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cc76: e9 bb fd ff ff jmp 10ca36 <_Objects_Extend_information+0x6a><== NOT EXECUTED block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 10cc7b: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 10cc7e: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 10cc81: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; 10cc84: 31 c9 xor %ecx,%ecx <== NOT EXECUTED * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10cc86: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cc88: e9 a9 fd ff ff jmp 10ca36 <_Objects_Extend_information+0x6a><== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 10cc8d: 83 ec 0c sub $0xc,%esp 10cc90: ff 75 c8 pushl -0x38(%ebp) 10cc93: e8 3c 1b 00 00 call 10e7d4 <_Workspace_Free> return; 10cc98: 83 c4 10 add $0x10,%esp 10cc9b: e9 48 ff ff ff jmp 10cbe8 <_Objects_Extend_information+0x21c> =============================================================================== 0010cdd8 <_Objects_Get>: Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 10cdd8: 55 push %ebp 10cdd9: 89 e5 mov %esp,%ebp 10cddb: 53 push %ebx 10cddc: 83 ec 14 sub $0x14,%esp 10cddf: 8b 55 08 mov 0x8(%ebp),%edx 10cde2: 8b 5d 10 mov 0x10(%ebp),%ebx * always NULL. * * If the Id is valid but the object has not been created yet, then * the local_table entry will be NULL. */ index = id - information->minimum_id + 1; 10cde5: b8 01 00 00 00 mov $0x1,%eax 10cdea: 2b 42 08 sub 0x8(%edx),%eax 10cded: 03 45 0c add 0xc(%ebp),%eax /* * If the index is less than maximum, then it is OK to use it to * index into the local_table array. */ if ( index <= information->maximum ) { 10cdf0: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10cdf4: 39 c8 cmp %ecx,%eax 10cdf6: 77 24 ja 10ce1c <_Objects_Get+0x44> 10cdf8: 8b 0d d4 63 12 00 mov 0x1263d4,%ecx 10cdfe: 41 inc %ecx 10cdff: 89 0d d4 63 12 00 mov %ecx,0x1263d4 _Thread_Disable_dispatch(); if ( (the_object = information->local_table[ index ]) != NULL ) { 10ce05: 8b 52 1c mov 0x1c(%edx),%edx 10ce08: 8b 04 82 mov (%edx,%eax,4),%eax 10ce0b: 85 c0 test %eax,%eax 10ce0d: 74 1b je 10ce2a <_Objects_Get+0x52> *location = OBJECTS_LOCAL; 10ce0f: c7 03 00 00 00 00 movl $0x0,(%ebx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10ce15: 83 c4 14 add $0x14,%esp 10ce18: 5b pop %ebx 10ce19: c9 leave 10ce1a: c3 ret 10ce1b: 90 nop <== NOT EXECUTED /* * Object Id is not within this API and Class on this node. So * it may be global in a multiprocessing system. But it is clearly * invalid on a single processor system. */ *location = OBJECTS_ERROR; 10ce1c: c7 03 01 00 00 00 movl $0x1,(%ebx) #if defined(RTEMS_MULTIPROCESSING) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; 10ce22: 31 c0 xor %eax,%eax #endif } 10ce24: 83 c4 14 add $0x14,%esp 10ce27: 5b pop %ebx 10ce28: c9 leave 10ce29: c3 ret /* * Valid Id for this API, Class and Node but the object has not * been allocated yet. */ _Thread_Enable_dispatch(); 10ce2a: 89 45 f4 mov %eax,-0xc(%ebp) 10ce2d: e8 0a 08 00 00 call 10d63c <_Thread_Enable_dispatch> *location = OBJECTS_ERROR; 10ce32: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10ce38: 8b 45 f4 mov -0xc(%ebp),%eax 10ce3b: eb d8 jmp 10ce15 <_Objects_Get+0x3d> =============================================================================== 0010cd30 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10cd30: 55 push %ebp 10cd31: 89 e5 mov %esp,%ebp 10cd33: 56 push %esi 10cd34: 53 push %ebx 10cd35: 8b 75 08 mov 0x8(%ebp),%esi 10cd38: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10cd3b: 85 db test %ebx,%ebx 10cd3d: 75 09 jne 10cd48 <_Objects_Get_information+0x18> the_class_api_maximum = _Objects_API_maximum_class( the_api ); if ( the_class_api_maximum == 0 ) return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) return NULL; 10cd3f: 31 c0 xor %eax,%eax if ( info->maximum == 0 ) return NULL; #endif return info; } 10cd41: 8d 65 f8 lea -0x8(%ebp),%esp 10cd44: 5b pop %ebx 10cd45: 5e pop %esi 10cd46: c9 leave 10cd47: c3 ret /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); 10cd48: 83 ec 0c sub $0xc,%esp 10cd4b: 56 push %esi 10cd4c: e8 1f 3c 00 00 call 110970 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10cd51: 83 c4 10 add $0x10,%esp 10cd54: 85 c0 test %eax,%eax 10cd56: 74 e7 je 10cd3f <_Objects_Get_information+0xf> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10cd58: 39 c3 cmp %eax,%ebx 10cd5a: 77 e3 ja 10cd3f <_Objects_Get_information+0xf> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10cd5c: 8b 14 b5 ac 63 12 00 mov 0x1263ac(,%esi,4),%edx return NULL; 10cd63: 31 c0 xor %eax,%eax return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 10cd65: 85 d2 test %edx,%edx 10cd67: 74 d8 je 10cd41 <_Objects_Get_information+0x11><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10cd69: 8b 04 9a mov (%edx,%ebx,4),%eax if ( !info ) 10cd6c: 85 c0 test %eax,%eax 10cd6e: 74 d1 je 10cd41 <_Objects_Get_information+0x11><== NEVER TAKEN * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) return NULL; 10cd70: 31 d2 xor %edx,%edx 10cd72: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10cd77: 0f 95 c2 setne %dl 10cd7a: f7 da neg %edx 10cd7c: 21 d0 and %edx,%eax 10cd7e: eb c1 jmp 10cd41 <_Objects_Get_information+0x11> =============================================================================== 0010cd80 <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10cd80: 55 push %ebp 10cd81: 89 e5 mov %esp,%ebp 10cd83: 56 push %esi 10cd84: 53 push %ebx 10cd85: 8b 55 08 mov 0x8(%ebp),%edx 10cd88: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 10cd8b: b8 01 00 00 00 mov $0x1,%eax 10cd90: 2b 42 08 sub 0x8(%edx),%eax 10cd93: 03 45 0c add 0xc(%ebp),%eax _ISR_Disable( level ); 10cd96: 9c pushf 10cd97: fa cli 10cd98: 5e pop %esi if ( information->maximum >= index ) { 10cd99: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10cd9d: 39 c8 cmp %ecx,%eax 10cd9f: 77 1b ja 10cdbc <_Objects_Get_isr_disable+0x3c> if ( (the_object = information->local_table[ index ]) != NULL ) { 10cda1: 8b 52 1c mov 0x1c(%edx),%edx 10cda4: 8b 04 82 mov (%edx,%eax,4),%eax 10cda7: 85 c0 test %eax,%eax 10cda9: 74 21 je 10cdcc <_Objects_Get_isr_disable+0x4c> *location = OBJECTS_LOCAL; 10cdab: c7 03 00 00 00 00 movl $0x0,(%ebx) *level_p = level; 10cdb1: 8b 55 14 mov 0x14(%ebp),%edx 10cdb4: 89 32 mov %esi,(%edx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cdb6: 5b pop %ebx 10cdb7: 5e pop %esi 10cdb8: c9 leave 10cdb9: c3 ret 10cdba: 66 90 xchg %ax,%ax <== NOT EXECUTED } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 10cdbc: 56 push %esi 10cdbd: 9d popf *location = OBJECTS_ERROR; 10cdbe: c7 03 01 00 00 00 movl $0x1,(%ebx) #if defined(RTEMS_MULTIPROCESSING) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; 10cdc4: 31 c0 xor %eax,%eax #endif } 10cdc6: 5b pop %ebx 10cdc7: 5e pop %esi 10cdc8: c9 leave 10cdc9: c3 ret 10cdca: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( (the_object = information->local_table[ index ]) != NULL ) { *location = OBJECTS_LOCAL; *level_p = level; return the_object; } _ISR_Enable( level ); 10cdcc: 56 push %esi 10cdcd: 9d popf *location = OBJECTS_ERROR; 10cdce: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10cdd4: eb e0 jmp 10cdb6 <_Objects_Get_isr_disable+0x36> =============================================================================== 0010e458 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 10e458: 55 push %ebp 10e459: 89 e5 mov %esp,%ebp 10e45b: 57 push %edi 10e45c: 56 push %esi 10e45d: 53 push %ebx 10e45e: 83 ec 2c sub $0x2c,%esp 10e461: 8b 7d 08 mov 0x8(%ebp),%edi 10e464: 8b 75 0c mov 0xc(%ebp),%esi 10e467: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 10e46a: 85 f6 test %esi,%esi 10e46c: 75 0e jne 10e47c <_Objects_Get_name_as_string+0x24> #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; 10e46e: 31 db xor %ebx,%ebx _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } 10e470: 89 d8 mov %ebx,%eax 10e472: 8d 65 f4 lea -0xc(%ebp),%esp 10e475: 5b pop %ebx 10e476: 5e pop %esi 10e477: 5f pop %edi 10e478: c9 leave 10e479: c3 ret 10e47a: 66 90 xchg %ax,%ax <== NOT EXECUTED Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 10e47c: 85 db test %ebx,%ebx 10e47e: 74 f0 je 10e470 <_Objects_Get_name_as_string+0x18> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10e480: 85 ff test %edi,%edi 10e482: 75 08 jne 10e48c <_Objects_Get_name_as_string+0x34> 10e484: a1 98 18 13 00 mov 0x131898,%eax 10e489: 8b 78 08 mov 0x8(%eax),%edi information = _Objects_Get_information_id( tmpId ); 10e48c: 83 ec 0c sub $0xc,%esp 10e48f: 57 push %edi 10e490: e8 fb fe ff ff call 10e390 <_Objects_Get_information_id> if ( !information ) 10e495: 83 c4 10 add $0x10,%esp 10e498: 85 c0 test %eax,%eax 10e49a: 74 d2 je 10e46e <_Objects_Get_name_as_string+0x16> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 10e49c: 51 push %ecx 10e49d: 8d 55 e4 lea -0x1c(%ebp),%edx 10e4a0: 52 push %edx 10e4a1: 57 push %edi 10e4a2: 50 push %eax 10e4a3: e8 7c 00 00 00 call 10e524 <_Objects_Get> switch ( location ) { 10e4a8: 83 c4 10 add $0x10,%esp 10e4ab: 8b 55 e4 mov -0x1c(%ebp),%edx 10e4ae: 85 d2 test %edx,%edx 10e4b0: 75 bc jne 10e46e <_Objects_Get_name_as_string+0x16> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 10e4b2: 8b 50 0c mov 0xc(%eax),%edx lname[ 0 ] = (u32_name >> 24) & 0xff; 10e4b5: 89 d1 mov %edx,%ecx 10e4b7: c1 e9 18 shr $0x18,%ecx 10e4ba: 88 c8 mov %cl,%al 10e4bc: 88 4d df mov %cl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 10e4bf: 89 d1 mov %edx,%ecx 10e4c1: c1 e9 10 shr $0x10,%ecx 10e4c4: 88 4d e0 mov %cl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 10e4c7: 89 d1 mov %edx,%ecx 10e4c9: c1 e9 08 shr $0x8,%ecx 10e4cc: 88 4d e1 mov %cl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 10e4cf: 88 55 e2 mov %dl,-0x1e(%ebp) lname[ 4 ] = '\0'; 10e4d2: c6 45 e3 00 movb $0x0,-0x1d(%ebp) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e4d6: 4e dec %esi 10e4d7: 89 75 d4 mov %esi,-0x2c(%ebp) 10e4da: 74 42 je 10e51e <_Objects_Get_name_as_string+0xc6><== NEVER TAKEN 10e4dc: 84 c0 test %al,%al 10e4de: 74 3e je 10e51e <_Objects_Get_name_as_string+0xc6> 10e4e0: 89 d9 mov %ebx,%ecx 10e4e2: 31 d2 xor %edx,%edx 10e4e4: eb 0a jmp 10e4f0 <_Objects_Get_name_as_string+0x98> 10e4e6: 66 90 xchg %ax,%ax <== NOT EXECUTED 10e4e8: 8a 44 15 df mov -0x21(%ebp,%edx,1),%al 10e4ec: 84 c0 test %al,%al 10e4ee: 74 21 je 10e511 <_Objects_Get_name_as_string+0xb9> *d = (isprint((unsigned char)*s)) ? *s : '*'; 10e4f0: 0f b6 f0 movzbl %al,%esi 10e4f3: 8b 3d 28 75 12 00 mov 0x127528,%edi 10e4f9: 0f be 74 37 01 movsbl 0x1(%edi,%esi,1),%esi 10e4fe: 81 e6 97 00 00 00 and $0x97,%esi 10e504: 75 02 jne 10e508 <_Objects_Get_name_as_string+0xb0> 10e506: b0 2a mov $0x2a,%al 10e508: 88 01 mov %al,(%ecx) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e50a: 42 inc %edx 10e50b: 41 inc %ecx 10e50c: 3b 55 d4 cmp -0x2c(%ebp),%edx 10e50f: 72 d7 jb 10e4e8 <_Objects_Get_name_as_string+0x90> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 10e511: c6 01 00 movb $0x0,(%ecx) _Thread_Enable_dispatch(); 10e514: e8 6f 08 00 00 call 10ed88 <_Thread_Enable_dispatch> return name; 10e519: e9 52 ff ff ff jmp 10e470 <_Objects_Get_name_as_string+0x18> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e51e: 89 d9 mov %ebx,%ecx 10e520: eb ef jmp 10e511 <_Objects_Get_name_as_string+0xb9> =============================================================================== 0010cf20 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 10cf20: 55 push %ebp 10cf21: 89 e5 mov %esp,%ebp 10cf23: 57 push %edi 10cf24: 56 push %esi 10cf25: 53 push %ebx 10cf26: 83 ec 0c sub $0xc,%esp 10cf29: 8b 5d 08 mov 0x8(%ebp),%ebx 10cf2c: 8b 75 0c mov 0xc(%ebp),%esi 10cf2f: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Control *object; Objects_Id next_id; if ( !information ) 10cf32: 85 db test %ebx,%ebx 10cf34: 75 0a jne 10cf40 <_Objects_Get_next+0x20> if ( !location_p ) return NULL; if ( !next_id_p ) return NULL; 10cf36: 31 c0 xor %eax,%eax return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 10cf38: 8d 65 f4 lea -0xc(%ebp),%esp 10cf3b: 5b pop %ebx 10cf3c: 5e pop %esi 10cf3d: 5f pop %edi 10cf3e: c9 leave 10cf3f: c3 ret Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 10cf40: 85 ff test %edi,%edi 10cf42: 74 f2 je 10cf36 <_Objects_Get_next+0x16> return NULL; if ( !next_id_p ) 10cf44: 8b 45 14 mov 0x14(%ebp),%eax 10cf47: 85 c0 test %eax,%eax 10cf49: 74 eb je 10cf36 <_Objects_Get_next+0x16> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 10cf4b: 66 85 f6 test %si,%si 10cf4e: 75 04 jne 10cf54 <_Objects_Get_next+0x34> next_id = information->minimum_id; 10cf50: 8b 73 08 mov 0x8(%ebx),%esi 10cf53: 90 nop else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 10cf54: 66 39 73 10 cmp %si,0x10(%ebx) 10cf58: 72 22 jb 10cf7c <_Objects_Get_next+0x5c> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 10cf5a: 51 push %ecx 10cf5b: 57 push %edi 10cf5c: 56 push %esi 10cf5d: 53 push %ebx 10cf5e: e8 2d 00 00 00 call 10cf90 <_Objects_Get> next_id++; 10cf63: 46 inc %esi } while (*location_p != OBJECTS_LOCAL); 10cf64: 83 c4 10 add $0x10,%esp 10cf67: 8b 17 mov (%edi),%edx 10cf69: 85 d2 test %edx,%edx 10cf6b: 75 e7 jne 10cf54 <_Objects_Get_next+0x34> *next_id_p = next_id; 10cf6d: 8b 55 14 mov 0x14(%ebp),%edx 10cf70: 89 32 mov %esi,(%edx) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 10cf72: 8d 65 f4 lea -0xc(%ebp),%esp 10cf75: 5b pop %ebx 10cf76: 5e pop %esi 10cf77: 5f pop %edi 10cf78: c9 leave 10cf79: c3 ret 10cf7a: 66 90 xchg %ax,%ax <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 10cf7c: c7 07 01 00 00 00 movl $0x1,(%edi) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 10cf82: 8b 45 14 mov 0x14(%ebp),%eax 10cf85: c7 00 ff ff ff ff movl $0xffffffff,(%eax) return 0; 10cf8b: 31 c0 xor %eax,%eax 10cf8d: eb a9 jmp 10cf38 <_Objects_Get_next+0x18> =============================================================================== 0011b220 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 11b220: 55 push %ebp 11b221: 89 e5 mov %esp,%ebp 11b223: 53 push %ebx 11b224: 8b 55 08 mov 0x8(%ebp),%edx 11b227: 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; 11b22a: b8 01 00 00 00 mov $0x1,%eax 11b22f: 2b 42 08 sub 0x8(%edx),%eax 11b232: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 11b235: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 11b239: 39 c8 cmp %ecx,%eax 11b23b: 77 13 ja 11b250 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 11b23d: 8b 52 1c mov 0x1c(%edx),%edx 11b240: 8b 04 82 mov (%edx,%eax,4),%eax 11b243: 85 c0 test %eax,%eax 11b245: 74 09 je 11b250 <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 11b247: c7 03 00 00 00 00 movl $0x0,(%ebx) * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; return NULL; } 11b24d: 5b pop %ebx 11b24e: c9 leave 11b24f: c3 ret /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 11b250: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 11b256: 31 c0 xor %eax,%eax } 11b258: 5b pop %ebx 11b259: c9 leave 11b25a: c3 ret =============================================================================== 0010e068 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10e068: 55 push %ebp 10e069: 89 e5 mov %esp,%ebp 10e06b: 83 ec 18 sub $0x18,%esp 10e06e: 8b 55 08 mov 0x8(%ebp),%edx /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10e071: 85 d2 test %edx,%edx 10e073: 75 08 jne 10e07d <_Objects_Id_to_name+0x15> 10e075: a1 58 86 12 00 mov 0x128658,%eax 10e07a: 8b 50 08 mov 0x8(%eax),%edx 10e07d: 89 d0 mov %edx,%eax 10e07f: c1 e8 18 shr $0x18,%eax 10e082: 83 e0 07 and $0x7,%eax */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 10e085: 8d 48 ff lea -0x1(%eax),%ecx 10e088: 83 f9 02 cmp $0x2,%ecx 10e08b: 77 3b ja 10e0c8 <_Objects_Id_to_name+0x60> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 10e08d: 8b 04 85 8c 83 12 00 mov 0x12838c(,%eax,4),%eax 10e094: 85 c0 test %eax,%eax 10e096: 74 30 je 10e0c8 <_Objects_Id_to_name+0x60><== NEVER TAKEN */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10e098: 89 d1 mov %edx,%ecx 10e09a: c1 e9 1b shr $0x1b,%ecx return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10e09d: 8b 04 88 mov (%eax,%ecx,4),%eax if ( !information ) 10e0a0: 85 c0 test %eax,%eax 10e0a2: 74 24 je 10e0c8 <_Objects_Id_to_name+0x60><== NEVER TAKEN #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 10e0a4: 51 push %ecx 10e0a5: 8d 4d f4 lea -0xc(%ebp),%ecx 10e0a8: 51 push %ecx 10e0a9: 52 push %edx 10e0aa: 50 push %eax 10e0ab: e8 50 ff ff ff call 10e000 <_Objects_Get> if ( !the_object ) 10e0b0: 83 c4 10 add $0x10,%esp 10e0b3: 85 c0 test %eax,%eax 10e0b5: 74 11 je 10e0c8 <_Objects_Id_to_name+0x60> return OBJECTS_INVALID_ID; *name = the_object->name; 10e0b7: 8b 50 0c mov 0xc(%eax),%edx 10e0ba: 8b 45 0c mov 0xc(%ebp),%eax 10e0bd: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10e0bf: e8 08 08 00 00 call 10e8cc <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10e0c4: 31 c0 xor %eax,%eax } 10e0c6: c9 leave 10e0c7: 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 ] ) return OBJECTS_INVALID_ID; 10e0c8: b8 03 00 00 00 mov $0x3,%eax return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 10e0cd: c9 leave 10e0ce: c3 ret =============================================================================== 0010ce40 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10ce40: 55 push %ebp 10ce41: 89 e5 mov %esp,%ebp 10ce43: 57 push %edi 10ce44: 56 push %esi 10ce45: 53 push %ebx 10ce46: 83 ec 0c sub $0xc,%esp 10ce49: 8b 45 08 mov 0x8(%ebp),%eax 10ce4c: 8b 55 0c mov 0xc(%ebp),%edx 10ce4f: 8b 5d 10 mov 0x10(%ebp),%ebx 10ce52: 8b 75 20 mov 0x20(%ebp),%esi 10ce55: 0f b7 7d 18 movzwl 0x18(%ebp),%edi uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 10ce59: 89 10 mov %edx,(%eax) information->the_class = the_class; 10ce5b: 66 89 58 04 mov %bx,0x4(%eax) information->size = size; 10ce5f: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10ce62: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10ce69: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10ce70: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10ce77: 66 c7 40 2c 00 00 movw $0x0,0x2c(%eax) /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; 10ce7d: 66 c7 40 10 00 00 movw $0x0,0x10(%eax) /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 10ce83: 8b 3c 95 ac 63 12 00 mov 0x1263ac(,%edx,4),%edi 10ce8a: 89 04 9f mov %eax,(%edi,%ebx,4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 10ce8d: 8b 7d 14 mov 0x14(%ebp),%edi 10ce90: c1 ef 1f shr $0x1f,%edi _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 10ce93: 89 f9 mov %edi,%ecx 10ce95: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10ce98: 8b 4d 14 mov 0x14(%ebp),%ecx 10ce9b: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10cea1: 85 ff test %edi,%edi 10cea3: 74 04 je 10cea9 <_Objects_Initialize_information+0x69> 10cea5: 85 c9 test %ecx,%ecx 10cea7: 74 6a je 10cf13 <_Objects_Initialize_information+0xd3> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10cea9: 66 89 48 14 mov %cx,0x14(%eax) /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 10cead: c7 40 1c 44 60 12 00 movl $0x126044,0x1c(%eax) uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10ceb4: c1 e2 18 shl $0x18,%edx 10ceb7: 81 ca 00 00 01 00 or $0x10000,%edx (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10cebd: c1 e3 1b shl $0x1b,%ebx 10cec0: 09 da or %ebx,%edx /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; 10cec2: 31 db xor %ebx,%ebx 10cec4: 85 c9 test %ecx,%ecx 10cec6: 0f 95 c3 setne %bl uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10cec9: 09 da or %ebx,%edx 10cecb: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10cece: f7 c6 03 00 00 00 test $0x3,%esi 10ced4: 75 26 jne 10cefc <_Objects_Initialize_information+0xbc><== NEVER TAKEN name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10ced6: 66 89 70 38 mov %si,0x38(%eax) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ceda: 8d 50 24 lea 0x24(%eax),%edx 10cedd: 89 50 20 mov %edx,0x20(%eax) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10cee0: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) _Chain_Initialize_empty( &information->Inactive ); 10cee7: 8d 50 20 lea 0x20(%eax),%edx 10ceea: 89 50 28 mov %edx,0x28(%eax) /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10ceed: 85 c9 test %ecx,%ecx 10ceef: 75 13 jne 10cf04 <_Objects_Initialize_information+0xc4> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10cef1: 8d 65 f4 lea -0xc(%ebp),%esp 10cef4: 5b pop %ebx 10cef5: 5e pop %esi 10cef6: 5f pop %edi 10cef7: c9 leave 10cef8: c3 ret 10cef9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 10cefc: 83 c6 04 add $0x4,%esi <== NOT EXECUTED 10ceff: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED 10cf02: eb d2 jmp 10ced6 <_Objects_Initialize_information+0x96><== NOT EXECUTED /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 10cf04: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10cf07: 8d 65 f4 lea -0xc(%ebp),%esp 10cf0a: 5b pop %ebx 10cf0b: 5e pop %esi 10cf0c: 5f pop %edi 10cf0d: 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 ); 10cf0e: e9 b9 fa ff ff jmp 10c9cc <_Objects_Extend_information> /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 10cf13: 50 push %eax 10cf14: 6a 13 push $0x13 10cf16: 6a 01 push $0x1 10cf18: 6a 00 push $0x0 10cf1a: e8 79 f9 ff ff call 10c898 <_Internal_error_Occurred> =============================================================================== 0010cf30 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10cf30: 55 push %ebp 10cf31: 89 e5 mov %esp,%ebp 10cf33: 57 push %edi 10cf34: 56 push %esi 10cf35: 53 push %ebx 10cf36: 8b 45 08 mov 0x8(%ebp),%eax 10cf39: 8b 4d 0c mov 0xc(%ebp),%ecx 10cf3c: 8b 55 10 mov 0x10(%ebp),%edx 10cf3f: 8b 7d 14 mov 0x14(%ebp),%edi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10cf42: 85 ff test %edi,%edi 10cf44: 74 56 je 10cf9c <_Objects_Name_to_id_u32+0x6c> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10cf46: 85 c9 test %ecx,%ecx 10cf48: 74 08 je 10cf52 <_Objects_Name_to_id_u32+0x22> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10cf4a: 8b 70 10 mov 0x10(%eax),%esi 10cf4d: 66 85 f6 test %si,%si 10cf50: 75 0a jne 10cf5c <_Objects_Name_to_id_u32+0x2c> return OBJECTS_INVALID_NAME; name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; 10cf52: b8 01 00 00 00 mov $0x1,%eax #endif } 10cf57: 5b pop %ebx 10cf58: 5e pop %esi 10cf59: 5f pop %edi 10cf5a: c9 leave 10cf5b: c3 ret if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10cf5c: 85 d2 test %edx,%edx 10cf5e: 75 20 jne 10cf80 <_Objects_Name_to_id_u32+0x50> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10cf60: 0f b7 f6 movzwl %si,%esi 10cf63: 8b 58 1c mov 0x1c(%eax),%ebx 10cf66: b8 01 00 00 00 mov $0x1,%eax 10cf6b: 90 nop the_object = information->local_table[ index ]; 10cf6c: 8b 14 83 mov (%ebx,%eax,4),%edx if ( !the_object ) 10cf6f: 85 d2 test %edx,%edx 10cf71: 74 05 je 10cf78 <_Objects_Name_to_id_u32+0x48> continue; if ( name == the_object->name.name_u32 ) { 10cf73: 39 4a 0c cmp %ecx,0xc(%edx) 10cf76: 74 18 je 10cf90 <_Objects_Name_to_id_u32+0x60> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10cf78: 40 inc %eax 10cf79: 39 c6 cmp %eax,%esi 10cf7b: 73 ef jae 10cf6c <_Objects_Name_to_id_u32+0x3c> 10cf7d: eb d3 jmp 10cf52 <_Objects_Name_to_id_u32+0x22> 10cf7f: 90 nop <== NOT EXECUTED return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && (node == OBJECTS_SEARCH_ALL_NODES || 10cf80: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10cf86: 74 d8 je 10cf60 <_Objects_Name_to_id_u32+0x30> node == OBJECTS_SEARCH_LOCAL_NODE || 10cf88: 4a dec %edx 10cf89: 75 c7 jne 10cf52 <_Objects_Name_to_id_u32+0x22> 10cf8b: eb d3 jmp 10cf60 <_Objects_Name_to_id_u32+0x30> 10cf8d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_object = information->local_table[ index ]; if ( !the_object ) continue; if ( name == the_object->name.name_u32 ) { *id = the_object->id; 10cf90: 8b 42 08 mov 0x8(%edx),%eax 10cf93: 89 07 mov %eax,(%edi) return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10cf95: 31 c0 xor %eax,%eax name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 10cf97: 5b pop %ebx 10cf98: 5e pop %esi 10cf99: 5f pop %edi 10cf9a: c9 leave 10cf9b: c3 ret #endif /* ASSERT: information->is_string == false */ if ( !id ) return OBJECTS_INVALID_ADDRESS; 10cf9c: b8 02 00 00 00 mov $0x2,%eax name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 10cfa1: 5b pop %ebx 10cfa2: 5e pop %esi 10cfa3: 5f pop %edi 10cfa4: c9 leave 10cfa5: c3 ret =============================================================================== 0010ed64 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10ed64: 55 push %ebp 10ed65: 89 e5 mov %esp,%ebp 10ed67: 53 push %ebx 10ed68: 83 ec 0c sub $0xc,%esp 10ed6b: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10ed6e: 8b 45 08 mov 0x8(%ebp),%eax 10ed71: 0f b7 40 38 movzwl 0x38(%eax),%eax 10ed75: 50 push %eax 10ed76: 53 push %ebx 10ed77: e8 fc 65 00 00 call 115378 d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10ed7c: 0f be 0b movsbl (%ebx),%ecx 10ed7f: c1 e1 18 shl $0x18,%ecx 10ed82: 83 c4 10 add $0x10,%esp 10ed85: 83 f8 01 cmp $0x1,%eax 10ed88: 76 32 jbe 10edbc <_Objects_Set_name+0x58> 10ed8a: 0f be 53 01 movsbl 0x1(%ebx),%edx 10ed8e: c1 e2 10 shl $0x10,%edx 10ed91: 09 ca or %ecx,%edx 10ed93: 83 f8 02 cmp $0x2,%eax 10ed96: 74 2c je 10edc4 <_Objects_Set_name+0x60> 10ed98: 0f be 4b 02 movsbl 0x2(%ebx),%ecx 10ed9c: c1 e1 08 shl $0x8,%ecx 10ed9f: 09 d1 or %edx,%ecx 10eda1: 83 f8 03 cmp $0x3,%eax 10eda4: 74 37 je 10eddd <_Objects_Set_name+0x79> 10eda6: 0f be 43 03 movsbl 0x3(%ebx),%eax 10edaa: 09 c1 or %eax,%ecx 10edac: 8b 55 0c mov 0xc(%ebp),%edx 10edaf: 89 4a 0c mov %ecx,0xc(%edx) ); } return true; } 10edb2: b0 01 mov $0x1,%al 10edb4: 8b 5d fc mov -0x4(%ebp),%ebx 10edb7: c9 leave 10edb8: c3 ret 10edb9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10edbc: 89 ca mov %ecx,%edx 10edbe: 81 ca 00 00 20 00 or $0x200000,%edx 10edc4: 89 d1 mov %edx,%ecx 10edc6: 80 cd 20 or $0x20,%ch 10edc9: b8 20 00 00 00 mov $0x20,%eax 10edce: 09 c1 or %eax,%ecx 10edd0: 8b 55 0c mov 0xc(%ebp),%edx 10edd3: 89 4a 0c mov %ecx,0xc(%edx) ); } return true; } 10edd6: b0 01 mov $0x1,%al 10edd8: 8b 5d fc mov -0x4(%ebp),%ebx 10eddb: c9 leave 10eddc: c3 ret d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10eddd: b8 20 00 00 00 mov $0x20,%eax 10ede2: eb c6 jmp 10edaa <_Objects_Set_name+0x46> =============================================================================== 0010cfa8 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10cfa8: 55 push %ebp 10cfa9: 89 e5 mov %esp,%ebp 10cfab: 57 push %edi 10cfac: 56 push %esi 10cfad: 53 push %ebx 10cfae: 83 ec 1c sub $0x1c,%esp /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 10cfb1: 8b 45 08 mov 0x8(%ebp),%eax 10cfb4: 0f b7 58 08 movzwl 0x8(%eax),%ebx block_count = (information->maximum - index_base) / 10cfb8: 0f b7 48 14 movzwl 0x14(%eax),%ecx 10cfbc: 0f b7 40 10 movzwl 0x10(%eax),%eax 10cfc0: 29 d8 sub %ebx,%eax 10cfc2: 31 d2 xor %edx,%edx 10cfc4: f7 f1 div %ecx information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10cfc6: 85 c0 test %eax,%eax 10cfc8: 74 21 je 10cfeb <_Objects_Shrink_information+0x43><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 10cfca: 8b 55 08 mov 0x8(%ebp),%edx 10cfcd: 8b 7a 30 mov 0x30(%edx),%edi 10cfd0: 3b 0f cmp (%edi),%ecx 10cfd2: 74 1f je 10cff3 <_Objects_Shrink_information+0x4b><== NEVER TAKEN 10cfd4: 31 d2 xor %edx,%edx 10cfd6: eb 0e jmp 10cfe6 <_Objects_Shrink_information+0x3e> information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 10cfd8: 01 cb add %ecx,%ebx 10cfda: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 10cfe1: 3b 0c 97 cmp (%edi,%edx,4),%ecx 10cfe4: 74 12 je 10cff8 <_Objects_Shrink_information+0x50> index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10cfe6: 42 inc %edx 10cfe7: 39 d0 cmp %edx,%eax 10cfe9: 77 ed ja 10cfd8 <_Objects_Shrink_information+0x30> return; } index_base += information->allocation_size; } } 10cfeb: 8d 65 f4 lea -0xc(%ebp),%esp 10cfee: 5b pop %ebx 10cfef: 5e pop %esi 10cff0: 5f pop %edi 10cff1: c9 leave 10cff2: c3 ret index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 10cff3: 31 f6 xor %esi,%esi <== NOT EXECUTED 10cff5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 10cff8: 8b 55 08 mov 0x8(%ebp),%edx 10cffb: 8b 42 20 mov 0x20(%edx),%eax 10cffe: 89 75 e4 mov %esi,-0x1c(%ebp) 10d001: eb 07 jmp 10d00a <_Objects_Shrink_information+0x62> 10d003: 90 nop <== NOT EXECUTED if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 10d004: 85 ff test %edi,%edi 10d006: 74 2c je 10d034 <_Objects_Shrink_information+0x8c> index = _Objects_Get_index( the_object->id ); /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 10d008: 89 f8 mov %edi,%eax * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id ); 10d00a: 0f b7 50 08 movzwl 0x8(%eax),%edx /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 10d00e: 8b 38 mov (%eax),%edi if ((index >= index_base) && 10d010: 39 da cmp %ebx,%edx 10d012: 72 f0 jb 10d004 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { 10d014: 8b 75 08 mov 0x8(%ebp),%esi 10d017: 0f b7 4e 14 movzwl 0x14(%esi),%ecx 10d01b: 8d 0c 0b lea (%ebx,%ecx,1),%ecx /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && 10d01e: 39 ca cmp %ecx,%edx 10d020: 73 e2 jae 10d004 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 10d022: 83 ec 0c sub $0xc,%esp 10d025: 50 push %eax 10d026: e8 01 f0 ff ff call 10c02c <_Chain_Extract> 10d02b: 83 c4 10 add $0x10,%esp } } while ( the_object ); 10d02e: 85 ff test %edi,%edi 10d030: 75 d6 jne 10d008 <_Objects_Shrink_information+0x60> 10d032: 66 90 xchg %ax,%ax 10d034: 8b 75 e4 mov -0x1c(%ebp),%esi /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10d037: 83 ec 0c sub $0xc,%esp 10d03a: 8b 55 08 mov 0x8(%ebp),%edx 10d03d: 8b 42 34 mov 0x34(%edx),%eax 10d040: ff 34 30 pushl (%eax,%esi,1) 10d043: e8 8c 17 00 00 call 10e7d4 <_Workspace_Free> information->object_blocks[ block ] = NULL; 10d048: 8b 55 08 mov 0x8(%ebp),%edx 10d04b: 8b 42 34 mov 0x34(%edx),%eax 10d04e: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive_per_block[ block ] = 0; 10d055: 8b 42 30 mov 0x30(%edx),%eax 10d058: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive -= information->allocation_size; 10d05f: 8b 42 14 mov 0x14(%edx),%eax 10d062: 66 29 42 2c sub %ax,0x2c(%edx) return; 10d066: 83 c4 10 add $0x10,%esp } index_base += information->allocation_size; } } 10d069: 8d 65 f4 lea -0xc(%ebp),%esp 10d06c: 5b pop %ebx 10d06d: 5e pop %esi 10d06e: 5f pop %edi 10d06f: c9 leave 10d070: c3 ret =============================================================================== 00110aa0 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 110aa0: 55 push %ebp 110aa1: 89 e5 mov %esp,%ebp 110aa3: 56 push %esi 110aa4: 53 push %ebx 110aa5: 8b 5d 08 mov 0x8(%ebp),%ebx 110aa8: 8b 75 0c mov 0xc(%ebp),%esi if ( !the_heap ) 110aab: 85 db test %ebx,%ebx 110aad: 74 35 je 110ae4 <_Protected_heap_Get_information+0x44> return false; if ( !the_info ) 110aaf: 85 f6 test %esi,%esi 110ab1: 74 31 je 110ae4 <_Protected_heap_Get_information+0x44> return false; _RTEMS_Lock_allocator(); 110ab3: 83 ec 0c sub $0xc,%esp 110ab6: ff 35 24 d5 12 00 pushl 0x12d524 110abc: e8 6b e5 ff ff call 10f02c <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 110ac1: 5a pop %edx 110ac2: 59 pop %ecx 110ac3: 56 push %esi 110ac4: 53 push %ebx 110ac5: e8 7a 3a 00 00 call 114544 <_Heap_Get_information> _RTEMS_Unlock_allocator(); 110aca: 58 pop %eax 110acb: ff 35 24 d5 12 00 pushl 0x12d524 110ad1: e8 9e e5 ff ff call 10f074 <_API_Mutex_Unlock> return true; 110ad6: 83 c4 10 add $0x10,%esp 110ad9: b0 01 mov $0x1,%al } 110adb: 8d 65 f8 lea -0x8(%ebp),%esp 110ade: 5b pop %ebx 110adf: 5e pop %esi 110ae0: c9 leave 110ae1: c3 ret 110ae2: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !the_heap ) return false; if ( !the_info ) return false; 110ae4: 31 c0 xor %eax,%eax _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); return true; } 110ae6: 8d 65 f8 lea -0x8(%ebp),%esp 110ae9: 5b pop %ebx 110aea: 5e pop %esi 110aeb: c9 leave 110aec: c3 ret =============================================================================== 00110b44 <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 110b44: 55 push %ebp 110b45: 89 e5 mov %esp,%ebp 110b47: 56 push %esi 110b48: 53 push %ebx 110b49: 83 ec 10 sub $0x10,%esp 110b4c: 8b 5d 08 mov 0x8(%ebp),%ebx 110b4f: 8b 75 0c mov 0xc(%ebp),%esi 110b52: 8a 45 10 mov 0x10(%ebp),%al * then it is forbidden to lock a mutex. But since we are inside * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { 110b55: 8b 15 74 d4 12 00 mov 0x12d474,%edx 110b5b: 85 d2 test %edx,%edx 110b5d: 74 19 je 110b78 <_Protected_heap_Walk+0x34> _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 110b5f: 0f b6 c0 movzbl %al,%eax 110b62: 89 45 10 mov %eax,0x10(%ebp) 110b65: 89 75 0c mov %esi,0xc(%ebp) 110b68: 89 5d 08 mov %ebx,0x8(%ebp) } return status; } 110b6b: 8d 65 f8 lea -0x8(%ebp),%esp 110b6e: 5b pop %ebx 110b6f: 5e pop %esi 110b70: c9 leave if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 110b71: e9 7e f2 ff ff jmp 10fdf4 <_Heap_Walk> 110b76: 66 90 xchg %ax,%ax <== NOT EXECUTED * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); 110b78: 83 ec 0c sub $0xc,%esp 110b7b: ff 35 24 d5 12 00 pushl 0x12d524 110b81: 88 45 f4 mov %al,-0xc(%ebp) 110b84: e8 a3 e4 ff ff call 10f02c <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 110b89: 83 c4 0c add $0xc,%esp 110b8c: 8a 45 f4 mov -0xc(%ebp),%al 110b8f: 0f b6 c0 movzbl %al,%eax 110b92: 50 push %eax 110b93: 56 push %esi 110b94: 53 push %ebx 110b95: e8 5a f2 ff ff call 10fdf4 <_Heap_Walk> _RTEMS_Unlock_allocator(); 110b9a: 5a pop %edx 110b9b: ff 35 24 d5 12 00 pushl 0x12d524 110ba1: 88 45 f4 mov %al,-0xc(%ebp) 110ba4: e8 cb e4 ff ff call 10f074 <_API_Mutex_Unlock> 110ba9: 83 c4 10 add $0x10,%esp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 110bac: 8a 45 f4 mov -0xc(%ebp),%al 110baf: 8d 65 f8 lea -0x8(%ebp),%esp 110bb2: 5b pop %ebx 110bb3: 5e pop %esi 110bb4: c9 leave 110bb5: c3 ret =============================================================================== 00110290 <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 110290: 55 push %ebp 110291: 89 e5 mov %esp,%ebp 110293: 53 push %ebx 110294: 83 ec 10 sub $0x10,%esp 110297: 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 ); 11029a: 80 3d 84 22 12 00 01 cmpb $0x1,0x122284 1102a1: 19 c0 sbb %eax,%eax 1102a3: 83 e0 c0 and $0xffffffc0,%eax 1102a6: 83 c0 60 add $0x60,%eax if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 1102a9: 50 push %eax 1102aa: e8 09 e5 ff ff call 10e7b8 <_Workspace_Allocate> if ( !api ) 1102af: 83 c4 10 add $0x10,%esp 1102b2: 85 c0 test %eax,%eax 1102b4: 74 6a je 110320 <_RTEMS_tasks_Create_extension+0x90> return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 1102b6: 89 83 f0 00 00 00 mov %eax,0xf0(%ebx) api->pending_events = EVENT_SETS_NONE_PENDING; 1102bc: c7 00 00 00 00 00 movl $0x0,(%eax) api->event_condition = 0; 1102c2: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 1102c9: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 1102cd: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 1102d4: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 1102db: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 1102e2: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 1102e9: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 1102f0: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 1102f7: 00 00 00 if ( rtems_configuration_get_notepads_enabled() ) { 1102fa: 80 3d 84 22 12 00 00 cmpb $0x0,0x122284 110301: 74 13 je 110316 <_RTEMS_tasks_Create_extension+0x86> 110303: 31 d2 xor %edx,%edx 110305: 8d 76 00 lea 0x0(%esi),%esi for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 110308: c7 44 90 20 00 00 00 movl $0x0,0x20(%eax,%edx,4) 11030f: 00 api->event_condition = 0; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) 110310: 42 inc %edx 110311: 83 fa 10 cmp $0x10,%edx 110314: 75 f2 jne 110308 <_RTEMS_tasks_Create_extension+0x78> api->Notepads[i] = 0; } return true; 110316: b0 01 mov $0x1,%al } 110318: 8b 5d fc mov -0x4(%ebp),%ebx 11031b: c9 leave 11031c: c3 ret 11031d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); if ( !api ) return false; 110320: 31 c0 xor %eax,%eax for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } 110322: 8b 5d fc mov -0x4(%ebp),%ebx 110325: c9 leave 110326: c3 ret =============================================================================== 00110238 <_RTEMS_tasks_Delete_extension>: void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { 110238: 55 push %ebp 110239: 89 e5 mov %esp,%ebp 11023b: 56 push %esi 11023c: 53 push %ebx 11023d: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Free per task variable memory */ tvp = deleted->task_variables; 110240: 8b 83 fc 00 00 00 mov 0xfc(%ebx),%eax deleted->task_variables = NULL; 110246: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 11024d: 00 00 00 while (tvp) { 110250: 85 c0 test %eax,%eax 110252: 75 06 jne 11025a <_RTEMS_tasks_Delete_extension+0x22> 110254: eb 17 jmp 11026d <_RTEMS_tasks_Delete_extension+0x35> 110256: 66 90 xchg %ax,%ax <== NOT EXECUTED next = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); tvp = next; 110258: 89 f0 mov %esi,%eax */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { next = (rtems_task_variable_t *)tvp->next; 11025a: 8b 30 mov (%eax),%esi _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 11025c: 83 ec 08 sub $0x8,%esp 11025f: 50 push %eax 110260: 53 push %ebx 110261: e8 56 01 00 00 call 1103bc <_RTEMS_Tasks_Invoke_task_variable_dtor> * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 110266: 83 c4 10 add $0x10,%esp 110269: 85 f6 test %esi,%esi 11026b: 75 eb jne 110258 <_RTEMS_tasks_Delete_extension+0x20> /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); 11026d: 83 ec 0c sub $0xc,%esp 110270: ff b3 f0 00 00 00 pushl 0xf0(%ebx) 110276: e8 59 e5 ff ff call 10e7d4 <_Workspace_Free> deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; 11027b: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 110282: 00 00 00 110285: 83 c4 10 add $0x10,%esp } 110288: 8d 65 f8 lea -0x8(%ebp),%esp 11028b: 5b pop %ebx 11028c: 5e pop %esi 11028d: c9 leave 11028e: c3 ret =============================================================================== 001101bc <_RTEMS_tasks_Initialize_user_tasks>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks( void ) { 1101bc: 55 push %ebp 1101bd: 89 e5 mov %esp,%ebp 1101bf: 83 ec 08 sub $0x8,%esp if ( _RTEMS_tasks_Initialize_user_tasks_p ) 1101c2: a1 00 23 12 00 mov 0x122300,%eax 1101c7: 85 c0 test %eax,%eax 1101c9: 74 05 je 1101d0 <_RTEMS_tasks_Initialize_user_tasks+0x14> (*_RTEMS_tasks_Initialize_user_tasks_p)(); } 1101cb: c9 leave */ void _RTEMS_tasks_Initialize_user_tasks( void ) { if ( _RTEMS_tasks_Initialize_user_tasks_p ) (*_RTEMS_tasks_Initialize_user_tasks_p)(); 1101cc: ff e0 jmp *%eax 1101ce: 66 90 xchg %ax,%ax <== NOT EXECUTED } 1101d0: c9 leave 1101d1: c3 ret =============================================================================== 0010bb08 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 10bb08: 55 push %ebp 10bb09: 89 e5 mov %esp,%ebp 10bb0b: 57 push %edi 10bb0c: 56 push %esi 10bb0d: 53 push %ebx 10bb0e: 83 ec 1c sub $0x1c,%esp rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; 10bb11: 8b 1d ac 22 12 00 mov 0x1222ac,%ebx maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 10bb17: 8b 3d a8 22 12 00 mov 0x1222a8,%edi /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 10bb1d: 85 db test %ebx,%ebx 10bb1f: 74 46 je 10bb67 <_RTEMS_tasks_Initialize_user_tasks_body+0x5f> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10bb21: 85 ff test %edi,%edi 10bb23: 74 42 je 10bb67 <_RTEMS_tasks_Initialize_user_tasks_body+0x5f><== NEVER TAKEN 10bb25: 31 f6 xor %esi,%esi 10bb27: 90 nop return_value = rtems_task_create( 10bb28: 83 ec 08 sub $0x8,%esp 10bb2b: 8d 45 e4 lea -0x1c(%ebp),%eax 10bb2e: 50 push %eax 10bb2f: ff 73 0c pushl 0xc(%ebx) 10bb32: ff 73 14 pushl 0x14(%ebx) 10bb35: ff 73 04 pushl 0x4(%ebx) 10bb38: ff 73 08 pushl 0x8(%ebx) 10bb3b: ff 33 pushl (%ebx) 10bb3d: e8 92 fd ff ff call 10b8d4 user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 10bb42: 83 c4 20 add $0x20,%esp 10bb45: 85 c0 test %eax,%eax 10bb47: 75 26 jne 10bb6f <_RTEMS_tasks_Initialize_user_tasks_body+0x67> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 10bb49: 51 push %ecx 10bb4a: ff 73 18 pushl 0x18(%ebx) 10bb4d: ff 73 10 pushl 0x10(%ebx) 10bb50: ff 75 e4 pushl -0x1c(%ebp) 10bb53: e8 24 00 00 00 call 10bb7c id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 10bb58: 83 c4 10 add $0x10,%esp 10bb5b: 85 c0 test %eax,%eax 10bb5d: 75 10 jne 10bb6f <_RTEMS_tasks_Initialize_user_tasks_body+0x67> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10bb5f: 46 inc %esi 10bb60: 83 c3 1c add $0x1c,%ebx 10bb63: 39 f7 cmp %esi,%edi 10bb65: 77 c1 ja 10bb28 <_RTEMS_tasks_Initialize_user_tasks_body+0x20><== NEVER TAKEN user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } 10bb67: 8d 65 f4 lea -0xc(%ebp),%esp 10bb6a: 5b pop %ebx 10bb6b: 5e pop %esi 10bb6c: 5f pop %edi 10bb6d: c9 leave 10bb6e: c3 ret id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); 10bb6f: 52 push %edx 10bb70: 50 push %eax 10bb71: 6a 01 push $0x1 10bb73: 6a 01 push $0x1 10bb75: e8 1e 0d 00 00 call 10c898 <_Internal_error_Occurred> =============================================================================== 001101d4 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 1101d4: 55 push %ebp 1101d5: 89 e5 mov %esp,%ebp 1101d7: 57 push %edi 1101d8: 56 push %esi 1101d9: 53 push %ebx 1101da: 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 ]; 1101dd: 8b 45 08 mov 0x8(%ebp),%eax 1101e0: 8b 98 f0 00 00 00 mov 0xf0(%eax),%ebx if ( !api ) 1101e6: 85 db test %ebx,%ebx 1101e8: 74 45 je 11022f <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 1101ea: 9c pushf 1101eb: fa cli 1101ec: 58 pop %eax signal_set = asr->signals_posted; 1101ed: 8b 73 14 mov 0x14(%ebx),%esi asr->signals_posted = 0; 1101f0: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 1101f7: 50 push %eax 1101f8: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 1101f9: 85 f6 test %esi,%esi 1101fb: 74 32 je 11022f <_RTEMS_tasks_Post_switch_extension+0x5b> return; asr->nest_level += 1; 1101fd: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 110200: 50 push %eax 110201: 8d 7d e4 lea -0x1c(%ebp),%edi 110204: 57 push %edi 110205: 68 ff ff 00 00 push $0xffff 11020a: ff 73 10 pushl 0x10(%ebx) 11020d: e8 b6 1d 00 00 call 111fc8 (*asr->handler)( signal_set ); 110212: 89 34 24 mov %esi,(%esp) 110215: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 110218: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 11021b: 83 c4 0c add $0xc,%esp 11021e: 57 push %edi 11021f: 68 ff ff 00 00 push $0xffff 110224: ff 75 e4 pushl -0x1c(%ebp) 110227: e8 9c 1d 00 00 call 111fc8 11022c: 83 c4 10 add $0x10,%esp } 11022f: 8d 65 f4 lea -0xc(%ebp),%esp 110232: 5b pop %ebx 110233: 5e pop %esi 110234: 5f pop %edi 110235: c9 leave 110236: c3 ret =============================================================================== 00110174 <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 110174: 55 push %ebp 110175: 89 e5 mov %esp,%ebp /* * Per Task Variables */ tvp = executing->task_variables; 110177: 8b 45 08 mov 0x8(%ebp),%eax 11017a: 8b 80 fc 00 00 00 mov 0xfc(%eax),%eax while (tvp) { 110180: 85 c0 test %eax,%eax 110182: 74 13 je 110197 <_RTEMS_tasks_Switch_extension+0x23> tvp->tval = *tvp->ptr; 110184: 8b 50 04 mov 0x4(%eax),%edx 110187: 8b 0a mov (%edx),%ecx 110189: 89 48 0c mov %ecx,0xc(%eax) *tvp->ptr = tvp->gval; 11018c: 8b 48 08 mov 0x8(%eax),%ecx 11018f: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 110191: 8b 00 mov (%eax),%eax /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 110193: 85 c0 test %eax,%eax 110195: 75 ed jne 110184 <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 110197: 8b 45 0c mov 0xc(%ebp),%eax 11019a: 8b 80 fc 00 00 00 mov 0xfc(%eax),%eax while (tvp) { 1101a0: 85 c0 test %eax,%eax 1101a2: 74 13 je 1101b7 <_RTEMS_tasks_Switch_extension+0x43> tvp->gval = *tvp->ptr; 1101a4: 8b 50 04 mov 0x4(%eax),%edx 1101a7: 8b 0a mov (%edx),%ecx 1101a9: 89 48 08 mov %ecx,0x8(%eax) *tvp->ptr = tvp->tval; 1101ac: 8b 48 0c mov 0xc(%eax),%ecx 1101af: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 1101b1: 8b 00 mov (%eax),%eax *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 1101b3: 85 c0 test %eax,%eax 1101b5: 75 ed jne 1101a4 <_RTEMS_tasks_Switch_extension+0x30><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 1101b7: c9 leave 1101b8: c3 ret =============================================================================== 0010c4d0 <_Rate_monotonic_Get_status>: bool _Rate_monotonic_Get_status( Rate_monotonic_Control *the_period, Rate_monotonic_Period_time_t *wall_since_last_period, Thread_CPU_usage_t *cpu_since_last_period ) { 10c4d0: 55 push %ebp 10c4d1: 89 e5 mov %esp,%ebp 10c4d3: 57 push %edi 10c4d4: 56 push %esi 10c4d5: 53 push %ebx 10c4d6: 83 ec 38 sub $0x38,%esp 10c4d9: 8b 5d 08 mov 0x8(%ebp),%ebx #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; 10c4dc: 8b 7b 40 mov 0x40(%ebx),%edi /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 10c4df: 8d 75 e0 lea -0x20(%ebp),%esi 10c4e2: 56 push %esi 10c4e3: e8 60 18 00 00 call 10dd48 <_TOD_Get_uptime> _Timestamp_Subtract( 10c4e8: 83 c4 0c add $0xc,%esp 10c4eb: ff 75 0c pushl 0xc(%ebp) 10c4ee: 56 push %esi 10c4ef: 8d 43 4c lea 0x4c(%ebx),%eax 10c4f2: 50 push %eax 10c4f3: e8 04 39 00 00 call 10fdfc <_Timespec_Subtract> #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; 10c4f8: 8b 87 84 00 00 00 mov 0x84(%edi),%eax 10c4fe: 8b 97 88 00 00 00 mov 0x88(%edi),%edx 10c504: 89 45 d8 mov %eax,-0x28(%ebp) 10c507: 89 55 dc mov %edx,-0x24(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 10c50a: 83 c4 10 add $0x10,%esp 10c50d: 39 3d 18 87 12 00 cmp %edi,0x128718 10c513: 74 0b je 10c520 <_Rate_monotonic_Get_status+0x50> if (used < the_period->cpu_usage_period_initiated) return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; 10c515: b0 01 mov $0x1,%al } 10c517: 8d 65 f4 lea -0xc(%ebp),%esp 10c51a: 5b pop %ebx 10c51b: 5e pop %esi 10c51c: 5f pop %edi 10c51d: c9 leave 10c51e: c3 ret 10c51f: 90 nop <== NOT EXECUTED if (owning_thread == _Thread_Executing) { Thread_CPU_usage_t ran; /* How much time time since last context switch */ _Timestamp_Subtract( 10c520: 52 push %edx 10c521: 8d 7d d0 lea -0x30(%ebp),%edi 10c524: 57 push %edi 10c525: 56 push %esi 10c526: 68 30 85 12 00 push $0x128530 10c52b: e8 cc 38 00 00 call 10fdfc <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); /* cpu usage += ran */ _Timestamp_Add_to( &used, &ran ); 10c530: 5e pop %esi 10c531: 58 pop %eax 10c532: 57 push %edi 10c533: 8d 75 d8 lea -0x28(%ebp),%esi 10c536: 56 push %esi 10c537: e8 c4 37 00 00 call 10fd00 <_Timespec_Add_to> /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) 10c53c: 83 c3 44 add $0x44,%ebx 10c53f: 5a pop %edx 10c540: 59 pop %ecx 10c541: 53 push %ebx 10c542: 56 push %esi 10c543: e8 90 38 00 00 call 10fdd8 <_Timespec_Less_than> 10c548: 83 c4 10 add $0x10,%esp 10c54b: 84 c0 test %al,%al 10c54d: 74 05 je 10c554 <_Rate_monotonic_Get_status+0x84> return false; 10c54f: 31 c0 xor %eax,%eax 10c551: eb c4 jmp 10c517 <_Rate_monotonic_Get_status+0x47> 10c553: 90 nop <== NOT EXECUTED /* used = current cpu usage - cpu usage at start of period */ _Timestamp_Subtract( 10c554: 50 push %eax 10c555: ff 75 10 pushl 0x10(%ebp) 10c558: 56 push %esi 10c559: 53 push %ebx 10c55a: e8 9d 38 00 00 call 10fdfc <_Timespec_Subtract> 10c55f: 83 c4 10 add $0x10,%esp if (used < the_period->cpu_usage_period_initiated) return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; 10c562: b0 01 mov $0x1,%al 10c564: eb b1 jmp 10c517 <_Rate_monotonic_Get_status+0x47> =============================================================================== 0010c568 <_Rate_monotonic_Initiate_statistics>: } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { 10c568: 55 push %ebp 10c569: 89 e5 mov %esp,%ebp 10c56b: 57 push %edi 10c56c: 56 push %esi 10c56d: 53 push %ebx 10c56e: 83 ec 28 sub $0x28,%esp 10c571: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *owning_thread = the_period->owner; 10c574: 8b 73 40 mov 0x40(%ebx),%esi * If using nanosecond statistics, we need to obtain the uptime. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; _TOD_Get_uptime( &uptime ); 10c577: 8d 7d e0 lea -0x20(%ebp),%edi 10c57a: 57 push %edi 10c57b: e8 c8 17 00 00 call 10dd48 <_TOD_Get_uptime> /* * Set the starting point and the CPU time used for the statistics. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ the_period->time_period_initiated = uptime; 10c580: 8b 45 e0 mov -0x20(%ebp),%eax 10c583: 8b 55 e4 mov -0x1c(%ebp),%edx 10c586: 89 43 4c mov %eax,0x4c(%ebx) 10c589: 89 53 50 mov %edx,0x50(%ebx) #else the_period->time_period_initiated = _Watchdog_Ticks_since_boot; #endif the_period->cpu_usage_period_initiated = owning_thread->cpu_time_used; 10c58c: 8b 86 84 00 00 00 mov 0x84(%esi),%eax 10c592: 8b 96 88 00 00 00 mov 0x88(%esi),%edx 10c598: 89 43 44 mov %eax,0x44(%ebx) 10c59b: 89 53 48 mov %edx,0x48(%ebx) * routine is invoked from rtems_rate_monotonic_period, the owner will * be the executing thread. When this routine is invoked from * _Rate_monotonic_Timeout, it will not. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 10c59e: 83 c4 10 add $0x10,%esp 10c5a1: 39 35 18 87 12 00 cmp %esi,0x128718 10c5a7: 74 0b je 10c5b4 <_Rate_monotonic_Initiate_statistics+0x4c> ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); } #endif } 10c5a9: 8d 65 f4 lea -0xc(%ebp),%esp 10c5ac: 5b pop %ebx 10c5ad: 5e pop %esi 10c5ae: 5f pop %edi 10c5af: c9 leave 10c5b0: c3 ret 10c5b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 10c5b4: 50 push %eax &_Thread_Time_of_last_context_switch, &uptime, &ran 10c5b5: 8d 75 d8 lea -0x28(%ebp),%esi /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 10c5b8: 56 push %esi 10c5b9: 57 push %edi 10c5ba: 68 30 85 12 00 push $0x128530 10c5bf: e8 38 38 00 00 call 10fdfc <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); 10c5c4: 59 pop %ecx 10c5c5: 5f pop %edi 10c5c6: 56 push %esi 10c5c7: 83 c3 44 add $0x44,%ebx 10c5ca: 53 push %ebx 10c5cb: e8 30 37 00 00 call 10fd00 <_Timespec_Add_to> 10c5d0: 83 c4 10 add $0x10,%esp } #endif } 10c5d3: 8d 65 f4 lea -0xc(%ebp),%esp 10c5d6: 5b pop %ebx 10c5d7: 5e pop %esi 10c5d8: 5f pop %edi 10c5d9: c9 leave 10c5da: c3 ret =============================================================================== 0010cb30 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 10cb30: 55 push %ebp 10cb31: 89 e5 mov %esp,%ebp 10cb33: 83 ec 2c sub $0x2c,%esp /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); 10cb36: 8d 45 f4 lea -0xc(%ebp),%eax 10cb39: 50 push %eax 10cb3a: ff 75 08 pushl 0x8(%ebp) 10cb3d: 68 80 83 12 00 push $0x128380 10cb42: e8 71 1c 00 00 call 10e7b8 <_Objects_Get> switch ( location ) { 10cb47: 83 c4 10 add $0x10,%esp 10cb4a: 8b 55 f4 mov -0xc(%ebp),%edx 10cb4d: 85 d2 test %edx,%edx 10cb4f: 75 29 jne 10cb7a <_Rate_monotonic_Timeout+0x4a><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 10cb51: 8b 50 40 mov 0x40(%eax),%edx if ( _States_Is_waiting_for_period( the_thread->current_state ) && 10cb54: f6 42 11 40 testb $0x40,0x11(%edx) 10cb58: 74 08 je 10cb62 <_Rate_monotonic_Timeout+0x32> 10cb5a: 8b 48 08 mov 0x8(%eax),%ecx 10cb5d: 39 4a 20 cmp %ecx,0x20(%edx) 10cb60: 74 4e je 10cbb0 <_Rate_monotonic_Timeout+0x80> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 10cb62: 83 78 38 01 cmpl $0x1,0x38(%eax) 10cb66: 74 14 je 10cb7c <_Rate_monotonic_Timeout+0x4c> _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 10cb68: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10cb6f: a1 74 84 12 00 mov 0x128474,%eax 10cb74: 48 dec %eax 10cb75: a3 74 84 12 00 mov %eax,0x128474 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10cb7a: c9 leave 10cb7b: c3 ret _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 10cb7c: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax) _Rate_monotonic_Initiate_statistics( the_period ); 10cb83: 83 ec 0c sub $0xc,%esp 10cb86: 50 push %eax 10cb87: 89 45 e4 mov %eax,-0x1c(%ebp) 10cb8a: e8 d9 f9 ff ff call 10c568 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10cb8f: 8b 45 e4 mov -0x1c(%ebp),%eax 10cb92: 8b 50 3c mov 0x3c(%eax),%edx 10cb95: 89 50 1c mov %edx,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10cb98: 5a pop %edx 10cb99: 59 pop %ecx _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); 10cb9a: 83 c0 10 add $0x10,%eax 10cb9d: 50 push %eax 10cb9e: 68 44 85 12 00 push $0x128544 10cba3: e8 34 35 00 00 call 1100dc <_Watchdog_Insert> 10cba8: 83 c4 10 add $0x10,%esp 10cbab: eb c2 jmp 10cb6f <_Rate_monotonic_Timeout+0x3f> 10cbad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10cbb0: 83 ec 08 sub $0x8,%esp 10cbb3: 68 f8 ff 03 10 push $0x1003fff8 10cbb8: 52 push %edx 10cbb9: 89 45 e4 mov %eax,-0x1c(%ebp) 10cbbc: e8 97 20 00 00 call 10ec58 <_Thread_Clear_state> the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 10cbc1: 8b 45 e4 mov -0x1c(%ebp),%eax 10cbc4: 89 04 24 mov %eax,(%esp) 10cbc7: eb c1 jmp 10cb8a <_Rate_monotonic_Timeout+0x5a> =============================================================================== 0010c5dc <_Rate_monotonic_Update_statistics>: void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 10c5dc: 55 push %ebp 10c5dd: 89 e5 mov %esp,%ebp 10c5df: 57 push %edi 10c5e0: 56 push %esi 10c5e1: 53 push %ebx 10c5e2: 83 ec 1c sub $0x1c,%esp 10c5e5: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 10c5e8: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 10c5eb: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 10c5ef: 0f 84 bf 00 00 00 je 10c6b4 <_Rate_monotonic_Update_statistics+0xd8> stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10c5f5: 51 push %ecx _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 10c5f6: 8d 7d e0 lea -0x20(%ebp),%edi stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10c5f9: 57 push %edi _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 10c5fa: 8d 75 d8 lea -0x28(%ebp),%esi stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10c5fd: 56 push %esi 10c5fe: 53 push %ebx 10c5ff: e8 cc fe ff ff call 10c4d0 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) 10c604: 83 c4 10 add $0x10,%esp 10c607: 84 c0 test %al,%al 10c609: 75 09 jne 10c614 <_Rate_monotonic_Update_statistics+0x38> stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } 10c60b: 8d 65 f4 lea -0xc(%ebp),%esp 10c60e: 5b pop %ebx 10c60f: 5e pop %esi 10c610: 5f pop %edi 10c611: c9 leave 10c612: c3 ret 10c613: 90 nop <== NOT EXECUTED /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 10c614: 83 ec 08 sub $0x8,%esp 10c617: 57 push %edi 10c618: 8d 43 6c lea 0x6c(%ebx),%eax 10c61b: 50 push %eax 10c61c: e8 df 36 00 00 call 10fd00 <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 10c621: 58 pop %eax 10c622: 5a pop %edx 10c623: 8d 43 5c lea 0x5c(%ebx),%eax 10c626: 50 push %eax 10c627: 57 push %edi 10c628: e8 ab 37 00 00 call 10fdd8 <_Timespec_Less_than> 10c62d: 83 c4 10 add $0x10,%esp 10c630: 84 c0 test %al,%al 10c632: 74 0c je 10c640 <_Rate_monotonic_Update_statistics+0x64> stats->min_cpu_time = executed; 10c634: 8b 45 e0 mov -0x20(%ebp),%eax 10c637: 8b 55 e4 mov -0x1c(%ebp),%edx 10c63a: 89 43 5c mov %eax,0x5c(%ebx) 10c63d: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 10c640: 83 ec 08 sub $0x8,%esp 10c643: 8d 43 64 lea 0x64(%ebx),%eax 10c646: 50 push %eax 10c647: 57 push %edi 10c648: e8 67 37 00 00 call 10fdb4 <_Timespec_Greater_than> 10c64d: 83 c4 10 add $0x10,%esp 10c650: 84 c0 test %al,%al 10c652: 74 0c je 10c660 <_Rate_monotonic_Update_statistics+0x84> stats->max_cpu_time = executed; 10c654: 8b 45 e0 mov -0x20(%ebp),%eax 10c657: 8b 55 e4 mov -0x1c(%ebp),%edx 10c65a: 89 43 64 mov %eax,0x64(%ebx) 10c65d: 89 53 68 mov %edx,0x68(%ebx) /* * Update Wall time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); 10c660: 83 ec 08 sub $0x8,%esp 10c663: 56 push %esi 10c664: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10c66a: 50 push %eax 10c66b: e8 90 36 00 00 call 10fd00 <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 10c670: 5a pop %edx 10c671: 59 pop %ecx 10c672: 8d 43 74 lea 0x74(%ebx),%eax 10c675: 50 push %eax 10c676: 56 push %esi 10c677: e8 5c 37 00 00 call 10fdd8 <_Timespec_Less_than> 10c67c: 83 c4 10 add $0x10,%esp 10c67f: 84 c0 test %al,%al 10c681: 75 39 jne 10c6bc <_Rate_monotonic_Update_statistics+0xe0> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 10c683: 83 ec 08 sub $0x8,%esp 10c686: 8d 43 7c lea 0x7c(%ebx),%eax 10c689: 50 push %eax 10c68a: 56 push %esi 10c68b: e8 24 37 00 00 call 10fdb4 <_Timespec_Greater_than> 10c690: 83 c4 10 add $0x10,%esp 10c693: 84 c0 test %al,%al 10c695: 0f 84 70 ff ff ff je 10c60b <_Rate_monotonic_Update_statistics+0x2f> stats->max_wall_time = since_last_period; 10c69b: 8b 45 d8 mov -0x28(%ebp),%eax 10c69e: 8b 55 dc mov -0x24(%ebp),%edx 10c6a1: 89 43 7c mov %eax,0x7c(%ebx) 10c6a4: 89 93 80 00 00 00 mov %edx,0x80(%ebx) stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } 10c6aa: 8d 65 f4 lea -0xc(%ebp),%esp 10c6ad: 5b pop %ebx 10c6ae: 5e pop %esi 10c6af: 5f pop %edi 10c6b0: c9 leave 10c6b1: c3 ret 10c6b2: 66 90 xchg %ax,%ax <== NOT EXECUTED */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 10c6b4: ff 43 58 incl 0x58(%ebx) 10c6b7: e9 39 ff ff ff jmp 10c5f5 <_Rate_monotonic_Update_statistics+0x19> */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) stats->min_wall_time = since_last_period; 10c6bc: 8b 45 d8 mov -0x28(%ebp),%eax 10c6bf: 8b 55 dc mov -0x24(%ebp),%edx 10c6c2: 89 43 74 mov %eax,0x74(%ebx) 10c6c5: 89 53 78 mov %edx,0x78(%ebx) 10c6c8: eb b9 jmp 10c683 <_Rate_monotonic_Update_statistics+0xa7> =============================================================================== 0010da70 <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 10da70: 55 push %ebp 10da71: 89 e5 mov %esp,%ebp 10da73: 53 push %ebx 10da74: 83 ec 04 sub $0x4,%esp 10da77: 8b 5d 08 mov 0x8(%ebp),%ebx 10da7a: a1 b4 15 13 00 mov 0x1315b4,%eax 10da7f: 40 inc %eax 10da80: a3 b4 15 13 00 mov %eax,0x1315b4 long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 10da85: a1 48 16 13 00 mov 0x131648,%eax if ( time->tv_sec < seconds ) 10da8a: 8b 13 mov (%ebx),%edx 10da8c: 39 d0 cmp %edx,%eax 10da8e: 7f 34 jg 10dac4 <_TOD_Set+0x54> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 10da90: 51 push %ecx _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); 10da91: 29 c2 sub %eax,%edx 10da93: 52 push %edx 10da94: 6a 00 push $0x0 10da96: 68 78 16 13 00 push $0x131678 10da9b: e8 78 24 00 00 call 10ff18 <_Watchdog_Adjust> 10daa0: 83 c4 10 add $0x10,%esp /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 10daa3: 8b 03 mov (%ebx),%eax 10daa5: a3 48 16 13 00 mov %eax,0x131648 10daaa: 8b 43 04 mov 0x4(%ebx),%eax 10daad: a3 4c 16 13 00 mov %eax,0x13164c _TOD_Is_set = true; 10dab2: c6 05 c8 15 13 00 01 movb $0x1,0x1315c8 _TOD_Activate(); _Thread_Enable_dispatch(); } 10dab9: 8b 5d fc mov -0x4(%ebp),%ebx 10dabc: c9 leave _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); 10dabd: e9 c6 12 00 00 jmp 10ed88 <_Thread_Enable_dispatch> 10dac2: 66 90 xchg %ax,%ax <== NOT EXECUTED 10dac4: 51 push %ecx _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); if ( time->tv_sec < seconds ) _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); 10dac5: 29 d0 sub %edx,%eax 10dac7: 50 push %eax 10dac8: 6a 01 push $0x1 10daca: 68 78 16 13 00 push $0x131678 10dacf: e8 44 24 00 00 call 10ff18 <_Watchdog_Adjust> 10dad4: 83 c4 10 add $0x10,%esp 10dad7: eb ca jmp 10daa3 <_TOD_Set+0x33> =============================================================================== 0010c4c4 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 10c4c4: 55 push %ebp 10c4c5: 89 e5 mov %esp,%ebp 10c4c7: 53 push %ebx 10c4c8: 83 ec 1c sub $0x1c,%esp Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 10c4cb: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 10c4d2: a1 cc 22 12 00 mov 0x1222cc,%eax 10c4d7: 8d 04 80 lea (%eax,%eax,4),%eax 10c4da: 8d 04 80 lea (%eax,%eax,4),%eax 10c4dd: 8d 04 80 lea (%eax,%eax,4),%eax 10c4e0: c1 e0 03 shl $0x3,%eax 10c4e3: 89 45 f4 mov %eax,-0xc(%ebp) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 10c4e6: a1 24 65 12 00 mov 0x126524,%eax 10c4eb: 40 inc %eax 10c4ec: a3 24 65 12 00 mov %eax,0x126524 /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 10c4f1: 8d 5d f0 lea -0x10(%ebp),%ebx 10c4f4: 53 push %ebx 10c4f5: 68 58 64 12 00 push $0x126458 10c4fa: e8 3d 1d 00 00 call 10e23c <_Timespec_Add_to> /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); 10c4ff: 58 pop %eax 10c500: 5a pop %edx 10c501: 53 push %ebx 10c502: 68 68 64 12 00 push $0x126468 10c507: e8 30 1d 00 00 call 10e23c <_Timespec_Add_to> 10c50c: 89 c3 mov %eax,%ebx while ( seconds ) { 10c50e: 83 c4 10 add $0x10,%esp 10c511: 85 c0 test %eax,%eax 10c513: 74 16 je 10c52b <_TOD_Tickle_ticks+0x67> 10c515: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 10c518: 83 ec 0c sub $0xc,%esp 10c51b: 68 98 64 12 00 push $0x126498 10c520: e8 d7 21 00 00 call 10e6fc <_Watchdog_Tickle> 10c525: 83 c4 10 add $0x10,%esp 10c528: 4b dec %ebx 10c529: 75 ed jne 10c518 <_TOD_Tickle_ticks+0x54><== NEVER TAKEN _Watchdog_Tickle_seconds(); seconds--; } } 10c52b: 8b 5d fc mov -0x4(%ebp),%ebx 10c52e: c9 leave 10c52f: c3 ret =============================================================================== 0010c250 <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 10c250: 55 push %ebp 10c251: 89 e5 mov %esp,%ebp 10c253: 56 push %esi 10c254: 53 push %ebx 10c255: 8b 55 08 mov 0x8(%ebp),%edx uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 10c258: 8b 72 08 mov 0x8(%edx),%esi 10c25b: 4e dec %esi year_mod_4 = the_tod->year & 3; 10c25c: 8b 02 mov (%edx),%eax if ( year_mod_4 == 0 ) 10c25e: 89 c3 mov %eax,%ebx 10c260: 83 e3 03 and $0x3,%ebx 10c263: 74 67 je 10c2cc <_TOD_To_seconds+0x7c> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 10c265: 8b 4a 04 mov 0x4(%edx),%ecx 10c268: 0f b7 8c 09 80 28 12 movzwl 0x122880(%ecx,%ecx,1),%ecx 10c26f: 00 10c270: 8d 34 31 lea (%ecx,%esi,1),%esi time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10c273: 0f b7 8c 1b b4 28 12 movzwl 0x1228b4(%ebx,%ebx,1),%ecx 10c27a: 00 if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 10c27b: 2d c4 07 00 00 sub $0x7c4,%eax 10c280: c1 e8 02 shr $0x2,%eax 10c283: 8d 1c c0 lea (%eax,%eax,8),%ebx 10c286: 8d 1c d8 lea (%eax,%ebx,8),%ebx 10c289: 8d 1c 9b lea (%ebx,%ebx,4),%ebx 10c28c: 8d 04 98 lea (%eax,%ebx,4),%eax 10c28f: 01 c1 add %eax,%ecx ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10c291: 01 f1 add %esi,%ecx time *= TOD_SECONDS_PER_DAY; 10c293: 8d 04 89 lea (%ecx,%ecx,4),%eax 10c296: 8d 04 81 lea (%ecx,%eax,4),%eax 10c299: 8d 04 c1 lea (%ecx,%eax,8),%eax 10c29c: c1 e0 02 shl $0x2,%eax 10c29f: 29 c8 sub %ecx,%eax 10c2a1: c1 e0 07 shl $0x7,%eax time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 10c2a4: 8b 5a 14 mov 0x14(%edx),%ebx 10c2a7: 8b 4a 0c mov 0xc(%edx),%ecx 10c2aa: 8d 0c 49 lea (%ecx,%ecx,2),%ecx 10c2ad: 8d 0c 89 lea (%ecx,%ecx,4),%ecx 10c2b0: c1 e1 02 shl $0x2,%ecx 10c2b3: 03 4a 10 add 0x10(%edx),%ecx * TOD_SECONDS_PER_MINUTE; 10c2b6: 8d 14 49 lea (%ecx,%ecx,2),%edx 10c2b9: 8d 14 92 lea (%edx,%edx,4),%edx time += the_tod->second; 10c2bc: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx time += TOD_SECONDS_1970_THROUGH_1988; 10c2c3: 8d 04 02 lea (%edx,%eax,1),%eax return( time ); } 10c2c6: 5b pop %ebx 10c2c7: 5e pop %esi 10c2c8: c9 leave 10c2c9: c3 ret 10c2ca: 66 90 xchg %ax,%ax <== NOT EXECUTED time = the_tod->day - 1; year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; 10c2cc: 8b 4a 04 mov 0x4(%edx),%ecx 10c2cf: 0f b7 8c 09 9a 28 12 movzwl 0x12289a(%ecx,%ecx,1),%ecx 10c2d6: 00 10c2d7: 8d 34 31 lea (%ecx,%esi,1),%esi 10c2da: eb 97 jmp 10c273 <_TOD_To_seconds+0x23> =============================================================================== 0010c2dc <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10c2dc: 55 push %ebp 10c2dd: 89 e5 mov %esp,%ebp 10c2df: 53 push %ebx 10c2e0: 8b 4d 08 mov 0x8(%ebp),%ecx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 10c2e3: 8b 1d 2c 56 12 00 mov 0x12562c,%ebx if ((!the_tod) || 10c2e9: 85 c9 test %ecx,%ecx 10c2eb: 74 53 je 10c340 <_TOD_Validate+0x64> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 10c2ed: b8 40 42 0f 00 mov $0xf4240,%eax 10c2f2: 31 d2 xor %edx,%edx 10c2f4: f7 f3 div %ebx rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c2f6: 3b 41 18 cmp 0x18(%ecx),%eax 10c2f9: 76 45 jbe 10c340 <_TOD_Validate+0x64> (the_tod->ticks >= ticks_per_second) || 10c2fb: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10c2ff: 77 3f ja 10c340 <_TOD_Validate+0x64> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10c301: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10c305: 77 39 ja 10c340 <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10c307: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10c30b: 77 33 ja 10c340 <_TOD_Validate+0x64> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 10c30d: 8b 41 04 mov 0x4(%ecx),%eax rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || 10c310: 85 c0 test %eax,%eax 10c312: 74 2c je 10c340 <_TOD_Validate+0x64> <== NEVER TAKEN (the_tod->month == 0) || 10c314: 83 f8 0c cmp $0xc,%eax 10c317: 77 27 ja 10c340 <_TOD_Validate+0x64> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10c319: 8b 11 mov (%ecx),%edx (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || 10c31b: 81 fa c3 07 00 00 cmp $0x7c3,%edx 10c321: 76 1d jbe 10c340 <_TOD_Validate+0x64> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10c323: 8b 49 08 mov 0x8(%ecx),%ecx (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10c326: 85 c9 test %ecx,%ecx 10c328: 74 16 je 10c340 <_TOD_Validate+0x64> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10c32a: 83 e2 03 and $0x3,%edx 10c32d: 75 16 jne 10c345 <_TOD_Validate+0x69> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10c32f: 8b 04 85 f4 28 12 00 mov 0x1228f4(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10c336: 39 c8 cmp %ecx,%eax 10c338: 0f 93 c0 setae %al 10c33b: eb 05 jmp 10c342 <_TOD_Validate+0x66> 10c33d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; 10c340: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10c342: 5b pop %ebx 10c343: c9 leave 10c344: c3 ret return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 10c345: 8b 04 85 c0 28 12 00 mov 0x1228c0(,%eax,4),%eax 10c34c: eb e8 jmp 10c336 <_TOD_Validate+0x5a> =============================================================================== 0010d138 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10d138: 55 push %ebp 10d139: 89 e5 mov %esp,%ebp 10d13b: 57 push %edi 10d13c: 56 push %esi 10d13d: 53 push %ebx 10d13e: 83 ec 28 sub $0x28,%esp 10d141: 8b 5d 08 mov 0x8(%ebp),%ebx 10d144: 8b 75 0c mov 0xc(%ebp),%esi 10d147: 8a 45 10 mov 0x10(%ebp),%al 10d14a: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10d14d: 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 ); 10d150: 53 push %ebx 10d151: e8 7a 0e 00 00 call 10dfd0 <_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 ) 10d156: 83 c4 10 add $0x10,%esp 10d159: 39 73 14 cmp %esi,0x14(%ebx) 10d15c: 74 0d je 10d16b <_Thread_Change_priority+0x33> _Thread_Set_priority( the_thread, new_priority ); 10d15e: 83 ec 08 sub $0x8,%esp 10d161: 56 push %esi 10d162: 53 push %ebx 10d163: e8 1c 0d 00 00 call 10de84 <_Thread_Set_priority> 10d168: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10d16b: 9c pushf 10d16c: fa cli 10d16d: 5a pop %edx /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 10d16e: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10d171: 83 f8 04 cmp $0x4,%eax 10d174: 74 26 je 10d19c <_Thread_Change_priority+0x64> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10d176: 83 e7 04 and $0x4,%edi 10d179: 74 15 je 10d190 <_Thread_Change_priority+0x58><== ALWAYS TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10d17b: 52 push %edx 10d17c: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10d17d: a9 e0 be 03 00 test $0x3bee0,%eax 10d182: 0f 85 bc 00 00 00 jne 10d244 <_Thread_Change_priority+0x10c> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10d188: 8d 65 f4 lea -0xc(%ebp),%esp 10d18b: 5b pop %ebx 10d18c: 5e pop %esi 10d18d: 5f pop %edi 10d18e: c9 leave 10d18f: c3 ret RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10d190: 89 c1 mov %eax,%ecx 10d192: 83 e1 fb and $0xfffffffb,%ecx 10d195: 89 4b 10 mov %ecx,0x10(%ebx) 10d198: eb e1 jmp 10d17b <_Thread_Change_priority+0x43> 10d19a: 66 90 xchg %ax,%ax <== NOT EXECUTED } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10d19c: 83 e7 04 and $0x4,%edi 10d19f: 75 45 jne 10d1e6 <_Thread_Change_priority+0xae><== 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 ); 10d1a1: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10d1a8: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10d1ae: 66 8b 8b 96 00 00 00 mov 0x96(%ebx),%cx 10d1b5: 66 09 08 or %cx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d1b8: 66 a1 80 64 12 00 mov 0x126480,%ax 10d1be: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10d1c4: 66 a3 80 64 12 00 mov %ax,0x126480 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10d1ca: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10d1ce: 0f 84 88 00 00 00 je 10d25c <_Thread_Change_priority+0x124> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10d1d4: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10d1da: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10d1dd: 8b 08 mov (%eax),%ecx after_node->next = the_node; 10d1df: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10d1e1: 89 0b mov %ecx,(%ebx) before_node->previous = the_node; 10d1e3: 89 59 04 mov %ebx,0x4(%ecx) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 10d1e6: 52 push %edx 10d1e7: 9d popf 10d1e8: fa cli RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10d1e9: 66 8b 1d 80 64 12 00 mov 0x126480,%bx 10d1f0: 31 c0 xor %eax,%eax 10d1f2: 89 c1 mov %eax,%ecx 10d1f4: 66 0f bc cb bsf %bx,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10d1f8: 0f b7 c9 movzwl %cx,%ecx 10d1fb: 66 8b 9c 09 00 65 12 mov 0x126500(%ecx,%ecx,1),%bx 10d202: 00 10d203: 66 0f bc c3 bsf %bx,%ax return (_Priority_Bits_index( major ) << 4) + 10d207: c1 e1 04 shl $0x4,%ecx 10d20a: 0f b7 c0 movzwl %ax,%eax */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 10d20d: 8d 04 01 lea (%ecx,%eax,1),%eax 10d210: 8d 04 40 lea (%eax,%eax,2),%eax 10d213: c1 e0 02 shl $0x2,%eax 10d216: 03 05 a0 63 12 00 add 0x1263a0,%eax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10d21c: 8b 00 mov (%eax),%eax 10d21e: a3 7c 66 12 00 mov %eax,0x12667c * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10d223: 8b 0d 78 66 12 00 mov 0x126678,%ecx * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 10d229: 39 c8 cmp %ecx,%eax 10d22b: 74 0d je 10d23a <_Thread_Change_priority+0x102> 10d22d: 80 79 74 00 cmpb $0x0,0x74(%ecx) 10d231: 74 07 je 10d23a <_Thread_Change_priority+0x102> _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; 10d233: c6 05 84 66 12 00 01 movb $0x1,0x126684 _ISR_Enable( level ); 10d23a: 52 push %edx 10d23b: 9d popf } 10d23c: 8d 65 f4 lea -0xc(%ebp),%esp 10d23f: 5b pop %ebx 10d240: 5e pop %esi 10d241: 5f pop %edi 10d242: c9 leave 10d243: c3 ret /* 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 ); 10d244: 89 5d 0c mov %ebx,0xc(%ebp) 10d247: 8b 43 44 mov 0x44(%ebx),%eax 10d24a: 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 ); } 10d24d: 8d 65 f4 lea -0xc(%ebp),%esp 10d250: 5b pop %ebx 10d251: 5e pop %esi 10d252: 5f pop %edi 10d253: 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 ); 10d254: e9 93 0b 00 00 jmp 10ddec <_Thread_queue_Requeue> 10d259: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 10d25c: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10d262: 8d 48 04 lea 0x4(%eax),%ecx 10d265: 89 0b mov %ecx,(%ebx) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 10d267: 8b 48 08 mov 0x8(%eax),%ecx the_chain->last = the_node; 10d26a: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10d26d: 89 19 mov %ebx,(%ecx) the_node->previous = old_last_node; 10d26f: 89 4b 04 mov %ecx,0x4(%ebx) 10d272: e9 6f ff ff ff jmp 10d1e6 <_Thread_Change_priority+0xae> =============================================================================== 0010d278 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10d278: 55 push %ebp 10d279: 89 e5 mov %esp,%ebp 10d27b: 53 push %ebx 10d27c: 8b 45 08 mov 0x8(%ebp),%eax 10d27f: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10d282: 9c pushf 10d283: fa cli 10d284: 5b pop %ebx current_state = the_thread->current_state; 10d285: 8b 48 10 mov 0x10(%eax),%ecx if ( current_state & state ) { 10d288: 85 ca test %ecx,%edx 10d28a: 74 70 je 10d2fc <_Thread_Clear_state+0x84> 10d28c: f7 d2 not %edx 10d28e: 21 ca and %ecx,%edx current_state = the_thread->current_state = _States_Clear( state, current_state ); 10d290: 89 50 10 mov %edx,0x10(%eax) if ( _States_Is_ready( current_state ) ) { 10d293: 85 d2 test %edx,%edx 10d295: 75 65 jne 10d2fc <_Thread_Clear_state+0x84> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10d297: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10d29d: 66 8b 88 96 00 00 00 mov 0x96(%eax),%cx 10d2a4: 66 09 0a or %cx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d2a7: 66 8b 15 80 64 12 00 mov 0x126480,%dx 10d2ae: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10d2b4: 66 89 15 80 64 12 00 mov %dx,0x126480 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10d2bb: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10d2c1: 8d 4a 04 lea 0x4(%edx),%ecx 10d2c4: 89 08 mov %ecx,(%eax) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 10d2c6: 8b 4a 08 mov 0x8(%edx),%ecx the_chain->last = the_node; 10d2c9: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10d2cc: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10d2ce: 89 48 04 mov %ecx,0x4(%eax) _ISR_Flash( level ); 10d2d1: 53 push %ebx 10d2d2: 9d popf 10d2d3: 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 ) { 10d2d4: 8b 50 14 mov 0x14(%eax),%edx 10d2d7: 8b 0d 7c 66 12 00 mov 0x12667c,%ecx 10d2dd: 3b 51 14 cmp 0x14(%ecx),%edx 10d2e0: 73 1a jae 10d2fc <_Thread_Clear_state+0x84> _Thread_Heir = the_thread; 10d2e2: a3 7c 66 12 00 mov %eax,0x12667c if ( _Thread_Executing->is_preemptible || 10d2e7: a1 78 66 12 00 mov 0x126678,%eax 10d2ec: 80 78 74 00 cmpb $0x0,0x74(%eax) 10d2f0: 74 12 je 10d304 <_Thread_Clear_state+0x8c> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10d2f2: c6 05 84 66 12 00 01 movb $0x1,0x126684 10d2f9: 8d 76 00 lea 0x0(%esi),%esi } } } _ISR_Enable( level ); 10d2fc: 53 push %ebx 10d2fd: 9d popf } 10d2fe: 5b pop %ebx 10d2ff: c9 leave 10d300: c3 ret 10d301: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 10d304: 85 d2 test %edx,%edx 10d306: 74 ea je 10d2f2 <_Thread_Clear_state+0x7a><== NEVER TAKEN 10d308: eb f2 jmp 10d2fc <_Thread_Clear_state+0x84> =============================================================================== 0010d30c <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 10d30c: 55 push %ebp 10d30d: 89 e5 mov %esp,%ebp 10d30f: 56 push %esi 10d310: 53 push %ebx 10d311: 8b 75 08 mov 0x8(%ebp),%esi 10d314: 8b 5d 0c mov 0xc(%ebp),%ebx RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( 10d317: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d31b: 8b 46 1c mov 0x1c(%esi),%eax 10d31e: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10d325: a1 d4 63 12 00 mov 0x1263d4,%eax 10d32a: 48 dec %eax 10d32b: a3 d4 63 12 00 mov %eax,0x1263d4 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 10d330: 83 ec 0c sub $0xc,%esp 10d333: 53 push %ebx 10d334: e8 5f 11 00 00 call 10e498 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d339: a1 d4 63 12 00 mov 0x1263d4,%eax 10d33e: 40 inc %eax 10d33f: a3 d4 63 12 00 mov %eax,0x1263d4 /* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object ); 10d344: 59 pop %ecx 10d345: 58 pop %eax 10d346: 53 push %ebx 10d347: 56 push %esi 10d348: e8 57 f6 ff ff call 10c9a4 <_Objects_Close> /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); 10d34d: 58 pop %eax 10d34e: 5a pop %edx 10d34f: 6a 01 push $0x1 10d351: 53 push %ebx 10d352: e8 99 0b 00 00 call 10def0 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 10d357: 89 1c 24 mov %ebx,(%esp) 10d35a: e8 d1 09 00 00 call 10dd30 <_Thread_queue_Extract_with_proxy> 10d35f: 83 c4 10 add $0x10,%esp 10d362: 84 c0 test %al,%al 10d364: 75 06 jne 10d36c <_Thread_Close+0x60> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 10d366: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d36a: 74 68 je 10d3d4 <_Thread_Close+0xc8> /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 10d36c: 3b 1d 60 64 12 00 cmp 0x126460,%ebx 10d372: 74 74 je 10d3e8 <_Thread_Close+0xdc> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 10d374: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx) 10d37b: 00 00 00 if ( the_thread->Start.fp_context ) 10d37e: 8b 83 c8 00 00 00 mov 0xc8(%ebx),%eax 10d384: 85 c0 test %eax,%eax 10d386: 74 0c je 10d394 <_Thread_Close+0x88> (void) _Workspace_Free( the_thread->Start.fp_context ); 10d388: 83 ec 0c sub $0xc,%esp 10d38b: 50 push %eax 10d38c: e8 43 14 00 00 call 10e7d4 <_Workspace_Free> 10d391: 83 c4 10 add $0x10,%esp /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 10d394: 83 ec 0c sub $0xc,%esp 10d397: 53 push %ebx 10d398: e8 0f 0d 00 00 call 10e0ac <_Thread_Stack_Free> the_thread->Start.stack = NULL; 10d39d: c7 83 cc 00 00 00 00 movl $0x0,0xcc(%ebx) 10d3a4: 00 00 00 if ( the_thread->extensions ) 10d3a7: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax 10d3ad: 83 c4 10 add $0x10,%esp 10d3b0: 85 c0 test %eax,%eax 10d3b2: 74 0c je 10d3c0 <_Thread_Close+0xb4> (void) _Workspace_Free( the_thread->extensions ); 10d3b4: 83 ec 0c sub $0xc,%esp 10d3b7: 50 push %eax 10d3b8: e8 17 14 00 00 call 10e7d4 <_Workspace_Free> 10d3bd: 83 c4 10 add $0x10,%esp the_thread->extensions = NULL; 10d3c0: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10d3c7: 00 00 00 } 10d3ca: 8d 65 f8 lea -0x8(%ebp),%esp 10d3cd: 5b pop %ebx 10d3ce: 5e pop %esi 10d3cf: c9 leave 10d3d0: c3 ret 10d3d1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ _Thread_Set_state( the_thread, STATES_DORMANT ); if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 10d3d4: 83 ec 0c sub $0xc,%esp 10d3d7: 8d 43 48 lea 0x48(%ebx),%eax 10d3da: 50 push %eax 10d3db: e8 b0 12 00 00 call 10e690 <_Watchdog_Remove> 10d3e0: 83 c4 10 add $0x10,%esp 10d3e3: eb 87 jmp 10d36c <_Thread_Close+0x60> 10d3e5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 10d3e8: c7 05 60 64 12 00 00 movl $0x0,0x126460 10d3ef: 00 00 00 10d3f2: eb 80 jmp 10d374 <_Thread_Close+0x68> =============================================================================== 0010d488 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10d488: 55 push %ebp 10d489: 89 e5 mov %esp,%ebp 10d48b: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10d48e: 8d 45 f4 lea -0xc(%ebp),%eax 10d491: 50 push %eax 10d492: ff 75 08 pushl 0x8(%ebp) 10d495: e8 c6 01 00 00 call 10d660 <_Thread_Get> switch ( location ) { 10d49a: 83 c4 10 add $0x10,%esp 10d49d: 8b 55 f4 mov -0xc(%ebp),%edx 10d4a0: 85 d2 test %edx,%edx 10d4a2: 75 1c jne 10d4c0 <_Thread_Delay_ended+0x38><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10d4a4: 83 ec 08 sub $0x8,%esp 10d4a7: 68 18 00 00 10 push $0x10000018 10d4ac: 50 push %eax 10d4ad: e8 c6 fd ff ff call 10d278 <_Thread_Clear_state> 10d4b2: a1 d4 63 12 00 mov 0x1263d4,%eax 10d4b7: 48 dec %eax 10d4b8: a3 d4 63 12 00 mov %eax,0x1263d4 10d4bd: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10d4c0: c9 leave 10d4c1: c3 ret =============================================================================== 0010d4c4 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10d4c4: 55 push %ebp 10d4c5: 89 e5 mov %esp,%ebp 10d4c7: 57 push %edi 10d4c8: 56 push %esi 10d4c9: 53 push %ebx 10d4ca: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10d4cd: 8b 1d 78 66 12 00 mov 0x126678,%ebx _ISR_Disable( level ); 10d4d3: 9c pushf 10d4d4: fa cli 10d4d5: 58 pop %eax while ( _Context_Switch_necessary == true ) { 10d4d6: 8a 15 84 66 12 00 mov 0x126684,%dl 10d4dc: 84 d2 test %dl,%dl 10d4de: 0f 84 3c 01 00 00 je 10d620 <_Thread_Dispatch+0x15c> heir = _Thread_Heir; 10d4e4: 8b 35 7c 66 12 00 mov 0x12667c,%esi _Thread_Dispatch_disable_level = 1; 10d4ea: c7 05 d4 63 12 00 01 movl $0x1,0x1263d4 10d4f1: 00 00 00 _Context_Switch_necessary = false; 10d4f4: c6 05 84 66 12 00 00 movb $0x0,0x126684 _Thread_Executing = heir; 10d4fb: 89 35 78 66 12 00 mov %esi,0x126678 /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) 10d501: 39 f3 cmp %esi,%ebx 10d503: 0f 84 17 01 00 00 je 10d620 <_Thread_Dispatch+0x15c> 10d509: 8d 7d d8 lea -0x28(%ebp),%edi 10d50c: e9 f5 00 00 00 jmp 10d606 <_Thread_Dispatch+0x142> 10d511: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; _ISR_Enable( level ); 10d514: 50 push %eax 10d515: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10d516: 83 ec 0c sub $0xc,%esp 10d519: 8d 45 e0 lea -0x20(%ebp),%eax 10d51c: 50 push %eax 10d51d: e8 f6 30 00 00 call 110618 <_TOD_Get_uptime> _Timestamp_Subtract( 10d522: 83 c4 0c add $0xc,%esp 10d525: 57 push %edi 10d526: 8d 45 e0 lea -0x20(%ebp),%eax 10d529: 50 push %eax 10d52a: 68 90 64 12 00 push $0x126490 10d52f: e8 44 0d 00 00 call 10e278 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10d534: 58 pop %eax 10d535: 5a pop %edx 10d536: 57 push %edi 10d537: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10d53d: 50 push %eax 10d53e: e8 f9 0c 00 00 call 10e23c <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10d543: 8b 45 e0 mov -0x20(%ebp),%eax 10d546: 8b 55 e4 mov -0x1c(%ebp),%edx 10d549: a3 90 64 12 00 mov %eax,0x126490 10d54e: 89 15 94 64 12 00 mov %edx,0x126494 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10d554: a1 64 64 12 00 mov 0x126464,%eax 10d559: 83 c4 10 add $0x10,%esp 10d55c: 85 c0 test %eax,%eax 10d55e: 74 10 je 10d570 <_Thread_Dispatch+0xac> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10d560: 8b 10 mov (%eax),%edx 10d562: 89 93 ec 00 00 00 mov %edx,0xec(%ebx) *_Thread_libc_reent = heir->libc_reent; 10d568: 8b 96 ec 00 00 00 mov 0xec(%esi),%edx 10d56e: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10d570: 83 ec 08 sub $0x8,%esp 10d573: 56 push %esi 10d574: 53 push %ebx 10d575: e8 9e 0f 00 00 call 10e518 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10d57a: 5a pop %edx 10d57b: 59 pop %ecx 10d57c: 81 c6 d0 00 00 00 add $0xd0,%esi 10d582: 56 push %esi 10d583: 8d 83 d0 00 00 00 lea 0xd0(%ebx),%eax 10d589: 50 push %eax 10d58a: e8 91 12 00 00 call 10e820 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10d58f: 83 c4 10 add $0x10,%esp 10d592: 8b 83 e8 00 00 00 mov 0xe8(%ebx),%eax 10d598: 85 c0 test %eax,%eax 10d59a: 74 36 je 10d5d2 <_Thread_Dispatch+0x10e> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 10d59c: a1 60 64 12 00 mov 0x126460,%eax 10d5a1: 39 c3 cmp %eax,%ebx 10d5a3: 74 2d je 10d5d2 <_Thread_Dispatch+0x10e> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10d5a5: 85 c0 test %eax,%eax 10d5a7: 74 11 je 10d5ba <_Thread_Dispatch+0xf6> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10d5a9: 83 ec 0c sub $0xc,%esp 10d5ac: 05 e8 00 00 00 add $0xe8,%eax 10d5b1: 50 push %eax 10d5b2: e8 9d 12 00 00 call 10e854 <_CPU_Context_save_fp> 10d5b7: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10d5ba: 83 ec 0c sub $0xc,%esp 10d5bd: 8d 83 e8 00 00 00 lea 0xe8(%ebx),%eax 10d5c3: 50 push %eax 10d5c4: e8 95 12 00 00 call 10e85e <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10d5c9: 89 1d 60 64 12 00 mov %ebx,0x126460 10d5cf: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10d5d2: 8b 1d 78 66 12 00 mov 0x126678,%ebx _ISR_Disable( level ); 10d5d8: 9c pushf 10d5d9: fa cli 10d5da: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10d5db: 8a 15 84 66 12 00 mov 0x126684,%dl 10d5e1: 84 d2 test %dl,%dl 10d5e3: 74 3b je 10d620 <_Thread_Dispatch+0x15c> heir = _Thread_Heir; 10d5e5: 8b 35 7c 66 12 00 mov 0x12667c,%esi _Thread_Dispatch_disable_level = 1; 10d5eb: c7 05 d4 63 12 00 01 movl $0x1,0x1263d4 10d5f2: 00 00 00 _Context_Switch_necessary = false; 10d5f5: c6 05 84 66 12 00 00 movb $0x0,0x126684 _Thread_Executing = heir; 10d5fc: 89 35 78 66 12 00 mov %esi,0x126678 /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) 10d602: 39 de cmp %ebx,%esi 10d604: 74 1a je 10d620 <_Thread_Dispatch+0x15c><== NEVER TAKEN */ #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 ) 10d606: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10d60a: 0f 85 04 ff ff ff jne 10d514 <_Thread_Dispatch+0x50> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10d610: 8b 15 a4 63 12 00 mov 0x1263a4,%edx 10d616: 89 56 78 mov %edx,0x78(%esi) 10d619: e9 f6 fe ff ff jmp 10d514 <_Thread_Dispatch+0x50> 10d61e: 66 90 xchg %ax,%ax <== NOT EXECUTED _ISR_Disable( level ); } post_switch: _Thread_Dispatch_disable_level = 0; 10d620: c7 05 d4 63 12 00 00 movl $0x0,0x1263d4 10d627: 00 00 00 _ISR_Enable( level ); 10d62a: 50 push %eax 10d62b: 9d popf _API_extensions_Run_postswitch(); 10d62c: e8 cf e8 ff ff call 10bf00 <_API_extensions_Run_postswitch> } 10d631: 8d 65 f4 lea -0xc(%ebp),%esp 10d634: 5b pop %ebx 10d635: 5e pop %esi 10d636: 5f pop %edi 10d637: c9 leave 10d638: c3 ret =============================================================================== 0010d660 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10d660: 55 push %ebp 10d661: 89 e5 mov %esp,%ebp 10d663: 53 push %ebx 10d664: 83 ec 04 sub $0x4,%esp 10d667: 8b 45 08 mov 0x8(%ebp),%eax 10d66a: 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 ) ) { 10d66d: 85 c0 test %eax,%eax 10d66f: 74 4b je 10d6bc <_Thread_Get+0x5c> */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 10d671: 89 c2 mov %eax,%edx 10d673: c1 ea 18 shr $0x18,%edx 10d676: 83 e2 07 and $0x7,%edx */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 10d679: 8d 5a ff lea -0x1(%edx),%ebx 10d67c: 83 fb 02 cmp $0x2,%ebx 10d67f: 77 2b ja 10d6ac <_Thread_Get+0x4c> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10d681: 89 c3 mov %eax,%ebx 10d683: c1 eb 1b shr $0x1b,%ebx *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 10d686: 4b dec %ebx 10d687: 75 23 jne 10d6ac <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 10d689: 8b 14 95 ac 63 12 00 mov 0x1263ac(,%edx,4),%edx if ( !api_information ) { 10d690: 85 d2 test %edx,%edx 10d692: 74 18 je 10d6ac <_Thread_Get+0x4c> <== NEVER TAKEN *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 10d694: 8b 52 04 mov 0x4(%edx),%edx if ( !information ) { 10d697: 85 d2 test %edx,%edx 10d699: 74 11 je 10d6ac <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10d69b: 53 push %ebx 10d69c: 51 push %ecx 10d69d: 50 push %eax 10d69e: 52 push %edx 10d69f: e8 34 f7 ff ff call 10cdd8 <_Objects_Get> 10d6a4: 83 c4 10 add $0x10,%esp done: return tp; } 10d6a7: 8b 5d fc mov -0x4(%ebp),%ebx 10d6aa: c9 leave 10d6ab: c3 ret goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 10d6ac: c7 01 01 00 00 00 movl $0x1,(%ecx) { uint32_t the_api; uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; 10d6b2: 31 c0 xor %eax,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d6b4: 8b 5d fc mov -0x4(%ebp),%ebx 10d6b7: c9 leave 10d6b8: c3 ret 10d6b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d6bc: a1 d4 63 12 00 mov 0x1263d4,%eax 10d6c1: 40 inc %eax 10d6c2: a3 d4 63 12 00 mov %eax,0x1263d4 Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 10d6c7: c7 01 00 00 00 00 movl $0x0,(%ecx) tp = _Thread_Executing; 10d6cd: a1 78 66 12 00 mov 0x126678,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d6d2: 8b 5d fc mov -0x4(%ebp),%ebx 10d6d5: c9 leave 10d6d6: c3 ret =============================================================================== 00112274 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 112274: 55 push %ebp 112275: 89 e5 mov %esp,%ebp 112277: 53 push %ebx 112278: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 11227b: 8b 1d 78 66 12 00 mov 0x126678,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 112281: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 112287: 85 c0 test %eax,%eax 112289: 74 79 je 112304 <_Thread_Handler+0x90> 11228b: fa cli #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 11228c: a0 4c 60 12 00 mov 0x12604c,%al 112291: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 112294: c6 05 4c 60 12 00 01 movb $0x1,0x12604c #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 11229b: 8b 93 e8 00 00 00 mov 0xe8(%ebx),%edx 1122a1: 85 d2 test %edx,%edx 1122a3: 74 24 je 1122c9 <_Thread_Handler+0x55> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 1122a5: a1 60 64 12 00 mov 0x126460,%eax 1122aa: 39 c3 cmp %eax,%ebx 1122ac: 74 1b je 1122c9 <_Thread_Handler+0x55> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 1122ae: 85 c0 test %eax,%eax 1122b0: 74 11 je 1122c3 <_Thread_Handler+0x4f> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 1122b2: 83 ec 0c sub $0xc,%esp 1122b5: 05 e8 00 00 00 add $0xe8,%eax 1122ba: 50 push %eax 1122bb: e8 94 c5 ff ff call 10e854 <_CPU_Context_save_fp> 1122c0: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 1122c3: 89 1d 60 64 12 00 mov %ebx,0x126460 /* * 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 ); 1122c9: 83 ec 0c sub $0xc,%esp 1122cc: 53 push %ebx 1122cd: e8 aa c0 ff ff call 10e37c <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 1122d2: e8 65 b3 ff ff call 10d63c <_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) */ { 1122d7: 83 c4 10 add $0x10,%esp 1122da: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 1122de: 74 28 je 112308 <_Thread_Handler+0x94> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 1122e0: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 1122e6: 85 c0 test %eax,%eax 1122e8: 74 2d je 112317 <_Thread_Handler+0xa3> <== ALWAYS TAKEN * 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 ); 1122ea: 83 ec 0c sub $0xc,%esp 1122ed: 53 push %ebx 1122ee: e8 c5 c0 ff ff call 10e3b8 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 1122f3: 83 c4 0c add $0xc,%esp 1122f6: 6a 05 push $0x5 1122f8: 6a 01 push $0x1 1122fa: 6a 00 push $0x0 1122fc: e8 97 a5 ff ff call 10c898 <_Internal_error_Occurred> 112301: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; _ISR_Set_level(level); 112304: fb sti 112305: eb 85 jmp 11228c <_Thread_Handler+0x18> 112307: 90 nop <== NOT EXECUTED * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { INIT_NAME (); 112308: e8 33 c0 00 00 call 11e340 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 11230d: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 112313: 85 c0 test %eax,%eax 112315: 75 d3 jne 1122ea <_Thread_Handler+0x76> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 112317: 83 ec 0c sub $0xc,%esp 11231a: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 112320: ff 93 9c 00 00 00 call *0x9c(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 112326: 89 43 28 mov %eax,0x28(%ebx) 112329: 83 c4 10 add $0x10,%esp 11232c: eb bc jmp 1122ea <_Thread_Handler+0x76> =============================================================================== 0010d6d8 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10d6d8: 55 push %ebp 10d6d9: 89 e5 mov %esp,%ebp 10d6db: 57 push %edi 10d6dc: 56 push %esi 10d6dd: 53 push %ebx 10d6de: 83 ec 24 sub $0x24,%esp 10d6e1: 8b 5d 0c mov 0xc(%ebp),%ebx 10d6e4: 8b 75 14 mov 0x14(%ebp),%esi 10d6e7: 0f b6 7d 18 movzbl 0x18(%ebp),%edi 10d6eb: 8a 45 20 mov 0x20(%ebp),%al 10d6ee: 88 45 e7 mov %al,-0x19(%ebp) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 10d6f1: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10d6f8: 00 00 00 10d6fb: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10d702: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10d705: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10d70c: 00 00 00 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 10d70f: 56 push %esi 10d710: 53 push %ebx 10d711: e8 32 09 00 00 call 10e048 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10d716: 83 c4 10 add $0x10,%esp 10d719: 85 c0 test %eax,%eax 10d71b: 0f 84 6b 01 00 00 je 10d88c <_Thread_Initialize+0x1b4> 10d721: 39 c6 cmp %eax,%esi 10d723: 0f 87 63 01 00 00 ja 10d88c <_Thread_Initialize+0x1b4><== NEVER TAKEN Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10d729: 8b 93 cc 00 00 00 mov 0xcc(%ebx),%edx 10d72f: 89 93 c4 00 00 00 mov %edx,0xc4(%ebx) the_stack->size = size; 10d735: 89 83 c0 00 00 00 mov %eax,0xc0(%ebx) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 10d73b: 89 f8 mov %edi,%eax 10d73d: 84 c0 test %al,%al 10d73f: 0f 85 5f 01 00 00 jne 10d8a4 <_Thread_Initialize+0x1cc> 10d745: 31 c0 xor %eax,%eax extensions_area = NULL; the_thread->libc_reent = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) fp_area = NULL; 10d747: 31 ff xor %edi,%edi fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 10d749: 89 83 e8 00 00 00 mov %eax,0xe8(%ebx) the_thread->Start.fp_context = fp_area; 10d74f: 89 83 c8 00 00 00 mov %eax,0xc8(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10d755: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10d75c: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10d763: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10d76a: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10d771: a1 70 64 12 00 mov 0x126470,%eax 10d776: 85 c0 test %eax,%eax 10d778: 0f 85 46 01 00 00 jne 10d8c4 <_Thread_Initialize+0x1ec> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10d77e: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10d785: 00 00 00 * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 10d788: 31 f6 xor %esi,%esi /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10d78a: 8a 45 e7 mov -0x19(%ebp),%al 10d78d: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10d793: 8b 45 24 mov 0x24(%ebp),%eax 10d796: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10d79c: 8b 45 28 mov 0x28(%ebp),%eax 10d79f: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10d7a5: 8b 45 2c mov 0x2c(%ebp),%eax 10d7a8: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10d7ae: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10d7b5: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10d7bc: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->real_priority = priority; 10d7c3: 8b 45 1c mov 0x1c(%ebp),%eax 10d7c6: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10d7c9: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10d7cf: 83 ec 08 sub $0x8,%esp 10d7d2: 50 push %eax 10d7d3: 53 push %ebx 10d7d4: e8 ab 06 00 00 call 10de84 <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10d7d9: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10d7e0: 00 00 00 10d7e3: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10d7ea: 00 00 00 _Thread_Stack_Free( the_thread ); return false; } 10d7ed: 8b 45 08 mov 0x8(%ebp),%eax 10d7f0: 8b 40 1c mov 0x1c(%eax),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10d7f3: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d7f7: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10d7fa: 8b 45 30 mov 0x30(%ebp),%eax 10d7fd: 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 ); 10d800: 89 1c 24 mov %ebx,(%esp) 10d803: e8 3c 0c 00 00 call 10e444 <_User_extensions_Thread_create> if ( extension_status ) 10d808: 83 c4 10 add $0x10,%esp 10d80b: 84 c0 test %al,%al 10d80d: 0f 85 85 00 00 00 jne 10d898 <_Thread_Initialize+0x1c0> return true; failed: if ( the_thread->libc_reent ) 10d813: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 10d819: 85 c0 test %eax,%eax 10d81b: 74 0c je 10d829 <_Thread_Initialize+0x151> _Workspace_Free( the_thread->libc_reent ); 10d81d: 83 ec 0c sub $0xc,%esp 10d820: 50 push %eax 10d821: e8 ae 0f 00 00 call 10e7d4 <_Workspace_Free> 10d826: 83 c4 10 add $0x10,%esp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10d829: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10d82f: 85 c0 test %eax,%eax 10d831: 74 0c je 10d83f <_Thread_Initialize+0x167> _Workspace_Free( the_thread->API_Extensions[i] ); 10d833: 83 ec 0c sub $0xc,%esp 10d836: 50 push %eax 10d837: e8 98 0f 00 00 call 10e7d4 <_Workspace_Free> 10d83c: 83 c4 10 add $0x10,%esp failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10d83f: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax 10d845: 85 c0 test %eax,%eax 10d847: 74 0c je 10d855 <_Thread_Initialize+0x17d><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10d849: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d84c: 50 push %eax <== NOT EXECUTED 10d84d: e8 82 0f 00 00 call 10e7d4 <_Workspace_Free> <== NOT EXECUTED 10d852: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( extensions_area ) 10d855: 85 f6 test %esi,%esi 10d857: 74 0c je 10d865 <_Thread_Initialize+0x18d> (void) _Workspace_Free( extensions_area ); 10d859: 83 ec 0c sub $0xc,%esp 10d85c: 56 push %esi 10d85d: e8 72 0f 00 00 call 10e7d4 <_Workspace_Free> 10d862: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10d865: 85 ff test %edi,%edi 10d867: 74 0c je 10d875 <_Thread_Initialize+0x19d> (void) _Workspace_Free( fp_area ); 10d869: 83 ec 0c sub $0xc,%esp 10d86c: 57 push %edi 10d86d: e8 62 0f 00 00 call 10e7d4 <_Workspace_Free> 10d872: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10d875: 83 ec 0c sub $0xc,%esp 10d878: 53 push %ebx 10d879: e8 2e 08 00 00 call 10e0ac <_Thread_Stack_Free> return false; 10d87e: 83 c4 10 add $0x10,%esp 10d881: 31 c0 xor %eax,%eax } 10d883: 8d 65 f4 lea -0xc(%ebp),%esp 10d886: 5b pop %ebx 10d887: 5e pop %esi 10d888: 5f pop %edi 10d889: c9 leave 10d88a: c3 ret 10d88b: 90 nop <== NOT EXECUTED * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ 10d88c: 31 c0 xor %eax,%eax _Thread_Stack_Free( the_thread ); return false; } 10d88e: 8d 65 f4 lea -0xc(%ebp),%esp 10d891: 5b pop %ebx 10d892: 5e pop %esi 10d893: 5f pop %edi 10d894: c9 leave 10d895: c3 ret 10d896: 66 90 xchg %ax,%ax <== NOT EXECUTED * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; 10d898: b0 01 mov $0x1,%al _Thread_Stack_Free( the_thread ); return false; } 10d89a: 8d 65 f4 lea -0xc(%ebp),%esp 10d89d: 5b pop %ebx 10d89e: 5e pop %esi 10d89f: 5f pop %edi 10d8a0: c9 leave 10d8a1: c3 ret 10d8a2: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10d8a4: 83 ec 0c sub $0xc,%esp 10d8a7: 6a 6c push $0x6c 10d8a9: e8 0a 0f 00 00 call 10e7b8 <_Workspace_Allocate> 10d8ae: 89 c7 mov %eax,%edi if ( !fp_area ) 10d8b0: 83 c4 10 add $0x10,%esp 10d8b3: 85 c0 test %eax,%eax 10d8b5: 0f 85 8e fe ff ff jne 10d749 <_Thread_Initialize+0x71> * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 10d8bb: 31 f6 xor %esi,%esi 10d8bd: e9 51 ff ff ff jmp 10d813 <_Thread_Initialize+0x13b> 10d8c2: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 10d8c4: 83 ec 0c sub $0xc,%esp 10d8c7: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10d8ce: 50 push %eax 10d8cf: e8 e4 0e 00 00 call 10e7b8 <_Workspace_Allocate> 10d8d4: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10d8d6: 83 c4 10 add $0x10,%esp 10d8d9: 85 c0 test %eax,%eax 10d8db: 0f 84 32 ff ff ff je 10d813 <_Thread_Initialize+0x13b> goto failed; } the_thread->extensions = (void **) extensions_area; 10d8e1: 89 83 f8 00 00 00 mov %eax,0xf8(%ebx) 10d8e7: 8b 0d 70 64 12 00 mov 0x126470,%ecx * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10d8ed: 31 d2 xor %edx,%edx (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10d8ef: 31 c0 xor %eax,%eax 10d8f1: 8d 76 00 lea 0x0(%esi),%esi * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) the_thread->extensions[i] = NULL; 10d8f4: c7 04 96 00 00 00 00 movl $0x0,(%esi,%edx,4) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10d8fb: 40 inc %eax 10d8fc: 89 c2 mov %eax,%edx 10d8fe: 39 c1 cmp %eax,%ecx 10d900: 73 f2 jae 10d8f4 <_Thread_Initialize+0x21c> 10d902: e9 83 fe ff ff jmp 10d78a <_Thread_Initialize+0xb2> =============================================================================== 0011190c <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 11190c: 55 push %ebp 11190d: 89 e5 mov %esp,%ebp 11190f: 53 push %ebx 111910: 83 ec 10 sub $0x10,%esp 111913: 8b 5d 08 mov 0x8(%ebp),%ebx the_thread->resource_count = 0; 111916: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->is_preemptible = the_thread->Start.is_preemptible; 11191d: 8a 83 ac 00 00 00 mov 0xac(%ebx),%al 111923: 88 43 74 mov %al,0x74(%ebx) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 111926: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 11192c: 89 43 7c mov %eax,0x7c(%ebx) the_thread->budget_callout = the_thread->Start.budget_callout; 11192f: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax 111935: 89 83 80 00 00 00 mov %eax,0x80(%ebx) the_thread->Start.pointer_argument = pointer_argument; 11193b: 8b 45 0c mov 0xc(%ebp),%eax 11193e: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 111944: 8b 45 10 mov 0x10(%ebp),%eax 111947: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 11194d: 53 push %ebx 11194e: e8 fd ce ff ff call 10e850 <_Thread_queue_Extract_with_proxy> 111953: 83 c4 10 add $0x10,%esp 111956: 84 c0 test %al,%al 111958: 75 06 jne 111960 <_Thread_Reset+0x54> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 11195a: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 11195e: 74 28 je 111988 <_Thread_Reset+0x7c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 111960: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax 111966: 39 43 14 cmp %eax,0x14(%ebx) 111969: 74 15 je 111980 <_Thread_Reset+0x74> the_thread->real_priority = the_thread->Start.initial_priority; 11196b: 89 43 18 mov %eax,0x18(%ebx) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 11196e: 89 45 0c mov %eax,0xc(%ebp) 111971: 89 5d 08 mov %ebx,0x8(%ebp) } } 111974: 8b 5d fc mov -0x4(%ebp),%ebx 111977: 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 ); 111978: e9 af d0 ff ff jmp 10ea2c <_Thread_Set_priority> 11197d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } 111980: 8b 5d fc mov -0x4(%ebp),%ebx 111983: c9 leave 111984: c3 ret 111985: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 111988: 83 ec 0c sub $0xc,%esp 11198b: 8d 43 48 lea 0x48(%ebx),%eax 11198e: 50 push %eax 11198f: e8 e4 d8 ff ff call 10f278 <_Watchdog_Remove> 111994: 83 c4 10 add $0x10,%esp 111997: eb c7 jmp 111960 <_Thread_Reset+0x54> =============================================================================== 0010e9a4 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10e9a4: 55 push %ebp 10e9a5: 89 e5 mov %esp,%ebp 10e9a7: 53 push %ebx 10e9a8: 83 ec 04 sub $0x4,%esp 10e9ab: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !_States_Is_dormant( the_thread->current_state ) ) { 10e9ae: f6 43 10 01 testb $0x1,0x10(%ebx) 10e9b2: 74 08 je 10e9bc <_Thread_Restart+0x18> _Thread_Restart_self(); return true; } return false; 10e9b4: 31 c0 xor %eax,%eax } 10e9b6: 8b 5d fc mov -0x4(%ebp),%ebx 10e9b9: c9 leave 10e9ba: c3 ret 10e9bb: 90 nop <== NOT EXECUTED Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 10e9bc: 83 ec 0c sub $0xc,%esp 10e9bf: 53 push %ebx 10e9c0: e8 b3 01 00 00 call 10eb78 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 10e9c5: 83 c4 0c add $0xc,%esp 10e9c8: ff 75 10 pushl 0x10(%ebp) 10e9cb: ff 75 0c pushl 0xc(%ebp) 10e9ce: 53 push %ebx 10e9cf: e8 38 2f 00 00 call 11190c <_Thread_Reset> _Thread_Load_environment( the_thread ); 10e9d4: 89 1c 24 mov %ebx,(%esp) 10e9d7: e8 18 2c 00 00 call 1115f4 <_Thread_Load_environment> _Thread_Ready( the_thread ); 10e9dc: 89 1c 24 mov %ebx,(%esp) 10e9df: e8 84 2e 00 00 call 111868 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 10e9e4: 89 1c 24 mov %ebx,(%esp) 10e9e7: e8 94 06 00 00 call 10f080 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 10e9ec: 83 c4 10 add $0x10,%esp 10e9ef: 3b 1d 58 76 12 00 cmp 0x127658,%ebx 10e9f5: 74 07 je 10e9fe <_Thread_Restart+0x5a> _Thread_Restart_self(); return true; 10e9f7: b0 01 mov $0x1,%al } return false; } 10e9f9: 8b 5d fc mov -0x4(%ebp),%ebx 10e9fc: c9 leave 10e9fd: c3 ret */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 10e9fe: 83 bb e8 00 00 00 00 cmpl $0x0,0xe8(%ebx) 10ea05: 74 12 je 10ea19 <_Thread_Restart+0x75> _Context_Restore_fp( &_Thread_Executing->fp_context ); 10ea07: 83 ec 0c sub $0xc,%esp 10ea0a: 81 c3 e8 00 00 00 add $0xe8,%ebx 10ea10: 53 push %ebx 10ea11: e8 28 0a 00 00 call 10f43e <_CPU_Context_restore_fp> 10ea16: 83 c4 10 add $0x10,%esp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 10ea19: 83 ec 0c sub $0xc,%esp 10ea1c: a1 58 76 12 00 mov 0x127658,%eax 10ea21: 05 d0 00 00 00 add $0xd0,%eax 10ea26: 50 push %eax 10ea27: e8 01 0a 00 00 call 10f42d <_CPU_Context_restore> =============================================================================== 001111a8 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 1111a8: 55 push %ebp 1111a9: 89 e5 mov %esp,%ebp 1111ab: 53 push %ebx 1111ac: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 1111af: 9c pushf 1111b0: fa cli 1111b1: 59 pop %ecx current_state = the_thread->current_state; 1111b2: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 1111b5: f6 c2 02 test $0x2,%dl 1111b8: 74 6e je 111228 <_Thread_Resume+0x80> <== NEVER TAKEN 1111ba: 83 e2 fd and $0xfffffffd,%edx current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); 1111bd: 89 50 10 mov %edx,0x10(%eax) if ( _States_Is_ready( current_state ) ) { 1111c0: 85 d2 test %edx,%edx 1111c2: 75 64 jne 111228 <_Thread_Resume+0x80> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 1111c4: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 1111ca: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 1111d1: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 1111d4: 66 8b 15 00 95 12 00 mov 0x129500,%dx 1111db: 0b 90 94 00 00 00 or 0x94(%eax),%edx 1111e1: 66 89 15 00 95 12 00 mov %dx,0x129500 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 1111e8: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1111ee: 8d 5a 04 lea 0x4(%edx),%ebx 1111f1: 89 18 mov %ebx,(%eax) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 1111f3: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 1111f6: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 1111f9: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 1111fb: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 1111fe: 51 push %ecx 1111ff: 9d popf 111200: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 111201: 8b 50 14 mov 0x14(%eax),%edx 111204: 8b 1d fc 96 12 00 mov 0x1296fc,%ebx 11120a: 3b 53 14 cmp 0x14(%ebx),%edx 11120d: 73 19 jae 111228 <_Thread_Resume+0x80> _Thread_Heir = the_thread; 11120f: a3 fc 96 12 00 mov %eax,0x1296fc if ( _Thread_Executing->is_preemptible || 111214: a1 f8 96 12 00 mov 0x1296f8,%eax 111219: 80 78 74 00 cmpb $0x0,0x74(%eax) 11121d: 74 11 je 111230 <_Thread_Resume+0x88> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 11121f: c6 05 04 97 12 00 01 movb $0x1,0x129704 111226: 66 90 xchg %ax,%ax } } } _ISR_Enable( level ); 111228: 51 push %ecx 111229: 9d popf } 11122a: 5b pop %ebx 11122b: c9 leave 11122c: c3 ret 11122d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 111230: 85 d2 test %edx,%edx 111232: 74 eb je 11121f <_Thread_Resume+0x77> <== NEVER TAKEN 111234: eb f2 jmp 111228 <_Thread_Resume+0x80> =============================================================================== 0010def0 <_Thread_Set_state>: void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 10def0: 55 push %ebp 10def1: 89 e5 mov %esp,%ebp 10def3: 56 push %esi 10def4: 53 push %ebx 10def5: 8b 45 08 mov 0x8(%ebp),%eax 10def8: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10defb: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10df01: 9c pushf 10df02: fa cli 10df03: 59 pop %ecx if ( !_States_Is_ready( the_thread->current_state ) ) { 10df04: 8b 58 10 mov 0x10(%eax),%ebx 10df07: 85 db test %ebx,%ebx 10df09: 75 2d jne 10df38 <_Thread_Set_state+0x48> _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; 10df0b: 89 70 10 mov %esi,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 10df0e: 8b 5a 08 mov 0x8(%edx),%ebx 10df11: 39 1a cmp %ebx,(%edx) 10df13: 74 3b je 10df50 <_Thread_Set_state+0x60> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10df15: 8b 18 mov (%eax),%ebx previous = the_node->previous; 10df17: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10df1a: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 10df1d: 89 1a mov %ebx,(%edx) _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 10df1f: 51 push %ecx 10df20: 9d popf 10df21: fa cli if ( _Thread_Is_heir( the_thread ) ) 10df22: 3b 05 7c 66 12 00 cmp 0x12667c,%eax 10df28: 74 66 je 10df90 <_Thread_Set_state+0xa0> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10df2a: 3b 05 78 66 12 00 cmp 0x126678,%eax 10df30: 74 12 je 10df44 <_Thread_Set_state+0x54> _Context_Switch_necessary = true; _ISR_Enable( level ); 10df32: 51 push %ecx 10df33: 9d popf } 10df34: 5b pop %ebx 10df35: 5e pop %esi 10df36: c9 leave 10df37: c3 ret RTEMS_INLINE_ROUTINE States_Control _States_Set ( States_Control states_to_set, States_Control current_state ) { return (current_state | states_to_set); 10df38: 09 f3 or %esi,%ebx 10df3a: 89 58 10 mov %ebx,0x10(%eax) ready = the_thread->ready; _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 10df3d: 51 push %ecx 10df3e: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10df3f: 5b pop %ebx 10df40: 5e pop %esi 10df41: c9 leave 10df42: c3 ret 10df43: 90 nop <== NOT EXECUTED if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 10df44: c6 05 84 66 12 00 01 movb $0x1,0x126684 10df4b: eb e5 jmp 10df32 <_Thread_Set_state+0x42> 10df4d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10df50: 8d 5a 04 lea 0x4(%edx),%ebx 10df53: 89 1a mov %ebx,(%edx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10df55: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10df5c: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10df5f: 8b 98 90 00 00 00 mov 0x90(%eax),%ebx 10df65: 66 8b 13 mov (%ebx),%dx 10df68: 66 23 90 9a 00 00 00 and 0x9a(%eax),%dx 10df6f: 66 89 13 mov %dx,(%ebx) if ( *the_priority_map->minor == 0 ) 10df72: 66 85 d2 test %dx,%dx 10df75: 75 a8 jne 10df1f <_Thread_Set_state+0x2f> _Priority_Major_bit_map &= the_priority_map->block_major; 10df77: 66 8b 15 80 64 12 00 mov 0x126480,%dx 10df7e: 23 90 98 00 00 00 and 0x98(%eax),%edx 10df84: 66 89 15 80 64 12 00 mov %dx,0x126480 10df8b: eb 92 jmp 10df1f <_Thread_Set_state+0x2f> 10df8d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10df90: 66 8b 35 80 64 12 00 mov 0x126480,%si 10df97: 31 d2 xor %edx,%edx 10df99: 89 d3 mov %edx,%ebx 10df9b: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10df9f: 0f b7 db movzwl %bx,%ebx 10dfa2: 66 8b b4 1b 00 65 12 mov 0x126500(%ebx,%ebx,1),%si 10dfa9: 00 10dfaa: 66 0f bc d6 bsf %si,%dx return (_Priority_Bits_index( major ) << 4) + 10dfae: c1 e3 04 shl $0x4,%ebx 10dfb1: 0f b7 d2 movzwl %dx,%edx */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 10dfb4: 8d 14 13 lea (%ebx,%edx,1),%edx 10dfb7: 8d 14 52 lea (%edx,%edx,2),%edx 10dfba: c1 e2 02 shl $0x2,%edx 10dfbd: 03 15 a0 63 12 00 add 0x1263a0,%edx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10dfc3: 8b 12 mov (%edx),%edx 10dfc5: 89 15 7c 66 12 00 mov %edx,0x12667c 10dfcb: e9 5a ff ff ff jmp 10df2a <_Thread_Set_state+0x3a> =============================================================================== 0010dfd0 <_Thread_Set_transient>: */ void _Thread_Set_transient( Thread_Control *the_thread ) { 10dfd0: 55 push %ebp 10dfd1: 89 e5 mov %esp,%ebp 10dfd3: 56 push %esi 10dfd4: 53 push %ebx 10dfd5: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; uint32_t old_state; Chain_Control *ready; ready = the_thread->ready; 10dfd8: 8b 88 8c 00 00 00 mov 0x8c(%eax),%ecx _ISR_Disable( level ); 10dfde: 9c pushf 10dfdf: fa cli 10dfe0: 5b pop %ebx old_state = the_thread->current_state; 10dfe1: 8b 50 10 mov 0x10(%eax),%edx 10dfe4: 89 d6 mov %edx,%esi 10dfe6: 83 ce 04 or $0x4,%esi 10dfe9: 89 70 10 mov %esi,0x10(%eax) the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state ); if ( _States_Is_ready( old_state ) ) { 10dfec: 85 d2 test %edx,%edx 10dfee: 75 11 jne 10e001 <_Thread_Set_transient+0x31> if ( _Chain_Has_only_one_node( ready ) ) { 10dff0: 8b 51 08 mov 0x8(%ecx),%edx 10dff3: 39 11 cmp %edx,(%ecx) 10dff5: 74 11 je 10e008 <_Thread_Set_transient+0x38> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10dff7: 8b 10 mov (%eax),%edx previous = the_node->previous; 10dff9: 8b 40 04 mov 0x4(%eax),%eax next->previous = previous; 10dffc: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 10dfff: 89 10 mov %edx,(%eax) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); } _ISR_Enable( level ); 10e001: 53 push %ebx 10e002: 9d popf } 10e003: 5b pop %ebx 10e004: 5e pop %esi 10e005: c9 leave 10e006: c3 ret 10e007: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e008: 8d 51 04 lea 0x4(%ecx),%edx 10e00b: 89 11 mov %edx,(%ecx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10e00d: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) the_chain->last = _Chain_Head(the_chain); 10e014: 89 49 08 mov %ecx,0x8(%ecx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10e017: 8b 88 90 00 00 00 mov 0x90(%eax),%ecx 10e01d: 66 8b 11 mov (%ecx),%dx 10e020: 66 23 90 9a 00 00 00 and 0x9a(%eax),%dx 10e027: 66 89 11 mov %dx,(%ecx) if ( *the_priority_map->minor == 0 ) 10e02a: 66 85 d2 test %dx,%dx 10e02d: 75 d2 jne 10e001 <_Thread_Set_transient+0x31> _Priority_Major_bit_map &= the_priority_map->block_major; 10e02f: 66 8b 15 80 64 12 00 mov 0x126480,%dx 10e036: 23 90 98 00 00 00 and 0x98(%eax),%edx 10e03c: 66 89 15 80 64 12 00 mov %dx,0x126480 10e043: eb bc jmp 10e001 <_Thread_Set_transient+0x31> =============================================================================== 0010e048 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10e048: 55 push %ebp 10e049: 89 e5 mov %esp,%ebp 10e04b: 53 push %ebx 10e04c: 83 ec 04 sub $0x4,%esp the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) the_stack_size = 0; 10e04f: a1 b0 22 12 00 mov 0x1222b0,%eax 10e054: 8b 5d 0c mov 0xc(%ebp),%ebx 10e057: 39 c3 cmp %eax,%ebx 10e059: 73 02 jae 10e05d <_Thread_Stack_Allocate+0x15> 10e05b: 89 c3 mov %eax,%ebx * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( Configuration.stack_allocate_hook ) { 10e05d: a1 e0 22 12 00 mov 0x1222e0,%eax 10e062: 85 c0 test %eax,%eax 10e064: 74 32 je 10e098 <_Thread_Stack_Allocate+0x50> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 10e066: 83 ec 0c sub $0xc,%esp 10e069: 53 push %ebx 10e06a: ff d0 call *%eax 10e06c: 83 c4 10 add $0x10,%esp the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 10e06f: 85 c0 test %eax,%eax 10e071: 74 11 je 10e084 <_Thread_Stack_Allocate+0x3c> the_stack_size = 0; the_thread->Start.stack = stack_addr; 10e073: 8b 55 08 mov 0x8(%ebp),%edx 10e076: 89 82 cc 00 00 00 mov %eax,0xcc(%edx) return the_stack_size; } 10e07c: 89 d8 mov %ebx,%eax 10e07e: 8b 5d fc mov -0x4(%ebp),%ebx 10e081: c9 leave 10e082: c3 ret 10e083: 90 nop <== NOT EXECUTED the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) the_stack_size = 0; 10e084: 31 db xor %ebx,%ebx the_thread->Start.stack = stack_addr; 10e086: 8b 55 08 mov 0x8(%ebp),%edx 10e089: 89 82 cc 00 00 00 mov %eax,0xcc(%edx) return the_stack_size; } 10e08f: 89 d8 mov %ebx,%eax 10e091: 8b 5d fc mov -0x4(%ebp),%ebx 10e094: c9 leave 10e095: c3 ret 10e096: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 10e098: 83 c3 10 add $0x10,%ebx * get and keep the stack adjust factor, the stack alignment, and * the context initialization sequence in sync. */ the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); 10e09b: 83 ec 0c sub $0xc,%esp 10e09e: 53 push %ebx 10e09f: e8 14 07 00 00 call 10e7b8 <_Workspace_Allocate> 10e0a4: 83 c4 10 add $0x10,%esp 10e0a7: eb c6 jmp 10e06f <_Thread_Stack_Allocate+0x27> =============================================================================== 0010e0ac <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10e0ac: 55 push %ebp 10e0ad: 89 e5 mov %esp,%ebp 10e0af: 83 ec 08 sub $0x8,%esp 10e0b2: 8b 55 08 mov 0x8(%ebp),%edx * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) 10e0b5: a1 e4 22 12 00 mov 0x1222e4,%eax 10e0ba: 85 c0 test %eax,%eax 10e0bc: 74 0e je 10e0cc <_Thread_Stack_Free+0x20> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10e0be: 8b 92 c4 00 00 00 mov 0xc4(%edx),%edx 10e0c4: 89 55 08 mov %edx,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10e0c7: c9 leave * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10e0c8: ff e0 jmp *%eax 10e0ca: 66 90 xchg %ax,%ax <== NOT EXECUTED else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10e0cc: 8b 82 c4 00 00 00 mov 0xc4(%edx),%eax 10e0d2: 89 45 08 mov %eax,0x8(%ebp) } 10e0d5: c9 leave */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10e0d6: e9 f9 06 00 00 jmp 10e7d4 <_Workspace_Free> =============================================================================== 0010e138 <_Thread_Start>: Thread_Start_types the_prototype, void *entry_point, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10e138: 55 push %ebp 10e139: 89 e5 mov %esp,%ebp 10e13b: 53 push %ebx 10e13c: 83 ec 04 sub $0x4,%esp 10e13f: 8b 5d 08 mov 0x8(%ebp),%ebx if ( _States_Is_dormant( the_thread->current_state ) ) { 10e142: f6 43 10 01 testb $0x1,0x10(%ebx) 10e146: 75 08 jne 10e150 <_Thread_Start+0x18> _User_extensions_Thread_start( the_thread ); return true; } return false; 10e148: 31 c0 xor %eax,%eax } 10e14a: 8b 5d fc mov -0x4(%ebp),%ebx 10e14d: c9 leave 10e14e: c3 ret 10e14f: 90 nop <== NOT EXECUTED Thread_Entry_numeric_type numeric_argument ) { if ( _States_Is_dormant( the_thread->current_state ) ) { the_thread->Start.entry_point = (Thread_Entry) entry_point; 10e150: 8b 45 10 mov 0x10(%ebp),%eax 10e153: 89 83 9c 00 00 00 mov %eax,0x9c(%ebx) the_thread->Start.prototype = the_prototype; 10e159: 8b 45 0c mov 0xc(%ebp),%eax 10e15c: 89 83 a0 00 00 00 mov %eax,0xa0(%ebx) the_thread->Start.pointer_argument = pointer_argument; 10e162: 8b 45 14 mov 0x14(%ebp),%eax 10e165: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 10e16b: 8b 45 18 mov 0x18(%ebp),%eax 10e16e: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) _Thread_Load_environment( the_thread ); 10e174: 83 ec 0c sub $0xc,%esp 10e177: 53 push %ebx 10e178: e8 0f 28 00 00 call 11098c <_Thread_Load_environment> _Thread_Ready( the_thread ); 10e17d: 89 1c 24 mov %ebx,(%esp) 10e180: e8 7b 2a 00 00 call 110c00 <_Thread_Ready> _User_extensions_Thread_start( the_thread ); 10e185: 89 1c 24 mov %ebx,(%esp) 10e188: e8 4b 03 00 00 call 10e4d8 <_User_extensions_Thread_start> return true; 10e18d: 83 c4 10 add $0x10,%esp 10e190: b0 01 mov $0x1,%al } return false; } 10e192: 8b 5d fc mov -0x4(%ebp),%ebx 10e195: c9 leave 10e196: c3 ret =============================================================================== 00110ca4 <_Thread_Suspend>: */ void _Thread_Suspend( Thread_Control *the_thread ) { 110ca4: 55 push %ebp 110ca5: 89 e5 mov %esp,%ebp 110ca7: 56 push %esi 110ca8: 53 push %ebx 110ca9: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 110cac: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 110cb2: 9c pushf 110cb3: fa cli 110cb4: 59 pop %ecx if ( !_States_Is_ready( the_thread->current_state ) ) { 110cb5: 8b 58 10 mov 0x10(%eax),%ebx 110cb8: 85 db test %ebx,%ebx 110cba: 75 34 jne 110cf0 <_Thread_Suspend+0x4c> _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 110cbc: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 110cc3: 8b 5a 08 mov 0x8(%edx),%ebx 110cc6: 39 1a cmp %ebx,(%edx) 110cc8: 74 3e je 110d08 <_Thread_Suspend+0x64> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 110cca: 8b 18 mov (%eax),%ebx previous = the_node->previous; 110ccc: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 110ccf: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 110cd2: 89 1a mov %ebx,(%edx) _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 110cd4: 51 push %ecx 110cd5: 9d popf 110cd6: fa cli if ( _Thread_Is_heir( the_thread ) ) 110cd7: 3b 05 7c 66 12 00 cmp 0x12667c,%eax 110cdd: 74 69 je 110d48 <_Thread_Suspend+0xa4> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 110cdf: 3b 05 78 66 12 00 cmp 0x126678,%eax 110ce5: 74 15 je 110cfc <_Thread_Suspend+0x58> _Context_Switch_necessary = true; _ISR_Enable( level ); 110ce7: 51 push %ecx 110ce8: 9d popf } 110ce9: 5b pop %ebx 110cea: 5e pop %esi 110ceb: c9 leave 110cec: c3 ret 110ced: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 110cf0: 83 cb 02 or $0x2,%ebx 110cf3: 89 58 10 mov %ebx,0x10(%eax) ready = the_thread->ready; _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 110cf6: 51 push %ecx 110cf7: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 110cf8: 5b pop %ebx 110cf9: 5e pop %esi 110cfa: c9 leave 110cfb: c3 ret if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 110cfc: c6 05 84 66 12 00 01 movb $0x1,0x126684 110d03: eb e2 jmp 110ce7 <_Thread_Suspend+0x43> 110d05: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 110d08: 8d 5a 04 lea 0x4(%edx),%ebx 110d0b: 89 1a mov %ebx,(%edx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 110d0d: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 110d14: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 110d17: 8b 98 90 00 00 00 mov 0x90(%eax),%ebx 110d1d: 66 8b 13 mov (%ebx),%dx 110d20: 66 23 90 9a 00 00 00 and 0x9a(%eax),%dx 110d27: 66 89 13 mov %dx,(%ebx) if ( *the_priority_map->minor == 0 ) 110d2a: 66 85 d2 test %dx,%dx 110d2d: 75 a5 jne 110cd4 <_Thread_Suspend+0x30> _Priority_Major_bit_map &= the_priority_map->block_major; 110d2f: 66 8b 15 80 64 12 00 mov 0x126480,%dx 110d36: 23 90 98 00 00 00 and 0x98(%eax),%edx 110d3c: 66 89 15 80 64 12 00 mov %dx,0x126480 110d43: eb 8f jmp 110cd4 <_Thread_Suspend+0x30> 110d45: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 110d48: 66 8b 35 80 64 12 00 mov 0x126480,%si 110d4f: 31 d2 xor %edx,%edx 110d51: 89 d3 mov %edx,%ebx 110d53: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 110d57: 0f b7 db movzwl %bx,%ebx 110d5a: 66 8b b4 1b 00 65 12 mov 0x126500(%ebx,%ebx,1),%si 110d61: 00 110d62: 66 0f bc d6 bsf %si,%dx return (_Priority_Bits_index( major ) << 4) + 110d66: c1 e3 04 shl $0x4,%ebx 110d69: 0f b7 d2 movzwl %dx,%edx */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 110d6c: 8d 14 13 lea (%ebx,%edx,1),%edx 110d6f: 8d 14 52 lea (%edx,%edx,2),%edx 110d72: c1 e2 02 shl $0x2,%edx 110d75: 03 15 a0 63 12 00 add 0x1263a0,%edx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 110d7b: 8b 12 mov (%edx),%edx 110d7d: 89 15 7c 66 12 00 mov %edx,0x12667c 110d83: e9 57 ff ff ff jmp 110cdf <_Thread_Suspend+0x3b> =============================================================================== 0010e1d8 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10e1d8: 55 push %ebp 10e1d9: 89 e5 mov %esp,%ebp 10e1db: 57 push %edi 10e1dc: 56 push %esi 10e1dd: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10e1de: a1 78 66 12 00 mov 0x126678,%eax ready = executing->ready; 10e1e3: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10e1e9: 9c pushf 10e1ea: fa cli 10e1eb: 5b pop %ebx } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10e1ec: 8b 4a 08 mov 0x8(%edx),%ecx Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( !_Chain_Has_only_one_node( ready ) ) { 10e1ef: 39 0a cmp %ecx,(%edx) 10e1f1: 74 3d je 10e230 <_Thread_Yield_processor+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10e1f3: 8b 38 mov (%eax),%edi previous = the_node->previous; 10e1f5: 8b 70 04 mov 0x4(%eax),%esi next->previous = previous; 10e1f8: 89 77 04 mov %esi,0x4(%edi) previous->next = next; 10e1fb: 89 3e mov %edi,(%esi) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e1fd: 8d 72 04 lea 0x4(%edx),%esi 10e200: 89 30 mov %esi,(%eax) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; 10e202: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10e205: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10e207: 89 48 04 mov %ecx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10e20a: 53 push %ebx 10e20b: 9d popf 10e20c: fa cli if ( _Thread_Is_heir( executing ) ) 10e20d: 3b 05 7c 66 12 00 cmp 0x12667c,%eax 10e213: 74 0f je 10e224 <_Thread_Yield_processor+0x4c><== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 10e215: c6 05 84 66 12 00 01 movb $0x1,0x126684 _ISR_Enable( level ); 10e21c: 53 push %ebx 10e21d: 9d popf } 10e21e: 5b pop %ebx 10e21f: 5e pop %esi 10e220: 5f pop %edi 10e221: c9 leave 10e222: c3 ret 10e223: 90 nop <== NOT EXECUTED _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 10e224: 8b 02 mov (%edx),%eax 10e226: a3 7c 66 12 00 mov %eax,0x12667c 10e22b: eb e8 jmp 10e215 <_Thread_Yield_processor+0x3d> 10e22d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10e230: 3b 05 7c 66 12 00 cmp 0x12667c,%eax 10e236: 75 dd jne 10e215 <_Thread_Yield_processor+0x3d><== NEVER TAKEN 10e238: eb e2 jmp 10e21c <_Thread_Yield_processor+0x44> =============================================================================== 0010d0ec <_Thread_blocking_operation_Cancel>: Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 10d0ec: 55 push %ebp 10d0ed: 89 e5 mov %esp,%ebp 10d0ef: 53 push %ebx 10d0f0: 83 ec 04 sub $0x4,%esp 10d0f3: 8b 5d 0c mov 0xc(%ebp),%ebx 10d0f6: 8b 45 10 mov 0x10(%ebp),%eax #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 10d0f9: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 10d100: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d104: 74 16 je 10d11c <_Thread_blocking_operation_Cancel+0x30> _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 10d106: 50 push %eax 10d107: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10d108: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10d10f: 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 } 10d112: 8b 5d fc mov -0x4(%ebp),%ebx 10d115: c9 leave 10d116: e9 5d 01 00 00 jmp 10d278 <_Thread_Clear_state> 10d11b: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10d11c: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10d123: 50 push %eax 10d124: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10d125: 83 ec 0c sub $0xc,%esp 10d128: 8d 43 48 lea 0x48(%ebx),%eax 10d12b: 50 push %eax 10d12c: e8 5f 15 00 00 call 10e690 <_Watchdog_Remove> 10d131: 83 c4 10 add $0x10,%esp 10d134: eb d2 jmp 10d108 <_Thread_blocking_operation_Cancel+0x1c> =============================================================================== 0010d9d8 <_Thread_queue_Dequeue>: */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { 10d9d8: 55 push %ebp 10d9d9: 89 e5 mov %esp,%ebp 10d9db: 53 push %ebx 10d9dc: 83 ec 04 sub $0x4,%esp 10d9df: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10d9e2: 83 7b 34 01 cmpl $0x1,0x34(%ebx) 10d9e6: 74 1c je 10da04 <_Thread_queue_Dequeue+0x2c> dequeue_p = _Thread_queue_Dequeue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ dequeue_p = _Thread_queue_Dequeue_fifo; 10d9e8: b8 18 0a 11 00 mov $0x110a18,%eax the_thread = (*dequeue_p)( the_thread_queue ); 10d9ed: 83 ec 0c sub $0xc,%esp 10d9f0: 53 push %ebx 10d9f1: ff d0 call *%eax _ISR_Disable( level ); 10d9f3: 9c pushf 10d9f4: fa cli 10d9f5: 5a pop %edx if ( !the_thread ) { 10d9f6: 83 c4 10 add $0x10,%esp 10d9f9: 85 c0 test %eax,%eax 10d9fb: 74 0f je 10da0c <_Thread_queue_Dequeue+0x34> (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; the_thread = _Thread_Executing; } } _ISR_Enable( level ); 10d9fd: 52 push %edx 10d9fe: 9d popf return the_thread; } 10d9ff: 8b 5d fc mov -0x4(%ebp),%ebx 10da02: c9 leave 10da03: c3 ret Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) dequeue_p = _Thread_queue_Dequeue_priority; 10da04: b8 24 da 10 00 mov $0x10da24,%eax 10da09: eb e2 jmp 10d9ed <_Thread_queue_Dequeue+0x15> 10da0b: 90 nop <== NOT EXECUTED the_thread = (*dequeue_p)( the_thread_queue ); _ISR_Disable( level ); if ( !the_thread ) { sync_state = the_thread_queue->sync_state; if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 10da0c: 8b 4b 30 mov 0x30(%ebx),%ecx 10da0f: 49 dec %ecx 10da10: 83 f9 01 cmp $0x1,%ecx 10da13: 77 e8 ja 10d9fd <_Thread_queue_Dequeue+0x25> (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10da15: c7 43 30 03 00 00 00 movl $0x3,0x30(%ebx) the_thread = _Thread_Executing; 10da1c: a1 78 66 12 00 mov 0x126678,%eax 10da21: eb da jmp 10d9fd <_Thread_queue_Dequeue+0x25> =============================================================================== 0010da24 <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10da24: 55 push %ebp 10da25: 89 e5 mov %esp,%ebp 10da27: 57 push %edi 10da28: 56 push %esi 10da29: 53 push %ebx 10da2a: 83 ec 2c sub $0x2c,%esp 10da2d: 8b 7d 08 mov 0x8(%ebp),%edi Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 10da30: 9c pushf 10da31: fa cli 10da32: 58 pop %eax 10da33: 89 f9 mov %edi,%ecx for( index=0 ; 10da35: 31 d2 xor %edx,%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10da37: 8b 19 mov (%ecx),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10da39: 8d 34 52 lea (%edx,%edx,2),%esi 10da3c: 8d 74 b7 04 lea 0x4(%edi,%esi,4),%esi index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { 10da40: 39 f3 cmp %esi,%ebx 10da42: 75 18 jne 10da5c <_Thread_queue_Dequeue_priority+0x38> Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10da44: 42 inc %edx 10da45: 83 c1 0c add $0xc,%ecx Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 10da48: 83 fa 04 cmp $0x4,%edx 10da4b: 75 ea jne 10da37 <_Thread_queue_Dequeue_priority+0x13> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10da4d: 50 push %eax 10da4e: 9d popf return NULL; 10da4f: 31 f6 xor %esi,%esi #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 10da51: 89 f0 mov %esi,%eax 10da53: 8d 65 f4 lea -0xc(%ebp),%esp 10da56: 5b pop %ebx 10da57: 5e pop %esi 10da58: 5f pop %edi 10da59: c9 leave 10da5a: c3 ret 10da5b: 90 nop <== NOT EXECUTED _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { the_thread = (Thread_Control *) 10da5c: 89 de mov %ebx,%esi */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10da5e: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) new_first_node = the_thread->Wait.Block2n.first; 10da65: 8b 53 38 mov 0x38(%ebx),%edx new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 10da68: 8b 0b mov (%ebx),%ecx previous_node = the_thread->Object.Node.previous; 10da6a: 8b 7b 04 mov 0x4(%ebx),%edi 10da6d: 89 7d d4 mov %edi,-0x2c(%ebp) 10da70: 8d 7b 3c lea 0x3c(%ebx),%edi if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 10da73: 39 fa cmp %edi,%edx 10da75: 74 7b je 10daf2 <_Thread_queue_Dequeue_priority+0xce> last_node = the_thread->Wait.Block2n.last; 10da77: 8b 7b 40 mov 0x40(%ebx),%edi 10da7a: 89 7d e4 mov %edi,-0x1c(%ebp) new_second_node = new_first_node->next; 10da7d: 8b 3a mov (%edx),%edi 10da7f: 89 7d e0 mov %edi,-0x20(%ebp) previous_node->next = new_first_node; 10da82: 8b 7d d4 mov -0x2c(%ebp),%edi 10da85: 89 17 mov %edx,(%edi) next_node->previous = new_first_node; 10da87: 89 51 04 mov %edx,0x4(%ecx) new_first_node->next = next_node; 10da8a: 89 0a mov %ecx,(%edx) new_first_node->previous = previous_node; 10da8c: 89 7a 04 mov %edi,0x4(%edx) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10da8f: 3b 55 e4 cmp -0x1c(%ebp),%edx 10da92: 74 17 je 10daab <_Thread_queue_Dequeue_priority+0x87> /* > two threads on 2-n */ new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); 10da94: 8d 4a 38 lea 0x38(%edx),%ecx 10da97: 8b 7d e0 mov -0x20(%ebp),%edi 10da9a: 89 4f 04 mov %ecx,0x4(%edi) new_first_thread->Wait.Block2n.first = new_second_node; 10da9d: 89 7a 38 mov %edi,0x38(%edx) new_first_thread->Wait.Block2n.last = last_node; 10daa0: 8b 4d e4 mov -0x1c(%ebp),%ecx 10daa3: 89 4a 40 mov %ecx,0x40(%edx) 10daa6: 83 c2 3c add $0x3c,%edx 10daa9: 89 11 mov %edx,(%ecx) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10daab: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10daaf: 74 17 je 10dac8 <_Thread_queue_Dequeue_priority+0xa4> _ISR_Enable( level ); 10dab1: 50 push %eax 10dab2: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10dab3: 83 ec 08 sub $0x8,%esp 10dab6: 68 f8 ff 03 10 push $0x1003fff8 10dabb: 53 push %ebx 10dabc: e8 b7 f7 ff ff call 10d278 <_Thread_Clear_state> 10dac1: 83 c4 10 add $0x10,%esp 10dac4: eb 8b jmp 10da51 <_Thread_queue_Dequeue_priority+0x2d> 10dac6: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10dac8: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10dacf: 50 push %eax 10dad0: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10dad1: 83 ec 0c sub $0xc,%esp 10dad4: 8d 43 48 lea 0x48(%ebx),%eax 10dad7: 50 push %eax 10dad8: e8 b3 0b 00 00 call 10e690 <_Watchdog_Remove> 10dadd: 58 pop %eax 10dade: 5a pop %edx 10dadf: 68 f8 ff 03 10 push $0x1003fff8 10dae4: 53 push %ebx 10dae5: e8 8e f7 ff ff call 10d278 <_Thread_Clear_state> 10daea: 83 c4 10 add $0x10,%esp 10daed: e9 5f ff ff ff jmp 10da51 <_Thread_queue_Dequeue_priority+0x2d> new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 10daf2: 8b 7d d4 mov -0x2c(%ebp),%edi 10daf5: 89 0f mov %ecx,(%edi) next_node->previous = previous_node; 10daf7: 89 79 04 mov %edi,0x4(%ecx) 10dafa: eb af jmp 10daab <_Thread_queue_Dequeue_priority+0x87> =============================================================================== 00110a90 <_Thread_queue_Enqueue_fifo>: Thread_blocking_operation_States _Thread_queue_Enqueue_fifo ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 110a90: 55 push %ebp 110a91: 89 e5 mov %esp,%ebp 110a93: 56 push %esi 110a94: 53 push %ebx 110a95: 8b 55 08 mov 0x8(%ebp),%edx 110a98: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 110a9b: 9c pushf 110a9c: fa cli 110a9d: 59 pop %ecx sync_state = the_thread_queue->sync_state; 110a9e: 8b 42 30 mov 0x30(%edx),%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 110aa1: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 110aa8: 83 f8 01 cmp $0x1,%eax 110aab: 74 0b je 110ab8 <_Thread_queue_Enqueue_fifo+0x28> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 110aad: 8b 55 10 mov 0x10(%ebp),%edx 110ab0: 89 0a mov %ecx,(%edx) return sync_state; } 110ab2: 5b pop %ebx 110ab3: 5e pop %esi 110ab4: c9 leave 110ab5: c3 ret 110ab6: 66 90 xchg %ax,%ax <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 110ab8: 8d 72 04 lea 0x4(%edx),%esi 110abb: 89 33 mov %esi,(%ebx) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 110abd: 8b 72 08 mov 0x8(%edx),%esi the_chain->last = the_node; 110ac0: 89 5a 08 mov %ebx,0x8(%edx) old_last_node->next = the_node; 110ac3: 89 1e mov %ebx,(%esi) the_node->previous = old_last_node; 110ac5: 89 73 04 mov %esi,0x4(%ebx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { _Chain_Append_unprotected( &the_thread_queue->Queues.Fifo, &the_thread->Object.Node ); the_thread->Wait.queue = the_thread_queue; 110ac8: 89 53 44 mov %edx,0x44(%ebx) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 110acb: 51 push %ecx 110acc: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return sync_state; } 110acd: 5b pop %ebx 110ace: 5e pop %esi 110acf: c9 leave 110ad0: c3 ret =============================================================================== 0010db94 <_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 ) { 10db94: 55 push %ebp 10db95: 89 e5 mov %esp,%ebp 10db97: 57 push %edi 10db98: 56 push %esi 10db99: 53 push %ebx 10db9a: 83 ec 10 sub $0x10,%esp 10db9d: 8b 7d 0c mov 0xc(%ebp),%edi 10dba0: 8d 47 3c lea 0x3c(%edi),%eax 10dba3: 89 47 38 mov %eax,0x38(%edi) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10dba6: c7 47 3c 00 00 00 00 movl $0x0,0x3c(%edi) Chain_Node *previous_node; Chain_Node *search_node; Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); 10dbad: 8d 47 38 lea 0x38(%edi),%eax 10dbb0: 89 47 40 mov %eax,0x40(%edi) priority = the_thread->current_priority; 10dbb3: 8b 57 14 mov 0x14(%edi),%edx RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 10dbb6: 89 d0 mov %edx,%eax 10dbb8: c1 e8 06 shr $0x6,%eax header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; 10dbbb: 8b 4d 08 mov 0x8(%ebp),%ecx 10dbbe: 8b 59 38 mov 0x38(%ecx),%ebx if ( _Thread_queue_Is_reverse_search( priority ) ) 10dbc1: f6 c2 20 test $0x20,%dl 10dbc4: 75 66 jne 10dc2c <_Thread_queue_Enqueue_priority+0x98> goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 10dbc6: 8d 04 40 lea (%eax,%eax,2),%eax 10dbc9: 8d 04 81 lea (%ecx,%eax,4),%eax 10dbcc: 89 45 f0 mov %eax,-0x10(%ebp) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10dbcf: 83 c0 04 add $0x4,%eax 10dbd2: 89 7d e8 mov %edi,-0x18(%ebp) 10dbd5: 89 c7 mov %eax,%edi if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10dbd7: 9c pushf 10dbd8: fa cli 10dbd9: 5e pop %esi 10dbda: 89 75 ec mov %esi,-0x14(%ebp) search_thread = (Thread_Control *) header->first; 10dbdd: 8b 4d f0 mov -0x10(%ebp),%ecx 10dbe0: 8b 01 mov (%ecx),%eax while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10dbe2: 39 f8 cmp %edi,%eax 10dbe4: 75 18 jne 10dbfe <_Thread_queue_Enqueue_priority+0x6a> 10dbe6: e9 32 01 00 00 jmp 10dd1d <_Thread_queue_Enqueue_priority+0x189> 10dbeb: 90 nop <== NOT EXECUTED break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10dbec: 56 push %esi 10dbed: 9d popf 10dbee: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10dbef: 85 58 10 test %ebx,0x10(%eax) 10dbf2: 0f 84 d0 00 00 00 je 10dcc8 <_Thread_queue_Enqueue_priority+0x134> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10dbf8: 8b 00 mov (%eax),%eax restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10dbfa: 39 f8 cmp %edi,%eax 10dbfc: 74 07 je 10dc05 <_Thread_queue_Enqueue_priority+0x71> search_priority = search_thread->current_priority; 10dbfe: 8b 48 14 mov 0x14(%eax),%ecx if ( priority <= search_priority ) 10dc01: 39 ca cmp %ecx,%edx 10dc03: 77 e7 ja 10dbec <_Thread_queue_Enqueue_priority+0x58> 10dc05: 8b 7d e8 mov -0x18(%ebp),%edi 10dc08: 89 75 f0 mov %esi,-0x10(%ebp) } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10dc0b: 8b 75 08 mov 0x8(%ebp),%esi 10dc0e: 8b 5e 30 mov 0x30(%esi),%ebx 10dc11: 83 fb 01 cmp $0x1,%ebx 10dc14: 0f 84 b6 00 00 00 je 10dcd0 <_Thread_queue_Enqueue_priority+0x13c> * 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; 10dc1a: 8b 45 10 mov 0x10(%ebp),%eax 10dc1d: 8b 55 ec mov -0x14(%ebp),%edx 10dc20: 89 10 mov %edx,(%eax) return the_thread_queue->sync_state; } 10dc22: 89 d8 mov %ebx,%eax 10dc24: 83 c4 10 add $0x10,%esp 10dc27: 5b pop %ebx 10dc28: 5e pop %esi 10dc29: 5f pop %edi 10dc2a: c9 leave 10dc2b: c3 ret _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10dc2c: 8d 04 40 lea (%eax,%eax,2),%eax 10dc2f: 8b 4d 08 mov 0x8(%ebp),%ecx 10dc32: 8d 34 81 lea (%ecx,%eax,4),%esi restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 10dc35: 89 75 f0 mov %esi,-0x10(%ebp) 10dc38: 89 75 e4 mov %esi,-0x1c(%ebp) 10dc3b: 89 7d e8 mov %edi,-0x18(%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; 10dc3e: 0f b6 0d b4 22 12 00 movzbl 0x1222b4,%ecx 10dc45: 41 inc %ecx _ISR_Disable( level ); 10dc46: 9c pushf 10dc47: fa cli 10dc48: 5f pop %edi 10dc49: 89 7d ec mov %edi,-0x14(%ebp) search_thread = (Thread_Control *) header->last; 10dc4c: 8b 75 f0 mov -0x10(%ebp),%esi 10dc4f: 8b 46 08 mov 0x8(%esi),%eax while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10dc52: 3b 45 e4 cmp -0x1c(%ebp),%eax 10dc55: 74 2b je 10dc82 <_Thread_queue_Enqueue_priority+0xee> search_priority = search_thread->current_priority; 10dc57: 8b 48 14 mov 0x14(%eax),%ecx if ( priority >= search_priority ) 10dc5a: 39 ca cmp %ecx,%edx 10dc5c: 73 24 jae 10dc82 <_Thread_queue_Enqueue_priority+0xee> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10dc5e: 57 push %edi 10dc5f: 9d popf 10dc60: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10dc61: 85 58 10 test %ebx,0x10(%eax) 10dc64: 74 59 je 10dcbf <_Thread_queue_Enqueue_priority+0x12b> 10dc66: 8b 75 e4 mov -0x1c(%ebp),%esi 10dc69: eb 10 jmp 10dc7b <_Thread_queue_Enqueue_priority+0xe7> 10dc6b: 90 nop <== NOT EXECUTED search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; 10dc6c: 8b 48 14 mov 0x14(%eax),%ecx if ( priority >= search_priority ) 10dc6f: 39 ca cmp %ecx,%edx 10dc71: 73 0f jae 10dc82 <_Thread_queue_Enqueue_priority+0xee> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10dc73: 57 push %edi 10dc74: 9d popf 10dc75: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10dc76: 85 58 10 test %ebx,0x10(%eax) 10dc79: 74 41 je 10dcbc <_Thread_queue_Enqueue_priority+0x128><== NEVER TAKEN _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) search_thread->Object.Node.previous; 10dc7b: 8b 40 04 mov 0x4(%eax),%eax restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10dc7e: 39 f0 cmp %esi,%eax 10dc80: 75 ea jne 10dc6c <_Thread_queue_Enqueue_priority+0xd8> 10dc82: 89 7d f0 mov %edi,-0x10(%ebp) 10dc85: 8b 7d e8 mov -0x18(%ebp),%edi } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10dc88: 8b 75 08 mov 0x8(%ebp),%esi 10dc8b: 8b 5e 30 mov 0x30(%esi),%ebx 10dc8e: 83 fb 01 cmp $0x1,%ebx 10dc91: 75 87 jne 10dc1a <_Thread_queue_Enqueue_priority+0x86> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10dc93: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) if ( priority == search_priority ) 10dc9a: 39 ca cmp %ecx,%edx 10dc9c: 74 5b je 10dcf9 <_Thread_queue_Enqueue_priority+0x165> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10dc9e: 8b 10 mov (%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10dca0: 89 17 mov %edx,(%edi) the_node->previous = search_node; 10dca2: 89 47 04 mov %eax,0x4(%edi) search_node->next = the_node; 10dca5: 89 38 mov %edi,(%eax) next_node->previous = the_node; 10dca7: 89 7a 04 mov %edi,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10dcaa: 89 77 44 mov %esi,0x44(%edi) _ISR_Enable( level ); 10dcad: ff 75 f0 pushl -0x10(%ebp) 10dcb0: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10dcb1: 89 d8 mov %ebx,%eax 10dcb3: 83 c4 10 add $0x10,%esp 10dcb6: 5b pop %ebx 10dcb7: 5e pop %esi 10dcb8: 5f pop %edi 10dcb9: c9 leave 10dcba: c3 ret 10dcbb: 90 nop <== NOT EXECUTED 10dcbc: 89 75 e4 mov %esi,-0x1c(%ebp) <== NOT EXECUTED if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10dcbf: 57 push %edi 10dcc0: 9d popf goto restart_reverse_search; 10dcc1: e9 78 ff ff ff jmp 10dc3e <_Thread_queue_Enqueue_priority+0xaa> 10dcc6: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10dcc8: 56 push %esi 10dcc9: 9d popf goto restart_forward_search; 10dcca: e9 08 ff ff ff jmp 10dbd7 <_Thread_queue_Enqueue_priority+0x43> 10dccf: 90 nop <== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10dcd0: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) if ( priority == search_priority ) 10dcd7: 39 ca cmp %ecx,%edx 10dcd9: 74 1e je 10dcf9 <_Thread_queue_Enqueue_priority+0x165> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10dcdb: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10dcde: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10dce0: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10dce3: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10dce5: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10dce8: 89 77 44 mov %esi,0x44(%edi) _ISR_Enable( level ); 10dceb: ff 75 f0 pushl -0x10(%ebp) 10dcee: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10dcef: 89 d8 mov %ebx,%eax 10dcf1: 83 c4 10 add $0x10,%esp 10dcf4: 5b pop %ebx 10dcf5: 5e pop %esi 10dcf6: 5f pop %edi 10dcf7: c9 leave 10dcf8: c3 ret 10dcf9: 83 c0 3c add $0x3c,%eax _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 10dcfc: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10dcff: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10dd01: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10dd04: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10dd06: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10dd09: 8b 45 08 mov 0x8(%ebp),%eax 10dd0c: 89 47 44 mov %eax,0x44(%edi) _ISR_Enable( level ); 10dd0f: ff 75 ec pushl -0x14(%ebp) 10dd12: 9d popf return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10dd13: bb 01 00 00 00 mov $0x1,%ebx 10dd18: e9 05 ff ff ff jmp 10dc22 <_Thread_queue_Enqueue_priority+0x8e> 10dd1d: 8b 7d e8 mov -0x18(%ebp),%edi 10dd20: 89 75 f0 mov %esi,-0x10(%ebp) if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; 10dd23: b9 ff ff ff ff mov $0xffffffff,%ecx 10dd28: e9 de fe ff ff jmp 10dc0b <_Thread_queue_Enqueue_priority+0x77> =============================================================================== 0010dafc <_Thread_queue_Enqueue_with_handler>: void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { 10dafc: 55 push %ebp 10dafd: 89 e5 mov %esp,%ebp 10daff: 57 push %edi 10db00: 56 push %esi 10db01: 53 push %ebx 10db02: 83 ec 24 sub $0x24,%esp 10db05: 8b 75 08 mov 0x8(%ebp),%esi 10db08: 8b 7d 0c mov 0xc(%ebp),%edi Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; 10db0b: 8b 1d 78 66 12 00 mov 0x126678,%ebx else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 10db11: ff 76 38 pushl 0x38(%esi) 10db14: 53 push %ebx 10db15: e8 d6 03 00 00 call 10def0 <_Thread_Set_state> /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 10db1a: 83 c4 10 add $0x10,%esp 10db1d: 85 ff test %edi,%edi 10db1f: 75 33 jne 10db54 <_Thread_queue_Enqueue_with_handler+0x58> } /* * Now enqueue the thread per the discipline for this thread queue. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10db21: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10db25: 74 64 je 10db8b <_Thread_queue_Enqueue_with_handler+0x8f> enqueue_p = _Thread_queue_Enqueue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ enqueue_p = _Thread_queue_Enqueue_fifo; 10db27: b8 90 0a 11 00 mov $0x110a90,%eax sync_state = (*enqueue_p)( the_thread_queue, the_thread, &level ); 10db2c: 51 push %ecx 10db2d: 8d 55 e4 lea -0x1c(%ebp),%edx 10db30: 52 push %edx 10db31: 53 push %ebx 10db32: 56 push %esi 10db33: ff d0 call *%eax if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10db35: 83 c4 10 add $0x10,%esp 10db38: 83 f8 01 cmp $0x1,%eax 10db3b: 74 0e je 10db4b <_Thread_queue_Enqueue_with_handler+0x4f> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); 10db3d: 52 push %edx 10db3e: ff 75 e4 pushl -0x1c(%ebp) 10db41: 53 push %ebx 10db42: 50 push %eax 10db43: e8 a4 f5 ff ff call 10d0ec <_Thread_blocking_operation_Cancel> 10db48: 83 c4 10 add $0x10,%esp } 10db4b: 8d 65 f4 lea -0xc(%ebp),%esp 10db4e: 5b pop %ebx 10db4f: 5e pop %esi 10db50: 5f pop %edi 10db51: c9 leave 10db52: c3 ret 10db53: 90 nop <== NOT EXECUTED /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { _Watchdog_Initialize( 10db54: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10db57: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10db5e: 8b 55 10 mov 0x10(%ebp),%edx 10db61: 89 53 64 mov %edx,0x64(%ebx) the_watchdog->id = id; 10db64: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10db67: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10db6e: 89 7b 54 mov %edi,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10db71: 83 ec 08 sub $0x8,%esp handler, the_thread->Object.id, NULL ); _Watchdog_Insert_ticks( &the_thread->Timer, timeout ); 10db74: 8d 43 48 lea 0x48(%ebx),%eax 10db77: 50 push %eax 10db78: 68 a4 64 12 00 push $0x1264a4 10db7d: e8 d6 09 00 00 call 10e558 <_Watchdog_Insert> 10db82: 83 c4 10 add $0x10,%esp } /* * Now enqueue the thread per the discipline for this thread queue. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10db85: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10db89: 75 9c jne 10db27 <_Thread_queue_Enqueue_with_handler+0x2b> enqueue_p = _Thread_queue_Enqueue_priority; 10db8b: b8 94 db 10 00 mov $0x10db94,%eax 10db90: eb 9a jmp 10db2c <_Thread_queue_Enqueue_with_handler+0x30> =============================================================================== 00110ad4 <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 110ad4: 55 push %ebp 110ad5: 89 e5 mov %esp,%ebp 110ad7: 83 ec 08 sub $0x8,%esp 110ada: 8b 45 08 mov 0x8(%ebp),%eax 110add: 8b 55 0c mov 0xc(%ebp),%edx /* * Can not use indirect function pointer here since Extract priority * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 110ae0: 83 78 34 01 cmpl $0x1,0x34(%eax) 110ae4: 74 0e je 110af4 <_Thread_queue_Extract+0x20> _Thread_queue_Extract_priority( the_thread_queue, the_thread ); else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); 110ae6: 89 55 0c mov %edx,0xc(%ebp) 110ae9: 89 45 08 mov %eax,0x8(%ebp) } 110aec: c9 leave * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) _Thread_queue_Extract_priority( the_thread_queue, the_thread ); else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); 110aed: e9 3e 18 00 00 jmp 112330 <_Thread_queue_Extract_fifo> 110af2: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Can not use indirect function pointer here since Extract priority * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) _Thread_queue_Extract_priority( the_thread_queue, the_thread ); 110af4: 51 push %ecx 110af5: 6a 00 push $0x0 110af7: 52 push %edx 110af8: 50 push %eax 110af9: e8 06 00 00 00 call 110b04 <_Thread_queue_Extract_priority_helper> 110afe: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 110b01: c9 leave 110b02: c3 ret =============================================================================== 00112330 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 112330: 55 push %ebp 112331: 89 e5 mov %esp,%ebp 112333: 53 push %ebx 112334: 83 ec 04 sub $0x4,%esp 112337: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 11233a: 9c pushf 11233b: fa cli 11233c: 58 pop %eax if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 11233d: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 112344: 74 2e je 112374 <_Thread_queue_Extract_fifo+0x44> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 112346: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 112348: 8b 53 04 mov 0x4(%ebx),%edx next->previous = previous; 11234b: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 11234e: 89 0a mov %ecx,(%edx) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 112350: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 112357: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 11235b: 74 1f je 11237c <_Thread_queue_Extract_fifo+0x4c> _ISR_Enable( level ); 11235d: 50 push %eax 11235e: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 11235f: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 112366: 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 } 112369: 8b 5d fc mov -0x4(%ebp),%ebx 11236c: c9 leave 11236d: e9 06 af ff ff jmp 10d278 <_Thread_Clear_state> 112372: 66 90 xchg %ax,%ax <== NOT EXECUTED ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 112374: 50 push %eax 112375: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 112376: 8b 5d fc mov -0x4(%ebp),%ebx 112379: c9 leave 11237a: c3 ret 11237b: 90 nop <== NOT EXECUTED 11237c: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 112383: 50 push %eax 112384: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 112385: 83 ec 0c sub $0xc,%esp 112388: 8d 43 48 lea 0x48(%ebx),%eax 11238b: 50 push %eax 11238c: e8 ff c2 ff ff call 10e690 <_Watchdog_Remove> 112391: 83 c4 10 add $0x10,%esp 112394: eb c9 jmp 11235f <_Thread_queue_Extract_fifo+0x2f> =============================================================================== 00110b04 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread, bool requeuing ) { 110b04: 55 push %ebp 110b05: 89 e5 mov %esp,%ebp 110b07: 57 push %edi 110b08: 56 push %esi 110b09: 53 push %ebx 110b0a: 83 ec 1c sub $0x1c,%esp 110b0d: 8b 5d 0c mov 0xc(%ebp),%ebx 110b10: 8a 45 10 mov 0x10(%ebp),%al 110b13: 88 45 e3 mov %al,-0x1d(%ebp) Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 110b16: 9c pushf 110b17: fa cli 110b18: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 110b1b: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 110b22: 74 68 je 110b8c <_Thread_queue_Extract_priority_helper+0x88> /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 110b24: 8b 0b mov (%ebx),%ecx previous_node = the_node->previous; 110b26: 8b 73 04 mov 0x4(%ebx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 110b29: 8b 43 38 mov 0x38(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 110b2c: 8d 53 3c lea 0x3c(%ebx),%edx if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 110b2f: 39 d0 cmp %edx,%eax 110b31: 74 65 je 110b98 <_Thread_queue_Extract_priority_helper+0x94> new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 110b33: 8b 53 40 mov 0x40(%ebx),%edx new_second_node = new_first_node->next; 110b36: 8b 38 mov (%eax),%edi previous_node->next = new_first_node; 110b38: 89 06 mov %eax,(%esi) next_node->previous = new_first_node; 110b3a: 89 41 04 mov %eax,0x4(%ecx) new_first_node->next = next_node; 110b3d: 89 08 mov %ecx,(%eax) new_first_node->previous = previous_node; 110b3f: 89 70 04 mov %esi,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 110b42: 39 c2 cmp %eax,%edx 110b44: 74 11 je 110b57 <_Thread_queue_Extract_priority_helper+0x53> /* > two threads on 2-n */ new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); 110b46: 8d 48 38 lea 0x38(%eax),%ecx 110b49: 89 4f 04 mov %ecx,0x4(%edi) new_first_thread->Wait.Block2n.first = new_second_node; 110b4c: 89 78 38 mov %edi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 110b4f: 89 50 40 mov %edx,0x40(%eax) 110b52: 83 c0 3c add $0x3c,%eax 110b55: 89 02 mov %eax,(%edx) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 110b57: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 110b5b: 75 23 jne 110b80 <_Thread_queue_Extract_priority_helper+0x7c> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 110b5d: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 110b61: 74 3d je 110ba0 <_Thread_queue_Extract_priority_helper+0x9c><== NEVER TAKEN _ISR_Enable( level ); 110b63: ff 75 e4 pushl -0x1c(%ebp) 110b66: 9d popf 110b67: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 110b6e: 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 } 110b71: 8d 65 f4 lea -0xc(%ebp),%esp 110b74: 5b pop %ebx 110b75: 5e pop %esi 110b76: 5f pop %edi 110b77: c9 leave 110b78: e9 fb c6 ff ff jmp 10d278 <_Thread_Clear_state> 110b7d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 110b80: ff 75 e4 pushl -0x1c(%ebp) 110b83: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 110b84: 8d 65 f4 lea -0xc(%ebp),%esp 110b87: 5b pop %ebx 110b88: 5e pop %esi 110b89: 5f pop %edi 110b8a: c9 leave 110b8b: c3 ret Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 110b8c: ff 75 e4 pushl -0x1c(%ebp) 110b8f: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 110b90: 8d 65 f4 lea -0xc(%ebp),%esp 110b93: 5b pop %ebx 110b94: 5e pop %esi 110b95: 5f pop %edi 110b96: c9 leave 110b97: c3 ret new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 110b98: 89 0e mov %ecx,(%esi) next_node->previous = previous_node; 110b9a: 89 71 04 mov %esi,0x4(%ecx) 110b9d: eb b8 jmp 110b57 <_Thread_queue_Extract_priority_helper+0x53> 110b9f: 90 nop <== NOT EXECUTED 110ba0: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) <== NOT EXECUTED if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 110ba7: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 110baa: 9d popf <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 110bab: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110bae: 8d 43 48 lea 0x48(%ebx),%eax <== NOT EXECUTED 110bb1: 50 push %eax <== NOT EXECUTED 110bb2: e8 d9 da ff ff call 10e690 <_Watchdog_Remove> <== NOT EXECUTED 110bb7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110bba: eb ab jmp 110b67 <_Thread_queue_Extract_priority_helper+0x63><== NOT EXECUTED =============================================================================== 0010dd30 <_Thread_queue_Extract_with_proxy>: */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 10dd30: 55 push %ebp 10dd31: 89 e5 mov %esp,%ebp 10dd33: 83 ec 08 sub $0x8,%esp 10dd36: 8b 45 08 mov 0x8(%ebp),%eax States_Control state; state = the_thread->current_state; if ( _States_Is_waiting_on_thread_queue( state ) ) { 10dd39: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax) 10dd40: 75 06 jne 10dd48 <_Thread_queue_Extract_with_proxy+0x18> #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); return true; } return false; 10dd42: 31 c0 xor %eax,%eax } 10dd44: c9 leave 10dd45: c3 ret 10dd46: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( proxy_extract_callout ) (*proxy_extract_callout)( the_thread ); } #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 10dd48: 83 ec 08 sub $0x8,%esp 10dd4b: 50 push %eax 10dd4c: ff 70 44 pushl 0x44(%eax) 10dd4f: e8 80 2d 00 00 call 110ad4 <_Thread_queue_Extract> return true; 10dd54: 83 c4 10 add $0x10,%esp 10dd57: b0 01 mov $0x1,%al } return false; } 10dd59: c9 leave 10dd5a: c3 ret =============================================================================== 0011f070 <_Thread_queue_First>: */ Thread_Control *_Thread_queue_First( Thread_queue_Control *the_thread_queue ) { 11f070: 55 push %ebp 11f071: 89 e5 mov %esp,%ebp 11f073: 83 ec 08 sub $0x8,%esp 11f076: 8b 45 08 mov 0x8(%ebp),%eax Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 11f079: 83 78 34 01 cmpl $0x1,0x34(%eax) 11f07d: 74 0d je 11f08c <_Thread_queue_First+0x1c> first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; 11f07f: ba a8 05 12 00 mov $0x1205a8,%edx return (*first_p)( the_thread_queue ); 11f084: 89 45 08 mov %eax,0x8(%ebp) } 11f087: c9 leave if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 11f088: ff e2 jmp *%edx 11f08a: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) first_p = _Thread_queue_First_priority; 11f08c: ba 98 f0 11 00 mov $0x11f098,%edx else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 11f091: 89 45 08 mov %eax,0x8(%ebp) } 11f094: c9 leave if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 11f095: ff e2 jmp *%edx =============================================================================== 001205a8 <_Thread_queue_First_fifo>: */ Thread_Control *_Thread_queue_First_fifo( Thread_queue_Control *the_thread_queue ) { 1205a8: 55 push %ebp 1205a9: 89 e5 mov %esp,%ebp 1205ab: 8b 55 08 mov 0x8(%ebp),%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1205ae: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1205b0: 83 c2 04 add $0x4,%edx if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) 1205b3: 39 d0 cmp %edx,%eax 1205b5: 74 05 je 1205bc <_Thread_queue_First_fifo+0x14> return (Thread_Control *) the_thread_queue->Queues.Fifo.first; return NULL; } 1205b7: c9 leave 1205b8: c3 ret 1205b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) return (Thread_Control *) the_thread_queue->Queues.Fifo.first; return NULL; 1205bc: 31 c0 xor %eax,%eax } 1205be: c9 leave 1205bf: c3 ret =============================================================================== 0010dd5c <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 10dd5c: 55 push %ebp 10dd5d: 89 e5 mov %esp,%ebp 10dd5f: 56 push %esi 10dd60: 53 push %ebx 10dd61: 8b 5d 08 mov 0x8(%ebp),%ebx 10dd64: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10dd67: eb 06 jmp 10dd6f <_Thread_queue_Flush+0x13> 10dd69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; 10dd6c: 89 70 34 mov %esi,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10dd6f: 83 ec 0c sub $0xc,%esp 10dd72: 53 push %ebx 10dd73: e8 60 fc ff ff call 10d9d8 <_Thread_queue_Dequeue> 10dd78: 83 c4 10 add $0x10,%esp 10dd7b: 85 c0 test %eax,%eax 10dd7d: 75 ed jne 10dd6c <_Thread_queue_Flush+0x10> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10dd7f: 8d 65 f8 lea -0x8(%ebp),%esp 10dd82: 5b pop %ebx 10dd83: 5e pop %esi 10dd84: c9 leave 10dd85: c3 ret =============================================================================== 0010dd88 <_Thread_queue_Initialize>: Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 10dd88: 55 push %ebp 10dd89: 89 e5 mov %esp,%ebp 10dd8b: 56 push %esi 10dd8c: 53 push %ebx 10dd8d: 8b 45 08 mov 0x8(%ebp),%eax 10dd90: 8b 55 0c mov 0xc(%ebp),%edx the_thread_queue->state = state; 10dd93: 8b 4d 10 mov 0x10(%ebp),%ecx 10dd96: 89 48 38 mov %ecx,0x38(%eax) the_thread_queue->discipline = the_discipline; 10dd99: 89 50 34 mov %edx,0x34(%eax) the_thread_queue->timeout_status = timeout_status; 10dd9c: 8b 4d 14 mov 0x14(%ebp),%ecx 10dd9f: 89 48 3c mov %ecx,0x3c(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10dda2: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10dda9: 83 fa 01 cmp $0x1,%edx 10ddac: 74 16 je 10ddc4 <_Thread_queue_Initialize+0x3c> 10ddae: 8d 50 04 lea 0x4(%eax),%edx 10ddb1: 89 10 mov %edx,(%eax) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10ddb3: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10ddba: 89 40 08 mov %eax,0x8(%eax) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); } else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); } } 10ddbd: 5b pop %ebx 10ddbe: 5e pop %esi 10ddbf: c9 leave 10ddc0: c3 ret 10ddc1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10ddc4: 89 c1 mov %eax,%ecx 10ddc6: 30 d2 xor %dl,%dl */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ddc8: 8d 1c 52 lea (%edx,%edx,2),%ebx 10ddcb: 8d 1c 98 lea (%eax,%ebx,4),%ebx 10ddce: 8d 73 04 lea 0x4(%ebx),%esi 10ddd1: 89 31 mov %esi,(%ecx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10ddd3: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 10ddda: 89 59 08 mov %ebx,0x8(%ecx) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) 10dddd: 42 inc %edx 10ddde: 83 c1 0c add $0xc,%ecx the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 10dde1: 83 fa 04 cmp $0x4,%edx 10dde4: 75 e2 jne 10ddc8 <_Thread_queue_Initialize+0x40> _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); } else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); } } 10dde6: 5b pop %ebx 10dde7: 5e pop %esi 10dde8: c9 leave 10dde9: c3 ret =============================================================================== 0010ddec <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10ddec: 55 push %ebp 10dded: 89 e5 mov %esp,%ebp 10ddef: 57 push %edi 10ddf0: 56 push %esi 10ddf1: 53 push %ebx 10ddf2: 83 ec 1c sub $0x1c,%esp 10ddf5: 8b 75 08 mov 0x8(%ebp),%esi 10ddf8: 8b 7d 0c mov 0xc(%ebp),%edi /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 10ddfb: 85 f6 test %esi,%esi 10ddfd: 74 06 je 10de05 <_Thread_queue_Requeue+0x19><== 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 ) { 10ddff: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10de03: 74 0b je 10de10 <_Thread_queue_Requeue+0x24><== ALWAYS TAKEN _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 10de05: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10de08: 5b pop %ebx <== NOT EXECUTED 10de09: 5e pop %esi <== NOT EXECUTED 10de0a: 5f pop %edi <== NOT EXECUTED 10de0b: c9 leave <== NOT EXECUTED 10de0c: c3 ret <== NOT EXECUTED 10de0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10de10: 9c pushf 10de11: fa cli 10de12: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10de13: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10de1a: 75 0c jne 10de28 <_Thread_queue_Requeue+0x3c><== ALWAYS TAKEN _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 10de1c: 53 push %ebx 10de1d: 9d popf } } 10de1e: 8d 65 f4 lea -0xc(%ebp),%esp 10de21: 5b pop %ebx 10de22: 5e pop %esi 10de23: 5f pop %edi 10de24: c9 leave 10de25: c3 ret 10de26: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10de28: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi) ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 10de2f: 50 push %eax 10de30: 6a 01 push $0x1 10de32: 57 push %edi 10de33: 56 push %esi 10de34: e8 cb 2c 00 00 call 110b04 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10de39: 83 c4 0c add $0xc,%esp 10de3c: 8d 45 e4 lea -0x1c(%ebp),%eax 10de3f: 50 push %eax 10de40: 57 push %edi 10de41: 56 push %esi 10de42: e8 4d fd ff ff call 10db94 <_Thread_queue_Enqueue_priority> 10de47: 83 c4 10 add $0x10,%esp 10de4a: eb d0 jmp 10de1c <_Thread_queue_Requeue+0x30> =============================================================================== 0010de4c <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10de4c: 55 push %ebp 10de4d: 89 e5 mov %esp,%ebp 10de4f: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10de52: 8d 45 f4 lea -0xc(%ebp),%eax 10de55: 50 push %eax 10de56: ff 75 08 pushl 0x8(%ebp) 10de59: e8 02 f8 ff ff call 10d660 <_Thread_Get> switch ( location ) { 10de5e: 83 c4 10 add $0x10,%esp 10de61: 8b 55 f4 mov -0xc(%ebp),%edx 10de64: 85 d2 test %edx,%edx 10de66: 75 17 jne 10de7f <_Thread_queue_Timeout+0x33><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10de68: 83 ec 0c sub $0xc,%esp 10de6b: 50 push %eax 10de6c: e8 4b 2d 00 00 call 110bbc <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10de71: a1 d4 63 12 00 mov 0x1263d4,%eax 10de76: 48 dec %eax 10de77: a3 d4 63 12 00 mov %eax,0x1263d4 10de7c: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10de7f: c9 leave 10de80: c3 ret =============================================================================== 00118ed8 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 118ed8: 55 push %ebp 118ed9: 89 e5 mov %esp,%ebp 118edb: 57 push %edi 118edc: 56 push %esi 118edd: 53 push %ebx 118ede: 83 ec 4c sub $0x4c,%esp 118ee1: 8b 5d 08 mov 0x8(%ebp),%ebx 118ee4: 8d 45 e0 lea -0x20(%ebp),%eax 118ee7: 89 45 b4 mov %eax,-0x4c(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 118eea: 89 45 dc mov %eax,-0x24(%ebp) the_chain->permanent_null = NULL; 118eed: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) Timer_server_Control *ts = (Timer_server_Control *) arg; Chain_Control insert_chain; Chain_Control fire_chain; _Chain_Initialize_empty( &insert_chain ); 118ef4: 8d 4d dc lea -0x24(%ebp),%ecx 118ef7: 89 4d e4 mov %ecx,-0x1c(%ebp) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 118efa: 8d 7d d0 lea -0x30(%ebp),%edi 118efd: 8d 45 d4 lea -0x2c(%ebp),%eax 118f00: 89 45 b0 mov %eax,-0x50(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 118f03: 89 45 d0 mov %eax,-0x30(%ebp) the_chain->permanent_null = NULL; 118f06: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 118f0d: 89 7d d8 mov %edi,-0x28(%ebp) 118f10: 8d 73 30 lea 0x30(%ebx),%esi 118f13: 8d 4b 68 lea 0x68(%ebx),%ecx 118f16: 89 4d c4 mov %ecx,-0x3c(%ebp) 118f19: 8d 43 08 lea 0x8(%ebx),%eax 118f1c: 89 45 c0 mov %eax,-0x40(%ebp) 118f1f: 8d 53 40 lea 0x40(%ebx),%edx 118f22: 89 55 bc mov %edx,-0x44(%ebp) 118f25: 8d 76 00 lea 0x0(%esi),%esi { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 118f28: 8d 4d dc lea -0x24(%ebp),%ecx 118f2b: 89 4b 78 mov %ecx,0x78(%ebx) 118f2e: 66 90 xchg %ax,%ax static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 118f30: a1 c4 08 14 00 mov 0x1408c4,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 118f35: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 118f38: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118f3b: 51 push %ecx 118f3c: 57 push %edi Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 118f3d: 29 d0 sub %edx,%eax watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118f3f: 50 push %eax 118f40: 56 push %esi 118f41: e8 92 3d 00 00 call 11ccd8 <_Watchdog_Adjust_to_chain> static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 118f46: a1 08 08 14 00 mov 0x140808,%eax Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 118f4b: 8b 53 74 mov 0x74(%ebx),%edx /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 118f4e: 83 c4 10 add $0x10,%esp 118f51: 39 d0 cmp %edx,%eax 118f53: 77 63 ja 118fb8 <_Timer_server_Body+0xe0> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 118f55: 72 7d jb 118fd4 <_Timer_server_Body+0xfc> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 118f57: 89 43 74 mov %eax,0x74(%ebx) 118f5a: 66 90 xchg %ax,%ax } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 118f5c: 8b 43 78 mov 0x78(%ebx),%eax 118f5f: 83 ec 0c sub $0xc,%esp 118f62: 50 push %eax 118f63: e8 94 09 00 00 call 1198fc <_Chain_Get> if ( timer == NULL ) { 118f68: 83 c4 10 add $0x10,%esp 118f6b: 85 c0 test %eax,%eax 118f6d: 74 35 je 118fa4 <_Timer_server_Body+0xcc><== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118f6f: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 118f72: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 118f75: 74 19 je 118f90 <_Timer_server_Body+0xb8><== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 118f77: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 118f7a: 75 e0 jne 118f5c <_Timer_server_Body+0x84><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 118f7c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118f7f: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 118f82: 50 push %eax <== NOT EXECUTED 118f83: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 118f86: e8 d9 3d 00 00 call 11cd64 <_Watchdog_Insert> <== NOT EXECUTED 118f8b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118f8e: eb cc jmp 118f5c <_Timer_server_Body+0x84><== NOT EXECUTED Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 118f90: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118f93: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 118f96: 50 push %eax <== NOT EXECUTED 118f97: 56 push %esi <== NOT EXECUTED 118f98: e8 c7 3d 00 00 call 11cd64 <_Watchdog_Insert> <== NOT EXECUTED 118f9d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118fa0: eb ba jmp 118f5c <_Timer_server_Body+0x84><== NOT EXECUTED 118fa2: 66 90 xchg %ax,%ax <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 118fa4: 9c pushf 118fa5: fa cli 118fa6: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 118fa7: 8b 55 b4 mov -0x4c(%ebp),%edx 118faa: 3b 55 dc cmp -0x24(%ebp),%edx 118fad: 74 41 je 118ff0 <_Timer_server_Body+0x118><== ALWAYS TAKEN ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 118faf: 50 push %eax <== NOT EXECUTED 118fb0: 9d popf <== NOT EXECUTED 118fb1: e9 7a ff ff ff jmp 118f30 <_Timer_server_Body+0x58><== NOT EXECUTED 118fb6: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118fb8: 51 push %ecx 118fb9: 57 push %edi if ( snapshot > last_snapshot ) { /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; 118fba: 89 c1 mov %eax,%ecx 118fbc: 29 d1 sub %edx,%ecx _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118fbe: 51 push %ecx 118fbf: ff 75 c4 pushl -0x3c(%ebp) 118fc2: 89 45 b8 mov %eax,-0x48(%ebp) 118fc5: e8 0e 3d 00 00 call 11ccd8 <_Watchdog_Adjust_to_chain> 118fca: 83 c4 10 add $0x10,%esp 118fcd: 8b 45 b8 mov -0x48(%ebp),%eax 118fd0: eb 85 jmp 118f57 <_Timer_server_Body+0x7f> 118fd2: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 118fd4: 51 push %ecx } else if ( snapshot < last_snapshot ) { /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; 118fd5: 29 c2 sub %eax,%edx _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 118fd7: 52 push %edx 118fd8: 6a 01 push $0x1 118fda: ff 75 c4 pushl -0x3c(%ebp) 118fdd: 89 45 b8 mov %eax,-0x48(%ebp) 118fe0: e8 7b 3c 00 00 call 11cc60 <_Watchdog_Adjust> 118fe5: 83 c4 10 add $0x10,%esp 118fe8: 8b 45 b8 mov -0x48(%ebp),%eax 118feb: e9 67 ff ff ff jmp 118f57 <_Timer_server_Body+0x7f> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 118ff0: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 118ff7: 50 push %eax 118ff8: 9d popf _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 118ff9: 8b 4d b0 mov -0x50(%ebp),%ecx 118ffc: 3b 4d d0 cmp -0x30(%ebp),%ecx 118fff: 75 23 jne 119024 <_Timer_server_Body+0x14c> 119001: eb 33 jmp 119036 <_Timer_server_Body+0x15e> 119003: 90 nop <== NOT EXECUTED { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 119004: 8b 10 mov (%eax),%edx the_chain->first = new_first; 119006: 89 55 d0 mov %edx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 119009: 89 7a 04 mov %edi,0x4(%edx) * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 11900c: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 119013: 51 push %ecx 119014: 9d popf /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 119015: 83 ec 08 sub $0x8,%esp 119018: ff 70 24 pushl 0x24(%eax) 11901b: ff 70 20 pushl 0x20(%eax) 11901e: ff 50 1c call *0x1c(%eax) } 119021: 83 c4 10 add $0x10,%esp /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 119024: 9c pushf 119025: fa cli 119026: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 119027: 8b 45 d0 mov -0x30(%ebp),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 11902a: 39 45 b0 cmp %eax,-0x50(%ebp) 11902d: 75 d5 jne 119004 <_Timer_server_Body+0x12c> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 11902f: 51 push %ecx 119030: 9d popf 119031: e9 f2 fe ff ff jmp 118f28 <_Timer_server_Body+0x50> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 119036: c6 43 7c 00 movb $0x0,0x7c(%ebx) 11903a: a1 74 07 14 00 mov 0x140774,%eax 11903f: 40 inc %eax 119040: a3 74 07 14 00 mov %eax,0x140774 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 119045: 83 ec 08 sub $0x8,%esp 119048: 6a 08 push $0x8 11904a: ff 33 pushl (%ebx) 11904c: e8 3b 34 00 00 call 11c48c <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 119051: 89 d8 mov %ebx,%eax 119053: e8 e0 fd ff ff call 118e38 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 119058: 89 d8 mov %ebx,%eax 11905a: e8 29 fe ff ff call 118e88 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 11905f: e8 5c 2a 00 00 call 11bac0 <_Thread_Enable_dispatch> ts->active = true; 119064: c6 43 7c 01 movb $0x1,0x7c(%ebx) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 119068: 5a pop %edx 119069: ff 75 c0 pushl -0x40(%ebp) 11906c: e8 2b 3e 00 00 call 11ce9c <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 119071: 58 pop %eax 119072: ff 75 bc pushl -0x44(%ebp) 119075: e8 22 3e 00 00 call 11ce9c <_Watchdog_Remove> 11907a: 83 c4 10 add $0x10,%esp 11907d: e9 a6 fe ff ff jmp 118f28 <_Timer_server_Body+0x50> =============================================================================== 00118e38 <_Timer_server_Reset_interval_system_watchdog>: } static void _Timer_server_Reset_interval_system_watchdog( Timer_server_Control *ts ) { 118e38: 55 push %ebp 118e39: 89 e5 mov %esp,%ebp 118e3b: 56 push %esi 118e3c: 53 push %ebx 118e3d: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 118e3f: 8d 70 08 lea 0x8(%eax),%esi 118e42: 83 ec 0c sub $0xc,%esp 118e45: 56 push %esi 118e46: e8 51 40 00 00 call 11ce9c <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_interval_system_watchdog( ts ); _ISR_Disable( level ); 118e4b: 9c pushf 118e4c: fa cli 118e4d: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118e4e: 8b 43 30 mov 0x30(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 118e51: 8d 53 34 lea 0x34(%ebx),%edx if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 118e54: 83 c4 10 add $0x10,%esp 118e57: 39 d0 cmp %edx,%eax 118e59: 74 21 je 118e7c <_Timer_server_Reset_interval_system_watchdog+0x44> Watchdog_Interval delta_interval = 118e5b: 8b 40 10 mov 0x10(%eax),%eax _Watchdog_First( &ts->Interval_watchdogs.Chain )->delta_interval; _ISR_Enable( level ); 118e5e: 51 push %ecx 118e5f: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118e60: 89 43 14 mov %eax,0x14(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 118e63: 83 ec 08 sub $0x8,%esp 118e66: 56 push %esi 118e67: 68 44 08 14 00 push $0x140844 118e6c: e8 f3 3e 00 00 call 11cd64 <_Watchdog_Insert> 118e71: 83 c4 10 add $0x10,%esp delta_interval ); } else { _ISR_Enable( level ); } } 118e74: 8d 65 f8 lea -0x8(%ebp),%esp 118e77: 5b pop %ebx 118e78: 5e pop %esi 118e79: c9 leave 118e7a: c3 ret 118e7b: 90 nop <== NOT EXECUTED _Watchdog_Insert_ticks( &ts->Interval_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 118e7c: 51 push %ecx 118e7d: 9d popf } } 118e7e: 8d 65 f8 lea -0x8(%ebp),%esp 118e81: 5b pop %ebx 118e82: 5e pop %esi 118e83: c9 leave 118e84: c3 ret =============================================================================== 00118e88 <_Timer_server_Reset_tod_system_watchdog>: } static void _Timer_server_Reset_tod_system_watchdog( Timer_server_Control *ts ) { 118e88: 55 push %ebp 118e89: 89 e5 mov %esp,%ebp 118e8b: 56 push %esi 118e8c: 53 push %ebx 118e8d: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 118e8f: 8d 70 40 lea 0x40(%eax),%esi 118e92: 83 ec 0c sub $0xc,%esp 118e95: 56 push %esi 118e96: e8 01 40 00 00 call 11ce9c <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_tod_system_watchdog( ts ); _ISR_Disable( level ); 118e9b: 9c pushf 118e9c: fa cli 118e9d: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118e9e: 8b 43 68 mov 0x68(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 118ea1: 8d 53 6c lea 0x6c(%ebx),%edx if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 118ea4: 83 c4 10 add $0x10,%esp 118ea7: 39 d0 cmp %edx,%eax 118ea9: 74 21 je 118ecc <_Timer_server_Reset_tod_system_watchdog+0x44> Watchdog_Interval delta_interval = 118eab: 8b 40 10 mov 0x10(%eax),%eax _Watchdog_First( &ts->TOD_watchdogs.Chain )->delta_interval; _ISR_Enable( level ); 118eae: 51 push %ecx 118eaf: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118eb0: 89 43 4c mov %eax,0x4c(%ebx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 118eb3: 83 ec 08 sub $0x8,%esp 118eb6: 56 push %esi 118eb7: 68 38 08 14 00 push $0x140838 118ebc: e8 a3 3e 00 00 call 11cd64 <_Watchdog_Insert> 118ec1: 83 c4 10 add $0x10,%esp delta_interval ); } else { _ISR_Enable( level ); } } 118ec4: 8d 65 f8 lea -0x8(%ebp),%esp 118ec7: 5b pop %ebx 118ec8: 5e pop %esi 118ec9: c9 leave 118eca: c3 ret 118ecb: 90 nop <== NOT EXECUTED _Watchdog_Insert_seconds( &ts->TOD_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 118ecc: 51 push %ecx 118ecd: 9d popf } } 118ece: 8d 65 f8 lea -0x8(%ebp),%esp 118ed1: 5b pop %ebx 118ed2: 5e pop %esi 118ed3: c9 leave 118ed4: c3 ret =============================================================================== 00119084 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 119084: 55 push %ebp 119085: 89 e5 mov %esp,%ebp 119087: 57 push %edi 119088: 56 push %esi 119089: 53 push %ebx 11908a: 83 ec 2c sub $0x2c,%esp 11908d: 8b 5d 08 mov 0x8(%ebp),%ebx 119090: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 119093: 8b 53 78 mov 0x78(%ebx),%edx 119096: 85 d2 test %edx,%edx 119098: 74 16 je 1190b0 <_Timer_server_Schedule_operation_method+0x2c><== ALWAYS TAKEN * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 11909a: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 11909d: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 1190a0: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 1190a3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1190a6: 5b pop %ebx <== NOT EXECUTED 1190a7: 5e pop %esi <== NOT EXECUTED 1190a8: 5f pop %edi <== NOT EXECUTED 1190a9: c9 leave <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 1190aa: e9 11 08 00 00 jmp 1198c0 <_Chain_Append> <== NOT EXECUTED 1190af: 90 nop <== NOT EXECUTED 1190b0: 8b 15 74 07 14 00 mov 0x140774,%edx 1190b6: 42 inc %edx 1190b7: 89 15 74 07 14 00 mov %edx,0x140774 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 1190bd: 8b 50 38 mov 0x38(%eax),%edx 1190c0: 83 fa 01 cmp $0x1,%edx 1190c3: 74 7b je 119140 <_Timer_server_Schedule_operation_method+0xbc> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 1190c5: 83 fa 03 cmp $0x3,%edx 1190c8: 74 0e je 1190d8 <_Timer_server_Schedule_operation_method+0x54> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 1190ca: 8d 65 f4 lea -0xc(%ebp),%esp 1190cd: 5b pop %ebx 1190ce: 5e pop %esi 1190cf: 5f pop %edi 1190d0: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 1190d1: e9 ea 29 00 00 jmp 11bac0 <_Thread_Enable_dispatch> 1190d6: 66 90 xchg %ax,%ax <== NOT EXECUTED } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 1190d8: 9c pushf 1190d9: fa cli 1190da: 8f 45 e4 popl -0x1c(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 1190dd: 8b 0d 08 08 14 00 mov 0x140808,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 1190e3: 8b 53 74 mov 0x74(%ebx),%edx 1190e6: 89 55 d4 mov %edx,-0x2c(%ebp) */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1190e9: 8b 53 68 mov 0x68(%ebx),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1190ec: 8d 7b 6c lea 0x6c(%ebx),%edi if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 1190ef: 39 fa cmp %edi,%edx 1190f1: 74 21 je 119114 <_Timer_server_Schedule_operation_method+0x90> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 1190f3: 8b 7a 10 mov 0x10(%edx),%edi if ( snapshot > last_snapshot ) { 1190f6: 3b 4d d4 cmp -0x2c(%ebp),%ecx 1190f9: 0f 86 a1 00 00 00 jbe 1191a0 <_Timer_server_Schedule_operation_method+0x11c> /* * We advanced in time. */ delta = snapshot - last_snapshot; 1190ff: 89 ce mov %ecx,%esi 119101: 2b 75 d4 sub -0x2c(%ebp),%esi 119104: 89 75 d4 mov %esi,-0x2c(%ebp) if (delta_interval > delta) { 119107: 39 f7 cmp %esi,%edi 119109: 0f 86 9b 00 00 00 jbe 1191aa <_Timer_server_Schedule_operation_method+0x126><== NEVER TAKEN delta_interval -= delta; 11910f: 29 f7 sub %esi,%edi * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 119111: 89 7a 10 mov %edi,0x10(%edx) } ts->TOD_watchdogs.last_snapshot = snapshot; 119114: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 119117: ff 75 e4 pushl -0x1c(%ebp) 11911a: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 11911b: 83 ec 08 sub $0x8,%esp 11911e: 83 c0 10 add $0x10,%eax 119121: 50 push %eax 119122: 8d 43 68 lea 0x68(%ebx),%eax 119125: 50 push %eax 119126: e8 39 3c 00 00 call 11cd64 <_Watchdog_Insert> if ( !ts->active ) { 11912b: 8a 43 7c mov 0x7c(%ebx),%al 11912e: 83 c4 10 add $0x10,%esp 119131: 84 c0 test %al,%al 119133: 75 95 jne 1190ca <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_tod_system_watchdog( ts ); 119135: 89 d8 mov %ebx,%eax 119137: e8 4c fd ff ff call 118e88 <_Timer_server_Reset_tod_system_watchdog> 11913c: eb 8c jmp 1190ca <_Timer_server_Schedule_operation_method+0x46> 11913e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 119140: 9c pushf 119141: fa cli 119142: 8f 45 e4 popl -0x1c(%ebp) snapshot = _Watchdog_Ticks_since_boot; 119145: 8b 0d c4 08 14 00 mov 0x1408c4,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 11914b: 8b 7b 3c mov 0x3c(%ebx),%edi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11914e: 8b 53 30 mov 0x30(%ebx),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 119151: 8d 73 34 lea 0x34(%ebx),%esi if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 119154: 39 f2 cmp %esi,%edx 119156: 74 10 je 119168 <_Timer_server_Schedule_operation_method+0xe4> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 119158: 89 ce mov %ecx,%esi 11915a: 29 fe sub %edi,%esi delta_interval = first_watchdog->delta_interval; 11915c: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 11915f: 39 fe cmp %edi,%esi 119161: 73 39 jae 11919c <_Timer_server_Schedule_operation_method+0x118> delta_interval -= delta; 119163: 29 f7 sub %esi,%edi } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 119165: 89 7a 10 mov %edi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 119168: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 11916b: ff 75 e4 pushl -0x1c(%ebp) 11916e: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 11916f: 83 ec 08 sub $0x8,%esp 119172: 83 c0 10 add $0x10,%eax 119175: 50 push %eax 119176: 8d 43 30 lea 0x30(%ebx),%eax 119179: 50 push %eax 11917a: e8 e5 3b 00 00 call 11cd64 <_Watchdog_Insert> if ( !ts->active ) { 11917f: 8a 43 7c mov 0x7c(%ebx),%al 119182: 83 c4 10 add $0x10,%esp 119185: 84 c0 test %al,%al 119187: 0f 85 3d ff ff ff jne 1190ca <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_interval_system_watchdog( ts ); 11918d: 89 d8 mov %ebx,%eax 11918f: e8 a4 fc ff ff call 118e38 <_Timer_server_Reset_interval_system_watchdog> 119194: e9 31 ff ff ff jmp 1190ca <_Timer_server_Schedule_operation_method+0x46> 119199: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 11919c: 31 ff xor %edi,%edi 11919e: eb c5 jmp 119165 <_Timer_server_Schedule_operation_method+0xe1> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 1191a0: 03 7d d4 add -0x2c(%ebp),%edi delta_interval += delta; 1191a3: 29 cf sub %ecx,%edi 1191a5: e9 67 ff ff ff jmp 119111 <_Timer_server_Schedule_operation_method+0x8d> */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 1191aa: 31 ff xor %edi,%edi <== NOT EXECUTED 1191ac: e9 60 ff ff ff jmp 119111 <_Timer_server_Schedule_operation_method+0x8d><== NOT EXECUTED =============================================================================== 0010e23c <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 10e23c: 55 push %ebp 10e23d: 89 e5 mov %esp,%ebp 10e23f: 53 push %ebx 10e240: 8b 5d 08 mov 0x8(%ebp),%ebx 10e243: 8b 55 0c mov 0xc(%ebp),%edx uint32_t seconds = add->tv_sec; 10e246: 8b 02 mov (%edx),%eax /* Add the basics */ time->tv_sec += add->tv_sec; 10e248: 01 03 add %eax,(%ebx) time->tv_nsec += add->tv_nsec; 10e24a: 8b 52 04 mov 0x4(%edx),%edx 10e24d: 03 53 04 add 0x4(%ebx),%edx 10e250: 89 53 04 mov %edx,0x4(%ebx) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10e253: 81 fa ff c9 9a 3b cmp $0x3b9ac9ff,%edx 10e259: 76 1a jbe 10e275 <_Timespec_Add_to+0x39> 10e25b: 8b 0b mov (%ebx),%ecx 10e25d: 8d 76 00 lea 0x0(%esi),%esi time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 10e260: 81 ea 00 ca 9a 3b sub $0x3b9aca00,%edx * * This routines adds two timespecs. The second argument is added * to the first. */ uint32_t _Timespec_Add_to( 10e266: 41 inc %ecx /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; time->tv_sec++; seconds++; 10e267: 40 inc %eax /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10e268: 81 fa ff c9 9a 3b cmp $0x3b9ac9ff,%edx 10e26e: 77 f0 ja 10e260 <_Timespec_Add_to+0x24> <== NEVER TAKEN 10e270: 89 53 04 mov %edx,0x4(%ebx) 10e273: 89 0b mov %ecx,(%ebx) time->tv_sec++; seconds++; } return seconds; } 10e275: 5b pop %ebx 10e276: c9 leave 10e277: c3 ret =============================================================================== 0010fb38 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 10fb38: 55 push %ebp 10fb39: 89 e5 mov %esp,%ebp 10fb3b: 57 push %edi 10fb3c: 56 push %esi 10fb3d: 53 push %ebx 10fb3e: 83 ec 2c sub $0x2c,%esp 10fb41: 8b 45 08 mov 0x8(%ebp),%eax 10fb44: 8b 4d 0c mov 0xc(%ebp),%ecx /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10fb47: 8b 38 mov (%eax),%edi left += lhs->tv_nsec; 10fb49: 8b 70 04 mov 0x4(%eax),%esi right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10fb4c: bb 00 ca 9a 3b mov $0x3b9aca00,%ebx 10fb51: 8b 01 mov (%ecx),%eax 10fb53: f7 eb imul %ebx 10fb55: 89 45 e0 mov %eax,-0x20(%ebp) 10fb58: 89 55 e4 mov %edx,-0x1c(%ebp) right += rhs->tv_nsec; 10fb5b: 8b 41 04 mov 0x4(%ecx),%eax 10fb5e: 99 cltd 10fb5f: 01 45 e0 add %eax,-0x20(%ebp) 10fb62: 11 55 e4 adc %edx,-0x1c(%ebp) if ( right == 0 ) { 10fb65: 8b 55 e4 mov -0x1c(%ebp),%edx 10fb68: 0b 55 e0 or -0x20(%ebp),%edx 10fb6b: 74 73 je 10fbe0 <_Timespec_Divide+0xa8> /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10fb6d: 89 f8 mov %edi,%eax 10fb6f: f7 eb imul %ebx 10fb71: 89 45 d0 mov %eax,-0x30(%ebp) 10fb74: 89 55 d4 mov %edx,-0x2c(%ebp) left += lhs->tv_nsec; 10fb77: 89 f7 mov %esi,%edi 10fb79: c1 ff 1f sar $0x1f,%edi 10fb7c: 01 75 d0 add %esi,-0x30(%ebp) 10fb7f: 11 7d d4 adc %edi,-0x2c(%ebp) * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 10fb82: 69 4d d4 a0 86 01 00 imul $0x186a0,-0x2c(%ebp),%ecx 10fb89: bb a0 86 01 00 mov $0x186a0,%ebx 10fb8e: 8b 45 d0 mov -0x30(%ebp),%eax 10fb91: f7 e3 mul %ebx 10fb93: 8d 34 11 lea (%ecx,%edx,1),%esi 10fb96: ff 75 e4 pushl -0x1c(%ebp) 10fb99: ff 75 e0 pushl -0x20(%ebp) 10fb9c: 56 push %esi 10fb9d: 50 push %eax 10fb9e: e8 0d fe 00 00 call 11f9b0 <__udivdi3> 10fba3: 83 c4 10 add $0x10,%esp 10fba6: 89 c3 mov %eax,%ebx 10fba8: 89 d6 mov %edx,%esi *ival_percentage = answer / 1000; 10fbaa: 6a 00 push $0x0 10fbac: 68 e8 03 00 00 push $0x3e8 10fbb1: 52 push %edx 10fbb2: 50 push %eax 10fbb3: e8 f8 fd 00 00 call 11f9b0 <__udivdi3> 10fbb8: 83 c4 10 add $0x10,%esp 10fbbb: 8b 55 10 mov 0x10(%ebp),%edx 10fbbe: 89 02 mov %eax,(%edx) *fval_percentage = answer % 1000; 10fbc0: 6a 00 push $0x0 10fbc2: 68 e8 03 00 00 push $0x3e8 10fbc7: 56 push %esi 10fbc8: 53 push %ebx 10fbc9: e8 f2 fe 00 00 call 11fac0 <__umoddi3> 10fbce: 83 c4 10 add $0x10,%esp 10fbd1: 8b 55 14 mov 0x14(%ebp),%edx 10fbd4: 89 02 mov %eax,(%edx) } 10fbd6: 8d 65 f4 lea -0xc(%ebp),%esp 10fbd9: 5b pop %ebx 10fbda: 5e pop %esi 10fbdb: 5f pop %edi 10fbdc: c9 leave 10fbdd: c3 ret 10fbde: 66 90 xchg %ax,%ax <== NOT EXECUTED left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; if ( right == 0 ) { *ival_percentage = 0; 10fbe0: 8b 45 10 mov 0x10(%ebp),%eax 10fbe3: c7 00 00 00 00 00 movl $0x0,(%eax) *fval_percentage = 0; 10fbe9: 8b 55 14 mov 0x14(%ebp),%edx 10fbec: c7 02 00 00 00 00 movl $0x0,(%edx) answer = (left * 100000) / right; *ival_percentage = answer / 1000; *fval_percentage = answer % 1000; } 10fbf2: 8d 65 f4 lea -0xc(%ebp),%esp 10fbf5: 5b pop %ebx 10fbf6: 5e pop %esi 10fbf7: 5f pop %edi 10fbf8: c9 leave 10fbf9: c3 ret =============================================================================== 0010fdb4 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 10fdb4: 55 push %ebp 10fdb5: 89 e5 mov %esp,%ebp 10fdb7: 8b 55 08 mov 0x8(%ebp),%edx 10fdba: 8b 45 0c mov 0xc(%ebp),%eax if ( lhs->tv_sec > rhs->tv_sec ) 10fdbd: 8b 08 mov (%eax),%ecx 10fdbf: 39 0a cmp %ecx,(%edx) 10fdc1: 7f 11 jg 10fdd4 <_Timespec_Greater_than+0x20> return true; if ( lhs->tv_sec < rhs->tv_sec ) 10fdc3: 7c 0b jl 10fdd0 <_Timespec_Greater_than+0x1c><== NEVER TAKEN #include #include #include bool _Timespec_Greater_than( 10fdc5: 8b 48 04 mov 0x4(%eax),%ecx 10fdc8: 39 4a 04 cmp %ecx,0x4(%edx) 10fdcb: 0f 9f c0 setg %al /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 10fdce: c9 leave 10fdcf: c3 ret { if ( lhs->tv_sec > rhs->tv_sec ) return true; if ( lhs->tv_sec < rhs->tv_sec ) return false; 10fdd0: 31 c0 xor %eax,%eax <== NOT EXECUTED /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 10fdd2: c9 leave <== NOT EXECUTED 10fdd3: c3 ret <== NOT EXECUTED const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) return true; 10fdd4: b0 01 mov $0x1,%al /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 10fdd6: c9 leave 10fdd7: c3 ret =============================================================================== 0010ee84 <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 10ee84: 55 push %ebp 10ee85: 89 e5 mov %esp,%ebp 10ee87: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 10ee8a: 85 c0 test %eax,%eax 10ee8c: 74 1a je 10eea8 <_Timespec_Is_valid+0x24> return false; if ( time->tv_sec < 0 ) 10ee8e: 8b 10 mov (%eax),%edx 10ee90: 85 d2 test %edx,%edx 10ee92: 78 14 js 10eea8 <_Timespec_Is_valid+0x24> return false; if ( time->tv_nsec < 0 ) 10ee94: 8b 40 04 mov 0x4(%eax),%eax 10ee97: 85 c0 test %eax,%eax 10ee99: 78 0d js 10eea8 <_Timespec_Is_valid+0x24> #include #include #include bool _Timespec_Is_valid( 10ee9b: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10eea0: 0f 96 c0 setbe %al if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 10eea3: c9 leave 10eea4: c3 ret 10eea5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( time->tv_sec < 0 ) return false; if ( time->tv_nsec < 0 ) return false; 10eea8: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 10eeaa: c9 leave 10eeab: c3 ret =============================================================================== 0010e278 <_Timespec_Subtract>: void _Timespec_Subtract( const struct timespec *start, const struct timespec *end, struct timespec *result ) { 10e278: 55 push %ebp 10e279: 89 e5 mov %esp,%ebp 10e27b: 56 push %esi 10e27c: 53 push %ebx 10e27d: 8b 5d 08 mov 0x8(%ebp),%ebx 10e280: 8b 75 0c mov 0xc(%ebp),%esi 10e283: 8b 45 10 mov 0x10(%ebp),%eax if (end->tv_nsec < start->tv_nsec) { 10e286: 8b 4e 04 mov 0x4(%esi),%ecx 10e289: 8b 53 04 mov 0x4(%ebx),%edx 10e28c: 39 d1 cmp %edx,%ecx 10e28e: 7c 10 jl 10e2a0 <_Timespec_Subtract+0x28> result->tv_sec = end->tv_sec - start->tv_sec - 1; result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; } else { result->tv_sec = end->tv_sec - start->tv_sec; 10e290: 8b 36 mov (%esi),%esi 10e292: 2b 33 sub (%ebx),%esi 10e294: 89 30 mov %esi,(%eax) result->tv_nsec = end->tv_nsec - start->tv_nsec; 10e296: 29 d1 sub %edx,%ecx 10e298: 89 48 04 mov %ecx,0x4(%eax) } } 10e29b: 5b pop %ebx 10e29c: 5e pop %esi 10e29d: c9 leave 10e29e: c3 ret 10e29f: 90 nop <== NOT EXECUTED struct timespec *result ) { if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; 10e2a0: 8b 36 mov (%esi),%esi 10e2a2: 4e dec %esi 10e2a3: 2b 33 sub (%ebx),%esi 10e2a5: 89 30 mov %esi,(%eax) result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; 10e2a7: 81 c1 00 ca 9a 3b add $0x3b9aca00,%ecx 10e2ad: 29 d1 sub %edx,%ecx 10e2af: 89 48 04 mov %ecx,0x4(%eax) } else { result->tv_sec = end->tv_sec - start->tv_sec; result->tv_nsec = end->tv_nsec - start->tv_nsec; } } 10e2b2: 5b pop %ebx 10e2b3: 5e pop %esi 10e2b4: c9 leave 10e2b5: c3 ret =============================================================================== 0010eeec <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 10eeec: 55 push %ebp 10eeed: 89 e5 mov %esp,%ebp 10eeef: 56 push %esi 10eef0: 53 push %ebx 10eef1: 8b 5d 08 mov 0x8(%ebp),%ebx uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 10eef4: 8b 33 mov (%ebx),%esi 10eef6: 85 f6 test %esi,%esi 10eef8: 75 07 jne 10ef01 <_Timespec_To_ticks+0x15> 10eefa: 8b 43 04 mov 0x4(%ebx),%eax 10eefd: 85 c0 test %eax,%eax 10eeff: 74 37 je 10ef38 <_Timespec_To_ticks+0x4c> return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 10ef01: e8 6e 24 00 00 call 111374 10ef06: 89 c1 mov %eax,%ecx 10ef08: 0f af ce imul %esi,%ecx ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 10ef0b: a1 cc 42 12 00 mov 0x1242cc,%eax 10ef10: 8d 04 80 lea (%eax,%eax,4),%eax 10ef13: 8d 04 80 lea (%eax,%eax,4),%eax 10ef16: 8d 34 80 lea (%eax,%eax,4),%esi 10ef19: c1 e6 03 shl $0x3,%esi 10ef1c: 8b 43 04 mov 0x4(%ebx),%eax 10ef1f: 31 d2 xor %edx,%edx 10ef21: f7 f6 div %esi if (ticks) 10ef23: 01 c8 add %ecx,%eax 10ef25: 74 05 je 10ef2c <_Timespec_To_ticks+0x40> return ticks; return 1; } 10ef27: 5b pop %ebx 10ef28: 5e pop %esi 10ef29: c9 leave 10ef2a: c3 ret 10ef2b: 90 nop <== NOT EXECUTED ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); if (ticks) return ticks; return 1; 10ef2c: b8 01 00 00 00 mov $0x1,%eax } 10ef31: 5b pop %ebx 10ef32: 5e pop %esi 10ef33: c9 leave 10ef34: c3 ret 10ef35: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) return 0; 10ef38: 31 c0 xor %eax,%eax if (ticks) return ticks; return 1; } 10ef3a: 5b pop %ebx 10ef3b: 5e pop %esi 10ef3c: c9 leave 10ef3d: c3 ret =============================================================================== 0010e3f4 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10e3f4: 55 push %ebp 10e3f5: 89 e5 mov %esp,%ebp 10e3f7: 57 push %edi 10e3f8: 56 push %esi 10e3f9: 53 push %ebx 10e3fa: 83 ec 1c sub $0x1c,%esp 10e3fd: 8b 75 08 mov 0x8(%ebp),%esi 10e400: 8b 7d 10 mov 0x10(%ebp),%edi 10e403: 8a 45 0c mov 0xc(%ebp),%al Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e406: 8b 1d 14 66 12 00 mov 0x126614,%ebx 10e40c: 81 fb 0c 66 12 00 cmp $0x12660c,%ebx 10e412: 74 25 je 10e439 <_User_extensions_Fatal+0x45><== NEVER TAKEN the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10e414: 0f b6 c0 movzbl %al,%eax 10e417: 89 45 e4 mov %eax,-0x1c(%ebp) 10e41a: 66 90 xchg %ax,%ax !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 10e41c: 8b 43 30 mov 0x30(%ebx),%eax 10e41f: 85 c0 test %eax,%eax 10e421: 74 0b je 10e42e <_User_extensions_Fatal+0x3a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10e423: 52 push %edx 10e424: 57 push %edi 10e425: ff 75 e4 pushl -0x1c(%ebp) 10e428: 56 push %esi 10e429: ff d0 call *%eax 10e42b: 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 ) { 10e42e: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e431: 81 fb 0c 66 12 00 cmp $0x12660c,%ebx 10e437: 75 e3 jne 10e41c <_User_extensions_Fatal+0x28> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 10e439: 8d 65 f4 lea -0xc(%ebp),%esp 10e43c: 5b pop %ebx 10e43d: 5e pop %esi 10e43e: 5f pop %edi 10e43f: c9 leave 10e440: c3 ret =============================================================================== 0010e2b8 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10e2b8: 55 push %ebp 10e2b9: 89 e5 mov %esp,%ebp 10e2bb: 57 push %edi 10e2bc: 56 push %esi 10e2bd: 53 push %ebx 10e2be: 83 ec 1c sub $0x1c,%esp User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; 10e2c1: a1 f8 22 12 00 mov 0x1222f8,%eax 10e2c6: 89 45 dc mov %eax,-0x24(%ebp) initial_extensions = Configuration.User_extension_table; 10e2c9: 8b 35 fc 22 12 00 mov 0x1222fc,%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e2cf: c7 05 0c 66 12 00 10 movl $0x126610,0x12660c 10e2d6: 66 12 00 the_chain->permanent_null = NULL; 10e2d9: c7 05 10 66 12 00 00 movl $0x0,0x126610 10e2e0: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e2e3: c7 05 14 66 12 00 0c movl $0x12660c,0x126614 10e2ea: 66 12 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e2ed: c7 05 d8 63 12 00 dc movl $0x1263dc,0x1263d8 10e2f4: 63 12 00 the_chain->permanent_null = NULL; 10e2f7: c7 05 dc 63 12 00 00 movl $0x0,0x1263dc 10e2fe: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e301: c7 05 e0 63 12 00 d8 movl $0x1263d8,0x1263e0 10e308: 63 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10e30b: 85 f6 test %esi,%esi 10e30d: 74 64 je 10e373 <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( 10e30f: 89 c2 mov %eax,%edx 10e311: 8d 04 40 lea (%eax,%eax,2),%eax 10e314: 8d 0c 82 lea (%edx,%eax,4),%ecx 10e317: c1 e1 02 shl $0x2,%ecx 10e31a: 83 ec 0c sub $0xc,%esp 10e31d: 51 push %ecx 10e31e: 89 4d d8 mov %ecx,-0x28(%ebp) 10e321: e8 c6 04 00 00 call 10e7ec <_Workspace_Allocate_or_fatal_error> 10e326: 89 c3 mov %eax,%ebx number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10e328: 31 c0 xor %eax,%eax 10e32a: 8b 4d d8 mov -0x28(%ebp),%ecx 10e32d: 89 df mov %ebx,%edi 10e32f: f3 aa rep stos %al,%es:(%edi) extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e331: 83 c4 10 add $0x10,%esp 10e334: 8b 45 dc mov -0x24(%ebp),%eax 10e337: 85 c0 test %eax,%eax 10e339: 74 38 je 10e373 <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN 10e33b: 89 75 e4 mov %esi,-0x1c(%ebp) 10e33e: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 10e345: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 10e348: 8d 7b 14 lea 0x14(%ebx),%edi 10e34b: 8b 75 e4 mov -0x1c(%ebp),%esi 10e34e: b9 08 00 00 00 mov $0x8,%ecx 10e353: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10e355: 83 ec 0c sub $0xc,%esp 10e358: 53 push %ebx 10e359: e8 2a 2a 00 00 call 110d88 <_User_extensions_Add_set> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10e35e: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e361: ff 45 e0 incl -0x20(%ebp) 10e364: 83 45 e4 20 addl $0x20,-0x1c(%ebp) 10e368: 83 c4 10 add $0x10,%esp 10e36b: 8b 45 e0 mov -0x20(%ebp),%eax 10e36e: 39 45 dc cmp %eax,-0x24(%ebp) 10e371: 77 d5 ja 10e348 <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10e373: 8d 65 f4 lea -0xc(%ebp),%esp 10e376: 5b pop %ebx 10e377: 5e pop %esi 10e378: 5f pop %edi 10e379: c9 leave 10e37a: c3 ret =============================================================================== 0010f930 <_User_extensions_Remove_set>: #include void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 10f930: 55 push %ebp 10f931: 89 e5 mov %esp,%ebp 10f933: 53 push %ebx 10f934: 83 ec 10 sub $0x10,%esp 10f937: 8b 5d 08 mov 0x8(%ebp),%ebx _Chain_Extract( &the_extension->Node ); 10f93a: 53 push %ebx 10f93b: e8 84 da ff ff call 10d3c4 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 10f940: 83 c4 10 add $0x10,%esp 10f943: 8b 43 24 mov 0x24(%ebx),%eax 10f946: 85 c0 test %eax,%eax 10f948: 74 12 je 10f95c <_User_extensions_Remove_set+0x2c> _Chain_Extract( &the_extension->Switch.Node ); 10f94a: 83 c3 08 add $0x8,%ebx 10f94d: 89 5d 08 mov %ebx,0x8(%ebp) } 10f950: 8b 5d fc mov -0x4(%ebp),%ebx 10f953: c9 leave /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 10f954: e9 6b da ff ff jmp 10d3c4 <_Chain_Extract> 10f959: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } 10f95c: 8b 5d fc mov -0x4(%ebp),%ebx 10f95f: c9 leave 10f960: c3 ret =============================================================================== 0010e37c <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 10e37c: 55 push %ebp 10e37d: 89 e5 mov %esp,%ebp 10e37f: 56 push %esi 10e380: 53 push %ebx 10e381: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e384: 8b 1d 0c 66 12 00 mov 0x12660c,%ebx 10e38a: 81 fb 10 66 12 00 cmp $0x126610,%ebx 10e390: 74 1c je 10e3ae <_User_extensions_Thread_begin+0x32><== NEVER TAKEN 10e392: 66 90 xchg %ax,%ax !_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_begin != NULL ) 10e394: 8b 43 28 mov 0x28(%ebx),%eax 10e397: 85 c0 test %eax,%eax 10e399: 74 09 je 10e3a4 <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 10e39b: 83 ec 0c sub $0xc,%esp 10e39e: 56 push %esi 10e39f: ff d0 call *%eax 10e3a1: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10e3a4: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e3a6: 81 fb 10 66 12 00 cmp $0x126610,%ebx 10e3ac: 75 e6 jne 10e394 <_User_extensions_Thread_begin+0x18> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) (*the_extension->Callouts.thread_begin)( executing ); } } 10e3ae: 8d 65 f8 lea -0x8(%ebp),%esp 10e3b1: 5b pop %ebx 10e3b2: 5e pop %esi 10e3b3: c9 leave 10e3b4: c3 ret =============================================================================== 0010e444 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 10e444: 55 push %ebp 10e445: 89 e5 mov %esp,%ebp 10e447: 56 push %esi 10e448: 53 push %ebx 10e449: 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 ; 10e44c: 8b 1d 0c 66 12 00 mov 0x12660c,%ebx 10e452: 81 fb 10 66 12 00 cmp $0x126610,%ebx 10e458: 74 26 je 10e480 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN 10e45a: 66 90 xchg %ax,%ax !_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 ) { 10e45c: 8b 43 14 mov 0x14(%ebx),%eax 10e45f: 85 c0 test %eax,%eax 10e461: 74 13 je 10e476 <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 10e463: 83 ec 08 sub $0x8,%esp 10e466: 56 push %esi 10e467: ff 35 78 66 12 00 pushl 0x126678 10e46d: ff d0 call *%eax _Thread_Executing, the_thread ); if ( !status ) 10e46f: 83 c4 10 add $0x10,%esp 10e472: 84 c0 test %al,%al 10e474: 74 16 je 10e48c <_User_extensions_Thread_create+0x48> 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 ) { 10e476: 8b 1b mov (%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 10e478: 81 fb 10 66 12 00 cmp $0x126610,%ebx 10e47e: 75 dc jne 10e45c <_User_extensions_Thread_create+0x18> if ( !status ) return false; } } return true; 10e480: b0 01 mov $0x1,%al } 10e482: 8d 65 f8 lea -0x8(%ebp),%esp 10e485: 5b pop %ebx 10e486: 5e pop %esi 10e487: c9 leave 10e488: c3 ret 10e489: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) return false; 10e48c: 31 c0 xor %eax,%eax } } return true; } 10e48e: 8d 65 f8 lea -0x8(%ebp),%esp 10e491: 5b pop %ebx 10e492: 5e pop %esi 10e493: c9 leave 10e494: c3 ret =============================================================================== 0010e498 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 10e498: 55 push %ebp 10e499: 89 e5 mov %esp,%ebp 10e49b: 56 push %esi 10e49c: 53 push %ebx 10e49d: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e4a0: 8b 1d 14 66 12 00 mov 0x126614,%ebx 10e4a6: 81 fb 0c 66 12 00 cmp $0x12660c,%ebx 10e4ac: 74 23 je 10e4d1 <_User_extensions_Thread_delete+0x39><== NEVER TAKEN 10e4ae: 66 90 xchg %ax,%ax !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) 10e4b0: 8b 43 20 mov 0x20(%ebx),%eax 10e4b3: 85 c0 test %eax,%eax 10e4b5: 74 0f je 10e4c6 <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 10e4b7: 83 ec 08 sub $0x8,%esp 10e4ba: 56 push %esi 10e4bb: ff 35 78 66 12 00 pushl 0x126678 10e4c1: ff d0 call *%eax 10e4c3: 83 c4 10 add $0x10,%esp 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 ) { 10e4c6: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e4c9: 81 fb 0c 66 12 00 cmp $0x12660c,%ebx 10e4cf: 75 df jne 10e4b0 <_User_extensions_Thread_delete+0x18> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10e4d1: 8d 65 f8 lea -0x8(%ebp),%esp 10e4d4: 5b pop %ebx 10e4d5: 5e pop %esi 10e4d6: c9 leave 10e4d7: c3 ret =============================================================================== 0010e3b8 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10e3b8: 55 push %ebp 10e3b9: 89 e5 mov %esp,%ebp 10e3bb: 56 push %esi 10e3bc: 53 push %ebx 10e3bd: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e3c0: 8b 1d 14 66 12 00 mov 0x126614,%ebx 10e3c6: 81 fb 0c 66 12 00 cmp $0x12660c,%ebx 10e3cc: 74 1d je 10e3eb <_User_extensions_Thread_exitted+0x33><== NEVER TAKEN 10e3ce: 66 90 xchg %ax,%ax !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) 10e3d0: 8b 43 2c mov 0x2c(%ebx),%eax 10e3d3: 85 c0 test %eax,%eax 10e3d5: 74 09 je 10e3e0 <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 10e3d7: 83 ec 0c sub $0xc,%esp 10e3da: 56 push %esi 10e3db: ff d0 call *%eax 10e3dd: 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 ) { 10e3e0: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e3e3: 81 fb 0c 66 12 00 cmp $0x12660c,%ebx 10e3e9: 75 e5 jne 10e3d0 <_User_extensions_Thread_exitted+0x18> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 10e3eb: 8d 65 f8 lea -0x8(%ebp),%esp 10e3ee: 5b pop %ebx 10e3ef: 5e pop %esi 10e3f0: c9 leave 10e3f1: c3 ret =============================================================================== 0010f080 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 10f080: 55 push %ebp 10f081: 89 e5 mov %esp,%ebp 10f083: 56 push %esi 10f084: 53 push %ebx 10f085: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f088: 8b 1d ec 75 12 00 mov 0x1275ec,%ebx 10f08e: 81 fb f0 75 12 00 cmp $0x1275f0,%ebx 10f094: 74 22 je 10f0b8 <_User_extensions_Thread_restart+0x38><== NEVER TAKEN 10f096: 66 90 xchg %ax,%ax !_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_restart != NULL ) 10f098: 8b 43 1c mov 0x1c(%ebx),%eax 10f09b: 85 c0 test %eax,%eax 10f09d: 74 0f je 10f0ae <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 10f09f: 83 ec 08 sub $0x8,%esp 10f0a2: 56 push %esi 10f0a3: ff 35 58 76 12 00 pushl 0x127658 10f0a9: ff d0 call *%eax 10f0ab: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10f0ae: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f0b0: 81 fb f0 75 12 00 cmp $0x1275f0,%ebx 10f0b6: 75 e0 jne 10f098 <_User_extensions_Thread_restart+0x18> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10f0b8: 8d 65 f8 lea -0x8(%ebp),%esp 10f0bb: 5b pop %ebx 10f0bc: 5e pop %esi 10f0bd: c9 leave 10f0be: c3 ret =============================================================================== 0010e4d8 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 10e4d8: 55 push %ebp 10e4d9: 89 e5 mov %esp,%ebp 10e4db: 56 push %esi 10e4dc: 53 push %ebx 10e4dd: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e4e0: 8b 1d 0c 66 12 00 mov 0x12660c,%ebx 10e4e6: 81 fb 10 66 12 00 cmp $0x126610,%ebx 10e4ec: 74 22 je 10e510 <_User_extensions_Thread_start+0x38><== NEVER TAKEN 10e4ee: 66 90 xchg %ax,%ax !_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_start != NULL ) 10e4f0: 8b 43 18 mov 0x18(%ebx),%eax 10e4f3: 85 c0 test %eax,%eax 10e4f5: 74 0f je 10e506 <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 10e4f7: 83 ec 08 sub $0x8,%esp 10e4fa: 56 push %esi 10e4fb: ff 35 78 66 12 00 pushl 0x126678 10e501: ff d0 call *%eax 10e503: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10e506: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e508: 81 fb 10 66 12 00 cmp $0x126610,%ebx 10e50e: 75 e0 jne 10e4f0 <_User_extensions_Thread_start+0x18> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10e510: 8d 65 f8 lea -0x8(%ebp),%esp 10e513: 5b pop %ebx 10e514: 5e pop %esi 10e515: c9 leave 10e516: c3 ret =============================================================================== 0010e518 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 10e518: 55 push %ebp 10e519: 89 e5 mov %esp,%ebp 10e51b: 57 push %edi 10e51c: 56 push %esi 10e51d: 53 push %ebx 10e51e: 83 ec 0c sub $0xc,%esp 10e521: 8b 7d 08 mov 0x8(%ebp),%edi 10e524: 8b 75 0c mov 0xc(%ebp),%esi Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 10e527: 8b 1d d8 63 12 00 mov 0x1263d8,%ebx 10e52d: 81 fb dc 63 12 00 cmp $0x1263dc,%ebx 10e533: 74 18 je 10e54d <_User_extensions_Thread_switch+0x35><== NEVER TAKEN 10e535: 8d 76 00 lea 0x0(%esi),%esi !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); 10e538: 83 ec 08 sub $0x8,%esp 10e53b: 56 push %esi 10e53c: 57 push %edi 10e53d: ff 53 08 call *0x8(%ebx) Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { 10e540: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 10e542: 83 c4 10 add $0x10,%esp 10e545: 81 fb dc 63 12 00 cmp $0x1263dc,%ebx 10e54b: 75 eb jne 10e538 <_User_extensions_Thread_switch+0x20> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10e54d: 8d 65 f4 lea -0xc(%ebp),%esp 10e550: 5b pop %ebx 10e551: 5e pop %esi 10e552: 5f pop %edi 10e553: c9 leave 10e554: c3 ret =============================================================================== 0010ff18 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10ff18: 55 push %ebp 10ff19: 89 e5 mov %esp,%ebp 10ff1b: 57 push %edi 10ff1c: 56 push %esi 10ff1d: 53 push %ebx 10ff1e: 83 ec 1c sub $0x1c,%esp 10ff21: 8b 75 08 mov 0x8(%ebp),%esi 10ff24: 8b 4d 0c mov 0xc(%ebp),%ecx 10ff27: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10ff2a: 9c pushf 10ff2b: fa cli 10ff2c: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10ff2d: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ff2f: 8d 7e 04 lea 0x4(%esi),%edi 10ff32: 89 7d e4 mov %edi,-0x1c(%ebp) * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 10ff35: 39 fa cmp %edi,%edx 10ff37: 74 3d je 10ff76 <_Watchdog_Adjust+0x5e> switch ( direction ) { 10ff39: 85 c9 test %ecx,%ecx 10ff3b: 75 43 jne 10ff80 <_Watchdog_Adjust+0x68> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10ff3d: 85 db test %ebx,%ebx 10ff3f: 74 35 je 10ff76 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 10ff41: 8b 7a 10 mov 0x10(%edx),%edi 10ff44: 39 fb cmp %edi,%ebx 10ff46: 73 0f jae 10ff57 <_Watchdog_Adjust+0x3f> <== ALWAYS TAKEN 10ff48: eb 3e jmp 10ff88 <_Watchdog_Adjust+0x70> <== NOT EXECUTED 10ff4a: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10ff4c: 29 fb sub %edi,%ebx 10ff4e: 74 26 je 10ff76 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 10ff50: 8b 7a 10 mov 0x10(%edx),%edi 10ff53: 39 df cmp %ebx,%edi 10ff55: 77 31 ja 10ff88 <_Watchdog_Adjust+0x70> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10ff57: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10ff5e: 50 push %eax 10ff5f: 9d popf _Watchdog_Tickle( header ); 10ff60: 83 ec 0c sub $0xc,%esp 10ff63: 56 push %esi 10ff64: e8 cb 01 00 00 call 110134 <_Watchdog_Tickle> _ISR_Disable( level ); 10ff69: 9c pushf 10ff6a: fa cli 10ff6b: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10ff6c: 8b 16 mov (%esi),%edx if ( _Chain_Is_empty( header ) ) 10ff6e: 83 c4 10 add $0x10,%esp 10ff71: 39 55 e4 cmp %edx,-0x1c(%ebp) 10ff74: 75 d6 jne 10ff4c <_Watchdog_Adjust+0x34> } break; } } _ISR_Enable( level ); 10ff76: 50 push %eax 10ff77: 9d popf } 10ff78: 8d 65 f4 lea -0xc(%ebp),%esp 10ff7b: 5b pop %ebx 10ff7c: 5e pop %esi 10ff7d: 5f pop %edi 10ff7e: c9 leave 10ff7f: c3 ret * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 10ff80: 49 dec %ecx 10ff81: 75 f3 jne 10ff76 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10ff83: 01 5a 10 add %ebx,0x10(%edx) break; 10ff86: eb ee jmp 10ff76 <_Watchdog_Adjust+0x5e> case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 10ff88: 29 df sub %ebx,%edi 10ff8a: 89 7a 10 mov %edi,0x10(%edx) break; 10ff8d: eb e7 jmp 10ff76 <_Watchdog_Adjust+0x5e> =============================================================================== 0010e558 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10e558: 55 push %ebp 10e559: 89 e5 mov %esp,%ebp 10e55b: 57 push %edi 10e55c: 56 push %esi 10e55d: 53 push %ebx 10e55e: 83 ec 04 sub $0x4,%esp 10e561: 8b 5d 0c mov 0xc(%ebp),%ebx Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 10e564: 8b 3d 74 66 12 00 mov 0x126674,%edi _ISR_Disable( level ); 10e56a: 9c pushf 10e56b: fa cli 10e56c: 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 ) { 10e56f: 8b 43 08 mov 0x8(%ebx),%eax 10e572: 85 c0 test %eax,%eax 10e574: 0f 85 9e 00 00 00 jne 10e618 <_Watchdog_Insert+0xc0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10e57a: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx) _Watchdog_Sync_count++; 10e581: a1 20 65 12 00 mov 0x126520,%eax 10e586: 40 inc %eax 10e587: a3 20 65 12 00 mov %eax,0x126520 restart: delta_interval = the_watchdog->initial; 10e58c: 8b 43 0c mov 0xc(%ebx),%eax * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 10e58f: 8b 4d 08 mov 0x8(%ebp),%ecx 10e592: 8b 11 mov (%ecx),%edx ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10e594: 85 c0 test %eax,%eax 10e596: 74 5d je 10e5f5 <_Watchdog_Insert+0x9d> 10e598: 8b 32 mov (%edx),%esi 10e59a: 85 f6 test %esi,%esi 10e59c: 74 57 je 10e5f5 <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e59e: 8b 4a 10 mov 0x10(%edx),%ecx 10e5a1: 39 c8 cmp %ecx,%eax 10e5a3: 73 22 jae 10e5c7 <_Watchdog_Insert+0x6f> 10e5a5: eb 49 jmp 10e5f0 <_Watchdog_Insert+0x98> 10e5a7: 90 nop <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10e5a8: 8b 35 88 64 12 00 mov 0x126488,%esi 10e5ae: 39 f7 cmp %esi,%edi 10e5b0: 72 72 jb 10e624 <_Watchdog_Insert+0xcc> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10e5b2: 29 c8 sub %ecx,%eax exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10e5b4: 8b 12 mov (%edx),%edx */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10e5b6: 85 c0 test %eax,%eax 10e5b8: 74 3b je 10e5f5 <_Watchdog_Insert+0x9d> 10e5ba: 8b 0a mov (%edx),%ecx 10e5bc: 85 c9 test %ecx,%ecx 10e5be: 74 35 je 10e5f5 <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e5c0: 8b 4a 10 mov 0x10(%edx),%ecx 10e5c3: 39 c1 cmp %eax,%ecx 10e5c5: 77 29 ja 10e5f0 <_Watchdog_Insert+0x98> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 10e5c7: ff 75 f0 pushl -0x10(%ebp) 10e5ca: 9d popf 10e5cb: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10e5cc: 83 7b 08 01 cmpl $0x1,0x8(%ebx) 10e5d0: 74 d6 je 10e5a8 <_Watchdog_Insert+0x50> _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 10e5d2: 89 3d 88 64 12 00 mov %edi,0x126488 _Watchdog_Sync_count--; 10e5d8: a1 20 65 12 00 mov 0x126520,%eax 10e5dd: 48 dec %eax 10e5de: a3 20 65 12 00 mov %eax,0x126520 _ISR_Enable( level ); 10e5e3: ff 75 f0 pushl -0x10(%ebp) 10e5e6: 9d popf } 10e5e7: 58 pop %eax 10e5e8: 5b pop %ebx 10e5e9: 5e pop %esi 10e5ea: 5f pop %edi 10e5eb: c9 leave 10e5ec: c3 ret 10e5ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 10e5f0: 29 c1 sub %eax,%ecx 10e5f2: 89 4a 10 mov %ecx,0x10(%edx) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 10e5f5: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10e5fc: 89 43 10 mov %eax,0x10(%ebx) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10e5ff: 8b 42 04 mov 0x4(%edx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10e602: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10e605: 8b 10 mov (%eax),%edx after_node->next = the_node; 10e607: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10e609: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10e60b: 89 5a 04 mov %ebx,0x4(%edx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10e60e: a1 24 65 12 00 mov 0x126524,%eax 10e613: 89 43 14 mov %eax,0x14(%ebx) 10e616: eb ba jmp 10e5d2 <_Watchdog_Insert+0x7a> * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 10e618: ff 75 f0 pushl -0x10(%ebp) 10e61b: 9d popf exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10e61c: 58 pop %eax 10e61d: 5b pop %ebx 10e61e: 5e pop %esi 10e61f: 5f pop %edi 10e620: c9 leave 10e621: c3 ret 10e622: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; 10e624: 89 3d 88 64 12 00 mov %edi,0x126488 goto restart; 10e62a: e9 5d ff ff ff jmp 10e58c <_Watchdog_Insert+0x34> =============================================================================== 0010e690 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10e690: 55 push %ebp 10e691: 89 e5 mov %esp,%ebp 10e693: 56 push %esi 10e694: 53 push %ebx 10e695: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10e698: 9c pushf 10e699: fa cli 10e69a: 59 pop %ecx previous_state = the_watchdog->state; 10e69b: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10e69e: 83 f8 01 cmp $0x1,%eax 10e6a1: 74 4d je 10e6f0 <_Watchdog_Remove+0x60> 10e6a3: 73 0f jae 10e6b4 <_Watchdog_Remove+0x24> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10e6a5: 8b 1d 24 65 12 00 mov 0x126524,%ebx 10e6ab: 89 5a 18 mov %ebx,0x18(%edx) _ISR_Enable( level ); 10e6ae: 51 push %ecx 10e6af: 9d popf return( previous_state ); } 10e6b0: 5b pop %ebx 10e6b1: 5e pop %esi 10e6b2: c9 leave 10e6b3: c3 ret Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 10e6b4: 83 f8 03 cmp $0x3,%eax 10e6b7: 77 ec ja 10e6a5 <_Watchdog_Remove+0x15> <== NEVER TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10e6b9: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } 10e6c0: 8b 1a mov (%edx),%ebx case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10e6c2: 8b 33 mov (%ebx),%esi 10e6c4: 85 f6 test %esi,%esi 10e6c6: 74 06 je 10e6ce <_Watchdog_Remove+0x3e> next_watchdog->delta_interval += the_watchdog->delta_interval; 10e6c8: 8b 72 10 mov 0x10(%edx),%esi 10e6cb: 01 73 10 add %esi,0x10(%ebx) if ( _Watchdog_Sync_count ) 10e6ce: 8b 35 20 65 12 00 mov 0x126520,%esi 10e6d4: 85 f6 test %esi,%esi 10e6d6: 74 0c je 10e6e4 <_Watchdog_Remove+0x54> _Watchdog_Sync_level = _ISR_Nest_level; 10e6d8: 8b 35 74 66 12 00 mov 0x126674,%esi 10e6de: 89 35 88 64 12 00 mov %esi,0x126488 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10e6e4: 8b 72 04 mov 0x4(%edx),%esi next->previous = previous; 10e6e7: 89 73 04 mov %esi,0x4(%ebx) previous->next = next; 10e6ea: 89 1e mov %ebx,(%esi) 10e6ec: eb b7 jmp 10e6a5 <_Watchdog_Remove+0x15> 10e6ee: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 10e6f0: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10e6f7: eb ac jmp 10e6a5 <_Watchdog_Remove+0x15> =============================================================================== 0010fb1c <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 10fb1c: 55 push %ebp 10fb1d: 89 e5 mov %esp,%ebp 10fb1f: 57 push %edi 10fb20: 56 push %esi 10fb21: 53 push %ebx 10fb22: 83 ec 2c sub $0x2c,%esp 10fb25: 8b 55 08 mov 0x8(%ebp),%edx 10fb28: 8b 45 0c mov 0xc(%ebp),%eax printk( 10fb2b: 8b 78 24 mov 0x24(%eax),%edi 10fb2e: 8b 70 20 mov 0x20(%eax),%esi 10fb31: 8b 58 1c mov 0x1c(%eax),%ebx 10fb34: 8b 48 0c mov 0xc(%eax),%ecx 10fb37: 89 4d d4 mov %ecx,-0x2c(%ebp) 10fb3a: 8b 48 10 mov 0x10(%eax),%ecx 10fb3d: 89 4d e4 mov %ecx,-0x1c(%ebp) 10fb40: 85 d2 test %edx,%edx 10fb42: 74 2c je 10fb70 <_Watchdog_Report+0x54> 10fb44: b9 c3 1a 12 00 mov $0x121ac3,%ecx 10fb49: 83 ec 0c sub $0xc,%esp 10fb4c: 57 push %edi 10fb4d: 56 push %esi 10fb4e: 53 push %ebx 10fb4f: 50 push %eax 10fb50: ff 75 d4 pushl -0x2c(%ebp) 10fb53: ff 75 e4 pushl -0x1c(%ebp) 10fb56: 51 push %ecx 10fb57: 52 push %edx 10fb58: 68 c6 24 12 00 push $0x1224c6 10fb5d: e8 b2 9e ff ff call 109a14 10fb62: 83 c4 30 add $0x30,%esp watch, watch->routine, watch->id, watch->user_data ); } 10fb65: 8d 65 f4 lea -0xc(%ebp),%esp 10fb68: 5b pop %ebx 10fb69: 5e pop %esi 10fb6a: 5f pop %edi 10fb6b: c9 leave 10fb6c: c3 ret 10fb6d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( 10fb70: b9 15 23 12 00 mov $0x122315,%ecx 10fb75: 89 ca mov %ecx,%edx 10fb77: eb d0 jmp 10fb49 <_Watchdog_Report+0x2d> =============================================================================== 0010faac <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10faac: 55 push %ebp 10faad: 89 e5 mov %esp,%ebp 10faaf: 57 push %edi 10fab0: 56 push %esi 10fab1: 53 push %ebx 10fab2: 83 ec 20 sub $0x20,%esp 10fab5: 8b 7d 08 mov 0x8(%ebp),%edi 10fab8: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10fabb: 9c pushf 10fabc: fa cli 10fabd: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10fac0: 56 push %esi 10fac1: 57 push %edi 10fac2: 68 90 24 12 00 push $0x122490 10fac7: e8 48 9f ff ff call 109a14 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10facc: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10face: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10fad1: 83 c4 10 add $0x10,%esp 10fad4: 39 f3 cmp %esi,%ebx 10fad6: 74 31 je 10fb09 <_Watchdog_Report_chain+0x5d> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10fad8: 83 ec 08 sub $0x8,%esp 10fadb: 53 push %ebx 10fadc: 6a 00 push $0x0 10fade: e8 39 00 00 00 call 10fb1c <_Watchdog_Report> _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; node != _Chain_Tail(header) ; node = node->next ) 10fae3: 8b 1b mov (%ebx),%ebx Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; 10fae5: 83 c4 10 add $0x10,%esp 10fae8: 39 f3 cmp %esi,%ebx 10faea: 75 ec jne 10fad8 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10faec: 83 ec 08 sub $0x8,%esp 10faef: 57 push %edi 10faf0: 68 a7 24 12 00 push $0x1224a7 10faf5: e8 1a 9f ff ff call 109a14 10fafa: 83 c4 10 add $0x10,%esp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 10fafd: ff 75 e4 pushl -0x1c(%ebp) 10fb00: 9d popf } 10fb01: 8d 65 f4 lea -0xc(%ebp),%esp 10fb04: 5b pop %ebx 10fb05: 5e pop %esi 10fb06: 5f pop %edi 10fb07: c9 leave 10fb08: c3 ret _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 10fb09: 83 ec 0c sub $0xc,%esp 10fb0c: 68 b6 24 12 00 push $0x1224b6 10fb11: e8 fe 9e ff ff call 109a14 10fb16: 83 c4 10 add $0x10,%esp 10fb19: eb e2 jmp 10fafd <_Watchdog_Report_chain+0x51> =============================================================================== 0010e6fc <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10e6fc: 55 push %ebp 10e6fd: 89 e5 mov %esp,%ebp 10e6ff: 57 push %edi 10e700: 56 push %esi 10e701: 53 push %ebx 10e702: 83 ec 1c sub $0x1c,%esp 10e705: 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 ); 10e708: 9c pushf 10e709: fa cli 10e70a: 5e pop %esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e70b: 8b 1f mov (%edi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e70d: 8d 47 04 lea 0x4(%edi),%eax 10e710: 89 45 e4 mov %eax,-0x1c(%ebp) if ( _Chain_Is_empty( header ) ) 10e713: 39 c3 cmp %eax,%ebx 10e715: 74 11 je 10e728 <_Watchdog_Tickle+0x2c> * 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) { 10e717: 8b 43 10 mov 0x10(%ebx),%eax 10e71a: 85 c0 test %eax,%eax 10e71c: 74 34 je 10e752 <_Watchdog_Tickle+0x56> the_watchdog->delta_interval--; 10e71e: 48 dec %eax 10e71f: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10e722: 85 c0 test %eax,%eax 10e724: 74 2c je 10e752 <_Watchdog_Tickle+0x56> 10e726: 66 90 xchg %ax,%ax the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 10e728: 56 push %esi 10e729: 9d popf } 10e72a: 8d 65 f4 lea -0xc(%ebp),%esp 10e72d: 5b pop %ebx 10e72e: 5e pop %esi 10e72f: 5f pop %edi 10e730: c9 leave 10e731: c3 ret _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10e732: 83 ec 08 sub $0x8,%esp 10e735: ff 73 24 pushl 0x24(%ebx) 10e738: ff 73 20 pushl 0x20(%ebx) 10e73b: ff 53 1c call *0x1c(%ebx) the_watchdog->id, the_watchdog->user_data ); break; 10e73e: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10e741: 9c pushf 10e742: fa cli 10e743: 5e pop %esi } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } 10e744: 8b 1f mov (%edi),%ebx _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10e746: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10e749: 74 dd je 10e728 <_Watchdog_Tickle+0x2c> } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && 10e74b: 8b 43 10 mov 0x10(%ebx),%eax 10e74e: 85 c0 test %eax,%eax 10e750: 75 d6 jne 10e728 <_Watchdog_Tickle+0x2c> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10e752: 83 ec 0c sub $0xc,%esp 10e755: 53 push %ebx 10e756: e8 35 ff ff ff call 10e690 <_Watchdog_Remove> _ISR_Enable( level ); 10e75b: 56 push %esi 10e75c: 9d popf switch( watchdog_state ) { 10e75d: 83 c4 10 add $0x10,%esp 10e760: 83 f8 02 cmp $0x2,%eax 10e763: 75 dc jne 10e741 <_Watchdog_Tickle+0x45> <== NEVER TAKEN 10e765: eb cb jmp 10e732 <_Watchdog_Tickle+0x36> =============================================================================== 0010e768 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 10e768: 55 push %ebp 10e769: 89 e5 mov %esp,%ebp 10e76b: 57 push %edi 10e76c: 53 push %ebx uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 10e76d: 8b 1d c0 22 12 00 mov 0x1222c0,%ebx uintptr_t size = Configuration.work_space_size; 10e773: 8b 15 c4 22 12 00 mov 0x1222c4,%edx if ( Configuration.do_zero_of_workspace ) 10e779: 80 3d e8 22 12 00 00 cmpb $0x0,0x1222e8 10e780: 75 1e jne 10e7a0 <_Workspace_Handler_initialization+0x38> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 10e782: 6a 04 push $0x4 10e784: 52 push %edx 10e785: 53 push %ebx 10e786: 68 00 64 12 00 push $0x126400 10e78b: e8 0c de ff ff call 10c59c <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 10e790: 83 c4 10 add $0x10,%esp 10e793: 85 c0 test %eax,%eax 10e795: 74 13 je 10e7aa <_Workspace_Handler_initialization+0x42> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 10e797: 8d 65 f8 lea -0x8(%ebp),%esp 10e79a: 5b pop %ebx 10e79b: 5f pop %edi 10e79c: c9 leave 10e79d: c3 ret 10e79e: 66 90 xchg %ax,%ax <== NOT EXECUTED uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace ) memset( starting_address, 0, size ); 10e7a0: 31 c0 xor %eax,%eax 10e7a2: 89 df mov %ebx,%edi 10e7a4: 89 d1 mov %edx,%ecx 10e7a6: f3 aa rep stos %al,%es:(%edi) 10e7a8: eb d8 jmp 10e782 <_Workspace_Handler_initialization+0x1a> size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 10e7aa: 50 push %eax 10e7ab: 6a 02 push $0x2 10e7ad: 6a 01 push $0x1 10e7af: 6a 00 push $0x0 10e7b1: e8 e2 e0 ff ff call 10c898 <_Internal_error_Occurred> =============================================================================== 00112588 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 112588: 55 push %ebp 112589: 89 e5 mov %esp,%ebp 11258b: 57 push %edi 11258c: 56 push %esi 11258d: 53 push %ebx 11258e: 83 ec 2c sub $0x2c,%esp 112591: 8b 5d 08 mov 0x8(%ebp),%ebx 112594: 8b 7d 0c mov 0xc(%ebp),%edi 112597: 8b 45 10 mov 0x10(%ebp),%eax 11259a: 8b 75 14 mov 0x14(%ebp),%esi Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 11259d: 85 db test %ebx,%ebx 11259f: 0f 84 87 00 00 00 je 11262c <== NEVER TAKEN return RTEMS_INVALID_NAME; if ( !id ) 1125a5: 85 f6 test %esi,%esi 1125a7: 0f 84 bf 00 00 00 je 11266c <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 1125ad: f7 c7 10 00 00 00 test $0x10,%edi 1125b3: 0f 84 83 00 00 00 je 11263c the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 1125b9: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) if ( maximum_waiters == 0 ) 1125c0: 85 c0 test %eax,%eax 1125c2: 0f 84 80 00 00 00 je 112648 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 1125c8: 89 45 e4 mov %eax,-0x1c(%ebp) 1125cb: a1 74 73 12 00 mov 0x127374,%eax 1125d0: 40 inc %eax 1125d1: a3 74 73 12 00 mov %eax,0x127374 * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void ) { return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information ); 1125d6: 83 ec 0c sub $0xc,%esp 1125d9: 68 40 76 12 00 push $0x127640 1125de: e8 e9 b7 ff ff call 10ddcc <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 1125e3: 83 c4 10 add $0x10,%esp 1125e6: 85 c0 test %eax,%eax 1125e8: 74 6e je 112658 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 1125ea: 89 78 10 mov %edi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 1125ed: 83 ec 08 sub $0x8,%esp 1125f0: 8d 55 e0 lea -0x20(%ebp),%edx 1125f3: 52 push %edx 1125f4: 8d 50 14 lea 0x14(%eax),%edx 1125f7: 52 push %edx 1125f8: 89 45 d4 mov %eax,-0x2c(%ebp) 1125fb: e8 b0 07 00 00 call 112db0 <_CORE_barrier_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 112600: 8b 45 d4 mov -0x2c(%ebp),%eax 112603: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 112606: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 112609: 8b 0d 5c 76 12 00 mov 0x12765c,%ecx 11260f: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 112612: 89 58 0c mov %ebx,0xc(%eax) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 112615: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 112617: e8 c4 c4 ff ff call 10eae0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11261c: 83 c4 10 add $0x10,%esp 11261f: 31 c0 xor %eax,%eax } 112621: 8d 65 f4 lea -0xc(%ebp),%esp 112624: 5b pop %ebx 112625: 5e pop %esi 112626: 5f pop %edi 112627: c9 leave 112628: c3 ret 112629: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 11262c: b8 03 00 00 00 mov $0x3,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112631: 8d 65 f4 lea -0xc(%ebp),%esp 112634: 5b pop %ebx 112635: 5e pop %esi 112636: 5f pop %edi 112637: c9 leave 112638: c3 ret 112639: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 11263c: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) 112643: eb 83 jmp 1125c8 112645: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; 112648: b8 0a 00 00 00 mov $0xa,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11264d: 8d 65 f4 lea -0xc(%ebp),%esp 112650: 5b pop %ebx 112651: 5e pop %esi 112652: 5f pop %edi 112653: c9 leave 112654: c3 ret 112655: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 112658: e8 83 c4 ff ff call 10eae0 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 11265d: b8 05 00 00 00 mov $0x5,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112662: 8d 65 f4 lea -0xc(%ebp),%esp 112665: 5b pop %ebx 112666: 5e pop %esi 112667: 5f pop %edi 112668: c9 leave 112669: c3 ret 11266a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 11266c: b8 09 00 00 00 mov $0x9,%eax 112671: eb ae jmp 112621 =============================================================================== 00112674 : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 112674: 55 push %ebp 112675: 89 e5 mov %esp,%ebp 112677: 53 push %ebx 112678: 83 ec 18 sub $0x18,%esp Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); 11267b: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) _Objects_Get( &_Barrier_Information, id, location ); 11267e: 50 push %eax 11267f: ff 75 08 pushl 0x8(%ebp) 112682: 68 40 76 12 00 push $0x127640 112687: e8 f0 bb ff ff call 10e27c <_Objects_Get> 11268c: 89 c3 mov %eax,%ebx switch ( location ) { 11268e: 83 c4 10 add $0x10,%esp 112691: 8b 4d f4 mov -0xc(%ebp),%ecx 112694: 85 c9 test %ecx,%ecx 112696: 75 38 jne 1126d0 case OBJECTS_LOCAL: _CORE_barrier_Flush( 112698: 52 push %edx 112699: 6a 02 push $0x2 11269b: 6a 00 push $0x0 11269d: 8d 40 14 lea 0x14(%eax),%eax 1126a0: 50 push %eax 1126a1: e8 5a cb ff ff call 10f200 <_Thread_queue_Flush> &the_barrier->Barrier, NULL, CORE_BARRIER_WAS_DELETED ); _Objects_Close( &_Barrier_Information, &the_barrier->Object ); 1126a6: 59 pop %ecx 1126a7: 58 pop %eax 1126a8: 53 push %ebx 1126a9: 68 40 76 12 00 push $0x127640 1126ae: e8 95 b7 ff ff call 10de48 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 1126b3: 58 pop %eax 1126b4: 5a pop %edx 1126b5: 53 push %ebx 1126b6: 68 40 76 12 00 push $0x127640 1126bb: e8 84 ba ff ff call 10e144 <_Objects_Free> _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 1126c0: e8 1b c4 ff ff call 10eae0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1126c5: 83 c4 10 add $0x10,%esp 1126c8: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1126ca: 8b 5d fc mov -0x4(%ebp),%ebx 1126cd: c9 leave 1126ce: c3 ret 1126cf: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1126d0: b8 04 00 00 00 mov $0x4,%eax } 1126d5: 8b 5d fc mov -0x4(%ebp),%ebx 1126d8: c9 leave 1126d9: c3 ret =============================================================================== 00112768 : rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout ) { 112768: 55 push %ebp 112769: 89 e5 mov %esp,%ebp 11276b: 53 push %ebx 11276c: 83 ec 18 sub $0x18,%esp 11276f: 8b 5d 08 mov 0x8(%ebp),%ebx Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); 112772: 8d 45 f4 lea -0xc(%ebp),%eax 112775: 50 push %eax 112776: 53 push %ebx 112777: 68 40 76 12 00 push $0x127640 11277c: e8 fb ba ff ff call 10e27c <_Objects_Get> switch ( location ) { 112781: 83 c4 10 add $0x10,%esp 112784: 8b 55 f4 mov -0xc(%ebp),%edx 112787: 85 d2 test %edx,%edx 112789: 75 35 jne 1127c0 case OBJECTS_LOCAL: _CORE_barrier_Wait( 11278b: 83 ec 0c sub $0xc,%esp 11278e: 6a 00 push $0x0 112790: ff 75 0c pushl 0xc(%ebp) 112793: 6a 01 push $0x1 112795: 53 push %ebx 112796: 83 c0 14 add $0x14,%eax 112799: 50 push %eax 11279a: e8 75 06 00 00 call 112e14 <_CORE_barrier_Wait> id, true, timeout, NULL ); _Thread_Enable_dispatch(); 11279f: 83 c4 20 add $0x20,%esp 1127a2: e8 39 c3 ff ff call 10eae0 <_Thread_Enable_dispatch> return _Barrier_Translate_core_barrier_return_code( 1127a7: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code ); 1127aa: a1 18 76 12 00 mov 0x127618,%eax true, timeout, NULL ); _Thread_Enable_dispatch(); return _Barrier_Translate_core_barrier_return_code( 1127af: ff 70 34 pushl 0x34(%eax) 1127b2: e8 29 10 00 00 call 1137e0 <_Barrier_Translate_core_barrier_return_code> 1127b7: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1127ba: 8b 5d fc mov -0x4(%ebp),%ebx 1127bd: c9 leave 1127be: c3 ret 1127bf: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1127c0: b8 04 00 00 00 mov $0x4,%eax } 1127c5: 8b 5d fc mov -0x4(%ebp),%ebx 1127c8: c9 leave 1127c9: c3 ret =============================================================================== 00115b68 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 115b68: 55 push %ebp 115b69: 89 e5 mov %esp,%ebp 115b6b: 53 push %ebx 115b6c: 83 ec 04 sub $0x4,%esp 115b6f: 8b 45 08 mov 0x8(%ebp),%eax 115b72: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !time_buffer ) 115b75: 85 db test %ebx,%ebx 115b77: 74 3b je 115bb4 return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 115b79: 85 c0 test %eax,%eax 115b7b: 74 2b je 115ba8 return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 115b7d: 83 f8 01 cmp $0x1,%eax 115b80: 74 3e je 115bc0 return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 115b82: 83 f8 02 cmp $0x2,%eax 115b85: 74 45 je 115bcc *interval = rtems_clock_get_ticks_since_boot(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 115b87: 83 f8 03 cmp $0x3,%eax 115b8a: 74 4c je 115bd8 *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 115b8c: 83 f8 04 cmp $0x4,%eax 115b8f: 74 0b je 115b9c return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; 115b91: b8 0a 00 00 00 mov $0xa,%eax } 115b96: 5a pop %edx 115b97: 5b pop %ebx 115b98: c9 leave 115b99: c3 ret 115b9a: 66 90 xchg %ax,%ax <== NOT EXECUTED *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 115b9c: 89 5d 08 mov %ebx,0x8(%ebp) return RTEMS_INVALID_NUMBER; } 115b9f: 59 pop %ecx 115ba0: 5b pop %ebx 115ba1: c9 leave *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 115ba2: e9 41 01 00 00 jmp 115ce8 115ba7: 90 nop <== NOT EXECUTED { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 115ba8: 89 5d 08 mov %ebx,0x8(%ebp) if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 115bab: 58 pop %eax 115bac: 5b pop %ebx 115bad: c9 leave { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 115bae: e9 81 00 00 00 jmp 115c34 115bb3: 90 nop <== NOT EXECUTED rtems_clock_get_options option, void *time_buffer ) { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 115bb4: b8 09 00 00 00 mov $0x9,%eax if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 115bb9: 5a pop %edx 115bba: 5b pop %ebx 115bbb: c9 leave 115bbc: c3 ret 115bbd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 115bc0: 89 5d 08 mov %ebx,0x8(%ebp) if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 115bc3: 5b pop %ebx 115bc4: 5b pop %ebx 115bc5: c9 leave if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 115bc6: e9 19 00 00 00 jmp 115be4 115bcb: 90 nop <== NOT EXECUTED if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 115bcc: e8 57 00 00 00 call 115c28 115bd1: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 115bd3: 31 c0 xor %eax,%eax 115bd5: eb bf jmp 115b96 115bd7: 90 nop <== NOT EXECUTED } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 115bd8: e8 37 00 00 00 call 115c14 115bdd: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 115bdf: 31 c0 xor %eax,%eax 115be1: eb b3 jmp 115b96 =============================================================================== 0010c06c : #include rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { 10c06c: 55 push %ebp 10c06d: 89 e5 mov %esp,%ebp 10c06f: 8b 45 08 mov 0x8(%ebp),%eax if ( !the_interval ) 10c072: 85 c0 test %eax,%eax 10c074: 74 1e je 10c094 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 10c076: 80 3d c8 15 13 00 00 cmpb $0x0,0x1315c8 10c07d: 74 0d je 10c08c return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); 10c07f: 8b 15 48 16 13 00 mov 0x131648,%edx 10c085: 89 10 mov %edx,(%eax) return RTEMS_SUCCESSFUL; 10c087: 31 c0 xor %eax,%eax } 10c089: c9 leave 10c08a: c3 ret 10c08b: 90 nop <== NOT EXECUTED { if ( !the_interval ) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 10c08c: b8 0b 00 00 00 mov $0xb,%eax *the_interval = _TOD_Seconds_since_epoch(); return RTEMS_SUCCESSFUL; } 10c091: c9 leave 10c092: c3 ret 10c093: 90 nop <== NOT EXECUTED rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { if ( !the_interval ) return RTEMS_INVALID_ADDRESS; 10c094: b8 09 00 00 00 mov $0x9,%eax if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); return RTEMS_SUCCESSFUL; } 10c099: c9 leave 10c09a: c3 ret =============================================================================== 00115ce8 : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 115ce8: 55 push %ebp 115ce9: 89 e5 mov %esp,%ebp 115ceb: 56 push %esi 115cec: 53 push %ebx 115ced: 83 ec 10 sub $0x10,%esp 115cf0: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !time ) 115cf3: 85 db test %ebx,%ebx 115cf5: 74 51 je 115d48 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 115cf7: 80 3d 88 07 14 00 00 cmpb $0x0,0x140788 115cfe: 75 0c jne 115d0c return RTEMS_NOT_DEFINED; 115d00: b8 0b 00 00 00 mov $0xb,%eax _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 115d05: 8d 65 f8 lea -0x8(%ebp),%esp 115d08: 5b pop %ebx 115d09: 5e pop %esi 115d0a: c9 leave 115d0b: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 115d0c: 9c pushf 115d0d: fa cli 115d0e: 5e pop %esi _TOD_Get( &now ); 115d0f: 83 ec 0c sub $0xc,%esp 115d12: 8d 45 f0 lea -0x10(%ebp),%eax 115d15: 50 push %eax 115d16: e8 b9 42 00 00 call 119fd4 <_TOD_Get> _ISR_Enable(level); 115d1b: 56 push %esi 115d1c: 9d popf useconds = (suseconds_t)now.tv_nsec; 115d1d: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 115d20: 8b 45 f0 mov -0x10(%ebp),%eax 115d23: 89 03 mov %eax,(%ebx) _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; 115d25: b8 d3 4d 62 10 mov $0x10624dd3,%eax 115d2a: f7 e9 imul %ecx 115d2c: 89 d0 mov %edx,%eax 115d2e: c1 f8 06 sar $0x6,%eax 115d31: c1 f9 1f sar $0x1f,%ecx 115d34: 29 c8 sub %ecx,%eax 115d36: 89 43 04 mov %eax,0x4(%ebx) if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; 115d39: 83 c4 10 add $0x10,%esp 115d3c: 31 c0 xor %eax,%eax } 115d3e: 8d 65 f8 lea -0x8(%ebp),%esp 115d41: 5b pop %ebx 115d42: 5e pop %esi 115d43: c9 leave 115d44: c3 ret 115d45: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { if ( !time ) return RTEMS_INVALID_ADDRESS; 115d48: b8 09 00 00 00 mov $0x9,%eax 115d4d: eb b6 jmp 115d05 =============================================================================== 0010b268 : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 10b268: 55 push %ebp 10b269: 89 e5 mov %esp,%ebp 10b26b: 83 ec 08 sub $0x8,%esp 10b26e: 8b 45 08 mov 0x8(%ebp),%eax if ( !uptime ) 10b271: 85 c0 test %eax,%eax 10b273: 74 13 je 10b288 return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 10b275: 83 ec 0c sub $0xc,%esp 10b278: 50 push %eax 10b279: e8 9e 15 00 00 call 10c81c <_TOD_Get_uptime_as_timespec> return RTEMS_SUCCESSFUL; 10b27e: 83 c4 10 add $0x10,%esp 10b281: 31 c0 xor %eax,%eax } 10b283: c9 leave 10b284: c3 ret 10b285: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime ) return RTEMS_INVALID_ADDRESS; 10b288: b8 09 00 00 00 mov $0x9,%eax _TOD_Get_uptime_as_timespec( uptime ); return RTEMS_SUCCESSFUL; } 10b28d: c9 leave 10b28e: c3 ret =============================================================================== 0010c18c : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 10c18c: 55 push %ebp 10c18d: 89 e5 mov %esp,%ebp 10c18f: 53 push %ebx 10c190: 83 ec 14 sub $0x14,%esp 10c193: 8b 5d 08 mov 0x8(%ebp),%ebx struct timespec newtime; if ( !time_buffer ) 10c196: 85 db test %ebx,%ebx 10c198: 74 66 je 10c200 return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 10c19a: 83 ec 0c sub $0xc,%esp 10c19d: 53 push %ebx 10c19e: e8 39 01 00 00 call 10c2dc <_TOD_Validate> 10c1a3: 83 c4 10 add $0x10,%esp 10c1a6: 84 c0 test %al,%al 10c1a8: 75 0a jne 10c1b4 _Thread_Disable_dispatch(); _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; 10c1aa: b8 14 00 00 00 mov $0x14,%eax } 10c1af: 8b 5d fc mov -0x4(%ebp),%ebx 10c1b2: c9 leave 10c1b3: c3 ret if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 10c1b4: 83 ec 0c sub $0xc,%esp 10c1b7: 53 push %ebx 10c1b8: e8 93 00 00 00 call 10c250 <_TOD_To_seconds> 10c1bd: 89 45 f0 mov %eax,-0x10(%ebp) newtime.tv_nsec = time_buffer->ticks * 10c1c0: 8b 43 18 mov 0x18(%ebx),%eax 10c1c3: 0f af 05 2c 56 12 00 imul 0x12562c,%eax 10c1ca: 8d 04 80 lea (%eax,%eax,4),%eax 10c1cd: 8d 04 80 lea (%eax,%eax,4),%eax 10c1d0: 8d 04 80 lea (%eax,%eax,4),%eax 10c1d3: c1 e0 03 shl $0x3,%eax 10c1d6: 89 45 f4 mov %eax,-0xc(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c1d9: a1 b4 15 13 00 mov 0x1315b4,%eax 10c1de: 40 inc %eax 10c1df: a3 b4 15 13 00 mov %eax,0x1315b4 rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 10c1e4: 8d 45 f0 lea -0x10(%ebp),%eax 10c1e7: 89 04 24 mov %eax,(%esp) 10c1ea: e8 81 18 00 00 call 10da70 <_TOD_Set> _Thread_Enable_dispatch(); 10c1ef: e8 94 2b 00 00 call 10ed88 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c1f4: 83 c4 10 add $0x10,%esp 10c1f7: 31 c0 xor %eax,%eax } return RTEMS_INVALID_CLOCK; } 10c1f9: 8b 5d fc mov -0x4(%ebp),%ebx 10c1fc: c9 leave 10c1fd: c3 ret 10c1fe: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { struct timespec newtime; if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 10c200: b8 09 00 00 00 mov $0x9,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10c205: 8b 5d fc mov -0x4(%ebp),%ebx 10c208: c9 leave 10c209: c3 ret =============================================================================== 0010b03c : * error code - if unsuccessful */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { 10b03c: 55 push %ebp 10b03d: 89 e5 mov %esp,%ebp 10b03f: 8b 45 08 mov 0x8(%ebp),%eax if ( !routine ) 10b042: 85 c0 test %eax,%eax 10b044: 74 0a je 10b050 return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; 10b046: a3 84 65 12 00 mov %eax,0x126584 return RTEMS_SUCCESSFUL; 10b04b: 31 c0 xor %eax,%eax } 10b04d: c9 leave 10b04e: c3 ret 10b04f: 90 nop <== NOT EXECUTED rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { if ( !routine ) return RTEMS_INVALID_ADDRESS; 10b050: b8 09 00 00 00 mov $0x9,%eax _Watchdog_Nanoseconds_since_tick_handler = routine; return RTEMS_SUCCESSFUL; } 10b055: c9 leave 10b056: c3 ret =============================================================================== 0010b058 : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { 10b058: 55 push %ebp 10b059: 89 e5 mov %esp,%ebp 10b05b: 83 ec 08 sub $0x8,%esp _TOD_Tickle_ticks(); 10b05e: e8 61 14 00 00 call 10c4c4 <_TOD_Tickle_ticks> */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); 10b063: 83 ec 0c sub $0xc,%esp 10b066: 68 a4 64 12 00 push $0x1264a4 10b06b: e8 8c 36 00 00 call 10e6fc <_Watchdog_Tickle> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 10b070: e8 23 31 00 00 call 10e198 <_Thread_Tickle_timeslice> * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void ) { return ( _Context_Switch_necessary ); 10b075: a0 84 66 12 00 mov 0x126684,%al if ( _Thread_Is_context_switch_necessary() && 10b07a: 83 c4 10 add $0x10,%esp 10b07d: 84 c0 test %al,%al 10b07f: 74 09 je 10b08a * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); 10b081: a1 d4 63 12 00 mov 0x1263d4,%eax 10b086: 85 c0 test %eax,%eax 10b088: 74 06 je 10b090 _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 10b08a: 31 c0 xor %eax,%eax 10b08c: c9 leave 10b08d: c3 ret 10b08e: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Tickle_timeslice(); if ( _Thread_Is_context_switch_necessary() && _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); 10b090: e8 2f 24 00 00 call 10d4c4 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; } 10b095: 31 c0 xor %eax,%eax 10b097: c9 leave 10b098: c3 ret =============================================================================== 0010b224 : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { 10b224: 55 push %ebp 10b225: 89 e5 mov %esp,%ebp 10b227: 53 push %ebx 10b228: 83 ec 1c sub $0x1c,%esp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); 10b22b: 8d 45 f4 lea -0xc(%ebp),%eax 10b22e: 50 push %eax 10b22f: ff 75 08 pushl 0x8(%ebp) 10b232: e8 29 24 00 00 call 10d660 <_Thread_Get> switch ( location ) { 10b237: 83 c4 10 add $0x10,%esp 10b23a: 8b 55 f4 mov -0xc(%ebp),%edx 10b23d: 85 d2 test %edx,%edx 10b23f: 75 2b jne 10b26c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 10b241: 8b 90 f0 00 00 00 mov 0xf0(%eax),%edx rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 10b247: 9c pushf 10b248: fa cli 10b249: 59 pop %ecx *the_event_set |= the_new_events; 10b24a: 8b 5d 0c mov 0xc(%ebp),%ebx 10b24d: 09 1a or %ebx,(%edx) _ISR_Enable( level ); 10b24f: 51 push %ecx 10b250: 9d popf _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 10b251: 83 ec 0c sub $0xc,%esp 10b254: 50 push %eax 10b255: e8 1e 00 00 00 call 10b278 <_Event_Surrender> _Thread_Enable_dispatch(); 10b25a: e8 dd 23 00 00 call 10d63c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b25f: 83 c4 10 add $0x10,%esp 10b262: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b264: 8b 5d fc mov -0x4(%ebp),%ebx 10b267: c9 leave 10b268: c3 ret 10b269: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b26c: b8 04 00 00 00 mov $0x4,%eax } 10b271: 8b 5d fc mov -0x4(%ebp),%ebx 10b274: c9 leave 10b275: c3 ret =============================================================================== 0010d1f8 : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { 10d1f8: 55 push %ebp 10d1f9: 89 e5 mov %esp,%ebp 10d1fb: 57 push %edi 10d1fc: 56 push %esi 10d1fd: 53 push %ebx 10d1fe: 83 ec 1c sub $0x1c,%esp 10d201: 8b 75 0c mov 0xc(%ebp),%esi 10d204: 8b 5d 10 mov 0x10(%ebp),%ebx Extension_Control *the_extension; if ( !id ) 10d207: 85 db test %ebx,%ebx 10d209: 0f 84 85 00 00 00 je 10d294 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10d20f: 8b 45 08 mov 0x8(%ebp),%eax 10d212: 85 c0 test %eax,%eax 10d214: 75 0e jne 10d224 return RTEMS_INVALID_NAME; 10d216: b8 03 00 00 00 mov $0x3,%eax ); *id = the_extension->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10d21b: 8d 65 f4 lea -0xc(%ebp),%esp 10d21e: 5b pop %ebx 10d21f: 5e pop %esi 10d220: 5f pop %edi 10d221: c9 leave 10d222: c3 ret 10d223: 90 nop <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d224: a1 b4 15 13 00 mov 0x1315b4,%eax 10d229: 40 inc %eax 10d22a: a3 b4 15 13 00 mov %eax,0x1315b4 #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 10d22f: 83 ec 0c sub $0xc,%esp 10d232: 68 20 18 13 00 push $0x131820 10d237: e8 6c 0d 00 00 call 10dfa8 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 10d23c: 83 c4 10 add $0x10,%esp 10d23f: 85 c0 test %eax,%eax 10d241: 74 45 je 10d288 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 10d243: 8d 78 24 lea 0x24(%eax),%edi 10d246: b9 08 00 00 00 mov $0x8,%ecx 10d24b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10d24d: 83 ec 0c sub $0xc,%esp _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } _User_extensions_Add_set_with_table( &the_extension->Extension, extension_table ); 10d250: 8d 50 10 lea 0x10(%eax),%edx 10d253: 52 push %edx 10d254: 89 45 e4 mov %eax,-0x1c(%ebp) 10d257: e8 e0 29 00 00 call 10fc3c <_User_extensions_Add_set> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10d25c: 8b 45 e4 mov -0x1c(%ebp),%eax 10d25f: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10d262: 0f b7 f2 movzwl %dx,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d265: 8b 0d 3c 18 13 00 mov 0x13183c,%ecx 10d26b: 89 04 b1 mov %eax,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10d26e: 8b 4d 08 mov 0x8(%ebp),%ecx 10d271: 89 48 0c mov %ecx,0xc(%eax) &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 10d274: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10d276: e8 0d 1b 00 00 call 10ed88 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d27b: 83 c4 10 add $0x10,%esp 10d27e: 31 c0 xor %eax,%eax } 10d280: 8d 65 f4 lea -0xc(%ebp),%esp 10d283: 5b pop %ebx 10d284: 5e pop %esi 10d285: 5f pop %edi 10d286: c9 leave 10d287: c3 ret _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { _Thread_Enable_dispatch(); 10d288: e8 fb 1a 00 00 call 10ed88 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10d28d: b8 05 00 00 00 mov $0x5,%eax 10d292: eb 87 jmp 10d21b ) { Extension_Control *the_extension; if ( !id ) return RTEMS_INVALID_ADDRESS; 10d294: b8 09 00 00 00 mov $0x9,%eax 10d299: eb 80 jmp 10d21b =============================================================================== 0010d07c : #include rtems_status_code rtems_extension_delete( rtems_id id ) { 10d07c: 55 push %ebp 10d07d: 89 e5 mov %esp,%ebp 10d07f: 53 push %ebx 10d080: 83 ec 18 sub $0x18,%esp Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); 10d083: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) _Objects_Get( &_Extension_Information, id, location ); 10d086: 50 push %eax 10d087: ff 75 08 pushl 0x8(%ebp) 10d08a: 68 20 04 13 00 push $0x130420 10d08f: e8 48 11 00 00 call 10e1dc <_Objects_Get> 10d094: 89 c3 mov %eax,%ebx switch ( location ) { 10d096: 83 c4 10 add $0x10,%esp 10d099: 8b 55 f4 mov -0xc(%ebp),%edx 10d09c: 85 d2 test %edx,%edx 10d09e: 75 38 jne 10d0d8 case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 10d0a0: 83 ec 0c sub $0xc,%esp 10d0a3: 8d 40 10 lea 0x10(%eax),%eax 10d0a6: 50 push %eax 10d0a7: e8 84 28 00 00 call 10f930 <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 10d0ac: 59 pop %ecx 10d0ad: 58 pop %eax 10d0ae: 53 push %ebx 10d0af: 68 20 04 13 00 push $0x130420 10d0b4: e8 ef 0c 00 00 call 10dda8 <_Objects_Close> RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 10d0b9: 58 pop %eax 10d0ba: 5a pop %edx 10d0bb: 53 push %ebx 10d0bc: 68 20 04 13 00 push $0x130420 10d0c1: e8 de 0f 00 00 call 10e0a4 <_Objects_Free> _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 10d0c6: e8 75 19 00 00 call 10ea40 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d0cb: 83 c4 10 add $0x10,%esp 10d0ce: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d0d0: 8b 5d fc mov -0x4(%ebp),%ebx 10d0d3: c9 leave 10d0d4: c3 ret 10d0d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d0d8: b8 04 00 00 00 mov $0x4,%eax } 10d0dd: 8b 5d fc mov -0x4(%ebp),%ebx 10d0e0: c9 leave 10d0e1: c3 ret =============================================================================== 00112134 : rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112134: 55 push %ebp 112135: 89 e5 mov %esp,%ebp 112137: 53 push %ebx 112138: 83 ec 04 sub $0x4,%esp 11213b: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 11213e: 39 05 20 67 12 00 cmp %eax,0x126720 112144: 76 1a jbe 112160 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; 112146: 8d 14 40 lea (%eax,%eax,2),%edx 112149: c1 e2 03 shl $0x3,%edx 11214c: 03 15 24 67 12 00 add 0x126724,%edx 112152: 8b 52 08 mov 0x8(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112155: 85 d2 test %edx,%edx 112157: 74 13 je 11216c } 112159: 59 pop %ecx 11215a: 5b pop %ebx 11215b: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11215c: ff e2 jmp *%edx 11215e: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 112160: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112165: 5a pop %edx 112166: 5b pop %ebx 112167: c9 leave 112168: c3 ret 112169: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11216c: 31 c0 xor %eax,%eax } 11216e: 5a pop %edx 11216f: 5b pop %ebx 112170: c9 leave 112171: c3 ret =============================================================================== 00112174 : rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112174: 55 push %ebp 112175: 89 e5 mov %esp,%ebp 112177: 53 push %ebx 112178: 83 ec 04 sub $0x4,%esp 11217b: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 11217e: 39 05 20 67 12 00 cmp %eax,0x126720 112184: 76 1a jbe 1121a0 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; 112186: 8d 14 40 lea (%eax,%eax,2),%edx 112189: c1 e2 03 shl $0x3,%edx 11218c: 03 15 24 67 12 00 add 0x126724,%edx 112192: 8b 52 14 mov 0x14(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112195: 85 d2 test %edx,%edx 112197: 74 13 je 1121ac } 112199: 59 pop %ecx 11219a: 5b pop %ebx 11219b: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11219c: ff e2 jmp *%edx 11219e: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 1121a0: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 1121a5: 5a pop %edx 1121a6: 5b pop %ebx 1121a7: c9 leave 1121a8: c3 ret 1121a9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 1121ac: 31 c0 xor %eax,%eax } 1121ae: 5a pop %edx 1121af: 5b pop %ebx 1121b0: c9 leave 1121b1: c3 ret =============================================================================== 00110440 : rtems_status_code rtems_io_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 110440: 55 push %ebp 110441: 89 e5 mov %esp,%ebp 110443: 53 push %ebx 110444: 83 ec 04 sub $0x4,%esp 110447: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 11044a: 39 05 20 67 12 00 cmp %eax,0x126720 110450: 76 1a jbe 11046c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; 110452: 8d 14 40 lea (%eax,%eax,2),%edx 110455: c1 e2 03 shl $0x3,%edx 110458: 03 15 24 67 12 00 add 0x126724,%edx 11045e: 8b 12 mov (%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 110460: 85 d2 test %edx,%edx 110462: 74 14 je 110478 } 110464: 59 pop %ecx 110465: 5b pop %ebx 110466: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 110467: ff e2 jmp *%edx 110469: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 11046c: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 110471: 5a pop %edx 110472: 5b pop %ebx 110473: c9 leave 110474: c3 ret 110475: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 110478: 31 c0 xor %eax,%eax } 11047a: 5a pop %edx 11047b: 5b pop %ebx 11047c: c9 leave 11047d: c3 ret =============================================================================== 001121b4 : rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 1121b4: 55 push %ebp 1121b5: 89 e5 mov %esp,%ebp 1121b7: 53 push %ebx 1121b8: 83 ec 04 sub $0x4,%esp 1121bb: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 1121be: 39 05 20 67 12 00 cmp %eax,0x126720 1121c4: 76 1a jbe 1121e0 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; 1121c6: 8d 14 40 lea (%eax,%eax,2),%edx 1121c9: c1 e2 03 shl $0x3,%edx 1121cc: 03 15 24 67 12 00 add 0x126724,%edx 1121d2: 8b 52 04 mov 0x4(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 1121d5: 85 d2 test %edx,%edx 1121d7: 74 13 je 1121ec } 1121d9: 59 pop %ecx 1121da: 5b pop %ebx 1121db: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 1121dc: ff e2 jmp *%edx 1121de: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 1121e0: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 1121e5: 5a pop %edx 1121e6: 5b pop %ebx 1121e7: c9 leave 1121e8: c3 ret 1121e9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 1121ec: 31 c0 xor %eax,%eax } 1121ee: 5a pop %edx 1121ef: 5b pop %ebx 1121f0: c9 leave 1121f1: c3 ret =============================================================================== 001121f4 : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 1121f4: 55 push %ebp 1121f5: 89 e5 mov %esp,%ebp 1121f7: 53 push %ebx 1121f8: 83 ec 04 sub $0x4,%esp 1121fb: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 1121fe: 39 05 20 67 12 00 cmp %eax,0x126720 112204: 76 1a jbe 112220 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; 112206: 8d 14 40 lea (%eax,%eax,2),%edx 112209: c1 e2 03 shl $0x3,%edx 11220c: 03 15 24 67 12 00 add 0x126724,%edx 112212: 8b 52 0c mov 0xc(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112215: 85 d2 test %edx,%edx 112217: 74 13 je 11222c } 112219: 59 pop %ecx 11221a: 5b pop %ebx 11221b: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11221c: ff e2 jmp *%edx 11221e: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 112220: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112225: 5a pop %edx 112226: 5b pop %ebx 112227: c9 leave 112228: c3 ret 112229: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11222c: 31 c0 xor %eax,%eax } 11222e: 5a pop %edx 11222f: 5b pop %ebx 112230: c9 leave 112231: c3 ret =============================================================================== 0010cf34 : 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 ) { 10cf34: 55 push %ebp 10cf35: 89 e5 mov %esp,%ebp 10cf37: 57 push %edi 10cf38: 56 push %esi 10cf39: 53 push %ebx 10cf3a: 83 ec 0c sub $0xc,%esp 10cf3d: 8b 5d 08 mov 0x8(%ebp),%ebx 10cf40: 8b 75 0c mov 0xc(%ebp),%esi 10cf43: 8b 55 10 mov 0x10(%ebp),%edx rtems_device_major_number major_limit = _IO_Number_of_drivers; 10cf46: a1 60 97 12 00 mov 0x129760,%eax if ( rtems_interrupt_is_in_progress() ) 10cf4b: 8b 0d b4 96 12 00 mov 0x1296b4,%ecx 10cf51: 85 c9 test %ecx,%ecx 10cf53: 0f 85 ab 00 00 00 jne 10d004 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 10cf59: 85 d2 test %edx,%edx 10cf5b: 0f 84 e7 00 00 00 je 10d048 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 10cf61: 89 02 mov %eax,(%edx) if ( driver_table == NULL ) 10cf63: 85 f6 test %esi,%esi 10cf65: 0f 84 dd 00 00 00 je 10d048 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cf6b: 8b 3e mov (%esi),%edi 10cf6d: 85 ff test %edi,%edi 10cf6f: 0f 84 c7 00 00 00 je 10d03c return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10cf75: 39 d8 cmp %ebx,%eax 10cf77: 76 7b jbe 10cff4 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10cf79: a1 14 94 12 00 mov 0x129414,%eax 10cf7e: 40 inc %eax 10cf7f: a3 14 94 12 00 mov %eax,0x129414 return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 10cf84: 85 db test %ebx,%ebx 10cf86: 0f 85 88 00 00 00 jne 10d014 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 10cf8c: 8b 0d 60 97 12 00 mov 0x129760,%ecx rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 10cf92: 85 c9 test %ecx,%ecx 10cf94: 0f 84 bb 00 00 00 je 10d055 <== NEVER TAKEN 10cf9a: 8b 3d 64 97 12 00 mov 0x129764,%edi 10cfa0: 89 f8 mov %edi,%eax 10cfa2: eb 08 jmp 10cfac 10cfa4: 43 inc %ebx 10cfa5: 83 c0 18 add $0x18,%eax 10cfa8: 39 d9 cmp %ebx,%ecx 10cfaa: 76 0b jbe 10cfb7 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cfac: 83 38 00 cmpl $0x0,(%eax) 10cfaf: 75 f3 jne 10cfa4 10cfb1: 83 78 04 00 cmpl $0x0,0x4(%eax) 10cfb5: 75 ed jne 10cfa4 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10cfb7: 89 1a mov %ebx,(%edx) if ( m != n ) 10cfb9: 39 d9 cmp %ebx,%ecx 10cfbb: 0f 84 9b 00 00 00 je 10d05c 10cfc1: 8d 04 5b lea (%ebx,%ebx,2),%eax 10cfc4: c1 e0 03 shl $0x3,%eax } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 10cfc7: 01 c7 add %eax,%edi 10cfc9: b9 06 00 00 00 mov $0x6,%ecx 10cfce: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10cfd0: e8 77 19 00 00 call 10e94c <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 10cfd5: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10cfdc: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10cfe3: 89 5d 08 mov %ebx,0x8(%ebp) } 10cfe6: 83 c4 0c add $0xc,%esp 10cfe9: 5b pop %ebx 10cfea: 5e pop %esi 10cfeb: 5f pop %edi 10cfec: c9 leave _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10cfed: e9 ee 71 00 00 jmp 1141e0 10cff2: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; 10cff4: b8 0a 00 00 00 mov $0xa,%eax _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 10cff9: 83 c4 0c add $0xc,%esp 10cffc: 5b pop %ebx 10cffd: 5e pop %esi 10cffe: 5f pop %edi 10cfff: c9 leave 10d000: c3 ret 10d001: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; 10d004: b8 12 00 00 00 mov $0x12,%eax _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 10d009: 83 c4 0c add $0xc,%esp 10d00c: 5b pop %ebx 10d00d: 5e pop %esi 10d00e: 5f pop %edi 10d00f: c9 leave 10d010: c3 ret 10d011: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 10d014: 8d 04 5b lea (%ebx,%ebx,2),%eax 10d017: c1 e0 03 shl $0x3,%eax 10d01a: 8b 0d 64 97 12 00 mov 0x129764,%ecx 10d020: 01 c1 add %eax,%ecx static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d022: 8b 39 mov (%ecx),%edi 10d024: 85 ff test %edi,%edi 10d026: 74 40 je 10d068 major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); 10d028: e8 1f 19 00 00 call 10e94c <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 10d02d: b8 0c 00 00 00 mov $0xc,%eax _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 10d032: 83 c4 0c add $0xc,%esp 10d035: 5b pop %ebx 10d036: 5e pop %esi 10d037: 5f pop %edi 10d038: c9 leave 10d039: c3 ret 10d03a: 66 90 xchg %ax,%ax <== NOT EXECUTED static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d03c: 8b 4e 04 mov 0x4(%esi),%ecx 10d03f: 85 c9 test %ecx,%ecx 10d041: 0f 85 2e ff ff ff jne 10cf75 10d047: 90 nop if ( driver_table == NULL ) return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; 10d048: b8 09 00 00 00 mov $0x9,%eax _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 10d04d: 83 c4 0c add $0xc,%esp 10d050: 5b pop %ebx 10d051: 5e pop %esi 10d052: 5f pop %edi 10d053: c9 leave 10d054: c3 ret if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10d055: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED 10d05b: 90 nop <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 10d05c: e8 eb 18 00 00 call 10e94c <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; 10d061: b8 05 00 00 00 mov $0x5,%eax if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); return sc; 10d066: eb 91 jmp 10cff9 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d068: 8b 49 04 mov 0x4(%ecx),%ecx 10d06b: 85 c9 test %ecx,%ecx 10d06d: 75 b9 jne 10d028 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 10d06f: 89 1a mov %ebx,(%edx) 10d071: 8b 3d 64 97 12 00 mov 0x129764,%edi 10d077: e9 4b ff ff ff jmp 10cfc7 =============================================================================== 0010d07c : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 10d07c: 55 push %ebp 10d07d: 89 e5 mov %esp,%ebp 10d07f: 57 push %edi 10d080: 83 ec 04 sub $0x4,%esp 10d083: 8b 45 08 mov 0x8(%ebp),%eax if ( rtems_interrupt_is_in_progress() ) 10d086: 8b 0d b4 96 12 00 mov 0x1296b4,%ecx 10d08c: 85 c9 test %ecx,%ecx 10d08e: 75 44 jne 10d0d4 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 10d090: 39 05 60 97 12 00 cmp %eax,0x129760 10d096: 77 0c ja 10d0a4 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; 10d098: b8 0d 00 00 00 mov $0xd,%eax } 10d09d: 5a pop %edx 10d09e: 5f pop %edi 10d09f: c9 leave 10d0a0: c3 ret 10d0a1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10d0a4: 8b 15 14 94 12 00 mov 0x129414,%edx 10d0aa: 42 inc %edx 10d0ab: 89 15 14 94 12 00 mov %edx,0x129414 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( &_IO_Driver_address_table[major], 10d0b1: 8d 14 40 lea (%eax,%eax,2),%edx 10d0b4: c1 e2 03 shl $0x3,%edx if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( 10d0b7: 03 15 64 97 12 00 add 0x129764,%edx 10d0bd: b9 18 00 00 00 mov $0x18,%ecx 10d0c2: 31 c0 xor %eax,%eax 10d0c4: 89 d7 mov %edx,%edi 10d0c6: f3 aa rep stos %al,%es:(%edi) &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 10d0c8: e8 7f 18 00 00 call 10e94c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d0cd: 31 c0 xor %eax,%eax } return RTEMS_UNSATISFIED; } 10d0cf: 5a pop %edx 10d0d0: 5f pop %edi 10d0d1: c9 leave 10d0d2: c3 ret 10d0d3: 90 nop <== NOT EXECUTED rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; 10d0d4: b8 12 00 00 00 mov $0x12,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d0d9: 5a pop %edx 10d0da: 5f pop %edi 10d0db: c9 leave 10d0dc: c3 ret =============================================================================== 00112234 : rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112234: 55 push %ebp 112235: 89 e5 mov %esp,%ebp 112237: 53 push %ebx 112238: 83 ec 04 sub $0x4,%esp 11223b: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 11223e: 39 05 20 67 12 00 cmp %eax,0x126720 112244: 76 1a jbe 112260 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; 112246: 8d 14 40 lea (%eax,%eax,2),%edx 112249: c1 e2 03 shl $0x3,%edx 11224c: 03 15 24 67 12 00 add 0x126724,%edx 112252: 8b 52 10 mov 0x10(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112255: 85 d2 test %edx,%edx 112257: 74 13 je 11226c } 112259: 59 pop %ecx 11225a: 5b pop %ebx 11225b: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11225c: ff e2 jmp *%edx 11225e: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 112260: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112265: 5a pop %edx 112266: 5b pop %ebx 112267: c9 leave 112268: c3 ret 112269: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11226c: 31 c0 xor %eax,%eax } 11226e: 5a pop %edx 11226f: 5b pop %ebx 112270: c9 leave 112271: c3 ret =============================================================================== 0010df40 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10df40: 55 push %ebp 10df41: 89 e5 mov %esp,%ebp 10df43: 57 push %edi 10df44: 56 push %esi 10df45: 53 push %ebx 10df46: 83 ec 1c sub $0x1c,%esp 10df49: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10df4c: 85 ff test %edi,%edi 10df4e: 74 4d je 10df9d <== NEVER TAKEN 10df50: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 10df57: 8b 55 e4 mov -0x1c(%ebp),%edx 10df5a: 8b 04 95 8c 15 13 00 mov 0x13158c(,%edx,4),%eax 10df61: 85 c0 test %eax,%eax 10df63: 74 2f je 10df94 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10df65: 8b 70 04 mov 0x4(%eax),%esi if ( !information ) 10df68: 85 f6 test %esi,%esi 10df6a: 74 28 je 10df94 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10df6c: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 10df71: 74 21 je 10df94 <== NEVER TAKEN 10df73: bb 01 00 00 00 mov $0x1,%ebx the_thread = (Thread_Control *)information->local_table[ i ]; 10df78: 8b 46 1c mov 0x1c(%esi),%eax 10df7b: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !the_thread ) 10df7e: 85 c0 test %eax,%eax 10df80: 74 09 je 10df8b <== NEVER TAKEN continue; (*routine)(the_thread); 10df82: 83 ec 0c sub $0xc,%esp 10df85: 50 push %eax 10df86: ff d7 call *%edi 10df88: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10df8b: 43 inc %ebx 10df8c: 0f b7 46 10 movzwl 0x10(%esi),%eax 10df90: 39 d8 cmp %ebx,%eax 10df92: 73 e4 jae 10df78 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10df94: ff 45 e4 incl -0x1c(%ebp) 10df97: 83 7d e4 04 cmpl $0x4,-0x1c(%ebp) 10df9b: 75 ba jne 10df57 (*routine)(the_thread); } } } 10df9d: 8d 65 f4 lea -0xc(%ebp),%esp 10dfa0: 5b pop %ebx 10dfa1: 5e pop %esi 10dfa2: 5f pop %edi 10dfa3: c9 leave 10dfa4: c3 ret =============================================================================== 001164c4 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 1164c4: 55 push %ebp 1164c5: 89 e5 mov %esp,%ebp 1164c7: 57 push %edi 1164c8: 56 push %esi 1164c9: 53 push %ebx 1164ca: 83 ec 1c sub $0x1c,%esp 1164cd: 8b 7d 08 mov 0x8(%ebp),%edi 1164d0: 8b 5d 0c mov 0xc(%ebp),%ebx 1164d3: 8b 75 14 mov 0x14(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer ) 1164d6: 85 db test %ebx,%ebx 1164d8: 74 62 je 11653c return RTEMS_INVALID_ADDRESS; if ( !count ) 1164da: 85 f6 test %esi,%esi 1164dc: 74 5e je 11653c Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 1164de: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 1164df: 8d 45 e4 lea -0x1c(%ebp),%eax 1164e2: 50 push %eax 1164e3: 57 push %edi 1164e4: 68 40 0a 14 00 push $0x140a40 1164e9: e8 6e 4d 00 00 call 11b25c <_Objects_Get> switch ( location ) { 1164ee: 83 c4 10 add $0x10,%esp 1164f1: 8b 55 e4 mov -0x1c(%ebp),%edx 1164f4: 85 d2 test %edx,%edx 1164f6: 74 10 je 116508 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1164f8: b8 04 00 00 00 mov $0x4,%eax } 1164fd: 8d 65 f4 lea -0xc(%ebp),%esp 116500: 5b pop %ebx 116501: 5e pop %esi 116502: 5f pop %edi 116503: c9 leave 116504: c3 ret 116505: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( 116508: 83 ec 08 sub $0x8,%esp 11650b: 56 push %esi 11650c: 6a 00 push $0x0 11650e: 57 push %edi 11650f: ff 75 10 pushl 0x10(%ebp) 116512: 53 push %ebx 116513: 83 c0 14 add $0x14,%eax 116516: 50 push %eax 116517: e8 50 34 00 00 call 11996c <_CORE_message_queue_Broadcast> 11651c: 89 c3 mov %eax,%ebx NULL, #endif count ); _Thread_Enable_dispatch(); 11651e: 83 c4 20 add $0x20,%esp 116521: e8 9a 55 00 00 call 11bac0 <_Thread_Enable_dispatch> return 116526: 83 ec 0c sub $0xc,%esp 116529: 53 push %ebx 11652a: e8 69 03 00 00 call 116898 <_Message_queue_Translate_core_message_queue_return_code> 11652f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116532: 8d 65 f4 lea -0xc(%ebp),%esp 116535: 5b pop %ebx 116536: 5e pop %esi 116537: 5f pop %edi 116538: c9 leave 116539: c3 ret 11653a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !buffer ) return RTEMS_INVALID_ADDRESS; if ( !count ) return RTEMS_INVALID_ADDRESS; 11653c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116541: 8d 65 f4 lea -0xc(%ebp),%esp 116544: 5b pop %ebx 116545: 5e pop %esi 116546: 5f pop %edi 116547: c9 leave 116548: c3 ret =============================================================================== 001138d4 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { 1138d4: 55 push %ebp 1138d5: 89 e5 mov %esp,%ebp 1138d7: 57 push %edi 1138d8: 56 push %esi 1138d9: 53 push %ebx 1138da: 83 ec 2c sub $0x2c,%esp 1138dd: 8b 5d 08 mov 0x8(%ebp),%ebx 1138e0: 8b 75 0c mov 0xc(%ebp),%esi 1138e3: 8b 4d 10 mov 0x10(%ebp),%ecx 1138e6: 8b 7d 18 mov 0x18(%ebp),%edi CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) 1138e9: 85 db test %ebx,%ebx 1138eb: 74 2f je 11391c return RTEMS_INVALID_NAME; if ( !id ) 1138ed: 85 ff test %edi,%edi 1138ef: 0f 84 a3 00 00 00 je 113998 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 1138f5: 85 f6 test %esi,%esi 1138f7: 74 13 je 11390c return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 1138f9: 85 c9 test %ecx,%ecx 1138fb: 75 2f jne 11392c return RTEMS_INVALID_SIZE; 1138fd: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113902: 8d 65 f4 lea -0xc(%ebp),%esp 113905: 5b pop %ebx 113906: 5e pop %esi 113907: 5f pop %edi 113908: c9 leave 113909: c3 ret 11390a: 66 90 xchg %ax,%ax <== NOT EXECUTED !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) return RTEMS_INVALID_NUMBER; 11390c: b8 0a 00 00 00 mov $0xa,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113911: 8d 65 f4 lea -0xc(%ebp),%esp 113914: 5b pop %ebx 113915: 5e pop %esi 113916: 5f pop %edi 113917: c9 leave 113918: c3 ret 113919: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 11391c: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113921: 8d 65 f4 lea -0xc(%ebp),%esp 113924: 5b pop %ebx 113925: 5e pop %esi 113926: 5f pop %edi 113927: c9 leave 113928: c3 ret 113929: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 11392c: a1 54 fa 12 00 mov 0x12fa54,%eax 113931: 40 inc %eax 113932: a3 54 fa 12 00 mov %eax,0x12fa54 #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 113937: 89 4d d4 mov %ecx,-0x2c(%ebp) 11393a: e8 19 53 00 00 call 118c58 <_Message_queue_Allocate> 11393f: 89 c2 mov %eax,%edx if ( !the_message_queue ) { 113941: 85 c0 test %eax,%eax 113943: 8b 4d d4 mov -0x2c(%ebp),%ecx 113946: 74 7c je 1139c4 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 113948: 8b 45 14 mov 0x14(%ebp),%eax 11394b: 89 42 10 mov %eax,0x10(%edx) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 11394e: a8 04 test $0x4,%al 113950: 0f 95 c0 setne %al 113953: 0f b6 c0 movzbl %al,%eax 113956: 89 45 e4 mov %eax,-0x1c(%ebp) else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 113959: 51 push %ecx 11395a: 56 push %esi 11395b: 8d 45 e4 lea -0x1c(%ebp),%eax 11395e: 50 push %eax 11395f: 8d 42 14 lea 0x14(%edx),%eax 113962: 50 push %eax 113963: 89 55 d4 mov %edx,-0x2c(%ebp) 113966: e8 dd 10 00 00 call 114a48 <_CORE_message_queue_Initialize> 11396b: 83 c4 10 add $0x10,%esp 11396e: 84 c0 test %al,%al 113970: 8b 55 d4 mov -0x2c(%ebp),%edx 113973: 75 2f jne 1139a4 */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 113975: 83 ec 08 sub $0x8,%esp 113978: 52 push %edx 113979: 68 20 fd 12 00 push $0x12fd20 11397e: e8 75 1e 00 00 call 1157f8 <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 113983: e8 8c 28 00 00 call 116214 <_Thread_Enable_dispatch> return RTEMS_UNSATISFIED; 113988: 83 c4 10 add $0x10,%esp 11398b: b8 0d 00 00 00 mov $0xd,%eax 113990: e9 6d ff ff ff jmp 113902 113995: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 113998: b8 09 00 00 00 mov $0x9,%eax 11399d: e9 60 ff ff ff jmp 113902 1139a2: 66 90 xchg %ax,%ax <== NOT EXECUTED Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 1139a4: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 1139a7: 0f b7 f0 movzwl %ax,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1139aa: 8b 0d 3c fd 12 00 mov 0x12fd3c,%ecx 1139b0: 89 14 b1 mov %edx,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1139b3: 89 5a 0c mov %ebx,0xc(%edx) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 1139b6: 89 07 mov %eax,(%edi) name, 0 ); #endif _Thread_Enable_dispatch(); 1139b8: e8 57 28 00 00 call 116214 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1139bd: 31 c0 xor %eax,%eax 1139bf: e9 3e ff ff ff jmp 113902 _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); if ( !the_message_queue ) { _Thread_Enable_dispatch(); 1139c4: e8 4b 28 00 00 call 116214 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 1139c9: b8 05 00 00 00 mov $0x5,%eax 1139ce: e9 2f ff ff ff jmp 113902 =============================================================================== 0011664c : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 11664c: 55 push %ebp 11664d: 89 e5 mov %esp,%ebp 11664f: 53 push %ebx 116650: 83 ec 18 sub $0x18,%esp register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); 116653: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 116656: 50 push %eax 116657: ff 75 08 pushl 0x8(%ebp) 11665a: 68 40 0a 14 00 push $0x140a40 11665f: e8 f8 4b 00 00 call 11b25c <_Objects_Get> 116664: 89 c3 mov %eax,%ebx switch ( location ) { 116666: 83 c4 10 add $0x10,%esp 116669: 8b 4d f4 mov -0xc(%ebp),%ecx 11666c: 85 c9 test %ecx,%ecx 11666e: 75 3c jne 1166ac case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 116670: 83 ec 08 sub $0x8,%esp 116673: 50 push %eax 116674: 68 40 0a 14 00 push $0x140a40 116679: e8 6e 47 00 00 call 11adec <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 11667e: 83 c4 0c add $0xc,%esp 116681: 6a 05 push $0x5 116683: 6a 00 push $0x0 116685: 8d 43 14 lea 0x14(%ebx),%eax 116688: 50 push %eax 116689: e8 62 33 00 00 call 1199f0 <_CORE_message_queue_Close> */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 11668e: 58 pop %eax 11668f: 5a pop %edx 116690: 53 push %ebx 116691: 68 40 0a 14 00 push $0x140a40 116696: e8 4d 4a 00 00 call 11b0e8 <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 11669b: e8 20 54 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1166a0: 83 c4 10 add $0x10,%esp 1166a3: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1166a5: 8b 5d fc mov -0x4(%ebp),%ebx 1166a8: c9 leave 1166a9: c3 ret 1166aa: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1166ac: b8 04 00 00 00 mov $0x4,%eax } 1166b1: 8b 5d fc mov -0x4(%ebp),%ebx 1166b4: c9 leave 1166b5: c3 ret =============================================================================== 001166b8 : rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { 1166b8: 55 push %ebp 1166b9: 89 e5 mov %esp,%ebp 1166bb: 53 push %ebx 1166bc: 83 ec 14 sub $0x14,%esp 1166bf: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 1166c2: 85 db test %ebx,%ebx 1166c4: 74 46 je 11670c Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 1166c6: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 1166c7: 8d 45 f4 lea -0xc(%ebp),%eax 1166ca: 50 push %eax 1166cb: ff 75 08 pushl 0x8(%ebp) 1166ce: 68 40 0a 14 00 push $0x140a40 1166d3: e8 84 4b 00 00 call 11b25c <_Objects_Get> switch ( location ) { 1166d8: 83 c4 10 add $0x10,%esp 1166db: 8b 55 f4 mov -0xc(%ebp),%edx 1166de: 85 d2 test %edx,%edx 1166e0: 74 0a je 1166ec case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1166e2: b8 04 00 00 00 mov $0x4,%eax } 1166e7: 8b 5d fc mov -0x4(%ebp),%ebx 1166ea: c9 leave 1166eb: c3 ret the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *count = _CORE_message_queue_Flush( &the_message_queue->message_queue ); 1166ec: 83 ec 0c sub $0xc,%esp 1166ef: 83 c0 14 add $0x14,%eax 1166f2: 50 push %eax 1166f3: e8 34 33 00 00 call 119a2c <_CORE_message_queue_Flush> 1166f8: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 1166fa: e8 c1 53 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1166ff: 83 c4 10 add $0x10,%esp 116702: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116704: 8b 5d fc mov -0x4(%ebp),%ebx 116707: c9 leave 116708: c3 ret 116709: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) return RTEMS_INVALID_ADDRESS; 11670c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116711: 8b 5d fc mov -0x4(%ebp),%ebx 116714: c9 leave 116715: c3 ret =============================================================================== 00116718 : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { 116718: 55 push %ebp 116719: 89 e5 mov %esp,%ebp 11671b: 53 push %ebx 11671c: 83 ec 14 sub $0x14,%esp 11671f: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116722: 85 db test %ebx,%ebx 116724: 74 3a je 116760 116726: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 116727: 8d 45 f4 lea -0xc(%ebp),%eax 11672a: 50 push %eax 11672b: ff 75 08 pushl 0x8(%ebp) 11672e: 68 40 0a 14 00 push $0x140a40 116733: e8 24 4b 00 00 call 11b25c <_Objects_Get> switch ( location ) { 116738: 83 c4 10 add $0x10,%esp 11673b: 8b 55 f4 mov -0xc(%ebp),%edx 11673e: 85 d2 test %edx,%edx 116740: 74 0a je 11674c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116742: b8 04 00 00 00 mov $0x4,%eax } 116747: 8b 5d fc mov -0x4(%ebp),%ebx 11674a: c9 leave 11674b: c3 ret the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages; 11674c: 8b 40 5c mov 0x5c(%eax),%eax 11674f: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 116751: e8 6a 53 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116756: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116758: 8b 5d fc mov -0x4(%ebp),%ebx 11675b: c9 leave 11675c: c3 ret 11675d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) return RTEMS_INVALID_ADDRESS; 116760: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116765: 8b 5d fc mov -0x4(%ebp),%ebx 116768: c9 leave 116769: c3 ret =============================================================================== 001139f8 : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 1139f8: 55 push %ebp 1139f9: 89 e5 mov %esp,%ebp 1139fb: 56 push %esi 1139fc: 53 push %ebx 1139fd: 83 ec 10 sub $0x10,%esp 113a00: 8b 5d 0c mov 0xc(%ebp),%ebx 113a03: 8b 75 10 mov 0x10(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 113a06: 85 db test %ebx,%ebx 113a08: 74 6e je 113a78 return RTEMS_INVALID_ADDRESS; if ( !size ) 113a0a: 85 f6 test %esi,%esi 113a0c: 74 6a je 113a78 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 113a0e: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 113a0f: 8d 45 f4 lea -0xc(%ebp),%eax 113a12: 50 push %eax 113a13: ff 75 08 pushl 0x8(%ebp) 113a16: 68 20 fd 12 00 push $0x12fd20 113a1b: e8 10 1f 00 00 call 115930 <_Objects_Get> switch ( location ) { 113a20: 83 c4 10 add $0x10,%esp 113a23: 8b 55 f4 mov -0xc(%ebp),%edx 113a26: 85 d2 test %edx,%edx 113a28: 75 42 jne 113a6c if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 113a2a: 83 ec 08 sub $0x8,%esp 113a2d: ff 75 18 pushl 0x18(%ebp) */ RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait ( rtems_option option_set ) { return (option_set & RTEMS_NO_WAIT) ? true : false; 113a30: 8b 55 14 mov 0x14(%ebp),%edx 113a33: 83 e2 01 and $0x1,%edx 113a36: 83 f2 01 xor $0x1,%edx 113a39: 52 push %edx 113a3a: 56 push %esi 113a3b: 53 push %ebx 113a3c: ff 70 08 pushl 0x8(%eax) 113a3f: 83 c0 14 add $0x14,%eax 113a42: 50 push %eax 113a43: e8 a0 10 00 00 call 114ae8 <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 113a48: 83 c4 20 add $0x20,%esp 113a4b: e8 c4 27 00 00 call 116214 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 113a50: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code 113a53: a1 f8 fc 12 00 mov 0x12fcf8,%eax size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 113a58: ff 70 34 pushl 0x34(%eax) 113a5b: e8 a0 00 00 00 call 113b00 <_Message_queue_Translate_core_message_queue_return_code> 113a60: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113a63: 8d 65 f8 lea -0x8(%ebp),%esp 113a66: 5b pop %ebx 113a67: 5e pop %esi 113a68: c9 leave 113a69: c3 ret 113a6a: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 113a6c: b8 04 00 00 00 mov $0x4,%eax } 113a71: 8d 65 f8 lea -0x8(%ebp),%esp 113a74: 5b pop %ebx 113a75: 5e pop %esi 113a76: c9 leave 113a77: c3 ret if ( !buffer ) return RTEMS_INVALID_ADDRESS; if ( !size ) return RTEMS_INVALID_ADDRESS; 113a78: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113a7d: 8d 65 f8 lea -0x8(%ebp),%esp 113a80: 5b pop %ebx 113a81: 5e pop %esi 113a82: c9 leave 113a83: c3 ret =============================================================================== 0010b430 : rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { 10b430: 55 push %ebp 10b431: 89 e5 mov %esp,%ebp 10b433: 56 push %esi 10b434: 53 push %ebx 10b435: 83 ec 10 sub $0x10,%esp 10b438: 8b 75 08 mov 0x8(%ebp),%esi 10b43b: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10b43e: 85 db test %ebx,%ebx 10b440: 74 5e je 10b4a0 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 10b442: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 10b443: 8d 45 f4 lea -0xc(%ebp),%eax 10b446: 50 push %eax 10b447: 56 push %esi 10b448: 68 a0 66 12 00 push $0x1266a0 10b44d: e8 86 19 00 00 call 10cdd8 <_Objects_Get> switch ( location ) { 10b452: 83 c4 10 add $0x10,%esp 10b455: 8b 55 f4 mov -0xc(%ebp),%edx 10b458: 85 d2 test %edx,%edx 10b45a: 74 0c je 10b468 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b45c: b8 04 00 00 00 mov $0x4,%eax } 10b461: 8d 65 f8 lea -0x8(%ebp),%esp 10b464: 5b pop %ebx 10b465: 5e pop %esi 10b466: c9 leave 10b467: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 10b468: 6a 00 push $0x0 10b46a: 6a 00 push $0x0 10b46c: 68 ff ff ff 7f push $0x7fffffff 10b471: 6a 00 push $0x0 10b473: 56 push %esi 10b474: ff 75 10 pushl 0x10(%ebp) 10b477: 53 push %ebx the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_message_queue_Send( 10b478: 83 c0 14 add $0x14,%eax 10b47b: 50 push %eax 10b47c: e8 e7 0b 00 00 call 10c068 <_CORE_message_queue_Submit> 10b481: 89 c3 mov %eax,%ebx MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 10b483: 83 c4 20 add $0x20,%esp 10b486: e8 b1 21 00 00 call 10d63c <_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); 10b48b: 83 ec 0c sub $0xc,%esp 10b48e: 53 push %ebx 10b48f: e8 18 00 00 00 call 10b4ac <_Message_queue_Translate_core_message_queue_return_code> 10b494: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b497: 8d 65 f8 lea -0x8(%ebp),%esp 10b49a: 5b pop %ebx 10b49b: 5e pop %esi 10b49c: c9 leave 10b49d: c3 ret 10b49e: 66 90 xchg %ax,%ax <== NOT EXECUTED register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) return RTEMS_INVALID_ADDRESS; 10b4a0: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b4a5: 8d 65 f8 lea -0x8(%ebp),%esp 10b4a8: 5b pop %ebx 10b4a9: 5e pop %esi 10b4aa: c9 leave 10b4ab: c3 ret =============================================================================== 001168a8 : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { 1168a8: 55 push %ebp 1168a9: 89 e5 mov %esp,%ebp 1168ab: 56 push %esi 1168ac: 53 push %ebx 1168ad: 83 ec 10 sub $0x10,%esp 1168b0: 8b 75 08 mov 0x8(%ebp),%esi 1168b3: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 1168b6: 85 db test %ebx,%ebx 1168b8: 74 5e je 116918 1168ba: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 1168bb: 8d 45 f4 lea -0xc(%ebp),%eax 1168be: 50 push %eax 1168bf: 56 push %esi 1168c0: 68 40 0a 14 00 push $0x140a40 1168c5: e8 92 49 00 00 call 11b25c <_Objects_Get> switch ( location ) { 1168ca: 83 c4 10 add $0x10,%esp 1168cd: 8b 55 f4 mov -0xc(%ebp),%edx 1168d0: 85 d2 test %edx,%edx 1168d2: 74 0c je 1168e0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1168d4: b8 04 00 00 00 mov $0x4,%eax } 1168d9: 8d 65 f8 lea -0x8(%ebp),%esp 1168dc: 5b pop %ebx 1168dd: 5e pop %esi 1168de: c9 leave 1168df: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 1168e0: 6a 00 push $0x0 1168e2: 6a 00 push $0x0 1168e4: 68 00 00 00 80 push $0x80000000 1168e9: 6a 00 push $0x0 1168eb: 56 push %esi 1168ec: ff 75 10 pushl 0x10(%ebp) 1168ef: 53 push %ebx the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_message_queue_Urgent( 1168f0: 83 c0 14 add $0x14,%eax 1168f3: 50 push %eax 1168f4: e8 0f 33 00 00 call 119c08 <_CORE_message_queue_Submit> 1168f9: 89 c3 mov %eax,%ebx id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 1168fb: 83 c4 20 add $0x20,%esp 1168fe: e8 bd 51 00 00 call 11bac0 <_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); 116903: 83 ec 0c sub $0xc,%esp 116906: 53 push %ebx 116907: e8 8c ff ff ff call 116898 <_Message_queue_Translate_core_message_queue_return_code> 11690c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11690f: 8d 65 f8 lea -0x8(%ebp),%esp 116912: 5b pop %ebx 116913: 5e pop %esi 116914: c9 leave 116915: c3 ret 116916: 66 90 xchg %ax,%ax <== NOT EXECUTED register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) return RTEMS_INVALID_ADDRESS; 116918: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11691d: 8d 65 f8 lea -0x8(%ebp),%esp 116920: 5b pop %ebx 116921: 5e pop %esi 116922: c9 leave 116923: c3 ret =============================================================================== 0010ce8c : const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 10ce8c: 55 push %ebp 10ce8d: 89 e5 mov %esp,%ebp 10ce8f: 83 ec 08 sub $0x8,%esp 10ce92: 8b 45 08 mov 0x8(%ebp),%eax const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 10ce95: 83 f8 01 cmp $0x1,%eax 10ce98: 74 2a je 10cec4 api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 10ce9a: 83 f8 02 cmp $0x2,%eax 10ce9d: 74 09 je 10cea8 #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; 10ce9f: b8 a7 31 12 00 mov $0x1231a7,%eax class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; } 10cea4: c9 leave 10cea5: c3 ret 10cea6: 66 90 xchg %ax,%ax <== NOT EXECUTED const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) api_assoc = rtems_object_api_classic_assoc; 10cea8: b8 80 70 12 00 mov $0x127080,%eax else if ( the_api == OBJECTS_POSIX_API ) api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); 10cead: 83 ec 08 sub $0x8,%esp 10ceb0: ff 75 0c pushl 0xc(%ebp) 10ceb3: 50 push %eax 10ceb4: e8 57 49 00 00 call 111810 if ( class_assoc ) 10ceb9: 83 c4 10 add $0x10,%esp 10cebc: 85 c0 test %eax,%eax 10cebe: 74 0c je 10cecc return class_assoc->name; 10cec0: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10cec2: c9 leave 10cec3: c3 ret { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; 10cec4: b8 60 70 12 00 mov $0x127060,%eax 10cec9: eb e2 jmp 10cead 10cecb: 90 nop <== NOT EXECUTED else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; 10cecc: b8 af 31 12 00 mov $0x1231af,%eax } 10ced1: c9 leave 10ced2: c3 ret =============================================================================== 0010ced4 : }; const char *rtems_object_get_api_name( int api ) { 10ced4: 55 push %ebp 10ced5: 89 e5 mov %esp,%ebp 10ced7: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); 10ceda: ff 75 08 pushl 0x8(%ebp) 10cedd: 68 00 71 12 00 push $0x127100 10cee2: e8 29 49 00 00 call 111810 if ( api_assoc ) 10cee7: 83 c4 10 add $0x10,%esp 10ceea: 85 c0 test %eax,%eax 10ceec: 74 06 je 10cef4 return api_assoc->name; 10ceee: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10cef0: c9 leave 10cef1: c3 ret 10cef2: 66 90 xchg %ax,%ax <== NOT EXECUTED const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); if ( api_assoc ) return api_assoc->name; return "BAD CLASS"; 10cef4: b8 af 31 12 00 mov $0x1231af,%eax } 10cef9: c9 leave 10cefa: c3 ret =============================================================================== 0010cf3c : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 10cf3c: 55 push %ebp 10cf3d: 89 e5 mov %esp,%ebp 10cf3f: 57 push %edi 10cf40: 56 push %esi 10cf41: 53 push %ebx 10cf42: 83 ec 0c sub $0xc,%esp 10cf45: 8b 5d 10 mov 0x10(%ebp),%ebx int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10cf48: 85 db test %ebx,%ebx 10cf4a: 74 5c je 10cfa8 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 10cf4c: 83 ec 08 sub $0x8,%esp 10cf4f: ff 75 0c pushl 0xc(%ebp) 10cf52: ff 75 08 pushl 0x8(%ebp) 10cf55: e8 5e 1a 00 00 call 10e9b8 <_Objects_Get_information> if ( !obj_info ) 10cf5a: 83 c4 10 add $0x10,%esp 10cf5d: 85 c0 test %eax,%eax 10cf5f: 74 57 je 10cfb8 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 10cf61: 8b 50 08 mov 0x8(%eax),%edx 10cf64: 89 13 mov %edx,(%ebx) info->maximum_id = obj_info->maximum_id; 10cf66: 8b 50 0c mov 0xc(%eax),%edx 10cf69: 89 53 04 mov %edx,0x4(%ebx) info->auto_extend = obj_info->auto_extend; 10cf6c: 8a 50 12 mov 0x12(%eax),%dl 10cf6f: 88 53 0c mov %dl,0xc(%ebx) info->maximum = obj_info->maximum; 10cf72: 0f b7 70 10 movzwl 0x10(%eax),%esi 10cf76: 89 73 08 mov %esi,0x8(%ebx) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10cf79: 85 f6 test %esi,%esi 10cf7b: 74 42 je 10cfbf <== NEVER TAKEN 10cf7d: 8b 78 1c mov 0x1c(%eax),%edi 10cf80: b9 01 00 00 00 mov $0x1,%ecx 10cf85: b8 01 00 00 00 mov $0x1,%eax 10cf8a: 31 d2 xor %edx,%edx if ( !obj_info->local_table[i] ) unallocated++; 10cf8c: 83 3c 8f 01 cmpl $0x1,(%edi,%ecx,4) 10cf90: 83 d2 00 adc $0x0,%edx info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10cf93: 40 inc %eax 10cf94: 89 c1 mov %eax,%ecx 10cf96: 39 c6 cmp %eax,%esi 10cf98: 73 f2 jae 10cf8c if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 10cf9a: 89 53 10 mov %edx,0x10(%ebx) return RTEMS_SUCCESSFUL; 10cf9d: 31 c0 xor %eax,%eax } 10cf9f: 8d 65 f4 lea -0xc(%ebp),%esp 10cfa2: 5b pop %ebx 10cfa3: 5e pop %esi 10cfa4: 5f pop %edi 10cfa5: c9 leave 10cfa6: c3 ret 10cfa7: 90 nop <== NOT EXECUTED /* * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; 10cfa8: b8 09 00 00 00 mov $0x9,%eax unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 10cfad: 8d 65 f4 lea -0xc(%ebp),%esp 10cfb0: 5b pop %ebx 10cfb1: 5e pop %esi 10cfb2: 5f pop %edi 10cfb3: c9 leave 10cfb4: c3 ret 10cfb5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) return RTEMS_INVALID_NUMBER; 10cfb8: b8 0a 00 00 00 mov $0xa,%eax 10cfbd: eb e0 jmp 10cf9f info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10cfbf: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cfc1: eb d7 jmp 10cf9a <== NOT EXECUTED =============================================================================== 0010c598 : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { 10c598: 55 push %ebp 10c599: 89 e5 mov %esp,%ebp 10c59b: 53 push %ebx 10c59c: 83 ec 14 sub $0x14,%esp 10c59f: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10c5a2: 85 db test %ebx,%ebx 10c5a4: 74 26 je 10c5cc return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); 10c5a6: 83 ec 08 sub $0x8,%esp 10c5a9: 8d 45 f4 lea -0xc(%ebp),%eax 10c5ac: 50 push %eax 10c5ad: ff 75 08 pushl 0x8(%ebp) 10c5b0: e8 b3 1a 00 00 call 10e068 <_Objects_Id_to_name> *name = name_u.name_u32; 10c5b5: 8b 55 f4 mov -0xc(%ebp),%edx 10c5b8: 89 13 mov %edx,(%ebx) return _Status_Object_name_errors_to_status[ status ]; 10c5ba: 8b 04 85 8c 1d 12 00 mov 0x121d8c(,%eax,4),%eax 10c5c1: 83 c4 10 add $0x10,%esp } 10c5c4: 8b 5d fc mov -0x4(%ebp),%ebx 10c5c7: c9 leave 10c5c8: c3 ret 10c5c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) return RTEMS_INVALID_ADDRESS; 10c5cc: b8 09 00 00 00 mov $0x9,%eax status = _Objects_Id_to_name( id, &name_u ); *name = name_u.name_u32; return _Status_Object_name_errors_to_status[ status ]; } 10c5d1: 8b 5d fc mov -0x4(%ebp),%ebx 10c5d4: c9 leave 10c5d5: c3 ret =============================================================================== 0010d01c : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 10d01c: 55 push %ebp 10d01d: 89 e5 mov %esp,%ebp 10d01f: 57 push %edi 10d020: 56 push %esi 10d021: 53 push %ebx 10d022: 83 ec 1c sub $0x1c,%esp 10d025: 8b 75 08 mov 0x8(%ebp),%esi 10d028: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10d02b: 85 ff test %edi,%edi 10d02d: 74 61 je 10d090 return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10d02f: 85 f6 test %esi,%esi 10d031: 74 35 je 10d068 information = _Objects_Get_information_id( tmpId ); 10d033: 83 ec 0c sub $0xc,%esp 10d036: 56 push %esi 10d037: e8 5c 19 00 00 call 10e998 <_Objects_Get_information_id> 10d03c: 89 c3 mov %eax,%ebx if ( !information ) 10d03e: 83 c4 10 add $0x10,%esp 10d041: 85 c0 test %eax,%eax 10d043: 74 16 je 10d05b return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10d045: 50 push %eax 10d046: 8d 45 e4 lea -0x1c(%ebp),%eax 10d049: 50 push %eax 10d04a: 56 push %esi 10d04b: 53 push %ebx 10d04c: e8 db 1a 00 00 call 10eb2c <_Objects_Get> switch ( location ) { 10d051: 83 c4 10 add $0x10,%esp 10d054: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d057: 85 c9 test %ecx,%ecx 10d059: 74 19 je 10d074 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d05b: b8 04 00 00 00 mov $0x4,%eax } 10d060: 8d 65 f4 lea -0xc(%ebp),%esp 10d063: 5b pop %ebx 10d064: 5e pop %esi 10d065: 5f pop %edi 10d066: c9 leave 10d067: c3 ret Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10d068: a1 18 97 12 00 mov 0x129718,%eax 10d06d: 8b 70 08 mov 0x8(%eax),%esi 10d070: eb c1 jmp 10d033 10d072: 66 90 xchg %ax,%ax <== NOT EXECUTED the_object = _Objects_Get( information, tmpId, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 10d074: 52 push %edx 10d075: 57 push %edi 10d076: 50 push %eax 10d077: 53 push %ebx 10d078: e8 e7 1c 00 00 call 10ed64 <_Objects_Set_name> _Thread_Enable_dispatch(); 10d07d: e8 f6 23 00 00 call 10f478 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d082: 83 c4 10 add $0x10,%esp 10d085: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d087: 8d 65 f4 lea -0xc(%ebp),%esp 10d08a: 5b pop %ebx 10d08b: 5e pop %esi 10d08c: 5f pop %edi 10d08d: c9 leave 10d08e: c3 ret 10d08f: 90 nop <== NOT EXECUTED Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; 10d090: b8 09 00 00 00 mov $0x9,%eax 10d095: eb c9 jmp 10d060 =============================================================================== 00116924 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 116924: 55 push %ebp 116925: 89 e5 mov %esp,%ebp 116927: 57 push %edi 116928: 56 push %esi 116929: 53 push %ebx 11692a: 83 ec 1c sub $0x1c,%esp 11692d: 8b 5d 08 mov 0x8(%ebp),%ebx 116930: 8b 75 0c mov 0xc(%ebp),%esi 116933: 8b 55 10 mov 0x10(%ebp),%edx 116936: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 116939: 85 db test %ebx,%ebx 11693b: 74 47 je 116984 return RTEMS_INVALID_NAME; if ( !starting_address ) 11693d: 85 f6 test %esi,%esi 11693f: 74 23 je 116964 return RTEMS_INVALID_ADDRESS; if ( !id ) 116941: 8b 45 1c mov 0x1c(%ebp),%eax 116944: 85 c0 test %eax,%eax 116946: 74 1c je 116964 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 116948: 85 d2 test %edx,%edx 11694a: 74 28 je 116974 11694c: 85 ff test %edi,%edi 11694e: 74 24 je 116974 116950: 39 fa cmp %edi,%edx 116952: 72 20 jb 116974 116954: f7 c7 03 00 00 00 test $0x3,%edi 11695a: 75 18 jne 116974 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 11695c: f7 c6 03 00 00 00 test $0x3,%esi 116962: 74 30 je 116994 return RTEMS_INVALID_ADDRESS; 116964: b8 09 00 00 00 mov $0x9,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 116969: 8d 65 f4 lea -0xc(%ebp),%esp 11696c: 5b pop %ebx 11696d: 5e pop %esi 11696e: 5f pop %edi 11696f: c9 leave 116970: c3 ret 116971: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !id ) return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; 116974: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 116979: 8d 65 f4 lea -0xc(%ebp),%esp 11697c: 5b pop %ebx 11697d: 5e pop %esi 11697e: 5f pop %edi 11697f: c9 leave 116980: c3 ret 116981: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 116984: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 116989: 8d 65 f4 lea -0xc(%ebp),%esp 11698c: 5b pop %ebx 11698d: 5e pop %esi 11698e: 5f pop %edi 11698f: c9 leave 116990: c3 ret 116991: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 116994: a1 74 07 14 00 mov 0x140774,%eax 116999: 40 inc %eax 11699a: a3 74 07 14 00 mov %eax,0x140774 * This function allocates a partition control block from * the inactive chain of free partition control blocks. */ RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void ) { return (Partition_Control *) _Objects_Allocate( &_Partition_Information ); 11699f: 83 ec 0c sub $0xc,%esp 1169a2: 68 00 06 14 00 push $0x140600 1169a7: 89 55 e0 mov %edx,-0x20(%ebp) 1169aa: e8 c1 43 00 00 call 11ad70 <_Objects_Allocate> 1169af: 89 45 e4 mov %eax,-0x1c(%ebp) _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 1169b2: 83 c4 10 add $0x10,%esp 1169b5: 85 c0 test %eax,%eax 1169b7: 8b 55 e0 mov -0x20(%ebp),%edx 1169ba: 74 58 je 116a14 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 1169bc: 8b 45 e4 mov -0x1c(%ebp),%eax 1169bf: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 1169c2: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 1169c5: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 1169c8: 8b 4d 18 mov 0x18(%ebp),%ecx 1169cb: 89 48 1c mov %ecx,0x1c(%eax) the_partition->number_of_used_blocks = 0; 1169ce: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) _Chain_Initialize( &the_partition->Memory, starting_address, 1169d5: 57 push %edi 1169d6: 89 d0 mov %edx,%eax 1169d8: 31 d2 xor %edx,%edx 1169da: f7 f7 div %edi 1169dc: 50 push %eax 1169dd: 56 push %esi 1169de: 8b 45 e4 mov -0x1c(%ebp),%eax 1169e1: 83 c0 24 add $0x24,%eax 1169e4: 50 push %eax 1169e5: e8 36 2f 00 00 call 119920 <_Chain_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 1169ea: 8b 7d e4 mov -0x1c(%ebp),%edi 1169ed: 8b 47 08 mov 0x8(%edi),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 1169f0: 0f b7 f0 movzwl %ax,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1169f3: 8b 15 1c 06 14 00 mov 0x14061c,%edx 1169f9: 89 3c b2 mov %edi,(%edx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1169fc: 89 5f 0c mov %ebx,0xc(%edi) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 1169ff: 8b 55 1c mov 0x1c(%ebp),%edx 116a02: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 116a04: e8 b7 50 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116a09: 83 c4 10 add $0x10,%esp 116a0c: 31 c0 xor %eax,%eax 116a0e: e9 66 ff ff ff jmp 116979 116a13: 90 nop <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 116a14: e8 a7 50 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 116a19: b8 05 00 00 00 mov $0x5,%eax 116a1e: e9 56 ff ff ff jmp 116979 =============================================================================== 00116a24 : */ rtems_status_code rtems_partition_delete( rtems_id id ) { 116a24: 55 push %ebp 116a25: 89 e5 mov %esp,%ebp 116a27: 83 ec 2c sub $0x2c,%esp register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); 116a2a: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 116a2d: 50 push %eax 116a2e: ff 75 08 pushl 0x8(%ebp) 116a31: 68 00 06 14 00 push $0x140600 116a36: e8 21 48 00 00 call 11b25c <_Objects_Get> switch ( location ) { 116a3b: 83 c4 10 add $0x10,%esp 116a3e: 8b 55 f4 mov -0xc(%ebp),%edx 116a41: 85 d2 test %edx,%edx 116a43: 74 07 je 116a4c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116a45: b8 04 00 00 00 mov $0x4,%eax } 116a4a: c9 leave 116a4b: c3 ret the_partition = _Partition_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { 116a4c: 8b 48 20 mov 0x20(%eax),%ecx 116a4f: 85 c9 test %ecx,%ecx 116a51: 74 0d je 116a60 #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 116a53: e8 68 50 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 116a58: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116a5d: c9 leave 116a5e: c3 ret 116a5f: 90 nop <== NOT EXECUTED the_partition = _Partition_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { _Objects_Close( &_Partition_Information, &the_partition->Object ); 116a60: 83 ec 08 sub $0x8,%esp 116a63: 50 push %eax 116a64: 68 00 06 14 00 push $0x140600 116a69: 89 45 e4 mov %eax,-0x1c(%ebp) 116a6c: e8 7b 43 00 00 call 11adec <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); 116a71: 58 pop %eax 116a72: 5a pop %edx 116a73: 8b 45 e4 mov -0x1c(%ebp),%eax 116a76: 50 push %eax 116a77: 68 00 06 14 00 push $0x140600 116a7c: e8 67 46 00 00 call 11b0e8 <_Objects_Free> 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 116a81: e8 3a 50 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116a86: 83 c4 10 add $0x10,%esp 116a89: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116a8b: c9 leave 116a8c: c3 ret =============================================================================== 00116a90 : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 116a90: 55 push %ebp 116a91: 89 e5 mov %esp,%ebp 116a93: 56 push %esi 116a94: 53 push %ebx 116a95: 83 ec 20 sub $0x20,%esp 116a98: 8b 5d 0c mov 0xc(%ebp),%ebx register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 116a9b: 85 db test %ebx,%ebx 116a9d: 74 59 je 116af8 Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 116a9f: 52 push %edx return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); 116aa0: 8d 45 f4 lea -0xc(%ebp),%eax 116aa3: 50 push %eax 116aa4: ff 75 08 pushl 0x8(%ebp) 116aa7: 68 00 06 14 00 push $0x140600 116aac: e8 ab 47 00 00 call 11b25c <_Objects_Get> 116ab1: 89 c6 mov %eax,%esi switch ( location ) { 116ab3: 83 c4 10 add $0x10,%esp 116ab6: 8b 45 f4 mov -0xc(%ebp),%eax 116ab9: 85 c0 test %eax,%eax 116abb: 75 2f jne 116aec */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 116abd: 83 ec 0c sub $0xc,%esp 116ac0: 8d 46 24 lea 0x24(%esi),%eax 116ac3: 50 push %eax 116ac4: e8 33 2e 00 00 call 1198fc <_Chain_Get> case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 116ac9: 83 c4 10 add $0x10,%esp 116acc: 85 c0 test %eax,%eax 116ace: 74 34 je 116b04 the_partition->number_of_used_blocks += 1; 116ad0: ff 46 20 incl 0x20(%esi) _Thread_Enable_dispatch(); 116ad3: 89 45 e4 mov %eax,-0x1c(%ebp) 116ad6: e8 e5 4f 00 00 call 11bac0 <_Thread_Enable_dispatch> *buffer = the_buffer; 116adb: 8b 45 e4 mov -0x1c(%ebp),%eax 116ade: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 116ae0: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116ae2: 8d 65 f8 lea -0x8(%ebp),%esp 116ae5: 5b pop %ebx 116ae6: 5e pop %esi 116ae7: c9 leave 116ae8: c3 ret 116ae9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116aec: b8 04 00 00 00 mov $0x4,%eax } 116af1: 8d 65 f8 lea -0x8(%ebp),%esp 116af4: 5b pop %ebx 116af5: 5e pop %esi 116af6: c9 leave 116af7: c3 ret register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) return RTEMS_INVALID_ADDRESS; 116af8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116afd: 8d 65 f8 lea -0x8(%ebp),%esp 116b00: 5b pop %ebx 116b01: 5e pop %esi 116b02: c9 leave 116b03: c3 ret the_partition->number_of_used_blocks += 1; _Thread_Enable_dispatch(); *buffer = the_buffer; return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 116b04: e8 b7 4f 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_UNSATISFIED; 116b09: b8 0d 00 00 00 mov $0xd,%eax 116b0e: eb e1 jmp 116af1 =============================================================================== 00116b34 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 116b34: 55 push %ebp 116b35: 89 e5 mov %esp,%ebp 116b37: 56 push %esi 116b38: 53 push %ebx 116b39: 83 ec 14 sub $0x14,%esp 116b3c: 8b 75 0c mov 0xc(%ebp),%esi register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); 116b3f: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 116b42: 50 push %eax 116b43: ff 75 08 pushl 0x8(%ebp) 116b46: 68 00 06 14 00 push $0x140600 116b4b: e8 0c 47 00 00 call 11b25c <_Objects_Get> 116b50: 89 c3 mov %eax,%ebx switch ( location ) { 116b52: 83 c4 10 add $0x10,%esp 116b55: 8b 45 f4 mov -0xc(%ebp),%eax 116b58: 85 c0 test %eax,%eax 116b5a: 74 0c je 116b68 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116b5c: b8 04 00 00 00 mov $0x4,%eax } 116b61: 8d 65 f8 lea -0x8(%ebp),%esp 116b64: 5b pop %ebx 116b65: 5e pop %esi 116b66: c9 leave 116b67: c3 ret ) { void *starting; void *ending; starting = the_partition->starting_address; 116b68: 8b 43 10 mov 0x10(%ebx),%eax ending = _Addresses_Add_offset( starting, the_partition->length ); 116b6b: 8b 53 14 mov 0x14(%ebx),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 116b6e: 39 c6 cmp %eax,%esi 116b70: 72 3a jb 116bac RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 116b72: 8d 14 10 lea (%eax,%edx,1),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 116b75: 39 d6 cmp %edx,%esi 116b77: 77 33 ja 116bac <== NEVER TAKEN RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 116b79: 89 f2 mov %esi,%edx 116b7b: 29 c2 sub %eax,%edx 116b7d: 89 d0 mov %edx,%eax offset = (uint32_t) _Addresses_Subtract( the_buffer, the_partition->starting_address ); return ((offset % the_partition->buffer_size) == 0); 116b7f: 31 d2 xor %edx,%edx 116b81: f7 73 18 divl 0x18(%ebx) starting = the_partition->starting_address; ending = _Addresses_Add_offset( starting, the_partition->length ); return ( _Addresses_Is_in_range( the_buffer, starting, ending ) && 116b84: 85 d2 test %edx,%edx 116b86: 75 24 jne 116bac RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 116b88: 83 ec 08 sub $0x8,%esp 116b8b: 56 push %esi 116b8c: 8d 43 24 lea 0x24(%ebx),%eax 116b8f: 50 push %eax 116b90: e8 2b 2d 00 00 call 1198c0 <_Chain_Append> switch ( location ) { case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; 116b95: ff 4b 20 decl 0x20(%ebx) _Thread_Enable_dispatch(); 116b98: e8 23 4f 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116b9d: 83 c4 10 add $0x10,%esp 116ba0: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116ba2: 8d 65 f8 lea -0x8(%ebp),%esp 116ba5: 5b pop %ebx 116ba6: 5e pop %esi 116ba7: c9 leave 116ba8: c3 ret 116ba9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 116bac: e8 0f 4f 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 116bb1: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116bb6: 8d 65 f8 lea -0x8(%ebp),%esp 116bb9: 5b pop %ebx 116bba: 5e pop %esi 116bbb: c9 leave 116bbc: c3 ret =============================================================================== 00115f58 : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 115f58: 55 push %ebp 115f59: 89 e5 mov %esp,%ebp 115f5b: 57 push %edi 115f5c: 56 push %esi 115f5d: 53 push %ebx 115f5e: 83 ec 1c sub $0x1c,%esp 115f61: 8b 5d 08 mov 0x8(%ebp),%ebx 115f64: 8b 55 0c mov 0xc(%ebp),%edx 115f67: 8b 7d 10 mov 0x10(%ebp),%edi 115f6a: 8b 75 18 mov 0x18(%ebp),%esi register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 115f6d: 85 db test %ebx,%ebx 115f6f: 74 1b je 115f8c return RTEMS_INVALID_NAME; if ( !id ) 115f71: 85 f6 test %esi,%esi 115f73: 74 08 je 115f7d * id - port id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_port_create( 115f75: 89 f8 mov %edi,%eax 115f77: 09 d0 or %edx,%eax return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 115f79: a8 03 test $0x3,%al 115f7b: 74 1f je 115f9c !_Addresses_Is_aligned( external_start ) ) return RTEMS_INVALID_ADDRESS; 115f7d: b8 09 00 00 00 mov $0x9,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 115f82: 8d 65 f4 lea -0xc(%ebp),%esp 115f85: 5b pop %ebx 115f86: 5e pop %esi 115f87: 5f pop %edi 115f88: c9 leave 115f89: c3 ret 115f8a: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 115f8c: b8 03 00 00 00 mov $0x3,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 115f91: 8d 65 f4 lea -0xc(%ebp),%esp 115f94: 5b pop %ebx 115f95: 5e pop %esi 115f96: 5f pop %edi 115f97: c9 leave 115f98: c3 ret 115f99: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 115f9c: a1 74 07 14 00 mov 0x140774,%eax 115fa1: 40 inc %eax 115fa2: a3 74 07 14 00 mov %eax,0x140774 */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) _Objects_Allocate( &_Dual_ported_memory_Information ); 115fa7: 83 ec 0c sub $0xc,%esp 115faa: 68 c0 05 14 00 push $0x1405c0 115faf: 89 55 e4 mov %edx,-0x1c(%ebp) 115fb2: e8 b9 4d 00 00 call 11ad70 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 115fb7: 83 c4 10 add $0x10,%esp 115fba: 85 c0 test %eax,%eax 115fbc: 8b 55 e4 mov -0x1c(%ebp),%edx 115fbf: 74 33 je 115ff4 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 115fc1: 89 50 10 mov %edx,0x10(%eax) the_port->external_base = external_start; 115fc4: 89 78 14 mov %edi,0x14(%eax) the_port->length = length - 1; 115fc7: 8b 55 14 mov 0x14(%ebp),%edx 115fca: 4a dec %edx 115fcb: 89 50 18 mov %edx,0x18(%eax) Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 115fce: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 115fd1: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 115fd4: 8b 0d dc 05 14 00 mov 0x1405dc,%ecx 115fda: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 115fdd: 89 58 0c mov %ebx,0xc(%eax) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 115fe0: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 115fe2: e8 d9 5a 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115fe7: 31 c0 xor %eax,%eax } 115fe9: 8d 65 f4 lea -0xc(%ebp),%esp 115fec: 5b pop %ebx 115fed: 5e pop %esi 115fee: 5f pop %edi 115fef: c9 leave 115ff0: c3 ret 115ff1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { _Thread_Enable_dispatch(); 115ff4: e8 c7 5a 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 115ff9: b8 05 00 00 00 mov $0x5,%eax 115ffe: eb 82 jmp 115f82 =============================================================================== 00116000 : */ rtems_status_code rtems_port_delete( rtems_id id ) { 116000: 55 push %ebp 116001: 89 e5 mov %esp,%ebp 116003: 83 ec 2c sub $0x2c,%esp register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); 116006: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) _Objects_Get( &_Dual_ported_memory_Information, id, location ); 116009: 50 push %eax 11600a: ff 75 08 pushl 0x8(%ebp) 11600d: 68 c0 05 14 00 push $0x1405c0 116012: e8 45 52 00 00 call 11b25c <_Objects_Get> switch ( location ) { 116017: 83 c4 10 add $0x10,%esp 11601a: 8b 4d f4 mov -0xc(%ebp),%ecx 11601d: 85 c9 test %ecx,%ecx 11601f: 75 2f jne 116050 case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); 116021: 83 ec 08 sub $0x8,%esp 116024: 50 push %eax 116025: 68 c0 05 14 00 push $0x1405c0 11602a: 89 45 e4 mov %eax,-0x1c(%ebp) 11602d: e8 ba 4d 00 00 call 11adec <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Dual_ported_memory_Free ( Dual_ported_memory_Control *the_port ) { _Objects_Free( &_Dual_ported_memory_Information, &the_port->Object ); 116032: 58 pop %eax 116033: 5a pop %edx 116034: 8b 45 e4 mov -0x1c(%ebp),%eax 116037: 50 push %eax 116038: 68 c0 05 14 00 push $0x1405c0 11603d: e8 a6 50 00 00 call 11b0e8 <_Objects_Free> _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 116042: e8 79 5a 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116047: 83 c4 10 add $0x10,%esp 11604a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11604c: c9 leave 11604d: c3 ret 11604e: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116050: b8 04 00 00 00 mov $0x4,%eax } 116055: c9 leave 116056: c3 ret =============================================================================== 00116058 : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 116058: 55 push %ebp 116059: 89 e5 mov %esp,%ebp 11605b: 56 push %esi 11605c: 53 push %ebx 11605d: 83 ec 10 sub $0x10,%esp 116060: 8b 75 0c mov 0xc(%ebp),%esi 116063: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 116066: 85 db test %ebx,%ebx 116068: 74 4e je 1160b8 Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) _Objects_Get( &_Dual_ported_memory_Information, id, location ); 11606a: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); 11606b: 8d 45 f4 lea -0xc(%ebp),%eax 11606e: 50 push %eax 11606f: ff 75 08 pushl 0x8(%ebp) 116072: 68 c0 05 14 00 push $0x1405c0 116077: e8 e0 51 00 00 call 11b25c <_Objects_Get> switch ( location ) { 11607c: 83 c4 10 add $0x10,%esp 11607f: 8b 55 f4 mov -0xc(%ebp),%edx 116082: 85 d2 test %edx,%edx 116084: 74 0e je 116094 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116086: b8 04 00 00 00 mov $0x4,%eax } 11608b: 8d 65 f8 lea -0x8(%ebp),%esp 11608e: 5b pop %ebx 11608f: 5e pop %esi 116090: c9 leave 116091: c3 ret 116092: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 116094: 89 f2 mov %esi,%edx 116096: 2b 50 14 sub 0x14(%eax),%edx the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); if ( ending > the_port->length ) 116099: 3b 50 18 cmp 0x18(%eax),%edx 11609c: 77 16 ja 1160b4 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 11609e: 03 50 10 add 0x10(%eax),%edx 1160a1: 89 13 mov %edx,(%ebx) *internal = external; else *internal = _Addresses_Add_offset( the_port->internal_base, ending ); _Thread_Enable_dispatch(); 1160a3: e8 18 5a 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1160a8: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1160aa: 8d 65 f8 lea -0x8(%ebp),%esp 1160ad: 5b pop %ebx 1160ae: 5e pop %esi 1160af: c9 leave 1160b0: c3 ret 1160b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); if ( ending > the_port->length ) *internal = external; 1160b4: 89 33 mov %esi,(%ebx) 1160b6: eb eb jmp 1160a3 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) return RTEMS_INVALID_ADDRESS; 1160b8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1160bd: 8d 65 f8 lea -0x8(%ebp),%esp 1160c0: 5b pop %ebx 1160c1: 5e pop %esi 1160c2: c9 leave 1160c3: c3 ret =============================================================================== 001160e8 : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 1160e8: 55 push %ebp 1160e9: 89 e5 mov %esp,%ebp 1160eb: 56 push %esi 1160ec: 53 push %ebx 1160ed: 83 ec 10 sub $0x10,%esp 1160f0: 8b 75 0c mov 0xc(%ebp),%esi 1160f3: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 1160f6: 85 db test %ebx,%ebx 1160f8: 74 4e je 116148 1160fa: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); 1160fb: 8d 45 f4 lea -0xc(%ebp),%eax 1160fe: 50 push %eax 1160ff: ff 75 08 pushl 0x8(%ebp) 116102: 68 c0 05 14 00 push $0x1405c0 116107: e8 50 51 00 00 call 11b25c <_Objects_Get> switch ( location ) { 11610c: 83 c4 10 add $0x10,%esp 11610f: 8b 55 f4 mov -0xc(%ebp),%edx 116112: 85 d2 test %edx,%edx 116114: 74 0e je 116124 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116116: b8 04 00 00 00 mov $0x4,%eax } 11611b: 8d 65 f8 lea -0x8(%ebp),%esp 11611e: 5b pop %ebx 11611f: 5e pop %esi 116120: c9 leave 116121: c3 ret 116122: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 116124: 89 f2 mov %esi,%edx 116126: 2b 50 10 sub 0x10(%eax),%edx the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) 116129: 3b 50 18 cmp 0x18(%eax),%edx 11612c: 77 16 ja 116144 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 11612e: 03 50 14 add 0x14(%eax),%edx 116131: 89 13 mov %edx,(%ebx) *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, ending ); _Thread_Enable_dispatch(); 116133: e8 88 59 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116138: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11613a: 8d 65 f8 lea -0x8(%ebp),%esp 11613d: 5b pop %ebx 11613e: 5e pop %esi 11613f: c9 leave 116140: c3 ret 116141: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) *external = internal; 116144: 89 33 mov %esi,(%ebx) 116146: eb eb jmp 116133 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) return RTEMS_INVALID_ADDRESS; 116148: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11614d: 8d 65 f8 lea -0x8(%ebp),%esp 116150: 5b pop %ebx 116151: 5e pop %esi 116152: c9 leave 116153: c3 ret =============================================================================== 00116bc0 : */ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { 116bc0: 55 push %ebp 116bc1: 89 e5 mov %esp,%ebp 116bc3: 53 push %ebx 116bc4: 83 ec 18 sub $0x18,%esp Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); 116bc7: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 116bca: 50 push %eax 116bcb: ff 75 08 pushl 0x8(%ebp) 116bce: 68 40 06 14 00 push $0x140640 116bd3: e8 84 46 00 00 call 11b25c <_Objects_Get> 116bd8: 89 c3 mov %eax,%ebx switch ( location ) { 116bda: 83 c4 10 add $0x10,%esp 116bdd: 8b 45 f4 mov -0xc(%ebp),%eax 116be0: 85 c0 test %eax,%eax 116be2: 74 0c je 116bf0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116be4: b8 04 00 00 00 mov $0x4,%eax } 116be9: 8b 5d fc mov -0x4(%ebp),%ebx 116bec: c9 leave 116bed: c3 ret 116bee: 66 90 xchg %ax,%ax <== NOT EXECUTED the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 116bf0: a1 18 0a 14 00 mov 0x140a18,%eax 116bf5: 39 43 40 cmp %eax,0x40(%ebx) 116bf8: 74 12 je 116c0c _Thread_Enable_dispatch(); 116bfa: e8 c1 4e 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 116bff: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116c04: 8b 5d fc mov -0x4(%ebp),%ebx 116c07: c9 leave 116c08: c3 ret 116c09: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } (void) _Watchdog_Remove( &the_period->Timer ); 116c0c: 83 ec 0c sub $0xc,%esp 116c0f: 8d 43 10 lea 0x10(%ebx),%eax 116c12: 50 push %eax 116c13: e8 84 62 00 00 call 11ce9c <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 116c18: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) _Thread_Enable_dispatch(); 116c1f: e8 9c 4e 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116c24: 83 c4 10 add $0x10,%esp 116c27: 31 c0 xor %eax,%eax 116c29: eb be jmp 116be9 =============================================================================== 0010c3b8 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 10c3b8: 55 push %ebp 10c3b9: 89 e5 mov %esp,%ebp 10c3bb: 57 push %edi 10c3bc: 56 push %esi 10c3bd: 53 push %ebx 10c3be: 83 ec 1c sub $0x1c,%esp 10c3c1: 8b 5d 08 mov 0x8(%ebp),%ebx 10c3c4: 8b 75 0c mov 0xc(%ebp),%esi Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10c3c7: 85 db test %ebx,%ebx 10c3c9: 0f 84 a9 00 00 00 je 10c478 return RTEMS_INVALID_NAME; if ( !id ) 10c3cf: 85 f6 test %esi,%esi 10c3d1: 0f 84 c5 00 00 00 je 10c49c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c3d7: a1 74 84 12 00 mov 0x128474,%eax 10c3dc: 40 inc %eax 10c3dd: a3 74 84 12 00 mov %eax,0x128474 * the inactive chain of free period control blocks. */ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void ) { return (Rate_monotonic_Control *) _Objects_Allocate( &_Rate_monotonic_Information ); 10c3e2: 83 ec 0c sub $0xc,%esp 10c3e5: 68 80 83 12 00 push $0x128380 10c3ea: e8 4d 1e 00 00 call 10e23c <_Objects_Allocate> 10c3ef: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 10c3f1: 83 c4 10 add $0x10,%esp 10c3f4: 85 c0 test %eax,%eax 10c3f6: 0f 84 8c 00 00 00 je 10c488 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 10c3fc: a1 18 87 12 00 mov 0x128718,%eax 10c401: 89 42 40 mov %eax,0x40(%edx) the_period->state = RATE_MONOTONIC_INACTIVE; 10c404: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10c40b: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 10c412: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx) the_watchdog->id = id; 10c419: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) the_watchdog->user_data = user_data; 10c420: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); 10c427: 8d 42 54 lea 0x54(%edx),%eax 10c42a: 89 45 e4 mov %eax,-0x1c(%ebp) 10c42d: b9 38 00 00 00 mov $0x38,%ecx 10c432: 31 c0 xor %eax,%eax 10c434: 8b 7d e4 mov -0x1c(%ebp),%edi 10c437: f3 aa rep stos %al,%es:(%edi) 10c439: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10c440: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10c447: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10c44e: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10c455: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10c458: 0f b7 f8 movzwl %ax,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c45b: 8b 0d 9c 83 12 00 mov 0x12839c,%ecx 10c461: 89 14 b9 mov %edx,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c464: 89 5a 0c mov %ebx,0xc(%edx) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 10c467: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10c469: e8 ae 2b 00 00 call 10f01c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c46e: 31 c0 xor %eax,%eax } 10c470: 8d 65 f4 lea -0xc(%ebp),%esp 10c473: 5b pop %ebx 10c474: 5e pop %esi 10c475: 5f pop %edi 10c476: c9 leave 10c477: c3 ret ) { Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10c478: b8 03 00 00 00 mov $0x3,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c47d: 8d 65 f4 lea -0xc(%ebp),%esp 10c480: 5b pop %ebx 10c481: 5e pop %esi 10c482: 5f pop %edi 10c483: c9 leave 10c484: c3 ret 10c485: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { _Thread_Enable_dispatch(); 10c488: e8 8f 2b 00 00 call 10f01c <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10c48d: b8 05 00 00 00 mov $0x5,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c492: 8d 65 f4 lea -0xc(%ebp),%esp 10c495: 5b pop %ebx 10c496: 5e pop %esi 10c497: 5f pop %edi 10c498: c9 leave 10c499: c3 ret 10c49a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10c49c: b8 09 00 00 00 mov $0x9,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c4a1: 8d 65 f4 lea -0xc(%ebp),%esp 10c4a4: 5b pop %ebx 10c4a5: 5e pop %esi 10c4a6: 5f pop %edi 10c4a7: c9 leave 10c4a8: c3 ret =============================================================================== 00111d7c : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 111d7c: 55 push %ebp 111d7d: 89 e5 mov %esp,%ebp 111d7f: 53 push %ebx 111d80: 83 ec 24 sub $0x24,%esp 111d83: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) 111d86: 85 db test %ebx,%ebx 111d88: 0f 84 92 00 00 00 je 111e20 111d8e: 50 push %eax return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); 111d8f: 8d 45 f4 lea -0xc(%ebp),%eax 111d92: 50 push %eax 111d93: ff 75 08 pushl 0x8(%ebp) 111d96: 68 80 83 12 00 push $0x128380 111d9b: e8 18 ca ff ff call 10e7b8 <_Objects_Get> switch ( location ) { 111da0: 83 c4 10 add $0x10,%esp 111da3: 8b 4d f4 mov -0xc(%ebp),%ecx 111da6: 85 c9 test %ecx,%ecx 111da8: 74 0a je 111db4 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 111daa: b8 04 00 00 00 mov $0x4,%eax } 111daf: 8b 5d fc mov -0x4(%ebp),%ebx 111db2: c9 leave 111db3: c3 ret the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 111db4: 8b 50 40 mov 0x40(%eax),%edx 111db7: 8b 52 08 mov 0x8(%edx),%edx 111dba: 89 13 mov %edx,(%ebx) status->state = the_period->state; 111dbc: 8b 50 38 mov 0x38(%eax),%edx 111dbf: 89 53 04 mov %edx,0x4(%ebx) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 111dc2: 85 d2 test %edx,%edx 111dc4: 75 2a jne 111df0 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 111dc6: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 111dcd: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Timespec_Set_to_zero( &status->executed_since_last_period ); 111dd4: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) 111ddb: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) status->since_last_period = since_last_period; status->executed_since_last_period = executed; #endif } _Thread_Enable_dispatch(); 111de2: e8 35 d2 ff ff call 10f01c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 111de7: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111de9: 8b 5d fc mov -0x4(%ebp),%ebx 111dec: c9 leave 111ded: c3 ret 111dee: 66 90 xchg %ax,%ax <== NOT EXECUTED } else { /* * Grab the current status. */ valid_status = 111df0: 52 push %edx _Rate_monotonic_Get_status( 111df1: 8d 55 ec lea -0x14(%ebp),%edx } else { /* * Grab the current status. */ valid_status = 111df4: 52 push %edx _Rate_monotonic_Get_status( 111df5: 8d 55 e4 lea -0x1c(%ebp),%edx } else { /* * Grab the current status. */ valid_status = 111df8: 52 push %edx 111df9: 50 push %eax 111dfa: e8 d1 a6 ff ff call 10c4d0 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { 111dff: 83 c4 10 add $0x10,%esp 111e02: 84 c0 test %al,%al 111e04: 74 26 je 111e2c _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 111e06: 8b 45 e4 mov -0x1c(%ebp),%eax 111e09: 8b 55 e8 mov -0x18(%ebp),%edx 111e0c: 89 43 08 mov %eax,0x8(%ebx) 111e0f: 89 53 0c mov %edx,0xc(%ebx) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 111e12: 8b 45 ec mov -0x14(%ebp),%eax 111e15: 8b 55 f0 mov -0x10(%ebp),%edx 111e18: 89 43 10 mov %eax,0x10(%ebx) 111e1b: 89 53 14 mov %edx,0x14(%ebx) 111e1e: eb c2 jmp 111de2 Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) return RTEMS_INVALID_ADDRESS; 111e20: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111e25: 8b 5d fc mov -0x4(%ebp),%ebx 111e28: c9 leave 111e29: c3 ret 111e2a: 66 90 xchg %ax,%ax <== NOT EXECUTED valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { _Thread_Enable_dispatch(); 111e2c: e8 eb d1 ff ff call 10f01c <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 111e31: b8 0b 00 00 00 mov $0xb,%eax 111e36: e9 74 ff ff ff jmp 111daf =============================================================================== 0010c6cc : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 10c6cc: 55 push %ebp 10c6cd: 89 e5 mov %esp,%ebp 10c6cf: 57 push %edi 10c6d0: 56 push %esi 10c6d1: 53 push %ebx 10c6d2: 83 ec 30 sub $0x30,%esp 10c6d5: 8b 5d 08 mov 0x8(%ebp),%ebx 10c6d8: 8b 75 0c mov 0xc(%ebp),%esi Objects_Locations location; rtems_status_code return_value; rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); 10c6db: 8d 45 e4 lea -0x1c(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 10c6de: 50 push %eax 10c6df: 53 push %ebx 10c6e0: 68 80 83 12 00 push $0x128380 10c6e5: e8 ce 20 00 00 call 10e7b8 <_Objects_Get> switch ( location ) { 10c6ea: 83 c4 10 add $0x10,%esp 10c6ed: 8b 7d e4 mov -0x1c(%ebp),%edi 10c6f0: 85 ff test %edi,%edi 10c6f2: 74 10 je 10c704 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c6f4: b8 04 00 00 00 mov $0x4,%eax } 10c6f9: 8d 65 f4 lea -0xc(%ebp),%esp 10c6fc: 5b pop %ebx 10c6fd: 5e pop %esi 10c6fe: 5f pop %edi 10c6ff: c9 leave 10c700: c3 ret 10c701: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 10c704: 8b 15 18 87 12 00 mov 0x128718,%edx 10c70a: 39 50 40 cmp %edx,0x40(%eax) 10c70d: 74 15 je 10c724 _Thread_Enable_dispatch(); 10c70f: e8 08 29 00 00 call 10f01c <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 10c714: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c719: 8d 65 f4 lea -0xc(%ebp),%esp 10c71c: 5b pop %ebx 10c71d: 5e pop %esi 10c71e: 5f pop %edi 10c71f: c9 leave 10c720: c3 ret 10c721: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 10c724: 85 f6 test %esi,%esi 10c726: 0f 84 b0 00 00 00 je 10c7dc } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 10c72c: 9c pushf 10c72d: fa cli 10c72e: 5f pop %edi switch ( the_period->state ) { 10c72f: 8b 50 38 mov 0x38(%eax),%edx 10c732: 83 fa 02 cmp $0x2,%edx 10c735: 0f 84 c1 00 00 00 je 10c7fc 10c73b: 83 fa 04 cmp $0x4,%edx 10c73e: 74 5c je 10c79c 10c740: 85 d2 test %edx,%edx 10c742: 75 b0 jne 10c6f4 <== NEVER TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 10c744: 57 push %edi 10c745: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 10c746: 83 ec 0c sub $0xc,%esp 10c749: 50 push %eax 10c74a: 89 45 d4 mov %eax,-0x2c(%ebp) 10c74d: e8 16 fe ff ff call 10c568 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 10c752: 8b 45 d4 mov -0x2c(%ebp),%eax 10c755: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10c75c: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10c763: c7 40 2c 30 cb 10 00 movl $0x10cb30,0x2c(%eax) the_watchdog->id = id; 10c76a: 89 58 30 mov %ebx,0x30(%eax) the_watchdog->user_data = user_data; 10c76d: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 10c774: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c777: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c77a: 5b pop %ebx 10c77b: 5e pop %esi _Watchdog_Insert_ticks( &the_period->Timer, length ); 10c77c: 83 c0 10 add $0x10,%eax 10c77f: 50 push %eax 10c780: 68 44 85 12 00 push $0x128544 10c785: e8 52 39 00 00 call 1100dc <_Watchdog_Insert> _Thread_Enable_dispatch(); 10c78a: e8 8d 28 00 00 call 10f01c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c78f: 83 c4 10 add $0x10,%esp 10c792: 31 c0 xor %eax,%eax 10c794: e9 60 ff ff ff jmp 10c6f9 10c799: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 10c79c: 83 ec 0c sub $0xc,%esp 10c79f: 50 push %eax 10c7a0: 89 45 d4 mov %eax,-0x2c(%ebp) 10c7a3: e8 34 fe ff ff call 10c5dc <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 10c7a8: 57 push %edi 10c7a9: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 10c7aa: 8b 45 d4 mov -0x2c(%ebp),%eax 10c7ad: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) the_period->next_length = length; 10c7b4: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c7b7: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c7ba: 5b pop %ebx 10c7bb: 5e pop %esi _Watchdog_Insert_ticks( &the_period->Timer, length ); 10c7bc: 83 c0 10 add $0x10,%eax 10c7bf: 50 push %eax 10c7c0: 68 44 85 12 00 push $0x128544 10c7c5: e8 12 39 00 00 call 1100dc <_Watchdog_Insert> _Thread_Enable_dispatch(); 10c7ca: e8 4d 28 00 00 call 10f01c <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 10c7cf: 83 c4 10 add $0x10,%esp 10c7d2: b8 06 00 00 00 mov $0x6,%eax 10c7d7: e9 1d ff ff ff jmp 10c6f9 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 10c7dc: 8b 40 38 mov 0x38(%eax),%eax 10c7df: 83 f8 04 cmp $0x4,%eax 10c7e2: 77 78 ja 10c85c <== NEVER TAKEN 10c7e4: 8b 04 85 48 22 12 00 mov 0x122248(,%eax,4),%eax case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 10c7eb: 89 45 d4 mov %eax,-0x2c(%ebp) 10c7ee: e8 29 28 00 00 call 10f01c <_Thread_Enable_dispatch> return( return_value ); 10c7f3: 8b 45 d4 mov -0x2c(%ebp),%eax 10c7f6: e9 fe fe ff ff jmp 10c6f9 10c7fb: 90 nop <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 10c7fc: 83 ec 0c sub $0xc,%esp 10c7ff: 50 push %eax 10c800: 89 45 d4 mov %eax,-0x2c(%ebp) 10c803: e8 d4 fd ff ff call 10c5dc <_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; 10c808: 8b 45 d4 mov -0x2c(%ebp),%eax 10c80b: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) the_period->next_length = length; 10c812: 89 70 3c mov %esi,0x3c(%eax) _ISR_Enable( level ); 10c815: 57 push %edi 10c816: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 10c817: 8b 15 18 87 12 00 mov 0x128718,%edx 10c81d: 8b 48 08 mov 0x8(%eax),%ecx 10c820: 89 4a 20 mov %ecx,0x20(%edx) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10c823: 5f pop %edi 10c824: 59 pop %ecx 10c825: 68 00 40 00 00 push $0x4000 10c82a: 52 push %edx 10c82b: 89 45 d4 mov %eax,-0x2c(%ebp) 10c82e: e8 9d 30 00 00 call 10f8d0 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 10c833: 9c pushf 10c834: fa cli 10c835: 59 pop %ecx local_state = the_period->state; 10c836: 8b 45 d4 mov -0x2c(%ebp),%eax 10c839: 8b 50 38 mov 0x38(%eax),%edx the_period->state = RATE_MONOTONIC_ACTIVE; 10c83c: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) _ISR_Enable( level ); 10c843: 51 push %ecx 10c844: 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 ) 10c845: 83 c4 10 add $0x10,%esp 10c848: 83 fa 03 cmp $0x3,%edx 10c84b: 74 13 je 10c860 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 10c84d: e8 ca 27 00 00 call 10f01c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c852: 31 c0 xor %eax,%eax 10c854: e9 a0 fe ff ff jmp 10c6f9 10c859: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 10c85c: 31 c0 xor %eax,%eax <== NOT EXECUTED 10c85e: eb 8b jmp 10c7eb <== NOT EXECUTED /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10c860: 83 ec 08 sub $0x8,%esp 10c863: 68 00 40 00 00 push $0x4000 10c868: ff 35 18 87 12 00 pushl 0x128718 10c86e: e8 e5 23 00 00 call 10ec58 <_Thread_Clear_state> 10c873: 83 c4 10 add $0x10,%esp 10c876: eb d5 jmp 10c84d =============================================================================== 0010c878 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 10c878: 55 push %ebp 10c879: 89 e5 mov %esp,%ebp 10c87b: 57 push %edi 10c87c: 56 push %esi 10c87d: 53 push %ebx 10c87e: 81 ec 8c 00 00 00 sub $0x8c,%esp 10c884: 8b 75 08 mov 0x8(%ebp),%esi rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 10c887: 8b 7d 0c mov 0xc(%ebp),%edi 10c88a: 85 ff test %edi,%edi 10c88c: 0f 84 be 00 00 00 je 10c950 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 10c892: 83 ec 08 sub $0x8,%esp 10c895: 68 5c 22 12 00 push $0x12225c 10c89a: 56 push %esi 10c89b: ff 55 0c call *0xc(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 10c89e: 59 pop %ecx 10c89f: 5b pop %ebx 10c8a0: 68 94 22 12 00 push $0x122294 10c8a5: 56 push %esi 10c8a6: ff 55 0c call *0xc(%ebp) (*print)( context, "--- Wall times are in seconds ---\n" ); 10c8a9: 58 pop %eax 10c8aa: 5a pop %edx 10c8ab: 68 b8 22 12 00 push $0x1222b8 10c8b0: 56 push %esi 10c8b1: ff 55 0c call *0xc(%ebp) Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 10c8b4: 5b pop %ebx 10c8b5: 5f pop %edi 10c8b6: 68 dc 22 12 00 push $0x1222dc 10c8bb: 56 push %esi 10c8bc: ff 55 0c call *0xc(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 10c8bf: 5a pop %edx 10c8c0: 59 pop %ecx 10c8c1: 68 28 23 12 00 push $0x122328 10c8c6: 56 push %esi 10c8c7: ff 55 0c call *0xc(%ebp) /* * 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 ; 10c8ca: 8b 1d 88 83 12 00 mov 0x128388,%ebx 10c8d0: 83 c4 10 add $0x10,%esp 10c8d3: 3b 1d 8c 83 12 00 cmp 0x12838c,%ebx 10c8d9: 77 75 ja 10c950 <== NEVER TAKEN 10c8db: 8d 7d 88 lea -0x78(%ebp),%edi 10c8de: eb 09 jmp 10c8e9 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 10c8e0: 43 inc %ebx /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 10c8e1: 39 1d 8c 83 12 00 cmp %ebx,0x12838c 10c8e7: 72 67 jb 10c950 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 10c8e9: 83 ec 08 sub $0x8,%esp 10c8ec: 57 push %edi 10c8ed: 53 push %ebx 10c8ee: e8 dd 53 00 00 call 111cd0 if ( status != RTEMS_SUCCESSFUL ) 10c8f3: 83 c4 10 add $0x10,%esp 10c8f6: 85 c0 test %eax,%eax 10c8f8: 75 e6 jne 10c8e0 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 10c8fa: 83 ec 08 sub $0x8,%esp 10c8fd: 8d 45 c0 lea -0x40(%ebp),%eax 10c900: 50 push %eax 10c901: 53 push %ebx 10c902: e8 75 54 00 00 call 111d7c #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 10c907: 83 c4 0c add $0xc,%esp 10c90a: 8d 55 e3 lea -0x1d(%ebp),%edx 10c90d: 52 push %edx 10c90e: 6a 05 push $0x5 10c910: ff 75 c0 pushl -0x40(%ebp) 10c913: e8 b4 02 00 00 call 10cbcc /* * Print part of report line that is not dependent on granularity */ (*print)( context, 10c918: 59 pop %ecx 10c919: 58 pop %eax 10c91a: ff 75 8c pushl -0x74(%ebp) 10c91d: ff 75 88 pushl -0x78(%ebp) 10c920: 8d 45 e3 lea -0x1d(%ebp),%eax 10c923: 50 push %eax 10c924: 53 push %ebx 10c925: 68 7a 22 12 00 push $0x12227a 10c92a: 56 push %esi 10c92b: ff 55 0c call *0xc(%ebp) ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 10c92e: 8b 45 88 mov -0x78(%ebp),%eax 10c931: 83 c4 20 add $0x20,%esp 10c934: 85 c0 test %eax,%eax 10c936: 75 20 jne 10c958 (*print)( context, "\n" ); 10c938: 83 ec 08 sub $0x8,%esp 10c93b: 68 f1 03 12 00 push $0x1203f1 10c940: 56 push %esi 10c941: ff 55 0c call *0xc(%ebp) continue; 10c944: 83 c4 10 add $0x10,%esp * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 10c947: 43 inc %ebx /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 10c948: 39 1d 8c 83 12 00 cmp %ebx,0x12838c 10c94e: 73 99 jae 10c8e9 <== ALWAYS TAKEN the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 10c950: 8d 65 f4 lea -0xc(%ebp),%esp 10c953: 5b pop %ebx 10c954: 5e pop %esi 10c955: 5f pop %edi 10c956: c9 leave 10c957: c3 ret struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 10c958: 52 push %edx 10c959: 8d 55 d8 lea -0x28(%ebp),%edx 10c95c: 52 push %edx 10c95d: 50 push %eax 10c95e: 8d 45 a0 lea -0x60(%ebp),%eax 10c961: 50 push %eax 10c962: e8 d5 33 00 00 call 10fd3c <_Timespec_Divide_by_integer> (*print)( context, 10c967: b9 d3 4d 62 10 mov $0x10624dd3,%ecx 10c96c: 8b 45 dc mov -0x24(%ebp),%eax 10c96f: f7 e9 imul %ecx 10c971: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c977: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c97d: c1 f8 06 sar $0x6,%eax 10c980: 8b 55 dc mov -0x24(%ebp),%edx 10c983: c1 fa 1f sar $0x1f,%edx 10c986: 29 d0 sub %edx,%eax 10c988: 50 push %eax 10c989: ff 75 d8 pushl -0x28(%ebp) 10c98c: 8b 45 9c mov -0x64(%ebp),%eax 10c98f: f7 e9 imul %ecx 10c991: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c997: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c99d: c1 f8 06 sar $0x6,%eax 10c9a0: 8b 55 9c mov -0x64(%ebp),%edx 10c9a3: c1 fa 1f sar $0x1f,%edx 10c9a6: 29 d0 sub %edx,%eax 10c9a8: 50 push %eax 10c9a9: ff 75 98 pushl -0x68(%ebp) 10c9ac: 8b 45 94 mov -0x6c(%ebp),%eax 10c9af: f7 e9 imul %ecx 10c9b1: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) 10c9b7: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c9bd: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c9c3: c1 f8 06 sar $0x6,%eax 10c9c6: 8b 55 94 mov -0x6c(%ebp),%edx 10c9c9: c1 fa 1f sar $0x1f,%edx 10c9cc: 29 d0 sub %edx,%eax 10c9ce: 50 push %eax 10c9cf: ff 75 90 pushl -0x70(%ebp) 10c9d2: 68 74 23 12 00 push $0x122374 10c9d7: 56 push %esi 10c9d8: 89 4d 84 mov %ecx,-0x7c(%ebp) 10c9db: ff 55 0c call *0xc(%ebp) struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 10c9de: 83 c4 2c add $0x2c,%esp 10c9e1: 8d 55 d8 lea -0x28(%ebp),%edx 10c9e4: 52 push %edx 10c9e5: ff 75 88 pushl -0x78(%ebp) 10c9e8: 8d 45 b8 lea -0x48(%ebp),%eax 10c9eb: 50 push %eax 10c9ec: e8 4b 33 00 00 call 10fd3c <_Timespec_Divide_by_integer> (*print)( context, 10c9f1: 8b 4d 84 mov -0x7c(%ebp),%ecx 10c9f4: 8b 45 dc mov -0x24(%ebp),%eax 10c9f7: f7 e9 imul %ecx 10c9f9: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c9ff: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10ca05: c1 f8 06 sar $0x6,%eax 10ca08: 8b 55 dc mov -0x24(%ebp),%edx 10ca0b: c1 fa 1f sar $0x1f,%edx 10ca0e: 29 d0 sub %edx,%eax 10ca10: 50 push %eax 10ca11: ff 75 d8 pushl -0x28(%ebp) 10ca14: 8b 45 b4 mov -0x4c(%ebp),%eax 10ca17: f7 e9 imul %ecx 10ca19: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10ca1f: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10ca25: c1 f8 06 sar $0x6,%eax 10ca28: 8b 55 b4 mov -0x4c(%ebp),%edx 10ca2b: c1 fa 1f sar $0x1f,%edx 10ca2e: 29 d0 sub %edx,%eax 10ca30: 50 push %eax 10ca31: ff 75 b0 pushl -0x50(%ebp) 10ca34: 8b 45 ac mov -0x54(%ebp),%eax 10ca37: f7 e9 imul %ecx 10ca39: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) 10ca3f: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10ca45: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10ca4b: c1 f8 06 sar $0x6,%eax 10ca4e: 8b 55 ac mov -0x54(%ebp),%edx 10ca51: c1 fa 1f sar $0x1f,%edx 10ca54: 29 d0 sub %edx,%eax 10ca56: 50 push %eax 10ca57: ff 75 a8 pushl -0x58(%ebp) 10ca5a: 68 94 23 12 00 push $0x122394 10ca5f: 56 push %esi 10ca60: ff 55 0c call *0xc(%ebp) 10ca63: 83 c4 30 add $0x30,%esp 10ca66: e9 75 fe ff ff jmp 10c8e0 =============================================================================== 0010ca84 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 10ca84: 55 push %ebp 10ca85: 89 e5 mov %esp,%ebp 10ca87: 53 push %ebx 10ca88: 83 ec 04 sub $0x4,%esp 10ca8b: a1 74 84 12 00 mov 0x128474,%eax 10ca90: 40 inc %eax 10ca91: a3 74 84 12 00 mov %eax,0x128474 /* * Cycle through all possible ids and try to reset 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 ; 10ca96: 8b 1d 88 83 12 00 mov 0x128388,%ebx 10ca9c: 3b 1d 8c 83 12 00 cmp 0x12838c,%ebx 10caa2: 77 15 ja 10cab9 <== NEVER TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 10caa4: 83 ec 0c sub $0xc,%esp 10caa7: 53 push %ebx 10caa8: e8 17 00 00 00 call 10cac4 * Cycle through all possible ids and try to reset 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++ ) { 10caad: 43 inc %ebx /* * Cycle through all possible ids and try to reset 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 ; 10caae: 83 c4 10 add $0x10,%esp 10cab1: 39 1d 8c 83 12 00 cmp %ebx,0x12838c 10cab7: 73 eb jae 10caa4 /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 10cab9: 8b 5d fc mov -0x4(%ebp),%ebx 10cabc: c9 leave } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 10cabd: e9 5a 25 00 00 jmp 10f01c <_Thread_Enable_dispatch> =============================================================================== 0010cac4 : */ rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id ) { 10cac4: 55 push %ebp 10cac5: 89 e5 mov %esp,%ebp 10cac7: 57 push %edi 10cac8: 53 push %ebx 10cac9: 83 ec 14 sub $0x14,%esp Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); 10cacc: 8d 45 f4 lea -0xc(%ebp),%eax 10cacf: 50 push %eax 10cad0: ff 75 08 pushl 0x8(%ebp) 10cad3: 68 80 83 12 00 push $0x128380 10cad8: e8 db 1c 00 00 call 10e7b8 <_Objects_Get> 10cadd: 89 c2 mov %eax,%edx switch ( location ) { 10cadf: 83 c4 10 add $0x10,%esp 10cae2: 8b 45 f4 mov -0xc(%ebp),%eax 10cae5: 85 c0 test %eax,%eax 10cae7: 75 3b jne 10cb24 case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 10cae9: 8d 5a 54 lea 0x54(%edx),%ebx 10caec: b9 38 00 00 00 mov $0x38,%ecx 10caf1: 31 c0 xor %eax,%eax 10caf3: 89 df mov %ebx,%edi 10caf5: f3 aa rep stos %al,%es:(%edi) 10caf7: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10cafe: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10cb05: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10cb0c: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) _Thread_Enable_dispatch(); 10cb13: e8 04 25 00 00 call 10f01c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10cb18: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cb1a: 8d 65 f8 lea -0x8(%ebp),%esp 10cb1d: 5b pop %ebx 10cb1e: 5f pop %edi 10cb1f: c9 leave 10cb20: c3 ret 10cb21: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10cb24: b8 04 00 00 00 mov $0x4,%eax } 10cb29: 8d 65 f8 lea -0x8(%ebp),%esp 10cb2c: 5b pop %ebx 10cb2d: 5f pop %edi 10cb2e: c9 leave 10cb2f: c3 ret =============================================================================== 00117360 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 117360: 55 push %ebp 117361: 89 e5 mov %esp,%ebp 117363: 57 push %edi 117364: 56 push %esi 117365: 53 push %ebx 117366: 83 ec 1c sub $0x1c,%esp 117369: 8b 75 08 mov 0x8(%ebp),%esi 11736c: 8b 5d 0c mov 0xc(%ebp),%ebx 11736f: 8b 7d 1c mov 0x1c(%ebp),%edi rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 117372: 85 f6 test %esi,%esi 117374: 0f 84 92 00 00 00 je 11740c return RTEMS_INVALID_NAME; if ( !starting_address ) 11737a: 85 db test %ebx,%ebx 11737c: 74 09 je 117387 return RTEMS_INVALID_ADDRESS; if ( !id ) 11737e: 85 ff test %edi,%edi 117380: 74 05 je 117387 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 117382: f6 c3 03 test $0x3,%bl 117385: 74 0d je 117394 return RTEMS_INVALID_ADDRESS; 117387: b8 09 00 00 00 mov $0x9,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 11738c: 8d 65 f4 lea -0xc(%ebp),%esp 11738f: 5b pop %ebx 117390: 5e pop %esi 117391: 5f pop %edi 117392: c9 leave 117393: c3 ret return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 117394: 83 ec 0c sub $0xc,%esp 117397: ff 35 24 08 14 00 pushl 0x140824 11739d: e8 a6 24 00 00 call 119848 <_API_Mutex_Lock> * This function allocates a region control block from * the inactive chain of free region control blocks. */ RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void ) { return (Region_Control *) _Objects_Allocate( &_Region_Information ); 1173a2: c7 04 24 80 06 14 00 movl $0x140680,(%esp) 1173a9: e8 c2 39 00 00 call 11ad70 <_Objects_Allocate> 1173ae: 89 c2 mov %eax,%edx the_region = _Region_Allocate(); if ( !the_region ) 1173b0: 83 c4 10 add $0x10,%esp 1173b3: 85 c0 test %eax,%eax 1173b5: 74 65 je 11741c return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 1173b7: ff 75 14 pushl 0x14(%ebp) 1173ba: ff 75 10 pushl 0x10(%ebp) 1173bd: 53 push %ebx 1173be: 8d 40 68 lea 0x68(%eax),%eax 1173c1: 50 push %eax 1173c2: 89 55 e4 mov %edx,-0x1c(%ebp) 1173c5: e8 be 34 00 00 call 11a888 <_Heap_Initialize> 1173ca: 8b 55 e4 mov -0x1c(%ebp),%edx 1173cd: 89 42 5c mov %eax,0x5c(%edx) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 1173d0: 83 c4 10 add $0x10,%esp 1173d3: 85 c0 test %eax,%eax 1173d5: 75 4d jne 117424 */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 1173d7: 83 ec 08 sub $0x8,%esp 1173da: 52 push %edx 1173db: 68 80 06 14 00 push $0x140680 1173e0: e8 03 3d 00 00 call 11b0e8 <_Objects_Free> 1173e5: 83 c4 10 add $0x10,%esp _Region_Free( the_region ); return_status = RTEMS_INVALID_SIZE; 1173e8: b8 08 00 00 00 mov $0x8,%eax *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 1173ed: 83 ec 0c sub $0xc,%esp 1173f0: ff 35 24 08 14 00 pushl 0x140824 1173f6: 89 45 e4 mov %eax,-0x1c(%ebp) 1173f9: e8 92 24 00 00 call 119890 <_API_Mutex_Unlock> return return_status; 1173fe: 83 c4 10 add $0x10,%esp 117401: 8b 45 e4 mov -0x1c(%ebp),%eax } 117404: 8d 65 f4 lea -0xc(%ebp),%esp 117407: 5b pop %ebx 117408: 5e pop %esi 117409: 5f pop %edi 11740a: c9 leave 11740b: c3 ret { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 11740c: b8 03 00 00 00 mov $0x3,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 117411: 8d 65 f4 lea -0xc(%ebp),%esp 117414: 5b pop %ebx 117415: 5e pop %esi 117416: 5f pop %edi 117417: c9 leave 117418: c3 ret 117419: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region ) return_status = RTEMS_TOO_MANY; 11741c: b8 05 00 00 00 mov $0x5,%eax 117421: eb ca jmp 1173ed 117423: 90 nop <== NOT EXECUTED return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 117424: 89 5a 50 mov %ebx,0x50(%edx) the_region->length = length; 117427: 8b 45 10 mov 0x10(%ebp),%eax 11742a: 89 42 54 mov %eax,0x54(%edx) the_region->page_size = page_size; 11742d: 8b 45 14 mov 0x14(%ebp),%eax 117430: 89 42 58 mov %eax,0x58(%edx) the_region->attribute_set = attribute_set; 117433: 8b 45 18 mov 0x18(%ebp),%eax 117436: 89 42 60 mov %eax,0x60(%edx) the_region->number_of_used_blocks = 0; 117439: c7 42 64 00 00 00 00 movl $0x0,0x64(%edx) _Thread_queue_Initialize( 117440: 6a 06 push $0x6 117442: 6a 40 push $0x40 117444: a8 04 test $0x4,%al 117446: 0f 95 c0 setne %al 117449: 0f b6 c0 movzbl %al,%eax 11744c: 50 push %eax 11744d: 8d 42 10 lea 0x10(%edx),%eax 117450: 50 push %eax 117451: 89 55 e4 mov %edx,-0x1c(%ebp) 117454: e8 b3 4d 00 00 call 11c20c <_Thread_queue_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 117459: 8b 55 e4 mov -0x1c(%ebp),%edx 11745c: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 11745f: 0f b7 d8 movzwl %ax,%ebx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 117462: 8b 0d 9c 06 14 00 mov 0x14069c,%ecx 117468: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 11746b: 89 72 0c mov %esi,0xc(%edx) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 11746e: 89 07 mov %eax,(%edi) 117470: 83 c4 10 add $0x10,%esp return_status = RTEMS_SUCCESSFUL; 117473: 31 c0 xor %eax,%eax 117475: e9 73 ff ff ff jmp 1173ed =============================================================================== 0011747c : */ rtems_status_code rtems_region_delete( rtems_id id ) { 11747c: 55 push %ebp 11747d: 89 e5 mov %esp,%ebp 11747f: 53 push %ebx 117480: 83 ec 30 sub $0x30,%esp Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 117483: ff 35 24 08 14 00 pushl 0x140824 117489: e8 ba 23 00 00 call 119848 <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 11748e: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 117491: 8d 45 f4 lea -0xc(%ebp),%eax 117494: 50 push %eax 117495: ff 75 08 pushl 0x8(%ebp) 117498: 68 80 06 14 00 push $0x140680 11749d: e8 7e 3d 00 00 call 11b220 <_Objects_Get_no_protection> switch ( location ) { 1174a2: 83 c4 10 add $0x10,%esp 1174a5: 8b 5d f4 mov -0xc(%ebp),%ebx 1174a8: 85 db test %ebx,%ebx 1174aa: 74 1c je 1174c8 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 1174ac: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 1174b1: 83 ec 0c sub $0xc,%esp 1174b4: ff 35 24 08 14 00 pushl 0x140824 1174ba: e8 d1 23 00 00 call 119890 <_API_Mutex_Unlock> return return_status; } 1174bf: 89 d8 mov %ebx,%eax 1174c1: 8b 5d fc mov -0x4(%ebp),%ebx 1174c4: c9 leave 1174c5: c3 ret 1174c6: 66 90 xchg %ax,%ax <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 ) 1174c8: 8b 48 64 mov 0x64(%eax),%ecx 1174cb: 85 c9 test %ecx,%ecx 1174cd: 74 09 je 1174d8 return_status = RTEMS_RESOURCE_IN_USE; 1174cf: bb 0c 00 00 00 mov $0xc,%ebx 1174d4: eb db jmp 1174b1 1174d6: 66 90 xchg %ax,%ax <== NOT EXECUTED else { _Objects_Close( &_Region_Information, &the_region->Object ); 1174d8: 83 ec 08 sub $0x8,%esp 1174db: 50 push %eax 1174dc: 68 80 06 14 00 push $0x140680 1174e1: 89 45 e4 mov %eax,-0x1c(%ebp) 1174e4: e8 03 39 00 00 call 11adec <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 1174e9: 58 pop %eax 1174ea: 5a pop %edx 1174eb: 8b 45 e4 mov -0x1c(%ebp),%eax 1174ee: 50 push %eax 1174ef: 68 80 06 14 00 push $0x140680 1174f4: e8 ef 3b 00 00 call 11b0e8 <_Objects_Free> 1174f9: 83 c4 10 add $0x10,%esp _Region_Free( the_region ); return_status = RTEMS_SUCCESSFUL; 1174fc: 31 db xor %ebx,%ebx 1174fe: eb b1 jmp 1174b1 =============================================================================== 00117500 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 117500: 55 push %ebp 117501: 89 e5 mov %esp,%ebp 117503: 56 push %esi 117504: 53 push %ebx 117505: 83 ec 10 sub $0x10,%esp 117508: 8b 5d 0c mov 0xc(%ebp),%ebx bool extend_ok; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 11750b: 85 db test %ebx,%ebx 11750d: 74 75 je 117584 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 11750f: 83 ec 0c sub $0xc,%esp 117512: ff 35 24 08 14 00 pushl 0x140824 117518: e8 2b 23 00 00 call 119848 <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 11751d: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 117520: 8d 45 f0 lea -0x10(%ebp),%eax 117523: 50 push %eax 117524: ff 75 08 pushl 0x8(%ebp) 117527: 68 80 06 14 00 push $0x140680 11752c: e8 ef 3c 00 00 call 11b220 <_Objects_Get_no_protection> 117531: 89 c6 mov %eax,%esi switch ( location ) { 117533: 83 c4 10 add $0x10,%esp 117536: 8b 45 f0 mov -0x10(%ebp),%eax 117539: 85 c0 test %eax,%eax 11753b: 74 1f je 11755c break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 11753d: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 117542: 83 ec 0c sub $0xc,%esp 117545: ff 35 24 08 14 00 pushl 0x140824 11754b: e8 40 23 00 00 call 119890 <_API_Mutex_Unlock> return return_status; 117550: 83 c4 10 add $0x10,%esp } 117553: 89 d8 mov %ebx,%eax 117555: 8d 65 f8 lea -0x8(%ebp),%esp 117558: 5b pop %ebx 117559: 5e pop %esi 11755a: c9 leave 11755b: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: extend_ok = _Heap_Extend( 11755c: 8d 45 f4 lea -0xc(%ebp),%eax 11755f: 50 push %eax 117560: ff 75 10 pushl 0x10(%ebp) 117563: 53 push %ebx 117564: 8d 46 68 lea 0x68(%esi),%eax 117567: 50 push %eax 117568: e8 27 2e 00 00 call 11a394 <_Heap_Extend> starting_address, length, &amount_extended ); if ( extend_ok ) { 11756d: 83 c4 10 add $0x10,%esp 117570: 84 c0 test %al,%al 117572: 74 20 je 117594 the_region->length += amount_extended; 117574: 8b 45 f4 mov -0xc(%ebp),%eax 117577: 01 46 54 add %eax,0x54(%esi) the_region->maximum_segment_size += amount_extended; 11757a: 01 46 5c add %eax,0x5c(%esi) return_status = RTEMS_SUCCESSFUL; 11757d: 31 db xor %ebx,%ebx 11757f: eb c1 jmp 117542 117581: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) return RTEMS_INVALID_ADDRESS; 117584: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 117589: 89 d8 mov %ebx,%eax 11758b: 8d 65 f8 lea -0x8(%ebp),%esp 11758e: 5b pop %ebx 11758f: 5e pop %esi 117590: c9 leave 117591: c3 ret 117592: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( extend_ok ) { the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else { return_status = RTEMS_INVALID_ADDRESS; 117594: bb 09 00 00 00 mov $0x9,%ebx 117599: eb a7 jmp 117542 =============================================================================== 0011759c : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { 11759c: 55 push %ebp 11759d: 89 e5 mov %esp,%ebp 11759f: 53 push %ebx 1175a0: 83 ec 14 sub $0x14,%esp 1175a3: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 1175a6: 85 db test %ebx,%ebx 1175a8: 74 76 je 117620 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 1175aa: 83 ec 0c sub $0xc,%esp 1175ad: ff 35 24 08 14 00 pushl 0x140824 1175b3: e8 90 22 00 00 call 119848 <_API_Mutex_Lock> 1175b8: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1175bb: 8d 45 f4 lea -0xc(%ebp),%eax 1175be: 50 push %eax 1175bf: ff 75 08 pushl 0x8(%ebp) 1175c2: 68 80 06 14 00 push $0x140680 1175c7: e8 54 3c 00 00 call 11b220 <_Objects_Get_no_protection> switch ( location ) { 1175cc: 83 c4 10 add $0x10,%esp 1175cf: 8b 55 f4 mov -0xc(%ebp),%edx 1175d2: 85 d2 test %edx,%edx 1175d4: 74 1e je 1175f4 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 1175d6: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 1175db: 83 ec 0c sub $0xc,%esp 1175de: ff 35 24 08 14 00 pushl 0x140824 1175e4: e8 a7 22 00 00 call 119890 <_API_Mutex_Unlock> return return_status; 1175e9: 83 c4 10 add $0x10,%esp } 1175ec: 89 d8 mov %ebx,%eax 1175ee: 8b 5d fc mov -0x4(%ebp),%ebx 1175f1: c9 leave 1175f2: c3 ret 1175f3: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; 1175f4: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) the_info->Used.total = 0; 1175fb: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) the_info->Used.largest = 0; 117602: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 117609: 83 ec 08 sub $0x8,%esp 11760c: 53 push %ebx 11760d: 83 c0 68 add $0x68,%eax 117610: 50 push %eax 117611: e8 5a 31 00 00 call 11a770 <_Heap_Get_free_information> return_status = RTEMS_SUCCESSFUL; break; 117616: 83 c4 10 add $0x10,%esp the_info->Used.total = 0; the_info->Used.largest = 0; _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); return_status = RTEMS_SUCCESSFUL; 117619: 31 db xor %ebx,%ebx break; 11761b: eb be jmp 1175db 11761d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) return RTEMS_INVALID_ADDRESS; 117620: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 117625: 89 d8 mov %ebx,%eax 117627: 8b 5d fc mov -0x4(%ebp),%ebx 11762a: c9 leave 11762b: c3 ret =============================================================================== 0011762c : rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { 11762c: 55 push %ebp 11762d: 89 e5 mov %esp,%ebp 11762f: 53 push %ebx 117630: 83 ec 14 sub $0x14,%esp 117633: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 117636: 85 db test %ebx,%ebx 117638: 74 5e je 117698 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 11763a: 83 ec 0c sub $0xc,%esp 11763d: ff 35 24 08 14 00 pushl 0x140824 117643: e8 00 22 00 00 call 119848 <_API_Mutex_Lock> 117648: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 11764b: 8d 45 f4 lea -0xc(%ebp),%eax 11764e: 50 push %eax 11764f: ff 75 08 pushl 0x8(%ebp) 117652: 68 80 06 14 00 push $0x140680 117657: e8 c4 3b 00 00 call 11b220 <_Objects_Get_no_protection> switch ( location ) { 11765c: 83 c4 10 add $0x10,%esp 11765f: 8b 55 f4 mov -0xc(%ebp),%edx 117662: 85 d2 test %edx,%edx 117664: 74 1e je 117684 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 117666: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 11766b: 83 ec 0c sub $0xc,%esp 11766e: ff 35 24 08 14 00 pushl 0x140824 117674: e8 17 22 00 00 call 119890 <_API_Mutex_Unlock> return return_status; 117679: 83 c4 10 add $0x10,%esp } 11767c: 89 d8 mov %ebx,%eax 11767e: 8b 5d fc mov -0x4(%ebp),%ebx 117681: c9 leave 117682: c3 ret 117683: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); 117684: 83 ec 08 sub $0x8,%esp 117687: 53 push %ebx 117688: 83 c0 68 add $0x68,%eax 11768b: 50 push %eax 11768c: e8 3f 31 00 00 call 11a7d0 <_Heap_Get_information> return_status = RTEMS_SUCCESSFUL; break; 117691: 83 c4 10 add $0x10,%esp the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); return_status = RTEMS_SUCCESSFUL; 117694: 31 db xor %ebx,%ebx break; 117696: eb d3 jmp 11766b Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) return RTEMS_INVALID_ADDRESS; 117698: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 11769d: 89 d8 mov %ebx,%eax 11769f: 8b 5d fc mov -0x4(%ebp),%ebx 1176a2: c9 leave 1176a3: c3 ret =============================================================================== 001176a4 : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 1176a4: 55 push %ebp 1176a5: 89 e5 mov %esp,%ebp 1176a7: 57 push %edi 1176a8: 56 push %esi 1176a9: 53 push %ebx 1176aa: 83 ec 2c sub $0x2c,%esp 1176ad: 8b 75 0c mov 0xc(%ebp),%esi 1176b0: 8b 5d 18 mov 0x18(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 1176b3: 85 db test %ebx,%ebx 1176b5: 0f 84 a1 00 00 00 je 11775c return RTEMS_INVALID_ADDRESS; *segment = NULL; 1176bb: c7 03 00 00 00 00 movl $0x0,(%ebx) if ( size == 0 ) 1176c1: 85 f6 test %esi,%esi 1176c3: 75 0f jne 1176d4 return RTEMS_INVALID_SIZE; 1176c5: b8 08 00 00 00 mov $0x8,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 1176ca: 8d 65 f4 lea -0xc(%ebp),%esp 1176cd: 5b pop %ebx 1176ce: 5e pop %esi 1176cf: 5f pop %edi 1176d0: c9 leave 1176d1: c3 ret 1176d2: 66 90 xchg %ax,%ax <== NOT EXECUTED *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 1176d4: 83 ec 0c sub $0xc,%esp 1176d7: ff 35 24 08 14 00 pushl 0x140824 1176dd: e8 66 21 00 00 call 119848 <_API_Mutex_Lock> executing = _Thread_Executing; 1176e2: a1 18 0a 14 00 mov 0x140a18,%eax 1176e7: 89 45 d4 mov %eax,-0x2c(%ebp) 1176ea: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1176ed: 8d 45 e4 lea -0x1c(%ebp),%eax 1176f0: 50 push %eax 1176f1: ff 75 08 pushl 0x8(%ebp) 1176f4: 68 80 06 14 00 push $0x140680 1176f9: e8 22 3b 00 00 call 11b220 <_Objects_Get_no_protection> 1176fe: 89 c7 mov %eax,%edi switch ( location ) { 117700: 83 c4 10 add $0x10,%esp 117703: 8b 45 e4 mov -0x1c(%ebp),%eax 117706: 85 c0 test %eax,%eax 117708: 75 2a jne 117734 case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 11770a: 3b 77 5c cmp 0x5c(%edi),%esi 11770d: 76 2d jbe 11773c return_status = RTEMS_INVALID_SIZE; 11770f: b8 08 00 00 00 mov $0x8,%eax default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117714: 83 ec 0c sub $0xc,%esp 117717: ff 35 24 08 14 00 pushl 0x140824 11771d: 89 45 d0 mov %eax,-0x30(%ebp) 117720: e8 6b 21 00 00 call 119890 <_API_Mutex_Unlock> return return_status; 117725: 83 c4 10 add $0x10,%esp 117728: 8b 45 d0 mov -0x30(%ebp),%eax } 11772b: 8d 65 f4 lea -0xc(%ebp),%esp 11772e: 5b pop %ebx 11772f: 5e pop %esi 117730: 5f pop %edi 117731: c9 leave 117732: c3 ret 117733: 90 nop <== NOT EXECUTED break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 117734: b8 04 00 00 00 mov $0x4,%eax 117739: eb d9 jmp 117714 11773b: 90 nop <== NOT EXECUTED * @brief See _Heap_Allocate_aligned_with_boundary() with alignment and * boundary equals zero. */ RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 11773c: 6a 00 push $0x0 11773e: 6a 00 push $0x0 117740: 56 push %esi RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uintptr_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 117741: 8d 47 68 lea 0x68(%edi),%eax 117744: 50 push %eax 117745: e8 82 2a 00 00 call 11a1cc <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 11774a: 83 c4 10 add $0x10,%esp 11774d: 85 c0 test %eax,%eax 11774f: 74 17 je 117768 the_region->number_of_used_blocks += 1; 117751: ff 47 64 incl 0x64(%edi) *segment = the_segment; 117754: 89 03 mov %eax,(%ebx) return_status = RTEMS_SUCCESSFUL; 117756: 31 c0 xor %eax,%eax 117758: eb ba jmp 117714 11775a: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) return RTEMS_INVALID_ADDRESS; 11775c: b8 09 00 00 00 mov $0x9,%eax 117761: e9 64 ff ff ff jmp 1176ca 117766: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( the_segment ) { the_region->number_of_used_blocks += 1; *segment = the_segment; return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) { 117768: f6 45 10 01 testb $0x1,0x10(%ebp) 11776c: 74 07 je 117775 return_status = RTEMS_UNSATISFIED; 11776e: b8 0d 00 00 00 mov $0xd,%eax 117773: eb 9f jmp 117714 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 117775: a1 74 07 14 00 mov 0x140774,%eax 11777a: 40 inc %eax 11777b: a3 74 07 14 00 mov %eax,0x140774 * 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(); 117780: 83 ec 0c sub $0xc,%esp 117783: ff 35 24 08 14 00 pushl 0x140824 117789: e8 02 21 00 00 call 119890 <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 11778e: 8d 47 10 lea 0x10(%edi),%eax 117791: 8b 55 d4 mov -0x2c(%ebp),%edx 117794: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 117797: 8b 4d 08 mov 0x8(%ebp),%ecx 11779a: 89 4a 20 mov %ecx,0x20(%edx) executing->Wait.count = size; 11779d: 89 72 24 mov %esi,0x24(%edx) executing->Wait.return_argument = segment; 1177a0: 89 5a 28 mov %ebx,0x28(%edx) RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 1177a3: c7 47 40 01 00 00 00 movl $0x1,0x40(%edi) _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 1177aa: 83 c4 0c add $0xc,%esp 1177ad: 68 d0 c2 11 00 push $0x11c2d0 1177b2: ff 75 14 pushl 0x14(%ebp) 1177b5: 50 push %eax 1177b6: e8 c5 47 00 00 call 11bf80 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 1177bb: e8 00 43 00 00 call 11bac0 <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 1177c0: 8b 55 d4 mov -0x2c(%ebp),%edx 1177c3: 8b 42 34 mov 0x34(%edx),%eax 1177c6: 83 c4 10 add $0x10,%esp 1177c9: e9 fc fe ff ff jmp 1176ca =============================================================================== 001177d0 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 1177d0: 55 push %ebp 1177d1: 89 e5 mov %esp,%ebp 1177d3: 56 push %esi 1177d4: 53 push %ebx 1177d5: 83 ec 20 sub $0x20,%esp 1177d8: 8b 5d 0c mov 0xc(%ebp),%ebx 1177db: 8b 75 10 mov 0x10(%ebp),%esi Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 1177de: 85 db test %ebx,%ebx 1177e0: 74 72 je 117854 return RTEMS_INVALID_ADDRESS; if ( !size ) 1177e2: 85 f6 test %esi,%esi 1177e4: 74 6e je 117854 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 1177e6: 83 ec 0c sub $0xc,%esp 1177e9: ff 35 24 08 14 00 pushl 0x140824 1177ef: e8 54 20 00 00 call 119848 <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 1177f4: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1177f7: 8d 45 f4 lea -0xc(%ebp),%eax 1177fa: 50 push %eax 1177fb: ff 75 08 pushl 0x8(%ebp) 1177fe: 68 80 06 14 00 push $0x140680 117803: e8 18 3a 00 00 call 11b220 <_Objects_Get_no_protection> switch ( location ) { 117808: 83 c4 10 add $0x10,%esp 11780b: 8b 55 f4 mov -0xc(%ebp),%edx 11780e: 85 d2 test %edx,%edx 117810: 74 2a je 11783c void *segment, uintptr_t *size ) { Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; 117812: 31 c0 xor %eax,%eax 117814: 83 fa 01 cmp $0x1,%edx 117817: 0f 94 c0 sete %al 11781a: c1 e0 02 shl $0x2,%eax case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 11781d: 83 ec 0c sub $0xc,%esp 117820: ff 35 24 08 14 00 pushl 0x140824 117826: 89 45 e4 mov %eax,-0x1c(%ebp) 117829: e8 62 20 00 00 call 119890 <_API_Mutex_Unlock> return return_status; 11782e: 83 c4 10 add $0x10,%esp 117831: 8b 45 e4 mov -0x1c(%ebp),%eax } 117834: 8d 65 f8 lea -0x8(%ebp),%esp 117837: 5b pop %ebx 117838: 5e pop %esi 117839: c9 leave 11783a: c3 ret 11783b: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 11783c: 52 push %edx 11783d: 56 push %esi 11783e: 53 push %ebx 11783f: 83 c0 68 add $0x68,%eax 117842: 50 push %eax 117843: e8 44 34 00 00 call 11ac8c <_Heap_Size_of_alloc_area> 117848: 83 c4 10 add $0x10,%esp void *segment, uintptr_t *size ) { Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; 11784b: 3c 01 cmp $0x1,%al 11784d: 19 c0 sbb %eax,%eax 11784f: 83 e0 09 and $0x9,%eax 117852: eb c9 jmp 11781d if ( !segment ) return RTEMS_INVALID_ADDRESS; if ( !size ) return RTEMS_INVALID_ADDRESS; 117854: b8 09 00 00 00 mov $0x9,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117859: 8d 65 f8 lea -0x8(%ebp),%esp 11785c: 5b pop %ebx 11785d: 5e pop %esi 11785e: c9 leave 11785f: c3 ret =============================================================================== 00117884 : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 117884: 55 push %ebp 117885: 89 e5 mov %esp,%ebp 117887: 56 push %esi 117888: 53 push %ebx 117889: 83 ec 20 sub $0x20,%esp 11788c: 8b 5d 14 mov 0x14(%ebp),%ebx uintptr_t osize; rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 11788f: 85 db test %ebx,%ebx 117891: 0f 84 89 00 00 00 je 117920 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 117897: 83 ec 0c sub $0xc,%esp 11789a: ff 35 24 08 14 00 pushl 0x140824 1178a0: e8 a3 1f 00 00 call 119848 <_API_Mutex_Lock> 1178a5: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1178a8: 8d 45 f0 lea -0x10(%ebp),%eax 1178ab: 50 push %eax 1178ac: ff 75 08 pushl 0x8(%ebp) 1178af: 68 80 06 14 00 push $0x140680 1178b4: e8 67 39 00 00 call 11b220 <_Objects_Get_no_protection> 1178b9: 89 c6 mov %eax,%esi switch ( location ) { 1178bb: 83 c4 10 add $0x10,%esp 1178be: 8b 45 f0 mov -0x10(%ebp),%eax 1178c1: 85 c0 test %eax,%eax 1178c3: 74 1f je 1178e4 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1178c5: 83 ec 0c sub $0xc,%esp 1178c8: ff 35 24 08 14 00 pushl 0x140824 1178ce: e8 bd 1f 00 00 call 119890 <_API_Mutex_Unlock> return return_status; 1178d3: 83 c4 10 add $0x10,%esp 1178d6: b8 04 00 00 00 mov $0x4,%eax } 1178db: 8d 65 f8 lea -0x8(%ebp),%esp 1178de: 5b pop %ebx 1178df: 5e pop %esi 1178e0: c9 leave 1178e1: c3 ret 1178e2: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 1178e4: 83 ec 0c sub $0xc,%esp 1178e7: 8d 45 f4 lea -0xc(%ebp),%eax 1178ea: 50 push %eax 1178eb: 8d 45 ec lea -0x14(%ebp),%eax 1178ee: 50 push %eax 1178ef: ff 75 10 pushl 0x10(%ebp) 1178f2: ff 75 0c pushl 0xc(%ebp) 1178f5: 8d 46 68 lea 0x68(%esi),%eax 1178f8: 50 push %eax 1178f9: e8 86 32 00 00 call 11ab84 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 1178fe: 8b 55 ec mov -0x14(%ebp),%edx 117901: 89 13 mov %edx,(%ebx) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 117903: 83 c4 20 add $0x20,%esp 117906: 85 c0 test %eax,%eax 117908: 75 22 jne 11792c _Region_Process_queue( the_region ); /* unlocks allocator */ 11790a: 83 ec 0c sub $0xc,%esp 11790d: 56 push %esi 11790e: e8 99 70 00 00 call 11e9ac <_Region_Process_queue> 117913: 83 c4 10 add $0x10,%esp else _RTEMS_Unlock_allocator(); if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; 117916: 31 c0 xor %eax,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117918: 8d 65 f8 lea -0x8(%ebp),%esp 11791b: 5b pop %ebx 11791c: 5e pop %esi 11791d: c9 leave 11791e: c3 ret 11791f: 90 nop <== NOT EXECUTED rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) return RTEMS_INVALID_ADDRESS; 117920: b8 09 00 00 00 mov $0x9,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117925: 8d 65 f8 lea -0x8(%ebp),%esp 117928: 5b pop %ebx 117929: 5e pop %esi 11792a: c9 leave 11792b: c3 ret _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 11792c: 83 ec 0c sub $0xc,%esp 11792f: ff 35 24 08 14 00 pushl 0x140824 117935: 89 45 e4 mov %eax,-0x1c(%ebp) 117938: e8 53 1f 00 00 call 119890 <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 11793d: 83 c4 10 add $0x10,%esp return RTEMS_UNSATISFIED; 117940: 8b 45 e4 mov -0x1c(%ebp),%eax 117943: 48 dec %eax 117944: 0f 94 c0 sete %al 117947: 0f b6 c0 movzbl %al,%eax 11794a: 8d 04 85 09 00 00 00 lea 0x9(,%eax,4),%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117951: 8d 65 f8 lea -0x8(%ebp),%esp 117954: 5b pop %ebx 117955: 5e pop %esi 117956: c9 leave 117957: c3 ret =============================================================================== 00117958 : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 117958: 55 push %ebp 117959: 89 e5 mov %esp,%ebp 11795b: 53 push %ebx 11795c: 83 ec 20 sub $0x20,%esp uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 11795f: ff 35 24 08 14 00 pushl 0x140824 117965: e8 de 1e 00 00 call 119848 <_API_Mutex_Lock> 11796a: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 11796d: 8d 45 f4 lea -0xc(%ebp),%eax 117970: 50 push %eax 117971: ff 75 08 pushl 0x8(%ebp) 117974: 68 80 06 14 00 push $0x140680 117979: e8 a2 38 00 00 call 11b220 <_Objects_Get_no_protection> 11797e: 89 c3 mov %eax,%ebx switch ( location ) { 117980: 83 c4 10 add $0x10,%esp 117983: 8b 45 f4 mov -0xc(%ebp),%eax 117986: 85 c0 test %eax,%eax 117988: 75 1e jne 1179a8 RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 11798a: 83 ec 08 sub $0x8,%esp 11798d: ff 75 0c pushl 0xc(%ebp) 117990: 8d 43 68 lea 0x68(%ebx),%eax 117993: 50 push %eax 117994: e8 87 2c 00 00 call 11a620 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 117999: 83 c4 10 add $0x10,%esp 11799c: 84 c0 test %al,%al 11799e: 75 28 jne 1179c8 return_status = RTEMS_INVALID_ADDRESS; 1179a0: bb 09 00 00 00 mov $0x9,%ebx 1179a5: eb 06 jmp 1179ad 1179a7: 90 nop <== NOT EXECUTED break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 1179a8: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 1179ad: 83 ec 0c sub $0xc,%esp 1179b0: ff 35 24 08 14 00 pushl 0x140824 1179b6: e8 d5 1e 00 00 call 119890 <_API_Mutex_Unlock> return return_status; 1179bb: 83 c4 10 add $0x10,%esp } 1179be: 89 d8 mov %ebx,%eax 1179c0: 8b 5d fc mov -0x4(%ebp),%ebx 1179c3: c9 leave 1179c4: c3 ret 1179c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Region_Debug_Walk( the_region, 4 ); if ( !status ) return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; 1179c8: ff 4b 64 decl 0x64(%ebx) _Region_Process_queue(the_region); /* unlocks allocator */ 1179cb: 83 ec 0c sub $0xc,%esp 1179ce: 53 push %ebx 1179cf: e8 d8 6f 00 00 call 11e9ac <_Region_Process_queue> return RTEMS_SUCCESSFUL; 1179d4: 83 c4 10 add $0x10,%esp 1179d7: 31 db xor %ebx,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 1179d9: 89 d8 mov %ebx,%eax 1179db: 8b 5d fc mov -0x4(%ebp),%ebx 1179de: c9 leave 1179df: c3 ret =============================================================================== 0010b4bc : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 10b4bc: 55 push %ebp 10b4bd: 89 e5 mov %esp,%ebp 10b4bf: 57 push %edi 10b4c0: 56 push %esi 10b4c1: 53 push %ebx 10b4c2: 83 ec 3c sub $0x3c,%esp 10b4c5: 8b 75 08 mov 0x8(%ebp),%esi 10b4c8: 8b 5d 10 mov 0x10(%ebp),%ebx 10b4cb: 8b 7d 18 mov 0x18(%ebp),%edi register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) 10b4ce: 85 f6 test %esi,%esi 10b4d0: 74 4a je 10b51c return RTEMS_INVALID_NAME; if ( !id ) 10b4d2: 85 ff test %edi,%edi 10b4d4: 0f 84 f6 00 00 00 je 10b5d0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 10b4da: 89 da mov %ebx,%edx 10b4dc: 81 e2 c0 00 00 00 and $0xc0,%edx 10b4e2: 74 48 je 10b52c */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); 10b4e4: 89 d8 mov %ebx,%eax 10b4e6: 83 e0 30 and $0x30,%eax _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10b4e9: 83 f8 10 cmp $0x10,%eax 10b4ec: 74 0e je 10b4fc } if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; 10b4ee: b8 0b 00 00 00 mov $0xb,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b4f3: 8d 65 f4 lea -0xc(%ebp),%esp 10b4f6: 5b pop %ebx 10b4f7: 5e pop %esi 10b4f8: 5f pop %edi 10b4f9: c9 leave 10b4fa: c3 ret 10b4fb: 90 nop <== NOT EXECUTED #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10b4fc: f6 c3 04 test $0x4,%bl 10b4ff: 74 ed je 10b4ee _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 10b501: 81 fa c0 00 00 00 cmp $0xc0,%edx 10b507: 74 e5 je 10b4ee 10b509: b9 10 00 00 00 mov $0x10,%ecx _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 10b50e: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b512: 76 1f jbe 10b533 return RTEMS_INVALID_NUMBER; 10b514: b8 0a 00 00 00 mov $0xa,%eax 10b519: eb d8 jmp 10b4f3 10b51b: 90 nop <== NOT EXECUTED CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10b51c: b8 03 00 00 00 mov $0x3,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b521: 8d 65 f4 lea -0xc(%ebp),%esp 10b524: 5b pop %ebx 10b525: 5e pop %esi 10b526: 5f pop %edi 10b527: c9 leave 10b528: c3 ret 10b529: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 10b52c: 89 d9 mov %ebx,%ecx 10b52e: 83 e1 30 and $0x30,%ecx 10b531: 75 db jne 10b50e rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b533: a1 d4 63 12 00 mov 0x1263d4,%eax 10b538: 40 inc %eax 10b539: a3 d4 63 12 00 mov %eax,0x1263d4 * This function allocates a semaphore control block from * the inactive chain of free semaphore control blocks. */ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) { return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); 10b53e: 83 ec 0c sub $0xc,%esp 10b541: 68 20 63 12 00 push $0x126320 10b546: 89 4d c4 mov %ecx,-0x3c(%ebp) 10b549: e8 da 13 00 00 call 10c928 <_Objects_Allocate> 10b54e: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 10b550: 83 c4 10 add $0x10,%esp 10b553: 85 c0 test %eax,%eax 10b555: 8b 4d c4 mov -0x3c(%ebp),%ecx 10b558: 0f 84 ba 00 00 00 je 10b618 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 10b55e: 89 58 10 mov %ebx,0x10(%eax) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 10b561: 85 c9 test %ecx,%ecx 10b563: 74 77 je 10b5dc /* * It is either simple binary semaphore or a more powerful mutex * style binary semaphore. This is the mutex style. */ if ( _Attributes_Is_priority( attribute_set ) ) the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 10b565: 31 c0 xor %eax,%eax 10b567: f6 c3 04 test $0x4,%bl 10b56a: 0f 95 c0 setne %al 10b56d: 89 45 d8 mov %eax,-0x28(%ebp) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 10b570: 83 f9 10 cmp $0x10,%ecx 10b573: 0f 84 ae 00 00 00 je 10b627 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; the_mutex_attr.only_owner_release = true; } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 10b579: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b580: c6 45 d4 00 movb $0x0,-0x2c(%ebp) } mutex_status = _CORE_mutex_Initialize( 10b584: 50 push %eax 10b585: 31 c0 xor %eax,%eax 10b587: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b58b: 0f 94 c0 sete %al 10b58e: 50 push %eax 10b58f: 8d 45 d0 lea -0x30(%ebp),%eax 10b592: 50 push %eax 10b593: 8d 42 14 lea 0x14(%edx),%eax 10b596: 50 push %eax 10b597: 89 55 c4 mov %edx,-0x3c(%ebp) 10b59a: e8 85 0b 00 00 call 10c124 <_CORE_mutex_Initialize> &the_semaphore->Core_control.mutex, &the_mutex_attr, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 10b59f: 83 c4 10 add $0x10,%esp 10b5a2: 83 f8 06 cmp $0x6,%eax 10b5a5: 8b 55 c4 mov -0x3c(%ebp),%edx 10b5a8: 0f 84 a9 00 00 00 je 10b657 Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10b5ae: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10b5b1: 0f b7 d8 movzwl %ax,%ebx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b5b4: 8b 0d 3c 63 12 00 mov 0x12633c,%ecx 10b5ba: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10b5bd: 89 72 0c mov %esi,0xc(%edx) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 10b5c0: 89 07 mov %eax,(%edi) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 10b5c2: e8 75 20 00 00 call 10d63c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b5c7: 31 c0 xor %eax,%eax 10b5c9: e9 25 ff ff ff jmp 10b4f3 10b5ce: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10b5d0: b8 09 00 00 00 mov $0x9,%eax 10b5d5: e9 19 ff ff ff jmp 10b4f3 10b5da: 66 90 xchg %ax,%ax <== NOT EXECUTED */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 10b5dc: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 10b5e3: 31 c0 xor %eax,%eax 10b5e5: f6 c3 04 test $0x4,%bl 10b5e8: 0f 95 c0 setne %al 10b5eb: 89 45 e4 mov %eax,-0x1c(%ebp) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10b5ee: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 10b5f5: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) _CORE_semaphore_Initialize( 10b5fc: 51 push %ecx 10b5fd: ff 75 0c pushl 0xc(%ebp) 10b600: 8d 45 e0 lea -0x20(%ebp),%eax 10b603: 50 push %eax 10b604: 8d 42 14 lea 0x14(%edx),%eax 10b607: 50 push %eax 10b608: 89 55 c4 mov %edx,-0x3c(%ebp) 10b60b: e8 a4 0d 00 00 call 10c3b4 <_CORE_semaphore_Initialize> 10b610: 83 c4 10 add $0x10,%esp 10b613: 8b 55 c4 mov -0x3c(%ebp),%edx 10b616: eb 96 jmp 10b5ae _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 10b618: e8 1f 20 00 00 call 10d63c <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10b61d: b8 05 00 00 00 mov $0x5,%eax 10b622: e9 cc fe ff ff jmp 10b4f3 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; 10b627: 8b 45 14 mov 0x14(%ebp),%eax 10b62a: 89 45 dc mov %eax,-0x24(%ebp) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10b62d: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b634: c6 45 d4 00 movb $0x0,-0x2c(%ebp) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 10b638: 83 7d d8 01 cmpl $0x1,-0x28(%ebp) 10b63c: 0f 85 42 ff ff ff jne 10b584 if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 10b642: f6 c3 40 test $0x40,%bl 10b645: 74 30 je 10b677 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10b647: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b64e: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b652: e9 2d ff ff ff jmp 10b584 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b657: 83 ec 08 sub $0x8,%esp 10b65a: 52 push %edx 10b65b: 68 20 63 12 00 push $0x126320 10b660: e8 3b 16 00 00 call 10cca0 <_Objects_Free> (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 10b665: e8 d2 1f 00 00 call 10d63c <_Thread_Enable_dispatch> return RTEMS_INVALID_PRIORITY; 10b66a: 83 c4 10 add $0x10,%esp 10b66d: b8 13 00 00 00 mov $0x13,%eax 10b672: e9 7c fe ff ff jmp 10b4f3 if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { if ( _Attributes_Is_inherit_priority( attribute_set ) ) { the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; the_mutex_attr.only_owner_release = true; } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { 10b677: 81 e3 80 00 00 00 and $0x80,%ebx 10b67d: 0f 84 01 ff ff ff je 10b584 <== NEVER TAKEN the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 10b683: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b68a: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b68e: e9 f1 fe ff ff jmp 10b584 =============================================================================== 0010b694 : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 10b694: 55 push %ebp 10b695: 89 e5 mov %esp,%ebp 10b697: 53 push %ebx 10b698: 83 ec 18 sub $0x18,%esp register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); 10b69b: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) _Objects_Get( &_Semaphore_Information, id, location ); 10b69e: 50 push %eax 10b69f: ff 75 08 pushl 0x8(%ebp) 10b6a2: 68 20 63 12 00 push $0x126320 10b6a7: e8 2c 17 00 00 call 10cdd8 <_Objects_Get> 10b6ac: 89 c3 mov %eax,%ebx switch ( location ) { 10b6ae: 83 c4 10 add $0x10,%esp 10b6b1: 8b 4d f4 mov -0xc(%ebp),%ecx 10b6b4: 85 c9 test %ecx,%ecx 10b6b6: 74 0c je 10b6c4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b6b8: b8 04 00 00 00 mov $0x4,%eax } 10b6bd: 8b 5d fc mov -0x4(%ebp),%ebx 10b6c0: c9 leave 10b6c1: c3 ret 10b6c2: 66 90 xchg %ax,%ax <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); 10b6c4: 8b 40 10 mov 0x10(%eax),%eax the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10b6c7: 83 e0 30 and $0x30,%eax 10b6ca: 74 58 je 10b724 if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 10b6cc: 8b 53 64 mov 0x64(%ebx),%edx 10b6cf: 85 d2 test %edx,%edx 10b6d1: 75 15 jne 10b6e8 10b6d3: 83 f8 20 cmp $0x20,%eax 10b6d6: 74 10 je 10b6e8 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 10b6d8: e8 5f 1f 00 00 call 10d63c <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 10b6dd: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b6e2: 8b 5d fc mov -0x4(%ebp),%ebx 10b6e5: c9 leave 10b6e6: c3 ret 10b6e7: 90 nop <== NOT EXECUTED !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 10b6e8: 50 push %eax 10b6e9: 6a 04 push $0x4 10b6eb: 6a 00 push $0x0 10b6ed: 8d 43 14 lea 0x14(%ebx),%eax 10b6f0: 50 push %eax 10b6f1: e8 22 0a 00 00 call 10c118 <_CORE_mutex_Flush> 10b6f6: 83 c4 10 add $0x10,%esp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 10b6f9: 83 ec 08 sub $0x8,%esp 10b6fc: 53 push %ebx 10b6fd: 68 20 63 12 00 push $0x126320 10b702: e8 9d 12 00 00 call 10c9a4 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b707: 58 pop %eax 10b708: 5a pop %edx 10b709: 53 push %ebx 10b70a: 68 20 63 12 00 push $0x126320 10b70f: e8 8c 15 00 00 call 10cca0 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 10b714: e8 23 1f 00 00 call 10d63c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b719: 83 c4 10 add $0x10,%esp 10b71c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b71e: 8b 5d fc mov -0x4(%ebp),%ebx 10b721: c9 leave 10b722: c3 ret 10b723: 90 nop <== NOT EXECUTED &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 10b724: 51 push %ecx 10b725: 6a 02 push $0x2 10b727: 6a 00 push $0x0 10b729: 8d 43 14 lea 0x14(%ebx),%eax 10b72c: 50 push %eax 10b72d: e8 76 0c 00 00 call 10c3a8 <_CORE_semaphore_Flush> 10b732: 83 c4 10 add $0x10,%esp 10b735: eb c2 jmp 10b6f9 =============================================================================== 0010b738 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 10b738: 55 push %ebp 10b739: 89 e5 mov %esp,%ebp 10b73b: 57 push %edi 10b73c: 56 push %esi 10b73d: 53 push %ebx 10b73e: 83 ec 1c sub $0x1c,%esp 10b741: 8b 5d 08 mov 0x8(%ebp),%ebx 10b744: 8b 75 0c mov 0xc(%ebp),%esi 10b747: 8b 7d 10 mov 0x10(%ebp),%edi register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); 10b74a: 8d 45 e0 lea -0x20(%ebp),%eax Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) _Objects_Get_isr_disable( &_Semaphore_Information, id, location, level ); 10b74d: 50 push %eax 10b74e: 8d 45 e4 lea -0x1c(%ebp),%eax 10b751: 50 push %eax 10b752: 53 push %ebx 10b753: 68 20 63 12 00 push $0x126320 10b758: e8 23 16 00 00 call 10cd80 <_Objects_Get_isr_disable> switch ( location ) { 10b75d: 83 c4 10 add $0x10,%esp 10b760: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b763: 85 c9 test %ecx,%ecx 10b765: 74 0d je 10b774 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b767: b8 04 00 00 00 mov $0x4,%eax } 10b76c: 8d 65 f4 lea -0xc(%ebp),%esp 10b76f: 5b pop %ebx 10b770: 5e pop %esi 10b771: 5f pop %edi 10b772: c9 leave 10b773: c3 ret the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10b774: f6 40 10 30 testb $0x30,0x10(%eax) 10b778: 74 36 je 10b7b0 _CORE_mutex_Seize( 10b77a: 83 ec 0c sub $0xc,%esp 10b77d: ff 75 e0 pushl -0x20(%ebp) 10b780: 57 push %edi */ RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait ( rtems_option option_set ) { return (option_set & RTEMS_NO_WAIT) ? true : false; 10b781: 83 e6 01 and $0x1,%esi 10b784: 83 f6 01 xor $0x1,%esi 10b787: 56 push %esi 10b788: 53 push %ebx 10b789: 83 c0 14 add $0x14,%eax 10b78c: 50 push %eax 10b78d: e8 8a 0a 00 00 call 10c21c <_CORE_mutex_Seize> id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10b792: 83 c4 14 add $0x14,%esp _Thread_Executing->Wait.return_code ); 10b795: a1 78 66 12 00 mov 0x126678,%eax id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10b79a: ff 70 34 pushl 0x34(%eax) 10b79d: e8 12 01 00 00 call 10b8b4 <_Semaphore_Translate_core_mutex_return_code> 10b7a2: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b7a5: 8d 65 f4 lea -0xc(%ebp),%esp 10b7a8: 5b pop %ebx 10b7a9: 5e pop %esi 10b7aa: 5f pop %edi 10b7ab: c9 leave 10b7ac: c3 ret 10b7ad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10b7b0: 8b 15 78 66 12 00 mov 0x126678,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10b7b6: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( the_semaphore->count != 0 ) { 10b7bd: 8b 48 5c mov 0x5c(%eax),%ecx 10b7c0: 85 c9 test %ecx,%ecx 10b7c2: 75 2c jne 10b7f0 the_semaphore->count -= 1; _ISR_Enable( *level_p ); return; } if ( !wait ) { 10b7c4: 83 e6 01 and $0x1,%esi 10b7c7: 74 33 je 10b7fc _ISR_Enable( *level_p ); 10b7c9: ff 75 e0 pushl -0x20(%ebp) 10b7cc: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 10b7cd: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 10b7d4: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code ); 10b7d7: a1 78 66 12 00 mov 0x126678,%eax id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 10b7dc: ff 70 34 pushl 0x34(%eax) 10b7df: e8 e0 00 00 00 call 10b8c4 <_Semaphore_Translate_core_semaphore_return_code> 10b7e4: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b7e7: 8d 65 f4 lea -0xc(%ebp),%esp 10b7ea: 5b pop %ebx 10b7eb: 5e pop %esi 10b7ec: 5f pop %edi 10b7ed: c9 leave 10b7ee: c3 ret 10b7ef: 90 nop <== NOT EXECUTED /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( the_semaphore->count != 0 ) { the_semaphore->count -= 1; 10b7f0: 49 dec %ecx 10b7f1: 89 48 5c mov %ecx,0x5c(%eax) _ISR_Enable( *level_p ); 10b7f4: ff 75 e0 pushl -0x20(%ebp) 10b7f7: 9d popf 10b7f8: eb da jmp 10b7d4 10b7fa: 66 90 xchg %ax,%ax <== NOT EXECUTED 10b7fc: 8b 0d d4 63 12 00 mov 0x1263d4,%ecx 10b802: 41 inc %ecx 10b803: 89 0d d4 63 12 00 mov %ecx,0x1263d4 RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10b809: c7 40 44 01 00 00 00 movl $0x1,0x44(%eax) return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 10b810: 83 c0 14 add $0x14,%eax 10b813: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10b816: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( *level_p ); 10b819: ff 75 e0 pushl -0x20(%ebp) 10b81c: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 10b81d: 52 push %edx 10b81e: 68 4c de 10 00 push $0x10de4c 10b823: 57 push %edi 10b824: 50 push %eax 10b825: e8 d2 22 00 00 call 10dafc <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10b82a: e8 0d 1e 00 00 call 10d63c <_Thread_Enable_dispatch> 10b82f: 83 c4 10 add $0x10,%esp 10b832: eb a0 jmp 10b7d4 =============================================================================== 0010b834 : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 10b834: 55 push %ebp 10b835: 89 e5 mov %esp,%ebp 10b837: 53 push %ebx 10b838: 83 ec 18 sub $0x18,%esp 10b83b: 8b 5d 08 mov 0x8(%ebp),%ebx register Semaphore_Control *the_semaphore; Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); 10b83e: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) _Objects_Get( &_Semaphore_Information, id, location ); 10b841: 50 push %eax 10b842: 53 push %ebx 10b843: 68 20 63 12 00 push $0x126320 10b848: e8 8b 15 00 00 call 10cdd8 <_Objects_Get> switch ( location ) { 10b84d: 83 c4 10 add $0x10,%esp 10b850: 8b 55 f4 mov -0xc(%ebp),%edx 10b853: 85 d2 test %edx,%edx 10b855: 74 0d je 10b864 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b857: b8 04 00 00 00 mov $0x4,%eax } 10b85c: 8b 5d fc mov -0x4(%ebp),%ebx 10b85f: c9 leave 10b860: c3 ret 10b861: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10b864: f6 40 10 30 testb $0x30,0x10(%eax) 10b868: 75 26 jne 10b890 MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); } else { semaphore_status = _CORE_semaphore_Surrender( 10b86a: 52 push %edx 10b86b: 6a 00 push $0x0 10b86d: 53 push %ebx 10b86e: 83 c0 14 add $0x14,%eax 10b871: 50 push %eax 10b872: e8 7d 0b 00 00 call 10c3f4 <_CORE_semaphore_Surrender> 10b877: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b879: e8 be 1d 00 00 call 10d63c <_Thread_Enable_dispatch> return 10b87e: 89 1c 24 mov %ebx,(%esp) 10b881: e8 3e 00 00 00 call 10b8c4 <_Semaphore_Translate_core_semaphore_return_code> 10b886: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b889: 8b 5d fc mov -0x4(%ebp),%ebx 10b88c: c9 leave 10b88d: c3 ret 10b88e: 66 90 xchg %ax,%ax <== NOT EXECUTED the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { mutex_status = _CORE_mutex_Surrender( 10b890: 51 push %ecx 10b891: 6a 00 push $0x0 10b893: 53 push %ebx 10b894: 83 c0 14 add $0x14,%eax 10b897: 50 push %eax 10b898: e8 1f 0a 00 00 call 10c2bc <_CORE_mutex_Surrender> 10b89d: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b89f: e8 98 1d 00 00 call 10d63c <_Thread_Enable_dispatch> return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 10b8a4: 89 1c 24 mov %ebx,(%esp) 10b8a7: e8 08 00 00 00 call 10b8b4 <_Semaphore_Translate_core_mutex_return_code> 10b8ac: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b8af: 8b 5d fc mov -0x4(%ebp),%ebx 10b8b2: c9 leave 10b8b3: c3 ret =============================================================================== 0010c850 : rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { 10c850: 55 push %ebp 10c851: 89 e5 mov %esp,%ebp 10c853: 83 ec 08 sub $0x8,%esp 10c856: 8b 55 08 mov 0x8(%ebp),%edx RTEMS_API_Control *api; ASR_Information *asr; /* XXX normalize mode */ executing = _Thread_Executing; api = (RTEMS_API_Control*)executing->API_Extensions[ THREAD_API_RTEMS ]; 10c859: a1 38 8d 12 00 mov 0x128d38,%eax 10c85e: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10c864: 8b 0d 94 8a 12 00 mov 0x128a94,%ecx 10c86a: 41 inc %ecx 10c86b: 89 0d 94 8a 12 00 mov %ecx,0x128a94 asr = &api->Signal; _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { 10c871: 85 d2 test %edx,%edx 10c873: 74 13 je 10c888 asr->mode_set = mode_set; 10c875: 8b 4d 0c mov 0xc(%ebp),%ecx 10c878: 89 48 10 mov %ecx,0x10(%eax) asr->handler = asr_handler; 10c87b: 89 50 0c mov %edx,0xc(%eax) } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 10c87e: e8 15 21 00 00 call 10e998 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10c883: 31 c0 xor %eax,%eax 10c885: c9 leave 10c886: c3 ret 10c887: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 10c888: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 10c88c: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 10c893: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 10c89a: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 10c8a1: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 10c8a8: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) asr->mode_set = mode_set; asr->handler = asr_handler; } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 10c8af: e8 e4 20 00 00 call 10e998 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10c8b4: 31 c0 xor %eax,%eax 10c8b6: c9 leave 10c8b7: c3 ret =============================================================================== 00117e78 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 117e78: 55 push %ebp 117e79: 89 e5 mov %esp,%ebp 117e7b: 53 push %ebx 117e7c: 83 ec 14 sub $0x14,%esp 117e7f: 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 ) 117e82: 85 db test %ebx,%ebx 117e84: 75 0a jne 117e90 return RTEMS_INVALID_NUMBER; 117e86: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117e8b: 8b 5d fc mov -0x4(%ebp),%ebx 117e8e: c9 leave 117e8f: c3 ret ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 117e90: 83 ec 08 sub $0x8,%esp 117e93: 8d 45 f4 lea -0xc(%ebp),%eax 117e96: 50 push %eax 117e97: ff 75 08 pushl 0x8(%ebp) 117e9a: e8 45 3c 00 00 call 11bae4 <_Thread_Get> switch ( location ) { 117e9f: 83 c4 10 add $0x10,%esp 117ea2: 8b 55 f4 mov -0xc(%ebp),%edx 117ea5: 85 d2 test %edx,%edx 117ea7: 74 0b je 117eb4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 117ea9: b8 04 00 00 00 mov $0x4,%eax } 117eae: 8b 5d fc mov -0x4(%ebp),%ebx 117eb1: c9 leave 117eb2: c3 ret 117eb3: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 117eb4: 8b 90 f0 00 00 00 mov 0xf0(%eax),%edx asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 117eba: 8b 4a 0c mov 0xc(%edx),%ecx 117ebd: 85 c9 test %ecx,%ecx 117ebf: 74 3f je 117f00 if ( asr->is_enabled ) { 117ec1: 80 7a 08 00 cmpb $0x0,0x8(%edx) 117ec5: 74 25 je 117eec rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 117ec7: 9c pushf 117ec8: fa cli 117ec9: 59 pop %ecx *signal_set |= signals; 117eca: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 117ecd: 51 push %ecx 117ece: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 117ecf: 8b 15 14 0a 14 00 mov 0x140a14,%edx 117ed5: 85 d2 test %edx,%edx 117ed7: 74 1b je 117ef4 117ed9: 3b 05 18 0a 14 00 cmp 0x140a18,%eax 117edf: 75 13 jne 117ef4 <== NEVER TAKEN _Context_Switch_necessary = true; 117ee1: c6 05 24 0a 14 00 01 movb $0x1,0x140a24 117ee8: eb 0a jmp 117ef4 117eea: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 117eec: 9c pushf 117eed: fa cli 117eee: 58 pop %eax *signal_set |= signals; 117eef: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 117ef2: 50 push %eax 117ef3: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 117ef4: e8 c7 3b 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 117ef9: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117efb: 8b 5d fc mov -0x4(%ebp),%ebx 117efe: c9 leave 117eff: c3 ret _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 117f00: e8 bb 3b 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 117f05: b8 0b 00 00 00 mov $0xb,%eax 117f0a: e9 7c ff ff ff jmp 117e8b =============================================================================== 0010b8d4 : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { 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 10b8dd: 8b 5d 08 mov 0x8(%ebp),%ebx 10b8e0: 8b 7d 0c mov 0xc(%ebp),%edi 10b8e3: 8b 75 1c mov 0x1c(%ebp),%esi Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10b8e6: 85 f6 test %esi,%esi 10b8e8: 0f 84 3e 01 00 00 je 10ba2c <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10b8ee: 85 db test %ebx,%ebx 10b8f0: 0f 84 d2 00 00 00 je 10b9c8 <== NEVER TAKEN /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 10b8f6: f7 45 18 00 80 00 00 testl $0x8000,0x18(%ebp) 10b8fd: 75 17 jne 10b916 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10b8ff: 85 ff test %edi,%edi 10b901: 0f 84 b1 00 00 00 je 10b9b8 ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 10b907: 0f b6 05 b4 22 12 00 movzbl 0x1222b4,%eax */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10b90e: 39 c7 cmp %eax,%edi 10b910: 0f 87 a2 00 00 00 ja 10b9b8 */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10b916: 83 ec 0c sub $0xc,%esp 10b919: ff 35 84 64 12 00 pushl 0x126484 10b91f: e8 6c 06 00 00 call 10bf90 <_API_Mutex_Lock> * This function allocates a task control block from * the inactive chain of free task control blocks. */ RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information ); 10b924: c7 04 24 60 63 12 00 movl $0x126360,(%esp) 10b92b: e8 f8 0f 00 00 call 10c928 <_Objects_Allocate> 10b930: 89 c2 mov %eax,%edx * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 10b932: 83 c4 10 add $0x10,%esp 10b935: 85 c0 test %eax,%eax 10b937: 0f 84 cf 00 00 00 je 10ba0c /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 10b93d: 50 push %eax 10b93e: 53 push %ebx */ RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level ( Modes_Control mode_set ) { return ( mode_set & RTEMS_INTERRUPT_MASK ); 10b93f: 8b 45 14 mov 0x14(%ebp),%eax 10b942: 83 e0 01 and $0x1,%eax 10b945: 50 push %eax 10b946: 6a 00 push $0x0 10b948: 31 c0 xor %eax,%eax 10b94a: f7 45 14 00 02 00 00 testl $0x200,0x14(%ebp) 10b951: 0f 95 c0 setne %al 10b954: 50 push %eax 10b955: 31 c0 xor %eax,%eax 10b957: f7 45 14 00 01 00 00 testl $0x100,0x14(%ebp) 10b95e: 0f 94 c0 sete %al 10b961: 50 push %eax 10b962: 57 push %edi */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_floating_point( rtems_attribute attribute_set ) { return ( attribute_set & RTEMS_FLOATING_POINT ) ? true : false; 10b963: 8b 45 18 mov 0x18(%ebp),%eax 10b966: 83 e0 01 and $0x1,%eax 10b969: 50 push %eax 10b96a: ff 75 10 pushl 0x10(%ebp) 10b96d: 6a 00 push $0x0 10b96f: 52 push %edx 10b970: 68 60 63 12 00 push $0x126360 10b975: 89 55 e4 mov %edx,-0x1c(%ebp) 10b978: e8 5b 1d 00 00 call 10d6d8 <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 10b97d: 83 c4 30 add $0x30,%esp 10b980: 84 c0 test %al,%al 10b982: 8b 55 e4 mov -0x1c(%ebp),%edx 10b985: 74 51 je 10b9d8 _RTEMS_Unlock_allocator(); return RTEMS_UNSATISFIED; } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 10b987: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax * id - thread id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_task_create( 10b98d: f7 45 14 00 04 00 00 testl $0x400,0x14(%ebp) } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 10b994: 0f 94 40 08 sete 0x8(%eax) *id = the_thread->Object.id; 10b998: 8b 42 08 mov 0x8(%edx),%eax 10b99b: 89 06 mov %eax,(%esi) ); } #endif _RTEMS_Unlock_allocator(); 10b99d: 83 ec 0c sub $0xc,%esp 10b9a0: ff 35 84 64 12 00 pushl 0x126484 10b9a6: e8 2d 06 00 00 call 10bfd8 <_API_Mutex_Unlock> return RTEMS_SUCCESSFUL; 10b9ab: 83 c4 10 add $0x10,%esp 10b9ae: 31 c0 xor %eax,%eax } 10b9b0: 8d 65 f4 lea -0xc(%ebp),%esp 10b9b3: 5b pop %ebx 10b9b4: 5e pop %esi 10b9b5: 5f pop %edi 10b9b6: c9 leave 10b9b7: c3 ret * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { if ( !_RTEMS_tasks_Priority_is_valid( initial_priority ) ) return RTEMS_INVALID_PRIORITY; 10b9b8: b8 13 00 00 00 mov $0x13,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b9bd: 8d 65 f4 lea -0xc(%ebp),%esp 10b9c0: 5b pop %ebx 10b9c1: 5e pop %esi 10b9c2: 5f pop %edi 10b9c3: c9 leave 10b9c4: c3 ret 10b9c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10b9c8: b8 03 00 00 00 mov $0x3,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b9cd: 8d 65 f4 lea -0xc(%ebp),%esp 10b9d0: 5b pop %ebx 10b9d1: 5e pop %esi 10b9d2: 5f pop %edi 10b9d3: c9 leave 10b9d4: c3 ret 10b9d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 10b9d8: 83 ec 0c sub $0xc,%esp 10b9db: ff 72 08 pushl 0x8(%edx) 10b9de: e8 2d 13 00 00 call 10cd10 <_Objects_Get_information_id> 10b9e3: 5a pop %edx 10b9e4: 59 pop %ecx 10b9e5: 8b 55 e4 mov -0x1c(%ebp),%edx 10b9e8: 52 push %edx 10b9e9: 50 push %eax 10b9ea: e8 b1 12 00 00 call 10cca0 <_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(); 10b9ef: 58 pop %eax 10b9f0: ff 35 84 64 12 00 pushl 0x126484 10b9f6: e8 dd 05 00 00 call 10bfd8 <_API_Mutex_Unlock> return RTEMS_UNSATISFIED; 10b9fb: 83 c4 10 add $0x10,%esp 10b9fe: b8 0d 00 00 00 mov $0xd,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10ba03: 8d 65 f4 lea -0xc(%ebp),%esp 10ba06: 5b pop %ebx 10ba07: 5e pop %esi 10ba08: 5f pop %edi 10ba09: c9 leave 10ba0a: c3 ret 10ba0b: 90 nop <== NOT EXECUTED */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10ba0c: 83 ec 0c sub $0xc,%esp 10ba0f: ff 35 84 64 12 00 pushl 0x126484 10ba15: e8 be 05 00 00 call 10bfd8 <_API_Mutex_Unlock> return RTEMS_TOO_MANY; 10ba1a: 83 c4 10 add $0x10,%esp 10ba1d: b8 05 00 00 00 mov $0x5,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10ba22: 8d 65 f4 lea -0xc(%ebp),%esp 10ba25: 5b pop %ebx 10ba26: 5e pop %esi 10ba27: 5f pop %edi 10ba28: c9 leave 10ba29: c3 ret 10ba2a: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) return RTEMS_INVALID_ADDRESS; 10ba2c: b8 09 00 00 00 mov $0x9,%eax 10ba31: eb 8a jmp 10b9bd =============================================================================== 0010ba34 : */ rtems_status_code rtems_task_delete( rtems_id id ) { 10ba34: 55 push %ebp 10ba35: 89 e5 mov %esp,%ebp 10ba37: 53 push %ebx 10ba38: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 10ba3b: ff 35 84 64 12 00 pushl 0x126484 10ba41: e8 4a 05 00 00 call 10bf90 <_API_Mutex_Lock> the_thread = _Thread_Get( id, &location ); 10ba46: 5a pop %edx 10ba47: 59 pop %ecx 10ba48: 8d 45 f4 lea -0xc(%ebp),%eax 10ba4b: 50 push %eax 10ba4c: ff 75 08 pushl 0x8(%ebp) 10ba4f: e8 0c 1c 00 00 call 10d660 <_Thread_Get> 10ba54: 89 c3 mov %eax,%ebx switch ( location ) { 10ba56: 83 c4 10 add $0x10,%esp 10ba59: 8b 45 f4 mov -0xc(%ebp),%eax 10ba5c: 85 c0 test %eax,%eax 10ba5e: 75 44 jne 10baa4 case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 10ba60: 83 ec 0c sub $0xc,%esp 10ba63: ff 73 08 pushl 0x8(%ebx) 10ba66: e8 a5 12 00 00 call 10cd10 <_Objects_Get_information_id> 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 10ba6b: 5a pop %edx 10ba6c: 59 pop %ecx 10ba6d: 53 push %ebx 10ba6e: 50 push %eax 10ba6f: e8 98 18 00 00 call 10d30c <_Thread_Close> 10ba74: 58 pop %eax 10ba75: ff 73 08 pushl 0x8(%ebx) 10ba78: e8 93 12 00 00 call 10cd10 <_Objects_Get_information_id> 10ba7d: 5a pop %edx 10ba7e: 59 pop %ecx 10ba7f: 53 push %ebx 10ba80: 50 push %eax 10ba81: e8 1a 12 00 00 call 10cca0 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10ba86: 58 pop %eax 10ba87: ff 35 84 64 12 00 pushl 0x126484 10ba8d: e8 46 05 00 00 call 10bfd8 <_API_Mutex_Unlock> _Thread_Enable_dispatch(); 10ba92: e8 a5 1b 00 00 call 10d63c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ba97: 83 c4 10 add $0x10,%esp 10ba9a: 31 c0 xor %eax,%eax break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } 10ba9c: 8b 5d fc mov -0x4(%ebp),%ebx 10ba9f: c9 leave 10baa0: c3 ret 10baa1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 10baa4: 83 ec 0c sub $0xc,%esp 10baa7: ff 35 84 64 12 00 pushl 0x126484 10baad: e8 26 05 00 00 call 10bfd8 <_API_Mutex_Unlock> return RTEMS_INVALID_ID; 10bab2: 83 c4 10 add $0x10,%esp 10bab5: b8 04 00 00 00 mov $0x4,%eax } 10baba: 8b 5d fc mov -0x4(%ebp),%ebx 10babd: c9 leave 10babe: c3 ret =============================================================================== 0010d55c : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 10d55c: 55 push %ebp 10d55d: 89 e5 mov %esp,%ebp 10d55f: 56 push %esi 10d560: 53 push %ebx 10d561: 83 ec 10 sub $0x10,%esp 10d564: 8b 45 08 mov 0x8(%ebp),%eax 10d567: 8b 75 0c mov 0xc(%ebp),%esi 10d56a: 8b 5d 10 mov 0x10(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10d56d: 80 3d e4 51 12 00 00 cmpb $0x0,0x1251e4 10d574: 74 6e je 10d5e4 return RTEMS_NOT_CONFIGURED; if ( !note ) 10d576: 85 db test %ebx,%ebx 10d578: 74 7e je 10d5f8 /* * 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 ) 10d57a: 83 fe 0f cmp $0xf,%esi 10d57d: 77 3d ja 10d5bc /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d57f: 85 c0 test %eax,%eax 10d581: 74 45 je 10d5c8 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d583: 8b 15 18 99 12 00 mov 0x129918,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d589: 3b 42 08 cmp 0x8(%edx),%eax 10d58c: 74 40 je 10d5ce api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d58e: 83 ec 08 sub $0x8,%esp 10d591: 8d 55 f4 lea -0xc(%ebp),%edx 10d594: 52 push %edx 10d595: 50 push %eax 10d596: e8 f1 1e 00 00 call 10f48c <_Thread_Get> switch ( location ) { 10d59b: 83 c4 10 add $0x10,%esp 10d59e: 8b 55 f4 mov -0xc(%ebp),%edx 10d5a1: 85 d2 test %edx,%edx 10d5a3: 75 4b jne 10d5f0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d5a5: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10d5ab: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d5af: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10d5b1: e8 b2 1e 00 00 call 10f468 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d5b6: 31 c0 xor %eax,%eax 10d5b8: eb 07 jmp 10d5c1 10d5ba: 66 90 xchg %ax,%ax <== NOT EXECUTED * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) return RTEMS_INVALID_NUMBER; 10d5bc: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d5c1: 8d 65 f8 lea -0x8(%ebp),%esp 10d5c4: 5b pop %ebx 10d5c5: 5e pop %esi 10d5c6: c9 leave 10d5c7: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d5c8: 8b 15 18 99 12 00 mov 0x129918,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d5ce: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax 10d5d4: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d5d8: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 10d5da: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d5dc: 8d 65 f8 lea -0x8(%ebp),%esp 10d5df: 5b pop %ebx 10d5e0: 5e pop %esi 10d5e1: c9 leave 10d5e2: c3 ret 10d5e3: 90 nop <== NOT EXECUTED register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; 10d5e4: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d5e9: 8d 65 f8 lea -0x8(%ebp),%esp 10d5ec: 5b pop %ebx 10d5ed: 5e pop %esi 10d5ee: c9 leave 10d5ef: c3 ret case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d5f0: b8 04 00 00 00 mov $0x4,%eax 10d5f5: eb ca jmp 10d5c1 10d5f7: 90 nop <== NOT EXECUTED if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; if ( !note ) return RTEMS_INVALID_ADDRESS; 10d5f8: b8 09 00 00 00 mov $0x9,%eax 10d5fd: eb c2 jmp 10d5c1 =============================================================================== 0010bac0 : rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, rtems_id *id ) { 10bac0: 55 push %ebp 10bac1: 89 e5 mov %esp,%ebp 10bac3: 83 ec 08 sub $0x8,%esp 10bac6: 8b 55 08 mov 0x8(%ebp),%edx 10bac9: 8b 45 10 mov 0x10(%ebp),%eax Objects_Name_or_id_lookup_errors status; if ( !id ) 10bacc: 85 c0 test %eax,%eax 10bace: 74 30 je 10bb00 return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { 10bad0: 85 d2 test %edx,%edx 10bad2: 75 10 jne 10bae4 *id = _Thread_Executing->Object.id; 10bad4: 8b 15 78 66 12 00 mov 0x126678,%edx 10bada: 8b 52 08 mov 0x8(%edx),%edx 10badd: 89 10 mov %edx,(%eax) return RTEMS_SUCCESSFUL; 10badf: 31 c0 xor %eax,%eax } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; } 10bae1: c9 leave 10bae2: c3 ret 10bae3: 90 nop <== NOT EXECUTED if ( name == OBJECTS_ID_OF_SELF ) { *id = _Thread_Executing->Object.id; return RTEMS_SUCCESSFUL; } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); 10bae4: 50 push %eax 10bae5: ff 75 0c pushl 0xc(%ebp) 10bae8: 52 push %edx 10bae9: 68 60 63 12 00 push $0x126360 10baee: e8 3d 14 00 00 call 10cf30 <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; 10baf3: 8b 04 85 ac fe 11 00 mov 0x11feac(,%eax,4),%eax 10bafa: 83 c4 10 add $0x10,%esp } 10bafd: c9 leave 10bafe: c3 ret 10baff: 90 nop <== NOT EXECUTED ) { Objects_Name_or_id_lookup_errors status; if ( !id ) return RTEMS_INVALID_ADDRESS; 10bb00: b8 09 00 00 00 mov $0x9,%eax } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; } 10bb05: c9 leave 10bb06: c3 ret =============================================================================== 0011825c : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { 11825c: 55 push %ebp 11825d: 89 e5 mov %esp,%ebp 11825f: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 118262: 8d 45 f4 lea -0xc(%ebp),%eax 118265: 50 push %eax 118266: ff 75 08 pushl 0x8(%ebp) 118269: e8 76 38 00 00 call 11bae4 <_Thread_Get> switch ( location ) { 11826e: 83 c4 10 add $0x10,%esp 118271: 8b 55 f4 mov -0xc(%ebp),%edx 118274: 85 d2 test %edx,%edx 118276: 74 08 je 118280 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118278: b8 04 00 00 00 mov $0x4,%eax } 11827d: c9 leave 11827e: c3 ret 11827f: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 118280: f6 40 10 02 testb $0x2,0x10(%eax) 118284: 74 0e je 118294 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 118286: e8 35 38 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_ALREADY_SUSPENDED; 11828b: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118290: c9 leave 118291: c3 ret 118292: 66 90 xchg %ax,%ax <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Enable_dispatch(); 118294: e8 27 38 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118299: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11829b: c9 leave 11829c: c3 ret =============================================================================== 00111fc8 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 111fc8: 55 push %ebp 111fc9: 89 e5 mov %esp,%ebp 111fcb: 57 push %edi 111fcc: 56 push %esi 111fcd: 53 push %ebx 111fce: 83 ec 1c sub $0x1c,%esp 111fd1: 8b 4d 10 mov 0x10(%ebp),%ecx ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 111fd4: 85 c9 test %ecx,%ecx 111fd6: 0f 84 48 01 00 00 je 112124 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 111fdc: 8b 1d 78 66 12 00 mov 0x126678,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 111fe2: 8b bb f0 00 00 00 mov 0xf0(%ebx),%edi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 111fe8: 80 7b 74 01 cmpb $0x1,0x74(%ebx) 111fec: 19 f6 sbb %esi,%esi 111fee: 81 e6 00 01 00 00 and $0x100,%esi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 111ff4: 8b 43 7c mov 0x7c(%ebx),%eax 111ff7: 85 c0 test %eax,%eax 111ff9: 0f 85 e1 00 00 00 jne 1120e0 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 111fff: 80 7f 08 01 cmpb $0x1,0x8(%edi) 112003: 19 d2 sbb %edx,%edx 112005: 81 e2 00 04 00 00 and $0x400,%edx old_mode |= _ISR_Get_level(); 11200b: 89 55 e4 mov %edx,-0x1c(%ebp) 11200e: 89 4d e0 mov %ecx,-0x20(%ebp) 112011: e8 a6 cb ff ff call 10ebbc <_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; 112016: 8b 55 e4 mov -0x1c(%ebp),%edx 112019: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); 11201b: 09 f0 or %esi,%eax 11201d: 8b 4d e0 mov -0x20(%ebp),%ecx 112020: 89 01 mov %eax,(%ecx) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 112022: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 112029: 74 0b je 112036 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 11202b: f7 45 08 00 01 00 00 testl $0x100,0x8(%ebp) 112032: 0f 94 43 74 sete 0x74(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 112036: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 11203d: 74 1c je 11205b if ( _Modes_Is_timeslice(mode_set) ) { 11203f: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 112046: 0f 84 c0 00 00 00 je 11210c executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 11204c: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 112053: a1 a4 63 12 00 mov 0x1263a4,%eax 112058: 89 43 78 mov %eax,0x78(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 11205b: f6 45 0c 01 testb $0x1,0xc(%ebp) 11205f: 74 0b je 11206c */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 112061: f6 45 08 01 testb $0x1,0x8(%ebp) 112065: 0f 84 99 00 00 00 je 112104 11206b: fa cli */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 11206c: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 112073: 74 3f je 1120b4 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 112075: f7 45 08 00 04 00 00 testl $0x400,0x8(%ebp) 11207c: 0f 94 c0 sete %al is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { 11207f: 38 47 08 cmp %al,0x8(%edi) 112082: 74 30 je 1120b4 asr->is_enabled = is_asr_enabled; 112084: 88 47 08 mov %al,0x8(%edi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 112087: 9c pushf 112088: fa cli 112089: 58 pop %eax _signals = information->signals_pending; 11208a: 8b 57 18 mov 0x18(%edi),%edx information->signals_pending = information->signals_posted; 11208d: 8b 4f 14 mov 0x14(%edi),%ecx 112090: 89 4f 18 mov %ecx,0x18(%edi) information->signals_posted = _signals; 112093: 89 57 14 mov %edx,0x14(%edi) _ISR_Enable( _level ); 112096: 50 push %eax 112097: 9d popf /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 112098: 8b 5f 14 mov 0x14(%edi),%ebx 11209b: 85 db test %ebx,%ebx 11209d: 0f 95 c2 setne %dl needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) 1120a0: 83 3d 80 65 12 00 03 cmpl $0x3,0x126580 1120a7: 74 16 je 1120bf <== ALWAYS TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; 1120a9: 31 c0 xor %eax,%eax } 1120ab: 83 c4 1c add $0x1c,%esp 1120ae: 5b pop %ebx 1120af: 5e pop %esi 1120b0: 5f pop %edi 1120b1: c9 leave 1120b2: c3 ret 1120b3: 90 nop <== NOT EXECUTED /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 1120b4: 31 d2 xor %edx,%edx needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) 1120b6: 83 3d 80 65 12 00 03 cmpl $0x3,0x126580 1120bd: 75 ea jne 1120a9 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; 1120bf: a1 78 66 12 00 mov 0x126678,%eax if ( !_States_Is_ready( executing->current_state ) || 1120c4: 8b 48 10 mov 0x10(%eax),%ecx 1120c7: 85 c9 test %ecx,%ecx 1120c9: 75 21 jne 1120ec <== NEVER TAKEN 1120cb: 3b 05 7c 66 12 00 cmp 0x12667c,%eax 1120d1: 74 06 je 1120d9 ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 1120d3: 80 78 74 00 cmpb $0x0,0x74(%eax) 1120d7: 75 13 jne 1120ec <== ALWAYS TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 1120d9: 84 d2 test %dl,%dl 1120db: 75 16 jne 1120f3 1120dd: eb ca jmp 1120a9 1120df: 90 nop <== NOT EXECUTED old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 1120e0: 81 ce 00 02 00 00 or $0x200,%esi 1120e6: e9 14 ff ff ff jmp 111fff 1120eb: 90 nop <== NOT EXECUTED _Context_Switch_necessary = true; 1120ec: c6 05 84 66 12 00 01 movb $0x1,0x126684 } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); 1120f3: e8 cc b3 ff ff call 10d4c4 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; 1120f8: 31 c0 xor %eax,%eax } 1120fa: 83 c4 1c add $0x1c,%esp 1120fd: 5b pop %ebx 1120fe: 5e pop %esi 1120ff: 5f pop %edi 112100: c9 leave 112101: c3 ret 112102: 66 90 xchg %ax,%ax <== NOT EXECUTED 112104: fb sti 112105: e9 62 ff ff ff jmp 11206c 11210a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 11210c: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 112113: f6 45 0c 01 testb $0x1,0xc(%ebp) 112117: 0f 84 4f ff ff ff je 11206c 11211d: e9 3f ff ff ff jmp 112061 112122: 66 90 xchg %ax,%ax <== NOT EXECUTED bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; 112124: b8 09 00 00 00 mov $0x9,%eax if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 112129: 83 c4 1c add $0x1c,%esp 11212c: 5b pop %ebx 11212d: 5e pop %esi 11212e: 5f pop %edi 11212f: c9 leave 112130: c3 ret =============================================================================== 0010c590 : rtems_status_code rtems_task_restart( rtems_id id, uint32_t argument ) { 10c590: 55 push %ebp 10c591: 89 e5 mov %esp,%ebp 10c593: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c596: 8d 45 f4 lea -0xc(%ebp),%eax 10c599: 50 push %eax 10c59a: ff 75 08 pushl 0x8(%ebp) 10c59d: e8 de 1b 00 00 call 10e180 <_Thread_Get> switch ( location ) { 10c5a2: 83 c4 10 add $0x10,%esp 10c5a5: 8b 4d f4 mov -0xc(%ebp),%ecx 10c5a8: 85 c9 test %ecx,%ecx 10c5aa: 75 20 jne 10c5cc case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { 10c5ac: 52 push %edx 10c5ad: ff 75 0c pushl 0xc(%ebp) 10c5b0: 6a 00 push $0x0 10c5b2: 50 push %eax 10c5b3: e8 ec 23 00 00 call 10e9a4 <_Thread_Restart> 10c5b8: 83 c4 10 add $0x10,%esp 10c5bb: 84 c0 test %al,%al 10c5bd: 75 15 jne 10c5d4 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10c5bf: e8 98 1b 00 00 call 10e15c <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10c5c4: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c5c9: c9 leave 10c5ca: c3 ret 10c5cb: 90 nop <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c5cc: b8 04 00 00 00 mov $0x4,%eax } 10c5d1: c9 leave 10c5d2: c3 ret 10c5d3: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { _Thread_Enable_dispatch(); 10c5d4: e8 83 1b 00 00 call 10e15c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c5d9: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c5db: c9 leave 10c5dc: c3 ret =============================================================================== 0010ed50 : */ rtems_status_code rtems_task_resume( rtems_id id ) { 10ed50: 55 push %ebp 10ed51: 89 e5 mov %esp,%ebp 10ed53: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10ed56: 8d 45 f4 lea -0xc(%ebp),%eax 10ed59: 50 push %eax 10ed5a: ff 75 08 pushl 0x8(%ebp) 10ed5d: e8 22 1c 00 00 call 110984 <_Thread_Get> switch ( location ) { 10ed62: 83 c4 10 add $0x10,%esp 10ed65: 8b 55 f4 mov -0xc(%ebp),%edx 10ed68: 85 d2 test %edx,%edx 10ed6a: 74 08 je 10ed74 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10ed6c: b8 04 00 00 00 mov $0x4,%eax } 10ed71: c9 leave 10ed72: c3 ret 10ed73: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 10ed74: f6 40 10 02 testb $0x2,0x10(%eax) 10ed78: 75 0e jne 10ed88 _Thread_Resume( the_thread, true ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10ed7a: e8 e1 1b 00 00 call 110960 <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10ed7f: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ed84: c9 leave 10ed85: c3 ret 10ed86: 66 90 xchg %ax,%ax <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { _Thread_Resume( the_thread, true ); 10ed88: 83 ec 08 sub $0x8,%esp 10ed8b: 6a 01 push $0x1 10ed8d: 50 push %eax 10ed8e: e8 15 24 00 00 call 1111a8 <_Thread_Resume> _Thread_Enable_dispatch(); 10ed93: e8 c8 1b 00 00 call 110960 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ed98: 83 c4 10 add $0x10,%esp 10ed9b: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ed9d: c9 leave 10ed9e: c3 ret =============================================================================== 0010d6d4 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 10d6d4: 55 push %ebp 10d6d5: 89 e5 mov %esp,%ebp 10d6d7: 56 push %esi 10d6d8: 53 push %ebx 10d6d9: 83 ec 10 sub $0x10,%esp 10d6dc: 8b 45 08 mov 0x8(%ebp),%eax 10d6df: 8b 5d 0c mov 0xc(%ebp),%ebx 10d6e2: 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() ) 10d6e5: 80 3d e4 51 12 00 00 cmpb $0x0,0x1251e4 10d6ec: 74 66 je 10d754 /* * 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 ) 10d6ee: 83 fb 0f cmp $0xf,%ebx 10d6f1: 77 39 ja 10d72c /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d6f3: 85 c0 test %eax,%eax 10d6f5: 74 41 je 10d738 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d6f7: 8b 15 18 99 12 00 mov 0x129918,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d6fd: 3b 42 08 cmp 0x8(%edx),%eax 10d700: 74 3c je 10d73e api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d702: 83 ec 08 sub $0x8,%esp 10d705: 8d 55 f4 lea -0xc(%ebp),%edx 10d708: 52 push %edx 10d709: 50 push %eax 10d70a: e8 7d 1d 00 00 call 10f48c <_Thread_Get> switch ( location ) { 10d70f: 83 c4 10 add $0x10,%esp 10d712: 8b 55 f4 mov -0xc(%ebp),%edx 10d715: 85 d2 test %edx,%edx 10d717: 75 47 jne 10d760 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d719: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10d71f: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) _Thread_Enable_dispatch(); 10d723: e8 40 1d 00 00 call 10f468 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d728: 31 c0 xor %eax,%eax 10d72a: eb 05 jmp 10d731 * 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 ) return RTEMS_INVALID_NUMBER; 10d72c: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d731: 8d 65 f8 lea -0x8(%ebp),%esp 10d734: 5b pop %ebx 10d735: 5e pop %esi 10d736: c9 leave 10d737: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d738: 8b 15 18 99 12 00 mov 0x129918,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d73e: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax 10d744: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) return RTEMS_SUCCESSFUL; 10d748: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d74a: 8d 65 f8 lea -0x8(%ebp),%esp 10d74d: 5b pop %ebx 10d74e: 5e pop %esi 10d74f: c9 leave 10d750: c3 ret 10d751: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; 10d754: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d759: 8d 65 f8 lea -0x8(%ebp),%esp 10d75c: 5b pop %ebx 10d75d: 5e pop %esi 10d75e: c9 leave 10d75f: c3 ret case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d760: b8 04 00 00 00 mov $0x4,%eax } 10d765: 8d 65 f8 lea -0x8(%ebp),%esp 10d768: 5b pop %ebx 10d769: 5e pop %esi 10d76a: c9 leave 10d76b: c3 ret =============================================================================== 0010fa24 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10fa24: 55 push %ebp 10fa25: 89 e5 mov %esp,%ebp 10fa27: 56 push %esi 10fa28: 53 push %ebx 10fa29: 83 ec 10 sub $0x10,%esp 10fa2c: 8b 5d 0c mov 0xc(%ebp),%ebx 10fa2f: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10fa32: 85 db test %ebx,%ebx 10fa34: 74 0b je 10fa41 RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 10fa36: 0f b6 05 d4 62 12 00 movzbl 0x1262d4,%eax */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10fa3d: 39 c3 cmp %eax,%ebx 10fa3f: 77 5f ja 10faa0 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10fa41: 85 f6 test %esi,%esi 10fa43: 74 67 je 10faac return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10fa45: 83 ec 08 sub $0x8,%esp 10fa48: 8d 45 f4 lea -0xc(%ebp),%eax 10fa4b: 50 push %eax 10fa4c: ff 75 08 pushl 0x8(%ebp) 10fa4f: e8 80 1d 00 00 call 1117d4 <_Thread_Get> switch ( location ) { 10fa54: 83 c4 10 add $0x10,%esp 10fa57: 8b 55 f4 mov -0xc(%ebp),%edx 10fa5a: 85 d2 test %edx,%edx 10fa5c: 75 36 jne 10fa94 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10fa5e: 8b 50 14 mov 0x14(%eax),%edx 10fa61: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10fa63: 85 db test %ebx,%ebx 10fa65: 74 1c je 10fa83 the_thread->real_priority = new_priority; 10fa67: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10fa6a: 8b 48 1c mov 0x1c(%eax),%ecx 10fa6d: 85 c9 test %ecx,%ecx 10fa6f: 74 05 je 10fa76 10fa71: 3b 58 14 cmp 0x14(%eax),%ebx 10fa74: 73 0d jae 10fa83 <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); 10fa76: 52 push %edx 10fa77: 6a 00 push $0x0 10fa79: 53 push %ebx 10fa7a: 50 push %eax 10fa7b: e8 2c 18 00 00 call 1112ac <_Thread_Change_priority> 10fa80: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10fa83: e8 28 1d 00 00 call 1117b0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10fa88: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fa8a: 8d 65 f8 lea -0x8(%ebp),%esp 10fa8d: 5b pop %ebx 10fa8e: 5e pop %esi 10fa8f: c9 leave 10fa90: c3 ret 10fa91: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10fa94: b8 04 00 00 00 mov $0x4,%eax } 10fa99: 8d 65 f8 lea -0x8(%ebp),%esp 10fa9c: 5b pop %ebx 10fa9d: 5e pop %esi 10fa9e: c9 leave 10fa9f: c3 ret register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; 10faa0: b8 13 00 00 00 mov $0x13,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10faa5: 8d 65 f8 lea -0x8(%ebp),%esp 10faa8: 5b pop %ebx 10faa9: 5e pop %esi 10faaa: c9 leave 10faab: c3 ret if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) return RTEMS_INVALID_ADDRESS; 10faac: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fab1: 8d 65 f8 lea -0x8(%ebp),%esp 10fab4: 5b pop %ebx 10fab5: 5e pop %esi 10fab6: c9 leave 10fab7: c3 ret =============================================================================== 0010bb7c : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 10bb7c: 55 push %ebp 10bb7d: 89 e5 mov %esp,%ebp 10bb7f: 53 push %ebx 10bb80: 83 ec 14 sub $0x14,%esp 10bb83: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10bb86: 85 db test %ebx,%ebx 10bb88: 74 4e je 10bbd8 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10bb8a: 83 ec 08 sub $0x8,%esp 10bb8d: 8d 45 f4 lea -0xc(%ebp),%eax 10bb90: 50 push %eax 10bb91: ff 75 08 pushl 0x8(%ebp) 10bb94: e8 c7 1a 00 00 call 10d660 <_Thread_Get> switch ( location ) { 10bb99: 83 c4 10 add $0x10,%esp 10bb9c: 8b 55 f4 mov -0xc(%ebp),%edx 10bb9f: 85 d2 test %edx,%edx 10bba1: 75 29 jne 10bbcc case OBJECTS_LOCAL: if ( _Thread_Start( 10bba3: 83 ec 0c sub $0xc,%esp 10bba6: ff 75 10 pushl 0x10(%ebp) 10bba9: 6a 00 push $0x0 10bbab: 53 push %ebx 10bbac: 6a 00 push $0x0 10bbae: 50 push %eax 10bbaf: e8 84 25 00 00 call 10e138 <_Thread_Start> 10bbb4: 83 c4 20 add $0x20,%esp 10bbb7: 84 c0 test %al,%al 10bbb9: 75 29 jne 10bbe4 the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10bbbb: e8 7c 1a 00 00 call 10d63c <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10bbc0: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bbc5: 8b 5d fc mov -0x4(%ebp),%ebx 10bbc8: c9 leave 10bbc9: c3 ret 10bbca: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10bbcc: b8 04 00 00 00 mov $0x4,%eax } 10bbd1: 8b 5d fc mov -0x4(%ebp),%ebx 10bbd4: c9 leave 10bbd5: c3 ret 10bbd6: 66 90 xchg %ax,%ax <== NOT EXECUTED { register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; 10bbd8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bbdd: 8b 5d fc mov -0x4(%ebp),%ebx 10bbe0: c9 leave 10bbe1: c3 ret 10bbe2: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Start( the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); 10bbe4: e8 53 1a 00 00 call 10d63c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10bbe9: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bbeb: 8b 5d fc mov -0x4(%ebp),%ebx 10bbee: c9 leave 10bbef: c3 ret =============================================================================== 0011036c : */ rtems_status_code rtems_task_suspend( rtems_id id ) { 11036c: 55 push %ebp 11036d: 89 e5 mov %esp,%ebp 11036f: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 110372: 8d 45 f4 lea -0xc(%ebp),%eax 110375: 50 push %eax 110376: ff 75 08 pushl 0x8(%ebp) 110379: e8 e2 d2 ff ff call 10d660 <_Thread_Get> switch ( location ) { 11037e: 83 c4 10 add $0x10,%esp 110381: 8b 55 f4 mov -0xc(%ebp),%edx 110384: 85 d2 test %edx,%edx 110386: 74 08 je 110390 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 110388: b8 04 00 00 00 mov $0x4,%eax } 11038d: c9 leave 11038e: c3 ret 11038f: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 110390: f6 40 10 02 testb $0x2,0x10(%eax) 110394: 74 0e je 1103a4 _Thread_Suspend( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 110396: e8 a1 d2 ff ff call 10d63c <_Thread_Enable_dispatch> return RTEMS_ALREADY_SUSPENDED; 11039b: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1103a0: c9 leave 1103a1: c3 ret 1103a2: 66 90 xchg %ax,%ax <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Suspend( the_thread ); 1103a4: 83 ec 0c sub $0xc,%esp 1103a7: 50 push %eax 1103a8: e8 f7 08 00 00 call 110ca4 <_Thread_Suspend> _Thread_Enable_dispatch(); 1103ad: e8 8a d2 ff ff call 10d63c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1103b2: 83 c4 10 add $0x10,%esp 1103b5: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1103b7: c9 leave 1103b8: c3 ret =============================================================================== 0010c4d4 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 10c4d4: 55 push %ebp 10c4d5: 89 e5 mov %esp,%ebp 10c4d7: 57 push %edi 10c4d8: 56 push %esi 10c4d9: 53 push %ebx 10c4da: 83 ec 1c sub $0x1c,%esp 10c4dd: 8b 5d 0c mov 0xc(%ebp),%ebx 10c4e0: 8b 7d 10 mov 0x10(%ebp),%edi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 10c4e3: 85 db test %ebx,%ebx 10c4e5: 0f 84 9d 00 00 00 je 10c588 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10c4eb: 83 ec 08 sub $0x8,%esp 10c4ee: 8d 45 e4 lea -0x1c(%ebp),%eax 10c4f1: 50 push %eax 10c4f2: ff 75 08 pushl 0x8(%ebp) 10c4f5: e8 72 1c 00 00 call 10e16c <_Thread_Get> 10c4fa: 89 c6 mov %eax,%esi switch (location) { 10c4fc: 83 c4 10 add $0x10,%esp 10c4ff: 8b 45 e4 mov -0x1c(%ebp),%eax 10c502: 85 c0 test %eax,%eax 10c504: 74 0e je 10c514 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c506: b8 04 00 00 00 mov $0x4,%eax } 10c50b: 8d 65 f4 lea -0xc(%ebp),%esp 10c50e: 5b pop %ebx 10c50f: 5e pop %esi 10c510: 5f pop %edi 10c511: c9 leave 10c512: c3 ret 10c513: 90 nop <== NOT EXECUTED case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 10c514: 8b 86 fc 00 00 00 mov 0xfc(%esi),%eax while (tvp) { 10c51a: 85 c0 test %eax,%eax 10c51c: 75 44 jne 10c562 10c51e: 66 90 xchg %ax,%ax /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); 10c520: 83 ec 0c sub $0xc,%esp 10c523: 6a 14 push $0x14 10c525: e8 9a 2d 00 00 call 10f2c4 <_Workspace_Allocate> if (new == NULL) { 10c52a: 83 c4 10 add $0x10,%esp 10c52d: 85 c0 test %eax,%eax 10c52f: 74 4b je 10c57c _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 10c531: 8b 13 mov (%ebx),%edx 10c533: 89 50 08 mov %edx,0x8(%eax) new->ptr = ptr; 10c536: 89 58 04 mov %ebx,0x4(%eax) new->dtor = dtor; 10c539: 89 78 10 mov %edi,0x10(%eax) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 10c53c: 8b 96 fc 00 00 00 mov 0xfc(%esi),%edx 10c542: 89 10 mov %edx,(%eax) the_thread->task_variables = new; 10c544: 89 86 fc 00 00 00 mov %eax,0xfc(%esi) _Thread_Enable_dispatch(); 10c54a: e8 f9 1b 00 00 call 10e148 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c54f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c551: 8d 65 f4 lea -0xc(%ebp),%esp 10c554: 5b pop %ebx 10c555: 5e pop %esi 10c556: 5f pop %edi 10c557: c9 leave 10c558: c3 ret 10c559: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (tvp->ptr == ptr) { tvp->dtor = dtor; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 10c55c: 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) { 10c55e: 85 c0 test %eax,%eax 10c560: 74 be je 10c520 if (tvp->ptr == ptr) { 10c562: 39 58 04 cmp %ebx,0x4(%eax) 10c565: 75 f5 jne 10c55c tvp->dtor = dtor; 10c567: 89 78 10 mov %edi,0x10(%eax) _Thread_Enable_dispatch(); 10c56a: e8 d9 1b 00 00 call 10e148 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c56f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c571: 8d 65 f4 lea -0xc(%ebp),%esp 10c574: 5b pop %ebx 10c575: 5e pop %esi 10c576: 5f pop %edi 10c577: c9 leave 10c578: c3 ret 10c579: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); 10c57c: e8 c7 1b 00 00 call 10e148 <_Thread_Enable_dispatch> return RTEMS_NO_MEMORY; 10c581: b8 1a 00 00 00 mov $0x1a,%eax 10c586: eb 83 jmp 10c50b Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) return RTEMS_INVALID_ADDRESS; 10c588: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c58d: 8d 65 f4 lea -0xc(%ebp),%esp 10c590: 5b pop %ebx 10c591: 5e pop %esi 10c592: 5f pop %edi 10c593: c9 leave 10c594: c3 ret =============================================================================== 0010c598 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 10c598: 55 push %ebp 10c599: 89 e5 mov %esp,%ebp 10c59b: 53 push %ebx 10c59c: 83 ec 14 sub $0x14,%esp 10c59f: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 10c5a2: 85 db test %ebx,%ebx 10c5a4: 74 76 je 10c61c return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 10c5a6: 83 ec 08 sub $0x8,%esp 10c5a9: 8d 45 f4 lea -0xc(%ebp),%eax 10c5ac: 50 push %eax 10c5ad: ff 75 08 pushl 0x8(%ebp) 10c5b0: e8 b7 1b 00 00 call 10e16c <_Thread_Get> switch (location) { 10c5b5: 83 c4 10 add $0x10,%esp 10c5b8: 8b 55 f4 mov -0xc(%ebp),%edx 10c5bb: 85 d2 test %edx,%edx 10c5bd: 74 0d je 10c5cc case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c5bf: b8 04 00 00 00 mov $0x4,%eax } 10c5c4: 8b 5d fc mov -0x4(%ebp),%ebx 10c5c7: c9 leave 10c5c8: c3 ret 10c5c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; 10c5cc: 8b 88 fc 00 00 00 mov 0xfc(%eax),%ecx while (tvp) { 10c5d2: 85 c9 test %ecx,%ecx 10c5d4: 74 17 je 10c5ed if (tvp->ptr == ptr) { 10c5d6: 39 59 04 cmp %ebx,0x4(%ecx) 10c5d9: 75 0c jne 10c5e7 10c5db: eb 49 jmp 10c626 10c5dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c5e0: 39 5a 04 cmp %ebx,0x4(%edx) 10c5e3: 74 17 je 10c5fc 10c5e5: 89 d1 mov %edx,%ecx _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 10c5e7: 8b 11 mov (%ecx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 10c5e9: 85 d2 test %edx,%edx 10c5eb: 75 f3 jne 10c5e0 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10c5ed: e8 56 1b 00 00 call 10e148 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 10c5f2: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c5f7: 8b 5d fc mov -0x4(%ebp),%ebx 10c5fa: c9 leave 10c5fb: c3 ret case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 10c5fc: 8b 1a mov (%edx),%ebx 10c5fe: 89 19 mov %ebx,(%ecx) else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 10c600: 83 ec 08 sub $0x8,%esp 10c603: 52 push %edx 10c604: 50 push %eax 10c605: e8 b2 00 00 00 call 10c6bc <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 10c60a: e8 39 1b 00 00 call 10e148 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c60f: 83 c4 10 add $0x10,%esp 10c612: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c614: 8b 5d fc mov -0x4(%ebp),%ebx 10c617: c9 leave 10c618: c3 ret 10c619: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) return RTEMS_INVALID_ADDRESS; 10c61c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c621: 8b 5d fc mov -0x4(%ebp),%ebx 10c624: c9 leave 10c625: c3 ret while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 10c626: 8b 11 mov (%ecx),%edx 10c628: 89 90 fc 00 00 00 mov %edx,0xfc(%eax) 10c62e: 89 ca mov %ecx,%edx 10c630: eb ce jmp 10c600 =============================================================================== 0010c634 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 10c634: 55 push %ebp 10c635: 89 e5 mov %esp,%ebp 10c637: 56 push %esi 10c638: 53 push %ebx 10c639: 83 ec 10 sub $0x10,%esp 10c63c: 8b 5d 0c mov 0xc(%ebp),%ebx 10c63f: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 10c642: 85 db test %ebx,%ebx 10c644: 74 56 je 10c69c return RTEMS_INVALID_ADDRESS; if ( !result ) 10c646: 85 f6 test %esi,%esi 10c648: 74 52 je 10c69c return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10c64a: 83 ec 08 sub $0x8,%esp 10c64d: 8d 45 f4 lea -0xc(%ebp),%eax 10c650: 50 push %eax 10c651: ff 75 08 pushl 0x8(%ebp) 10c654: e8 13 1b 00 00 call 10e16c <_Thread_Get> switch (location) { 10c659: 83 c4 10 add $0x10,%esp 10c65c: 8b 55 f4 mov -0xc(%ebp),%edx 10c65f: 85 d2 test %edx,%edx 10c661: 75 2d jne 10c690 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 10c663: 8b 80 fc 00 00 00 mov 0xfc(%eax),%eax while (tvp) { 10c669: 85 c0 test %eax,%eax 10c66b: 75 09 jne 10c676 10c66d: eb 39 jmp 10c6a8 10c66f: 90 nop <== NOT EXECUTED */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 10c670: 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) { 10c672: 85 c0 test %eax,%eax 10c674: 74 32 je 10c6a8 <== NEVER TAKEN if (tvp->ptr == ptr) { 10c676: 39 58 04 cmp %ebx,0x4(%eax) 10c679: 75 f5 jne 10c670 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 10c67b: 8b 40 0c mov 0xc(%eax),%eax 10c67e: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10c680: e8 c3 1a 00 00 call 10e148 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c685: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c687: 8d 65 f8 lea -0x8(%ebp),%esp 10c68a: 5b pop %ebx 10c68b: 5e pop %esi 10c68c: c9 leave 10c68d: c3 ret 10c68e: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c690: b8 04 00 00 00 mov $0x4,%eax } 10c695: 8d 65 f8 lea -0x8(%ebp),%esp 10c698: 5b pop %ebx 10c699: 5e pop %esi 10c69a: c9 leave 10c69b: c3 ret if ( !ptr ) return RTEMS_INVALID_ADDRESS; if ( !result ) return RTEMS_INVALID_ADDRESS; 10c69c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c6a1: 8d 65 f8 lea -0x8(%ebp),%esp 10c6a4: 5b pop %ebx 10c6a5: 5e pop %esi 10c6a6: c9 leave 10c6a7: c3 ret _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10c6a8: e8 9b 1a 00 00 call 10e148 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 10c6ad: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c6b2: 8d 65 f8 lea -0x8(%ebp),%esp 10c6b5: 5b pop %ebx 10c6b6: 5e pop %esi 10c6b7: c9 leave 10c6b8: c3 ret =============================================================================== 0010bbf0 : */ rtems_status_code rtems_task_wake_after( rtems_interval ticks ) { 10bbf0: 55 push %ebp 10bbf1: 89 e5 mov %esp,%ebp 10bbf3: 53 push %ebx 10bbf4: 83 ec 04 sub $0x4,%esp 10bbf7: 8b 5d 08 mov 0x8(%ebp),%ebx 10bbfa: a1 d4 63 12 00 mov 0x1263d4,%eax 10bbff: 40 inc %eax 10bc00: a3 d4 63 12 00 mov %eax,0x1263d4 _Thread_Disable_dispatch(); if ( ticks == 0 ) { 10bc05: 85 db test %ebx,%ebx 10bc07: 74 53 je 10bc5c _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); 10bc09: 83 ec 08 sub $0x8,%esp 10bc0c: 6a 08 push $0x8 10bc0e: ff 35 78 66 12 00 pushl 0x126678 10bc14: e8 d7 22 00 00 call 10def0 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10bc19: a1 78 66 12 00 mov 0x126678,%eax _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); _Watchdog_Initialize( 10bc1e: 8b 50 08 mov 0x8(%eax),%edx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10bc21: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_watchdog->routine = routine; 10bc28: c7 40 64 88 d4 10 00 movl $0x10d488,0x64(%eax) the_watchdog->id = id; 10bc2f: 89 50 68 mov %edx,0x68(%eax) the_watchdog->user_data = user_data; 10bc32: c7 40 6c 00 00 00 00 movl $0x0,0x6c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10bc39: 89 58 54 mov %ebx,0x54(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10bc3c: 5a pop %edx 10bc3d: 59 pop %ecx &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); 10bc3e: 83 c0 48 add $0x48,%eax 10bc41: 50 push %eax 10bc42: 68 a4 64 12 00 push $0x1264a4 10bc47: e8 0c 29 00 00 call 10e558 <_Watchdog_Insert> 10bc4c: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10bc4f: e8 e8 19 00 00 call 10d63c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10bc54: 31 c0 xor %eax,%eax 10bc56: 8b 5d fc mov -0x4(%ebp),%ebx 10bc59: c9 leave 10bc5a: c3 ret 10bc5b: 90 nop <== NOT EXECUTED rtems_interval ticks ) { _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); 10bc5c: e8 77 25 00 00 call 10e1d8 <_Thread_Yield_processor> _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 10bc61: e8 d6 19 00 00 call 10d63c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10bc66: 31 c0 xor %eax,%eax 10bc68: 8b 5d fc mov -0x4(%ebp),%ebx 10bc6b: c9 leave 10bc6c: c3 ret =============================================================================== 0010ca38 : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 10ca38: 55 push %ebp 10ca39: 89 e5 mov %esp,%ebp 10ca3b: 53 push %ebx 10ca3c: 83 ec 14 sub $0x14,%esp 10ca3f: 8b 5d 08 mov 0x8(%ebp),%ebx Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10ca42: 80 3d 08 84 12 00 00 cmpb $0x0,0x128408 10ca49: 0f 84 a9 00 00 00 je 10caf8 return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10ca4f: 85 db test %ebx,%ebx 10ca51: 0f 84 ad 00 00 00 je 10cb04 return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 10ca57: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) if ( !_TOD_Validate( time_buffer ) ) 10ca5e: 83 ec 0c sub $0xc,%esp 10ca61: 53 push %ebx 10ca62: e8 d1 f3 ff ff call 10be38 <_TOD_Validate> 10ca67: 83 c4 10 add $0x10,%esp 10ca6a: 84 c0 test %al,%al 10ca6c: 75 0a jne 10ca78 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; 10ca6e: b8 14 00 00 00 mov $0x14,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10ca73: 8b 5d fc mov -0x4(%ebp),%ebx 10ca76: c9 leave 10ca77: c3 ret time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 10ca78: 83 ec 0c sub $0xc,%esp 10ca7b: 53 push %ebx 10ca7c: e8 2b f3 ff ff call 10bdac <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 10ca81: 83 c4 10 add $0x10,%esp 10ca84: 3b 05 88 84 12 00 cmp 0x128488,%eax 10ca8a: 76 e2 jbe 10ca6e 10ca8c: 8b 15 f4 83 12 00 mov 0x1283f4,%edx 10ca92: 42 inc %edx 10ca93: 89 15 f4 83 12 00 mov %edx,0x1283f4 return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 10ca99: 83 ec 08 sub $0x8,%esp 10ca9c: 6a 10 push $0x10 10ca9e: ff 35 98 86 12 00 pushl 0x128698 10caa4: 89 45 f4 mov %eax,-0xc(%ebp) 10caa7: e8 78 23 00 00 call 10ee24 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10caac: 8b 15 98 86 12 00 mov 0x128698,%edx if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); _Watchdog_Initialize( 10cab2: 8b 4a 08 mov 0x8(%edx),%ecx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10cab5: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 10cabc: c7 42 64 bc e3 10 00 movl $0x10e3bc,0x64(%edx) the_watchdog->id = id; 10cac3: 89 4a 68 mov %ecx,0x68(%edx) the_watchdog->user_data = user_data; 10cac6: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_seconds( 10cacd: 8b 45 f4 mov -0xc(%ebp),%eax 10cad0: 2b 05 88 84 12 00 sub 0x128488,%eax 10cad6: 89 42 54 mov %eax,0x54(%edx) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 10cad9: 58 pop %eax 10cada: 59 pop %ecx 10cadb: 83 c2 48 add $0x48,%edx 10cade: 52 push %edx 10cadf: 68 b8 84 12 00 push $0x1284b8 10cae4: e8 1b 2a 00 00 call 10f504 <_Watchdog_Insert> &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 10cae9: e8 82 1a 00 00 call 10e570 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10caee: 83 c4 10 add $0x10,%esp 10caf1: 31 c0 xor %eax,%eax 10caf3: e9 7b ff ff ff jmp 10ca73 ) { Watchdog_Interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 10caf8: b8 0b 00 00 00 mov $0xb,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10cafd: 8b 5d fc mov -0x4(%ebp),%ebx 10cb00: c9 leave 10cb01: c3 ret 10cb02: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 10cb04: b8 09 00 00 00 mov $0x9,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10cb09: 8b 5d fc mov -0x4(%ebp),%ebx 10cb0c: c9 leave 10cb0d: c3 ret =============================================================================== 001187f4 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 1187f4: 55 push %ebp 1187f5: 89 e5 mov %esp,%ebp 1187f7: 83 ec 1c sub $0x1c,%esp Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); 1187fa: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 1187fd: 50 push %eax 1187fe: ff 75 08 pushl 0x8(%ebp) 118801: 68 80 0a 14 00 push $0x140a80 118806: e8 51 2a 00 00 call 11b25c <_Objects_Get> switch ( location ) { 11880b: 83 c4 10 add $0x10,%esp 11880e: 8b 55 f4 mov -0xc(%ebp),%edx 118811: 85 d2 test %edx,%edx 118813: 74 07 je 11881c #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118815: b8 04 00 00 00 mov $0x4,%eax } 11881a: c9 leave 11881b: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 11881c: 83 78 38 04 cmpl $0x4,0x38(%eax) 118820: 74 0f je 118831 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 118822: 83 ec 0c sub $0xc,%esp 118825: 83 c0 10 add $0x10,%eax 118828: 50 push %eax 118829: e8 6e 46 00 00 call 11ce9c <_Watchdog_Remove> 11882e: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 118831: e8 8a 32 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118836: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118838: c9 leave 118839: c3 ret =============================================================================== 0010c068 : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 10c068: 55 push %ebp 10c069: 89 e5 mov %esp,%ebp 10c06b: 57 push %edi 10c06c: 56 push %esi 10c06d: 53 push %ebx 10c06e: 83 ec 0c sub $0xc,%esp 10c071: 8b 5d 08 mov 0x8(%ebp),%ebx 10c074: 8b 75 0c mov 0xc(%ebp),%esi Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 10c077: 85 db test %ebx,%ebx 10c079: 74 6d je 10c0e8 return RTEMS_INVALID_NAME; if ( !id ) 10c07b: 85 f6 test %esi,%esi 10c07d: 0f 84 89 00 00 00 je 10c10c 10c083: a1 94 79 12 00 mov 0x127994,%eax 10c088: 40 inc %eax 10c089: a3 94 79 12 00 mov %eax,0x127994 * This function allocates a timer control block from * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void ) { return (Timer_Control *) _Objects_Allocate( &_Timer_Information ); 10c08e: 83 ec 0c sub $0xc,%esp 10c091: 68 a0 7c 12 00 push $0x127ca0 10c096: e8 41 0e 00 00 call 10cedc <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 10c09b: 83 c4 10 add $0x10,%esp 10c09e: 85 c0 test %eax,%eax 10c0a0: 74 56 je 10c0f8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 10c0a2: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10c0a9: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10c0b0: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10c0b7: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10c0be: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10c0c5: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10c0c8: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c0cb: 8b 0d bc 7c 12 00 mov 0x127cbc,%ecx 10c0d1: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c0d4: 89 58 0c mov %ebx,0xc(%eax) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 10c0d7: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10c0d9: e8 12 1b 00 00 call 10dbf0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c0de: 31 c0 xor %eax,%eax } 10c0e0: 8d 65 f4 lea -0xc(%ebp),%esp 10c0e3: 5b pop %ebx 10c0e4: 5e pop %esi 10c0e5: 5f pop %edi 10c0e6: c9 leave 10c0e7: c3 ret ) { Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10c0e8: b8 03 00 00 00 mov $0x3,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c0ed: 8d 65 f4 lea -0xc(%ebp),%esp 10c0f0: 5b pop %ebx 10c0f1: 5e pop %esi 10c0f2: 5f pop %edi 10c0f3: c9 leave 10c0f4: c3 ret 10c0f5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { _Thread_Enable_dispatch(); 10c0f8: e8 f3 1a 00 00 call 10dbf0 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10c0fd: b8 05 00 00 00 mov $0x5,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c102: 8d 65 f4 lea -0xc(%ebp),%esp 10c105: 5b pop %ebx 10c106: 5e pop %esi 10c107: 5f pop %edi 10c108: c9 leave 10c109: c3 ret 10c10a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10c10c: b8 09 00 00 00 mov $0x9,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c111: 8d 65 f4 lea -0xc(%ebp),%esp 10c114: 5b pop %ebx 10c115: 5e pop %esi 10c116: 5f pop %edi 10c117: c9 leave 10c118: c3 ret =============================================================================== 001188f0 : */ rtems_status_code rtems_timer_delete( rtems_id id ) { 1188f0: 55 push %ebp 1188f1: 89 e5 mov %esp,%ebp 1188f3: 53 push %ebx 1188f4: 83 ec 18 sub $0x18,%esp Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); 1188f7: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 1188fa: 50 push %eax 1188fb: ff 75 08 pushl 0x8(%ebp) 1188fe: 68 80 0a 14 00 push $0x140a80 118903: e8 54 29 00 00 call 11b25c <_Objects_Get> 118908: 89 c3 mov %eax,%ebx switch ( location ) { 11890a: 83 c4 10 add $0x10,%esp 11890d: 8b 4d f4 mov -0xc(%ebp),%ecx 118910: 85 c9 test %ecx,%ecx 118912: 75 38 jne 11894c case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); 118914: 83 ec 08 sub $0x8,%esp 118917: 50 push %eax 118918: 68 80 0a 14 00 push $0x140a80 11891d: e8 ca 24 00 00 call 11adec <_Objects_Close> (void) _Watchdog_Remove( &the_timer->Ticker ); 118922: 8d 43 10 lea 0x10(%ebx),%eax 118925: 89 04 24 mov %eax,(%esp) 118928: e8 6f 45 00 00 call 11ce9c <_Watchdog_Remove> */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 11892d: 58 pop %eax 11892e: 5a pop %edx 11892f: 53 push %ebx 118930: 68 80 0a 14 00 push $0x140a80 118935: e8 ae 27 00 00 call 11b0e8 <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 11893a: e8 81 31 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11893f: 83 c4 10 add $0x10,%esp 118942: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118944: 8b 5d fc mov -0x4(%ebp),%ebx 118947: c9 leave 118948: c3 ret 118949: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 11894c: b8 04 00 00 00 mov $0x4,%eax } 118951: 8b 5d fc mov -0x4(%ebp),%ebx 118954: c9 leave 118955: c3 ret =============================================================================== 0010c11c : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 10c11c: 55 push %ebp 10c11d: 89 e5 mov %esp,%ebp 10c11f: 57 push %edi 10c120: 56 push %esi 10c121: 53 push %ebx 10c122: 83 ec 2c sub $0x2c,%esp 10c125: 8b 5d 0c mov 0xc(%ebp),%ebx 10c128: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 10c12b: 85 db test %ebx,%ebx 10c12d: 0f 84 99 00 00 00 je 10c1cc return RTEMS_INVALID_NUMBER; if ( !routine ) 10c133: 85 f6 test %esi,%esi 10c135: 0f 84 b1 00 00 00 je 10c1ec Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 10c13b: 57 push %edi return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); 10c13c: 8d 45 e4 lea -0x1c(%ebp),%eax 10c13f: 50 push %eax 10c140: ff 75 08 pushl 0x8(%ebp) 10c143: 68 a0 7c 12 00 push $0x127ca0 10c148: e8 3f 12 00 00 call 10d38c <_Objects_Get> 10c14d: 89 c7 mov %eax,%edi switch ( location ) { 10c14f: 83 c4 10 add $0x10,%esp 10c152: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c155: 85 c9 test %ecx,%ecx 10c157: 74 0f je 10c168 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c159: b8 04 00 00 00 mov $0x4,%eax } 10c15e: 8d 65 f4 lea -0xc(%ebp),%esp 10c161: 5b pop %ebx 10c162: 5e pop %esi 10c163: 5f pop %edi 10c164: c9 leave 10c165: c3 ret 10c166: 66 90 xchg %ax,%ax <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 10c168: 8d 50 10 lea 0x10(%eax),%edx 10c16b: 83 ec 0c sub $0xc,%esp 10c16e: 52 push %edx 10c16f: 89 55 d4 mov %edx,-0x2c(%ebp) 10c172: e8 cd 2a 00 00 call 10ec44 <_Watchdog_Remove> _ISR_Disable( level ); 10c177: 9c pushf 10c178: fa cli 10c179: 58 pop %eax /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 10c17a: 83 c4 10 add $0x10,%esp 10c17d: 8b 57 18 mov 0x18(%edi),%edx 10c180: 85 d2 test %edx,%edx 10c182: 8b 55 d4 mov -0x2c(%ebp),%edx 10c185: 75 55 jne 10c1dc /* * 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; 10c187: c7 47 38 00 00 00 00 movl $0x0,0x38(%edi) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10c18e: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 10c195: 89 77 2c mov %esi,0x2c(%edi) the_watchdog->id = id; 10c198: 8b 4d 08 mov 0x8(%ebp),%ecx 10c19b: 89 4f 30 mov %ecx,0x30(%edi) the_watchdog->user_data = user_data; 10c19e: 8b 4d 14 mov 0x14(%ebp),%ecx 10c1a1: 89 4f 34 mov %ecx,0x34(%edi) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 10c1a4: 50 push %eax 10c1a5: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c1a6: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c1a9: 83 ec 08 sub $0x8,%esp 10c1ac: 52 push %edx 10c1ad: 68 64 7a 12 00 push $0x127a64 10c1b2: e8 55 29 00 00 call 10eb0c <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 10c1b7: e8 34 1a 00 00 call 10dbf0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c1bc: 83 c4 10 add $0x10,%esp 10c1bf: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c1c1: 8d 65 f4 lea -0xc(%ebp),%esp 10c1c4: 5b pop %ebx 10c1c5: 5e pop %esi 10c1c6: 5f pop %edi 10c1c7: c9 leave 10c1c8: c3 ret 10c1c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; 10c1cc: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c1d1: 8d 65 f4 lea -0xc(%ebp),%esp 10c1d4: 5b pop %ebx 10c1d5: 5e pop %esi 10c1d6: 5f pop %edi 10c1d7: c9 leave 10c1d8: c3 ret 10c1d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 10c1dc: 50 push %eax 10c1dd: 9d popf _Thread_Enable_dispatch(); 10c1de: e8 0d 1a 00 00 call 10dbf0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c1e3: 31 c0 xor %eax,%eax 10c1e5: e9 74 ff ff ff jmp 10c15e 10c1ea: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) return RTEMS_INVALID_ADDRESS; 10c1ec: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c1f1: 8d 65 f4 lea -0xc(%ebp),%esp 10c1f4: 5b pop %ebx 10c1f5: 5e pop %esi 10c1f6: 5f pop %edi 10c1f7: c9 leave 10c1f8: c3 ret =============================================================================== 00118a38 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 118a38: 55 push %ebp 118a39: 89 e5 mov %esp,%ebp 118a3b: 57 push %edi 118a3c: 56 push %esi 118a3d: 53 push %ebx 118a3e: 83 ec 2c sub $0x2c,%esp 118a41: 8b 75 08 mov 0x8(%ebp),%esi 118a44: 8b 7d 0c mov 0xc(%ebp),%edi 118a47: 8b 5d 10 mov 0x10(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 118a4a: 80 3d 88 07 14 00 00 cmpb $0x0,0x140788 118a51: 75 0d jne 118a60 return RTEMS_NOT_DEFINED; 118a53: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a58: 8d 65 f4 lea -0xc(%ebp),%esp 118a5b: 5b pop %ebx 118a5c: 5e pop %esi 118a5d: 5f pop %edi 118a5e: c9 leave 118a5f: c3 ret rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 118a60: 83 ec 0c sub $0xc,%esp 118a63: 57 push %edi 118a64: e8 7b d4 ff ff call 115ee4 <_TOD_Validate> 118a69: 83 c4 10 add $0x10,%esp 118a6c: 84 c0 test %al,%al 118a6e: 74 1e je 118a8e return RTEMS_INVALID_CLOCK; if ( !routine ) 118a70: 85 db test %ebx,%ebx 118a72: 0f 84 a4 00 00 00 je 118b1c return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 118a78: 83 ec 0c sub $0xc,%esp 118a7b: 57 push %edi 118a7c: e8 d7 d3 ff ff call 115e58 <_TOD_To_seconds> 118a81: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 118a83: 83 c4 10 add $0x10,%esp 118a86: 3b 05 08 08 14 00 cmp 0x140808,%eax 118a8c: 77 0e ja 118a9c return RTEMS_INVALID_CLOCK; 118a8e: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a93: 8d 65 f4 lea -0xc(%ebp),%esp 118a96: 5b pop %ebx 118a97: 5e pop %esi 118a98: 5f pop %edi 118a99: c9 leave 118a9a: c3 ret 118a9b: 90 nop <== NOT EXECUTED 118a9c: 50 push %eax seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); 118a9d: 8d 45 e4 lea -0x1c(%ebp),%eax 118aa0: 50 push %eax 118aa1: 56 push %esi 118aa2: 68 80 0a 14 00 push $0x140a80 118aa7: e8 b0 27 00 00 call 11b25c <_Objects_Get> switch ( location ) { 118aac: 83 c4 10 add $0x10,%esp 118aaf: 8b 4d e4 mov -0x1c(%ebp),%ecx 118ab2: 85 c9 test %ecx,%ecx 118ab4: 75 5a jne 118b10 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118ab6: 8d 48 10 lea 0x10(%eax),%ecx 118ab9: 83 ec 0c sub $0xc,%esp 118abc: 51 push %ecx 118abd: 89 45 d0 mov %eax,-0x30(%ebp) 118ac0: 89 4d d4 mov %ecx,-0x2c(%ebp) 118ac3: e8 d4 43 00 00 call 11ce9c <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY; 118ac8: 8b 55 d0 mov -0x30(%ebp),%edx 118acb: c7 42 38 02 00 00 00 movl $0x2,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 118ad2: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118ad9: 89 5a 2c mov %ebx,0x2c(%edx) the_watchdog->id = id; 118adc: 89 72 30 mov %esi,0x30(%edx) the_watchdog->user_data = user_data; 118adf: 8b 45 14 mov 0x14(%ebp),%eax 118ae2: 89 42 34 mov %eax,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( 118ae5: 2b 3d 08 08 14 00 sub 0x140808,%edi 118aeb: 89 7a 1c mov %edi,0x1c(%edx) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 118aee: 58 pop %eax 118aef: 5a pop %edx 118af0: 8b 4d d4 mov -0x2c(%ebp),%ecx 118af3: 51 push %ecx 118af4: 68 38 08 14 00 push $0x140838 118af9: e8 66 42 00 00 call 11cd64 <_Watchdog_Insert> &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 118afe: e8 bd 2f 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118b03: 83 c4 10 add $0x10,%esp 118b06: 31 c0 xor %eax,%eax 118b08: e9 4b ff ff ff jmp 118a58 118b0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118b10: b8 04 00 00 00 mov $0x4,%eax 118b15: e9 3e ff ff ff jmp 118a58 118b1a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) return RTEMS_INVALID_ADDRESS; 118b1c: b8 09 00 00 00 mov $0x9,%eax 118b21: e9 32 ff ff ff jmp 118a58 =============================================================================== 00118b28 : rtems_status_code rtems_timer_get_information( rtems_id id, rtems_timer_information *the_info ) { 118b28: 55 push %ebp 118b29: 89 e5 mov %esp,%ebp 118b2b: 53 push %ebx 118b2c: 83 ec 14 sub $0x14,%esp 118b2f: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 118b32: 85 db test %ebx,%ebx 118b34: 74 4a je 118b80 118b36: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); 118b37: 8d 45 f4 lea -0xc(%ebp),%eax 118b3a: 50 push %eax 118b3b: ff 75 08 pushl 0x8(%ebp) 118b3e: 68 80 0a 14 00 push $0x140a80 118b43: e8 14 27 00 00 call 11b25c <_Objects_Get> switch ( location ) { 118b48: 83 c4 10 add $0x10,%esp 118b4b: 8b 55 f4 mov -0xc(%ebp),%edx 118b4e: 85 d2 test %edx,%edx 118b50: 74 0a je 118b5c #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118b52: b8 04 00 00 00 mov $0x4,%eax } 118b57: 8b 5d fc mov -0x4(%ebp),%ebx 118b5a: c9 leave 118b5b: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 118b5c: 8b 50 38 mov 0x38(%eax),%edx 118b5f: 89 13 mov %edx,(%ebx) the_info->initial = the_timer->Ticker.initial; 118b61: 8b 50 1c mov 0x1c(%eax),%edx 118b64: 89 53 04 mov %edx,0x4(%ebx) the_info->start_time = the_timer->Ticker.start_time; 118b67: 8b 50 24 mov 0x24(%eax),%edx 118b6a: 89 53 08 mov %edx,0x8(%ebx) the_info->stop_time = the_timer->Ticker.stop_time; 118b6d: 8b 40 28 mov 0x28(%eax),%eax 118b70: 89 43 0c mov %eax,0xc(%ebx) _Thread_Enable_dispatch(); 118b73: e8 48 2f 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118b78: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118b7a: 8b 5d fc mov -0x4(%ebp),%ebx 118b7d: c9 leave 118b7e: c3 ret 118b7f: 90 nop <== NOT EXECUTED { Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) return RTEMS_INVALID_ADDRESS; 118b80: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118b85: 8b 5d fc mov -0x4(%ebp),%ebx 118b88: c9 leave 118b89: c3 ret =============================================================================== 001191b4 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 1191b4: 55 push %ebp 1191b5: 89 e5 mov %esp,%ebp 1191b7: 56 push %esi 1191b8: 53 push %ebx 1191b9: 83 ec 10 sub $0x10,%esp 1191bc: 8b 45 08 mov 0x8(%ebp),%eax 1191bf: 85 c0 test %eax,%eax 1191c1: 74 41 je 119204 ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 1191c3: 0f b6 15 14 82 13 00 movzbl 0x138214,%edx */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 1191ca: 39 d0 cmp %edx,%eax 1191cc: 76 42 jbe 119210 * structured so we check it is invalid before looking for * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 1191ce: 40 inc %eax 1191cf: 75 33 jne 119204 return RTEMS_INVALID_PRIORITY; _priority = 0; 1191d1: 31 f6 xor %esi,%esi 1191d3: 8b 15 74 07 14 00 mov 0x140774,%edx 1191d9: 42 inc %edx 1191da: 89 15 74 07 14 00 mov %edx,0x140774 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 1191e0: 8a 1d a0 c0 13 00 mov 0x13c0a0,%bl initialized = true; 1191e6: c6 05 a0 c0 13 00 01 movb $0x1,0x13c0a0 _Thread_Enable_dispatch(); 1191ed: e8 ce 28 00 00 call 11bac0 <_Thread_Enable_dispatch> if ( tmpInitialized ) 1191f2: 84 db test %bl,%bl 1191f4: 74 1e je 119214 return RTEMS_INCORRECT_STATE; 1191f6: b8 0e 00 00 00 mov $0xe,%eax initialized = false; } #endif return status; } 1191fb: 8d 65 f8 lea -0x8(%ebp),%esp 1191fe: 5b pop %ebx 1191ff: 5e pop %esi 119200: c9 leave 119201: c3 ret 119202: 66 90 xchg %ax,%ax <== NOT EXECUTED * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) return RTEMS_INVALID_PRIORITY; 119204: b8 13 00 00 00 mov $0x13,%eax initialized = false; } #endif return status; } 119209: 8d 65 f8 lea -0x8(%ebp),%esp 11920c: 5b pop %ebx 11920d: 5e pop %esi 11920e: c9 leave 11920f: c3 ret 119210: 89 c6 mov %eax,%esi 119212: eb bf jmp 1191d3 * 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( 119214: 83 ec 08 sub $0x8,%esp 119217: 8d 45 f4 lea -0xc(%ebp),%eax 11921a: 50 push %eax 11921b: 8b 45 10 mov 0x10(%ebp),%eax 11921e: 80 cc 80 or $0x80,%ah 119221: 50 push %eax 119222: 68 00 01 00 00 push $0x100 119227: ff 75 0c pushl 0xc(%ebp) 11922a: 56 push %esi 11922b: 68 45 4d 49 54 push $0x54494d45 119230: e8 db ec ff ff call 117f10 /* 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) { 119235: 83 c4 20 add $0x20,%esp 119238: 85 c0 test %eax,%eax 11923a: 74 10 je 11924c initialized = false; 11923c: c6 05 a0 c0 13 00 00 movb $0x0,0x13c0a0 initialized = false; } #endif return status; } 119243: 8d 65 f8 lea -0x8(%ebp),%esp 119246: 5b pop %ebx 119247: 5e pop %esi 119248: c9 leave 119249: c3 ret 11924a: 66 90 xchg %ax,%ax <== NOT EXECUTED * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( &_RTEMS_tasks_Information, _Objects_Get_index(id) 11924c: 8b 45 f4 mov -0xc(%ebp),%eax */ #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return NULL; #endif return information->local_table[ index ]; 11924f: 0f b7 c8 movzwl %ax,%ecx 119252: 8b 15 1c 07 14 00 mov 0x14071c,%edx /* * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( 119258: 8b 14 8a mov (%edx,%ecx,4),%edx 11925b: 89 15 20 c0 13 00 mov %edx,0x13c020 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 119261: c7 05 50 c0 13 00 54 movl $0x13c054,0x13c050 119268: c0 13 00 the_chain->permanent_null = NULL; 11926b: c7 05 54 c0 13 00 00 movl $0x0,0x13c054 119272: 00 00 00 the_chain->last = _Chain_Head(the_chain); 119275: c7 05 58 c0 13 00 50 movl $0x13c050,0x13c058 11927c: c0 13 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11927f: c7 05 88 c0 13 00 8c movl $0x13c08c,0x13c088 119286: c0 13 00 the_chain->permanent_null = NULL; 119289: c7 05 8c c0 13 00 00 movl $0x0,0x13c08c 119290: 00 00 00 the_chain->last = _Chain_Head(the_chain); 119293: c7 05 90 c0 13 00 88 movl $0x13c088,0x13c090 11929a: c0 13 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11929d: c7 05 30 c0 13 00 00 movl $0x0,0x13c030 1192a4: 00 00 00 the_watchdog->routine = routine; 1192a7: c7 05 44 c0 13 00 0c movl $0x11b90c,0x13c044 1192ae: b9 11 00 the_watchdog->id = id; 1192b1: a3 48 c0 13 00 mov %eax,0x13c048 the_watchdog->user_data = user_data; 1192b6: c7 05 4c c0 13 00 00 movl $0x0,0x13c04c 1192bd: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 1192c0: c7 05 68 c0 13 00 00 movl $0x0,0x13c068 1192c7: 00 00 00 the_watchdog->routine = routine; 1192ca: c7 05 7c c0 13 00 0c movl $0x11b90c,0x13c07c 1192d1: b9 11 00 the_watchdog->id = id; 1192d4: a3 80 c0 13 00 mov %eax,0x13c080 the_watchdog->user_data = user_data; 1192d9: c7 05 84 c0 13 00 00 movl $0x0,0x13c084 1192e0: 00 00 00 /* * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; 1192e3: c7 05 24 c0 13 00 84 movl $0x119084,0x13c024 1192ea: 90 11 00 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 1192ed: 8b 15 c4 08 14 00 mov 0x1408c4,%edx 1192f3: 89 15 5c c0 13 00 mov %edx,0x13c05c ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 1192f9: 8b 15 08 08 14 00 mov 0x140808,%edx 1192ff: 89 15 94 c0 13 00 mov %edx,0x13c094 ts->insert_chain = NULL; 119305: c7 05 98 c0 13 00 00 movl $0x0,0x13c098 11930c: 00 00 00 ts->active = false; 11930f: c6 05 9c c0 13 00 00 movb $0x0,0x13c09c /* * The default timer server is now available. */ _Timer_server = ts; 119316: c7 05 c0 0a 14 00 20 movl $0x13c020,0x140ac0 11931d: c0 13 00 /* * Start the timer server */ status = rtems_task_start( 119320: 53 push %ebx 119321: 68 20 c0 13 00 push $0x13c020 119326: 68 d8 8e 11 00 push $0x118ed8 11932b: 50 push %eax 11932c: e8 a7 f2 ff ff call 1185d8 if (status) { initialized = false; } #endif return status; 119331: 83 c4 10 add $0x10,%esp 119334: e9 d0 fe ff ff jmp 119209 =============================================================================== 00118bb0 : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 118bb0: 55 push %ebp 118bb1: 89 e5 mov %esp,%ebp 118bb3: 56 push %esi 118bb4: 53 push %ebx 118bb5: 83 ec 24 sub $0x24,%esp Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); 118bb8: 8d 45 f4 lea -0xc(%ebp),%eax 118bbb: 50 push %eax 118bbc: ff 75 08 pushl 0x8(%ebp) 118bbf: 68 80 0a 14 00 push $0x140a80 118bc4: e8 93 26 00 00 call 11b25c <_Objects_Get> 118bc9: 89 c3 mov %eax,%ebx switch ( location ) { 118bcb: 83 c4 10 add $0x10,%esp 118bce: 8b 45 f4 mov -0xc(%ebp),%eax 118bd1: 85 c0 test %eax,%eax 118bd3: 74 0f je 118be4 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118bd5: b8 04 00 00 00 mov $0x4,%eax } 118bda: 8d 65 f8 lea -0x8(%ebp),%esp 118bdd: 5b pop %ebx 118bde: 5e pop %esi 118bdf: c9 leave 118be0: c3 ret 118be1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { 118be4: 8b 43 38 mov 0x38(%ebx),%eax 118be7: 85 c0 test %eax,%eax 118be9: 74 1d je 118c08 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118beb: 48 dec %eax 118bec: 74 3a je 118c28 /* * Must be dormant or time of day timer (e.g. TIMER_DORMANT, * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; 118bee: b8 0b 00 00 00 mov $0xb,%eax } _Thread_Enable_dispatch(); 118bf3: 89 45 e4 mov %eax,-0x1c(%ebp) 118bf6: e8 c5 2e 00 00 call 11bac0 <_Thread_Enable_dispatch> return status; 118bfb: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118bfe: 8d 65 f8 lea -0x8(%ebp),%esp 118c01: 5b pop %ebx 118c02: 5e pop %esi 118c03: c9 leave 118c04: c3 ret 118c05: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); 118c08: 83 c3 10 add $0x10,%ebx 118c0b: 83 ec 0c sub $0xc,%esp 118c0e: 53 push %ebx 118c0f: e8 88 42 00 00 call 11ce9c <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 118c14: 59 pop %ecx 118c15: 5e pop %esi 118c16: 53 push %ebx 118c17: 68 44 08 14 00 push $0x140844 118c1c: e8 43 41 00 00 call 11cd64 <_Watchdog_Insert> 118c21: 83 c4 10 add $0x10,%esp rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 118c24: 31 c0 xor %eax,%eax 118c26: eb cb jmp 118bf3 case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { Timer_server_Control *timer_server = _Timer_server; 118c28: 8b 35 c0 0a 14 00 mov 0x140ac0,%esi if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 118c2e: 83 ec 0c sub $0xc,%esp 118c31: 8d 43 10 lea 0x10(%ebx),%eax 118c34: 50 push %eax 118c35: e8 62 42 00 00 call 11ce9c <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 118c3a: 58 pop %eax 118c3b: 5a pop %edx 118c3c: 53 push %ebx 118c3d: 56 push %esi 118c3e: ff 56 04 call *0x4(%esi) 118c41: 83 c4 10 add $0x10,%esp rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 118c44: 31 c0 xor %eax,%eax 118c46: eb ab jmp 118bf3 =============================================================================== 00118c48 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 118c48: 55 push %ebp 118c49: 89 e5 mov %esp,%ebp 118c4b: 57 push %edi 118c4c: 56 push %esi 118c4d: 53 push %ebx 118c4e: 83 ec 2c sub $0x2c,%esp 118c51: 8b 7d 0c mov 0xc(%ebp),%edi 118c54: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 118c57: 8b 1d c0 0a 14 00 mov 0x140ac0,%ebx if ( !timer_server ) 118c5d: 85 db test %ebx,%ebx 118c5f: 0f 84 9f 00 00 00 je 118d04 return RTEMS_INCORRECT_STATE; if ( !routine ) 118c65: 85 f6 test %esi,%esi 118c67: 0f 84 a3 00 00 00 je 118d10 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 118c6d: 85 ff test %edi,%edi 118c6f: 75 0f jne 118c80 return RTEMS_INVALID_NUMBER; 118c71: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118c76: 8d 65 f4 lea -0xc(%ebp),%esp 118c79: 5b pop %ebx 118c7a: 5e pop %esi 118c7b: 5f pop %edi 118c7c: c9 leave 118c7d: c3 ret 118c7e: 66 90 xchg %ax,%ax <== NOT EXECUTED 118c80: 52 push %edx return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); 118c81: 8d 45 e4 lea -0x1c(%ebp),%eax 118c84: 50 push %eax 118c85: ff 75 08 pushl 0x8(%ebp) 118c88: 68 80 0a 14 00 push $0x140a80 118c8d: e8 ca 25 00 00 call 11b25c <_Objects_Get> 118c92: 89 c2 mov %eax,%edx switch ( location ) { 118c94: 83 c4 10 add $0x10,%esp 118c97: 8b 45 e4 mov -0x1c(%ebp),%eax 118c9a: 85 c0 test %eax,%eax 118c9c: 75 56 jne 118cf4 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118c9e: 83 ec 0c sub $0xc,%esp 118ca1: 8d 42 10 lea 0x10(%edx),%eax 118ca4: 50 push %eax 118ca5: 89 55 d4 mov %edx,-0x2c(%ebp) 118ca8: e8 ef 41 00 00 call 11ce9c <_Watchdog_Remove> _ISR_Disable( level ); 118cad: 9c pushf 118cae: fa cli 118caf: 58 pop %eax /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 118cb0: 83 c4 10 add $0x10,%esp 118cb3: 8b 55 d4 mov -0x2c(%ebp),%edx 118cb6: 8b 4a 18 mov 0x18(%edx),%ecx 118cb9: 85 c9 test %ecx,%ecx 118cbb: 75 5f jne 118d1c /* * 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; 118cbd: c7 42 38 01 00 00 00 movl $0x1,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 118cc4: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118ccb: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118cce: 8b 4d 08 mov 0x8(%ebp),%ecx 118cd1: 89 4a 30 mov %ecx,0x30(%edx) the_watchdog->user_data = user_data; 118cd4: 8b 4d 14 mov 0x14(%ebp),%ecx 118cd7: 89 4a 34 mov %ecx,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 118cda: 89 7a 1c mov %edi,0x1c(%edx) _ISR_Enable( level ); 118cdd: 50 push %eax 118cde: 9d popf (*timer_server->schedule_operation)( timer_server, the_timer ); 118cdf: 83 ec 08 sub $0x8,%esp 118ce2: 52 push %edx 118ce3: 53 push %ebx 118ce4: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 118ce7: e8 d4 2d 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118cec: 83 c4 10 add $0x10,%esp 118cef: 31 c0 xor %eax,%eax 118cf1: eb 83 jmp 118c76 118cf3: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118cf4: b8 04 00 00 00 mov $0x4,%eax } 118cf9: 8d 65 f4 lea -0xc(%ebp),%esp 118cfc: 5b pop %ebx 118cfd: 5e pop %esi 118cfe: 5f pop %edi 118cff: c9 leave 118d00: c3 ret 118d01: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; 118d04: b8 0e 00 00 00 mov $0xe,%eax 118d09: e9 68 ff ff ff jmp 118c76 118d0e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !routine ) return RTEMS_INVALID_ADDRESS; 118d10: b8 09 00 00 00 mov $0x9,%eax 118d15: e9 5c ff ff ff jmp 118c76 118d1a: 66 90 xchg %ax,%ax <== NOT EXECUTED * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 118d1c: 50 push %eax 118d1d: 9d popf _Thread_Enable_dispatch(); 118d1e: e8 9d 2d 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118d23: 31 c0 xor %eax,%eax 118d25: e9 4c ff ff ff jmp 118c76 =============================================================================== 00118d2c : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 118d2c: 55 push %ebp 118d2d: 89 e5 mov %esp,%ebp 118d2f: 57 push %edi 118d30: 56 push %esi 118d31: 53 push %ebx 118d32: 83 ec 2c sub $0x2c,%esp 118d35: 8b 7d 0c mov 0xc(%ebp),%edi 118d38: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 118d3b: 8b 1d c0 0a 14 00 mov 0x140ac0,%ebx if ( !timer_server ) 118d41: 85 db test %ebx,%ebx 118d43: 0f 84 d7 00 00 00 je 118e20 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 118d49: 80 3d 88 07 14 00 00 cmpb $0x0,0x140788 118d50: 0f 84 aa 00 00 00 je 118e00 <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 118d56: 85 f6 test %esi,%esi 118d58: 0f 84 b2 00 00 00 je 118e10 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 118d5e: 83 ec 0c sub $0xc,%esp 118d61: 57 push %edi 118d62: e8 7d d1 ff ff call 115ee4 <_TOD_Validate> 118d67: 83 c4 10 add $0x10,%esp 118d6a: 84 c0 test %al,%al 118d6c: 75 0e jne 118d7c return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; 118d6e: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118d73: 8d 65 f4 lea -0xc(%ebp),%esp 118d76: 5b pop %ebx 118d77: 5e pop %esi 118d78: 5f pop %edi 118d79: c9 leave 118d7a: c3 ret 118d7b: 90 nop <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 118d7c: 83 ec 0c sub $0xc,%esp 118d7f: 57 push %edi 118d80: e8 d3 d0 ff ff call 115e58 <_TOD_To_seconds> 118d85: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 118d87: 83 c4 10 add $0x10,%esp 118d8a: 3b 05 08 08 14 00 cmp 0x140808,%eax 118d90: 76 dc jbe 118d6e 118d92: 52 push %edx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); 118d93: 8d 45 e4 lea -0x1c(%ebp),%eax 118d96: 50 push %eax 118d97: ff 75 08 pushl 0x8(%ebp) 118d9a: 68 80 0a 14 00 push $0x140a80 118d9f: e8 b8 24 00 00 call 11b25c <_Objects_Get> 118da4: 89 c2 mov %eax,%edx switch ( location ) { 118da6: 83 c4 10 add $0x10,%esp 118da9: 8b 45 e4 mov -0x1c(%ebp),%eax 118dac: 85 c0 test %eax,%eax 118dae: 75 7c jne 118e2c case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118db0: 83 ec 0c sub $0xc,%esp 118db3: 8d 42 10 lea 0x10(%edx),%eax 118db6: 50 push %eax 118db7: 89 55 d4 mov %edx,-0x2c(%ebp) 118dba: e8 dd 40 00 00 call 11ce9c <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 118dbf: 8b 55 d4 mov -0x2c(%ebp),%edx 118dc2: c7 42 38 03 00 00 00 movl $0x3,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 118dc9: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118dd0: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118dd3: 8b 45 08 mov 0x8(%ebp),%eax 118dd6: 89 42 30 mov %eax,0x30(%edx) the_watchdog->user_data = user_data; 118dd9: 8b 45 14 mov 0x14(%ebp),%eax 118ddc: 89 42 34 mov %eax,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 118ddf: 2b 3d 08 08 14 00 sub 0x140808,%edi 118de5: 89 7a 1c mov %edi,0x1c(%edx) (*timer_server->schedule_operation)( timer_server, the_timer ); 118de8: 58 pop %eax 118de9: 59 pop %ecx 118dea: 52 push %edx 118deb: 53 push %ebx 118dec: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 118def: e8 cc 2c 00 00 call 11bac0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118df4: 83 c4 10 add $0x10,%esp 118df7: 31 c0 xor %eax,%eax 118df9: e9 75 ff ff ff jmp 118d73 118dfe: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 118e00: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118e05: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 118e08: 5b pop %ebx <== NOT EXECUTED 118e09: 5e pop %esi <== NOT EXECUTED 118e0a: 5f pop %edi <== NOT EXECUTED 118e0b: c9 leave <== NOT EXECUTED 118e0c: c3 ret <== NOT EXECUTED 118e0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; 118e10: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118e15: 8d 65 f4 lea -0xc(%ebp),%esp 118e18: 5b pop %ebx 118e19: 5e pop %esi 118e1a: 5f pop %edi 118e1b: c9 leave 118e1c: c3 ret 118e1d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; 118e20: b8 0e 00 00 00 mov $0xe,%eax 118e25: e9 49 ff ff ff jmp 118d73 118e2a: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118e2c: b8 04 00 00 00 mov $0x4,%eax 118e31: e9 3d ff ff ff jmp 118d73