=============================================================================== 0010be50 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 10be50: 55 push %ebp 10be51: 89 e5 mov %esp,%ebp 10be53: 53 push %ebx 10be54: 83 ec 04 sub $0x4,%esp the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10be57: 8b 1d f8 66 12 00 mov 0x1266f8,%ebx void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 10be5d: 81 fb fc 66 12 00 cmp $0x1266fc,%ebx 10be63: 74 10 je 10be75 <_API_extensions_Run_postdriver+0x25><== NEVER TAKEN 10be65: 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)(); 10be68: ff 53 08 call *0x8(%ebx) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 10be6b: 8b 1b mov (%ebx),%ebx void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 10be6d: 81 fb fc 66 12 00 cmp $0x1266fc,%ebx 10be73: 75 f3 jne 10be68 <_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)(); } } 10be75: 58 pop %eax 10be76: 5b pop %ebx 10be77: c9 leave 10be78: c3 ret =============================================================================== 0010be7c <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 10be7c: 55 push %ebp 10be7d: 89 e5 mov %esp,%ebp 10be7f: 53 push %ebx 10be80: 83 ec 04 sub $0x4,%esp the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10be83: 8b 1d f8 66 12 00 mov 0x1266f8,%ebx void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 10be89: 81 fb fc 66 12 00 cmp $0x1266fc,%ebx 10be8f: 74 1c je 10bead <_API_extensions_Run_postswitch+0x31><== NEVER TAKEN 10be91: 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 ); 10be94: 83 ec 0c sub $0xc,%esp 10be97: ff 35 58 67 12 00 pushl 0x126758 10be9d: ff 53 0c call *0xc(%ebx) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 10bea0: 8b 1b mov (%ebx),%ebx void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 10bea2: 83 c4 10 add $0x10,%esp 10bea5: 81 fb fc 66 12 00 cmp $0x1266fc,%ebx 10beab: 75 e7 jne 10be94 <_API_extensions_Run_postswitch+0x18><== NEVER TAKEN the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10bead: 8b 5d fc mov -0x4(%ebp),%ebx 10beb0: c9 leave 10beb1: c3 ret =============================================================================== 00119890 <_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 ) { 119890: 55 push %ebp 119891: 89 e5 mov %esp,%ebp 119893: 57 push %edi 119894: 56 push %esi 119895: 53 push %ebx 119896: 83 ec 1c sub $0x1c,%esp 119899: 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 ) { 11989c: 8b 45 10 mov 0x10(%ebp),%eax 11989f: 39 43 4c cmp %eax,0x4c(%ebx) 1198a2: 72 60 jb 119904 <_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 ) { 1198a4: 8b 43 48 mov 0x48(%ebx),%eax 1198a7: 85 c0 test %eax,%eax 1198a9: 75 45 jne 1198f0 <_CORE_message_queue_Broadcast+0x60> 1198ab: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 1198b2: eb 18 jmp 1198cc <_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; 1198b4: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 1198b7: 8b 42 2c mov 0x2c(%edx),%eax 1198ba: 89 c7 mov %eax,%edi 1198bc: 8b 75 0c mov 0xc(%ebp),%esi 1198bf: 8b 4d 10 mov 0x10(%ebp),%ecx 1198c2: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 1198c4: 8b 42 28 mov 0x28(%edx),%eax 1198c7: 8b 55 10 mov 0x10(%ebp),%edx 1198ca: 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 = 1198cc: 83 ec 0c sub $0xc,%esp 1198cf: 53 push %ebx 1198d0: e8 7f 27 00 00 call 11c054 <_Thread_queue_Dequeue> 1198d5: 89 c2 mov %eax,%edx 1198d7: 83 c4 10 add $0x10,%esp 1198da: 85 c0 test %eax,%eax 1198dc: 75 d6 jne 1198b4 <_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; 1198de: 8b 55 e4 mov -0x1c(%ebp),%edx 1198e1: 8b 45 1c mov 0x1c(%ebp),%eax 1198e4: 89 10 mov %edx,(%eax) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 1198e6: 31 c0 xor %eax,%eax } 1198e8: 8d 65 f4 lea -0xc(%ebp),%esp 1198eb: 5b pop %ebx 1198ec: 5e pop %esi 1198ed: 5f pop %edi 1198ee: c9 leave 1198ef: 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; 1198f0: 8b 55 1c mov 0x1c(%ebp),%edx 1198f3: c7 02 00 00 00 00 movl $0x0,(%edx) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 1198f9: 31 c0 xor %eax,%eax #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 1198fb: 8d 65 f4 lea -0xc(%ebp),%esp 1198fe: 5b pop %ebx 1198ff: 5e pop %esi 119900: 5f pop %edi 119901: c9 leave 119902: c3 ret 119903: 90 nop 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; 119904: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 119909: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11990c: 5b pop %ebx <== NOT EXECUTED 11990d: 5e pop %esi <== NOT EXECUTED 11990e: 5f pop %edi <== NOT EXECUTED 11990f: c9 leave <== NOT EXECUTED 119910: c3 ret <== NOT EXECUTED =============================================================================== 001149d0 <_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 ) { 1149d0: 55 push %ebp 1149d1: 89 e5 mov %esp,%ebp 1149d3: 57 push %edi 1149d4: 56 push %esi 1149d5: 53 push %ebx 1149d6: 83 ec 0c sub $0xc,%esp 1149d9: 8b 5d 08 mov 0x8(%ebp),%ebx 1149dc: 8b 75 10 mov 0x10(%ebp),%esi 1149df: 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; 1149e2: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 1149e5: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 1149ec: 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)) { 1149ef: a8 03 test $0x3,%al 1149f1: 74 15 je 114a08 <_CORE_message_queue_Initialize+0x38> allocated_message_size += sizeof(uint32_t); 1149f3: 8d 50 04 lea 0x4(%eax),%edx allocated_message_size &= ~(sizeof(uint32_t) - 1); 1149f6: 83 e2 fc and $0xfffffffc,%edx } if (allocated_message_size < maximum_message_size) 1149f9: 39 d0 cmp %edx,%eax 1149fb: 76 0d jbe 114a0a <_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; 1149fd: 31 c0 xor %eax,%eax STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 1149ff: 8d 65 f4 lea -0xc(%ebp),%esp 114a02: 5b pop %ebx 114a03: 5e pop %esi 114a04: 5f pop %edi 114a05: c9 leave 114a06: c3 ret 114a07: 90 nop /* * 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)) { 114a08: 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)); 114a0a: 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 * 114a0d: 89 f8 mov %edi,%eax 114a0f: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 114a12: 39 d0 cmp %edx,%eax 114a14: 72 e7 jb 1149fd <_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 ); 114a16: 83 ec 0c sub $0xc,%esp 114a19: 50 push %eax 114a1a: e8 f5 29 00 00 call 117414 <_Workspace_Allocate> return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 114a1f: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 114a22: 83 c4 10 add $0x10,%esp 114a25: 85 c0 test %eax,%eax 114a27: 74 d4 je 1149fd <_CORE_message_queue_Initialize+0x2d> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 114a29: 57 push %edi 114a2a: 56 push %esi 114a2b: 50 push %eax 114a2c: 8d 43 60 lea 0x60(%ebx),%eax 114a2f: 50 push %eax 114a30: e8 27 47 00 00 call 11915c <_Chain_Initialize> RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 114a35: 8d 43 54 lea 0x54(%ebx),%eax 114a38: 89 43 50 mov %eax,0x50(%ebx) head->next = tail; head->previous = NULL; 114a3b: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 114a42: 8d 43 50 lea 0x50(%ebx),%eax 114a45: 89 43 58 mov %eax,0x58(%ebx) allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 114a48: 6a 06 push $0x6 114a4a: 68 80 00 00 00 push $0x80 114a4f: 8b 45 0c mov 0xc(%ebp),%eax 114a52: 83 38 01 cmpl $0x1,(%eax) 114a55: 0f 94 c0 sete %al 114a58: 0f b6 c0 movzbl %al,%eax 114a5b: 50 push %eax 114a5c: 53 push %ebx 114a5d: e8 1e 21 00 00 call 116b80 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 114a62: 83 c4 20 add $0x20,%esp 114a65: b0 01 mov $0x1,%al } 114a67: 8d 65 f4 lea -0xc(%ebp),%esp 114a6a: 5b pop %ebx 114a6b: 5e pop %esi 114a6c: 5f pop %edi 114a6d: c9 leave 114a6e: c3 ret =============================================================================== 001105c4 <_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 ) { 1105c4: 55 push %ebp 1105c5: 89 e5 mov %esp,%ebp 1105c7: 56 push %esi 1105c8: 53 push %ebx 1105c9: 8b 45 08 mov 0x8(%ebp),%eax 1105cc: 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 ); 1105cf: 9c pushf 1105d0: fa cli 1105d1: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 1105d2: ff 40 48 incl 0x48(%eax) if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) 1105d5: 81 7d 10 ff ff ff 7f cmpl $0x7fffffff,0x10(%ebp) 1105dc: 74 1a je 1105f8 <_CORE_message_queue_Insert_message+0x34> RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { _Chain_Insert_unprotected(_Chain_Head(the_chain), the_node); 1105de: 8d 48 50 lea 0x50(%eax),%ecx 1105e1: 89 4a 04 mov %ecx,0x4(%edx) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 1105e4: 8b 48 50 mov 0x50(%eax),%ecx after_node->next = the_node; 1105e7: 89 50 50 mov %edx,0x50(%eax) the_node->next = before_node; 1105ea: 89 0a mov %ecx,(%edx) before_node->previous = the_node; 1105ec: 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 ); 1105ef: 53 push %ebx 1105f0: 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 } 1105f1: 5b pop %ebx 1105f2: 5e pop %esi 1105f3: c9 leave 1105f4: c3 ret 1105f5: 8d 76 00 lea 0x0(%esi),%esi Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 1105f8: 8b 48 58 mov 0x58(%eax),%ecx RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); 1105fb: 8d 70 54 lea 0x54(%eax),%esi 1105fe: 89 32 mov %esi,(%edx) Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; 110600: 89 50 58 mov %edx,0x58(%eax) old_last->next = the_node; 110603: 89 11 mov %edx,(%ecx) the_node->previous = old_last; 110605: 89 4a 04 mov %ecx,0x4(%edx) 110608: eb e5 jmp 1105ef <_CORE_message_queue_Insert_message+0x2b> =============================================================================== 0010bfec <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 10bfec: 55 push %ebp 10bfed: 89 e5 mov %esp,%ebp 10bfef: 57 push %edi 10bff0: 56 push %esi 10bff1: 53 push %ebx 10bff2: 83 ec 0c sub $0xc,%esp 10bff5: 8b 5d 08 mov 0x8(%ebp),%ebx 10bff8: 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 ) { 10bffb: 8b 45 10 mov 0x10(%ebp),%eax 10bffe: 39 43 4c cmp %eax,0x4c(%ebx) 10c001: 72 51 jb 10c054 <_CORE_message_queue_Submit+0x68> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 10c003: 8b 43 48 mov 0x48(%ebx),%eax 10c006: 85 c0 test %eax,%eax 10c008: 74 5a je 10c064 <_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 < 10c00a: 39 43 44 cmp %eax,0x44(%ebx) 10c00d: 77 0d ja 10c01c <_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; 10c00f: 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 } 10c014: 8d 65 f4 lea -0xc(%ebp),%esp 10c017: 5b pop %ebx 10c018: 5e pop %esi 10c019: 5f pop %edi 10c01a: c9 leave 10c01b: 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 ); 10c01c: 83 ec 0c sub $0xc,%esp 10c01f: 8d 43 60 lea 0x60(%ebx),%eax 10c022: 50 push %eax 10c023: e8 a0 ff ff ff call 10bfc8 <_Chain_Get> 10c028: 89 c2 mov %eax,%edx return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED; #endif _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, 10c02a: 8d 40 0c lea 0xc(%eax),%eax const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10c02d: 89 c7 mov %eax,%edi 10c02f: 8b 4d 10 mov 0x10(%ebp),%ecx 10c032: f3 a4 rep movsb %ds:(%esi),%es:(%edi) size ); the_message->Contents.size = size; 10c034: 8b 4d 10 mov 0x10(%ebp),%ecx 10c037: 89 4a 08 mov %ecx,0x8(%edx) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 10c03a: 83 c4 0c add $0xc,%esp 10c03d: ff 75 1c pushl 0x1c(%ebp) 10c040: 52 push %edx 10c041: 53 push %ebx 10c042: e8 7d 45 00 00 call 1105c4 <_CORE_message_queue_Insert_message> the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10c047: 83 c4 10 add $0x10,%esp 10c04a: 31 c0 xor %eax,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c04c: 8d 65 f4 lea -0xc(%ebp),%esp 10c04f: 5b pop %ebx 10c050: 5e pop %esi 10c051: 5f pop %edi 10c052: c9 leave 10c053: 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; 10c054: 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 } 10c059: 8d 65 f4 lea -0xc(%ebp),%esp 10c05c: 5b pop %ebx 10c05d: 5e pop %esi 10c05e: 5f pop %edi 10c05f: c9 leave 10c060: c3 ret 10c061: 8d 76 00 lea 0x0(%esi),%esi /* * 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 ); 10c064: 83 ec 0c sub $0xc,%esp 10c067: 53 push %ebx 10c068: e8 a7 1b 00 00 call 10dc14 <_Thread_queue_Dequeue> 10c06d: 89 c2 mov %eax,%edx if ( the_thread ) { 10c06f: 83 c4 10 add $0x10,%esp 10c072: 85 c0 test %eax,%eax 10c074: 74 1e je 10c094 <_CORE_message_queue_Submit+0xa8> 10c076: 8b 40 2c mov 0x2c(%eax),%eax 10c079: 89 c7 mov %eax,%edi 10c07b: 8b 4d 10 mov 0x10(%ebp),%ecx 10c07e: 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; 10c080: 8b 42 28 mov 0x28(%edx),%eax 10c083: 8b 4d 10 mov 0x10(%ebp),%ecx 10c086: 89 08 mov %ecx,(%eax) the_thread->Wait.count = (uint32_t) submit_type; 10c088: 8b 45 1c mov 0x1c(%ebp),%eax 10c08b: 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; 10c08e: 31 c0 xor %eax,%eax 10c090: eb 82 jmp 10c014 <_CORE_message_queue_Submit+0x28> 10c092: 66 90 xchg %ax,%ax /* * 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 ) { 10c094: 8b 43 48 mov 0x48(%ebx),%eax 10c097: e9 6e ff ff ff jmp 10c00a <_CORE_message_queue_Submit+0x1e> =============================================================================== 0010c0a8 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10c0a8: 55 push %ebp 10c0a9: 89 e5 mov %esp,%ebp 10c0ab: 57 push %edi 10c0ac: 56 push %esi 10c0ad: 53 push %ebx 10c0ae: 83 ec 0c sub $0xc,%esp 10c0b1: 8b 45 08 mov 0x8(%ebp),%eax 10c0b4: 8b 5d 0c mov 0xc(%ebp),%ebx 10c0b7: 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; 10c0ba: 8d 78 40 lea 0x40(%eax),%edi 10c0bd: b9 04 00 00 00 mov $0x4,%ecx 10c0c2: 89 de mov %ebx,%esi 10c0c4: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10c0c6: 89 50 50 mov %edx,0x50(%eax) the_mutex->blocked_count = 0; 10c0c9: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10c0d0: 85 d2 test %edx,%edx 10c0d2: 75 30 jne 10c104 <_CORE_mutex_Initialize+0x5c> the_mutex->nest_count = 1; 10c0d4: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) the_mutex->holder = _Thread_Executing; 10c0db: 8b 15 58 67 12 00 mov 0x126758,%edx 10c0e1: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = _Thread_Executing->Object.id; 10c0e4: 8b 4a 08 mov 0x8(%edx),%ecx 10c0e7: 89 48 60 mov %ecx,0x60(%eax) STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c0ea: 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 ) || 10c0ed: 83 f9 02 cmp $0x2,%ecx 10c0f0: 74 05 je 10c0f7 <_CORE_mutex_Initialize+0x4f> 10c0f2: 83 f9 03 cmp $0x3,%ecx 10c0f5: 75 22 jne 10c119 <_CORE_mutex_Initialize+0x71> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 10c0f7: 8b 48 4c mov 0x4c(%eax),%ecx 10c0fa: 39 4a 14 cmp %ecx,0x14(%edx) 10c0fd: 72 41 jb 10c140 <_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++; 10c0ff: ff 42 1c incl 0x1c(%edx) 10c102: eb 15 jmp 10c119 <_CORE_mutex_Initialize+0x71> } } else { the_mutex->nest_count = 0; 10c104: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_mutex->holder = NULL; 10c10b: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) the_mutex->holder_id = 0; 10c112: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) } _Thread_queue_Initialize( 10c119: 6a 04 push $0x4 10c11b: 68 00 04 00 00 push $0x400 10c120: 31 d2 xor %edx,%edx 10c122: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10c126: 0f 95 c2 setne %dl 10c129: 52 push %edx 10c12a: 50 push %eax 10c12b: e8 74 1e 00 00 call 10dfa4 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 10c130: 83 c4 10 add $0x10,%esp 10c133: 31 c0 xor %eax,%eax } 10c135: 8d 65 f4 lea -0xc(%ebp),%esp 10c138: 5b pop %ebx 10c139: 5e pop %esi 10c13a: 5f pop %edi 10c13b: c9 leave 10c13c: c3 ret 10c13d: 8d 76 00 lea 0x0(%esi),%esi 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; 10c140: b8 05 00 00 00 mov $0x5,%eax STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c145: 8d 65 f4 lea -0xc(%ebp),%esp 10c148: 5b pop %ebx 10c149: 5e pop %esi 10c14a: 5f pop %edi 10c14b: c9 leave 10c14c: c3 ret =============================================================================== 0010c1a0 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10c1a0: 55 push %ebp 10c1a1: 89 e5 mov %esp,%ebp 10c1a3: 53 push %ebx 10c1a4: 83 ec 14 sub $0x14,%esp 10c1a7: 8b 5d 08 mov 0x8(%ebp),%ebx 10c1aa: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c1ad: a1 d0 64 12 00 mov 0x1264d0,%eax 10c1b2: 85 c0 test %eax,%eax 10c1b4: 74 04 je 10c1ba <_CORE_mutex_Seize+0x1a> 10c1b6: 84 d2 test %dl,%dl 10c1b8: 75 36 jne 10c1f0 <_CORE_mutex_Seize+0x50><== ALWAYS TAKEN 10c1ba: 83 ec 08 sub $0x8,%esp 10c1bd: 8d 45 18 lea 0x18(%ebp),%eax 10c1c0: 50 push %eax 10c1c1: 53 push %ebx 10c1c2: 88 55 f4 mov %dl,-0xc(%ebp) 10c1c5: e8 42 44 00 00 call 11060c <_CORE_mutex_Seize_interrupt_trylock> 10c1ca: 83 c4 10 add $0x10,%esp 10c1cd: 85 c0 test %eax,%eax 10c1cf: 8a 55 f4 mov -0xc(%ebp),%dl 10c1d2: 74 14 je 10c1e8 <_CORE_mutex_Seize+0x48> 10c1d4: 84 d2 test %dl,%dl 10c1d6: 75 30 jne 10c208 <_CORE_mutex_Seize+0x68> 10c1d8: ff 75 18 pushl 0x18(%ebp) 10c1db: 9d popf 10c1dc: a1 58 67 12 00 mov 0x126758,%eax 10c1e1: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) } 10c1e8: 8b 5d fc mov -0x4(%ebp),%ebx 10c1eb: c9 leave 10c1ec: c3 ret 10c1ed: 8d 76 00 lea 0x0(%esi),%esi bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c1f0: 83 3d 60 66 12 00 01 cmpl $0x1,0x126660 10c1f7: 76 c1 jbe 10c1ba <_CORE_mutex_Seize+0x1a> 10c1f9: 53 push %ebx 10c1fa: 6a 12 push $0x12 10c1fc: 6a 00 push $0x0 10c1fe: 6a 00 push $0x0 10c200: e8 1b 06 00 00 call 10c820 <_Internal_error_Occurred> 10c205: 8d 76 00 lea 0x0(%esi),%esi 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; 10c208: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10c20f: a1 58 67 12 00 mov 0x126758,%eax 10c214: 89 58 44 mov %ebx,0x44(%eax) 10c217: 8b 55 0c mov 0xc(%ebp),%edx 10c21a: 89 50 20 mov %edx,0x20(%eax) 10c21d: a1 d0 64 12 00 mov 0x1264d0,%eax 10c222: 40 inc %eax 10c223: a3 d0 64 12 00 mov %eax,0x1264d0 10c228: ff 75 18 pushl 0x18(%ebp) 10c22b: 9d popf 10c22c: 83 ec 08 sub $0x8,%esp 10c22f: ff 75 14 pushl 0x14(%ebp) 10c232: 53 push %ebx 10c233: e8 18 ff ff ff call 10c150 <_CORE_mutex_Seize_interrupt_blocking> 10c238: 83 c4 10 add $0x10,%esp } 10c23b: 8b 5d fc mov -0x4(%ebp),%ebx 10c23e: c9 leave 10c23f: c3 ret =============================================================================== 0011060c <_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 ) { 11060c: 55 push %ebp 11060d: 89 e5 mov %esp,%ebp 11060f: 56 push %esi 110610: 53 push %ebx 110611: 8b 45 08 mov 0x8(%ebp),%eax 110614: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 110617: 8b 15 58 67 12 00 mov 0x126758,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 11061d: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 110624: 8b 58 50 mov 0x50(%eax),%ebx 110627: 85 db test %ebx,%ebx 110629: 74 31 je 11065c <_CORE_mutex_Seize_interrupt_trylock+0x50> the_mutex->lock = CORE_MUTEX_LOCKED; 11062b: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 110632: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 110635: 8b 5a 08 mov 0x8(%edx),%ebx 110638: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 11063b: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 110642: 8b 58 48 mov 0x48(%eax),%ebx if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 110645: 83 fb 02 cmp $0x2,%ebx 110648: 74 26 je 110670 <_CORE_mutex_Seize_interrupt_trylock+0x64> 11064a: 83 fb 03 cmp $0x3,%ebx 11064d: 74 3d je 11068c <_CORE_mutex_Seize_interrupt_trylock+0x80> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 11064f: ff 31 pushl (%ecx) 110651: 9d popf return 0; 110652: 31 c0 xor %eax,%eax 110654: 8d 65 f8 lea -0x8(%ebp),%esp 110657: 5b pop %ebx 110658: 5e pop %esi 110659: c9 leave 11065a: c3 ret 11065b: 90 nop /* * 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 ) ) { 11065c: 3b 50 5c cmp 0x5c(%eax),%edx 11065f: 74 17 je 110678 <_CORE_mutex_Seize_interrupt_trylock+0x6c> /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; 110661: b8 01 00 00 00 mov $0x1,%eax 110666: 8d 65 f8 lea -0x8(%ebp),%esp 110669: 5b pop %ebx 11066a: 5e pop %esi 11066b: c9 leave 11066c: c3 ret 11066d: 8d 76 00 lea 0x0(%esi),%esi _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 110670: ff 42 1c incl 0x1c(%edx) 110673: eb da jmp 11064f <_CORE_mutex_Seize_interrupt_trylock+0x43> 110675: 8d 76 00 lea 0x0(%esi),%esi * 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 ) { 110678: 8b 50 40 mov 0x40(%eax),%edx 11067b: 85 d2 test %edx,%edx 11067d: 75 e2 jne 110661 <_CORE_mutex_Seize_interrupt_trylock+0x55> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 11067f: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 110682: ff 31 pushl (%ecx) 110684: 9d popf return 0; 110685: 31 c0 xor %eax,%eax 110687: eb dd jmp 110666 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 110689: 8d 76 00 lea 0x0(%esi),%esi _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 11068c: 8b 5a 1c mov 0x1c(%edx),%ebx 11068f: 8d 73 01 lea 0x1(%ebx),%esi 110692: 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 ) { 110695: 8b 72 14 mov 0x14(%edx),%esi 110698: 39 70 4c cmp %esi,0x4c(%eax) 11069b: 74 57 je 1106f4 <_CORE_mutex_Seize_interrupt_trylock+0xe8> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 11069d: 72 25 jb 1106c4 <_CORE_mutex_Seize_interrupt_trylock+0xb8> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 11069f: c7 42 34 05 00 00 00 movl $0x5,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 1106a6: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 1106ad: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 1106b4: 89 5a 1c mov %ebx,0x1c(%edx) _ISR_Enable( *level_p ); 1106b7: ff 31 pushl (%ecx) 1106b9: 9d popf return 0; 1106ba: 31 c0 xor %eax,%eax 1106bc: 8d 65 f8 lea -0x8(%ebp),%esp 1106bf: 5b pop %ebx 1106c0: 5e pop %esi 1106c1: c9 leave 1106c2: c3 ret 1106c3: 90 nop rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1106c4: 8b 15 d0 64 12 00 mov 0x1264d0,%edx 1106ca: 42 inc %edx 1106cb: 89 15 d0 64 12 00 mov %edx,0x1264d0 return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 1106d1: ff 31 pushl (%ecx) 1106d3: 9d popf _Thread_Change_priority( 1106d4: 51 push %ecx 1106d5: 6a 00 push $0x0 1106d7: ff 70 4c pushl 0x4c(%eax) 1106da: ff 70 5c pushl 0x5c(%eax) 1106dd: e8 aa cd ff ff call 10d48c <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 1106e2: e8 dd d1 ff ff call 10d8c4 <_Thread_Enable_dispatch> 1106e7: 83 c4 10 add $0x10,%esp return 0; 1106ea: 31 c0 xor %eax,%eax 1106ec: e9 75 ff ff ff jmp 110666 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 1106f1: 8d 76 00 lea 0x0(%esi),%esi Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); 1106f4: ff 31 pushl (%ecx) 1106f6: 9d popf return 0; 1106f7: 31 c0 xor %eax,%eax 1106f9: e9 68 ff ff ff jmp 110666 <_CORE_mutex_Seize_interrupt_trylock+0x5a> =============================================================================== 0010c240 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 10c240: 55 push %ebp 10c241: 89 e5 mov %esp,%ebp 10c243: 53 push %ebx 10c244: 83 ec 04 sub $0x4,%esp 10c247: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; Thread_Control *holder; holder = the_mutex->holder; 10c24a: 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 ) { 10c24d: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10c251: 74 15 je 10c268 <_CORE_mutex_Surrender+0x28> if ( !_Thread_Is_executing( holder ) ) 10c253: 3b 05 58 67 12 00 cmp 0x126758,%eax 10c259: 74 0d je 10c268 <_CORE_mutex_Surrender+0x28> return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; 10c25b: b8 02 00 00 00 mov $0x2,%eax } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c260: 8b 5d fc mov -0x4(%ebp),%ebx 10c263: c9 leave 10c264: c3 ret 10c265: 8d 76 00 lea 0x0(%esi),%esi return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 10c268: 8b 53 54 mov 0x54(%ebx),%edx 10c26b: 85 d2 test %edx,%edx 10c26d: 74 51 je 10c2c0 <_CORE_mutex_Surrender+0x80> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10c26f: 4a dec %edx 10c270: 89 53 54 mov %edx,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10c273: 85 d2 test %edx,%edx 10c275: 75 49 jne 10c2c0 <_CORE_mutex_Surrender+0x80> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c277: 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 ) || 10c27a: 83 fa 02 cmp $0x2,%edx 10c27d: 74 69 je 10c2e8 <_CORE_mutex_Surrender+0xa8> 10c27f: 83 fa 03 cmp $0x3,%edx 10c282: 74 64 je 10c2e8 <_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; 10c284: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10c28b: 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 ) ) ) { 10c292: 83 ec 0c sub $0xc,%esp 10c295: 53 push %ebx 10c296: e8 79 19 00 00 call 10dc14 <_Thread_queue_Dequeue> 10c29b: 83 c4 10 add $0x10,%esp 10c29e: 85 c0 test %eax,%eax 10c2a0: 74 7a je 10c31c <_CORE_mutex_Surrender+0xdc> } else #endif { the_mutex->holder = the_thread; 10c2a2: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10c2a5: 8b 50 08 mov 0x8(%eax),%edx 10c2a8: 89 53 60 mov %edx,0x60(%ebx) the_mutex->nest_count = 1; 10c2ab: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10c2b2: 8b 53 48 mov 0x48(%ebx),%edx 10c2b5: 83 fa 02 cmp $0x2,%edx 10c2b8: 74 56 je 10c310 <_CORE_mutex_Surrender+0xd0> 10c2ba: 83 fa 03 cmp $0x3,%edx 10c2bd: 74 09 je 10c2c8 <_CORE_mutex_Surrender+0x88> 10c2bf: 90 nop } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10c2c0: 31 c0 xor %eax,%eax } 10c2c2: 8b 5d fc mov -0x4(%ebp),%ebx 10c2c5: c9 leave 10c2c6: c3 ret 10c2c7: 90 nop _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++; 10c2c8: ff 40 1c incl 0x1c(%eax) if (the_mutex->Attributes.priority_ceiling < 10c2cb: 8b 53 4c mov 0x4c(%ebx),%edx 10c2ce: 3b 50 14 cmp 0x14(%eax),%edx 10c2d1: 73 ed jae 10c2c0 <_CORE_mutex_Surrender+0x80> the_thread->current_priority){ _Thread_Change_priority( 10c2d3: 51 push %ecx 10c2d4: 6a 00 push $0x0 10c2d6: 52 push %edx 10c2d7: 50 push %eax 10c2d8: e8 af 11 00 00 call 10d48c <_Thread_Change_priority> 10c2dd: 83 c4 10 add $0x10,%esp } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10c2e0: 31 c0 xor %eax,%eax 10c2e2: e9 79 ff ff ff jmp 10c260 <_CORE_mutex_Surrender+0x20> 10c2e7: 90 nop _CORE_mutex_Pop_priority( the_mutex, holder ); if ( pop_status != CORE_MUTEX_STATUS_SUCCESSFUL ) return pop_status; holder->resource_count--; 10c2e8: 8b 50 1c mov 0x1c(%eax),%edx 10c2eb: 4a dec %edx 10c2ec: 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 && 10c2ef: 85 d2 test %edx,%edx 10c2f1: 75 91 jne 10c284 <_CORE_mutex_Surrender+0x44> holder->real_priority != holder->current_priority ) { 10c2f3: 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 && 10c2f6: 3b 50 14 cmp 0x14(%eax),%edx 10c2f9: 74 89 je 10c284 <_CORE_mutex_Surrender+0x44> holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, true ); 10c2fb: 51 push %ecx 10c2fc: 6a 01 push $0x1 10c2fe: 52 push %edx 10c2ff: 50 push %eax 10c300: e8 87 11 00 00 call 10d48c <_Thread_Change_priority> 10c305: 83 c4 10 add $0x10,%esp 10c308: e9 77 ff ff ff jmp 10c284 <_CORE_mutex_Surrender+0x44> 10c30d: 8d 76 00 lea 0x0(%esi),%esi 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++; 10c310: ff 40 1c incl 0x1c(%eax) } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10c313: 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; 10c315: e9 46 ff ff ff jmp 10c260 <_CORE_mutex_Surrender+0x20> 10c31a: 66 90 xchg %ax,%ax } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c31c: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) return CORE_MUTEX_STATUS_SUCCESSFUL; 10c323: 31 c0 xor %eax,%eax 10c325: e9 36 ff ff ff jmp 10c260 <_CORE_mutex_Surrender+0x20> =============================================================================== 0010c378 <_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 ) { 10c378: 55 push %ebp 10c379: 89 e5 mov %esp,%ebp 10c37b: 53 push %ebx 10c37c: 83 ec 10 sub $0x10,%esp 10c37f: 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)) ) { 10c382: 53 push %ebx 10c383: e8 8c 18 00 00 call 10dc14 <_Thread_queue_Dequeue> 10c388: 83 c4 10 add $0x10,%esp 10c38b: 85 c0 test %eax,%eax 10c38d: 74 09 je 10c398 <_CORE_semaphore_Surrender+0x20> { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10c38f: 31 c0 xor %eax,%eax status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 10c391: 8b 5d fc mov -0x4(%ebp),%ebx 10c394: c9 leave 10c395: c3 ret 10c396: 66 90 xchg %ax,%ax if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 10c398: 9c pushf 10c399: fa cli 10c39a: 5a pop %edx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10c39b: 8b 43 48 mov 0x48(%ebx),%eax 10c39e: 3b 43 40 cmp 0x40(%ebx),%eax 10c3a1: 72 0d jb 10c3b0 <_CORE_semaphore_Surrender+0x38><== ALWAYS TAKEN the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; 10c3a3: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED _ISR_Enable( level ); 10c3a8: 52 push %edx 10c3a9: 9d popf } return status; } 10c3aa: 8b 5d fc mov -0x4(%ebp),%ebx 10c3ad: c9 leave 10c3ae: c3 ret 10c3af: 90 nop #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 10c3b0: 40 inc %eax 10c3b1: 89 43 48 mov %eax,0x48(%ebx) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10c3b4: 31 c0 xor %eax,%eax 10c3b6: eb f0 jmp 10c3a8 <_CORE_semaphore_Surrender+0x30> =============================================================================== 0010c660 <_Chain_Get_with_empty_check>: bool _Chain_Get_with_empty_check( Chain_Control *chain, Chain_Node **node ) { 10c660: 55 push %ebp 10c661: 89 e5 mov %esp,%ebp 10c663: 57 push %edi 10c664: 56 push %esi 10c665: 53 push %ebx 10c666: 8b 45 08 mov 0x8(%ebp),%eax 10c669: 8b 7d 0c mov 0xc(%ebp),%edi ISR_Level level; bool is_empty_now; _ISR_Disable( level ); 10c66c: 9c pushf 10c66d: fa cli 10c66e: 5e pop %esi Chain_Node **the_node ) { bool is_empty_now = true; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 10c66f: 8d 58 04 lea 0x4(%eax),%ebx Chain_Node *old_first = head->next; 10c672: 8b 10 mov (%eax),%edx if ( old_first != tail ) { 10c674: 39 d3 cmp %edx,%ebx 10c676: 74 18 je 10c690 <_Chain_Get_with_empty_check+0x30> Chain_Node *new_first = old_first->next; 10c678: 8b 0a mov (%edx),%ecx head->next = new_first; 10c67a: 89 08 mov %ecx,(%eax) new_first->previous = head; 10c67c: 89 41 04 mov %eax,0x4(%ecx) *the_node = old_first; 10c67f: 89 17 mov %edx,(%edi) is_empty_now = new_first == tail; 10c681: 39 cb cmp %ecx,%ebx 10c683: 0f 94 c0 sete %al is_empty_now = _Chain_Get_with_empty_check_unprotected( chain, node ); _ISR_Enable( level ); 10c686: 56 push %esi 10c687: 9d popf return is_empty_now; } 10c688: 5b pop %ebx 10c689: 5e pop %esi 10c68a: 5f pop %edi 10c68b: c9 leave 10c68c: c3 ret 10c68d: 8d 76 00 lea 0x0(%esi),%esi } else *the_node = NULL; 10c690: c7 07 00 00 00 00 movl $0x0,(%edi) RTEMS_INLINE_ROUTINE bool _Chain_Get_with_empty_check_unprotected( Chain_Control *the_chain, Chain_Node **the_node ) { bool is_empty_now = true; 10c696: b0 01 mov $0x1,%al 10c698: eb ec jmp 10c686 <_Chain_Get_with_empty_check+0x26> =============================================================================== 00110568 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 110568: 55 push %ebp 110569: 89 e5 mov %esp,%ebp 11056b: 57 push %edi 11056c: 56 push %esi 11056d: 53 push %ebx 11056e: 83 ec 08 sub $0x8,%esp 110571: 8b 7d 08 mov 0x8(%ebp),%edi 110574: 8b 4d 10 mov 0x10(%ebp),%ecx 110577: 8b 75 14 mov 0x14(%ebp),%esi size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 11057a: 8d 47 04 lea 0x4(%edi),%eax 11057d: 89 45 f0 mov %eax,-0x10(%ebp) Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; 110580: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) while ( count-- ) { 110587: 85 c9 test %ecx,%ecx 110589: 74 35 je 1105c0 <_Chain_Initialize+0x58><== NEVER TAKEN 11058b: 49 dec %ecx 11058c: 89 4d ec mov %ecx,-0x14(%ebp) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; Chain_Node *next = starting_address; 11058f: 8b 45 0c mov 0xc(%ebp),%eax ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; 110592: 89 fa mov %edi,%edx 110594: eb 07 jmp 11059d <_Chain_Initialize+0x35> 110596: 66 90 xchg %ax,%ax Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 110598: 89 c2 mov %eax,%edx current->next = next; next->previous = current; current = next; next = (Chain_Node *) 11059a: 89 d8 mov %ebx,%eax 11059c: 49 dec %ecx Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { current->next = next; 11059d: 89 02 mov %eax,(%edx) next->previous = current; 11059f: 89 50 04 mov %edx,0x4(%eax) * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 1105a2: 8d 1c 30 lea (%eax,%esi,1),%ebx Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 1105a5: 85 c9 test %ecx,%ecx 1105a7: 75 ef jne 110598 <_Chain_Initialize+0x30> * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 1105a9: 0f af 75 ec imul -0x14(%ebp),%esi 1105ad: 03 75 0c add 0xc(%ebp),%esi current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; 1105b0: 8b 45 f0 mov -0x10(%ebp),%eax 1105b3: 89 06 mov %eax,(%esi) tail->previous = current; 1105b5: 89 77 08 mov %esi,0x8(%edi) } 1105b8: 83 c4 08 add $0x8,%esp 1105bb: 5b pop %ebx 1105bc: 5e pop %esi 1105bd: 5f pop %edi 1105be: c9 leave 1105bf: c3 ret ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; 1105c0: 89 fe mov %edi,%esi <== NOT EXECUTED 1105c2: eb ec jmp 1105b0 <_Chain_Initialize+0x48><== NOT EXECUTED =============================================================================== 0010b070 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10b070: 55 push %ebp 10b071: 89 e5 mov %esp,%ebp 10b073: 57 push %edi 10b074: 56 push %esi 10b075: 53 push %ebx 10b076: 83 ec 2c sub $0x2c,%esp 10b079: 8b 45 08 mov 0x8(%ebp),%eax 10b07c: 8b 4d 0c mov 0xc(%ebp),%ecx 10b07f: 8b 55 10 mov 0x10(%ebp),%edx 10b082: 89 55 dc mov %edx,-0x24(%ebp) 10b085: 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; 10b088: 8b 1d 58 67 12 00 mov 0x126758,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10b08e: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10b095: 8b b3 e4 00 00 00 mov 0xe4(%ebx),%esi _ISR_Disable( level ); 10b09b: 9c pushf 10b09c: fa cli 10b09d: 8f 45 e0 popl -0x20(%ebp) pending_events = api->pending_events; 10b0a0: 8b 16 mov (%esi),%edx 10b0a2: 89 55 d4 mov %edx,-0x2c(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10b0a5: 21 c2 and %eax,%edx 10b0a7: 89 55 e4 mov %edx,-0x1c(%ebp) 10b0aa: 74 0d je 10b0b9 <_Event_Seize+0x49> 10b0ac: 39 d0 cmp %edx,%eax 10b0ae: 0f 84 84 00 00 00 je 10b138 <_Event_Seize+0xc8> (seized_events == event_in || _Options_Is_any( option_set )) ) { 10b0b4: f6 c1 02 test $0x2,%cl 10b0b7: 75 7f jne 10b138 <_Event_Seize+0xc8> _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10b0b9: f6 c1 01 test $0x1,%cl 10b0bc: 75 62 jne 10b120 <_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; 10b0be: 89 4b 30 mov %ecx,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10b0c1: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10b0c4: 89 7b 28 mov %edi,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10b0c7: c7 05 c0 67 12 00 01 movl $0x1,0x1267c0 10b0ce: 00 00 00 _ISR_Enable( level ); 10b0d1: ff 75 e0 pushl -0x20(%ebp) 10b0d4: 9d popf if ( ticks ) { 10b0d5: 8b 45 dc mov -0x24(%ebp),%eax 10b0d8: 85 c0 test %eax,%eax 10b0da: 0f 85 80 00 00 00 jne 10b160 <_Event_Seize+0xf0> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10b0e0: 83 ec 08 sub $0x8,%esp 10b0e3: 68 00 01 00 00 push $0x100 10b0e8: 53 push %ebx 10b0e9: e8 ca 2f 00 00 call 10e0b8 <_Thread_Set_state> _ISR_Disable( level ); 10b0ee: 9c pushf 10b0ef: fa cli 10b0f0: 5a pop %edx sync_state = _Event_Sync_state; 10b0f1: a1 c0 67 12 00 mov 0x1267c0,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10b0f6: c7 05 c0 67 12 00 00 movl $0x0,0x1267c0 10b0fd: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10b100: 83 c4 10 add $0x10,%esp 10b103: 83 f8 01 cmp $0x1,%eax 10b106: 74 4c je 10b154 <_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 ); 10b108: 89 55 10 mov %edx,0x10(%ebp) 10b10b: 89 5d 0c mov %ebx,0xc(%ebp) 10b10e: 89 45 08 mov %eax,0x8(%ebp) } 10b111: 8d 65 f4 lea -0xc(%ebp),%esp 10b114: 5b pop %ebx 10b115: 5e pop %esi 10b116: 5f pop %edi 10b117: 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 ); 10b118: e9 23 23 00 00 jmp 10d440 <_Thread_blocking_operation_Cancel> 10b11d: 8d 76 00 lea 0x0(%esi),%esi *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 10b120: ff 75 e0 pushl -0x20(%ebp) 10b123: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10b124: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10b12b: 8b 55 e4 mov -0x1c(%ebp),%edx 10b12e: 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 ); } 10b130: 8d 65 f4 lea -0xc(%ebp),%esp 10b133: 5b pop %ebx 10b134: 5e pop %esi 10b135: 5f pop %edi 10b136: c9 leave 10b137: 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) ); 10b138: 8b 45 e4 mov -0x1c(%ebp),%eax 10b13b: f7 d0 not %eax 10b13d: 23 45 d4 and -0x2c(%ebp),%eax 10b140: 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 ); 10b142: ff 75 e0 pushl -0x20(%ebp) 10b145: 9d popf *event_out = seized_events; 10b146: 8b 45 e4 mov -0x1c(%ebp),%eax 10b149: 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 ); } 10b14b: 8d 65 f4 lea -0xc(%ebp),%esp 10b14e: 5b pop %ebx 10b14f: 5e pop %esi 10b150: 5f pop %edi 10b151: c9 leave 10b152: c3 ret 10b153: 90 nop _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 ); 10b154: 52 push %edx 10b155: 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 ); } 10b156: 8d 65 f4 lea -0xc(%ebp),%esp 10b159: 5b pop %ebx 10b15a: 5e pop %esi 10b15b: 5f pop %edi 10b15c: c9 leave 10b15d: c3 ret 10b15e: 66 90 xchg %ax,%ax _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 10b160: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b163: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10b16a: c7 43 64 14 b3 10 00 movl $0x10b314,0x64(%ebx) the_watchdog->id = id; 10b171: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10b174: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b17b: 8b 45 dc mov -0x24(%ebp),%eax 10b17e: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b181: 83 ec 08 sub $0x8,%esp &executing->Timer, _Event_Timeout, executing->Object.id, NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); 10b184: 8d 43 48 lea 0x48(%ebx),%eax 10b187: 50 push %eax 10b188: 68 a0 65 12 00 push $0x1265a0 10b18d: e8 3e 34 00 00 call 10e5d0 <_Watchdog_Insert> 10b192: 83 c4 10 add $0x10,%esp 10b195: e9 46 ff ff ff jmp 10b0e0 <_Event_Seize+0x70> =============================================================================== 0010b1f0 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10b1f0: 55 push %ebp 10b1f1: 89 e5 mov %esp,%ebp 10b1f3: 57 push %edi 10b1f4: 56 push %esi 10b1f5: 53 push %ebx 10b1f6: 83 ec 2c sub $0x2c,%esp 10b1f9: 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 ]; 10b1fc: 8b 8b e4 00 00 00 mov 0xe4(%ebx),%ecx option_set = (rtems_option) the_thread->Wait.option; 10b202: 8b 7b 30 mov 0x30(%ebx),%edi _ISR_Disable( level ); 10b205: 9c pushf 10b206: fa cli 10b207: 8f 45 d4 popl -0x2c(%ebp) pending_events = api->pending_events; 10b20a: 8b 11 mov (%ecx),%edx event_condition = (rtems_event_set) the_thread->Wait.count; 10b20c: 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 ) ) { 10b20f: 89 c6 mov %eax,%esi 10b211: 21 d6 and %edx,%esi 10b213: 89 75 e4 mov %esi,-0x1c(%ebp) 10b216: 74 74 je 10b28c <_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() && 10b218: 8b 35 54 67 12 00 mov 0x126754,%esi 10b21e: 85 f6 test %esi,%esi 10b220: 74 0c je 10b22e <_Event_Surrender+0x3e> 10b222: 3b 1d 58 67 12 00 cmp 0x126758,%ebx 10b228: 0f 84 96 00 00 00 je 10b2c4 <_Event_Surrender+0xd4> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10b22e: f6 43 11 01 testb $0x1,0x11(%ebx) 10b232: 74 4c je 10b280 <_Event_Surrender+0x90> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 10b234: 3b 45 e4 cmp -0x1c(%ebp),%eax 10b237: 74 05 je 10b23e <_Event_Surrender+0x4e> 10b239: 83 e7 02 and $0x2,%edi 10b23c: 74 42 je 10b280 <_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) ); 10b23e: 8b 45 e4 mov -0x1c(%ebp),%eax 10b241: f7 d0 not %eax 10b243: 21 d0 and %edx,%eax 10b245: 89 01 mov %eax,(%ecx) api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 10b247: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b24e: 8b 43 28 mov 0x28(%ebx),%eax 10b251: 8b 75 e4 mov -0x1c(%ebp),%esi 10b254: 89 30 mov %esi,(%eax) _ISR_Flash( level ); 10b256: ff 75 d4 pushl -0x2c(%ebp) 10b259: 9d popf 10b25a: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10b25b: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b25f: 74 37 je 10b298 <_Event_Surrender+0xa8> _ISR_Enable( level ); 10b261: ff 75 d4 pushl -0x2c(%ebp) 10b264: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b265: 83 ec 08 sub $0x8,%esp 10b268: 68 f8 ff 03 10 push $0x1003fff8 10b26d: 53 push %ebx 10b26e: e8 ed 22 00 00 call 10d560 <_Thread_Clear_state> 10b273: 83 c4 10 add $0x10,%esp } return; } } _ISR_Enable( level ); } 10b276: 8d 65 f4 lea -0xc(%ebp),%esp 10b279: 5b pop %ebx 10b27a: 5e pop %esi 10b27b: 5f pop %edi 10b27c: c9 leave 10b27d: c3 ret 10b27e: 66 90 xchg %ax,%ax _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10b280: ff 75 d4 pushl -0x2c(%ebp) 10b283: 9d popf } 10b284: 8d 65 f4 lea -0xc(%ebp),%esp 10b287: 5b pop %ebx 10b288: 5e pop %esi 10b289: 5f pop %edi 10b28a: c9 leave 10b28b: c3 ret /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 10b28c: ff 75 d4 pushl -0x2c(%ebp) 10b28f: 9d popf } return; } } _ISR_Enable( level ); } 10b290: 8d 65 f4 lea -0xc(%ebp),%esp 10b293: 5b pop %ebx 10b294: 5e pop %esi 10b295: 5f pop %edi 10b296: c9 leave 10b297: c3 ret RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10b298: 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 ); 10b29f: ff 75 d4 pushl -0x2c(%ebp) 10b2a2: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10b2a3: 83 ec 0c sub $0xc,%esp 10b2a6: 8d 43 48 lea 0x48(%ebx),%eax 10b2a9: 50 push %eax 10b2aa: e8 61 34 00 00 call 10e710 <_Watchdog_Remove> 10b2af: 58 pop %eax 10b2b0: 5a pop %edx 10b2b1: 68 f8 ff 03 10 push $0x1003fff8 10b2b6: 53 push %ebx 10b2b7: e8 a4 22 00 00 call 10d560 <_Thread_Clear_state> 10b2bc: 83 c4 10 add $0x10,%esp 10b2bf: eb c3 jmp 10b284 <_Event_Surrender+0x94> 10b2c1: 8d 76 00 lea 0x0(%esi),%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) || 10b2c4: 8b 35 c0 67 12 00 mov 0x1267c0,%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 ) && 10b2ca: 83 fe 02 cmp $0x2,%esi 10b2cd: 74 0d je 10b2dc <_Event_Surrender+0xec> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 10b2cf: 8b 35 c0 67 12 00 mov 0x1267c0,%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) || 10b2d5: 4e dec %esi 10b2d6: 0f 85 52 ff ff ff jne 10b22e <_Event_Surrender+0x3e> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 10b2dc: 3b 45 e4 cmp -0x1c(%ebp),%eax 10b2df: 74 05 je 10b2e6 <_Event_Surrender+0xf6> 10b2e1: 83 e7 02 and $0x2,%edi 10b2e4: 74 22 je 10b308 <_Event_Surrender+0x118><== NEVER TAKEN 10b2e6: 8b 45 e4 mov -0x1c(%ebp),%eax 10b2e9: f7 d0 not %eax 10b2eb: 21 d0 and %edx,%eax 10b2ed: 89 01 mov %eax,(%ecx) api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 10b2ef: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b2f6: 8b 43 28 mov 0x28(%ebx),%eax 10b2f9: 8b 55 e4 mov -0x1c(%ebp),%edx 10b2fc: 89 10 mov %edx,(%eax) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10b2fe: c7 05 c0 67 12 00 03 movl $0x3,0x1267c0 10b305: 00 00 00 } _ISR_Enable( level ); 10b308: ff 75 d4 pushl -0x2c(%ebp) 10b30b: 9d popf return; 10b30c: e9 73 ff ff ff jmp 10b284 <_Event_Surrender+0x94> =============================================================================== 0010b314 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10b314: 55 push %ebp 10b315: 89 e5 mov %esp,%ebp 10b317: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10b31a: 8d 45 f4 lea -0xc(%ebp),%eax 10b31d: 50 push %eax 10b31e: ff 75 08 pushl 0x8(%ebp) 10b321: e8 c2 25 00 00 call 10d8e8 <_Thread_Get> switch ( location ) { 10b326: 83 c4 10 add $0x10,%esp 10b329: 8b 55 f4 mov -0xc(%ebp),%edx 10b32c: 85 d2 test %edx,%edx 10b32e: 75 37 jne 10b367 <_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 ); 10b330: 9c pushf 10b331: fa cli 10b332: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10b333: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10b33a: 3b 05 58 67 12 00 cmp 0x126758,%eax 10b340: 74 2a je 10b36c <_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; 10b342: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10b349: 52 push %edx 10b34a: 9d popf 10b34b: 83 ec 08 sub $0x8,%esp 10b34e: 68 f8 ff 03 10 push $0x1003fff8 10b353: 50 push %eax 10b354: e8 07 22 00 00 call 10d560 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b359: a1 d0 64 12 00 mov 0x1264d0,%eax 10b35e: 48 dec %eax 10b35f: a3 d0 64 12 00 mov %eax,0x1264d0 _Thread_Unblock( the_thread ); _Thread_Unnest_dispatch(); break; 10b364: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b367: c9 leave 10b368: c3 ret 10b369: 8d 76 00 lea 0x0(%esi),%esi } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10b36c: 8b 0d c0 67 12 00 mov 0x1267c0,%ecx 10b372: 49 dec %ecx 10b373: 75 cd jne 10b342 <_Event_Timeout+0x2e> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10b375: c7 05 c0 67 12 00 02 movl $0x2,0x1267c0 10b37c: 00 00 00 10b37f: eb c1 jmp 10b342 <_Event_Timeout+0x2e> =============================================================================== 00110754 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 110754: 55 push %ebp 110755: 89 e5 mov %esp,%ebp 110757: 57 push %edi 110758: 56 push %esi 110759: 53 push %ebx 11075a: 83 ec 2c sub $0x2c,%esp 11075d: 8b 7d 0c mov 0xc(%ebp),%edi Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE 110760: 8d 47 04 lea 0x4(%edi),%eax 110763: 89 45 dc mov %eax,-0x24(%ebp) - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; 110766: 8b 55 08 mov 0x8(%ebp),%edx 110769: 8b 52 10 mov 0x10(%edx),%edx 11076c: 89 55 cc mov %edx,-0x34(%ebp) Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { 11076f: 39 c7 cmp %eax,%edi 110771: 0f 87 69 01 00 00 ja 1108e0 <_Heap_Allocate_aligned_with_boundary+0x18c> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 110777: 8b 5d 14 mov 0x14(%ebp),%ebx 11077a: 85 db test %ebx,%ebx 11077c: 0f 85 56 01 00 00 jne 1108d8 <_Heap_Allocate_aligned_with_boundary+0x184> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 110782: 8b 45 08 mov 0x8(%ebp),%eax 110785: 8b 48 08 mov 0x8(%eax),%ecx do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 110788: 39 c8 cmp %ecx,%eax 11078a: 0f 84 50 01 00 00 je 1108e0 <_Heap_Allocate_aligned_with_boundary+0x18c> 110790: c7 45 e4 01 00 00 00 movl $0x1,-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 110797: 8b 55 cc mov -0x34(%ebp),%edx 11079a: 83 c2 07 add $0x7,%edx 11079d: 89 55 c8 mov %edx,-0x38(%ebp) + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 1107a0: c7 45 d0 04 00 00 00 movl $0x4,-0x30(%ebp) 1107a7: 29 7d d0 sub %edi,-0x30(%ebp) 1107aa: eb 1e jmp 1107ca <_Heap_Allocate_aligned_with_boundary+0x76> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 1107ac: 8d 59 08 lea 0x8(%ecx),%ebx } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 1107af: 85 db test %ebx,%ebx 1107b1: 0f 85 f1 00 00 00 jne 1108a8 <_Heap_Allocate_aligned_with_boundary+0x154><== ALWAYS TAKEN break; } block = block->next; 1107b7: 8b 49 08 mov 0x8(%ecx),%ecx 1107ba: 8b 45 e4 mov -0x1c(%ebp),%eax 1107bd: 40 inc %eax do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 1107be: 39 4d 08 cmp %ecx,0x8(%ebp) 1107c1: 0f 84 25 01 00 00 je 1108ec <_Heap_Allocate_aligned_with_boundary+0x198> 1107c7: 89 45 e4 mov %eax,-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 ) { 1107ca: 8b 59 04 mov 0x4(%ecx),%ebx 1107cd: 39 5d dc cmp %ebx,-0x24(%ebp) 1107d0: 73 e5 jae 1107b7 <_Heap_Allocate_aligned_with_boundary+0x63> if ( alignment == 0 ) { 1107d2: 8b 55 10 mov 0x10(%ebp),%edx 1107d5: 85 d2 test %edx,%edx 1107d7: 74 d3 je 1107ac <_Heap_Allocate_aligned_with_boundary+0x58> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 1107d9: 8b 45 08 mov 0x8(%ebp),%eax 1107dc: 8b 40 14 mov 0x14(%eax),%eax 1107df: 89 45 d8 mov %eax,-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; 1107e2: 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; 1107e5: 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; 1107e8: 8d 51 08 lea 0x8(%ecx),%edx 1107eb: 89 55 d4 mov %edx,-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; 1107ee: 8b 75 c8 mov -0x38(%ebp),%esi 1107f1: 29 c6 sub %eax,%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 1107f3: 01 de add %ebx,%esi + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; 1107f5: 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); 1107f8: 89 d8 mov %ebx,%eax 1107fa: 31 d2 xor %edx,%edx 1107fc: f7 75 10 divl 0x10(%ebp) 1107ff: 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 ) { 110801: 39 de cmp %ebx,%esi 110803: 73 0b jae 110810 <_Heap_Allocate_aligned_with_boundary+0xbc> 110805: 89 f0 mov %esi,%eax 110807: 31 d2 xor %edx,%edx 110809: f7 75 10 divl 0x10(%ebp) 11080c: 89 f3 mov %esi,%ebx 11080e: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 110810: 8b 45 14 mov 0x14(%ebp),%eax 110813: 85 c0 test %eax,%eax 110815: 74 5b je 110872 <_Heap_Allocate_aligned_with_boundary+0x11e> /* 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; 110817: 8d 34 3b lea (%ebx,%edi,1),%esi 11081a: 89 f0 mov %esi,%eax 11081c: 31 d2 xor %edx,%edx 11081e: f7 75 14 divl 0x14(%ebp) 110821: 89 f0 mov %esi,%eax 110823: 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 ) { 110825: 39 c3 cmp %eax,%ebx 110827: 73 49 jae 110872 <_Heap_Allocate_aligned_with_boundary+0x11e> 110829: 39 c6 cmp %eax,%esi 11082b: 76 45 jbe 110872 <_Heap_Allocate_aligned_with_boundary+0x11e> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 11082d: 8b 55 d4 mov -0x2c(%ebp),%edx 110830: 01 fa add %edi,%edx 110832: 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 ) { 110835: 39 c2 cmp %eax,%edx 110837: 0f 87 7a ff ff ff ja 1107b7 <_Heap_Allocate_aligned_with_boundary+0x63> 11083d: 89 ce mov %ecx,%esi 11083f: eb 10 jmp 110851 <_Heap_Allocate_aligned_with_boundary+0xfd> 110841: 8d 76 00 lea 0x0(%esi),%esi /* 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 ) { 110844: 39 c1 cmp %eax,%ecx 110846: 76 28 jbe 110870 <_Heap_Allocate_aligned_with_boundary+0x11c> if ( boundary_line < boundary_floor ) { 110848: 39 45 e0 cmp %eax,-0x20(%ebp) 11084b: 0f 87 9f 00 00 00 ja 1108f0 <_Heap_Allocate_aligned_with_boundary+0x19c><== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; 110851: 89 c3 mov %eax,%ebx 110853: 29 fb sub %edi,%ebx 110855: 89 d8 mov %ebx,%eax 110857: 31 d2 xor %edx,%edx 110859: f7 75 10 divl 0x10(%ebp) 11085c: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 11085e: 8d 0c 3b lea (%ebx,%edi,1),%ecx 110861: 89 c8 mov %ecx,%eax 110863: 31 d2 xor %edx,%edx 110865: f7 75 14 divl 0x14(%ebp) 110868: 89 c8 mov %ecx,%eax 11086a: 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 ) { 11086c: 39 c3 cmp %eax,%ebx 11086e: 72 d4 jb 110844 <_Heap_Allocate_aligned_with_boundary+0xf0> 110870: 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 ) { 110872: 39 5d d4 cmp %ebx,-0x2c(%ebp) 110875: 0f 87 3c ff ff ff ja 1107b7 <_Heap_Allocate_aligned_with_boundary+0x63> 11087b: be f8 ff ff ff mov $0xfffffff8,%esi 110880: 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); 110882: 01 de add %ebx,%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 110884: 89 d8 mov %ebx,%eax 110886: 31 d2 xor %edx,%edx 110888: 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; 11088b: 29 d6 sub %edx,%esi if ( free_size >= min_block_size || free_size == 0 ) { 11088d: 39 75 d8 cmp %esi,-0x28(%ebp) 110890: 0f 86 19 ff ff ff jbe 1107af <_Heap_Allocate_aligned_with_boundary+0x5b> 110896: 85 f6 test %esi,%esi 110898: 0f 85 19 ff ff ff jne 1107b7 <_Heap_Allocate_aligned_with_boundary+0x63> } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 11089e: 85 db test %ebx,%ebx 1108a0: 0f 84 11 ff ff ff je 1107b7 <_Heap_Allocate_aligned_with_boundary+0x63><== NEVER TAKEN 1108a6: 66 90 xchg %ax,%ax search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; 1108a8: 8b 45 08 mov 0x8(%ebp),%eax 1108ab: ff 40 48 incl 0x48(%eax) stats->searches += search_count; 1108ae: 8b 55 e4 mov -0x1c(%ebp),%edx 1108b1: 01 50 4c add %edx,0x4c(%eax) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 1108b4: 57 push %edi 1108b5: 53 push %ebx 1108b6: 51 push %ecx 1108b7: 50 push %eax 1108b8: e8 6f be ff ff call 10c72c <_Heap_Block_allocate> 1108bd: 89 d8 mov %ebx,%eax 1108bf: 83 c4 10 add $0x10,%esp boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 1108c2: 8b 55 e4 mov -0x1c(%ebp),%edx 1108c5: 8b 4d 08 mov 0x8(%ebp),%ecx 1108c8: 39 51 44 cmp %edx,0x44(%ecx) 1108cb: 73 15 jae 1108e2 <_Heap_Allocate_aligned_with_boundary+0x18e> stats->max_search = search_count; 1108cd: 89 51 44 mov %edx,0x44(%ecx) } return (void *) alloc_begin; } 1108d0: 8d 65 f4 lea -0xc(%ebp),%esp 1108d3: 5b pop %ebx 1108d4: 5e pop %esi 1108d5: 5f pop %edi 1108d6: c9 leave 1108d7: c3 ret /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 1108d8: 3b 7d 14 cmp 0x14(%ebp),%edi 1108db: 76 1a jbe 1108f7 <_Heap_Allocate_aligned_with_boundary+0x1a3> 1108dd: 8d 76 00 lea 0x0(%esi),%esi do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 1108e0: 31 c0 xor %eax,%eax if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 1108e2: 8d 65 f4 lea -0xc(%ebp),%esp 1108e5: 5b pop %ebx 1108e6: 5e pop %esi 1108e7: 5f pop %edi 1108e8: c9 leave 1108e9: c3 ret 1108ea: 66 90 xchg %ax,%ax do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 1108ec: 31 c0 xor %eax,%eax 1108ee: eb d2 jmp 1108c2 <_Heap_Allocate_aligned_with_boundary+0x16e> 1108f0: 89 f1 mov %esi,%ecx <== NOT EXECUTED 1108f2: e9 c0 fe ff ff jmp 1107b7 <_Heap_Allocate_aligned_with_boundary+0x63><== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 1108f7: 8b 4d 10 mov 0x10(%ebp),%ecx 1108fa: 85 c9 test %ecx,%ecx 1108fc: 0f 85 80 fe ff ff jne 110782 <_Heap_Allocate_aligned_with_boundary+0x2e> alignment = page_size; 110902: 89 55 10 mov %edx,0x10(%ebp) 110905: e9 78 fe ff ff jmp 110782 <_Heap_Allocate_aligned_with_boundary+0x2e> =============================================================================== 00110ce8 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 110ce8: 55 push %ebp 110ce9: 89 e5 mov %esp,%ebp 110ceb: 57 push %edi 110cec: 56 push %esi 110ced: 53 push %ebx 110cee: 83 ec 4c sub $0x4c,%esp 110cf1: 8b 5d 08 mov 0x8(%ebp),%ebx 110cf4: 8b 4d 10 mov 0x10(%ebp),%ecx Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; 110cf7: 8b 43 20 mov 0x20(%ebx),%eax 110cfa: 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; 110cfd: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) Heap_Block *extend_last_block = NULL; 110d04: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) uintptr_t const page_size = heap->page_size; 110d0b: 8b 53 10 mov 0x10(%ebx),%edx 110d0e: 89 55 d4 mov %edx,-0x2c(%ebp) uintptr_t const min_block_size = heap->min_block_size; 110d11: 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; 110d14: 8b 73 30 mov 0x30(%ebx),%esi 110d17: 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 ) { 110d1a: 8b 55 0c mov 0xc(%ebp),%edx 110d1d: 01 ca add %ecx,%edx 110d1f: 89 55 cc mov %edx,-0x34(%ebp) 110d22: 73 0c jae 110d30 <_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; 110d24: 31 c0 xor %eax,%eax if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 110d26: 8d 65 f4 lea -0xc(%ebp),%esp 110d29: 5b pop %ebx 110d2a: 5e pop %esi 110d2b: 5f pop %edi 110d2c: c9 leave 110d2d: c3 ret 110d2e: 66 90 xchg %ax,%ax if ( extend_area_end < extend_area_begin ) { return false; } extend_area_ok = _Heap_Get_first_and_last_block( 110d30: 83 ec 08 sub $0x8,%esp 110d33: 8d 55 e0 lea -0x20(%ebp),%edx 110d36: 52 push %edx 110d37: 8d 55 e4 lea -0x1c(%ebp),%edx 110d3a: 52 push %edx 110d3b: 50 push %eax 110d3c: ff 75 d4 pushl -0x2c(%ebp) 110d3f: 51 push %ecx 110d40: ff 75 0c pushl 0xc(%ebp) 110d43: e8 00 bc ff ff call 10c948 <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 110d48: 83 c4 20 add $0x20,%esp 110d4b: 84 c0 test %al,%al 110d4d: 74 d5 je 110d24 <_Heap_Extend+0x3c> 110d4f: 8b 7d d0 mov -0x30(%ebp),%edi 110d52: c7 45 bc 00 00 00 00 movl $0x0,-0x44(%ebp) 110d59: c7 45 b8 00 00 00 00 movl $0x0,-0x48(%ebp) 110d60: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) 110d67: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 110d6e: 8b 75 cc mov -0x34(%ebp),%esi 110d71: 89 5d b4 mov %ebx,-0x4c(%ebp) 110d74: eb 30 jmp 110da6 <_Heap_Extend+0xbe> 110d76: 66 90 xchg %ax,%ax return false; } if ( extend_area_end == sub_area_begin ) { merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 110d78: 39 ce cmp %ecx,%esi 110d7a: 73 03 jae 110d7f <_Heap_Extend+0x97> 110d7c: 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); 110d7f: 8d 59 f8 lea -0x8(%ecx),%ebx 110d82: 89 c8 mov %ecx,%eax 110d84: 31 d2 xor %edx,%edx 110d86: 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); 110d89: 29 d3 sub %edx,%ebx link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 110d8b: 3b 4d 0c cmp 0xc(%ebp),%ecx 110d8e: 74 3c je 110dcc <_Heap_Extend+0xe4> start_block->prev_size = extend_area_end; merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 110d90: 39 4d 0c cmp %ecx,0xc(%ebp) 110d93: 76 03 jbe 110d98 <_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 ) 110d95: 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; 110d98: 8b 7b 04 mov 0x4(%ebx),%edi 110d9b: 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); 110d9e: 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 ); 110da1: 39 7d d0 cmp %edi,-0x30(%ebp) 110da4: 74 39 je 110ddf <_Heap_Extend+0xf7> return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 110da6: 3b 7d d0 cmp -0x30(%ebp),%edi 110da9: 0f 84 39 01 00 00 je 110ee8 <_Heap_Extend+0x200> 110daf: 89 f8 mov %edi,%eax uintptr_t const sub_area_end = start_block->prev_size; 110db1: 8b 0f mov (%edi),%ecx Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 110db3: 39 4d 0c cmp %ecx,0xc(%ebp) 110db6: 73 08 jae 110dc0 <_Heap_Extend+0xd8> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin 110db8: 39 f0 cmp %esi,%eax 110dba: 0f 82 64 ff ff ff jb 110d24 <_Heap_Extend+0x3c> ) { return false; } if ( extend_area_end == sub_area_begin ) { 110dc0: 39 f0 cmp %esi,%eax 110dc2: 75 b4 jne 110d78 <_Heap_Extend+0x90> 110dc4: 89 7d c4 mov %edi,-0x3c(%ebp) 110dc7: eb b6 jmp 110d7f <_Heap_Extend+0x97> 110dc9: 8d 76 00 lea 0x0(%esi),%esi } 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; 110dcc: 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 ) 110dce: 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; 110dd1: 8b 7b 04 mov 0x4(%ebx),%edi 110dd4: 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); 110dd7: 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 ); 110dda: 39 7d d0 cmp %edi,-0x30(%ebp) 110ddd: 75 c7 jne 110da6 <_Heap_Extend+0xbe> <== NEVER TAKEN 110ddf: 8b 5d b4 mov -0x4c(%ebp),%ebx if ( extend_area_begin < heap->area_begin ) { 110de2: 8b 75 0c mov 0xc(%ebp),%esi 110de5: 3b 73 18 cmp 0x18(%ebx),%esi 110de8: 0f 82 06 01 00 00 jb 110ef4 <_Heap_Extend+0x20c> heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { 110dee: 8b 45 cc mov -0x34(%ebp),%eax 110df1: 3b 43 1c cmp 0x1c(%ebx),%eax 110df4: 76 03 jbe 110df9 <_Heap_Extend+0x111> heap->area_end = extend_area_end; 110df6: 89 43 1c mov %eax,0x1c(%ebx) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 110df9: 8b 55 e0 mov -0x20(%ebp),%edx 110dfc: 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 = 110dff: 89 d1 mov %edx,%ecx 110e01: 29 c1 sub %eax,%ecx (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 110e03: 8b 75 cc mov -0x34(%ebp),%esi 110e06: 89 30 mov %esi,(%eax) extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 110e08: 89 ce mov %ecx,%esi 110e0a: 83 ce 01 or $0x1,%esi 110e0d: 89 70 04 mov %esi,0x4(%eax) _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 110e10: 89 0a mov %ecx,(%edx) extend_last_block->size_and_flag = 0; 110e12: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 110e19: 39 43 20 cmp %eax,0x20(%ebx) 110e1c: 0f 86 da 00 00 00 jbe 110efc <_Heap_Extend+0x214> heap->first_block = extend_first_block; 110e22: 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 ) { 110e25: 8b 75 c4 mov -0x3c(%ebp),%esi 110e28: 85 f6 test %esi,%esi 110e2a: 0f 84 10 01 00 00 je 110f40 <_Heap_Extend+0x258> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 110e30: 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 ); 110e33: 8b 4d 0c mov 0xc(%ebp),%ecx 110e36: 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; 110e39: 89 c8 mov %ecx,%eax 110e3b: 31 d2 xor %edx,%edx 110e3d: f7 f6 div %esi if ( remainder != 0 ) { 110e3f: 85 d2 test %edx,%edx 110e41: 0f 84 c9 00 00 00 je 110f10 <_Heap_Extend+0x228> <== ALWAYS TAKEN return value - remainder + alignment; 110e47: 8d 04 31 lea (%ecx,%esi,1),%eax <== NOT EXECUTED 110e4a: 29 d0 sub %edx,%eax <== NOT EXECUTED uintptr_t const new_first_block_begin = 110e4c: 8d 50 f8 lea -0x8(%eax),%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; 110e4f: 8b 75 c4 mov -0x3c(%ebp),%esi 110e52: 8b 0e mov (%esi),%ecx 110e54: 89 48 f8 mov %ecx,-0x8(%eax) 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 = 110e57: 89 f0 mov %esi,%eax 110e59: 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; 110e5b: 83 c8 01 or $0x1,%eax 110e5e: 89 42 04 mov %eax,0x4(%edx) _Heap_Free_block( heap, new_first_block ); 110e61: 89 d8 mov %ebx,%eax 110e63: e8 64 fe ff ff call 110ccc <_Heap_Free_block> link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 110e68: 8b 45 c8 mov -0x38(%ebp),%eax 110e6b: 85 c0 test %eax,%eax 110e6d: 0f 84 a5 00 00 00 je 110f18 <_Heap_Extend+0x230> ) { 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, 110e73: 8b 4d cc mov -0x34(%ebp),%ecx 110e76: 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( 110e79: 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); 110e7c: 89 c8 mov %ecx,%eax 110e7e: 31 d2 xor %edx,%edx 110e80: f7 73 10 divl 0x10(%ebx) 110e83: 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) 110e85: 8b 55 c8 mov -0x38(%ebp),%edx 110e88: 8b 42 04 mov 0x4(%edx),%eax 110e8b: 29 c8 sub %ecx,%eax | HEAP_PREV_BLOCK_USED; 110e8d: 83 c8 01 or $0x1,%eax 110e90: 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; 110e94: 8b 42 04 mov 0x4(%edx),%eax 110e97: 83 e0 01 and $0x1,%eax block->size_and_flag = size | flag; 110e9a: 09 c8 or %ecx,%eax 110e9c: 89 42 04 mov %eax,0x4(%edx) _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 110e9f: 89 d8 mov %ebx,%eax 110ea1: e8 26 fe ff ff call 110ccc <_Heap_Free_block> extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 110ea6: 8b 75 c4 mov -0x3c(%ebp),%esi 110ea9: 85 f6 test %esi,%esi 110eab: 0f 84 ab 00 00 00 je 110f5c <_Heap_Extend+0x274> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 110eb1: 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( 110eb4: 8b 43 20 mov 0x20(%ebx),%eax 110eb7: 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; 110eb9: 8b 4a 04 mov 0x4(%edx),%ecx 110ebc: 83 e1 01 and $0x1,%ecx block->size_and_flag = size | flag; 110ebf: 09 c8 or %ecx,%eax 110ec1: 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; 110ec4: 8b 43 30 mov 0x30(%ebx),%eax 110ec7: 2b 45 c0 sub -0x40(%ebp),%eax /* Statistics */ stats->size += extended_size; 110eca: 01 43 2c add %eax,0x2c(%ebx) if ( extended_size_ptr != NULL ) 110ecd: 8b 55 14 mov 0x14(%ebp),%edx 110ed0: 85 d2 test %edx,%edx 110ed2: 0f 84 a0 00 00 00 je 110f78 <_Heap_Extend+0x290> <== NEVER TAKEN *extended_size_ptr = extended_size; 110ed8: 8b 55 14 mov 0x14(%ebp),%edx 110edb: 89 02 mov %eax,(%edx) return true; 110edd: b0 01 mov $0x1,%al } 110edf: 8d 65 f4 lea -0xc(%ebp),%esp 110ee2: 5b pop %ebx 110ee3: 5e pop %esi 110ee4: 5f pop %edi 110ee5: c9 leave 110ee6: c3 ret 110ee7: 90 nop return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 110ee8: 8b 55 b4 mov -0x4c(%ebp),%edx 110eeb: 8b 42 18 mov 0x18(%edx),%eax 110eee: e9 be fe ff ff jmp 110db1 <_Heap_Extend+0xc9> 110ef3: 90 nop 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; 110ef4: 89 73 18 mov %esi,0x18(%ebx) 110ef7: e9 fd fe ff ff jmp 110df9 <_Heap_Extend+0x111> extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); 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 ) { 110efc: 39 53 24 cmp %edx,0x24(%ebx) 110eff: 0f 83 20 ff ff ff jae 110e25 <_Heap_Extend+0x13d> heap->last_block = extend_last_block; 110f05: 89 53 24 mov %edx,0x24(%ebx) 110f08: e9 18 ff ff ff jmp 110e25 <_Heap_Extend+0x13d> 110f0d: 8d 76 00 lea 0x0(%esi),%esi uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; } else { return value; 110f10: 89 c8 mov %ecx,%eax 110f12: e9 35 ff ff ff jmp 110e4c <_Heap_Extend+0x164> 110f17: 90 nop ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 110f18: 8b 7d bc mov -0x44(%ebp),%edi 110f1b: 85 ff test %edi,%edi 110f1d: 74 87 je 110ea6 <_Heap_Extend+0x1be> _Heap_Link_above( 110f1f: 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 ); 110f22: 8b 45 e4 mov -0x1c(%ebp),%eax 110f25: 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; 110f28: 8b 75 bc mov -0x44(%ebp),%esi 110f2b: 8b 56 04 mov 0x4(%esi),%edx 110f2e: 83 e2 01 and $0x1,%edx block->size_and_flag = size | flag; 110f31: 09 d0 or %edx,%eax 110f33: 89 46 04 mov %eax,0x4(%esi) last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 110f36: 83 49 04 01 orl $0x1,0x4(%ecx) 110f3a: e9 67 ff ff ff jmp 110ea6 <_Heap_Extend+0x1be> 110f3f: 90 nop 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 ) { 110f40: 8b 4d b8 mov -0x48(%ebp),%ecx 110f43: 85 c9 test %ecx,%ecx 110f45: 0f 84 1d ff ff ff je 110e68 <_Heap_Extend+0x180> { 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; 110f4b: 8b 45 b8 mov -0x48(%ebp),%eax 110f4e: 29 d0 sub %edx,%eax 110f50: 83 c8 01 or $0x1,%eax 110f53: 89 42 04 mov %eax,0x4(%edx) 110f56: e9 0d ff ff ff jmp 110e68 <_Heap_Extend+0x180> 110f5b: 90 nop extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 110f5c: 8b 4d c8 mov -0x38(%ebp),%ecx 110f5f: 85 c9 test %ecx,%ecx 110f61: 0f 85 4a ff ff ff jne 110eb1 <_Heap_Extend+0x1c9> _Heap_Free_block( heap, extend_first_block ); 110f67: 8b 55 e4 mov -0x1c(%ebp),%edx 110f6a: 89 d8 mov %ebx,%eax 110f6c: e8 5b fd ff ff call 110ccc <_Heap_Free_block> 110f71: e9 3b ff ff ff jmp 110eb1 <_Heap_Extend+0x1c9> 110f76: 66 90 xchg %ax,%ax stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 110f78: b0 01 mov $0x1,%al <== NOT EXECUTED 110f7a: e9 a7 fd ff ff jmp 110d26 <_Heap_Extend+0x3e> <== NOT EXECUTED =============================================================================== 0011090c <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 11090c: 55 push %ebp 11090d: 89 e5 mov %esp,%ebp 11090f: 57 push %edi 110910: 56 push %esi 110911: 53 push %ebx 110912: 83 ec 10 sub $0x10,%esp 110915: 8b 5d 08 mov 0x8(%ebp),%ebx 110918: 8b 45 0c mov 0xc(%ebp),%eax 11091b: 8d 48 f8 lea -0x8(%eax),%ecx 11091e: 31 d2 xor %edx,%edx 110920: 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); 110923: 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 110925: 8b 43 20 mov 0x20(%ebx),%eax && (uintptr_t) block <= (uintptr_t) heap->last_block; 110928: 39 c1 cmp %eax,%ecx 11092a: 72 07 jb 110933 <_Heap_Free+0x27> 11092c: 8b 73 24 mov 0x24(%ebx),%esi 11092f: 39 f1 cmp %esi,%ecx 110931: 76 0d jbe 110940 <_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 ); 110933: 31 c0 xor %eax,%eax --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 110935: 83 c4 10 add $0x10,%esp 110938: 5b pop %ebx 110939: 5e pop %esi 11093a: 5f pop %edi 11093b: c9 leave 11093c: c3 ret 11093d: 8d 76 00 lea 0x0(%esi),%esi 110940: 8b 51 04 mov 0x4(%ecx),%edx 110943: 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; 110946: 83 e2 fe and $0xfffffffe,%edx 110949: 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); 11094c: 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; 11094f: 39 d0 cmp %edx,%eax 110951: 77 e0 ja 110933 <_Heap_Free+0x27> <== NEVER TAKEN 110953: 39 d6 cmp %edx,%esi 110955: 72 dc jb 110933 <_Heap_Free+0x27> <== NEVER TAKEN 110957: 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 ) ) { 11095a: f7 c7 01 00 00 00 test $0x1,%edi 110960: 74 d1 je 110933 <_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; 110962: 83 e7 fe and $0xfffffffe,%edi 110965: 89 7d e4 mov %edi,-0x1c(%ebp) return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 110968: 39 d6 cmp %edx,%esi 11096a: 0f 84 c8 00 00 00 je 110a38 <_Heap_Free+0x12c> return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 110970: f6 44 3a 04 01 testb $0x1,0x4(%edx,%edi,1) 110975: 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 ) ) { 110979: f6 45 f0 01 testb $0x1,-0x10(%ebp) 11097d: 75 45 jne 1109c4 <_Heap_Free+0xb8> uintptr_t const prev_size = block->prev_size; 11097f: 8b 39 mov (%ecx),%edi 110981: 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); 110984: 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; 110986: 39 c8 cmp %ecx,%eax 110988: 77 a9 ja 110933 <_Heap_Free+0x27> <== NEVER TAKEN 11098a: 39 ce cmp %ecx,%esi 11098c: 72 a5 jb 110933 <_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) ) { 11098e: f6 41 04 01 testb $0x1,0x4(%ecx) 110992: 74 9f je 110933 <_Heap_Free+0x27> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 110994: 80 7d eb 00 cmpb $0x0,-0x15(%ebp) 110998: 0f 84 a6 00 00 00 je 110a44 <_Heap_Free+0x138> uintptr_t const size = block_size + prev_size + next_block_size; 11099e: 8b 7d e4 mov -0x1c(%ebp),%edi 1109a1: 03 7d ec add -0x14(%ebp),%edi 1109a4: 03 7d f0 add -0x10(%ebp),%edi --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 1109a7: 8b 42 08 mov 0x8(%edx),%eax 1109aa: 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; 1109ad: 89 42 08 mov %eax,0x8(%edx) next->prev = prev; 1109b0: 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; 1109b3: ff 4b 38 decl 0x38(%ebx) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 1109b6: 89 f8 mov %edi,%eax 1109b8: 83 c8 01 or $0x1,%eax 1109bb: 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; 1109be: 89 3c 39 mov %edi,(%ecx,%edi,1) 1109c1: eb 2a jmp 1109ed <_Heap_Free+0xe1> 1109c3: 90 nop 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 */ 1109c4: 80 7d eb 00 cmpb $0x0,-0x15(%ebp) 1109c8: 74 3a je 110a04 <_Heap_Free+0xf8> uintptr_t const size = block_size + next_block_size; 1109ca: 8b 7d e4 mov -0x1c(%ebp),%edi 1109cd: 03 7d ec add -0x14(%ebp),%edi --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 1109d0: 8b 42 08 mov 0x8(%edx),%eax 1109d3: 8b 52 0c mov 0xc(%edx),%edx ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 1109d6: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = prev; 1109d9: 89 51 0c mov %edx,0xc(%ecx) next->prev = new_block; 1109dc: 89 48 0c mov %ecx,0xc(%eax) prev->next = new_block; 1109df: 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; 1109e2: 89 f8 mov %edi,%eax 1109e4: 83 c8 01 or $0x1,%eax 1109e7: 89 41 04 mov %eax,0x4(%ecx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 1109ea: 89 3c 39 mov %edi,(%ecx,%edi,1) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 1109ed: ff 4b 40 decl 0x40(%ebx) ++stats->frees; 1109f0: ff 43 50 incl 0x50(%ebx) stats->free_size += block_size; 1109f3: 8b 55 ec mov -0x14(%ebp),%edx 1109f6: 01 53 30 add %edx,0x30(%ebx) return( true ); 1109f9: b0 01 mov $0x1,%al } 1109fb: 83 c4 10 add $0x10,%esp 1109fe: 5b pop %ebx 1109ff: 5e pop %esi 110a00: 5f pop %edi 110a01: c9 leave 110a02: c3 ret 110a03: 90 nop RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 110a04: 8b 43 08 mov 0x8(%ebx),%eax new_block->next = next; 110a07: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = block_before; 110a0a: 89 59 0c mov %ebx,0xc(%ecx) block_before->next = new_block; 110a0d: 89 4b 08 mov %ecx,0x8(%ebx) next->prev = new_block; 110a10: 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; 110a13: 8b 45 ec mov -0x14(%ebp),%eax 110a16: 83 c8 01 or $0x1,%eax 110a19: 89 41 04 mov %eax,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 110a1c: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = block_size; 110a20: 8b 45 ec mov -0x14(%ebp),%eax 110a23: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->free_blocks; 110a25: 8b 43 38 mov 0x38(%ebx),%eax 110a28: 40 inc %eax 110a29: 89 43 38 mov %eax,0x38(%ebx) if ( stats->max_free_blocks < stats->free_blocks ) { 110a2c: 3b 43 3c cmp 0x3c(%ebx),%eax 110a2f: 76 bc jbe 1109ed <_Heap_Free+0xe1> stats->max_free_blocks = stats->free_blocks; 110a31: 89 43 3c mov %eax,0x3c(%ebx) 110a34: eb b7 jmp 1109ed <_Heap_Free+0xe1> 110a36: 66 90 xchg %ax,%ax return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 110a38: c6 45 eb 00 movb $0x0,-0x15(%ebp) 110a3c: e9 38 ff ff ff jmp 110979 <_Heap_Free+0x6d> 110a41: 8d 76 00 lea 0x0(%esi),%esi 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; 110a44: 8b 45 ec mov -0x14(%ebp),%eax 110a47: 03 45 f0 add -0x10(%ebp),%eax prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 110a4a: 89 c6 mov %eax,%esi 110a4c: 83 ce 01 or $0x1,%esi 110a4f: 89 71 04 mov %esi,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 110a52: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 110a56: 89 02 mov %eax,(%edx) 110a58: eb 93 jmp 1109ed <_Heap_Free+0xe1> =============================================================================== 0010c5bc <_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 ) { 10c5bc: 55 push %ebp 10c5bd: 89 e5 mov %esp,%ebp 10c5bf: 57 push %edi 10c5c0: 56 push %esi 10c5c1: 53 push %ebx 10c5c2: 8b 4d 08 mov 0x8(%ebp),%ecx 10c5c5: 8b 7d 0c mov 0xc(%ebp),%edi uintptr_t const heap_area_end = heap_area_begin + heap_area_size; 10c5c8: 8d 34 0f lea (%edi,%ecx,1),%esi uintptr_t const alloc_area_begin = _Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); 10c5cb: 8d 59 08 lea 0x8(%ecx),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10c5ce: 89 d8 mov %ebx,%eax 10c5d0: 31 d2 xor %edx,%edx 10c5d2: f7 75 10 divl 0x10(%ebp) if ( remainder != 0 ) { 10c5d5: 85 d2 test %edx,%edx 10c5d7: 74 05 je 10c5de <_Heap_Get_first_and_last_block+0x22> return value - remainder + alignment; 10c5d9: 03 5d 10 add 0x10(%ebp),%ebx 10c5dc: 29 d3 sub %edx,%ebx _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 ( 10c5de: 39 f1 cmp %esi,%ecx 10c5e0: 77 2e ja 10c610 <_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); 10c5e2: 8d 73 f8 lea -0x8(%ebx),%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 = 10c5e5: 29 cb sub %ecx,%ebx Heap_Block *const last_block = _Heap_Block_at( first_block, first_block_size ); if ( heap_area_end < heap_area_begin || heap_area_size <= overhead 10c5e7: 39 df cmp %ebx,%edi 10c5e9: 76 25 jbe 10c610 <_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 ); 10c5eb: 29 df sub %ebx,%edi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10c5ed: 89 f8 mov %edi,%eax 10c5ef: 31 d2 xor %edx,%edx 10c5f1: f7 75 10 divl 0x10(%ebp) 10c5f4: 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 10c5f6: 39 7d 14 cmp %edi,0x14(%ebp) 10c5f9: 77 15 ja 10c610 <_Heap_Get_first_and_last_block+0x54> ) { /* Invalid area or area too small */ return false; } *first_block_ptr = first_block; 10c5fb: 8b 45 18 mov 0x18(%ebp),%eax 10c5fe: 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); 10c600: 01 f7 add %esi,%edi 10c602: 8b 45 1c mov 0x1c(%ebp),%eax 10c605: 89 38 mov %edi,(%eax) *last_block_ptr = last_block; return true; 10c607: b0 01 mov $0x1,%al } 10c609: 5b pop %ebx 10c60a: 5e pop %esi 10c60b: 5f pop %edi 10c60c: c9 leave 10c60d: c3 ret 10c60e: 66 90 xchg %ax,%ax heap_area_end < heap_area_begin || heap_area_size <= overhead || first_block_size < min_block_size ) { /* Invalid area or area too small */ return false; 10c610: 31 c0 xor %eax,%eax *first_block_ptr = first_block; *last_block_ptr = last_block; return true; } 10c612: 5b pop %ebx 10c613: 5e pop %esi 10c614: 5f pop %edi 10c615: c9 leave 10c616: c3 ret =============================================================================== 00114620 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 114620: 55 push %ebp 114621: 89 e5 mov %esp,%ebp 114623: 57 push %edi 114624: 56 push %esi 114625: 53 push %ebx 114626: 8b 7d 0c mov 0xc(%ebp),%edi Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 114629: c7 07 00 00 00 00 movl $0x0,(%edi) info->largest = 0; 11462f: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) info->total = 0; 114636: 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; } } 11463d: 8b 45 08 mov 0x8(%ebp),%eax 114640: 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); 114643: 39 d0 cmp %edx,%eax 114645: 74 31 je 114678 <_Heap_Get_free_information+0x58> 114647: b9 01 00 00 00 mov $0x1,%ecx 11464c: 31 f6 xor %esi,%esi 11464e: 31 db xor %ebx,%ebx 114650: eb 07 jmp 114659 <_Heap_Get_free_information+0x39> 114652: 66 90 xchg %ax,%ax 114654: 8b 77 04 mov 0x4(%edi),%esi 114657: 89 c1 mov %eax,%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; 114659: 8b 42 04 mov 0x4(%edx),%eax 11465c: 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; 11465f: 01 c3 add %eax,%ebx if ( info->largest < the_size ) 114661: 39 f0 cmp %esi,%eax 114663: 76 03 jbe 114668 <_Heap_Get_free_information+0x48> info->largest = the_size; 114665: 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) 114668: 8b 52 08 mov 0x8(%edx),%edx 11466b: 8d 41 01 lea 0x1(%ecx),%eax info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 11466e: 39 55 08 cmp %edx,0x8(%ebp) 114671: 75 e1 jne 114654 <_Heap_Get_free_information+0x34> 114673: 89 0f mov %ecx,(%edi) 114675: 89 5f 08 mov %ebx,0x8(%edi) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 114678: 5b pop %ebx 114679: 5e pop %esi 11467a: 5f pop %edi 11467b: c9 leave 11467c: c3 ret =============================================================================== 00111484 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 111484: 55 push %ebp 111485: 89 e5 mov %esp,%ebp 111487: 57 push %edi 111488: 56 push %esi 111489: 53 push %ebx 11148a: 83 ec 04 sub $0x4,%esp 11148d: 8b 45 08 mov 0x8(%ebp),%eax 111490: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Block *the_block = the_heap->first_block; 111493: 8b 50 20 mov 0x20(%eax),%edx Heap_Block *const end = the_heap->last_block; 111496: 8b 40 24 mov 0x24(%eax),%eax 111499: 89 45 f0 mov %eax,-0x10(%ebp) memset(the_info, 0, sizeof(*the_info)); 11149c: b9 18 00 00 00 mov $0x18,%ecx 1114a1: 31 c0 xor %eax,%eax 1114a3: 89 df mov %ebx,%edi 1114a5: f3 aa rep stos %al,%es:(%edi) while ( the_block != end ) { 1114a7: 3b 55 f0 cmp -0x10(%ebp),%edx 1114aa: 74 38 je 1114e4 <_Heap_Get_information+0x60><== NEVER TAKEN 1114ac: 8b 7a 04 mov 0x4(%edx),%edi 1114af: eb 18 jmp 1114c9 <_Heap_Get_information+0x45> 1114b1: 8d 76 00 lea 0x0(%esi),%esi 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; 1114b4: 8d 43 0c lea 0xc(%ebx),%eax else info = &the_info->Free; info->number++; 1114b7: ff 00 incl (%eax) info->total += the_size; 1114b9: 01 48 08 add %ecx,0x8(%eax) if ( info->largest < the_size ) 1114bc: 39 48 04 cmp %ecx,0x4(%eax) 1114bf: 73 03 jae 1114c4 <_Heap_Get_information+0x40> info->largest = the_size; 1114c1: 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 ) { 1114c4: 39 75 f0 cmp %esi,-0x10(%ebp) 1114c7: 74 1b je 1114e4 <_Heap_Get_information+0x60> - 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; 1114c9: 89 f9 mov %edi,%ecx 1114cb: 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); 1114ce: 8d 34 0a lea (%edx,%ecx,1),%esi 1114d1: 89 f2 mov %esi,%edx if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 1114d3: 8b 7e 04 mov 0x4(%esi),%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) ) 1114d6: f7 c7 01 00 00 00 test $0x1,%edi 1114dc: 75 d6 jne 1114b4 <_Heap_Get_information+0x30> info = &the_info->Used; else info = &the_info->Free; 1114de: 89 d8 mov %ebx,%eax 1114e0: eb d5 jmp 1114b7 <_Heap_Get_information+0x33> 1114e2: 66 90 xchg %ax,%ax if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 1114e4: 58 pop %eax 1114e5: 5b pop %ebx 1114e6: 5e pop %esi 1114e7: 5f pop %edi 1114e8: c9 leave 1114e9: c3 ret =============================================================================== 0011e548 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 11e548: 55 push %ebp 11e549: 89 e5 mov %esp,%ebp 11e54b: 57 push %edi 11e54c: 56 push %esi 11e54d: 53 push %ebx 11e54e: 83 ec 2c sub $0x2c,%esp 11e551: 8b 5d 08 mov 0x8(%ebp),%ebx 11e554: 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); 11e557: 8d 4e f8 lea -0x8(%esi),%ecx 11e55a: 89 f0 mov %esi,%eax 11e55c: 31 d2 xor %edx,%edx 11e55e: 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); 11e561: 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; 11e563: 8b 45 14 mov 0x14(%ebp),%eax 11e566: c7 00 00 00 00 00 movl $0x0,(%eax) *new_size = 0; 11e56c: 8b 55 18 mov 0x18(%ebp),%edx 11e56f: 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; 11e575: 39 4b 20 cmp %ecx,0x20(%ebx) 11e578: 77 05 ja 11e57f <_Heap_Resize_block+0x37> 11e57a: 39 4b 24 cmp %ecx,0x24(%ebx) 11e57d: 73 0d jae 11e58c <_Heap_Resize_block+0x44> new_alloc_size, old_size, new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; 11e57f: b8 02 00 00 00 mov $0x2,%eax } } 11e584: 8d 65 f4 lea -0xc(%ebp),%esp 11e587: 5b pop %ebx 11e588: 5e pop %esi 11e589: 5f pop %edi 11e58a: c9 leave 11e58b: 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; 11e58c: 8b 41 04 mov 0x4(%ecx),%eax 11e58f: 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; 11e592: 8d 3c 01 lea (%ecx,%eax,1),%edi 11e595: 89 7d d4 mov %edi,-0x2c(%ebp) uintptr_t alloc_size = block_end - alloc_begin + HEAP_ALLOC_BONUS; 11e598: 89 fa mov %edi,%edx 11e59a: 29 f2 sub %esi,%edx 11e59c: 83 c2 04 add $0x4,%edx 11e59f: 89 55 e0 mov %edx,-0x20(%ebp) 11e5a2: 8b 57 04 mov 0x4(%edi),%edx 11e5a5: 83 e2 fe and $0xfffffffe,%edx 11e5a8: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 11e5ab: f6 44 17 04 01 testb $0x1,0x4(%edi,%edx,1) 11e5b0: 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; 11e5b4: 8b 55 e0 mov -0x20(%ebp),%edx 11e5b7: 8b 7d 14 mov 0x14(%ebp),%edi 11e5ba: 89 17 mov %edx,(%edi) if ( next_block_is_free ) { 11e5bc: 80 7d df 00 cmpb $0x0,-0x21(%ebp) 11e5c0: 75 6e jne 11e630 <_Heap_Resize_block+0xe8> block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { 11e5c2: 8b 55 e0 mov -0x20(%ebp),%edx 11e5c5: 39 55 10 cmp %edx,0x10(%ebp) 11e5c8: 77 79 ja 11e643 <_Heap_Resize_block+0xfb> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 11e5ca: 80 7d df 00 cmpb $0x0,-0x21(%ebp) 11e5ce: 74 31 je 11e601 <_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; 11e5d0: 8b 79 04 mov 0x4(%ecx),%edi 11e5d3: 83 e7 01 and $0x1,%edi block->size_and_flag = size | flag; 11e5d6: 09 c7 or %eax,%edi 11e5d8: 89 79 04 mov %edi,0x4(%ecx) new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11e5db: 8b 7d d4 mov -0x2c(%ebp),%edi 11e5de: 8b 7f 08 mov 0x8(%edi),%edi 11e5e1: 89 7d e4 mov %edi,-0x1c(%ebp) 11e5e4: 8b 55 d4 mov -0x2c(%ebp),%edx 11e5e7: 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; 11e5ea: 8b 55 e4 mov -0x1c(%ebp),%edx 11e5ed: 89 57 08 mov %edx,0x8(%edi) next->prev = prev; 11e5f0: 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; 11e5f3: 83 4c 01 04 01 orl $0x1,0x4(%ecx,%eax,1) /* Statistics */ --stats->free_blocks; 11e5f8: ff 4b 38 decl 0x38(%ebx) stats->free_size -= next_block_size; 11e5fb: 8b 7d d0 mov -0x30(%ebp),%edi 11e5fe: 29 7b 30 sub %edi,0x30(%ebx) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 11e601: ff 75 10 pushl 0x10(%ebp) 11e604: 56 push %esi 11e605: 51 push %ecx 11e606: 53 push %ebx 11e607: e8 20 e1 fe ff call 10c72c <_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; 11e60c: 8b 50 04 mov 0x4(%eax),%edx 11e60f: 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_ALLOC_BONUS; 11e612: 29 f0 sub %esi,%eax 11e614: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 11e618: 8b 55 18 mov 0x18(%ebp),%edx 11e61b: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->resizes; 11e61d: ff 43 54 incl 0x54(%ebx) 11e620: 83 c4 10 add $0x10,%esp return HEAP_RESIZE_SUCCESSFUL; 11e623: 31 c0 xor %eax,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11e625: 8d 65 f4 lea -0xc(%ebp),%esp 11e628: 5b pop %ebx 11e629: 5e pop %esi 11e62a: 5f pop %edi 11e62b: c9 leave 11e62c: c3 ret 11e62d: 8d 76 00 lea 0x0(%esi),%esi _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; if ( next_block_is_free ) { block_size += next_block_size; 11e630: 03 45 d0 add -0x30(%ebp),%eax alloc_size += next_block_size; 11e633: 8b 7d d0 mov -0x30(%ebp),%edi 11e636: 01 fa add %edi,%edx 11e638: 89 55 e0 mov %edx,-0x20(%ebp) } if ( new_alloc_size > alloc_size ) { 11e63b: 8b 55 e0 mov -0x20(%ebp),%edx 11e63e: 39 55 10 cmp %edx,0x10(%ebp) 11e641: 76 87 jbe 11e5ca <_Heap_Resize_block+0x82> return HEAP_RESIZE_UNSATISFIED; 11e643: b8 01 00 00 00 mov $0x1,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11e648: 8d 65 f4 lea -0xc(%ebp),%esp 11e64b: 5b pop %ebx 11e64c: 5e pop %esi 11e64d: 5f pop %edi 11e64e: c9 leave 11e64f: c3 ret =============================================================================== 0011e650 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11e650: 55 push %ebp 11e651: 89 e5 mov %esp,%ebp 11e653: 56 push %esi 11e654: 53 push %ebx 11e655: 8b 5d 08 mov 0x8(%ebp),%ebx 11e658: 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); 11e65b: 8d 4e f8 lea -0x8(%esi),%ecx 11e65e: 89 f0 mov %esi,%eax 11e660: 31 d2 xor %edx,%edx 11e662: 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); 11e665: 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 11e667: 8b 43 20 mov 0x20(%ebx),%eax && (uintptr_t) block <= (uintptr_t) heap->last_block; 11e66a: 39 c1 cmp %eax,%ecx 11e66c: 72 07 jb 11e675 <_Heap_Size_of_alloc_area+0x25> 11e66e: 8b 53 24 mov 0x24(%ebx),%edx 11e671: 39 d1 cmp %edx,%ecx 11e673: 76 07 jbe 11e67c <_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; 11e675: 31 c0 xor %eax,%eax } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; } 11e677: 5b pop %ebx 11e678: 5e pop %esi 11e679: c9 leave 11e67a: c3 ret 11e67b: 90 nop - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 11e67c: 8b 59 04 mov 0x4(%ecx),%ebx 11e67f: 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); 11e682: 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; 11e684: 39 c8 cmp %ecx,%eax 11e686: 77 ed ja 11e675 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN 11e688: 39 ca cmp %ecx,%edx 11e68a: 72 e9 jb 11e675 <_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 ) 11e68c: f6 41 04 01 testb $0x1,0x4(%ecx) 11e690: 74 e3 je 11e675 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 11e692: 29 f1 sub %esi,%ecx 11e694: 8d 51 04 lea 0x4(%ecx),%edx 11e697: 8b 45 10 mov 0x10(%ebp),%eax 11e69a: 89 10 mov %edx,(%eax) return true; 11e69c: b0 01 mov $0x1,%al } 11e69e: 5b pop %ebx 11e69f: 5e pop %esi 11e6a0: c9 leave 11e6a1: c3 ret =============================================================================== 0010d260 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10d260: 55 push %ebp 10d261: 89 e5 mov %esp,%ebp 10d263: 57 push %edi 10d264: 56 push %esi 10d265: 53 push %ebx 10d266: 83 ec 4c sub $0x4c,%esp 10d269: 8b 5d 08 mov 0x8(%ebp),%ebx uintptr_t const page_size = heap->page_size; 10d26c: 8b 43 10 mov 0x10(%ebx),%eax 10d26f: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10d272: 8b 53 14 mov 0x14(%ebx),%edx 10d275: 89 55 d0 mov %edx,-0x30(%ebp) Heap_Block *const first_block = heap->first_block; 10d278: 8b 43 20 mov 0x20(%ebx),%eax 10d27b: 89 45 dc mov %eax,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10d27e: 8b 53 24 mov 0x24(%ebx),%edx 10d281: 89 55 cc mov %edx,-0x34(%ebp) Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d284: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10d288: 74 1a je 10d2a4 <_Heap_Walk+0x44> 10d28a: c7 45 d8 18 d2 10 00 movl $0x10d218,-0x28(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d291: 83 3d 00 87 12 00 03 cmpl $0x3,0x128700 10d298: 74 1a je 10d2b4 <_Heap_Walk+0x54> <== ALWAYS TAKEN } block = next_block; } while ( block != first_block ); return true; 10d29a: b0 01 mov $0x1,%al } 10d29c: 8d 65 f4 lea -0xc(%ebp),%esp 10d29f: 5b pop %ebx 10d2a0: 5e pop %esi 10d2a1: 5f pop %edi 10d2a2: c9 leave 10d2a3: 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; 10d2a4: c7 45 d8 10 d2 10 00 movl $0x10d210,-0x28(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d2ab: 83 3d 00 87 12 00 03 cmpl $0x3,0x128700 10d2b2: 75 e6 jne 10d29a <_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)( 10d2b4: 52 push %edx 10d2b5: ff 73 0c pushl 0xc(%ebx) 10d2b8: ff 73 08 pushl 0x8(%ebx) 10d2bb: ff 75 cc pushl -0x34(%ebp) 10d2be: ff 75 dc pushl -0x24(%ebp) 10d2c1: ff 73 1c pushl 0x1c(%ebx) 10d2c4: ff 73 18 pushl 0x18(%ebx) 10d2c7: ff 75 d0 pushl -0x30(%ebp) 10d2ca: ff 75 e0 pushl -0x20(%ebp) 10d2cd: 68 c4 15 12 00 push $0x1215c4 10d2d2: 6a 00 push $0x0 10d2d4: ff 75 0c pushl 0xc(%ebp) 10d2d7: 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 ) { 10d2da: 83 c4 30 add $0x30,%esp 10d2dd: 8b 45 e0 mov -0x20(%ebp),%eax 10d2e0: 85 c0 test %eax,%eax 10d2e2: 74 70 je 10d354 <_Heap_Walk+0xf4> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10d2e4: f6 45 e0 03 testb $0x3,-0x20(%ebp) 10d2e8: 75 72 jne 10d35c <_Heap_Walk+0xfc> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d2ea: 8b 45 d0 mov -0x30(%ebp),%eax 10d2ed: 31 d2 xor %edx,%edx 10d2ef: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10d2f2: 85 d2 test %edx,%edx 10d2f4: 75 72 jne 10d368 <_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; 10d2f6: 8b 45 dc mov -0x24(%ebp),%eax 10d2f9: 83 c0 08 add $0x8,%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d2fc: 31 d2 xor %edx,%edx 10d2fe: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( 10d301: 85 d2 test %edx,%edx 10d303: 75 6f jne 10d374 <_Heap_Walk+0x114> block = next_block; } while ( block != first_block ); return true; } 10d305: 8b 45 dc mov -0x24(%ebp),%eax 10d308: 8b 40 04 mov 0x4(%eax),%eax 10d30b: 89 45 e4 mov %eax,-0x1c(%ebp) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10d30e: a8 01 test $0x1,%al 10d310: 0f 84 ce 02 00 00 je 10d5e4 <_Heap_Walk+0x384> - 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; 10d316: 8b 55 cc mov -0x34(%ebp),%edx 10d319: 8b 42 04 mov 0x4(%edx),%eax 10d31c: 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); 10d31f: 01 d0 add %edx,%eax ); return false; } if ( _Heap_Is_free( last_block ) ) { 10d321: f6 40 04 01 testb $0x1,0x4(%eax) 10d325: 74 25 je 10d34c <_Heap_Walk+0xec> ); return false; } if ( 10d327: 39 45 dc cmp %eax,-0x24(%ebp) 10d32a: 74 54 je 10d380 <_Heap_Walk+0x120> <== ALWAYS TAKEN _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 10d32c: 51 push %ecx <== NOT EXECUTED 10d32d: 68 e0 16 12 00 push $0x1216e0 <== NOT EXECUTED 10d332: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10d334: 6a 01 push $0x1 10d336: ff 75 0c pushl 0xc(%ebp) 10d339: ff 55 d8 call *-0x28(%ebp) 10d33c: 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; 10d33f: 31 c0 xor %eax,%eax block = next_block; } while ( block != first_block ); return true; } 10d341: 8d 65 f4 lea -0xc(%ebp),%esp 10d344: 5b pop %ebx 10d345: 5e pop %esi 10d346: 5f pop %edi 10d347: c9 leave 10d348: c3 ret 10d349: 8d 76 00 lea 0x0(%esi),%esi return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 10d34c: 53 push %ebx 10d34d: 68 7a 15 12 00 push $0x12157a 10d352: eb e0 jmp 10d334 <_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" ); 10d354: 57 push %edi 10d355: 68 49 15 12 00 push $0x121549 10d35a: eb d8 jmp 10d334 <_Heap_Walk+0xd4> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 10d35c: ff 75 e0 pushl -0x20(%ebp) 10d35f: 68 5c 15 12 00 push $0x12155c 10d364: eb ce jmp 10d334 <_Heap_Walk+0xd4> 10d366: 66 90 xchg %ax,%ax return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 10d368: ff 75 d0 pushl -0x30(%ebp) 10d36b: 68 58 16 12 00 push $0x121658 10d370: eb c2 jmp 10d334 <_Heap_Walk+0xd4> 10d372: 66 90 xchg %ax,%ax } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10d374: ff 75 dc pushl -0x24(%ebp) 10d377: 68 7c 16 12 00 push $0x12167c 10d37c: eb b6 jmp 10d334 <_Heap_Walk+0xd4> 10d37e: 66 90 xchg %ax,%ax int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10d380: 8b 43 10 mov 0x10(%ebx),%eax 10d383: 89 45 c8 mov %eax,-0x38(%ebp) block = next_block; } while ( block != first_block ); return true; } 10d386: 8b 73 08 mov 0x8(%ebx),%esi 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 ) { 10d389: 39 f3 cmp %esi,%ebx 10d38b: 74 65 je 10d3f2 <_Heap_Walk+0x192> block = next_block; } while ( block != first_block ); return true; } 10d38d: 8b 43 20 mov 0x20(%ebx),%eax 10d390: 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; 10d393: 39 f0 cmp %esi,%eax 10d395: 0f 87 55 02 00 00 ja 10d5f0 <_Heap_Walk+0x390> <== NEVER TAKEN 10d39b: 8b 7b 24 mov 0x24(%ebx),%edi 10d39e: 39 f7 cmp %esi,%edi 10d3a0: 0f 82 4a 02 00 00 jb 10d5f0 <_Heap_Walk+0x390> <== NEVER TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10d3a6: 8d 46 08 lea 0x8(%esi),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d3a9: 31 d2 xor %edx,%edx 10d3ab: f7 75 c8 divl -0x38(%ebp) ); return false; } if ( 10d3ae: 85 d2 test %edx,%edx 10d3b0: 0f 85 71 02 00 00 jne 10d627 <_Heap_Walk+0x3c7> <== 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; 10d3b6: 8b 46 04 mov 0x4(%esi),%eax 10d3b9: 83 e0 fe and $0xfffffffe,%eax ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d3bc: f6 44 06 04 01 testb $0x1,0x4(%esi,%eax,1) 10d3c1: 0f 85 6d 02 00 00 jne 10d634 <_Heap_Walk+0x3d4> <== NEVER TAKEN 10d3c7: 89 da mov %ebx,%edx 10d3c9: 8d 76 00 lea 0x0(%esi),%esi ); return false; } if ( free_block->prev != prev_block ) { 10d3cc: 8b 46 0c mov 0xc(%esi),%eax 10d3cf: 39 d0 cmp %edx,%eax 10d3d1: 0f 85 6a 02 00 00 jne 10d641 <_Heap_Walk+0x3e1> return false; } prev_block = free_block; free_block = free_block->next; 10d3d7: 8b 4e 08 mov 0x8(%esi),%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 ) { 10d3da: 39 cb cmp %ecx,%ebx 10d3dc: 74 1a je 10d3f8 <_Heap_Walk+0x198> 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; 10d3de: 39 4d d4 cmp %ecx,-0x2c(%ebp) 10d3e1: 0f 86 7d 01 00 00 jbe 10d564 <_Heap_Walk+0x304> if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 10d3e7: 51 push %ecx 10d3e8: 68 10 17 12 00 push $0x121710 10d3ed: e9 42 ff ff ff jmp 10d334 <_Heap_Walk+0xd4> 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 ) { 10d3f2: 8b 53 20 mov 0x20(%ebx),%edx 10d3f5: 89 55 d4 mov %edx,-0x2c(%ebp) ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d3f8: 8b 7d dc mov -0x24(%ebp),%edi 10d3fb: 8b 45 d4 mov -0x2c(%ebp),%eax 10d3fe: 66 90 xchg %ax,%ax - 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; 10d400: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d403: 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); 10d406: 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; 10d409: 39 f0 cmp %esi,%eax 10d40b: 76 23 jbe 10d430 <_Heap_Walk+0x1d0> <== 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)( 10d40d: 83 ec 0c sub $0xc,%esp 10d410: 56 push %esi 10d411: 57 push %edi 10d412: 68 94 17 12 00 push $0x121794 10d417: 90 nop 10d418: 6a 01 push $0x1 10d41a: ff 75 0c pushl 0xc(%ebp) 10d41d: ff 55 d8 call *-0x28(%ebp) "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 10d420: 83 c4 20 add $0x20,%esp 10d423: 31 c0 xor %eax,%eax block = next_block; } while ( block != first_block ); return true; } 10d425: 8d 65 f4 lea -0xc(%ebp),%esp 10d428: 5b pop %ebx 10d429: 5e pop %esi 10d42a: 5f pop %edi 10d42b: c9 leave 10d42c: c3 ret 10d42d: 8d 76 00 lea 0x0(%esi),%esi 10d430: 39 73 24 cmp %esi,0x24(%ebx) 10d433: 72 d8 jb 10d40d <_Heap_Walk+0x1ad> 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; 10d435: 3b 7d cc cmp -0x34(%ebp),%edi 10d438: 0f 95 45 d4 setne -0x2c(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d43c: 89 c8 mov %ecx,%eax 10d43e: 31 d2 xor %edx,%edx 10d440: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 10d443: 85 d2 test %edx,%edx 10d445: 74 0a je 10d451 <_Heap_Walk+0x1f1> 10d447: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10d44b: 0f 85 a6 01 00 00 jne 10d5f7 <_Heap_Walk+0x397> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 10d451: 39 4d d0 cmp %ecx,-0x30(%ebp) 10d454: 76 0a jbe 10d460 <_Heap_Walk+0x200> 10d456: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10d45a: 0f 85 a6 01 00 00 jne 10d606 <_Heap_Walk+0x3a6> <== ALWAYS TAKEN ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 10d460: 39 f7 cmp %esi,%edi 10d462: 72 0a jb 10d46e <_Heap_Walk+0x20e> 10d464: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10d468: 0f 85 aa 01 00 00 jne 10d618 <_Heap_Walk+0x3b8> 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; 10d46e: 8b 55 e4 mov -0x1c(%ebp),%edx 10d471: 83 e2 01 and $0x1,%edx ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10d474: f6 46 04 01 testb $0x1,0x4(%esi) 10d478: 74 4e je 10d4c8 <_Heap_Walk+0x268> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 10d47a: 85 d2 test %edx,%edx 10d47c: 74 2e je 10d4ac <_Heap_Walk+0x24c> (*printer)( 10d47e: 83 ec 0c sub $0xc,%esp 10d481: 51 push %ecx 10d482: 57 push %edi 10d483: 68 ab 15 12 00 push $0x1215ab 10d488: 6a 00 push $0x0 10d48a: ff 75 0c pushl 0xc(%ebp) 10d48d: ff 55 d8 call *-0x28(%ebp) 10d490: 83 c4 20 add $0x20,%esp block->prev_size ); } block = next_block; } while ( block != first_block ); 10d493: 39 75 dc cmp %esi,-0x24(%ebp) 10d496: 0f 84 fe fd ff ff je 10d29a <_Heap_Walk+0x3a> 10d49c: 8b 56 04 mov 0x4(%esi),%edx 10d49f: 89 55 e4 mov %edx,-0x1c(%ebp) 10d4a2: 8b 43 20 mov 0x20(%ebx),%eax 10d4a5: 89 f7 mov %esi,%edi 10d4a7: e9 54 ff ff ff jmp 10d400 <_Heap_Walk+0x1a0> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10d4ac: 83 ec 08 sub $0x8,%esp 10d4af: ff 37 pushl (%edi) 10d4b1: 51 push %ecx 10d4b2: 57 push %edi 10d4b3: 68 f8 18 12 00 push $0x1218f8 10d4b8: 6a 00 push $0x0 10d4ba: ff 75 0c pushl 0xc(%ebp) 10d4bd: ff 55 d8 call *-0x28(%ebp) 10d4c0: 83 c4 20 add $0x20,%esp 10d4c3: eb ce jmp 10d493 <_Heap_Walk+0x233> 10d4c5: 8d 76 00 lea 0x0(%esi),%esi block = next_block; } while ( block != first_block ); return true; } 10d4c8: 8b 43 08 mov 0x8(%ebx),%eax 10d4cb: 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 ? 10d4ce: 8b 47 08 mov 0x8(%edi),%eax 10d4d1: 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)( 10d4d4: 39 43 0c cmp %eax,0xc(%ebx) 10d4d7: 0f 84 cb 00 00 00 je 10d5a8 <_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)" : "") 10d4dd: 39 c3 cmp %eax,%ebx 10d4df: 0f 84 db 00 00 00 je 10d5c0 <_Heap_Walk+0x360> 10d4e5: c7 45 c8 49 14 12 00 movl $0x121449,-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 ? 10d4ec: 8b 47 0c mov 0xc(%edi),%eax 10d4ef: 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)( 10d4f2: 39 45 b4 cmp %eax,-0x4c(%ebp) 10d4f5: 0f 84 b9 00 00 00 je 10d5b4 <_Heap_Walk+0x354> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 10d4fb: 39 c3 cmp %eax,%ebx 10d4fd: 0f 84 c9 00 00 00 je 10d5cc <_Heap_Walk+0x36c> 10d503: b8 49 14 12 00 mov $0x121449,%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)( 10d508: 83 ec 0c sub $0xc,%esp 10d50b: ff 75 c8 pushl -0x38(%ebp) 10d50e: ff 75 e4 pushl -0x1c(%ebp) 10d511: 50 push %eax 10d512: ff 75 d4 pushl -0x2c(%ebp) 10d515: 51 push %ecx 10d516: 57 push %edi 10d517: 68 54 18 12 00 push $0x121854 10d51c: 6a 00 push $0x0 10d51e: ff 75 0c pushl 0xc(%ebp) 10d521: 89 55 c4 mov %edx,-0x3c(%ebp) 10d524: 89 4d c0 mov %ecx,-0x40(%ebp) 10d527: 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 ) { 10d52a: 8b 06 mov (%esi),%eax 10d52c: 83 c4 30 add $0x30,%esp 10d52f: 8b 4d c0 mov -0x40(%ebp),%ecx 10d532: 39 c1 cmp %eax,%ecx 10d534: 8b 55 c4 mov -0x3c(%ebp),%edx 10d537: 75 5f jne 10d598 <_Heap_Walk+0x338> ); return false; } if ( !prev_used ) { 10d539: 85 d2 test %edx,%edx 10d53b: 0f 84 97 00 00 00 je 10d5d8 <_Heap_Walk+0x378> block = next_block; } while ( block != first_block ); return true; } 10d541: 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 ) { 10d544: 39 c3 cmp %eax,%ebx 10d546: 74 0f je 10d557 <_Heap_Walk+0x2f7> <== NEVER TAKEN if ( free_block == block ) { 10d548: 39 c7 cmp %eax,%edi 10d54a: 0f 84 43 ff ff ff je 10d493 <_Heap_Walk+0x233> return true; } free_block = free_block->next; 10d550: 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 ) { 10d553: 39 c3 cmp %eax,%ebx 10d555: 75 f1 jne 10d548 <_Heap_Walk+0x2e8> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10d557: 57 push %edi 10d558: 68 20 19 12 00 push $0x121920 10d55d: e9 d2 fd ff ff jmp 10d334 <_Heap_Walk+0xd4> 10d562: 66 90 xchg %ax,%ax 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; 10d564: 39 f9 cmp %edi,%ecx 10d566: 0f 87 7b fe ff ff ja 10d3e7 <_Heap_Walk+0x187> <== NEVER TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10d56c: 8d 41 08 lea 0x8(%ecx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d56f: 31 d2 xor %edx,%edx 10d571: f7 75 c8 divl -0x38(%ebp) ); return false; } if ( 10d574: 85 d2 test %edx,%edx 10d576: 0f 85 ad 00 00 00 jne 10d629 <_Heap_Walk+0x3c9> - 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; 10d57c: 8b 41 04 mov 0x4(%ecx),%eax 10d57f: 83 e0 fe and $0xfffffffe,%eax ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d582: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d587: 0f 85 a9 00 00 00 jne 10d636 <_Heap_Walk+0x3d6> 10d58d: 89 f2 mov %esi,%edx 10d58f: 89 ce mov %ecx,%esi 10d591: e9 36 fe ff ff jmp 10d3cc <_Heap_Walk+0x16c> 10d596: 66 90 xchg %ax,%ax " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( 10d598: 52 push %edx 10d599: 56 push %esi 10d59a: 50 push %eax 10d59b: 51 push %ecx 10d59c: 57 push %edi 10d59d: 68 8c 18 12 00 push $0x12188c 10d5a2: e9 71 fe ff ff jmp 10d418 <_Heap_Walk+0x1b8> 10d5a7: 90 nop 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)( 10d5a8: c7 45 c8 16 15 12 00 movl $0x121516,-0x38(%ebp) 10d5af: e9 38 ff ff ff jmp 10d4ec <_Heap_Walk+0x28c> 10d5b4: b8 2f 15 12 00 mov $0x12152f,%eax 10d5b9: e9 4a ff ff ff jmp 10d508 <_Heap_Walk+0x2a8> 10d5be: 66 90 xchg %ax,%ax " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 10d5c0: c7 45 c8 25 15 12 00 movl $0x121525,-0x38(%ebp) 10d5c7: e9 20 ff ff ff jmp 10d4ec <_Heap_Walk+0x28c> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 10d5cc: b8 3f 15 12 00 mov $0x12153f,%eax 10d5d1: e9 32 ff ff ff jmp 10d508 <_Heap_Walk+0x2a8> 10d5d6: 66 90 xchg %ax,%ax return false; } if ( !prev_used ) { (*printer)( 10d5d8: 57 push %edi 10d5d9: 68 c8 18 12 00 push $0x1218c8 10d5de: e9 51 fd ff ff jmp 10d334 <_Heap_Walk+0xd4> 10d5e3: 90 nop return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 10d5e4: 56 push %esi 10d5e5: 68 b0 16 12 00 push $0x1216b0 10d5ea: e9 45 fd ff ff jmp 10d334 <_Heap_Walk+0xd4> 10d5ef: 90 nop 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; 10d5f0: 89 f1 mov %esi,%ecx <== NOT EXECUTED 10d5f2: e9 f0 fd ff ff jmp 10d3e7 <_Heap_Walk+0x187> <== NOT EXECUTED return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 10d5f7: 83 ec 0c sub $0xc,%esp 10d5fa: 51 push %ecx 10d5fb: 57 push %edi 10d5fc: 68 c4 17 12 00 push $0x1217c4 10d601: e9 12 fe ff ff jmp 10d418 <_Heap_Walk+0x1b8> return false; } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( 10d606: 83 ec 08 sub $0x8,%esp 10d609: ff 75 d0 pushl -0x30(%ebp) 10d60c: 51 push %ecx 10d60d: 57 push %edi 10d60e: 68 f4 17 12 00 push $0x1217f4 10d613: e9 00 fe ff ff jmp 10d418 <_Heap_Walk+0x1b8> return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 10d618: 83 ec 0c sub $0xc,%esp 10d61b: 56 push %esi 10d61c: 57 push %edi 10d61d: 68 20 18 12 00 push $0x121820 10d622: e9 f1 fd ff ff jmp 10d418 <_Heap_Walk+0x1b8> ); return false; } if ( 10d627: 89 f1 mov %esi,%ecx <== NOT EXECUTED !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10d629: 51 push %ecx 10d62a: 68 30 17 12 00 push $0x121730 10d62f: e9 00 fd ff ff jmp 10d334 <_Heap_Walk+0xd4> ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d634: 89 f1 mov %esi,%ecx <== NOT EXECUTED (*printer)( 10d636: 51 push %ecx 10d637: 68 8f 15 12 00 push $0x12158f 10d63c: e9 f3 fc ff ff jmp 10d334 <_Heap_Walk+0xd4> return false; } if ( free_block->prev != prev_block ) { (*printer)( 10d641: 83 ec 0c sub $0xc,%esp 10d644: 50 push %eax 10d645: 56 push %esi 10d646: 68 60 17 12 00 push $0x121760 10d64b: e9 c8 fd ff ff jmp 10d418 <_Heap_Walk+0x1b8> =============================================================================== 0010bd9c <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 10bd9c: 55 push %ebp 10bd9d: 89 e5 mov %esp,%ebp 10bd9f: 53 push %ebx 10bda0: 83 ec 04 sub $0x4,%esp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10bda3: 8b 0d 60 68 12 00 mov 0x126860,%ecx 10bda9: 85 c9 test %ecx,%ecx 10bdab: 74 1a je 10bdc7 <_IO_Initialize_all_drivers+0x2b><== NEVER TAKEN 10bdad: 31 db xor %ebx,%ebx 10bdaf: 90 nop (void) rtems_io_initialize( major, 0, NULL ); 10bdb0: 52 push %edx 10bdb1: 6a 00 push $0x0 10bdb3: 6a 00 push $0x0 10bdb5: 53 push %ebx 10bdb6: e8 6d 47 00 00 call 110528 void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10bdbb: 43 inc %ebx 10bdbc: 83 c4 10 add $0x10,%esp 10bdbf: 39 1d 60 68 12 00 cmp %ebx,0x126860 10bdc5: 77 e9 ja 10bdb0 <_IO_Initialize_all_drivers+0x14> (void) rtems_io_initialize( major, 0, NULL ); } 10bdc7: 8b 5d fc mov -0x4(%ebp),%ebx 10bdca: c9 leave 10bdcb: c3 ret =============================================================================== 0010bd04 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 10bd04: 55 push %ebp 10bd05: 89 e5 mov %esp,%ebp 10bd07: 57 push %edi 10bd08: 56 push %esi 10bd09: 53 push %ebx 10bd0a: 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; 10bd0d: 8b 1d 94 22 12 00 mov 0x122294,%ebx drivers_in_table = Configuration.number_of_device_drivers; 10bd13: a1 90 22 12 00 mov 0x122290,%eax 10bd18: 89 45 e4 mov %eax,-0x1c(%ebp) number_of_drivers = Configuration.maximum_drivers; 10bd1b: 8b 35 8c 22 12 00 mov 0x12228c,%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 ) 10bd21: 39 f0 cmp %esi,%eax 10bd23: 73 5f jae 10bd84 <_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( 10bd25: 8d 0c 76 lea (%esi,%esi,2),%ecx 10bd28: c1 e1 03 shl $0x3,%ecx 10bd2b: 83 ec 0c sub $0xc,%esp 10bd2e: 51 push %ecx 10bd2f: 89 4d dc mov %ecx,-0x24(%ebp) 10bd32: e8 35 2b 00 00 call 10e86c <_Workspace_Allocate_or_fatal_error> 10bd37: 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 *) 10bd39: a3 64 68 12 00 mov %eax,0x126864 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 10bd3e: 89 35 60 68 12 00 mov %esi,0x126860 memset( 10bd44: 31 c0 xor %eax,%eax 10bd46: 8b 4d dc mov -0x24(%ebp),%ecx 10bd49: 89 d7 mov %edx,%edi 10bd4b: 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++ ) 10bd4d: 83 c4 10 add $0x10,%esp 10bd50: 8b 45 e4 mov -0x1c(%ebp),%eax 10bd53: 85 c0 test %eax,%eax 10bd55: 74 25 je 10bd7c <_IO_Manager_initialization+0x78><== NEVER TAKEN 10bd57: a1 64 68 12 00 mov 0x126864,%eax 10bd5c: 89 45 e0 mov %eax,-0x20(%ebp) 10bd5f: 31 c0 xor %eax,%eax 10bd61: 31 d2 xor %edx,%edx 10bd63: 90 nop _IO_Driver_address_table[index] = driver_table[index]; 10bd64: 8b 7d e0 mov -0x20(%ebp),%edi 10bd67: 01 c7 add %eax,%edi 10bd69: 8d 34 03 lea (%ebx,%eax,1),%esi 10bd6c: b9 06 00 00 00 mov $0x6,%ecx 10bd71: 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++ ) 10bd73: 42 inc %edx 10bd74: 83 c0 18 add $0x18,%eax 10bd77: 39 55 e4 cmp %edx,-0x1c(%ebp) 10bd7a: 77 e8 ja 10bd64 <_IO_Manager_initialization+0x60> _IO_Driver_address_table[index] = driver_table[index]; } 10bd7c: 8d 65 f4 lea -0xc(%ebp),%esp 10bd7f: 5b pop %ebx 10bd80: 5e pop %esi 10bd81: 5f pop %edi 10bd82: c9 leave 10bd83: 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; 10bd84: 89 1d 64 68 12 00 mov %ebx,0x126864 _IO_Number_of_drivers = number_of_drivers; 10bd8a: 8b 45 e4 mov -0x1c(%ebp),%eax 10bd8d: a3 60 68 12 00 mov %eax,0x126860 sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; } 10bd92: 8d 65 f4 lea -0xc(%ebp),%esp 10bd95: 5b pop %ebx 10bd96: 5e pop %esi 10bd97: 5f pop %edi 10bd98: c9 leave 10bd99: c3 ret =============================================================================== 0010c820 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10c820: 55 push %ebp 10c821: 89 e5 mov %esp,%ebp 10c823: 53 push %ebx 10c824: 83 ec 08 sub $0x8,%esp 10c827: 8b 45 08 mov 0x8(%ebp),%eax 10c82a: 8b 55 0c mov 0xc(%ebp),%edx 10c82d: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10c830: a3 74 65 12 00 mov %eax,0x126574 _Internal_errors_What_happened.is_internal = is_internal; 10c835: 88 15 78 65 12 00 mov %dl,0x126578 _Internal_errors_What_happened.the_error = the_error; 10c83b: 89 1d 7c 65 12 00 mov %ebx,0x12657c _User_extensions_Fatal( the_source, is_internal, the_error ); 10c841: 53 push %ebx 10c842: 0f b6 d2 movzbl %dl,%edx 10c845: 52 push %edx 10c846: 50 push %eax 10c847: e8 20 1c 00 00 call 10e46c <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10c84c: c7 05 60 66 12 00 05 movl $0x5,0x126660 <== NOT EXECUTED 10c853: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10c856: fa cli <== NOT EXECUTED 10c857: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10c859: f4 hlt <== NOT EXECUTED 10c85a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10c85d: eb fe jmp 10c85d <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 00110a5c <_Objects_API_maximum_class>: #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 110a5c: 55 push %ebp 110a5d: 89 e5 mov %esp,%ebp 110a5f: 8b 45 08 mov 0x8(%ebp),%eax 110a62: 48 dec %eax 110a63: 83 f8 02 cmp $0x2,%eax 110a66: 77 0c ja 110a74 <_Objects_API_maximum_class+0x18> 110a68: 8b 04 85 f0 09 12 00 mov 0x1209f0(,%eax,4),%eax case OBJECTS_NO_API: default: break; } return 0; } 110a6f: c9 leave 110a70: c3 ret 110a71: 8d 76 00 lea 0x0(%esi),%esi #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 110a74: 31 c0 xor %eax,%eax case OBJECTS_NO_API: default: break; } return 0; } 110a76: c9 leave 110a77: c3 ret =============================================================================== 0010c8b0 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10c8b0: 55 push %ebp 10c8b1: 89 e5 mov %esp,%ebp 10c8b3: 56 push %esi 10c8b4: 53 push %ebx 10c8b5: 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 ) 10c8b8: 8b 43 18 mov 0x18(%ebx),%eax 10c8bb: 85 c0 test %eax,%eax 10c8bd: 75 0d jne 10c8cc <_Objects_Allocate+0x1c><== ALWAYS TAKEN return NULL; 10c8bf: 31 c9 xor %ecx,%ecx <== NOT EXECUTED ); } #endif return the_object; } 10c8c1: 89 c8 mov %ecx,%eax 10c8c3: 8d 65 f8 lea -0x8(%ebp),%esp 10c8c6: 5b pop %ebx 10c8c7: 5e pop %esi 10c8c8: c9 leave 10c8c9: c3 ret 10c8ca: 66 90 xchg %ax,%ax /* * 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 ); 10c8cc: 8d 73 20 lea 0x20(%ebx),%esi 10c8cf: 83 ec 0c sub $0xc,%esp 10c8d2: 56 push %esi 10c8d3: e8 f0 f6 ff ff call 10bfc8 <_Chain_Get> 10c8d8: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10c8da: 83 c4 10 add $0x10,%esp 10c8dd: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10c8e1: 74 de je 10c8c1 <_Objects_Allocate+0x11> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10c8e3: 85 c0 test %eax,%eax 10c8e5: 74 29 je 10c910 <_Objects_Allocate+0x60> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10c8e7: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10c8eb: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10c8ef: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 10c8f1: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10c8f5: 31 d2 xor %edx,%edx 10c8f7: f7 f6 div %esi information->inactive_per_block[ block ]--; 10c8f9: c1 e0 02 shl $0x2,%eax 10c8fc: 03 43 30 add 0x30(%ebx),%eax 10c8ff: ff 08 decl (%eax) information->inactive--; 10c901: 66 ff 4b 2c decw 0x2c(%ebx) ); } #endif return the_object; } 10c905: 89 c8 mov %ecx,%eax 10c907: 8d 65 f8 lea -0x8(%ebp),%esp 10c90a: 5b pop %ebx 10c90b: 5e pop %esi 10c90c: c9 leave 10c90d: c3 ret 10c90e: 66 90 xchg %ax,%ax * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 10c910: 83 ec 0c sub $0xc,%esp 10c913: 53 push %ebx 10c914: e8 3b 00 00 00 call 10c954 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10c919: 89 34 24 mov %esi,(%esp) 10c91c: e8 a7 f6 ff ff call 10bfc8 <_Chain_Get> 10c921: 89 c1 mov %eax,%ecx } if ( the_object ) { 10c923: 83 c4 10 add $0x10,%esp 10c926: 85 c0 test %eax,%eax 10c928: 74 97 je 10c8c1 <_Objects_Allocate+0x11> 10c92a: eb bb jmp 10c8e7 <_Objects_Allocate+0x37> =============================================================================== 0010c954 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10c954: 55 push %ebp 10c955: 89 e5 mov %esp,%ebp 10c957: 57 push %edi 10c958: 56 push %esi 10c959: 53 push %ebx 10c95a: 83 ec 4c sub $0x4c,%esp 10c95d: 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 ); 10c960: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10c964: 89 45 cc mov %eax,-0x34(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10c967: 8b 4b 34 mov 0x34(%ebx),%ecx 10c96a: 85 c9 test %ecx,%ecx 10c96c: 0f 84 62 02 00 00 je 10cbd4 <_Objects_Extend_information+0x280> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10c972: 8b 73 10 mov 0x10(%ebx),%esi 10c975: 66 89 75 d0 mov %si,-0x30(%ebp) 10c979: 8b 7b 14 mov 0x14(%ebx),%edi 10c97c: 89 f0 mov %esi,%eax 10c97e: 31 d2 xor %edx,%edx 10c980: 66 f7 f7 div %di 10c983: 0f b7 f0 movzwl %ax,%esi for ( ; block < block_count; block++ ) { 10c986: 85 f6 test %esi,%esi 10c988: 0f 84 5f 02 00 00 je 10cbed <_Objects_Extend_information+0x299><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) { 10c98e: 8b 01 mov (%ecx),%eax 10c990: 85 c0 test %eax,%eax 10c992: 0f 84 67 02 00 00 je 10cbff <_Objects_Extend_information+0x2ab><== NEVER TAKEN 10c998: 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 ); 10c99b: 8b 55 cc mov -0x34(%ebp),%edx 10c99e: 89 55 d4 mov %edx,-0x2c(%ebp) index_base = minimum_index; block = 0; 10c9a1: 31 d2 xor %edx,%edx 10c9a3: 8b 45 d4 mov -0x2c(%ebp),%eax 10c9a6: eb 0a jmp 10c9b2 <_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 ) { 10c9a8: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4) 10c9ac: 0f 84 c2 01 00 00 je 10cb74 <_Objects_Extend_information+0x220> do_extend = false; break; } else index_base += information->allocation_size; 10c9b2: 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++ ) { 10c9b4: 42 inc %edx 10c9b5: 39 d6 cmp %edx,%esi 10c9b7: 77 ef ja 10c9a8 <_Objects_Extend_information+0x54> 10c9b9: 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; 10c9bc: b1 01 mov $0x1,%cl } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10c9be: 0f b7 45 d0 movzwl -0x30(%ebp),%eax 10c9c2: 01 f8 add %edi,%eax 10c9c4: 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 ) { 10c9c7: 3d ff ff 00 00 cmp $0xffff,%eax 10c9cc: 0f 87 9a 01 00 00 ja 10cb6c <_Objects_Extend_information+0x218> /* * 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; 10c9d2: 0f af 7b 18 imul 0x18(%ebx),%edi if ( information->auto_extend ) { 10c9d6: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10c9da: 0f 84 a0 01 00 00 je 10cb80 <_Objects_Extend_information+0x22c> new_object_block = _Workspace_Allocate( block_size ); 10c9e0: 83 ec 0c sub $0xc,%esp 10c9e3: 57 push %edi 10c9e4: 89 55 b8 mov %edx,-0x48(%ebp) 10c9e7: 88 4d b4 mov %cl,-0x4c(%ebp) 10c9ea: e8 49 1e 00 00 call 10e838 <_Workspace_Allocate> 10c9ef: 89 45 c8 mov %eax,-0x38(%ebp) if ( !new_object_block ) 10c9f2: 83 c4 10 add $0x10,%esp 10c9f5: 85 c0 test %eax,%eax 10c9f7: 8b 55 b8 mov -0x48(%ebp),%edx 10c9fa: 8a 4d b4 mov -0x4c(%ebp),%cl 10c9fd: 0f 84 69 01 00 00 je 10cb6c <_Objects_Extend_information+0x218> } /* * Do we need to grow the tables? */ if ( do_extend ) { 10ca03: 84 c9 test %cl,%cl 10ca05: 0f 84 e6 00 00 00 je 10caf1 <_Objects_Extend_information+0x19d> */ /* * Up the block count and maximum */ block_count++; 10ca0b: 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 ); 10ca0e: 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 *)) + 10ca11: 8d 04 7f lea (%edi,%edi,2),%eax ((maximum + minimum_index) * sizeof(Objects_Control *)); 10ca14: 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 *)) + 10ca17: 03 45 cc add -0x34(%ebp),%eax block_count++; /* * Allocate the tables and break it up. */ block_size = block_count * 10ca1a: 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 ); 10ca1d: 50 push %eax 10ca1e: 89 55 b8 mov %edx,-0x48(%ebp) 10ca21: e8 12 1e 00 00 call 10e838 <_Workspace_Allocate> 10ca26: 89 45 c4 mov %eax,-0x3c(%ebp) if ( !object_blocks ) { 10ca29: 83 c4 10 add $0x10,%esp 10ca2c: 85 c0 test %eax,%eax 10ca2e: 8b 55 b8 mov -0x48(%ebp),%edx 10ca31: 0f 84 da 01 00 00 je 10cc11 <_Objects_Extend_information+0x2bd> 10ca37: 8b 45 c4 mov -0x3c(%ebp),%eax 10ca3a: 8d 04 b8 lea (%eax,%edi,4),%eax 10ca3d: 89 45 bc mov %eax,-0x44(%ebp) 10ca40: 8b 4d c4 mov -0x3c(%ebp),%ecx 10ca43: 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 ) { 10ca46: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10ca4a: 39 4d cc cmp %ecx,-0x34(%ebp) 10ca4d: 0f 82 4d 01 00 00 jb 10cba0 <_Objects_Extend_information+0x24c> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10ca53: 8b 4d cc mov -0x34(%ebp),%ecx 10ca56: 85 c9 test %ecx,%ecx 10ca58: 74 12 je 10ca6c <_Objects_Extend_information+0x118><== NEVER TAKEN 10ca5a: 31 c9 xor %ecx,%ecx 10ca5c: 8b 7d cc mov -0x34(%ebp),%edi 10ca5f: 90 nop local_table[ index ] = NULL; 10ca60: 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++ ) { 10ca67: 41 inc %ecx 10ca68: 39 cf cmp %ecx,%edi 10ca6a: 77 f4 ja 10ca60 <_Objects_Extend_information+0x10c><== NEVER TAKEN 10ca6c: c1 e6 02 shl $0x2,%esi 10ca6f: 89 75 c0 mov %esi,-0x40(%ebp) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10ca72: 8b 4d c4 mov -0x3c(%ebp),%ecx 10ca75: 8b 75 c0 mov -0x40(%ebp),%esi 10ca78: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1) inactive_per_block[block_count] = 0; 10ca7f: 8b 4d bc mov -0x44(%ebp),%ecx 10ca82: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10ca89: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10ca8d: 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 ; 10ca90: 39 75 d4 cmp %esi,-0x2c(%ebp) 10ca93: 73 0f jae 10caa4 <_Objects_Extend_information+0x150><== NEVER TAKEN 10ca95: 8b 4d d4 mov -0x2c(%ebp),%ecx index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10ca98: 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++ ) { 10ca9f: 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 ; 10caa0: 39 f1 cmp %esi,%ecx 10caa2: 72 f4 jb 10ca98 <_Objects_Extend_information+0x144> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10caa4: 9c pushf 10caa5: fa cli 10caa6: 5f pop %edi old_tables = information->object_blocks; 10caa7: 8b 73 34 mov 0x34(%ebx),%esi information->object_blocks = object_blocks; 10caaa: 8b 4d c4 mov -0x3c(%ebp),%ecx 10caad: 89 4b 34 mov %ecx,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10cab0: 8b 4d bc mov -0x44(%ebp),%ecx 10cab3: 89 4b 30 mov %ecx,0x30(%ebx) information->local_table = local_table; 10cab6: 89 43 1c mov %eax,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10cab9: 8b 45 d0 mov -0x30(%ebp),%eax 10cabc: 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) | 10cac0: 8b 0b mov (%ebx),%ecx 10cac2: c1 e1 18 shl $0x18,%ecx 10cac5: 81 c9 00 00 01 00 or $0x10000,%ecx information->maximum_id = _Objects_Build_id( 10cacb: 0f b7 43 04 movzwl 0x4(%ebx),%eax (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10cacf: c1 e0 1b shl $0x1b,%eax 10cad2: 09 c1 or %eax,%ecx 10cad4: 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) | 10cad8: 09 c1 or %eax,%ecx 10cada: 89 4b 0c mov %ecx,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10cadd: 57 push %edi 10cade: 9d popf _Workspace_Free( old_tables ); 10cadf: 83 ec 0c sub $0xc,%esp 10cae2: 56 push %esi 10cae3: 89 55 b8 mov %edx,-0x48(%ebp) 10cae6: e8 69 1d 00 00 call 10e854 <_Workspace_Free> 10caeb: 83 c4 10 add $0x10,%esp 10caee: 8b 55 b8 mov -0x48(%ebp),%edx } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10caf1: c1 e2 02 shl $0x2,%edx 10caf4: 89 55 d0 mov %edx,-0x30(%ebp) 10caf7: 8b 43 34 mov 0x34(%ebx),%eax 10cafa: 8b 4d c8 mov -0x38(%ebp),%ecx 10cafd: 89 0c 10 mov %ecx,(%eax,%edx,1) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10cb00: ff 73 18 pushl 0x18(%ebx) 10cb03: 0f b7 43 14 movzwl 0x14(%ebx),%eax 10cb07: 50 push %eax 10cb08: 51 push %ecx 10cb09: 8d 7d dc lea -0x24(%ebp),%edi 10cb0c: 57 push %edi 10cb0d: e8 56 3a 00 00 call 110568 <_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 ) { 10cb12: 83 c4 10 add $0x10,%esp 10cb15: 8b 75 d4 mov -0x2c(%ebp),%esi information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10cb18: 8d 43 20 lea 0x20(%ebx),%eax 10cb1b: 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 ) { 10cb1e: eb 29 jmp 10cb49 <_Objects_Extend_information+0x1f5> 10cb20: 8b 13 mov (%ebx),%edx 10cb22: c1 e2 18 shl $0x18,%edx 10cb25: 81 ca 00 00 01 00 or $0x10000,%edx the_object->id = _Objects_Build_id( 10cb2b: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10cb2f: c1 e1 1b shl $0x1b,%ecx 10cb32: 09 ca or %ecx,%edx uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10cb34: 09 f2 or %esi,%edx 10cb36: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10cb39: 83 ec 08 sub $0x8,%esp 10cb3c: 50 push %eax 10cb3d: ff 75 d4 pushl -0x2c(%ebp) 10cb40: e8 47 f4 ff ff call 10bf8c <_Chain_Append> index++; 10cb45: 46 inc %esi 10cb46: 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 ) { 10cb49: 83 ec 0c sub $0xc,%esp 10cb4c: 57 push %edi 10cb4d: e8 76 f4 ff ff call 10bfc8 <_Chain_Get> 10cb52: 83 c4 10 add $0x10,%esp 10cb55: 85 c0 test %eax,%eax 10cb57: 75 c7 jne 10cb20 <_Objects_Extend_information+0x1cc> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10cb59: 8b 43 14 mov 0x14(%ebx),%eax 10cb5c: 8b 53 30 mov 0x30(%ebx),%edx 10cb5f: 0f b7 c8 movzwl %ax,%ecx 10cb62: 8b 75 d0 mov -0x30(%ebp),%esi 10cb65: 89 0c 32 mov %ecx,(%edx,%esi,1) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 10cb68: 66 01 43 2c add %ax,0x2c(%ebx) } 10cb6c: 8d 65 f4 lea -0xc(%ebp),%esp 10cb6f: 5b pop %ebx 10cb70: 5e pop %esi 10cb71: 5f pop %edi 10cb72: c9 leave 10cb73: c3 ret 10cb74: 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; 10cb77: 31 c9 xor %ecx,%ecx 10cb79: e9 40 fe ff ff jmp 10c9be <_Objects_Extend_information+0x6a> 10cb7e: 66 90 xchg %ax,%ax 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 ); 10cb80: 83 ec 0c sub $0xc,%esp 10cb83: 57 push %edi 10cb84: 89 55 b8 mov %edx,-0x48(%ebp) 10cb87: 88 4d b4 mov %cl,-0x4c(%ebp) 10cb8a: e8 dd 1c 00 00 call 10e86c <_Workspace_Allocate_or_fatal_error> 10cb8f: 89 45 c8 mov %eax,-0x38(%ebp) 10cb92: 83 c4 10 add $0x10,%esp 10cb95: 8a 4d b4 mov -0x4c(%ebp),%cl 10cb98: 8b 55 b8 mov -0x48(%ebp),%edx 10cb9b: e9 63 fe ff ff jmp 10ca03 <_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, 10cba0: c1 e6 02 shl $0x2,%esi 10cba3: 89 75 c0 mov %esi,-0x40(%ebp) 10cba6: 8b 73 34 mov 0x34(%ebx),%esi 10cba9: 8b 7d c4 mov -0x3c(%ebp),%edi 10cbac: 8b 4d c0 mov -0x40(%ebp),%ecx 10cbaf: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10cbb1: 8b 73 30 mov 0x30(%ebx),%esi 10cbb4: 8b 7d bc mov -0x44(%ebp),%edi 10cbb7: 8b 4d c0 mov -0x40(%ebp),%ecx 10cbba: 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 *) ); 10cbbc: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10cbc0: 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, 10cbc3: c1 e1 02 shl $0x2,%ecx 10cbc6: 8b 73 1c mov 0x1c(%ebx),%esi 10cbc9: 89 c7 mov %eax,%edi 10cbcb: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10cbcd: e9 a0 fe ff ff jmp 10ca72 <_Objects_Extend_information+0x11e> 10cbd2: 66 90 xchg %ax,%ax minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10cbd4: 8b 53 10 mov 0x10(%ebx),%edx 10cbd7: 66 89 55 d0 mov %dx,-0x30(%ebp) 10cbdb: 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 ); 10cbdf: 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; 10cbe2: b1 01 mov $0x1,%cl minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10cbe4: 31 d2 xor %edx,%edx /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; 10cbe6: 31 f6 xor %esi,%esi 10cbe8: e9 d1 fd ff ff jmp 10c9be <_Objects_Extend_information+0x6a> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10cbed: 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 ); 10cbf0: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 10cbf3: 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; 10cbf6: b1 01 mov $0x1,%cl <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10cbf8: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cbfa: e9 bf fd ff ff jmp 10c9be <_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 ) { 10cbff: 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 ); 10cc02: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 10cc05: 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; 10cc08: 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; 10cc0a: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cc0c: e9 ad fd ff ff jmp 10c9be <_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 ); 10cc11: 83 ec 0c sub $0xc,%esp 10cc14: ff 75 c8 pushl -0x38(%ebp) 10cc17: e8 38 1c 00 00 call 10e854 <_Workspace_Free> return; 10cc1c: 83 c4 10 add $0x10,%esp 10cc1f: e9 48 ff ff ff jmp 10cb6c <_Objects_Extend_information+0x218> =============================================================================== 0010ccb4 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 10ccb4: 55 push %ebp 10ccb5: 89 e5 mov %esp,%ebp 10ccb7: 56 push %esi 10ccb8: 53 push %ebx 10ccb9: 8b 75 08 mov 0x8(%ebp),%esi 10ccbc: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10ccbf: 66 85 db test %bx,%bx 10ccc2: 75 0c jne 10ccd0 <_Objects_Get_information+0x1c> 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; 10ccc4: 31 c0 xor %eax,%eax if ( info->maximum == 0 ) return NULL; #endif return info; } 10ccc6: 8d 65 f8 lea -0x8(%ebp),%esp 10ccc9: 5b pop %ebx 10ccca: 5e pop %esi 10cccb: c9 leave 10cccc: c3 ret 10cccd: 8d 76 00 lea 0x0(%esi),%esi /* * 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 ); 10ccd0: 83 ec 0c sub $0xc,%esp 10ccd3: 56 push %esi 10ccd4: e8 83 3d 00 00 call 110a5c <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10ccd9: 83 c4 10 add $0x10,%esp 10ccdc: 85 c0 test %eax,%eax 10ccde: 74 e4 je 10ccc4 <_Objects_Get_information+0x10> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10cce0: 0f b7 db movzwl %bx,%ebx 10cce3: 39 d8 cmp %ebx,%eax 10cce5: 72 dd jb 10ccc4 <_Objects_Get_information+0x10> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10cce7: 8b 14 b5 a8 64 12 00 mov 0x1264a8(,%esi,4),%edx return NULL; 10ccee: 31 c0 xor %eax,%eax return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 10ccf0: 85 d2 test %edx,%edx 10ccf2: 74 d2 je 10ccc6 <_Objects_Get_information+0x12><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10ccf4: 8b 04 9a mov (%edx,%ebx,4),%eax if ( !info ) 10ccf7: 85 c0 test %eax,%eax 10ccf9: 74 cb je 10ccc6 <_Objects_Get_information+0x12><== 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; 10ccfb: 31 d2 xor %edx,%edx 10ccfd: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10cd02: 0f 95 c2 setne %dl 10cd05: f7 da neg %edx 10cd07: 21 d0 and %edx,%eax 10cd09: eb bb jmp 10ccc6 <_Objects_Get_information+0x12> =============================================================================== 0010cd0c <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10cd0c: 55 push %ebp 10cd0d: 89 e5 mov %esp,%ebp 10cd0f: 56 push %esi 10cd10: 53 push %ebx 10cd11: 8b 55 08 mov 0x8(%ebp),%edx 10cd14: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 10cd17: b8 01 00 00 00 mov $0x1,%eax 10cd1c: 2b 42 08 sub 0x8(%edx),%eax 10cd1f: 03 45 0c add 0xc(%ebp),%eax _ISR_Disable( level ); 10cd22: 9c pushf 10cd23: fa cli 10cd24: 5e pop %esi if ( information->maximum >= index ) { 10cd25: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10cd29: 39 c8 cmp %ecx,%eax 10cd2b: 77 1b ja 10cd48 <_Objects_Get_isr_disable+0x3c> if ( (the_object = information->local_table[ index ]) != NULL ) { 10cd2d: 8b 52 1c mov 0x1c(%edx),%edx 10cd30: 8b 04 82 mov (%edx,%eax,4),%eax 10cd33: 85 c0 test %eax,%eax 10cd35: 74 21 je 10cd58 <_Objects_Get_isr_disable+0x4c> *location = OBJECTS_LOCAL; 10cd37: c7 03 00 00 00 00 movl $0x0,(%ebx) *level_p = level; 10cd3d: 8b 55 14 mov 0x14(%ebp),%edx 10cd40: 89 32 mov %esi,(%edx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cd42: 5b pop %ebx 10cd43: 5e pop %esi 10cd44: c9 leave 10cd45: c3 ret 10cd46: 66 90 xchg %ax,%ax } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 10cd48: 56 push %esi 10cd49: 9d popf *location = OBJECTS_ERROR; 10cd4a: 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; 10cd50: 31 c0 xor %eax,%eax #endif } 10cd52: 5b pop %ebx 10cd53: 5e pop %esi 10cd54: c9 leave 10cd55: c3 ret 10cd56: 66 90 xchg %ax,%ax if ( (the_object = information->local_table[ index ]) != NULL ) { *location = OBJECTS_LOCAL; *level_p = level; return the_object; } _ISR_Enable( level ); 10cd58: 56 push %esi 10cd59: 9d popf *location = OBJECTS_ERROR; 10cd5a: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10cd60: eb e0 jmp 10cd42 <_Objects_Get_isr_disable+0x36> =============================================================================== 0010e408 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 10e408: 55 push %ebp 10e409: 89 e5 mov %esp,%ebp 10e40b: 57 push %edi 10e40c: 56 push %esi 10e40d: 53 push %ebx 10e40e: 83 ec 3c sub $0x3c,%esp 10e411: 8b 7d 08 mov 0x8(%ebp),%edi 10e414: 8b 75 0c mov 0xc(%ebp),%esi 10e417: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 10e41a: 85 f6 test %esi,%esi 10e41c: 75 0e jne 10e42c <_Objects_Get_name_as_string+0x24> #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; 10e41e: 31 db xor %ebx,%ebx _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } 10e420: 89 d8 mov %ebx,%eax 10e422: 8d 65 f4 lea -0xc(%ebp),%esp 10e425: 5b pop %ebx 10e426: 5e pop %esi 10e427: 5f pop %edi 10e428: c9 leave 10e429: c3 ret 10e42a: 66 90 xchg %ax,%ax Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 10e42c: 85 db test %ebx,%ebx 10e42e: 74 f0 je 10e420 <_Objects_Get_name_as_string+0x18> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10e430: 85 ff test %edi,%edi 10e432: 75 08 jne 10e43c <_Objects_Get_name_as_string+0x34> 10e434: a1 38 9c 12 00 mov 0x129c38,%eax 10e439: 8b 78 08 mov 0x8(%eax),%edi information = _Objects_Get_information_id( tmpId ); 10e43c: 83 ec 0c sub $0xc,%esp 10e43f: 57 push %edi 10e440: e8 f3 fe ff ff call 10e338 <_Objects_Get_information_id> if ( !information ) 10e445: 83 c4 10 add $0x10,%esp 10e448: 85 c0 test %eax,%eax 10e44a: 74 d2 je 10e41e <_Objects_Get_name_as_string+0x16> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 10e44c: 51 push %ecx 10e44d: 8d 55 e4 lea -0x1c(%ebp),%edx 10e450: 52 push %edx 10e451: 57 push %edi 10e452: 50 push %eax 10e453: e8 80 00 00 00 call 10e4d8 <_Objects_Get> switch ( location ) { 10e458: 83 c4 10 add $0x10,%esp 10e45b: 8b 55 e4 mov -0x1c(%ebp),%edx 10e45e: 85 d2 test %edx,%edx 10e460: 75 bc jne 10e41e <_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; 10e462: 8b 40 0c mov 0xc(%eax),%eax lname[ 0 ] = (u32_name >> 24) & 0xff; 10e465: 89 c2 mov %eax,%edx 10e467: c1 ea 18 shr $0x18,%edx 10e46a: 88 55 c7 mov %dl,-0x39(%ebp) 10e46d: 88 55 df mov %dl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 10e470: 89 c7 mov %eax,%edi 10e472: c1 ef 10 shr $0x10,%edi 10e475: 89 f9 mov %edi,%ecx 10e477: 88 4d e0 mov %cl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 10e47a: 89 c7 mov %eax,%edi 10e47c: c1 ef 08 shr $0x8,%edi 10e47f: 89 f9 mov %edi,%ecx 10e481: 88 4d e1 mov %cl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 10e484: 88 45 e2 mov %al,-0x1e(%ebp) lname[ 4 ] = '\0'; 10e487: c6 45 e3 00 movb $0x0,-0x1d(%ebp) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e48b: 4e dec %esi 10e48c: 89 75 d4 mov %esi,-0x2c(%ebp) 10e48f: 74 41 je 10e4d2 <_Objects_Get_name_as_string+0xca><== NEVER TAKEN 10e491: 84 d2 test %dl,%dl 10e493: 74 3d je 10e4d2 <_Objects_Get_name_as_string+0xca> 10e495: 89 d9 mov %ebx,%ecx 10e497: 31 c0 xor %eax,%eax 10e499: eb 09 jmp 10e4a4 <_Objects_Get_name_as_string+0x9c> 10e49b: 90 nop 10e49c: 8a 54 05 df mov -0x21(%ebp,%eax,1),%dl 10e4a0: 84 d2 test %dl,%dl 10e4a2: 74 21 je 10e4c5 <_Objects_Get_name_as_string+0xbd> *d = (isprint((unsigned char)*s)) ? *s : '*'; 10e4a4: 0f b6 f2 movzbl %dl,%esi 10e4a7: 8b 3d 88 72 12 00 mov 0x127288,%edi 10e4ad: 0f be 74 37 01 movsbl 0x1(%edi,%esi,1),%esi 10e4b2: 81 e6 97 00 00 00 and $0x97,%esi 10e4b8: 75 02 jne 10e4bc <_Objects_Get_name_as_string+0xb4> 10e4ba: b2 2a mov $0x2a,%dl 10e4bc: 88 11 mov %dl,(%ecx) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e4be: 40 inc %eax 10e4bf: 41 inc %ecx 10e4c0: 3b 45 d4 cmp -0x2c(%ebp),%eax 10e4c3: 72 d7 jb 10e49c <_Objects_Get_name_as_string+0x94> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 10e4c5: c6 01 00 movb $0x0,(%ecx) _Thread_Enable_dispatch(); 10e4c8: e8 6b 0b 00 00 call 10f038 <_Thread_Enable_dispatch> return name; 10e4cd: e9 4e ff ff ff jmp 10e420 <_Objects_Get_name_as_string+0x18> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e4d2: 89 d9 mov %ebx,%ecx 10e4d4: eb ef jmp 10e4c5 <_Objects_Get_name_as_string+0xbd> =============================================================================== 0010cebc <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 10cebc: 55 push %ebp 10cebd: 89 e5 mov %esp,%ebp 10cebf: 57 push %edi 10cec0: 56 push %esi 10cec1: 53 push %ebx 10cec2: 83 ec 0c sub $0xc,%esp 10cec5: 8b 5d 08 mov 0x8(%ebp),%ebx 10cec8: 8b 75 0c mov 0xc(%ebp),%esi 10cecb: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Control *object; Objects_Id next_id; if ( !information ) 10cece: 85 db test %ebx,%ebx 10ced0: 75 0a jne 10cedc <_Objects_Get_next+0x20> if ( !location_p ) return NULL; if ( !next_id_p ) return NULL; 10ced2: 31 c0 xor %eax,%eax return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 10ced4: 8d 65 f4 lea -0xc(%ebp),%esp 10ced7: 5b pop %ebx 10ced8: 5e pop %esi 10ced9: 5f pop %edi 10ceda: c9 leave 10cedb: c3 ret Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 10cedc: 85 ff test %edi,%edi 10cede: 74 f2 je 10ced2 <_Objects_Get_next+0x16> return NULL; if ( !next_id_p ) 10cee0: 8b 45 14 mov 0x14(%ebp),%eax 10cee3: 85 c0 test %eax,%eax 10cee5: 74 eb je 10ced2 <_Objects_Get_next+0x16> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 10cee7: 66 85 f6 test %si,%si 10ceea: 75 04 jne 10cef0 <_Objects_Get_next+0x34> next_id = information->minimum_id; 10ceec: 8b 73 08 mov 0x8(%ebx),%esi 10ceef: 90 nop else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 10cef0: 66 39 73 10 cmp %si,0x10(%ebx) 10cef4: 72 22 jb 10cf18 <_Objects_Get_next+0x5c> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 10cef6: 51 push %ecx 10cef7: 57 push %edi 10cef8: 56 push %esi 10cef9: 53 push %ebx 10cefa: e8 2d 00 00 00 call 10cf2c <_Objects_Get> next_id++; 10ceff: 46 inc %esi } while (*location_p != OBJECTS_LOCAL); 10cf00: 83 c4 10 add $0x10,%esp 10cf03: 8b 17 mov (%edi),%edx 10cf05: 85 d2 test %edx,%edx 10cf07: 75 e7 jne 10cef0 <_Objects_Get_next+0x34> *next_id_p = next_id; 10cf09: 8b 55 14 mov 0x14(%ebp),%edx 10cf0c: 89 32 mov %esi,(%edx) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 10cf0e: 8d 65 f4 lea -0xc(%ebp),%esp 10cf11: 5b pop %ebx 10cf12: 5e pop %esi 10cf13: 5f pop %edi 10cf14: c9 leave 10cf15: c3 ret 10cf16: 66 90 xchg %ax,%ax do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 10cf18: c7 07 01 00 00 00 movl $0x1,(%edi) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 10cf1e: 8b 45 14 mov 0x14(%ebp),%eax 10cf21: c7 00 ff ff ff ff movl $0xffffffff,(%eax) return 0; 10cf27: 31 c0 xor %eax,%eax 10cf29: eb a9 jmp 10ced4 <_Objects_Get_next+0x18> =============================================================================== 0011b168 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 11b168: 55 push %ebp 11b169: 89 e5 mov %esp,%ebp 11b16b: 53 push %ebx 11b16c: 8b 55 08 mov 0x8(%ebp),%edx 11b16f: 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; 11b172: b8 01 00 00 00 mov $0x1,%eax 11b177: 2b 42 08 sub 0x8(%edx),%eax 11b17a: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 11b17d: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 11b181: 39 c8 cmp %ecx,%eax 11b183: 77 13 ja 11b198 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 11b185: 8b 52 1c mov 0x1c(%edx),%edx 11b188: 8b 04 82 mov (%edx,%eax,4),%eax 11b18b: 85 c0 test %eax,%eax 11b18d: 74 09 je 11b198 <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 11b18f: 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; } 11b195: 5b pop %ebx 11b196: c9 leave 11b197: 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; 11b198: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 11b19e: 31 c0 xor %eax,%eax } 11b1a0: 5b pop %ebx 11b1a1: c9 leave 11b1a2: c3 ret =============================================================================== 0010e010 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10e010: 55 push %ebp 10e011: 89 e5 mov %esp,%ebp 10e013: 83 ec 18 sub $0x18,%esp 10e016: 8b 55 08 mov 0x8(%ebp),%edx /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10e019: 85 d2 test %edx,%edx 10e01b: 75 08 jne 10e025 <_Objects_Id_to_name+0x15> 10e01d: a1 d8 87 12 00 mov 0x1287d8,%eax 10e022: 8b 50 08 mov 0x8(%eax),%edx 10e025: 89 d0 mov %edx,%eax 10e027: c1 e8 18 shr $0x18,%eax 10e02a: 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 ) 10e02d: 8d 48 ff lea -0x1(%eax),%ecx 10e030: 83 f9 02 cmp $0x2,%ecx 10e033: 77 3b ja 10e070 <_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 ] ) 10e035: 8b 04 85 28 85 12 00 mov 0x128528(,%eax,4),%eax 10e03c: 85 c0 test %eax,%eax 10e03e: 74 30 je 10e070 <_Objects_Id_to_name+0x60> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10e040: 89 d1 mov %edx,%ecx 10e042: c1 e9 1b shr $0x1b,%ecx return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10e045: 8b 04 88 mov (%eax,%ecx,4),%eax if ( !information ) 10e048: 85 c0 test %eax,%eax 10e04a: 74 24 je 10e070 <_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 ); 10e04c: 51 push %ecx 10e04d: 8d 4d f4 lea -0xc(%ebp),%ecx 10e050: 51 push %ecx 10e051: 52 push %edx 10e052: 50 push %eax 10e053: e8 50 ff ff ff call 10dfa8 <_Objects_Get> if ( !the_object ) 10e058: 83 c4 10 add $0x10,%esp 10e05b: 85 c0 test %eax,%eax 10e05d: 74 11 je 10e070 <_Objects_Id_to_name+0x60> return OBJECTS_INVALID_ID; *name = the_object->name; 10e05f: 8b 50 0c mov 0xc(%eax),%edx 10e062: 8b 45 0c mov 0xc(%ebp),%eax 10e065: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10e067: e8 04 0b 00 00 call 10eb70 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10e06c: 31 c0 xor %eax,%eax } 10e06e: c9 leave 10e06f: 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; 10e070: 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; } 10e075: c9 leave 10e076: c3 ret =============================================================================== 0010cdcc <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10cdcc: 55 push %ebp 10cdcd: 89 e5 mov %esp,%ebp 10cdcf: 57 push %edi 10cdd0: 56 push %esi 10cdd1: 53 push %ebx 10cdd2: 83 ec 0c sub $0xc,%esp 10cdd5: 8b 45 08 mov 0x8(%ebp),%eax 10cdd8: 8b 55 0c mov 0xc(%ebp),%edx 10cddb: 8b 5d 10 mov 0x10(%ebp),%ebx 10cdde: 8b 75 20 mov 0x20(%ebp),%esi 10cde1: 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; 10cde5: 89 10 mov %edx,(%eax) information->the_class = the_class; 10cde7: 66 89 58 04 mov %bx,0x4(%eax) information->size = size; 10cdeb: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10cdee: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10cdf5: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10cdfc: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10ce03: 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; 10ce09: 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; 10ce0f: 0f b7 db movzwl %bx,%ebx 10ce12: 8b 3c 95 a8 64 12 00 mov 0x1264a8(,%edx,4),%edi 10ce19: 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; 10ce1c: 8b 7d 14 mov 0x14(%ebp),%edi 10ce1f: 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 = 10ce22: 89 f9 mov %edi,%ecx 10ce24: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10ce27: 8b 4d 14 mov 0x14(%ebp),%ecx 10ce2a: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10ce30: 85 ff test %edi,%edi 10ce32: 74 04 je 10ce38 <_Objects_Initialize_information+0x6c> 10ce34: 85 c9 test %ecx,%ecx 10ce36: 74 67 je 10ce9f <_Objects_Initialize_information+0xd3> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10ce38: 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; 10ce3c: c7 40 1c 44 61 12 00 movl $0x126144,0x1c(%eax) uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10ce43: c1 e2 18 shl $0x18,%edx 10ce46: 81 ca 00 00 01 00 or $0x10000,%edx (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10ce4c: c1 e3 1b shl $0x1b,%ebx 10ce4f: 09 da or %ebx,%edx /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; 10ce51: 31 db xor %ebx,%ebx 10ce53: 85 c9 test %ecx,%ecx 10ce55: 0f 95 c3 setne %bl uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10ce58: 09 da or %ebx,%edx 10ce5a: 89 50 08 mov %edx,0x8(%eax) * lengths that may be an odd number of bytes. */ name_length = maximum_name_length; #if !defined(RTEMS_POSIX_API) if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10ce5d: f7 c6 03 00 00 00 test $0x3,%esi 10ce63: 75 23 jne 10ce88 <_Objects_Initialize_information+0xbc><== NEVER TAKEN name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); #endif information->name_length = name_length; 10ce65: 66 89 70 38 mov %si,0x38(%eax) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 10ce69: 8d 50 24 lea 0x24(%eax),%edx 10ce6c: 89 50 20 mov %edx,0x20(%eax) head->next = tail; head->previous = NULL; 10ce6f: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 10ce76: 8d 50 20 lea 0x20(%eax),%edx 10ce79: 89 50 28 mov %edx,0x28(%eax) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10ce7c: 85 c9 test %ecx,%ecx 10ce7e: 75 10 jne 10ce90 <_Objects_Initialize_information+0xc4> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10ce80: 8d 65 f4 lea -0xc(%ebp),%esp 10ce83: 5b pop %ebx 10ce84: 5e pop %esi 10ce85: 5f pop %edi 10ce86: c9 leave 10ce87: c3 ret */ name_length = maximum_name_length; #if !defined(RTEMS_POSIX_API) if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 10ce88: 83 c6 04 add $0x4,%esi <== NOT EXECUTED 10ce8b: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED 10ce8e: eb d5 jmp 10ce65 <_Objects_Initialize_information+0x99><== 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 ); 10ce90: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10ce93: 8d 65 f4 lea -0xc(%ebp),%esp 10ce96: 5b pop %ebx 10ce97: 5e pop %esi 10ce98: 5f pop %edi 10ce99: 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 ); 10ce9a: e9 b5 fa ff ff jmp 10c954 <_Objects_Extend_information> /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 10ce9f: 50 push %eax 10cea0: 6a 13 push $0x13 10cea2: 6a 01 push $0x1 10cea4: 6a 00 push $0x0 10cea6: e8 75 f9 ff ff call 10c820 <_Internal_error_Occurred> =============================================================================== 0010cebc <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10cebc: 55 push %ebp 10cebd: 89 e5 mov %esp,%ebp 10cebf: 57 push %edi 10cec0: 56 push %esi 10cec1: 53 push %ebx 10cec2: 8b 45 08 mov 0x8(%ebp),%eax 10cec5: 8b 4d 0c mov 0xc(%ebp),%ecx 10cec8: 8b 55 10 mov 0x10(%ebp),%edx 10cecb: 8b 7d 14 mov 0x14(%ebp),%edi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10cece: 85 ff test %edi,%edi 10ced0: 74 56 je 10cf28 <_Objects_Name_to_id_u32+0x6c> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10ced2: 85 c9 test %ecx,%ecx 10ced4: 74 08 je 10cede <_Objects_Name_to_id_u32+0x22> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10ced6: 8b 70 10 mov 0x10(%eax),%esi 10ced9: 66 85 f6 test %si,%si 10cedc: 75 0a jne 10cee8 <_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; 10cede: b8 01 00 00 00 mov $0x1,%eax #endif } 10cee3: 5b pop %ebx 10cee4: 5e pop %esi 10cee5: 5f pop %edi 10cee6: c9 leave 10cee7: c3 ret if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10cee8: 85 d2 test %edx,%edx 10ceea: 75 20 jne 10cf0c <_Objects_Name_to_id_u32+0x50> _Objects_Is_local_node( node ) )) search_local_node = true; if ( search_local_node ) { for ( index = 1; index <= information->maximum; index++ ) { 10ceec: 0f b7 f6 movzwl %si,%esi 10ceef: 8b 58 1c mov 0x1c(%eax),%ebx 10cef2: b8 01 00 00 00 mov $0x1,%eax 10cef7: 90 nop the_object = information->local_table[ index ]; 10cef8: 8b 14 83 mov (%ebx,%eax,4),%edx if ( !the_object ) 10cefb: 85 d2 test %edx,%edx 10cefd: 74 05 je 10cf04 <_Objects_Name_to_id_u32+0x48> continue; if ( name == the_object->name.name_u32 ) { 10ceff: 39 4a 0c cmp %ecx,0xc(%edx) 10cf02: 74 18 je 10cf1c <_Objects_Name_to_id_u32+0x60> _Objects_Is_local_node( node ) )) search_local_node = true; if ( search_local_node ) { for ( index = 1; index <= information->maximum; index++ ) { 10cf04: 40 inc %eax 10cf05: 39 c6 cmp %eax,%esi 10cf07: 73 ef jae 10cef8 <_Objects_Name_to_id_u32+0x3c> 10cf09: eb d3 jmp 10cede <_Objects_Name_to_id_u32+0x22> 10cf0b: 90 nop return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && (node == OBJECTS_SEARCH_ALL_NODES || 10cf0c: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10cf12: 74 d8 je 10ceec <_Objects_Name_to_id_u32+0x30> node == OBJECTS_SEARCH_LOCAL_NODE || 10cf14: 4a dec %edx 10cf15: 75 c7 jne 10cede <_Objects_Name_to_id_u32+0x22> 10cf17: eb d3 jmp 10ceec <_Objects_Name_to_id_u32+0x30> 10cf19: 8d 76 00 lea 0x0(%esi),%esi the_object = information->local_table[ index ]; if ( !the_object ) continue; if ( name == the_object->name.name_u32 ) { *id = the_object->id; 10cf1c: 8b 42 08 mov 0x8(%edx),%eax 10cf1f: 89 07 mov %eax,(%edi) return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10cf21: 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 } 10cf23: 5b pop %ebx 10cf24: 5e pop %esi 10cf25: 5f pop %edi 10cf26: c9 leave 10cf27: c3 ret #endif /* ASSERT: information->is_string == false */ if ( !id ) return OBJECTS_INVALID_ADDRESS; 10cf28: 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 } 10cf2d: 5b pop %ebx 10cf2e: 5e pop %esi 10cf2f: 5f pop %edi 10cf30: c9 leave 10cf31: c3 ret =============================================================================== 0010eda4 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10eda4: 55 push %ebp 10eda5: 89 e5 mov %esp,%ebp 10eda7: 53 push %ebx 10eda8: 83 ec 0c sub $0xc,%esp 10edab: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10edae: 8b 45 08 mov 0x8(%ebp),%eax 10edb1: 0f b7 40 38 movzwl 0x38(%eax),%eax 10edb5: 50 push %eax 10edb6: 53 push %ebx 10edb7: e8 0c 66 00 00 call 1153c8 d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10edbc: 0f be 0b movsbl (%ebx),%ecx 10edbf: c1 e1 18 shl $0x18,%ecx 10edc2: 83 c4 10 add $0x10,%esp 10edc5: 83 f8 01 cmp $0x1,%eax 10edc8: 76 32 jbe 10edfc <_Objects_Set_name+0x58> 10edca: 0f be 53 01 movsbl 0x1(%ebx),%edx 10edce: c1 e2 10 shl $0x10,%edx 10edd1: 09 ca or %ecx,%edx 10edd3: 83 f8 02 cmp $0x2,%eax 10edd6: 74 2c je 10ee04 <_Objects_Set_name+0x60> 10edd8: 0f be 4b 02 movsbl 0x2(%ebx),%ecx 10eddc: c1 e1 08 shl $0x8,%ecx 10eddf: 09 d1 or %edx,%ecx 10ede1: 83 f8 03 cmp $0x3,%eax 10ede4: 74 37 je 10ee1d <_Objects_Set_name+0x79> 10ede6: 0f be 43 03 movsbl 0x3(%ebx),%eax 10edea: 09 c1 or %eax,%ecx 10edec: 8b 55 0c mov 0xc(%ebp),%edx 10edef: 89 4a 0c mov %ecx,0xc(%edx) ); } return true; } 10edf2: b0 01 mov $0x1,%al 10edf4: 8b 5d fc mov -0x4(%ebp),%ebx 10edf7: c9 leave 10edf8: c3 ret 10edf9: 8d 76 00 lea 0x0(%esi),%esi d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10edfc: 89 ca mov %ecx,%edx 10edfe: 81 ca 00 00 20 00 or $0x200000,%edx 10ee04: 89 d1 mov %edx,%ecx 10ee06: 80 cd 20 or $0x20,%ch 10ee09: b8 20 00 00 00 mov $0x20,%eax 10ee0e: 09 c1 or %eax,%ecx 10ee10: 8b 55 0c mov 0xc(%ebp),%edx 10ee13: 89 4a 0c mov %ecx,0xc(%edx) ); } return true; } 10ee16: b0 01 mov $0x1,%al 10ee18: 8b 5d fc mov -0x4(%ebp),%ebx 10ee1b: c9 leave 10ee1c: c3 ret d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10ee1d: b8 20 00 00 00 mov $0x20,%eax 10ee22: eb c6 jmp 10edea <_Objects_Set_name+0x46> =============================================================================== 0010cf34 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 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 1c sub $0x1c,%esp /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 10cf3d: 8b 45 08 mov 0x8(%ebp),%eax 10cf40: 0f b7 58 08 movzwl 0x8(%eax),%ebx block_count = (information->maximum - index_base) / 10cf44: 0f b7 48 14 movzwl 0x14(%eax),%ecx 10cf48: 0f b7 40 10 movzwl 0x10(%eax),%eax 10cf4c: 29 d8 sub %ebx,%eax 10cf4e: 31 d2 xor %edx,%edx 10cf50: f7 f1 div %ecx information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10cf52: 85 c0 test %eax,%eax 10cf54: 74 21 je 10cf77 <_Objects_Shrink_information+0x43><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 10cf56: 8b 55 08 mov 0x8(%ebp),%edx 10cf59: 8b 72 30 mov 0x30(%edx),%esi 10cf5c: 3b 0e cmp (%esi),%ecx 10cf5e: 74 1f je 10cf7f <_Objects_Shrink_information+0x4b><== NEVER TAKEN 10cf60: 31 d2 xor %edx,%edx 10cf62: eb 0e jmp 10cf72 <_Objects_Shrink_information+0x3e> information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 10cf64: 01 cb add %ecx,%ebx 10cf66: 8d 3c 95 00 00 00 00 lea 0x0(,%edx,4),%edi index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 10cf6d: 3b 0c 96 cmp (%esi,%edx,4),%ecx 10cf70: 74 12 je 10cf84 <_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++ ) { 10cf72: 42 inc %edx 10cf73: 39 d0 cmp %edx,%eax 10cf75: 77 ed ja 10cf64 <_Objects_Shrink_information+0x30> return; } index_base += information->allocation_size; } } 10cf77: 8d 65 f4 lea -0xc(%ebp),%esp 10cf7a: 5b pop %ebx 10cf7b: 5e pop %esi 10cf7c: 5f pop %edi 10cf7d: c9 leave 10cf7e: 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 ] == 10cf7f: 31 ff xor %edi,%edi <== NOT EXECUTED 10cf81: 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 *) _Chain_First( &information->Inactive ); 10cf84: 8b 55 08 mov 0x8(%ebp),%edx 10cf87: 8b 42 20 mov 0x20(%edx),%eax 10cf8a: 89 7d e4 mov %edi,-0x1c(%ebp) 10cf8d: eb 07 jmp 10cf96 <_Objects_Shrink_information+0x62> 10cf8f: 90 nop if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 10cf90: 85 f6 test %esi,%esi 10cf92: 74 2c je 10cfc0 <_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; 10cf94: 89 f0 mov %esi,%eax * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); do { index = _Objects_Get_index( the_object->id ); 10cf96: 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; 10cf9a: 8b 30 mov (%eax),%esi if ((index >= index_base) && 10cf9c: 39 da cmp %ebx,%edx 10cf9e: 72 f0 jb 10cf90 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { 10cfa0: 8b 7d 08 mov 0x8(%ebp),%edi 10cfa3: 0f b7 4f 14 movzwl 0x14(%edi),%ecx 10cfa7: 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) && 10cfaa: 39 ca cmp %ecx,%edx 10cfac: 73 e2 jae 10cf90 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 10cfae: 83 ec 0c sub $0xc,%esp 10cfb1: 50 push %eax 10cfb2: e8 f9 ef ff ff call 10bfb0 <_Chain_Extract> 10cfb7: 83 c4 10 add $0x10,%esp } } while ( the_object ); 10cfba: 85 f6 test %esi,%esi 10cfbc: 75 d6 jne 10cf94 <_Objects_Shrink_information+0x60> 10cfbe: 66 90 xchg %ax,%ax 10cfc0: 8b 7d e4 mov -0x1c(%ebp),%edi /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10cfc3: 83 ec 0c sub $0xc,%esp 10cfc6: 8b 55 08 mov 0x8(%ebp),%edx 10cfc9: 8b 42 34 mov 0x34(%edx),%eax 10cfcc: ff 34 38 pushl (%eax,%edi,1) 10cfcf: e8 80 18 00 00 call 10e854 <_Workspace_Free> information->object_blocks[ block ] = NULL; 10cfd4: 8b 55 08 mov 0x8(%ebp),%edx 10cfd7: 8b 42 34 mov 0x34(%edx),%eax 10cfda: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) information->inactive_per_block[ block ] = 0; 10cfe1: 8b 42 30 mov 0x30(%edx),%eax 10cfe4: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) information->inactive -= information->allocation_size; 10cfeb: 8b 42 14 mov 0x14(%edx),%eax 10cfee: 66 29 42 2c sub %ax,0x2c(%edx) return; 10cff2: 83 c4 10 add $0x10,%esp } index_base += information->allocation_size; } } 10cff5: 8d 65 f4 lea -0xc(%ebp),%esp 10cff8: 5b pop %ebx 10cff9: 5e pop %esi 10cffa: 5f pop %edi 10cffb: c9 leave 10cffc: c3 ret =============================================================================== 0010d75c <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 10d75c: 55 push %ebp 10d75d: 89 e5 mov %esp,%ebp 10d75f: 56 push %esi 10d760: 53 push %ebx 10d761: 8b 5d 08 mov 0x8(%ebp),%ebx 10d764: 8b 75 0c mov 0xc(%ebp),%esi if ( !the_heap ) 10d767: 85 db test %ebx,%ebx 10d769: 74 35 je 10d7a0 <_Protected_heap_Get_information+0x44> return false; if ( !the_info ) 10d76b: 85 f6 test %esi,%esi 10d76d: 74 31 je 10d7a0 <_Protected_heap_Get_information+0x44> return false; _RTEMS_Lock_allocator(); 10d76f: 83 ec 0c sub $0xc,%esp 10d772: ff 35 40 66 12 00 pushl 0x126640 10d778: e8 87 ee ff ff call 10c604 <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 10d77d: 5a pop %edx 10d77e: 59 pop %ecx 10d77f: 56 push %esi 10d780: 53 push %ebx 10d781: e8 fe 3c 00 00 call 111484 <_Heap_Get_information> _RTEMS_Unlock_allocator(); 10d786: 58 pop %eax 10d787: ff 35 40 66 12 00 pushl 0x126640 10d78d: e8 ba ee ff ff call 10c64c <_API_Mutex_Unlock> return true; 10d792: 83 c4 10 add $0x10,%esp 10d795: b0 01 mov $0x1,%al } 10d797: 8d 65 f8 lea -0x8(%ebp),%esp 10d79a: 5b pop %ebx 10d79b: 5e pop %esi 10d79c: c9 leave 10d79d: c3 ret 10d79e: 66 90 xchg %ax,%ax { if ( !the_heap ) return false; if ( !the_info ) return false; 10d7a0: 31 c0 xor %eax,%eax _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); return true; } 10d7a2: 8d 65 f8 lea -0x8(%ebp),%esp 10d7a5: 5b pop %ebx 10d7a6: 5e pop %esi 10d7a7: c9 leave 10d7a8: c3 ret =============================================================================== 00110b18 <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 110b18: 55 push %ebp 110b19: 89 e5 mov %esp,%ebp 110b1b: 56 push %esi 110b1c: 53 push %ebx 110b1d: 83 ec 10 sub $0x10,%esp 110b20: 8b 5d 08 mov 0x8(%ebp),%ebx 110b23: 8b 75 0c mov 0xc(%ebp),%esi 110b26: 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 ) { 110b29: 8b 15 10 ce 12 00 mov 0x12ce10,%edx 110b2f: 85 d2 test %edx,%edx 110b31: 74 19 je 110b4c <_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 ); 110b33: 0f b6 c0 movzbl %al,%eax 110b36: 89 45 10 mov %eax,0x10(%ebp) 110b39: 89 75 0c mov %esi,0xc(%ebp) 110b3c: 89 5d 08 mov %ebx,0x8(%ebp) } return status; } 110b3f: 8d 65 f8 lea -0x8(%ebp),%esp 110b42: 5b pop %ebx 110b43: 5e pop %esi 110b44: 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 ); 110b45: e9 4a f2 ff ff jmp 10fd94 <_Heap_Walk> 110b4a: 66 90 xchg %ax,%ax * 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(); 110b4c: 83 ec 0c sub $0xc,%esp 110b4f: ff 35 c0 ce 12 00 pushl 0x12cec0 110b55: 88 45 f4 mov %al,-0xc(%ebp) 110b58: e8 5f e4 ff ff call 10efbc <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 110b5d: 83 c4 0c add $0xc,%esp 110b60: 8a 45 f4 mov -0xc(%ebp),%al 110b63: 0f b6 c0 movzbl %al,%eax 110b66: 50 push %eax 110b67: 56 push %esi 110b68: 53 push %ebx 110b69: e8 26 f2 ff ff call 10fd94 <_Heap_Walk> _RTEMS_Unlock_allocator(); 110b6e: 5a pop %edx 110b6f: ff 35 c0 ce 12 00 pushl 0x12cec0 110b75: 88 45 f4 mov %al,-0xc(%ebp) 110b78: e8 87 e4 ff ff call 10f004 <_API_Mutex_Unlock> 110b7d: 83 c4 10 add $0x10,%esp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 110b80: 8a 45 f4 mov -0xc(%ebp),%al 110b83: 8d 65 f8 lea -0x8(%ebp),%esp 110b86: 5b pop %ebx 110b87: 5e pop %esi 110b88: c9 leave 110b89: c3 ret =============================================================================== 00110378 <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 110378: 55 push %ebp 110379: 89 e5 mov %esp,%ebp 11037b: 53 push %ebx 11037c: 83 ec 10 sub $0x10,%esp 11037f: 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 ); 110382: 80 3d 24 22 12 00 01 cmpb $0x1,0x122224 110389: 19 c0 sbb %eax,%eax 11038b: 83 e0 c0 and $0xffffffc0,%eax 11038e: 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 ); 110391: 50 push %eax 110392: e8 a1 e4 ff ff call 10e838 <_Workspace_Allocate> if ( !api ) 110397: 83 c4 10 add $0x10,%esp 11039a: 85 c0 test %eax,%eax 11039c: 74 6a je 110408 <_RTEMS_tasks_Create_extension+0x90> return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 11039e: 89 83 e4 00 00 00 mov %eax,0xe4(%ebx) api->pending_events = EVENT_SETS_NONE_PENDING; 1103a4: c7 00 00 00 00 00 movl $0x0,(%eax) api->event_condition = 0; 1103aa: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 1103b1: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 1103b5: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 1103bc: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 1103c3: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 1103ca: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 1103d1: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 1103d8: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 1103df: 00 00 00 if ( rtems_configuration_get_notepads_enabled() ) { 1103e2: 80 3d 24 22 12 00 00 cmpb $0x0,0x122224 1103e9: 74 13 je 1103fe <_RTEMS_tasks_Create_extension+0x86> 1103eb: 31 d2 xor %edx,%edx 1103ed: 8d 76 00 lea 0x0(%esi),%esi for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 1103f0: c7 44 90 20 00 00 00 movl $0x0,0x20(%eax,%edx,4) 1103f7: 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++) 1103f8: 42 inc %edx 1103f9: 83 fa 10 cmp $0x10,%edx 1103fc: 75 f2 jne 1103f0 <_RTEMS_tasks_Create_extension+0x78> api->Notepads[i] = 0; } return true; 1103fe: b0 01 mov $0x1,%al } 110400: 8b 5d fc mov -0x4(%ebp),%ebx 110403: c9 leave 110404: c3 ret 110405: 8d 76 00 lea 0x0(%esi),%esi to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); if ( !api ) return false; 110408: 31 c0 xor %eax,%eax for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } 11040a: 8b 5d fc mov -0x4(%ebp),%ebx 11040d: c9 leave 11040e: c3 ret =============================================================================== 00110320 <_RTEMS_tasks_Delete_extension>: void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { 110320: 55 push %ebp 110321: 89 e5 mov %esp,%ebp 110323: 56 push %esi 110324: 53 push %ebx 110325: 8b 75 0c mov 0xc(%ebp),%esi /* * Free per task variable memory */ tvp = deleted->task_variables; 110328: 8b 86 f0 00 00 00 mov 0xf0(%esi),%eax deleted->task_variables = NULL; 11032e: c7 86 f0 00 00 00 00 movl $0x0,0xf0(%esi) 110335: 00 00 00 while (tvp) { 110338: 85 c0 test %eax,%eax 11033a: 75 06 jne 110342 <_RTEMS_tasks_Delete_extension+0x22> 11033c: eb 17 jmp 110355 <_RTEMS_tasks_Delete_extension+0x35> 11033e: 66 90 xchg %ax,%ax next = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); tvp = next; 110340: 89 d8 mov %ebx,%eax */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { next = (rtems_task_variable_t *)tvp->next; 110342: 8b 18 mov (%eax),%ebx _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 110344: 83 ec 08 sub $0x8,%esp 110347: 50 push %eax 110348: 56 push %esi 110349: e8 56 01 00 00 call 1104a4 <_RTEMS_Tasks_Invoke_task_variable_dtor> * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 11034e: 83 c4 10 add $0x10,%esp 110351: 85 db test %ebx,%ebx 110353: 75 eb jne 110340 <_RTEMS_tasks_Delete_extension+0x20> /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); 110355: 83 ec 0c sub $0xc,%esp 110358: ff b6 e4 00 00 00 pushl 0xe4(%esi) 11035e: e8 f1 e4 ff ff call 10e854 <_Workspace_Free> deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; 110363: c7 86 e4 00 00 00 00 movl $0x0,0xe4(%esi) 11036a: 00 00 00 11036d: 83 c4 10 add $0x10,%esp } 110370: 8d 65 f8 lea -0x8(%ebp),%esp 110373: 5b pop %ebx 110374: 5e pop %esi 110375: c9 leave 110376: c3 ret =============================================================================== 001102a4 <_RTEMS_tasks_Initialize_user_tasks>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks( void ) { 1102a4: 55 push %ebp 1102a5: 89 e5 mov %esp,%ebp 1102a7: 83 ec 08 sub $0x8,%esp if ( _RTEMS_tasks_Initialize_user_tasks_p ) 1102aa: a1 a0 22 12 00 mov 0x1222a0,%eax 1102af: 85 c0 test %eax,%eax 1102b1: 74 05 je 1102b8 <_RTEMS_tasks_Initialize_user_tasks+0x14> (*_RTEMS_tasks_Initialize_user_tasks_p)(); } 1102b3: c9 leave */ void _RTEMS_tasks_Initialize_user_tasks( void ) { if ( _RTEMS_tasks_Initialize_user_tasks_p ) (*_RTEMS_tasks_Initialize_user_tasks_p)(); 1102b4: ff e0 jmp *%eax 1102b6: 66 90 xchg %ax,%ax } 1102b8: c9 leave 1102b9: c3 ret =============================================================================== 0010ba80 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 10ba80: 55 push %ebp 10ba81: 89 e5 mov %esp,%ebp 10ba83: 57 push %edi 10ba84: 56 push %esi 10ba85: 53 push %ebx 10ba86: 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; 10ba89: 8b 1d 4c 22 12 00 mov 0x12224c,%ebx maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 10ba8f: 8b 3d 48 22 12 00 mov 0x122248,%edi /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 10ba95: 85 db test %ebx,%ebx 10ba97: 74 46 je 10badf <_RTEMS_tasks_Initialize_user_tasks_body+0x5f> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10ba99: 85 ff test %edi,%edi 10ba9b: 74 42 je 10badf <_RTEMS_tasks_Initialize_user_tasks_body+0x5f><== NEVER TAKEN 10ba9d: 31 f6 xor %esi,%esi 10ba9f: 90 nop return_value = rtems_task_create( 10baa0: 83 ec 08 sub $0x8,%esp 10baa3: 8d 45 e4 lea -0x1c(%ebp),%eax 10baa6: 50 push %eax 10baa7: ff 73 0c pushl 0xc(%ebx) 10baaa: ff 73 14 pushl 0x14(%ebx) 10baad: ff 73 04 pushl 0x4(%ebx) 10bab0: ff 73 08 pushl 0x8(%ebx) 10bab3: ff 33 pushl (%ebx) 10bab5: e8 92 fd ff ff call 10b84c user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 10baba: 83 c4 20 add $0x20,%esp 10babd: 85 c0 test %eax,%eax 10babf: 75 26 jne 10bae7 <_RTEMS_tasks_Initialize_user_tasks_body+0x67> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 10bac1: 51 push %ecx 10bac2: ff 73 18 pushl 0x18(%ebx) 10bac5: ff 73 10 pushl 0x10(%ebx) 10bac8: ff 75 e4 pushl -0x1c(%ebp) 10bacb: e8 24 00 00 00 call 10baf4 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 10bad0: 83 c4 10 add $0x10,%esp 10bad3: 85 c0 test %eax,%eax 10bad5: 75 10 jne 10bae7 <_RTEMS_tasks_Initialize_user_tasks_body+0x67> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10bad7: 46 inc %esi 10bad8: 83 c3 1c add $0x1c,%ebx 10badb: 39 f7 cmp %esi,%edi 10badd: 77 c1 ja 10baa0 <_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 ); } } 10badf: 8d 65 f4 lea -0xc(%ebp),%esp 10bae2: 5b pop %ebx 10bae3: 5e pop %esi 10bae4: 5f pop %edi 10bae5: c9 leave 10bae6: 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 ); 10bae7: 52 push %edx 10bae8: 50 push %eax 10bae9: 6a 01 push $0x1 10baeb: 6a 01 push $0x1 10baed: e8 2e 0d 00 00 call 10c820 <_Internal_error_Occurred> =============================================================================== 001102bc <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 1102bc: 55 push %ebp 1102bd: 89 e5 mov %esp,%ebp 1102bf: 57 push %edi 1102c0: 56 push %esi 1102c1: 53 push %ebx 1102c2: 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 ]; 1102c5: 8b 45 08 mov 0x8(%ebp),%eax 1102c8: 8b 98 e4 00 00 00 mov 0xe4(%eax),%ebx if ( !api ) 1102ce: 85 db test %ebx,%ebx 1102d0: 74 45 je 110317 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 1102d2: 9c pushf 1102d3: fa cli 1102d4: 58 pop %eax signal_set = asr->signals_posted; 1102d5: 8b 73 14 mov 0x14(%ebx),%esi asr->signals_posted = 0; 1102d8: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 1102df: 50 push %eax 1102e0: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 1102e1: 85 f6 test %esi,%esi 1102e3: 74 32 je 110317 <_RTEMS_tasks_Post_switch_extension+0x5b> return; asr->nest_level += 1; 1102e5: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 1102e8: 50 push %eax 1102e9: 8d 7d e4 lea -0x1c(%ebp),%edi 1102ec: 57 push %edi 1102ed: 68 ff ff 00 00 push $0xffff 1102f2: ff 73 10 pushl 0x10(%ebx) 1102f5: e8 72 1b 00 00 call 111e6c (*asr->handler)( signal_set ); 1102fa: 89 34 24 mov %esi,(%esp) 1102fd: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 110300: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 110303: 83 c4 0c add $0xc,%esp 110306: 57 push %edi 110307: 68 ff ff 00 00 push $0xffff 11030c: ff 75 e4 pushl -0x1c(%ebp) 11030f: e8 58 1b 00 00 call 111e6c 110314: 83 c4 10 add $0x10,%esp } 110317: 8d 65 f4 lea -0xc(%ebp),%esp 11031a: 5b pop %ebx 11031b: 5e pop %esi 11031c: 5f pop %edi 11031d: c9 leave 11031e: c3 ret =============================================================================== 0011025c <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 11025c: 55 push %ebp 11025d: 89 e5 mov %esp,%ebp /* * Per Task Variables */ tvp = executing->task_variables; 11025f: 8b 45 08 mov 0x8(%ebp),%eax 110262: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax while (tvp) { 110268: 85 c0 test %eax,%eax 11026a: 74 13 je 11027f <_RTEMS_tasks_Switch_extension+0x23> tvp->tval = *tvp->ptr; 11026c: 8b 50 04 mov 0x4(%eax),%edx 11026f: 8b 0a mov (%edx),%ecx 110271: 89 48 0c mov %ecx,0xc(%eax) *tvp->ptr = tvp->gval; 110274: 8b 48 08 mov 0x8(%eax),%ecx 110277: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 110279: 8b 00 mov (%eax),%eax /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 11027b: 85 c0 test %eax,%eax 11027d: 75 ed jne 11026c <_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; 11027f: 8b 45 0c mov 0xc(%ebp),%eax 110282: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax while (tvp) { 110288: 85 c0 test %eax,%eax 11028a: 74 13 je 11029f <_RTEMS_tasks_Switch_extension+0x43> tvp->gval = *tvp->ptr; 11028c: 8b 50 04 mov 0x4(%eax),%edx 11028f: 8b 0a mov (%edx),%ecx 110291: 89 48 08 mov %ecx,0x8(%eax) *tvp->ptr = tvp->tval; 110294: 8b 48 0c mov 0xc(%eax),%ecx 110297: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 110299: 8b 00 mov (%eax),%eax *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 11029b: 85 c0 test %eax,%eax 11029d: 75 ed jne 11028c <_RTEMS_tasks_Switch_extension+0x30><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 11029f: c9 leave 1102a0: c3 ret =============================================================================== 0010c4f0 <_Rate_monotonic_Initiate_statistics>: } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { 10c4f0: 55 push %ebp 10c4f1: 89 e5 mov %esp,%ebp 10c4f3: 57 push %edi 10c4f4: 56 push %esi 10c4f5: 53 push %ebx 10c4f6: 83 ec 28 sub $0x28,%esp 10c4f9: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *owning_thread = the_period->owner; 10c4fc: 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 ); 10c4ff: 8d 7d e0 lea -0x20(%ebp),%edi 10c502: 57 push %edi 10c503: e8 c4 17 00 00 call 10dccc <_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; 10c508: 8b 45 e0 mov -0x20(%ebp),%eax 10c50b: 8b 55 e4 mov -0x1c(%ebp),%edx 10c50e: 89 43 4c mov %eax,0x4c(%ebx) 10c511: 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; 10c514: 8b 86 84 00 00 00 mov 0x84(%esi),%eax 10c51a: 8b 96 88 00 00 00 mov 0x88(%esi),%edx 10c520: 89 43 44 mov %eax,0x44(%ebx) 10c523: 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) { 10c526: 83 c4 10 add $0x10,%esp 10c529: 39 35 98 9c 12 00 cmp %esi,0x129c98 10c52f: 74 0b je 10c53c <_Rate_monotonic_Initiate_statistics+0x4c> ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); } #endif } 10c531: 8d 65 f4 lea -0xc(%ebp),%esp 10c534: 5b pop %ebx 10c535: 5e pop %esi 10c536: 5f pop %edi 10c537: c9 leave 10c538: c3 ret 10c539: 8d 76 00 lea 0x0(%esi),%esi /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 10c53c: 50 push %eax &_Thread_Time_of_last_context_switch, &uptime, &ran 10c53d: 8d 75 d8 lea -0x28(%ebp),%esi /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 10c540: 56 push %esi 10c541: 57 push %edi 10c542: 68 cc 9a 12 00 push $0x129acc 10c547: e8 88 38 00 00 call 10fdd4 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); 10c54c: 59 pop %ecx 10c54d: 5f pop %edi 10c54e: 56 push %esi 10c54f: 83 c3 44 add $0x44,%ebx 10c552: 53 push %ebx 10c553: e8 80 37 00 00 call 10fcd8 <_Timespec_Add_to> 10c558: 83 c4 10 add $0x10,%esp } #endif } 10c55b: 8d 65 f4 lea -0xc(%ebp),%esp 10c55e: 5b pop %ebx 10c55f: 5e pop %esi 10c560: 5f pop %edi 10c561: c9 leave 10c562: c3 ret =============================================================================== 0010caac <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 10caac: 55 push %ebp 10caad: 89 e5 mov %esp,%ebp 10caaf: 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 ); 10cab2: 8d 45 f4 lea -0xc(%ebp),%eax 10cab5: 50 push %eax 10cab6: ff 75 08 pushl 0x8(%ebp) 10cab9: 68 20 99 12 00 push $0x129920 10cabe: e8 85 1c 00 00 call 10e748 <_Objects_Get> switch ( location ) { 10cac3: 83 c4 10 add $0x10,%esp 10cac6: 8b 55 f4 mov -0xc(%ebp),%edx 10cac9: 85 d2 test %edx,%edx 10cacb: 75 29 jne 10caf6 <_Rate_monotonic_Timeout+0x4a><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 10cacd: 8b 50 40 mov 0x40(%eax),%edx if ( _States_Is_waiting_for_period( the_thread->current_state ) && 10cad0: f6 42 11 40 testb $0x40,0x11(%edx) 10cad4: 74 08 je 10cade <_Rate_monotonic_Timeout+0x32> 10cad6: 8b 48 08 mov 0x8(%eax),%ecx 10cad9: 39 4a 20 cmp %ecx,0x20(%edx) 10cadc: 74 4e je 10cb2c <_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 ) { 10cade: 83 78 38 01 cmpl $0x1,0x38(%eax) 10cae2: 74 14 je 10caf8 <_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; 10cae4: 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; 10caeb: a1 10 9a 12 00 mov 0x129a10,%eax 10caf0: 48 dec %eax 10caf1: a3 10 9a 12 00 mov %eax,0x129a10 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10caf6: c9 leave 10caf7: 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; 10caf8: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax) _Rate_monotonic_Initiate_statistics( the_period ); 10caff: 83 ec 0c sub $0xc,%esp 10cb02: 50 push %eax 10cb03: 89 45 e4 mov %eax,-0x1c(%ebp) 10cb06: e8 e5 f9 ff ff call 10c4f0 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10cb0b: 8b 45 e4 mov -0x1c(%ebp),%eax 10cb0e: 8b 50 3c mov 0x3c(%eax),%edx 10cb11: 89 50 1c mov %edx,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10cb14: 5a pop %edx 10cb15: 59 pop %ecx _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); 10cb16: 83 c0 10 add $0x10,%eax 10cb19: 50 push %eax 10cb1a: 68 e0 9a 12 00 push $0x129ae0 10cb1f: e8 90 35 00 00 call 1100b4 <_Watchdog_Insert> 10cb24: 83 c4 10 add $0x10,%esp 10cb27: eb c2 jmp 10caeb <_Rate_monotonic_Timeout+0x3f> 10cb29: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10cb2c: 83 ec 08 sub $0x8,%esp 10cb2f: 68 f8 ff 03 10 push $0x1003fff8 10cb34: 52 push %edx 10cb35: 89 45 e4 mov %eax,-0x1c(%ebp) 10cb38: e8 07 24 00 00 call 10ef44 <_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 ); 10cb3d: 8b 45 e4 mov -0x1c(%ebp),%eax 10cb40: 89 04 24 mov %eax,(%esp) 10cb43: eb c1 jmp 10cb06 <_Rate_monotonic_Timeout+0x5a> =============================================================================== 0010c564 <_Rate_monotonic_Update_statistics>: void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 10c564: 55 push %ebp 10c565: 89 e5 mov %esp,%ebp 10c567: 57 push %edi 10c568: 56 push %esi 10c569: 53 push %ebx 10c56a: 83 ec 1c sub $0x1c,%esp 10c56d: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 10c570: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 10c573: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 10c577: 0f 84 bf 00 00 00 je 10c63c <_Rate_monotonic_Update_statistics+0xd8> stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10c57d: 51 push %ecx _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 10c57e: 8d 7d e0 lea -0x20(%ebp),%edi stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10c581: 57 push %edi _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 10c582: 8d 75 d8 lea -0x28(%ebp),%esi stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10c585: 56 push %esi 10c586: 53 push %ebx 10c587: e8 cc fe ff ff call 10c458 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) 10c58c: 83 c4 10 add $0x10,%esp 10c58f: 84 c0 test %al,%al 10c591: 75 09 jne 10c59c <_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 } 10c593: 8d 65 f4 lea -0xc(%ebp),%esp 10c596: 5b pop %ebx 10c597: 5e pop %esi 10c598: 5f pop %edi 10c599: c9 leave 10c59a: c3 ret 10c59b: 90 nop /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 10c59c: 83 ec 08 sub $0x8,%esp 10c59f: 57 push %edi 10c5a0: 8d 43 6c lea 0x6c(%ebx),%eax 10c5a3: 50 push %eax 10c5a4: e8 2f 37 00 00 call 10fcd8 <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 10c5a9: 58 pop %eax 10c5aa: 5a pop %edx 10c5ab: 8d 43 5c lea 0x5c(%ebx),%eax 10c5ae: 50 push %eax 10c5af: 57 push %edi 10c5b0: e8 fb 37 00 00 call 10fdb0 <_Timespec_Less_than> 10c5b5: 83 c4 10 add $0x10,%esp 10c5b8: 84 c0 test %al,%al 10c5ba: 74 0c je 10c5c8 <_Rate_monotonic_Update_statistics+0x64> stats->min_cpu_time = executed; 10c5bc: 8b 45 e0 mov -0x20(%ebp),%eax 10c5bf: 8b 55 e4 mov -0x1c(%ebp),%edx 10c5c2: 89 43 5c mov %eax,0x5c(%ebx) 10c5c5: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 10c5c8: 83 ec 08 sub $0x8,%esp 10c5cb: 8d 43 64 lea 0x64(%ebx),%eax 10c5ce: 50 push %eax 10c5cf: 57 push %edi 10c5d0: e8 b7 37 00 00 call 10fd8c <_Timespec_Greater_than> 10c5d5: 83 c4 10 add $0x10,%esp 10c5d8: 84 c0 test %al,%al 10c5da: 74 0c je 10c5e8 <_Rate_monotonic_Update_statistics+0x84> stats->max_cpu_time = executed; 10c5dc: 8b 45 e0 mov -0x20(%ebp),%eax 10c5df: 8b 55 e4 mov -0x1c(%ebp),%edx 10c5e2: 89 43 64 mov %eax,0x64(%ebx) 10c5e5: 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 ); 10c5e8: 83 ec 08 sub $0x8,%esp 10c5eb: 56 push %esi 10c5ec: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10c5f2: 50 push %eax 10c5f3: e8 e0 36 00 00 call 10fcd8 <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 10c5f8: 5a pop %edx 10c5f9: 59 pop %ecx 10c5fa: 8d 43 74 lea 0x74(%ebx),%eax 10c5fd: 50 push %eax 10c5fe: 56 push %esi 10c5ff: e8 ac 37 00 00 call 10fdb0 <_Timespec_Less_than> 10c604: 83 c4 10 add $0x10,%esp 10c607: 84 c0 test %al,%al 10c609: 75 39 jne 10c644 <_Rate_monotonic_Update_statistics+0xe0> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 10c60b: 83 ec 08 sub $0x8,%esp 10c60e: 8d 43 7c lea 0x7c(%ebx),%eax 10c611: 50 push %eax 10c612: 56 push %esi 10c613: e8 74 37 00 00 call 10fd8c <_Timespec_Greater_than> 10c618: 83 c4 10 add $0x10,%esp 10c61b: 84 c0 test %al,%al 10c61d: 0f 84 70 ff ff ff je 10c593 <_Rate_monotonic_Update_statistics+0x2f> stats->max_wall_time = since_last_period; 10c623: 8b 45 d8 mov -0x28(%ebp),%eax 10c626: 8b 55 dc mov -0x24(%ebp),%edx 10c629: 89 43 7c mov %eax,0x7c(%ebx) 10c62c: 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 } 10c632: 8d 65 f4 lea -0xc(%ebp),%esp 10c635: 5b pop %ebx 10c636: 5e pop %esi 10c637: 5f pop %edi 10c638: c9 leave 10c639: c3 ret 10c63a: 66 90 xchg %ax,%ax */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 10c63c: ff 43 58 incl 0x58(%ebx) 10c63f: e9 39 ff ff ff jmp 10c57d <_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; 10c644: 8b 45 d8 mov -0x28(%ebp),%eax 10c647: 8b 55 dc mov -0x24(%ebp),%edx 10c64a: 89 43 74 mov %eax,0x74(%ebx) 10c64d: 89 53 78 mov %edx,0x78(%ebx) 10c650: eb b9 jmp 10c60b <_Rate_monotonic_Update_statistics+0xa7> =============================================================================== 0010d0a0 <_Scheduler_priority_Block>: #include void _Scheduler_priority_Block( Thread_Control *the_thread ) { 10d0a0: 55 push %ebp 10d0a1: 89 e5 mov %esp,%ebp 10d0a3: 53 push %ebx 10d0a4: 8b 45 08 mov 0x8(%ebp),%eax ) { Scheduler_priority_Per_thread *sched_info; Chain_Control *ready; sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info; 10d0a7: 8b 88 8c 00 00 00 mov 0x8c(%eax),%ecx ready = sched_info->ready_chain; 10d0ad: 8b 11 mov (%ecx),%edx if ( _Chain_Has_only_one_node( ready ) ) { 10d0af: 8b 5a 08 mov 0x8(%edx),%ebx 10d0b2: 39 1a cmp %ebx,(%edx) 10d0b4: 74 6e je 10d124 <_Scheduler_priority_Block+0x84> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10d0b6: 8b 08 mov (%eax),%ecx previous = the_node->previous; 10d0b8: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10d0bb: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 10d0be: 89 0a mov %ecx,(%edx) _Scheduler_priority_Ready_queue_extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) 10d0c0: 3b 05 5c 67 12 00 cmp 0x12675c,%eax 10d0c6: 74 18 je 10d0e0 <_Scheduler_priority_Block+0x40> _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) 10d0c8: 3b 05 58 67 12 00 cmp 0x126758,%eax 10d0ce: 74 04 je 10d0d4 <_Scheduler_priority_Block+0x34> _Thread_Dispatch_necessary = true; } 10d0d0: 5b pop %ebx 10d0d1: c9 leave 10d0d2: c3 ret 10d0d3: 90 nop if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 10d0d4: c6 05 64 67 12 00 01 movb $0x1,0x126764 } 10d0db: 5b pop %ebx 10d0dc: c9 leave 10d0dd: c3 ret 10d0de: 66 90 xchg %ax,%ax RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10d0e0: 66 8b 1d 80 67 12 00 mov 0x126780,%bx 10d0e7: 31 d2 xor %edx,%edx 10d0e9: 89 d1 mov %edx,%ecx 10d0eb: 66 0f bc cb bsf %bx,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10d0ef: 0f b7 c9 movzwl %cx,%ecx 10d0f2: 66 8b 9c 09 a0 67 12 mov 0x1267a0(%ecx,%ecx,1),%bx 10d0f9: 00 10d0fa: 66 0f bc d3 bsf %bx,%dx return (_Priority_Bits_index( major ) << 4) + 10d0fe: c1 e1 04 shl $0x4,%ecx 10d101: 0f b7 d2 movzwl %dx,%edx 10d104: 8d 14 11 lea (%ecx,%edx,1),%edx Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) 10d107: 8d 14 52 lea (%edx,%edx,2),%edx 10d10a: c1 e2 02 shl $0x2,%edx 10d10d: 03 15 60 21 12 00 add 0x122160,%edx 10d113: 8b 0a mov (%edx),%ecx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10d115: 83 c2 04 add $0x4,%edx 10d118: 39 d1 cmp %edx,%ecx 10d11a: 74 44 je 10d160 <_Scheduler_priority_Block+0xc0><== NEVER TAKEN * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( 10d11c: 89 0d 5c 67 12 00 mov %ecx,0x12675c 10d122: eb a4 jmp 10d0c8 <_Scheduler_priority_Block+0x28> RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 10d124: 8d 5a 04 lea 0x4(%edx),%ebx 10d127: 89 1a mov %ebx,(%edx) head->next = tail; head->previous = NULL; 10d129: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) tail->previous = head; 10d130: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10d133: 8b 59 04 mov 0x4(%ecx),%ebx 10d136: 66 8b 13 mov (%ebx),%dx 10d139: 66 23 51 0e and 0xe(%ecx),%dx 10d13d: 66 89 13 mov %dx,(%ebx) if ( *the_priority_map->minor == 0 ) 10d140: 66 85 d2 test %dx,%dx 10d143: 0f 85 77 ff ff ff jne 10d0c0 <_Scheduler_priority_Block+0x20> _Priority_Major_bit_map &= the_priority_map->block_major; 10d149: 66 8b 15 80 67 12 00 mov 0x126780,%dx 10d150: 23 51 0c and 0xc(%ecx),%edx 10d153: 66 89 15 80 67 12 00 mov %dx,0x126780 10d15a: e9 61 ff ff ff jmp 10d0c0 <_Scheduler_priority_Block+0x20> 10d15f: 90 nop Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; 10d160: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 10d162: eb b8 jmp 10d11c <_Scheduler_priority_Block+0x7c><== NOT EXECUTED =============================================================================== 0010d2b4 <_Scheduler_priority_Schedule>: #include #include #include void _Scheduler_priority_Schedule(void) { 10d2b4: 55 push %ebp 10d2b5: 89 e5 mov %esp,%ebp RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10d2b7: 66 8b 0d 80 67 12 00 mov 0x126780,%cx 10d2be: 31 c0 xor %eax,%eax 10d2c0: 89 c2 mov %eax,%edx 10d2c2: 66 0f bc d1 bsf %cx,%dx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10d2c6: 0f b7 d2 movzwl %dx,%edx 10d2c9: 66 8b 8c 12 a0 67 12 mov 0x1267a0(%edx,%edx,1),%cx 10d2d0: 00 10d2d1: 66 0f bc c1 bsf %cx,%ax return (_Priority_Bits_index( major ) << 4) + 10d2d5: c1 e2 04 shl $0x4,%edx 10d2d8: 0f b7 c0 movzwl %ax,%eax 10d2db: 8d 04 02 lea (%edx,%eax,1),%eax Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) 10d2de: 8d 04 40 lea (%eax,%eax,2),%eax 10d2e1: c1 e0 02 shl $0x2,%eax 10d2e4: 03 05 60 21 12 00 add 0x122160,%eax _Scheduler_priority_Schedule_body(); } 10d2ea: 8b 10 mov (%eax),%edx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10d2ec: 83 c0 04 add $0x4,%eax 10d2ef: 39 c2 cmp %eax,%edx 10d2f1: 74 09 je 10d2fc <_Scheduler_priority_Schedule+0x48><== NEVER TAKEN * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( 10d2f3: 89 15 5c 67 12 00 mov %edx,0x12675c 10d2f9: c9 leave 10d2fa: c3 ret 10d2fb: 90 nop Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; 10d2fc: 31 d2 xor %edx,%edx <== NOT EXECUTED * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( 10d2fe: 89 15 5c 67 12 00 mov %edx,0x12675c <== NOT EXECUTED 10d304: c9 leave <== NOT EXECUTED 10d305: c3 ret <== NOT EXECUTED =============================================================================== 0010d3d8 <_Scheduler_priority_Yield>: * ready chain * select heir */ void _Scheduler_priority_Yield(void) { 10d3d8: 55 push %ebp 10d3d9: 89 e5 mov %esp,%ebp 10d3db: 56 push %esi 10d3dc: 53 push %ebx Scheduler_priority_Per_thread *sched_info; ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10d3dd: a1 58 67 12 00 mov 0x126758,%eax sched_info = (Scheduler_priority_Per_thread *) executing->scheduler_info; ready = sched_info->ready_chain; 10d3e2: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx 10d3e8: 8b 12 mov (%edx),%edx _ISR_Disable( level ); 10d3ea: 9c pushf 10d3eb: fa cli 10d3ec: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10d3ed: 8b 5a 08 mov 0x8(%edx),%ebx 10d3f0: 39 1a cmp %ebx,(%edx) 10d3f2: 74 40 je 10d434 <_Scheduler_priority_Yield+0x5c> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10d3f4: 8b 30 mov (%eax),%esi previous = the_node->previous; 10d3f6: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10d3f9: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10d3fc: 89 33 mov %esi,(%ebx) Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 10d3fe: 8b 5a 08 mov 0x8(%edx),%ebx RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); 10d401: 8d 72 04 lea 0x4(%edx),%esi 10d404: 89 30 mov %esi,(%eax) Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; 10d406: 89 42 08 mov %eax,0x8(%edx) old_last->next = the_node; 10d409: 89 03 mov %eax,(%ebx) the_node->previous = old_last; 10d40b: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10d40e: 51 push %ecx 10d40f: 9d popf 10d410: fa cli if ( _Thread_Is_heir( executing ) ) 10d411: 3b 05 5c 67 12 00 cmp 0x12675c,%eax 10d417: 74 0f je 10d428 <_Scheduler_priority_Yield+0x50><== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) _Chain_First( ready ); _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Thread_Dispatch_necessary = true; 10d419: c6 05 64 67 12 00 01 movb $0x1,0x126764 _ISR_Enable( level ); 10d420: 51 push %ecx 10d421: 9d popf } 10d422: 5b pop %ebx 10d423: 5e pop %esi 10d424: c9 leave 10d425: c3 ret 10d426: 66 90 xchg %ax,%ax _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) _Chain_First( ready ); 10d428: 8b 02 mov (%edx),%eax 10d42a: a3 5c 67 12 00 mov %eax,0x12675c 10d42f: eb e8 jmp 10d419 <_Scheduler_priority_Yield+0x41> 10d431: 8d 76 00 lea 0x0(%esi),%esi _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10d434: 3b 05 5c 67 12 00 cmp 0x12675c,%eax 10d43a: 75 dd jne 10d419 <_Scheduler_priority_Yield+0x41><== NEVER TAKEN 10d43c: eb e2 jmp 10d420 <_Scheduler_priority_Yield+0x48> =============================================================================== 0010da10 <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 10da10: 55 push %ebp 10da11: 89 e5 mov %esp,%ebp 10da13: 53 push %ebx 10da14: 83 ec 04 sub $0x4,%esp 10da17: 8b 5d 08 mov 0x8(%ebp),%ebx 10da1a: a1 70 99 12 00 mov 0x129970,%eax 10da1f: 40 inc %eax 10da20: a3 70 99 12 00 mov %eax,0x129970 long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 10da25: a1 08 9a 12 00 mov 0x129a08,%eax if ( time->tv_sec < seconds ) 10da2a: 8b 13 mov (%ebx),%edx 10da2c: 39 d0 cmp %edx,%eax 10da2e: 7f 34 jg 10da64 <_TOD_Set+0x54> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 10da30: 51 push %ecx _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); 10da31: 29 c2 sub %eax,%edx 10da33: 52 push %edx 10da34: 6a 00 push $0x0 10da36: 68 34 9a 12 00 push $0x129a34 10da3b: e8 7c 24 00 00 call 10febc <_Watchdog_Adjust> 10da40: 83 c4 10 add $0x10,%esp /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 10da43: 8b 03 mov (%ebx),%eax 10da45: a3 08 9a 12 00 mov %eax,0x129a08 10da4a: 8b 43 04 mov 0x4(%ebx),%eax 10da4d: a3 0c 9a 12 00 mov %eax,0x129a0c _TOD_Is_set = true; 10da52: c6 05 84 99 12 00 01 movb $0x1,0x129984 _TOD_Activate(); _Thread_Enable_dispatch(); } 10da59: 8b 5d fc mov -0x4(%ebp),%ebx 10da5c: c9 leave _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); 10da5d: e9 d6 15 00 00 jmp 10f038 <_Thread_Enable_dispatch> 10da62: 66 90 xchg %ax,%ax 10da64: 51 push %ecx _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); if ( time->tv_sec < seconds ) _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); 10da65: 29 d0 sub %edx,%eax 10da67: 50 push %eax 10da68: 6a 01 push $0x1 10da6a: 68 34 9a 12 00 push $0x129a34 10da6f: e8 48 24 00 00 call 10febc <_Watchdog_Adjust> 10da74: 83 c4 10 add $0x10,%esp 10da77: eb ca jmp 10da43 <_TOD_Set+0x33> =============================================================================== 0010c440 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 10c440: 55 push %ebp 10c441: 89 e5 mov %esp,%ebp 10c443: 53 push %ebx 10c444: 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() ); 10c447: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 10c44e: a1 6c 22 12 00 mov 0x12226c,%eax 10c453: 8d 04 80 lea (%eax,%eax,4),%eax 10c456: 8d 04 80 lea (%eax,%eax,4),%eax 10c459: 8d 04 80 lea (%eax,%eax,4),%eax 10c45c: c1 e0 03 shl $0x3,%eax 10c45f: 89 45 f4 mov %eax,-0xc(%ebp) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 10c462: a1 04 66 12 00 mov 0x126604,%eax 10c467: 40 inc %eax 10c468: a3 04 66 12 00 mov %eax,0x126604 /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 10c46d: 8d 5d f0 lea -0x10(%ebp),%ebx 10c470: 53 push %ebx 10c471: 68 58 65 12 00 push $0x126558 10c476: e8 39 1e 00 00 call 10e2b4 <_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 ); 10c47b: 58 pop %eax 10c47c: 5a pop %edx 10c47d: 53 push %ebx 10c47e: 68 68 65 12 00 push $0x126568 10c483: e8 2c 1e 00 00 call 10e2b4 <_Timespec_Add_to> 10c488: 89 c3 mov %eax,%ebx while ( seconds ) { 10c48a: 83 c4 10 add $0x10,%esp 10c48d: 85 c0 test %eax,%eax 10c48f: 74 16 je 10c4a7 <_TOD_Tickle_ticks+0x67> 10c491: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 10c494: 83 ec 0c sub $0xc,%esp 10c497: 68 94 65 12 00 push $0x126594 10c49c: e8 db 22 00 00 call 10e77c <_Watchdog_Tickle> 10c4a1: 83 c4 10 add $0x10,%esp 10c4a4: 4b dec %ebx 10c4a5: 75 ed jne 10c494 <_TOD_Tickle_ticks+0x54><== NEVER TAKEN _Watchdog_Tickle_seconds(); seconds--; } } 10c4a7: 8b 5d fc mov -0x4(%ebp),%ebx 10c4aa: c9 leave 10c4ab: c3 ret =============================================================================== 0010c1f0 <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 10c1f0: 55 push %ebp 10c1f1: 89 e5 mov %esp,%ebp 10c1f3: 56 push %esi 10c1f4: 53 push %ebx 10c1f5: 8b 55 08 mov 0x8(%ebp),%edx uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 10c1f8: 8b 72 08 mov 0x8(%edx),%esi 10c1fb: 4e dec %esi year_mod_4 = the_tod->year & 3; 10c1fc: 8b 02 mov (%edx),%eax if ( year_mod_4 == 0 ) 10c1fe: 89 c3 mov %eax,%ebx 10c200: 83 e3 03 and $0x3,%ebx 10c203: 74 67 je 10c26c <_TOD_To_seconds+0x7c> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 10c205: 8b 4a 04 mov 0x4(%edx),%ecx 10c208: 0f b7 8c 09 20 2e 12 movzwl 0x122e20(%ecx,%ecx,1),%ecx 10c20f: 00 10c210: 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 ]; 10c213: 0f b7 8c 1b 54 2e 12 movzwl 0x122e54(%ebx,%ebx,1),%ecx 10c21a: 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 ) * 10c21b: 2d c4 07 00 00 sub $0x7c4,%eax 10c220: c1 e8 02 shr $0x2,%eax 10c223: 8d 1c c0 lea (%eax,%eax,8),%ebx 10c226: 8d 1c d8 lea (%eax,%ebx,8),%ebx 10c229: 8d 1c 9b lea (%ebx,%ebx,4),%ebx 10c22c: 8d 04 98 lea (%eax,%ebx,4),%eax 10c22f: 01 c1 add %eax,%ecx ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10c231: 01 f1 add %esi,%ecx time *= TOD_SECONDS_PER_DAY; 10c233: 8d 04 89 lea (%ecx,%ecx,4),%eax 10c236: 8d 04 81 lea (%ecx,%eax,4),%eax 10c239: 8d 04 c1 lea (%ecx,%eax,8),%eax 10c23c: c1 e0 02 shl $0x2,%eax 10c23f: 29 c8 sub %ecx,%eax 10c241: c1 e0 07 shl $0x7,%eax time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 10c244: 8b 5a 14 mov 0x14(%edx),%ebx 10c247: 8b 4a 0c mov 0xc(%edx),%ecx 10c24a: 8d 0c 49 lea (%ecx,%ecx,2),%ecx 10c24d: 8d 0c 89 lea (%ecx,%ecx,4),%ecx 10c250: c1 e1 02 shl $0x2,%ecx 10c253: 03 4a 10 add 0x10(%edx),%ecx * TOD_SECONDS_PER_MINUTE; 10c256: 8d 14 49 lea (%ecx,%ecx,2),%edx 10c259: 8d 14 92 lea (%edx,%edx,4),%edx time += the_tod->second; 10c25c: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx time += TOD_SECONDS_1970_THROUGH_1988; 10c263: 8d 04 02 lea (%edx,%eax,1),%eax return( time ); } 10c266: 5b pop %ebx 10c267: 5e pop %esi 10c268: c9 leave 10c269: c3 ret 10c26a: 66 90 xchg %ax,%ax 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 ]; 10c26c: 8b 4a 04 mov 0x4(%edx),%ecx 10c26f: 0f b7 8c 09 3a 2e 12 movzwl 0x122e3a(%ecx,%ecx,1),%ecx 10c276: 00 10c277: 8d 34 31 lea (%ecx,%esi,1),%esi 10c27a: eb 97 jmp 10c213 <_TOD_To_seconds+0x23> =============================================================================== 0010c27c <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10c27c: 55 push %ebp 10c27d: 89 e5 mov %esp,%ebp 10c27f: 53 push %ebx 10c280: 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(); 10c283: 8b 1d 6c 52 12 00 mov 0x12526c,%ebx if ((!the_tod) || 10c289: 85 c9 test %ecx,%ecx 10c28b: 74 53 je 10c2e0 <_TOD_Validate+0x64> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 10c28d: b8 40 42 0f 00 mov $0xf4240,%eax 10c292: 31 d2 xor %edx,%edx 10c294: f7 f3 div %ebx rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c296: 3b 41 18 cmp 0x18(%ecx),%eax 10c299: 76 45 jbe 10c2e0 <_TOD_Validate+0x64> (the_tod->ticks >= ticks_per_second) || 10c29b: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10c29f: 77 3f ja 10c2e0 <_TOD_Validate+0x64> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10c2a1: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10c2a5: 77 39 ja 10c2e0 <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10c2a7: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10c2ab: 77 33 ja 10c2e0 <_TOD_Validate+0x64> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 10c2ad: 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) || 10c2b0: 85 c0 test %eax,%eax 10c2b2: 74 2c je 10c2e0 <_TOD_Validate+0x64> <== NEVER TAKEN (the_tod->month == 0) || 10c2b4: 83 f8 0c cmp $0xc,%eax 10c2b7: 77 27 ja 10c2e0 <_TOD_Validate+0x64> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10c2b9: 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) || 10c2bb: 81 fa c3 07 00 00 cmp $0x7c3,%edx 10c2c1: 76 1d jbe 10c2e0 <_TOD_Validate+0x64> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10c2c3: 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) || 10c2c6: 85 c9 test %ecx,%ecx 10c2c8: 74 16 je 10c2e0 <_TOD_Validate+0x64> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10c2ca: 83 e2 03 and $0x3,%edx 10c2cd: 75 16 jne 10c2e5 <_TOD_Validate+0x69> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10c2cf: 8b 04 85 94 2e 12 00 mov 0x122e94(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10c2d6: 39 c8 cmp %ecx,%eax 10c2d8: 0f 93 c0 setae %al 10c2db: eb 05 jmp 10c2e2 <_TOD_Validate+0x66> 10c2dd: 8d 76 00 lea 0x0(%esi),%esi (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; 10c2e0: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10c2e2: 5b pop %ebx 10c2e3: c9 leave 10c2e4: 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 ]; 10c2e5: 8b 04 85 60 2e 12 00 mov 0x122e60(,%eax,4),%eax 10c2ec: eb e8 jmp 10c2d6 <_TOD_Validate+0x5a> =============================================================================== 0010d48c <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10d48c: 55 push %ebp 10d48d: 89 e5 mov %esp,%ebp 10d48f: 57 push %edi 10d490: 56 push %esi 10d491: 53 push %ebx 10d492: 83 ec 28 sub $0x28,%esp 10d495: 8b 5d 08 mov 0x8(%ebp),%ebx 10d498: 8b 75 0c mov 0xc(%ebp),%esi 10d49b: 8a 45 10 mov 0x10(%ebp),%al 10d49e: 88 45 e7 mov %al,-0x19(%ebp) States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 10d4a1: 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 ); 10d4a4: 53 push %ebx 10d4a5: e8 4a 0c 00 00 call 10e0f4 <_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 ) 10d4aa: 83 c4 10 add $0x10,%esp 10d4ad: 39 73 14 cmp %esi,0x14(%ebx) 10d4b0: 74 0d je 10d4bf <_Thread_Change_priority+0x33> _Thread_Set_priority( the_thread, new_priority ); 10d4b2: 83 ec 08 sub $0x8,%esp 10d4b5: 56 push %esi 10d4b6: 53 push %ebx 10d4b7: e8 e4 0b 00 00 call 10e0a0 <_Thread_Set_priority> 10d4bc: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10d4bf: 9c pushf 10d4c0: fa cli 10d4c1: 5e pop %esi /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 10d4c2: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10d4c5: 83 f8 04 cmp $0x4,%eax 10d4c8: 74 22 je 10d4ec <_Thread_Change_priority+0x60> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10d4ca: 83 e7 04 and $0x4,%edi 10d4cd: 74 11 je 10d4e0 <_Thread_Change_priority+0x54><== ALWAYS TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10d4cf: 56 push %esi 10d4d0: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10d4d1: a9 e0 be 03 00 test $0x3bee0,%eax 10d4d6: 75 60 jne 10d538 <_Thread_Change_priority+0xac> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 10d4d8: 8d 65 f4 lea -0xc(%ebp),%esp 10d4db: 5b pop %ebx 10d4dc: 5e pop %esi 10d4dd: 5f pop %edi 10d4de: c9 leave 10d4df: c3 ret RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10d4e0: 89 c2 mov %eax,%edx 10d4e2: 83 e2 fb and $0xfffffffb,%edx 10d4e5: 89 53 10 mov %edx,0x10(%ebx) 10d4e8: eb e5 jmp 10d4cf <_Thread_Change_priority+0x43> 10d4ea: 66 90 xchg %ax,%ax } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10d4ec: 83 e7 04 and $0x4,%edi 10d4ef: 75 1a jne 10d50b <_Thread_Change_priority+0x7f><== 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 ); 10d4f1: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) if ( prepend_it ) 10d4f8: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10d4fc: 74 52 je 10d550 <_Thread_Change_priority+0xc4> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 10d4fe: 83 ec 0c sub $0xc,%esp 10d501: 53 push %ebx 10d502: ff 15 88 21 12 00 call *0x122188 10d508: 83 c4 10 add $0x10,%esp _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 10d50b: 56 push %esi 10d50c: 9d popf 10d50d: fa cli * This kernel routine implements the scheduling decision logic for * the scheduler. It does NOT dispatch. */ RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void ) { _Scheduler.Operations.schedule(); 10d50e: ff 15 68 21 12 00 call *0x122168 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10d514: a1 58 67 12 00 mov 0x126758,%eax * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Scheduler_Schedule(); if ( !_Thread_Is_executing_also_the_heir() && 10d519: 3b 05 5c 67 12 00 cmp 0x12675c,%eax 10d51f: 74 0d je 10d52e <_Thread_Change_priority+0xa2> 10d521: 80 78 74 00 cmpb $0x0,0x74(%eax) 10d525: 74 07 je 10d52e <_Thread_Change_priority+0xa2> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 10d527: c6 05 64 67 12 00 01 movb $0x1,0x126764 _ISR_Enable( level ); 10d52e: 56 push %esi 10d52f: 9d popf } 10d530: 8d 65 f4 lea -0xc(%ebp),%esp 10d533: 5b pop %ebx 10d534: 5e pop %esi 10d535: 5f pop %edi 10d536: c9 leave 10d537: 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 ); 10d538: 89 5d 0c mov %ebx,0xc(%ebp) 10d53b: 8b 43 44 mov 0x44(%ebx),%eax 10d53e: 89 45 08 mov %eax,0x8(%ebp) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 10d541: 8d 65 f4 lea -0xc(%ebp),%esp 10d544: 5b pop %ebx 10d545: 5e pop %esi 10d546: 5f pop %edi 10d547: 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 ); 10d548: e9 bb 0a 00 00 jmp 10e008 <_Thread_queue_Requeue> 10d54d: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 10d550: 83 ec 0c sub $0xc,%esp 10d553: 53 push %ebx 10d554: ff 15 84 21 12 00 call *0x122184 10d55a: 83 c4 10 add $0x10,%esp 10d55d: eb ac jmp 10d50b <_Thread_Change_priority+0x7f> =============================================================================== 0010d560 <_Thread_Clear_state>: */ void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10d560: 55 push %ebp 10d561: 89 e5 mov %esp,%ebp 10d563: 53 push %ebx 10d564: 83 ec 04 sub $0x4,%esp 10d567: 8b 55 08 mov 0x8(%ebp),%edx 10d56a: 8b 45 0c mov 0xc(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10d56d: 9c pushf 10d56e: fa cli 10d56f: 5b pop %ebx current_state = the_thread->current_state; 10d570: 8b 4a 10 mov 0x10(%edx),%ecx if ( current_state & state ) { 10d573: 85 c8 test %ecx,%eax 10d575: 74 0b je 10d582 <_Thread_Clear_state+0x22> 10d577: f7 d0 not %eax 10d579: 21 c8 and %ecx,%eax current_state = the_thread->current_state = _States_Clear( state, current_state ); 10d57b: 89 42 10 mov %eax,0x10(%edx) if ( _States_Is_ready( current_state ) ) { 10d57e: 85 c0 test %eax,%eax 10d580: 74 0a je 10d58c <_Thread_Clear_state+0x2c> _Scheduler_Unblock( the_thread ); } } _ISR_Enable( level ); 10d582: 53 push %ebx 10d583: 9d popf } 10d584: 8b 5d fc mov -0x4(%ebp),%ebx 10d587: c9 leave 10d588: c3 ret 10d589: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Scheduler_Unblock( Thread_Control *the_thread ) { _Scheduler.Operations.unblock( the_thread ); 10d58c: 83 ec 0c sub $0xc,%esp 10d58f: 52 push %edx 10d590: ff 15 74 21 12 00 call *0x122174 10d596: 83 c4 10 add $0x10,%esp 10d599: eb e7 jmp 10d582 <_Thread_Clear_state+0x22> =============================================================================== 0010d710 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10d710: 55 push %ebp 10d711: 89 e5 mov %esp,%ebp 10d713: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10d716: 8d 45 f4 lea -0xc(%ebp),%eax 10d719: 50 push %eax 10d71a: ff 75 08 pushl 0x8(%ebp) 10d71d: e8 c6 01 00 00 call 10d8e8 <_Thread_Get> switch ( location ) { 10d722: 83 c4 10 add $0x10,%esp 10d725: 8b 55 f4 mov -0xc(%ebp),%edx 10d728: 85 d2 test %edx,%edx 10d72a: 75 1c jne 10d748 <_Thread_Delay_ended+0x38><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10d72c: 83 ec 08 sub $0x8,%esp 10d72f: 68 18 00 00 10 push $0x10000018 10d734: 50 push %eax 10d735: e8 26 fe ff ff call 10d560 <_Thread_Clear_state> 10d73a: a1 d0 64 12 00 mov 0x1264d0,%eax 10d73f: 48 dec %eax 10d740: a3 d0 64 12 00 mov %eax,0x1264d0 10d745: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10d748: c9 leave 10d749: c3 ret =============================================================================== 0010d74c <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10d74c: 55 push %ebp 10d74d: 89 e5 mov %esp,%ebp 10d74f: 57 push %edi 10d750: 56 push %esi 10d751: 53 push %ebx 10d752: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10d755: 8b 1d 58 67 12 00 mov 0x126758,%ebx _ISR_Disable( level ); 10d75b: 9c pushf 10d75c: fa cli 10d75d: 58 pop %eax while ( _Thread_Dispatch_necessary == true ) { 10d75e: 8a 15 64 67 12 00 mov 0x126764,%dl 10d764: 84 d2 test %dl,%dl 10d766: 0f 84 3c 01 00 00 je 10d8a8 <_Thread_Dispatch+0x15c> heir = _Thread_Heir; 10d76c: 8b 35 5c 67 12 00 mov 0x12675c,%esi _Thread_Dispatch_disable_level = 1; 10d772: c7 05 d0 64 12 00 01 movl $0x1,0x1264d0 10d779: 00 00 00 _Thread_Dispatch_necessary = false; 10d77c: c6 05 64 67 12 00 00 movb $0x0,0x126764 _Thread_Executing = heir; 10d783: 89 35 58 67 12 00 mov %esi,0x126758 /* * 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 ) 10d789: 39 f3 cmp %esi,%ebx 10d78b: 0f 84 17 01 00 00 je 10d8a8 <_Thread_Dispatch+0x15c> 10d791: 8d 7d d8 lea -0x28(%ebp),%edi 10d794: e9 f5 00 00 00 jmp 10d88e <_Thread_Dispatch+0x142> 10d799: 8d 76 00 lea 0x0(%esi),%esi 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 ); 10d79c: 50 push %eax 10d79d: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10d79e: 83 ec 0c sub $0xc,%esp 10d7a1: 8d 45 e0 lea -0x20(%ebp),%eax 10d7a4: 50 push %eax 10d7a5: e8 56 2f 00 00 call 110700 <_TOD_Get_uptime> _Timestamp_Subtract( 10d7aa: 83 c4 0c add $0xc,%esp 10d7ad: 57 push %edi 10d7ae: 8d 45 e0 lea -0x20(%ebp),%eax 10d7b1: 50 push %eax 10d7b2: 68 8c 65 12 00 push $0x12658c 10d7b7: e8 34 0b 00 00 call 10e2f0 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10d7bc: 58 pop %eax 10d7bd: 5a pop %edx 10d7be: 57 push %edi 10d7bf: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10d7c5: 50 push %eax 10d7c6: e8 e9 0a 00 00 call 10e2b4 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10d7cb: 8b 45 e0 mov -0x20(%ebp),%eax 10d7ce: 8b 55 e4 mov -0x1c(%ebp),%edx 10d7d1: a3 8c 65 12 00 mov %eax,0x12658c 10d7d6: 89 15 90 65 12 00 mov %edx,0x126590 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10d7dc: a1 64 65 12 00 mov 0x126564,%eax 10d7e1: 83 c4 10 add $0x10,%esp 10d7e4: 85 c0 test %eax,%eax 10d7e6: 74 10 je 10d7f8 <_Thread_Dispatch+0xac> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10d7e8: 8b 10 mov (%eax),%edx 10d7ea: 89 93 e0 00 00 00 mov %edx,0xe0(%ebx) *_Thread_libc_reent = heir->libc_reent; 10d7f0: 8b 96 e0 00 00 00 mov 0xe0(%esi),%edx 10d7f6: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10d7f8: 83 ec 08 sub $0x8,%esp 10d7fb: 56 push %esi 10d7fc: 53 push %ebx 10d7fd: e8 8e 0d 00 00 call 10e590 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10d802: 5a pop %edx 10d803: 59 pop %ecx 10d804: 81 c6 c4 00 00 00 add $0xc4,%esi 10d80a: 56 push %esi 10d80b: 8d 83 c4 00 00 00 lea 0xc4(%ebx),%eax 10d811: 50 push %eax 10d812: e8 89 10 00 00 call 10e8a0 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10d817: 83 c4 10 add $0x10,%esp 10d81a: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax 10d820: 85 c0 test %eax,%eax 10d822: 74 36 je 10d85a <_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 ); 10d824: a1 60 65 12 00 mov 0x126560,%eax 10d829: 39 c3 cmp %eax,%ebx 10d82b: 74 2d je 10d85a <_Thread_Dispatch+0x10e> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10d82d: 85 c0 test %eax,%eax 10d82f: 74 11 je 10d842 <_Thread_Dispatch+0xf6> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10d831: 83 ec 0c sub $0xc,%esp 10d834: 05 dc 00 00 00 add $0xdc,%eax 10d839: 50 push %eax 10d83a: e8 95 10 00 00 call 10e8d4 <_CPU_Context_save_fp> 10d83f: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10d842: 83 ec 0c sub $0xc,%esp 10d845: 8d 83 dc 00 00 00 lea 0xdc(%ebx),%eax 10d84b: 50 push %eax 10d84c: e8 8d 10 00 00 call 10e8de <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10d851: 89 1d 60 65 12 00 mov %ebx,0x126560 10d857: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10d85a: 8b 1d 58 67 12 00 mov 0x126758,%ebx _ISR_Disable( level ); 10d860: 9c pushf 10d861: fa cli 10d862: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 10d863: 8a 15 64 67 12 00 mov 0x126764,%dl 10d869: 84 d2 test %dl,%dl 10d86b: 74 3b je 10d8a8 <_Thread_Dispatch+0x15c> heir = _Thread_Heir; 10d86d: 8b 35 5c 67 12 00 mov 0x12675c,%esi _Thread_Dispatch_disable_level = 1; 10d873: c7 05 d0 64 12 00 01 movl $0x1,0x1264d0 10d87a: 00 00 00 _Thread_Dispatch_necessary = false; 10d87d: c6 05 64 67 12 00 00 movb $0x0,0x126764 _Thread_Executing = heir; 10d884: 89 35 58 67 12 00 mov %esi,0x126758 /* * 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 ) 10d88a: 39 de cmp %ebx,%esi 10d88c: 74 1a je 10d8a8 <_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 ) 10d88e: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10d892: 0f 85 04 ff ff ff jne 10d79c <_Thread_Dispatch+0x50> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10d898: 8b 15 a0 64 12 00 mov 0x1264a0,%edx 10d89e: 89 56 78 mov %edx,0x78(%esi) 10d8a1: e9 f6 fe ff ff jmp 10d79c <_Thread_Dispatch+0x50> 10d8a6: 66 90 xchg %ax,%ax _ISR_Disable( level ); } post_switch: _Thread_Dispatch_disable_level = 0; 10d8a8: c7 05 d0 64 12 00 00 movl $0x0,0x1264d0 10d8af: 00 00 00 _ISR_Enable( level ); 10d8b2: 50 push %eax 10d8b3: 9d popf _API_extensions_Run_postswitch(); 10d8b4: e8 c3 e5 ff ff call 10be7c <_API_extensions_Run_postswitch> } 10d8b9: 8d 65 f4 lea -0xc(%ebp),%esp 10d8bc: 5b pop %ebx 10d8bd: 5e pop %esi 10d8be: 5f pop %edi 10d8bf: c9 leave 10d8c0: c3 ret =============================================================================== 0010d8e8 <_Thread_Get>: */ Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10d8e8: 55 push %ebp 10d8e9: 89 e5 mov %esp,%ebp 10d8eb: 53 push %ebx 10d8ec: 83 ec 04 sub $0x4,%esp 10d8ef: 8b 45 08 mov 0x8(%ebp),%eax 10d8f2: 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 ) ) { 10d8f5: 85 c0 test %eax,%eax 10d8f7: 74 4b je 10d944 <_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); 10d8f9: 89 c2 mov %eax,%edx 10d8fb: c1 ea 18 shr $0x18,%edx 10d8fe: 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 ) 10d901: 8d 5a ff lea -0x1(%edx),%ebx 10d904: 83 fb 02 cmp $0x2,%ebx 10d907: 77 2b ja 10d934 <_Thread_Get+0x4c> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10d909: 89 c3 mov %eax,%ebx 10d90b: 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 :) */ 10d90e: 4b dec %ebx 10d90f: 75 23 jne 10d934 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 10d911: 8b 14 95 a8 64 12 00 mov 0x1264a8(,%edx,4),%edx /* * There is no way for this to happen if POSIX is enabled. */ #if !defined(RTEMS_POSIX_API) if ( !api_information ) { 10d918: 85 d2 test %edx,%edx 10d91a: 74 18 je 10d934 <_Thread_Get+0x4c> <== NEVER TAKEN *location = OBJECTS_ERROR; goto done; } #endif information = api_information[ the_class ]; 10d91c: 8b 52 04 mov 0x4(%edx),%edx if ( !information ) { 10d91f: 85 d2 test %edx,%edx 10d921: 74 11 je 10d934 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10d923: 53 push %ebx 10d924: 51 push %ecx 10d925: 50 push %eax 10d926: 52 push %edx 10d927: e8 38 f4 ff ff call 10cd64 <_Objects_Get> 10d92c: 83 c4 10 add $0x10,%esp done: return tp; } 10d92f: 8b 5d fc mov -0x4(%ebp),%ebx 10d932: c9 leave 10d933: c3 ret } #endif information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 10d934: 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; 10d93a: 31 c0 xor %eax,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d93c: 8b 5d fc mov -0x4(%ebp),%ebx 10d93f: c9 leave 10d940: c3 ret 10d941: 8d 76 00 lea 0x0(%esi),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d944: a1 d0 64 12 00 mov 0x1264d0,%eax 10d949: 40 inc %eax 10d94a: a3 d0 64 12 00 mov %eax,0x1264d0 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; 10d94f: c7 01 00 00 00 00 movl $0x0,(%ecx) tp = _Thread_Executing; 10d955: a1 58 67 12 00 mov 0x126758,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d95a: 8b 5d fc mov -0x4(%ebp),%ebx 10d95d: c9 leave 10d95e: c3 ret =============================================================================== 00112110 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 112110: 55 push %ebp 112111: 89 e5 mov %esp,%ebp 112113: 53 push %ebx 112114: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 112117: 8b 1d 58 67 12 00 mov 0x126758,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 11211d: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax _ISR_Set_level(level); 112123: 85 c0 test %eax,%eax 112125: 74 79 je 1121a0 <_Thread_Handler+0x90> 112127: fa cli #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 112128: a0 4c 61 12 00 mov 0x12614c,%al 11212d: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 112130: c6 05 4c 61 12 00 01 movb $0x1,0x12614c #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 112137: 8b 93 dc 00 00 00 mov 0xdc(%ebx),%edx 11213d: 85 d2 test %edx,%edx 11213f: 74 24 je 112165 <_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 ); 112141: a1 60 65 12 00 mov 0x126560,%eax 112146: 39 c3 cmp %eax,%ebx 112148: 74 1b je 112165 <_Thread_Handler+0x55> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 11214a: 85 c0 test %eax,%eax 11214c: 74 11 je 11215f <_Thread_Handler+0x4f> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 11214e: 83 ec 0c sub $0xc,%esp 112151: 05 dc 00 00 00 add $0xdc,%eax 112156: 50 push %eax 112157: e8 78 c7 ff ff call 10e8d4 <_CPU_Context_save_fp> 11215c: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 11215f: 89 1d 60 65 12 00 mov %ebx,0x126560 /* * 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 ); 112165: 83 ec 0c sub $0xc,%esp 112168: 53 push %ebx 112169: e8 86 c2 ff ff call 10e3f4 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 11216e: e8 51 b7 ff ff call 10d8c4 <_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) */ { 112173: 83 c4 10 add $0x10,%esp 112176: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 11217a: 74 28 je 1121a4 <_Thread_Handler+0x94> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 11217c: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax 112182: 85 c0 test %eax,%eax 112184: 74 2d je 1121b3 <_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 ); 112186: 83 ec 0c sub $0xc,%esp 112189: 53 push %ebx 11218a: e8 a1 c2 ff ff call 10e430 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 11218f: 83 c4 0c add $0xc,%esp 112192: 6a 05 push $0x5 112194: 6a 01 push $0x1 112196: 6a 00 push $0x0 112198: e8 83 a6 ff ff call 10c820 <_Internal_error_Occurred> 11219d: 8d 76 00 lea 0x0(%esi),%esi * 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); 1121a0: fb sti 1121a1: eb 85 jmp 112128 <_Thread_Handler+0x18> 1121a3: 90 nop * _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 (); 1121a4: e8 f7 c6 00 00 call 11e8a0 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 1121a9: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax 1121af: 85 c0 test %eax,%eax 1121b1: 75 d3 jne 112186 <_Thread_Handler+0x76> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 1121b3: 83 ec 0c sub $0xc,%esp 1121b6: ff b3 9c 00 00 00 pushl 0x9c(%ebx) 1121bc: ff 93 90 00 00 00 call *0x90(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 1121c2: 89 43 28 mov %eax,0x28(%ebx) 1121c5: 83 c4 10 add $0x10,%esp 1121c8: eb bc jmp 112186 <_Thread_Handler+0x76> =============================================================================== 0010d960 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10d960: 55 push %ebp 10d961: 89 e5 mov %esp,%ebp 10d963: 57 push %edi 10d964: 56 push %esi 10d965: 53 push %ebx 10d966: 83 ec 24 sub $0x24,%esp 10d969: 8b 5d 0c mov 0xc(%ebp),%ebx 10d96c: 8b 75 14 mov 0x14(%ebp),%esi 10d96f: 0f b6 7d 18 movzbl 0x18(%ebp),%edi 10d973: 8a 45 20 mov 0x20(%ebp),%al 10d976: 88 45 e4 mov %al,-0x1c(%ebp) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 10d979: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) 10d980: 00 00 00 10d983: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx) 10d98a: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10d98d: c7 83 e0 00 00 00 00 movl $0x0,0xe0(%ebx) 10d994: 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 ); 10d997: 56 push %esi 10d998: 53 push %ebx 10d999: e8 86 07 00 00 call 10e124 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10d99e: 83 c4 10 add $0x10,%esp 10d9a1: 85 c0 test %eax,%eax 10d9a3: 0f 84 5b 01 00 00 je 10db04 <_Thread_Initialize+0x1a4> 10d9a9: 39 c6 cmp %eax,%esi 10d9ab: 0f 87 53 01 00 00 ja 10db04 <_Thread_Initialize+0x1a4><== NEVER TAKEN Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10d9b1: 8b 93 c0 00 00 00 mov 0xc0(%ebx),%edx 10d9b7: 89 93 b8 00 00 00 mov %edx,0xb8(%ebx) the_stack->size = size; 10d9bd: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 10d9c3: 89 f8 mov %edi,%eax 10d9c5: 84 c0 test %al,%al 10d9c7: 0f 85 47 01 00 00 jne 10db14 <_Thread_Initialize+0x1b4> 10d9cd: 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; 10d9cf: 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; 10d9d1: 89 83 dc 00 00 00 mov %eax,0xdc(%ebx) the_thread->Start.fp_context = fp_area; 10d9d7: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10d9dd: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10d9e4: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10d9eb: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10d9f2: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10d9f9: a1 70 65 12 00 mov 0x126570,%eax 10d9fe: 85 c0 test %eax,%eax 10da00: 0f 85 36 01 00 00 jne 10db3c <_Thread_Initialize+0x1dc> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10da06: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10da0d: 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; 10da10: 31 f6 xor %esi,%esi /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10da12: 8a 45 e4 mov -0x1c(%ebp),%al 10da15: 88 83 a0 00 00 00 mov %al,0xa0(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10da1b: 8b 45 24 mov 0x24(%ebp),%eax 10da1e: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.budget_callout = budget_callout; 10da24: 8b 45 28 mov 0x28(%ebp),%eax 10da27: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10da2d: 8b 45 2c mov 0x2c(%ebp),%eax 10da30: 89 83 ac 00 00 00 mov %eax,0xac(%ebx) the_thread->current_state = STATES_DORMANT; 10da36: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10da3d: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10da44: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->real_priority = priority; 10da4b: 8b 45 1c mov 0x1c(%ebp),%eax 10da4e: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10da51: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); 10da57: 83 ec 0c sub $0xc,%esp 10da5a: 53 push %ebx 10da5b: ff 15 78 21 12 00 call *0x122178 10da61: 89 45 e4 mov %eax,-0x1c(%ebp) sched =_Scheduler_Allocate( the_thread ); if ( !sched ) 10da64: 83 c4 10 add $0x10,%esp 10da67: 85 c0 test %eax,%eax 10da69: 74 42 je 10daad <_Thread_Initialize+0x14d><== NEVER TAKEN goto failed; _Thread_Set_priority( the_thread, priority ); 10da6b: 83 ec 08 sub $0x8,%esp 10da6e: ff 75 1c pushl 0x1c(%ebp) 10da71: 53 push %ebx 10da72: e8 29 06 00 00 call 10e0a0 <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10da77: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10da7e: 00 00 00 10da81: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10da88: 00 00 00 _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 10da8b: 8b 45 08 mov 0x8(%ebp),%eax 10da8e: 8b 40 1c mov 0x1c(%eax),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10da91: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10da95: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10da98: 8b 45 30 mov 0x30(%ebp),%eax 10da9b: 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 ); 10da9e: 89 1c 24 mov %ebx,(%esp) 10daa1: e8 16 0a 00 00 call 10e4bc <_User_extensions_Thread_create> if ( extension_status ) 10daa6: 83 c4 10 add $0x10,%esp 10daa9: 84 c0 test %al,%al 10daab: 75 63 jne 10db10 <_Thread_Initialize+0x1b0> return true; failed: _Workspace_Free( the_thread->libc_reent ); 10daad: 83 ec 0c sub $0xc,%esp 10dab0: ff b3 e0 00 00 00 pushl 0xe0(%ebx) 10dab6: e8 99 0d 00 00 call 10e854 <_Workspace_Free> for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 10dabb: 59 pop %ecx 10dabc: ff b3 e4 00 00 00 pushl 0xe4(%ebx) 10dac2: e8 8d 0d 00 00 call 10e854 <_Workspace_Free> 10dac7: 5a pop %edx 10dac8: ff b3 e8 00 00 00 pushl 0xe8(%ebx) 10dace: e8 81 0d 00 00 call 10e854 <_Workspace_Free> _Workspace_Free( extensions_area ); 10dad3: 89 34 24 mov %esi,(%esp) 10dad6: e8 79 0d 00 00 call 10e854 <_Workspace_Free> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 10dadb: 89 3c 24 mov %edi,(%esp) 10dade: e8 71 0d 00 00 call 10e854 <_Workspace_Free> #endif _Workspace_Free( sched ); 10dae3: 58 pop %eax 10dae4: ff 75 e4 pushl -0x1c(%ebp) 10dae7: e8 68 0d 00 00 call 10e854 <_Workspace_Free> _Thread_Stack_Free( the_thread ); 10daec: 89 1c 24 mov %ebx,(%esp) 10daef: e8 94 06 00 00 call 10e188 <_Thread_Stack_Free> return false; 10daf4: 83 c4 10 add $0x10,%esp 10daf7: 31 c0 xor %eax,%eax } 10daf9: 8d 65 f4 lea -0xc(%ebp),%esp 10dafc: 5b pop %ebx 10dafd: 5e pop %esi 10dafe: 5f pop %edi 10daff: c9 leave 10db00: c3 ret 10db01: 8d 76 00 lea 0x0(%esi),%esi * 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 */ 10db04: 31 c0 xor %eax,%eax _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 10db06: 8d 65 f4 lea -0xc(%ebp),%esp 10db09: 5b pop %ebx 10db0a: 5e pop %esi 10db0b: 5f pop %edi 10db0c: c9 leave 10db0d: c3 ret 10db0e: 66 90 xchg %ax,%ax * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; 10db10: b0 01 mov $0x1,%al 10db12: eb f2 jmp 10db06 <_Thread_Initialize+0x1a6> /* * 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 ); 10db14: 83 ec 0c sub $0xc,%esp 10db17: 6a 6c push $0x6c 10db19: e8 1a 0d 00 00 call 10e838 <_Workspace_Allocate> 10db1e: 89 c7 mov %eax,%edi if ( !fp_area ) 10db20: 83 c4 10 add $0x10,%esp 10db23: 85 c0 test %eax,%eax 10db25: 0f 85 a6 fe ff ff jne 10d9d1 <_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; 10db2b: 31 f6 xor %esi,%esi size_t actual_stack_size = 0; void *stack = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_area; #endif void *sched = NULL; 10db2d: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 10db34: e9 74 ff ff ff jmp 10daad <_Thread_Initialize+0x14d> 10db39: 8d 76 00 lea 0x0(%esi),%esi /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 10db3c: 83 ec 0c sub $0xc,%esp 10db3f: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10db46: 50 push %eax 10db47: e8 ec 0c 00 00 call 10e838 <_Workspace_Allocate> 10db4c: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10db4e: 83 c4 10 add $0x10,%esp 10db51: 85 c0 test %eax,%eax 10db53: 74 26 je 10db7b <_Thread_Initialize+0x21b> goto failed; } the_thread->extensions = (void **) extensions_area; 10db55: 89 83 ec 00 00 00 mov %eax,0xec(%ebx) 10db5b: 8b 0d 70 65 12 00 mov 0x126570,%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++ ) 10db61: 31 d2 xor %edx,%edx (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10db63: 31 c0 xor %eax,%eax 10db65: 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; 10db68: 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++ ) 10db6f: 40 inc %eax 10db70: 89 c2 mov %eax,%edx 10db72: 39 c1 cmp %eax,%ecx 10db74: 73 f2 jae 10db68 <_Thread_Initialize+0x208> 10db76: e9 97 fe ff ff jmp 10da12 <_Thread_Initialize+0xb2> size_t actual_stack_size = 0; void *stack = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_area; #endif void *sched = NULL; 10db7b: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 10db82: e9 26 ff ff ff jmp 10daad <_Thread_Initialize+0x14d> =============================================================================== 001119a0 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 1119a0: 55 push %ebp 1119a1: 89 e5 mov %esp,%ebp 1119a3: 53 push %ebx 1119a4: 83 ec 10 sub $0x10,%esp 1119a7: 8b 5d 08 mov 0x8(%ebp),%ebx the_thread->resource_count = 0; 1119aa: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->is_preemptible = the_thread->Start.is_preemptible; 1119b1: 8a 83 a0 00 00 00 mov 0xa0(%ebx),%al 1119b7: 88 43 74 mov %al,0x74(%ebx) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 1119ba: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax 1119c0: 89 43 7c mov %eax,0x7c(%ebx) the_thread->budget_callout = the_thread->Start.budget_callout; 1119c3: 8b 83 a8 00 00 00 mov 0xa8(%ebx),%eax 1119c9: 89 83 80 00 00 00 mov %eax,0x80(%ebx) the_thread->Start.pointer_argument = pointer_argument; 1119cf: 8b 45 0c mov 0xc(%ebp),%eax 1119d2: 89 83 98 00 00 00 mov %eax,0x98(%ebx) the_thread->Start.numeric_argument = numeric_argument; 1119d8: 8b 45 10 mov 0x10(%ebp),%eax 1119db: 89 83 9c 00 00 00 mov %eax,0x9c(%ebx) if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 1119e1: 53 push %ebx 1119e2: e8 a1 d0 ff ff call 10ea88 <_Thread_queue_Extract_with_proxy> 1119e7: 83 c4 10 add $0x10,%esp 1119ea: 84 c0 test %al,%al 1119ec: 75 06 jne 1119f4 <_Thread_Reset+0x54> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 1119ee: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 1119f2: 74 28 je 111a1c <_Thread_Reset+0x7c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 1119f4: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 1119fa: 39 43 14 cmp %eax,0x14(%ebx) 1119fd: 74 15 je 111a14 <_Thread_Reset+0x74> the_thread->real_priority = the_thread->Start.initial_priority; 1119ff: 89 43 18 mov %eax,0x18(%ebx) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 111a02: 89 45 0c mov %eax,0xc(%ebp) 111a05: 89 5d 08 mov %ebx,0x8(%ebp) } } 111a08: 8b 5d fc mov -0x4(%ebp),%ebx 111a0b: 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 ); 111a0c: e9 53 d2 ff ff jmp 10ec64 <_Thread_Set_priority> 111a11: 8d 76 00 lea 0x0(%esi),%esi } } 111a14: 8b 5d fc mov -0x4(%ebp),%ebx 111a17: c9 leave 111a18: c3 ret 111a19: 8d 76 00 lea 0x0(%esi),%esi 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 ); 111a1c: 83 ec 0c sub $0xc,%esp 111a1f: 8d 43 48 lea 0x48(%ebx),%eax 111a22: 50 push %eax 111a23: e8 ec d8 ff ff call 10f314 <_Watchdog_Remove> 111a28: 83 c4 10 add $0x10,%esp 111a2b: eb c7 jmp 1119f4 <_Thread_Reset+0x54> =============================================================================== 001113d8 <_Thread_Resume>: */ void _Thread_Resume( Thread_Control *the_thread, bool force ) { 1113d8: 55 push %ebp 1113d9: 89 e5 mov %esp,%ebp 1113db: 53 push %ebx 1113dc: 83 ec 04 sub $0x4,%esp 1113df: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 1113e2: 9c pushf 1113e3: fa cli 1113e4: 5b pop %ebx current_state = the_thread->current_state; 1113e5: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 1113e8: f6 c2 02 test $0x2,%dl 1113eb: 74 0a je 1113f7 <_Thread_Resume+0x1f> <== NEVER TAKEN 1113ed: 83 e2 fd and $0xfffffffd,%edx current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); 1113f0: 89 50 10 mov %edx,0x10(%eax) if ( _States_Is_ready( current_state ) ) { 1113f3: 85 d2 test %edx,%edx 1113f5: 74 09 je 111400 <_Thread_Resume+0x28> _Scheduler_Unblock( the_thread ); } } _ISR_Enable( level ); 1113f7: 53 push %ebx 1113f8: 9d popf } 1113f9: 8b 5d fc mov -0x4(%ebp),%ebx 1113fc: c9 leave 1113fd: c3 ret 1113fe: 66 90 xchg %ax,%ax */ RTEMS_INLINE_ROUTINE void _Scheduler_Unblock( Thread_Control *the_thread ) { _Scheduler.Operations.unblock( the_thread ); 111400: 83 ec 0c sub $0xc,%esp 111403: 50 push %eax 111404: ff 15 74 51 12 00 call *0x125174 11140a: 83 c4 10 add $0x10,%esp 11140d: eb e8 jmp 1113f7 <_Thread_Resume+0x1f> =============================================================================== 0010e124 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10e124: 55 push %ebp 10e125: 89 e5 mov %esp,%ebp 10e127: 53 push %ebx 10e128: 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; 10e12b: a1 50 22 12 00 mov 0x122250,%eax 10e130: 8b 5d 0c mov 0xc(%ebp),%ebx 10e133: 39 c3 cmp %eax,%ebx 10e135: 73 02 jae 10e139 <_Thread_Stack_Allocate+0x15> 10e137: 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 ) { 10e139: a1 80 22 12 00 mov 0x122280,%eax 10e13e: 85 c0 test %eax,%eax 10e140: 74 32 je 10e174 <_Thread_Stack_Allocate+0x50> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 10e142: 83 ec 0c sub $0xc,%esp 10e145: 53 push %ebx 10e146: ff d0 call *%eax 10e148: 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 ) 10e14b: 85 c0 test %eax,%eax 10e14d: 74 11 je 10e160 <_Thread_Stack_Allocate+0x3c> the_stack_size = 0; the_thread->Start.stack = stack_addr; 10e14f: 8b 55 08 mov 0x8(%ebp),%edx 10e152: 89 82 c0 00 00 00 mov %eax,0xc0(%edx) return the_stack_size; } 10e158: 89 d8 mov %ebx,%eax 10e15a: 8b 5d fc mov -0x4(%ebp),%ebx 10e15d: c9 leave 10e15e: c3 ret 10e15f: 90 nop the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) the_stack_size = 0; 10e160: 31 db xor %ebx,%ebx the_thread->Start.stack = stack_addr; 10e162: 8b 55 08 mov 0x8(%ebp),%edx 10e165: 89 82 c0 00 00 00 mov %eax,0xc0(%edx) return the_stack_size; } 10e16b: 89 d8 mov %ebx,%eax 10e16d: 8b 5d fc mov -0x4(%ebp),%ebx 10e170: c9 leave 10e171: c3 ret 10e172: 66 90 xchg %ax,%ax RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 10e174: 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 ); 10e177: 83 ec 0c sub $0xc,%esp 10e17a: 53 push %ebx 10e17b: e8 b8 06 00 00 call 10e838 <_Workspace_Allocate> 10e180: 83 c4 10 add $0x10,%esp 10e183: eb c6 jmp 10e14b <_Thread_Stack_Allocate+0x27> =============================================================================== 0010e188 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10e188: 55 push %ebp 10e189: 89 e5 mov %esp,%ebp 10e18b: 83 ec 08 sub $0x8,%esp 10e18e: 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 ) 10e191: a1 84 22 12 00 mov 0x122284,%eax 10e196: 85 c0 test %eax,%eax 10e198: 74 0e je 10e1a8 <_Thread_Stack_Free+0x20> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10e19a: 8b 92 b8 00 00 00 mov 0xb8(%edx),%edx 10e1a0: 89 55 08 mov %edx,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10e1a3: 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 ); 10e1a4: ff e0 jmp *%eax 10e1a6: 66 90 xchg %ax,%ax else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10e1a8: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 10e1ae: 89 45 08 mov %eax,0x8(%ebp) } 10e1b1: 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 ); 10e1b2: e9 9d 06 00 00 jmp 10e854 <_Workspace_Free> =============================================================================== 00110d18 <_Thread_Suspend>: * select map */ void _Thread_Suspend( Thread_Control *the_thread ) { 110d18: 55 push %ebp 110d19: 89 e5 mov %esp,%ebp 110d1b: 53 push %ebx 110d1c: 83 ec 04 sub $0x4,%esp 110d1f: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; _ISR_Disable( level ); 110d22: 9c pushf 110d23: fa cli 110d24: 5b pop %ebx if ( !_States_Is_ready( the_thread->current_state ) ) { 110d25: 8b 50 10 mov 0x10(%eax),%edx 110d28: 85 d2 test %edx,%edx 110d2a: 74 10 je 110d3c <_Thread_Suspend+0x24> 110d2c: 83 ca 02 or $0x2,%edx 110d2f: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 110d32: 53 push %ebx 110d33: 9d popf the_thread->current_state = STATES_SUSPENDED; _Scheduler_Block( the_thread ); _ISR_Enable( level ); } 110d34: 8b 5d fc mov -0x4(%ebp),%ebx 110d37: c9 leave 110d38: c3 ret 110d39: 8d 76 00 lea 0x0(%esi),%esi _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 110d3c: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax) */ RTEMS_INLINE_ROUTINE void _Scheduler_Block( Thread_Control *the_thread ) { _Scheduler.Operations.block( the_thread ); 110d43: 83 ec 0c sub $0xc,%esp 110d46: 50 push %eax 110d47: ff 15 70 21 12 00 call *0x122170 _Scheduler_Block( the_thread ); _ISR_Enable( level ); 110d4d: 53 push %ebx 110d4e: 9d popf 110d4f: 83 c4 10 add $0x10,%esp } 110d52: 8b 5d fc mov -0x4(%ebp),%ebx 110d55: c9 leave 110d56: c3 ret =============================================================================== 0010dc60 <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10dc60: 55 push %ebp 10dc61: 89 e5 mov %esp,%ebp 10dc63: 57 push %edi 10dc64: 56 push %esi 10dc65: 53 push %ebx 10dc66: 83 ec 2c sub $0x2c,%esp 10dc69: 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 ); 10dc6c: 9c pushf 10dc6d: fa cli 10dc6e: 58 pop %eax 10dc6f: 89 f9 mov %edi,%ecx for( index=0 ; 10dc71: 31 d2 xor %edx,%edx #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 10dc73: 8b 19 mov (%ecx),%ebx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10dc75: 8d 34 52 lea (%edx,%edx,2),%esi 10dc78: 8d 74 b7 04 lea 0x4(%edi,%esi,4),%esi _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 ] ) ) { 10dc7c: 39 f3 cmp %esi,%ebx 10dc7e: 75 18 jne 10dc98 <_Thread_queue_Dequeue_priority+0x38> Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10dc80: 42 inc %edx 10dc81: 83 c1 0c add $0xc,%ecx Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 10dc84: 83 fa 04 cmp $0x4,%edx 10dc87: 75 ea jne 10dc73 <_Thread_queue_Dequeue_priority+0x13> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10dc89: 50 push %eax 10dc8a: 9d popf return NULL; 10dc8b: 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 ); } 10dc8d: 89 f0 mov %esi,%eax 10dc8f: 8d 65 f4 lea -0xc(%ebp),%esp 10dc92: 5b pop %ebx 10dc93: 5e pop %esi 10dc94: 5f pop %edi 10dc95: c9 leave 10dc96: c3 ret 10dc97: 90 nop _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 *) _Chain_First( 10dc98: 89 de mov %ebx,%esi */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10dc9a: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 10dca1: 8b 53 38 mov 0x38(%ebx),%edx dequeue: the_thread->Wait.queue = NULL; new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 10dca4: 8b 0b mov (%ebx),%ecx previous_node = the_thread->Object.Node.previous; 10dca6: 8b 7b 04 mov 0x4(%ebx),%edi 10dca9: 89 7d d4 mov %edi,-0x2c(%ebp) 10dcac: 8d 7b 3c lea 0x3c(%ebx),%edi if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 10dcaf: 39 fa cmp %edi,%edx 10dcb1: 74 7f je 10dd32 <_Thread_queue_Dequeue_priority+0xd2> #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 10dcb3: 8b 7b 40 mov 0x40(%ebx),%edi 10dcb6: 89 7d e4 mov %edi,-0x1c(%ebp) next_node = the_thread->Object.Node.next; previous_node = the_thread->Object.Node.previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; 10dcb9: 8b 3a mov (%edx),%edi 10dcbb: 89 7d e0 mov %edi,-0x20(%ebp) previous_node->next = new_first_node; 10dcbe: 8b 7d d4 mov -0x2c(%ebp),%edi 10dcc1: 89 17 mov %edx,(%edi) next_node->previous = new_first_node; 10dcc3: 89 51 04 mov %edx,0x4(%ecx) new_first_node->next = next_node; 10dcc6: 89 0a mov %ecx,(%edx) new_first_node->previous = previous_node; 10dcc8: 89 7a 04 mov %edi,0x4(%edx) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10dccb: 8b 4b 40 mov 0x40(%ebx),%ecx 10dcce: 39 4b 38 cmp %ecx,0x38(%ebx) 10dcd1: 74 17 je 10dcea <_Thread_queue_Dequeue_priority+0x8a> /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); 10dcd3: 8d 4a 38 lea 0x38(%edx),%ecx 10dcd6: 8b 7d e0 mov -0x20(%ebp),%edi 10dcd9: 89 4f 04 mov %ecx,0x4(%edi) tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; 10dcdc: 89 7a 38 mov %edi,0x38(%edx) tail->previous = last_node; 10dcdf: 8b 4d e4 mov -0x1c(%ebp),%ecx 10dce2: 89 4a 40 mov %ecx,0x40(%edx) new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); 10dce5: 83 c2 3c add $0x3c,%edx 10dce8: 89 11 mov %edx,(%ecx) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10dcea: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10dcee: 74 18 je 10dd08 <_Thread_queue_Dequeue_priority+0xa8> _ISR_Enable( level ); 10dcf0: 50 push %eax 10dcf1: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10dcf2: 83 ec 08 sub $0x8,%esp 10dcf5: 68 f8 ff 03 10 push $0x1003fff8 10dcfa: 53 push %ebx 10dcfb: e8 60 f8 ff ff call 10d560 <_Thread_Clear_state> 10dd00: 83 c4 10 add $0x10,%esp 10dd03: eb 88 jmp 10dc8d <_Thread_queue_Dequeue_priority+0x2d> 10dd05: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10dd08: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10dd0f: 50 push %eax 10dd10: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10dd11: 83 ec 0c sub $0xc,%esp 10dd14: 8d 43 48 lea 0x48(%ebx),%eax 10dd17: 50 push %eax 10dd18: e8 f3 09 00 00 call 10e710 <_Watchdog_Remove> 10dd1d: 58 pop %eax 10dd1e: 5a pop %edx 10dd1f: 68 f8 ff 03 10 push $0x1003fff8 10dd24: 53 push %ebx 10dd25: e8 36 f8 ff ff call 10d560 <_Thread_Clear_state> 10dd2a: 83 c4 10 add $0x10,%esp 10dd2d: e9 5b ff ff ff jmp 10dc8d <_Thread_queue_Dequeue_priority+0x2d> head->next = new_second_node; tail->previous = last_node; last_node->next = tail; } } else { previous_node->next = next_node; 10dd32: 8b 7d d4 mov -0x2c(%ebp),%edi 10dd35: 89 0f mov %ecx,(%edi) next_node->previous = previous_node; 10dd37: 89 79 04 mov %edi,0x4(%ecx) 10dd3a: eb ae jmp 10dcea <_Thread_queue_Dequeue_priority+0x8a> =============================================================================== 00110bc0 <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 110bc0: 55 push %ebp 110bc1: 89 e5 mov %esp,%ebp 110bc3: 83 ec 08 sub $0x8,%esp 110bc6: 8b 45 08 mov 0x8(%ebp),%eax 110bc9: 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 ) 110bcc: 83 78 34 01 cmpl $0x1,0x34(%eax) 110bd0: 74 0e je 110be0 <_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 ); 110bd2: 89 55 0c mov %edx,0xc(%ebp) 110bd5: 89 45 08 mov %eax,0x8(%ebp) } 110bd8: 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 ); 110bd9: e9 ee 15 00 00 jmp 1121cc <_Thread_queue_Extract_fifo> 110bde: 66 90 xchg %ax,%ax /* * 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 ); 110be0: 51 push %ecx 110be1: 6a 00 push $0x0 110be3: 52 push %edx 110be4: 50 push %eax 110be5: e8 06 00 00 00 call 110bf0 <_Thread_queue_Extract_priority_helper> 110bea: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 110bed: c9 leave 110bee: c3 ret =============================================================================== 001121cc <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 1121cc: 55 push %ebp 1121cd: 89 e5 mov %esp,%ebp 1121cf: 53 push %ebx 1121d0: 83 ec 04 sub $0x4,%esp 1121d3: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 1121d6: 9c pushf 1121d7: fa cli 1121d8: 58 pop %eax if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 1121d9: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 1121e0: 74 2e je 112210 <_Thread_queue_Extract_fifo+0x44> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 1121e2: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 1121e4: 8b 53 04 mov 0x4(%ebx),%edx next->previous = previous; 1121e7: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 1121ea: 89 0a mov %ecx,(%edx) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 1121ec: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 1121f3: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 1121f7: 74 1f je 112218 <_Thread_queue_Extract_fifo+0x4c> _ISR_Enable( level ); 1121f9: 50 push %eax 1121fa: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 1121fb: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 112202: 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 } 112205: 8b 5d fc mov -0x4(%ebp),%ebx 112208: c9 leave 112209: e9 52 b3 ff ff jmp 10d560 <_Thread_Clear_state> 11220e: 66 90 xchg %ax,%ax ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 112210: 50 push %eax 112211: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 112212: 8b 5d fc mov -0x4(%ebp),%ebx 112215: c9 leave 112216: c3 ret 112217: 90 nop 112218: 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 ); 11221f: 50 push %eax 112220: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 112221: 83 ec 0c sub $0xc,%esp 112224: 8d 43 48 lea 0x48(%ebx),%eax 112227: 50 push %eax 112228: e8 e3 c4 ff ff call 10e710 <_Watchdog_Remove> 11222d: 83 c4 10 add $0x10,%esp 112230: eb c9 jmp 1121fb <_Thread_queue_Extract_fifo+0x2f> =============================================================================== 00110bf0 <_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 ) { 110bf0: 55 push %ebp 110bf1: 89 e5 mov %esp,%ebp 110bf3: 57 push %edi 110bf4: 56 push %esi 110bf5: 53 push %ebx 110bf6: 83 ec 1c sub $0x1c,%esp 110bf9: 8b 5d 0c mov 0xc(%ebp),%ebx 110bfc: 8a 45 10 mov 0x10(%ebp),%al 110bff: 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 ); 110c02: 9c pushf 110c03: fa cli 110c04: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 110c07: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 110c0e: 74 6c je 110c7c <_Thread_queue_Extract_priority_helper+0x8c> /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 110c10: 8b 13 mov (%ebx),%edx previous_node = the_node->previous; 110c12: 8b 4b 04 mov 0x4(%ebx),%ecx #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 110c15: 8b 43 38 mov 0x38(%ebx),%eax RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 110c18: 8d 73 3c lea 0x3c(%ebx),%esi */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 110c1b: 39 f0 cmp %esi,%eax 110c1d: 74 69 je 110c88 <_Thread_queue_Extract_priority_helper+0x98> #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 110c1f: 8b 7b 40 mov 0x40(%ebx),%edi if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; 110c22: 8b 30 mov (%eax),%esi previous_node->next = new_first_node; 110c24: 89 01 mov %eax,(%ecx) next_node->previous = new_first_node; 110c26: 89 42 04 mov %eax,0x4(%edx) new_first_node->next = next_node; 110c29: 89 10 mov %edx,(%eax) new_first_node->previous = previous_node; 110c2b: 89 48 04 mov %ecx,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 110c2e: 8b 53 40 mov 0x40(%ebx),%edx 110c31: 39 53 38 cmp %edx,0x38(%ebx) 110c34: 74 11 je 110c47 <_Thread_queue_Extract_priority_helper+0x57> /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); 110c36: 8d 50 38 lea 0x38(%eax),%edx 110c39: 89 56 04 mov %edx,0x4(%esi) tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; 110c3c: 89 70 38 mov %esi,0x38(%eax) tail->previous = last_node; 110c3f: 89 78 40 mov %edi,0x40(%eax) new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); 110c42: 83 c0 3c add $0x3c,%eax 110c45: 89 07 mov %eax,(%edi) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 110c47: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 110c4b: 75 23 jne 110c70 <_Thread_queue_Extract_priority_helper+0x80> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 110c4d: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 110c51: 74 3d je 110c90 <_Thread_queue_Extract_priority_helper+0xa0> _ISR_Enable( level ); 110c53: ff 75 e4 pushl -0x1c(%ebp) 110c56: 9d popf 110c57: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 110c5e: 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 } 110c61: 8d 65 f4 lea -0xc(%ebp),%esp 110c64: 5b pop %ebx 110c65: 5e pop %esi 110c66: 5f pop %edi 110c67: c9 leave 110c68: e9 f3 c8 ff ff jmp 10d560 <_Thread_Clear_state> 110c6d: 8d 76 00 lea 0x0(%esi),%esi /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 110c70: ff 75 e4 pushl -0x1c(%ebp) 110c73: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 110c74: 8d 65 f4 lea -0xc(%ebp),%esp 110c77: 5b pop %ebx 110c78: 5e pop %esi 110c79: 5f pop %edi 110c7a: c9 leave 110c7b: 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 ); 110c7c: ff 75 e4 pushl -0x1c(%ebp) 110c7f: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 110c80: 8d 65 f4 lea -0xc(%ebp),%esp 110c83: 5b pop %ebx 110c84: 5e pop %esi 110c85: 5f pop %edi 110c86: c9 leave 110c87: c3 ret head->next = new_second_node; tail->previous = last_node; last_node->next = tail; } } else { previous_node->next = next_node; 110c88: 89 11 mov %edx,(%ecx) next_node->previous = previous_node; 110c8a: 89 4a 04 mov %ecx,0x4(%edx) 110c8d: eb b8 jmp 110c47 <_Thread_queue_Extract_priority_helper+0x57> 110c8f: 90 nop 110c90: 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 ); 110c97: ff 75 e4 pushl -0x1c(%ebp) 110c9a: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 110c9b: 83 ec 0c sub $0xc,%esp 110c9e: 8d 43 48 lea 0x48(%ebx),%eax 110ca1: 50 push %eax 110ca2: e8 69 da ff ff call 10e710 <_Watchdog_Remove> 110ca7: 83 c4 10 add $0x10,%esp 110caa: eb ab jmp 110c57 <_Thread_queue_Extract_priority_helper+0x67> =============================================================================== 0010df4c <_Thread_queue_Extract_with_proxy>: */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 10df4c: 55 push %ebp 10df4d: 89 e5 mov %esp,%ebp 10df4f: 83 ec 08 sub $0x8,%esp 10df52: 8b 45 08 mov 0x8(%ebp),%eax States_Control state; state = the_thread->current_state; if ( _States_Is_waiting_on_thread_queue( state ) ) { 10df55: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax) 10df5c: 75 06 jne 10df64 <_Thread_queue_Extract_with_proxy+0x18> #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); return true; } return false; 10df5e: 31 c0 xor %eax,%eax } 10df60: c9 leave 10df61: c3 ret 10df62: 66 90 xchg %ax,%ax if ( proxy_extract_callout ) (*proxy_extract_callout)( the_thread ); } #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 10df64: 83 ec 08 sub $0x8,%esp 10df67: 50 push %eax 10df68: ff 70 44 pushl 0x44(%eax) 10df6b: e8 50 2c 00 00 call 110bc0 <_Thread_queue_Extract> return true; 10df70: 83 c4 10 add $0x10,%esp 10df73: b0 01 mov $0x1,%al } return false; } 10df75: c9 leave 10df76: c3 ret =============================================================================== 0011f00c <_Thread_queue_First>: */ Thread_Control *_Thread_queue_First( Thread_queue_Control *the_thread_queue ) { 11f00c: 55 push %ebp 11f00d: 89 e5 mov %esp,%ebp 11f00f: 83 ec 08 sub $0x8,%esp 11f012: 8b 45 08 mov 0x8(%ebp),%eax Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 11f015: 83 78 34 01 cmpl $0x1,0x34(%eax) 11f019: 74 0d je 11f028 <_Thread_queue_First+0x1c> first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; 11f01b: ba 9c 03 12 00 mov $0x12039c,%edx return (*first_p)( the_thread_queue ); 11f020: 89 45 08 mov %eax,0x8(%ebp) } 11f023: 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 ); 11f024: ff e2 jmp *%edx 11f026: 66 90 xchg %ax,%ax ) { Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) first_p = _Thread_queue_First_priority; 11f028: ba 34 f0 11 00 mov $0x11f034,%edx else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 11f02d: 89 45 08 mov %eax,0x8(%ebp) } 11f030: 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 ); 11f031: ff e2 jmp *%edx =============================================================================== 0012039c <_Thread_queue_First_fifo>: */ Thread_Control *_Thread_queue_First_fifo( Thread_queue_Control *the_thread_queue ) { 12039c: 55 push %ebp 12039d: 89 e5 mov %esp,%ebp 12039f: 8b 55 08 mov 0x8(%ebp),%edx if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) return (Thread_Control *) _Chain_First( &the_thread_queue->Queues.Fifo ); return NULL; } 1203a2: 8b 02 mov (%edx),%eax RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 1203a4: 83 c2 04 add $0x4,%edx Thread_Control *_Thread_queue_First_fifo( Thread_queue_Control *the_thread_queue ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) 1203a7: 39 d0 cmp %edx,%eax 1203a9: 74 05 je 1203b0 <_Thread_queue_First_fifo+0x14> return (Thread_Control *) _Chain_First( &the_thread_queue->Queues.Fifo ); return NULL; } 1203ab: c9 leave 1203ac: c3 ret 1203ad: 8d 76 00 lea 0x0(%esi),%esi ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) return (Thread_Control *) _Chain_First( &the_thread_queue->Queues.Fifo ); return NULL; 1203b0: 31 c0 xor %eax,%eax } 1203b2: c9 leave 1203b3: c3 ret =============================================================================== 0010df78 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 10df78: 55 push %ebp 10df79: 89 e5 mov %esp,%ebp 10df7b: 56 push %esi 10df7c: 53 push %ebx 10df7d: 8b 5d 08 mov 0x8(%ebp),%ebx 10df80: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10df83: eb 06 jmp 10df8b <_Thread_queue_Flush+0x13> 10df85: 8d 76 00 lea 0x0(%esi),%esi #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; 10df88: 89 70 34 mov %esi,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10df8b: 83 ec 0c sub $0xc,%esp 10df8e: 53 push %ebx 10df8f: e8 80 fc ff ff call 10dc14 <_Thread_queue_Dequeue> 10df94: 83 c4 10 add $0x10,%esp 10df97: 85 c0 test %eax,%eax 10df99: 75 ed jne 10df88 <_Thread_queue_Flush+0x10> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10df9b: 8d 65 f8 lea -0x8(%ebp),%esp 10df9e: 5b pop %ebx 10df9f: 5e pop %esi 10dfa0: c9 leave 10dfa1: c3 ret =============================================================================== 0010dfa4 <_Thread_queue_Initialize>: Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 10dfa4: 55 push %ebp 10dfa5: 89 e5 mov %esp,%ebp 10dfa7: 56 push %esi 10dfa8: 53 push %ebx 10dfa9: 8b 45 08 mov 0x8(%ebp),%eax 10dfac: 8b 55 0c mov 0xc(%ebp),%edx the_thread_queue->state = state; 10dfaf: 8b 4d 10 mov 0x10(%ebp),%ecx 10dfb2: 89 48 38 mov %ecx,0x38(%eax) the_thread_queue->discipline = the_discipline; 10dfb5: 89 50 34 mov %edx,0x34(%eax) the_thread_queue->timeout_status = timeout_status; 10dfb8: 8b 4d 14 mov 0x14(%ebp),%ecx 10dfbb: 89 48 3c mov %ecx,0x3c(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10dfbe: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10dfc5: 83 fa 01 cmp $0x1,%edx 10dfc8: 74 16 je 10dfe0 <_Thread_queue_Initialize+0x3c> RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 10dfca: 8d 50 04 lea 0x4(%eax),%edx 10dfcd: 89 10 mov %edx,(%eax) head->next = tail; head->previous = NULL; 10dfcf: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) tail->previous = head; 10dfd6: 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 ); } } 10dfd9: 5b pop %ebx 10dfda: 5e pop %esi 10dfdb: c9 leave 10dfdc: c3 ret 10dfdd: 8d 76 00 lea 0x0(%esi),%esi 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 ) { 10dfe0: 89 c1 mov %eax,%ecx 10dfe2: 30 d2 xor %dl,%dl RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 10dfe4: 8d 1c 52 lea (%edx,%edx,2),%ebx 10dfe7: 8d 1c 98 lea (%eax,%ebx,4),%ebx 10dfea: 8d 73 04 lea 0x4(%ebx),%esi 10dfed: 89 31 mov %esi,(%ecx) head->next = tail; head->previous = NULL; 10dfef: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 10dff6: 89 59 08 mov %ebx,0x8(%ecx) uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) 10dff9: 42 inc %edx 10dffa: 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 ; 10dffd: 83 fa 04 cmp $0x4,%edx 10e000: 75 e2 jne 10dfe4 <_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 ); } } 10e002: 5b pop %ebx 10e003: 5e pop %esi 10e004: c9 leave 10e005: c3 ret =============================================================================== 0010e008 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10e008: 55 push %ebp 10e009: 89 e5 mov %esp,%ebp 10e00b: 57 push %edi 10e00c: 56 push %esi 10e00d: 53 push %ebx 10e00e: 83 ec 1c sub $0x1c,%esp 10e011: 8b 75 08 mov 0x8(%ebp),%esi 10e014: 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 ) 10e017: 85 f6 test %esi,%esi 10e019: 74 06 je 10e021 <_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 ) { 10e01b: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10e01f: 74 0b je 10e02c <_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 ); } } 10e021: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10e024: 5b pop %ebx <== NOT EXECUTED 10e025: 5e pop %esi <== NOT EXECUTED 10e026: 5f pop %edi <== NOT EXECUTED 10e027: c9 leave <== NOT EXECUTED 10e028: c3 ret <== NOT EXECUTED 10e029: 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 ); 10e02c: 9c pushf 10e02d: fa cli 10e02e: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10e02f: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10e036: 75 0c jne 10e044 <_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 ); 10e038: 53 push %ebx 10e039: 9d popf } } 10e03a: 8d 65 f4 lea -0xc(%ebp),%esp 10e03d: 5b pop %ebx 10e03e: 5e pop %esi 10e03f: 5f pop %edi 10e040: c9 leave 10e041: c3 ret 10e042: 66 90 xchg %ax,%ax 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; 10e044: 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 ); 10e04b: 50 push %eax 10e04c: 6a 01 push $0x1 10e04e: 57 push %edi 10e04f: 56 push %esi 10e050: e8 9b 2b 00 00 call 110bf0 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10e055: 83 c4 0c add $0xc,%esp 10e058: 8d 45 e4 lea -0x1c(%ebp),%eax 10e05b: 50 push %eax 10e05c: 57 push %edi 10e05d: 56 push %esi 10e05e: e8 71 fd ff ff call 10ddd4 <_Thread_queue_Enqueue_priority> 10e063: 83 c4 10 add $0x10,%esp 10e066: eb d0 jmp 10e038 <_Thread_queue_Requeue+0x30> =============================================================================== 0010e068 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10e068: 55 push %ebp 10e069: 89 e5 mov %esp,%ebp 10e06b: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10e06e: 8d 45 f4 lea -0xc(%ebp),%eax 10e071: 50 push %eax 10e072: ff 75 08 pushl 0x8(%ebp) 10e075: e8 6e f8 ff ff call 10d8e8 <_Thread_Get> switch ( location ) { 10e07a: 83 c4 10 add $0x10,%esp 10e07d: 8b 55 f4 mov -0xc(%ebp),%edx 10e080: 85 d2 test %edx,%edx 10e082: 75 17 jne 10e09b <_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 ); 10e084: 83 ec 0c sub $0xc,%esp 10e087: 50 push %eax 10e088: e8 1f 2c 00 00 call 110cac <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10e08d: a1 d0 64 12 00 mov 0x1264d0,%eax 10e092: 48 dec %eax 10e093: a3 d0 64 12 00 mov %eax,0x1264d0 10e098: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10e09b: c9 leave 10e09c: c3 ret =============================================================================== 00118db8 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 118db8: 55 push %ebp 118db9: 89 e5 mov %esp,%ebp 118dbb: 57 push %edi 118dbc: 56 push %esi 118dbd: 53 push %ebx 118dbe: 83 ec 4c sub $0x4c,%esp 118dc1: 8b 5d 08 mov 0x8(%ebp),%ebx ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 118dc4: 8d 45 e0 lea -0x20(%ebp),%eax 118dc7: 89 45 b4 mov %eax,-0x4c(%ebp) 118dca: 89 45 dc mov %eax,-0x24(%ebp) head->previous = NULL; 118dcd: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) tail->previous = head; 118dd4: 8d 4d dc lea -0x24(%ebp),%ecx 118dd7: 89 4d e4 mov %ecx,-0x1c(%ebp) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 118dda: 8d 7d d0 lea -0x30(%ebp),%edi 118ddd: 8d 45 d4 lea -0x2c(%ebp),%eax 118de0: 89 45 b0 mov %eax,-0x50(%ebp) 118de3: 89 45 d0 mov %eax,-0x30(%ebp) head->previous = NULL; 118de6: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) tail->previous = head; 118ded: 89 7d d8 mov %edi,-0x28(%ebp) 118df0: 8d 73 30 lea 0x30(%ebx),%esi 118df3: 8d 4b 68 lea 0x68(%ebx),%ecx 118df6: 89 4d c4 mov %ecx,-0x3c(%ebp) 118df9: 8d 43 08 lea 0x8(%ebx),%eax 118dfc: 89 45 bc mov %eax,-0x44(%ebp) 118dff: 8d 53 40 lea 0x40(%ebx),%edx 118e02: 89 55 c0 mov %edx,-0x40(%ebp) 118e05: 8d 76 00 lea 0x0(%esi),%esi Chain_Control *tmp; /* * 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; 118e08: 8d 4d dc lea -0x24(%ebp),%ecx 118e0b: 89 4b 78 mov %ecx,0x78(%ebx) 118e0e: 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; 118e10: a1 44 0a 14 00 mov 0x140a44,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 118e15: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 118e18: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118e1b: 51 push %ecx 118e1c: 57 push %edi Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 118e1d: 29 d0 sub %edx,%eax watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118e1f: 50 push %eax 118e20: 56 push %esi 118e21: e8 ea 3d 00 00 call 11cc10 <_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(); 118e26: a1 a8 09 14 00 mov 0x1409a8,%eax Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 118e2b: 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 ) { 118e2e: 83 c4 10 add $0x10,%esp 118e31: 39 d0 cmp %edx,%eax 118e33: 0f 87 af 00 00 00 ja 118ee8 <_Timer_server_Body+0x130> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 118e39: 0f 82 c9 00 00 00 jb 118f08 <_Timer_server_Body+0x150> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 118e3f: 89 43 74 mov %eax,0x74(%ebx) 118e42: 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 ); 118e44: 8b 43 78 mov 0x78(%ebx),%eax 118e47: 83 ec 0c sub $0xc,%esp 118e4a: 50 push %eax 118e4b: e8 c0 09 00 00 call 119810 <_Chain_Get> if ( timer == NULL ) { 118e50: 83 c4 10 add $0x10,%esp 118e53: 85 c0 test %eax,%eax 118e55: 74 35 je 118e8c <_Timer_server_Body+0xd4><== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118e57: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 118e5a: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 118e5d: 74 19 je 118e78 <_Timer_server_Body+0xc0><== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 118e5f: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 118e62: 75 e0 jne 118e44 <_Timer_server_Body+0x8c><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 118e64: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118e67: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 118e6a: 50 push %eax <== NOT EXECUTED 118e6b: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 118e6e: e8 29 3e 00 00 call 11cc9c <_Watchdog_Insert> <== NOT EXECUTED 118e73: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118e76: eb cc jmp 118e44 <_Timer_server_Body+0x8c><== 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 ); 118e78: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118e7b: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 118e7e: 50 push %eax <== NOT EXECUTED 118e7f: 56 push %esi <== NOT EXECUTED 118e80: e8 17 3e 00 00 call 11cc9c <_Watchdog_Insert> <== NOT EXECUTED 118e85: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118e88: eb ba jmp 118e44 <_Timer_server_Body+0x8c><== NOT EXECUTED 118e8a: 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 ); 118e8c: 9c pushf 118e8d: fa cli 118e8e: 58 pop %eax tmp = ts->insert_chain; 118e8f: 8b 53 78 mov 0x78(%ebx),%edx if ( _Chain_Is_empty( insert_chain ) ) { 118e92: 8b 55 b4 mov -0x4c(%ebp),%edx 118e95: 39 55 dc cmp %edx,-0x24(%ebp) 118e98: 0f 84 86 00 00 00 je 118f24 <_Timer_server_Body+0x16c><== ALWAYS TAKEN 118e9e: b2 01 mov $0x1,%dl <== NOT EXECUTED ts->insert_chain = NULL; do_loop = false; } _ISR_Enable( level ); 118ea0: 50 push %eax 118ea1: 9d popf * 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; while ( do_loop ) { 118ea2: 84 d2 test %dl,%dl 118ea4: 0f 85 66 ff ff ff jne 118e10 <_Timer_server_Body+0x58><== NEVER TAKEN _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 ) ) { 118eaa: 8b 4d b0 mov -0x50(%ebp),%ecx 118ead: 39 4d d0 cmp %ecx,-0x30(%ebp) 118eb0: 75 22 jne 118ed4 <_Timer_server_Body+0x11c> 118eb2: eb 7e jmp 118f32 <_Timer_server_Body+0x17a> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 118eb4: 8b 10 mov (%eax),%edx head->next = new_first; 118eb6: 89 55 d0 mov %edx,-0x30(%ebp) new_first->previous = head; 118eb9: 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; 118ebc: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 118ec3: 51 push %ecx 118ec4: 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 ); 118ec5: 83 ec 08 sub $0x8,%esp 118ec8: ff 70 24 pushl 0x24(%eax) 118ecb: ff 70 20 pushl 0x20(%eax) 118ece: ff 50 1c call *0x1c(%eax) } 118ed1: 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 ); 118ed4: 9c pushf 118ed5: fa cli 118ed6: 59 pop %ecx initialized = false; } #endif return status; } 118ed7: 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)) 118eda: 3b 45 b0 cmp -0x50(%ebp),%eax 118edd: 75 d5 jne 118eb4 <_Timer_server_Body+0xfc> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 118edf: 51 push %ecx 118ee0: 9d popf 118ee1: e9 22 ff ff ff jmp 118e08 <_Timer_server_Body+0x50> 118ee6: 66 90 xchg %ax,%ax /* * 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 ); 118ee8: 51 push %ecx 118ee9: 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; 118eea: 89 c1 mov %eax,%ecx 118eec: 29 d1 sub %edx,%ecx _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118eee: 51 push %ecx 118eef: ff 75 c4 pushl -0x3c(%ebp) 118ef2: 89 45 b8 mov %eax,-0x48(%ebp) 118ef5: e8 16 3d 00 00 call 11cc10 <_Watchdog_Adjust_to_chain> 118efa: 83 c4 10 add $0x10,%esp 118efd: 8b 45 b8 mov -0x48(%ebp),%eax 118f00: e9 3a ff ff ff jmp 118e3f <_Timer_server_Body+0x87> 118f05: 8d 76 00 lea 0x0(%esi),%esi /* * 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 ); 118f08: 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; 118f09: 29 c2 sub %eax,%edx _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 118f0b: 52 push %edx 118f0c: 6a 01 push $0x1 118f0e: ff 75 c4 pushl -0x3c(%ebp) 118f11: 89 45 b8 mov %eax,-0x48(%ebp) 118f14: e8 7f 3c 00 00 call 11cb98 <_Watchdog_Adjust> 118f19: 83 c4 10 add $0x10,%esp 118f1c: 8b 45 b8 mov -0x48(%ebp),%eax 118f1f: e9 1b ff ff ff jmp 118e3f <_Timer_server_Body+0x87> _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); tmp = ts->insert_chain; if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 118f24: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) do_loop = false; 118f2b: 31 d2 xor %edx,%edx 118f2d: e9 6e ff ff ff jmp 118ea0 <_Timer_server_Body+0xe8> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 118f32: c6 43 7c 00 movb $0x0,0x7c(%ebx) 118f36: a1 10 09 14 00 mov 0x140910,%eax 118f3b: 40 inc %eax 118f3c: a3 10 09 14 00 mov %eax,0x140910 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 118f41: 83 ec 08 sub $0x8,%esp 118f44: 6a 08 push $0x8 118f46: ff 33 pushl (%ebx) 118f48: e8 6b 36 00 00 call 11c5b8 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 118f4d: 89 d8 mov %ebx,%eax 118f4f: e8 c4 fd ff ff call 118d18 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 118f54: 89 d8 mov %ebx,%eax 118f56: e8 0d fe ff ff call 118d68 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 118f5b: e8 a4 2d 00 00 call 11bd04 <_Thread_Enable_dispatch> ts->active = true; 118f60: 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 ); 118f64: 5a pop %edx 118f65: ff 75 bc pushl -0x44(%ebp) 118f68: e8 6f 3e 00 00 call 11cddc <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 118f6d: 58 pop %eax 118f6e: ff 75 c0 pushl -0x40(%ebp) 118f71: e8 66 3e 00 00 call 11cddc <_Watchdog_Remove> 118f76: 83 c4 10 add $0x10,%esp 118f79: e9 8a fe ff ff jmp 118e08 <_Timer_server_Body+0x50> =============================================================================== 00118f80 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 118f80: 55 push %ebp 118f81: 89 e5 mov %esp,%ebp 118f83: 57 push %edi 118f84: 56 push %esi 118f85: 53 push %ebx 118f86: 83 ec 2c sub $0x2c,%esp 118f89: 8b 5d 08 mov 0x8(%ebp),%ebx 118f8c: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 118f8f: 8b 53 78 mov 0x78(%ebx),%edx 118f92: 85 d2 test %edx,%edx 118f94: 74 16 je 118fac <_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 ); 118f96: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 118f99: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 118f9c: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 118f9f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 118fa2: 5b pop %ebx <== NOT EXECUTED 118fa3: 5e pop %esi <== NOT EXECUTED 118fa4: 5f pop %edi <== NOT EXECUTED 118fa5: 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 ); 118fa6: e9 29 08 00 00 jmp 1197d4 <_Chain_Append> <== NOT EXECUTED 118fab: 90 nop <== NOT EXECUTED 118fac: 8b 15 10 09 14 00 mov 0x140910,%edx 118fb2: 42 inc %edx 118fb3: 89 15 10 09 14 00 mov %edx,0x140910 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118fb9: 8b 50 38 mov 0x38(%eax),%edx 118fbc: 83 fa 01 cmp $0x1,%edx 118fbf: 74 7b je 11903c <_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 ) { 118fc1: 83 fa 03 cmp $0x3,%edx 118fc4: 74 0e je 118fd4 <_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 ); } } 118fc6: 8d 65 f4 lea -0xc(%ebp),%esp 118fc9: 5b pop %ebx 118fca: 5e pop %esi 118fcb: 5f pop %edi 118fcc: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 118fcd: e9 32 2d 00 00 jmp 11bd04 <_Thread_Enable_dispatch> 118fd2: 66 90 xchg %ax,%ax } 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 ); 118fd4: 9c pushf 118fd5: fa cli 118fd6: 8f 45 e4 popl -0x1c(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 118fd9: 8b 0d a8 09 14 00 mov 0x1409a8,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 118fdf: 8b 53 74 mov 0x74(%ebx),%edx 118fe2: 89 55 d4 mov %edx,-0x2c(%ebp) initialized = false; } #endif return status; } 118fe5: 8b 53 68 mov 0x68(%ebx),%edx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 118fe8: 8d 7b 6c lea 0x6c(%ebx),%edi * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 118feb: 39 fa cmp %edi,%edx 118fed: 74 21 je 119010 <_Timer_server_Schedule_operation_method+0x90> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 118fef: 8b 7a 10 mov 0x10(%edx),%edi if ( snapshot > last_snapshot ) { 118ff2: 3b 4d d4 cmp -0x2c(%ebp),%ecx 118ff5: 0f 86 a1 00 00 00 jbe 11909c <_Timer_server_Schedule_operation_method+0x11c> /* * We advanced in time. */ delta = snapshot - last_snapshot; 118ffb: 89 ce mov %ecx,%esi 118ffd: 2b 75 d4 sub -0x2c(%ebp),%esi 119000: 89 75 d4 mov %esi,-0x2c(%ebp) if (delta_interval > delta) { 119003: 39 f7 cmp %esi,%edi 119005: 0f 86 9b 00 00 00 jbe 1190a6 <_Timer_server_Schedule_operation_method+0x126><== NEVER TAKEN delta_interval -= delta; 11900b: 29 f7 sub %esi,%edi * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 11900d: 89 7a 10 mov %edi,0x10(%edx) } ts->TOD_watchdogs.last_snapshot = snapshot; 119010: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 119013: ff 75 e4 pushl -0x1c(%ebp) 119016: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 119017: 83 ec 08 sub $0x8,%esp 11901a: 83 c0 10 add $0x10,%eax 11901d: 50 push %eax 11901e: 8d 43 68 lea 0x68(%ebx),%eax 119021: 50 push %eax 119022: e8 75 3c 00 00 call 11cc9c <_Watchdog_Insert> if ( !ts->active ) { 119027: 8a 43 7c mov 0x7c(%ebx),%al 11902a: 83 c4 10 add $0x10,%esp 11902d: 84 c0 test %al,%al 11902f: 75 95 jne 118fc6 <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_tod_system_watchdog( ts ); 119031: 89 d8 mov %ebx,%eax 119033: e8 30 fd ff ff call 118d68 <_Timer_server_Reset_tod_system_watchdog> 119038: eb 8c jmp 118fc6 <_Timer_server_Schedule_operation_method+0x46> 11903a: 66 90 xchg %ax,%ax 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 ); 11903c: 9c pushf 11903d: fa cli 11903e: 8f 45 e4 popl -0x1c(%ebp) snapshot = _Watchdog_Ticks_since_boot; 119041: 8b 0d 44 0a 14 00 mov 0x140a44,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 119047: 8b 7b 3c mov 0x3c(%ebx),%edi initialized = false; } #endif return status; } 11904a: 8b 53 30 mov 0x30(%ebx),%edx 11904d: 8d 73 34 lea 0x34(%ebx),%esi * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = _Watchdog_Ticks_since_boot; last_snapshot = ts->Interval_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 119050: 39 f2 cmp %esi,%edx 119052: 74 10 je 119064 <_Timer_server_Schedule_operation_method+0xe4> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 119054: 89 ce mov %ecx,%esi 119056: 29 fe sub %edi,%esi delta_interval = first_watchdog->delta_interval; 119058: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 11905b: 39 fe cmp %edi,%esi 11905d: 73 39 jae 119098 <_Timer_server_Schedule_operation_method+0x118> delta_interval -= delta; 11905f: 29 f7 sub %esi,%edi } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 119061: 89 7a 10 mov %edi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 119064: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 119067: ff 75 e4 pushl -0x1c(%ebp) 11906a: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 11906b: 83 ec 08 sub $0x8,%esp 11906e: 83 c0 10 add $0x10,%eax 119071: 50 push %eax 119072: 8d 43 30 lea 0x30(%ebx),%eax 119075: 50 push %eax 119076: e8 21 3c 00 00 call 11cc9c <_Watchdog_Insert> if ( !ts->active ) { 11907b: 8a 43 7c mov 0x7c(%ebx),%al 11907e: 83 c4 10 add $0x10,%esp 119081: 84 c0 test %al,%al 119083: 0f 85 3d ff ff ff jne 118fc6 <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_interval_system_watchdog( ts ); 119089: 89 d8 mov %ebx,%eax 11908b: e8 88 fc ff ff call 118d18 <_Timer_server_Reset_interval_system_watchdog> 119090: e9 31 ff ff ff jmp 118fc6 <_Timer_server_Schedule_operation_method+0x46> 119095: 8d 76 00 lea 0x0(%esi),%esi delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 119098: 31 ff xor %edi,%edi 11909a: eb c5 jmp 119061 <_Timer_server_Schedule_operation_method+0xe1> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 11909c: 03 7d d4 add -0x2c(%ebp),%edi delta_interval += delta; 11909f: 29 cf sub %ecx,%edi 1190a1: e9 67 ff ff ff jmp 11900d <_Timer_server_Schedule_operation_method+0x8d> */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 1190a6: 31 ff xor %edi,%edi <== NOT EXECUTED 1190a8: e9 60 ff ff ff jmp 11900d <_Timer_server_Schedule_operation_method+0x8d><== NOT EXECUTED =============================================================================== 0010fadc <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 10fadc: 55 push %ebp 10fadd: 89 e5 mov %esp,%ebp 10fadf: 57 push %edi 10fae0: 56 push %esi 10fae1: 53 push %ebx 10fae2: 83 ec 2c sub $0x2c,%esp 10fae5: 8b 45 08 mov 0x8(%ebp),%eax 10fae8: 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; 10faeb: 8b 38 mov (%eax),%edi left += lhs->tv_nsec; 10faed: 8b 70 04 mov 0x4(%eax),%esi right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10faf0: bb 00 ca 9a 3b mov $0x3b9aca00,%ebx 10faf5: 8b 01 mov (%ecx),%eax 10faf7: f7 eb imul %ebx 10faf9: 89 45 e0 mov %eax,-0x20(%ebp) 10fafc: 89 55 e4 mov %edx,-0x1c(%ebp) right += rhs->tv_nsec; 10faff: 8b 41 04 mov 0x4(%ecx),%eax 10fb02: 99 cltd 10fb03: 01 45 e0 add %eax,-0x20(%ebp) 10fb06: 11 55 e4 adc %edx,-0x1c(%ebp) if ( right == 0 ) { 10fb09: 8b 55 e4 mov -0x1c(%ebp),%edx 10fb0c: 0b 55 e0 or -0x20(%ebp),%edx 10fb0f: 74 73 je 10fb84 <_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; 10fb11: 89 f8 mov %edi,%eax 10fb13: f7 eb imul %ebx 10fb15: 89 45 d0 mov %eax,-0x30(%ebp) 10fb18: 89 55 d4 mov %edx,-0x2c(%ebp) left += lhs->tv_nsec; 10fb1b: 89 f7 mov %esi,%edi 10fb1d: c1 ff 1f sar $0x1f,%edi 10fb20: 01 75 d0 add %esi,-0x30(%ebp) 10fb23: 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; 10fb26: 69 4d d4 a0 86 01 00 imul $0x186a0,-0x2c(%ebp),%ecx 10fb2d: bb a0 86 01 00 mov $0x186a0,%ebx 10fb32: 8b 45 d0 mov -0x30(%ebp),%eax 10fb35: f7 e3 mul %ebx 10fb37: 8d 34 11 lea (%ecx,%edx,1),%esi 10fb3a: ff 75 e4 pushl -0x1c(%ebp) 10fb3d: ff 75 e0 pushl -0x20(%ebp) 10fb40: 56 push %esi 10fb41: 50 push %eax 10fb42: e8 85 03 01 00 call 11fecc <__udivdi3> 10fb47: 83 c4 10 add $0x10,%esp 10fb4a: 89 c3 mov %eax,%ebx 10fb4c: 89 d6 mov %edx,%esi *ival_percentage = answer / 1000; 10fb4e: 6a 00 push $0x0 10fb50: 68 e8 03 00 00 push $0x3e8 10fb55: 52 push %edx 10fb56: 50 push %eax 10fb57: e8 70 03 01 00 call 11fecc <__udivdi3> 10fb5c: 83 c4 10 add $0x10,%esp 10fb5f: 8b 55 10 mov 0x10(%ebp),%edx 10fb62: 89 02 mov %eax,(%edx) *fval_percentage = answer % 1000; 10fb64: 6a 00 push $0x0 10fb66: 68 e8 03 00 00 push $0x3e8 10fb6b: 56 push %esi 10fb6c: 53 push %ebx 10fb6d: e8 6a 04 01 00 call 11ffdc <__umoddi3> 10fb72: 83 c4 10 add $0x10,%esp 10fb75: 8b 55 14 mov 0x14(%ebp),%edx 10fb78: 89 02 mov %eax,(%edx) } 10fb7a: 8d 65 f4 lea -0xc(%ebp),%esp 10fb7d: 5b pop %ebx 10fb7e: 5e pop %esi 10fb7f: 5f pop %edi 10fb80: c9 leave 10fb81: c3 ret 10fb82: 66 90 xchg %ax,%ax left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; if ( right == 0 ) { *ival_percentage = 0; 10fb84: 8b 45 10 mov 0x10(%ebp),%eax 10fb87: c7 00 00 00 00 00 movl $0x0,(%eax) *fval_percentage = 0; 10fb8d: 8b 55 14 mov 0x14(%ebp),%edx 10fb90: c7 02 00 00 00 00 movl $0x0,(%edx) answer = (left * 100000) / right; *ival_percentage = answer / 1000; *fval_percentage = answer % 1000; } 10fb96: 8d 65 f4 lea -0xc(%ebp),%esp 10fb99: 5b pop %ebx 10fb9a: 5e pop %esi 10fb9b: 5f pop %edi 10fb9c: c9 leave 10fb9d: c3 ret =============================================================================== 0010ef0c <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 10ef0c: 55 push %ebp 10ef0d: 89 e5 mov %esp,%ebp 10ef0f: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 10ef12: 85 c0 test %eax,%eax 10ef14: 74 1a je 10ef30 <_Timespec_Is_valid+0x24> return false; if ( time->tv_sec < 0 ) 10ef16: 8b 10 mov (%eax),%edx 10ef18: 85 d2 test %edx,%edx 10ef1a: 78 14 js 10ef30 <_Timespec_Is_valid+0x24> return false; if ( time->tv_nsec < 0 ) 10ef1c: 8b 40 04 mov 0x4(%eax),%eax 10ef1f: 85 c0 test %eax,%eax 10ef21: 78 0d js 10ef30 <_Timespec_Is_valid+0x24> #include #include #include bool _Timespec_Is_valid( 10ef23: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10ef28: 0f 96 c0 setbe %al if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 10ef2b: c9 leave 10ef2c: c3 ret 10ef2d: 8d 76 00 lea 0x0(%esi),%esi if ( time->tv_sec < 0 ) return false; if ( time->tv_nsec < 0 ) return false; 10ef30: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 10ef32: c9 leave 10ef33: c3 ret =============================================================================== 0010ef74 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 10ef74: 55 push %ebp 10ef75: 89 e5 mov %esp,%ebp 10ef77: 56 push %esi 10ef78: 53 push %ebx 10ef79: 8b 5d 08 mov 0x8(%ebp),%ebx uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 10ef7c: 8b 33 mov (%ebx),%esi 10ef7e: 85 f6 test %esi,%esi 10ef80: 75 07 jne 10ef89 <_Timespec_To_ticks+0x15> 10ef82: 8b 43 04 mov 0x4(%ebx),%eax 10ef85: 85 c0 test %eax,%eax 10ef87: 74 37 je 10efc0 <_Timespec_To_ticks+0x4c> return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 10ef89: e8 d6 24 00 00 call 111464 10ef8e: 89 c1 mov %eax,%ecx 10ef90: 0f af ce imul %esi,%ecx ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 10ef93: a1 6c 42 12 00 mov 0x12426c,%eax 10ef98: 8d 04 80 lea (%eax,%eax,4),%eax 10ef9b: 8d 04 80 lea (%eax,%eax,4),%eax 10ef9e: 8d 34 80 lea (%eax,%eax,4),%esi 10efa1: c1 e6 03 shl $0x3,%esi 10efa4: 8b 43 04 mov 0x4(%ebx),%eax 10efa7: 31 d2 xor %edx,%edx 10efa9: f7 f6 div %esi if (ticks) 10efab: 01 c8 add %ecx,%eax 10efad: 74 05 je 10efb4 <_Timespec_To_ticks+0x40> return ticks; return 1; } 10efaf: 5b pop %ebx 10efb0: 5e pop %esi 10efb1: c9 leave 10efb2: c3 ret 10efb3: 90 nop ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); if (ticks) return ticks; return 1; 10efb4: b8 01 00 00 00 mov $0x1,%eax } 10efb9: 5b pop %ebx 10efba: 5e pop %esi 10efbb: c9 leave 10efbc: c3 ret 10efbd: 8d 76 00 lea 0x0(%esi),%esi ) { uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) return 0; 10efc0: 31 c0 xor %eax,%eax if (ticks) return ticks; return 1; } 10efc2: 5b pop %ebx 10efc3: 5e pop %esi 10efc4: c9 leave 10efc5: c3 ret =============================================================================== 0010e46c <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10e46c: 55 push %ebp 10e46d: 89 e5 mov %esp,%ebp 10e46f: 57 push %edi 10e470: 56 push %esi 10e471: 53 push %ebx 10e472: 83 ec 1c sub $0x1c,%esp 10e475: 8b 75 08 mov 0x8(%ebp),%esi 10e478: 8b 7d 10 mov 0x10(%ebp),%edi 10e47b: 8a 45 0c mov 0xc(%ebp),%al the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 10e47e: 8b 1d f4 66 12 00 mov 0x1266f4,%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 10e484: 81 fb ec 66 12 00 cmp $0x1266ec,%ebx 10e48a: 74 25 je 10e4b1 <_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 ); 10e48c: 0f b6 c0 movzbl %al,%eax 10e48f: 89 45 e4 mov %eax,-0x1c(%ebp) 10e492: 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 ) 10e494: 8b 43 30 mov 0x30(%ebx),%eax 10e497: 85 c0 test %eax,%eax 10e499: 74 0b je 10e4a6 <_User_extensions_Fatal+0x3a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10e49b: 52 push %edx 10e49c: 57 push %edi 10e49d: ff 75 e4 pushl -0x1c(%ebp) 10e4a0: 56 push %esi 10e4a1: ff d0 call *%eax 10e4a3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10e4a6: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 10e4a9: 81 fb ec 66 12 00 cmp $0x1266ec,%ebx 10e4af: 75 e3 jne 10e494 <_User_extensions_Fatal+0x28><== ALWAYS TAKEN the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 10e4b1: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10e4b4: 5b pop %ebx <== NOT EXECUTED 10e4b5: 5e pop %esi <== NOT EXECUTED 10e4b6: 5f pop %edi <== NOT EXECUTED 10e4b7: c9 leave <== NOT EXECUTED 10e4b8: c3 ret <== NOT EXECUTED =============================================================================== 0010e330 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10e330: 55 push %ebp 10e331: 89 e5 mov %esp,%ebp 10e333: 57 push %edi 10e334: 56 push %esi 10e335: 53 push %ebx 10e336: 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; 10e339: a1 98 22 12 00 mov 0x122298,%eax 10e33e: 89 45 dc mov %eax,-0x24(%ebp) initial_extensions = Configuration.User_extension_table; 10e341: 8b 35 9c 22 12 00 mov 0x12229c,%esi Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 10e347: c7 05 ec 66 12 00 f0 movl $0x1266f0,0x1266ec 10e34e: 66 12 00 head->previous = NULL; 10e351: c7 05 f0 66 12 00 00 movl $0x0,0x1266f0 10e358: 00 00 00 tail->previous = head; 10e35b: c7 05 f4 66 12 00 ec movl $0x1266ec,0x1266f4 10e362: 66 12 00 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 10e365: c7 05 d4 64 12 00 d8 movl $0x1264d8,0x1264d4 10e36c: 64 12 00 head->previous = NULL; 10e36f: c7 05 d8 64 12 00 00 movl $0x0,0x1264d8 10e376: 00 00 00 tail->previous = head; 10e379: c7 05 dc 64 12 00 d4 movl $0x1264d4,0x1264dc 10e380: 64 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10e383: 85 f6 test %esi,%esi 10e385: 74 64 je 10e3eb <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( 10e387: 89 c2 mov %eax,%edx 10e389: 8d 04 40 lea (%eax,%eax,2),%eax 10e38c: 8d 0c 82 lea (%edx,%eax,4),%ecx 10e38f: c1 e1 02 shl $0x2,%ecx 10e392: 83 ec 0c sub $0xc,%esp 10e395: 51 push %ecx 10e396: 89 4d d8 mov %ecx,-0x28(%ebp) 10e399: e8 ce 04 00 00 call 10e86c <_Workspace_Allocate_or_fatal_error> 10e39e: 89 c3 mov %eax,%ebx number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10e3a0: 31 c0 xor %eax,%eax 10e3a2: 8b 4d d8 mov -0x28(%ebp),%ecx 10e3a5: 89 df mov %ebx,%edi 10e3a7: f3 aa rep stos %al,%es:(%edi) extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e3a9: 83 c4 10 add $0x10,%esp 10e3ac: 8b 45 dc mov -0x24(%ebp),%eax 10e3af: 85 c0 test %eax,%eax 10e3b1: 74 38 je 10e3eb <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN 10e3b3: 89 75 e4 mov %esi,-0x1c(%ebp) 10e3b6: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 10e3bd: 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; 10e3c0: 8d 7b 14 lea 0x14(%ebx),%edi 10e3c3: 8b 75 e4 mov -0x1c(%ebp),%esi 10e3c6: b9 08 00 00 00 mov $0x8,%ecx 10e3cb: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10e3cd: 83 ec 0c sub $0xc,%esp 10e3d0: 53 push %ebx 10e3d1: e8 82 29 00 00 call 110d58 <_User_extensions_Add_set> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10e3d6: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e3d9: ff 45 e0 incl -0x20(%ebp) 10e3dc: 83 45 e4 20 addl $0x20,-0x1c(%ebp) 10e3e0: 83 c4 10 add $0x10,%esp 10e3e3: 8b 45 e0 mov -0x20(%ebp),%eax 10e3e6: 39 45 dc cmp %eax,-0x24(%ebp) 10e3e9: 77 d5 ja 10e3c0 <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10e3eb: 8d 65 f4 lea -0xc(%ebp),%esp 10e3ee: 5b pop %ebx 10e3ef: 5e pop %esi 10e3f0: 5f pop %edi 10e3f1: c9 leave 10e3f2: c3 ret =============================================================================== 0010f8b0 <_User_extensions_Remove_set>: #include void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 10f8b0: 55 push %ebp 10f8b1: 89 e5 mov %esp,%ebp 10f8b3: 53 push %ebx 10f8b4: 83 ec 10 sub $0x10,%esp 10f8b7: 8b 5d 08 mov 0x8(%ebp),%ebx _Chain_Extract( &the_extension->Node ); 10f8ba: 53 push %ebx 10f8bb: e8 8c da ff ff call 10d34c <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 10f8c0: 83 c4 10 add $0x10,%esp 10f8c3: 8b 43 24 mov 0x24(%ebx),%eax 10f8c6: 85 c0 test %eax,%eax 10f8c8: 74 12 je 10f8dc <_User_extensions_Remove_set+0x2c> _Chain_Extract( &the_extension->Switch.Node ); 10f8ca: 83 c3 08 add $0x8,%ebx 10f8cd: 89 5d 08 mov %ebx,0x8(%ebp) } 10f8d0: 8b 5d fc mov -0x4(%ebp),%ebx 10f8d3: c9 leave /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 10f8d4: e9 73 da ff ff jmp 10d34c <_Chain_Extract> 10f8d9: 8d 76 00 lea 0x0(%esi),%esi } 10f8dc: 8b 5d fc mov -0x4(%ebp),%ebx 10f8df: c9 leave 10f8e0: c3 ret =============================================================================== 0010e3f4 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 10e3f4: 55 push %ebp 10e3f5: 89 e5 mov %esp,%ebp 10e3f7: 56 push %esi 10e3f8: 53 push %ebx 10e3f9: 8b 75 08 mov 0x8(%ebp),%esi the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 10e3fc: 8b 1d ec 66 12 00 mov 0x1266ec,%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 10e402: 81 fb f0 66 12 00 cmp $0x1266f0,%ebx 10e408: 74 1c je 10e426 <_User_extensions_Thread_begin+0x32><== NEVER TAKEN 10e40a: 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 ) 10e40c: 8b 43 28 mov 0x28(%ebx),%eax 10e40f: 85 c0 test %eax,%eax 10e411: 74 09 je 10e41c <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 10e413: 83 ec 0c sub $0xc,%esp 10e416: 56 push %esi 10e417: ff d0 call *%eax 10e419: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10e41c: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 10e41e: 81 fb f0 66 12 00 cmp $0x1266f0,%ebx 10e424: 75 e6 jne 10e40c <_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 ); } } 10e426: 8d 65 f8 lea -0x8(%ebp),%esp 10e429: 5b pop %ebx 10e42a: 5e pop %esi 10e42b: c9 leave 10e42c: c3 ret =============================================================================== 0010e4bc <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 10e4bc: 55 push %ebp 10e4bd: 89 e5 mov %esp,%ebp 10e4bf: 56 push %esi 10e4c0: 53 push %ebx 10e4c1: 8b 75 08 mov 0x8(%ebp),%esi return false; } } return true; } 10e4c4: 8b 1d ec 66 12 00 mov 0x1266ec,%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 10e4ca: 81 fb f0 66 12 00 cmp $0x1266f0,%ebx 10e4d0: 74 26 je 10e4f8 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN 10e4d2: 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 ) { 10e4d4: 8b 43 14 mov 0x14(%ebx),%eax 10e4d7: 85 c0 test %eax,%eax 10e4d9: 74 13 je 10e4ee <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 10e4db: 83 ec 08 sub $0x8,%esp 10e4de: 56 push %esi 10e4df: ff 35 58 67 12 00 pushl 0x126758 10e4e5: ff d0 call *%eax _Thread_Executing, the_thread ); if ( !status ) 10e4e7: 83 c4 10 add $0x10,%esp 10e4ea: 84 c0 test %al,%al 10e4ec: 74 16 je 10e504 <_User_extensions_Thread_create+0x48> User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10e4ee: 8b 1b mov (%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 10e4f0: 81 fb f0 66 12 00 cmp $0x1266f0,%ebx 10e4f6: 75 dc jne 10e4d4 <_User_extensions_Thread_create+0x18> if ( !status ) return false; } } return true; 10e4f8: b0 01 mov $0x1,%al } 10e4fa: 8d 65 f8 lea -0x8(%ebp),%esp 10e4fd: 5b pop %ebx 10e4fe: 5e pop %esi 10e4ff: c9 leave 10e500: c3 ret 10e501: 8d 76 00 lea 0x0(%esi),%esi status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) return false; 10e504: 31 c0 xor %eax,%eax } } return true; } 10e506: 8d 65 f8 lea -0x8(%ebp),%esp 10e509: 5b pop %ebx 10e50a: 5e pop %esi 10e50b: c9 leave 10e50c: c3 ret =============================================================================== 0010e510 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 10e510: 55 push %ebp 10e511: 89 e5 mov %esp,%ebp 10e513: 56 push %esi 10e514: 53 push %ebx 10e515: 8b 75 08 mov 0x8(%ebp),%esi (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10e518: 8b 1d f4 66 12 00 mov 0x1266f4,%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 10e51e: 81 fb ec 66 12 00 cmp $0x1266ec,%ebx 10e524: 74 23 je 10e549 <_User_extensions_Thread_delete+0x39><== NEVER TAKEN 10e526: 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 ) 10e528: 8b 43 20 mov 0x20(%ebx),%eax 10e52b: 85 c0 test %eax,%eax 10e52d: 74 0f je 10e53e <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 10e52f: 83 ec 08 sub $0x8,%esp 10e532: 56 push %esi 10e533: ff 35 58 67 12 00 pushl 0x126758 10e539: ff d0 call *%eax 10e53b: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10e53e: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 10e541: 81 fb ec 66 12 00 cmp $0x1266ec,%ebx 10e547: 75 df jne 10e528 <_User_extensions_Thread_delete+0x18> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10e549: 8d 65 f8 lea -0x8(%ebp),%esp 10e54c: 5b pop %ebx 10e54d: 5e pop %esi 10e54e: c9 leave 10e54f: c3 ret =============================================================================== 0010e430 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10e430: 55 push %ebp 10e431: 89 e5 mov %esp,%ebp 10e433: 56 push %esi 10e434: 53 push %ebx 10e435: 8b 75 08 mov 0x8(%ebp),%esi the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 10e438: 8b 1d f4 66 12 00 mov 0x1266f4,%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 10e43e: 81 fb ec 66 12 00 cmp $0x1266ec,%ebx 10e444: 74 1d je 10e463 <_User_extensions_Thread_exitted+0x33><== NEVER TAKEN 10e446: 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 ) 10e448: 8b 43 2c mov 0x2c(%ebx),%eax 10e44b: 85 c0 test %eax,%eax 10e44d: 74 09 je 10e458 <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 10e44f: 83 ec 0c sub $0xc,%esp 10e452: 56 push %esi 10e453: ff d0 call *%eax 10e455: 83 c4 10 add $0x10,%esp <== NOT EXECUTED Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10e458: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 10e45b: 81 fb ec 66 12 00 cmp $0x1266ec,%ebx 10e461: 75 e5 jne 10e448 <_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 ); } } 10e463: 8d 65 f8 lea -0x8(%ebp),%esp 10e466: 5b pop %ebx 10e467: 5e pop %esi 10e468: c9 leave 10e469: c3 ret =============================================================================== 0010f114 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 10f114: 55 push %ebp 10f115: 89 e5 mov %esp,%ebp 10f117: 56 push %esi 10f118: 53 push %ebx 10f119: 8b 75 08 mov 0x8(%ebp),%esi (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10f11c: 8b 1d ac 8b 12 00 mov 0x128bac,%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 10f122: 81 fb b0 8b 12 00 cmp $0x128bb0,%ebx 10f128: 74 22 je 10f14c <_User_extensions_Thread_restart+0x38><== NEVER TAKEN 10f12a: 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 ) 10f12c: 8b 43 1c mov 0x1c(%ebx),%eax 10f12f: 85 c0 test %eax,%eax 10f131: 74 0f je 10f142 <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 10f133: 83 ec 08 sub $0x8,%esp 10f136: 56 push %esi 10f137: ff 35 18 8c 12 00 pushl 0x128c18 10f13d: ff d0 call *%eax 10f13f: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10f142: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 10f144: 81 fb b0 8b 12 00 cmp $0x128bb0,%ebx 10f14a: 75 e0 jne 10f12c <_User_extensions_Thread_restart+0x18> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10f14c: 8d 65 f8 lea -0x8(%ebp),%esp 10f14f: 5b pop %ebx 10f150: 5e pop %esi 10f151: c9 leave 10f152: c3 ret =============================================================================== 0010e550 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 10e550: 55 push %ebp 10e551: 89 e5 mov %esp,%ebp 10e553: 56 push %esi 10e554: 53 push %ebx 10e555: 8b 75 08 mov 0x8(%ebp),%esi (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10e558: 8b 1d ec 66 12 00 mov 0x1266ec,%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 10e55e: 81 fb f0 66 12 00 cmp $0x1266f0,%ebx 10e564: 74 22 je 10e588 <_User_extensions_Thread_start+0x38><== NEVER TAKEN 10e566: 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 ) 10e568: 8b 43 18 mov 0x18(%ebx),%eax 10e56b: 85 c0 test %eax,%eax 10e56d: 74 0f je 10e57e <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 10e56f: 83 ec 08 sub $0x8,%esp 10e572: 56 push %esi 10e573: ff 35 58 67 12 00 pushl 0x126758 10e579: ff d0 call *%eax 10e57b: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10e57e: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 10e580: 81 fb f0 66 12 00 cmp $0x1266f0,%ebx 10e586: 75 e0 jne 10e568 <_User_extensions_Thread_start+0x18> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10e588: 8d 65 f8 lea -0x8(%ebp),%esp 10e58b: 5b pop %ebx 10e58c: 5e pop %esi 10e58d: c9 leave 10e58e: c3 ret =============================================================================== 0010e590 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 10e590: 55 push %ebp 10e591: 89 e5 mov %esp,%ebp 10e593: 57 push %edi 10e594: 56 push %esi 10e595: 53 push %ebx 10e596: 83 ec 0c sub $0xc,%esp 10e599: 8b 7d 08 mov 0x8(%ebp),%edi 10e59c: 8b 75 0c mov 0xc(%ebp),%esi the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10e59f: 8b 1d d4 64 12 00 mov 0x1264d4,%ebx ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); 10e5a5: 81 fb d8 64 12 00 cmp $0x1264d8,%ebx 10e5ab: 74 18 je 10e5c5 <_User_extensions_Thread_switch+0x35><== NEVER TAKEN 10e5ad: 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 ); 10e5b0: 83 ec 08 sub $0x8,%esp 10e5b3: 56 push %esi 10e5b4: 57 push %edi 10e5b5: ff 53 08 call *0x8(%ebx) Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { 10e5b8: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); 10e5ba: 83 c4 10 add $0x10,%esp 10e5bd: 81 fb d8 64 12 00 cmp $0x1264d8,%ebx 10e5c3: 75 eb jne 10e5b0 <_User_extensions_Thread_switch+0x20> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10e5c5: 8d 65 f4 lea -0xc(%ebp),%esp 10e5c8: 5b pop %ebx 10e5c9: 5e pop %esi 10e5ca: 5f pop %edi 10e5cb: c9 leave 10e5cc: c3 ret =============================================================================== 0010febc <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10febc: 55 push %ebp 10febd: 89 e5 mov %esp,%ebp 10febf: 57 push %edi 10fec0: 56 push %esi 10fec1: 53 push %ebx 10fec2: 83 ec 1c sub $0x1c,%esp 10fec5: 8b 75 08 mov 0x8(%ebp),%esi 10fec8: 8b 4d 0c mov 0xc(%ebp),%ecx 10fecb: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10fece: 9c pushf 10fecf: fa cli 10fed0: 58 pop %eax } } _ISR_Enable( level ); } 10fed1: 8b 16 mov (%esi),%edx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10fed3: 8d 7e 04 lea 0x4(%esi),%edi 10fed6: 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 ) ) { 10fed9: 39 fa cmp %edi,%edx 10fedb: 74 3d je 10ff1a <_Watchdog_Adjust+0x5e> switch ( direction ) { 10fedd: 85 c9 test %ecx,%ecx 10fedf: 75 43 jne 10ff24 <_Watchdog_Adjust+0x68> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10fee1: 85 db test %ebx,%ebx 10fee3: 74 35 je 10ff1a <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 10fee5: 8b 7a 10 mov 0x10(%edx),%edi 10fee8: 39 fb cmp %edi,%ebx 10feea: 73 0f jae 10fefb <_Watchdog_Adjust+0x3f> <== ALWAYS TAKEN 10feec: eb 3e jmp 10ff2c <_Watchdog_Adjust+0x70> <== NOT EXECUTED 10feee: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10fef0: 29 fb sub %edi,%ebx 10fef2: 74 26 je 10ff1a <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 10fef4: 8b 7a 10 mov 0x10(%edx),%edi 10fef7: 39 df cmp %ebx,%edi 10fef9: 77 31 ja 10ff2c <_Watchdog_Adjust+0x70> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10fefb: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10ff02: 50 push %eax 10ff03: 9d popf _Watchdog_Tickle( header ); 10ff04: 83 ec 0c sub $0xc,%esp 10ff07: 56 push %esi 10ff08: e8 d3 01 00 00 call 1100e0 <_Watchdog_Tickle> _ISR_Disable( level ); 10ff0d: 9c pushf 10ff0e: fa cli 10ff0f: 58 pop %eax } } _ISR_Enable( level ); } 10ff10: 8b 16 mov (%esi),%edx _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 10ff12: 83 c4 10 add $0x10,%esp 10ff15: 39 55 e4 cmp %edx,-0x1c(%ebp) 10ff18: 75 d6 jne 10fef0 <_Watchdog_Adjust+0x34> } break; } } _ISR_Enable( level ); 10ff1a: 50 push %eax 10ff1b: 9d popf } 10ff1c: 8d 65 f4 lea -0xc(%ebp),%esp 10ff1f: 5b pop %ebx 10ff20: 5e pop %esi 10ff21: 5f pop %edi 10ff22: c9 leave 10ff23: c3 ret * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 10ff24: 49 dec %ecx 10ff25: 75 f3 jne 10ff1a <_Watchdog_Adjust+0x5e> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10ff27: 01 5a 10 add %ebx,0x10(%edx) break; 10ff2a: eb ee jmp 10ff1a <_Watchdog_Adjust+0x5e> case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 10ff2c: 29 df sub %ebx,%edi 10ff2e: 89 7a 10 mov %edi,0x10(%edx) break; 10ff31: eb e7 jmp 10ff1a <_Watchdog_Adjust+0x5e> =============================================================================== 0010e5d0 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10e5d0: 55 push %ebp 10e5d1: 89 e5 mov %esp,%ebp 10e5d3: 57 push %edi 10e5d4: 56 push %esi 10e5d5: 53 push %ebx 10e5d6: 83 ec 04 sub $0x4,%esp 10e5d9: 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; 10e5dc: 8b 3d 54 67 12 00 mov 0x126754,%edi _ISR_Disable( level ); 10e5e2: 9c pushf 10e5e3: fa cli 10e5e4: 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 ) { 10e5e7: 8b 43 08 mov 0x8(%ebx),%eax 10e5ea: 85 c0 test %eax,%eax 10e5ec: 0f 85 9e 00 00 00 jne 10e690 <_Watchdog_Insert+0xc0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10e5f2: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx) _Watchdog_Sync_count++; 10e5f9: a1 00 66 12 00 mov 0x126600,%eax 10e5fe: 40 inc %eax 10e5ff: a3 00 66 12 00 mov %eax,0x126600 restart: delta_interval = the_watchdog->initial; 10e604: 8b 43 0c mov 0xc(%ebx),%eax RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) _Chain_First( header ) ); 10e607: 8b 4d 08 mov 0x8(%ebp),%ecx 10e60a: 8b 11 mov (%ecx),%edx for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10e60c: 85 c0 test %eax,%eax 10e60e: 74 5d je 10e66d <_Watchdog_Insert+0x9d> 10e610: 8b 32 mov (%edx),%esi 10e612: 85 f6 test %esi,%esi 10e614: 74 57 je 10e66d <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e616: 8b 4a 10 mov 0x10(%edx),%ecx 10e619: 39 c8 cmp %ecx,%eax 10e61b: 73 22 jae 10e63f <_Watchdog_Insert+0x6f> 10e61d: eb 49 jmp 10e668 <_Watchdog_Insert+0x98> 10e61f: 90 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10e620: 8b 35 84 65 12 00 mov 0x126584,%esi 10e626: 39 f7 cmp %esi,%edi 10e628: 72 72 jb 10e69c <_Watchdog_Insert+0xcc> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10e62a: 29 c8 sub %ecx,%eax exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10e62c: 8b 12 mov (%edx),%edx for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10e62e: 85 c0 test %eax,%eax 10e630: 74 3b je 10e66d <_Watchdog_Insert+0x9d> 10e632: 8b 0a mov (%edx),%ecx 10e634: 85 c9 test %ecx,%ecx 10e636: 74 35 je 10e66d <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e638: 8b 4a 10 mov 0x10(%edx),%ecx 10e63b: 39 c1 cmp %eax,%ecx 10e63d: 77 29 ja 10e668 <_Watchdog_Insert+0x98> break; } delta_interval -= after->delta_interval; _ISR_Flash( level ); 10e63f: ff 75 f0 pushl -0x10(%ebp) 10e642: 9d popf 10e643: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10e644: 83 7b 08 01 cmpl $0x1,0x8(%ebx) 10e648: 74 d6 je 10e620 <_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; 10e64a: 89 3d 84 65 12 00 mov %edi,0x126584 _Watchdog_Sync_count--; 10e650: a1 00 66 12 00 mov 0x126600,%eax 10e655: 48 dec %eax 10e656: a3 00 66 12 00 mov %eax,0x126600 _ISR_Enable( level ); 10e65b: ff 75 f0 pushl -0x10(%ebp) 10e65e: 9d popf } 10e65f: 58 pop %eax 10e660: 5b pop %ebx 10e661: 5e pop %esi 10e662: 5f pop %edi 10e663: c9 leave 10e664: c3 ret 10e665: 8d 76 00 lea 0x0(%esi),%esi if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 10e668: 29 c1 sub %eax,%ecx 10e66a: 89 4a 10 mov %ecx,0x10(%edx) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 10e66d: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10e674: 89 43 10 mov %eax,0x10(%ebx) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10e677: 8b 42 04 mov 0x4(%edx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10e67a: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10e67d: 8b 10 mov (%eax),%edx after_node->next = the_node; 10e67f: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10e681: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10e683: 89 5a 04 mov %ebx,0x4(%edx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10e686: a1 04 66 12 00 mov 0x126604,%eax 10e68b: 89 43 14 mov %eax,0x14(%ebx) 10e68e: eb ba jmp 10e64a <_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 ); 10e690: ff 75 f0 pushl -0x10(%ebp) 10e693: 9d popf exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10e694: 58 pop %eax 10e695: 5b pop %ebx 10e696: 5e pop %esi 10e697: 5f pop %edi 10e698: c9 leave 10e699: c3 ret 10e69a: 66 90 xchg %ax,%ax 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; 10e69c: 89 3d 84 65 12 00 mov %edi,0x126584 goto restart; 10e6a2: e9 5d ff ff ff jmp 10e604 <_Watchdog_Insert+0x34> =============================================================================== 0010e710 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10e710: 55 push %ebp 10e711: 89 e5 mov %esp,%ebp 10e713: 56 push %esi 10e714: 53 push %ebx 10e715: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10e718: 9c pushf 10e719: fa cli 10e71a: 59 pop %ecx previous_state = the_watchdog->state; 10e71b: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10e71e: 83 f8 01 cmp $0x1,%eax 10e721: 74 4d je 10e770 <_Watchdog_Remove+0x60> 10e723: 73 0f jae 10e734 <_Watchdog_Remove+0x24> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10e725: 8b 1d 04 66 12 00 mov 0x126604,%ebx 10e72b: 89 5a 18 mov %ebx,0x18(%edx) _ISR_Enable( level ); 10e72e: 51 push %ecx 10e72f: 9d popf return( previous_state ); } 10e730: 5b pop %ebx 10e731: 5e pop %esi 10e732: c9 leave 10e733: c3 ret Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 10e734: 83 f8 03 cmp $0x3,%eax 10e737: 77 ec ja 10e725 <_Watchdog_Remove+0x15> <== NEVER TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10e739: 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 ); } 10e740: 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) ) 10e742: 8b 33 mov (%ebx),%esi 10e744: 85 f6 test %esi,%esi 10e746: 74 06 je 10e74e <_Watchdog_Remove+0x3e> next_watchdog->delta_interval += the_watchdog->delta_interval; 10e748: 8b 72 10 mov 0x10(%edx),%esi 10e74b: 01 73 10 add %esi,0x10(%ebx) if ( _Watchdog_Sync_count ) 10e74e: 8b 35 00 66 12 00 mov 0x126600,%esi 10e754: 85 f6 test %esi,%esi 10e756: 74 0c je 10e764 <_Watchdog_Remove+0x54> _Watchdog_Sync_level = _ISR_Nest_level; 10e758: 8b 35 54 67 12 00 mov 0x126754,%esi 10e75e: 89 35 84 65 12 00 mov %esi,0x126584 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10e764: 8b 72 04 mov 0x4(%edx),%esi next->previous = previous; 10e767: 89 73 04 mov %esi,0x4(%ebx) previous->next = next; 10e76a: 89 1e mov %ebx,(%esi) 10e76c: eb b7 jmp 10e725 <_Watchdog_Remove+0x15> 10e76e: 66 90 xchg %ax,%ax /* * 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; 10e770: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10e777: eb ac jmp 10e725 <_Watchdog_Remove+0x15> =============================================================================== 0010fabc <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 10fabc: 55 push %ebp 10fabd: 89 e5 mov %esp,%ebp 10fabf: 57 push %edi 10fac0: 56 push %esi 10fac1: 53 push %ebx 10fac2: 83 ec 2c sub $0x2c,%esp 10fac5: 8b 55 08 mov 0x8(%ebp),%edx 10fac8: 8b 45 0c mov 0xc(%ebp),%eax printk( 10facb: 8b 78 24 mov 0x24(%eax),%edi 10face: 8b 70 20 mov 0x20(%eax),%esi 10fad1: 8b 58 1c mov 0x1c(%eax),%ebx 10fad4: 8b 48 0c mov 0xc(%eax),%ecx 10fad7: 89 4d d4 mov %ecx,-0x2c(%ebp) 10fada: 8b 48 10 mov 0x10(%eax),%ecx 10fadd: 89 4d e4 mov %ecx,-0x1c(%ebp) 10fae0: 85 d2 test %edx,%edx 10fae2: 74 2c je 10fb10 <_Watchdog_Report+0x54> 10fae4: b9 e3 1f 12 00 mov $0x121fe3,%ecx 10fae9: 83 ec 0c sub $0xc,%esp 10faec: 57 push %edi 10faed: 56 push %esi 10faee: 53 push %ebx 10faef: 50 push %eax 10faf0: ff 75 d4 pushl -0x2c(%ebp) 10faf3: ff 75 e4 pushl -0x1c(%ebp) 10faf6: 51 push %ecx 10faf7: 52 push %edx 10faf8: 68 36 2a 12 00 push $0x122a36 10fafd: e8 96 9f ff ff call 109a98 10fb02: 83 c4 30 add $0x30,%esp watch, watch->routine, watch->id, watch->user_data ); } 10fb05: 8d 65 f4 lea -0xc(%ebp),%esp 10fb08: 5b pop %ebx 10fb09: 5e pop %esi 10fb0a: 5f pop %edi 10fb0b: c9 leave 10fb0c: c3 ret 10fb0d: 8d 76 00 lea 0x0(%esi),%esi void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( 10fb10: b9 a9 28 12 00 mov $0x1228a9,%ecx 10fb15: 89 ca mov %ecx,%edx 10fb17: eb d0 jmp 10fae9 <_Watchdog_Report+0x2d> =============================================================================== 0010fa4c <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10fa4c: 55 push %ebp 10fa4d: 89 e5 mov %esp,%ebp 10fa4f: 57 push %edi 10fa50: 56 push %esi 10fa51: 53 push %ebx 10fa52: 83 ec 20 sub $0x20,%esp 10fa55: 8b 7d 08 mov 0x8(%ebp),%edi 10fa58: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10fa5b: 9c pushf 10fa5c: fa cli 10fa5d: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10fa60: 56 push %esi 10fa61: 57 push %edi 10fa62: 68 00 2a 12 00 push $0x122a00 10fa67: e8 2c a0 ff ff call 109a98 printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); } 10fa6c: 8b 1e mov (%esi),%ebx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10fa6e: 83 c6 04 add $0x4,%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { 10fa71: 83 c4 10 add $0x10,%esp 10fa74: 39 f3 cmp %esi,%ebx 10fa76: 74 31 je 10faa9 <_Watchdog_Report_chain+0x5d> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10fa78: 83 ec 08 sub $0x8,%esp 10fa7b: 53 push %ebx 10fa7c: 6a 00 push $0x0 10fa7e: e8 39 00 00 00 call 10fabc <_Watchdog_Report> _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; node != _Chain_Tail(header) ; node = node->next ) 10fa83: 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 = _Chain_First( header ) ; 10fa85: 83 c4 10 add $0x10,%esp 10fa88: 39 f3 cmp %esi,%ebx 10fa8a: 75 ec jne 10fa78 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10fa8c: 83 ec 08 sub $0x8,%esp 10fa8f: 57 push %edi 10fa90: 68 17 2a 12 00 push $0x122a17 10fa95: e8 fe 9f ff ff call 109a98 10fa9a: 83 c4 10 add $0x10,%esp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 10fa9d: ff 75 e4 pushl -0x1c(%ebp) 10faa0: 9d popf } 10faa1: 8d 65 f4 lea -0xc(%ebp),%esp 10faa4: 5b pop %ebx 10faa5: 5e pop %esi 10faa6: 5f pop %edi 10faa7: c9 leave 10faa8: c3 ret _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 10faa9: 83 ec 0c sub $0xc,%esp 10faac: 68 26 2a 12 00 push $0x122a26 10fab1: e8 e2 9f ff ff call 109a98 10fab6: 83 c4 10 add $0x10,%esp 10fab9: eb e2 jmp 10fa9d <_Watchdog_Report_chain+0x51> =============================================================================== 0010e7e8 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 10e7e8: 55 push %ebp 10e7e9: 89 e5 mov %esp,%ebp 10e7eb: 57 push %edi 10e7ec: 53 push %ebx uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 10e7ed: 8b 1d 60 22 12 00 mov 0x122260,%ebx uintptr_t size = Configuration.work_space_size; 10e7f3: 8b 15 64 22 12 00 mov 0x122264,%edx if ( Configuration.do_zero_of_workspace ) 10e7f9: 80 3d 88 22 12 00 00 cmpb $0x0,0x122288 10e800: 75 1e jne 10e820 <_Workspace_Handler_initialization+0x38> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 10e802: 6a 04 push $0x4 10e804: 52 push %edx 10e805: 53 push %ebx 10e806: 68 00 65 12 00 push $0x126500 10e80b: e8 08 de ff ff call 10c618 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 10e810: 83 c4 10 add $0x10,%esp 10e813: 85 c0 test %eax,%eax 10e815: 74 13 je 10e82a <_Workspace_Handler_initialization+0x42> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 10e817: 8d 65 f8 lea -0x8(%ebp),%esp 10e81a: 5b pop %ebx 10e81b: 5f pop %edi 10e81c: c9 leave 10e81d: c3 ret 10e81e: 66 90 xchg %ax,%ax 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 ); 10e820: 31 c0 xor %eax,%eax 10e822: 89 df mov %ebx,%edi 10e824: 89 d1 mov %edx,%ecx 10e826: f3 aa rep stos %al,%es:(%edi) 10e828: eb d8 jmp 10e802 <_Workspace_Handler_initialization+0x1a> size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 10e82a: 50 push %eax 10e82b: 6a 02 push $0x2 10e82d: 6a 01 push $0x1 10e82f: 6a 00 push $0x0 10e831: e8 ea df ff ff call 10c820 <_Internal_error_Occurred> =============================================================================== 00112a54 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 112a54: 55 push %ebp 112a55: 89 e5 mov %esp,%ebp 112a57: 57 push %edi 112a58: 56 push %esi 112a59: 53 push %ebx 112a5a: 83 ec 2c sub $0x2c,%esp 112a5d: 8b 5d 08 mov 0x8(%ebp),%ebx 112a60: 8b 7d 0c mov 0xc(%ebp),%edi 112a63: 8b 45 10 mov 0x10(%ebp),%eax 112a66: 8b 75 14 mov 0x14(%ebp),%esi Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 112a69: 85 db test %ebx,%ebx 112a6b: 0f 84 87 00 00 00 je 112af8 return RTEMS_INVALID_NAME; if ( !id ) 112a71: 85 f6 test %esi,%esi 112a73: 0f 84 bf 00 00 00 je 112b38 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 112a79: f7 c7 10 00 00 00 test $0x10,%edi 112a7f: 0f 84 83 00 00 00 je 112b08 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 112a85: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) if ( maximum_waiters == 0 ) 112a8c: 85 c0 test %eax,%eax 112a8e: 0f 84 80 00 00 00 je 112b14 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 112a94: 89 45 e4 mov %eax,-0x1c(%ebp) 112a97: a1 f0 84 12 00 mov 0x1284f0,%eax 112a9c: 40 inc %eax 112a9d: a3 f0 84 12 00 mov %eax,0x1284f0 * 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 ); 112aa2: 83 ec 0c sub $0xc,%esp 112aa5: 68 e0 87 12 00 push $0x1287e0 112aaa: e8 cd ba ff ff call 10e57c <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 112aaf: 83 c4 10 add $0x10,%esp 112ab2: 85 c0 test %eax,%eax 112ab4: 74 6e je 112b24 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 112ab6: 89 78 10 mov %edi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 112ab9: 83 ec 08 sub $0x8,%esp 112abc: 8d 55 e0 lea -0x20(%ebp),%edx 112abf: 52 push %edx 112ac0: 8d 50 14 lea 0x14(%eax),%edx 112ac3: 52 push %edx 112ac4: 89 45 d4 mov %eax,-0x2c(%ebp) 112ac7: e8 c0 07 00 00 call 11328c <_CORE_barrier_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 112acc: 8b 45 d4 mov -0x2c(%ebp),%eax 112acf: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 112ad2: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 112ad5: 8b 0d fc 87 12 00 mov 0x1287fc,%ecx 112adb: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 112ade: 89 58 0c mov %ebx,0xc(%eax) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 112ae1: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 112ae3: e8 d8 ca ff ff call 10f5c0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 112ae8: 83 c4 10 add $0x10,%esp 112aeb: 31 c0 xor %eax,%eax } 112aed: 8d 65 f4 lea -0xc(%ebp),%esp 112af0: 5b pop %ebx 112af1: 5e pop %esi 112af2: 5f pop %edi 112af3: c9 leave 112af4: c3 ret 112af5: 8d 76 00 lea 0x0(%esi),%esi { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 112af8: b8 03 00 00 00 mov $0x3,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112afd: 8d 65 f4 lea -0xc(%ebp),%esp 112b00: 5b pop %ebx 112b01: 5e pop %esi 112b02: 5f pop %edi 112b03: c9 leave 112b04: c3 ret 112b05: 8d 76 00 lea 0x0(%esi),%esi 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; 112b08: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) 112b0f: eb 83 jmp 112a94 112b11: 8d 76 00 lea 0x0(%esi),%esi /* 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; 112b14: b8 0a 00 00 00 mov $0xa,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112b19: 8d 65 f4 lea -0xc(%ebp),%esp 112b1c: 5b pop %ebx 112b1d: 5e pop %esi 112b1e: 5f pop %edi 112b1f: c9 leave 112b20: c3 ret 112b21: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 112b24: e8 97 ca ff ff call 10f5c0 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 112b29: b8 05 00 00 00 mov $0x5,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112b2e: 8d 65 f4 lea -0xc(%ebp),%esp 112b31: 5b pop %ebx 112b32: 5e pop %esi 112b33: 5f pop %edi 112b34: c9 leave 112b35: c3 ret 112b36: 66 90 xchg %ax,%ax if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 112b38: b8 09 00 00 00 mov $0x9,%eax 112b3d: eb ae jmp 112aed =============================================================================== 0010c140 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { 10c140: 55 push %ebp 10c141: 89 e5 mov %esp,%ebp 10c143: 56 push %esi 10c144: 53 push %ebx 10c145: 8b 5d 10 mov 0x10(%ebp),%ebx 10c148: 8b 75 14 mov 0x14(%ebp),%esi RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Append_with_empty_check( chain, node ); 10c14b: 83 ec 08 sub $0x8,%esp 10c14e: ff 75 0c pushl 0xc(%ebp) 10c151: ff 75 08 pushl 0x8(%ebp) 10c154: e8 9f 04 00 00 call 10c5f8 <_Chain_Append_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { 10c159: 83 c4 10 add $0x10,%esp 10c15c: 84 c0 test %al,%al 10c15e: 75 0c jne 10c16c <== ALWAYS TAKEN sc = rtems_event_send( task, events ); } return sc; } 10c160: 31 c0 xor %eax,%eax 10c162: 8d 65 f8 lea -0x8(%ebp),%esp 10c165: 5b pop %ebx <== NOT EXECUTED 10c166: 5e pop %esi <== NOT EXECUTED 10c167: c9 leave <== NOT EXECUTED 10c168: c3 ret <== NOT EXECUTED 10c169: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { sc = rtems_event_send( task, events ); 10c16c: 89 75 0c mov %esi,0xc(%ebp) 10c16f: 89 5d 08 mov %ebx,0x8(%ebp) } return sc; } 10c172: 8d 65 f8 lea -0x8(%ebp),%esp 10c175: 5b pop %ebx 10c176: 5e pop %esi 10c177: c9 leave { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { sc = rtems_event_send( task, events ); 10c178: e9 af f5 ff ff jmp 10b72c =============================================================================== 0010c180 : rtems_chain_control *chain, rtems_id task, rtems_event_set events, rtems_chain_node **node ) { 10c180: 55 push %ebp 10c181: 89 e5 mov %esp,%ebp 10c183: 56 push %esi 10c184: 53 push %ebx 10c185: 8b 5d 0c mov 0xc(%ebp),%ebx 10c188: 8b 75 10 mov 0x10(%ebp),%esi RTEMS_INLINE_ROUTINE bool rtems_chain_get_with_empty_check( rtems_chain_control *chain, rtems_chain_node **node ) { return _Chain_Get_with_empty_check( chain, node ); 10c18b: 83 ec 08 sub $0x8,%esp 10c18e: ff 75 14 pushl 0x14(%ebp) 10c191: ff 75 08 pushl 0x8(%ebp) 10c194: e8 c7 04 00 00 call 10c660 <_Chain_Get_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { 10c199: 83 c4 10 add $0x10,%esp 10c19c: 84 c0 test %al,%al 10c19e: 75 0c jne 10c1ac sc = rtems_event_send( task, events ); } return sc; } 10c1a0: 31 c0 xor %eax,%eax 10c1a2: 8d 65 f8 lea -0x8(%ebp),%esp 10c1a5: 5b pop %ebx 10c1a6: 5e pop %esi 10c1a7: c9 leave 10c1a8: c3 ret 10c1a9: 8d 76 00 lea 0x0(%esi),%esi { rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { sc = rtems_event_send( task, events ); 10c1ac: 89 75 0c mov %esi,0xc(%ebp) 10c1af: 89 5d 08 mov %ebx,0x8(%ebp) } return sc; } 10c1b2: 8d 65 f8 lea -0x8(%ebp),%esp 10c1b5: 5b pop %ebx 10c1b6: 5e pop %esi 10c1b7: c9 leave { rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { sc = rtems_event_send( task, events ); 10c1b8: e9 6f f5 ff ff jmp 10b72c =============================================================================== 0010c1c0 : rtems_chain_control *chain, rtems_event_set events, rtems_interval timeout, rtems_chain_node **node_ptr ) { 10c1c0: 55 push %ebp 10c1c1: 89 e5 mov %esp,%ebp 10c1c3: 57 push %edi 10c1c4: 56 push %esi 10c1c5: 53 push %ebx 10c1c6: 83 ec 1c sub $0x1c,%esp 10c1c9: 8b 75 08 mov 0x8(%ebp),%esi while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ) { rtems_event_set out; sc = rtems_event_receive( 10c1cc: 8d 7d e4 lea -0x1c(%ebp),%edi 10c1cf: 90 nop */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 10c1d0: 83 ec 0c sub $0xc,%esp 10c1d3: 56 push %esi 10c1d4: e8 c3 04 00 00 call 10c69c <_Chain_Get> 10c1d9: 89 c3 mov %eax,%ebx rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL 10c1db: 83 c4 10 add $0x10,%esp 10c1de: 85 c0 test %eax,%eax 10c1e0: 75 22 jne 10c204 ) { rtems_event_set out; sc = rtems_event_receive( 10c1e2: 57 push %edi 10c1e3: ff 75 10 pushl 0x10(%ebp) 10c1e6: 6a 00 push $0x0 10c1e8: ff 75 0c pushl 0xc(%ebp) 10c1eb: e8 b4 f3 ff ff call 10b5a4 ) { rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( 10c1f0: 83 c4 10 add $0x10,%esp 10c1f3: 85 c0 test %eax,%eax 10c1f5: 74 d9 je 10c1d0 <== NEVER TAKEN timeout, &out ); } *node_ptr = node; 10c1f7: 8b 55 14 mov 0x14(%ebp),%edx 10c1fa: 89 1a mov %ebx,(%edx) return sc; } 10c1fc: 8d 65 f4 lea -0xc(%ebp),%esp 10c1ff: 5b pop %ebx 10c200: 5e pop %esi 10c201: 5f pop %edi 10c202: c9 leave 10c203: c3 ret rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL 10c204: 31 c0 xor %eax,%eax timeout, &out ); } *node_ptr = node; 10c206: 8b 55 14 mov 0x14(%ebp),%edx 10c209: 89 1a mov %ebx,(%edx) return sc; } 10c20b: 8d 65 f4 lea -0xc(%ebp),%esp 10c20e: 5b pop %ebx 10c20f: 5e pop %esi 10c210: 5f pop %edi 10c211: c9 leave 10c212: c3 ret =============================================================================== 0010c214 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { 10c214: 55 push %ebp 10c215: 89 e5 mov %esp,%ebp 10c217: 56 push %esi 10c218: 53 push %ebx 10c219: 8b 5d 10 mov 0x10(%ebp),%ebx 10c21c: 8b 75 14 mov 0x14(%ebp),%esi RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Prepend_with_empty_check( chain, node ); 10c21f: 83 ec 08 sub $0x8,%esp 10c222: ff 75 0c pushl 0xc(%ebp) 10c225: ff 75 08 pushl 0x8(%ebp) 10c228: e8 b3 04 00 00 call 10c6e0 <_Chain_Prepend_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { 10c22d: 83 c4 10 add $0x10,%esp 10c230: 84 c0 test %al,%al 10c232: 75 0c jne 10c240 <== ALWAYS TAKEN sc = rtems_event_send( task, events ); } return sc; } 10c234: 31 c0 xor %eax,%eax 10c236: 8d 65 f8 lea -0x8(%ebp),%esp 10c239: 5b pop %ebx 10c23a: 5e pop %esi <== NOT EXECUTED 10c23b: c9 leave <== NOT EXECUTED 10c23c: c3 ret <== NOT EXECUTED 10c23d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { sc = rtems_event_send( task, events ); 10c240: 89 75 0c mov %esi,0xc(%ebp) 10c243: 89 5d 08 mov %ebx,0x8(%ebp) } return sc; } 10c246: 8d 65 f8 lea -0x8(%ebp),%esp 10c249: 5b pop %ebx 10c24a: 5e pop %esi 10c24b: c9 leave { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { sc = rtems_event_send( task, events ); 10c24c: e9 db f4 ff ff jmp 10b72c =============================================================================== 00115a60 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 115a60: 55 push %ebp 115a61: 89 e5 mov %esp,%ebp 115a63: 53 push %ebx 115a64: 83 ec 04 sub $0x4,%esp 115a67: 8b 45 08 mov 0x8(%ebp),%eax 115a6a: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !time_buffer ) 115a6d: 85 db test %ebx,%ebx 115a6f: 74 3b je 115aac return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 115a71: 85 c0 test %eax,%eax 115a73: 74 2b je 115aa0 return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 115a75: 83 f8 01 cmp $0x1,%eax 115a78: 74 3e je 115ab8 return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 115a7a: 83 f8 02 cmp $0x2,%eax 115a7d: 74 45 je 115ac4 *interval = rtems_clock_get_ticks_since_boot(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 115a7f: 83 f8 03 cmp $0x3,%eax 115a82: 74 4c je 115ad0 *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 115a84: 83 f8 04 cmp $0x4,%eax 115a87: 74 0b je 115a94 return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; 115a89: b8 0a 00 00 00 mov $0xa,%eax } 115a8e: 5a pop %edx 115a8f: 5b pop %ebx 115a90: c9 leave 115a91: c3 ret 115a92: 66 90 xchg %ax,%ax *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 ); 115a94: 89 5d 08 mov %ebx,0x8(%ebp) return RTEMS_INVALID_NUMBER; } 115a97: 59 pop %ecx 115a98: 5b pop %ebx 115a99: 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 ); 115a9a: e9 41 01 00 00 jmp 115be0 115a9f: 90 nop { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 115aa0: 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; } 115aa3: 58 pop %eax 115aa4: 5b pop %ebx 115aa5: 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 ); 115aa6: e9 81 00 00 00 jmp 115b2c 115aab: 90 nop rtems_clock_get_options option, void *time_buffer ) { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 115aac: 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; } 115ab1: 5a pop %edx 115ab2: 5b pop %ebx 115ab3: c9 leave 115ab4: c3 ret 115ab5: 8d 76 00 lea 0x0(%esi),%esi 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); 115ab8: 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; } 115abb: 5b pop %ebx 115abc: 5b pop %ebx 115abd: 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); 115abe: e9 19 00 00 00 jmp 115adc 115ac3: 90 nop if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 115ac4: e8 57 00 00 00 call 115b20 115ac9: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 115acb: 31 c0 xor %eax,%eax 115acd: eb bf jmp 115a8e 115acf: 90 nop } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 115ad0: e8 37 00 00 00 call 115b0c 115ad5: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 115ad7: 31 c0 xor %eax,%eax 115ad9: eb b3 jmp 115a8e =============================================================================== 00115be0 : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 115be0: 55 push %ebp 115be1: 89 e5 mov %esp,%ebp 115be3: 56 push %esi 115be4: 53 push %ebx 115be5: 83 ec 10 sub $0x10,%esp 115be8: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !time ) 115beb: 85 db test %ebx,%ebx 115bed: 74 51 je 115c40 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 115bef: 80 3d 24 09 14 00 00 cmpb $0x0,0x140924 115bf6: 75 0c jne 115c04 return RTEMS_NOT_DEFINED; 115bf8: b8 0b 00 00 00 mov $0xb,%eax _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 115bfd: 8d 65 f8 lea -0x8(%ebp),%esp 115c00: 5b pop %ebx 115c01: 5e pop %esi 115c02: c9 leave 115c03: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 115c04: 9c pushf 115c05: fa cli 115c06: 5e pop %esi _TOD_Get( &now ); 115c07: 83 ec 0c sub $0xc,%esp 115c0a: 8d 45 f0 lea -0x10(%ebp),%eax 115c0d: 50 push %eax 115c0e: e8 e5 42 00 00 call 119ef8 <_TOD_Get> _ISR_Enable(level); 115c13: 56 push %esi 115c14: 9d popf useconds = (suseconds_t)now.tv_nsec; 115c15: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 115c18: 8b 45 f0 mov -0x10(%ebp),%eax 115c1b: 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; 115c1d: b8 d3 4d 62 10 mov $0x10624dd3,%eax 115c22: f7 e9 imul %ecx 115c24: 89 d0 mov %edx,%eax 115c26: c1 f8 06 sar $0x6,%eax 115c29: c1 f9 1f sar $0x1f,%ecx 115c2c: 29 c8 sub %ecx,%eax 115c2e: 89 43 04 mov %eax,0x4(%ebx) if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; 115c31: 83 c4 10 add $0x10,%esp 115c34: 31 c0 xor %eax,%eax } 115c36: 8d 65 f8 lea -0x8(%ebp),%esp 115c39: 5b pop %ebx 115c3a: 5e pop %esi 115c3b: c9 leave 115c3c: c3 ret 115c3d: 8d 76 00 lea 0x0(%esi),%esi rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { if ( !time ) return RTEMS_INVALID_ADDRESS; 115c40: b8 09 00 00 00 mov $0x9,%eax 115c45: eb b6 jmp 115bfd =============================================================================== 0010b1f0 : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 10b1f0: 55 push %ebp 10b1f1: 89 e5 mov %esp,%ebp 10b1f3: 83 ec 08 sub $0x8,%esp 10b1f6: 8b 45 08 mov 0x8(%ebp),%eax if ( !uptime ) 10b1f9: 85 c0 test %eax,%eax 10b1fb: 74 13 je 10b210 return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 10b1fd: 83 ec 0c sub $0xc,%esp 10b200: 50 push %eax 10b201: e8 a2 15 00 00 call 10c7a8 <_TOD_Get_uptime_as_timespec> return RTEMS_SUCCESSFUL; 10b206: 83 c4 10 add $0x10,%esp 10b209: 31 c0 xor %eax,%eax } 10b20b: c9 leave 10b20c: c3 ret 10b20d: 8d 76 00 lea 0x0(%esi),%esi rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime ) return RTEMS_INVALID_ADDRESS; 10b210: b8 09 00 00 00 mov $0x9,%eax _TOD_Get_uptime_as_timespec( uptime ); return RTEMS_SUCCESSFUL; } 10b215: c9 leave 10b216: c3 ret =============================================================================== 0010c12c : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 10c12c: 55 push %ebp 10c12d: 89 e5 mov %esp,%ebp 10c12f: 53 push %ebx 10c130: 83 ec 14 sub $0x14,%esp 10c133: 8b 5d 08 mov 0x8(%ebp),%ebx struct timespec newtime; if ( !time_buffer ) 10c136: 85 db test %ebx,%ebx 10c138: 74 66 je 10c1a0 return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 10c13a: 83 ec 0c sub $0xc,%esp 10c13d: 53 push %ebx 10c13e: e8 39 01 00 00 call 10c27c <_TOD_Validate> 10c143: 83 c4 10 add $0x10,%esp 10c146: 84 c0 test %al,%al 10c148: 75 0a jne 10c154 _Thread_Disable_dispatch(); _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; 10c14a: b8 14 00 00 00 mov $0x14,%eax } 10c14f: 8b 5d fc mov -0x4(%ebp),%ebx 10c152: c9 leave 10c153: c3 ret if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 10c154: 83 ec 0c sub $0xc,%esp 10c157: 53 push %ebx 10c158: e8 93 00 00 00 call 10c1f0 <_TOD_To_seconds> 10c15d: 89 45 f0 mov %eax,-0x10(%ebp) newtime.tv_nsec = time_buffer->ticks * 10c160: 8b 43 18 mov 0x18(%ebx),%eax 10c163: 0f af 05 6c 52 12 00 imul 0x12526c,%eax 10c16a: 8d 04 80 lea (%eax,%eax,4),%eax 10c16d: 8d 04 80 lea (%eax,%eax,4),%eax 10c170: 8d 04 80 lea (%eax,%eax,4),%eax 10c173: c1 e0 03 shl $0x3,%eax 10c176: 89 45 f4 mov %eax,-0xc(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c179: a1 70 99 12 00 mov 0x129970,%eax 10c17e: 40 inc %eax 10c17f: a3 70 99 12 00 mov %eax,0x129970 rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 10c184: 8d 45 f0 lea -0x10(%ebp),%eax 10c187: 89 04 24 mov %eax,(%esp) 10c18a: e8 81 18 00 00 call 10da10 <_TOD_Set> _Thread_Enable_dispatch(); 10c18f: e8 a4 2e 00 00 call 10f038 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c194: 83 c4 10 add $0x10,%esp 10c197: 31 c0 xor %eax,%eax } return RTEMS_INVALID_CLOCK; } 10c199: 8b 5d fc mov -0x4(%ebp),%ebx 10c19c: c9 leave 10c19d: c3 ret 10c19e: 66 90 xchg %ax,%ax ) { struct timespec newtime; if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 10c1a0: b8 09 00 00 00 mov $0x9,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10c1a5: 8b 5d fc mov -0x4(%ebp),%ebx 10c1a8: c9 leave 10c1a9: c3 ret =============================================================================== 0010afd0 : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { 10afd0: 55 push %ebp 10afd1: 89 e5 mov %esp,%ebp 10afd3: 83 ec 08 sub $0x8,%esp _TOD_Tickle_ticks(); 10afd6: e8 65 14 00 00 call 10c440 <_TOD_Tickle_ticks> */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); 10afdb: 83 ec 0c sub $0xc,%esp 10afde: 68 a0 65 12 00 push $0x1265a0 10afe3: e8 94 37 00 00 call 10e77c <_Watchdog_Tickle> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 10afe8: e8 87 32 00 00 call 10e274 <_Thread_Tickle_timeslice> * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void ) { return ( _Thread_Dispatch_necessary ); 10afed: a0 64 67 12 00 mov 0x126764,%al if ( _Thread_Is_context_switch_necessary() && 10aff2: 83 c4 10 add $0x10,%esp 10aff5: 84 c0 test %al,%al 10aff7: 74 09 je 10b002 * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); 10aff9: a1 d0 64 12 00 mov 0x1264d0,%eax 10affe: 85 c0 test %eax,%eax 10b000: 74 06 je 10b008 _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 10b002: 31 c0 xor %eax,%eax 10b004: c9 leave 10b005: c3 ret 10b006: 66 90 xchg %ax,%ax _Thread_Tickle_timeslice(); if ( _Thread_Is_context_switch_necessary() && _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); 10b008: e8 3f 27 00 00 call 10d74c <_Thread_Dispatch> return RTEMS_SUCCESSFUL; } 10b00d: 31 c0 xor %eax,%eax 10b00f: c9 leave 10b010: c3 ret =============================================================================== 0010b19c : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { 10b19c: 55 push %ebp 10b19d: 89 e5 mov %esp,%ebp 10b19f: 53 push %ebx 10b1a0: 83 ec 1c sub $0x1c,%esp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); 10b1a3: 8d 45 f4 lea -0xc(%ebp),%eax 10b1a6: 50 push %eax 10b1a7: ff 75 08 pushl 0x8(%ebp) 10b1aa: e8 39 27 00 00 call 10d8e8 <_Thread_Get> switch ( location ) { 10b1af: 83 c4 10 add $0x10,%esp 10b1b2: 8b 55 f4 mov -0xc(%ebp),%edx 10b1b5: 85 d2 test %edx,%edx 10b1b7: 75 2b jne 10b1e4 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 10b1b9: 8b 90 e4 00 00 00 mov 0xe4(%eax),%edx rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 10b1bf: 9c pushf 10b1c0: fa cli 10b1c1: 59 pop %ecx *the_event_set |= the_new_events; 10b1c2: 8b 5d 0c mov 0xc(%ebp),%ebx 10b1c5: 09 1a or %ebx,(%edx) _ISR_Enable( level ); 10b1c7: 51 push %ecx 10b1c8: 9d popf _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 10b1c9: 83 ec 0c sub $0xc,%esp 10b1cc: 50 push %eax 10b1cd: e8 1e 00 00 00 call 10b1f0 <_Event_Surrender> _Thread_Enable_dispatch(); 10b1d2: e8 ed 26 00 00 call 10d8c4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b1d7: 83 c4 10 add $0x10,%esp 10b1da: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b1dc: 8b 5d fc mov -0x4(%ebp),%ebx 10b1df: c9 leave 10b1e0: c3 ret 10b1e1: 8d 76 00 lea 0x0(%esi),%esi case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b1e4: b8 04 00 00 00 mov $0x4,%eax } 10b1e9: 8b 5d fc mov -0x4(%ebp),%ebx 10b1ec: c9 leave 10b1ed: c3 ret =============================================================================== 0010cffc : #include rtems_status_code rtems_extension_delete( rtems_id id ) { 10cffc: 55 push %ebp 10cffd: 89 e5 mov %esp,%ebp 10cfff: 53 push %ebx 10d000: 83 ec 18 sub $0x18,%esp Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); 10d003: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) _Objects_Get( &_Extension_Information, id, location ); 10d006: 50 push %eax 10d007: ff 75 08 pushl 0x8(%ebp) 10d00a: 68 c0 9b 12 00 push $0x129bc0 10d00f: e8 58 11 00 00 call 10e16c <_Objects_Get> 10d014: 89 c3 mov %eax,%ebx switch ( location ) { 10d016: 83 c4 10 add $0x10,%esp 10d019: 8b 55 f4 mov -0xc(%ebp),%edx 10d01c: 85 d2 test %edx,%edx 10d01e: 75 38 jne 10d058 case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 10d020: 83 ec 0c sub $0xc,%esp 10d023: 8d 40 10 lea 0x10(%eax),%eax 10d026: 50 push %eax 10d027: e8 84 28 00 00 call 10f8b0 <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 10d02c: 59 pop %ecx 10d02d: 58 pop %eax 10d02e: 53 push %ebx 10d02f: 68 c0 9b 12 00 push $0x129bc0 10d034: e8 fb 0c 00 00 call 10dd34 <_Objects_Close> RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 10d039: 58 pop %eax 10d03a: 5a pop %edx 10d03b: 53 push %ebx 10d03c: 68 c0 9b 12 00 push $0x129bc0 10d041: e8 e6 0f 00 00 call 10e02c <_Objects_Free> _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 10d046: e8 81 1c 00 00 call 10eccc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d04b: 83 c4 10 add $0x10,%esp 10d04e: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d050: 8b 5d fc mov -0x4(%ebp),%ebx 10d053: c9 leave 10d054: c3 ret 10d055: 8d 76 00 lea 0x0(%esi),%esi #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d058: b8 04 00 00 00 mov $0x4,%eax } 10d05d: 8b 5d fc mov -0x4(%ebp),%ebx 10d060: c9 leave 10d061: c3 ret =============================================================================== 00111fd0 : rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 111fd0: 55 push %ebp 111fd1: 89 e5 mov %esp,%ebp 111fd3: 53 push %ebx 111fd4: 83 ec 04 sub $0x4,%esp 111fd7: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111fda: 39 05 60 68 12 00 cmp %eax,0x126860 111fe0: 76 1a jbe 111ffc return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; 111fe2: 8d 14 40 lea (%eax,%eax,2),%edx 111fe5: c1 e2 03 shl $0x3,%edx 111fe8: 03 15 64 68 12 00 add 0x126864,%edx 111fee: 8b 52 08 mov 0x8(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111ff1: 85 d2 test %edx,%edx 111ff3: 74 13 je 112008 } 111ff5: 59 pop %ecx 111ff6: 5b pop %ebx 111ff7: 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; 111ff8: ff e2 jmp *%edx 111ffa: 66 90 xchg %ax,%ax ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 111ffc: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112001: 5a pop %edx 112002: 5b pop %ebx 112003: c9 leave 112004: c3 ret 112005: 8d 76 00 lea 0x0(%esi),%esi 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; 112008: 31 c0 xor %eax,%eax } 11200a: 5a pop %edx 11200b: 5b pop %ebx 11200c: c9 leave 11200d: c3 ret =============================================================================== 00112010 : rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112010: 55 push %ebp 112011: 89 e5 mov %esp,%ebp 112013: 53 push %ebx 112014: 83 ec 04 sub $0x4,%esp 112017: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 11201a: 39 05 60 68 12 00 cmp %eax,0x126860 112020: 76 1a jbe 11203c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; 112022: 8d 14 40 lea (%eax,%eax,2),%edx 112025: c1 e2 03 shl $0x3,%edx 112028: 03 15 64 68 12 00 add 0x126864,%edx 11202e: 8b 52 14 mov 0x14(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112031: 85 d2 test %edx,%edx 112033: 74 13 je 112048 } 112035: 59 pop %ecx 112036: 5b pop %ebx 112037: 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; 112038: ff e2 jmp *%edx 11203a: 66 90 xchg %ax,%ax ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 11203c: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112041: 5a pop %edx 112042: 5b pop %ebx 112043: c9 leave 112044: c3 ret 112045: 8d 76 00 lea 0x0(%esi),%esi 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; 112048: 31 c0 xor %eax,%eax } 11204a: 5a pop %edx 11204b: 5b pop %ebx 11204c: c9 leave 11204d: c3 ret =============================================================================== 00110528 : rtems_status_code rtems_io_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 110528: 55 push %ebp 110529: 89 e5 mov %esp,%ebp 11052b: 53 push %ebx 11052c: 83 ec 04 sub $0x4,%esp 11052f: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 110532: 39 05 60 68 12 00 cmp %eax,0x126860 110538: 76 1a jbe 110554 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; 11053a: 8d 14 40 lea (%eax,%eax,2),%edx 11053d: c1 e2 03 shl $0x3,%edx 110540: 03 15 64 68 12 00 add 0x126864,%edx 110546: 8b 12 mov (%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 110548: 85 d2 test %edx,%edx 11054a: 74 14 je 110560 } 11054c: 59 pop %ecx 11054d: 5b pop %ebx 11054e: 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; 11054f: ff e2 jmp *%edx 110551: 8d 76 00 lea 0x0(%esi),%esi ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 110554: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 110559: 5a pop %edx 11055a: 5b pop %ebx 11055b: c9 leave 11055c: c3 ret 11055d: 8d 76 00 lea 0x0(%esi),%esi 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; 110560: 31 c0 xor %eax,%eax } 110562: 5a pop %edx 110563: 5b pop %ebx 110564: c9 leave 110565: c3 ret =============================================================================== 00112050 : rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112050: 55 push %ebp 112051: 89 e5 mov %esp,%ebp 112053: 53 push %ebx 112054: 83 ec 04 sub $0x4,%esp 112057: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 11205a: 39 05 60 68 12 00 cmp %eax,0x126860 112060: 76 1a jbe 11207c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; 112062: 8d 14 40 lea (%eax,%eax,2),%edx 112065: c1 e2 03 shl $0x3,%edx 112068: 03 15 64 68 12 00 add 0x126864,%edx 11206e: 8b 52 04 mov 0x4(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112071: 85 d2 test %edx,%edx 112073: 74 13 je 112088 } 112075: 59 pop %ecx 112076: 5b pop %ebx 112077: 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; 112078: ff e2 jmp *%edx 11207a: 66 90 xchg %ax,%ax ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 11207c: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112081: 5a pop %edx 112082: 5b pop %ebx 112083: c9 leave 112084: c3 ret 112085: 8d 76 00 lea 0x0(%esi),%esi 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; 112088: 31 c0 xor %eax,%eax } 11208a: 5a pop %edx 11208b: 5b pop %ebx 11208c: c9 leave 11208d: c3 ret =============================================================================== 00112090 : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112090: 55 push %ebp 112091: 89 e5 mov %esp,%ebp 112093: 53 push %ebx 112094: 83 ec 04 sub $0x4,%esp 112097: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 11209a: 39 05 60 68 12 00 cmp %eax,0x126860 1120a0: 76 1a jbe 1120bc return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; 1120a2: 8d 14 40 lea (%eax,%eax,2),%edx 1120a5: c1 e2 03 shl $0x3,%edx 1120a8: 03 15 64 68 12 00 add 0x126864,%edx 1120ae: 8b 52 0c mov 0xc(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 1120b1: 85 d2 test %edx,%edx 1120b3: 74 13 je 1120c8 } 1120b5: 59 pop %ecx 1120b6: 5b pop %ebx 1120b7: 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; 1120b8: ff e2 jmp *%edx 1120ba: 66 90 xchg %ax,%ax ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 1120bc: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 1120c1: 5a pop %edx 1120c2: 5b pop %ebx 1120c3: c9 leave 1120c4: c3 ret 1120c5: 8d 76 00 lea 0x0(%esi),%esi 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; 1120c8: 31 c0 xor %eax,%eax } 1120ca: 5a pop %edx 1120cb: 5b pop %ebx 1120cc: c9 leave 1120cd: c3 ret =============================================================================== 0010cebc : 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 ) { 10cebc: 55 push %ebp 10cebd: 89 e5 mov %esp,%ebp 10cebf: 57 push %edi 10cec0: 56 push %esi 10cec1: 53 push %ebx 10cec2: 83 ec 0c sub $0xc,%esp 10cec5: 8b 5d 08 mov 0x8(%ebp),%ebx 10cec8: 8b 75 0c mov 0xc(%ebp),%esi 10cecb: 8b 55 10 mov 0x10(%ebp),%edx rtems_device_major_number major_limit = _IO_Number_of_drivers; 10cece: a1 c0 ab 12 00 mov 0x12abc0,%eax if ( rtems_interrupt_is_in_progress() ) 10ced3: 8b 0d b4 aa 12 00 mov 0x12aab4,%ecx 10ced9: 85 c9 test %ecx,%ecx 10cedb: 0f 85 ab 00 00 00 jne 10cf8c return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 10cee1: 85 d2 test %edx,%edx 10cee3: 0f 84 e7 00 00 00 je 10cfd0 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 10cee9: 89 02 mov %eax,(%edx) if ( driver_table == NULL ) 10ceeb: 85 f6 test %esi,%esi 10ceed: 0f 84 dd 00 00 00 je 10cfd0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cef3: 8b 3e mov (%esi),%edi 10cef5: 85 ff test %edi,%edi 10cef7: 0f 84 c7 00 00 00 je 10cfc4 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10cefd: 39 d8 cmp %ebx,%eax 10ceff: 76 7b jbe 10cf7c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10cf01: a1 30 a8 12 00 mov 0x12a830,%eax 10cf06: 40 inc %eax 10cf07: a3 30 a8 12 00 mov %eax,0x12a830 return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 10cf0c: 85 db test %ebx,%ebx 10cf0e: 0f 85 88 00 00 00 jne 10cf9c static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 10cf14: 8b 0d c0 ab 12 00 mov 0x12abc0,%ecx rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 10cf1a: 85 c9 test %ecx,%ecx 10cf1c: 0f 84 bb 00 00 00 je 10cfdd <== NEVER TAKEN 10cf22: 8b 3d c4 ab 12 00 mov 0x12abc4,%edi 10cf28: 89 f8 mov %edi,%eax 10cf2a: eb 08 jmp 10cf34 10cf2c: 43 inc %ebx 10cf2d: 83 c0 18 add $0x18,%eax 10cf30: 39 d9 cmp %ebx,%ecx 10cf32: 76 0b jbe 10cf3f static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cf34: 83 38 00 cmpl $0x0,(%eax) 10cf37: 75 f3 jne 10cf2c 10cf39: 83 78 04 00 cmpl $0x0,0x4(%eax) 10cf3d: 75 ed jne 10cf2c if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10cf3f: 89 1a mov %ebx,(%edx) if ( m != n ) 10cf41: 39 d9 cmp %ebx,%ecx 10cf43: 0f 84 9b 00 00 00 je 10cfe4 10cf49: 8d 04 5b lea (%ebx,%ebx,2),%eax 10cf4c: c1 e0 03 shl $0x3,%eax } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 10cf4f: 01 c7 add %eax,%edi 10cf51: b9 06 00 00 00 mov $0x6,%ecx 10cf56: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10cf58: e8 83 1c 00 00 call 10ebe0 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 10cf5d: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10cf64: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10cf6b: 89 5d 08 mov %ebx,0x8(%ebp) } 10cf6e: 83 c4 0c add $0xc,%esp 10cf71: 5b pop %ebx 10cf72: 5e pop %esi 10cf73: 5f pop %edi 10cf74: c9 leave _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10cf75: e9 5a 73 00 00 jmp 1142d4 10cf7a: 66 90 xchg %ax,%ax if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; 10cf7c: 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 ); } 10cf81: 83 c4 0c add $0xc,%esp 10cf84: 5b pop %ebx 10cf85: 5e pop %esi 10cf86: 5f pop %edi 10cf87: c9 leave 10cf88: c3 ret 10cf89: 8d 76 00 lea 0x0(%esi),%esi ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; 10cf8c: 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 ); } 10cf91: 83 c4 0c add $0xc,%esp 10cf94: 5b pop %ebx 10cf95: 5e pop %esi 10cf96: 5f pop %edi 10cf97: c9 leave 10cf98: c3 ret 10cf99: 8d 76 00 lea 0x0(%esi),%esi _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 10cf9c: 8d 04 5b lea (%ebx,%ebx,2),%eax 10cf9f: c1 e0 03 shl $0x3,%eax 10cfa2: 8b 0d c4 ab 12 00 mov 0x12abc4,%ecx 10cfa8: 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; 10cfaa: 8b 39 mov (%ecx),%edi 10cfac: 85 ff test %edi,%edi 10cfae: 74 40 je 10cff0 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(); 10cfb0: e8 2b 1c 00 00 call 10ebe0 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 10cfb5: 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 ); } 10cfba: 83 c4 0c add $0xc,%esp 10cfbd: 5b pop %ebx 10cfbe: 5e pop %esi 10cfbf: 5f pop %edi 10cfc0: c9 leave 10cfc1: c3 ret 10cfc2: 66 90 xchg %ax,%ax static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cfc4: 8b 4e 04 mov 0x4(%esi),%ecx 10cfc7: 85 c9 test %ecx,%ecx 10cfc9: 0f 85 2e ff ff ff jne 10cefd 10cfcf: 90 nop if ( driver_table == NULL ) return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; 10cfd0: 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 ); } 10cfd5: 83 c4 0c add $0xc,%esp 10cfd8: 5b pop %ebx 10cfd9: 5e pop %esi 10cfda: 5f pop %edi 10cfdb: c9 leave 10cfdc: c3 ret if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10cfdd: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED 10cfe3: 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(); 10cfe4: e8 f7 1b 00 00 call 10ebe0 <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; 10cfe9: 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; 10cfee: eb 91 jmp 10cf81 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cff0: 8b 49 04 mov 0x4(%ecx),%ecx 10cff3: 85 c9 test %ecx,%ecx 10cff5: 75 b9 jne 10cfb0 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 10cff7: 89 1a mov %ebx,(%edx) 10cff9: 8b 3d c4 ab 12 00 mov 0x12abc4,%edi 10cfff: e9 4b ff ff ff jmp 10cf4f =============================================================================== 0010d004 : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 10d004: 55 push %ebp 10d005: 89 e5 mov %esp,%ebp 10d007: 57 push %edi 10d008: 83 ec 04 sub $0x4,%esp 10d00b: 8b 45 08 mov 0x8(%ebp),%eax if ( rtems_interrupt_is_in_progress() ) 10d00e: 8b 0d b4 aa 12 00 mov 0x12aab4,%ecx 10d014: 85 c9 test %ecx,%ecx 10d016: 75 44 jne 10d05c return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 10d018: 39 05 c0 ab 12 00 cmp %eax,0x12abc0 10d01e: 77 0c ja 10d02c _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; 10d020: b8 0d 00 00 00 mov $0xd,%eax } 10d025: 5a pop %edx 10d026: 5f pop %edi 10d027: c9 leave 10d028: c3 ret 10d029: 8d 76 00 lea 0x0(%esi),%esi 10d02c: 8b 15 30 a8 12 00 mov 0x12a830,%edx 10d032: 42 inc %edx 10d033: 89 15 30 a8 12 00 mov %edx,0x12a830 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( &_IO_Driver_address_table[major], 10d039: 8d 14 40 lea (%eax,%eax,2),%edx 10d03c: 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( 10d03f: 03 15 c4 ab 12 00 add 0x12abc4,%edx 10d045: b9 18 00 00 00 mov $0x18,%ecx 10d04a: 31 c0 xor %eax,%eax 10d04c: 89 d7 mov %edx,%edi 10d04e: f3 aa rep stos %al,%es:(%edi) &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 10d050: e8 8b 1b 00 00 call 10ebe0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d055: 31 c0 xor %eax,%eax } return RTEMS_UNSATISFIED; } 10d057: 5a pop %edx 10d058: 5f pop %edi 10d059: c9 leave 10d05a: c3 ret 10d05b: 90 nop rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; 10d05c: b8 12 00 00 00 mov $0x12,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d061: 5a pop %edx 10d062: 5f pop %edi 10d063: c9 leave 10d064: c3 ret =============================================================================== 001120d0 : rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 1120d0: 55 push %ebp 1120d1: 89 e5 mov %esp,%ebp 1120d3: 53 push %ebx 1120d4: 83 ec 04 sub $0x4,%esp 1120d7: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 1120da: 39 05 60 68 12 00 cmp %eax,0x126860 1120e0: 76 1a jbe 1120fc return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; 1120e2: 8d 14 40 lea (%eax,%eax,2),%edx 1120e5: c1 e2 03 shl $0x3,%edx 1120e8: 03 15 64 68 12 00 add 0x126864,%edx 1120ee: 8b 52 10 mov 0x10(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 1120f1: 85 d2 test %edx,%edx 1120f3: 74 13 je 112108 } 1120f5: 59 pop %ecx 1120f6: 5b pop %ebx 1120f7: 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; 1120f8: ff e2 jmp *%edx 1120fa: 66 90 xchg %ax,%ax ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 1120fc: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112101: 5a pop %edx 112102: 5b pop %ebx 112103: c9 leave 112104: c3 ret 112105: 8d 76 00 lea 0x0(%esi),%esi 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; 112108: 31 c0 xor %eax,%eax } 11210a: 5a pop %edx 11210b: 5b pop %ebx 11210c: c9 leave 11210d: c3 ret =============================================================================== 0010deec : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10deec: 55 push %ebp 10deed: 89 e5 mov %esp,%ebp 10deef: 57 push %edi 10def0: 56 push %esi 10def1: 53 push %ebx 10def2: 83 ec 1c sub $0x1c,%esp 10def5: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10def8: 85 ff test %edi,%edi 10defa: 74 4d je 10df49 <== NEVER TAKEN 10defc: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { #if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) 10df03: 8b 55 e4 mov -0x1c(%ebp),%edx 10df06: 8b 04 95 48 99 12 00 mov 0x129948(,%edx,4),%eax 10df0d: 85 c0 test %eax,%eax 10df0f: 74 2f je 10df40 continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; 10df11: 8b 70 04 mov 0x4(%eax),%esi if ( !information ) 10df14: 85 f6 test %esi,%esi 10df16: 74 28 je 10df40 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10df18: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 10df1d: 74 21 je 10df40 <== NEVER TAKEN 10df1f: bb 01 00 00 00 mov $0x1,%ebx the_thread = (Thread_Control *)information->local_table[ i ]; 10df24: 8b 46 1c mov 0x1c(%esi),%eax 10df27: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !the_thread ) 10df2a: 85 c0 test %eax,%eax 10df2c: 74 09 je 10df37 <== NEVER TAKEN continue; (*routine)(the_thread); 10df2e: 83 ec 0c sub $0xc,%esp 10df31: 50 push %eax 10df32: ff d7 call *%edi 10df34: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10df37: 43 inc %ebx 10df38: 0f b7 46 10 movzwl 0x10(%esi),%eax 10df3c: 39 d8 cmp %ebx,%eax 10df3e: 73 e4 jae 10df24 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10df40: ff 45 e4 incl -0x1c(%ebp) 10df43: 83 7d e4 04 cmpl $0x4,-0x1c(%ebp) 10df47: 75 ba jne 10df03 (*routine)(the_thread); } } } 10df49: 8d 65 f4 lea -0xc(%ebp),%esp 10df4c: 5b pop %ebx 10df4d: 5e pop %esi 10df4e: 5f pop %edi 10df4f: c9 leave 10df50: c3 ret =============================================================================== 001163bc : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 1163bc: 55 push %ebp 1163bd: 89 e5 mov %esp,%ebp 1163bf: 57 push %edi 1163c0: 56 push %esi 1163c1: 53 push %ebx 1163c2: 83 ec 1c sub $0x1c,%esp 1163c5: 8b 7d 08 mov 0x8(%ebp),%edi 1163c8: 8b 5d 0c mov 0xc(%ebp),%ebx 1163cb: 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 ) 1163ce: 85 db test %ebx,%ebx 1163d0: 74 62 je 116434 return RTEMS_INVALID_ADDRESS; if ( !count ) 1163d2: 85 f6 test %esi,%esi 1163d4: 74 5e je 116434 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 1163d6: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 1163d7: 8d 45 e4 lea -0x1c(%ebp),%eax 1163da: 50 push %eax 1163db: 57 push %edi 1163dc: 68 20 0c 14 00 push $0x140c20 1163e1: e8 be 4d 00 00 call 11b1a4 <_Objects_Get> switch ( location ) { 1163e6: 83 c4 10 add $0x10,%esp 1163e9: 8b 55 e4 mov -0x1c(%ebp),%edx 1163ec: 85 d2 test %edx,%edx 1163ee: 74 10 je 116400 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1163f0: b8 04 00 00 00 mov $0x4,%eax } 1163f5: 8d 65 f4 lea -0xc(%ebp),%esp 1163f8: 5b pop %ebx 1163f9: 5e pop %esi 1163fa: 5f pop %edi 1163fb: c9 leave 1163fc: c3 ret 1163fd: 8d 76 00 lea 0x0(%esi),%esi the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( 116400: 83 ec 08 sub $0x8,%esp 116403: 56 push %esi 116404: 6a 00 push $0x0 116406: 57 push %edi 116407: ff 75 10 pushl 0x10(%ebp) 11640a: 53 push %ebx 11640b: 83 c0 14 add $0x14,%eax 11640e: 50 push %eax 11640f: e8 7c 34 00 00 call 119890 <_CORE_message_queue_Broadcast> 116414: 89 c3 mov %eax,%ebx NULL, #endif count ); _Thread_Enable_dispatch(); 116416: 83 c4 20 add $0x20,%esp 116419: e8 e6 58 00 00 call 11bd04 <_Thread_Enable_dispatch> return 11641e: 83 ec 0c sub $0xc,%esp 116421: 53 push %ebx 116422: e8 69 03 00 00 call 116790 <_Message_queue_Translate_core_message_queue_return_code> 116427: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11642a: 8d 65 f4 lea -0xc(%ebp),%esp 11642d: 5b pop %ebx 11642e: 5e pop %esi 11642f: 5f pop %edi 116430: c9 leave 116431: c3 ret 116432: 66 90 xchg %ax,%ax if ( !buffer ) return RTEMS_INVALID_ADDRESS; if ( !count ) return RTEMS_INVALID_ADDRESS; 116434: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116439: 8d 65 f4 lea -0xc(%ebp),%esp 11643c: 5b pop %ebx 11643d: 5e pop %esi 11643e: 5f pop %edi 11643f: c9 leave 116440: c3 ret =============================================================================== 00113858 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { 113858: 55 push %ebp 113859: 89 e5 mov %esp,%ebp 11385b: 57 push %edi 11385c: 56 push %esi 11385d: 53 push %ebx 11385e: 83 ec 2c sub $0x2c,%esp 113861: 8b 5d 08 mov 0x8(%ebp),%ebx 113864: 8b 75 0c mov 0xc(%ebp),%esi 113867: 8b 4d 10 mov 0x10(%ebp),%ecx 11386a: 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 ) ) 11386d: 85 db test %ebx,%ebx 11386f: 74 2f je 1138a0 return RTEMS_INVALID_NAME; if ( !id ) 113871: 85 ff test %edi,%edi 113873: 0f 84 a3 00 00 00 je 11391c if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 113879: 85 f6 test %esi,%esi 11387b: 74 13 je 113890 return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 11387d: 85 c9 test %ecx,%ecx 11387f: 75 2f jne 1138b0 return RTEMS_INVALID_SIZE; 113881: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113886: 8d 65 f4 lea -0xc(%ebp),%esp 113889: 5b pop %ebx 11388a: 5e pop %esi 11388b: 5f pop %edi 11388c: c9 leave 11388d: c3 ret 11388e: 66 90 xchg %ax,%ax !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) return RTEMS_INVALID_NUMBER; 113890: b8 0a 00 00 00 mov $0xa,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113895: 8d 65 f4 lea -0xc(%ebp),%esp 113898: 5b pop %ebx 113899: 5e pop %esi 11389a: 5f pop %edi 11389b: c9 leave 11389c: c3 ret 11389d: 8d 76 00 lea 0x0(%esi),%esi #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 1138a0: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1138a5: 8d 65 f4 lea -0xc(%ebp),%esp 1138a8: 5b pop %ebx 1138a9: 5e pop %esi 1138aa: 5f pop %edi 1138ab: c9 leave 1138ac: c3 ret 1138ad: 8d 76 00 lea 0x0(%esi),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1138b0: a1 90 f6 12 00 mov 0x12f690,%eax 1138b5: 40 inc %eax 1138b6: a3 90 f6 12 00 mov %eax,0x12f690 #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 1138bb: 89 4d d4 mov %ecx,-0x2c(%ebp) 1138be: e8 8d 54 00 00 call 118d50 <_Message_queue_Allocate> 1138c3: 89 c2 mov %eax,%edx if ( !the_message_queue ) { 1138c5: 85 c0 test %eax,%eax 1138c7: 8b 4d d4 mov -0x2c(%ebp),%ecx 1138ca: 74 7c je 113948 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 1138cc: 8b 45 14 mov 0x14(%ebp),%eax 1138cf: 89 42 10 mov %eax,0x10(%edx) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 1138d2: a8 04 test $0x4,%al 1138d4: 0f 95 c0 setne %al 1138d7: 0f b6 c0 movzbl %al,%eax 1138da: 89 45 e4 mov %eax,-0x1c(%ebp) else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 1138dd: 51 push %ecx 1138de: 56 push %esi 1138df: 8d 45 e4 lea -0x1c(%ebp),%eax 1138e2: 50 push %eax 1138e3: 8d 42 14 lea 0x14(%edx),%eax 1138e6: 50 push %eax 1138e7: 89 55 d4 mov %edx,-0x2c(%ebp) 1138ea: e8 e1 10 00 00 call 1149d0 <_CORE_message_queue_Initialize> 1138ef: 83 c4 10 add $0x10,%esp 1138f2: 84 c0 test %al,%al 1138f4: 8b 55 d4 mov -0x2c(%ebp),%edx 1138f7: 75 2f jne 113928 */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 1138f9: 83 ec 08 sub $0x8,%esp 1138fc: 52 push %edx 1138fd: 68 a0 f9 12 00 push $0x12f9a0 113902: e8 79 1e 00 00 call 115780 <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 113907: e8 94 2b 00 00 call 1164a0 <_Thread_Enable_dispatch> return RTEMS_UNSATISFIED; 11390c: 83 c4 10 add $0x10,%esp 11390f: b8 0d 00 00 00 mov $0xd,%eax 113914: e9 6d ff ff ff jmp 113886 113919: 8d 76 00 lea 0x0(%esi),%esi if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 11391c: b8 09 00 00 00 mov $0x9,%eax 113921: e9 60 ff ff ff jmp 113886 113926: 66 90 xchg %ax,%ax Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 113928: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 11392b: 0f b7 f0 movzwl %ax,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 11392e: 8b 0d bc f9 12 00 mov 0x12f9bc,%ecx 113934: 89 14 b1 mov %edx,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 113937: 89 5a 0c mov %ebx,0xc(%edx) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 11393a: 89 07 mov %eax,(%edi) name, 0 ); #endif _Thread_Enable_dispatch(); 11393c: e8 5f 2b 00 00 call 1164a0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 113941: 31 c0 xor %eax,%eax 113943: e9 3e ff ff ff jmp 113886 _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); if ( !the_message_queue ) { _Thread_Enable_dispatch(); 113948: e8 53 2b 00 00 call 1164a0 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 11394d: b8 05 00 00 00 mov $0x5,%eax 113952: e9 2f ff ff ff jmp 113886 =============================================================================== 00116544 : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 116544: 55 push %ebp 116545: 89 e5 mov %esp,%ebp 116547: 53 push %ebx 116548: 83 ec 18 sub $0x18,%esp register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); 11654b: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 11654e: 50 push %eax 11654f: ff 75 08 pushl 0x8(%ebp) 116552: 68 20 0c 14 00 push $0x140c20 116557: e8 48 4c 00 00 call 11b1a4 <_Objects_Get> 11655c: 89 c3 mov %eax,%ebx switch ( location ) { 11655e: 83 c4 10 add $0x10,%esp 116561: 8b 4d f4 mov -0xc(%ebp),%ecx 116564: 85 c9 test %ecx,%ecx 116566: 75 3c jne 1165a4 case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 116568: 83 ec 08 sub $0x8,%esp 11656b: 50 push %eax 11656c: 68 20 0c 14 00 push $0x140c20 116571: e8 ba 47 00 00 call 11ad30 <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 116576: 83 c4 0c add $0xc,%esp 116579: 6a 05 push $0x5 11657b: 6a 00 push $0x0 11657d: 8d 43 14 lea 0x14(%ebx),%eax 116580: 50 push %eax 116581: e8 8e 33 00 00 call 119914 <_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 ); 116586: 58 pop %eax 116587: 5a pop %edx 116588: 53 push %ebx 116589: 68 20 0c 14 00 push $0x140c20 11658e: e8 95 4a 00 00 call 11b028 <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 116593: e8 6c 57 00 00 call 11bd04 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116598: 83 c4 10 add $0x10,%esp 11659b: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11659d: 8b 5d fc mov -0x4(%ebp),%ebx 1165a0: c9 leave 1165a1: c3 ret 1165a2: 66 90 xchg %ax,%ax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1165a4: b8 04 00 00 00 mov $0x4,%eax } 1165a9: 8b 5d fc mov -0x4(%ebp),%ebx 1165ac: c9 leave 1165ad: c3 ret =============================================================================== 001165b0 : rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { 1165b0: 55 push %ebp 1165b1: 89 e5 mov %esp,%ebp 1165b3: 53 push %ebx 1165b4: 83 ec 14 sub $0x14,%esp 1165b7: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 1165ba: 85 db test %ebx,%ebx 1165bc: 74 46 je 116604 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 1165be: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 1165bf: 8d 45 f4 lea -0xc(%ebp),%eax 1165c2: 50 push %eax 1165c3: ff 75 08 pushl 0x8(%ebp) 1165c6: 68 20 0c 14 00 push $0x140c20 1165cb: e8 d4 4b 00 00 call 11b1a4 <_Objects_Get> switch ( location ) { 1165d0: 83 c4 10 add $0x10,%esp 1165d3: 8b 55 f4 mov -0xc(%ebp),%edx 1165d6: 85 d2 test %edx,%edx 1165d8: 74 0a je 1165e4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1165da: b8 04 00 00 00 mov $0x4,%eax } 1165df: 8b 5d fc mov -0x4(%ebp),%ebx 1165e2: c9 leave 1165e3: 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 ); 1165e4: 83 ec 0c sub $0xc,%esp 1165e7: 83 c0 14 add $0x14,%eax 1165ea: 50 push %eax 1165eb: e8 60 33 00 00 call 119950 <_CORE_message_queue_Flush> 1165f0: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 1165f2: e8 0d 57 00 00 call 11bd04 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1165f7: 83 c4 10 add $0x10,%esp 1165fa: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1165fc: 8b 5d fc mov -0x4(%ebp),%ebx 1165ff: c9 leave 116600: c3 ret 116601: 8d 76 00 lea 0x0(%esi),%esi { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) return RTEMS_INVALID_ADDRESS; 116604: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116609: 8b 5d fc mov -0x4(%ebp),%ebx 11660c: c9 leave 11660d: c3 ret =============================================================================== 00116610 : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { 116610: 55 push %ebp 116611: 89 e5 mov %esp,%ebp 116613: 53 push %ebx 116614: 83 ec 14 sub $0x14,%esp 116617: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 11661a: 85 db test %ebx,%ebx 11661c: 74 3a je 116658 11661e: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 11661f: 8d 45 f4 lea -0xc(%ebp),%eax 116622: 50 push %eax 116623: ff 75 08 pushl 0x8(%ebp) 116626: 68 20 0c 14 00 push $0x140c20 11662b: e8 74 4b 00 00 call 11b1a4 <_Objects_Get> switch ( location ) { 116630: 83 c4 10 add $0x10,%esp 116633: 8b 55 f4 mov -0xc(%ebp),%edx 116636: 85 d2 test %edx,%edx 116638: 74 0a je 116644 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 11663a: b8 04 00 00 00 mov $0x4,%eax } 11663f: 8b 5d fc mov -0x4(%ebp),%ebx 116642: c9 leave 116643: 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; 116644: 8b 40 5c mov 0x5c(%eax),%eax 116647: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 116649: e8 b6 56 00 00 call 11bd04 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11664e: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116650: 8b 5d fc mov -0x4(%ebp),%ebx 116653: c9 leave 116654: c3 ret 116655: 8d 76 00 lea 0x0(%esi),%esi { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) return RTEMS_INVALID_ADDRESS; 116658: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11665d: 8b 5d fc mov -0x4(%ebp),%ebx 116660: c9 leave 116661: c3 ret =============================================================================== 0011397c : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 11397c: 55 push %ebp 11397d: 89 e5 mov %esp,%ebp 11397f: 56 push %esi 113980: 53 push %ebx 113981: 83 ec 10 sub $0x10,%esp 113984: 8b 5d 0c mov 0xc(%ebp),%ebx 113987: 8b 75 10 mov 0x10(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 11398a: 85 db test %ebx,%ebx 11398c: 74 6e je 1139fc return RTEMS_INVALID_ADDRESS; if ( !size ) 11398e: 85 f6 test %esi,%esi 113990: 74 6a je 1139fc Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 113992: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 113993: 8d 45 f4 lea -0xc(%ebp),%eax 113996: 50 push %eax 113997: ff 75 08 pushl 0x8(%ebp) 11399a: 68 a0 f9 12 00 push $0x12f9a0 11399f: e8 1c 1f 00 00 call 1158c0 <_Objects_Get> switch ( location ) { 1139a4: 83 c4 10 add $0x10,%esp 1139a7: 8b 55 f4 mov -0xc(%ebp),%edx 1139aa: 85 d2 test %edx,%edx 1139ac: 75 42 jne 1139f0 if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 1139ae: 83 ec 08 sub $0x8,%esp 1139b1: 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; 1139b4: 8b 55 14 mov 0x14(%ebp),%edx 1139b7: 83 e2 01 and $0x1,%edx 1139ba: 83 f2 01 xor $0x1,%edx 1139bd: 52 push %edx 1139be: 56 push %esi 1139bf: 53 push %ebx 1139c0: ff 70 08 pushl 0x8(%eax) 1139c3: 83 c0 14 add $0x14,%eax 1139c6: 50 push %eax 1139c7: e8 a4 10 00 00 call 114a70 <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 1139cc: 83 c4 20 add $0x20,%esp 1139cf: e8 cc 2a 00 00 call 1164a0 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 1139d4: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code 1139d7: a1 18 f9 12 00 mov 0x12f918,%eax size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 1139dc: ff 70 34 pushl 0x34(%eax) 1139df: e8 a0 00 00 00 call 113a84 <_Message_queue_Translate_core_message_queue_return_code> 1139e4: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1139e7: 8d 65 f8 lea -0x8(%ebp),%esp 1139ea: 5b pop %ebx 1139eb: 5e pop %esi 1139ec: c9 leave 1139ed: c3 ret 1139ee: 66 90 xchg %ax,%ax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1139f0: b8 04 00 00 00 mov $0x4,%eax } 1139f5: 8d 65 f8 lea -0x8(%ebp),%esp 1139f8: 5b pop %ebx 1139f9: 5e pop %esi 1139fa: c9 leave 1139fb: c3 ret if ( !buffer ) return RTEMS_INVALID_ADDRESS; if ( !size ) return RTEMS_INVALID_ADDRESS; 1139fc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113a01: 8d 65 f8 lea -0x8(%ebp),%esp 113a04: 5b pop %ebx 113a05: 5e pop %esi 113a06: c9 leave 113a07: c3 ret =============================================================================== 0010b3a8 : rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { 10b3a8: 55 push %ebp 10b3a9: 89 e5 mov %esp,%ebp 10b3ab: 56 push %esi 10b3ac: 53 push %ebx 10b3ad: 83 ec 10 sub $0x10,%esp 10b3b0: 8b 75 08 mov 0x8(%ebp),%esi 10b3b3: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10b3b6: 85 db test %ebx,%ebx 10b3b8: 74 5e je 10b418 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 10b3ba: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 10b3bb: 8d 45 f4 lea -0xc(%ebp),%eax 10b3be: 50 push %eax 10b3bf: 56 push %esi 10b3c0: 68 e0 67 12 00 push $0x1267e0 10b3c5: e8 9a 19 00 00 call 10cd64 <_Objects_Get> switch ( location ) { 10b3ca: 83 c4 10 add $0x10,%esp 10b3cd: 8b 55 f4 mov -0xc(%ebp),%edx 10b3d0: 85 d2 test %edx,%edx 10b3d2: 74 0c je 10b3e0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b3d4: b8 04 00 00 00 mov $0x4,%eax } 10b3d9: 8d 65 f8 lea -0x8(%ebp),%esp 10b3dc: 5b pop %ebx 10b3dd: 5e pop %esi 10b3de: c9 leave 10b3df: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 10b3e0: 6a 00 push $0x0 10b3e2: 6a 00 push $0x0 10b3e4: 68 ff ff ff 7f push $0x7fffffff 10b3e9: 6a 00 push $0x0 10b3eb: 56 push %esi 10b3ec: ff 75 10 pushl 0x10(%ebp) 10b3ef: 53 push %ebx the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_message_queue_Send( 10b3f0: 83 c0 14 add $0x14,%eax 10b3f3: 50 push %eax 10b3f4: e8 f3 0b 00 00 call 10bfec <_CORE_message_queue_Submit> 10b3f9: 89 c3 mov %eax,%ebx MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 10b3fb: 83 c4 20 add $0x20,%esp 10b3fe: e8 c1 24 00 00 call 10d8c4 <_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); 10b403: 83 ec 0c sub $0xc,%esp 10b406: 53 push %ebx 10b407: e8 18 00 00 00 call 10b424 <_Message_queue_Translate_core_message_queue_return_code> 10b40c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b40f: 8d 65 f8 lea -0x8(%ebp),%esp 10b412: 5b pop %ebx 10b413: 5e pop %esi 10b414: c9 leave 10b415: c3 ret 10b416: 66 90 xchg %ax,%ax register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) return RTEMS_INVALID_ADDRESS; 10b418: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b41d: 8d 65 f8 lea -0x8(%ebp),%esp 10b420: 5b pop %ebx 10b421: 5e pop %esi 10b422: c9 leave 10b423: c3 ret =============================================================================== 001167a0 : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { 1167a0: 55 push %ebp 1167a1: 89 e5 mov %esp,%ebp 1167a3: 56 push %esi 1167a4: 53 push %ebx 1167a5: 83 ec 10 sub $0x10,%esp 1167a8: 8b 75 08 mov 0x8(%ebp),%esi 1167ab: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 1167ae: 85 db test %ebx,%ebx 1167b0: 74 5e je 116810 1167b2: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 1167b3: 8d 45 f4 lea -0xc(%ebp),%eax 1167b6: 50 push %eax 1167b7: 56 push %esi 1167b8: 68 20 0c 14 00 push $0x140c20 1167bd: e8 e2 49 00 00 call 11b1a4 <_Objects_Get> switch ( location ) { 1167c2: 83 c4 10 add $0x10,%esp 1167c5: 8b 55 f4 mov -0xc(%ebp),%edx 1167c8: 85 d2 test %edx,%edx 1167ca: 74 0c je 1167d8 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1167cc: b8 04 00 00 00 mov $0x4,%eax } 1167d1: 8d 65 f8 lea -0x8(%ebp),%esp 1167d4: 5b pop %ebx 1167d5: 5e pop %esi 1167d6: c9 leave 1167d7: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 1167d8: 6a 00 push $0x0 1167da: 6a 00 push $0x0 1167dc: 68 00 00 00 80 push $0x80000000 1167e1: 6a 00 push $0x0 1167e3: 56 push %esi 1167e4: ff 75 10 pushl 0x10(%ebp) 1167e7: 53 push %ebx the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_message_queue_Urgent( 1167e8: 83 c0 14 add $0x14,%eax 1167eb: 50 push %eax 1167ec: e8 3b 33 00 00 call 119b2c <_CORE_message_queue_Submit> 1167f1: 89 c3 mov %eax,%ebx id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 1167f3: 83 c4 20 add $0x20,%esp 1167f6: e8 09 55 00 00 call 11bd04 <_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); 1167fb: 83 ec 0c sub $0xc,%esp 1167fe: 53 push %ebx 1167ff: e8 8c ff ff ff call 116790 <_Message_queue_Translate_core_message_queue_return_code> 116804: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116807: 8d 65 f8 lea -0x8(%ebp),%esp 11680a: 5b pop %ebx 11680b: 5e pop %esi 11680c: c9 leave 11680d: c3 ret 11680e: 66 90 xchg %ax,%ax register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) return RTEMS_INVALID_ADDRESS; 116810: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116815: 8d 65 f8 lea -0x8(%ebp),%esp 116818: 5b pop %ebx 116819: 5e pop %esi 11681a: c9 leave 11681b: c3 ret =============================================================================== 0010cea4 : const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 10cea4: 55 push %ebp 10cea5: 89 e5 mov %esp,%ebp 10cea7: 83 ec 08 sub $0x8,%esp 10ceaa: 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 ) 10cead: 83 f8 01 cmp $0x1,%eax 10ceb0: 74 2a je 10cedc api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 10ceb2: 83 f8 02 cmp $0x2,%eax 10ceb5: 74 09 je 10cec0 #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; 10ceb7: b8 7b 38 12 00 mov $0x12387b,%eax class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; } 10cebc: c9 leave 10cebd: c3 ret 10cebe: 66 90 xchg %ax,%ax 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; 10cec0: b8 60 85 12 00 mov $0x128560,%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 ); 10cec5: 83 ec 08 sub $0x8,%esp 10cec8: ff 75 0c pushl 0xc(%ebp) 10cecb: 50 push %eax 10cecc: e8 7f 4a 00 00 call 111950 if ( class_assoc ) 10ced1: 83 c4 10 add $0x10,%esp 10ced4: 85 c0 test %eax,%eax 10ced6: 74 0c je 10cee4 return class_assoc->name; 10ced8: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10ceda: c9 leave 10cedb: 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; 10cedc: b8 40 85 12 00 mov $0x128540,%eax 10cee1: eb e2 jmp 10cec5 10cee3: 90 nop 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"; 10cee4: b8 83 38 12 00 mov $0x123883,%eax } 10cee9: c9 leave 10ceea: c3 ret =============================================================================== 0010ceec : }; const char *rtems_object_get_api_name( int api ) { 10ceec: 55 push %ebp 10ceed: 89 e5 mov %esp,%ebp 10ceef: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); 10cef2: ff 75 08 pushl 0x8(%ebp) 10cef5: 68 e0 85 12 00 push $0x1285e0 10cefa: e8 51 4a 00 00 call 111950 if ( api_assoc ) 10ceff: 83 c4 10 add $0x10,%esp 10cf02: 85 c0 test %eax,%eax 10cf04: 74 06 je 10cf0c return api_assoc->name; 10cf06: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10cf08: c9 leave 10cf09: c3 ret 10cf0a: 66 90 xchg %ax,%ax 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"; 10cf0c: b8 83 38 12 00 mov $0x123883,%eax } 10cf11: c9 leave 10cf12: c3 ret =============================================================================== 0010cf54 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 10cf54: 55 push %ebp 10cf55: 89 e5 mov %esp,%ebp 10cf57: 57 push %edi 10cf58: 56 push %esi 10cf59: 53 push %ebx 10cf5a: 83 ec 0c sub $0xc,%esp 10cf5d: 8b 5d 10 mov 0x10(%ebp),%ebx int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10cf60: 85 db test %ebx,%ebx 10cf62: 74 60 je 10cfc4 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 10cf64: 83 ec 08 sub $0x8,%esp 10cf67: 0f b7 45 0c movzwl 0xc(%ebp),%eax 10cf6b: 50 push %eax 10cf6c: ff 75 08 pushl 0x8(%ebp) 10cf6f: e8 78 1a 00 00 call 10e9ec <_Objects_Get_information> if ( !obj_info ) 10cf74: 83 c4 10 add $0x10,%esp 10cf77: 85 c0 test %eax,%eax 10cf79: 74 59 je 10cfd4 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 10cf7b: 8b 50 08 mov 0x8(%eax),%edx 10cf7e: 89 13 mov %edx,(%ebx) info->maximum_id = obj_info->maximum_id; 10cf80: 8b 50 0c mov 0xc(%eax),%edx 10cf83: 89 53 04 mov %edx,0x4(%ebx) info->auto_extend = obj_info->auto_extend; 10cf86: 8a 50 12 mov 0x12(%eax),%dl 10cf89: 88 53 0c mov %dl,0xc(%ebx) info->maximum = obj_info->maximum; 10cf8c: 0f b7 70 10 movzwl 0x10(%eax),%esi 10cf90: 89 73 08 mov %esi,0x8(%ebx) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10cf93: 85 f6 test %esi,%esi 10cf95: 74 44 je 10cfdb <== NEVER TAKEN 10cf97: 8b 78 1c mov 0x1c(%eax),%edi 10cf9a: b9 01 00 00 00 mov $0x1,%ecx 10cf9f: b8 01 00 00 00 mov $0x1,%eax 10cfa4: 31 d2 xor %edx,%edx 10cfa6: 66 90 xchg %ax,%ax if ( !obj_info->local_table[i] ) unallocated++; 10cfa8: 83 3c 8f 01 cmpl $0x1,(%edi,%ecx,4) 10cfac: 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++ ) 10cfaf: 40 inc %eax 10cfb0: 89 c1 mov %eax,%ecx 10cfb2: 39 c6 cmp %eax,%esi 10cfb4: 73 f2 jae 10cfa8 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 10cfb6: 89 53 10 mov %edx,0x10(%ebx) return RTEMS_SUCCESSFUL; 10cfb9: 31 c0 xor %eax,%eax } 10cfbb: 8d 65 f4 lea -0xc(%ebp),%esp 10cfbe: 5b pop %ebx 10cfbf: 5e pop %esi 10cfc0: 5f pop %edi 10cfc1: c9 leave 10cfc2: c3 ret 10cfc3: 90 nop /* * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; 10cfc4: b8 09 00 00 00 mov $0x9,%eax unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 10cfc9: 8d 65 f4 lea -0xc(%ebp),%esp 10cfcc: 5b pop %ebx 10cfcd: 5e pop %esi 10cfce: 5f pop %edi 10cfcf: c9 leave 10cfd0: c3 ret 10cfd1: 8d 76 00 lea 0x0(%esi),%esi if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) return RTEMS_INVALID_NUMBER; 10cfd4: b8 0a 00 00 00 mov $0xa,%eax 10cfd9: eb e0 jmp 10cfbb 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++ ) 10cfdb: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cfdd: eb d7 jmp 10cfb6 <== NOT EXECUTED =============================================================================== 0010c520 : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { 10c520: 55 push %ebp 10c521: 89 e5 mov %esp,%ebp 10c523: 53 push %ebx 10c524: 83 ec 14 sub $0x14,%esp 10c527: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10c52a: 85 db test %ebx,%ebx 10c52c: 74 26 je 10c554 return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); 10c52e: 83 ec 08 sub $0x8,%esp 10c531: 8d 45 f4 lea -0xc(%ebp),%eax 10c534: 50 push %eax 10c535: ff 75 08 pushl 0x8(%ebp) 10c538: e8 d3 1a 00 00 call 10e010 <_Objects_Id_to_name> *name = name_u.name_u32; 10c53d: 8b 55 f4 mov -0xc(%ebp),%edx 10c540: 89 13 mov %edx,(%ebx) return _Status_Object_name_errors_to_status[ status ]; 10c542: 8b 04 85 ac 23 12 00 mov 0x1223ac(,%eax,4),%eax 10c549: 83 c4 10 add $0x10,%esp } 10c54c: 8b 5d fc mov -0x4(%ebp),%ebx 10c54f: c9 leave 10c550: c3 ret 10c551: 8d 76 00 lea 0x0(%esi),%esi { Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) return RTEMS_INVALID_ADDRESS; 10c554: 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 ]; } 10c559: 8b 5d fc mov -0x4(%ebp),%ebx 10c55c: c9 leave 10c55d: c3 ret =============================================================================== 0010d038 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 10d038: 55 push %ebp 10d039: 89 e5 mov %esp,%ebp 10d03b: 57 push %edi 10d03c: 56 push %esi 10d03d: 53 push %ebx 10d03e: 83 ec 1c sub $0x1c,%esp 10d041: 8b 75 08 mov 0x8(%ebp),%esi 10d044: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10d047: 85 ff test %edi,%edi 10d049: 74 61 je 10d0ac return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10d04b: 85 f6 test %esi,%esi 10d04d: 74 35 je 10d084 information = _Objects_Get_information_id( tmpId ); 10d04f: 83 ec 0c sub $0xc,%esp 10d052: 56 push %esi 10d053: e8 74 19 00 00 call 10e9cc <_Objects_Get_information_id> 10d058: 89 c3 mov %eax,%ebx if ( !information ) 10d05a: 83 c4 10 add $0x10,%esp 10d05d: 85 c0 test %eax,%eax 10d05f: 74 16 je 10d077 return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10d061: 50 push %eax 10d062: 8d 45 e4 lea -0x1c(%ebp),%eax 10d065: 50 push %eax 10d066: 56 push %esi 10d067: 53 push %ebx 10d068: e8 ff 1a 00 00 call 10eb6c <_Objects_Get> switch ( location ) { 10d06d: 83 c4 10 add $0x10,%esp 10d070: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d073: 85 c9 test %ecx,%ecx 10d075: 74 19 je 10d090 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d077: b8 04 00 00 00 mov $0x4,%eax } 10d07c: 8d 65 f4 lea -0xc(%ebp),%esp 10d07f: 5b pop %ebx 10d080: 5e pop %esi 10d081: 5f pop %edi 10d082: c9 leave 10d083: c3 ret Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10d084: a1 38 ac 12 00 mov 0x12ac38,%eax 10d089: 8b 70 08 mov 0x8(%eax),%esi 10d08c: eb c1 jmp 10d04f 10d08e: 66 90 xchg %ax,%ax the_object = _Objects_Get( information, tmpId, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 10d090: 52 push %edx 10d091: 57 push %edi 10d092: 50 push %eax 10d093: 53 push %ebx 10d094: e8 0b 1d 00 00 call 10eda4 <_Objects_Set_name> _Thread_Enable_dispatch(); 10d099: e8 16 27 00 00 call 10f7b4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d09e: 83 c4 10 add $0x10,%esp 10d0a1: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d0a3: 8d 65 f4 lea -0xc(%ebp),%esp 10d0a6: 5b pop %ebx 10d0a7: 5e pop %esi 10d0a8: 5f pop %edi 10d0a9: c9 leave 10d0aa: c3 ret 10d0ab: 90 nop Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; 10d0ac: b8 09 00 00 00 mov $0x9,%eax 10d0b1: eb c9 jmp 10d07c =============================================================================== 0011681c : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 11681c: 55 push %ebp 11681d: 89 e5 mov %esp,%ebp 11681f: 57 push %edi 116820: 56 push %esi 116821: 53 push %ebx 116822: 83 ec 1c sub $0x1c,%esp 116825: 8b 5d 08 mov 0x8(%ebp),%ebx 116828: 8b 75 0c mov 0xc(%ebp),%esi 11682b: 8b 55 10 mov 0x10(%ebp),%edx 11682e: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 116831: 85 db test %ebx,%ebx 116833: 74 47 je 11687c return RTEMS_INVALID_NAME; if ( !starting_address ) 116835: 85 f6 test %esi,%esi 116837: 74 23 je 11685c return RTEMS_INVALID_ADDRESS; if ( !id ) 116839: 8b 45 1c mov 0x1c(%ebp),%eax 11683c: 85 c0 test %eax,%eax 11683e: 74 1c je 11685c <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 116840: 85 d2 test %edx,%edx 116842: 74 28 je 11686c 116844: 85 ff test %edi,%edi 116846: 74 24 je 11686c 116848: 39 fa cmp %edi,%edx 11684a: 72 20 jb 11686c 11684c: f7 c7 03 00 00 00 test $0x3,%edi 116852: 75 18 jne 11686c !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 116854: f7 c6 03 00 00 00 test $0x3,%esi 11685a: 74 30 je 11688c return RTEMS_INVALID_ADDRESS; 11685c: b8 09 00 00 00 mov $0x9,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 116861: 8d 65 f4 lea -0xc(%ebp),%esp 116864: 5b pop %ebx 116865: 5e pop %esi 116866: 5f pop %edi 116867: c9 leave 116868: c3 ret 116869: 8d 76 00 lea 0x0(%esi),%esi 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; 11686c: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 116871: 8d 65 f4 lea -0xc(%ebp),%esp 116874: 5b pop %ebx 116875: 5e pop %esi 116876: 5f pop %edi 116877: c9 leave 116878: c3 ret 116879: 8d 76 00 lea 0x0(%esi),%esi ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 11687c: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 116881: 8d 65 f4 lea -0xc(%ebp),%esp 116884: 5b pop %ebx 116885: 5e pop %esi 116886: 5f pop %edi 116887: c9 leave 116888: c3 ret 116889: 8d 76 00 lea 0x0(%esi),%esi 11688c: a1 10 09 14 00 mov 0x140910,%eax 116891: 40 inc %eax 116892: a3 10 09 14 00 mov %eax,0x140910 * 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 ); 116897: 83 ec 0c sub $0xc,%esp 11689a: 68 a0 07 14 00 push $0x1407a0 11689f: 89 55 e0 mov %edx,-0x20(%ebp) 1168a2: e8 0d 44 00 00 call 11acb4 <_Objects_Allocate> 1168a7: 89 45 e4 mov %eax,-0x1c(%ebp) _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 1168aa: 83 c4 10 add $0x10,%esp 1168ad: 85 c0 test %eax,%eax 1168af: 8b 55 e0 mov -0x20(%ebp),%edx 1168b2: 74 58 je 11690c _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 1168b4: 8b 45 e4 mov -0x1c(%ebp),%eax 1168b7: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 1168ba: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 1168bd: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 1168c0: 8b 4d 18 mov 0x18(%ebp),%ecx 1168c3: 89 48 1c mov %ecx,0x1c(%eax) the_partition->number_of_used_blocks = 0; 1168c6: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) _Chain_Initialize( &the_partition->Memory, starting_address, 1168cd: 57 push %edi 1168ce: 89 d0 mov %edx,%eax 1168d0: 31 d2 xor %edx,%edx 1168d2: f7 f7 div %edi 1168d4: 50 push %eax 1168d5: 56 push %esi 1168d6: 8b 45 e4 mov -0x1c(%ebp),%eax 1168d9: 83 c0 24 add $0x24,%eax 1168dc: 50 push %eax 1168dd: e8 52 2f 00 00 call 119834 <_Chain_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 1168e2: 8b 7d e4 mov -0x1c(%ebp),%edi 1168e5: 8b 47 08 mov 0x8(%edi),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 1168e8: 0f b7 f0 movzwl %ax,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1168eb: 8b 15 bc 07 14 00 mov 0x1407bc,%edx 1168f1: 89 3c b2 mov %edi,(%edx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1168f4: 89 5f 0c mov %ebx,0xc(%edi) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 1168f7: 8b 55 1c mov 0x1c(%ebp),%edx 1168fa: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 1168fc: e8 03 54 00 00 call 11bd04 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116901: 83 c4 10 add $0x10,%esp 116904: 31 c0 xor %eax,%eax 116906: e9 66 ff ff ff jmp 116871 11690b: 90 nop _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 11690c: e8 f3 53 00 00 call 11bd04 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 116911: b8 05 00 00 00 mov $0x5,%eax 116916: e9 56 ff ff ff jmp 116871 =============================================================================== 00116988 : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 116988: 55 push %ebp 116989: 89 e5 mov %esp,%ebp 11698b: 56 push %esi 11698c: 53 push %ebx 11698d: 83 ec 20 sub $0x20,%esp 116990: 8b 5d 0c mov 0xc(%ebp),%ebx register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 116993: 85 db test %ebx,%ebx 116995: 74 59 je 1169f0 Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 116997: 52 push %edx return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); 116998: 8d 45 f4 lea -0xc(%ebp),%eax 11699b: 50 push %eax 11699c: ff 75 08 pushl 0x8(%ebp) 11699f: 68 a0 07 14 00 push $0x1407a0 1169a4: e8 fb 47 00 00 call 11b1a4 <_Objects_Get> 1169a9: 89 c6 mov %eax,%esi switch ( location ) { 1169ab: 83 c4 10 add $0x10,%esp 1169ae: 8b 45 f4 mov -0xc(%ebp),%eax 1169b1: 85 c0 test %eax,%eax 1169b3: 75 2f jne 1169e4 */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 1169b5: 83 ec 0c sub $0xc,%esp 1169b8: 8d 46 24 lea 0x24(%esi),%eax 1169bb: 50 push %eax 1169bc: e8 4f 2e 00 00 call 119810 <_Chain_Get> case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 1169c1: 83 c4 10 add $0x10,%esp 1169c4: 85 c0 test %eax,%eax 1169c6: 74 34 je 1169fc the_partition->number_of_used_blocks += 1; 1169c8: ff 46 20 incl 0x20(%esi) _Thread_Enable_dispatch(); 1169cb: 89 45 e4 mov %eax,-0x1c(%ebp) 1169ce: e8 31 53 00 00 call 11bd04 <_Thread_Enable_dispatch> *buffer = the_buffer; 1169d3: 8b 45 e4 mov -0x1c(%ebp),%eax 1169d6: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 1169d8: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1169da: 8d 65 f8 lea -0x8(%ebp),%esp 1169dd: 5b pop %ebx 1169de: 5e pop %esi 1169df: c9 leave 1169e0: c3 ret 1169e1: 8d 76 00 lea 0x0(%esi),%esi case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1169e4: b8 04 00 00 00 mov $0x4,%eax } 1169e9: 8d 65 f8 lea -0x8(%ebp),%esp 1169ec: 5b pop %ebx 1169ed: 5e pop %esi 1169ee: c9 leave 1169ef: c3 ret register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) return RTEMS_INVALID_ADDRESS; 1169f0: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1169f5: 8d 65 f8 lea -0x8(%ebp),%esp 1169f8: 5b pop %ebx 1169f9: 5e pop %esi 1169fa: c9 leave 1169fb: c3 ret the_partition->number_of_used_blocks += 1; _Thread_Enable_dispatch(); *buffer = the_buffer; return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 1169fc: e8 03 53 00 00 call 11bd04 <_Thread_Enable_dispatch> return RTEMS_UNSATISFIED; 116a01: b8 0d 00 00 00 mov $0xd,%eax 116a06: eb e1 jmp 1169e9 =============================================================================== 00116a2c : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 116a2c: 55 push %ebp 116a2d: 89 e5 mov %esp,%ebp 116a2f: 56 push %esi 116a30: 53 push %ebx 116a31: 83 ec 14 sub $0x14,%esp 116a34: 8b 75 0c mov 0xc(%ebp),%esi register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); 116a37: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 116a3a: 50 push %eax 116a3b: ff 75 08 pushl 0x8(%ebp) 116a3e: 68 a0 07 14 00 push $0x1407a0 116a43: e8 5c 47 00 00 call 11b1a4 <_Objects_Get> 116a48: 89 c3 mov %eax,%ebx switch ( location ) { 116a4a: 83 c4 10 add $0x10,%esp 116a4d: 8b 45 f4 mov -0xc(%ebp),%eax 116a50: 85 c0 test %eax,%eax 116a52: 74 0c je 116a60 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116a54: b8 04 00 00 00 mov $0x4,%eax } 116a59: 8d 65 f8 lea -0x8(%ebp),%esp 116a5c: 5b pop %ebx 116a5d: 5e pop %esi 116a5e: c9 leave 116a5f: c3 ret ) { void *starting; void *ending; starting = the_partition->starting_address; 116a60: 8b 43 10 mov 0x10(%ebx),%eax ending = _Addresses_Add_offset( starting, the_partition->length ); 116a63: 8b 53 14 mov 0x14(%ebx),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 116a66: 39 c6 cmp %eax,%esi 116a68: 72 3a jb 116aa4 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 116a6a: 8d 14 10 lea (%eax,%edx,1),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 116a6d: 39 d6 cmp %edx,%esi 116a6f: 77 33 ja 116aa4 <== NEVER TAKEN RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 116a71: 89 f2 mov %esi,%edx 116a73: 29 c2 sub %eax,%edx 116a75: 89 d0 mov %edx,%eax offset = (uint32_t) _Addresses_Subtract( the_buffer, the_partition->starting_address ); return ((offset % the_partition->buffer_size) == 0); 116a77: 31 d2 xor %edx,%edx 116a79: 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 ) && 116a7c: 85 d2 test %edx,%edx 116a7e: 75 24 jne 116aa4 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 116a80: 83 ec 08 sub $0x8,%esp 116a83: 56 push %esi 116a84: 8d 43 24 lea 0x24(%ebx),%eax 116a87: 50 push %eax 116a88: e8 47 2d 00 00 call 1197d4 <_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; 116a8d: ff 4b 20 decl 0x20(%ebx) _Thread_Enable_dispatch(); 116a90: e8 6f 52 00 00 call 11bd04 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116a95: 83 c4 10 add $0x10,%esp 116a98: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116a9a: 8d 65 f8 lea -0x8(%ebp),%esp 116a9d: 5b pop %ebx 116a9e: 5e pop %esi 116a9f: c9 leave 116aa0: c3 ret 116aa1: 8d 76 00 lea 0x0(%esi),%esi _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 116aa4: e8 5b 52 00 00 call 11bd04 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 116aa9: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116aae: 8d 65 f8 lea -0x8(%ebp),%esp 116ab1: 5b pop %ebx 116ab2: 5e pop %esi 116ab3: c9 leave 116ab4: c3 ret =============================================================================== 00115e50 : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 115e50: 55 push %ebp 115e51: 89 e5 mov %esp,%ebp 115e53: 57 push %edi 115e54: 56 push %esi 115e55: 53 push %ebx 115e56: 83 ec 1c sub $0x1c,%esp 115e59: 8b 5d 08 mov 0x8(%ebp),%ebx 115e5c: 8b 55 0c mov 0xc(%ebp),%edx 115e5f: 8b 7d 10 mov 0x10(%ebp),%edi 115e62: 8b 75 18 mov 0x18(%ebp),%esi register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 115e65: 85 db test %ebx,%ebx 115e67: 74 1b je 115e84 return RTEMS_INVALID_NAME; if ( !id ) 115e69: 85 f6 test %esi,%esi 115e6b: 74 08 je 115e75 * id - port id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_port_create( 115e6d: 89 f8 mov %edi,%eax 115e6f: 09 d0 or %edx,%eax return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 115e71: a8 03 test $0x3,%al 115e73: 74 1f je 115e94 !_Addresses_Is_aligned( external_start ) ) return RTEMS_INVALID_ADDRESS; 115e75: b8 09 00 00 00 mov $0x9,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 115e7a: 8d 65 f4 lea -0xc(%ebp),%esp 115e7d: 5b pop %ebx 115e7e: 5e pop %esi 115e7f: 5f pop %edi 115e80: c9 leave 115e81: c3 ret 115e82: 66 90 xchg %ax,%ax ) { register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 115e84: b8 03 00 00 00 mov $0x3,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 115e89: 8d 65 f4 lea -0xc(%ebp),%esp 115e8c: 5b pop %ebx 115e8d: 5e pop %esi 115e8e: 5f pop %edi 115e8f: c9 leave 115e90: c3 ret 115e91: 8d 76 00 lea 0x0(%esi),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 115e94: a1 10 09 14 00 mov 0x140910,%eax 115e99: 40 inc %eax 115e9a: a3 10 09 14 00 mov %eax,0x140910 */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) _Objects_Allocate( &_Dual_ported_memory_Information ); 115e9f: 83 ec 0c sub $0xc,%esp 115ea2: 68 60 07 14 00 push $0x140760 115ea7: 89 55 e4 mov %edx,-0x1c(%ebp) 115eaa: e8 05 4e 00 00 call 11acb4 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 115eaf: 83 c4 10 add $0x10,%esp 115eb2: 85 c0 test %eax,%eax 115eb4: 8b 55 e4 mov -0x1c(%ebp),%edx 115eb7: 74 33 je 115eec _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 115eb9: 89 50 10 mov %edx,0x10(%eax) the_port->external_base = external_start; 115ebc: 89 78 14 mov %edi,0x14(%eax) the_port->length = length - 1; 115ebf: 8b 55 14 mov 0x14(%ebp),%edx 115ec2: 4a dec %edx 115ec3: 89 50 18 mov %edx,0x18(%eax) Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 115ec6: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 115ec9: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 115ecc: 8b 0d 7c 07 14 00 mov 0x14077c,%ecx 115ed2: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 115ed5: 89 58 0c mov %ebx,0xc(%eax) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 115ed8: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 115eda: e8 25 5e 00 00 call 11bd04 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115edf: 31 c0 xor %eax,%eax } 115ee1: 8d 65 f4 lea -0xc(%ebp),%esp 115ee4: 5b pop %ebx 115ee5: 5e pop %esi 115ee6: 5f pop %edi 115ee7: c9 leave 115ee8: c3 ret 115ee9: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { _Thread_Enable_dispatch(); 115eec: e8 13 5e 00 00 call 11bd04 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 115ef1: b8 05 00 00 00 mov $0x5,%eax 115ef6: eb 82 jmp 115e7a =============================================================================== 00115ef8 : */ rtems_status_code rtems_port_delete( rtems_id id ) { 115ef8: 55 push %ebp 115ef9: 89 e5 mov %esp,%ebp 115efb: 83 ec 2c sub $0x2c,%esp register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); 115efe: 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 ); 115f01: 50 push %eax 115f02: ff 75 08 pushl 0x8(%ebp) 115f05: 68 60 07 14 00 push $0x140760 115f0a: e8 95 52 00 00 call 11b1a4 <_Objects_Get> switch ( location ) { 115f0f: 83 c4 10 add $0x10,%esp 115f12: 8b 4d f4 mov -0xc(%ebp),%ecx 115f15: 85 c9 test %ecx,%ecx 115f17: 75 2f jne 115f48 case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); 115f19: 83 ec 08 sub $0x8,%esp 115f1c: 50 push %eax 115f1d: 68 60 07 14 00 push $0x140760 115f22: 89 45 e4 mov %eax,-0x1c(%ebp) 115f25: e8 06 4e 00 00 call 11ad30 <_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 ); 115f2a: 58 pop %eax 115f2b: 5a pop %edx 115f2c: 8b 45 e4 mov -0x1c(%ebp),%eax 115f2f: 50 push %eax 115f30: 68 60 07 14 00 push $0x140760 115f35: e8 ee 50 00 00 call 11b028 <_Objects_Free> _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 115f3a: e8 c5 5d 00 00 call 11bd04 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115f3f: 83 c4 10 add $0x10,%esp 115f42: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115f44: c9 leave 115f45: c3 ret 115f46: 66 90 xchg %ax,%ax #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115f48: b8 04 00 00 00 mov $0x4,%eax } 115f4d: c9 leave 115f4e: c3 ret =============================================================================== 00115f50 : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 115f50: 55 push %ebp 115f51: 89 e5 mov %esp,%ebp 115f53: 56 push %esi 115f54: 53 push %ebx 115f55: 83 ec 10 sub $0x10,%esp 115f58: 8b 75 0c mov 0xc(%ebp),%esi 115f5b: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 115f5e: 85 db test %ebx,%ebx 115f60: 74 4e je 115fb0 Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) _Objects_Get( &_Dual_ported_memory_Information, id, location ); 115f62: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); 115f63: 8d 45 f4 lea -0xc(%ebp),%eax 115f66: 50 push %eax 115f67: ff 75 08 pushl 0x8(%ebp) 115f6a: 68 60 07 14 00 push $0x140760 115f6f: e8 30 52 00 00 call 11b1a4 <_Objects_Get> switch ( location ) { 115f74: 83 c4 10 add $0x10,%esp 115f77: 8b 55 f4 mov -0xc(%ebp),%edx 115f7a: 85 d2 test %edx,%edx 115f7c: 74 0e je 115f8c #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115f7e: b8 04 00 00 00 mov $0x4,%eax } 115f83: 8d 65 f8 lea -0x8(%ebp),%esp 115f86: 5b pop %ebx 115f87: 5e pop %esi 115f88: c9 leave 115f89: c3 ret 115f8a: 66 90 xchg %ax,%ax RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 115f8c: 89 f2 mov %esi,%edx 115f8e: 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 ) 115f91: 3b 50 18 cmp 0x18(%eax),%edx 115f94: 77 16 ja 115fac RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 115f96: 03 50 10 add 0x10(%eax),%edx 115f99: 89 13 mov %edx,(%ebx) *internal = external; else *internal = _Addresses_Add_offset( the_port->internal_base, ending ); _Thread_Enable_dispatch(); 115f9b: e8 64 5d 00 00 call 11bd04 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115fa0: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115fa2: 8d 65 f8 lea -0x8(%ebp),%esp 115fa5: 5b pop %ebx 115fa6: 5e pop %esi 115fa7: c9 leave 115fa8: c3 ret 115fa9: 8d 76 00 lea 0x0(%esi),%esi 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; 115fac: 89 33 mov %esi,(%ebx) 115fae: eb eb jmp 115f9b register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) return RTEMS_INVALID_ADDRESS; 115fb0: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115fb5: 8d 65 f8 lea -0x8(%ebp),%esp 115fb8: 5b pop %ebx 115fb9: 5e pop %esi 115fba: c9 leave 115fbb: c3 ret =============================================================================== 00115fe0 : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 115fe0: 55 push %ebp 115fe1: 89 e5 mov %esp,%ebp 115fe3: 56 push %esi 115fe4: 53 push %ebx 115fe5: 83 ec 10 sub $0x10,%esp 115fe8: 8b 75 0c mov 0xc(%ebp),%esi 115feb: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 115fee: 85 db test %ebx,%ebx 115ff0: 74 4e je 116040 <== NEVER TAKEN 115ff2: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); 115ff3: 8d 45 f4 lea -0xc(%ebp),%eax 115ff6: 50 push %eax 115ff7: ff 75 08 pushl 0x8(%ebp) 115ffa: 68 60 07 14 00 push $0x140760 115fff: e8 a0 51 00 00 call 11b1a4 <_Objects_Get> switch ( location ) { 116004: 83 c4 10 add $0x10,%esp 116007: 8b 55 f4 mov -0xc(%ebp),%edx 11600a: 85 d2 test %edx,%edx 11600c: 74 0e je 11601c #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 11600e: b8 04 00 00 00 mov $0x4,%eax } 116013: 8d 65 f8 lea -0x8(%ebp),%esp 116016: 5b pop %ebx 116017: 5e pop %esi 116018: c9 leave 116019: c3 ret 11601a: 66 90 xchg %ax,%ax RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 11601c: 89 f2 mov %esi,%edx 11601e: 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 ) 116021: 3b 50 18 cmp 0x18(%eax),%edx 116024: 77 16 ja 11603c RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 116026: 03 50 14 add 0x14(%eax),%edx 116029: 89 13 mov %edx,(%ebx) *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, ending ); _Thread_Enable_dispatch(); 11602b: e8 d4 5c 00 00 call 11bd04 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116030: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116032: 8d 65 f8 lea -0x8(%ebp),%esp 116035: 5b pop %ebx 116036: 5e pop %esi 116037: c9 leave 116038: c3 ret 116039: 8d 76 00 lea 0x0(%esi),%esi switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) *external = internal; 11603c: 89 33 mov %esi,(%ebx) 11603e: eb eb jmp 11602b register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) return RTEMS_INVALID_ADDRESS; 116040: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116045: 8d 65 f8 lea -0x8(%ebp),%esp 116048: 5b pop %ebx 116049: 5e pop %esi 11604a: c9 leave 11604b: c3 ret =============================================================================== 00116ab8 : */ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { 116ab8: 55 push %ebp 116ab9: 89 e5 mov %esp,%ebp 116abb: 53 push %ebx 116abc: 83 ec 18 sub $0x18,%esp Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); 116abf: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 116ac2: 50 push %eax 116ac3: ff 75 08 pushl 0x8(%ebp) 116ac6: 68 e0 07 14 00 push $0x1407e0 116acb: e8 d4 46 00 00 call 11b1a4 <_Objects_Get> 116ad0: 89 c3 mov %eax,%ebx switch ( location ) { 116ad2: 83 c4 10 add $0x10,%esp 116ad5: 8b 45 f4 mov -0xc(%ebp),%eax 116ad8: 85 c0 test %eax,%eax 116ada: 74 0c je 116ae8 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116adc: b8 04 00 00 00 mov $0x4,%eax } 116ae1: 8b 5d fc mov -0x4(%ebp),%ebx 116ae4: c9 leave 116ae5: c3 ret 116ae6: 66 90 xchg %ax,%ax the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 116ae8: a1 98 0b 14 00 mov 0x140b98,%eax 116aed: 39 43 40 cmp %eax,0x40(%ebx) 116af0: 74 12 je 116b04 _Thread_Enable_dispatch(); 116af2: e8 0d 52 00 00 call 11bd04 <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 116af7: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116afc: 8b 5d fc mov -0x4(%ebp),%ebx 116aff: c9 leave 116b00: c3 ret 116b01: 8d 76 00 lea 0x0(%esi),%esi 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 ); 116b04: 83 ec 0c sub $0xc,%esp 116b07: 8d 43 10 lea 0x10(%ebx),%eax 116b0a: 50 push %eax 116b0b: e8 cc 62 00 00 call 11cddc <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 116b10: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) _Thread_Enable_dispatch(); 116b17: e8 e8 51 00 00 call 11bd04 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116b1c: 83 c4 10 add $0x10,%esp 116b1f: 31 c0 xor %eax,%eax 116b21: eb be jmp 116ae1 =============================================================================== 0010c340 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 10c340: 55 push %ebp 10c341: 89 e5 mov %esp,%ebp 10c343: 57 push %edi 10c344: 56 push %esi 10c345: 53 push %ebx 10c346: 83 ec 1c sub $0x1c,%esp 10c349: 8b 5d 08 mov 0x8(%ebp),%ebx 10c34c: 8b 75 0c mov 0xc(%ebp),%esi Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10c34f: 85 db test %ebx,%ebx 10c351: 0f 84 a9 00 00 00 je 10c400 return RTEMS_INVALID_NAME; if ( !id ) 10c357: 85 f6 test %esi,%esi 10c359: 0f 84 c5 00 00 00 je 10c424 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c35f: a1 10 9a 12 00 mov 0x129a10,%eax 10c364: 40 inc %eax 10c365: a3 10 9a 12 00 mov %eax,0x129a10 * 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 ); 10c36a: 83 ec 0c sub $0xc,%esp 10c36d: 68 20 99 12 00 push $0x129920 10c372: e8 4d 1e 00 00 call 10e1c4 <_Objects_Allocate> 10c377: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 10c379: 83 c4 10 add $0x10,%esp 10c37c: 85 c0 test %eax,%eax 10c37e: 0f 84 8c 00 00 00 je 10c410 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 10c384: a1 98 9c 12 00 mov 0x129c98,%eax 10c389: 89 42 40 mov %eax,0x40(%edx) the_period->state = RATE_MONOTONIC_INACTIVE; 10c38c: 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; 10c393: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 10c39a: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx) the_watchdog->id = id; 10c3a1: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) the_watchdog->user_data = user_data; 10c3a8: 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 ); 10c3af: 8d 42 54 lea 0x54(%edx),%eax 10c3b2: 89 45 e4 mov %eax,-0x1c(%ebp) 10c3b5: b9 38 00 00 00 mov $0x38,%ecx 10c3ba: 31 c0 xor %eax,%eax 10c3bc: 8b 7d e4 mov -0x1c(%ebp),%edi 10c3bf: f3 aa rep stos %al,%es:(%edi) 10c3c1: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10c3c8: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10c3cf: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10c3d6: 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 ), 10c3dd: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10c3e0: 0f b7 f8 movzwl %ax,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c3e3: 8b 0d 3c 99 12 00 mov 0x12993c,%ecx 10c3e9: 89 14 b9 mov %edx,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c3ec: 89 5a 0c mov %ebx,0xc(%edx) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 10c3ef: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10c3f1: e8 b2 2e 00 00 call 10f2a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c3f6: 31 c0 xor %eax,%eax } 10c3f8: 8d 65 f4 lea -0xc(%ebp),%esp 10c3fb: 5b pop %ebx 10c3fc: 5e pop %esi 10c3fd: 5f pop %edi 10c3fe: c9 leave 10c3ff: c3 ret ) { Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10c400: b8 03 00 00 00 mov $0x3,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c405: 8d 65 f4 lea -0xc(%ebp),%esp 10c408: 5b pop %ebx 10c409: 5e pop %esi 10c40a: 5f pop %edi 10c40b: c9 leave 10c40c: c3 ret 10c40d: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { _Thread_Enable_dispatch(); 10c410: e8 93 2e 00 00 call 10f2a8 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10c415: b8 05 00 00 00 mov $0x5,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c41a: 8d 65 f4 lea -0xc(%ebp),%esp 10c41d: 5b pop %ebx 10c41e: 5e pop %esi 10c41f: 5f pop %edi 10c420: c9 leave 10c421: c3 ret 10c422: 66 90 xchg %ax,%ax if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10c424: b8 09 00 00 00 mov $0x9,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c429: 8d 65 f4 lea -0xc(%ebp),%esp 10c42c: 5b pop %ebx 10c42d: 5e pop %esi 10c42e: 5f pop %edi 10c42f: c9 leave 10c430: c3 ret =============================================================================== 00111dc4 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 111dc4: 55 push %ebp 111dc5: 89 e5 mov %esp,%ebp 111dc7: 53 push %ebx 111dc8: 83 ec 24 sub $0x24,%esp 111dcb: 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 ) 111dce: 85 db test %ebx,%ebx 111dd0: 0f 84 92 00 00 00 je 111e68 111dd6: 50 push %eax return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); 111dd7: 8d 45 f4 lea -0xc(%ebp),%eax 111dda: 50 push %eax 111ddb: ff 75 08 pushl 0x8(%ebp) 111dde: 68 20 99 12 00 push $0x129920 111de3: e8 60 c9 ff ff call 10e748 <_Objects_Get> switch ( location ) { 111de8: 83 c4 10 add $0x10,%esp 111deb: 8b 4d f4 mov -0xc(%ebp),%ecx 111dee: 85 c9 test %ecx,%ecx 111df0: 74 0a je 111dfc #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 111df2: b8 04 00 00 00 mov $0x4,%eax } 111df7: 8b 5d fc mov -0x4(%ebp),%ebx 111dfa: c9 leave 111dfb: c3 ret the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 111dfc: 8b 50 40 mov 0x40(%eax),%edx 111dff: 8b 52 08 mov 0x8(%edx),%edx 111e02: 89 13 mov %edx,(%ebx) status->state = the_period->state; 111e04: 8b 50 38 mov 0x38(%eax),%edx 111e07: 89 53 04 mov %edx,0x4(%ebx) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 111e0a: 85 d2 test %edx,%edx 111e0c: 75 2a jne 111e38 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 111e0e: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 111e15: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Timespec_Set_to_zero( &status->executed_since_last_period ); 111e1c: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) 111e23: 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(); 111e2a: e8 79 d4 ff ff call 10f2a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 111e2f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111e31: 8b 5d fc mov -0x4(%ebp),%ebx 111e34: c9 leave 111e35: c3 ret 111e36: 66 90 xchg %ax,%ax } else { /* * Grab the current status. */ valid_status = 111e38: 52 push %edx _Rate_monotonic_Get_status( 111e39: 8d 55 ec lea -0x14(%ebp),%edx } else { /* * Grab the current status. */ valid_status = 111e3c: 52 push %edx _Rate_monotonic_Get_status( 111e3d: 8d 55 e4 lea -0x1c(%ebp),%edx } else { /* * Grab the current status. */ valid_status = 111e40: 52 push %edx 111e41: 50 push %eax 111e42: e8 11 a6 ff ff call 10c458 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { 111e47: 83 c4 10 add $0x10,%esp 111e4a: 84 c0 test %al,%al 111e4c: 74 26 je 111e74 _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 111e4e: 8b 45 e4 mov -0x1c(%ebp),%eax 111e51: 8b 55 e8 mov -0x18(%ebp),%edx 111e54: 89 43 08 mov %eax,0x8(%ebx) 111e57: 89 53 0c mov %edx,0xc(%ebx) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 111e5a: 8b 45 ec mov -0x14(%ebp),%eax 111e5d: 8b 55 f0 mov -0x10(%ebp),%edx 111e60: 89 43 10 mov %eax,0x10(%ebx) 111e63: 89 53 14 mov %edx,0x14(%ebx) 111e66: eb c2 jmp 111e2a Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) return RTEMS_INVALID_ADDRESS; 111e68: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111e6d: 8b 5d fc mov -0x4(%ebp),%ebx 111e70: c9 leave 111e71: c3 ret 111e72: 66 90 xchg %ax,%ax valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { _Thread_Enable_dispatch(); 111e74: e8 2f d4 ff ff call 10f2a8 <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 111e79: b8 0b 00 00 00 mov $0xb,%eax 111e7e: e9 74 ff ff ff jmp 111df7 =============================================================================== 0010c654 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 10c654: 55 push %ebp 10c655: 89 e5 mov %esp,%ebp 10c657: 57 push %edi 10c658: 56 push %esi 10c659: 53 push %ebx 10c65a: 83 ec 30 sub $0x30,%esp 10c65d: 8b 5d 08 mov 0x8(%ebp),%ebx 10c660: 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 ); 10c663: 8d 45 e4 lea -0x1c(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 10c666: 50 push %eax 10c667: 53 push %ebx 10c668: 68 20 99 12 00 push $0x129920 10c66d: e8 d6 20 00 00 call 10e748 <_Objects_Get> switch ( location ) { 10c672: 83 c4 10 add $0x10,%esp 10c675: 8b 55 e4 mov -0x1c(%ebp),%edx 10c678: 85 d2 test %edx,%edx 10c67a: 74 10 je 10c68c #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c67c: b8 04 00 00 00 mov $0x4,%eax } 10c681: 8d 65 f4 lea -0xc(%ebp),%esp 10c684: 5b pop %ebx 10c685: 5e pop %esi 10c686: 5f pop %edi 10c687: c9 leave 10c688: c3 ret 10c689: 8d 76 00 lea 0x0(%esi),%esi the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 10c68c: 8b 15 98 9c 12 00 mov 0x129c98,%edx 10c692: 39 50 40 cmp %edx,0x40(%eax) 10c695: 74 15 je 10c6ac _Thread_Enable_dispatch(); 10c697: e8 0c 2c 00 00 call 10f2a8 <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 10c69c: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c6a1: 8d 65 f4 lea -0xc(%ebp),%esp 10c6a4: 5b pop %ebx 10c6a5: 5e pop %esi 10c6a6: 5f pop %edi 10c6a7: c9 leave 10c6a8: c3 ret 10c6a9: 8d 76 00 lea 0x0(%esi),%esi if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 10c6ac: 85 f6 test %esi,%esi 10c6ae: 75 1c jne 10c6cc switch ( the_period->state ) { 10c6b0: 8b 40 38 mov 0x38(%eax),%eax 10c6b3: 83 f8 04 cmp $0x4,%eax 10c6b6: 77 6c ja 10c724 <== NEVER TAKEN 10c6b8: 8b 04 85 5c 28 12 00 mov 0x12285c(,%eax,4),%eax case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 10c6bf: 89 45 d4 mov %eax,-0x2c(%ebp) 10c6c2: e8 e1 2b 00 00 call 10f2a8 <_Thread_Enable_dispatch> return( return_value ); 10c6c7: 8b 45 d4 mov -0x2c(%ebp),%eax 10c6ca: eb b5 jmp 10c681 } _ISR_Disable( level ); 10c6cc: 9c pushf 10c6cd: fa cli 10c6ce: 5f pop %edi if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { 10c6cf: 8b 50 38 mov 0x38(%eax),%edx 10c6d2: 85 d2 test %edx,%edx 10c6d4: 74 52 je 10c728 _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { 10c6d6: 83 fa 02 cmp $0x2,%edx 10c6d9: 0f 84 9e 00 00 00 je 10c77d _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { 10c6df: 83 fa 04 cmp $0x4,%edx 10c6e2: 75 98 jne 10c67c <== NEVER TAKEN /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 10c6e4: 83 ec 0c sub $0xc,%esp 10c6e7: 50 push %eax 10c6e8: 89 45 d4 mov %eax,-0x2c(%ebp) 10c6eb: e8 74 fe ff ff call 10c564 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 10c6f0: 57 push %edi 10c6f1: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 10c6f2: 8b 45 d4 mov -0x2c(%ebp),%eax 10c6f5: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) the_period->next_length = length; 10c6fc: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c6ff: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c702: 5b pop %ebx 10c703: 5e pop %esi _Watchdog_Insert_ticks( &the_period->Timer, length ); 10c704: 83 c0 10 add $0x10,%eax 10c707: 50 push %eax 10c708: 68 e0 9a 12 00 push $0x129ae0 10c70d: e8 a2 39 00 00 call 1100b4 <_Watchdog_Insert> _Thread_Enable_dispatch(); 10c712: e8 91 2b 00 00 call 10f2a8 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 10c717: 83 c4 10 add $0x10,%esp 10c71a: b8 06 00 00 00 mov $0x6,%eax 10c71f: e9 5d ff ff ff jmp 10c681 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 10c724: 31 c0 xor %eax,%eax 10c726: eb 97 jmp 10c6bf <== NOT EXECUTED return( return_value ); } _ISR_Disable( level ); if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { _ISR_Enable( level ); 10c728: 57 push %edi 10c729: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 10c72a: 83 ec 0c sub $0xc,%esp 10c72d: 50 push %eax 10c72e: 89 45 d4 mov %eax,-0x2c(%ebp) 10c731: e8 ba fd ff ff call 10c4f0 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 10c736: 8b 45 d4 mov -0x2c(%ebp),%eax 10c739: 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; 10c740: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10c747: c7 40 2c ac ca 10 00 movl $0x10caac,0x2c(%eax) the_watchdog->id = id; 10c74e: 89 58 30 mov %ebx,0x30(%eax) the_watchdog->user_data = user_data; 10c751: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 10c758: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c75b: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c75e: 5e pop %esi 10c75f: 5f pop %edi _Watchdog_Insert_ticks( &the_period->Timer, length ); 10c760: 83 c0 10 add $0x10,%eax 10c763: 50 push %eax 10c764: 68 e0 9a 12 00 push $0x129ae0 10c769: e8 46 39 00 00 call 1100b4 <_Watchdog_Insert> _Thread_Enable_dispatch(); 10c76e: e8 35 2b 00 00 call 10f2a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c773: 83 c4 10 add $0x10,%esp 10c776: 31 c0 xor %eax,%eax 10c778: e9 04 ff ff ff jmp 10c681 if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 10c77d: 83 ec 0c sub $0xc,%esp 10c780: 50 push %eax 10c781: 89 45 d4 mov %eax,-0x2c(%ebp) 10c784: e8 db fd ff ff call 10c564 <_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; 10c789: 8b 45 d4 mov -0x2c(%ebp),%eax 10c78c: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) the_period->next_length = length; 10c793: 89 70 3c mov %esi,0x3c(%eax) _ISR_Enable( level ); 10c796: 57 push %edi 10c797: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 10c798: 8b 15 98 9c 12 00 mov 0x129c98,%edx 10c79e: 8b 48 08 mov 0x8(%eax),%ecx 10c7a1: 89 4a 20 mov %ecx,0x20(%edx) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10c7a4: 59 pop %ecx 10c7a5: 5b pop %ebx 10c7a6: 68 00 40 00 00 push $0x4000 10c7ab: 52 push %edx 10c7ac: 89 45 d4 mov %eax,-0x2c(%ebp) 10c7af: e8 e8 32 00 00 call 10fa9c <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 10c7b4: 9c pushf 10c7b5: fa cli 10c7b6: 59 pop %ecx local_state = the_period->state; 10c7b7: 8b 45 d4 mov -0x2c(%ebp),%eax 10c7ba: 8b 50 38 mov 0x38(%eax),%edx the_period->state = RATE_MONOTONIC_ACTIVE; 10c7bd: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) _ISR_Enable( level ); 10c7c4: 51 push %ecx 10c7c5: 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 ) 10c7c6: 83 c4 10 add $0x10,%esp 10c7c9: 83 fa 03 cmp $0x3,%edx 10c7cc: 74 0c je 10c7da _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 10c7ce: e8 d5 2a 00 00 call 10f2a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c7d3: 31 c0 xor %eax,%eax 10c7d5: e9 a7 fe ff ff jmp 10c681 /* * 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 ); 10c7da: 57 push %edi 10c7db: 57 push %edi 10c7dc: 68 00 40 00 00 push $0x4000 10c7e1: ff 35 98 9c 12 00 pushl 0x129c98 10c7e7: e8 58 27 00 00 call 10ef44 <_Thread_Clear_state> 10c7ec: 83 c4 10 add $0x10,%esp 10c7ef: eb dd jmp 10c7ce =============================================================================== 0010c7f4 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 10c7f4: 55 push %ebp 10c7f5: 89 e5 mov %esp,%ebp 10c7f7: 57 push %edi 10c7f8: 56 push %esi 10c7f9: 53 push %ebx 10c7fa: 81 ec 8c 00 00 00 sub $0x8c,%esp 10c800: 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 ) 10c803: 8b 7d 0c mov 0xc(%ebp),%edi 10c806: 85 ff test %edi,%edi 10c808: 0f 84 be 00 00 00 je 10c8cc <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 10c80e: 83 ec 08 sub $0x8,%esp 10c811: 68 70 28 12 00 push $0x122870 10c816: 56 push %esi 10c817: ff 55 0c call *0xc(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 10c81a: 59 pop %ecx 10c81b: 5b pop %ebx 10c81c: 68 a8 28 12 00 push $0x1228a8 10c821: 56 push %esi 10c822: ff 55 0c call *0xc(%ebp) (*print)( context, "--- Wall times are in seconds ---\n" ); 10c825: 58 pop %eax 10c826: 5a pop %edx 10c827: 68 cc 28 12 00 push $0x1228cc 10c82c: 56 push %esi 10c82d: ff 55 0c call *0xc(%ebp) Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 10c830: 5b pop %ebx 10c831: 5f pop %edi 10c832: 68 f0 28 12 00 push $0x1228f0 10c837: 56 push %esi 10c838: ff 55 0c call *0xc(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 10c83b: 5a pop %edx 10c83c: 59 pop %ecx 10c83d: 68 3c 29 12 00 push $0x12293c 10c842: 56 push %esi 10c843: 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 ; 10c846: 8b 1d 28 99 12 00 mov 0x129928,%ebx 10c84c: 83 c4 10 add $0x10,%esp 10c84f: 3b 1d 2c 99 12 00 cmp 0x12992c,%ebx 10c855: 77 75 ja 10c8cc <== NEVER TAKEN 10c857: 8d 7d 88 lea -0x78(%ebp),%edi 10c85a: eb 09 jmp 10c865 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 10c85c: 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 ; 10c85d: 39 1d 2c 99 12 00 cmp %ebx,0x12992c 10c863: 72 67 jb 10c8cc id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 10c865: 83 ec 08 sub $0x8,%esp 10c868: 57 push %edi 10c869: 53 push %ebx 10c86a: e8 a9 54 00 00 call 111d18 if ( status != RTEMS_SUCCESSFUL ) 10c86f: 83 c4 10 add $0x10,%esp 10c872: 85 c0 test %eax,%eax 10c874: 75 e6 jne 10c85c #if defined(RTEMS_DEBUG) status = rtems_rate_monotonic_get_status( id, &the_status ); if ( status != RTEMS_SUCCESSFUL ) continue; #else (void) rtems_rate_monotonic_get_status( id, &the_status ); 10c876: 83 ec 08 sub $0x8,%esp 10c879: 8d 45 c0 lea -0x40(%ebp),%eax 10c87c: 50 push %eax 10c87d: 53 push %ebx 10c87e: e8 41 55 00 00 call 111dc4 #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 10c883: 83 c4 0c add $0xc,%esp 10c886: 8d 55 e3 lea -0x1d(%ebp),%edx 10c889: 52 push %edx 10c88a: 6a 05 push $0x5 10c88c: ff 75 c0 pushl -0x40(%ebp) 10c88f: e8 b4 02 00 00 call 10cb48 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 10c894: 59 pop %ecx 10c895: 58 pop %eax 10c896: ff 75 8c pushl -0x74(%ebp) 10c899: ff 75 88 pushl -0x78(%ebp) 10c89c: 8d 45 e3 lea -0x1d(%ebp),%eax 10c89f: 50 push %eax 10c8a0: 53 push %ebx 10c8a1: 68 8e 28 12 00 push $0x12288e 10c8a6: 56 push %esi 10c8a7: ff 55 0c call *0xc(%ebp) ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 10c8aa: 8b 45 88 mov -0x78(%ebp),%eax 10c8ad: 83 c4 20 add $0x20,%esp 10c8b0: 85 c0 test %eax,%eax 10c8b2: 75 20 jne 10c8d4 (*print)( context, "\n" ); 10c8b4: 83 ec 08 sub $0x8,%esp 10c8b7: 68 71 09 12 00 push $0x120971 10c8bc: 56 push %esi 10c8bd: ff 55 0c call *0xc(%ebp) continue; 10c8c0: 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++ ) { 10c8c3: 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 ; 10c8c4: 39 1d 2c 99 12 00 cmp %ebx,0x12992c 10c8ca: 73 99 jae 10c865 <== ALWAYS TAKEN the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 10c8cc: 8d 65 f4 lea -0xc(%ebp),%esp 10c8cf: 5b pop %ebx 10c8d0: 5e pop %esi 10c8d1: 5f pop %edi 10c8d2: c9 leave 10c8d3: 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 ); 10c8d4: 52 push %edx 10c8d5: 8d 55 d8 lea -0x28(%ebp),%edx 10c8d8: 52 push %edx 10c8d9: 50 push %eax 10c8da: 8d 45 a0 lea -0x60(%ebp),%eax 10c8dd: 50 push %eax 10c8de: e8 31 34 00 00 call 10fd14 <_Timespec_Divide_by_integer> (*print)( context, 10c8e3: b9 d3 4d 62 10 mov $0x10624dd3,%ecx 10c8e8: 8b 45 dc mov -0x24(%ebp),%eax 10c8eb: f7 e9 imul %ecx 10c8ed: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c8f3: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c8f9: c1 f8 06 sar $0x6,%eax 10c8fc: 8b 55 dc mov -0x24(%ebp),%edx 10c8ff: c1 fa 1f sar $0x1f,%edx 10c902: 29 d0 sub %edx,%eax 10c904: 50 push %eax 10c905: ff 75 d8 pushl -0x28(%ebp) 10c908: 8b 45 9c mov -0x64(%ebp),%eax 10c90b: f7 e9 imul %ecx 10c90d: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c913: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c919: c1 f8 06 sar $0x6,%eax 10c91c: 8b 55 9c mov -0x64(%ebp),%edx 10c91f: c1 fa 1f sar $0x1f,%edx 10c922: 29 d0 sub %edx,%eax 10c924: 50 push %eax 10c925: ff 75 98 pushl -0x68(%ebp) 10c928: 8b 45 94 mov -0x6c(%ebp),%eax 10c92b: f7 e9 imul %ecx 10c92d: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) 10c933: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c939: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c93f: c1 f8 06 sar $0x6,%eax 10c942: 8b 55 94 mov -0x6c(%ebp),%edx 10c945: c1 fa 1f sar $0x1f,%edx 10c948: 29 d0 sub %edx,%eax 10c94a: 50 push %eax 10c94b: ff 75 90 pushl -0x70(%ebp) 10c94e: 68 88 29 12 00 push $0x122988 10c953: 56 push %esi 10c954: 89 4d 84 mov %ecx,-0x7c(%ebp) 10c957: 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); 10c95a: 83 c4 2c add $0x2c,%esp 10c95d: 8d 55 d8 lea -0x28(%ebp),%edx 10c960: 52 push %edx 10c961: ff 75 88 pushl -0x78(%ebp) 10c964: 8d 45 b8 lea -0x48(%ebp),%eax 10c967: 50 push %eax 10c968: e8 a7 33 00 00 call 10fd14 <_Timespec_Divide_by_integer> (*print)( context, 10c96d: 8b 4d 84 mov -0x7c(%ebp),%ecx 10c970: 8b 45 dc mov -0x24(%ebp),%eax 10c973: f7 e9 imul %ecx 10c975: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c97b: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c981: c1 f8 06 sar $0x6,%eax 10c984: 8b 55 dc mov -0x24(%ebp),%edx 10c987: c1 fa 1f sar $0x1f,%edx 10c98a: 29 d0 sub %edx,%eax 10c98c: 50 push %eax 10c98d: ff 75 d8 pushl -0x28(%ebp) 10c990: 8b 45 b4 mov -0x4c(%ebp),%eax 10c993: f7 e9 imul %ecx 10c995: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c99b: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c9a1: c1 f8 06 sar $0x6,%eax 10c9a4: 8b 55 b4 mov -0x4c(%ebp),%edx 10c9a7: c1 fa 1f sar $0x1f,%edx 10c9aa: 29 d0 sub %edx,%eax 10c9ac: 50 push %eax 10c9ad: ff 75 b0 pushl -0x50(%ebp) 10c9b0: 8b 45 ac mov -0x54(%ebp),%eax 10c9b3: f7 e9 imul %ecx 10c9b5: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) 10c9bb: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c9c1: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c9c7: c1 f8 06 sar $0x6,%eax 10c9ca: 8b 55 ac mov -0x54(%ebp),%edx 10c9cd: c1 fa 1f sar $0x1f,%edx 10c9d0: 29 d0 sub %edx,%eax 10c9d2: 50 push %eax 10c9d3: ff 75 a8 pushl -0x58(%ebp) 10c9d6: 68 a8 29 12 00 push $0x1229a8 10c9db: 56 push %esi 10c9dc: ff 55 0c call *0xc(%ebp) 10c9df: 83 c4 30 add $0x30,%esp 10c9e2: e9 75 fe ff ff jmp 10c85c =============================================================================== 0010ca00 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 10ca00: 55 push %ebp 10ca01: 89 e5 mov %esp,%ebp 10ca03: 53 push %ebx 10ca04: 83 ec 04 sub $0x4,%esp 10ca07: a1 10 9a 12 00 mov 0x129a10,%eax 10ca0c: 40 inc %eax 10ca0d: a3 10 9a 12 00 mov %eax,0x129a10 /* * 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 ; 10ca12: 8b 1d 28 99 12 00 mov 0x129928,%ebx 10ca18: 3b 1d 2c 99 12 00 cmp 0x12992c,%ebx 10ca1e: 77 15 ja 10ca35 <== NEVER TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { (void) rtems_rate_monotonic_reset_statistics( id ); 10ca20: 83 ec 0c sub $0xc,%esp 10ca23: 53 push %ebx 10ca24: e8 17 00 00 00 call 10ca40 * 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++ ) { 10ca29: 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 ; 10ca2a: 83 c4 10 add $0x10,%esp 10ca2d: 39 1d 2c 99 12 00 cmp %ebx,0x12992c 10ca33: 73 eb jae 10ca20 /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 10ca35: 8b 5d fc mov -0x4(%ebp),%ebx 10ca38: c9 leave } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 10ca39: e9 6a 28 00 00 jmp 10f2a8 <_Thread_Enable_dispatch> =============================================================================== 0010ca40 : */ rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id ) { 10ca40: 55 push %ebp 10ca41: 89 e5 mov %esp,%ebp 10ca43: 57 push %edi 10ca44: 53 push %ebx 10ca45: 83 ec 14 sub $0x14,%esp Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); 10ca48: 8d 45 f4 lea -0xc(%ebp),%eax 10ca4b: 50 push %eax 10ca4c: ff 75 08 pushl 0x8(%ebp) 10ca4f: 68 20 99 12 00 push $0x129920 10ca54: e8 ef 1c 00 00 call 10e748 <_Objects_Get> 10ca59: 89 c2 mov %eax,%edx switch ( location ) { 10ca5b: 83 c4 10 add $0x10,%esp 10ca5e: 8b 45 f4 mov -0xc(%ebp),%eax 10ca61: 85 c0 test %eax,%eax 10ca63: 75 3b jne 10caa0 case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 10ca65: 8d 5a 54 lea 0x54(%edx),%ebx 10ca68: b9 38 00 00 00 mov $0x38,%ecx 10ca6d: 31 c0 xor %eax,%eax 10ca6f: 89 df mov %ebx,%edi 10ca71: f3 aa rep stos %al,%es:(%edi) 10ca73: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10ca7a: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10ca81: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10ca88: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) _Thread_Enable_dispatch(); 10ca8f: e8 14 28 00 00 call 10f2a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ca94: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ca96: 8d 65 f8 lea -0x8(%ebp),%esp 10ca99: 5b pop %ebx 10ca9a: 5f pop %edi 10ca9b: c9 leave 10ca9c: c3 ret 10ca9d: 8d 76 00 lea 0x0(%esi),%esi #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10caa0: b8 04 00 00 00 mov $0x4,%eax } 10caa5: 8d 65 f8 lea -0x8(%ebp),%esp 10caa8: 5b pop %ebx 10caa9: 5f pop %edi 10caaa: c9 leave 10caab: c3 ret =============================================================================== 0011724c : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 11724c: 55 push %ebp 11724d: 89 e5 mov %esp,%ebp 11724f: 57 push %edi 117250: 56 push %esi 117251: 53 push %ebx 117252: 83 ec 1c sub $0x1c,%esp 117255: 8b 7d 08 mov 0x8(%ebp),%edi 117258: 8b 75 0c mov 0xc(%ebp),%esi rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 11725b: 85 ff test %edi,%edi 11725d: 0f 84 c1 00 00 00 je 117324 return RTEMS_INVALID_NAME; if ( !starting_address ) 117263: 85 f6 test %esi,%esi 117265: 0f 84 e1 00 00 00 je 11734c return RTEMS_INVALID_ADDRESS; if ( !id ) 11726b: 8b 45 1c mov 0x1c(%ebp),%eax 11726e: 85 c0 test %eax,%eax 117270: 0f 84 d6 00 00 00 je 11734c return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 117276: 83 ec 0c sub $0xc,%esp 117279: ff 35 c0 09 14 00 pushl 0x1409c0 11727f: e8 d8 24 00 00 call 11975c <_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 ); 117284: c7 04 24 20 08 14 00 movl $0x140820,(%esp) 11728b: e8 24 3a 00 00 call 11acb4 <_Objects_Allocate> 117290: 89 c3 mov %eax,%ebx the_region = _Region_Allocate(); if ( !the_region ) 117292: 83 c4 10 add $0x10,%esp 117295: 85 c0 test %eax,%eax 117297: 0f 84 bf 00 00 00 je 11735c return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 11729d: ff 75 14 pushl 0x14(%ebp) 1172a0: ff 75 10 pushl 0x10(%ebp) 1172a3: 56 push %esi 1172a4: 8d 40 68 lea 0x68(%eax),%eax 1172a7: 50 push %eax 1172a8: e8 13 36 00 00 call 11a8c0 <_Heap_Initialize> 1172ad: 89 43 5c mov %eax,0x5c(%ebx) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 1172b0: 83 c4 10 add $0x10,%esp 1172b3: 85 c0 test %eax,%eax 1172b5: 74 7d je 117334 return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 1172b7: 89 73 50 mov %esi,0x50(%ebx) the_region->length = length; 1172ba: 8b 45 10 mov 0x10(%ebp),%eax 1172bd: 89 43 54 mov %eax,0x54(%ebx) the_region->page_size = page_size; 1172c0: 8b 55 14 mov 0x14(%ebp),%edx 1172c3: 89 53 58 mov %edx,0x58(%ebx) the_region->attribute_set = attribute_set; 1172c6: 8b 45 18 mov 0x18(%ebp),%eax 1172c9: 89 43 60 mov %eax,0x60(%ebx) the_region->number_of_used_blocks = 0; 1172cc: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) _Thread_queue_Initialize( 1172d3: 6a 06 push $0x6 1172d5: 6a 40 push $0x40 1172d7: a8 04 test $0x4,%al 1172d9: 0f 95 c0 setne %al 1172dc: 0f b6 c0 movzbl %al,%eax 1172df: 50 push %eax 1172e0: 8d 43 10 lea 0x10(%ebx),%eax 1172e3: 50 push %eax 1172e4: e8 fb 50 00 00 call 11c3e4 <_Thread_queue_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 1172e9: 8b 43 08 mov 0x8(%ebx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 1172ec: 0f b7 c8 movzwl %ax,%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1172ef: 8b 15 3c 08 14 00 mov 0x14083c,%edx 1172f5: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1172f8: 89 7b 0c mov %edi,0xc(%ebx) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 1172fb: 8b 55 1c mov 0x1c(%ebp),%edx 1172fe: 89 02 mov %eax,(%edx) 117300: 83 c4 10 add $0x10,%esp return_status = RTEMS_SUCCESSFUL; 117303: 31 c0 xor %eax,%eax } } _RTEMS_Unlock_allocator(); 117305: 83 ec 0c sub $0xc,%esp 117308: ff 35 c0 09 14 00 pushl 0x1409c0 11730e: 89 45 e4 mov %eax,-0x1c(%ebp) 117311: e8 8e 24 00 00 call 1197a4 <_API_Mutex_Unlock> return return_status; 117316: 83 c4 10 add $0x10,%esp 117319: 8b 45 e4 mov -0x1c(%ebp),%eax } 11731c: 8d 65 f4 lea -0xc(%ebp),%esp 11731f: 5b pop %ebx 117320: 5e pop %esi 117321: 5f pop %edi 117322: c9 leave 117323: c3 ret { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 117324: b8 03 00 00 00 mov $0x3,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 117329: 8d 65 f4 lea -0xc(%ebp),%esp 11732c: 5b pop %ebx 11732d: 5e pop %esi 11732e: 5f pop %edi 11732f: c9 leave 117330: c3 ret 117331: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 117334: 83 ec 08 sub $0x8,%esp 117337: 53 push %ebx 117338: 68 20 08 14 00 push $0x140820 11733d: e8 e6 3c 00 00 call 11b028 <_Objects_Free> 117342: 83 c4 10 add $0x10,%esp &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { _Region_Free( the_region ); return_status = RTEMS_INVALID_SIZE; 117345: b8 08 00 00 00 mov $0x8,%eax 11734a: eb b9 jmp 117305 if ( !starting_address ) return RTEMS_INVALID_ADDRESS; if ( !id ) return RTEMS_INVALID_ADDRESS; 11734c: b8 09 00 00 00 mov $0x9,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 117351: 8d 65 f4 lea -0xc(%ebp),%esp 117354: 5b pop %ebx 117355: 5e pop %esi 117356: 5f pop %edi 117357: c9 leave 117358: c3 ret 117359: 8d 76 00 lea 0x0(%esi),%esi _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region ) return_status = RTEMS_TOO_MANY; 11735c: b8 05 00 00 00 mov $0x5,%eax 117361: eb a2 jmp 117305 =============================================================================== 00117364 : */ rtems_status_code rtems_region_delete( rtems_id id ) { 117364: 55 push %ebp 117365: 89 e5 mov %esp,%ebp 117367: 53 push %ebx 117368: 83 ec 30 sub $0x30,%esp Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 11736b: ff 35 c0 09 14 00 pushl 0x1409c0 117371: e8 e6 23 00 00 call 11975c <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 117376: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 117379: 8d 45 f4 lea -0xc(%ebp),%eax 11737c: 50 push %eax 11737d: ff 75 08 pushl 0x8(%ebp) 117380: 68 20 08 14 00 push $0x140820 117385: e8 de 3d 00 00 call 11b168 <_Objects_Get_no_protection> switch ( location ) { 11738a: 83 c4 10 add $0x10,%esp 11738d: 8b 5d f4 mov -0xc(%ebp),%ebx 117390: 85 db test %ebx,%ebx 117392: 74 1c je 1173b0 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 117394: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 117399: 83 ec 0c sub $0xc,%esp 11739c: ff 35 c0 09 14 00 pushl 0x1409c0 1173a2: e8 fd 23 00 00 call 1197a4 <_API_Mutex_Unlock> return return_status; } 1173a7: 89 d8 mov %ebx,%eax 1173a9: 8b 5d fc mov -0x4(%ebp),%ebx 1173ac: c9 leave 1173ad: c3 ret 1173ae: 66 90 xchg %ax,%ax 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 ) 1173b0: 8b 48 64 mov 0x64(%eax),%ecx 1173b3: 85 c9 test %ecx,%ecx 1173b5: 74 09 je 1173c0 return_status = RTEMS_RESOURCE_IN_USE; 1173b7: bb 0c 00 00 00 mov $0xc,%ebx 1173bc: eb db jmp 117399 1173be: 66 90 xchg %ax,%ax else { _Objects_Close( &_Region_Information, &the_region->Object ); 1173c0: 83 ec 08 sub $0x8,%esp 1173c3: 50 push %eax 1173c4: 68 20 08 14 00 push $0x140820 1173c9: 89 45 e4 mov %eax,-0x1c(%ebp) 1173cc: e8 5f 39 00 00 call 11ad30 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 1173d1: 58 pop %eax 1173d2: 5a pop %edx 1173d3: 8b 45 e4 mov -0x1c(%ebp),%eax 1173d6: 50 push %eax 1173d7: 68 20 08 14 00 push $0x140820 1173dc: e8 47 3c 00 00 call 11b028 <_Objects_Free> 1173e1: 83 c4 10 add $0x10,%esp _Region_Free( the_region ); return_status = RTEMS_SUCCESSFUL; 1173e4: 31 db xor %ebx,%ebx 1173e6: eb b1 jmp 117399 =============================================================================== 001173e8 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 1173e8: 55 push %ebp 1173e9: 89 e5 mov %esp,%ebp 1173eb: 56 push %esi 1173ec: 53 push %ebx 1173ed: 83 ec 10 sub $0x10,%esp 1173f0: 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 ) 1173f3: 85 db test %ebx,%ebx 1173f5: 74 75 je 11746c return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 1173f7: 83 ec 0c sub $0xc,%esp 1173fa: ff 35 c0 09 14 00 pushl 0x1409c0 117400: e8 57 23 00 00 call 11975c <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 117405: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 117408: 8d 45 f0 lea -0x10(%ebp),%eax 11740b: 50 push %eax 11740c: ff 75 08 pushl 0x8(%ebp) 11740f: 68 20 08 14 00 push $0x140820 117414: e8 4f 3d 00 00 call 11b168 <_Objects_Get_no_protection> 117419: 89 c6 mov %eax,%esi switch ( location ) { 11741b: 83 c4 10 add $0x10,%esp 11741e: 8b 45 f0 mov -0x10(%ebp),%eax 117421: 85 c0 test %eax,%eax 117423: 74 1f je 117444 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 117425: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 11742a: 83 ec 0c sub $0xc,%esp 11742d: ff 35 c0 09 14 00 pushl 0x1409c0 117433: e8 6c 23 00 00 call 1197a4 <_API_Mutex_Unlock> return return_status; 117438: 83 c4 10 add $0x10,%esp } 11743b: 89 d8 mov %ebx,%eax 11743d: 8d 65 f8 lea -0x8(%ebp),%esp 117440: 5b pop %ebx 117441: 5e pop %esi 117442: c9 leave 117443: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: extend_ok = _Heap_Extend( 117444: 8d 45 f4 lea -0xc(%ebp),%eax 117447: 50 push %eax 117448: ff 75 10 pushl 0x10(%ebp) 11744b: 53 push %ebx 11744c: 8d 46 68 lea 0x68(%esi),%eax 11744f: 50 push %eax 117450: e8 5f 2e 00 00 call 11a2b4 <_Heap_Extend> starting_address, length, &amount_extended ); if ( extend_ok ) { 117455: 83 c4 10 add $0x10,%esp 117458: 84 c0 test %al,%al 11745a: 74 20 je 11747c the_region->length += amount_extended; 11745c: 8b 45 f4 mov -0xc(%ebp),%eax 11745f: 01 46 54 add %eax,0x54(%esi) the_region->maximum_segment_size += amount_extended; 117462: 01 46 5c add %eax,0x5c(%esi) return_status = RTEMS_SUCCESSFUL; 117465: 31 db xor %ebx,%ebx 117467: eb c1 jmp 11742a 117469: 8d 76 00 lea 0x0(%esi),%esi Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) return RTEMS_INVALID_ADDRESS; 11746c: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 117471: 89 d8 mov %ebx,%eax 117473: 8d 65 f8 lea -0x8(%ebp),%esp 117476: 5b pop %ebx 117477: 5e pop %esi 117478: c9 leave 117479: c3 ret 11747a: 66 90 xchg %ax,%ax 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; 11747c: bb 09 00 00 00 mov $0x9,%ebx 117481: eb a7 jmp 11742a =============================================================================== 00117484 : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { 117484: 55 push %ebp 117485: 89 e5 mov %esp,%ebp 117487: 53 push %ebx 117488: 83 ec 14 sub $0x14,%esp 11748b: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 11748e: 85 db test %ebx,%ebx 117490: 74 76 je 117508 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 117492: 83 ec 0c sub $0xc,%esp 117495: ff 35 c0 09 14 00 pushl 0x1409c0 11749b: e8 bc 22 00 00 call 11975c <_API_Mutex_Lock> 1174a0: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1174a3: 8d 45 f4 lea -0xc(%ebp),%eax 1174a6: 50 push %eax 1174a7: ff 75 08 pushl 0x8(%ebp) 1174aa: 68 20 08 14 00 push $0x140820 1174af: e8 b4 3c 00 00 call 11b168 <_Objects_Get_no_protection> switch ( location ) { 1174b4: 83 c4 10 add $0x10,%esp 1174b7: 8b 55 f4 mov -0xc(%ebp),%edx 1174ba: 85 d2 test %edx,%edx 1174bc: 74 1e je 1174dc break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 1174be: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 1174c3: 83 ec 0c sub $0xc,%esp 1174c6: ff 35 c0 09 14 00 pushl 0x1409c0 1174cc: e8 d3 22 00 00 call 1197a4 <_API_Mutex_Unlock> return return_status; 1174d1: 83 c4 10 add $0x10,%esp } 1174d4: 89 d8 mov %ebx,%eax 1174d6: 8b 5d fc mov -0x4(%ebp),%ebx 1174d9: c9 leave 1174da: c3 ret 1174db: 90 nop the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; 1174dc: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) the_info->Used.total = 0; 1174e3: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) the_info->Used.largest = 0; 1174ea: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 1174f1: 83 ec 08 sub $0x8,%esp 1174f4: 53 push %ebx 1174f5: 83 c0 68 add $0x68,%eax 1174f8: 50 push %eax 1174f9: e8 9e 31 00 00 call 11a69c <_Heap_Get_free_information> return_status = RTEMS_SUCCESSFUL; break; 1174fe: 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; 117501: 31 db xor %ebx,%ebx break; 117503: eb be jmp 1174c3 117505: 8d 76 00 lea 0x0(%esi),%esi Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) return RTEMS_INVALID_ADDRESS; 117508: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 11750d: 89 d8 mov %ebx,%eax 11750f: 8b 5d fc mov -0x4(%ebp),%ebx 117512: c9 leave 117513: c3 ret =============================================================================== 0011758c : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 11758c: 55 push %ebp 11758d: 89 e5 mov %esp,%ebp 11758f: 57 push %edi 117590: 56 push %esi 117591: 53 push %ebx 117592: 83 ec 2c sub $0x2c,%esp 117595: 8b 75 0c mov 0xc(%ebp),%esi 117598: 8b 5d 18 mov 0x18(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 11759b: 85 db test %ebx,%ebx 11759d: 0f 84 a1 00 00 00 je 117644 return RTEMS_INVALID_ADDRESS; *segment = NULL; 1175a3: c7 03 00 00 00 00 movl $0x0,(%ebx) if ( size == 0 ) 1175a9: 85 f6 test %esi,%esi 1175ab: 75 0f jne 1175bc return RTEMS_INVALID_SIZE; 1175ad: b8 08 00 00 00 mov $0x8,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 1175b2: 8d 65 f4 lea -0xc(%ebp),%esp 1175b5: 5b pop %ebx 1175b6: 5e pop %esi 1175b7: 5f pop %edi 1175b8: c9 leave 1175b9: c3 ret 1175ba: 66 90 xchg %ax,%ax *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 1175bc: 83 ec 0c sub $0xc,%esp 1175bf: ff 35 c0 09 14 00 pushl 0x1409c0 1175c5: e8 92 21 00 00 call 11975c <_API_Mutex_Lock> executing = _Thread_Executing; 1175ca: a1 98 0b 14 00 mov 0x140b98,%eax 1175cf: 89 45 d4 mov %eax,-0x2c(%ebp) 1175d2: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1175d5: 8d 45 e4 lea -0x1c(%ebp),%eax 1175d8: 50 push %eax 1175d9: ff 75 08 pushl 0x8(%ebp) 1175dc: 68 20 08 14 00 push $0x140820 1175e1: e8 82 3b 00 00 call 11b168 <_Objects_Get_no_protection> 1175e6: 89 c7 mov %eax,%edi switch ( location ) { 1175e8: 83 c4 10 add $0x10,%esp 1175eb: 8b 45 e4 mov -0x1c(%ebp),%eax 1175ee: 85 c0 test %eax,%eax 1175f0: 75 2a jne 11761c case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 1175f2: 3b 77 5c cmp 0x5c(%edi),%esi 1175f5: 76 2d jbe 117624 return_status = RTEMS_INVALID_SIZE; 1175f7: b8 08 00 00 00 mov $0x8,%eax default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1175fc: 83 ec 0c sub $0xc,%esp 1175ff: ff 35 c0 09 14 00 pushl 0x1409c0 117605: 89 45 d0 mov %eax,-0x30(%ebp) 117608: e8 97 21 00 00 call 1197a4 <_API_Mutex_Unlock> return return_status; 11760d: 83 c4 10 add $0x10,%esp 117610: 8b 45 d0 mov -0x30(%ebp),%eax } 117613: 8d 65 f4 lea -0xc(%ebp),%esp 117616: 5b pop %ebx 117617: 5e pop %esi 117618: 5f pop %edi 117619: c9 leave 11761a: c3 ret 11761b: 90 nop break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 11761c: b8 04 00 00 00 mov $0x4,%eax 117621: eb d9 jmp 1175fc 117623: 90 nop * @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 ); 117624: 6a 00 push $0x0 117626: 6a 00 push $0x0 117628: 56 push %esi RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uintptr_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 117629: 8d 47 68 lea 0x68(%edi),%eax 11762c: 50 push %eax 11762d: e8 ae 2a 00 00 call 11a0e0 <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 117632: 83 c4 10 add $0x10,%esp 117635: 85 c0 test %eax,%eax 117637: 74 17 je 117650 the_region->number_of_used_blocks += 1; 117639: ff 47 64 incl 0x64(%edi) *segment = the_segment; 11763c: 89 03 mov %eax,(%ebx) return_status = RTEMS_SUCCESSFUL; 11763e: 31 c0 xor %eax,%eax 117640: eb ba jmp 1175fc 117642: 66 90 xchg %ax,%ax rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) return RTEMS_INVALID_ADDRESS; 117644: b8 09 00 00 00 mov $0x9,%eax 117649: e9 64 ff ff ff jmp 1175b2 11764e: 66 90 xchg %ax,%ax 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 ) ) { 117650: f6 45 10 01 testb $0x1,0x10(%ebp) 117654: 74 07 je 11765d return_status = RTEMS_UNSATISFIED; 117656: b8 0d 00 00 00 mov $0xd,%eax 11765b: eb 9f jmp 1175fc rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 11765d: a1 10 09 14 00 mov 0x140910,%eax 117662: 40 inc %eax 117663: a3 10 09 14 00 mov %eax,0x140910 * 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(); 117668: 83 ec 0c sub $0xc,%esp 11766b: ff 35 c0 09 14 00 pushl 0x1409c0 117671: e8 2e 21 00 00 call 1197a4 <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 117676: 8d 47 10 lea 0x10(%edi),%eax 117679: 8b 55 d4 mov -0x2c(%ebp),%edx 11767c: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 11767f: 8b 4d 08 mov 0x8(%ebp),%ecx 117682: 89 4a 20 mov %ecx,0x20(%edx) executing->Wait.count = size; 117685: 89 72 24 mov %esi,0x24(%edx) executing->Wait.return_argument = segment; 117688: 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; 11768b: 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 ); 117692: 83 c4 0c add $0xc,%esp 117695: 68 a8 c4 11 00 push $0x11c4a8 11769a: ff 75 14 pushl 0x14(%ebp) 11769d: 50 push %eax 11769e: e8 d9 4a 00 00 call 11c17c <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 1176a3: e8 5c 46 00 00 call 11bd04 <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 1176a8: 8b 55 d4 mov -0x2c(%ebp),%edx 1176ab: 8b 42 34 mov 0x34(%edx),%eax 1176ae: 83 c4 10 add $0x10,%esp 1176b1: e9 fc fe ff ff jmp 1175b2 =============================================================================== 0011776c : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 11776c: 55 push %ebp 11776d: 89 e5 mov %esp,%ebp 11776f: 56 push %esi 117770: 53 push %ebx 117771: 83 ec 20 sub $0x20,%esp 117774: 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 ) 117777: 85 db test %ebx,%ebx 117779: 0f 84 89 00 00 00 je 117808 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 11777f: 83 ec 0c sub $0xc,%esp 117782: ff 35 c0 09 14 00 pushl 0x1409c0 117788: e8 cf 1f 00 00 call 11975c <_API_Mutex_Lock> 11778d: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 117790: 8d 45 f0 lea -0x10(%ebp),%eax 117793: 50 push %eax 117794: ff 75 08 pushl 0x8(%ebp) 117797: 68 20 08 14 00 push $0x140820 11779c: e8 c7 39 00 00 call 11b168 <_Objects_Get_no_protection> 1177a1: 89 c6 mov %eax,%esi switch ( location ) { 1177a3: 83 c4 10 add $0x10,%esp 1177a6: 8b 45 f0 mov -0x10(%ebp),%eax 1177a9: 85 c0 test %eax,%eax 1177ab: 74 1f je 1177cc default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1177ad: 83 ec 0c sub $0xc,%esp 1177b0: ff 35 c0 09 14 00 pushl 0x1409c0 1177b6: e8 e9 1f 00 00 call 1197a4 <_API_Mutex_Unlock> return return_status; 1177bb: 83 c4 10 add $0x10,%esp 1177be: b8 04 00 00 00 mov $0x4,%eax } 1177c3: 8d 65 f8 lea -0x8(%ebp),%esp 1177c6: 5b pop %ebx 1177c7: 5e pop %esi 1177c8: c9 leave 1177c9: c3 ret 1177ca: 66 90 xchg %ax,%ax case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 1177cc: 83 ec 0c sub $0xc,%esp 1177cf: 8d 45 f4 lea -0xc(%ebp),%eax 1177d2: 50 push %eax 1177d3: 8d 45 ec lea -0x14(%ebp),%eax 1177d6: 50 push %eax 1177d7: ff 75 10 pushl 0x10(%ebp) 1177da: ff 75 0c pushl 0xc(%ebp) 1177dd: 8d 46 68 lea 0x68(%esi),%eax 1177e0: 50 push %eax 1177e1: e8 e2 32 00 00 call 11aac8 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 1177e6: 8b 55 ec mov -0x14(%ebp),%edx 1177e9: 89 13 mov %edx,(%ebx) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 1177eb: 83 c4 20 add $0x20,%esp 1177ee: 85 c0 test %eax,%eax 1177f0: 75 22 jne 117814 _Region_Process_queue( the_region ); /* unlocks allocator */ 1177f2: 83 ec 0c sub $0xc,%esp 1177f5: 56 push %esi 1177f6: e8 59 71 00 00 call 11e954 <_Region_Process_queue> 1177fb: 83 c4 10 add $0x10,%esp else _RTEMS_Unlock_allocator(); if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; 1177fe: 31 c0 xor %eax,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117800: 8d 65 f8 lea -0x8(%ebp),%esp 117803: 5b pop %ebx 117804: 5e pop %esi 117805: c9 leave 117806: c3 ret 117807: 90 nop rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) return RTEMS_INVALID_ADDRESS; 117808: b8 09 00 00 00 mov $0x9,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 11780d: 8d 65 f8 lea -0x8(%ebp),%esp 117810: 5b pop %ebx 117811: 5e pop %esi 117812: c9 leave 117813: c3 ret _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 117814: 83 ec 0c sub $0xc,%esp 117817: ff 35 c0 09 14 00 pushl 0x1409c0 11781d: 89 45 e4 mov %eax,-0x1c(%ebp) 117820: e8 7f 1f 00 00 call 1197a4 <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 117825: 83 c4 10 add $0x10,%esp return RTEMS_UNSATISFIED; 117828: 8b 45 e4 mov -0x1c(%ebp),%eax 11782b: 48 dec %eax 11782c: 0f 94 c0 sete %al 11782f: 0f b6 c0 movzbl %al,%eax 117832: 8d 04 85 09 00 00 00 lea 0x9(,%eax,4),%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117839: 8d 65 f8 lea -0x8(%ebp),%esp 11783c: 5b pop %ebx 11783d: 5e pop %esi 11783e: c9 leave 11783f: c3 ret =============================================================================== 00117840 : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 117840: 55 push %ebp 117841: 89 e5 mov %esp,%ebp 117843: 53 push %ebx 117844: 83 ec 20 sub $0x20,%esp uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 117847: ff 35 c0 09 14 00 pushl 0x1409c0 11784d: e8 0a 1f 00 00 call 11975c <_API_Mutex_Lock> 117852: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 117855: 8d 45 f4 lea -0xc(%ebp),%eax 117858: 50 push %eax 117859: ff 75 08 pushl 0x8(%ebp) 11785c: 68 20 08 14 00 push $0x140820 117861: e8 02 39 00 00 call 11b168 <_Objects_Get_no_protection> 117866: 89 c3 mov %eax,%ebx switch ( location ) { 117868: 83 c4 10 add $0x10,%esp 11786b: 8b 45 f4 mov -0xc(%ebp),%eax 11786e: 85 c0 test %eax,%eax 117870: 75 1e jne 117890 RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 117872: 83 ec 08 sub $0x8,%esp 117875: ff 75 0c pushl 0xc(%ebp) 117878: 8d 43 68 lea 0x68(%ebx),%eax 11787b: 50 push %eax 11787c: e8 cb 2c 00 00 call 11a54c <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 117881: 83 c4 10 add $0x10,%esp 117884: 84 c0 test %al,%al 117886: 75 28 jne 1178b0 return_status = RTEMS_INVALID_ADDRESS; 117888: bb 09 00 00 00 mov $0x9,%ebx 11788d: eb 06 jmp 117895 11788f: 90 nop break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 117890: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 117895: 83 ec 0c sub $0xc,%esp 117898: ff 35 c0 09 14 00 pushl 0x1409c0 11789e: e8 01 1f 00 00 call 1197a4 <_API_Mutex_Unlock> return return_status; 1178a3: 83 c4 10 add $0x10,%esp } 1178a6: 89 d8 mov %ebx,%eax 1178a8: 8b 5d fc mov -0x4(%ebp),%ebx 1178ab: c9 leave 1178ac: c3 ret 1178ad: 8d 76 00 lea 0x0(%esi),%esi _Region_Debug_Walk( the_region, 4 ); if ( !status ) return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; 1178b0: ff 4b 64 decl 0x64(%ebx) _Region_Process_queue(the_region); /* unlocks allocator */ 1178b3: 83 ec 0c sub $0xc,%esp 1178b6: 53 push %ebx 1178b7: e8 98 70 00 00 call 11e954 <_Region_Process_queue> return RTEMS_SUCCESSFUL; 1178bc: 83 c4 10 add $0x10,%esp 1178bf: 31 db xor %ebx,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 1178c1: 89 d8 mov %ebx,%eax 1178c3: 8b 5d fc mov -0x4(%ebp),%ebx 1178c6: c9 leave 1178c7: c3 ret =============================================================================== 0010b434 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 10b434: 55 push %ebp 10b435: 89 e5 mov %esp,%ebp 10b437: 57 push %edi 10b438: 56 push %esi 10b439: 53 push %ebx 10b43a: 83 ec 3c sub $0x3c,%esp 10b43d: 8b 75 08 mov 0x8(%ebp),%esi 10b440: 8b 5d 10 mov 0x10(%ebp),%ebx 10b443: 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 ) ) 10b446: 85 f6 test %esi,%esi 10b448: 74 4a je 10b494 return RTEMS_INVALID_NAME; if ( !id ) 10b44a: 85 ff test %edi,%edi 10b44c: 0f 84 f6 00 00 00 je 10b548 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 10b452: 89 da mov %ebx,%edx 10b454: 81 e2 c0 00 00 00 and $0xc0,%edx 10b45a: 74 48 je 10b4a4 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); 10b45c: 89 d8 mov %ebx,%eax 10b45e: 83 e0 30 and $0x30,%eax _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10b461: 83 f8 10 cmp $0x10,%eax 10b464: 74 0e je 10b474 } if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; 10b466: b8 0b 00 00 00 mov $0xb,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b46b: 8d 65 f4 lea -0xc(%ebp),%esp 10b46e: 5b pop %ebx 10b46f: 5e pop %esi 10b470: 5f pop %edi 10b471: c9 leave 10b472: c3 ret 10b473: 90 nop #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10b474: f6 c3 04 test $0x4,%bl 10b477: 74 ed je 10b466 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 10b479: 81 fa c0 00 00 00 cmp $0xc0,%edx 10b47f: 74 e5 je 10b466 10b481: 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 ) ) 10b486: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b48a: 76 1f jbe 10b4ab return RTEMS_INVALID_NUMBER; 10b48c: b8 0a 00 00 00 mov $0xa,%eax 10b491: eb d8 jmp 10b46b 10b493: 90 nop 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; 10b494: b8 03 00 00 00 mov $0x3,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b499: 8d 65 f4 lea -0xc(%ebp),%esp 10b49c: 5b pop %ebx 10b49d: 5e pop %esi 10b49e: 5f pop %edi 10b49f: c9 leave 10b4a0: c3 ret 10b4a1: 8d 76 00 lea 0x0(%esi),%esi 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 ) ) 10b4a4: 89 d9 mov %ebx,%ecx 10b4a6: 83 e1 30 and $0x30,%ecx 10b4a9: 75 db jne 10b486 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b4ab: a1 d0 64 12 00 mov 0x1264d0,%eax 10b4b0: 40 inc %eax 10b4b1: a3 d0 64 12 00 mov %eax,0x1264d0 * 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 ); 10b4b6: 83 ec 0c sub $0xc,%esp 10b4b9: 68 20 64 12 00 push $0x126420 10b4be: 89 4d c4 mov %ecx,-0x3c(%ebp) 10b4c1: e8 ea 13 00 00 call 10c8b0 <_Objects_Allocate> 10b4c6: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 10b4c8: 83 c4 10 add $0x10,%esp 10b4cb: 85 c0 test %eax,%eax 10b4cd: 8b 4d c4 mov -0x3c(%ebp),%ecx 10b4d0: 0f 84 ba 00 00 00 je 10b590 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 10b4d6: 89 58 10 mov %ebx,0x10(%eax) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 10b4d9: 85 c9 test %ecx,%ecx 10b4db: 74 77 je 10b554 /* * 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; 10b4dd: 31 c0 xor %eax,%eax 10b4df: f6 c3 04 test $0x4,%bl 10b4e2: 0f 95 c0 setne %al 10b4e5: 89 45 d8 mov %eax,-0x28(%ebp) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 10b4e8: 83 f9 10 cmp $0x10,%ecx 10b4eb: 0f 84 ae 00 00 00 je 10b59f 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; 10b4f1: c7 45 d0 01 00 00 00 movl $0x1,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b4f8: c6 45 d4 00 movb $0x0,-0x2c(%ebp) } mutex_status = _CORE_mutex_Initialize( 10b4fc: 50 push %eax 10b4fd: 31 c0 xor %eax,%eax 10b4ff: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b503: 0f 94 c0 sete %al 10b506: 50 push %eax 10b507: 8d 45 d0 lea -0x30(%ebp),%eax 10b50a: 50 push %eax 10b50b: 8d 42 14 lea 0x14(%edx),%eax 10b50e: 50 push %eax 10b50f: 89 55 c4 mov %edx,-0x3c(%ebp) 10b512: e8 91 0b 00 00 call 10c0a8 <_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 ) { 10b517: 83 c4 10 add $0x10,%esp 10b51a: 83 f8 05 cmp $0x5,%eax 10b51d: 8b 55 c4 mov -0x3c(%ebp),%edx 10b520: 0f 84 a9 00 00 00 je 10b5cf Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10b526: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10b529: 0f b7 d8 movzwl %ax,%ebx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b52c: 8b 0d 3c 64 12 00 mov 0x12643c,%ecx 10b532: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10b535: 89 72 0c mov %esi,0xc(%edx) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 10b538: 89 07 mov %eax,(%edi) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 10b53a: e8 85 23 00 00 call 10d8c4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b53f: 31 c0 xor %eax,%eax 10b541: e9 25 ff ff ff jmp 10b46b 10b546: 66 90 xchg %ax,%ax if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10b548: b8 09 00 00 00 mov $0x9,%eax 10b54d: e9 19 ff ff ff jmp 10b46b 10b552: 66 90 xchg %ax,%ax */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 10b554: 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; 10b55b: 31 c0 xor %eax,%eax 10b55d: f6 c3 04 test $0x4,%bl 10b560: 0f 95 c0 setne %al 10b563: 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; 10b566: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 10b56d: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) _CORE_semaphore_Initialize( 10b574: 51 push %ecx 10b575: ff 75 0c pushl 0xc(%ebp) 10b578: 8d 45 e0 lea -0x20(%ebp),%eax 10b57b: 50 push %eax 10b57c: 8d 42 14 lea 0x14(%edx),%eax 10b57f: 50 push %eax 10b580: 89 55 c4 mov %edx,-0x3c(%ebp) 10b583: e8 b0 0d 00 00 call 10c338 <_CORE_semaphore_Initialize> 10b588: 83 c4 10 add $0x10,%esp 10b58b: 8b 55 c4 mov -0x3c(%ebp),%edx 10b58e: eb 96 jmp 10b526 _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 10b590: e8 2f 23 00 00 call 10d8c4 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10b595: b8 05 00 00 00 mov $0x5,%eax 10b59a: e9 cc fe ff ff jmp 10b46b 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; 10b59f: 8b 45 14 mov 0x14(%ebp),%eax 10b5a2: 89 45 dc mov %eax,-0x24(%ebp) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10b5a5: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b5ac: c6 45 d4 00 movb $0x0,-0x2c(%ebp) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 10b5b0: 83 7d d8 01 cmpl $0x1,-0x28(%ebp) 10b5b4: 0f 85 42 ff ff ff jne 10b4fc if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 10b5ba: f6 c3 40 test $0x40,%bl 10b5bd: 74 30 je 10b5ef the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10b5bf: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b5c6: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b5ca: e9 2d ff ff ff jmp 10b4fc */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b5cf: 83 ec 08 sub $0x8,%esp 10b5d2: 52 push %edx 10b5d3: 68 20 64 12 00 push $0x126420 10b5d8: e8 47 16 00 00 call 10cc24 <_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(); 10b5dd: e8 e2 22 00 00 call 10d8c4 <_Thread_Enable_dispatch> return RTEMS_INVALID_PRIORITY; 10b5e2: 83 c4 10 add $0x10,%esp 10b5e5: b8 13 00 00 00 mov $0x13,%eax 10b5ea: e9 7c fe ff ff jmp 10b46b 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 ) ) { 10b5ef: 81 e3 80 00 00 00 and $0x80,%ebx 10b5f5: 0f 84 01 ff ff ff je 10b4fc the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 10b5fb: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b602: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b606: e9 f1 fe ff ff jmp 10b4fc =============================================================================== 0010b60c : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 10b60c: 55 push %ebp 10b60d: 89 e5 mov %esp,%ebp 10b60f: 53 push %ebx 10b610: 83 ec 18 sub $0x18,%esp register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); 10b613: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) _Objects_Get( &_Semaphore_Information, id, location ); 10b616: 50 push %eax 10b617: ff 75 08 pushl 0x8(%ebp) 10b61a: 68 20 64 12 00 push $0x126420 10b61f: e8 40 17 00 00 call 10cd64 <_Objects_Get> 10b624: 89 c3 mov %eax,%ebx switch ( location ) { 10b626: 83 c4 10 add $0x10,%esp 10b629: 8b 4d f4 mov -0xc(%ebp),%ecx 10b62c: 85 c9 test %ecx,%ecx 10b62e: 74 0c je 10b63c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b630: b8 04 00 00 00 mov $0x4,%eax } 10b635: 8b 5d fc mov -0x4(%ebp),%ebx 10b638: c9 leave 10b639: c3 ret 10b63a: 66 90 xchg %ax,%ax */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); 10b63c: 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) ) { 10b63f: 83 e0 30 and $0x30,%eax 10b642: 74 58 je 10b69c if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 10b644: 8b 53 64 mov 0x64(%ebx),%edx 10b647: 85 d2 test %edx,%edx 10b649: 75 15 jne 10b660 10b64b: 83 f8 20 cmp $0x20,%eax 10b64e: 74 10 je 10b660 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 10b650: e8 6f 22 00 00 call 10d8c4 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 10b655: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b65a: 8b 5d fc mov -0x4(%ebp),%ebx 10b65d: c9 leave 10b65e: c3 ret 10b65f: 90 nop !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 10b660: 50 push %eax 10b661: 6a 03 push $0x3 10b663: 6a 00 push $0x0 10b665: 8d 43 14 lea 0x14(%ebx),%eax 10b668: 50 push %eax 10b669: e8 2e 0a 00 00 call 10c09c <_CORE_mutex_Flush> 10b66e: 83 c4 10 add $0x10,%esp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 10b671: 83 ec 08 sub $0x8,%esp 10b674: 53 push %ebx 10b675: 68 20 64 12 00 push $0x126420 10b67a: e8 ad 12 00 00 call 10c92c <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b67f: 58 pop %eax 10b680: 5a pop %edx 10b681: 53 push %ebx 10b682: 68 20 64 12 00 push $0x126420 10b687: e8 98 15 00 00 call 10cc24 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 10b68c: e8 33 22 00 00 call 10d8c4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b691: 83 c4 10 add $0x10,%esp 10b694: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b696: 8b 5d fc mov -0x4(%ebp),%ebx 10b699: c9 leave 10b69a: c3 ret 10b69b: 90 nop &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 10b69c: 51 push %ecx 10b69d: 6a 02 push $0x2 10b69f: 6a 00 push $0x0 10b6a1: 8d 43 14 lea 0x14(%ebx),%eax 10b6a4: 50 push %eax 10b6a5: e8 82 0c 00 00 call 10c32c <_CORE_semaphore_Flush> 10b6aa: 83 c4 10 add $0x10,%esp 10b6ad: eb c2 jmp 10b671 =============================================================================== 0010b6b0 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 10b6b0: 55 push %ebp 10b6b1: 89 e5 mov %esp,%ebp 10b6b3: 57 push %edi 10b6b4: 56 push %esi 10b6b5: 53 push %ebx 10b6b6: 83 ec 1c sub $0x1c,%esp 10b6b9: 8b 5d 08 mov 0x8(%ebp),%ebx 10b6bc: 8b 75 0c mov 0xc(%ebp),%esi 10b6bf: 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 ); 10b6c2: 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 ); 10b6c5: 50 push %eax 10b6c6: 8d 45 e4 lea -0x1c(%ebp),%eax 10b6c9: 50 push %eax 10b6ca: 53 push %ebx 10b6cb: 68 20 64 12 00 push $0x126420 10b6d0: e8 37 16 00 00 call 10cd0c <_Objects_Get_isr_disable> switch ( location ) { 10b6d5: 83 c4 10 add $0x10,%esp 10b6d8: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b6db: 85 c9 test %ecx,%ecx 10b6dd: 74 0d je 10b6ec case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b6df: b8 04 00 00 00 mov $0x4,%eax } 10b6e4: 8d 65 f4 lea -0xc(%ebp),%esp 10b6e7: 5b pop %ebx 10b6e8: 5e pop %esi 10b6e9: 5f pop %edi 10b6ea: c9 leave 10b6eb: 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) ) { 10b6ec: f6 40 10 30 testb $0x30,0x10(%eax) 10b6f0: 74 36 je 10b728 _CORE_mutex_Seize( 10b6f2: 83 ec 0c sub $0xc,%esp 10b6f5: ff 75 e0 pushl -0x20(%ebp) 10b6f8: 57 push %edi */ RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait ( rtems_option option_set ) { return (option_set & RTEMS_NO_WAIT) ? true : false; 10b6f9: 83 e6 01 and $0x1,%esi 10b6fc: 83 f6 01 xor $0x1,%esi 10b6ff: 56 push %esi 10b700: 53 push %ebx 10b701: 83 c0 14 add $0x14,%eax 10b704: 50 push %eax 10b705: e8 96 0a 00 00 call 10c1a0 <_CORE_mutex_Seize> id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10b70a: 83 c4 14 add $0x14,%esp _Thread_Executing->Wait.return_code ); 10b70d: a1 58 67 12 00 mov 0x126758,%eax id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10b712: ff 70 34 pushl 0x34(%eax) 10b715: e8 12 01 00 00 call 10b82c <_Semaphore_Translate_core_mutex_return_code> 10b71a: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b71d: 8d 65 f4 lea -0xc(%ebp),%esp 10b720: 5b pop %ebx 10b721: 5e pop %esi 10b722: 5f pop %edi 10b723: c9 leave 10b724: c3 ret 10b725: 8d 76 00 lea 0x0(%esi),%esi { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10b728: 8b 15 58 67 12 00 mov 0x126758,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10b72e: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( the_semaphore->count != 0 ) { 10b735: 8b 48 5c mov 0x5c(%eax),%ecx 10b738: 85 c9 test %ecx,%ecx 10b73a: 75 2c jne 10b768 the_semaphore->count -= 1; _ISR_Enable( *level_p ); return; } if ( !wait ) { 10b73c: 83 e6 01 and $0x1,%esi 10b73f: 74 33 je 10b774 _ISR_Enable( *level_p ); 10b741: ff 75 e0 pushl -0x20(%ebp) 10b744: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 10b745: 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( 10b74c: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code ); 10b74f: a1 58 67 12 00 mov 0x126758,%eax id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 10b754: ff 70 34 pushl 0x34(%eax) 10b757: e8 e0 00 00 00 call 10b83c <_Semaphore_Translate_core_semaphore_return_code> 10b75c: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b75f: 8d 65 f4 lea -0xc(%ebp),%esp 10b762: 5b pop %ebx 10b763: 5e pop %esi 10b764: 5f pop %edi 10b765: c9 leave 10b766: c3 ret 10b767: 90 nop /* 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; 10b768: 49 dec %ecx 10b769: 89 48 5c mov %ecx,0x5c(%eax) _ISR_Enable( *level_p ); 10b76c: ff 75 e0 pushl -0x20(%ebp) 10b76f: 9d popf 10b770: eb da jmp 10b74c 10b772: 66 90 xchg %ax,%ax 10b774: 8b 0d d0 64 12 00 mov 0x1264d0,%ecx 10b77a: 41 inc %ecx 10b77b: 89 0d d0 64 12 00 mov %ecx,0x1264d0 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; 10b781: 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; 10b788: 83 c0 14 add $0x14,%eax 10b78b: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10b78e: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( *level_p ); 10b791: ff 75 e0 pushl -0x20(%ebp) 10b794: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 10b795: 52 push %edx 10b796: 68 68 e0 10 00 push $0x10e068 10b79b: 57 push %edi 10b79c: 50 push %eax 10b79d: e8 9a 25 00 00 call 10dd3c <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10b7a2: e8 1d 21 00 00 call 10d8c4 <_Thread_Enable_dispatch> 10b7a7: 83 c4 10 add $0x10,%esp 10b7aa: eb a0 jmp 10b74c =============================================================================== 0010b7ac : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 10b7ac: 55 push %ebp 10b7ad: 89 e5 mov %esp,%ebp 10b7af: 53 push %ebx 10b7b0: 83 ec 18 sub $0x18,%esp 10b7b3: 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 ); 10b7b6: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) _Objects_Get( &_Semaphore_Information, id, location ); 10b7b9: 50 push %eax 10b7ba: 53 push %ebx 10b7bb: 68 20 64 12 00 push $0x126420 10b7c0: e8 9f 15 00 00 call 10cd64 <_Objects_Get> switch ( location ) { 10b7c5: 83 c4 10 add $0x10,%esp 10b7c8: 8b 55 f4 mov -0xc(%ebp),%edx 10b7cb: 85 d2 test %edx,%edx 10b7cd: 74 0d je 10b7dc case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b7cf: b8 04 00 00 00 mov $0x4,%eax } 10b7d4: 8b 5d fc mov -0x4(%ebp),%ebx 10b7d7: c9 leave 10b7d8: c3 ret 10b7d9: 8d 76 00 lea 0x0(%esi),%esi the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10b7dc: f6 40 10 30 testb $0x30,0x10(%eax) 10b7e0: 75 26 jne 10b808 MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); } else { semaphore_status = _CORE_semaphore_Surrender( 10b7e2: 52 push %edx 10b7e3: 6a 00 push $0x0 10b7e5: 53 push %ebx 10b7e6: 83 c0 14 add $0x14,%eax 10b7e9: 50 push %eax 10b7ea: e8 89 0b 00 00 call 10c378 <_CORE_semaphore_Surrender> 10b7ef: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b7f1: e8 ce 20 00 00 call 10d8c4 <_Thread_Enable_dispatch> return 10b7f6: 89 1c 24 mov %ebx,(%esp) 10b7f9: e8 3e 00 00 00 call 10b83c <_Semaphore_Translate_core_semaphore_return_code> 10b7fe: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b801: 8b 5d fc mov -0x4(%ebp),%ebx 10b804: c9 leave 10b805: c3 ret 10b806: 66 90 xchg %ax,%ax 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( 10b808: 51 push %ecx 10b809: 6a 00 push $0x0 10b80b: 53 push %ebx 10b80c: 83 c0 14 add $0x14,%eax 10b80f: 50 push %eax 10b810: e8 2b 0a 00 00 call 10c240 <_CORE_mutex_Surrender> 10b815: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b817: e8 a8 20 00 00 call 10d8c4 <_Thread_Enable_dispatch> return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 10b81c: 89 1c 24 mov %ebx,(%esp) 10b81f: e8 08 00 00 00 call 10b82c <_Semaphore_Translate_core_mutex_return_code> 10b824: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b827: 8b 5d fc mov -0x4(%ebp),%ebx 10b82a: c9 leave 10b82b: c3 ret =============================================================================== 00117d60 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 117d60: 55 push %ebp 117d61: 89 e5 mov %esp,%ebp 117d63: 53 push %ebx 117d64: 83 ec 14 sub $0x14,%esp 117d67: 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 ) 117d6a: 85 db test %ebx,%ebx 117d6c: 75 0a jne 117d78 return RTEMS_INVALID_NUMBER; 117d6e: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117d73: 8b 5d fc mov -0x4(%ebp),%ebx 117d76: c9 leave 117d77: c3 ret ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 117d78: 83 ec 08 sub $0x8,%esp 117d7b: 8d 45 f4 lea -0xc(%ebp),%eax 117d7e: 50 push %eax 117d7f: ff 75 08 pushl 0x8(%ebp) 117d82: e8 a1 3f 00 00 call 11bd28 <_Thread_Get> switch ( location ) { 117d87: 83 c4 10 add $0x10,%esp 117d8a: 8b 55 f4 mov -0xc(%ebp),%edx 117d8d: 85 d2 test %edx,%edx 117d8f: 74 0b je 117d9c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 117d91: b8 04 00 00 00 mov $0x4,%eax } 117d96: 8b 5d fc mov -0x4(%ebp),%ebx 117d99: c9 leave 117d9a: c3 ret 117d9b: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 117d9c: 8b 90 e4 00 00 00 mov 0xe4(%eax),%edx asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 117da2: 8b 4a 0c mov 0xc(%edx),%ecx 117da5: 85 c9 test %ecx,%ecx 117da7: 74 3f je 117de8 if ( asr->is_enabled ) { 117da9: 80 7a 08 00 cmpb $0x0,0x8(%edx) 117dad: 74 25 je 117dd4 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 117daf: 9c pushf 117db0: fa cli 117db1: 59 pop %ecx *signal_set |= signals; 117db2: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 117db5: 51 push %ecx 117db6: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 117db7: 8b 15 94 0b 14 00 mov 0x140b94,%edx 117dbd: 85 d2 test %edx,%edx 117dbf: 74 1b je 117ddc 117dc1: 3b 05 98 0b 14 00 cmp 0x140b98,%eax 117dc7: 75 13 jne 117ddc <== NEVER TAKEN _Thread_Dispatch_necessary = true; 117dc9: c6 05 a4 0b 14 00 01 movb $0x1,0x140ba4 117dd0: eb 0a jmp 117ddc 117dd2: 66 90 xchg %ax,%ax rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 117dd4: 9c pushf 117dd5: fa cli 117dd6: 58 pop %eax *signal_set |= signals; 117dd7: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 117dda: 50 push %eax 117ddb: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 117ddc: e8 23 3f 00 00 call 11bd04 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 117de1: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117de3: 8b 5d fc mov -0x4(%ebp),%ebx 117de6: c9 leave 117de7: c3 ret _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 117de8: e8 17 3f 00 00 call 11bd04 <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 117ded: b8 0b 00 00 00 mov $0xb,%eax 117df2: e9 7c ff ff ff jmp 117d73 =============================================================================== 0010b84c : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { 10b84c: 55 push %ebp 10b84d: 89 e5 mov %esp,%ebp 10b84f: 57 push %edi 10b850: 56 push %esi 10b851: 53 push %ebx 10b852: 83 ec 1c sub $0x1c,%esp 10b855: 8b 5d 08 mov 0x8(%ebp),%ebx 10b858: 8b 7d 0c mov 0xc(%ebp),%edi 10b85b: 8b 75 1c mov 0x1c(%ebp),%esi Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10b85e: 85 f6 test %esi,%esi 10b860: 0f 84 3e 01 00 00 je 10b9a4 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10b866: 85 db test %ebx,%ebx 10b868: 0f 84 d2 00 00 00 je 10b940 /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 10b86e: f7 45 18 00 80 00 00 testl $0x8000,0x18(%ebp) 10b875: 75 17 jne 10b88e */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10b877: 85 ff test %edi,%edi 10b879: 0f 84 b1 00 00 00 je 10b930 ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 10b87f: 0f b6 05 54 22 12 00 movzbl 0x122254,%eax */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10b886: 39 c7 cmp %eax,%edi 10b888: 0f 87 a2 00 00 00 ja 10b930 */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10b88e: 83 ec 0c sub $0xc,%esp 10b891: ff 35 80 65 12 00 pushl 0x126580 10b897: e8 78 06 00 00 call 10bf14 <_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 ); 10b89c: c7 04 24 60 64 12 00 movl $0x126460,(%esp) 10b8a3: e8 08 10 00 00 call 10c8b0 <_Objects_Allocate> 10b8a8: 89 c2 mov %eax,%edx * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 10b8aa: 83 c4 10 add $0x10,%esp 10b8ad: 85 c0 test %eax,%eax 10b8af: 0f 84 cf 00 00 00 je 10b984 /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 10b8b5: 50 push %eax 10b8b6: 53 push %ebx */ RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level ( Modes_Control mode_set ) { return ( mode_set & RTEMS_INTERRUPT_MASK ); 10b8b7: 8b 45 14 mov 0x14(%ebp),%eax 10b8ba: 83 e0 01 and $0x1,%eax 10b8bd: 50 push %eax 10b8be: 6a 00 push $0x0 10b8c0: 31 c0 xor %eax,%eax 10b8c2: f7 45 14 00 02 00 00 testl $0x200,0x14(%ebp) 10b8c9: 0f 95 c0 setne %al 10b8cc: 50 push %eax 10b8cd: 31 c0 xor %eax,%eax 10b8cf: f7 45 14 00 01 00 00 testl $0x100,0x14(%ebp) 10b8d6: 0f 94 c0 sete %al 10b8d9: 50 push %eax 10b8da: 57 push %edi */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_floating_point( rtems_attribute attribute_set ) { return ( attribute_set & RTEMS_FLOATING_POINT ) ? true : false; 10b8db: 8b 45 18 mov 0x18(%ebp),%eax 10b8de: 83 e0 01 and $0x1,%eax 10b8e1: 50 push %eax 10b8e2: ff 75 10 pushl 0x10(%ebp) 10b8e5: 6a 00 push $0x0 10b8e7: 52 push %edx 10b8e8: 68 60 64 12 00 push $0x126460 10b8ed: 89 55 e4 mov %edx,-0x1c(%ebp) 10b8f0: e8 6b 20 00 00 call 10d960 <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 10b8f5: 83 c4 30 add $0x30,%esp 10b8f8: 84 c0 test %al,%al 10b8fa: 8b 55 e4 mov -0x1c(%ebp),%edx 10b8fd: 74 51 je 10b950 _RTEMS_Unlock_allocator(); return RTEMS_UNSATISFIED; } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 10b8ff: 8b 82 e4 00 00 00 mov 0xe4(%edx),%eax * id - thread id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_task_create( 10b905: 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; 10b90c: 0f 94 40 08 sete 0x8(%eax) *id = the_thread->Object.id; 10b910: 8b 42 08 mov 0x8(%edx),%eax 10b913: 89 06 mov %eax,(%esi) ); } #endif _RTEMS_Unlock_allocator(); 10b915: 83 ec 0c sub $0xc,%esp 10b918: ff 35 80 65 12 00 pushl 0x126580 10b91e: e8 39 06 00 00 call 10bf5c <_API_Mutex_Unlock> return RTEMS_SUCCESSFUL; 10b923: 83 c4 10 add $0x10,%esp 10b926: 31 c0 xor %eax,%eax } 10b928: 8d 65 f4 lea -0xc(%ebp),%esp 10b92b: 5b pop %ebx 10b92c: 5e pop %esi 10b92d: 5f pop %edi 10b92e: c9 leave 10b92f: 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; 10b930: b8 13 00 00 00 mov $0x13,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b935: 8d 65 f4 lea -0xc(%ebp),%esp 10b938: 5b pop %ebx 10b939: 5e pop %esi 10b93a: 5f pop %edi 10b93b: c9 leave 10b93c: c3 ret 10b93d: 8d 76 00 lea 0x0(%esi),%esi if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10b940: b8 03 00 00 00 mov $0x3,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b945: 8d 65 f4 lea -0xc(%ebp),%esp 10b948: 5b pop %ebx 10b949: 5e pop %esi 10b94a: 5f pop %edi 10b94b: c9 leave 10b94c: c3 ret 10b94d: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 10b950: 83 ec 0c sub $0xc,%esp 10b953: ff 72 08 pushl 0x8(%edx) 10b956: e8 39 13 00 00 call 10cc94 <_Objects_Get_information_id> 10b95b: 5a pop %edx 10b95c: 59 pop %ecx 10b95d: 8b 55 e4 mov -0x1c(%ebp),%edx 10b960: 52 push %edx 10b961: 50 push %eax 10b962: e8 bd 12 00 00 call 10cc24 <_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(); 10b967: 58 pop %eax 10b968: ff 35 80 65 12 00 pushl 0x126580 10b96e: e8 e9 05 00 00 call 10bf5c <_API_Mutex_Unlock> return RTEMS_UNSATISFIED; 10b973: 83 c4 10 add $0x10,%esp 10b976: b8 0d 00 00 00 mov $0xd,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b97b: 8d 65 f4 lea -0xc(%ebp),%esp 10b97e: 5b pop %ebx 10b97f: 5e pop %esi 10b980: 5f pop %edi 10b981: c9 leave 10b982: c3 ret 10b983: 90 nop */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10b984: 83 ec 0c sub $0xc,%esp 10b987: ff 35 80 65 12 00 pushl 0x126580 10b98d: e8 ca 05 00 00 call 10bf5c <_API_Mutex_Unlock> return RTEMS_TOO_MANY; 10b992: 83 c4 10 add $0x10,%esp 10b995: b8 05 00 00 00 mov $0x5,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b99a: 8d 65 f4 lea -0xc(%ebp),%esp 10b99d: 5b pop %ebx 10b99e: 5e pop %esi 10b99f: 5f pop %edi 10b9a0: c9 leave 10b9a1: c3 ret 10b9a2: 66 90 xchg %ax,%ax RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) return RTEMS_INVALID_ADDRESS; 10b9a4: b8 09 00 00 00 mov $0x9,%eax 10b9a9: eb 8a jmp 10b935 =============================================================================== 0010b9ac : */ rtems_status_code rtems_task_delete( rtems_id id ) { 10b9ac: 55 push %ebp 10b9ad: 89 e5 mov %esp,%ebp 10b9af: 53 push %ebx 10b9b0: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 10b9b3: ff 35 80 65 12 00 pushl 0x126580 10b9b9: e8 56 05 00 00 call 10bf14 <_API_Mutex_Lock> the_thread = _Thread_Get( id, &location ); 10b9be: 5a pop %edx 10b9bf: 59 pop %ecx 10b9c0: 8d 45 f4 lea -0xc(%ebp),%eax 10b9c3: 50 push %eax 10b9c4: ff 75 08 pushl 0x8(%ebp) 10b9c7: e8 1c 1f 00 00 call 10d8e8 <_Thread_Get> 10b9cc: 89 c3 mov %eax,%ebx switch ( location ) { 10b9ce: 83 c4 10 add $0x10,%esp 10b9d1: 8b 45 f4 mov -0xc(%ebp),%eax 10b9d4: 85 c0 test %eax,%eax 10b9d6: 75 44 jne 10ba1c case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 10b9d8: 83 ec 0c sub $0xc,%esp 10b9db: ff 73 08 pushl 0x8(%ebx) 10b9de: e8 b1 12 00 00 call 10cc94 <_Objects_Get_information_id> 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 10b9e3: 5a pop %edx 10b9e4: 59 pop %ecx 10b9e5: 53 push %ebx 10b9e6: 50 push %eax 10b9e7: e8 b0 1b 00 00 call 10d59c <_Thread_Close> 10b9ec: 58 pop %eax 10b9ed: ff 73 08 pushl 0x8(%ebx) 10b9f0: e8 9f 12 00 00 call 10cc94 <_Objects_Get_information_id> 10b9f5: 5a pop %edx 10b9f6: 59 pop %ecx 10b9f7: 53 push %ebx 10b9f8: 50 push %eax 10b9f9: e8 26 12 00 00 call 10cc24 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10b9fe: 58 pop %eax 10b9ff: ff 35 80 65 12 00 pushl 0x126580 10ba05: e8 52 05 00 00 call 10bf5c <_API_Mutex_Unlock> _Thread_Enable_dispatch(); 10ba0a: e8 b5 1e 00 00 call 10d8c4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ba0f: 83 c4 10 add $0x10,%esp 10ba12: 31 c0 xor %eax,%eax break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } 10ba14: 8b 5d fc mov -0x4(%ebp),%ebx 10ba17: c9 leave 10ba18: c3 ret 10ba19: 8d 76 00 lea 0x0(%esi),%esi case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 10ba1c: 83 ec 0c sub $0xc,%esp 10ba1f: ff 35 80 65 12 00 pushl 0x126580 10ba25: e8 32 05 00 00 call 10bf5c <_API_Mutex_Unlock> return RTEMS_INVALID_ID; 10ba2a: 83 c4 10 add $0x10,%esp 10ba2d: b8 04 00 00 00 mov $0x4,%eax } 10ba32: 8b 5d fc mov -0x4(%ebp),%ebx 10ba35: c9 leave 10ba36: c3 ret =============================================================================== 0010d4e4 : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 10d4e4: 55 push %ebp 10d4e5: 89 e5 mov %esp,%ebp 10d4e7: 56 push %esi 10d4e8: 53 push %ebx 10d4e9: 83 ec 10 sub $0x10,%esp 10d4ec: 8b 45 08 mov 0x8(%ebp),%eax 10d4ef: 8b 75 0c mov 0xc(%ebp),%esi 10d4f2: 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() ) 10d4f5: 80 3d 84 62 12 00 00 cmpb $0x0,0x126284 10d4fc: 74 6e je 10d56c return RTEMS_NOT_CONFIGURED; if ( !note ) 10d4fe: 85 db test %ebx,%ebx 10d500: 74 7e je 10d580 /* * 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 ) 10d502: 83 fe 0f cmp $0xf,%esi 10d505: 77 3d ja 10d544 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d507: 85 c0 test %eax,%eax 10d509: 74 45 je 10d550 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d50b: 8b 15 f8 aa 12 00 mov 0x12aaf8,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d511: 3b 42 08 cmp 0x8(%edx),%eax 10d514: 74 40 je 10d556 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d516: 83 ec 08 sub $0x8,%esp 10d519: 8d 55 f4 lea -0xc(%ebp),%edx 10d51c: 52 push %edx 10d51d: 50 push %eax 10d51e: e8 0d 22 00 00 call 10f730 <_Thread_Get> switch ( location ) { 10d523: 83 c4 10 add $0x10,%esp 10d526: 8b 55 f4 mov -0xc(%ebp),%edx 10d529: 85 d2 test %edx,%edx 10d52b: 75 4b jne 10d578 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d52d: 8b 80 e4 00 00 00 mov 0xe4(%eax),%eax 10d533: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d537: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10d539: e8 ce 21 00 00 call 10f70c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d53e: 31 c0 xor %eax,%eax 10d540: eb 07 jmp 10d549 10d542: 66 90 xchg %ax,%ax * 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; 10d544: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d549: 8d 65 f8 lea -0x8(%ebp),%esp 10d54c: 5b pop %ebx 10d54d: 5e pop %esi 10d54e: c9 leave 10d54f: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d550: 8b 15 f8 aa 12 00 mov 0x12aaf8,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d556: 8b 82 e4 00 00 00 mov 0xe4(%edx),%eax 10d55c: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d560: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 10d562: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d564: 8d 65 f8 lea -0x8(%ebp),%esp 10d567: 5b pop %ebx 10d568: 5e pop %esi 10d569: c9 leave 10d56a: c3 ret 10d56b: 90 nop register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; 10d56c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d571: 8d 65 f8 lea -0x8(%ebp),%esp 10d574: 5b pop %ebx 10d575: 5e pop %esi 10d576: c9 leave 10d577: c3 ret case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d578: b8 04 00 00 00 mov $0x4,%eax 10d57d: eb ca jmp 10d549 10d57f: 90 nop if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; if ( !note ) return RTEMS_INVALID_ADDRESS; 10d580: b8 09 00 00 00 mov $0x9,%eax 10d585: eb c2 jmp 10d549 =============================================================================== 00118144 : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { 118144: 55 push %ebp 118145: 89 e5 mov %esp,%ebp 118147: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 11814a: 8d 45 f4 lea -0xc(%ebp),%eax 11814d: 50 push %eax 11814e: ff 75 08 pushl 0x8(%ebp) 118151: e8 d2 3b 00 00 call 11bd28 <_Thread_Get> switch ( location ) { 118156: 83 c4 10 add $0x10,%esp 118159: 8b 55 f4 mov -0xc(%ebp),%edx 11815c: 85 d2 test %edx,%edx 11815e: 74 08 je 118168 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118160: b8 04 00 00 00 mov $0x4,%eax } 118165: c9 leave 118166: c3 ret 118167: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 118168: f6 40 10 02 testb $0x2,0x10(%eax) 11816c: 74 0e je 11817c _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 11816e: e8 91 3b 00 00 call 11bd04 <_Thread_Enable_dispatch> return RTEMS_ALREADY_SUSPENDED; 118173: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118178: c9 leave 118179: c3 ret 11817a: 66 90 xchg %ax,%ax the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Enable_dispatch(); 11817c: e8 83 3b 00 00 call 11bd04 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118181: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118183: c9 leave 118184: c3 ret =============================================================================== 00111e6c : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 111e6c: 55 push %ebp 111e6d: 89 e5 mov %esp,%ebp 111e6f: 57 push %edi 111e70: 56 push %esi 111e71: 53 push %ebx 111e72: 83 ec 1c sub $0x1c,%esp 111e75: 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 ) 111e78: 85 c9 test %ecx,%ecx 111e7a: 0f 84 40 01 00 00 je 111fc0 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 111e80: 8b 1d 58 67 12 00 mov 0x126758,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 111e86: 8b bb e4 00 00 00 mov 0xe4(%ebx),%edi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 111e8c: 80 7b 74 01 cmpb $0x1,0x74(%ebx) 111e90: 19 f6 sbb %esi,%esi 111e92: 81 e6 00 01 00 00 and $0x100,%esi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 111e98: 8b 53 7c mov 0x7c(%ebx),%edx 111e9b: 85 d2 test %edx,%edx 111e9d: 0f 85 f1 00 00 00 jne 111f94 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 111ea3: 80 7f 08 01 cmpb $0x1,0x8(%edi) 111ea7: 19 d2 sbb %edx,%edx 111ea9: 81 e2 00 04 00 00 and $0x400,%edx old_mode |= _ISR_Get_level(); 111eaf: 89 55 e4 mov %edx,-0x1c(%ebp) 111eb2: 89 4d e0 mov %ecx,-0x20(%ebp) 111eb5: e8 82 cd ff ff call 10ec3c <_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; 111eba: 8b 55 e4 mov -0x1c(%ebp),%edx 111ebd: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); 111ebf: 09 f0 or %esi,%eax 111ec1: 8b 4d e0 mov -0x20(%ebp),%ecx 111ec4: 89 01 mov %eax,(%ecx) *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 111ec6: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 111ecd: 74 0b je 111eda executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 111ecf: f7 45 08 00 01 00 00 testl $0x100,0x8(%ebp) 111ed6: 0f 94 43 74 sete 0x74(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 111eda: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 111ee1: 74 1c je 111eff if ( _Modes_Is_timeslice(mode_set) ) { 111ee3: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 111eea: 0f 84 b8 00 00 00 je 111fa8 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 111ef0: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 111ef7: a1 a0 64 12 00 mov 0x1264a0,%eax 111efc: 89 43 78 mov %eax,0x78(%ebx) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 111eff: f6 45 0c 01 testb $0x1,0xc(%ebp) 111f03: 74 0b je 111f10 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 111f05: f6 45 08 01 testb $0x1,0x8(%ebp) 111f09: 0f 84 91 00 00 00 je 111fa0 111f0f: fa cli * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 111f10: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 111f17: 74 3f je 111f58 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 111f19: f7 45 08 00 04 00 00 testl $0x400,0x8(%ebp) 111f20: 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 ) { 111f23: 38 47 08 cmp %al,0x8(%edi) 111f26: 74 30 je 111f58 asr->is_enabled = is_asr_enabled; 111f28: 88 47 08 mov %al,0x8(%edi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 111f2b: 9c pushf 111f2c: fa cli 111f2d: 58 pop %eax _signals = information->signals_pending; 111f2e: 8b 57 18 mov 0x18(%edi),%edx information->signals_pending = information->signals_posted; 111f31: 8b 4f 14 mov 0x14(%edi),%ecx 111f34: 89 4f 18 mov %ecx,0x18(%edi) information->signals_posted = _signals; 111f37: 89 57 14 mov %edx,0x14(%edi) _ISR_Enable( _level ); 111f3a: 50 push %eax 111f3b: 9d popf /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 111f3c: 8b 47 14 mov 0x14(%edi),%eax 111f3f: 85 c0 test %eax,%eax 111f41: 0f 95 c0 setne %al needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 111f44: 83 3d 60 66 12 00 03 cmpl $0x3,0x126660 111f4b: 74 16 je 111f63 <== ALWAYS TAKEN if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; 111f4d: 31 c0 xor %eax,%eax } 111f4f: 83 c4 1c add $0x1c,%esp 111f52: 5b pop %ebx 111f53: 5e pop %esi 111f54: 5f pop %edi 111f55: c9 leave 111f56: c3 ret 111f57: 90 nop /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 111f58: 31 c0 xor %eax,%eax needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 111f5a: 83 3d 60 66 12 00 03 cmpl $0x3,0x126660 111f61: 75 ea jne 111f4d <== NEVER TAKEN bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; 111f63: 8b 15 58 67 12 00 mov 0x126758,%edx if ( are_signals_pending || 111f69: 84 c0 test %al,%al 111f6b: 75 0e jne 111f7b 111f6d: 3b 15 5c 67 12 00 cmp 0x12675c,%edx 111f73: 74 d8 je 111f4d (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { 111f75: 80 7a 74 00 cmpb $0x0,0x74(%edx) 111f79: 74 d2 je 111f4d <== NEVER TAKEN _Thread_Dispatch_necessary = true; 111f7b: c6 05 64 67 12 00 01 movb $0x1,0x126764 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); 111f82: e8 c5 b7 ff ff call 10d74c <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; 111f87: 31 c0 xor %eax,%eax } 111f89: 83 c4 1c add $0x1c,%esp 111f8c: 5b pop %ebx 111f8d: 5e pop %esi 111f8e: 5f pop %edi 111f8f: c9 leave 111f90: c3 ret 111f91: 8d 76 00 lea 0x0(%esi),%esi 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; 111f94: 81 ce 00 02 00 00 or $0x200,%esi 111f9a: e9 04 ff ff ff jmp 111ea3 111f9f: 90 nop 111fa0: fb sti 111fa1: e9 6a ff ff ff jmp 111f10 111fa6: 66 90 xchg %ax,%ax 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; 111fa8: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 111faf: f6 45 0c 01 testb $0x1,0xc(%ebp) 111fb3: 0f 84 57 ff ff ff je 111f10 111fb9: e9 47 ff ff ff jmp 111f05 111fbe: 66 90 xchg %ax,%ax bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; 111fc0: b8 09 00 00 00 mov $0x9,%eax if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; } 111fc5: 83 c4 1c add $0x1c,%esp 111fc8: 5b pop %ebx 111fc9: 5e pop %esi 111fca: 5f pop %edi 111fcb: c9 leave 111fcc: c3 ret =============================================================================== 0010ecdc : */ rtems_status_code rtems_task_resume( rtems_id id ) { 10ecdc: 55 push %ebp 10ecdd: 89 e5 mov %esp,%ebp 10ecdf: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10ece2: 8d 45 f4 lea -0xc(%ebp),%eax 10ece5: 50 push %eax 10ece6: ff 75 08 pushl 0x8(%ebp) 10ece9: e8 32 1f 00 00 call 110c20 <_Thread_Get> switch ( location ) { 10ecee: 83 c4 10 add $0x10,%esp 10ecf1: 8b 55 f4 mov -0xc(%ebp),%edx 10ecf4: 85 d2 test %edx,%edx 10ecf6: 74 08 je 10ed00 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10ecf8: b8 04 00 00 00 mov $0x4,%eax } 10ecfd: c9 leave 10ecfe: c3 ret 10ecff: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 10ed00: f6 40 10 02 testb $0x2,0x10(%eax) 10ed04: 75 0e jne 10ed14 _Thread_Resume( the_thread, true ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10ed06: e8 f1 1e 00 00 call 110bfc <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10ed0b: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ed10: c9 leave 10ed11: c3 ret 10ed12: 66 90 xchg %ax,%ax the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { _Thread_Resume( the_thread, true ); 10ed14: 83 ec 08 sub $0x8,%esp 10ed17: 6a 01 push $0x1 10ed19: 50 push %eax 10ed1a: e8 b9 26 00 00 call 1113d8 <_Thread_Resume> _Thread_Enable_dispatch(); 10ed1f: e8 d8 1e 00 00 call 110bfc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ed24: 83 c4 10 add $0x10,%esp 10ed27: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ed29: c9 leave 10ed2a: c3 ret =============================================================================== 0010d65c : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 10d65c: 55 push %ebp 10d65d: 89 e5 mov %esp,%ebp 10d65f: 56 push %esi 10d660: 53 push %ebx 10d661: 83 ec 10 sub $0x10,%esp 10d664: 8b 45 08 mov 0x8(%ebp),%eax 10d667: 8b 5d 0c mov 0xc(%ebp),%ebx 10d66a: 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() ) 10d66d: 80 3d 84 62 12 00 00 cmpb $0x0,0x126284 10d674: 74 66 je 10d6dc /* * 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 ) 10d676: 83 fb 0f cmp $0xf,%ebx 10d679: 77 39 ja 10d6b4 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d67b: 85 c0 test %eax,%eax 10d67d: 74 41 je 10d6c0 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d67f: 8b 15 f8 aa 12 00 mov 0x12aaf8,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d685: 3b 42 08 cmp 0x8(%edx),%eax 10d688: 74 3c je 10d6c6 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d68a: 83 ec 08 sub $0x8,%esp 10d68d: 8d 55 f4 lea -0xc(%ebp),%edx 10d690: 52 push %edx 10d691: 50 push %eax 10d692: e8 99 20 00 00 call 10f730 <_Thread_Get> switch ( location ) { 10d697: 83 c4 10 add $0x10,%esp 10d69a: 8b 55 f4 mov -0xc(%ebp),%edx 10d69d: 85 d2 test %edx,%edx 10d69f: 75 47 jne 10d6e8 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d6a1: 8b 80 e4 00 00 00 mov 0xe4(%eax),%eax 10d6a7: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) _Thread_Enable_dispatch(); 10d6ab: e8 5c 20 00 00 call 10f70c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d6b0: 31 c0 xor %eax,%eax 10d6b2: eb 05 jmp 10d6b9 * 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; 10d6b4: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d6b9: 8d 65 f8 lea -0x8(%ebp),%esp 10d6bc: 5b pop %ebx 10d6bd: 5e pop %esi 10d6be: c9 leave 10d6bf: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d6c0: 8b 15 f8 aa 12 00 mov 0x12aaf8,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d6c6: 8b 82 e4 00 00 00 mov 0xe4(%edx),%eax 10d6cc: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) return RTEMS_SUCCESSFUL; 10d6d0: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d6d2: 8d 65 f8 lea -0x8(%ebp),%esp 10d6d5: 5b pop %ebx 10d6d6: 5e pop %esi 10d6d7: c9 leave 10d6d8: c3 ret 10d6d9: 8d 76 00 lea 0x0(%esi),%esi register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; 10d6dc: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d6e1: 8d 65 f8 lea -0x8(%ebp),%esp 10d6e4: 5b pop %ebx 10d6e5: 5e pop %esi 10d6e6: c9 leave 10d6e7: c3 ret case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d6e8: b8 04 00 00 00 mov $0x4,%eax } 10d6ed: 8d 65 f8 lea -0x8(%ebp),%esp 10d6f0: 5b pop %ebx 10d6f1: 5e pop %esi 10d6f2: c9 leave 10d6f3: c3 ret =============================================================================== 0010f9a0 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10f9a0: 55 push %ebp 10f9a1: 89 e5 mov %esp,%ebp 10f9a3: 56 push %esi 10f9a4: 53 push %ebx 10f9a5: 83 ec 10 sub $0x10,%esp 10f9a8: 8b 5d 0c mov 0xc(%ebp),%ebx 10f9ab: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10f9ae: 85 db test %ebx,%ebx 10f9b0: 74 0b je 10f9bd 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 ) ); 10f9b2: 0f b6 05 54 62 12 00 movzbl 0x126254,%eax */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10f9b9: 39 c3 cmp %eax,%ebx 10f9bb: 77 5f ja 10fa1c !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10f9bd: 85 f6 test %esi,%esi 10f9bf: 74 67 je 10fa28 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10f9c1: 83 ec 08 sub $0x8,%esp 10f9c4: 8d 45 f4 lea -0xc(%ebp),%eax 10f9c7: 50 push %eax 10f9c8: ff 75 08 pushl 0x8(%ebp) 10f9cb: e8 90 20 00 00 call 111a60 <_Thread_Get> switch ( location ) { 10f9d0: 83 c4 10 add $0x10,%esp 10f9d3: 8b 55 f4 mov -0xc(%ebp),%edx 10f9d6: 85 d2 test %edx,%edx 10f9d8: 75 36 jne 10fa10 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10f9da: 8b 50 14 mov 0x14(%eax),%edx 10f9dd: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10f9df: 85 db test %ebx,%ebx 10f9e1: 74 1c je 10f9ff the_thread->real_priority = new_priority; 10f9e3: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10f9e6: 8b 48 1c mov 0x1c(%eax),%ecx 10f9e9: 85 c9 test %ecx,%ecx 10f9eb: 74 05 je 10f9f2 10f9ed: 3b 58 14 cmp 0x14(%eax),%ebx 10f9f0: 73 0d jae 10f9ff <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); 10f9f2: 52 push %edx 10f9f3: 6a 00 push $0x0 10f9f5: 53 push %ebx 10f9f6: 50 push %eax 10f9f7: e8 08 1c 00 00 call 111604 <_Thread_Change_priority> 10f9fc: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10f9ff: e8 38 20 00 00 call 111a3c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10fa04: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fa06: 8d 65 f8 lea -0x8(%ebp),%esp 10fa09: 5b pop %ebx 10fa0a: 5e pop %esi 10fa0b: c9 leave 10fa0c: c3 ret 10fa0d: 8d 76 00 lea 0x0(%esi),%esi case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10fa10: b8 04 00 00 00 mov $0x4,%eax } 10fa15: 8d 65 f8 lea -0x8(%ebp),%esp 10fa18: 5b pop %ebx 10fa19: 5e pop %esi 10fa1a: c9 leave 10fa1b: 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; 10fa1c: b8 13 00 00 00 mov $0x13,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fa21: 8d 65 f8 lea -0x8(%ebp),%esp 10fa24: 5b pop %ebx 10fa25: 5e pop %esi 10fa26: c9 leave 10fa27: 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; 10fa28: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fa2d: 8d 65 f8 lea -0x8(%ebp),%esp 10fa30: 5b pop %ebx 10fa31: 5e pop %esi 10fa32: c9 leave 10fa33: c3 ret =============================================================================== 0010baf4 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 10baf4: 55 push %ebp 10baf5: 89 e5 mov %esp,%ebp 10baf7: 53 push %ebx 10baf8: 83 ec 14 sub $0x14,%esp 10bafb: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10bafe: 85 db test %ebx,%ebx 10bb00: 74 4e je 10bb50 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10bb02: 83 ec 08 sub $0x8,%esp 10bb05: 8d 45 f4 lea -0xc(%ebp),%eax 10bb08: 50 push %eax 10bb09: ff 75 08 pushl 0x8(%ebp) 10bb0c: e8 d7 1d 00 00 call 10d8e8 <_Thread_Get> switch ( location ) { 10bb11: 83 c4 10 add $0x10,%esp 10bb14: 8b 55 f4 mov -0xc(%ebp),%edx 10bb17: 85 d2 test %edx,%edx 10bb19: 75 29 jne 10bb44 case OBJECTS_LOCAL: if ( _Thread_Start( 10bb1b: 83 ec 0c sub $0xc,%esp 10bb1e: ff 75 10 pushl 0x10(%ebp) 10bb21: 6a 00 push $0x0 10bb23: 53 push %ebx 10bb24: 6a 00 push $0x0 10bb26: 50 push %eax 10bb27: e8 e8 26 00 00 call 10e214 <_Thread_Start> 10bb2c: 83 c4 20 add $0x20,%esp 10bb2f: 84 c0 test %al,%al 10bb31: 75 29 jne 10bb5c the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10bb33: e8 8c 1d 00 00 call 10d8c4 <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10bb38: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bb3d: 8b 5d fc mov -0x4(%ebp),%ebx 10bb40: c9 leave 10bb41: c3 ret 10bb42: 66 90 xchg %ax,%ax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10bb44: b8 04 00 00 00 mov $0x4,%eax } 10bb49: 8b 5d fc mov -0x4(%ebp),%ebx 10bb4c: c9 leave 10bb4d: c3 ret 10bb4e: 66 90 xchg %ax,%ax { register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; 10bb50: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bb55: 8b 5d fc mov -0x4(%ebp),%ebx 10bb58: c9 leave 10bb59: c3 ret 10bb5a: 66 90 xchg %ax,%ax switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Start( the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); 10bb5c: e8 63 1d 00 00 call 10d8c4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10bb61: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bb63: 8b 5d fc mov -0x4(%ebp),%ebx 10bb66: c9 leave 10bb67: c3 ret =============================================================================== 00110454 : */ rtems_status_code rtems_task_suspend( rtems_id id ) { 110454: 55 push %ebp 110455: 89 e5 mov %esp,%ebp 110457: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 11045a: 8d 45 f4 lea -0xc(%ebp),%eax 11045d: 50 push %eax 11045e: ff 75 08 pushl 0x8(%ebp) 110461: e8 82 d4 ff ff call 10d8e8 <_Thread_Get> switch ( location ) { 110466: 83 c4 10 add $0x10,%esp 110469: 8b 55 f4 mov -0xc(%ebp),%edx 11046c: 85 d2 test %edx,%edx 11046e: 74 08 je 110478 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 110470: b8 04 00 00 00 mov $0x4,%eax } 110475: c9 leave 110476: c3 ret 110477: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 110478: f6 40 10 02 testb $0x2,0x10(%eax) 11047c: 74 0e je 11048c _Thread_Suspend( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 11047e: e8 41 d4 ff ff call 10d8c4 <_Thread_Enable_dispatch> return RTEMS_ALREADY_SUSPENDED; 110483: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110488: c9 leave 110489: c3 ret 11048a: 66 90 xchg %ax,%ax the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Suspend( the_thread ); 11048c: 83 ec 0c sub $0xc,%esp 11048f: 50 push %eax 110490: e8 83 08 00 00 call 110d18 <_Thread_Suspend> _Thread_Enable_dispatch(); 110495: e8 2a d4 ff ff call 10d8c4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11049a: 83 c4 10 add $0x10,%esp 11049d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11049f: c9 leave 1104a0: c3 ret =============================================================================== 0010c650 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 10c650: 55 push %ebp 10c651: 89 e5 mov %esp,%ebp 10c653: 57 push %edi 10c654: 56 push %esi 10c655: 53 push %ebx 10c656: 83 ec 1c sub $0x1c,%esp 10c659: 8b 5d 0c mov 0xc(%ebp),%ebx 10c65c: 8b 7d 10 mov 0x10(%ebp),%edi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 10c65f: 85 db test %ebx,%ebx 10c661: 0f 84 9d 00 00 00 je 10c704 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10c667: 83 ec 08 sub $0x8,%esp 10c66a: 8d 45 e4 lea -0x1c(%ebp),%eax 10c66d: 50 push %eax 10c66e: ff 75 08 pushl 0x8(%ebp) 10c671: e8 82 1f 00 00 call 10e5f8 <_Thread_Get> 10c676: 89 c6 mov %eax,%esi switch (location) { 10c678: 83 c4 10 add $0x10,%esp 10c67b: 8b 45 e4 mov -0x1c(%ebp),%eax 10c67e: 85 c0 test %eax,%eax 10c680: 74 0e je 10c690 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c682: b8 04 00 00 00 mov $0x4,%eax } 10c687: 8d 65 f4 lea -0xc(%ebp),%esp 10c68a: 5b pop %ebx 10c68b: 5e pop %esi 10c68c: 5f pop %edi 10c68d: c9 leave 10c68e: c3 ret 10c68f: 90 nop case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 10c690: 8b 86 f0 00 00 00 mov 0xf0(%esi),%eax while (tvp) { 10c696: 85 c0 test %eax,%eax 10c698: 75 44 jne 10c6de 10c69a: 66 90 xchg %ax,%ax /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); 10c69c: 83 ec 0c sub $0xc,%esp 10c69f: 6a 14 push $0x14 10c6a1: e8 a2 2e 00 00 call 10f548 <_Workspace_Allocate> if (new == NULL) { 10c6a6: 83 c4 10 add $0x10,%esp 10c6a9: 85 c0 test %eax,%eax 10c6ab: 74 4b je 10c6f8 _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 10c6ad: 8b 13 mov (%ebx),%edx 10c6af: 89 50 08 mov %edx,0x8(%eax) new->ptr = ptr; 10c6b2: 89 58 04 mov %ebx,0x4(%eax) new->dtor = dtor; 10c6b5: 89 78 10 mov %edi,0x10(%eax) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 10c6b8: 8b 96 f0 00 00 00 mov 0xf0(%esi),%edx 10c6be: 89 10 mov %edx,(%eax) the_thread->task_variables = new; 10c6c0: 89 86 f0 00 00 00 mov %eax,0xf0(%esi) _Thread_Enable_dispatch(); 10c6c6: e8 09 1f 00 00 call 10e5d4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c6cb: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c6cd: 8d 65 f4 lea -0xc(%ebp),%esp 10c6d0: 5b pop %ebx 10c6d1: 5e pop %esi 10c6d2: 5f pop %edi 10c6d3: c9 leave 10c6d4: c3 ret 10c6d5: 8d 76 00 lea 0x0(%esi),%esi if (tvp->ptr == ptr) { tvp->dtor = dtor; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 10c6d8: 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) { 10c6da: 85 c0 test %eax,%eax 10c6dc: 74 be je 10c69c if (tvp->ptr == ptr) { 10c6de: 39 58 04 cmp %ebx,0x4(%eax) 10c6e1: 75 f5 jne 10c6d8 tvp->dtor = dtor; 10c6e3: 89 78 10 mov %edi,0x10(%eax) _Thread_Enable_dispatch(); 10c6e6: e8 e9 1e 00 00 call 10e5d4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c6eb: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c6ed: 8d 65 f4 lea -0xc(%ebp),%esp 10c6f0: 5b pop %ebx 10c6f1: 5e pop %esi 10c6f2: 5f pop %edi 10c6f3: c9 leave 10c6f4: c3 ret 10c6f5: 8d 76 00 lea 0x0(%esi),%esi * 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(); 10c6f8: e8 d7 1e 00 00 call 10e5d4 <_Thread_Enable_dispatch> return RTEMS_NO_MEMORY; 10c6fd: b8 1a 00 00 00 mov $0x1a,%eax 10c702: eb 83 jmp 10c687 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) return RTEMS_INVALID_ADDRESS; 10c704: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c709: 8d 65 f4 lea -0xc(%ebp),%esp 10c70c: 5b pop %ebx 10c70d: 5e pop %esi 10c70e: 5f pop %edi 10c70f: c9 leave 10c710: c3 ret =============================================================================== 0010c714 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 10c714: 55 push %ebp 10c715: 89 e5 mov %esp,%ebp 10c717: 53 push %ebx 10c718: 83 ec 14 sub $0x14,%esp 10c71b: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 10c71e: 85 db test %ebx,%ebx 10c720: 74 76 je 10c798 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 10c722: 83 ec 08 sub $0x8,%esp 10c725: 8d 45 f4 lea -0xc(%ebp),%eax 10c728: 50 push %eax 10c729: ff 75 08 pushl 0x8(%ebp) 10c72c: e8 c7 1e 00 00 call 10e5f8 <_Thread_Get> switch (location) { 10c731: 83 c4 10 add $0x10,%esp 10c734: 8b 55 f4 mov -0xc(%ebp),%edx 10c737: 85 d2 test %edx,%edx 10c739: 74 0d je 10c748 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c73b: b8 04 00 00 00 mov $0x4,%eax } 10c740: 8b 5d fc mov -0x4(%ebp),%ebx 10c743: c9 leave 10c744: c3 ret 10c745: 8d 76 00 lea 0x0(%esi),%esi the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; 10c748: 8b 88 f0 00 00 00 mov 0xf0(%eax),%ecx while (tvp) { 10c74e: 85 c9 test %ecx,%ecx 10c750: 74 17 je 10c769 if (tvp->ptr == ptr) { 10c752: 39 59 04 cmp %ebx,0x4(%ecx) 10c755: 75 0c jne 10c763 10c757: eb 49 jmp 10c7a2 10c759: 8d 76 00 lea 0x0(%esi),%esi 10c75c: 39 5a 04 cmp %ebx,0x4(%edx) 10c75f: 74 17 je 10c778 10c761: 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; 10c763: 8b 11 mov (%ecx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 10c765: 85 d2 test %edx,%edx 10c767: 75 f3 jne 10c75c <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10c769: e8 66 1e 00 00 call 10e5d4 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 10c76e: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c773: 8b 5d fc mov -0x4(%ebp),%ebx 10c776: c9 leave 10c777: c3 ret case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 10c778: 8b 1a mov (%edx),%ebx 10c77a: 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 ); 10c77c: 83 ec 08 sub $0x8,%esp 10c77f: 52 push %edx 10c780: 50 push %eax 10c781: e8 b2 00 00 00 call 10c838 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 10c786: e8 49 1e 00 00 call 10e5d4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c78b: 83 c4 10 add $0x10,%esp 10c78e: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c790: 8b 5d fc mov -0x4(%ebp),%ebx 10c793: c9 leave 10c794: c3 ret 10c795: 8d 76 00 lea 0x0(%esi),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) return RTEMS_INVALID_ADDRESS; 10c798: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c79d: 8b 5d fc mov -0x4(%ebp),%ebx 10c7a0: c9 leave 10c7a1: 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; 10c7a2: 8b 11 mov (%ecx),%edx 10c7a4: 89 90 f0 00 00 00 mov %edx,0xf0(%eax) 10c7aa: 89 ca mov %ecx,%edx 10c7ac: eb ce jmp 10c77c =============================================================================== 0010c7b0 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 10c7b0: 55 push %ebp 10c7b1: 89 e5 mov %esp,%ebp 10c7b3: 56 push %esi 10c7b4: 53 push %ebx 10c7b5: 83 ec 10 sub $0x10,%esp 10c7b8: 8b 5d 0c mov 0xc(%ebp),%ebx 10c7bb: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 10c7be: 85 db test %ebx,%ebx 10c7c0: 74 56 je 10c818 return RTEMS_INVALID_ADDRESS; if ( !result ) 10c7c2: 85 f6 test %esi,%esi 10c7c4: 74 52 je 10c818 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10c7c6: 83 ec 08 sub $0x8,%esp 10c7c9: 8d 45 f4 lea -0xc(%ebp),%eax 10c7cc: 50 push %eax 10c7cd: ff 75 08 pushl 0x8(%ebp) 10c7d0: e8 23 1e 00 00 call 10e5f8 <_Thread_Get> switch (location) { 10c7d5: 83 c4 10 add $0x10,%esp 10c7d8: 8b 55 f4 mov -0xc(%ebp),%edx 10c7db: 85 d2 test %edx,%edx 10c7dd: 75 2d jne 10c80c case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 10c7df: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax while (tvp) { 10c7e5: 85 c0 test %eax,%eax 10c7e7: 75 09 jne 10c7f2 10c7e9: eb 39 jmp 10c824 10c7eb: 90 nop */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 10c7ec: 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) { 10c7ee: 85 c0 test %eax,%eax 10c7f0: 74 32 je 10c824 <== NEVER TAKEN if (tvp->ptr == ptr) { 10c7f2: 39 58 04 cmp %ebx,0x4(%eax) 10c7f5: 75 f5 jne 10c7ec /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 10c7f7: 8b 40 0c mov 0xc(%eax),%eax 10c7fa: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10c7fc: e8 d3 1d 00 00 call 10e5d4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c801: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c803: 8d 65 f8 lea -0x8(%ebp),%esp 10c806: 5b pop %ebx 10c807: 5e pop %esi 10c808: c9 leave 10c809: c3 ret 10c80a: 66 90 xchg %ax,%ax #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c80c: b8 04 00 00 00 mov $0x4,%eax } 10c811: 8d 65 f8 lea -0x8(%ebp),%esp 10c814: 5b pop %ebx 10c815: 5e pop %esi 10c816: c9 leave 10c817: c3 ret if ( !ptr ) return RTEMS_INVALID_ADDRESS; if ( !result ) return RTEMS_INVALID_ADDRESS; 10c818: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c81d: 8d 65 f8 lea -0x8(%ebp),%esp 10c820: 5b pop %ebx 10c821: 5e pop %esi 10c822: c9 leave 10c823: c3 ret _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10c824: e8 ab 1d 00 00 call 10e5d4 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 10c829: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c82e: 8d 65 f8 lea -0x8(%ebp),%esp 10c831: 5b pop %ebx 10c832: 5e pop %esi 10c833: c9 leave 10c834: c3 ret =============================================================================== 0010c9c0 : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 10c9c0: 55 push %ebp 10c9c1: 89 e5 mov %esp,%ebp 10c9c3: 53 push %ebx 10c9c4: 83 ec 14 sub $0x14,%esp 10c9c7: 8b 5d 08 mov 0x8(%ebp),%ebx Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10c9ca: 80 3d a4 85 12 00 00 cmpb $0x0,0x1285a4 10c9d1: 0f 84 a9 00 00 00 je 10ca80 return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10c9d7: 85 db test %ebx,%ebx 10c9d9: 0f 84 ad 00 00 00 je 10ca8c return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 10c9df: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) if ( !_TOD_Validate( time_buffer ) ) 10c9e6: 83 ec 0c sub $0xc,%esp 10c9e9: 53 push %ebx 10c9ea: e8 d1 f3 ff ff call 10bdc0 <_TOD_Validate> 10c9ef: 83 c4 10 add $0x10,%esp 10c9f2: 84 c0 test %al,%al 10c9f4: 75 0a jne 10ca00 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; 10c9f6: b8 14 00 00 00 mov $0x14,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c9fb: 8b 5d fc mov -0x4(%ebp),%ebx 10c9fe: c9 leave 10c9ff: c3 ret time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 10ca00: 83 ec 0c sub $0xc,%esp 10ca03: 53 push %ebx 10ca04: e8 2b f3 ff ff call 10bd34 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 10ca09: 83 c4 10 add $0x10,%esp 10ca0c: 3b 05 28 86 12 00 cmp 0x128628,%eax 10ca12: 76 e2 jbe 10c9f6 10ca14: 8b 15 90 85 12 00 mov 0x128590,%edx 10ca1a: 42 inc %edx 10ca1b: 89 15 90 85 12 00 mov %edx,0x128590 return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 10ca21: 83 ec 08 sub $0x8,%esp 10ca24: 6a 10 push $0x10 10ca26: ff 35 18 88 12 00 pushl 0x128818 10ca2c: 89 45 f4 mov %eax,-0xc(%ebp) 10ca2f: e8 d4 25 00 00 call 10f008 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10ca34: 8b 15 18 88 12 00 mov 0x128818,%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( 10ca3a: 8b 4a 08 mov 0x8(%edx),%ecx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10ca3d: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 10ca44: c7 42 64 60 e6 10 00 movl $0x10e660,0x64(%edx) the_watchdog->id = id; 10ca4b: 89 4a 68 mov %ecx,0x68(%edx) the_watchdog->user_data = user_data; 10ca4e: 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( 10ca55: 8b 45 f4 mov -0xc(%ebp),%eax 10ca58: 2b 05 28 86 12 00 sub 0x128628,%eax 10ca5e: 89 42 54 mov %eax,0x54(%edx) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 10ca61: 58 pop %eax 10ca62: 59 pop %ecx 10ca63: 83 c2 48 add $0x48,%edx 10ca66: 52 push %edx 10ca67: 68 54 86 12 00 push $0x128654 10ca6c: e8 27 2b 00 00 call 10f598 <_Watchdog_Insert> &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 10ca71: e8 9e 1d 00 00 call 10e814 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ca76: 83 c4 10 add $0x10,%esp 10ca79: 31 c0 xor %eax,%eax 10ca7b: e9 7b ff ff ff jmp 10c9fb ) { Watchdog_Interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 10ca80: b8 0b 00 00 00 mov $0xb,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10ca85: 8b 5d fc mov -0x4(%ebp),%ebx 10ca88: c9 leave 10ca89: c3 ret 10ca8a: 66 90 xchg %ax,%ax if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 10ca8c: b8 09 00 00 00 mov $0x9,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10ca91: 8b 5d fc mov -0x4(%ebp),%ebx 10ca94: c9 leave 10ca95: c3 ret =============================================================================== 001186d4 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 1186d4: 55 push %ebp 1186d5: 89 e5 mov %esp,%ebp 1186d7: 83 ec 1c sub $0x1c,%esp Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); 1186da: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 1186dd: 50 push %eax 1186de: ff 75 08 pushl 0x8(%ebp) 1186e1: 68 60 0c 14 00 push $0x140c60 1186e6: e8 b9 2a 00 00 call 11b1a4 <_Objects_Get> switch ( location ) { 1186eb: 83 c4 10 add $0x10,%esp 1186ee: 8b 55 f4 mov -0xc(%ebp),%edx 1186f1: 85 d2 test %edx,%edx 1186f3: 74 07 je 1186fc #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1186f5: b8 04 00 00 00 mov $0x4,%eax } 1186fa: c9 leave 1186fb: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 1186fc: 83 78 38 04 cmpl $0x4,0x38(%eax) 118700: 74 0f je 118711 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 118702: 83 ec 0c sub $0xc,%esp 118705: 83 c0 10 add $0x10,%eax 118708: 50 push %eax 118709: e8 ce 46 00 00 call 11cddc <_Watchdog_Remove> 11870e: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 118711: e8 ee 35 00 00 call 11bd04 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118716: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118718: c9 leave 118719: c3 ret =============================================================================== 0010bff0 : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 10bff0: 55 push %ebp 10bff1: 89 e5 mov %esp,%ebp 10bff3: 57 push %edi 10bff4: 56 push %esi 10bff5: 53 push %ebx 10bff6: 83 ec 0c sub $0xc,%esp 10bff9: 8b 5d 08 mov 0x8(%ebp),%ebx 10bffc: 8b 75 0c mov 0xc(%ebp),%esi Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 10bfff: 85 db test %ebx,%ebx 10c001: 74 6d je 10c070 return RTEMS_INVALID_NAME; if ( !id ) 10c003: 85 f6 test %esi,%esi 10c005: 0f 84 89 00 00 00 je 10c094 10c00b: a1 30 75 12 00 mov 0x127530,%eax 10c010: 40 inc %eax 10c011: a3 30 75 12 00 mov %eax,0x127530 * 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 ); 10c016: 83 ec 0c sub $0xc,%esp 10c019: 68 80 78 12 00 push $0x127880 10c01e: e8 5d 0e 00 00 call 10ce80 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 10c023: 83 c4 10 add $0x10,%esp 10c026: 85 c0 test %eax,%eax 10c028: 74 56 je 10c080 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 10c02a: 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; 10c031: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10c038: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10c03f: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10c046: 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 ), 10c04d: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10c050: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c053: 8b 0d 9c 78 12 00 mov 0x12789c,%ecx 10c059: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c05c: 89 58 0c mov %ebx,0xc(%eax) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 10c05f: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10c061: e8 2e 1e 00 00 call 10de94 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c066: 31 c0 xor %eax,%eax } 10c068: 8d 65 f4 lea -0xc(%ebp),%esp 10c06b: 5b pop %ebx 10c06c: 5e pop %esi 10c06d: 5f pop %edi 10c06e: c9 leave 10c06f: c3 ret ) { Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10c070: b8 03 00 00 00 mov $0x3,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c075: 8d 65 f4 lea -0xc(%ebp),%esp 10c078: 5b pop %ebx 10c079: 5e pop %esi 10c07a: 5f pop %edi 10c07b: c9 leave 10c07c: c3 ret 10c07d: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { _Thread_Enable_dispatch(); 10c080: e8 0f 1e 00 00 call 10de94 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10c085: b8 05 00 00 00 mov $0x5,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c08a: 8d 65 f4 lea -0xc(%ebp),%esp 10c08d: 5b pop %ebx 10c08e: 5e pop %esi 10c08f: 5f pop %edi 10c090: c9 leave 10c091: c3 ret 10c092: 66 90 xchg %ax,%ax if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10c094: b8 09 00 00 00 mov $0x9,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c099: 8d 65 f4 lea -0xc(%ebp),%esp 10c09c: 5b pop %ebx 10c09d: 5e pop %esi 10c09e: 5f pop %edi 10c09f: c9 leave 10c0a0: c3 ret =============================================================================== 001187d0 : */ rtems_status_code rtems_timer_delete( rtems_id id ) { 1187d0: 55 push %ebp 1187d1: 89 e5 mov %esp,%ebp 1187d3: 53 push %ebx 1187d4: 83 ec 18 sub $0x18,%esp Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); 1187d7: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 1187da: 50 push %eax 1187db: ff 75 08 pushl 0x8(%ebp) 1187de: 68 60 0c 14 00 push $0x140c60 1187e3: e8 bc 29 00 00 call 11b1a4 <_Objects_Get> 1187e8: 89 c3 mov %eax,%ebx switch ( location ) { 1187ea: 83 c4 10 add $0x10,%esp 1187ed: 8b 4d f4 mov -0xc(%ebp),%ecx 1187f0: 85 c9 test %ecx,%ecx 1187f2: 75 38 jne 11882c case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); 1187f4: 83 ec 08 sub $0x8,%esp 1187f7: 50 push %eax 1187f8: 68 60 0c 14 00 push $0x140c60 1187fd: e8 2e 25 00 00 call 11ad30 <_Objects_Close> (void) _Watchdog_Remove( &the_timer->Ticker ); 118802: 8d 43 10 lea 0x10(%ebx),%eax 118805: 89 04 24 mov %eax,(%esp) 118808: e8 cf 45 00 00 call 11cddc <_Watchdog_Remove> */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 11880d: 58 pop %eax 11880e: 5a pop %edx 11880f: 53 push %ebx 118810: 68 60 0c 14 00 push $0x140c60 118815: e8 0e 28 00 00 call 11b028 <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 11881a: e8 e5 34 00 00 call 11bd04 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11881f: 83 c4 10 add $0x10,%esp 118822: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118824: 8b 5d fc mov -0x4(%ebp),%ebx 118827: c9 leave 118828: c3 ret 118829: 8d 76 00 lea 0x0(%esi),%esi #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 11882c: b8 04 00 00 00 mov $0x4,%eax } 118831: 8b 5d fc mov -0x4(%ebp),%ebx 118834: c9 leave 118835: c3 ret =============================================================================== 0010c0a4 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 10c0a4: 55 push %ebp 10c0a5: 89 e5 mov %esp,%ebp 10c0a7: 57 push %edi 10c0a8: 56 push %esi 10c0a9: 53 push %ebx 10c0aa: 83 ec 2c sub $0x2c,%esp 10c0ad: 8b 5d 0c mov 0xc(%ebp),%ebx 10c0b0: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 10c0b3: 85 db test %ebx,%ebx 10c0b5: 0f 84 99 00 00 00 je 10c154 return RTEMS_INVALID_NUMBER; if ( !routine ) 10c0bb: 85 f6 test %esi,%esi 10c0bd: 0f 84 b1 00 00 00 je 10c174 Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 10c0c3: 57 push %edi return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); 10c0c4: 8d 45 e4 lea -0x1c(%ebp),%eax 10c0c7: 50 push %eax 10c0c8: ff 75 08 pushl 0x8(%ebp) 10c0cb: 68 80 78 12 00 push $0x127880 10c0d0: e8 5f 12 00 00 call 10d334 <_Objects_Get> 10c0d5: 89 c7 mov %eax,%edi switch ( location ) { 10c0d7: 83 c4 10 add $0x10,%esp 10c0da: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c0dd: 85 c9 test %ecx,%ecx 10c0df: 74 0f je 10c0f0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c0e1: b8 04 00 00 00 mov $0x4,%eax } 10c0e6: 8d 65 f4 lea -0xc(%ebp),%esp 10c0e9: 5b pop %ebx 10c0ea: 5e pop %esi 10c0eb: 5f pop %edi 10c0ec: c9 leave 10c0ed: c3 ret 10c0ee: 66 90 xchg %ax,%ax the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 10c0f0: 8d 50 10 lea 0x10(%eax),%edx 10c0f3: 83 ec 0c sub $0xc,%esp 10c0f6: 52 push %edx 10c0f7: 89 55 d4 mov %edx,-0x2c(%ebp) 10c0fa: e8 e1 2b 00 00 call 10ece0 <_Watchdog_Remove> _ISR_Disable( level ); 10c0ff: 9c pushf 10c100: fa cli 10c101: 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 ) { 10c102: 83 c4 10 add $0x10,%esp 10c105: 8b 57 18 mov 0x18(%edi),%edx 10c108: 85 d2 test %edx,%edx 10c10a: 8b 55 d4 mov -0x2c(%ebp),%edx 10c10d: 75 55 jne 10c164 /* * 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; 10c10f: 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; 10c116: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 10c11d: 89 77 2c mov %esi,0x2c(%edi) the_watchdog->id = id; 10c120: 8b 4d 08 mov 0x8(%ebp),%ecx 10c123: 89 4f 30 mov %ecx,0x30(%edi) the_watchdog->user_data = user_data; 10c126: 8b 4d 14 mov 0x14(%ebp),%ecx 10c129: 89 4f 34 mov %ecx,0x34(%edi) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 10c12c: 50 push %eax 10c12d: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c12e: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c131: 83 ec 08 sub $0x8,%esp 10c134: 52 push %edx 10c135: 68 00 76 12 00 push $0x127600 10c13a: e8 61 2a 00 00 call 10eba0 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 10c13f: e8 50 1d 00 00 call 10de94 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c144: 83 c4 10 add $0x10,%esp 10c147: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c149: 8d 65 f4 lea -0xc(%ebp),%esp 10c14c: 5b pop %ebx 10c14d: 5e pop %esi 10c14e: 5f pop %edi 10c14f: c9 leave 10c150: c3 ret 10c151: 8d 76 00 lea 0x0(%esi),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; 10c154: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c159: 8d 65 f4 lea -0xc(%ebp),%esp 10c15c: 5b pop %ebx 10c15d: 5e pop %esi 10c15e: 5f pop %edi 10c15f: c9 leave 10c160: c3 ret 10c161: 8d 76 00 lea 0x0(%esi),%esi * 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 ); 10c164: 50 push %eax 10c165: 9d popf _Thread_Enable_dispatch(); 10c166: e8 29 1d 00 00 call 10de94 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c16b: 31 c0 xor %eax,%eax 10c16d: e9 74 ff ff ff jmp 10c0e6 10c172: 66 90 xchg %ax,%ax if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) return RTEMS_INVALID_ADDRESS; 10c174: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c179: 8d 65 f4 lea -0xc(%ebp),%esp 10c17c: 5b pop %ebx 10c17d: 5e pop %esi 10c17e: 5f pop %edi 10c17f: c9 leave 10c180: c3 ret =============================================================================== 00118918 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 118918: 55 push %ebp 118919: 89 e5 mov %esp,%ebp 11891b: 57 push %edi 11891c: 56 push %esi 11891d: 53 push %ebx 11891e: 83 ec 2c sub $0x2c,%esp 118921: 8b 75 08 mov 0x8(%ebp),%esi 118924: 8b 7d 0c mov 0xc(%ebp),%edi 118927: 8b 5d 10 mov 0x10(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 11892a: 80 3d 24 09 14 00 00 cmpb $0x0,0x140924 118931: 75 0d jne 118940 return RTEMS_NOT_DEFINED; 118933: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118938: 8d 65 f4 lea -0xc(%ebp),%esp 11893b: 5b pop %ebx 11893c: 5e pop %esi 11893d: 5f pop %edi 11893e: c9 leave 11893f: c3 ret rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 118940: 83 ec 0c sub $0xc,%esp 118943: 57 push %edi 118944: e8 93 d4 ff ff call 115ddc <_TOD_Validate> 118949: 83 c4 10 add $0x10,%esp 11894c: 84 c0 test %al,%al 11894e: 74 1e je 11896e return RTEMS_INVALID_CLOCK; if ( !routine ) 118950: 85 db test %ebx,%ebx 118952: 0f 84 a4 00 00 00 je 1189fc return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 118958: 83 ec 0c sub $0xc,%esp 11895b: 57 push %edi 11895c: e8 ef d3 ff ff call 115d50 <_TOD_To_seconds> 118961: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 118963: 83 c4 10 add $0x10,%esp 118966: 3b 05 a8 09 14 00 cmp 0x1409a8,%eax 11896c: 77 0e ja 11897c return RTEMS_INVALID_CLOCK; 11896e: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118973: 8d 65 f4 lea -0xc(%ebp),%esp 118976: 5b pop %ebx 118977: 5e pop %esi 118978: 5f pop %edi 118979: c9 leave 11897a: c3 ret 11897b: 90 nop 11897c: 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 ); 11897d: 8d 45 e4 lea -0x1c(%ebp),%eax 118980: 50 push %eax 118981: 56 push %esi 118982: 68 60 0c 14 00 push $0x140c60 118987: e8 18 28 00 00 call 11b1a4 <_Objects_Get> switch ( location ) { 11898c: 83 c4 10 add $0x10,%esp 11898f: 8b 4d e4 mov -0x1c(%ebp),%ecx 118992: 85 c9 test %ecx,%ecx 118994: 75 5a jne 1189f0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118996: 8d 48 10 lea 0x10(%eax),%ecx 118999: 83 ec 0c sub $0xc,%esp 11899c: 51 push %ecx 11899d: 89 45 d0 mov %eax,-0x30(%ebp) 1189a0: 89 4d d4 mov %ecx,-0x2c(%ebp) 1189a3: e8 34 44 00 00 call 11cddc <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY; 1189a8: 8b 55 d0 mov -0x30(%ebp),%edx 1189ab: 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; 1189b2: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 1189b9: 89 5a 2c mov %ebx,0x2c(%edx) the_watchdog->id = id; 1189bc: 89 72 30 mov %esi,0x30(%edx) the_watchdog->user_data = user_data; 1189bf: 8b 45 14 mov 0x14(%ebp),%eax 1189c2: 89 42 34 mov %eax,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( 1189c5: 2b 3d a8 09 14 00 sub 0x1409a8,%edi 1189cb: 89 7a 1c mov %edi,0x1c(%edx) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 1189ce: 58 pop %eax 1189cf: 5a pop %edx 1189d0: 8b 4d d4 mov -0x2c(%ebp),%ecx 1189d3: 51 push %ecx 1189d4: 68 d4 09 14 00 push $0x1409d4 1189d9: e8 be 42 00 00 call 11cc9c <_Watchdog_Insert> &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 1189de: e8 21 33 00 00 call 11bd04 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1189e3: 83 c4 10 add $0x10,%esp 1189e6: 31 c0 xor %eax,%eax 1189e8: e9 4b ff ff ff jmp 118938 1189ed: 8d 76 00 lea 0x0(%esi),%esi #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1189f0: b8 04 00 00 00 mov $0x4,%eax 1189f5: e9 3e ff ff ff jmp 118938 1189fa: 66 90 xchg %ax,%ax if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) return RTEMS_INVALID_ADDRESS; 1189fc: b8 09 00 00 00 mov $0x9,%eax 118a01: e9 32 ff ff ff jmp 118938 =============================================================================== 001190b0 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 1190b0: 55 push %ebp 1190b1: 89 e5 mov %esp,%ebp 1190b3: 56 push %esi 1190b4: 53 push %ebx 1190b5: 83 ec 10 sub $0x10,%esp 1190b8: 8b 45 08 mov 0x8(%ebp),%eax 1190bb: 85 c0 test %eax,%eax 1190bd: 74 41 je 119100 ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 1190bf: 0f b6 15 54 82 13 00 movzbl 0x138254,%edx */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 1190c6: 39 d0 cmp %edx,%eax 1190c8: 76 42 jbe 11910c * 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 ) 1190ca: 40 inc %eax 1190cb: 75 33 jne 119100 return RTEMS_INVALID_PRIORITY; _priority = 0; 1190cd: 31 f6 xor %esi,%esi 1190cf: 8b 15 10 09 14 00 mov 0x140910,%edx 1190d5: 42 inc %edx 1190d6: 89 15 10 09 14 00 mov %edx,0x140910 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 1190dc: 8a 1d 40 c2 13 00 mov 0x13c240,%bl initialized = true; 1190e2: c6 05 40 c2 13 00 01 movb $0x1,0x13c240 _Thread_Enable_dispatch(); 1190e9: e8 16 2c 00 00 call 11bd04 <_Thread_Enable_dispatch> if ( tmpInitialized ) 1190ee: 84 db test %bl,%bl 1190f0: 74 1e je 119110 return RTEMS_INCORRECT_STATE; 1190f2: b8 0e 00 00 00 mov $0xe,%eax initialized = false; } #endif return status; } 1190f7: 8d 65 f8 lea -0x8(%ebp),%esp 1190fa: 5b pop %ebx 1190fb: 5e pop %esi 1190fc: c9 leave 1190fd: c3 ret 1190fe: 66 90 xchg %ax,%ax * 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; 119100: b8 13 00 00 00 mov $0x13,%eax initialized = false; } #endif return status; } 119105: 8d 65 f8 lea -0x8(%ebp),%esp 119108: 5b pop %ebx 119109: 5e pop %esi 11910a: c9 leave 11910b: c3 ret 11910c: 89 c6 mov %eax,%esi 11910e: eb bf jmp 1190cf * 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( 119110: 83 ec 08 sub $0x8,%esp 119113: 8d 45 f4 lea -0xc(%ebp),%eax 119116: 50 push %eax 119117: 8b 45 10 mov 0x10(%ebp),%eax 11911a: 80 cc 80 or $0x80,%ah 11911d: 50 push %eax 11911e: 68 00 01 00 00 push $0x100 119123: ff 75 0c pushl 0xc(%ebp) 119126: 56 push %esi 119127: 68 45 4d 49 54 push $0x54494d45 11912c: e8 c7 ec ff ff call 117df8 /* 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) { 119131: 83 c4 20 add $0x20,%esp 119134: 85 c0 test %eax,%eax 119136: 74 10 je 119148 initialized = false; 119138: c6 05 40 c2 13 00 00 movb $0x0,0x13c240 initialized = false; } #endif return status; } 11913f: 8d 65 f8 lea -0x8(%ebp),%esp 119142: 5b pop %ebx 119143: 5e pop %esi 119144: c9 leave 119145: c3 ret 119146: 66 90 xchg %ax,%ax * 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) 119148: 8b 45 f4 mov -0xc(%ebp),%eax */ #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return NULL; #endif return information->local_table[ index ]; 11914b: 0f b7 c8 movzwl %ax,%ecx 11914e: 8b 15 bc 08 14 00 mov 0x1408bc,%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( 119154: 8b 14 8a mov (%edx,%ecx,4),%edx 119157: 89 15 c0 c1 13 00 mov %edx,0x13c1c0 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 11915d: c7 05 f0 c1 13 00 f4 movl $0x13c1f4,0x13c1f0 119164: c1 13 00 head->previous = NULL; 119167: c7 05 f4 c1 13 00 00 movl $0x0,0x13c1f4 11916e: 00 00 00 tail->previous = head; 119171: c7 05 f8 c1 13 00 f0 movl $0x13c1f0,0x13c1f8 119178: c1 13 00 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 11917b: c7 05 28 c2 13 00 2c movl $0x13c22c,0x13c228 119182: c2 13 00 head->previous = NULL; 119185: c7 05 2c c2 13 00 00 movl $0x0,0x13c22c 11918c: 00 00 00 tail->previous = head; 11918f: c7 05 30 c2 13 00 28 movl $0x13c228,0x13c230 119196: c2 13 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 119199: c7 05 d0 c1 13 00 00 movl $0x0,0x13c1d0 1191a0: 00 00 00 the_watchdog->routine = routine; 1191a3: c7 05 e4 c1 13 00 50 movl $0x11bb50,0x13c1e4 1191aa: bb 11 00 the_watchdog->id = id; 1191ad: a3 e8 c1 13 00 mov %eax,0x13c1e8 the_watchdog->user_data = user_data; 1191b2: c7 05 ec c1 13 00 00 movl $0x0,0x13c1ec 1191b9: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 1191bc: c7 05 08 c2 13 00 00 movl $0x0,0x13c208 1191c3: 00 00 00 the_watchdog->routine = routine; 1191c6: c7 05 1c c2 13 00 50 movl $0x11bb50,0x13c21c 1191cd: bb 11 00 the_watchdog->id = id; 1191d0: a3 20 c2 13 00 mov %eax,0x13c220 the_watchdog->user_data = user_data; 1191d5: c7 05 24 c2 13 00 00 movl $0x0,0x13c224 1191dc: 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; 1191df: c7 05 c4 c1 13 00 80 movl $0x118f80,0x13c1c4 1191e6: 8f 11 00 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 1191e9: 8b 15 44 0a 14 00 mov 0x140a44,%edx 1191ef: 89 15 fc c1 13 00 mov %edx,0x13c1fc ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 1191f5: 8b 15 a8 09 14 00 mov 0x1409a8,%edx 1191fb: 89 15 34 c2 13 00 mov %edx,0x13c234 ts->insert_chain = NULL; 119201: c7 05 38 c2 13 00 00 movl $0x0,0x13c238 119208: 00 00 00 ts->active = false; 11920b: c6 05 3c c2 13 00 00 movb $0x0,0x13c23c /* * The default timer server is now available. */ _Timer_server = ts; 119212: c7 05 a0 0c 14 00 c0 movl $0x13c1c0,0x140ca0 119219: c1 13 00 /* * Start the timer server */ status = rtems_task_start( 11921c: 53 push %ebx 11921d: 68 c0 c1 13 00 push $0x13c1c0 119222: 68 b8 8d 11 00 push $0x118db8 119227: 50 push %eax 119228: e8 8b f2 ff ff call 1184b8 if (status) { initialized = false; } #endif return status; 11922d: 83 c4 10 add $0x10,%esp 119230: e9 d0 fe ff ff jmp 119105 =============================================================================== 00118a90 : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 118a90: 55 push %ebp 118a91: 89 e5 mov %esp,%ebp 118a93: 56 push %esi 118a94: 53 push %ebx 118a95: 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 ); 118a98: 8d 45 f4 lea -0xc(%ebp),%eax 118a9b: 50 push %eax 118a9c: ff 75 08 pushl 0x8(%ebp) 118a9f: 68 60 0c 14 00 push $0x140c60 118aa4: e8 fb 26 00 00 call 11b1a4 <_Objects_Get> 118aa9: 89 c3 mov %eax,%ebx switch ( location ) { 118aab: 83 c4 10 add $0x10,%esp 118aae: 8b 45 f4 mov -0xc(%ebp),%eax 118ab1: 85 c0 test %eax,%eax 118ab3: 74 0f je 118ac4 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118ab5: b8 04 00 00 00 mov $0x4,%eax } 118aba: 8d 65 f8 lea -0x8(%ebp),%esp 118abd: 5b pop %ebx 118abe: 5e pop %esi 118abf: c9 leave 118ac0: c3 ret 118ac1: 8d 76 00 lea 0x0(%esi),%esi the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { 118ac4: 8b 43 38 mov 0x38(%ebx),%eax 118ac7: 85 c0 test %eax,%eax 118ac9: 74 1d je 118ae8 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118acb: 48 dec %eax 118acc: 74 3a je 118b08 /* * 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; 118ace: b8 0b 00 00 00 mov $0xb,%eax } _Thread_Enable_dispatch(); 118ad3: 89 45 e4 mov %eax,-0x1c(%ebp) 118ad6: e8 29 32 00 00 call 11bd04 <_Thread_Enable_dispatch> return status; 118adb: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118ade: 8d 65 f8 lea -0x8(%ebp),%esp 118ae1: 5b pop %ebx 118ae2: 5e pop %esi 118ae3: c9 leave 118ae4: c3 ret 118ae5: 8d 76 00 lea 0x0(%esi),%esi the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); 118ae8: 83 c3 10 add $0x10,%ebx 118aeb: 83 ec 0c sub $0xc,%esp 118aee: 53 push %ebx 118aef: e8 e8 42 00 00 call 11cddc <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 118af4: 59 pop %ecx 118af5: 5e pop %esi 118af6: 53 push %ebx 118af7: 68 e0 09 14 00 push $0x1409e0 118afc: e8 9b 41 00 00 call 11cc9c <_Watchdog_Insert> 118b01: 83 c4 10 add $0x10,%esp rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 118b04: 31 c0 xor %eax,%eax 118b06: eb cb jmp 118ad3 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; 118b08: 8b 35 a0 0c 14 00 mov 0x140ca0,%esi if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 118b0e: 83 ec 0c sub $0xc,%esp 118b11: 8d 43 10 lea 0x10(%ebx),%eax 118b14: 50 push %eax 118b15: e8 c2 42 00 00 call 11cddc <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 118b1a: 58 pop %eax 118b1b: 5a pop %edx 118b1c: 53 push %ebx 118b1d: 56 push %esi 118b1e: ff 56 04 call *0x4(%esi) 118b21: 83 c4 10 add $0x10,%esp rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 118b24: 31 c0 xor %eax,%eax 118b26: eb ab jmp 118ad3 =============================================================================== 00118b28 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 118b28: 55 push %ebp 118b29: 89 e5 mov %esp,%ebp 118b2b: 57 push %edi 118b2c: 56 push %esi 118b2d: 53 push %ebx 118b2e: 83 ec 2c sub $0x2c,%esp 118b31: 8b 7d 0c mov 0xc(%ebp),%edi 118b34: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 118b37: 8b 1d a0 0c 14 00 mov 0x140ca0,%ebx if ( !timer_server ) 118b3d: 85 db test %ebx,%ebx 118b3f: 0f 84 9f 00 00 00 je 118be4 return RTEMS_INCORRECT_STATE; if ( !routine ) 118b45: 85 f6 test %esi,%esi 118b47: 0f 84 a3 00 00 00 je 118bf0 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 118b4d: 85 ff test %edi,%edi 118b4f: 75 0f jne 118b60 return RTEMS_INVALID_NUMBER; 118b51: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118b56: 8d 65 f4 lea -0xc(%ebp),%esp 118b59: 5b pop %ebx 118b5a: 5e pop %esi 118b5b: 5f pop %edi 118b5c: c9 leave 118b5d: c3 ret 118b5e: 66 90 xchg %ax,%ax 118b60: 52 push %edx return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); 118b61: 8d 45 e4 lea -0x1c(%ebp),%eax 118b64: 50 push %eax 118b65: ff 75 08 pushl 0x8(%ebp) 118b68: 68 60 0c 14 00 push $0x140c60 118b6d: e8 32 26 00 00 call 11b1a4 <_Objects_Get> 118b72: 89 c2 mov %eax,%edx switch ( location ) { 118b74: 83 c4 10 add $0x10,%esp 118b77: 8b 45 e4 mov -0x1c(%ebp),%eax 118b7a: 85 c0 test %eax,%eax 118b7c: 75 56 jne 118bd4 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118b7e: 83 ec 0c sub $0xc,%esp 118b81: 8d 42 10 lea 0x10(%edx),%eax 118b84: 50 push %eax 118b85: 89 55 d4 mov %edx,-0x2c(%ebp) 118b88: e8 4f 42 00 00 call 11cddc <_Watchdog_Remove> _ISR_Disable( level ); 118b8d: 9c pushf 118b8e: fa cli 118b8f: 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 ) { 118b90: 83 c4 10 add $0x10,%esp 118b93: 8b 55 d4 mov -0x2c(%ebp),%edx 118b96: 8b 4a 18 mov 0x18(%edx),%ecx 118b99: 85 c9 test %ecx,%ecx 118b9b: 75 5f jne 118bfc /* * 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; 118b9d: 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; 118ba4: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118bab: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118bae: 8b 4d 08 mov 0x8(%ebp),%ecx 118bb1: 89 4a 30 mov %ecx,0x30(%edx) the_watchdog->user_data = user_data; 118bb4: 8b 4d 14 mov 0x14(%ebp),%ecx 118bb7: 89 4a 34 mov %ecx,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 118bba: 89 7a 1c mov %edi,0x1c(%edx) _ISR_Enable( level ); 118bbd: 50 push %eax 118bbe: 9d popf (*timer_server->schedule_operation)( timer_server, the_timer ); 118bbf: 83 ec 08 sub $0x8,%esp 118bc2: 52 push %edx 118bc3: 53 push %ebx 118bc4: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 118bc7: e8 38 31 00 00 call 11bd04 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118bcc: 83 c4 10 add $0x10,%esp 118bcf: 31 c0 xor %eax,%eax 118bd1: eb 83 jmp 118b56 118bd3: 90 nop #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118bd4: b8 04 00 00 00 mov $0x4,%eax } 118bd9: 8d 65 f4 lea -0xc(%ebp),%esp 118bdc: 5b pop %ebx 118bdd: 5e pop %esi 118bde: 5f pop %edi 118bdf: c9 leave 118be0: c3 ret 118be1: 8d 76 00 lea 0x0(%esi),%esi Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; 118be4: b8 0e 00 00 00 mov $0xe,%eax 118be9: e9 68 ff ff ff jmp 118b56 118bee: 66 90 xchg %ax,%ax if ( !routine ) return RTEMS_INVALID_ADDRESS; 118bf0: b8 09 00 00 00 mov $0x9,%eax 118bf5: e9 5c ff ff ff jmp 118b56 118bfa: 66 90 xchg %ax,%ax * 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 ); 118bfc: 50 push %eax 118bfd: 9d popf _Thread_Enable_dispatch(); 118bfe: e8 01 31 00 00 call 11bd04 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118c03: 31 c0 xor %eax,%eax 118c05: e9 4c ff ff ff jmp 118b56 =============================================================================== 00118c0c : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 118c0c: 55 push %ebp 118c0d: 89 e5 mov %esp,%ebp 118c0f: 57 push %edi 118c10: 56 push %esi 118c11: 53 push %ebx 118c12: 83 ec 2c sub $0x2c,%esp 118c15: 8b 7d 0c mov 0xc(%ebp),%edi 118c18: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 118c1b: 8b 1d a0 0c 14 00 mov 0x140ca0,%ebx if ( !timer_server ) 118c21: 85 db test %ebx,%ebx 118c23: 0f 84 d7 00 00 00 je 118d00 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 118c29: 80 3d 24 09 14 00 00 cmpb $0x0,0x140924 118c30: 0f 84 aa 00 00 00 je 118ce0 <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 118c36: 85 f6 test %esi,%esi 118c38: 0f 84 b2 00 00 00 je 118cf0 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 118c3e: 83 ec 0c sub $0xc,%esp 118c41: 57 push %edi 118c42: e8 95 d1 ff ff call 115ddc <_TOD_Validate> 118c47: 83 c4 10 add $0x10,%esp 118c4a: 84 c0 test %al,%al 118c4c: 75 0e jne 118c5c return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; 118c4e: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118c53: 8d 65 f4 lea -0xc(%ebp),%esp 118c56: 5b pop %ebx 118c57: 5e pop %esi 118c58: 5f pop %edi 118c59: c9 leave 118c5a: c3 ret 118c5b: 90 nop return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 118c5c: 83 ec 0c sub $0xc,%esp 118c5f: 57 push %edi 118c60: e8 eb d0 ff ff call 115d50 <_TOD_To_seconds> 118c65: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 118c67: 83 c4 10 add $0x10,%esp 118c6a: 3b 05 a8 09 14 00 cmp 0x1409a8,%eax 118c70: 76 dc jbe 118c4e 118c72: 52 push %edx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); 118c73: 8d 45 e4 lea -0x1c(%ebp),%eax 118c76: 50 push %eax 118c77: ff 75 08 pushl 0x8(%ebp) 118c7a: 68 60 0c 14 00 push $0x140c60 118c7f: e8 20 25 00 00 call 11b1a4 <_Objects_Get> 118c84: 89 c2 mov %eax,%edx switch ( location ) { 118c86: 83 c4 10 add $0x10,%esp 118c89: 8b 45 e4 mov -0x1c(%ebp),%eax 118c8c: 85 c0 test %eax,%eax 118c8e: 75 7c jne 118d0c case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118c90: 83 ec 0c sub $0xc,%esp 118c93: 8d 42 10 lea 0x10(%edx),%eax 118c96: 50 push %eax 118c97: 89 55 d4 mov %edx,-0x2c(%ebp) 118c9a: e8 3d 41 00 00 call 11cddc <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 118c9f: 8b 55 d4 mov -0x2c(%ebp),%edx 118ca2: 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; 118ca9: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118cb0: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118cb3: 8b 45 08 mov 0x8(%ebp),%eax 118cb6: 89 42 30 mov %eax,0x30(%edx) the_watchdog->user_data = user_data; 118cb9: 8b 45 14 mov 0x14(%ebp),%eax 118cbc: 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(); 118cbf: 2b 3d a8 09 14 00 sub 0x1409a8,%edi 118cc5: 89 7a 1c mov %edi,0x1c(%edx) (*timer_server->schedule_operation)( timer_server, the_timer ); 118cc8: 58 pop %eax 118cc9: 59 pop %ecx 118cca: 52 push %edx 118ccb: 53 push %ebx 118ccc: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 118ccf: e8 30 30 00 00 call 11bd04 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118cd4: 83 c4 10 add $0x10,%esp 118cd7: 31 c0 xor %eax,%eax 118cd9: e9 75 ff ff ff jmp 118c53 118cde: 66 90 xchg %ax,%ax if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 118ce0: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118ce5: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 118ce8: 5b pop %ebx <== NOT EXECUTED 118ce9: 5e pop %esi <== NOT EXECUTED 118cea: 5f pop %edi <== NOT EXECUTED 118ceb: c9 leave <== NOT EXECUTED 118cec: c3 ret <== NOT EXECUTED 118ced: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; 118cf0: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118cf5: 8d 65 f4 lea -0xc(%ebp),%esp 118cf8: 5b pop %ebx 118cf9: 5e pop %esi 118cfa: 5f pop %edi 118cfb: c9 leave 118cfc: c3 ret 118cfd: 8d 76 00 lea 0x0(%esi),%esi Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; 118d00: b8 0e 00 00 00 mov $0xe,%eax 118d05: e9 49 ff ff ff jmp 118c53 118d0a: 66 90 xchg %ax,%ax #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118d0c: b8 04 00 00 00 mov $0x4,%eax 118d11: e9 3d ff ff ff jmp 118c53