=============================================================================== 0010be98 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 10be98: 55 push %ebp 10be99: 89 e5 mov %esp,%ebp 10be9b: 53 push %ebx 10be9c: 83 ec 04 sub $0x4,%esp the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10be9f: 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 ); 10bea5: 81 fb fc 66 12 00 cmp $0x1266fc,%ebx 10beab: 74 10 je 10bebd <_API_extensions_Run_postdriver+0x25><== NEVER TAKEN 10bead: 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)(); 10beb0: 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 ) { 10beb3: 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 ); 10beb5: 81 fb fc 66 12 00 cmp $0x1266fc,%ebx 10bebb: 75 f3 jne 10beb0 <_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)(); } } 10bebd: 58 pop %eax 10bebe: 5b pop %ebx 10bebf: c9 leave 10bec0: c3 ret =============================================================================== 0010bec4 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 10bec4: 55 push %ebp 10bec5: 89 e5 mov %esp,%ebp 10bec7: 53 push %ebx 10bec8: 83 ec 04 sub $0x4,%esp the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10becb: 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 ); 10bed1: 81 fb fc 66 12 00 cmp $0x1266fc,%ebx 10bed7: 74 1c je 10bef5 <_API_extensions_Run_postswitch+0x31><== NEVER TAKEN 10bed9: 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 ); 10bedc: 83 ec 0c sub $0xc,%esp 10bedf: ff 35 58 67 12 00 pushl 0x126758 10bee5: 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 ) { 10bee8: 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 ); 10beea: 83 c4 10 add $0x10,%esp 10beed: 81 fb fc 66 12 00 cmp $0x1266fc,%ebx 10bef3: 75 e7 jne 10bedc <_API_extensions_Run_postswitch+0x18><== NEVER TAKEN the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10bef5: 8b 5d fc mov -0x4(%ebp),%ebx 10bef8: c9 leave 10bef9: c3 ret =============================================================================== 001198d8 <_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 ) { 1198d8: 55 push %ebp 1198d9: 89 e5 mov %esp,%ebp 1198db: 57 push %edi 1198dc: 56 push %esi 1198dd: 53 push %ebx 1198de: 83 ec 1c sub $0x1c,%esp 1198e1: 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 ) { 1198e4: 8b 45 10 mov 0x10(%ebp),%eax 1198e7: 39 43 4c cmp %eax,0x4c(%ebx) 1198ea: 72 60 jb 11994c <_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 ) { 1198ec: 8b 43 48 mov 0x48(%ebx),%eax 1198ef: 85 c0 test %eax,%eax 1198f1: 75 45 jne 119938 <_CORE_message_queue_Broadcast+0x60> 1198f3: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 1198fa: eb 18 jmp 119914 <_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; 1198fc: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 1198ff: 8b 42 2c mov 0x2c(%edx),%eax 119902: 89 c7 mov %eax,%edi 119904: 8b 75 0c mov 0xc(%ebp),%esi 119907: 8b 4d 10 mov 0x10(%ebp),%ecx 11990a: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 11990c: 8b 42 28 mov 0x28(%edx),%eax 11990f: 8b 55 10 mov 0x10(%ebp),%edx 119912: 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 = 119914: 83 ec 0c sub $0xc,%esp 119917: 53 push %ebx 119918: e8 83 27 00 00 call 11c0a0 <_Thread_queue_Dequeue> 11991d: 89 c2 mov %eax,%edx 11991f: 83 c4 10 add $0x10,%esp 119922: 85 c0 test %eax,%eax 119924: 75 d6 jne 1198fc <_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; 119926: 8b 55 e4 mov -0x1c(%ebp),%edx 119929: 8b 45 1c mov 0x1c(%ebp),%eax 11992c: 89 10 mov %edx,(%eax) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 11992e: 31 c0 xor %eax,%eax } 119930: 8d 65 f4 lea -0xc(%ebp),%esp 119933: 5b pop %ebx 119934: 5e pop %esi 119935: 5f pop %edi 119936: c9 leave 119937: 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; 119938: 8b 55 1c mov 0x1c(%ebp),%edx 11993b: c7 02 00 00 00 00 movl $0x0,(%edx) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 119941: 31 c0 xor %eax,%eax #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 119943: 8d 65 f4 lea -0xc(%ebp),%esp 119946: 5b pop %ebx 119947: 5e pop %esi 119948: 5f pop %edi 119949: c9 leave 11994a: c3 ret 11994b: 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; 11994c: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 119951: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 119954: 5b pop %ebx <== NOT EXECUTED 119955: 5e pop %esi <== NOT EXECUTED 119956: 5f pop %edi <== NOT EXECUTED 119957: c9 leave <== NOT EXECUTED 119958: c3 ret <== NOT EXECUTED =============================================================================== 00114a18 <_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 ) { 114a18: 55 push %ebp 114a19: 89 e5 mov %esp,%ebp 114a1b: 57 push %edi 114a1c: 56 push %esi 114a1d: 53 push %ebx 114a1e: 83 ec 0c sub $0xc,%esp 114a21: 8b 5d 08 mov 0x8(%ebp),%ebx 114a24: 8b 75 10 mov 0x10(%ebp),%esi 114a27: 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; 114a2a: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 114a2d: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 114a34: 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)) { 114a37: a8 03 test $0x3,%al 114a39: 74 15 je 114a50 <_CORE_message_queue_Initialize+0x38> allocated_message_size += sizeof(uint32_t); 114a3b: 8d 50 04 lea 0x4(%eax),%edx allocated_message_size &= ~(sizeof(uint32_t) - 1); 114a3e: 83 e2 fc and $0xfffffffc,%edx } if (allocated_message_size < maximum_message_size) 114a41: 39 d0 cmp %edx,%eax 114a43: 76 0d jbe 114a52 <_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; 114a45: 31 c0 xor %eax,%eax STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 114a47: 8d 65 f4 lea -0xc(%ebp),%esp 114a4a: 5b pop %ebx 114a4b: 5e pop %esi 114a4c: 5f pop %edi 114a4d: c9 leave 114a4e: c3 ret 114a4f: 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)) { 114a50: 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)); 114a52: 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 * 114a55: 89 f8 mov %edi,%eax 114a57: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 114a5a: 39 d0 cmp %edx,%eax 114a5c: 72 e7 jb 114a45 <_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 ); 114a5e: 83 ec 0c sub $0xc,%esp 114a61: 50 push %eax 114a62: e8 e5 29 00 00 call 11744c <_Workspace_Allocate> return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 114a67: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 114a6a: 83 c4 10 add $0x10,%esp 114a6d: 85 c0 test %eax,%eax 114a6f: 74 d4 je 114a45 <_CORE_message_queue_Initialize+0x2d> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 114a71: 57 push %edi 114a72: 56 push %esi 114a73: 50 push %eax 114a74: 8d 43 60 lea 0x60(%ebx),%eax 114a77: 50 push %eax 114a78: e8 0f 47 00 00 call 11918c <_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 ); 114a7d: 8d 43 54 lea 0x54(%ebx),%eax 114a80: 89 43 50 mov %eax,0x50(%ebx) head->next = tail; head->previous = NULL; 114a83: 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 ); 114a8a: 8d 43 50 lea 0x50(%ebx),%eax 114a8d: 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( 114a90: 6a 06 push $0x6 114a92: 68 80 00 00 00 push $0x80 114a97: 8b 45 0c mov 0xc(%ebp),%eax 114a9a: 83 38 01 cmpl $0x1,(%eax) 114a9d: 0f 94 c0 sete %al 114aa0: 0f b6 c0 movzbl %al,%eax 114aa3: 50 push %eax 114aa4: 53 push %ebx 114aa5: e8 0e 21 00 00 call 116bb8 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 114aaa: 83 c4 20 add $0x20,%esp 114aad: b0 01 mov $0x1,%al } 114aaf: 8d 65 f4 lea -0xc(%ebp),%esp 114ab2: 5b pop %ebx 114ab3: 5e pop %esi 114ab4: 5f pop %edi 114ab5: c9 leave 114ab6: c3 ret =============================================================================== 001105f4 <_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 ) { 1105f4: 55 push %ebp 1105f5: 89 e5 mov %esp,%ebp 1105f7: 56 push %esi 1105f8: 53 push %ebx 1105f9: 8b 45 08 mov 0x8(%ebp),%eax 1105fc: 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 ); 1105ff: 9c pushf 110600: fa cli 110601: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 110602: ff 40 48 incl 0x48(%eax) if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) 110605: 81 7d 10 ff ff ff 7f cmpl $0x7fffffff,0x10(%ebp) 11060c: 74 1a je 110628 <_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); 11060e: 8d 48 50 lea 0x50(%eax),%ecx 110611: 89 4a 04 mov %ecx,0x4(%edx) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 110614: 8b 48 50 mov 0x50(%eax),%ecx after_node->next = the_node; 110617: 89 50 50 mov %edx,0x50(%eax) the_node->next = before_node; 11061a: 89 0a mov %ecx,(%edx) before_node->previous = the_node; 11061c: 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 ); 11061f: 53 push %ebx 110620: 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 } 110621: 5b pop %ebx 110622: 5e pop %esi 110623: c9 leave 110624: c3 ret 110625: 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; 110628: 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 ); 11062b: 8d 70 54 lea 0x54(%eax),%esi 11062e: 89 32 mov %esi,(%edx) Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; 110630: 89 50 58 mov %edx,0x58(%eax) old_last->next = the_node; 110633: 89 11 mov %edx,(%ecx) the_node->previous = old_last; 110635: 89 4a 04 mov %ecx,0x4(%edx) 110638: eb e5 jmp 11061f <_CORE_message_queue_Insert_message+0x2b> =============================================================================== 0010c034 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 10c034: 55 push %ebp 10c035: 89 e5 mov %esp,%ebp 10c037: 57 push %edi 10c038: 56 push %esi 10c039: 53 push %ebx 10c03a: 83 ec 0c sub $0xc,%esp 10c03d: 8b 5d 08 mov 0x8(%ebp),%ebx 10c040: 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 ) { 10c043: 8b 45 10 mov 0x10(%ebp),%eax 10c046: 39 43 4c cmp %eax,0x4c(%ebx) 10c049: 72 51 jb 10c09c <_CORE_message_queue_Submit+0x68> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 10c04b: 8b 43 48 mov 0x48(%ebx),%eax 10c04e: 85 c0 test %eax,%eax 10c050: 74 5a je 10c0ac <_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 < 10c052: 39 43 44 cmp %eax,0x44(%ebx) 10c055: 77 0d ja 10c064 <_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; 10c057: 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 } 10c05c: 8d 65 f4 lea -0xc(%ebp),%esp 10c05f: 5b pop %ebx 10c060: 5e pop %esi 10c061: 5f pop %edi 10c062: c9 leave 10c063: 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 ); 10c064: 83 ec 0c sub $0xc,%esp 10c067: 8d 43 60 lea 0x60(%ebx),%eax 10c06a: 50 push %eax 10c06b: e8 a0 ff ff ff call 10c010 <_Chain_Get> 10c070: 89 c2 mov %eax,%edx return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED; #endif _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, 10c072: 8d 40 0c lea 0xc(%eax),%eax const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10c075: 89 c7 mov %eax,%edi 10c077: 8b 4d 10 mov 0x10(%ebp),%ecx 10c07a: f3 a4 rep movsb %ds:(%esi),%es:(%edi) size ); the_message->Contents.size = size; 10c07c: 8b 4d 10 mov 0x10(%ebp),%ecx 10c07f: 89 4a 08 mov %ecx,0x8(%edx) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 10c082: 83 c4 0c add $0xc,%esp 10c085: ff 75 1c pushl 0x1c(%ebp) 10c088: 52 push %edx 10c089: 53 push %ebx 10c08a: e8 65 45 00 00 call 1105f4 <_CORE_message_queue_Insert_message> the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10c08f: 83 c4 10 add $0x10,%esp 10c092: 31 c0 xor %eax,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c094: 8d 65 f4 lea -0xc(%ebp),%esp 10c097: 5b pop %ebx 10c098: 5e pop %esi 10c099: 5f pop %edi 10c09a: c9 leave 10c09b: 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; 10c09c: 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 } 10c0a1: 8d 65 f4 lea -0xc(%ebp),%esp 10c0a4: 5b pop %ebx 10c0a5: 5e pop %esi 10c0a6: 5f pop %edi 10c0a7: c9 leave 10c0a8: c3 ret 10c0a9: 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 ); 10c0ac: 83 ec 0c sub $0xc,%esp 10c0af: 53 push %ebx 10c0b0: e8 97 1b 00 00 call 10dc4c <_Thread_queue_Dequeue> 10c0b5: 89 c2 mov %eax,%edx if ( the_thread ) { 10c0b7: 83 c4 10 add $0x10,%esp 10c0ba: 85 c0 test %eax,%eax 10c0bc: 74 1e je 10c0dc <_CORE_message_queue_Submit+0xa8> 10c0be: 8b 40 2c mov 0x2c(%eax),%eax 10c0c1: 89 c7 mov %eax,%edi 10c0c3: 8b 4d 10 mov 0x10(%ebp),%ecx 10c0c6: 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; 10c0c8: 8b 42 28 mov 0x28(%edx),%eax 10c0cb: 8b 4d 10 mov 0x10(%ebp),%ecx 10c0ce: 89 08 mov %ecx,(%eax) the_thread->Wait.count = (uint32_t) submit_type; 10c0d0: 8b 45 1c mov 0x1c(%ebp),%eax 10c0d3: 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; 10c0d6: 31 c0 xor %eax,%eax 10c0d8: eb 82 jmp 10c05c <_CORE_message_queue_Submit+0x28> 10c0da: 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 ) { 10c0dc: 8b 43 48 mov 0x48(%ebx),%eax 10c0df: e9 6e ff ff ff jmp 10c052 <_CORE_message_queue_Submit+0x1e> =============================================================================== 0010c0f0 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10c0f0: 55 push %ebp 10c0f1: 89 e5 mov %esp,%ebp 10c0f3: 57 push %edi 10c0f4: 56 push %esi 10c0f5: 53 push %ebx 10c0f6: 83 ec 0c sub $0xc,%esp 10c0f9: 8b 45 08 mov 0x8(%ebp),%eax 10c0fc: 8b 5d 0c mov 0xc(%ebp),%ebx 10c0ff: 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; 10c102: 8d 78 40 lea 0x40(%eax),%edi 10c105: b9 04 00 00 00 mov $0x4,%ecx 10c10a: 89 de mov %ebx,%esi 10c10c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10c10e: 89 50 50 mov %edx,0x50(%eax) the_mutex->blocked_count = 0; 10c111: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10c118: 85 d2 test %edx,%edx 10c11a: 75 30 jne 10c14c <_CORE_mutex_Initialize+0x5c> the_mutex->nest_count = 1; 10c11c: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) the_mutex->holder = _Thread_Executing; 10c123: 8b 15 58 67 12 00 mov 0x126758,%edx 10c129: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = _Thread_Executing->Object.id; 10c12c: 8b 4a 08 mov 0x8(%edx),%ecx 10c12f: 89 48 60 mov %ecx,0x60(%eax) STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c132: 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 ) || 10c135: 83 f9 02 cmp $0x2,%ecx 10c138: 74 05 je 10c13f <_CORE_mutex_Initialize+0x4f> 10c13a: 83 f9 03 cmp $0x3,%ecx 10c13d: 75 22 jne 10c161 <_CORE_mutex_Initialize+0x71> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 10c13f: 8b 48 4c mov 0x4c(%eax),%ecx 10c142: 39 4a 14 cmp %ecx,0x14(%edx) 10c145: 72 41 jb 10c188 <_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++; 10c147: ff 42 1c incl 0x1c(%edx) 10c14a: eb 15 jmp 10c161 <_CORE_mutex_Initialize+0x71> } } else { the_mutex->nest_count = 0; 10c14c: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_mutex->holder = NULL; 10c153: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) the_mutex->holder_id = 0; 10c15a: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) } _Thread_queue_Initialize( 10c161: 6a 04 push $0x4 10c163: 68 00 04 00 00 push $0x400 10c168: 31 d2 xor %edx,%edx 10c16a: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10c16e: 0f 95 c2 setne %dl 10c171: 52 push %edx 10c172: 50 push %eax 10c173: e8 64 1e 00 00 call 10dfdc <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 10c178: 83 c4 10 add $0x10,%esp 10c17b: 31 c0 xor %eax,%eax } 10c17d: 8d 65 f4 lea -0xc(%ebp),%esp 10c180: 5b pop %ebx 10c181: 5e pop %esi 10c182: 5f pop %edi 10c183: c9 leave 10c184: c3 ret 10c185: 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; 10c188: b8 05 00 00 00 mov $0x5,%eax STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c18d: 8d 65 f4 lea -0xc(%ebp),%esp 10c190: 5b pop %ebx 10c191: 5e pop %esi 10c192: 5f pop %edi 10c193: c9 leave 10c194: c3 ret =============================================================================== 0010c1e8 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10c1e8: 55 push %ebp 10c1e9: 89 e5 mov %esp,%ebp 10c1eb: 53 push %ebx 10c1ec: 83 ec 14 sub $0x14,%esp 10c1ef: 8b 5d 08 mov 0x8(%ebp),%ebx 10c1f2: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c1f5: a1 d0 64 12 00 mov 0x1264d0,%eax 10c1fa: 85 c0 test %eax,%eax 10c1fc: 74 04 je 10c202 <_CORE_mutex_Seize+0x1a> 10c1fe: 84 d2 test %dl,%dl 10c200: 75 36 jne 10c238 <_CORE_mutex_Seize+0x50><== ALWAYS TAKEN 10c202: 83 ec 08 sub $0x8,%esp 10c205: 8d 45 18 lea 0x18(%ebp),%eax 10c208: 50 push %eax 10c209: 53 push %ebx 10c20a: 88 55 f4 mov %dl,-0xc(%ebp) 10c20d: e8 2a 44 00 00 call 11063c <_CORE_mutex_Seize_interrupt_trylock> 10c212: 83 c4 10 add $0x10,%esp 10c215: 85 c0 test %eax,%eax 10c217: 8a 55 f4 mov -0xc(%ebp),%dl 10c21a: 74 14 je 10c230 <_CORE_mutex_Seize+0x48> 10c21c: 84 d2 test %dl,%dl 10c21e: 75 30 jne 10c250 <_CORE_mutex_Seize+0x68> 10c220: ff 75 18 pushl 0x18(%ebp) 10c223: 9d popf 10c224: a1 58 67 12 00 mov 0x126758,%eax 10c229: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) } 10c230: 8b 5d fc mov -0x4(%ebp),%ebx 10c233: c9 leave 10c234: c3 ret 10c235: 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 ); 10c238: 83 3d 60 66 12 00 01 cmpl $0x1,0x126660 10c23f: 76 c1 jbe 10c202 <_CORE_mutex_Seize+0x1a> 10c241: 53 push %ebx 10c242: 6a 12 push $0x12 10c244: 6a 00 push $0x0 10c246: 6a 00 push $0x0 10c248: e8 1b 06 00 00 call 10c868 <_Internal_error_Occurred> 10c24d: 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; 10c250: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10c257: a1 58 67 12 00 mov 0x126758,%eax 10c25c: 89 58 44 mov %ebx,0x44(%eax) 10c25f: 8b 55 0c mov 0xc(%ebp),%edx 10c262: 89 50 20 mov %edx,0x20(%eax) 10c265: a1 d0 64 12 00 mov 0x1264d0,%eax 10c26a: 40 inc %eax 10c26b: a3 d0 64 12 00 mov %eax,0x1264d0 10c270: ff 75 18 pushl 0x18(%ebp) 10c273: 9d popf 10c274: 83 ec 08 sub $0x8,%esp 10c277: ff 75 14 pushl 0x14(%ebp) 10c27a: 53 push %ebx 10c27b: e8 18 ff ff ff call 10c198 <_CORE_mutex_Seize_interrupt_blocking> 10c280: 83 c4 10 add $0x10,%esp } 10c283: 8b 5d fc mov -0x4(%ebp),%ebx 10c286: c9 leave 10c287: c3 ret =============================================================================== 0011063c <_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 ) { 11063c: 55 push %ebp 11063d: 89 e5 mov %esp,%ebp 11063f: 56 push %esi 110640: 53 push %ebx 110641: 8b 45 08 mov 0x8(%ebp),%eax 110644: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 110647: 8b 15 58 67 12 00 mov 0x126758,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 11064d: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 110654: 8b 58 50 mov 0x50(%eax),%ebx 110657: 85 db test %ebx,%ebx 110659: 74 31 je 11068c <_CORE_mutex_Seize_interrupt_trylock+0x50> the_mutex->lock = CORE_MUTEX_LOCKED; 11065b: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 110662: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 110665: 8b 5a 08 mov 0x8(%edx),%ebx 110668: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 11066b: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 110672: 8b 58 48 mov 0x48(%eax),%ebx if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 110675: 83 fb 02 cmp $0x2,%ebx 110678: 74 26 je 1106a0 <_CORE_mutex_Seize_interrupt_trylock+0x64> 11067a: 83 fb 03 cmp $0x3,%ebx 11067d: 74 3d je 1106bc <_CORE_mutex_Seize_interrupt_trylock+0x80> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 11067f: ff 31 pushl (%ecx) 110681: 9d popf return 0; 110682: 31 c0 xor %eax,%eax 110684: 8d 65 f8 lea -0x8(%ebp),%esp 110687: 5b pop %ebx 110688: 5e pop %esi 110689: c9 leave 11068a: c3 ret 11068b: 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 ) ) { 11068c: 3b 50 5c cmp 0x5c(%eax),%edx 11068f: 74 17 je 1106a8 <_CORE_mutex_Seize_interrupt_trylock+0x6c> /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; 110691: b8 01 00 00 00 mov $0x1,%eax 110696: 8d 65 f8 lea -0x8(%ebp),%esp 110699: 5b pop %ebx 11069a: 5e pop %esi 11069b: c9 leave 11069c: c3 ret 11069d: 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++; 1106a0: ff 42 1c incl 0x1c(%edx) 1106a3: eb da jmp 11067f <_CORE_mutex_Seize_interrupt_trylock+0x43> 1106a5: 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 ) { 1106a8: 8b 50 40 mov 0x40(%eax),%edx 1106ab: 85 d2 test %edx,%edx 1106ad: 75 e2 jne 110691 <_CORE_mutex_Seize_interrupt_trylock+0x55> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 1106af: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 1106b2: ff 31 pushl (%ecx) 1106b4: 9d popf return 0; 1106b5: 31 c0 xor %eax,%eax 1106b7: eb dd jmp 110696 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 1106b9: 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++; 1106bc: 8b 5a 1c mov 0x1c(%edx),%ebx 1106bf: 8d 73 01 lea 0x1(%ebx),%esi 1106c2: 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 ) { 1106c5: 8b 72 14 mov 0x14(%edx),%esi 1106c8: 39 70 4c cmp %esi,0x4c(%eax) 1106cb: 74 57 je 110724 <_CORE_mutex_Seize_interrupt_trylock+0xe8> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 1106cd: 72 25 jb 1106f4 <_CORE_mutex_Seize_interrupt_trylock+0xb8> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 1106cf: c7 42 34 05 00 00 00 movl $0x5,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 1106d6: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 1106dd: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 1106e4: 89 5a 1c mov %ebx,0x1c(%edx) _ISR_Enable( *level_p ); 1106e7: ff 31 pushl (%ecx) 1106e9: 9d popf return 0; 1106ea: 31 c0 xor %eax,%eax 1106ec: 8d 65 f8 lea -0x8(%ebp),%esp 1106ef: 5b pop %ebx 1106f0: 5e pop %esi 1106f1: c9 leave 1106f2: c3 ret 1106f3: 90 nop rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1106f4: 8b 15 d0 64 12 00 mov 0x1264d0,%edx 1106fa: 42 inc %edx 1106fb: 89 15 d0 64 12 00 mov %edx,0x1264d0 return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 110701: ff 31 pushl (%ecx) 110703: 9d popf _Thread_Change_priority( 110704: 51 push %ecx 110705: 6a 00 push $0x0 110707: ff 70 4c pushl 0x4c(%eax) 11070a: ff 70 5c pushl 0x5c(%eax) 11070d: e8 b2 cd ff ff call 10d4c4 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 110712: e8 e5 d1 ff ff call 10d8fc <_Thread_Enable_dispatch> 110717: 83 c4 10 add $0x10,%esp return 0; 11071a: 31 c0 xor %eax,%eax 11071c: e9 75 ff ff ff jmp 110696 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 110721: 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 ); 110724: ff 31 pushl (%ecx) 110726: 9d popf return 0; 110727: 31 c0 xor %eax,%eax 110729: e9 68 ff ff ff jmp 110696 <_CORE_mutex_Seize_interrupt_trylock+0x5a> =============================================================================== 0010c288 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 10c288: 55 push %ebp 10c289: 89 e5 mov %esp,%ebp 10c28b: 53 push %ebx 10c28c: 83 ec 04 sub $0x4,%esp 10c28f: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; Thread_Control *holder; holder = the_mutex->holder; 10c292: 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 ) { 10c295: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10c299: 74 15 je 10c2b0 <_CORE_mutex_Surrender+0x28> if ( !_Thread_Is_executing( holder ) ) 10c29b: 3b 05 58 67 12 00 cmp 0x126758,%eax 10c2a1: 74 0d je 10c2b0 <_CORE_mutex_Surrender+0x28> return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; 10c2a3: b8 02 00 00 00 mov $0x2,%eax } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c2a8: 8b 5d fc mov -0x4(%ebp),%ebx 10c2ab: c9 leave 10c2ac: c3 ret 10c2ad: 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 ) 10c2b0: 8b 53 54 mov 0x54(%ebx),%edx 10c2b3: 85 d2 test %edx,%edx 10c2b5: 74 51 je 10c308 <_CORE_mutex_Surrender+0x80> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10c2b7: 4a dec %edx 10c2b8: 89 53 54 mov %edx,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10c2bb: 85 d2 test %edx,%edx 10c2bd: 75 49 jne 10c308 <_CORE_mutex_Surrender+0x80> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c2bf: 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 ) || 10c2c2: 83 fa 02 cmp $0x2,%edx 10c2c5: 74 69 je 10c330 <_CORE_mutex_Surrender+0xa8> 10c2c7: 83 fa 03 cmp $0x3,%edx 10c2ca: 74 64 je 10c330 <_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; 10c2cc: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10c2d3: 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 ) ) ) { 10c2da: 83 ec 0c sub $0xc,%esp 10c2dd: 53 push %ebx 10c2de: e8 69 19 00 00 call 10dc4c <_Thread_queue_Dequeue> 10c2e3: 83 c4 10 add $0x10,%esp 10c2e6: 85 c0 test %eax,%eax 10c2e8: 74 7a je 10c364 <_CORE_mutex_Surrender+0xdc> } else #endif { the_mutex->holder = the_thread; 10c2ea: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10c2ed: 8b 50 08 mov 0x8(%eax),%edx 10c2f0: 89 53 60 mov %edx,0x60(%ebx) the_mutex->nest_count = 1; 10c2f3: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10c2fa: 8b 53 48 mov 0x48(%ebx),%edx 10c2fd: 83 fa 02 cmp $0x2,%edx 10c300: 74 56 je 10c358 <_CORE_mutex_Surrender+0xd0> 10c302: 83 fa 03 cmp $0x3,%edx 10c305: 74 09 je 10c310 <_CORE_mutex_Surrender+0x88> 10c307: 90 nop } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10c308: 31 c0 xor %eax,%eax } 10c30a: 8b 5d fc mov -0x4(%ebp),%ebx 10c30d: c9 leave 10c30e: c3 ret 10c30f: 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++; 10c310: ff 40 1c incl 0x1c(%eax) if (the_mutex->Attributes.priority_ceiling < 10c313: 8b 53 4c mov 0x4c(%ebx),%edx 10c316: 3b 50 14 cmp 0x14(%eax),%edx 10c319: 73 ed jae 10c308 <_CORE_mutex_Surrender+0x80> the_thread->current_priority){ _Thread_Change_priority( 10c31b: 51 push %ecx 10c31c: 6a 00 push $0x0 10c31e: 52 push %edx 10c31f: 50 push %eax 10c320: e8 9f 11 00 00 call 10d4c4 <_Thread_Change_priority> 10c325: 83 c4 10 add $0x10,%esp } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10c328: 31 c0 xor %eax,%eax 10c32a: e9 79 ff ff ff jmp 10c2a8 <_CORE_mutex_Surrender+0x20> 10c32f: 90 nop _CORE_mutex_Pop_priority( the_mutex, holder ); if ( pop_status != CORE_MUTEX_STATUS_SUCCESSFUL ) return pop_status; holder->resource_count--; 10c330: 8b 50 1c mov 0x1c(%eax),%edx 10c333: 4a dec %edx 10c334: 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 && 10c337: 85 d2 test %edx,%edx 10c339: 75 91 jne 10c2cc <_CORE_mutex_Surrender+0x44> holder->real_priority != holder->current_priority ) { 10c33b: 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 && 10c33e: 3b 50 14 cmp 0x14(%eax),%edx 10c341: 74 89 je 10c2cc <_CORE_mutex_Surrender+0x44> holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, true ); 10c343: 51 push %ecx 10c344: 6a 01 push $0x1 10c346: 52 push %edx 10c347: 50 push %eax 10c348: e8 77 11 00 00 call 10d4c4 <_Thread_Change_priority> 10c34d: 83 c4 10 add $0x10,%esp 10c350: e9 77 ff ff ff jmp 10c2cc <_CORE_mutex_Surrender+0x44> 10c355: 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++; 10c358: ff 40 1c incl 0x1c(%eax) } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10c35b: 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; 10c35d: e9 46 ff ff ff jmp 10c2a8 <_CORE_mutex_Surrender+0x20> 10c362: 66 90 xchg %ax,%ax } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c364: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) return CORE_MUTEX_STATUS_SUCCESSFUL; 10c36b: 31 c0 xor %eax,%eax 10c36d: e9 36 ff ff ff jmp 10c2a8 <_CORE_mutex_Surrender+0x20> =============================================================================== 0010c3c0 <_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 ) { 10c3c0: 55 push %ebp 10c3c1: 89 e5 mov %esp,%ebp 10c3c3: 53 push %ebx 10c3c4: 83 ec 10 sub $0x10,%esp 10c3c7: 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)) ) { 10c3ca: 53 push %ebx 10c3cb: e8 7c 18 00 00 call 10dc4c <_Thread_queue_Dequeue> 10c3d0: 83 c4 10 add $0x10,%esp 10c3d3: 85 c0 test %eax,%eax 10c3d5: 74 09 je 10c3e0 <_CORE_semaphore_Surrender+0x20> { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10c3d7: 31 c0 xor %eax,%eax status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 10c3d9: 8b 5d fc mov -0x4(%ebp),%ebx 10c3dc: c9 leave 10c3dd: c3 ret 10c3de: 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 ); 10c3e0: 9c pushf 10c3e1: fa cli 10c3e2: 5a pop %edx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10c3e3: 8b 43 48 mov 0x48(%ebx),%eax 10c3e6: 3b 43 40 cmp 0x40(%ebx),%eax 10c3e9: 72 0d jb 10c3f8 <_CORE_semaphore_Surrender+0x38><== ALWAYS TAKEN the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; 10c3eb: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED _ISR_Enable( level ); 10c3f0: 52 push %edx 10c3f1: 9d popf } return status; } 10c3f2: 8b 5d fc mov -0x4(%ebp),%ebx 10c3f5: c9 leave 10c3f6: c3 ret 10c3f7: 90 nop #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 10c3f8: 40 inc %eax 10c3f9: 89 43 48 mov %eax,0x48(%ebx) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10c3fc: 31 c0 xor %eax,%eax 10c3fe: eb f0 jmp 10c3f0 <_CORE_semaphore_Surrender+0x30> =============================================================================== 0010c788 <_Chain_Get_with_empty_check>: bool _Chain_Get_with_empty_check( Chain_Control *chain, Chain_Node **node ) { 10c788: 55 push %ebp 10c789: 89 e5 mov %esp,%ebp 10c78b: 57 push %edi 10c78c: 56 push %esi 10c78d: 53 push %ebx 10c78e: 8b 45 08 mov 0x8(%ebp),%eax 10c791: 8b 7d 0c mov 0xc(%ebp),%edi ISR_Level level; bool is_empty_now; _ISR_Disable( level ); 10c794: 9c pushf 10c795: fa cli 10c796: 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 ); 10c797: 8d 58 04 lea 0x4(%eax),%ebx Chain_Node *old_first = head->next; 10c79a: 8b 10 mov (%eax),%edx if ( old_first != tail ) { 10c79c: 39 d3 cmp %edx,%ebx 10c79e: 74 18 je 10c7b8 <_Chain_Get_with_empty_check+0x30> Chain_Node *new_first = old_first->next; 10c7a0: 8b 0a mov (%edx),%ecx head->next = new_first; 10c7a2: 89 08 mov %ecx,(%eax) new_first->previous = head; 10c7a4: 89 41 04 mov %eax,0x4(%ecx) *the_node = old_first; 10c7a7: 89 17 mov %edx,(%edi) is_empty_now = new_first == tail; 10c7a9: 39 cb cmp %ecx,%ebx 10c7ab: 0f 94 c0 sete %al is_empty_now = _Chain_Get_with_empty_check_unprotected( chain, node ); _ISR_Enable( level ); 10c7ae: 56 push %esi 10c7af: 9d popf return is_empty_now; } 10c7b0: 5b pop %ebx 10c7b1: 5e pop %esi 10c7b2: 5f pop %edi 10c7b3: c9 leave 10c7b4: c3 ret 10c7b5: 8d 76 00 lea 0x0(%esi),%esi } else *the_node = NULL; 10c7b8: 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; 10c7be: b0 01 mov $0x1,%al 10c7c0: eb ec jmp 10c7ae <_Chain_Get_with_empty_check+0x26> =============================================================================== 00110598 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 110598: 55 push %ebp 110599: 89 e5 mov %esp,%ebp 11059b: 57 push %edi 11059c: 56 push %esi 11059d: 53 push %ebx 11059e: 83 ec 08 sub $0x8,%esp 1105a1: 8b 7d 08 mov 0x8(%ebp),%edi 1105a4: 8b 4d 10 mov 0x10(%ebp),%ecx 1105a7: 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 ); 1105aa: 8d 47 04 lea 0x4(%edi),%eax 1105ad: 89 45 f0 mov %eax,-0x10(%ebp) Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; 1105b0: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) while ( count-- ) { 1105b7: 85 c9 test %ecx,%ecx 1105b9: 74 35 je 1105f0 <_Chain_Initialize+0x58><== NEVER TAKEN 1105bb: 49 dec %ecx 1105bc: 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; 1105bf: 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; 1105c2: 89 fa mov %edi,%edx 1105c4: eb 07 jmp 1105cd <_Chain_Initialize+0x35> 1105c6: 66 90 xchg %ax,%ax Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 1105c8: 89 c2 mov %eax,%edx current->next = next; next->previous = current; current = next; next = (Chain_Node *) 1105ca: 89 d8 mov %ebx,%eax 1105cc: 49 dec %ecx Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { current->next = next; 1105cd: 89 02 mov %eax,(%edx) next->previous = current; 1105cf: 89 50 04 mov %edx,0x4(%eax) * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 1105d2: 8d 1c 30 lea (%eax,%esi,1),%ebx Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 1105d5: 85 c9 test %ecx,%ecx 1105d7: 75 ef jne 1105c8 <_Chain_Initialize+0x30> * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 1105d9: 0f af 75 ec imul -0x14(%ebp),%esi 1105dd: 03 75 0c add 0xc(%ebp),%esi current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; 1105e0: 8b 45 f0 mov -0x10(%ebp),%eax 1105e3: 89 06 mov %eax,(%esi) tail->previous = current; 1105e5: 89 77 08 mov %esi,0x8(%edi) } 1105e8: 83 c4 08 add $0x8,%esp 1105eb: 5b pop %ebx 1105ec: 5e pop %esi 1105ed: 5f pop %edi 1105ee: c9 leave 1105ef: 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; 1105f0: 89 fe mov %edi,%esi <== NOT EXECUTED 1105f2: eb ec jmp 1105e0 <_Chain_Initialize+0x48><== NOT EXECUTED =============================================================================== 0010b0b8 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10b0b8: 55 push %ebp 10b0b9: 89 e5 mov %esp,%ebp 10b0bb: 57 push %edi 10b0bc: 56 push %esi 10b0bd: 53 push %ebx 10b0be: 83 ec 2c sub $0x2c,%esp 10b0c1: 8b 45 08 mov 0x8(%ebp),%eax 10b0c4: 8b 4d 0c mov 0xc(%ebp),%ecx 10b0c7: 8b 55 10 mov 0x10(%ebp),%edx 10b0ca: 89 55 dc mov %edx,-0x24(%ebp) 10b0cd: 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; 10b0d0: 8b 1d 58 67 12 00 mov 0x126758,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10b0d6: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10b0dd: 8b b3 e4 00 00 00 mov 0xe4(%ebx),%esi _ISR_Disable( level ); 10b0e3: 9c pushf 10b0e4: fa cli 10b0e5: 8f 45 e0 popl -0x20(%ebp) pending_events = api->pending_events; 10b0e8: 8b 16 mov (%esi),%edx 10b0ea: 89 55 d4 mov %edx,-0x2c(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10b0ed: 21 c2 and %eax,%edx 10b0ef: 89 55 e4 mov %edx,-0x1c(%ebp) 10b0f2: 74 0d je 10b101 <_Event_Seize+0x49> 10b0f4: 39 d0 cmp %edx,%eax 10b0f6: 0f 84 84 00 00 00 je 10b180 <_Event_Seize+0xc8> (seized_events == event_in || _Options_Is_any( option_set )) ) { 10b0fc: f6 c1 02 test $0x2,%cl 10b0ff: 75 7f jne 10b180 <_Event_Seize+0xc8> _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10b101: f6 c1 01 test $0x1,%cl 10b104: 75 62 jne 10b168 <_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; 10b106: 89 4b 30 mov %ecx,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10b109: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10b10c: 89 7b 28 mov %edi,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10b10f: c7 05 c0 67 12 00 01 movl $0x1,0x1267c0 10b116: 00 00 00 _ISR_Enable( level ); 10b119: ff 75 e0 pushl -0x20(%ebp) 10b11c: 9d popf if ( ticks ) { 10b11d: 8b 45 dc mov -0x24(%ebp),%eax 10b120: 85 c0 test %eax,%eax 10b122: 0f 85 80 00 00 00 jne 10b1a8 <_Event_Seize+0xf0> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10b128: 83 ec 08 sub $0x8,%esp 10b12b: 68 00 01 00 00 push $0x100 10b130: 53 push %ebx 10b131: e8 ba 2f 00 00 call 10e0f0 <_Thread_Set_state> _ISR_Disable( level ); 10b136: 9c pushf 10b137: fa cli 10b138: 5a pop %edx sync_state = _Event_Sync_state; 10b139: a1 c0 67 12 00 mov 0x1267c0,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10b13e: c7 05 c0 67 12 00 00 movl $0x0,0x1267c0 10b145: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10b148: 83 c4 10 add $0x10,%esp 10b14b: 83 f8 01 cmp $0x1,%eax 10b14e: 74 4c je 10b19c <_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 ); 10b150: 89 55 10 mov %edx,0x10(%ebp) 10b153: 89 5d 0c mov %ebx,0xc(%ebp) 10b156: 89 45 08 mov %eax,0x8(%ebp) } 10b159: 8d 65 f4 lea -0xc(%ebp),%esp 10b15c: 5b pop %ebx 10b15d: 5e pop %esi 10b15e: 5f pop %edi 10b15f: 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 ); 10b160: e9 13 23 00 00 jmp 10d478 <_Thread_blocking_operation_Cancel> 10b165: 8d 76 00 lea 0x0(%esi),%esi *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 10b168: ff 75 e0 pushl -0x20(%ebp) 10b16b: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10b16c: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10b173: 8b 55 e4 mov -0x1c(%ebp),%edx 10b176: 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 ); } 10b178: 8d 65 f4 lea -0xc(%ebp),%esp 10b17b: 5b pop %ebx 10b17c: 5e pop %esi 10b17d: 5f pop %edi 10b17e: c9 leave 10b17f: c3 ret 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) ); 10b180: 8b 45 e4 mov -0x1c(%ebp),%eax 10b183: f7 d0 not %eax 10b185: 23 45 d4 and -0x2c(%ebp),%eax 10b188: 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 ); 10b18a: ff 75 e0 pushl -0x20(%ebp) 10b18d: 9d popf *event_out = seized_events; 10b18e: 8b 45 e4 mov -0x1c(%ebp),%eax 10b191: 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 ); } 10b193: 8d 65 f4 lea -0xc(%ebp),%esp 10b196: 5b pop %ebx 10b197: 5e pop %esi 10b198: 5f pop %edi 10b199: c9 leave 10b19a: c3 ret 10b19b: 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 ); 10b19c: 52 push %edx 10b19d: 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 ); } 10b19e: 8d 65 f4 lea -0xc(%ebp),%esp 10b1a1: 5b pop %ebx 10b1a2: 5e pop %esi 10b1a3: 5f pop %edi 10b1a4: c9 leave 10b1a5: c3 ret 10b1a6: 66 90 xchg %ax,%ax _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 10b1a8: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b1ab: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10b1b2: c7 43 64 5c b3 10 00 movl $0x10b35c,0x64(%ebx) the_watchdog->id = id; 10b1b9: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10b1bc: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b1c3: 8b 45 dc mov -0x24(%ebp),%eax 10b1c6: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b1c9: 83 ec 08 sub $0x8,%esp &executing->Timer, _Event_Timeout, executing->Object.id, NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); 10b1cc: 8d 43 48 lea 0x48(%ebx),%eax 10b1cf: 50 push %eax 10b1d0: 68 a0 65 12 00 push $0x1265a0 10b1d5: e8 2e 34 00 00 call 10e608 <_Watchdog_Insert> 10b1da: 83 c4 10 add $0x10,%esp 10b1dd: e9 46 ff ff ff jmp 10b128 <_Event_Seize+0x70> =============================================================================== 0010b238 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10b238: 55 push %ebp 10b239: 89 e5 mov %esp,%ebp 10b23b: 57 push %edi 10b23c: 56 push %esi 10b23d: 53 push %ebx 10b23e: 83 ec 2c sub $0x2c,%esp 10b241: 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 ]; 10b244: 8b 8b e4 00 00 00 mov 0xe4(%ebx),%ecx option_set = (rtems_option) the_thread->Wait.option; 10b24a: 8b 7b 30 mov 0x30(%ebx),%edi _ISR_Disable( level ); 10b24d: 9c pushf 10b24e: fa cli 10b24f: 8f 45 d4 popl -0x2c(%ebp) pending_events = api->pending_events; 10b252: 8b 11 mov (%ecx),%edx event_condition = (rtems_event_set) the_thread->Wait.count; 10b254: 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 ) ) { 10b257: 89 c6 mov %eax,%esi 10b259: 21 d6 and %edx,%esi 10b25b: 89 75 e4 mov %esi,-0x1c(%ebp) 10b25e: 74 74 je 10b2d4 <_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() && 10b260: 8b 35 54 67 12 00 mov 0x126754,%esi 10b266: 85 f6 test %esi,%esi 10b268: 74 0c je 10b276 <_Event_Surrender+0x3e> 10b26a: 3b 1d 58 67 12 00 cmp 0x126758,%ebx 10b270: 0f 84 96 00 00 00 je 10b30c <_Event_Surrender+0xd4> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10b276: f6 43 11 01 testb $0x1,0x11(%ebx) 10b27a: 74 4c je 10b2c8 <_Event_Surrender+0x90> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 10b27c: 3b 45 e4 cmp -0x1c(%ebp),%eax 10b27f: 74 05 je 10b286 <_Event_Surrender+0x4e> 10b281: 83 e7 02 and $0x2,%edi 10b284: 74 42 je 10b2c8 <_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) ); 10b286: 8b 45 e4 mov -0x1c(%ebp),%eax 10b289: f7 d0 not %eax 10b28b: 21 d0 and %edx,%eax 10b28d: 89 01 mov %eax,(%ecx) api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 10b28f: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b296: 8b 43 28 mov 0x28(%ebx),%eax 10b299: 8b 75 e4 mov -0x1c(%ebp),%esi 10b29c: 89 30 mov %esi,(%eax) _ISR_Flash( level ); 10b29e: ff 75 d4 pushl -0x2c(%ebp) 10b2a1: 9d popf 10b2a2: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10b2a3: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b2a7: 74 37 je 10b2e0 <_Event_Surrender+0xa8> _ISR_Enable( level ); 10b2a9: ff 75 d4 pushl -0x2c(%ebp) 10b2ac: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b2ad: 83 ec 08 sub $0x8,%esp 10b2b0: 68 f8 ff 03 10 push $0x1003fff8 10b2b5: 53 push %ebx 10b2b6: e8 dd 22 00 00 call 10d598 <_Thread_Clear_state> 10b2bb: 83 c4 10 add $0x10,%esp } return; } } _ISR_Enable( level ); } 10b2be: 8d 65 f4 lea -0xc(%ebp),%esp 10b2c1: 5b pop %ebx 10b2c2: 5e pop %esi 10b2c3: 5f pop %edi 10b2c4: c9 leave 10b2c5: c3 ret 10b2c6: 66 90 xchg %ax,%ax _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10b2c8: ff 75 d4 pushl -0x2c(%ebp) 10b2cb: 9d popf } 10b2cc: 8d 65 f4 lea -0xc(%ebp),%esp 10b2cf: 5b pop %ebx 10b2d0: 5e pop %esi 10b2d1: 5f pop %edi 10b2d2: c9 leave 10b2d3: c3 ret /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 10b2d4: ff 75 d4 pushl -0x2c(%ebp) 10b2d7: 9d popf } return; } } _ISR_Enable( level ); } 10b2d8: 8d 65 f4 lea -0xc(%ebp),%esp 10b2db: 5b pop %ebx 10b2dc: 5e pop %esi 10b2dd: 5f pop %edi 10b2de: c9 leave 10b2df: c3 ret RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10b2e0: 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 ); 10b2e7: ff 75 d4 pushl -0x2c(%ebp) 10b2ea: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10b2eb: 83 ec 0c sub $0xc,%esp 10b2ee: 8d 43 48 lea 0x48(%ebx),%eax 10b2f1: 50 push %eax 10b2f2: e8 51 34 00 00 call 10e748 <_Watchdog_Remove> 10b2f7: 58 pop %eax 10b2f8: 5a pop %edx 10b2f9: 68 f8 ff 03 10 push $0x1003fff8 10b2fe: 53 push %ebx 10b2ff: e8 94 22 00 00 call 10d598 <_Thread_Clear_state> 10b304: 83 c4 10 add $0x10,%esp 10b307: eb c3 jmp 10b2cc <_Event_Surrender+0x94> 10b309: 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) || 10b30c: 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 ) && 10b312: 83 fe 02 cmp $0x2,%esi 10b315: 74 0d je 10b324 <_Event_Surrender+0xec> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 10b317: 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) || 10b31d: 4e dec %esi 10b31e: 0f 85 52 ff ff ff jne 10b276 <_Event_Surrender+0x3e> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 10b324: 3b 45 e4 cmp -0x1c(%ebp),%eax 10b327: 74 05 je 10b32e <_Event_Surrender+0xf6> 10b329: 83 e7 02 and $0x2,%edi 10b32c: 74 22 je 10b350 <_Event_Surrender+0x118><== NEVER TAKEN 10b32e: 8b 45 e4 mov -0x1c(%ebp),%eax 10b331: f7 d0 not %eax 10b333: 21 d0 and %edx,%eax 10b335: 89 01 mov %eax,(%ecx) api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 10b337: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b33e: 8b 43 28 mov 0x28(%ebx),%eax 10b341: 8b 55 e4 mov -0x1c(%ebp),%edx 10b344: 89 10 mov %edx,(%eax) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10b346: c7 05 c0 67 12 00 03 movl $0x3,0x1267c0 10b34d: 00 00 00 } _ISR_Enable( level ); 10b350: ff 75 d4 pushl -0x2c(%ebp) 10b353: 9d popf return; 10b354: e9 73 ff ff ff jmp 10b2cc <_Event_Surrender+0x94> =============================================================================== 0010b35c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10b35c: 55 push %ebp 10b35d: 89 e5 mov %esp,%ebp 10b35f: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10b362: 8d 45 f4 lea -0xc(%ebp),%eax 10b365: 50 push %eax 10b366: ff 75 08 pushl 0x8(%ebp) 10b369: e8 b2 25 00 00 call 10d920 <_Thread_Get> switch ( location ) { 10b36e: 83 c4 10 add $0x10,%esp 10b371: 8b 55 f4 mov -0xc(%ebp),%edx 10b374: 85 d2 test %edx,%edx 10b376: 75 37 jne 10b3af <_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 ); 10b378: 9c pushf 10b379: fa cli 10b37a: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10b37b: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10b382: 3b 05 58 67 12 00 cmp 0x126758,%eax 10b388: 74 2a je 10b3b4 <_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; 10b38a: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10b391: 52 push %edx 10b392: 9d popf 10b393: 83 ec 08 sub $0x8,%esp 10b396: 68 f8 ff 03 10 push $0x1003fff8 10b39b: 50 push %eax 10b39c: e8 f7 21 00 00 call 10d598 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b3a1: a1 d0 64 12 00 mov 0x1264d0,%eax 10b3a6: 48 dec %eax 10b3a7: a3 d0 64 12 00 mov %eax,0x1264d0 _Thread_Unblock( the_thread ); _Thread_Unnest_dispatch(); break; 10b3ac: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b3af: c9 leave 10b3b0: c3 ret 10b3b1: 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 ) 10b3b4: 8b 0d c0 67 12 00 mov 0x1267c0,%ecx 10b3ba: 49 dec %ecx 10b3bb: 75 cd jne 10b38a <_Event_Timeout+0x2e> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10b3bd: c7 05 c0 67 12 00 02 movl $0x2,0x1267c0 10b3c4: 00 00 00 10b3c7: eb c1 jmp 10b38a <_Event_Timeout+0x2e> =============================================================================== 00110784 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 110784: 55 push %ebp 110785: 89 e5 mov %esp,%ebp 110787: 57 push %edi 110788: 56 push %esi 110789: 53 push %ebx 11078a: 83 ec 2c sub $0x2c,%esp 11078d: 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 110790: 8d 47 04 lea 0x4(%edi),%eax 110793: 89 45 dc mov %eax,-0x24(%ebp) - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; 110796: 8b 55 08 mov 0x8(%ebp),%edx 110799: 8b 52 10 mov 0x10(%edx),%edx 11079c: 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 ) { 11079f: 39 c7 cmp %eax,%edi 1107a1: 0f 87 69 01 00 00 ja 110910 <_Heap_Allocate_aligned_with_boundary+0x18c> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 1107a7: 8b 5d 14 mov 0x14(%ebp),%ebx 1107aa: 85 db test %ebx,%ebx 1107ac: 0f 85 56 01 00 00 jne 110908 <_Heap_Allocate_aligned_with_boundary+0x184> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 1107b2: 8b 45 08 mov 0x8(%ebp),%eax 1107b5: 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 ) { 1107b8: 39 c8 cmp %ecx,%eax 1107ba: 0f 84 50 01 00 00 je 110910 <_Heap_Allocate_aligned_with_boundary+0x18c> 1107c0: 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 1107c7: 8b 55 cc mov -0x34(%ebp),%edx 1107ca: 83 c2 07 add $0x7,%edx 1107cd: 89 55 c8 mov %edx,-0x38(%ebp) + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 1107d0: c7 45 d0 04 00 00 00 movl $0x4,-0x30(%ebp) 1107d7: 29 7d d0 sub %edi,-0x30(%ebp) 1107da: eb 1e jmp 1107fa <_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; 1107dc: 8d 59 08 lea 0x8(%ecx),%ebx } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 1107df: 85 db test %ebx,%ebx 1107e1: 0f 85 f1 00 00 00 jne 1108d8 <_Heap_Allocate_aligned_with_boundary+0x154><== ALWAYS TAKEN break; } block = block->next; 1107e7: 8b 49 08 mov 0x8(%ecx),%ecx 1107ea: 8b 45 e4 mov -0x1c(%ebp),%eax 1107ed: 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 ) { 1107ee: 39 4d 08 cmp %ecx,0x8(%ebp) 1107f1: 0f 84 25 01 00 00 je 11091c <_Heap_Allocate_aligned_with_boundary+0x198> 1107f7: 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 ) { 1107fa: 8b 59 04 mov 0x4(%ecx),%ebx 1107fd: 39 5d dc cmp %ebx,-0x24(%ebp) 110800: 73 e5 jae 1107e7 <_Heap_Allocate_aligned_with_boundary+0x63> if ( alignment == 0 ) { 110802: 8b 55 10 mov 0x10(%ebp),%edx 110805: 85 d2 test %edx,%edx 110807: 74 d3 je 1107dc <_Heap_Allocate_aligned_with_boundary+0x58> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 110809: 8b 45 08 mov 0x8(%ebp),%eax 11080c: 8b 40 14 mov 0x14(%eax),%eax 11080f: 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; 110812: 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; 110815: 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; 110818: 8d 51 08 lea 0x8(%ecx),%edx 11081b: 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; 11081e: 8b 75 c8 mov -0x38(%ebp),%esi 110821: 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 110823: 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; 110825: 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); 110828: 89 d8 mov %ebx,%eax 11082a: 31 d2 xor %edx,%edx 11082c: f7 75 10 divl 0x10(%ebp) 11082f: 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 ) { 110831: 39 de cmp %ebx,%esi 110833: 73 0b jae 110840 <_Heap_Allocate_aligned_with_boundary+0xbc> 110835: 89 f0 mov %esi,%eax 110837: 31 d2 xor %edx,%edx 110839: f7 75 10 divl 0x10(%ebp) 11083c: 89 f3 mov %esi,%ebx 11083e: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 110840: 8b 45 14 mov 0x14(%ebp),%eax 110843: 85 c0 test %eax,%eax 110845: 74 5b je 1108a2 <_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; 110847: 8d 34 3b lea (%ebx,%edi,1),%esi 11084a: 89 f0 mov %esi,%eax 11084c: 31 d2 xor %edx,%edx 11084e: f7 75 14 divl 0x14(%ebp) 110851: 89 f0 mov %esi,%eax 110853: 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 ) { 110855: 39 c3 cmp %eax,%ebx 110857: 73 49 jae 1108a2 <_Heap_Allocate_aligned_with_boundary+0x11e> 110859: 39 c6 cmp %eax,%esi 11085b: 76 45 jbe 1108a2 <_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; 11085d: 8b 55 d4 mov -0x2c(%ebp),%edx 110860: 01 fa add %edi,%edx 110862: 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 ) { 110865: 39 c2 cmp %eax,%edx 110867: 0f 87 7a ff ff ff ja 1107e7 <_Heap_Allocate_aligned_with_boundary+0x63> 11086d: 89 ce mov %ecx,%esi 11086f: eb 10 jmp 110881 <_Heap_Allocate_aligned_with_boundary+0xfd> 110871: 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 ) { 110874: 39 c1 cmp %eax,%ecx 110876: 76 28 jbe 1108a0 <_Heap_Allocate_aligned_with_boundary+0x11c> if ( boundary_line < boundary_floor ) { 110878: 39 45 e0 cmp %eax,-0x20(%ebp) 11087b: 0f 87 9f 00 00 00 ja 110920 <_Heap_Allocate_aligned_with_boundary+0x19c><== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; 110881: 89 c3 mov %eax,%ebx 110883: 29 fb sub %edi,%ebx 110885: 89 d8 mov %ebx,%eax 110887: 31 d2 xor %edx,%edx 110889: f7 75 10 divl 0x10(%ebp) 11088c: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 11088e: 8d 0c 3b lea (%ebx,%edi,1),%ecx 110891: 89 c8 mov %ecx,%eax 110893: 31 d2 xor %edx,%edx 110895: f7 75 14 divl 0x14(%ebp) 110898: 89 c8 mov %ecx,%eax 11089a: 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 ) { 11089c: 39 c3 cmp %eax,%ebx 11089e: 72 d4 jb 110874 <_Heap_Allocate_aligned_with_boundary+0xf0> 1108a0: 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 ) { 1108a2: 39 5d d4 cmp %ebx,-0x2c(%ebp) 1108a5: 0f 87 3c ff ff ff ja 1107e7 <_Heap_Allocate_aligned_with_boundary+0x63> 1108ab: be f8 ff ff ff mov $0xfffffff8,%esi 1108b0: 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); 1108b2: 01 de add %ebx,%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 1108b4: 89 d8 mov %ebx,%eax 1108b6: 31 d2 xor %edx,%edx 1108b8: 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; 1108bb: 29 d6 sub %edx,%esi if ( free_size >= min_block_size || free_size == 0 ) { 1108bd: 39 75 d8 cmp %esi,-0x28(%ebp) 1108c0: 0f 86 19 ff ff ff jbe 1107df <_Heap_Allocate_aligned_with_boundary+0x5b> 1108c6: 85 f6 test %esi,%esi 1108c8: 0f 85 19 ff ff ff jne 1107e7 <_Heap_Allocate_aligned_with_boundary+0x63> } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 1108ce: 85 db test %ebx,%ebx 1108d0: 0f 84 11 ff ff ff je 1107e7 <_Heap_Allocate_aligned_with_boundary+0x63><== NEVER TAKEN 1108d6: 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; 1108d8: 8b 45 08 mov 0x8(%ebp),%eax 1108db: ff 40 48 incl 0x48(%eax) stats->searches += search_count; 1108de: 8b 55 e4 mov -0x1c(%ebp),%edx 1108e1: 01 50 4c add %edx,0x4c(%eax) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 1108e4: 57 push %edi 1108e5: 53 push %ebx 1108e6: 51 push %ecx 1108e7: 50 push %eax 1108e8: e8 87 be ff ff call 10c774 <_Heap_Block_allocate> 1108ed: 89 d8 mov %ebx,%eax 1108ef: 83 c4 10 add $0x10,%esp boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 1108f2: 8b 55 e4 mov -0x1c(%ebp),%edx 1108f5: 8b 4d 08 mov 0x8(%ebp),%ecx 1108f8: 39 51 44 cmp %edx,0x44(%ecx) 1108fb: 73 15 jae 110912 <_Heap_Allocate_aligned_with_boundary+0x18e> stats->max_search = search_count; 1108fd: 89 51 44 mov %edx,0x44(%ecx) } return (void *) alloc_begin; } 110900: 8d 65 f4 lea -0xc(%ebp),%esp 110903: 5b pop %ebx 110904: 5e pop %esi 110905: 5f pop %edi 110906: c9 leave 110907: c3 ret /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 110908: 3b 7d 14 cmp 0x14(%ebp),%edi 11090b: 76 1a jbe 110927 <_Heap_Allocate_aligned_with_boundary+0x1a3> 11090d: 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 ) { 110910: 31 c0 xor %eax,%eax if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 110912: 8d 65 f4 lea -0xc(%ebp),%esp 110915: 5b pop %ebx 110916: 5e pop %esi 110917: 5f pop %edi 110918: c9 leave 110919: c3 ret 11091a: 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 ) { 11091c: 31 c0 xor %eax,%eax 11091e: eb d2 jmp 1108f2 <_Heap_Allocate_aligned_with_boundary+0x16e> 110920: 89 f1 mov %esi,%ecx <== NOT EXECUTED 110922: e9 c0 fe ff ff jmp 1107e7 <_Heap_Allocate_aligned_with_boundary+0x63><== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 110927: 8b 4d 10 mov 0x10(%ebp),%ecx 11092a: 85 c9 test %ecx,%ecx 11092c: 0f 85 80 fe ff ff jne 1107b2 <_Heap_Allocate_aligned_with_boundary+0x2e> alignment = page_size; 110932: 89 55 10 mov %edx,0x10(%ebp) 110935: e9 78 fe ff ff jmp 1107b2 <_Heap_Allocate_aligned_with_boundary+0x2e> =============================================================================== 00110d28 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 110d28: 55 push %ebp 110d29: 89 e5 mov %esp,%ebp 110d2b: 57 push %edi 110d2c: 56 push %esi 110d2d: 53 push %ebx 110d2e: 83 ec 4c sub $0x4c,%esp 110d31: 8b 5d 08 mov 0x8(%ebp),%ebx 110d34: 8b 4d 10 mov 0x10(%ebp),%ecx Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; 110d37: 8b 43 20 mov 0x20(%ebx),%eax 110d3a: 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; 110d3d: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) Heap_Block *extend_last_block = NULL; 110d44: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) uintptr_t const page_size = heap->page_size; 110d4b: 8b 53 10 mov 0x10(%ebx),%edx 110d4e: 89 55 d4 mov %edx,-0x2c(%ebp) uintptr_t const min_block_size = heap->min_block_size; 110d51: 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; 110d54: 8b 73 30 mov 0x30(%ebx),%esi 110d57: 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 ) { 110d5a: 8b 55 0c mov 0xc(%ebp),%edx 110d5d: 01 ca add %ecx,%edx 110d5f: 89 55 cc mov %edx,-0x34(%ebp) 110d62: 73 0c jae 110d70 <_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; 110d64: 31 c0 xor %eax,%eax if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 110d66: 8d 65 f4 lea -0xc(%ebp),%esp 110d69: 5b pop %ebx 110d6a: 5e pop %esi 110d6b: 5f pop %edi 110d6c: c9 leave 110d6d: c3 ret 110d6e: 66 90 xchg %ax,%ax if ( extend_area_end < extend_area_begin ) { return false; } extend_area_ok = _Heap_Get_first_and_last_block( 110d70: 83 ec 08 sub $0x8,%esp 110d73: 8d 55 e0 lea -0x20(%ebp),%edx 110d76: 52 push %edx 110d77: 8d 55 e4 lea -0x1c(%ebp),%edx 110d7a: 52 push %edx 110d7b: 50 push %eax 110d7c: ff 75 d4 pushl -0x2c(%ebp) 110d7f: 51 push %ecx 110d80: ff 75 0c pushl 0xc(%ebp) 110d83: e8 08 bc ff ff call 10c990 <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 110d88: 83 c4 20 add $0x20,%esp 110d8b: 84 c0 test %al,%al 110d8d: 74 d5 je 110d64 <_Heap_Extend+0x3c> 110d8f: 8b 7d d0 mov -0x30(%ebp),%edi 110d92: c7 45 bc 00 00 00 00 movl $0x0,-0x44(%ebp) 110d99: c7 45 b8 00 00 00 00 movl $0x0,-0x48(%ebp) 110da0: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) 110da7: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 110dae: 8b 75 cc mov -0x34(%ebp),%esi 110db1: 89 5d b4 mov %ebx,-0x4c(%ebp) 110db4: eb 30 jmp 110de6 <_Heap_Extend+0xbe> 110db6: 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 ) { 110db8: 39 ce cmp %ecx,%esi 110dba: 73 03 jae 110dbf <_Heap_Extend+0x97> 110dbc: 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); 110dbf: 8d 59 f8 lea -0x8(%ecx),%ebx 110dc2: 89 c8 mov %ecx,%eax 110dc4: 31 d2 xor %edx,%edx 110dc6: 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); 110dc9: 29 d3 sub %edx,%ebx link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 110dcb: 3b 4d 0c cmp 0xc(%ebp),%ecx 110dce: 74 3c je 110e0c <_Heap_Extend+0xe4> start_block->prev_size = extend_area_end; merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 110dd0: 39 4d 0c cmp %ecx,0xc(%ebp) 110dd3: 76 03 jbe 110dd8 <_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 ) 110dd5: 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; 110dd8: 8b 7b 04 mov 0x4(%ebx),%edi 110ddb: 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); 110dde: 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 ); 110de1: 39 7d d0 cmp %edi,-0x30(%ebp) 110de4: 74 39 je 110e1f <_Heap_Extend+0xf7> return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 110de6: 3b 7d d0 cmp -0x30(%ebp),%edi 110de9: 0f 84 39 01 00 00 je 110f28 <_Heap_Extend+0x200> 110def: 89 f8 mov %edi,%eax uintptr_t const sub_area_end = start_block->prev_size; 110df1: 8b 0f mov (%edi),%ecx Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 110df3: 39 4d 0c cmp %ecx,0xc(%ebp) 110df6: 73 08 jae 110e00 <_Heap_Extend+0xd8> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin 110df8: 39 f0 cmp %esi,%eax 110dfa: 0f 82 64 ff ff ff jb 110d64 <_Heap_Extend+0x3c> ) { return false; } if ( extend_area_end == sub_area_begin ) { 110e00: 39 f0 cmp %esi,%eax 110e02: 75 b4 jne 110db8 <_Heap_Extend+0x90> 110e04: 89 7d c4 mov %edi,-0x3c(%ebp) 110e07: eb b6 jmp 110dbf <_Heap_Extend+0x97> 110e09: 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; 110e0c: 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 ) 110e0e: 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; 110e11: 8b 7b 04 mov 0x4(%ebx),%edi 110e14: 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); 110e17: 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 ); 110e1a: 39 7d d0 cmp %edi,-0x30(%ebp) 110e1d: 75 c7 jne 110de6 <_Heap_Extend+0xbe> <== NEVER TAKEN 110e1f: 8b 5d b4 mov -0x4c(%ebp),%ebx if ( extend_area_begin < heap->area_begin ) { 110e22: 8b 75 0c mov 0xc(%ebp),%esi 110e25: 3b 73 18 cmp 0x18(%ebx),%esi 110e28: 0f 82 06 01 00 00 jb 110f34 <_Heap_Extend+0x20c> heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { 110e2e: 8b 45 cc mov -0x34(%ebp),%eax 110e31: 3b 43 1c cmp 0x1c(%ebx),%eax 110e34: 76 03 jbe 110e39 <_Heap_Extend+0x111> heap->area_end = extend_area_end; 110e36: 89 43 1c mov %eax,0x1c(%ebx) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 110e39: 8b 55 e0 mov -0x20(%ebp),%edx 110e3c: 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 = 110e3f: 89 d1 mov %edx,%ecx 110e41: 29 c1 sub %eax,%ecx (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 110e43: 8b 75 cc mov -0x34(%ebp),%esi 110e46: 89 30 mov %esi,(%eax) extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 110e48: 89 ce mov %ecx,%esi 110e4a: 83 ce 01 or $0x1,%esi 110e4d: 89 70 04 mov %esi,0x4(%eax) _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 110e50: 89 0a mov %ecx,(%edx) extend_last_block->size_and_flag = 0; 110e52: 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 ) { 110e59: 39 43 20 cmp %eax,0x20(%ebx) 110e5c: 0f 86 da 00 00 00 jbe 110f3c <_Heap_Extend+0x214> heap->first_block = extend_first_block; 110e62: 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 ) { 110e65: 8b 75 c4 mov -0x3c(%ebp),%esi 110e68: 85 f6 test %esi,%esi 110e6a: 0f 84 10 01 00 00 je 110f80 <_Heap_Extend+0x258> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 110e70: 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 ); 110e73: 8b 4d 0c mov 0xc(%ebp),%ecx 110e76: 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; 110e79: 89 c8 mov %ecx,%eax 110e7b: 31 d2 xor %edx,%edx 110e7d: f7 f6 div %esi if ( remainder != 0 ) { 110e7f: 85 d2 test %edx,%edx 110e81: 0f 84 c9 00 00 00 je 110f50 <_Heap_Extend+0x228> return value - remainder + alignment; 110e87: 8d 04 31 lea (%ecx,%esi,1),%eax 110e8a: 29 d0 sub %edx,%eax uintptr_t const new_first_block_begin = 110e8c: 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; 110e8f: 8b 75 c4 mov -0x3c(%ebp),%esi 110e92: 8b 0e mov (%esi),%ecx 110e94: 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 = 110e97: 89 f0 mov %esi,%eax 110e99: 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; 110e9b: 83 c8 01 or $0x1,%eax 110e9e: 89 42 04 mov %eax,0x4(%edx) _Heap_Free_block( heap, new_first_block ); 110ea1: 89 d8 mov %ebx,%eax 110ea3: e8 64 fe ff ff call 110d0c <_Heap_Free_block> link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 110ea8: 8b 45 c8 mov -0x38(%ebp),%eax 110eab: 85 c0 test %eax,%eax 110ead: 0f 84 a5 00 00 00 je 110f58 <_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, 110eb3: 8b 4d cc mov -0x34(%ebp),%ecx 110eb6: 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( 110eb9: 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); 110ebc: 89 c8 mov %ecx,%eax 110ebe: 31 d2 xor %edx,%edx 110ec0: f7 73 10 divl 0x10(%ebx) 110ec3: 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) 110ec5: 8b 55 c8 mov -0x38(%ebp),%edx 110ec8: 8b 42 04 mov 0x4(%edx),%eax 110ecb: 29 c8 sub %ecx,%eax | HEAP_PREV_BLOCK_USED; 110ecd: 83 c8 01 or $0x1,%eax 110ed0: 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; 110ed4: 8b 42 04 mov 0x4(%edx),%eax 110ed7: 83 e0 01 and $0x1,%eax block->size_and_flag = size | flag; 110eda: 09 c8 or %ecx,%eax 110edc: 89 42 04 mov %eax,0x4(%edx) _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 110edf: 89 d8 mov %ebx,%eax 110ee1: e8 26 fe ff ff call 110d0c <_Heap_Free_block> extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 110ee6: 8b 75 c4 mov -0x3c(%ebp),%esi 110ee9: 85 f6 test %esi,%esi 110eeb: 0f 84 ab 00 00 00 je 110f9c <_Heap_Extend+0x274> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 110ef1: 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( 110ef4: 8b 43 20 mov 0x20(%ebx),%eax 110ef7: 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; 110ef9: 8b 4a 04 mov 0x4(%edx),%ecx 110efc: 83 e1 01 and $0x1,%ecx block->size_and_flag = size | flag; 110eff: 09 c8 or %ecx,%eax 110f01: 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; 110f04: 8b 43 30 mov 0x30(%ebx),%eax 110f07: 2b 45 c0 sub -0x40(%ebp),%eax /* Statistics */ stats->size += extended_size; 110f0a: 01 43 2c add %eax,0x2c(%ebx) if ( extended_size_ptr != NULL ) 110f0d: 8b 55 14 mov 0x14(%ebp),%edx 110f10: 85 d2 test %edx,%edx 110f12: 0f 84 a0 00 00 00 je 110fb8 <_Heap_Extend+0x290> <== NEVER TAKEN *extended_size_ptr = extended_size; 110f18: 8b 55 14 mov 0x14(%ebp),%edx 110f1b: 89 02 mov %eax,(%edx) return true; 110f1d: b0 01 mov $0x1,%al } 110f1f: 8d 65 f4 lea -0xc(%ebp),%esp 110f22: 5b pop %ebx 110f23: 5e pop %esi 110f24: 5f pop %edi 110f25: c9 leave 110f26: c3 ret 110f27: 90 nop return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 110f28: 8b 55 b4 mov -0x4c(%ebp),%edx 110f2b: 8b 42 18 mov 0x18(%edx),%eax 110f2e: e9 be fe ff ff jmp 110df1 <_Heap_Extend+0xc9> 110f33: 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; 110f34: 89 73 18 mov %esi,0x18(%ebx) 110f37: e9 fd fe ff ff jmp 110e39 <_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 ) { 110f3c: 39 53 24 cmp %edx,0x24(%ebx) 110f3f: 0f 83 20 ff ff ff jae 110e65 <_Heap_Extend+0x13d> heap->last_block = extend_last_block; 110f45: 89 53 24 mov %edx,0x24(%ebx) 110f48: e9 18 ff ff ff jmp 110e65 <_Heap_Extend+0x13d> 110f4d: 8d 76 00 lea 0x0(%esi),%esi uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; } else { return value; 110f50: 89 c8 mov %ecx,%eax 110f52: e9 35 ff ff ff jmp 110e8c <_Heap_Extend+0x164> 110f57: 90 nop ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 110f58: 8b 7d bc mov -0x44(%ebp),%edi 110f5b: 85 ff test %edi,%edi 110f5d: 74 87 je 110ee6 <_Heap_Extend+0x1be> _Heap_Link_above( 110f5f: 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 ); 110f62: 8b 45 e4 mov -0x1c(%ebp),%eax 110f65: 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; 110f68: 8b 75 bc mov -0x44(%ebp),%esi 110f6b: 8b 56 04 mov 0x4(%esi),%edx 110f6e: 83 e2 01 and $0x1,%edx block->size_and_flag = size | flag; 110f71: 09 d0 or %edx,%eax 110f73: 89 46 04 mov %eax,0x4(%esi) last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 110f76: 83 49 04 01 orl $0x1,0x4(%ecx) 110f7a: e9 67 ff ff ff jmp 110ee6 <_Heap_Extend+0x1be> 110f7f: 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 ) { 110f80: 8b 4d b8 mov -0x48(%ebp),%ecx 110f83: 85 c9 test %ecx,%ecx 110f85: 0f 84 1d ff ff ff je 110ea8 <_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; 110f8b: 8b 45 b8 mov -0x48(%ebp),%eax 110f8e: 29 d0 sub %edx,%eax 110f90: 83 c8 01 or $0x1,%eax 110f93: 89 42 04 mov %eax,0x4(%edx) 110f96: e9 0d ff ff ff jmp 110ea8 <_Heap_Extend+0x180> 110f9b: 90 nop extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 110f9c: 8b 4d c8 mov -0x38(%ebp),%ecx 110f9f: 85 c9 test %ecx,%ecx 110fa1: 0f 85 4a ff ff ff jne 110ef1 <_Heap_Extend+0x1c9> _Heap_Free_block( heap, extend_first_block ); 110fa7: 8b 55 e4 mov -0x1c(%ebp),%edx 110faa: 89 d8 mov %ebx,%eax 110fac: e8 5b fd ff ff call 110d0c <_Heap_Free_block> 110fb1: e9 3b ff ff ff jmp 110ef1 <_Heap_Extend+0x1c9> 110fb6: 66 90 xchg %ax,%ax stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 110fb8: b0 01 mov $0x1,%al <== NOT EXECUTED 110fba: e9 a7 fd ff ff jmp 110d66 <_Heap_Extend+0x3e> <== NOT EXECUTED =============================================================================== 0011093c <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 11093c: 55 push %ebp 11093d: 89 e5 mov %esp,%ebp 11093f: 57 push %edi 110940: 56 push %esi 110941: 53 push %ebx 110942: 83 ec 10 sub $0x10,%esp 110945: 8b 4d 08 mov 0x8(%ebp),%ecx 110948: 8b 45 0c mov 0xc(%ebp),%eax /* * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { 11094b: 85 c0 test %eax,%eax 11094d: 0f 84 e9 00 00 00 je 110a3c <_Heap_Free+0x100> 110953: 8d 58 f8 lea -0x8(%eax),%ebx 110956: 31 d2 xor %edx,%edx 110958: f7 71 10 divl 0x10(%ecx) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 11095b: 29 d3 sub %edx,%ebx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11095d: 8b 41 20 mov 0x20(%ecx),%eax && (uintptr_t) block <= (uintptr_t) heap->last_block; 110960: 39 c3 cmp %eax,%ebx 110962: 72 1c jb 110980 <_Heap_Free+0x44> 110964: 8b 71 24 mov 0x24(%ecx),%esi 110967: 39 f3 cmp %esi,%ebx 110969: 77 15 ja 110980 <_Heap_Free+0x44> <== NEVER TAKEN --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 11096b: 8b 53 04 mov 0x4(%ebx),%edx 11096e: 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; 110971: 83 e2 fe and $0xfffffffe,%edx 110974: 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); 110977: 8d 14 13 lea (%ebx,%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; 11097a: 39 d0 cmp %edx,%eax 11097c: 76 0e jbe 11098c <_Heap_Free+0x50> <== ALWAYS TAKEN 11097e: 66 90 xchg %ax,%ax /* 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 ); 110980: 31 c0 xor %eax,%eax --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 110982: 83 c4 10 add $0x10,%esp 110985: 5b pop %ebx 110986: 5e pop %esi 110987: 5f pop %edi 110988: c9 leave 110989: c3 ret 11098a: 66 90 xchg %ax,%ax 11098c: 39 d6 cmp %edx,%esi 11098e: 72 f0 jb 110980 <_Heap_Free+0x44> <== NEVER TAKEN 110990: 8b 7a 04 mov 0x4(%edx),%edi return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 110993: f7 c7 01 00 00 00 test $0x1,%edi 110999: 74 e5 je 110980 <_Heap_Free+0x44> <== 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; 11099b: 83 e7 fe and $0xfffffffe,%edi 11099e: 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 )); 1109a1: 39 d6 cmp %edx,%esi 1109a3: 0f 84 d3 00 00 00 je 110a7c <_Heap_Free+0x140> return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 1109a9: f6 44 3a 04 01 testb $0x1,0x4(%edx,%edi,1) 1109ae: 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 ) ) { 1109b2: f6 45 f0 01 testb $0x1,-0x10(%ebp) 1109b6: 75 44 jne 1109fc <_Heap_Free+0xc0> uintptr_t const prev_size = block->prev_size; 1109b8: 8b 3b mov (%ebx),%edi 1109ba: 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); 1109bd: 29 fb sub %edi,%ebx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 1109bf: 39 d8 cmp %ebx,%eax 1109c1: 77 bd ja 110980 <_Heap_Free+0x44> <== NEVER TAKEN 1109c3: 39 de cmp %ebx,%esi 1109c5: 72 b9 jb 110980 <_Heap_Free+0x44> <== 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) ) { 1109c7: f6 43 04 01 testb $0x1,0x4(%ebx) 1109cb: 74 b3 je 110980 <_Heap_Free+0x44> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 1109cd: 80 7d eb 00 cmpb $0x0,-0x15(%ebp) 1109d1: 0f 84 b1 00 00 00 je 110a88 <_Heap_Free+0x14c> uintptr_t const size = block_size + prev_size + next_block_size; 1109d7: 8b 7d e4 mov -0x1c(%ebp),%edi 1109da: 03 7d ec add -0x14(%ebp),%edi 1109dd: 03 7d f0 add -0x10(%ebp),%edi --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 1109e0: 8b 42 08 mov 0x8(%edx),%eax 1109e3: 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; 1109e6: 89 42 08 mov %eax,0x8(%edx) next->prev = prev; 1109e9: 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; 1109ec: ff 49 38 decl 0x38(%ecx) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 1109ef: 89 f8 mov %edi,%eax 1109f1: 83 c8 01 or $0x1,%eax 1109f4: 89 43 04 mov %eax,0x4(%ebx) next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 1109f7: 89 3c 3b mov %edi,(%ebx,%edi,1) 1109fa: eb 29 jmp 110a25 <_Heap_Free+0xe9> 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 */ 1109fc: 80 7d eb 00 cmpb $0x0,-0x15(%ebp) 110a00: 74 46 je 110a48 <_Heap_Free+0x10c> uintptr_t const size = block_size + next_block_size; 110a02: 8b 7d e4 mov -0x1c(%ebp),%edi 110a05: 03 7d ec add -0x14(%ebp),%edi --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 110a08: 8b 42 08 mov 0x8(%edx),%eax 110a0b: 8b 52 0c mov 0xc(%edx),%edx ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 110a0e: 89 43 08 mov %eax,0x8(%ebx) new_block->prev = prev; 110a11: 89 53 0c mov %edx,0xc(%ebx) next->prev = new_block; 110a14: 89 58 0c mov %ebx,0xc(%eax) prev->next = new_block; 110a17: 89 5a 08 mov %ebx,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; 110a1a: 89 f8 mov %edi,%eax 110a1c: 83 c8 01 or $0x1,%eax 110a1f: 89 43 04 mov %eax,0x4(%ebx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 110a22: 89 3c 3b mov %edi,(%ebx,%edi,1) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 110a25: ff 49 40 decl 0x40(%ecx) ++stats->frees; 110a28: ff 41 50 incl 0x50(%ecx) stats->free_size += block_size; 110a2b: 8b 55 ec mov -0x14(%ebp),%edx 110a2e: 01 51 30 add %edx,0x30(%ecx) return( true ); 110a31: b0 01 mov $0x1,%al } 110a33: 83 c4 10 add $0x10,%esp 110a36: 5b pop %ebx 110a37: 5e pop %esi 110a38: 5f pop %edi 110a39: c9 leave 110a3a: c3 ret 110a3b: 90 nop * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { return true; 110a3c: b0 01 mov $0x1,%al --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 110a3e: 83 c4 10 add $0x10,%esp 110a41: 5b pop %ebx 110a42: 5e pop %esi 110a43: 5f pop %edi 110a44: c9 leave 110a45: c3 ret 110a46: 66 90 xchg %ax,%ax RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 110a48: 8b 41 08 mov 0x8(%ecx),%eax new_block->next = next; 110a4b: 89 43 08 mov %eax,0x8(%ebx) new_block->prev = block_before; 110a4e: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 110a51: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 110a54: 89 58 0c mov %ebx,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; 110a57: 8b 45 ec mov -0x14(%ebp),%eax 110a5a: 83 c8 01 or $0x1,%eax 110a5d: 89 43 04 mov %eax,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 110a60: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = block_size; 110a64: 8b 45 ec mov -0x14(%ebp),%eax 110a67: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->free_blocks; 110a69: 8b 41 38 mov 0x38(%ecx),%eax 110a6c: 40 inc %eax 110a6d: 89 41 38 mov %eax,0x38(%ecx) if ( stats->max_free_blocks < stats->free_blocks ) { 110a70: 3b 41 3c cmp 0x3c(%ecx),%eax 110a73: 76 b0 jbe 110a25 <_Heap_Free+0xe9> stats->max_free_blocks = stats->free_blocks; 110a75: 89 41 3c mov %eax,0x3c(%ecx) 110a78: eb ab jmp 110a25 <_Heap_Free+0xe9> 110a7a: 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 )); 110a7c: c6 45 eb 00 movb $0x0,-0x15(%ebp) 110a80: e9 2d ff ff ff jmp 1109b2 <_Heap_Free+0x76> 110a85: 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; 110a88: 8b 45 ec mov -0x14(%ebp),%eax 110a8b: 03 45 f0 add -0x10(%ebp),%eax prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 110a8e: 89 c6 mov %eax,%esi 110a90: 83 ce 01 or $0x1,%esi 110a93: 89 73 04 mov %esi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 110a96: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 110a9a: 89 02 mov %eax,(%edx) 110a9c: eb 87 jmp 110a25 <_Heap_Free+0xe9> =============================================================================== 0010c604 <_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 ) { 10c604: 55 push %ebp 10c605: 89 e5 mov %esp,%ebp 10c607: 57 push %edi 10c608: 56 push %esi 10c609: 53 push %ebx 10c60a: 8b 4d 08 mov 0x8(%ebp),%ecx 10c60d: 8b 7d 0c mov 0xc(%ebp),%edi uintptr_t const heap_area_end = heap_area_begin + heap_area_size; 10c610: 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 ); 10c613: 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; 10c616: 89 d8 mov %ebx,%eax 10c618: 31 d2 xor %edx,%edx 10c61a: f7 75 10 divl 0x10(%ebp) if ( remainder != 0 ) { 10c61d: 85 d2 test %edx,%edx 10c61f: 74 05 je 10c626 <_Heap_Get_first_and_last_block+0x22> return value - remainder + alignment; 10c621: 03 5d 10 add 0x10(%ebp),%ebx 10c624: 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 ( 10c626: 39 f1 cmp %esi,%ecx 10c628: 77 2e ja 10c658 <_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); 10c62a: 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 = 10c62d: 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 10c62f: 39 df cmp %ebx,%edi 10c631: 76 25 jbe 10c658 <_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 ); 10c633: 29 df sub %ebx,%edi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10c635: 89 f8 mov %edi,%eax 10c637: 31 d2 xor %edx,%edx 10c639: f7 75 10 divl 0x10(%ebp) 10c63c: 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 10c63e: 39 7d 14 cmp %edi,0x14(%ebp) 10c641: 77 15 ja 10c658 <_Heap_Get_first_and_last_block+0x54> ) { /* Invalid area or area too small */ return false; } *first_block_ptr = first_block; 10c643: 8b 45 18 mov 0x18(%ebp),%eax 10c646: 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); 10c648: 01 f7 add %esi,%edi 10c64a: 8b 45 1c mov 0x1c(%ebp),%eax 10c64d: 89 38 mov %edi,(%eax) *last_block_ptr = last_block; return true; 10c64f: b0 01 mov $0x1,%al } 10c651: 5b pop %ebx 10c652: 5e pop %esi 10c653: 5f pop %edi 10c654: c9 leave 10c655: c3 ret 10c656: 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; 10c658: 31 c0 xor %eax,%eax *first_block_ptr = first_block; *last_block_ptr = last_block; return true; } 10c65a: 5b pop %ebx 10c65b: 5e pop %esi 10c65c: 5f pop %edi 10c65d: c9 leave 10c65e: c3 ret =============================================================================== 001146c0 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 1146c0: 55 push %ebp 1146c1: 89 e5 mov %esp,%ebp 1146c3: 57 push %edi 1146c4: 56 push %esi 1146c5: 53 push %ebx 1146c6: 8b 7d 0c mov 0xc(%ebp),%edi Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 1146c9: c7 07 00 00 00 00 movl $0x0,(%edi) info->largest = 0; 1146cf: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) info->total = 0; 1146d6: 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; } } 1146dd: 8b 45 08 mov 0x8(%ebp),%eax 1146e0: 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); 1146e3: 39 d0 cmp %edx,%eax 1146e5: 74 31 je 114718 <_Heap_Get_free_information+0x58> 1146e7: b9 01 00 00 00 mov $0x1,%ecx 1146ec: 31 f6 xor %esi,%esi 1146ee: 31 db xor %ebx,%ebx 1146f0: eb 07 jmp 1146f9 <_Heap_Get_free_information+0x39> 1146f2: 66 90 xchg %ax,%ax 1146f4: 8b 77 04 mov 0x4(%edi),%esi 1146f7: 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; 1146f9: 8b 42 04 mov 0x4(%edx),%eax 1146fc: 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; 1146ff: 01 c3 add %eax,%ebx if ( info->largest < the_size ) 114701: 39 f0 cmp %esi,%eax 114703: 76 03 jbe 114708 <_Heap_Get_free_information+0x48> info->largest = the_size; 114705: 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) 114708: 8b 52 08 mov 0x8(%edx),%edx 11470b: 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); 11470e: 39 55 08 cmp %edx,0x8(%ebp) 114711: 75 e1 jne 1146f4 <_Heap_Get_free_information+0x34> 114713: 89 0f mov %ecx,(%edi) 114715: 89 5f 08 mov %ebx,0x8(%edi) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 114718: 5b pop %ebx 114719: 5e pop %esi 11471a: 5f pop %edi 11471b: c9 leave 11471c: c3 ret =============================================================================== 001114c8 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 1114c8: 55 push %ebp 1114c9: 89 e5 mov %esp,%ebp 1114cb: 57 push %edi 1114cc: 56 push %esi 1114cd: 53 push %ebx 1114ce: 83 ec 04 sub $0x4,%esp 1114d1: 8b 45 08 mov 0x8(%ebp),%eax 1114d4: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Block *the_block = the_heap->first_block; 1114d7: 8b 50 20 mov 0x20(%eax),%edx Heap_Block *const end = the_heap->last_block; 1114da: 8b 40 24 mov 0x24(%eax),%eax 1114dd: 89 45 f0 mov %eax,-0x10(%ebp) memset(the_info, 0, sizeof(*the_info)); 1114e0: b9 18 00 00 00 mov $0x18,%ecx 1114e5: 31 c0 xor %eax,%eax 1114e7: 89 df mov %ebx,%edi 1114e9: f3 aa rep stos %al,%es:(%edi) while ( the_block != end ) { 1114eb: 3b 55 f0 cmp -0x10(%ebp),%edx 1114ee: 74 38 je 111528 <_Heap_Get_information+0x60><== NEVER TAKEN 1114f0: 8b 7a 04 mov 0x4(%edx),%edi 1114f3: eb 18 jmp 11150d <_Heap_Get_information+0x45> 1114f5: 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; 1114f8: 8d 43 0c lea 0xc(%ebx),%eax else info = &the_info->Free; info->number++; 1114fb: ff 00 incl (%eax) info->total += the_size; 1114fd: 01 48 08 add %ecx,0x8(%eax) if ( info->largest < the_size ) 111500: 39 48 04 cmp %ecx,0x4(%eax) 111503: 73 03 jae 111508 <_Heap_Get_information+0x40> info->largest = the_size; 111505: 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 ) { 111508: 39 75 f0 cmp %esi,-0x10(%ebp) 11150b: 74 1b je 111528 <_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; 11150d: 89 f9 mov %edi,%ecx 11150f: 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); 111512: 8d 34 0a lea (%edx,%ecx,1),%esi 111515: 89 f2 mov %esi,%edx if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 111517: 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) ) 11151a: f7 c7 01 00 00 00 test $0x1,%edi 111520: 75 d6 jne 1114f8 <_Heap_Get_information+0x30> info = &the_info->Used; else info = &the_info->Free; 111522: 89 d8 mov %ebx,%eax 111524: eb d5 jmp 1114fb <_Heap_Get_information+0x33> 111526: 66 90 xchg %ax,%ax if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 111528: 58 pop %eax 111529: 5b pop %ebx 11152a: 5e pop %esi 11152b: 5f pop %edi 11152c: c9 leave 11152d: c3 ret =============================================================================== 0011e588 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 11e588: 55 push %ebp 11e589: 89 e5 mov %esp,%ebp 11e58b: 57 push %edi 11e58c: 56 push %esi 11e58d: 53 push %ebx 11e58e: 83 ec 2c sub $0x2c,%esp 11e591: 8b 5d 08 mov 0x8(%ebp),%ebx 11e594: 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); 11e597: 8d 4e f8 lea -0x8(%esi),%ecx 11e59a: 89 f0 mov %esi,%eax 11e59c: 31 d2 xor %edx,%edx 11e59e: 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); 11e5a1: 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; 11e5a3: 8b 45 14 mov 0x14(%ebp),%eax 11e5a6: c7 00 00 00 00 00 movl $0x0,(%eax) *new_size = 0; 11e5ac: 8b 55 18 mov 0x18(%ebp),%edx 11e5af: 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; 11e5b5: 39 4b 20 cmp %ecx,0x20(%ebx) 11e5b8: 77 05 ja 11e5bf <_Heap_Resize_block+0x37> 11e5ba: 39 4b 24 cmp %ecx,0x24(%ebx) 11e5bd: 73 0d jae 11e5cc <_Heap_Resize_block+0x44> new_alloc_size, old_size, new_size ); } return HEAP_RESIZE_FATAL_ERROR; 11e5bf: b8 02 00 00 00 mov $0x2,%eax } 11e5c4: 8d 65 f4 lea -0xc(%ebp),%esp 11e5c7: 5b pop %ebx 11e5c8: 5e pop %esi 11e5c9: 5f pop %edi 11e5ca: c9 leave 11e5cb: 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; 11e5cc: 8b 41 04 mov 0x4(%ecx),%eax 11e5cf: 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; 11e5d2: 8d 3c 01 lea (%ecx,%eax,1),%edi 11e5d5: 89 7d d4 mov %edi,-0x2c(%ebp) uintptr_t alloc_size = block_end - alloc_begin + HEAP_ALLOC_BONUS; 11e5d8: 89 fa mov %edi,%edx 11e5da: 29 f2 sub %esi,%edx 11e5dc: 83 c2 04 add $0x4,%edx 11e5df: 89 55 e0 mov %edx,-0x20(%ebp) 11e5e2: 8b 57 04 mov 0x4(%edi),%edx 11e5e5: 83 e2 fe and $0xfffffffe,%edx 11e5e8: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 11e5eb: f6 44 17 04 01 testb $0x1,0x4(%edi,%edx,1) 11e5f0: 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; 11e5f4: 8b 55 e0 mov -0x20(%ebp),%edx 11e5f7: 8b 7d 14 mov 0x14(%ebp),%edi 11e5fa: 89 17 mov %edx,(%edi) if ( next_block_is_free ) { 11e5fc: 80 7d df 00 cmpb $0x0,-0x21(%ebp) 11e600: 75 6e jne 11e670 <_Heap_Resize_block+0xe8> block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { 11e602: 8b 55 e0 mov -0x20(%ebp),%edx 11e605: 39 55 10 cmp %edx,0x10(%ebp) 11e608: 77 79 ja 11e683 <_Heap_Resize_block+0xfb> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 11e60a: 80 7d df 00 cmpb $0x0,-0x21(%ebp) 11e60e: 74 31 je 11e641 <_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; 11e610: 8b 79 04 mov 0x4(%ecx),%edi 11e613: 83 e7 01 and $0x1,%edi block->size_and_flag = size | flag; 11e616: 09 c7 or %eax,%edi 11e618: 89 79 04 mov %edi,0x4(%ecx) old_size, new_size ); } return HEAP_RESIZE_FATAL_ERROR; } 11e61b: 8b 7d d4 mov -0x2c(%ebp),%edi 11e61e: 8b 7f 08 mov 0x8(%edi),%edi 11e621: 89 7d e4 mov %edi,-0x1c(%ebp) 11e624: 8b 55 d4 mov -0x2c(%ebp),%edx 11e627: 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; 11e62a: 8b 55 e4 mov -0x1c(%ebp),%edx 11e62d: 89 57 08 mov %edx,0x8(%edi) next->prev = prev; 11e630: 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; 11e633: 83 4c 01 04 01 orl $0x1,0x4(%ecx,%eax,1) /* Statistics */ --stats->free_blocks; 11e638: ff 4b 38 decl 0x38(%ebx) stats->free_size -= next_block_size; 11e63b: 8b 7d d0 mov -0x30(%ebp),%edi 11e63e: 29 7b 30 sub %edi,0x30(%ebx) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 11e641: ff 75 10 pushl 0x10(%ebp) 11e644: 56 push %esi 11e645: 51 push %ecx 11e646: 53 push %ebx 11e647: e8 28 e1 fe ff call 10c774 <_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; 11e64c: 8b 50 04 mov 0x4(%eax),%edx 11e64f: 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; 11e652: 29 f0 sub %esi,%eax 11e654: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 11e658: 8b 55 18 mov 0x18(%ebp),%edx 11e65b: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->resizes; 11e65d: ff 43 54 incl 0x54(%ebx) 11e660: 83 c4 10 add $0x10,%esp return HEAP_RESIZE_SUCCESSFUL; 11e663: 31 c0 xor %eax,%eax old_size, new_size ); } return HEAP_RESIZE_FATAL_ERROR; } 11e665: 8d 65 f4 lea -0xc(%ebp),%esp 11e668: 5b pop %ebx 11e669: 5e pop %esi 11e66a: 5f pop %edi 11e66b: c9 leave 11e66c: c3 ret 11e66d: 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; 11e670: 03 45 d0 add -0x30(%ebp),%eax alloc_size += next_block_size; 11e673: 8b 7d d0 mov -0x30(%ebp),%edi 11e676: 01 fa add %edi,%edx 11e678: 89 55 e0 mov %edx,-0x20(%ebp) } if ( new_alloc_size > alloc_size ) { 11e67b: 8b 55 e0 mov -0x20(%ebp),%edx 11e67e: 39 55 10 cmp %edx,0x10(%ebp) 11e681: 76 87 jbe 11e60a <_Heap_Resize_block+0x82> return HEAP_RESIZE_UNSATISFIED; 11e683: b8 01 00 00 00 mov $0x1,%eax old_size, new_size ); } return HEAP_RESIZE_FATAL_ERROR; } 11e688: 8d 65 f4 lea -0xc(%ebp),%esp 11e68b: 5b pop %ebx 11e68c: 5e pop %esi 11e68d: 5f pop %edi 11e68e: c9 leave 11e68f: c3 ret =============================================================================== 0011e690 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11e690: 55 push %ebp 11e691: 89 e5 mov %esp,%ebp 11e693: 56 push %esi 11e694: 53 push %ebx 11e695: 8b 5d 08 mov 0x8(%ebp),%ebx 11e698: 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); 11e69b: 8d 4e f8 lea -0x8(%esi),%ecx 11e69e: 89 f0 mov %esi,%eax 11e6a0: 31 d2 xor %edx,%edx 11e6a2: 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); 11e6a5: 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 11e6a7: 8b 43 20 mov 0x20(%ebx),%eax && (uintptr_t) block <= (uintptr_t) heap->last_block; 11e6aa: 39 c1 cmp %eax,%ecx 11e6ac: 72 07 jb 11e6b5 <_Heap_Size_of_alloc_area+0x25> 11e6ae: 8b 53 24 mov 0x24(%ebx),%edx 11e6b1: 39 d1 cmp %edx,%ecx 11e6b3: 76 07 jbe 11e6bc <_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; 11e6b5: 31 c0 xor %eax,%eax } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; } 11e6b7: 5b pop %ebx 11e6b8: 5e pop %esi 11e6b9: c9 leave 11e6ba: c3 ret 11e6bb: 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; 11e6bc: 8b 59 04 mov 0x4(%ecx),%ebx 11e6bf: 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); 11e6c2: 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; 11e6c4: 39 c8 cmp %ecx,%eax 11e6c6: 77 ed ja 11e6b5 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN 11e6c8: 39 ca cmp %ecx,%edx 11e6ca: 72 e9 jb 11e6b5 <_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 ) 11e6cc: f6 41 04 01 testb $0x1,0x4(%ecx) 11e6d0: 74 e3 je 11e6b5 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 11e6d2: 29 f1 sub %esi,%ecx 11e6d4: 8d 51 04 lea 0x4(%ecx),%edx 11e6d7: 8b 45 10 mov 0x10(%ebp),%eax 11e6da: 89 10 mov %edx,(%eax) return true; 11e6dc: b0 01 mov $0x1,%al } 11e6de: 5b pop %ebx 11e6df: 5e pop %esi 11e6e0: c9 leave 11e6e1: c3 ret =============================================================================== 0010d2bc <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10d2bc: 55 push %ebp 10d2bd: 89 e5 mov %esp,%ebp 10d2bf: 57 push %edi 10d2c0: 56 push %esi 10d2c1: 53 push %ebx 10d2c2: 83 ec 4c sub $0x4c,%esp 10d2c5: 8b 5d 08 mov 0x8(%ebp),%ebx uintptr_t const page_size = heap->page_size; 10d2c8: 8b 43 10 mov 0x10(%ebx),%eax 10d2cb: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10d2ce: 8b 53 14 mov 0x14(%ebx),%edx 10d2d1: 89 55 d0 mov %edx,-0x30(%ebp) Heap_Block *const first_block = heap->first_block; 10d2d4: 8b 43 20 mov 0x20(%ebx),%eax 10d2d7: 89 45 dc mov %eax,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10d2da: 8b 53 24 mov 0x24(%ebx),%edx 10d2dd: 89 55 cc mov %edx,-0x34(%ebp) Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d2e0: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10d2e4: 74 1a je 10d300 <_Heap_Walk+0x44> 10d2e6: c7 45 d8 74 d2 10 00 movl $0x10d274,-0x28(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d2ed: 83 3d 00 87 12 00 03 cmpl $0x3,0x128700 10d2f4: 74 1a je 10d310 <_Heap_Walk+0x54> <== ALWAYS TAKEN } block = next_block; } while ( block != first_block ); return true; 10d2f6: b0 01 mov $0x1,%al } 10d2f8: 8d 65 f4 lea -0xc(%ebp),%esp 10d2fb: 5b pop %ebx 10d2fc: 5e pop %esi 10d2fd: 5f pop %edi 10d2fe: c9 leave 10d2ff: c3 ret uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d300: c7 45 d8 6c d2 10 00 movl $0x10d26c,-0x28(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d307: 83 3d 00 87 12 00 03 cmpl $0x3,0x128700 10d30e: 75 e6 jne 10d2f6 <_Heap_Walk+0x3a> Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 10d310: 52 push %edx 10d311: ff 73 0c pushl 0xc(%ebx) 10d314: ff 73 08 pushl 0x8(%ebx) 10d317: ff 75 cc pushl -0x34(%ebp) 10d31a: ff 75 dc pushl -0x24(%ebp) 10d31d: ff 73 1c pushl 0x1c(%ebx) 10d320: ff 73 18 pushl 0x18(%ebx) 10d323: ff 75 d0 pushl -0x30(%ebp) 10d326: ff 75 e0 pushl -0x20(%ebp) 10d329: 68 44 16 12 00 push $0x121644 10d32e: 6a 00 push $0x0 10d330: ff 75 0c pushl 0xc(%ebp) 10d333: ff 55 d8 call *-0x28(%ebp) heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 10d336: 83 c4 30 add $0x30,%esp 10d339: 8b 45 e0 mov -0x20(%ebp),%eax 10d33c: 85 c0 test %eax,%eax 10d33e: 74 70 je 10d3b0 <_Heap_Walk+0xf4> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10d340: f6 45 e0 03 testb $0x3,-0x20(%ebp) 10d344: 75 72 jne 10d3b8 <_Heap_Walk+0xfc> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d346: 8b 45 d0 mov -0x30(%ebp),%eax 10d349: 31 d2 xor %edx,%edx 10d34b: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10d34e: 85 d2 test %edx,%edx 10d350: 75 72 jne 10d3c4 <_Heap_Walk+0x108> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10d352: 8b 45 dc mov -0x24(%ebp),%eax 10d355: 83 c0 08 add $0x8,%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d358: 31 d2 xor %edx,%edx 10d35a: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( 10d35d: 85 d2 test %edx,%edx 10d35f: 75 6f jne 10d3d0 <_Heap_Walk+0x114> block = next_block; } while ( block != first_block ); return true; } 10d361: 8b 45 dc mov -0x24(%ebp),%eax 10d364: 8b 40 04 mov 0x4(%eax),%eax 10d367: 89 45 e4 mov %eax,-0x1c(%ebp) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10d36a: a8 01 test $0x1,%al 10d36c: 0f 84 ce 02 00 00 je 10d640 <_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; 10d372: 8b 55 cc mov -0x34(%ebp),%edx 10d375: 8b 42 04 mov 0x4(%edx),%eax 10d378: 83 e0 fe and $0xfffffffe,%eax RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10d37b: 01 d0 add %edx,%eax ); return false; } if ( _Heap_Is_free( last_block ) ) { 10d37d: f6 40 04 01 testb $0x1,0x4(%eax) 10d381: 74 25 je 10d3a8 <_Heap_Walk+0xec> ); return false; } if ( 10d383: 39 45 dc cmp %eax,-0x24(%ebp) 10d386: 74 54 je 10d3dc <_Heap_Walk+0x120> <== ALWAYS TAKEN _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 10d388: 51 push %ecx <== NOT EXECUTED 10d389: 68 60 17 12 00 push $0x121760 <== NOT EXECUTED 10d38e: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10d390: 6a 01 push $0x1 10d392: ff 75 0c pushl 0xc(%ebp) 10d395: ff 55 d8 call *-0x28(%ebp) 10d398: 83 c4 10 add $0x10,%esp return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 10d39b: 31 c0 xor %eax,%eax block = next_block; } while ( block != first_block ); return true; } 10d39d: 8d 65 f4 lea -0xc(%ebp),%esp 10d3a0: 5b pop %ebx 10d3a1: 5e pop %esi 10d3a2: 5f pop %edi 10d3a3: c9 leave 10d3a4: c3 ret 10d3a5: 8d 76 00 lea 0x0(%esi),%esi return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 10d3a8: 53 push %ebx 10d3a9: 68 fa 15 12 00 push $0x1215fa 10d3ae: eb e0 jmp 10d390 <_Heap_Walk+0xd4> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 10d3b0: 57 push %edi 10d3b1: 68 c9 15 12 00 push $0x1215c9 10d3b6: eb d8 jmp 10d390 <_Heap_Walk+0xd4> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 10d3b8: ff 75 e0 pushl -0x20(%ebp) 10d3bb: 68 dc 15 12 00 push $0x1215dc 10d3c0: eb ce jmp 10d390 <_Heap_Walk+0xd4> 10d3c2: 66 90 xchg %ax,%ax return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 10d3c4: ff 75 d0 pushl -0x30(%ebp) 10d3c7: 68 d8 16 12 00 push $0x1216d8 10d3cc: eb c2 jmp 10d390 <_Heap_Walk+0xd4> 10d3ce: 66 90 xchg %ax,%ax } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10d3d0: ff 75 dc pushl -0x24(%ebp) 10d3d3: 68 fc 16 12 00 push $0x1216fc 10d3d8: eb b6 jmp 10d390 <_Heap_Walk+0xd4> 10d3da: 66 90 xchg %ax,%ax int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10d3dc: 8b 43 10 mov 0x10(%ebx),%eax 10d3df: 89 45 c8 mov %eax,-0x38(%ebp) block = next_block; } while ( block != first_block ); return true; } 10d3e2: 8b 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 ) { 10d3e5: 39 f3 cmp %esi,%ebx 10d3e7: 74 65 je 10d44e <_Heap_Walk+0x192> block = next_block; } while ( block != first_block ); return true; } 10d3e9: 8b 43 20 mov 0x20(%ebx),%eax 10d3ec: 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; 10d3ef: 39 f0 cmp %esi,%eax 10d3f1: 0f 87 55 02 00 00 ja 10d64c <_Heap_Walk+0x390> <== NEVER TAKEN 10d3f7: 8b 7b 24 mov 0x24(%ebx),%edi 10d3fa: 39 f7 cmp %esi,%edi 10d3fc: 0f 82 4a 02 00 00 jb 10d64c <_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; 10d402: 8d 46 08 lea 0x8(%esi),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d405: 31 d2 xor %edx,%edx 10d407: f7 75 c8 divl -0x38(%ebp) ); return false; } if ( 10d40a: 85 d2 test %edx,%edx 10d40c: 0f 85 71 02 00 00 jne 10d683 <_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; 10d412: 8b 46 04 mov 0x4(%esi),%eax 10d415: 83 e0 fe and $0xfffffffe,%eax ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d418: f6 44 06 04 01 testb $0x1,0x4(%esi,%eax,1) 10d41d: 0f 85 6d 02 00 00 jne 10d690 <_Heap_Walk+0x3d4> <== NEVER TAKEN 10d423: 89 da mov %ebx,%edx 10d425: 8d 76 00 lea 0x0(%esi),%esi ); return false; } if ( free_block->prev != prev_block ) { 10d428: 8b 46 0c mov 0xc(%esi),%eax 10d42b: 39 d0 cmp %edx,%eax 10d42d: 0f 85 6a 02 00 00 jne 10d69d <_Heap_Walk+0x3e1> return false; } prev_block = free_block; free_block = free_block->next; 10d433: 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 ) { 10d436: 39 cb cmp %ecx,%ebx 10d438: 74 1a je 10d454 <_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; 10d43a: 39 4d d4 cmp %ecx,-0x2c(%ebp) 10d43d: 0f 86 7d 01 00 00 jbe 10d5c0 <_Heap_Walk+0x304> if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 10d443: 51 push %ecx 10d444: 68 90 17 12 00 push $0x121790 10d449: e9 42 ff ff ff jmp 10d390 <_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 ) { 10d44e: 8b 53 20 mov 0x20(%ebx),%edx 10d451: 89 55 d4 mov %edx,-0x2c(%ebp) ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d454: 8b 7d dc mov -0x24(%ebp),%edi 10d457: 8b 45 d4 mov -0x2c(%ebp),%eax 10d45a: 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; 10d45c: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d45f: 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); 10d462: 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; 10d465: 39 f0 cmp %esi,%eax 10d467: 76 23 jbe 10d48c <_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)( 10d469: 83 ec 0c sub $0xc,%esp 10d46c: 56 push %esi 10d46d: 57 push %edi 10d46e: 68 14 18 12 00 push $0x121814 10d473: 90 nop 10d474: 6a 01 push $0x1 10d476: ff 75 0c pushl 0xc(%ebp) 10d479: ff 55 d8 call *-0x28(%ebp) "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 10d47c: 83 c4 20 add $0x20,%esp 10d47f: 31 c0 xor %eax,%eax block = next_block; } while ( block != first_block ); return true; } 10d481: 8d 65 f4 lea -0xc(%ebp),%esp 10d484: 5b pop %ebx 10d485: 5e pop %esi 10d486: 5f pop %edi 10d487: c9 leave 10d488: c3 ret 10d489: 8d 76 00 lea 0x0(%esi),%esi 10d48c: 39 73 24 cmp %esi,0x24(%ebx) 10d48f: 72 d8 jb 10d469 <_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; 10d491: 3b 7d cc cmp -0x34(%ebp),%edi 10d494: 0f 95 45 d4 setne -0x2c(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d498: 89 c8 mov %ecx,%eax 10d49a: 31 d2 xor %edx,%edx 10d49c: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 10d49f: 85 d2 test %edx,%edx 10d4a1: 74 0a je 10d4ad <_Heap_Walk+0x1f1> 10d4a3: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10d4a7: 0f 85 a6 01 00 00 jne 10d653 <_Heap_Walk+0x397> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 10d4ad: 39 4d d0 cmp %ecx,-0x30(%ebp) 10d4b0: 76 0a jbe 10d4bc <_Heap_Walk+0x200> 10d4b2: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10d4b6: 0f 85 a6 01 00 00 jne 10d662 <_Heap_Walk+0x3a6> <== ALWAYS TAKEN ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 10d4bc: 39 f7 cmp %esi,%edi 10d4be: 72 0a jb 10d4ca <_Heap_Walk+0x20e> 10d4c0: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10d4c4: 0f 85 aa 01 00 00 jne 10d674 <_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; 10d4ca: 8b 55 e4 mov -0x1c(%ebp),%edx 10d4cd: 83 e2 01 and $0x1,%edx ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10d4d0: f6 46 04 01 testb $0x1,0x4(%esi) 10d4d4: 74 4e je 10d524 <_Heap_Walk+0x268> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 10d4d6: 85 d2 test %edx,%edx 10d4d8: 74 2e je 10d508 <_Heap_Walk+0x24c> (*printer)( 10d4da: 83 ec 0c sub $0xc,%esp 10d4dd: 51 push %ecx 10d4de: 57 push %edi 10d4df: 68 2b 16 12 00 push $0x12162b 10d4e4: 6a 00 push $0x0 10d4e6: ff 75 0c pushl 0xc(%ebp) 10d4e9: ff 55 d8 call *-0x28(%ebp) 10d4ec: 83 c4 20 add $0x20,%esp block->prev_size ); } block = next_block; } while ( block != first_block ); 10d4ef: 39 75 dc cmp %esi,-0x24(%ebp) 10d4f2: 0f 84 fe fd ff ff je 10d2f6 <_Heap_Walk+0x3a> 10d4f8: 8b 56 04 mov 0x4(%esi),%edx 10d4fb: 89 55 e4 mov %edx,-0x1c(%ebp) 10d4fe: 8b 43 20 mov 0x20(%ebx),%eax 10d501: 89 f7 mov %esi,%edi 10d503: e9 54 ff ff ff jmp 10d45c <_Heap_Walk+0x1a0> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10d508: 83 ec 08 sub $0x8,%esp 10d50b: ff 37 pushl (%edi) 10d50d: 51 push %ecx 10d50e: 57 push %edi 10d50f: 68 78 19 12 00 push $0x121978 10d514: 6a 00 push $0x0 10d516: ff 75 0c pushl 0xc(%ebp) 10d519: ff 55 d8 call *-0x28(%ebp) 10d51c: 83 c4 20 add $0x20,%esp 10d51f: eb ce jmp 10d4ef <_Heap_Walk+0x233> 10d521: 8d 76 00 lea 0x0(%esi),%esi block = next_block; } while ( block != first_block ); return true; } 10d524: 8b 43 08 mov 0x8(%ebx),%eax 10d527: 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 ? 10d52a: 8b 47 08 mov 0x8(%edi),%eax 10d52d: 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)( 10d530: 39 43 0c cmp %eax,0xc(%ebx) 10d533: 0f 84 cb 00 00 00 je 10d604 <_Heap_Walk+0x348> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 10d539: 39 c3 cmp %eax,%ebx 10d53b: 0f 84 db 00 00 00 je 10d61c <_Heap_Walk+0x360> 10d541: c7 45 c8 c9 14 12 00 movl $0x1214c9,-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 ? 10d548: 8b 47 0c mov 0xc(%edi),%eax 10d54b: 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)( 10d54e: 39 45 b4 cmp %eax,-0x4c(%ebp) 10d551: 0f 84 b9 00 00 00 je 10d610 <_Heap_Walk+0x354> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 10d557: 39 c3 cmp %eax,%ebx 10d559: 0f 84 c9 00 00 00 je 10d628 <_Heap_Walk+0x36c> 10d55f: b8 c9 14 12 00 mov $0x1214c9,%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)( 10d564: 83 ec 0c sub $0xc,%esp 10d567: ff 75 c8 pushl -0x38(%ebp) 10d56a: ff 75 e4 pushl -0x1c(%ebp) 10d56d: 50 push %eax 10d56e: ff 75 d4 pushl -0x2c(%ebp) 10d571: 51 push %ecx 10d572: 57 push %edi 10d573: 68 d4 18 12 00 push $0x1218d4 10d578: 6a 00 push $0x0 10d57a: ff 75 0c pushl 0xc(%ebp) 10d57d: 89 55 c4 mov %edx,-0x3c(%ebp) 10d580: 89 4d c0 mov %ecx,-0x40(%ebp) 10d583: 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 ) { 10d586: 8b 06 mov (%esi),%eax 10d588: 83 c4 30 add $0x30,%esp 10d58b: 8b 4d c0 mov -0x40(%ebp),%ecx 10d58e: 39 c1 cmp %eax,%ecx 10d590: 8b 55 c4 mov -0x3c(%ebp),%edx 10d593: 75 5f jne 10d5f4 <_Heap_Walk+0x338> ); return false; } if ( !prev_used ) { 10d595: 85 d2 test %edx,%edx 10d597: 0f 84 97 00 00 00 je 10d634 <_Heap_Walk+0x378> block = next_block; } while ( block != first_block ); return true; } 10d59d: 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 ) { 10d5a0: 39 c3 cmp %eax,%ebx 10d5a2: 74 0f je 10d5b3 <_Heap_Walk+0x2f7> <== NEVER TAKEN if ( free_block == block ) { 10d5a4: 39 c7 cmp %eax,%edi 10d5a6: 0f 84 43 ff ff ff je 10d4ef <_Heap_Walk+0x233> return true; } free_block = free_block->next; 10d5ac: 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 ) { 10d5af: 39 c3 cmp %eax,%ebx 10d5b1: 75 f1 jne 10d5a4 <_Heap_Walk+0x2e8> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10d5b3: 57 push %edi 10d5b4: 68 a0 19 12 00 push $0x1219a0 10d5b9: e9 d2 fd ff ff jmp 10d390 <_Heap_Walk+0xd4> 10d5be: 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; 10d5c0: 39 f9 cmp %edi,%ecx 10d5c2: 0f 87 7b fe ff ff ja 10d443 <_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; 10d5c8: 8d 41 08 lea 0x8(%ecx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d5cb: 31 d2 xor %edx,%edx 10d5cd: f7 75 c8 divl -0x38(%ebp) ); return false; } if ( 10d5d0: 85 d2 test %edx,%edx 10d5d2: 0f 85 ad 00 00 00 jne 10d685 <_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; 10d5d8: 8b 41 04 mov 0x4(%ecx),%eax 10d5db: 83 e0 fe and $0xfffffffe,%eax ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d5de: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d5e3: 0f 85 a9 00 00 00 jne 10d692 <_Heap_Walk+0x3d6> 10d5e9: 89 f2 mov %esi,%edx 10d5eb: 89 ce mov %ecx,%esi 10d5ed: e9 36 fe ff ff jmp 10d428 <_Heap_Walk+0x16c> 10d5f2: 66 90 xchg %ax,%ax " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( 10d5f4: 52 push %edx 10d5f5: 56 push %esi 10d5f6: 50 push %eax 10d5f7: 51 push %ecx 10d5f8: 57 push %edi 10d5f9: 68 0c 19 12 00 push $0x12190c 10d5fe: e9 71 fe ff ff jmp 10d474 <_Heap_Walk+0x1b8> 10d603: 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)( 10d604: c7 45 c8 96 15 12 00 movl $0x121596,-0x38(%ebp) 10d60b: e9 38 ff ff ff jmp 10d548 <_Heap_Walk+0x28c> 10d610: b8 af 15 12 00 mov $0x1215af,%eax 10d615: e9 4a ff ff ff jmp 10d564 <_Heap_Walk+0x2a8> 10d61a: 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)" : "") 10d61c: c7 45 c8 a5 15 12 00 movl $0x1215a5,-0x38(%ebp) 10d623: e9 20 ff ff ff jmp 10d548 <_Heap_Walk+0x28c> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 10d628: b8 bf 15 12 00 mov $0x1215bf,%eax 10d62d: e9 32 ff ff ff jmp 10d564 <_Heap_Walk+0x2a8> 10d632: 66 90 xchg %ax,%ax return false; } if ( !prev_used ) { (*printer)( 10d634: 57 push %edi 10d635: 68 48 19 12 00 push $0x121948 10d63a: e9 51 fd ff ff jmp 10d390 <_Heap_Walk+0xd4> 10d63f: 90 nop return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 10d640: 56 push %esi 10d641: 68 30 17 12 00 push $0x121730 10d646: e9 45 fd ff ff jmp 10d390 <_Heap_Walk+0xd4> 10d64b: 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; 10d64c: 89 f1 mov %esi,%ecx <== NOT EXECUTED 10d64e: e9 f0 fd ff ff jmp 10d443 <_Heap_Walk+0x187> <== NOT EXECUTED return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 10d653: 83 ec 0c sub $0xc,%esp 10d656: 51 push %ecx 10d657: 57 push %edi 10d658: 68 44 18 12 00 push $0x121844 10d65d: e9 12 fe ff ff jmp 10d474 <_Heap_Walk+0x1b8> return false; } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( 10d662: 83 ec 08 sub $0x8,%esp 10d665: ff 75 d0 pushl -0x30(%ebp) 10d668: 51 push %ecx 10d669: 57 push %edi 10d66a: 68 74 18 12 00 push $0x121874 10d66f: e9 00 fe ff ff jmp 10d474 <_Heap_Walk+0x1b8> return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 10d674: 83 ec 0c sub $0xc,%esp 10d677: 56 push %esi 10d678: 57 push %edi 10d679: 68 a0 18 12 00 push $0x1218a0 10d67e: e9 f1 fd ff ff jmp 10d474 <_Heap_Walk+0x1b8> ); return false; } if ( 10d683: 89 f1 mov %esi,%ecx <== NOT EXECUTED !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10d685: 51 push %ecx 10d686: 68 b0 17 12 00 push $0x1217b0 10d68b: e9 00 fd ff ff jmp 10d390 <_Heap_Walk+0xd4> ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d690: 89 f1 mov %esi,%ecx <== NOT EXECUTED (*printer)( 10d692: 51 push %ecx 10d693: 68 0f 16 12 00 push $0x12160f 10d698: e9 f3 fc ff ff jmp 10d390 <_Heap_Walk+0xd4> return false; } if ( free_block->prev != prev_block ) { (*printer)( 10d69d: 83 ec 0c sub $0xc,%esp 10d6a0: 50 push %eax 10d6a1: 56 push %esi 10d6a2: 68 e0 17 12 00 push $0x1217e0 10d6a7: e9 c8 fd ff ff jmp 10d474 <_Heap_Walk+0x1b8> =============================================================================== 0010bde4 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 10bde4: 55 push %ebp 10bde5: 89 e5 mov %esp,%ebp 10bde7: 53 push %ebx 10bde8: 83 ec 04 sub $0x4,%esp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10bdeb: 8b 0d 60 68 12 00 mov 0x126860,%ecx 10bdf1: 85 c9 test %ecx,%ecx 10bdf3: 74 1a je 10be0f <_IO_Initialize_all_drivers+0x2b><== NEVER TAKEN 10bdf5: 31 db xor %ebx,%ebx 10bdf7: 90 nop (void) rtems_io_initialize( major, 0, NULL ); 10bdf8: 52 push %edx 10bdf9: 6a 00 push $0x0 10bdfb: 6a 00 push $0x0 10bdfd: 53 push %ebx 10bdfe: e8 55 47 00 00 call 110558 void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10be03: 43 inc %ebx 10be04: 83 c4 10 add $0x10,%esp 10be07: 39 1d 60 68 12 00 cmp %ebx,0x126860 10be0d: 77 e9 ja 10bdf8 <_IO_Initialize_all_drivers+0x14> (void) rtems_io_initialize( major, 0, NULL ); } 10be0f: 8b 5d fc mov -0x4(%ebp),%ebx 10be12: c9 leave 10be13: c3 ret =============================================================================== 0010bd4c <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 10bd4c: 55 push %ebp 10bd4d: 89 e5 mov %esp,%ebp 10bd4f: 57 push %edi 10bd50: 56 push %esi 10bd51: 53 push %ebx 10bd52: 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; 10bd55: 8b 1d 94 22 12 00 mov 0x122294,%ebx drivers_in_table = Configuration.number_of_device_drivers; 10bd5b: a1 90 22 12 00 mov 0x122290,%eax 10bd60: 89 45 e4 mov %eax,-0x1c(%ebp) number_of_drivers = Configuration.maximum_drivers; 10bd63: 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 ) 10bd69: 39 f0 cmp %esi,%eax 10bd6b: 73 5f jae 10bdcc <_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( 10bd6d: 8d 0c 76 lea (%esi,%esi,2),%ecx 10bd70: c1 e1 03 shl $0x3,%ecx 10bd73: 83 ec 0c sub $0xc,%esp 10bd76: 51 push %ecx 10bd77: 89 4d dc mov %ecx,-0x24(%ebp) 10bd7a: e8 25 2b 00 00 call 10e8a4 <_Workspace_Allocate_or_fatal_error> 10bd7f: 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 *) 10bd81: 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; 10bd86: 89 35 60 68 12 00 mov %esi,0x126860 memset( 10bd8c: 31 c0 xor %eax,%eax 10bd8e: 8b 4d dc mov -0x24(%ebp),%ecx 10bd91: 89 d7 mov %edx,%edi 10bd93: 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++ ) 10bd95: 83 c4 10 add $0x10,%esp 10bd98: 8b 45 e4 mov -0x1c(%ebp),%eax 10bd9b: 85 c0 test %eax,%eax 10bd9d: 74 25 je 10bdc4 <_IO_Manager_initialization+0x78><== NEVER TAKEN 10bd9f: a1 64 68 12 00 mov 0x126864,%eax 10bda4: 89 45 e0 mov %eax,-0x20(%ebp) 10bda7: 31 c0 xor %eax,%eax 10bda9: 31 d2 xor %edx,%edx 10bdab: 90 nop _IO_Driver_address_table[index] = driver_table[index]; 10bdac: 8b 7d e0 mov -0x20(%ebp),%edi 10bdaf: 01 c7 add %eax,%edi 10bdb1: 8d 34 03 lea (%ebx,%eax,1),%esi 10bdb4: b9 06 00 00 00 mov $0x6,%ecx 10bdb9: 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++ ) 10bdbb: 42 inc %edx 10bdbc: 83 c0 18 add $0x18,%eax 10bdbf: 39 55 e4 cmp %edx,-0x1c(%ebp) 10bdc2: 77 e8 ja 10bdac <_IO_Manager_initialization+0x60> _IO_Driver_address_table[index] = driver_table[index]; } 10bdc4: 8d 65 f4 lea -0xc(%ebp),%esp 10bdc7: 5b pop %ebx 10bdc8: 5e pop %esi 10bdc9: 5f pop %edi 10bdca: c9 leave 10bdcb: 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; 10bdcc: 89 1d 64 68 12 00 mov %ebx,0x126864 _IO_Number_of_drivers = number_of_drivers; 10bdd2: 8b 45 e4 mov -0x1c(%ebp),%eax 10bdd5: 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]; } 10bdda: 8d 65 f4 lea -0xc(%ebp),%esp 10bddd: 5b pop %ebx 10bdde: 5e pop %esi 10bddf: 5f pop %edi 10bde0: c9 leave 10bde1: c3 ret =============================================================================== 0010c868 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10c868: 55 push %ebp 10c869: 89 e5 mov %esp,%ebp 10c86b: 53 push %ebx 10c86c: 83 ec 08 sub $0x8,%esp 10c86f: 8b 45 08 mov 0x8(%ebp),%eax 10c872: 8b 55 0c mov 0xc(%ebp),%edx 10c875: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10c878: a3 74 65 12 00 mov %eax,0x126574 _Internal_errors_What_happened.is_internal = is_internal; 10c87d: 88 15 78 65 12 00 mov %dl,0x126578 _Internal_errors_What_happened.the_error = the_error; 10c883: 89 1d 7c 65 12 00 mov %ebx,0x12657c _User_extensions_Fatal( the_source, is_internal, the_error ); 10c889: 53 push %ebx 10c88a: 0f b6 d2 movzbl %dl,%edx 10c88d: 52 push %edx 10c88e: 50 push %eax 10c88f: e8 10 1c 00 00 call 10e4a4 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10c894: c7 05 60 66 12 00 05 movl $0x5,0x126660 <== NOT EXECUTED 10c89b: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10c89e: fa cli <== NOT EXECUTED 10c89f: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10c8a1: f4 hlt <== NOT EXECUTED 10c8a2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10c8a5: eb fe jmp 10c8a5 <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 00110aa0 <_Objects_API_maximum_class>: #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 110aa0: 55 push %ebp 110aa1: 89 e5 mov %esp,%ebp 110aa3: 8b 45 08 mov 0x8(%ebp),%eax 110aa6: 48 dec %eax 110aa7: 83 f8 02 cmp $0x2,%eax 110aaa: 77 0c ja 110ab8 <_Objects_API_maximum_class+0x18> 110aac: 8b 04 85 70 0a 12 00 mov 0x120a70(,%eax,4),%eax case OBJECTS_NO_API: default: break; } return 0; } 110ab3: c9 leave 110ab4: c3 ret 110ab5: 8d 76 00 lea 0x0(%esi),%esi #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 110ab8: 31 c0 xor %eax,%eax case OBJECTS_NO_API: default: break; } return 0; } 110aba: c9 leave 110abb: c3 ret =============================================================================== 0010c8f8 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10c8f8: 55 push %ebp 10c8f9: 89 e5 mov %esp,%ebp 10c8fb: 56 push %esi 10c8fc: 53 push %ebx 10c8fd: 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 ) 10c900: 8b 43 18 mov 0x18(%ebx),%eax 10c903: 85 c0 test %eax,%eax 10c905: 75 0d jne 10c914 <_Objects_Allocate+0x1c><== ALWAYS TAKEN return NULL; 10c907: 31 c9 xor %ecx,%ecx <== NOT EXECUTED ); } #endif return the_object; } 10c909: 89 c8 mov %ecx,%eax 10c90b: 8d 65 f8 lea -0x8(%ebp),%esp 10c90e: 5b pop %ebx 10c90f: 5e pop %esi 10c910: c9 leave 10c911: c3 ret 10c912: 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 ); 10c914: 8d 73 20 lea 0x20(%ebx),%esi 10c917: 83 ec 0c sub $0xc,%esp 10c91a: 56 push %esi 10c91b: e8 f0 f6 ff ff call 10c010 <_Chain_Get> 10c920: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10c922: 83 c4 10 add $0x10,%esp 10c925: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10c929: 74 de je 10c909 <_Objects_Allocate+0x11> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10c92b: 85 c0 test %eax,%eax 10c92d: 74 29 je 10c958 <_Objects_Allocate+0x60> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10c92f: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10c933: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10c937: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 10c939: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10c93d: 31 d2 xor %edx,%edx 10c93f: f7 f6 div %esi information->inactive_per_block[ block ]--; 10c941: c1 e0 02 shl $0x2,%eax 10c944: 03 43 30 add 0x30(%ebx),%eax 10c947: ff 08 decl (%eax) information->inactive--; 10c949: 66 ff 4b 2c decw 0x2c(%ebx) ); } #endif return the_object; } 10c94d: 89 c8 mov %ecx,%eax 10c94f: 8d 65 f8 lea -0x8(%ebp),%esp 10c952: 5b pop %ebx 10c953: 5e pop %esi 10c954: c9 leave 10c955: c3 ret 10c956: 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 ); 10c958: 83 ec 0c sub $0xc,%esp 10c95b: 53 push %ebx 10c95c: e8 3b 00 00 00 call 10c99c <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10c961: 89 34 24 mov %esi,(%esp) 10c964: e8 a7 f6 ff ff call 10c010 <_Chain_Get> 10c969: 89 c1 mov %eax,%ecx } if ( the_object ) { 10c96b: 83 c4 10 add $0x10,%esp 10c96e: 85 c0 test %eax,%eax 10c970: 74 97 je 10c909 <_Objects_Allocate+0x11> 10c972: eb bb jmp 10c92f <_Objects_Allocate+0x37> =============================================================================== 0010c99c <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10c99c: 55 push %ebp 10c99d: 89 e5 mov %esp,%ebp 10c99f: 57 push %edi 10c9a0: 56 push %esi 10c9a1: 53 push %ebx 10c9a2: 83 ec 4c sub $0x4c,%esp 10c9a5: 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 ); 10c9a8: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10c9ac: 89 45 cc mov %eax,-0x34(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10c9af: 8b 4b 34 mov 0x34(%ebx),%ecx 10c9b2: 85 c9 test %ecx,%ecx 10c9b4: 0f 84 62 02 00 00 je 10cc1c <_Objects_Extend_information+0x280> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10c9ba: 8b 73 10 mov 0x10(%ebx),%esi 10c9bd: 66 89 75 d0 mov %si,-0x30(%ebp) 10c9c1: 8b 7b 14 mov 0x14(%ebx),%edi 10c9c4: 89 f0 mov %esi,%eax 10c9c6: 31 d2 xor %edx,%edx 10c9c8: 66 f7 f7 div %di 10c9cb: 0f b7 f0 movzwl %ax,%esi for ( ; block < block_count; block++ ) { 10c9ce: 85 f6 test %esi,%esi 10c9d0: 0f 84 5f 02 00 00 je 10cc35 <_Objects_Extend_information+0x299><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) { 10c9d6: 8b 01 mov (%ecx),%eax 10c9d8: 85 c0 test %eax,%eax 10c9da: 0f 84 67 02 00 00 je 10cc47 <_Objects_Extend_information+0x2ab><== NEVER TAKEN 10c9e0: 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 ); 10c9e3: 8b 55 cc mov -0x34(%ebp),%edx 10c9e6: 89 55 d4 mov %edx,-0x2c(%ebp) index_base = minimum_index; block = 0; 10c9e9: 31 d2 xor %edx,%edx 10c9eb: 8b 45 d4 mov -0x2c(%ebp),%eax 10c9ee: eb 0a jmp 10c9fa <_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 ) { 10c9f0: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4) 10c9f4: 0f 84 c2 01 00 00 je 10cbbc <_Objects_Extend_information+0x220> do_extend = false; break; } else index_base += information->allocation_size; 10c9fa: 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++ ) { 10c9fc: 42 inc %edx 10c9fd: 39 d6 cmp %edx,%esi 10c9ff: 77 ef ja 10c9f0 <_Objects_Extend_information+0x54> 10ca01: 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; 10ca04: b1 01 mov $0x1,%cl } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10ca06: 0f b7 45 d0 movzwl -0x30(%ebp),%eax 10ca0a: 01 f8 add %edi,%eax 10ca0c: 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 ) { 10ca0f: 3d ff ff 00 00 cmp $0xffff,%eax 10ca14: 0f 87 9a 01 00 00 ja 10cbb4 <_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; 10ca1a: 0f af 7b 18 imul 0x18(%ebx),%edi if ( information->auto_extend ) { 10ca1e: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10ca22: 0f 84 a0 01 00 00 je 10cbc8 <_Objects_Extend_information+0x22c> new_object_block = _Workspace_Allocate( block_size ); 10ca28: 83 ec 0c sub $0xc,%esp 10ca2b: 57 push %edi 10ca2c: 89 55 b8 mov %edx,-0x48(%ebp) 10ca2f: 88 4d b4 mov %cl,-0x4c(%ebp) 10ca32: e8 39 1e 00 00 call 10e870 <_Workspace_Allocate> 10ca37: 89 45 c8 mov %eax,-0x38(%ebp) if ( !new_object_block ) 10ca3a: 83 c4 10 add $0x10,%esp 10ca3d: 85 c0 test %eax,%eax 10ca3f: 8b 55 b8 mov -0x48(%ebp),%edx 10ca42: 8a 4d b4 mov -0x4c(%ebp),%cl 10ca45: 0f 84 69 01 00 00 je 10cbb4 <_Objects_Extend_information+0x218> } /* * Do we need to grow the tables? */ if ( do_extend ) { 10ca4b: 84 c9 test %cl,%cl 10ca4d: 0f 84 e6 00 00 00 je 10cb39 <_Objects_Extend_information+0x19d> */ /* * Up the block count and maximum */ block_count++; 10ca53: 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 ); 10ca56: 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 *)) + 10ca59: 8d 04 7f lea (%edi,%edi,2),%eax ((maximum + minimum_index) * sizeof(Objects_Control *)); 10ca5c: 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 *)) + 10ca5f: 03 45 cc add -0x34(%ebp),%eax block_count++; /* * Allocate the tables and break it up. */ block_size = block_count * 10ca62: 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 ); 10ca65: 50 push %eax 10ca66: 89 55 b8 mov %edx,-0x48(%ebp) 10ca69: e8 02 1e 00 00 call 10e870 <_Workspace_Allocate> 10ca6e: 89 45 c4 mov %eax,-0x3c(%ebp) if ( !object_blocks ) { 10ca71: 83 c4 10 add $0x10,%esp 10ca74: 85 c0 test %eax,%eax 10ca76: 8b 55 b8 mov -0x48(%ebp),%edx 10ca79: 0f 84 da 01 00 00 je 10cc59 <_Objects_Extend_information+0x2bd> 10ca7f: 8b 45 c4 mov -0x3c(%ebp),%eax 10ca82: 8d 04 b8 lea (%eax,%edi,4),%eax 10ca85: 89 45 bc mov %eax,-0x44(%ebp) 10ca88: 8b 4d c4 mov -0x3c(%ebp),%ecx 10ca8b: 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 ) { 10ca8e: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10ca92: 39 4d cc cmp %ecx,-0x34(%ebp) 10ca95: 0f 82 4d 01 00 00 jb 10cbe8 <_Objects_Extend_information+0x24c> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10ca9b: 8b 4d cc mov -0x34(%ebp),%ecx 10ca9e: 85 c9 test %ecx,%ecx 10caa0: 74 12 je 10cab4 <_Objects_Extend_information+0x118><== NEVER TAKEN 10caa2: 31 c9 xor %ecx,%ecx 10caa4: 8b 7d cc mov -0x34(%ebp),%edi 10caa7: 90 nop local_table[ index ] = NULL; 10caa8: 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++ ) { 10caaf: 41 inc %ecx 10cab0: 39 cf cmp %ecx,%edi 10cab2: 77 f4 ja 10caa8 <_Objects_Extend_information+0x10c><== NEVER TAKEN 10cab4: c1 e6 02 shl $0x2,%esi 10cab7: 89 75 c0 mov %esi,-0x40(%ebp) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10caba: 8b 4d c4 mov -0x3c(%ebp),%ecx 10cabd: 8b 75 c0 mov -0x40(%ebp),%esi 10cac0: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1) inactive_per_block[block_count] = 0; 10cac7: 8b 4d bc mov -0x44(%ebp),%ecx 10caca: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10cad1: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10cad5: 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 ; 10cad8: 39 75 d4 cmp %esi,-0x2c(%ebp) 10cadb: 73 0f jae 10caec <_Objects_Extend_information+0x150><== NEVER TAKEN 10cadd: 8b 4d d4 mov -0x2c(%ebp),%ecx index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10cae0: 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++ ) { 10cae7: 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 ; 10cae8: 39 f1 cmp %esi,%ecx 10caea: 72 f4 jb 10cae0 <_Objects_Extend_information+0x144> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10caec: 9c pushf 10caed: fa cli 10caee: 5f pop %edi old_tables = information->object_blocks; 10caef: 8b 73 34 mov 0x34(%ebx),%esi information->object_blocks = object_blocks; 10caf2: 8b 4d c4 mov -0x3c(%ebp),%ecx 10caf5: 89 4b 34 mov %ecx,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10caf8: 8b 4d bc mov -0x44(%ebp),%ecx 10cafb: 89 4b 30 mov %ecx,0x30(%ebx) information->local_table = local_table; 10cafe: 89 43 1c mov %eax,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10cb01: 8b 45 d0 mov -0x30(%ebp),%eax 10cb04: 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) | 10cb08: 8b 0b mov (%ebx),%ecx 10cb0a: c1 e1 18 shl $0x18,%ecx 10cb0d: 81 c9 00 00 01 00 or $0x10000,%ecx information->maximum_id = _Objects_Build_id( 10cb13: 0f b7 43 04 movzwl 0x4(%ebx),%eax (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10cb17: c1 e0 1b shl $0x1b,%eax 10cb1a: 09 c1 or %eax,%ecx 10cb1c: 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) | 10cb20: 09 c1 or %eax,%ecx 10cb22: 89 4b 0c mov %ecx,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10cb25: 57 push %edi 10cb26: 9d popf _Workspace_Free( old_tables ); 10cb27: 83 ec 0c sub $0xc,%esp 10cb2a: 56 push %esi 10cb2b: 89 55 b8 mov %edx,-0x48(%ebp) 10cb2e: e8 59 1d 00 00 call 10e88c <_Workspace_Free> 10cb33: 83 c4 10 add $0x10,%esp 10cb36: 8b 55 b8 mov -0x48(%ebp),%edx } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10cb39: c1 e2 02 shl $0x2,%edx 10cb3c: 89 55 d0 mov %edx,-0x30(%ebp) 10cb3f: 8b 43 34 mov 0x34(%ebx),%eax 10cb42: 8b 4d c8 mov -0x38(%ebp),%ecx 10cb45: 89 0c 10 mov %ecx,(%eax,%edx,1) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10cb48: ff 73 18 pushl 0x18(%ebx) 10cb4b: 0f b7 43 14 movzwl 0x14(%ebx),%eax 10cb4f: 50 push %eax 10cb50: 51 push %ecx 10cb51: 8d 7d dc lea -0x24(%ebp),%edi 10cb54: 57 push %edi 10cb55: e8 3e 3a 00 00 call 110598 <_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 ) { 10cb5a: 83 c4 10 add $0x10,%esp 10cb5d: 8b 75 d4 mov -0x2c(%ebp),%esi information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10cb60: 8d 43 20 lea 0x20(%ebx),%eax 10cb63: 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 ) { 10cb66: eb 29 jmp 10cb91 <_Objects_Extend_information+0x1f5> 10cb68: 8b 13 mov (%ebx),%edx 10cb6a: c1 e2 18 shl $0x18,%edx 10cb6d: 81 ca 00 00 01 00 or $0x10000,%edx the_object->id = _Objects_Build_id( 10cb73: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10cb77: c1 e1 1b shl $0x1b,%ecx 10cb7a: 09 ca or %ecx,%edx uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10cb7c: 09 f2 or %esi,%edx 10cb7e: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10cb81: 83 ec 08 sub $0x8,%esp 10cb84: 50 push %eax 10cb85: ff 75 d4 pushl -0x2c(%ebp) 10cb88: e8 47 f4 ff ff call 10bfd4 <_Chain_Append> index++; 10cb8d: 46 inc %esi 10cb8e: 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 ) { 10cb91: 83 ec 0c sub $0xc,%esp 10cb94: 57 push %edi 10cb95: e8 76 f4 ff ff call 10c010 <_Chain_Get> 10cb9a: 83 c4 10 add $0x10,%esp 10cb9d: 85 c0 test %eax,%eax 10cb9f: 75 c7 jne 10cb68 <_Objects_Extend_information+0x1cc> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10cba1: 8b 43 14 mov 0x14(%ebx),%eax 10cba4: 8b 53 30 mov 0x30(%ebx),%edx 10cba7: 0f b7 c8 movzwl %ax,%ecx 10cbaa: 8b 75 d0 mov -0x30(%ebp),%esi 10cbad: 89 0c 32 mov %ecx,(%edx,%esi,1) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 10cbb0: 66 01 43 2c add %ax,0x2c(%ebx) } 10cbb4: 8d 65 f4 lea -0xc(%ebp),%esp 10cbb7: 5b pop %ebx 10cbb8: 5e pop %esi 10cbb9: 5f pop %edi 10cbba: c9 leave 10cbbb: c3 ret 10cbbc: 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; 10cbbf: 31 c9 xor %ecx,%ecx 10cbc1: e9 40 fe ff ff jmp 10ca06 <_Objects_Extend_information+0x6a> 10cbc6: 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 ); 10cbc8: 83 ec 0c sub $0xc,%esp 10cbcb: 57 push %edi 10cbcc: 89 55 b8 mov %edx,-0x48(%ebp) 10cbcf: 88 4d b4 mov %cl,-0x4c(%ebp) 10cbd2: e8 cd 1c 00 00 call 10e8a4 <_Workspace_Allocate_or_fatal_error> 10cbd7: 89 45 c8 mov %eax,-0x38(%ebp) 10cbda: 83 c4 10 add $0x10,%esp 10cbdd: 8a 4d b4 mov -0x4c(%ebp),%cl 10cbe0: 8b 55 b8 mov -0x48(%ebp),%edx 10cbe3: e9 63 fe ff ff jmp 10ca4b <_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, 10cbe8: c1 e6 02 shl $0x2,%esi 10cbeb: 89 75 c0 mov %esi,-0x40(%ebp) 10cbee: 8b 73 34 mov 0x34(%ebx),%esi 10cbf1: 8b 7d c4 mov -0x3c(%ebp),%edi 10cbf4: 8b 4d c0 mov -0x40(%ebp),%ecx 10cbf7: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10cbf9: 8b 73 30 mov 0x30(%ebx),%esi 10cbfc: 8b 7d bc mov -0x44(%ebp),%edi 10cbff: 8b 4d c0 mov -0x40(%ebp),%ecx 10cc02: 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 *) ); 10cc04: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10cc08: 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, 10cc0b: c1 e1 02 shl $0x2,%ecx 10cc0e: 8b 73 1c mov 0x1c(%ebx),%esi 10cc11: 89 c7 mov %eax,%edi 10cc13: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10cc15: e9 a0 fe ff ff jmp 10caba <_Objects_Extend_information+0x11e> 10cc1a: 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 ) 10cc1c: 8b 53 10 mov 0x10(%ebx),%edx 10cc1f: 66 89 55 d0 mov %dx,-0x30(%ebp) 10cc23: 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 ); 10cc27: 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; 10cc2a: b1 01 mov $0x1,%cl minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10cc2c: 31 d2 xor %edx,%edx /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; 10cc2e: 31 f6 xor %esi,%esi 10cc30: e9 d1 fd ff ff jmp 10ca06 <_Objects_Extend_information+0x6a> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10cc35: 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 ); 10cc38: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 10cc3b: 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; 10cc3e: b1 01 mov $0x1,%cl <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10cc40: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cc42: e9 bf fd ff ff jmp 10ca06 <_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 ) { 10cc47: 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 ); 10cc4a: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 10cc4d: 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; 10cc50: 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; 10cc52: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cc54: e9 ad fd ff ff jmp 10ca06 <_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 ); 10cc59: 83 ec 0c sub $0xc,%esp 10cc5c: ff 75 c8 pushl -0x38(%ebp) 10cc5f: e8 28 1c 00 00 call 10e88c <_Workspace_Free> return; 10cc64: 83 c4 10 add $0x10,%esp 10cc67: e9 48 ff ff ff jmp 10cbb4 <_Objects_Extend_information+0x218> =============================================================================== 0010ccfc <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 10ccfc: 55 push %ebp 10ccfd: 89 e5 mov %esp,%ebp 10ccff: 56 push %esi 10cd00: 53 push %ebx 10cd01: 8b 75 08 mov 0x8(%ebp),%esi 10cd04: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10cd07: 66 85 db test %bx,%bx 10cd0a: 75 0c jne 10cd18 <_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; 10cd0c: 31 c0 xor %eax,%eax if ( info->maximum == 0 ) return NULL; #endif return info; } 10cd0e: 8d 65 f8 lea -0x8(%ebp),%esp 10cd11: 5b pop %ebx 10cd12: 5e pop %esi 10cd13: c9 leave 10cd14: c3 ret 10cd15: 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 ); 10cd18: 83 ec 0c sub $0xc,%esp 10cd1b: 56 push %esi 10cd1c: e8 7f 3d 00 00 call 110aa0 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10cd21: 83 c4 10 add $0x10,%esp 10cd24: 85 c0 test %eax,%eax 10cd26: 74 e4 je 10cd0c <_Objects_Get_information+0x10> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10cd28: 0f b7 db movzwl %bx,%ebx 10cd2b: 39 d8 cmp %ebx,%eax 10cd2d: 72 dd jb 10cd0c <_Objects_Get_information+0x10> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10cd2f: 8b 14 b5 a8 64 12 00 mov 0x1264a8(,%esi,4),%edx return NULL; 10cd36: 31 c0 xor %eax,%eax return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 10cd38: 85 d2 test %edx,%edx 10cd3a: 74 d2 je 10cd0e <_Objects_Get_information+0x12><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10cd3c: 8b 04 9a mov (%edx,%ebx,4),%eax if ( !info ) 10cd3f: 85 c0 test %eax,%eax 10cd41: 74 cb je 10cd0e <_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; 10cd43: 31 d2 xor %edx,%edx 10cd45: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10cd4a: 0f 95 c2 setne %dl 10cd4d: f7 da neg %edx 10cd4f: 21 d0 and %edx,%eax 10cd51: eb bb jmp 10cd0e <_Objects_Get_information+0x12> =============================================================================== 0010cd54 <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10cd54: 55 push %ebp 10cd55: 89 e5 mov %esp,%ebp 10cd57: 56 push %esi 10cd58: 53 push %ebx 10cd59: 8b 55 08 mov 0x8(%ebp),%edx 10cd5c: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 10cd5f: b8 01 00 00 00 mov $0x1,%eax 10cd64: 2b 42 08 sub 0x8(%edx),%eax 10cd67: 03 45 0c add 0xc(%ebp),%eax _ISR_Disable( level ); 10cd6a: 9c pushf 10cd6b: fa cli 10cd6c: 5e pop %esi if ( information->maximum >= index ) { 10cd6d: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10cd71: 39 c8 cmp %ecx,%eax 10cd73: 77 1b ja 10cd90 <_Objects_Get_isr_disable+0x3c> if ( (the_object = information->local_table[ index ]) != NULL ) { 10cd75: 8b 52 1c mov 0x1c(%edx),%edx 10cd78: 8b 04 82 mov (%edx,%eax,4),%eax 10cd7b: 85 c0 test %eax,%eax 10cd7d: 74 21 je 10cda0 <_Objects_Get_isr_disable+0x4c> *location = OBJECTS_LOCAL; 10cd7f: c7 03 00 00 00 00 movl $0x0,(%ebx) *level_p = level; 10cd85: 8b 55 14 mov 0x14(%ebp),%edx 10cd88: 89 32 mov %esi,(%edx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cd8a: 5b pop %ebx 10cd8b: 5e pop %esi 10cd8c: c9 leave 10cd8d: c3 ret 10cd8e: 66 90 xchg %ax,%ax } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 10cd90: 56 push %esi 10cd91: 9d popf *location = OBJECTS_ERROR; 10cd92: 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; 10cd98: 31 c0 xor %eax,%eax #endif } 10cd9a: 5b pop %ebx 10cd9b: 5e pop %esi 10cd9c: c9 leave 10cd9d: c3 ret 10cd9e: 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 ); 10cda0: 56 push %esi 10cda1: 9d popf *location = OBJECTS_ERROR; 10cda2: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10cda8: eb e0 jmp 10cd8a <_Objects_Get_isr_disable+0x36> =============================================================================== 0010e464 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 10e464: 55 push %ebp 10e465: 89 e5 mov %esp,%ebp 10e467: 57 push %edi 10e468: 56 push %esi 10e469: 53 push %ebx 10e46a: 83 ec 3c sub $0x3c,%esp 10e46d: 8b 7d 08 mov 0x8(%ebp),%edi 10e470: 8b 75 0c mov 0xc(%ebp),%esi 10e473: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 10e476: 85 f6 test %esi,%esi 10e478: 75 0e jne 10e488 <_Objects_Get_name_as_string+0x24> #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; 10e47a: 31 db xor %ebx,%ebx _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } 10e47c: 89 d8 mov %ebx,%eax 10e47e: 8d 65 f4 lea -0xc(%ebp),%esp 10e481: 5b pop %ebx 10e482: 5e pop %esi 10e483: 5f pop %edi 10e484: c9 leave 10e485: c3 ret 10e486: 66 90 xchg %ax,%ax Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 10e488: 85 db test %ebx,%ebx 10e48a: 74 f0 je 10e47c <_Objects_Get_name_as_string+0x18> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10e48c: 85 ff test %edi,%edi 10e48e: 75 08 jne 10e498 <_Objects_Get_name_as_string+0x34> 10e490: a1 38 9c 12 00 mov 0x129c38,%eax 10e495: 8b 78 08 mov 0x8(%eax),%edi information = _Objects_Get_information_id( tmpId ); 10e498: 83 ec 0c sub $0xc,%esp 10e49b: 57 push %edi 10e49c: e8 f3 fe ff ff call 10e394 <_Objects_Get_information_id> if ( !information ) 10e4a1: 83 c4 10 add $0x10,%esp 10e4a4: 85 c0 test %eax,%eax 10e4a6: 74 d2 je 10e47a <_Objects_Get_name_as_string+0x16> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 10e4a8: 51 push %ecx 10e4a9: 8d 55 e4 lea -0x1c(%ebp),%edx 10e4ac: 52 push %edx 10e4ad: 57 push %edi 10e4ae: 50 push %eax 10e4af: e8 80 00 00 00 call 10e534 <_Objects_Get> switch ( location ) { 10e4b4: 83 c4 10 add $0x10,%esp 10e4b7: 8b 55 e4 mov -0x1c(%ebp),%edx 10e4ba: 85 d2 test %edx,%edx 10e4bc: 75 bc jne 10e47a <_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; 10e4be: 8b 40 0c mov 0xc(%eax),%eax lname[ 0 ] = (u32_name >> 24) & 0xff; 10e4c1: 89 c2 mov %eax,%edx 10e4c3: c1 ea 18 shr $0x18,%edx 10e4c6: 88 55 c7 mov %dl,-0x39(%ebp) 10e4c9: 88 55 df mov %dl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 10e4cc: 89 c7 mov %eax,%edi 10e4ce: c1 ef 10 shr $0x10,%edi 10e4d1: 89 f9 mov %edi,%ecx 10e4d3: 88 4d e0 mov %cl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 10e4d6: 89 c7 mov %eax,%edi 10e4d8: c1 ef 08 shr $0x8,%edi 10e4db: 89 f9 mov %edi,%ecx 10e4dd: 88 4d e1 mov %cl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 10e4e0: 88 45 e2 mov %al,-0x1e(%ebp) lname[ 4 ] = '\0'; 10e4e3: c6 45 e3 00 movb $0x0,-0x1d(%ebp) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e4e7: 4e dec %esi 10e4e8: 89 75 d4 mov %esi,-0x2c(%ebp) 10e4eb: 74 41 je 10e52e <_Objects_Get_name_as_string+0xca><== NEVER TAKEN 10e4ed: 84 d2 test %dl,%dl 10e4ef: 74 3d je 10e52e <_Objects_Get_name_as_string+0xca> 10e4f1: 89 d9 mov %ebx,%ecx 10e4f3: 31 c0 xor %eax,%eax 10e4f5: eb 09 jmp 10e500 <_Objects_Get_name_as_string+0x9c> 10e4f7: 90 nop 10e4f8: 8a 54 05 df mov -0x21(%ebp,%eax,1),%dl 10e4fc: 84 d2 test %dl,%dl 10e4fe: 74 21 je 10e521 <_Objects_Get_name_as_string+0xbd> *d = (isprint((unsigned char)*s)) ? *s : '*'; 10e500: 0f b6 f2 movzbl %dl,%esi 10e503: 8b 3d 88 72 12 00 mov 0x127288,%edi 10e509: 0f be 74 37 01 movsbl 0x1(%edi,%esi,1),%esi 10e50e: 81 e6 97 00 00 00 and $0x97,%esi 10e514: 75 02 jne 10e518 <_Objects_Get_name_as_string+0xb4> 10e516: b2 2a mov $0x2a,%dl 10e518: 88 11 mov %dl,(%ecx) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e51a: 40 inc %eax 10e51b: 41 inc %ecx 10e51c: 3b 45 d4 cmp -0x2c(%ebp),%eax 10e51f: 72 d7 jb 10e4f8 <_Objects_Get_name_as_string+0x94> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 10e521: c6 01 00 movb $0x0,(%ecx) _Thread_Enable_dispatch(); 10e524: e8 5b 0b 00 00 call 10f084 <_Thread_Enable_dispatch> return name; 10e529: e9 4e ff ff ff jmp 10e47c <_Objects_Get_name_as_string+0x18> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e52e: 89 d9 mov %ebx,%ecx 10e530: eb ef jmp 10e521 <_Objects_Get_name_as_string+0xbd> =============================================================================== 0010cf04 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 10cf04: 55 push %ebp 10cf05: 89 e5 mov %esp,%ebp 10cf07: 57 push %edi 10cf08: 56 push %esi 10cf09: 53 push %ebx 10cf0a: 83 ec 0c sub $0xc,%esp 10cf0d: 8b 5d 08 mov 0x8(%ebp),%ebx 10cf10: 8b 75 0c mov 0xc(%ebp),%esi 10cf13: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Control *object; Objects_Id next_id; if ( !information ) 10cf16: 85 db test %ebx,%ebx 10cf18: 75 0a jne 10cf24 <_Objects_Get_next+0x20> if ( !location_p ) return NULL; if ( !next_id_p ) return NULL; 10cf1a: 31 c0 xor %eax,%eax return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 10cf1c: 8d 65 f4 lea -0xc(%ebp),%esp 10cf1f: 5b pop %ebx 10cf20: 5e pop %esi 10cf21: 5f pop %edi 10cf22: c9 leave 10cf23: c3 ret Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 10cf24: 85 ff test %edi,%edi 10cf26: 74 f2 je 10cf1a <_Objects_Get_next+0x16> return NULL; if ( !next_id_p ) 10cf28: 8b 45 14 mov 0x14(%ebp),%eax 10cf2b: 85 c0 test %eax,%eax 10cf2d: 74 eb je 10cf1a <_Objects_Get_next+0x16> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 10cf2f: 66 85 f6 test %si,%si 10cf32: 75 04 jne 10cf38 <_Objects_Get_next+0x34> next_id = information->minimum_id; 10cf34: 8b 73 08 mov 0x8(%ebx),%esi 10cf37: 90 nop else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 10cf38: 66 39 73 10 cmp %si,0x10(%ebx) 10cf3c: 72 22 jb 10cf60 <_Objects_Get_next+0x5c> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 10cf3e: 51 push %ecx 10cf3f: 57 push %edi 10cf40: 56 push %esi 10cf41: 53 push %ebx 10cf42: e8 2d 00 00 00 call 10cf74 <_Objects_Get> next_id++; 10cf47: 46 inc %esi } while (*location_p != OBJECTS_LOCAL); 10cf48: 83 c4 10 add $0x10,%esp 10cf4b: 8b 17 mov (%edi),%edx 10cf4d: 85 d2 test %edx,%edx 10cf4f: 75 e7 jne 10cf38 <_Objects_Get_next+0x34> *next_id_p = next_id; 10cf51: 8b 55 14 mov 0x14(%ebp),%edx 10cf54: 89 32 mov %esi,(%edx) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 10cf56: 8d 65 f4 lea -0xc(%ebp),%esp 10cf59: 5b pop %ebx 10cf5a: 5e pop %esi 10cf5b: 5f pop %edi 10cf5c: c9 leave 10cf5d: c3 ret 10cf5e: 66 90 xchg %ax,%ax do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 10cf60: c7 07 01 00 00 00 movl $0x1,(%edi) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 10cf66: 8b 45 14 mov 0x14(%ebp),%eax 10cf69: c7 00 ff ff ff ff movl $0xffffffff,(%eax) return 0; 10cf6f: 31 c0 xor %eax,%eax 10cf71: eb a9 jmp 10cf1c <_Objects_Get_next+0x18> =============================================================================== 0011b1c4 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 11b1c4: 55 push %ebp 11b1c5: 89 e5 mov %esp,%ebp 11b1c7: 53 push %ebx 11b1c8: 8b 55 08 mov 0x8(%ebp),%edx 11b1cb: 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; 11b1ce: b8 01 00 00 00 mov $0x1,%eax 11b1d3: 2b 42 08 sub 0x8(%edx),%eax 11b1d6: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 11b1d9: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 11b1dd: 39 c8 cmp %ecx,%eax 11b1df: 77 13 ja 11b1f4 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 11b1e1: 8b 52 1c mov 0x1c(%edx),%edx 11b1e4: 8b 04 82 mov (%edx,%eax,4),%eax 11b1e7: 85 c0 test %eax,%eax 11b1e9: 74 09 je 11b1f4 <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 11b1eb: 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; } 11b1f1: 5b pop %ebx 11b1f2: c9 leave 11b1f3: 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; 11b1f4: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 11b1fa: 31 c0 xor %eax,%eax } 11b1fc: 5b pop %ebx 11b1fd: c9 leave 11b1fe: c3 ret =============================================================================== 0010e058 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10e058: 55 push %ebp 10e059: 89 e5 mov %esp,%ebp 10e05b: 83 ec 18 sub $0x18,%esp 10e05e: 8b 55 08 mov 0x8(%ebp),%edx /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10e061: 85 d2 test %edx,%edx 10e063: 75 08 jne 10e06d <_Objects_Id_to_name+0x15> 10e065: a1 d8 87 12 00 mov 0x1287d8,%eax 10e06a: 8b 50 08 mov 0x8(%eax),%edx 10e06d: 89 d0 mov %edx,%eax 10e06f: c1 e8 18 shr $0x18,%eax 10e072: 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 ) 10e075: 8d 48 ff lea -0x1(%eax),%ecx 10e078: 83 f9 02 cmp $0x2,%ecx 10e07b: 77 3b ja 10e0b8 <_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 ] ) 10e07d: 8b 04 85 28 85 12 00 mov 0x128528(,%eax,4),%eax 10e084: 85 c0 test %eax,%eax 10e086: 74 30 je 10e0b8 <_Objects_Id_to_name+0x60> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10e088: 89 d1 mov %edx,%ecx 10e08a: c1 e9 1b shr $0x1b,%ecx return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10e08d: 8b 04 88 mov (%eax,%ecx,4),%eax if ( !information ) 10e090: 85 c0 test %eax,%eax 10e092: 74 24 je 10e0b8 <_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 ); 10e094: 51 push %ecx 10e095: 8d 4d f4 lea -0xc(%ebp),%ecx 10e098: 51 push %ecx 10e099: 52 push %edx 10e09a: 50 push %eax 10e09b: e8 50 ff ff ff call 10dff0 <_Objects_Get> if ( !the_object ) 10e0a0: 83 c4 10 add $0x10,%esp 10e0a3: 85 c0 test %eax,%eax 10e0a5: 74 11 je 10e0b8 <_Objects_Id_to_name+0x60> return OBJECTS_INVALID_ID; *name = the_object->name; 10e0a7: 8b 50 0c mov 0xc(%eax),%edx 10e0aa: 8b 45 0c mov 0xc(%ebp),%eax 10e0ad: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10e0af: e8 f4 0a 00 00 call 10eba8 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10e0b4: 31 c0 xor %eax,%eax } 10e0b6: c9 leave 10e0b7: 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; 10e0b8: 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; } 10e0bd: c9 leave 10e0be: c3 ret =============================================================================== 0010cef4 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10cef4: 55 push %ebp 10cef5: 89 e5 mov %esp,%ebp 10cef7: 57 push %edi 10cef8: 56 push %esi 10cef9: 53 push %ebx 10cefa: 8b 45 08 mov 0x8(%ebp),%eax 10cefd: 8b 4d 0c mov 0xc(%ebp),%ecx 10cf00: 8b 55 10 mov 0x10(%ebp),%edx 10cf03: 8b 7d 14 mov 0x14(%ebp),%edi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10cf06: 85 ff test %edi,%edi 10cf08: 74 56 je 10cf60 <_Objects_Name_to_id_u32+0x6c> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10cf0a: 85 c9 test %ecx,%ecx 10cf0c: 74 08 je 10cf16 <_Objects_Name_to_id_u32+0x22> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10cf0e: 8b 70 10 mov 0x10(%eax),%esi 10cf11: 66 85 f6 test %si,%si 10cf14: 75 0a jne 10cf20 <_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; 10cf16: b8 01 00 00 00 mov $0x1,%eax #endif } 10cf1b: 5b pop %ebx 10cf1c: 5e pop %esi 10cf1d: 5f pop %edi 10cf1e: c9 leave 10cf1f: c3 ret if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10cf20: 85 d2 test %edx,%edx 10cf22: 75 20 jne 10cf44 <_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++ ) { 10cf24: 0f b7 f6 movzwl %si,%esi 10cf27: 8b 58 1c mov 0x1c(%eax),%ebx 10cf2a: b8 01 00 00 00 mov $0x1,%eax 10cf2f: 90 nop the_object = information->local_table[ index ]; 10cf30: 8b 14 83 mov (%ebx,%eax,4),%edx if ( !the_object ) 10cf33: 85 d2 test %edx,%edx 10cf35: 74 05 je 10cf3c <_Objects_Name_to_id_u32+0x48> continue; if ( name == the_object->name.name_u32 ) { 10cf37: 39 4a 0c cmp %ecx,0xc(%edx) 10cf3a: 74 18 je 10cf54 <_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++ ) { 10cf3c: 40 inc %eax 10cf3d: 39 c6 cmp %eax,%esi 10cf3f: 73 ef jae 10cf30 <_Objects_Name_to_id_u32+0x3c> 10cf41: eb d3 jmp 10cf16 <_Objects_Name_to_id_u32+0x22> 10cf43: 90 nop return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && (node == OBJECTS_SEARCH_ALL_NODES || 10cf44: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10cf4a: 74 d8 je 10cf24 <_Objects_Name_to_id_u32+0x30> node == OBJECTS_SEARCH_LOCAL_NODE || 10cf4c: 4a dec %edx 10cf4d: 75 c7 jne 10cf16 <_Objects_Name_to_id_u32+0x22> 10cf4f: eb d3 jmp 10cf24 <_Objects_Name_to_id_u32+0x30> 10cf51: 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; 10cf54: 8b 42 08 mov 0x8(%edx),%eax 10cf57: 89 07 mov %eax,(%edi) return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10cf59: 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 } 10cf5b: 5b pop %ebx 10cf5c: 5e pop %esi 10cf5d: 5f pop %edi 10cf5e: c9 leave 10cf5f: c3 ret #endif /* ASSERT: information->is_string == false */ if ( !id ) return OBJECTS_INVALID_ADDRESS; 10cf60: 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 } 10cf65: 5b pop %ebx 10cf66: 5e pop %esi 10cf67: 5f pop %edi 10cf68: c9 leave 10cf69: c3 ret =============================================================================== 0010ef1c <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10ef1c: 55 push %ebp 10ef1d: 89 e5 mov %esp,%ebp 10ef1f: 53 push %ebx 10ef20: 83 ec 0c sub $0xc,%esp 10ef23: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10ef26: 8b 45 08 mov 0x8(%ebp),%eax 10ef29: 0f b7 40 38 movzwl 0x38(%eax),%eax 10ef2d: 50 push %eax 10ef2e: 53 push %ebx 10ef2f: e8 24 66 00 00 call 115558 d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10ef34: 0f be 0b movsbl (%ebx),%ecx 10ef37: c1 e1 18 shl $0x18,%ecx 10ef3a: 83 c4 10 add $0x10,%esp 10ef3d: 83 f8 01 cmp $0x1,%eax 10ef40: 76 32 jbe 10ef74 <_Objects_Set_name+0x58> 10ef42: 0f be 53 01 movsbl 0x1(%ebx),%edx 10ef46: c1 e2 10 shl $0x10,%edx 10ef49: 09 ca or %ecx,%edx 10ef4b: 83 f8 02 cmp $0x2,%eax 10ef4e: 74 2c je 10ef7c <_Objects_Set_name+0x60> 10ef50: 0f be 4b 02 movsbl 0x2(%ebx),%ecx 10ef54: c1 e1 08 shl $0x8,%ecx 10ef57: 09 d1 or %edx,%ecx 10ef59: 83 f8 03 cmp $0x3,%eax 10ef5c: 74 37 je 10ef95 <_Objects_Set_name+0x79> 10ef5e: 0f be 43 03 movsbl 0x3(%ebx),%eax 10ef62: 09 c1 or %eax,%ecx 10ef64: 8b 55 0c mov 0xc(%ebp),%edx 10ef67: 89 4a 0c mov %ecx,0xc(%edx) ); } return true; } 10ef6a: b0 01 mov $0x1,%al 10ef6c: 8b 5d fc mov -0x4(%ebp),%ebx 10ef6f: c9 leave 10ef70: c3 ret 10ef71: 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( 10ef74: 89 ca mov %ecx,%edx 10ef76: 81 ca 00 00 20 00 or $0x200000,%edx 10ef7c: 89 d1 mov %edx,%ecx 10ef7e: 80 cd 20 or $0x20,%ch 10ef81: b8 20 00 00 00 mov $0x20,%eax 10ef86: 09 c1 or %eax,%ecx 10ef88: 8b 55 0c mov 0xc(%ebp),%edx 10ef8b: 89 4a 0c mov %ecx,0xc(%edx) ); } return true; } 10ef8e: b0 01 mov $0x1,%al 10ef90: 8b 5d fc mov -0x4(%ebp),%ebx 10ef93: c9 leave 10ef94: c3 ret d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10ef95: b8 20 00 00 00 mov $0x20,%eax 10ef9a: eb c6 jmp 10ef62 <_Objects_Set_name+0x46> =============================================================================== 0010cf6c <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10cf6c: 55 push %ebp 10cf6d: 89 e5 mov %esp,%ebp 10cf6f: 57 push %edi 10cf70: 56 push %esi 10cf71: 53 push %ebx 10cf72: 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 ); 10cf75: 8b 45 08 mov 0x8(%ebp),%eax 10cf78: 0f b7 58 08 movzwl 0x8(%eax),%ebx block_count = (information->maximum - index_base) / 10cf7c: 0f b7 48 14 movzwl 0x14(%eax),%ecx 10cf80: 0f b7 40 10 movzwl 0x10(%eax),%eax 10cf84: 29 d8 sub %ebx,%eax 10cf86: 31 d2 xor %edx,%edx 10cf88: f7 f1 div %ecx information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10cf8a: 85 c0 test %eax,%eax 10cf8c: 74 21 je 10cfaf <_Objects_Shrink_information+0x43><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 10cf8e: 8b 55 08 mov 0x8(%ebp),%edx 10cf91: 8b 72 30 mov 0x30(%edx),%esi 10cf94: 3b 0e cmp (%esi),%ecx 10cf96: 74 1f je 10cfb7 <_Objects_Shrink_information+0x4b><== NEVER TAKEN 10cf98: 31 d2 xor %edx,%edx 10cf9a: eb 0e jmp 10cfaa <_Objects_Shrink_information+0x3e> information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 10cf9c: 01 cb add %ecx,%ebx 10cf9e: 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 ] == 10cfa5: 3b 0c 96 cmp (%esi,%edx,4),%ecx 10cfa8: 74 12 je 10cfbc <_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++ ) { 10cfaa: 42 inc %edx 10cfab: 39 d0 cmp %edx,%eax 10cfad: 77 ed ja 10cf9c <_Objects_Shrink_information+0x30> return; } index_base += information->allocation_size; } } 10cfaf: 8d 65 f4 lea -0xc(%ebp),%esp 10cfb2: 5b pop %ebx 10cfb3: 5e pop %esi 10cfb4: 5f pop %edi 10cfb5: c9 leave 10cfb6: 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 ] == 10cfb7: 31 ff xor %edi,%edi <== NOT EXECUTED 10cfb9: 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 ); 10cfbc: 8b 55 08 mov 0x8(%ebp),%edx 10cfbf: 8b 42 20 mov 0x20(%edx),%eax 10cfc2: 89 7d e4 mov %edi,-0x1c(%ebp) 10cfc5: eb 07 jmp 10cfce <_Objects_Shrink_information+0x62> 10cfc7: 90 nop if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 10cfc8: 85 f6 test %esi,%esi 10cfca: 74 2c je 10cff8 <_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; 10cfcc: 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 ); 10cfce: 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; 10cfd2: 8b 30 mov (%eax),%esi if ((index >= index_base) && 10cfd4: 39 da cmp %ebx,%edx 10cfd6: 72 f0 jb 10cfc8 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { 10cfd8: 8b 7d 08 mov 0x8(%ebp),%edi 10cfdb: 0f b7 4f 14 movzwl 0x14(%edi),%ecx 10cfdf: 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) && 10cfe2: 39 ca cmp %ecx,%edx 10cfe4: 73 e2 jae 10cfc8 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 10cfe6: 83 ec 0c sub $0xc,%esp 10cfe9: 50 push %eax 10cfea: e8 09 f0 ff ff call 10bff8 <_Chain_Extract> 10cfef: 83 c4 10 add $0x10,%esp } } while ( the_object ); 10cff2: 85 f6 test %esi,%esi 10cff4: 75 d6 jne 10cfcc <_Objects_Shrink_information+0x60> 10cff6: 66 90 xchg %ax,%ax 10cff8: 8b 7d e4 mov -0x1c(%ebp),%edi /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10cffb: 83 ec 0c sub $0xc,%esp 10cffe: 8b 55 08 mov 0x8(%ebp),%edx 10d001: 8b 42 34 mov 0x34(%edx),%eax 10d004: ff 34 38 pushl (%eax,%edi,1) 10d007: e8 80 18 00 00 call 10e88c <_Workspace_Free> information->object_blocks[ block ] = NULL; 10d00c: 8b 55 08 mov 0x8(%ebp),%edx 10d00f: 8b 42 34 mov 0x34(%edx),%eax 10d012: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) information->inactive_per_block[ block ] = 0; 10d019: 8b 42 30 mov 0x30(%edx),%eax 10d01c: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) information->inactive -= information->allocation_size; 10d023: 8b 42 14 mov 0x14(%edx),%eax 10d026: 66 29 42 2c sub %ax,0x2c(%edx) return; 10d02a: 83 c4 10 add $0x10,%esp } index_base += information->allocation_size; } } 10d02d: 8d 65 f4 lea -0xc(%ebp),%esp 10d030: 5b pop %ebx 10d031: 5e pop %esi 10d032: 5f pop %edi 10d033: c9 leave 10d034: c3 ret =============================================================================== 0010d794 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 10d794: 55 push %ebp 10d795: 89 e5 mov %esp,%ebp 10d797: 56 push %esi 10d798: 53 push %ebx 10d799: 8b 5d 08 mov 0x8(%ebp),%ebx 10d79c: 8b 75 0c mov 0xc(%ebp),%esi if ( !the_heap ) 10d79f: 85 db test %ebx,%ebx 10d7a1: 74 35 je 10d7d8 <_Protected_heap_Get_information+0x44> return false; if ( !the_info ) 10d7a3: 85 f6 test %esi,%esi 10d7a5: 74 31 je 10d7d8 <_Protected_heap_Get_information+0x44> return false; _RTEMS_Lock_allocator(); 10d7a7: 83 ec 0c sub $0xc,%esp 10d7aa: ff 35 60 76 12 00 pushl 0x127660 10d7b0: e8 97 ee ff ff call 10c64c <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 10d7b5: 5a pop %edx 10d7b6: 59 pop %ecx 10d7b7: 56 push %esi 10d7b8: 53 push %ebx 10d7b9: e8 0a 3d 00 00 call 1114c8 <_Heap_Get_information> _RTEMS_Unlock_allocator(); 10d7be: 58 pop %eax 10d7bf: ff 35 60 76 12 00 pushl 0x127660 10d7c5: e8 ca ee ff ff call 10c694 <_API_Mutex_Unlock> return true; 10d7ca: 83 c4 10 add $0x10,%esp 10d7cd: b0 01 mov $0x1,%al } 10d7cf: 8d 65 f8 lea -0x8(%ebp),%esp 10d7d2: 5b pop %ebx 10d7d3: 5e pop %esi 10d7d4: c9 leave 10d7d5: c3 ret 10d7d6: 66 90 xchg %ax,%ax { if ( !the_heap ) return false; if ( !the_info ) return false; 10d7d8: 31 c0 xor %eax,%eax _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); return true; } 10d7da: 8d 65 f8 lea -0x8(%ebp),%esp 10d7dd: 5b pop %ebx 10d7de: 5e pop %esi 10d7df: c9 leave 10d7e0: c3 ret =============================================================================== 00110bc4 <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 110bc4: 55 push %ebp 110bc5: 89 e5 mov %esp,%ebp 110bc7: 56 push %esi 110bc8: 53 push %ebx 110bc9: 83 ec 10 sub $0x10,%esp 110bcc: 8b 5d 08 mov 0x8(%ebp),%ebx 110bcf: 8b 75 0c mov 0xc(%ebp),%esi 110bd2: 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 ) { 110bd5: 8b 15 10 ce 12 00 mov 0x12ce10,%edx 110bdb: 85 d2 test %edx,%edx 110bdd: 74 19 je 110bf8 <_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 ); 110bdf: 0f b6 c0 movzbl %al,%eax 110be2: 89 45 10 mov %eax,0x10(%ebp) 110be5: 89 75 0c mov %esi,0xc(%ebp) 110be8: 89 5d 08 mov %ebx,0x8(%ebp) } return status; } 110beb: 8d 65 f8 lea -0x8(%ebp),%esp 110bee: 5b pop %ebx 110bef: 5e pop %esi 110bf0: 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 ); 110bf1: e9 5a f2 ff ff jmp 10fe50 <_Heap_Walk> 110bf6: 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(); 110bf8: 83 ec 0c sub $0xc,%esp 110bfb: ff 35 c0 ce 12 00 pushl 0x12cec0 110c01: 88 45 f4 mov %al,-0xc(%ebp) 110c04: e8 5b e4 ff ff call 10f064 <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 110c09: 83 c4 0c add $0xc,%esp 110c0c: 8a 45 f4 mov -0xc(%ebp),%al 110c0f: 0f b6 c0 movzbl %al,%eax 110c12: 50 push %eax 110c13: 56 push %esi 110c14: 53 push %ebx 110c15: e8 36 f2 ff ff call 10fe50 <_Heap_Walk> _RTEMS_Unlock_allocator(); 110c1a: 5a pop %edx 110c1b: ff 35 c0 ce 12 00 pushl 0x12cec0 110c21: 88 45 f4 mov %al,-0xc(%ebp) 110c24: e8 83 e4 ff ff call 10f0ac <_API_Mutex_Unlock> 110c29: 83 c4 10 add $0x10,%esp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 110c2c: 8a 45 f4 mov -0xc(%ebp),%al 110c2f: 8d 65 f8 lea -0x8(%ebp),%esp 110c32: 5b pop %ebx 110c33: 5e pop %esi 110c34: c9 leave 110c35: c3 ret =============================================================================== 001103a8 <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 1103a8: 55 push %ebp 1103a9: 89 e5 mov %esp,%ebp 1103ab: 53 push %ebx 1103ac: 83 ec 10 sub $0x10,%esp 1103af: 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 ); 1103b2: 80 3d 24 22 12 00 01 cmpb $0x1,0x122224 1103b9: 19 c0 sbb %eax,%eax 1103bb: 83 e0 c0 and $0xffffffc0,%eax 1103be: 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 ); 1103c1: 50 push %eax 1103c2: e8 a9 e4 ff ff call 10e870 <_Workspace_Allocate> if ( !api ) 1103c7: 83 c4 10 add $0x10,%esp 1103ca: 85 c0 test %eax,%eax 1103cc: 74 6a je 110438 <_RTEMS_tasks_Create_extension+0x90> return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 1103ce: 89 83 e4 00 00 00 mov %eax,0xe4(%ebx) api->pending_events = EVENT_SETS_NONE_PENDING; 1103d4: c7 00 00 00 00 00 movl $0x0,(%eax) api->event_condition = 0; 1103da: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 1103e1: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 1103e5: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 1103ec: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 1103f3: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 1103fa: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 110401: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 110408: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 11040f: 00 00 00 if ( rtems_configuration_get_notepads_enabled() ) { 110412: 80 3d 24 22 12 00 00 cmpb $0x0,0x122224 110419: 74 13 je 11042e <_RTEMS_tasks_Create_extension+0x86> 11041b: 31 d2 xor %edx,%edx 11041d: 8d 76 00 lea 0x0(%esi),%esi for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 110420: c7 44 90 20 00 00 00 movl $0x0,0x20(%eax,%edx,4) 110427: 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++) 110428: 42 inc %edx 110429: 83 fa 10 cmp $0x10,%edx 11042c: 75 f2 jne 110420 <_RTEMS_tasks_Create_extension+0x78> api->Notepads[i] = 0; } return true; 11042e: b0 01 mov $0x1,%al } 110430: 8b 5d fc mov -0x4(%ebp),%ebx 110433: c9 leave 110434: c3 ret 110435: 8d 76 00 lea 0x0(%esi),%esi to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); if ( !api ) return false; 110438: 31 c0 xor %eax,%eax for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } 11043a: 8b 5d fc mov -0x4(%ebp),%ebx 11043d: c9 leave 11043e: c3 ret =============================================================================== 00110350 <_RTEMS_tasks_Delete_extension>: void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { 110350: 55 push %ebp 110351: 89 e5 mov %esp,%ebp 110353: 56 push %esi 110354: 53 push %ebx 110355: 8b 75 0c mov 0xc(%ebp),%esi /* * Free per task variable memory */ tvp = deleted->task_variables; 110358: 8b 86 f0 00 00 00 mov 0xf0(%esi),%eax deleted->task_variables = NULL; 11035e: c7 86 f0 00 00 00 00 movl $0x0,0xf0(%esi) 110365: 00 00 00 while (tvp) { 110368: 85 c0 test %eax,%eax 11036a: 75 06 jne 110372 <_RTEMS_tasks_Delete_extension+0x22> 11036c: eb 17 jmp 110385 <_RTEMS_tasks_Delete_extension+0x35> 11036e: 66 90 xchg %ax,%ax next = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); tvp = next; 110370: 89 d8 mov %ebx,%eax */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { next = (rtems_task_variable_t *)tvp->next; 110372: 8b 18 mov (%eax),%ebx _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 110374: 83 ec 08 sub $0x8,%esp 110377: 50 push %eax 110378: 56 push %esi 110379: e8 56 01 00 00 call 1104d4 <_RTEMS_Tasks_Invoke_task_variable_dtor> * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 11037e: 83 c4 10 add $0x10,%esp 110381: 85 db test %ebx,%ebx 110383: 75 eb jne 110370 <_RTEMS_tasks_Delete_extension+0x20> /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); 110385: 83 ec 0c sub $0xc,%esp 110388: ff b6 e4 00 00 00 pushl 0xe4(%esi) 11038e: e8 f9 e4 ff ff call 10e88c <_Workspace_Free> deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; 110393: c7 86 e4 00 00 00 00 movl $0x0,0xe4(%esi) 11039a: 00 00 00 11039d: 83 c4 10 add $0x10,%esp } 1103a0: 8d 65 f8 lea -0x8(%ebp),%esp 1103a3: 5b pop %ebx 1103a4: 5e pop %esi 1103a5: c9 leave 1103a6: c3 ret =============================================================================== 001102d4 <_RTEMS_tasks_Initialize_user_tasks>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks( void ) { 1102d4: 55 push %ebp 1102d5: 89 e5 mov %esp,%ebp 1102d7: 83 ec 08 sub $0x8,%esp if ( _RTEMS_tasks_Initialize_user_tasks_p ) 1102da: a1 a0 22 12 00 mov 0x1222a0,%eax 1102df: 85 c0 test %eax,%eax 1102e1: 74 05 je 1102e8 <_RTEMS_tasks_Initialize_user_tasks+0x14> (*_RTEMS_tasks_Initialize_user_tasks_p)(); } 1102e3: c9 leave */ void _RTEMS_tasks_Initialize_user_tasks( void ) { if ( _RTEMS_tasks_Initialize_user_tasks_p ) (*_RTEMS_tasks_Initialize_user_tasks_p)(); 1102e4: ff e0 jmp *%eax 1102e6: 66 90 xchg %ax,%ax } 1102e8: c9 leave 1102e9: c3 ret =============================================================================== 0010bac8 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 10bac8: 55 push %ebp 10bac9: 89 e5 mov %esp,%ebp 10bacb: 57 push %edi 10bacc: 56 push %esi 10bacd: 53 push %ebx 10bace: 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; 10bad1: 8b 1d 4c 22 12 00 mov 0x12224c,%ebx maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 10bad7: 8b 3d 48 22 12 00 mov 0x122248,%edi /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 10badd: 85 db test %ebx,%ebx 10badf: 74 46 je 10bb27 <_RTEMS_tasks_Initialize_user_tasks_body+0x5f> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10bae1: 85 ff test %edi,%edi 10bae3: 74 42 je 10bb27 <_RTEMS_tasks_Initialize_user_tasks_body+0x5f><== NEVER TAKEN 10bae5: 31 f6 xor %esi,%esi 10bae7: 90 nop return_value = rtems_task_create( 10bae8: 83 ec 08 sub $0x8,%esp 10baeb: 8d 45 e4 lea -0x1c(%ebp),%eax 10baee: 50 push %eax 10baef: ff 73 0c pushl 0xc(%ebx) 10baf2: ff 73 14 pushl 0x14(%ebx) 10baf5: ff 73 04 pushl 0x4(%ebx) 10baf8: ff 73 08 pushl 0x8(%ebx) 10bafb: ff 33 pushl (%ebx) 10bafd: e8 92 fd ff ff call 10b894 user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 10bb02: 83 c4 20 add $0x20,%esp 10bb05: 85 c0 test %eax,%eax 10bb07: 75 26 jne 10bb2f <_RTEMS_tasks_Initialize_user_tasks_body+0x67> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 10bb09: 51 push %ecx 10bb0a: ff 73 18 pushl 0x18(%ebx) 10bb0d: ff 73 10 pushl 0x10(%ebx) 10bb10: ff 75 e4 pushl -0x1c(%ebp) 10bb13: e8 24 00 00 00 call 10bb3c id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 10bb18: 83 c4 10 add $0x10,%esp 10bb1b: 85 c0 test %eax,%eax 10bb1d: 75 10 jne 10bb2f <_RTEMS_tasks_Initialize_user_tasks_body+0x67> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10bb1f: 46 inc %esi 10bb20: 83 c3 1c add $0x1c,%ebx 10bb23: 39 f7 cmp %esi,%edi 10bb25: 77 c1 ja 10bae8 <_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 ); } } 10bb27: 8d 65 f4 lea -0xc(%ebp),%esp 10bb2a: 5b pop %ebx 10bb2b: 5e pop %esi 10bb2c: 5f pop %edi 10bb2d: c9 leave 10bb2e: 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 ); 10bb2f: 52 push %edx 10bb30: 50 push %eax 10bb31: 6a 01 push $0x1 10bb33: 6a 01 push $0x1 10bb35: e8 2e 0d 00 00 call 10c868 <_Internal_error_Occurred> =============================================================================== 001102ec <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 1102ec: 55 push %ebp 1102ed: 89 e5 mov %esp,%ebp 1102ef: 57 push %edi 1102f0: 56 push %esi 1102f1: 53 push %ebx 1102f2: 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 ]; 1102f5: 8b 45 08 mov 0x8(%ebp),%eax 1102f8: 8b 98 e4 00 00 00 mov 0xe4(%eax),%ebx if ( !api ) 1102fe: 85 db test %ebx,%ebx 110300: 74 45 je 110347 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 110302: 9c pushf 110303: fa cli 110304: 58 pop %eax signal_set = asr->signals_posted; 110305: 8b 73 14 mov 0x14(%ebx),%esi asr->signals_posted = 0; 110308: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 11030f: 50 push %eax 110310: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 110311: 85 f6 test %esi,%esi 110313: 74 32 je 110347 <_RTEMS_tasks_Post_switch_extension+0x5b> return; asr->nest_level += 1; 110315: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 110318: 50 push %eax 110319: 8d 7d e4 lea -0x1c(%ebp),%edi 11031c: 57 push %edi 11031d: 68 ff ff 00 00 push $0xffff 110322: ff 73 10 pushl 0x10(%ebx) 110325: e8 86 1b 00 00 call 111eb0 (*asr->handler)( signal_set ); 11032a: 89 34 24 mov %esi,(%esp) 11032d: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 110330: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 110333: 83 c4 0c add $0xc,%esp 110336: 57 push %edi 110337: 68 ff ff 00 00 push $0xffff 11033c: ff 75 e4 pushl -0x1c(%ebp) 11033f: e8 6c 1b 00 00 call 111eb0 110344: 83 c4 10 add $0x10,%esp } 110347: 8d 65 f4 lea -0xc(%ebp),%esp 11034a: 5b pop %ebx 11034b: 5e pop %esi 11034c: 5f pop %edi 11034d: c9 leave 11034e: c3 ret =============================================================================== 0011028c <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 11028c: 55 push %ebp 11028d: 89 e5 mov %esp,%ebp /* * Per Task Variables */ tvp = executing->task_variables; 11028f: 8b 45 08 mov 0x8(%ebp),%eax 110292: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax while (tvp) { 110298: 85 c0 test %eax,%eax 11029a: 74 13 je 1102af <_RTEMS_tasks_Switch_extension+0x23> tvp->tval = *tvp->ptr; 11029c: 8b 50 04 mov 0x4(%eax),%edx 11029f: 8b 0a mov (%edx),%ecx 1102a1: 89 48 0c mov %ecx,0xc(%eax) *tvp->ptr = tvp->gval; 1102a4: 8b 48 08 mov 0x8(%eax),%ecx 1102a7: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 1102a9: 8b 00 mov (%eax),%eax /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 1102ab: 85 c0 test %eax,%eax 1102ad: 75 ed jne 11029c <_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; 1102af: 8b 45 0c mov 0xc(%ebp),%eax 1102b2: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax while (tvp) { 1102b8: 85 c0 test %eax,%eax 1102ba: 74 13 je 1102cf <_RTEMS_tasks_Switch_extension+0x43> tvp->gval = *tvp->ptr; 1102bc: 8b 50 04 mov 0x4(%eax),%edx 1102bf: 8b 0a mov (%edx),%ecx 1102c1: 89 48 08 mov %ecx,0x8(%eax) *tvp->ptr = tvp->tval; 1102c4: 8b 48 0c mov 0xc(%eax),%ecx 1102c7: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 1102c9: 8b 00 mov (%eax),%eax *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 1102cb: 85 c0 test %eax,%eax 1102cd: 75 ed jne 1102bc <_RTEMS_tasks_Switch_extension+0x30><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 1102cf: c9 leave 1102d0: c3 ret =============================================================================== 0010c538 <_Rate_monotonic_Initiate_statistics>: } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { 10c538: 55 push %ebp 10c539: 89 e5 mov %esp,%ebp 10c53b: 57 push %edi 10c53c: 56 push %esi 10c53d: 53 push %ebx 10c53e: 83 ec 28 sub $0x28,%esp 10c541: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *owning_thread = the_period->owner; 10c544: 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 ); 10c547: 8d 7d e0 lea -0x20(%ebp),%edi 10c54a: 57 push %edi 10c54b: e8 c4 17 00 00 call 10dd14 <_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; 10c550: 8b 45 e0 mov -0x20(%ebp),%eax 10c553: 8b 55 e4 mov -0x1c(%ebp),%edx 10c556: 89 43 4c mov %eax,0x4c(%ebx) 10c559: 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; 10c55c: 8b 86 84 00 00 00 mov 0x84(%esi),%eax 10c562: 8b 96 88 00 00 00 mov 0x88(%esi),%edx 10c568: 89 43 44 mov %eax,0x44(%ebx) 10c56b: 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) { 10c56e: 83 c4 10 add $0x10,%esp 10c571: 39 35 18 9d 12 00 cmp %esi,0x129d18 10c577: 74 0b je 10c584 <_Rate_monotonic_Initiate_statistics+0x4c> ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); } #endif } 10c579: 8d 65 f4 lea -0xc(%ebp),%esp 10c57c: 5b pop %ebx 10c57d: 5e pop %esi 10c57e: 5f pop %edi 10c57f: c9 leave 10c580: c3 ret 10c581: 8d 76 00 lea 0x0(%esi),%esi /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 10c584: 50 push %eax &_Thread_Time_of_last_context_switch, &uptime, &ran 10c585: 8d 75 d8 lea -0x28(%ebp),%esi /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 10c588: 56 push %esi 10c589: 57 push %edi 10c58a: 68 4c 9b 12 00 push $0x129b4c 10c58f: e8 78 38 00 00 call 10fe0c <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); 10c594: 59 pop %ecx 10c595: 5f pop %edi 10c596: 56 push %esi 10c597: 83 c3 44 add $0x44,%ebx 10c59a: 53 push %ebx 10c59b: e8 70 37 00 00 call 10fd10 <_Timespec_Add_to> 10c5a0: 83 c4 10 add $0x10,%esp } #endif } 10c5a3: 8d 65 f4 lea -0xc(%ebp),%esp 10c5a6: 5b pop %ebx 10c5a7: 5e pop %esi 10c5a8: 5f pop %edi 10c5a9: c9 leave 10c5aa: c3 ret =============================================================================== 0010caf4 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 10caf4: 55 push %ebp 10caf5: 89 e5 mov %esp,%ebp 10caf7: 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 ); 10cafa: 8d 45 f4 lea -0xc(%ebp),%eax 10cafd: 50 push %eax 10cafe: ff 75 08 pushl 0x8(%ebp) 10cb01: 68 a0 99 12 00 push $0x1299a0 10cb06: e8 85 1c 00 00 call 10e790 <_Objects_Get> switch ( location ) { 10cb0b: 83 c4 10 add $0x10,%esp 10cb0e: 8b 55 f4 mov -0xc(%ebp),%edx 10cb11: 85 d2 test %edx,%edx 10cb13: 75 29 jne 10cb3e <_Rate_monotonic_Timeout+0x4a><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 10cb15: 8b 50 40 mov 0x40(%eax),%edx if ( _States_Is_waiting_for_period( the_thread->current_state ) && 10cb18: f6 42 11 40 testb $0x40,0x11(%edx) 10cb1c: 74 08 je 10cb26 <_Rate_monotonic_Timeout+0x32> 10cb1e: 8b 48 08 mov 0x8(%eax),%ecx 10cb21: 39 4a 20 cmp %ecx,0x20(%edx) 10cb24: 74 4e je 10cb74 <_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 ) { 10cb26: 83 78 38 01 cmpl $0x1,0x38(%eax) 10cb2a: 74 14 je 10cb40 <_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; 10cb2c: 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; 10cb33: a1 90 9a 12 00 mov 0x129a90,%eax 10cb38: 48 dec %eax 10cb39: a3 90 9a 12 00 mov %eax,0x129a90 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10cb3e: c9 leave 10cb3f: 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; 10cb40: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax) _Rate_monotonic_Initiate_statistics( the_period ); 10cb47: 83 ec 0c sub $0xc,%esp 10cb4a: 50 push %eax 10cb4b: 89 45 e4 mov %eax,-0x1c(%ebp) 10cb4e: e8 e5 f9 ff ff call 10c538 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10cb53: 8b 45 e4 mov -0x1c(%ebp),%eax 10cb56: 8b 50 3c mov 0x3c(%eax),%edx 10cb59: 89 50 1c mov %edx,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10cb5c: 5a pop %edx 10cb5d: 59 pop %ecx _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); 10cb5e: 83 c0 10 add $0x10,%eax 10cb61: 50 push %eax 10cb62: 68 60 9b 12 00 push $0x129b60 10cb67: e8 80 35 00 00 call 1100ec <_Watchdog_Insert> 10cb6c: 83 c4 10 add $0x10,%esp 10cb6f: eb c2 jmp 10cb33 <_Rate_monotonic_Timeout+0x3f> 10cb71: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10cb74: 83 ec 08 sub $0x8,%esp 10cb77: 68 f8 ff 03 10 push $0x1003fff8 10cb7c: 52 push %edx 10cb7d: 89 45 e4 mov %eax,-0x1c(%ebp) 10cb80: e8 f7 23 00 00 call 10ef7c <_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 ); 10cb85: 8b 45 e4 mov -0x1c(%ebp),%eax 10cb88: 89 04 24 mov %eax,(%esp) 10cb8b: eb c1 jmp 10cb4e <_Rate_monotonic_Timeout+0x5a> =============================================================================== 0010c5ac <_Rate_monotonic_Update_statistics>: void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 10c5ac: 55 push %ebp 10c5ad: 89 e5 mov %esp,%ebp 10c5af: 57 push %edi 10c5b0: 56 push %esi 10c5b1: 53 push %ebx 10c5b2: 83 ec 1c sub $0x1c,%esp 10c5b5: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 10c5b8: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 10c5bb: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 10c5bf: 0f 84 bf 00 00 00 je 10c684 <_Rate_monotonic_Update_statistics+0xd8> stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10c5c5: 51 push %ecx _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 10c5c6: 8d 7d e0 lea -0x20(%ebp),%edi stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10c5c9: 57 push %edi _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 10c5ca: 8d 75 d8 lea -0x28(%ebp),%esi stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10c5cd: 56 push %esi 10c5ce: 53 push %ebx 10c5cf: e8 cc fe ff ff call 10c4a0 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) 10c5d4: 83 c4 10 add $0x10,%esp 10c5d7: 84 c0 test %al,%al 10c5d9: 75 09 jne 10c5e4 <_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 } 10c5db: 8d 65 f4 lea -0xc(%ebp),%esp 10c5de: 5b pop %ebx 10c5df: 5e pop %esi 10c5e0: 5f pop %edi 10c5e1: c9 leave 10c5e2: c3 ret 10c5e3: 90 nop /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 10c5e4: 83 ec 08 sub $0x8,%esp 10c5e7: 57 push %edi 10c5e8: 8d 43 6c lea 0x6c(%ebx),%eax 10c5eb: 50 push %eax 10c5ec: e8 1f 37 00 00 call 10fd10 <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 10c5f1: 58 pop %eax 10c5f2: 5a pop %edx 10c5f3: 8d 43 5c lea 0x5c(%ebx),%eax 10c5f6: 50 push %eax 10c5f7: 57 push %edi 10c5f8: e8 eb 37 00 00 call 10fde8 <_Timespec_Less_than> 10c5fd: 83 c4 10 add $0x10,%esp 10c600: 84 c0 test %al,%al 10c602: 74 0c je 10c610 <_Rate_monotonic_Update_statistics+0x64> stats->min_cpu_time = executed; 10c604: 8b 45 e0 mov -0x20(%ebp),%eax 10c607: 8b 55 e4 mov -0x1c(%ebp),%edx 10c60a: 89 43 5c mov %eax,0x5c(%ebx) 10c60d: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 10c610: 83 ec 08 sub $0x8,%esp 10c613: 8d 43 64 lea 0x64(%ebx),%eax 10c616: 50 push %eax 10c617: 57 push %edi 10c618: e8 a7 37 00 00 call 10fdc4 <_Timespec_Greater_than> 10c61d: 83 c4 10 add $0x10,%esp 10c620: 84 c0 test %al,%al 10c622: 74 0c je 10c630 <_Rate_monotonic_Update_statistics+0x84> stats->max_cpu_time = executed; 10c624: 8b 45 e0 mov -0x20(%ebp),%eax 10c627: 8b 55 e4 mov -0x1c(%ebp),%edx 10c62a: 89 43 64 mov %eax,0x64(%ebx) 10c62d: 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 ); 10c630: 83 ec 08 sub $0x8,%esp 10c633: 56 push %esi 10c634: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10c63a: 50 push %eax 10c63b: e8 d0 36 00 00 call 10fd10 <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 10c640: 5a pop %edx 10c641: 59 pop %ecx 10c642: 8d 43 74 lea 0x74(%ebx),%eax 10c645: 50 push %eax 10c646: 56 push %esi 10c647: e8 9c 37 00 00 call 10fde8 <_Timespec_Less_than> 10c64c: 83 c4 10 add $0x10,%esp 10c64f: 84 c0 test %al,%al 10c651: 75 39 jne 10c68c <_Rate_monotonic_Update_statistics+0xe0> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 10c653: 83 ec 08 sub $0x8,%esp 10c656: 8d 43 7c lea 0x7c(%ebx),%eax 10c659: 50 push %eax 10c65a: 56 push %esi 10c65b: e8 64 37 00 00 call 10fdc4 <_Timespec_Greater_than> 10c660: 83 c4 10 add $0x10,%esp 10c663: 84 c0 test %al,%al 10c665: 0f 84 70 ff ff ff je 10c5db <_Rate_monotonic_Update_statistics+0x2f> stats->max_wall_time = since_last_period; 10c66b: 8b 45 d8 mov -0x28(%ebp),%eax 10c66e: 8b 55 dc mov -0x24(%ebp),%edx 10c671: 89 43 7c mov %eax,0x7c(%ebx) 10c674: 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 } 10c67a: 8d 65 f4 lea -0xc(%ebp),%esp 10c67d: 5b pop %ebx 10c67e: 5e pop %esi 10c67f: 5f pop %edi 10c680: c9 leave 10c681: c3 ret 10c682: 66 90 xchg %ax,%ax */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 10c684: ff 43 58 incl 0x58(%ebx) 10c687: e9 39 ff ff ff jmp 10c5c5 <_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; 10c68c: 8b 45 d8 mov -0x28(%ebp),%eax 10c68f: 8b 55 dc mov -0x24(%ebp),%edx 10c692: 89 43 74 mov %eax,0x74(%ebx) 10c695: 89 53 78 mov %edx,0x78(%ebx) 10c698: eb b9 jmp 10c653 <_Rate_monotonic_Update_statistics+0xa7> =============================================================================== 0010d0d8 <_Scheduler_priority_Block>: #include void _Scheduler_priority_Block( Thread_Control *the_thread ) { 10d0d8: 55 push %ebp 10d0d9: 89 e5 mov %esp,%ebp 10d0db: 53 push %ebx 10d0dc: 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; 10d0df: 8b 88 8c 00 00 00 mov 0x8c(%eax),%ecx ready = sched_info->ready_chain; 10d0e5: 8b 11 mov (%ecx),%edx if ( _Chain_Has_only_one_node( ready ) ) { 10d0e7: 8b 5a 08 mov 0x8(%edx),%ebx 10d0ea: 39 1a cmp %ebx,(%edx) 10d0ec: 74 6e je 10d15c <_Scheduler_priority_Block+0x84> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10d0ee: 8b 08 mov (%eax),%ecx previous = the_node->previous; 10d0f0: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10d0f3: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 10d0f6: 89 0a mov %ecx,(%edx) _Scheduler_priority_Ready_queue_extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) 10d0f8: 3b 05 5c 67 12 00 cmp 0x12675c,%eax 10d0fe: 74 18 je 10d118 <_Scheduler_priority_Block+0x40> _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) 10d100: 3b 05 58 67 12 00 cmp 0x126758,%eax 10d106: 74 04 je 10d10c <_Scheduler_priority_Block+0x34> _Thread_Dispatch_necessary = true; } 10d108: 5b pop %ebx 10d109: c9 leave 10d10a: c3 ret 10d10b: 90 nop if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 10d10c: c6 05 64 67 12 00 01 movb $0x1,0x126764 } 10d113: 5b pop %ebx 10d114: c9 leave 10d115: c3 ret 10d116: 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 ); 10d118: 66 8b 1d 80 67 12 00 mov 0x126780,%bx 10d11f: 31 d2 xor %edx,%edx 10d121: 89 d1 mov %edx,%ecx 10d123: 66 0f bc cb bsf %bx,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10d127: 0f b7 c9 movzwl %cx,%ecx 10d12a: 66 8b 9c 09 a0 67 12 mov 0x1267a0(%ecx,%ecx,1),%bx 10d131: 00 10d132: 66 0f bc d3 bsf %bx,%dx return (_Priority_Bits_index( major ) << 4) + 10d136: c1 e1 04 shl $0x4,%ecx 10d139: 0f b7 d2 movzwl %dx,%edx 10d13c: 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 ] ) ) 10d13f: 8d 14 52 lea (%edx,%edx,2),%edx 10d142: c1 e2 02 shl $0x2,%edx 10d145: 03 15 60 21 12 00 add 0x122160,%edx 10d14b: 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 ); 10d14d: 83 c2 04 add $0x4,%edx 10d150: 39 d1 cmp %edx,%ecx 10d152: 74 44 je 10d198 <_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( 10d154: 89 0d 5c 67 12 00 mov %ecx,0x12675c 10d15a: eb a4 jmp 10d100 <_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 ); 10d15c: 8d 5a 04 lea 0x4(%edx),%ebx 10d15f: 89 1a mov %ebx,(%edx) head->next = tail; head->previous = NULL; 10d161: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) tail->previous = head; 10d168: 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; 10d16b: 8b 59 04 mov 0x4(%ecx),%ebx 10d16e: 66 8b 13 mov (%ebx),%dx 10d171: 66 23 51 0e and 0xe(%ecx),%dx 10d175: 66 89 13 mov %dx,(%ebx) if ( *the_priority_map->minor == 0 ) 10d178: 66 85 d2 test %dx,%dx 10d17b: 0f 85 77 ff ff ff jne 10d0f8 <_Scheduler_priority_Block+0x20> _Priority_Major_bit_map &= the_priority_map->block_major; 10d181: 66 8b 15 80 67 12 00 mov 0x126780,%dx 10d188: 23 51 0c and 0xc(%ecx),%edx 10d18b: 66 89 15 80 67 12 00 mov %dx,0x126780 10d192: e9 61 ff ff ff jmp 10d0f8 <_Scheduler_priority_Block+0x20> 10d197: 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; 10d198: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 10d19a: eb b8 jmp 10d154 <_Scheduler_priority_Block+0x7c><== NOT EXECUTED =============================================================================== 0010d2ec <_Scheduler_priority_Schedule>: #include #include #include void _Scheduler_priority_Schedule(void) { 10d2ec: 55 push %ebp 10d2ed: 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 ); 10d2ef: 66 8b 0d 80 67 12 00 mov 0x126780,%cx 10d2f6: 31 c0 xor %eax,%eax 10d2f8: 89 c2 mov %eax,%edx 10d2fa: 66 0f bc d1 bsf %cx,%dx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10d2fe: 0f b7 d2 movzwl %dx,%edx 10d301: 66 8b 8c 12 a0 67 12 mov 0x1267a0(%edx,%edx,1),%cx 10d308: 00 10d309: 66 0f bc c1 bsf %cx,%ax return (_Priority_Bits_index( major ) << 4) + 10d30d: c1 e2 04 shl $0x4,%edx 10d310: 0f b7 c0 movzwl %ax,%eax 10d313: 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 ] ) ) 10d316: 8d 04 40 lea (%eax,%eax,2),%eax 10d319: c1 e0 02 shl $0x2,%eax 10d31c: 03 05 60 21 12 00 add 0x122160,%eax _Scheduler_priority_Schedule_body(); } 10d322: 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 ); 10d324: 83 c0 04 add $0x4,%eax 10d327: 39 c2 cmp %eax,%edx 10d329: 74 09 je 10d334 <_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( 10d32b: 89 15 5c 67 12 00 mov %edx,0x12675c 10d331: c9 leave 10d332: c3 ret 10d333: 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; 10d334: 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( 10d336: 89 15 5c 67 12 00 mov %edx,0x12675c <== NOT EXECUTED 10d33c: c9 leave <== NOT EXECUTED 10d33d: c3 ret <== NOT EXECUTED =============================================================================== 0010d410 <_Scheduler_priority_Yield>: * ready chain * select heir */ void _Scheduler_priority_Yield(void) { 10d410: 55 push %ebp 10d411: 89 e5 mov %esp,%ebp 10d413: 56 push %esi 10d414: 53 push %ebx Scheduler_priority_Per_thread *sched_info; ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10d415: a1 58 67 12 00 mov 0x126758,%eax sched_info = (Scheduler_priority_Per_thread *) executing->scheduler_info; ready = sched_info->ready_chain; 10d41a: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx 10d420: 8b 12 mov (%edx),%edx _ISR_Disable( level ); 10d422: 9c pushf 10d423: fa cli 10d424: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10d425: 8b 5a 08 mov 0x8(%edx),%ebx 10d428: 39 1a cmp %ebx,(%edx) 10d42a: 74 40 je 10d46c <_Scheduler_priority_Yield+0x5c> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10d42c: 8b 30 mov (%eax),%esi previous = the_node->previous; 10d42e: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10d431: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10d434: 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; 10d436: 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 ); 10d439: 8d 72 04 lea 0x4(%edx),%esi 10d43c: 89 30 mov %esi,(%eax) Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; 10d43e: 89 42 08 mov %eax,0x8(%edx) old_last->next = the_node; 10d441: 89 03 mov %eax,(%ebx) the_node->previous = old_last; 10d443: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10d446: 51 push %ecx 10d447: 9d popf 10d448: fa cli if ( _Thread_Is_heir( executing ) ) 10d449: 3b 05 5c 67 12 00 cmp 0x12675c,%eax 10d44f: 74 0f je 10d460 <_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; 10d451: c6 05 64 67 12 00 01 movb $0x1,0x126764 _ISR_Enable( level ); 10d458: 51 push %ecx 10d459: 9d popf } 10d45a: 5b pop %ebx 10d45b: 5e pop %esi 10d45c: c9 leave 10d45d: c3 ret 10d45e: 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 ); 10d460: 8b 02 mov (%edx),%eax 10d462: a3 5c 67 12 00 mov %eax,0x12675c 10d467: eb e8 jmp 10d451 <_Scheduler_priority_Yield+0x41> 10d469: 8d 76 00 lea 0x0(%esi),%esi _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10d46c: 3b 05 5c 67 12 00 cmp 0x12675c,%eax 10d472: 75 dd jne 10d451 <_Scheduler_priority_Yield+0x41><== NEVER TAKEN 10d474: eb e2 jmp 10d458 <_Scheduler_priority_Yield+0x48> =============================================================================== 0010da6c <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 10da6c: 55 push %ebp 10da6d: 89 e5 mov %esp,%ebp 10da6f: 53 push %ebx 10da70: 83 ec 04 sub $0x4,%esp 10da73: 8b 5d 08 mov 0x8(%ebp),%ebx 10da76: a1 70 99 12 00 mov 0x129970,%eax 10da7b: 40 inc %eax 10da7c: a3 70 99 12 00 mov %eax,0x129970 long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 10da81: a1 08 9a 12 00 mov 0x129a08,%eax if ( time->tv_sec < seconds ) 10da86: 8b 13 mov (%ebx),%edx 10da88: 39 d0 cmp %edx,%eax 10da8a: 7f 34 jg 10dac0 <_TOD_Set+0x54> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 10da8c: 51 push %ecx _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); 10da8d: 29 c2 sub %eax,%edx 10da8f: 52 push %edx 10da90: 6a 00 push $0x0 10da92: 68 34 9a 12 00 push $0x129a34 10da97: e8 6c 24 00 00 call 10ff08 <_Watchdog_Adjust> 10da9c: 83 c4 10 add $0x10,%esp /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 10da9f: 8b 03 mov (%ebx),%eax 10daa1: a3 08 9a 12 00 mov %eax,0x129a08 10daa6: 8b 43 04 mov 0x4(%ebx),%eax 10daa9: a3 0c 9a 12 00 mov %eax,0x129a0c _TOD_Is_set = true; 10daae: c6 05 84 99 12 00 01 movb $0x1,0x129984 _TOD_Activate(); _Thread_Enable_dispatch(); } 10dab5: 8b 5d fc mov -0x4(%ebp),%ebx 10dab8: c9 leave _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); 10dab9: e9 c6 15 00 00 jmp 10f084 <_Thread_Enable_dispatch> 10dabe: 66 90 xchg %ax,%ax 10dac0: 51 push %ecx _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); if ( time->tv_sec < seconds ) _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); 10dac1: 29 d0 sub %edx,%eax 10dac3: 50 push %eax 10dac4: 6a 01 push $0x1 10dac6: 68 34 9a 12 00 push $0x129a34 10dacb: e8 38 24 00 00 call 10ff08 <_Watchdog_Adjust> 10dad0: 83 c4 10 add $0x10,%esp 10dad3: eb ca jmp 10da9f <_TOD_Set+0x33> =============================================================================== 0010c488 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 10c488: 55 push %ebp 10c489: 89 e5 mov %esp,%ebp 10c48b: 53 push %ebx 10c48c: 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() ); 10c48f: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 10c496: a1 6c 22 12 00 mov 0x12226c,%eax 10c49b: 8d 04 80 lea (%eax,%eax,4),%eax 10c49e: 8d 04 80 lea (%eax,%eax,4),%eax 10c4a1: 8d 04 80 lea (%eax,%eax,4),%eax 10c4a4: c1 e0 03 shl $0x3,%eax 10c4a7: 89 45 f4 mov %eax,-0xc(%ebp) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 10c4aa: a1 04 66 12 00 mov 0x126604,%eax 10c4af: 40 inc %eax 10c4b0: a3 04 66 12 00 mov %eax,0x126604 /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 10c4b5: 8d 5d f0 lea -0x10(%ebp),%ebx 10c4b8: 53 push %ebx 10c4b9: 68 58 65 12 00 push $0x126558 10c4be: e8 29 1e 00 00 call 10e2ec <_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 ); 10c4c3: 58 pop %eax 10c4c4: 5a pop %edx 10c4c5: 53 push %ebx 10c4c6: 68 68 65 12 00 push $0x126568 10c4cb: e8 1c 1e 00 00 call 10e2ec <_Timespec_Add_to> 10c4d0: 89 c3 mov %eax,%ebx while ( seconds ) { 10c4d2: 83 c4 10 add $0x10,%esp 10c4d5: 85 c0 test %eax,%eax 10c4d7: 74 16 je 10c4ef <_TOD_Tickle_ticks+0x67> 10c4d9: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 10c4dc: 83 ec 0c sub $0xc,%esp 10c4df: 68 94 65 12 00 push $0x126594 10c4e4: e8 cb 22 00 00 call 10e7b4 <_Watchdog_Tickle> 10c4e9: 83 c4 10 add $0x10,%esp 10c4ec: 4b dec %ebx 10c4ed: 75 ed jne 10c4dc <_TOD_Tickle_ticks+0x54><== NEVER TAKEN _Watchdog_Tickle_seconds(); seconds--; } } 10c4ef: 8b 5d fc mov -0x4(%ebp),%ebx 10c4f2: c9 leave 10c4f3: c3 ret =============================================================================== 0010c24c <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 10c24c: 55 push %ebp 10c24d: 89 e5 mov %esp,%ebp 10c24f: 56 push %esi 10c250: 53 push %ebx 10c251: 8b 55 08 mov 0x8(%ebp),%edx uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 10c254: 8b 72 08 mov 0x8(%edx),%esi 10c257: 4e dec %esi year_mod_4 = the_tod->year & 3; 10c258: 8b 02 mov (%edx),%eax if ( year_mod_4 == 0 ) 10c25a: 89 c3 mov %eax,%ebx 10c25c: 83 e3 03 and $0x3,%ebx 10c25f: 74 67 je 10c2c8 <_TOD_To_seconds+0x7c> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 10c261: 8b 4a 04 mov 0x4(%edx),%ecx 10c264: 0f b7 8c 09 c0 2e 12 movzwl 0x122ec0(%ecx,%ecx,1),%ecx 10c26b: 00 10c26c: 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 ]; 10c26f: 0f b7 8c 1b f4 2e 12 movzwl 0x122ef4(%ebx,%ebx,1),%ecx 10c276: 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 ) * 10c277: 2d c4 07 00 00 sub $0x7c4,%eax 10c27c: c1 e8 02 shr $0x2,%eax 10c27f: 8d 1c c0 lea (%eax,%eax,8),%ebx 10c282: 8d 1c d8 lea (%eax,%ebx,8),%ebx 10c285: 8d 1c 9b lea (%ebx,%ebx,4),%ebx 10c288: 8d 04 98 lea (%eax,%ebx,4),%eax 10c28b: 01 c1 add %eax,%ecx ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10c28d: 01 f1 add %esi,%ecx time *= TOD_SECONDS_PER_DAY; 10c28f: 8d 04 89 lea (%ecx,%ecx,4),%eax 10c292: 8d 04 81 lea (%ecx,%eax,4),%eax 10c295: 8d 04 c1 lea (%ecx,%eax,8),%eax 10c298: c1 e0 02 shl $0x2,%eax 10c29b: 29 c8 sub %ecx,%eax 10c29d: c1 e0 07 shl $0x7,%eax time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 10c2a0: 8b 5a 14 mov 0x14(%edx),%ebx 10c2a3: 8b 4a 0c mov 0xc(%edx),%ecx 10c2a6: 8d 0c 49 lea (%ecx,%ecx,2),%ecx 10c2a9: 8d 0c 89 lea (%ecx,%ecx,4),%ecx 10c2ac: c1 e1 02 shl $0x2,%ecx 10c2af: 03 4a 10 add 0x10(%edx),%ecx * TOD_SECONDS_PER_MINUTE; 10c2b2: 8d 14 49 lea (%ecx,%ecx,2),%edx 10c2b5: 8d 14 92 lea (%edx,%edx,4),%edx time += the_tod->second; 10c2b8: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx time += TOD_SECONDS_1970_THROUGH_1988; 10c2bf: 8d 04 02 lea (%edx,%eax,1),%eax return( time ); } 10c2c2: 5b pop %ebx 10c2c3: 5e pop %esi 10c2c4: c9 leave 10c2c5: c3 ret 10c2c6: 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 ]; 10c2c8: 8b 4a 04 mov 0x4(%edx),%ecx 10c2cb: 0f b7 8c 09 da 2e 12 movzwl 0x122eda(%ecx,%ecx,1),%ecx 10c2d2: 00 10c2d3: 8d 34 31 lea (%ecx,%esi,1),%esi 10c2d6: eb 97 jmp 10c26f <_TOD_To_seconds+0x23> =============================================================================== 0010c2d8 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10c2d8: 55 push %ebp 10c2d9: 89 e5 mov %esp,%ebp 10c2db: 53 push %ebx 10c2dc: 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(); 10c2df: 8b 1d 6c 52 12 00 mov 0x12526c,%ebx if ((!the_tod) || 10c2e5: 85 c9 test %ecx,%ecx 10c2e7: 74 53 je 10c33c <_TOD_Validate+0x64> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 10c2e9: b8 40 42 0f 00 mov $0xf4240,%eax 10c2ee: 31 d2 xor %edx,%edx 10c2f0: f7 f3 div %ebx rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c2f2: 3b 41 18 cmp 0x18(%ecx),%eax 10c2f5: 76 45 jbe 10c33c <_TOD_Validate+0x64> (the_tod->ticks >= ticks_per_second) || 10c2f7: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10c2fb: 77 3f ja 10c33c <_TOD_Validate+0x64> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10c2fd: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10c301: 77 39 ja 10c33c <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10c303: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10c307: 77 33 ja 10c33c <_TOD_Validate+0x64> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 10c309: 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) || 10c30c: 85 c0 test %eax,%eax 10c30e: 74 2c je 10c33c <_TOD_Validate+0x64> <== NEVER TAKEN (the_tod->month == 0) || 10c310: 83 f8 0c cmp $0xc,%eax 10c313: 77 27 ja 10c33c <_TOD_Validate+0x64> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10c315: 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) || 10c317: 81 fa c3 07 00 00 cmp $0x7c3,%edx 10c31d: 76 1d jbe 10c33c <_TOD_Validate+0x64> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10c31f: 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) || 10c322: 85 c9 test %ecx,%ecx 10c324: 74 16 je 10c33c <_TOD_Validate+0x64> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10c326: 83 e2 03 and $0x3,%edx 10c329: 75 16 jne 10c341 <_TOD_Validate+0x69> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10c32b: 8b 04 85 34 2f 12 00 mov 0x122f34(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10c332: 39 c8 cmp %ecx,%eax 10c334: 0f 93 c0 setae %al 10c337: eb 05 jmp 10c33e <_TOD_Validate+0x66> 10c339: 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; 10c33c: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10c33e: 5b pop %ebx 10c33f: c9 leave 10c340: 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 ]; 10c341: 8b 04 85 00 2f 12 00 mov 0x122f00(,%eax,4),%eax 10c348: eb e8 jmp 10c332 <_TOD_Validate+0x5a> =============================================================================== 0010d4c4 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10d4c4: 55 push %ebp 10d4c5: 89 e5 mov %esp,%ebp 10d4c7: 57 push %edi 10d4c8: 56 push %esi 10d4c9: 53 push %ebx 10d4ca: 83 ec 28 sub $0x28,%esp 10d4cd: 8b 5d 08 mov 0x8(%ebp),%ebx 10d4d0: 8b 75 0c mov 0xc(%ebp),%esi 10d4d3: 8a 45 10 mov 0x10(%ebp),%al 10d4d6: 88 45 e7 mov %al,-0x19(%ebp) States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 10d4d9: 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 ); 10d4dc: 53 push %ebx 10d4dd: e8 4a 0c 00 00 call 10e12c <_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 ) 10d4e2: 83 c4 10 add $0x10,%esp 10d4e5: 39 73 14 cmp %esi,0x14(%ebx) 10d4e8: 74 0d je 10d4f7 <_Thread_Change_priority+0x33> _Thread_Set_priority( the_thread, new_priority ); 10d4ea: 83 ec 08 sub $0x8,%esp 10d4ed: 56 push %esi 10d4ee: 53 push %ebx 10d4ef: e8 e4 0b 00 00 call 10e0d8 <_Thread_Set_priority> 10d4f4: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10d4f7: 9c pushf 10d4f8: fa cli 10d4f9: 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; 10d4fa: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10d4fd: 83 f8 04 cmp $0x4,%eax 10d500: 74 22 je 10d524 <_Thread_Change_priority+0x60> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10d502: 83 e7 04 and $0x4,%edi 10d505: 74 11 je 10d518 <_Thread_Change_priority+0x54><== ALWAYS TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10d507: 56 push %esi 10d508: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10d509: a9 e0 be 03 00 test $0x3bee0,%eax 10d50e: 75 60 jne 10d570 <_Thread_Change_priority+0xac> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 10d510: 8d 65 f4 lea -0xc(%ebp),%esp 10d513: 5b pop %ebx 10d514: 5e pop %esi 10d515: 5f pop %edi 10d516: c9 leave 10d517: c3 ret RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10d518: 89 c2 mov %eax,%edx 10d51a: 83 e2 fb and $0xfffffffb,%edx 10d51d: 89 53 10 mov %edx,0x10(%ebx) 10d520: eb e5 jmp 10d507 <_Thread_Change_priority+0x43> 10d522: 66 90 xchg %ax,%ax } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10d524: 83 e7 04 and $0x4,%edi 10d527: 75 1a jne 10d543 <_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 ); 10d529: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) if ( prepend_it ) 10d530: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10d534: 74 52 je 10d588 <_Thread_Change_priority+0xc4> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 10d536: 83 ec 0c sub $0xc,%esp 10d539: 53 push %ebx 10d53a: ff 15 88 21 12 00 call *0x122188 10d540: 83 c4 10 add $0x10,%esp _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 10d543: 56 push %esi 10d544: 9d popf 10d545: 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(); 10d546: 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 ); 10d54c: 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() && 10d551: 3b 05 5c 67 12 00 cmp 0x12675c,%eax 10d557: 74 0d je 10d566 <_Thread_Change_priority+0xa2> 10d559: 80 78 74 00 cmpb $0x0,0x74(%eax) 10d55d: 74 07 je 10d566 <_Thread_Change_priority+0xa2> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 10d55f: c6 05 64 67 12 00 01 movb $0x1,0x126764 _ISR_Enable( level ); 10d566: 56 push %esi 10d567: 9d popf } 10d568: 8d 65 f4 lea -0xc(%ebp),%esp 10d56b: 5b pop %ebx 10d56c: 5e pop %esi 10d56d: 5f pop %edi 10d56e: c9 leave 10d56f: 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 ); 10d570: 89 5d 0c mov %ebx,0xc(%ebp) 10d573: 8b 43 44 mov 0x44(%ebx),%eax 10d576: 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 ); } 10d579: 8d 65 f4 lea -0xc(%ebp),%esp 10d57c: 5b pop %ebx 10d57d: 5e pop %esi 10d57e: 5f pop %edi 10d57f: 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 ); 10d580: e9 bb 0a 00 00 jmp 10e040 <_Thread_queue_Requeue> 10d585: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 10d588: 83 ec 0c sub $0xc,%esp 10d58b: 53 push %ebx 10d58c: ff 15 84 21 12 00 call *0x122184 10d592: 83 c4 10 add $0x10,%esp 10d595: eb ac jmp 10d543 <_Thread_Change_priority+0x7f> =============================================================================== 0010d598 <_Thread_Clear_state>: */ void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10d598: 55 push %ebp 10d599: 89 e5 mov %esp,%ebp 10d59b: 53 push %ebx 10d59c: 83 ec 04 sub $0x4,%esp 10d59f: 8b 55 08 mov 0x8(%ebp),%edx 10d5a2: 8b 45 0c mov 0xc(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10d5a5: 9c pushf 10d5a6: fa cli 10d5a7: 5b pop %ebx current_state = the_thread->current_state; 10d5a8: 8b 4a 10 mov 0x10(%edx),%ecx if ( current_state & state ) { 10d5ab: 85 c8 test %ecx,%eax 10d5ad: 74 0b je 10d5ba <_Thread_Clear_state+0x22> 10d5af: f7 d0 not %eax 10d5b1: 21 c8 and %ecx,%eax current_state = the_thread->current_state = _States_Clear( state, current_state ); 10d5b3: 89 42 10 mov %eax,0x10(%edx) if ( _States_Is_ready( current_state ) ) { 10d5b6: 85 c0 test %eax,%eax 10d5b8: 74 0a je 10d5c4 <_Thread_Clear_state+0x2c> _Scheduler_Unblock( the_thread ); } } _ISR_Enable( level ); 10d5ba: 53 push %ebx 10d5bb: 9d popf } 10d5bc: 8b 5d fc mov -0x4(%ebp),%ebx 10d5bf: c9 leave 10d5c0: c3 ret 10d5c1: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Scheduler_Unblock( Thread_Control *the_thread ) { _Scheduler.Operations.unblock( the_thread ); 10d5c4: 83 ec 0c sub $0xc,%esp 10d5c7: 52 push %edx 10d5c8: ff 15 74 21 12 00 call *0x122174 10d5ce: 83 c4 10 add $0x10,%esp 10d5d1: eb e7 jmp 10d5ba <_Thread_Clear_state+0x22> =============================================================================== 0010d748 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10d748: 55 push %ebp 10d749: 89 e5 mov %esp,%ebp 10d74b: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10d74e: 8d 45 f4 lea -0xc(%ebp),%eax 10d751: 50 push %eax 10d752: ff 75 08 pushl 0x8(%ebp) 10d755: e8 c6 01 00 00 call 10d920 <_Thread_Get> switch ( location ) { 10d75a: 83 c4 10 add $0x10,%esp 10d75d: 8b 55 f4 mov -0xc(%ebp),%edx 10d760: 85 d2 test %edx,%edx 10d762: 75 1c jne 10d780 <_Thread_Delay_ended+0x38><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10d764: 83 ec 08 sub $0x8,%esp 10d767: 68 18 00 00 10 push $0x10000018 10d76c: 50 push %eax 10d76d: e8 26 fe ff ff call 10d598 <_Thread_Clear_state> 10d772: a1 d0 64 12 00 mov 0x1264d0,%eax 10d777: 48 dec %eax 10d778: a3 d0 64 12 00 mov %eax,0x1264d0 10d77d: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10d780: c9 leave 10d781: c3 ret =============================================================================== 0010d784 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10d784: 55 push %ebp 10d785: 89 e5 mov %esp,%ebp 10d787: 57 push %edi 10d788: 56 push %esi 10d789: 53 push %ebx 10d78a: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10d78d: 8b 1d 58 67 12 00 mov 0x126758,%ebx _ISR_Disable( level ); 10d793: 9c pushf 10d794: fa cli 10d795: 58 pop %eax while ( _Thread_Dispatch_necessary == true ) { 10d796: 8a 15 64 67 12 00 mov 0x126764,%dl 10d79c: 84 d2 test %dl,%dl 10d79e: 0f 84 3c 01 00 00 je 10d8e0 <_Thread_Dispatch+0x15c> heir = _Thread_Heir; 10d7a4: 8b 35 5c 67 12 00 mov 0x12675c,%esi _Thread_Dispatch_disable_level = 1; 10d7aa: c7 05 d0 64 12 00 01 movl $0x1,0x1264d0 10d7b1: 00 00 00 _Thread_Dispatch_necessary = false; 10d7b4: c6 05 64 67 12 00 00 movb $0x0,0x126764 _Thread_Executing = heir; 10d7bb: 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 ) 10d7c1: 39 f3 cmp %esi,%ebx 10d7c3: 0f 84 17 01 00 00 je 10d8e0 <_Thread_Dispatch+0x15c> 10d7c9: 8d 7d d8 lea -0x28(%ebp),%edi 10d7cc: e9 f5 00 00 00 jmp 10d8c6 <_Thread_Dispatch+0x142> 10d7d1: 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 ); 10d7d4: 50 push %eax 10d7d5: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10d7d6: 83 ec 0c sub $0xc,%esp 10d7d9: 8d 45 e0 lea -0x20(%ebp),%eax 10d7dc: 50 push %eax 10d7dd: e8 4e 2f 00 00 call 110730 <_TOD_Get_uptime> _Timestamp_Subtract( 10d7e2: 83 c4 0c add $0xc,%esp 10d7e5: 57 push %edi 10d7e6: 8d 45 e0 lea -0x20(%ebp),%eax 10d7e9: 50 push %eax 10d7ea: 68 8c 65 12 00 push $0x12658c 10d7ef: e8 34 0b 00 00 call 10e328 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10d7f4: 58 pop %eax 10d7f5: 5a pop %edx 10d7f6: 57 push %edi 10d7f7: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10d7fd: 50 push %eax 10d7fe: e8 e9 0a 00 00 call 10e2ec <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10d803: 8b 45 e0 mov -0x20(%ebp),%eax 10d806: 8b 55 e4 mov -0x1c(%ebp),%edx 10d809: a3 8c 65 12 00 mov %eax,0x12658c 10d80e: 89 15 90 65 12 00 mov %edx,0x126590 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10d814: a1 64 65 12 00 mov 0x126564,%eax 10d819: 83 c4 10 add $0x10,%esp 10d81c: 85 c0 test %eax,%eax 10d81e: 74 10 je 10d830 <_Thread_Dispatch+0xac> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10d820: 8b 10 mov (%eax),%edx 10d822: 89 93 e0 00 00 00 mov %edx,0xe0(%ebx) *_Thread_libc_reent = heir->libc_reent; 10d828: 8b 96 e0 00 00 00 mov 0xe0(%esi),%edx 10d82e: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10d830: 83 ec 08 sub $0x8,%esp 10d833: 56 push %esi 10d834: 53 push %ebx 10d835: e8 8e 0d 00 00 call 10e5c8 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10d83a: 5a pop %edx 10d83b: 59 pop %ecx 10d83c: 81 c6 c4 00 00 00 add $0xc4,%esi 10d842: 56 push %esi 10d843: 8d 83 c4 00 00 00 lea 0xc4(%ebx),%eax 10d849: 50 push %eax 10d84a: e8 81 10 00 00 call 10e8d0 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10d84f: 83 c4 10 add $0x10,%esp 10d852: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax 10d858: 85 c0 test %eax,%eax 10d85a: 74 36 je 10d892 <_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 ); 10d85c: a1 60 65 12 00 mov 0x126560,%eax 10d861: 39 c3 cmp %eax,%ebx 10d863: 74 2d je 10d892 <_Thread_Dispatch+0x10e> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10d865: 85 c0 test %eax,%eax 10d867: 74 11 je 10d87a <_Thread_Dispatch+0xf6> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10d869: 83 ec 0c sub $0xc,%esp 10d86c: 05 dc 00 00 00 add $0xdc,%eax 10d871: 50 push %eax 10d872: e8 8d 10 00 00 call 10e904 <_CPU_Context_save_fp> 10d877: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10d87a: 83 ec 0c sub $0xc,%esp 10d87d: 8d 83 dc 00 00 00 lea 0xdc(%ebx),%eax 10d883: 50 push %eax 10d884: e8 85 10 00 00 call 10e90e <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10d889: 89 1d 60 65 12 00 mov %ebx,0x126560 10d88f: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10d892: 8b 1d 58 67 12 00 mov 0x126758,%ebx _ISR_Disable( level ); 10d898: 9c pushf 10d899: fa cli 10d89a: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 10d89b: 8a 15 64 67 12 00 mov 0x126764,%dl 10d8a1: 84 d2 test %dl,%dl 10d8a3: 74 3b je 10d8e0 <_Thread_Dispatch+0x15c> heir = _Thread_Heir; 10d8a5: 8b 35 5c 67 12 00 mov 0x12675c,%esi _Thread_Dispatch_disable_level = 1; 10d8ab: c7 05 d0 64 12 00 01 movl $0x1,0x1264d0 10d8b2: 00 00 00 _Thread_Dispatch_necessary = false; 10d8b5: c6 05 64 67 12 00 00 movb $0x0,0x126764 _Thread_Executing = heir; 10d8bc: 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 ) 10d8c2: 39 de cmp %ebx,%esi 10d8c4: 74 1a je 10d8e0 <_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 ) 10d8c6: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10d8ca: 0f 85 04 ff ff ff jne 10d7d4 <_Thread_Dispatch+0x50> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10d8d0: 8b 15 a0 64 12 00 mov 0x1264a0,%edx 10d8d6: 89 56 78 mov %edx,0x78(%esi) 10d8d9: e9 f6 fe ff ff jmp 10d7d4 <_Thread_Dispatch+0x50> 10d8de: 66 90 xchg %ax,%ax _ISR_Disable( level ); } post_switch: _Thread_Dispatch_disable_level = 0; 10d8e0: c7 05 d0 64 12 00 00 movl $0x0,0x1264d0 10d8e7: 00 00 00 _ISR_Enable( level ); 10d8ea: 50 push %eax 10d8eb: 9d popf _API_extensions_Run_postswitch(); 10d8ec: e8 d3 e5 ff ff call 10bec4 <_API_extensions_Run_postswitch> } 10d8f1: 8d 65 f4 lea -0xc(%ebp),%esp 10d8f4: 5b pop %ebx 10d8f5: 5e pop %esi 10d8f6: 5f pop %edi 10d8f7: c9 leave 10d8f8: c3 ret =============================================================================== 0010d920 <_Thread_Get>: */ Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10d920: 55 push %ebp 10d921: 89 e5 mov %esp,%ebp 10d923: 53 push %ebx 10d924: 83 ec 04 sub $0x4,%esp 10d927: 8b 45 08 mov 0x8(%ebp),%eax 10d92a: 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 ) ) { 10d92d: 85 c0 test %eax,%eax 10d92f: 74 4b je 10d97c <_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); 10d931: 89 c2 mov %eax,%edx 10d933: c1 ea 18 shr $0x18,%edx 10d936: 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 ) 10d939: 8d 5a ff lea -0x1(%edx),%ebx 10d93c: 83 fb 02 cmp $0x2,%ebx 10d93f: 77 2b ja 10d96c <_Thread_Get+0x4c> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10d941: 89 c3 mov %eax,%ebx 10d943: 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 :) */ 10d946: 4b dec %ebx 10d947: 75 23 jne 10d96c <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 10d949: 8b 14 95 a8 64 12 00 mov 0x1264a8(,%edx,4),%edx * There is no way for this to happen if POSIX is enabled. But there * is actually a test case in sp43 for this which trips it whether or * not POSIX is enabled. So in the interest of safety, this is left * on in all configurations. */ if ( !api_information ) { 10d950: 85 d2 test %edx,%edx 10d952: 74 18 je 10d96c <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 10d954: 8b 52 04 mov 0x4(%edx),%edx if ( !information ) { 10d957: 85 d2 test %edx,%edx 10d959: 74 11 je 10d96c <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10d95b: 53 push %ebx 10d95c: 51 push %ecx 10d95d: 50 push %eax 10d95e: 52 push %edx 10d95f: e8 48 f4 ff ff call 10cdac <_Objects_Get> 10d964: 83 c4 10 add $0x10,%esp done: return tp; } 10d967: 8b 5d fc mov -0x4(%ebp),%ebx 10d96a: c9 leave 10d96b: c3 ret goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 10d96c: 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; 10d972: 31 c0 xor %eax,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d974: 8b 5d fc mov -0x4(%ebp),%ebx 10d977: c9 leave 10d978: c3 ret 10d979: 8d 76 00 lea 0x0(%esi),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d97c: a1 d0 64 12 00 mov 0x1264d0,%eax 10d981: 40 inc %eax 10d982: 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; 10d987: c7 01 00 00 00 00 movl $0x0,(%ecx) tp = _Thread_Executing; 10d98d: a1 58 67 12 00 mov 0x126758,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d992: 8b 5d fc mov -0x4(%ebp),%ebx 10d995: c9 leave 10d996: c3 ret =============================================================================== 00112154 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 112154: 55 push %ebp 112155: 89 e5 mov %esp,%ebp 112157: 53 push %ebx 112158: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 11215b: 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; 112161: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax _ISR_Set_level(level); 112167: 85 c0 test %eax,%eax 112169: 74 79 je 1121e4 <_Thread_Handler+0x90> 11216b: fa cli #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 11216c: a0 4c 61 12 00 mov 0x12614c,%al 112171: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 112174: 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) && 11217b: 8b 93 dc 00 00 00 mov 0xdc(%ebx),%edx 112181: 85 d2 test %edx,%edx 112183: 74 24 je 1121a9 <_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 ); 112185: a1 60 65 12 00 mov 0x126560,%eax 11218a: 39 c3 cmp %eax,%ebx 11218c: 74 1b je 1121a9 <_Thread_Handler+0x55> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 11218e: 85 c0 test %eax,%eax 112190: 74 11 je 1121a3 <_Thread_Handler+0x4f> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 112192: 83 ec 0c sub $0xc,%esp 112195: 05 dc 00 00 00 add $0xdc,%eax 11219a: 50 push %eax 11219b: e8 64 c7 ff ff call 10e904 <_CPU_Context_save_fp> 1121a0: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 1121a3: 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 ); 1121a9: 83 ec 0c sub $0xc,%esp 1121ac: 53 push %ebx 1121ad: e8 7a c2 ff ff call 10e42c <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 1121b2: e8 45 b7 ff ff call 10d8fc <_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) */ { 1121b7: 83 c4 10 add $0x10,%esp 1121ba: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 1121be: 74 28 je 1121e8 <_Thread_Handler+0x94> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 1121c0: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax 1121c6: 85 c0 test %eax,%eax 1121c8: 74 2d je 1121f7 <_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 ); 1121ca: 83 ec 0c sub $0xc,%esp 1121cd: 53 push %ebx 1121ce: e8 95 c2 ff ff call 10e468 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 1121d3: 83 c4 0c add $0xc,%esp 1121d6: 6a 05 push $0x5 1121d8: 6a 01 push $0x1 1121da: 6a 00 push $0x0 1121dc: e8 87 a6 ff ff call 10c868 <_Internal_error_Occurred> 1121e1: 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); 1121e4: fb sti 1121e5: eb 85 jmp 11216c <_Thread_Handler+0x18> 1121e7: 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 (); 1121e8: e8 f3 c6 00 00 call 11e8e0 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 1121ed: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax 1121f3: 85 c0 test %eax,%eax 1121f5: 75 d3 jne 1121ca <_Thread_Handler+0x76> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 1121f7: 83 ec 0c sub $0xc,%esp 1121fa: ff b3 9c 00 00 00 pushl 0x9c(%ebx) 112200: ff 93 90 00 00 00 call *0x90(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 112206: 89 43 28 mov %eax,0x28(%ebx) 112209: 83 c4 10 add $0x10,%esp 11220c: eb bc jmp 1121ca <_Thread_Handler+0x76> =============================================================================== 0010d998 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10d998: 55 push %ebp 10d999: 89 e5 mov %esp,%ebp 10d99b: 57 push %edi 10d99c: 56 push %esi 10d99d: 53 push %ebx 10d99e: 83 ec 24 sub $0x24,%esp 10d9a1: 8b 5d 0c mov 0xc(%ebp),%ebx 10d9a4: 8b 75 14 mov 0x14(%ebp),%esi 10d9a7: 0f b6 7d 18 movzbl 0x18(%ebp),%edi 10d9ab: 8a 45 20 mov 0x20(%ebp),%al 10d9ae: 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; 10d9b1: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) 10d9b8: 00 00 00 10d9bb: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx) 10d9c2: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10d9c5: c7 83 e0 00 00 00 00 movl $0x0,0xe0(%ebx) 10d9cc: 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 ); 10d9cf: 56 push %esi 10d9d0: 53 push %ebx 10d9d1: e8 86 07 00 00 call 10e15c <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10d9d6: 83 c4 10 add $0x10,%esp 10d9d9: 85 c0 test %eax,%eax 10d9db: 0f 84 5b 01 00 00 je 10db3c <_Thread_Initialize+0x1a4> 10d9e1: 39 c6 cmp %eax,%esi 10d9e3: 0f 87 53 01 00 00 ja 10db3c <_Thread_Initialize+0x1a4><== NEVER TAKEN Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10d9e9: 8b 93 c0 00 00 00 mov 0xc0(%ebx),%edx 10d9ef: 89 93 b8 00 00 00 mov %edx,0xb8(%ebx) the_stack->size = size; 10d9f5: 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 ) { 10d9fb: 89 f8 mov %edi,%eax 10d9fd: 84 c0 test %al,%al 10d9ff: 0f 85 47 01 00 00 jne 10db4c <_Thread_Initialize+0x1b4> 10da05: 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; 10da07: 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; 10da09: 89 83 dc 00 00 00 mov %eax,0xdc(%ebx) the_thread->Start.fp_context = fp_area; 10da0f: 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; 10da15: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10da1c: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10da23: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10da2a: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10da31: a1 70 65 12 00 mov 0x126570,%eax 10da36: 85 c0 test %eax,%eax 10da38: 0f 85 36 01 00 00 jne 10db74 <_Thread_Initialize+0x1dc> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10da3e: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10da45: 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; 10da48: 31 f6 xor %esi,%esi /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10da4a: 8a 45 e4 mov -0x1c(%ebp),%al 10da4d: 88 83 a0 00 00 00 mov %al,0xa0(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10da53: 8b 45 24 mov 0x24(%ebp),%eax 10da56: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.budget_callout = budget_callout; 10da5c: 8b 45 28 mov 0x28(%ebp),%eax 10da5f: 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; 10da65: 8b 45 2c mov 0x2c(%ebp),%eax 10da68: 89 83 ac 00 00 00 mov %eax,0xac(%ebx) the_thread->current_state = STATES_DORMANT; 10da6e: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10da75: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10da7c: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->real_priority = priority; 10da83: 8b 45 1c mov 0x1c(%ebp),%eax 10da86: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10da89: 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 ); 10da8f: 83 ec 0c sub $0xc,%esp 10da92: 53 push %ebx 10da93: ff 15 78 21 12 00 call *0x122178 10da99: 89 45 e4 mov %eax,-0x1c(%ebp) sched =_Scheduler_Allocate( the_thread ); if ( !sched ) 10da9c: 83 c4 10 add $0x10,%esp 10da9f: 85 c0 test %eax,%eax 10daa1: 74 42 je 10dae5 <_Thread_Initialize+0x14d> goto failed; _Thread_Set_priority( the_thread, priority ); 10daa3: 83 ec 08 sub $0x8,%esp 10daa6: ff 75 1c pushl 0x1c(%ebp) 10daa9: 53 push %ebx 10daaa: e8 29 06 00 00 call 10e0d8 <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10daaf: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10dab6: 00 00 00 10dab9: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10dac0: 00 00 00 _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 10dac3: 8b 45 08 mov 0x8(%ebp),%eax 10dac6: 8b 40 1c mov 0x1c(%eax),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10dac9: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10dacd: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10dad0: 8b 45 30 mov 0x30(%ebp),%eax 10dad3: 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 ); 10dad6: 89 1c 24 mov %ebx,(%esp) 10dad9: e8 16 0a 00 00 call 10e4f4 <_User_extensions_Thread_create> if ( extension_status ) 10dade: 83 c4 10 add $0x10,%esp 10dae1: 84 c0 test %al,%al 10dae3: 75 63 jne 10db48 <_Thread_Initialize+0x1b0> return true; failed: _Workspace_Free( the_thread->libc_reent ); 10dae5: 83 ec 0c sub $0xc,%esp 10dae8: ff b3 e0 00 00 00 pushl 0xe0(%ebx) 10daee: e8 99 0d 00 00 call 10e88c <_Workspace_Free> for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 10daf3: 59 pop %ecx 10daf4: ff b3 e4 00 00 00 pushl 0xe4(%ebx) 10dafa: e8 8d 0d 00 00 call 10e88c <_Workspace_Free> 10daff: 5a pop %edx 10db00: ff b3 e8 00 00 00 pushl 0xe8(%ebx) 10db06: e8 81 0d 00 00 call 10e88c <_Workspace_Free> _Workspace_Free( extensions_area ); 10db0b: 89 34 24 mov %esi,(%esp) 10db0e: e8 79 0d 00 00 call 10e88c <_Workspace_Free> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 10db13: 89 3c 24 mov %edi,(%esp) 10db16: e8 71 0d 00 00 call 10e88c <_Workspace_Free> #endif _Workspace_Free( sched ); 10db1b: 58 pop %eax 10db1c: ff 75 e4 pushl -0x1c(%ebp) 10db1f: e8 68 0d 00 00 call 10e88c <_Workspace_Free> _Thread_Stack_Free( the_thread ); 10db24: 89 1c 24 mov %ebx,(%esp) 10db27: e8 94 06 00 00 call 10e1c0 <_Thread_Stack_Free> return false; 10db2c: 83 c4 10 add $0x10,%esp 10db2f: 31 c0 xor %eax,%eax } 10db31: 8d 65 f4 lea -0xc(%ebp),%esp 10db34: 5b pop %ebx 10db35: 5e pop %esi 10db36: 5f pop %edi 10db37: c9 leave 10db38: c3 ret 10db39: 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 */ 10db3c: 31 c0 xor %eax,%eax _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 10db3e: 8d 65 f4 lea -0xc(%ebp),%esp 10db41: 5b pop %ebx 10db42: 5e pop %esi 10db43: 5f pop %edi 10db44: c9 leave 10db45: c3 ret 10db46: 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; 10db48: b0 01 mov $0x1,%al 10db4a: eb f2 jmp 10db3e <_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 ); 10db4c: 83 ec 0c sub $0xc,%esp 10db4f: 6a 6c push $0x6c 10db51: e8 1a 0d 00 00 call 10e870 <_Workspace_Allocate> 10db56: 89 c7 mov %eax,%edi if ( !fp_area ) 10db58: 83 c4 10 add $0x10,%esp 10db5b: 85 c0 test %eax,%eax 10db5d: 0f 85 a6 fe ff ff jne 10da09 <_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; 10db63: 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; 10db65: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 10db6c: e9 74 ff ff ff jmp 10dae5 <_Thread_Initialize+0x14d> 10db71: 8d 76 00 lea 0x0(%esi),%esi /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 10db74: 83 ec 0c sub $0xc,%esp 10db77: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10db7e: 50 push %eax 10db7f: e8 ec 0c 00 00 call 10e870 <_Workspace_Allocate> 10db84: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10db86: 83 c4 10 add $0x10,%esp 10db89: 85 c0 test %eax,%eax 10db8b: 74 26 je 10dbb3 <_Thread_Initialize+0x21b> goto failed; } the_thread->extensions = (void **) extensions_area; 10db8d: 89 83 ec 00 00 00 mov %eax,0xec(%ebx) 10db93: 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++ ) 10db99: 31 d2 xor %edx,%edx (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10db9b: 31 c0 xor %eax,%eax 10db9d: 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; 10dba0: 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++ ) 10dba7: 40 inc %eax 10dba8: 89 c2 mov %eax,%edx 10dbaa: 39 c1 cmp %eax,%ecx 10dbac: 73 f2 jae 10dba0 <_Thread_Initialize+0x208> 10dbae: e9 97 fe ff ff jmp 10da4a <_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; 10dbb3: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 10dbba: e9 26 ff ff ff jmp 10dae5 <_Thread_Initialize+0x14d> =============================================================================== 001119f4 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 1119f4: 55 push %ebp 1119f5: 89 e5 mov %esp,%ebp 1119f7: 53 push %ebx 1119f8: 83 ec 10 sub $0x10,%esp 1119fb: 8b 5d 08 mov 0x8(%ebp),%ebx the_thread->resource_count = 0; 1119fe: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->is_preemptible = the_thread->Start.is_preemptible; 111a05: 8a 83 a0 00 00 00 mov 0xa0(%ebx),%al 111a0b: 88 43 74 mov %al,0x74(%ebx) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 111a0e: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax 111a14: 89 43 7c mov %eax,0x7c(%ebx) the_thread->budget_callout = the_thread->Start.budget_callout; 111a17: 8b 83 a8 00 00 00 mov 0xa8(%ebx),%eax 111a1d: 89 83 80 00 00 00 mov %eax,0x80(%ebx) the_thread->Start.pointer_argument = pointer_argument; 111a23: 8b 45 0c mov 0xc(%ebp),%eax 111a26: 89 83 98 00 00 00 mov %eax,0x98(%ebx) the_thread->Start.numeric_argument = numeric_argument; 111a2c: 8b 45 10 mov 0x10(%ebp),%eax 111a2f: 89 83 9c 00 00 00 mov %eax,0x9c(%ebx) if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 111a35: 53 push %ebx 111a36: e8 85 d0 ff ff call 10eac0 <_Thread_queue_Extract_with_proxy> 111a3b: 83 c4 10 add $0x10,%esp 111a3e: 84 c0 test %al,%al 111a40: 75 06 jne 111a48 <_Thread_Reset+0x54> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 111a42: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 111a46: 74 28 je 111a70 <_Thread_Reset+0x7c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 111a48: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 111a4e: 39 43 14 cmp %eax,0x14(%ebx) 111a51: 74 15 je 111a68 <_Thread_Reset+0x74> the_thread->real_priority = the_thread->Start.initial_priority; 111a53: 89 43 18 mov %eax,0x18(%ebx) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 111a56: 89 45 0c mov %eax,0xc(%ebp) 111a59: 89 5d 08 mov %ebx,0x8(%ebp) } } 111a5c: 8b 5d fc mov -0x4(%ebp),%ebx 111a5f: 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 ); 111a60: e9 37 d2 ff ff jmp 10ec9c <_Thread_Set_priority> 111a65: 8d 76 00 lea 0x0(%esi),%esi } } 111a68: 8b 5d fc mov -0x4(%ebp),%ebx 111a6b: c9 leave 111a6c: c3 ret 111a6d: 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 ); 111a70: 83 ec 0c sub $0xc,%esp 111a73: 8d 43 48 lea 0x48(%ebx),%eax 111a76: 50 push %eax 111a77: e8 d0 d8 ff ff call 10f34c <_Watchdog_Remove> 111a7c: 83 c4 10 add $0x10,%esp 111a7f: eb c7 jmp 111a48 <_Thread_Reset+0x54> =============================================================================== 00111410 <_Thread_Resume>: */ void _Thread_Resume( Thread_Control *the_thread, bool force ) { 111410: 55 push %ebp 111411: 89 e5 mov %esp,%ebp 111413: 53 push %ebx 111414: 83 ec 04 sub $0x4,%esp 111417: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 11141a: 9c pushf 11141b: fa cli 11141c: 5b pop %ebx current_state = the_thread->current_state; 11141d: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 111420: f6 c2 02 test $0x2,%dl 111423: 74 0a je 11142f <_Thread_Resume+0x1f> <== NEVER TAKEN 111425: 83 e2 fd and $0xfffffffd,%edx current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); 111428: 89 50 10 mov %edx,0x10(%eax) if ( _States_Is_ready( current_state ) ) { 11142b: 85 d2 test %edx,%edx 11142d: 74 09 je 111438 <_Thread_Resume+0x28> _Scheduler_Unblock( the_thread ); } } _ISR_Enable( level ); 11142f: 53 push %ebx 111430: 9d popf } 111431: 8b 5d fc mov -0x4(%ebp),%ebx 111434: c9 leave 111435: c3 ret 111436: 66 90 xchg %ax,%ax */ RTEMS_INLINE_ROUTINE void _Scheduler_Unblock( Thread_Control *the_thread ) { _Scheduler.Operations.unblock( the_thread ); 111438: 83 ec 0c sub $0xc,%esp 11143b: 50 push %eax 11143c: ff 15 74 51 12 00 call *0x125174 111442: 83 c4 10 add $0x10,%esp 111445: eb e8 jmp 11142f <_Thread_Resume+0x1f> =============================================================================== 0010e15c <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10e15c: 55 push %ebp 10e15d: 89 e5 mov %esp,%ebp 10e15f: 53 push %ebx 10e160: 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; 10e163: a1 50 22 12 00 mov 0x122250,%eax 10e168: 8b 5d 0c mov 0xc(%ebp),%ebx 10e16b: 39 c3 cmp %eax,%ebx 10e16d: 73 02 jae 10e171 <_Thread_Stack_Allocate+0x15> 10e16f: 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 ) { 10e171: a1 80 22 12 00 mov 0x122280,%eax 10e176: 85 c0 test %eax,%eax 10e178: 74 32 je 10e1ac <_Thread_Stack_Allocate+0x50> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 10e17a: 83 ec 0c sub $0xc,%esp 10e17d: 53 push %ebx 10e17e: ff d0 call *%eax 10e180: 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 ) 10e183: 85 c0 test %eax,%eax 10e185: 74 11 je 10e198 <_Thread_Stack_Allocate+0x3c> the_stack_size = 0; the_thread->Start.stack = stack_addr; 10e187: 8b 55 08 mov 0x8(%ebp),%edx 10e18a: 89 82 c0 00 00 00 mov %eax,0xc0(%edx) return the_stack_size; } 10e190: 89 d8 mov %ebx,%eax 10e192: 8b 5d fc mov -0x4(%ebp),%ebx 10e195: c9 leave 10e196: c3 ret 10e197: 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; 10e198: 31 db xor %ebx,%ebx the_thread->Start.stack = stack_addr; 10e19a: 8b 55 08 mov 0x8(%ebp),%edx 10e19d: 89 82 c0 00 00 00 mov %eax,0xc0(%edx) return the_stack_size; } 10e1a3: 89 d8 mov %ebx,%eax 10e1a5: 8b 5d fc mov -0x4(%ebp),%ebx 10e1a8: c9 leave 10e1a9: c3 ret 10e1aa: 66 90 xchg %ax,%ax RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 10e1ac: 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 ); 10e1af: 83 ec 0c sub $0xc,%esp 10e1b2: 53 push %ebx 10e1b3: e8 b8 06 00 00 call 10e870 <_Workspace_Allocate> 10e1b8: 83 c4 10 add $0x10,%esp 10e1bb: eb c6 jmp 10e183 <_Thread_Stack_Allocate+0x27> =============================================================================== 0010e1c0 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10e1c0: 55 push %ebp 10e1c1: 89 e5 mov %esp,%ebp 10e1c3: 83 ec 08 sub $0x8,%esp 10e1c6: 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 ) 10e1c9: a1 84 22 12 00 mov 0x122284,%eax 10e1ce: 85 c0 test %eax,%eax 10e1d0: 74 0e je 10e1e0 <_Thread_Stack_Free+0x20> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10e1d2: 8b 92 b8 00 00 00 mov 0xb8(%edx),%edx 10e1d8: 89 55 08 mov %edx,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10e1db: 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 ); 10e1dc: ff e0 jmp *%eax 10e1de: 66 90 xchg %ax,%ax else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10e1e0: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 10e1e6: 89 45 08 mov %eax,0x8(%ebp) } 10e1e9: 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 ); 10e1ea: e9 9d 06 00 00 jmp 10e88c <_Workspace_Free> =============================================================================== 00110d5c <_Thread_Suspend>: * select map */ void _Thread_Suspend( Thread_Control *the_thread ) { 110d5c: 55 push %ebp 110d5d: 89 e5 mov %esp,%ebp 110d5f: 53 push %ebx 110d60: 83 ec 04 sub $0x4,%esp 110d63: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; _ISR_Disable( level ); 110d66: 9c pushf 110d67: fa cli 110d68: 5b pop %ebx if ( !_States_Is_ready( the_thread->current_state ) ) { 110d69: 8b 50 10 mov 0x10(%eax),%edx 110d6c: 85 d2 test %edx,%edx 110d6e: 74 10 je 110d80 <_Thread_Suspend+0x24> 110d70: 83 ca 02 or $0x2,%edx 110d73: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 110d76: 53 push %ebx 110d77: 9d popf the_thread->current_state = STATES_SUSPENDED; _Scheduler_Block( the_thread ); _ISR_Enable( level ); } 110d78: 8b 5d fc mov -0x4(%ebp),%ebx 110d7b: c9 leave 110d7c: c3 ret 110d7d: 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; 110d80: 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 ); 110d87: 83 ec 0c sub $0xc,%esp 110d8a: 50 push %eax 110d8b: ff 15 70 21 12 00 call *0x122170 _Scheduler_Block( the_thread ); _ISR_Enable( level ); 110d91: 53 push %ebx 110d92: 9d popf 110d93: 83 c4 10 add $0x10,%esp } 110d96: 8b 5d fc mov -0x4(%ebp),%ebx 110d99: c9 leave 110d9a: c3 ret =============================================================================== 0010dc98 <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10dc98: 55 push %ebp 10dc99: 89 e5 mov %esp,%ebp 10dc9b: 57 push %edi 10dc9c: 56 push %esi 10dc9d: 53 push %ebx 10dc9e: 83 ec 2c sub $0x2c,%esp 10dca1: 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 ); 10dca4: 9c pushf 10dca5: fa cli 10dca6: 58 pop %eax 10dca7: 89 f9 mov %edi,%ecx for( index=0 ; 10dca9: 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 ); } 10dcab: 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 ); 10dcad: 8d 34 52 lea (%edx,%edx,2),%esi 10dcb0: 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 ] ) ) { 10dcb4: 39 f3 cmp %esi,%ebx 10dcb6: 75 18 jne 10dcd0 <_Thread_queue_Dequeue_priority+0x38> Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10dcb8: 42 inc %edx 10dcb9: 83 c1 0c add $0xc,%ecx Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 10dcbc: 83 fa 04 cmp $0x4,%edx 10dcbf: 75 ea jne 10dcab <_Thread_queue_Dequeue_priority+0x13> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10dcc1: 50 push %eax 10dcc2: 9d popf return NULL; 10dcc3: 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 ); } 10dcc5: 89 f0 mov %esi,%eax 10dcc7: 8d 65 f4 lea -0xc(%ebp),%esp 10dcca: 5b pop %ebx 10dccb: 5e pop %esi 10dccc: 5f pop %edi 10dccd: c9 leave 10dcce: c3 ret 10dccf: 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( 10dcd0: 89 de mov %ebx,%esi */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10dcd2: 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 ); } 10dcd9: 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; 10dcdc: 8b 0b mov (%ebx),%ecx previous_node = the_thread->Object.Node.previous; 10dcde: 8b 7b 04 mov 0x4(%ebx),%edi 10dce1: 89 7d d4 mov %edi,-0x2c(%ebp) 10dce4: 8d 7b 3c lea 0x3c(%ebx),%edi if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 10dce7: 39 fa cmp %edi,%edx 10dce9: 74 7f je 10dd6a <_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 ); } 10dceb: 8b 7b 40 mov 0x40(%ebx),%edi 10dcee: 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; 10dcf1: 8b 3a mov (%edx),%edi 10dcf3: 89 7d e0 mov %edi,-0x20(%ebp) previous_node->next = new_first_node; 10dcf6: 8b 7d d4 mov -0x2c(%ebp),%edi 10dcf9: 89 17 mov %edx,(%edi) next_node->previous = new_first_node; 10dcfb: 89 51 04 mov %edx,0x4(%ecx) new_first_node->next = next_node; 10dcfe: 89 0a mov %ecx,(%edx) new_first_node->previous = previous_node; 10dd00: 89 7a 04 mov %edi,0x4(%edx) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10dd03: 8b 4b 40 mov 0x40(%ebx),%ecx 10dd06: 39 4b 38 cmp %ecx,0x38(%ebx) 10dd09: 74 17 je 10dd22 <_Thread_queue_Dequeue_priority+0x8a> /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); 10dd0b: 8d 4a 38 lea 0x38(%edx),%ecx 10dd0e: 8b 7d e0 mov -0x20(%ebp),%edi 10dd11: 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; 10dd14: 89 7a 38 mov %edi,0x38(%edx) tail->previous = last_node; 10dd17: 8b 4d e4 mov -0x1c(%ebp),%ecx 10dd1a: 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 ); 10dd1d: 83 c2 3c add $0x3c,%edx 10dd20: 89 11 mov %edx,(%ecx) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10dd22: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10dd26: 74 18 je 10dd40 <_Thread_queue_Dequeue_priority+0xa8> _ISR_Enable( level ); 10dd28: 50 push %eax 10dd29: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10dd2a: 83 ec 08 sub $0x8,%esp 10dd2d: 68 f8 ff 03 10 push $0x1003fff8 10dd32: 53 push %ebx 10dd33: e8 60 f8 ff ff call 10d598 <_Thread_Clear_state> 10dd38: 83 c4 10 add $0x10,%esp 10dd3b: eb 88 jmp 10dcc5 <_Thread_queue_Dequeue_priority+0x2d> 10dd3d: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10dd40: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10dd47: 50 push %eax 10dd48: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10dd49: 83 ec 0c sub $0xc,%esp 10dd4c: 8d 43 48 lea 0x48(%ebx),%eax 10dd4f: 50 push %eax 10dd50: e8 f3 09 00 00 call 10e748 <_Watchdog_Remove> 10dd55: 58 pop %eax 10dd56: 5a pop %edx 10dd57: 68 f8 ff 03 10 push $0x1003fff8 10dd5c: 53 push %ebx 10dd5d: e8 36 f8 ff ff call 10d598 <_Thread_Clear_state> 10dd62: 83 c4 10 add $0x10,%esp 10dd65: e9 5b ff ff ff jmp 10dcc5 <_Thread_queue_Dequeue_priority+0x2d> head->next = new_second_node; tail->previous = last_node; last_node->next = tail; } } else { previous_node->next = next_node; 10dd6a: 8b 7d d4 mov -0x2c(%ebp),%edi 10dd6d: 89 0f mov %ecx,(%edi) next_node->previous = previous_node; 10dd6f: 89 79 04 mov %edi,0x4(%ecx) 10dd72: eb ae jmp 10dd22 <_Thread_queue_Dequeue_priority+0x8a> =============================================================================== 0010de0c <_Thread_queue_Enqueue_priority>: Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 10de0c: 55 push %ebp 10de0d: 89 e5 mov %esp,%ebp 10de0f: 57 push %edi 10de10: 56 push %esi 10de11: 53 push %ebx 10de12: 83 ec 0c sub $0xc,%esp 10de15: 8b 7d 0c mov 0xc(%ebp),%edi 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 ); 10de18: 8d 47 3c lea 0x3c(%edi),%eax 10de1b: 89 47 38 mov %eax,0x38(%edi) head->next = tail; head->previous = NULL; 10de1e: c7 47 3c 00 00 00 00 movl $0x0,0x3c(%edi) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 10de25: 8d 47 38 lea 0x38(%edi),%eax 10de28: 89 47 40 mov %eax,0x40(%edi) Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 10de2b: 8b 57 14 mov 0x14(%edi),%edx RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 10de2e: 89 d0 mov %edx,%eax 10de30: c1 e8 06 shr $0x6,%eax header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; 10de33: 8b 4d 08 mov 0x8(%ebp),%ecx 10de36: 8b 59 38 mov 0x38(%ecx),%ebx if ( _Thread_queue_Is_reverse_search( priority ) ) 10de39: f6 c2 20 test $0x20,%dl 10de3c: 75 66 jne 10dea4 <_Thread_queue_Enqueue_priority+0x98> * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10de3e: 8d 04 40 lea (%eax,%eax,2),%eax 10de41: 8d 04 81 lea (%ecx,%eax,4),%eax 10de44: 89 45 f0 mov %eax,-0x10(%ebp) RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 10de47: 83 c0 04 add $0x4,%eax 10de4a: 89 7d e8 mov %edi,-0x18(%ebp) 10de4d: 89 c7 mov %eax,%edi if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10de4f: 9c pushf 10de50: fa cli 10de51: 5e pop %esi 10de52: 89 75 ec mov %esi,-0x14(%ebp) * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10de55: 8b 4d f0 mov -0x10(%ebp),%ecx 10de58: 8b 01 mov (%ecx),%eax restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_First( header ); while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10de5a: 39 f8 cmp %edi,%eax 10de5c: 75 18 jne 10de76 <_Thread_queue_Enqueue_priority+0x6a> 10de5e: e9 0e 01 00 00 jmp 10df71 <_Thread_queue_Enqueue_priority+0x165> 10de63: 90 nop break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10de64: 56 push %esi 10de65: 9d popf 10de66: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10de67: 85 58 10 test %ebx,0x10(%eax) 10de6a: 0f 84 ac 00 00 00 je 10df1c <_Thread_queue_Enqueue_priority+0x110> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10de70: 8b 00 mov (%eax),%eax restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_First( header ); while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10de72: 39 f8 cmp %edi,%eax 10de74: 74 07 je 10de7d <_Thread_queue_Enqueue_priority+0x71> search_priority = search_thread->current_priority; 10de76: 8b 48 14 mov 0x14(%eax),%ecx if ( priority <= search_priority ) 10de79: 39 ca cmp %ecx,%edx 10de7b: 77 e7 ja 10de64 <_Thread_queue_Enqueue_priority+0x58> 10de7d: 8b 7d e8 mov -0x18(%ebp),%edi 10de80: 89 75 f0 mov %esi,-0x10(%ebp) } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10de83: 8b 75 08 mov 0x8(%ebp),%esi 10de86: 8b 5e 30 mov 0x30(%esi),%ebx 10de89: 83 fb 01 cmp $0x1,%ebx 10de8c: 0f 84 92 00 00 00 je 10df24 <_Thread_queue_Enqueue_priority+0x118> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 10de92: 8b 45 10 mov 0x10(%ebp),%eax 10de95: 8b 55 ec mov -0x14(%ebp),%edx 10de98: 89 10 mov %edx,(%eax) return the_thread_queue->sync_state; } 10de9a: 89 d8 mov %ebx,%eax 10de9c: 83 c4 0c add $0xc,%esp 10de9f: 5b pop %ebx 10dea0: 5e pop %esi 10dea1: 5f pop %edi 10dea2: c9 leave 10dea3: c3 ret 10dea4: 8d 04 40 lea (%eax,%eax,2),%eax 10dea7: 8b 4d 08 mov 0x8(%ebp),%ecx 10deaa: 8d 34 81 lea (%ecx,%eax,4),%esi 10dead: 89 7d f0 mov %edi,-0x10(%ebp) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 10deb0: 0f b6 0d 54 22 12 00 movzbl 0x122254,%ecx 10deb7: 41 inc %ecx _ISR_Disable( level ); 10deb8: 9c pushf 10deb9: fa cli 10deba: 5f pop %edi 10debb: 89 7d ec mov %edi,-0x14(%ebp) * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10debe: 8b 46 08 mov 0x8(%esi),%eax restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_Last( header ); while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10dec1: 39 f0 cmp %esi,%eax 10dec3: 75 12 jne 10ded7 <_Thread_queue_Enqueue_priority+0xcb> 10dec5: eb 17 jmp 10dede <_Thread_queue_Enqueue_priority+0xd2> 10dec7: 90 nop break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10dec8: 57 push %edi 10dec9: 9d popf 10deca: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10decb: 85 58 10 test %ebx,0x10(%eax) 10dece: 74 48 je 10df18 <_Thread_queue_Enqueue_priority+0x10c><== NEVER TAKEN _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) search_thread->Object.Node.previous; 10ded0: 8b 40 04 mov 0x4(%eax),%eax restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_Last( header ); while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10ded3: 39 f0 cmp %esi,%eax 10ded5: 74 07 je 10dede <_Thread_queue_Enqueue_priority+0xd2> search_priority = search_thread->current_priority; 10ded7: 8b 48 14 mov 0x14(%eax),%ecx if ( priority >= search_priority ) 10deda: 39 ca cmp %ecx,%edx 10dedc: 72 ea jb 10dec8 <_Thread_queue_Enqueue_priority+0xbc> 10dede: 89 7d e8 mov %edi,-0x18(%ebp) 10dee1: 8b 7d f0 mov -0x10(%ebp),%edi } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10dee4: 8b 75 08 mov 0x8(%ebp),%esi 10dee7: 8b 5e 30 mov 0x30(%esi),%ebx 10deea: 83 fb 01 cmp $0x1,%ebx 10deed: 75 a3 jne 10de92 <_Thread_queue_Enqueue_priority+0x86> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10deef: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) if ( priority == search_priority ) 10def6: 39 ca cmp %ecx,%edx 10def8: 74 53 je 10df4d <_Thread_queue_Enqueue_priority+0x141> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10defa: 8b 10 mov (%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10defc: 89 17 mov %edx,(%edi) the_node->previous = search_node; 10defe: 89 47 04 mov %eax,0x4(%edi) search_node->next = the_node; 10df01: 89 38 mov %edi,(%eax) next_node->previous = the_node; 10df03: 89 7a 04 mov %edi,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10df06: 89 77 44 mov %esi,0x44(%edi) _ISR_Enable( level ); 10df09: ff 75 e8 pushl -0x18(%ebp) 10df0c: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10df0d: 89 d8 mov %ebx,%eax 10df0f: 83 c4 0c add $0xc,%esp 10df12: 5b pop %ebx 10df13: 5e pop %esi 10df14: 5f pop %edi 10df15: c9 leave 10df16: c3 ret 10df17: 90 nop if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10df18: 57 push %edi <== NOT EXECUTED 10df19: 9d popf <== NOT EXECUTED goto restart_reverse_search; 10df1a: eb 94 jmp 10deb0 <_Thread_queue_Enqueue_priority+0xa4><== NOT EXECUTED if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10df1c: 56 push %esi 10df1d: 9d popf goto restart_forward_search; 10df1e: e9 2c ff ff ff jmp 10de4f <_Thread_queue_Enqueue_priority+0x43> 10df23: 90 nop if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10df24: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) if ( priority == search_priority ) 10df2b: 39 ca cmp %ecx,%edx 10df2d: 74 1e je 10df4d <_Thread_queue_Enqueue_priority+0x141> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10df2f: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10df32: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10df34: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10df37: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10df39: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10df3c: 89 77 44 mov %esi,0x44(%edi) _ISR_Enable( level ); 10df3f: ff 75 f0 pushl -0x10(%ebp) 10df42: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10df43: 89 d8 mov %ebx,%eax 10df45: 83 c4 0c add $0xc,%esp 10df48: 5b pop %ebx 10df49: 5e pop %esi 10df4a: 5f pop %edi 10df4b: c9 leave 10df4c: c3 ret _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 10df4d: 8b 50 40 mov 0x40(%eax),%edx the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); 10df50: 8d 48 3c lea 0x3c(%eax),%ecx 10df53: 89 0f mov %ecx,(%edi) previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; 10df55: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10df58: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10df5a: 89 78 40 mov %edi,0x40(%eax) the_thread->Wait.queue = the_thread_queue; 10df5d: 8b 45 08 mov 0x8(%ebp),%eax 10df60: 89 47 44 mov %eax,0x44(%edi) _ISR_Enable( level ); 10df63: ff 75 ec pushl -0x14(%ebp) 10df66: 9d popf return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10df67: bb 01 00 00 00 mov $0x1,%ebx 10df6c: e9 29 ff ff ff jmp 10de9a <_Thread_queue_Enqueue_priority+0x8e> 10df71: 8b 7d e8 mov -0x18(%ebp),%edi 10df74: 89 75 f0 mov %esi,-0x10(%ebp) if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; 10df77: b9 ff ff ff ff mov $0xffffffff,%ecx 10df7c: e9 02 ff ff ff jmp 10de83 <_Thread_queue_Enqueue_priority+0x77> =============================================================================== 00110c04 <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 110c04: 55 push %ebp 110c05: 89 e5 mov %esp,%ebp 110c07: 83 ec 08 sub $0x8,%esp 110c0a: 8b 45 08 mov 0x8(%ebp),%eax 110c0d: 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 ) 110c10: 83 78 34 01 cmpl $0x1,0x34(%eax) 110c14: 74 0e je 110c24 <_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 ); 110c16: 89 55 0c mov %edx,0xc(%ebp) 110c19: 89 45 08 mov %eax,0x8(%ebp) } 110c1c: 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 ); 110c1d: e9 ee 15 00 00 jmp 112210 <_Thread_queue_Extract_fifo> 110c22: 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 ); 110c24: 51 push %ecx 110c25: 6a 00 push $0x0 110c27: 52 push %edx 110c28: 50 push %eax 110c29: e8 06 00 00 00 call 110c34 <_Thread_queue_Extract_priority_helper> 110c2e: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 110c31: c9 leave 110c32: c3 ret =============================================================================== 00112210 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 112210: 55 push %ebp 112211: 89 e5 mov %esp,%ebp 112213: 53 push %ebx 112214: 83 ec 04 sub $0x4,%esp 112217: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 11221a: 9c pushf 11221b: fa cli 11221c: 58 pop %eax if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 11221d: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 112224: 74 2e je 112254 <_Thread_queue_Extract_fifo+0x44> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 112226: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 112228: 8b 53 04 mov 0x4(%ebx),%edx next->previous = previous; 11222b: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 11222e: 89 0a mov %ecx,(%edx) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 112230: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 112237: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 11223b: 74 1f je 11225c <_Thread_queue_Extract_fifo+0x4c> _ISR_Enable( level ); 11223d: 50 push %eax 11223e: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 11223f: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 112246: 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 } 112249: 8b 5d fc mov -0x4(%ebp),%ebx 11224c: c9 leave 11224d: e9 46 b3 ff ff jmp 10d598 <_Thread_Clear_state> 112252: 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 ); 112254: 50 push %eax 112255: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 112256: 8b 5d fc mov -0x4(%ebp),%ebx 112259: c9 leave 11225a: c3 ret 11225b: 90 nop 11225c: 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 ); 112263: 50 push %eax 112264: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 112265: 83 ec 0c sub $0xc,%esp 112268: 8d 43 48 lea 0x48(%ebx),%eax 11226b: 50 push %eax 11226c: e8 d7 c4 ff ff call 10e748 <_Watchdog_Remove> 112271: 83 c4 10 add $0x10,%esp 112274: eb c9 jmp 11223f <_Thread_queue_Extract_fifo+0x2f> =============================================================================== 00110c34 <_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 ) { 110c34: 55 push %ebp 110c35: 89 e5 mov %esp,%ebp 110c37: 57 push %edi 110c38: 56 push %esi 110c39: 53 push %ebx 110c3a: 83 ec 1c sub $0x1c,%esp 110c3d: 8b 5d 0c mov 0xc(%ebp),%ebx 110c40: 8a 45 10 mov 0x10(%ebp),%al 110c43: 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 ); 110c46: 9c pushf 110c47: fa cli 110c48: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 110c4b: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 110c52: 74 6c je 110cc0 <_Thread_queue_Extract_priority_helper+0x8c><== NEVER TAKEN /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 110c54: 8b 13 mov (%ebx),%edx previous_node = the_node->previous; 110c56: 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 } 110c59: 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 ); 110c5c: 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 ) ) { 110c5f: 39 f0 cmp %esi,%eax 110c61: 74 69 je 110ccc <_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 } 110c63: 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; 110c66: 8b 30 mov (%eax),%esi previous_node->next = new_first_node; 110c68: 89 01 mov %eax,(%ecx) next_node->previous = new_first_node; 110c6a: 89 42 04 mov %eax,0x4(%edx) new_first_node->next = next_node; 110c6d: 89 10 mov %edx,(%eax) new_first_node->previous = previous_node; 110c6f: 89 48 04 mov %ecx,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 110c72: 8b 53 40 mov 0x40(%ebx),%edx 110c75: 39 53 38 cmp %edx,0x38(%ebx) 110c78: 74 11 je 110c8b <_Thread_queue_Extract_priority_helper+0x57> /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); 110c7a: 8d 50 38 lea 0x38(%eax),%edx 110c7d: 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; 110c80: 89 70 38 mov %esi,0x38(%eax) tail->previous = last_node; 110c83: 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 ); 110c86: 83 c0 3c add $0x3c,%eax 110c89: 89 07 mov %eax,(%edi) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 110c8b: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 110c8f: 75 23 jne 110cb4 <_Thread_queue_Extract_priority_helper+0x80> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 110c91: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 110c95: 74 3d je 110cd4 <_Thread_queue_Extract_priority_helper+0xa0> _ISR_Enable( level ); 110c97: ff 75 e4 pushl -0x1c(%ebp) 110c9a: 9d popf 110c9b: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 110ca2: 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 } 110ca5: 8d 65 f4 lea -0xc(%ebp),%esp 110ca8: 5b pop %ebx 110ca9: 5e pop %esi 110caa: 5f pop %edi 110cab: c9 leave 110cac: e9 e7 c8 ff ff jmp 10d598 <_Thread_Clear_state> 110cb1: 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 ); 110cb4: ff 75 e4 pushl -0x1c(%ebp) 110cb7: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 110cb8: 8d 65 f4 lea -0xc(%ebp),%esp 110cbb: 5b pop %ebx 110cbc: 5e pop %esi 110cbd: 5f pop %edi 110cbe: c9 leave 110cbf: 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 ); 110cc0: ff 75 e4 pushl -0x1c(%ebp) 110cc3: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 110cc4: 8d 65 f4 lea -0xc(%ebp),%esp 110cc7: 5b pop %ebx 110cc8: 5e pop %esi 110cc9: 5f pop %edi 110cca: c9 leave 110ccb: c3 ret head->next = new_second_node; tail->previous = last_node; last_node->next = tail; } } else { previous_node->next = next_node; 110ccc: 89 11 mov %edx,(%ecx) next_node->previous = previous_node; 110cce: 89 4a 04 mov %ecx,0x4(%edx) 110cd1: eb b8 jmp 110c8b <_Thread_queue_Extract_priority_helper+0x57> 110cd3: 90 nop 110cd4: 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 ); 110cdb: ff 75 e4 pushl -0x1c(%ebp) 110cde: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 110cdf: 83 ec 0c sub $0xc,%esp 110ce2: 8d 43 48 lea 0x48(%ebx),%eax 110ce5: 50 push %eax 110ce6: e8 5d da ff ff call 10e748 <_Watchdog_Remove> 110ceb: 83 c4 10 add $0x10,%esp 110cee: eb ab jmp 110c9b <_Thread_queue_Extract_priority_helper+0x67> =============================================================================== 0010df84 <_Thread_queue_Extract_with_proxy>: */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 10df84: 55 push %ebp 10df85: 89 e5 mov %esp,%ebp 10df87: 83 ec 08 sub $0x8,%esp 10df8a: 8b 45 08 mov 0x8(%ebp),%eax States_Control state; state = the_thread->current_state; if ( _States_Is_waiting_on_thread_queue( state ) ) { 10df8d: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax) 10df94: 75 06 jne 10df9c <_Thread_queue_Extract_with_proxy+0x18> #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); return true; } return false; 10df96: 31 c0 xor %eax,%eax } 10df98: c9 leave 10df99: c3 ret 10df9a: 66 90 xchg %ax,%ax if ( proxy_extract_callout ) (*proxy_extract_callout)( the_thread ); } #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 10df9c: 83 ec 08 sub $0x8,%esp 10df9f: 50 push %eax 10dfa0: ff 70 44 pushl 0x44(%eax) 10dfa3: e8 5c 2c 00 00 call 110c04 <_Thread_queue_Extract> return true; 10dfa8: 83 c4 10 add $0x10,%esp 10dfab: b0 01 mov $0x1,%al } return false; } 10dfad: c9 leave 10dfae: c3 ret =============================================================================== 0011f04c <_Thread_queue_First>: */ Thread_Control *_Thread_queue_First( Thread_queue_Control *the_thread_queue ) { 11f04c: 55 push %ebp 11f04d: 89 e5 mov %esp,%ebp 11f04f: 83 ec 08 sub $0x8,%esp 11f052: 8b 45 08 mov 0x8(%ebp),%eax Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 11f055: 83 78 34 01 cmpl $0x1,0x34(%eax) 11f059: 74 0d je 11f068 <_Thread_queue_First+0x1c> first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; 11f05b: ba dc 03 12 00 mov $0x1203dc,%edx return (*first_p)( the_thread_queue ); 11f060: 89 45 08 mov %eax,0x8(%ebp) } 11f063: 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 ); 11f064: ff e2 jmp *%edx 11f066: 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; 11f068: ba 74 f0 11 00 mov $0x11f074,%edx else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 11f06d: 89 45 08 mov %eax,0x8(%ebp) } 11f070: 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 ); 11f071: ff e2 jmp *%edx =============================================================================== 001203dc <_Thread_queue_First_fifo>: */ Thread_Control *_Thread_queue_First_fifo( Thread_queue_Control *the_thread_queue ) { 1203dc: 55 push %ebp 1203dd: 89 e5 mov %esp,%ebp 1203df: 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; } 1203e2: 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 ); 1203e4: 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 ) ) 1203e7: 39 d0 cmp %edx,%eax 1203e9: 74 05 je 1203f0 <_Thread_queue_First_fifo+0x14> return (Thread_Control *) _Chain_First( &the_thread_queue->Queues.Fifo ); return NULL; } 1203eb: c9 leave 1203ec: c3 ret 1203ed: 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; 1203f0: 31 c0 xor %eax,%eax } 1203f2: c9 leave 1203f3: c3 ret =============================================================================== 0010dfb0 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 10dfb0: 55 push %ebp 10dfb1: 89 e5 mov %esp,%ebp 10dfb3: 56 push %esi 10dfb4: 53 push %ebx 10dfb5: 8b 5d 08 mov 0x8(%ebp),%ebx 10dfb8: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10dfbb: eb 06 jmp 10dfc3 <_Thread_queue_Flush+0x13> 10dfbd: 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; 10dfc0: 89 70 34 mov %esi,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10dfc3: 83 ec 0c sub $0xc,%esp 10dfc6: 53 push %ebx 10dfc7: e8 80 fc ff ff call 10dc4c <_Thread_queue_Dequeue> 10dfcc: 83 c4 10 add $0x10,%esp 10dfcf: 85 c0 test %eax,%eax 10dfd1: 75 ed jne 10dfc0 <_Thread_queue_Flush+0x10> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10dfd3: 8d 65 f8 lea -0x8(%ebp),%esp 10dfd6: 5b pop %ebx 10dfd7: 5e pop %esi 10dfd8: c9 leave 10dfd9: c3 ret =============================================================================== 0010dfdc <_Thread_queue_Initialize>: Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 10dfdc: 55 push %ebp 10dfdd: 89 e5 mov %esp,%ebp 10dfdf: 56 push %esi 10dfe0: 53 push %ebx 10dfe1: 8b 45 08 mov 0x8(%ebp),%eax 10dfe4: 8b 55 0c mov 0xc(%ebp),%edx the_thread_queue->state = state; 10dfe7: 8b 4d 10 mov 0x10(%ebp),%ecx 10dfea: 89 48 38 mov %ecx,0x38(%eax) the_thread_queue->discipline = the_discipline; 10dfed: 89 50 34 mov %edx,0x34(%eax) the_thread_queue->timeout_status = timeout_status; 10dff0: 8b 4d 14 mov 0x14(%ebp),%ecx 10dff3: 89 48 3c mov %ecx,0x3c(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10dff6: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10dffd: 83 fa 01 cmp $0x1,%edx 10e000: 74 16 je 10e018 <_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 ); 10e002: 8d 50 04 lea 0x4(%eax),%edx 10e005: 89 10 mov %edx,(%eax) head->next = tail; head->previous = NULL; 10e007: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) tail->previous = head; 10e00e: 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 ); } } 10e011: 5b pop %ebx 10e012: 5e pop %esi 10e013: c9 leave 10e014: c3 ret 10e015: 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 ) { 10e018: 89 c1 mov %eax,%ecx 10e01a: 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 ); 10e01c: 8d 1c 52 lea (%edx,%edx,2),%ebx 10e01f: 8d 1c 98 lea (%eax,%ebx,4),%ebx 10e022: 8d 73 04 lea 0x4(%ebx),%esi 10e025: 89 31 mov %esi,(%ecx) head->next = tail; head->previous = NULL; 10e027: 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 ); 10e02e: 89 59 08 mov %ebx,0x8(%ecx) uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) 10e031: 42 inc %edx 10e032: 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 ; 10e035: 83 fa 04 cmp $0x4,%edx 10e038: 75 e2 jne 10e01c <_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 ); } } 10e03a: 5b pop %ebx 10e03b: 5e pop %esi 10e03c: c9 leave 10e03d: c3 ret =============================================================================== 0010e040 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10e040: 55 push %ebp 10e041: 89 e5 mov %esp,%ebp 10e043: 57 push %edi 10e044: 56 push %esi 10e045: 53 push %ebx 10e046: 83 ec 1c sub $0x1c,%esp 10e049: 8b 75 08 mov 0x8(%ebp),%esi 10e04c: 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 ) 10e04f: 85 f6 test %esi,%esi 10e051: 74 06 je 10e059 <_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 ) { 10e053: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10e057: 74 0b je 10e064 <_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 ); } } 10e059: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10e05c: 5b pop %ebx <== NOT EXECUTED 10e05d: 5e pop %esi <== NOT EXECUTED 10e05e: 5f pop %edi <== NOT EXECUTED 10e05f: c9 leave <== NOT EXECUTED 10e060: c3 ret <== NOT EXECUTED 10e061: 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 ); 10e064: 9c pushf 10e065: fa cli 10e066: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10e067: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10e06e: 75 0c jne 10e07c <_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 ); 10e070: 53 push %ebx 10e071: 9d popf } } 10e072: 8d 65 f4 lea -0xc(%ebp),%esp 10e075: 5b pop %ebx 10e076: 5e pop %esi 10e077: 5f pop %edi 10e078: c9 leave 10e079: c3 ret 10e07a: 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; 10e07c: 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 ); 10e083: 50 push %eax 10e084: 6a 01 push $0x1 10e086: 57 push %edi 10e087: 56 push %esi 10e088: e8 a7 2b 00 00 call 110c34 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10e08d: 83 c4 0c add $0xc,%esp 10e090: 8d 45 e4 lea -0x1c(%ebp),%eax 10e093: 50 push %eax 10e094: 57 push %edi 10e095: 56 push %esi 10e096: e8 71 fd ff ff call 10de0c <_Thread_queue_Enqueue_priority> 10e09b: 83 c4 10 add $0x10,%esp 10e09e: eb d0 jmp 10e070 <_Thread_queue_Requeue+0x30> =============================================================================== 0010e0a0 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10e0a0: 55 push %ebp 10e0a1: 89 e5 mov %esp,%ebp 10e0a3: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10e0a6: 8d 45 f4 lea -0xc(%ebp),%eax 10e0a9: 50 push %eax 10e0aa: ff 75 08 pushl 0x8(%ebp) 10e0ad: e8 6e f8 ff ff call 10d920 <_Thread_Get> switch ( location ) { 10e0b2: 83 c4 10 add $0x10,%esp 10e0b5: 8b 55 f4 mov -0xc(%ebp),%edx 10e0b8: 85 d2 test %edx,%edx 10e0ba: 75 17 jne 10e0d3 <_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 ); 10e0bc: 83 ec 0c sub $0xc,%esp 10e0bf: 50 push %eax 10e0c0: e8 2b 2c 00 00 call 110cf0 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10e0c5: a1 d0 64 12 00 mov 0x1264d0,%eax 10e0ca: 48 dec %eax 10e0cb: a3 d0 64 12 00 mov %eax,0x1264d0 10e0d0: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10e0d3: c9 leave 10e0d4: c3 ret =============================================================================== 00118e00 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 118e00: 55 push %ebp 118e01: 89 e5 mov %esp,%ebp 118e03: 57 push %edi 118e04: 56 push %esi 118e05: 53 push %ebx 118e06: 83 ec 4c sub $0x4c,%esp 118e09: 8b 5d 08 mov 0x8(%ebp),%ebx ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 118e0c: 8d 45 e0 lea -0x20(%ebp),%eax 118e0f: 89 45 b4 mov %eax,-0x4c(%ebp) 118e12: 89 45 dc mov %eax,-0x24(%ebp) head->previous = NULL; 118e15: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) tail->previous = head; 118e1c: 8d 4d dc lea -0x24(%ebp),%ecx 118e1f: 89 4d e4 mov %ecx,-0x1c(%ebp) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 118e22: 8d 7d d0 lea -0x30(%ebp),%edi 118e25: 8d 45 d4 lea -0x2c(%ebp),%eax 118e28: 89 45 b0 mov %eax,-0x50(%ebp) 118e2b: 89 45 d0 mov %eax,-0x30(%ebp) head->previous = NULL; 118e2e: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) tail->previous = head; 118e35: 89 7d d8 mov %edi,-0x28(%ebp) 118e38: 8d 73 30 lea 0x30(%ebx),%esi 118e3b: 8d 4b 68 lea 0x68(%ebx),%ecx 118e3e: 89 4d c4 mov %ecx,-0x3c(%ebp) 118e41: 8d 43 08 lea 0x8(%ebx),%eax 118e44: 89 45 bc mov %eax,-0x44(%ebp) 118e47: 8d 53 40 lea 0x40(%ebx),%edx 118e4a: 89 55 c0 mov %edx,-0x40(%ebp) 118e4d: 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; 118e50: 8d 4d dc lea -0x24(%ebp),%ecx 118e53: 89 4b 78 mov %ecx,0x78(%ebx) 118e56: 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; 118e58: a1 44 0a 14 00 mov 0x140a44,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 118e5d: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 118e60: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118e63: 51 push %ecx 118e64: 57 push %edi Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 118e65: 29 d0 sub %edx,%eax watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118e67: 50 push %eax 118e68: 56 push %esi 118e69: e8 ee 3d 00 00 call 11cc5c <_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(); 118e6e: a1 a8 09 14 00 mov 0x1409a8,%eax Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 118e73: 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 ) { 118e76: 83 c4 10 add $0x10,%esp 118e79: 39 d0 cmp %edx,%eax 118e7b: 0f 87 af 00 00 00 ja 118f30 <_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 ) { 118e81: 0f 82 c9 00 00 00 jb 118f50 <_Timer_server_Body+0x150> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 118e87: 89 43 74 mov %eax,0x74(%ebx) 118e8a: 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 ); 118e8c: 8b 43 78 mov 0x78(%ebx),%eax 118e8f: 83 ec 0c sub $0xc,%esp 118e92: 50 push %eax 118e93: e8 c0 09 00 00 call 119858 <_Chain_Get> if ( timer == NULL ) { 118e98: 83 c4 10 add $0x10,%esp 118e9b: 85 c0 test %eax,%eax 118e9d: 74 35 je 118ed4 <_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 ) { 118e9f: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 118ea2: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 118ea5: 74 19 je 118ec0 <_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 ) { 118ea7: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 118eaa: 75 e0 jne 118e8c <_Timer_server_Body+0x8c><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 118eac: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118eaf: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 118eb2: 50 push %eax <== NOT EXECUTED 118eb3: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 118eb6: e8 2d 3e 00 00 call 11cce8 <_Watchdog_Insert> <== NOT EXECUTED 118ebb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118ebe: eb cc jmp 118e8c <_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 ); 118ec0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118ec3: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 118ec6: 50 push %eax <== NOT EXECUTED 118ec7: 56 push %esi <== NOT EXECUTED 118ec8: e8 1b 3e 00 00 call 11cce8 <_Watchdog_Insert> <== NOT EXECUTED 118ecd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118ed0: eb ba jmp 118e8c <_Timer_server_Body+0x8c><== NOT EXECUTED 118ed2: 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 ); 118ed4: 9c pushf 118ed5: fa cli 118ed6: 58 pop %eax tmp = ts->insert_chain; 118ed7: 8b 53 78 mov 0x78(%ebx),%edx if ( _Chain_Is_empty( insert_chain ) ) { 118eda: 8b 55 b4 mov -0x4c(%ebp),%edx 118edd: 39 55 dc cmp %edx,-0x24(%ebp) 118ee0: 0f 84 86 00 00 00 je 118f6c <_Timer_server_Body+0x16c><== ALWAYS TAKEN 118ee6: b2 01 mov $0x1,%dl <== NOT EXECUTED ts->insert_chain = NULL; do_loop = false; } _ISR_Enable( level ); 118ee8: 50 push %eax 118ee9: 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 ) { 118eea: 84 d2 test %dl,%dl 118eec: 0f 85 66 ff ff ff jne 118e58 <_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 ) ) { 118ef2: 8b 4d b0 mov -0x50(%ebp),%ecx 118ef5: 39 4d d0 cmp %ecx,-0x30(%ebp) 118ef8: 75 22 jne 118f1c <_Timer_server_Body+0x11c> 118efa: eb 7e jmp 118f7a <_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; 118efc: 8b 10 mov (%eax),%edx head->next = new_first; 118efe: 89 55 d0 mov %edx,-0x30(%ebp) new_first->previous = head; 118f01: 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; 118f04: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 118f0b: 51 push %ecx 118f0c: 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 ); 118f0d: 83 ec 08 sub $0x8,%esp 118f10: ff 70 24 pushl 0x24(%eax) 118f13: ff 70 20 pushl 0x20(%eax) 118f16: ff 50 1c call *0x1c(%eax) } 118f19: 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 ); 118f1c: 9c pushf 118f1d: fa cli 118f1e: 59 pop %ecx initialized = false; } #endif return status; } 118f1f: 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)) 118f22: 3b 45 b0 cmp -0x50(%ebp),%eax 118f25: 75 d5 jne 118efc <_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 ); 118f27: 51 push %ecx 118f28: 9d popf 118f29: e9 22 ff ff ff jmp 118e50 <_Timer_server_Body+0x50> 118f2e: 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 ); 118f30: 51 push %ecx 118f31: 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; 118f32: 89 c1 mov %eax,%ecx 118f34: 29 d1 sub %edx,%ecx _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118f36: 51 push %ecx 118f37: ff 75 c4 pushl -0x3c(%ebp) 118f3a: 89 45 b8 mov %eax,-0x48(%ebp) 118f3d: e8 1a 3d 00 00 call 11cc5c <_Watchdog_Adjust_to_chain> 118f42: 83 c4 10 add $0x10,%esp 118f45: 8b 45 b8 mov -0x48(%ebp),%eax 118f48: e9 3a ff ff ff jmp 118e87 <_Timer_server_Body+0x87> 118f4d: 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 ); 118f50: 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; 118f51: 29 c2 sub %eax,%edx _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 118f53: 52 push %edx 118f54: 6a 01 push $0x1 118f56: ff 75 c4 pushl -0x3c(%ebp) 118f59: 89 45 b8 mov %eax,-0x48(%ebp) 118f5c: e8 83 3c 00 00 call 11cbe4 <_Watchdog_Adjust> 118f61: 83 c4 10 add $0x10,%esp 118f64: 8b 45 b8 mov -0x48(%ebp),%eax 118f67: e9 1b ff ff ff jmp 118e87 <_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; 118f6c: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) do_loop = false; 118f73: 31 d2 xor %edx,%edx 118f75: e9 6e ff ff ff jmp 118ee8 <_Timer_server_Body+0xe8> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 118f7a: c6 43 7c 00 movb $0x0,0x7c(%ebx) 118f7e: a1 10 09 14 00 mov 0x140910,%eax 118f83: 40 inc %eax 118f84: 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 ); 118f89: 83 ec 08 sub $0x8,%esp 118f8c: 6a 08 push $0x8 118f8e: ff 33 pushl (%ebx) 118f90: e8 6f 36 00 00 call 11c604 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 118f95: 89 d8 mov %ebx,%eax 118f97: e8 c4 fd ff ff call 118d60 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 118f9c: 89 d8 mov %ebx,%eax 118f9e: e8 0d fe ff ff call 118db0 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 118fa3: e8 a8 2d 00 00 call 11bd50 <_Thread_Enable_dispatch> ts->active = true; 118fa8: 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 ); 118fac: 5a pop %edx 118fad: ff 75 bc pushl -0x44(%ebp) 118fb0: e8 73 3e 00 00 call 11ce28 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 118fb5: 58 pop %eax 118fb6: ff 75 c0 pushl -0x40(%ebp) 118fb9: e8 6a 3e 00 00 call 11ce28 <_Watchdog_Remove> 118fbe: 83 c4 10 add $0x10,%esp 118fc1: e9 8a fe ff ff jmp 118e50 <_Timer_server_Body+0x50> =============================================================================== 00118fc8 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 118fc8: 55 push %ebp 118fc9: 89 e5 mov %esp,%ebp 118fcb: 57 push %edi 118fcc: 56 push %esi 118fcd: 53 push %ebx 118fce: 83 ec 2c sub $0x2c,%esp 118fd1: 8b 5d 08 mov 0x8(%ebp),%ebx 118fd4: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 118fd7: 8b 53 78 mov 0x78(%ebx),%edx 118fda: 85 d2 test %edx,%edx 118fdc: 74 16 je 118ff4 <_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 ); 118fde: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 118fe1: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 118fe4: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 118fe7: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 118fea: 5b pop %ebx <== NOT EXECUTED 118feb: 5e pop %esi <== NOT EXECUTED 118fec: 5f pop %edi <== NOT EXECUTED 118fed: 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 ); 118fee: e9 29 08 00 00 jmp 11981c <_Chain_Append> <== NOT EXECUTED 118ff3: 90 nop <== NOT EXECUTED 118ff4: 8b 15 10 09 14 00 mov 0x140910,%edx 118ffa: 42 inc %edx 118ffb: 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 ) { 119001: 8b 50 38 mov 0x38(%eax),%edx 119004: 83 fa 01 cmp $0x1,%edx 119007: 74 7b je 119084 <_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 ) { 119009: 83 fa 03 cmp $0x3,%edx 11900c: 74 0e je 11901c <_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 ); } } 11900e: 8d 65 f4 lea -0xc(%ebp),%esp 119011: 5b pop %ebx 119012: 5e pop %esi 119013: 5f pop %edi 119014: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 119015: e9 36 2d 00 00 jmp 11bd50 <_Thread_Enable_dispatch> 11901a: 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 ); 11901c: 9c pushf 11901d: fa cli 11901e: 8f 45 e4 popl -0x1c(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 119021: 8b 0d a8 09 14 00 mov 0x1409a8,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 119027: 8b 53 74 mov 0x74(%ebx),%edx 11902a: 89 55 d4 mov %edx,-0x2c(%ebp) initialized = false; } #endif return status; } 11902d: 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 ); 119030: 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 ) ) { 119033: 39 fa cmp %edi,%edx 119035: 74 21 je 119058 <_Timer_server_Schedule_operation_method+0x90> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 119037: 8b 7a 10 mov 0x10(%edx),%edi if ( snapshot > last_snapshot ) { 11903a: 3b 4d d4 cmp -0x2c(%ebp),%ecx 11903d: 0f 86 a1 00 00 00 jbe 1190e4 <_Timer_server_Schedule_operation_method+0x11c> /* * We advanced in time. */ delta = snapshot - last_snapshot; 119043: 89 ce mov %ecx,%esi 119045: 2b 75 d4 sub -0x2c(%ebp),%esi 119048: 89 75 d4 mov %esi,-0x2c(%ebp) if (delta_interval > delta) { 11904b: 39 f7 cmp %esi,%edi 11904d: 0f 86 9b 00 00 00 jbe 1190ee <_Timer_server_Schedule_operation_method+0x126><== NEVER TAKEN delta_interval -= delta; 119053: 29 f7 sub %esi,%edi * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 119055: 89 7a 10 mov %edi,0x10(%edx) } ts->TOD_watchdogs.last_snapshot = snapshot; 119058: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 11905b: ff 75 e4 pushl -0x1c(%ebp) 11905e: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 11905f: 83 ec 08 sub $0x8,%esp 119062: 83 c0 10 add $0x10,%eax 119065: 50 push %eax 119066: 8d 43 68 lea 0x68(%ebx),%eax 119069: 50 push %eax 11906a: e8 79 3c 00 00 call 11cce8 <_Watchdog_Insert> if ( !ts->active ) { 11906f: 8a 43 7c mov 0x7c(%ebx),%al 119072: 83 c4 10 add $0x10,%esp 119075: 84 c0 test %al,%al 119077: 75 95 jne 11900e <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_tod_system_watchdog( ts ); 119079: 89 d8 mov %ebx,%eax 11907b: e8 30 fd ff ff call 118db0 <_Timer_server_Reset_tod_system_watchdog> 119080: eb 8c jmp 11900e <_Timer_server_Schedule_operation_method+0x46> 119082: 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 ); 119084: 9c pushf 119085: fa cli 119086: 8f 45 e4 popl -0x1c(%ebp) snapshot = _Watchdog_Ticks_since_boot; 119089: 8b 0d 44 0a 14 00 mov 0x140a44,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 11908f: 8b 7b 3c mov 0x3c(%ebx),%edi initialized = false; } #endif return status; } 119092: 8b 53 30 mov 0x30(%ebx),%edx 119095: 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 ) ) { 119098: 39 f2 cmp %esi,%edx 11909a: 74 10 je 1190ac <_Timer_server_Schedule_operation_method+0xe4> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 11909c: 89 ce mov %ecx,%esi 11909e: 29 fe sub %edi,%esi delta_interval = first_watchdog->delta_interval; 1190a0: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 1190a3: 39 fe cmp %edi,%esi 1190a5: 73 39 jae 1190e0 <_Timer_server_Schedule_operation_method+0x118> delta_interval -= delta; 1190a7: 29 f7 sub %esi,%edi } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 1190a9: 89 7a 10 mov %edi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 1190ac: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 1190af: ff 75 e4 pushl -0x1c(%ebp) 1190b2: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 1190b3: 83 ec 08 sub $0x8,%esp 1190b6: 83 c0 10 add $0x10,%eax 1190b9: 50 push %eax 1190ba: 8d 43 30 lea 0x30(%ebx),%eax 1190bd: 50 push %eax 1190be: e8 25 3c 00 00 call 11cce8 <_Watchdog_Insert> if ( !ts->active ) { 1190c3: 8a 43 7c mov 0x7c(%ebx),%al 1190c6: 83 c4 10 add $0x10,%esp 1190c9: 84 c0 test %al,%al 1190cb: 0f 85 3d ff ff ff jne 11900e <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_interval_system_watchdog( ts ); 1190d1: 89 d8 mov %ebx,%eax 1190d3: e8 88 fc ff ff call 118d60 <_Timer_server_Reset_interval_system_watchdog> 1190d8: e9 31 ff ff ff jmp 11900e <_Timer_server_Schedule_operation_method+0x46> 1190dd: 8d 76 00 lea 0x0(%esi),%esi delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 1190e0: 31 ff xor %edi,%edi 1190e2: eb c5 jmp 1190a9 <_Timer_server_Schedule_operation_method+0xe1> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 1190e4: 03 7d d4 add -0x2c(%ebp),%edi delta_interval += delta; 1190e7: 29 cf sub %ecx,%edi 1190e9: e9 67 ff ff ff jmp 119055 <_Timer_server_Schedule_operation_method+0x8d> */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 1190ee: 31 ff xor %edi,%edi <== NOT EXECUTED 1190f0: e9 60 ff ff ff jmp 119055 <_Timer_server_Schedule_operation_method+0x8d><== NOT EXECUTED =============================================================================== 0010fb28 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 10fb28: 55 push %ebp 10fb29: 89 e5 mov %esp,%ebp 10fb2b: 57 push %edi 10fb2c: 56 push %esi 10fb2d: 53 push %ebx 10fb2e: 83 ec 2c sub $0x2c,%esp 10fb31: 8b 45 08 mov 0x8(%ebp),%eax 10fb34: 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; 10fb37: 8b 38 mov (%eax),%edi left += lhs->tv_nsec; 10fb39: 8b 70 04 mov 0x4(%eax),%esi right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10fb3c: bb 00 ca 9a 3b mov $0x3b9aca00,%ebx 10fb41: 8b 01 mov (%ecx),%eax 10fb43: f7 eb imul %ebx 10fb45: 89 45 e0 mov %eax,-0x20(%ebp) 10fb48: 89 55 e4 mov %edx,-0x1c(%ebp) right += rhs->tv_nsec; 10fb4b: 8b 41 04 mov 0x4(%ecx),%eax 10fb4e: 99 cltd 10fb4f: 01 45 e0 add %eax,-0x20(%ebp) 10fb52: 11 55 e4 adc %edx,-0x1c(%ebp) if ( right == 0 ) { 10fb55: 8b 55 e4 mov -0x1c(%ebp),%edx 10fb58: 0b 55 e0 or -0x20(%ebp),%edx 10fb5b: 74 73 je 10fbd0 <_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; 10fb5d: 89 f8 mov %edi,%eax 10fb5f: f7 eb imul %ebx 10fb61: 89 45 d0 mov %eax,-0x30(%ebp) 10fb64: 89 55 d4 mov %edx,-0x2c(%ebp) left += lhs->tv_nsec; 10fb67: 89 f7 mov %esi,%edi 10fb69: c1 ff 1f sar $0x1f,%edi 10fb6c: 01 75 d0 add %esi,-0x30(%ebp) 10fb6f: 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; 10fb72: 69 4d d4 a0 86 01 00 imul $0x186a0,-0x2c(%ebp),%ecx 10fb79: bb a0 86 01 00 mov $0x186a0,%ebx 10fb7e: 8b 45 d0 mov -0x30(%ebp),%eax 10fb81: f7 e3 mul %ebx 10fb83: 8d 34 11 lea (%ecx,%edx,1),%esi 10fb86: ff 75 e4 pushl -0x1c(%ebp) 10fb89: ff 75 e0 pushl -0x20(%ebp) 10fb8c: 56 push %esi 10fb8d: 50 push %eax 10fb8e: e8 99 03 01 00 call 11ff2c <__udivdi3> 10fb93: 83 c4 10 add $0x10,%esp 10fb96: 89 c3 mov %eax,%ebx 10fb98: 89 d6 mov %edx,%esi *ival_percentage = answer / 1000; 10fb9a: 6a 00 push $0x0 10fb9c: 68 e8 03 00 00 push $0x3e8 10fba1: 52 push %edx 10fba2: 50 push %eax 10fba3: e8 84 03 01 00 call 11ff2c <__udivdi3> 10fba8: 83 c4 10 add $0x10,%esp 10fbab: 8b 55 10 mov 0x10(%ebp),%edx 10fbae: 89 02 mov %eax,(%edx) *fval_percentage = answer % 1000; 10fbb0: 6a 00 push $0x0 10fbb2: 68 e8 03 00 00 push $0x3e8 10fbb7: 56 push %esi 10fbb8: 53 push %ebx 10fbb9: e8 7e 04 01 00 call 12003c <__umoddi3> 10fbbe: 83 c4 10 add $0x10,%esp 10fbc1: 8b 55 14 mov 0x14(%ebp),%edx 10fbc4: 89 02 mov %eax,(%edx) } 10fbc6: 8d 65 f4 lea -0xc(%ebp),%esp 10fbc9: 5b pop %ebx 10fbca: 5e pop %esi 10fbcb: 5f pop %edi 10fbcc: c9 leave 10fbcd: c3 ret 10fbce: 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; 10fbd0: 8b 45 10 mov 0x10(%ebp),%eax 10fbd3: c7 00 00 00 00 00 movl $0x0,(%eax) *fval_percentage = 0; 10fbd9: 8b 55 14 mov 0x14(%ebp),%edx 10fbdc: c7 02 00 00 00 00 movl $0x0,(%edx) answer = (left * 100000) / right; *ival_percentage = answer / 1000; *fval_percentage = answer % 1000; } 10fbe2: 8d 65 f4 lea -0xc(%ebp),%esp 10fbe5: 5b pop %ebx 10fbe6: 5e pop %esi 10fbe7: 5f pop %edi 10fbe8: c9 leave 10fbe9: c3 ret =============================================================================== 0011eff0 <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 11eff0: 55 push %ebp 11eff1: 89 e5 mov %esp,%ebp 11eff3: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 11eff6: 85 c0 test %eax,%eax 11eff8: 74 1a je 11f014 <_Timespec_Is_valid+0x24> return false; if ( time->tv_sec < 0 ) 11effa: 8b 10 mov (%eax),%edx 11effc: 85 d2 test %edx,%edx 11effe: 78 14 js 11f014 <_Timespec_Is_valid+0x24> return false; if ( time->tv_nsec < 0 ) 11f000: 8b 40 04 mov 0x4(%eax),%eax 11f003: 85 c0 test %eax,%eax 11f005: 78 0d js 11f014 <_Timespec_Is_valid+0x24> #include #include #include bool _Timespec_Is_valid( 11f007: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 11f00c: 0f 96 c0 setbe %al if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 11f00f: c9 leave 11f010: c3 ret 11f011: 8d 76 00 lea 0x0(%esi),%esi if ( time->tv_sec < 0 ) return false; if ( time->tv_nsec < 0 ) return false; 11f014: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 11f016: c9 leave 11f017: c3 ret =============================================================================== 0011f018 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 11f018: 55 push %ebp 11f019: 89 e5 mov %esp,%ebp 11f01b: 56 push %esi 11f01c: 53 push %ebx 11f01d: 8b 5d 08 mov 0x8(%ebp),%ebx uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 11f020: 8b 33 mov (%ebx),%esi 11f022: 85 f6 test %esi,%esi 11f024: 75 07 jne 11f02d <_Timespec_To_ticks+0x15> 11f026: 8b 43 04 mov 0x4(%ebx),%eax 11f029: 85 c0 test %eax,%eax 11f02b: 74 37 je 11f064 <_Timespec_To_ticks+0x4c> return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 11f02d: e8 ba 01 00 00 call 11f1ec 11f032: 89 c1 mov %eax,%ecx 11f034: 0f af ce imul %esi,%ecx ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 11f037: a1 6c 32 12 00 mov 0x12326c,%eax 11f03c: 8d 04 80 lea (%eax,%eax,4),%eax 11f03f: 8d 04 80 lea (%eax,%eax,4),%eax 11f042: 8d 34 80 lea (%eax,%eax,4),%esi 11f045: c1 e6 03 shl $0x3,%esi 11f048: 8b 43 04 mov 0x4(%ebx),%eax 11f04b: 31 d2 xor %edx,%edx 11f04d: f7 f6 div %esi if (ticks) 11f04f: 01 c8 add %ecx,%eax 11f051: 74 05 je 11f058 <_Timespec_To_ticks+0x40> return ticks; return 1; } 11f053: 5b pop %ebx 11f054: 5e pop %esi 11f055: c9 leave 11f056: c3 ret 11f057: 90 nop ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); if (ticks) return ticks; return 1; 11f058: b8 01 00 00 00 mov $0x1,%eax } 11f05d: 5b pop %ebx 11f05e: 5e pop %esi 11f05f: c9 leave 11f060: c3 ret 11f061: 8d 76 00 lea 0x0(%esi),%esi ) { uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) return 0; 11f064: 31 c0 xor %eax,%eax if (ticks) return ticks; return 1; } 11f066: 5b pop %ebx 11f067: 5e pop %esi 11f068: c9 leave 11f069: c3 ret =============================================================================== 0010e4a4 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10e4a4: 55 push %ebp 10e4a5: 89 e5 mov %esp,%ebp 10e4a7: 57 push %edi 10e4a8: 56 push %esi 10e4a9: 53 push %ebx 10e4aa: 83 ec 1c sub $0x1c,%esp 10e4ad: 8b 75 08 mov 0x8(%ebp),%esi 10e4b0: 8b 7d 10 mov 0x10(%ebp),%edi 10e4b3: 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 ); } } 10e4b6: 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 ); 10e4bc: 81 fb ec 66 12 00 cmp $0x1266ec,%ebx 10e4c2: 74 25 je 10e4e9 <_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 ); 10e4c4: 0f b6 c0 movzbl %al,%eax 10e4c7: 89 45 e4 mov %eax,-0x1c(%ebp) 10e4ca: 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 ) 10e4cc: 8b 43 30 mov 0x30(%ebx),%eax 10e4cf: 85 c0 test %eax,%eax 10e4d1: 74 0b je 10e4de <_User_extensions_Fatal+0x3a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10e4d3: 52 push %edx 10e4d4: 57 push %edi 10e4d5: ff 75 e4 pushl -0x1c(%ebp) 10e4d8: 56 push %esi 10e4d9: ff d0 call *%eax 10e4db: 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 ) { 10e4de: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 10e4e1: 81 fb ec 66 12 00 cmp $0x1266ec,%ebx 10e4e7: 75 e3 jne 10e4cc <_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 ); } } 10e4e9: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10e4ec: 5b pop %ebx <== NOT EXECUTED 10e4ed: 5e pop %esi <== NOT EXECUTED 10e4ee: 5f pop %edi <== NOT EXECUTED 10e4ef: c9 leave <== NOT EXECUTED 10e4f0: c3 ret <== NOT EXECUTED =============================================================================== 0010e368 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10e368: 55 push %ebp 10e369: 89 e5 mov %esp,%ebp 10e36b: 57 push %edi 10e36c: 56 push %esi 10e36d: 53 push %ebx 10e36e: 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; 10e371: a1 98 22 12 00 mov 0x122298,%eax 10e376: 89 45 dc mov %eax,-0x24(%ebp) initial_extensions = Configuration.User_extension_table; 10e379: 8b 35 9c 22 12 00 mov 0x12229c,%esi Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 10e37f: c7 05 ec 66 12 00 f0 movl $0x1266f0,0x1266ec 10e386: 66 12 00 head->previous = NULL; 10e389: c7 05 f0 66 12 00 00 movl $0x0,0x1266f0 10e390: 00 00 00 tail->previous = head; 10e393: c7 05 f4 66 12 00 ec movl $0x1266ec,0x1266f4 10e39a: 66 12 00 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 10e39d: c7 05 d4 64 12 00 d8 movl $0x1264d8,0x1264d4 10e3a4: 64 12 00 head->previous = NULL; 10e3a7: c7 05 d8 64 12 00 00 movl $0x0,0x1264d8 10e3ae: 00 00 00 tail->previous = head; 10e3b1: c7 05 dc 64 12 00 d4 movl $0x1264d4,0x1264dc 10e3b8: 64 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10e3bb: 85 f6 test %esi,%esi 10e3bd: 74 64 je 10e423 <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( 10e3bf: 89 c2 mov %eax,%edx 10e3c1: 8d 04 40 lea (%eax,%eax,2),%eax 10e3c4: 8d 0c 82 lea (%edx,%eax,4),%ecx 10e3c7: c1 e1 02 shl $0x2,%ecx 10e3ca: 83 ec 0c sub $0xc,%esp 10e3cd: 51 push %ecx 10e3ce: 89 4d d8 mov %ecx,-0x28(%ebp) 10e3d1: e8 ce 04 00 00 call 10e8a4 <_Workspace_Allocate_or_fatal_error> 10e3d6: 89 c3 mov %eax,%ebx number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10e3d8: 31 c0 xor %eax,%eax 10e3da: 8b 4d d8 mov -0x28(%ebp),%ecx 10e3dd: 89 df mov %ebx,%edi 10e3df: f3 aa rep stos %al,%es:(%edi) extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e3e1: 83 c4 10 add $0x10,%esp 10e3e4: 8b 45 dc mov -0x24(%ebp),%eax 10e3e7: 85 c0 test %eax,%eax 10e3e9: 74 38 je 10e423 <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN 10e3eb: 89 75 e4 mov %esi,-0x1c(%ebp) 10e3ee: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 10e3f5: 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; 10e3f8: 8d 7b 14 lea 0x14(%ebx),%edi 10e3fb: 8b 75 e4 mov -0x1c(%ebp),%esi 10e3fe: b9 08 00 00 00 mov $0x8,%ecx 10e403: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10e405: 83 ec 0c sub $0xc,%esp 10e408: 53 push %ebx 10e409: e8 8e 29 00 00 call 110d9c <_User_extensions_Add_set> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10e40e: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e411: ff 45 e0 incl -0x20(%ebp) 10e414: 83 45 e4 20 addl $0x20,-0x1c(%ebp) 10e418: 83 c4 10 add $0x10,%esp 10e41b: 8b 45 e0 mov -0x20(%ebp),%eax 10e41e: 39 45 dc cmp %eax,-0x24(%ebp) 10e421: 77 d5 ja 10e3f8 <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10e423: 8d 65 f4 lea -0xc(%ebp),%esp 10e426: 5b pop %ebx 10e427: 5e pop %esi 10e428: 5f pop %edi 10e429: c9 leave 10e42a: c3 ret =============================================================================== 0010f8e8 <_User_extensions_Remove_set>: #include void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 10f8e8: 55 push %ebp 10f8e9: 89 e5 mov %esp,%ebp 10f8eb: 53 push %ebx 10f8ec: 83 ec 10 sub $0x10,%esp 10f8ef: 8b 5d 08 mov 0x8(%ebp),%ebx _Chain_Extract( &the_extension->Node ); 10f8f2: 53 push %ebx 10f8f3: e8 9c da ff ff call 10d394 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 10f8f8: 83 c4 10 add $0x10,%esp 10f8fb: 8b 43 24 mov 0x24(%ebx),%eax 10f8fe: 85 c0 test %eax,%eax 10f900: 74 12 je 10f914 <_User_extensions_Remove_set+0x2c> _Chain_Extract( &the_extension->Switch.Node ); 10f902: 83 c3 08 add $0x8,%ebx 10f905: 89 5d 08 mov %ebx,0x8(%ebp) } 10f908: 8b 5d fc mov -0x4(%ebp),%ebx 10f90b: c9 leave /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 10f90c: e9 83 da ff ff jmp 10d394 <_Chain_Extract> 10f911: 8d 76 00 lea 0x0(%esi),%esi } 10f914: 8b 5d fc mov -0x4(%ebp),%ebx 10f917: c9 leave 10f918: c3 ret =============================================================================== 0010e42c <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 10e42c: 55 push %ebp 10e42d: 89 e5 mov %esp,%ebp 10e42f: 56 push %esi 10e430: 53 push %ebx 10e431: 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 ); } } 10e434: 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 ); 10e43a: 81 fb f0 66 12 00 cmp $0x1266f0,%ebx 10e440: 74 1c je 10e45e <_User_extensions_Thread_begin+0x32><== NEVER TAKEN 10e442: 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 ) 10e444: 8b 43 28 mov 0x28(%ebx),%eax 10e447: 85 c0 test %eax,%eax 10e449: 74 09 je 10e454 <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 10e44b: 83 ec 0c sub $0xc,%esp 10e44e: 56 push %esi 10e44f: ff d0 call *%eax 10e451: 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 ) { 10e454: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 10e456: 81 fb f0 66 12 00 cmp $0x1266f0,%ebx 10e45c: 75 e6 jne 10e444 <_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 ); } } 10e45e: 8d 65 f8 lea -0x8(%ebp),%esp 10e461: 5b pop %ebx 10e462: 5e pop %esi 10e463: c9 leave 10e464: c3 ret =============================================================================== 0010e4f4 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 10e4f4: 55 push %ebp 10e4f5: 89 e5 mov %esp,%ebp 10e4f7: 56 push %esi 10e4f8: 53 push %ebx 10e4f9: 8b 75 08 mov 0x8(%ebp),%esi return false; } } return true; } 10e4fc: 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 ); 10e502: 81 fb f0 66 12 00 cmp $0x1266f0,%ebx 10e508: 74 26 je 10e530 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN 10e50a: 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 ) { 10e50c: 8b 43 14 mov 0x14(%ebx),%eax 10e50f: 85 c0 test %eax,%eax 10e511: 74 13 je 10e526 <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 10e513: 83 ec 08 sub $0x8,%esp 10e516: 56 push %esi 10e517: ff 35 58 67 12 00 pushl 0x126758 10e51d: ff d0 call *%eax _Thread_Executing, the_thread ); if ( !status ) 10e51f: 83 c4 10 add $0x10,%esp 10e522: 84 c0 test %al,%al 10e524: 74 16 je 10e53c <_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 ) { 10e526: 8b 1b mov (%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 10e528: 81 fb f0 66 12 00 cmp $0x1266f0,%ebx 10e52e: 75 dc jne 10e50c <_User_extensions_Thread_create+0x18> if ( !status ) return false; } } return true; 10e530: b0 01 mov $0x1,%al } 10e532: 8d 65 f8 lea -0x8(%ebp),%esp 10e535: 5b pop %ebx 10e536: 5e pop %esi 10e537: c9 leave 10e538: c3 ret 10e539: 8d 76 00 lea 0x0(%esi),%esi status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) return false; 10e53c: 31 c0 xor %eax,%eax } } return true; } 10e53e: 8d 65 f8 lea -0x8(%ebp),%esp 10e541: 5b pop %ebx 10e542: 5e pop %esi 10e543: c9 leave 10e544: c3 ret =============================================================================== 0010e548 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 10e548: 55 push %ebp 10e549: 89 e5 mov %esp,%ebp 10e54b: 56 push %esi 10e54c: 53 push %ebx 10e54d: 8b 75 08 mov 0x8(%ebp),%esi (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10e550: 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 ); 10e556: 81 fb ec 66 12 00 cmp $0x1266ec,%ebx 10e55c: 74 23 je 10e581 <_User_extensions_Thread_delete+0x39><== NEVER TAKEN 10e55e: 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 ) 10e560: 8b 43 20 mov 0x20(%ebx),%eax 10e563: 85 c0 test %eax,%eax 10e565: 74 0f je 10e576 <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 10e567: 83 ec 08 sub $0x8,%esp 10e56a: 56 push %esi 10e56b: ff 35 58 67 12 00 pushl 0x126758 10e571: ff d0 call *%eax 10e573: 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 ) { 10e576: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 10e579: 81 fb ec 66 12 00 cmp $0x1266ec,%ebx 10e57f: 75 df jne 10e560 <_User_extensions_Thread_delete+0x18> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10e581: 8d 65 f8 lea -0x8(%ebp),%esp 10e584: 5b pop %ebx 10e585: 5e pop %esi 10e586: c9 leave 10e587: c3 ret =============================================================================== 0010e468 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10e468: 55 push %ebp 10e469: 89 e5 mov %esp,%ebp 10e46b: 56 push %esi 10e46c: 53 push %ebx 10e46d: 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 ); } } 10e470: 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 ); 10e476: 81 fb ec 66 12 00 cmp $0x1266ec,%ebx 10e47c: 74 1d je 10e49b <_User_extensions_Thread_exitted+0x33><== NEVER TAKEN 10e47e: 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 ) 10e480: 8b 43 2c mov 0x2c(%ebx),%eax 10e483: 85 c0 test %eax,%eax 10e485: 74 09 je 10e490 <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 10e487: 83 ec 0c sub $0xc,%esp 10e48a: 56 push %esi 10e48b: ff d0 call *%eax 10e48d: 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 ) { 10e490: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 10e493: 81 fb ec 66 12 00 cmp $0x1266ec,%ebx 10e499: 75 e5 jne 10e480 <_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 ); } } 10e49b: 8d 65 f8 lea -0x8(%ebp),%esp 10e49e: 5b pop %ebx 10e49f: 5e pop %esi 10e4a0: c9 leave 10e4a1: c3 ret =============================================================================== 0010f14c <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 10f14c: 55 push %ebp 10f14d: 89 e5 mov %esp,%ebp 10f14f: 56 push %esi 10f150: 53 push %ebx 10f151: 8b 75 08 mov 0x8(%ebp),%esi (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10f154: 8b 1d 4c 8c 12 00 mov 0x128c4c,%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 10f15a: 81 fb 50 8c 12 00 cmp $0x128c50,%ebx 10f160: 74 22 je 10f184 <_User_extensions_Thread_restart+0x38><== NEVER TAKEN 10f162: 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 ) 10f164: 8b 43 1c mov 0x1c(%ebx),%eax 10f167: 85 c0 test %eax,%eax 10f169: 74 0f je 10f17a <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 10f16b: 83 ec 08 sub $0x8,%esp 10f16e: 56 push %esi 10f16f: ff 35 b8 8c 12 00 pushl 0x128cb8 10f175: ff d0 call *%eax 10f177: 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 ) { 10f17a: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 10f17c: 81 fb 50 8c 12 00 cmp $0x128c50,%ebx 10f182: 75 e0 jne 10f164 <_User_extensions_Thread_restart+0x18> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10f184: 8d 65 f8 lea -0x8(%ebp),%esp 10f187: 5b pop %ebx 10f188: 5e pop %esi 10f189: c9 leave 10f18a: c3 ret =============================================================================== 0010e588 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 10e588: 55 push %ebp 10e589: 89 e5 mov %esp,%ebp 10e58b: 56 push %esi 10e58c: 53 push %ebx 10e58d: 8b 75 08 mov 0x8(%ebp),%esi (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10e590: 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 ); 10e596: 81 fb f0 66 12 00 cmp $0x1266f0,%ebx 10e59c: 74 22 je 10e5c0 <_User_extensions_Thread_start+0x38><== NEVER TAKEN 10e59e: 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 ) 10e5a0: 8b 43 18 mov 0x18(%ebx),%eax 10e5a3: 85 c0 test %eax,%eax 10e5a5: 74 0f je 10e5b6 <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 10e5a7: 83 ec 08 sub $0x8,%esp 10e5aa: 56 push %esi 10e5ab: ff 35 58 67 12 00 pushl 0x126758 10e5b1: ff d0 call *%eax 10e5b3: 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 ) { 10e5b6: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 10e5b8: 81 fb f0 66 12 00 cmp $0x1266f0,%ebx 10e5be: 75 e0 jne 10e5a0 <_User_extensions_Thread_start+0x18> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10e5c0: 8d 65 f8 lea -0x8(%ebp),%esp 10e5c3: 5b pop %ebx 10e5c4: 5e pop %esi 10e5c5: c9 leave 10e5c6: c3 ret =============================================================================== 0010e5c8 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 10e5c8: 55 push %ebp 10e5c9: 89 e5 mov %esp,%ebp 10e5cb: 57 push %edi 10e5cc: 56 push %esi 10e5cd: 53 push %ebx 10e5ce: 83 ec 0c sub $0xc,%esp 10e5d1: 8b 7d 08 mov 0x8(%ebp),%edi 10e5d4: 8b 75 0c mov 0xc(%ebp),%esi the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10e5d7: 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 ); 10e5dd: 81 fb d8 64 12 00 cmp $0x1264d8,%ebx 10e5e3: 74 18 je 10e5fd <_User_extensions_Thread_switch+0x35><== NEVER TAKEN 10e5e5: 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 ); 10e5e8: 83 ec 08 sub $0x8,%esp 10e5eb: 56 push %esi 10e5ec: 57 push %edi 10e5ed: 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 ) { 10e5f0: 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 ); 10e5f2: 83 c4 10 add $0x10,%esp 10e5f5: 81 fb d8 64 12 00 cmp $0x1264d8,%ebx 10e5fb: 75 eb jne 10e5e8 <_User_extensions_Thread_switch+0x20> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10e5fd: 8d 65 f4 lea -0xc(%ebp),%esp 10e600: 5b pop %ebx 10e601: 5e pop %esi 10e602: 5f pop %edi 10e603: c9 leave 10e604: c3 ret =============================================================================== 0010ff08 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10ff08: 55 push %ebp 10ff09: 89 e5 mov %esp,%ebp 10ff0b: 57 push %edi 10ff0c: 56 push %esi 10ff0d: 53 push %ebx 10ff0e: 83 ec 1c sub $0x1c,%esp 10ff11: 8b 75 08 mov 0x8(%ebp),%esi 10ff14: 8b 4d 0c mov 0xc(%ebp),%ecx 10ff17: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10ff1a: 9c pushf 10ff1b: fa cli 10ff1c: 58 pop %eax } } _ISR_Enable( level ); } 10ff1d: 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 ); 10ff1f: 8d 7e 04 lea 0x4(%esi),%edi 10ff22: 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 ) ) { 10ff25: 39 fa cmp %edi,%edx 10ff27: 74 3d je 10ff66 <_Watchdog_Adjust+0x5e> switch ( direction ) { 10ff29: 85 c9 test %ecx,%ecx 10ff2b: 75 43 jne 10ff70 <_Watchdog_Adjust+0x68> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10ff2d: 85 db test %ebx,%ebx 10ff2f: 74 35 je 10ff66 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 10ff31: 8b 7a 10 mov 0x10(%edx),%edi 10ff34: 39 fb cmp %edi,%ebx 10ff36: 73 0f jae 10ff47 <_Watchdog_Adjust+0x3f> <== ALWAYS TAKEN 10ff38: eb 3e jmp 10ff78 <_Watchdog_Adjust+0x70> <== NOT EXECUTED 10ff3a: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10ff3c: 29 fb sub %edi,%ebx 10ff3e: 74 26 je 10ff66 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 10ff40: 8b 7a 10 mov 0x10(%edx),%edi 10ff43: 39 df cmp %ebx,%edi 10ff45: 77 31 ja 10ff78 <_Watchdog_Adjust+0x70> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10ff47: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10ff4e: 50 push %eax 10ff4f: 9d popf _Watchdog_Tickle( header ); 10ff50: 83 ec 0c sub $0xc,%esp 10ff53: 56 push %esi 10ff54: e8 d3 01 00 00 call 11012c <_Watchdog_Tickle> _ISR_Disable( level ); 10ff59: 9c pushf 10ff5a: fa cli 10ff5b: 58 pop %eax } } _ISR_Enable( level ); } 10ff5c: 8b 16 mov (%esi),%edx _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 10ff5e: 83 c4 10 add $0x10,%esp 10ff61: 39 55 e4 cmp %edx,-0x1c(%ebp) 10ff64: 75 d6 jne 10ff3c <_Watchdog_Adjust+0x34> } break; } } _ISR_Enable( level ); 10ff66: 50 push %eax 10ff67: 9d popf } 10ff68: 8d 65 f4 lea -0xc(%ebp),%esp 10ff6b: 5b pop %ebx 10ff6c: 5e pop %esi 10ff6d: 5f pop %edi 10ff6e: c9 leave 10ff6f: c3 ret * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 10ff70: 49 dec %ecx 10ff71: 75 f3 jne 10ff66 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10ff73: 01 5a 10 add %ebx,0x10(%edx) break; 10ff76: eb ee jmp 10ff66 <_Watchdog_Adjust+0x5e> case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 10ff78: 29 df sub %ebx,%edi 10ff7a: 89 7a 10 mov %edi,0x10(%edx) break; 10ff7d: eb e7 jmp 10ff66 <_Watchdog_Adjust+0x5e> =============================================================================== 0010e608 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10e608: 55 push %ebp 10e609: 89 e5 mov %esp,%ebp 10e60b: 57 push %edi 10e60c: 56 push %esi 10e60d: 53 push %ebx 10e60e: 83 ec 04 sub $0x4,%esp 10e611: 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; 10e614: 8b 3d 54 67 12 00 mov 0x126754,%edi _ISR_Disable( level ); 10e61a: 9c pushf 10e61b: fa cli 10e61c: 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 ) { 10e61f: 8b 43 08 mov 0x8(%ebx),%eax 10e622: 85 c0 test %eax,%eax 10e624: 0f 85 9e 00 00 00 jne 10e6c8 <_Watchdog_Insert+0xc0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10e62a: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx) _Watchdog_Sync_count++; 10e631: a1 00 66 12 00 mov 0x126600,%eax 10e636: 40 inc %eax 10e637: a3 00 66 12 00 mov %eax,0x126600 restart: delta_interval = the_watchdog->initial; 10e63c: 8b 43 0c mov 0xc(%ebx),%eax RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) _Chain_First( header ) ); 10e63f: 8b 4d 08 mov 0x8(%ebp),%ecx 10e642: 8b 11 mov (%ecx),%edx for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10e644: 85 c0 test %eax,%eax 10e646: 74 5d je 10e6a5 <_Watchdog_Insert+0x9d> 10e648: 8b 32 mov (%edx),%esi 10e64a: 85 f6 test %esi,%esi 10e64c: 74 57 je 10e6a5 <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e64e: 8b 4a 10 mov 0x10(%edx),%ecx 10e651: 39 c8 cmp %ecx,%eax 10e653: 73 22 jae 10e677 <_Watchdog_Insert+0x6f> 10e655: eb 49 jmp 10e6a0 <_Watchdog_Insert+0x98> 10e657: 90 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10e658: 8b 35 84 65 12 00 mov 0x126584,%esi 10e65e: 39 f7 cmp %esi,%edi 10e660: 72 72 jb 10e6d4 <_Watchdog_Insert+0xcc> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10e662: 29 c8 sub %ecx,%eax exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10e664: 8b 12 mov (%edx),%edx for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10e666: 85 c0 test %eax,%eax 10e668: 74 3b je 10e6a5 <_Watchdog_Insert+0x9d> 10e66a: 8b 0a mov (%edx),%ecx 10e66c: 85 c9 test %ecx,%ecx 10e66e: 74 35 je 10e6a5 <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e670: 8b 4a 10 mov 0x10(%edx),%ecx 10e673: 39 c1 cmp %eax,%ecx 10e675: 77 29 ja 10e6a0 <_Watchdog_Insert+0x98> break; } delta_interval -= after->delta_interval; _ISR_Flash( level ); 10e677: ff 75 f0 pushl -0x10(%ebp) 10e67a: 9d popf 10e67b: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10e67c: 83 7b 08 01 cmpl $0x1,0x8(%ebx) 10e680: 74 d6 je 10e658 <_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; 10e682: 89 3d 84 65 12 00 mov %edi,0x126584 _Watchdog_Sync_count--; 10e688: a1 00 66 12 00 mov 0x126600,%eax 10e68d: 48 dec %eax 10e68e: a3 00 66 12 00 mov %eax,0x126600 _ISR_Enable( level ); 10e693: ff 75 f0 pushl -0x10(%ebp) 10e696: 9d popf } 10e697: 58 pop %eax 10e698: 5b pop %ebx 10e699: 5e pop %esi 10e69a: 5f pop %edi 10e69b: c9 leave 10e69c: c3 ret 10e69d: 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; 10e6a0: 29 c1 sub %eax,%ecx 10e6a2: 89 4a 10 mov %ecx,0x10(%edx) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 10e6a5: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10e6ac: 89 43 10 mov %eax,0x10(%ebx) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10e6af: 8b 42 04 mov 0x4(%edx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10e6b2: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10e6b5: 8b 10 mov (%eax),%edx after_node->next = the_node; 10e6b7: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10e6b9: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10e6bb: 89 5a 04 mov %ebx,0x4(%edx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10e6be: a1 04 66 12 00 mov 0x126604,%eax 10e6c3: 89 43 14 mov %eax,0x14(%ebx) 10e6c6: eb ba jmp 10e682 <_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 ); 10e6c8: ff 75 f0 pushl -0x10(%ebp) 10e6cb: 9d popf exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10e6cc: 58 pop %eax 10e6cd: 5b pop %ebx 10e6ce: 5e pop %esi 10e6cf: 5f pop %edi 10e6d0: c9 leave 10e6d1: c3 ret 10e6d2: 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; 10e6d4: 89 3d 84 65 12 00 mov %edi,0x126584 goto restart; 10e6da: e9 5d ff ff ff jmp 10e63c <_Watchdog_Insert+0x34> =============================================================================== 0010e748 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10e748: 55 push %ebp 10e749: 89 e5 mov %esp,%ebp 10e74b: 56 push %esi 10e74c: 53 push %ebx 10e74d: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10e750: 9c pushf 10e751: fa cli 10e752: 59 pop %ecx previous_state = the_watchdog->state; 10e753: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10e756: 83 f8 01 cmp $0x1,%eax 10e759: 74 4d je 10e7a8 <_Watchdog_Remove+0x60> 10e75b: 73 0f jae 10e76c <_Watchdog_Remove+0x24> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10e75d: 8b 1d 04 66 12 00 mov 0x126604,%ebx 10e763: 89 5a 18 mov %ebx,0x18(%edx) _ISR_Enable( level ); 10e766: 51 push %ecx 10e767: 9d popf return( previous_state ); } 10e768: 5b pop %ebx 10e769: 5e pop %esi 10e76a: c9 leave 10e76b: c3 ret Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 10e76c: 83 f8 03 cmp $0x3,%eax 10e76f: 77 ec ja 10e75d <_Watchdog_Remove+0x15> <== NEVER TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10e771: 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 ); } 10e778: 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) ) 10e77a: 8b 33 mov (%ebx),%esi 10e77c: 85 f6 test %esi,%esi 10e77e: 74 06 je 10e786 <_Watchdog_Remove+0x3e> next_watchdog->delta_interval += the_watchdog->delta_interval; 10e780: 8b 72 10 mov 0x10(%edx),%esi 10e783: 01 73 10 add %esi,0x10(%ebx) if ( _Watchdog_Sync_count ) 10e786: 8b 35 00 66 12 00 mov 0x126600,%esi 10e78c: 85 f6 test %esi,%esi 10e78e: 74 0c je 10e79c <_Watchdog_Remove+0x54> _Watchdog_Sync_level = _ISR_Nest_level; 10e790: 8b 35 54 67 12 00 mov 0x126754,%esi 10e796: 89 35 84 65 12 00 mov %esi,0x126584 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10e79c: 8b 72 04 mov 0x4(%edx),%esi next->previous = previous; 10e79f: 89 73 04 mov %esi,0x4(%ebx) previous->next = next; 10e7a2: 89 1e mov %ebx,(%esi) 10e7a4: eb b7 jmp 10e75d <_Watchdog_Remove+0x15> 10e7a6: 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; 10e7a8: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10e7af: eb ac jmp 10e75d <_Watchdog_Remove+0x15> =============================================================================== 0010faf4 <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 10faf4: 55 push %ebp 10faf5: 89 e5 mov %esp,%ebp 10faf7: 57 push %edi 10faf8: 56 push %esi 10faf9: 53 push %ebx 10fafa: 83 ec 2c sub $0x2c,%esp 10fafd: 8b 55 08 mov 0x8(%ebp),%edx 10fb00: 8b 45 0c mov 0xc(%ebp),%eax printk( 10fb03: 8b 78 24 mov 0x24(%eax),%edi 10fb06: 8b 70 20 mov 0x20(%eax),%esi 10fb09: 8b 58 1c mov 0x1c(%eax),%ebx 10fb0c: 8b 48 0c mov 0xc(%eax),%ecx 10fb0f: 89 4d d4 mov %ecx,-0x2c(%ebp) 10fb12: 8b 48 10 mov 0x10(%eax),%ecx 10fb15: 89 4d e4 mov %ecx,-0x1c(%ebp) 10fb18: 85 d2 test %edx,%edx 10fb1a: 74 2c je 10fb48 <_Watchdog_Report+0x54> 10fb1c: b9 63 20 12 00 mov $0x122063,%ecx 10fb21: 83 ec 0c sub $0xc,%esp 10fb24: 57 push %edi 10fb25: 56 push %esi 10fb26: 53 push %ebx 10fb27: 50 push %eax 10fb28: ff 75 d4 pushl -0x2c(%ebp) 10fb2b: ff 75 e4 pushl -0x1c(%ebp) 10fb2e: 51 push %ecx 10fb2f: 52 push %edx 10fb30: 68 b6 2a 12 00 push $0x122ab6 10fb35: e8 a6 9f ff ff call 109ae0 10fb3a: 83 c4 30 add $0x30,%esp watch, watch->routine, watch->id, watch->user_data ); } 10fb3d: 8d 65 f4 lea -0xc(%ebp),%esp 10fb40: 5b pop %ebx 10fb41: 5e pop %esi 10fb42: 5f pop %edi 10fb43: c9 leave 10fb44: c3 ret 10fb45: 8d 76 00 lea 0x0(%esi),%esi void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( 10fb48: b9 29 29 12 00 mov $0x122929,%ecx 10fb4d: 89 ca mov %ecx,%edx 10fb4f: eb d0 jmp 10fb21 <_Watchdog_Report+0x2d> =============================================================================== 0010fa84 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10fa84: 55 push %ebp 10fa85: 89 e5 mov %esp,%ebp 10fa87: 57 push %edi 10fa88: 56 push %esi 10fa89: 53 push %ebx 10fa8a: 83 ec 20 sub $0x20,%esp 10fa8d: 8b 7d 08 mov 0x8(%ebp),%edi 10fa90: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10fa93: 9c pushf 10fa94: fa cli 10fa95: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10fa98: 56 push %esi 10fa99: 57 push %edi 10fa9a: 68 80 2a 12 00 push $0x122a80 10fa9f: e8 3c a0 ff ff call 109ae0 printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); } 10faa4: 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 ); 10faa6: 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 ) ) { 10faa9: 83 c4 10 add $0x10,%esp 10faac: 39 f3 cmp %esi,%ebx 10faae: 74 31 je 10fae1 <_Watchdog_Report_chain+0x5d> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10fab0: 83 ec 08 sub $0x8,%esp 10fab3: 53 push %ebx 10fab4: 6a 00 push $0x0 10fab6: e8 39 00 00 00 call 10faf4 <_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 ) 10fabb: 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 ) ; 10fabd: 83 c4 10 add $0x10,%esp 10fac0: 39 f3 cmp %esi,%ebx 10fac2: 75 ec jne 10fab0 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10fac4: 83 ec 08 sub $0x8,%esp 10fac7: 57 push %edi 10fac8: 68 97 2a 12 00 push $0x122a97 10facd: e8 0e a0 ff ff call 109ae0 10fad2: 83 c4 10 add $0x10,%esp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 10fad5: ff 75 e4 pushl -0x1c(%ebp) 10fad8: 9d popf } 10fad9: 8d 65 f4 lea -0xc(%ebp),%esp 10fadc: 5b pop %ebx 10fadd: 5e pop %esi 10fade: 5f pop %edi 10fadf: c9 leave 10fae0: c3 ret _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 10fae1: 83 ec 0c sub $0xc,%esp 10fae4: 68 a6 2a 12 00 push $0x122aa6 10fae9: e8 f2 9f ff ff call 109ae0 10faee: 83 c4 10 add $0x10,%esp 10faf1: eb e2 jmp 10fad5 <_Watchdog_Report_chain+0x51> =============================================================================== 0010e7b4 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10e7b4: 55 push %ebp 10e7b5: 89 e5 mov %esp,%ebp 10e7b7: 57 push %edi 10e7b8: 56 push %esi 10e7b9: 53 push %ebx 10e7ba: 83 ec 1c sub $0x1c,%esp 10e7bd: 8b 7d 08 mov 0x8(%ebp),%edi * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 10e7c0: 9c pushf 10e7c1: fa cli 10e7c2: 5e pop %esi } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } 10e7c3: 8b 1f mov (%edi),%ebx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10e7c5: 8d 47 04 lea 0x4(%edi),%eax 10e7c8: 89 45 e4 mov %eax,-0x1c(%ebp) * volatile data - till, 2003/7 */ _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 10e7cb: 39 c3 cmp %eax,%ebx 10e7cd: 74 11 je 10e7e0 <_Watchdog_Tickle+0x2c> * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { 10e7cf: 8b 43 10 mov 0x10(%ebx),%eax 10e7d2: 85 c0 test %eax,%eax 10e7d4: 74 34 je 10e80a <_Watchdog_Tickle+0x56> the_watchdog->delta_interval--; 10e7d6: 48 dec %eax 10e7d7: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10e7da: 85 c0 test %eax,%eax 10e7dc: 74 2c je 10e80a <_Watchdog_Tickle+0x56> 10e7de: 66 90 xchg %ax,%ax the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 10e7e0: 56 push %esi 10e7e1: 9d popf } 10e7e2: 8d 65 f4 lea -0xc(%ebp),%esp 10e7e5: 5b pop %ebx 10e7e6: 5e pop %esi 10e7e7: 5f pop %edi 10e7e8: c9 leave 10e7e9: c3 ret _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10e7ea: 83 ec 08 sub $0x8,%esp 10e7ed: ff 73 24 pushl 0x24(%ebx) 10e7f0: ff 73 20 pushl 0x20(%ebx) 10e7f3: ff 53 1c call *0x1c(%ebx) the_watchdog->id, the_watchdog->user_data ); break; 10e7f6: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10e7f9: 9c pushf 10e7fa: fa cli 10e7fb: 5e pop %esi } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } 10e7fc: 8b 1f mov (%edi),%ebx _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10e7fe: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10e801: 74 dd je 10e7e0 <_Watchdog_Tickle+0x2c> } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && 10e803: 8b 43 10 mov 0x10(%ebx),%eax 10e806: 85 c0 test %eax,%eax 10e808: 75 d6 jne 10e7e0 <_Watchdog_Tickle+0x2c> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10e80a: 83 ec 0c sub $0xc,%esp 10e80d: 53 push %ebx 10e80e: e8 35 ff ff ff call 10e748 <_Watchdog_Remove> _ISR_Enable( level ); 10e813: 56 push %esi 10e814: 9d popf switch( watchdog_state ) { 10e815: 83 c4 10 add $0x10,%esp 10e818: 83 f8 02 cmp $0x2,%eax 10e81b: 75 dc jne 10e7f9 <_Watchdog_Tickle+0x45> <== NEVER TAKEN 10e81d: eb cb jmp 10e7ea <_Watchdog_Tickle+0x36> =============================================================================== 0010e820 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 10e820: 55 push %ebp 10e821: 89 e5 mov %esp,%ebp 10e823: 57 push %edi 10e824: 53 push %ebx uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 10e825: 8b 1d 60 22 12 00 mov 0x122260,%ebx uintptr_t size = Configuration.work_space_size; 10e82b: 8b 15 64 22 12 00 mov 0x122264,%edx if ( Configuration.do_zero_of_workspace ) 10e831: 80 3d 88 22 12 00 00 cmpb $0x0,0x122288 10e838: 75 1e jne 10e858 <_Workspace_Handler_initialization+0x38> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 10e83a: 6a 04 push $0x4 10e83c: 52 push %edx 10e83d: 53 push %ebx 10e83e: 68 00 65 12 00 push $0x126500 10e843: e8 18 de ff ff call 10c660 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 10e848: 83 c4 10 add $0x10,%esp 10e84b: 85 c0 test %eax,%eax 10e84d: 74 13 je 10e862 <_Workspace_Handler_initialization+0x42> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 10e84f: 8d 65 f8 lea -0x8(%ebp),%esp 10e852: 5b pop %ebx 10e853: 5f pop %edi 10e854: c9 leave 10e855: c3 ret 10e856: 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 ); 10e858: 31 c0 xor %eax,%eax 10e85a: 89 df mov %ebx,%edi 10e85c: 89 d1 mov %edx,%ecx 10e85e: f3 aa rep stos %al,%es:(%edi) 10e860: eb d8 jmp 10e83a <_Workspace_Handler_initialization+0x1a> size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 10e862: 50 push %eax 10e863: 6a 02 push $0x2 10e865: 6a 01 push $0x1 10e867: 6a 00 push $0x0 10e869: e8 fa df ff ff call 10c868 <_Internal_error_Occurred> =============================================================================== 00112a84 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 112a84: 55 push %ebp 112a85: 89 e5 mov %esp,%ebp 112a87: 57 push %edi 112a88: 56 push %esi 112a89: 53 push %ebx 112a8a: 83 ec 2c sub $0x2c,%esp 112a8d: 8b 5d 08 mov 0x8(%ebp),%ebx 112a90: 8b 7d 0c mov 0xc(%ebp),%edi 112a93: 8b 45 10 mov 0x10(%ebp),%eax 112a96: 8b 75 14 mov 0x14(%ebp),%esi Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 112a99: 85 db test %ebx,%ebx 112a9b: 0f 84 87 00 00 00 je 112b28 <== NEVER TAKEN return RTEMS_INVALID_NAME; if ( !id ) 112aa1: 85 f6 test %esi,%esi 112aa3: 0f 84 bf 00 00 00 je 112b68 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 112aa9: f7 c7 10 00 00 00 test $0x10,%edi 112aaf: 0f 84 83 00 00 00 je 112b38 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 112ab5: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) if ( maximum_waiters == 0 ) 112abc: 85 c0 test %eax,%eax 112abe: 0f 84 80 00 00 00 je 112b44 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 112ac4: 89 45 e4 mov %eax,-0x1c(%ebp) 112ac7: a1 f0 84 12 00 mov 0x1284f0,%eax 112acc: 40 inc %eax 112acd: 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 ); 112ad2: 83 ec 0c sub $0xc,%esp 112ad5: 68 e0 87 12 00 push $0x1287e0 112ada: e8 e5 ba ff ff call 10e5c4 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 112adf: 83 c4 10 add $0x10,%esp 112ae2: 85 c0 test %eax,%eax 112ae4: 74 6e je 112b54 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 112ae6: 89 78 10 mov %edi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 112ae9: 83 ec 08 sub $0x8,%esp 112aec: 8d 55 e0 lea -0x20(%ebp),%edx 112aef: 52 push %edx 112af0: 8d 50 14 lea 0x14(%eax),%edx 112af3: 52 push %edx 112af4: 89 45 d4 mov %eax,-0x2c(%ebp) 112af7: e8 c0 07 00 00 call 1132bc <_CORE_barrier_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 112afc: 8b 45 d4 mov -0x2c(%ebp),%eax 112aff: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 112b02: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 112b05: 8b 0d fc 87 12 00 mov 0x1287fc,%ecx 112b0b: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 112b0e: 89 58 0c mov %ebx,0xc(%eax) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 112b11: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 112b13: e8 e0 ca ff ff call 10f5f8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 112b18: 83 c4 10 add $0x10,%esp 112b1b: 31 c0 xor %eax,%eax } 112b1d: 8d 65 f4 lea -0xc(%ebp),%esp 112b20: 5b pop %ebx 112b21: 5e pop %esi 112b22: 5f pop %edi 112b23: c9 leave 112b24: c3 ret 112b25: 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; 112b28: b8 03 00 00 00 mov $0x3,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112b2d: 8d 65 f4 lea -0xc(%ebp),%esp 112b30: 5b pop %ebx 112b31: 5e pop %esi 112b32: 5f pop %edi 112b33: c9 leave 112b34: c3 ret 112b35: 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; 112b38: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) 112b3f: eb 83 jmp 112ac4 112b41: 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; 112b44: b8 0a 00 00 00 mov $0xa,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112b49: 8d 65 f4 lea -0xc(%ebp),%esp 112b4c: 5b pop %ebx 112b4d: 5e pop %esi 112b4e: 5f pop %edi 112b4f: c9 leave 112b50: c3 ret 112b51: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 112b54: e8 9f ca ff ff call 10f5f8 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 112b59: b8 05 00 00 00 mov $0x5,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112b5e: 8d 65 f4 lea -0xc(%ebp),%esp 112b61: 5b pop %ebx 112b62: 5e pop %esi 112b63: 5f pop %edi 112b64: c9 leave 112b65: c3 ret 112b66: 66 90 xchg %ax,%ax if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 112b68: b8 09 00 00 00 mov $0x9,%eax 112b6d: eb ae jmp 112b1d =============================================================================== 0010c268 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { 10c268: 55 push %ebp 10c269: 89 e5 mov %esp,%ebp 10c26b: 56 push %esi 10c26c: 53 push %ebx 10c26d: 8b 5d 10 mov 0x10(%ebp),%ebx 10c270: 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 ); 10c273: 83 ec 08 sub $0x8,%esp 10c276: ff 75 0c pushl 0xc(%ebp) 10c279: ff 75 08 pushl 0x8(%ebp) 10c27c: e8 9f 04 00 00 call 10c720 <_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 ) { 10c281: 83 c4 10 add $0x10,%esp 10c284: 84 c0 test %al,%al 10c286: 75 0c jne 10c294 sc = rtems_event_send( task, events ); } return sc; } 10c288: 31 c0 xor %eax,%eax 10c28a: 8d 65 f8 lea -0x8(%ebp),%esp 10c28d: 5b pop %ebx 10c28e: 5e pop %esi 10c28f: c9 leave 10c290: c3 ret 10c291: 8d 76 00 lea 0x0(%esi),%esi { 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 ); 10c294: 89 75 0c mov %esi,0xc(%ebp) 10c297: 89 5d 08 mov %ebx,0x8(%ebp) } return sc; } 10c29a: 8d 65 f8 lea -0x8(%ebp),%esp 10c29d: 5b pop %ebx 10c29e: 5e pop %esi 10c29f: 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 ); 10c2a0: e9 af f5 ff ff jmp 10b854 =============================================================================== 0010c2a8 : rtems_chain_control *chain, rtems_id task, rtems_event_set events, rtems_chain_node **node ) { 10c2a8: 55 push %ebp 10c2a9: 89 e5 mov %esp,%ebp 10c2ab: 56 push %esi 10c2ac: 53 push %ebx 10c2ad: 8b 5d 0c mov 0xc(%ebp),%ebx 10c2b0: 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 ); 10c2b3: 83 ec 08 sub $0x8,%esp 10c2b6: ff 75 14 pushl 0x14(%ebp) 10c2b9: ff 75 08 pushl 0x8(%ebp) 10c2bc: e8 c7 04 00 00 call 10c788 <_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 ) { 10c2c1: 83 c4 10 add $0x10,%esp 10c2c4: 84 c0 test %al,%al 10c2c6: 75 0c jne 10c2d4 sc = rtems_event_send( task, events ); } return sc; } 10c2c8: 31 c0 xor %eax,%eax 10c2ca: 8d 65 f8 lea -0x8(%ebp),%esp 10c2cd: 5b pop %ebx 10c2ce: 5e pop %esi 10c2cf: c9 leave 10c2d0: c3 ret 10c2d1: 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 ); 10c2d4: 89 75 0c mov %esi,0xc(%ebp) 10c2d7: 89 5d 08 mov %ebx,0x8(%ebp) } return sc; } 10c2da: 8d 65 f8 lea -0x8(%ebp),%esp 10c2dd: 5b pop %ebx 10c2de: 5e pop %esi 10c2df: 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 ); 10c2e0: e9 6f f5 ff ff jmp 10b854 =============================================================================== 0010c2e8 : rtems_chain_control *chain, rtems_event_set events, rtems_interval timeout, rtems_chain_node **node_ptr ) { 10c2e8: 55 push %ebp 10c2e9: 89 e5 mov %esp,%ebp 10c2eb: 57 push %edi 10c2ec: 56 push %esi 10c2ed: 53 push %ebx 10c2ee: 83 ec 1c sub $0x1c,%esp 10c2f1: 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( 10c2f4: 8d 7d e4 lea -0x1c(%ebp),%edi 10c2f7: 90 nop */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 10c2f8: 83 ec 0c sub $0xc,%esp 10c2fb: 56 push %esi 10c2fc: e8 c3 04 00 00 call 10c7c4 <_Chain_Get> 10c301: 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 10c303: 83 c4 10 add $0x10,%esp 10c306: 85 c0 test %eax,%eax 10c308: 75 22 jne 10c32c ) { rtems_event_set out; sc = rtems_event_receive( 10c30a: 57 push %edi 10c30b: ff 75 10 pushl 0x10(%ebp) 10c30e: 6a 00 push $0x0 10c310: ff 75 0c pushl 0xc(%ebp) 10c313: e8 b4 f3 ff ff call 10b6cc ) { rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( 10c318: 83 c4 10 add $0x10,%esp 10c31b: 85 c0 test %eax,%eax 10c31d: 74 d9 je 10c2f8 <== NEVER TAKEN timeout, &out ); } *node_ptr = node; 10c31f: 8b 55 14 mov 0x14(%ebp),%edx 10c322: 89 1a mov %ebx,(%edx) return sc; } 10c324: 8d 65 f4 lea -0xc(%ebp),%esp 10c327: 5b pop %ebx 10c328: 5e pop %esi 10c329: 5f pop %edi 10c32a: c9 leave 10c32b: c3 ret rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL 10c32c: 31 c0 xor %eax,%eax timeout, &out ); } *node_ptr = node; 10c32e: 8b 55 14 mov 0x14(%ebp),%edx 10c331: 89 1a mov %ebx,(%edx) return sc; } 10c333: 8d 65 f4 lea -0xc(%ebp),%esp 10c336: 5b pop %ebx 10c337: 5e pop %esi 10c338: 5f pop %edi 10c339: c9 leave 10c33a: c3 ret =============================================================================== 0010c33c : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { 10c33c: 55 push %ebp 10c33d: 89 e5 mov %esp,%ebp 10c33f: 56 push %esi 10c340: 53 push %ebx 10c341: 8b 5d 10 mov 0x10(%ebp),%ebx 10c344: 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 ); 10c347: 83 ec 08 sub $0x8,%esp 10c34a: ff 75 0c pushl 0xc(%ebp) 10c34d: ff 75 08 pushl 0x8(%ebp) 10c350: e8 b3 04 00 00 call 10c808 <_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) { 10c355: 83 c4 10 add $0x10,%esp 10c358: 84 c0 test %al,%al 10c35a: 75 0c jne 10c368 sc = rtems_event_send( task, events ); } return sc; } 10c35c: 31 c0 xor %eax,%eax 10c35e: 8d 65 f8 lea -0x8(%ebp),%esp 10c361: 5b pop %ebx 10c362: 5e pop %esi 10c363: c9 leave 10c364: c3 ret 10c365: 8d 76 00 lea 0x0(%esi),%esi { 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 ); 10c368: 89 75 0c mov %esi,0xc(%ebp) 10c36b: 89 5d 08 mov %ebx,0x8(%ebp) } return sc; } 10c36e: 8d 65 f8 lea -0x8(%ebp),%esp 10c371: 5b pop %ebx 10c372: 5e pop %esi 10c373: 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 ); 10c374: e9 db f4 ff ff jmp 10b854 =============================================================================== 00115aa8 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 115aa8: 55 push %ebp 115aa9: 89 e5 mov %esp,%ebp 115aab: 53 push %ebx 115aac: 83 ec 04 sub $0x4,%esp 115aaf: 8b 45 08 mov 0x8(%ebp),%eax 115ab2: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !time_buffer ) 115ab5: 85 db test %ebx,%ebx 115ab7: 74 3b je 115af4 return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 115ab9: 85 c0 test %eax,%eax 115abb: 74 2b je 115ae8 return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 115abd: 83 f8 01 cmp $0x1,%eax 115ac0: 74 3e je 115b00 return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 115ac2: 83 f8 02 cmp $0x2,%eax 115ac5: 74 45 je 115b0c *interval = rtems_clock_get_ticks_since_boot(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 115ac7: 83 f8 03 cmp $0x3,%eax 115aca: 74 4c je 115b18 *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 115acc: 83 f8 04 cmp $0x4,%eax 115acf: 74 0b je 115adc return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; 115ad1: b8 0a 00 00 00 mov $0xa,%eax } 115ad6: 5a pop %edx 115ad7: 5b pop %ebx 115ad8: c9 leave 115ad9: c3 ret 115ada: 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 ); 115adc: 89 5d 08 mov %ebx,0x8(%ebp) return RTEMS_INVALID_NUMBER; } 115adf: 59 pop %ecx 115ae0: 5b pop %ebx 115ae1: 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 ); 115ae2: e9 41 01 00 00 jmp 115c28 115ae7: 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 ); 115ae8: 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; } 115aeb: 58 pop %eax 115aec: 5b pop %ebx 115aed: 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 ); 115aee: e9 81 00 00 00 jmp 115b74 115af3: 90 nop rtems_clock_get_options option, void *time_buffer ) { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 115af4: 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; } 115af9: 5a pop %edx 115afa: 5b pop %ebx 115afb: c9 leave 115afc: c3 ret 115afd: 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); 115b00: 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; } 115b03: 5b pop %ebx 115b04: 5b pop %ebx 115b05: 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); 115b06: e9 19 00 00 00 jmp 115b24 115b0b: 90 nop if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 115b0c: e8 57 00 00 00 call 115b68 115b11: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 115b13: 31 c0 xor %eax,%eax 115b15: eb bf jmp 115ad6 115b17: 90 nop } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 115b18: e8 37 00 00 00 call 115b54 115b1d: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 115b1f: 31 c0 xor %eax,%eax 115b21: eb b3 jmp 115ad6 =============================================================================== 00115c28 : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 115c28: 55 push %ebp 115c29: 89 e5 mov %esp,%ebp 115c2b: 56 push %esi 115c2c: 53 push %ebx 115c2d: 83 ec 10 sub $0x10,%esp 115c30: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !time ) 115c33: 85 db test %ebx,%ebx 115c35: 74 51 je 115c88 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 115c37: 80 3d 24 09 14 00 00 cmpb $0x0,0x140924 115c3e: 75 0c jne 115c4c return RTEMS_NOT_DEFINED; 115c40: b8 0b 00 00 00 mov $0xb,%eax _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 115c45: 8d 65 f8 lea -0x8(%ebp),%esp 115c48: 5b pop %ebx 115c49: 5e pop %esi 115c4a: c9 leave 115c4b: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 115c4c: 9c pushf 115c4d: fa cli 115c4e: 5e pop %esi _TOD_Get( &now ); 115c4f: 83 ec 0c sub $0xc,%esp 115c52: 8d 45 f0 lea -0x10(%ebp),%eax 115c55: 50 push %eax 115c56: e8 e5 42 00 00 call 119f40 <_TOD_Get> _ISR_Enable(level); 115c5b: 56 push %esi 115c5c: 9d popf useconds = (suseconds_t)now.tv_nsec; 115c5d: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 115c60: 8b 45 f0 mov -0x10(%ebp),%eax 115c63: 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; 115c65: b8 d3 4d 62 10 mov $0x10624dd3,%eax 115c6a: f7 e9 imul %ecx 115c6c: 89 d0 mov %edx,%eax 115c6e: c1 f8 06 sar $0x6,%eax 115c71: c1 f9 1f sar $0x1f,%ecx 115c74: 29 c8 sub %ecx,%eax 115c76: 89 43 04 mov %eax,0x4(%ebx) if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; 115c79: 83 c4 10 add $0x10,%esp 115c7c: 31 c0 xor %eax,%eax } 115c7e: 8d 65 f8 lea -0x8(%ebp),%esp 115c81: 5b pop %ebx 115c82: 5e pop %esi 115c83: c9 leave 115c84: c3 ret 115c85: 8d 76 00 lea 0x0(%esi),%esi rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { if ( !time ) return RTEMS_INVALID_ADDRESS; 115c88: b8 09 00 00 00 mov $0x9,%eax 115c8d: eb b6 jmp 115c45 =============================================================================== 0010b21c : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 10b21c: 55 push %ebp 10b21d: 89 e5 mov %esp,%ebp 10b21f: 83 ec 08 sub $0x8,%esp 10b222: 8b 45 08 mov 0x8(%ebp),%eax if ( !uptime ) 10b225: 85 c0 test %eax,%eax 10b227: 74 13 je 10b23c return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 10b229: 83 ec 0c sub $0xc,%esp 10b22c: 50 push %eax 10b22d: e8 a2 15 00 00 call 10c7d4 <_TOD_Get_uptime_as_timespec> return RTEMS_SUCCESSFUL; 10b232: 83 c4 10 add $0x10,%esp 10b235: 31 c0 xor %eax,%eax } 10b237: c9 leave 10b238: c3 ret 10b239: 8d 76 00 lea 0x0(%esi),%esi rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime ) return RTEMS_INVALID_ADDRESS; 10b23c: b8 09 00 00 00 mov $0x9,%eax _TOD_Get_uptime_as_timespec( uptime ); return RTEMS_SUCCESSFUL; } 10b241: c9 leave 10b242: c3 ret =============================================================================== 0010c188 : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 10c188: 55 push %ebp 10c189: 89 e5 mov %esp,%ebp 10c18b: 53 push %ebx 10c18c: 83 ec 14 sub $0x14,%esp 10c18f: 8b 5d 08 mov 0x8(%ebp),%ebx struct timespec newtime; if ( !time_buffer ) 10c192: 85 db test %ebx,%ebx 10c194: 74 66 je 10c1fc return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 10c196: 83 ec 0c sub $0xc,%esp 10c199: 53 push %ebx 10c19a: e8 39 01 00 00 call 10c2d8 <_TOD_Validate> 10c19f: 83 c4 10 add $0x10,%esp 10c1a2: 84 c0 test %al,%al 10c1a4: 75 0a jne 10c1b0 _Thread_Disable_dispatch(); _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; 10c1a6: b8 14 00 00 00 mov $0x14,%eax } 10c1ab: 8b 5d fc mov -0x4(%ebp),%ebx 10c1ae: c9 leave 10c1af: c3 ret if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 10c1b0: 83 ec 0c sub $0xc,%esp 10c1b3: 53 push %ebx 10c1b4: e8 93 00 00 00 call 10c24c <_TOD_To_seconds> 10c1b9: 89 45 f0 mov %eax,-0x10(%ebp) newtime.tv_nsec = time_buffer->ticks * 10c1bc: 8b 43 18 mov 0x18(%ebx),%eax 10c1bf: 0f af 05 6c 52 12 00 imul 0x12526c,%eax 10c1c6: 8d 04 80 lea (%eax,%eax,4),%eax 10c1c9: 8d 04 80 lea (%eax,%eax,4),%eax 10c1cc: 8d 04 80 lea (%eax,%eax,4),%eax 10c1cf: c1 e0 03 shl $0x3,%eax 10c1d2: 89 45 f4 mov %eax,-0xc(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c1d5: a1 70 99 12 00 mov 0x129970,%eax 10c1da: 40 inc %eax 10c1db: a3 70 99 12 00 mov %eax,0x129970 rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 10c1e0: 8d 45 f0 lea -0x10(%ebp),%eax 10c1e3: 89 04 24 mov %eax,(%esp) 10c1e6: e8 81 18 00 00 call 10da6c <_TOD_Set> _Thread_Enable_dispatch(); 10c1eb: e8 94 2e 00 00 call 10f084 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c1f0: 83 c4 10 add $0x10,%esp 10c1f3: 31 c0 xor %eax,%eax } return RTEMS_INVALID_CLOCK; } 10c1f5: 8b 5d fc mov -0x4(%ebp),%ebx 10c1f8: c9 leave 10c1f9: c3 ret 10c1fa: 66 90 xchg %ax,%ax ) { struct timespec newtime; if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 10c1fc: b8 09 00 00 00 mov $0x9,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10c201: 8b 5d fc mov -0x4(%ebp),%ebx 10c204: c9 leave 10c205: c3 ret =============================================================================== 0010b018 : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { 10b018: 55 push %ebp 10b019: 89 e5 mov %esp,%ebp 10b01b: 83 ec 08 sub $0x8,%esp _TOD_Tickle_ticks(); 10b01e: e8 65 14 00 00 call 10c488 <_TOD_Tickle_ticks> */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); 10b023: 83 ec 0c sub $0xc,%esp 10b026: 68 a0 65 12 00 push $0x1265a0 10b02b: e8 84 37 00 00 call 10e7b4 <_Watchdog_Tickle> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 10b030: e8 77 32 00 00 call 10e2ac <_Thread_Tickle_timeslice> * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void ) { return ( _Thread_Dispatch_necessary ); 10b035: a0 64 67 12 00 mov 0x126764,%al if ( _Thread_Is_context_switch_necessary() && 10b03a: 83 c4 10 add $0x10,%esp 10b03d: 84 c0 test %al,%al 10b03f: 74 09 je 10b04a * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); 10b041: a1 d0 64 12 00 mov 0x1264d0,%eax 10b046: 85 c0 test %eax,%eax 10b048: 74 06 je 10b050 _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 10b04a: 31 c0 xor %eax,%eax 10b04c: c9 leave 10b04d: c3 ret 10b04e: 66 90 xchg %ax,%ax _Thread_Tickle_timeslice(); if ( _Thread_Is_context_switch_necessary() && _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); 10b050: e8 2f 27 00 00 call 10d784 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; } 10b055: 31 c0 xor %eax,%eax 10b057: c9 leave 10b058: c3 ret =============================================================================== 0010b1e4 : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { 10b1e4: 55 push %ebp 10b1e5: 89 e5 mov %esp,%ebp 10b1e7: 53 push %ebx 10b1e8: 83 ec 1c sub $0x1c,%esp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); 10b1eb: 8d 45 f4 lea -0xc(%ebp),%eax 10b1ee: 50 push %eax 10b1ef: ff 75 08 pushl 0x8(%ebp) 10b1f2: e8 29 27 00 00 call 10d920 <_Thread_Get> switch ( location ) { 10b1f7: 83 c4 10 add $0x10,%esp 10b1fa: 8b 55 f4 mov -0xc(%ebp),%edx 10b1fd: 85 d2 test %edx,%edx 10b1ff: 75 2b jne 10b22c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 10b201: 8b 90 e4 00 00 00 mov 0xe4(%eax),%edx rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 10b207: 9c pushf 10b208: fa cli 10b209: 59 pop %ecx *the_event_set |= the_new_events; 10b20a: 8b 5d 0c mov 0xc(%ebp),%ebx 10b20d: 09 1a or %ebx,(%edx) _ISR_Enable( level ); 10b20f: 51 push %ecx 10b210: 9d popf _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 10b211: 83 ec 0c sub $0xc,%esp 10b214: 50 push %eax 10b215: e8 1e 00 00 00 call 10b238 <_Event_Surrender> _Thread_Enable_dispatch(); 10b21a: e8 dd 26 00 00 call 10d8fc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b21f: 83 c4 10 add $0x10,%esp 10b222: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b224: 8b 5d fc mov -0x4(%ebp),%ebx 10b227: c9 leave 10b228: c3 ret 10b229: 8d 76 00 lea 0x0(%esi),%esi case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b22c: b8 04 00 00 00 mov $0x4,%eax } 10b231: 8b 5d fc mov -0x4(%ebp),%ebx 10b234: c9 leave 10b235: c3 ret =============================================================================== 0010d044 : #include rtems_status_code rtems_extension_delete( rtems_id id ) { 10d044: 55 push %ebp 10d045: 89 e5 mov %esp,%ebp 10d047: 53 push %ebx 10d048: 83 ec 18 sub $0x18,%esp Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); 10d04b: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) _Objects_Get( &_Extension_Information, id, location ); 10d04e: 50 push %eax 10d04f: ff 75 08 pushl 0x8(%ebp) 10d052: 68 c0 9b 12 00 push $0x129bc0 10d057: e8 58 11 00 00 call 10e1b4 <_Objects_Get> 10d05c: 89 c3 mov %eax,%ebx switch ( location ) { 10d05e: 83 c4 10 add $0x10,%esp 10d061: 8b 55 f4 mov -0xc(%ebp),%edx 10d064: 85 d2 test %edx,%edx 10d066: 75 38 jne 10d0a0 case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 10d068: 83 ec 0c sub $0xc,%esp 10d06b: 8d 40 10 lea 0x10(%eax),%eax 10d06e: 50 push %eax 10d06f: e8 74 28 00 00 call 10f8e8 <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 10d074: 59 pop %ecx 10d075: 58 pop %eax 10d076: 53 push %ebx 10d077: 68 c0 9b 12 00 push $0x129bc0 10d07c: e8 fb 0c 00 00 call 10dd7c <_Objects_Close> RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 10d081: 58 pop %eax 10d082: 5a pop %edx 10d083: 53 push %ebx 10d084: 68 c0 9b 12 00 push $0x129bc0 10d089: e8 e6 0f 00 00 call 10e074 <_Objects_Free> _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 10d08e: e8 71 1c 00 00 call 10ed04 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d093: 83 c4 10 add $0x10,%esp 10d096: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d098: 8b 5d fc mov -0x4(%ebp),%ebx 10d09b: c9 leave 10d09c: c3 ret 10d09d: 8d 76 00 lea 0x0(%esi),%esi #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d0a0: b8 04 00 00 00 mov $0x4,%eax } 10d0a5: 8b 5d fc mov -0x4(%ebp),%ebx 10d0a8: c9 leave 10d0a9: c3 ret =============================================================================== 00112014 : rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112014: 55 push %ebp 112015: 89 e5 mov %esp,%ebp 112017: 53 push %ebx 112018: 83 ec 04 sub $0x4,%esp 11201b: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 11201e: 39 05 60 68 12 00 cmp %eax,0x126860 112024: 76 1a jbe 112040 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; 112026: 8d 14 40 lea (%eax,%eax,2),%edx 112029: c1 e2 03 shl $0x3,%edx 11202c: 03 15 64 68 12 00 add 0x126864,%edx 112032: 8b 52 08 mov 0x8(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112035: 85 d2 test %edx,%edx 112037: 74 13 je 11204c } 112039: 59 pop %ecx 11203a: 5b pop %ebx 11203b: 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; 11203c: ff e2 jmp *%edx 11203e: 66 90 xchg %ax,%ax ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 112040: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112045: 5a pop %edx 112046: 5b pop %ebx 112047: c9 leave 112048: c3 ret 112049: 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; 11204c: 31 c0 xor %eax,%eax } 11204e: 5a pop %edx 11204f: 5b pop %ebx 112050: c9 leave 112051: c3 ret =============================================================================== 00112054 : rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112054: 55 push %ebp 112055: 89 e5 mov %esp,%ebp 112057: 53 push %ebx 112058: 83 ec 04 sub $0x4,%esp 11205b: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 11205e: 39 05 60 68 12 00 cmp %eax,0x126860 112064: 76 1a jbe 112080 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; 112066: 8d 14 40 lea (%eax,%eax,2),%edx 112069: c1 e2 03 shl $0x3,%edx 11206c: 03 15 64 68 12 00 add 0x126864,%edx 112072: 8b 52 14 mov 0x14(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112075: 85 d2 test %edx,%edx 112077: 74 13 je 11208c } 112079: 59 pop %ecx 11207a: 5b pop %ebx 11207b: 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; 11207c: ff e2 jmp *%edx 11207e: 66 90 xchg %ax,%ax ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 112080: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112085: 5a pop %edx 112086: 5b pop %ebx 112087: c9 leave 112088: c3 ret 112089: 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; 11208c: 31 c0 xor %eax,%eax } 11208e: 5a pop %edx 11208f: 5b pop %ebx 112090: c9 leave 112091: c3 ret =============================================================================== 00110558 : rtems_status_code rtems_io_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 110558: 55 push %ebp 110559: 89 e5 mov %esp,%ebp 11055b: 53 push %ebx 11055c: 83 ec 04 sub $0x4,%esp 11055f: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 110562: 39 05 60 68 12 00 cmp %eax,0x126860 110568: 76 1a jbe 110584 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; 11056a: 8d 14 40 lea (%eax,%eax,2),%edx 11056d: c1 e2 03 shl $0x3,%edx 110570: 03 15 64 68 12 00 add 0x126864,%edx 110576: 8b 12 mov (%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 110578: 85 d2 test %edx,%edx 11057a: 74 14 je 110590 } 11057c: 59 pop %ecx 11057d: 5b pop %ebx 11057e: 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; 11057f: ff e2 jmp *%edx 110581: 8d 76 00 lea 0x0(%esi),%esi ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 110584: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 110589: 5a pop %edx 11058a: 5b pop %ebx 11058b: c9 leave 11058c: c3 ret 11058d: 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; 110590: 31 c0 xor %eax,%eax } 110592: 5a pop %edx 110593: 5b pop %ebx 110594: c9 leave 110595: c3 ret =============================================================================== 00112094 : rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112094: 55 push %ebp 112095: 89 e5 mov %esp,%ebp 112097: 53 push %ebx 112098: 83 ec 04 sub $0x4,%esp 11209b: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 11209e: 39 05 60 68 12 00 cmp %eax,0x126860 1120a4: 76 1a jbe 1120c0 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; 1120a6: 8d 14 40 lea (%eax,%eax,2),%edx 1120a9: c1 e2 03 shl $0x3,%edx 1120ac: 03 15 64 68 12 00 add 0x126864,%edx 1120b2: 8b 52 04 mov 0x4(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 1120b5: 85 d2 test %edx,%edx 1120b7: 74 13 je 1120cc } 1120b9: 59 pop %ecx 1120ba: 5b pop %ebx 1120bb: 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; 1120bc: ff e2 jmp *%edx 1120be: 66 90 xchg %ax,%ax ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 1120c0: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 1120c5: 5a pop %edx 1120c6: 5b pop %ebx 1120c7: c9 leave 1120c8: c3 ret 1120c9: 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; 1120cc: 31 c0 xor %eax,%eax } 1120ce: 5a pop %edx 1120cf: 5b pop %ebx 1120d0: c9 leave 1120d1: c3 ret =============================================================================== 001120d4 : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 1120d4: 55 push %ebp 1120d5: 89 e5 mov %esp,%ebp 1120d7: 53 push %ebx 1120d8: 83 ec 04 sub $0x4,%esp 1120db: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 1120de: 39 05 60 68 12 00 cmp %eax,0x126860 1120e4: 76 1a jbe 112100 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; 1120e6: 8d 14 40 lea (%eax,%eax,2),%edx 1120e9: c1 e2 03 shl $0x3,%edx 1120ec: 03 15 64 68 12 00 add 0x126864,%edx 1120f2: 8b 52 0c mov 0xc(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 1120f5: 85 d2 test %edx,%edx 1120f7: 74 13 je 11210c } 1120f9: 59 pop %ecx 1120fa: 5b pop %ebx 1120fb: 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; 1120fc: ff e2 jmp *%edx 1120fe: 66 90 xchg %ax,%ax ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 112100: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112105: 5a pop %edx 112106: 5b pop %ebx 112107: c9 leave 112108: c3 ret 112109: 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; 11210c: 31 c0 xor %eax,%eax } 11210e: 5a pop %edx 11210f: 5b pop %ebx 112110: c9 leave 112111: c3 ret =============================================================================== 0010cf14 : 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 ) { 10cf14: 55 push %ebp 10cf15: 89 e5 mov %esp,%ebp 10cf17: 57 push %edi 10cf18: 56 push %esi 10cf19: 53 push %ebx 10cf1a: 83 ec 0c sub $0xc,%esp 10cf1d: 8b 5d 08 mov 0x8(%ebp),%ebx 10cf20: 8b 75 0c mov 0xc(%ebp),%esi 10cf23: 8b 55 10 mov 0x10(%ebp),%edx rtems_device_major_number major_limit = _IO_Number_of_drivers; 10cf26: a1 60 ac 12 00 mov 0x12ac60,%eax if ( rtems_interrupt_is_in_progress() ) 10cf2b: 8b 0d 54 ab 12 00 mov 0x12ab54,%ecx 10cf31: 85 c9 test %ecx,%ecx 10cf33: 0f 85 ab 00 00 00 jne 10cfe4 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 10cf39: 85 d2 test %edx,%edx 10cf3b: 0f 84 e7 00 00 00 je 10d028 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 10cf41: 89 02 mov %eax,(%edx) if ( driver_table == NULL ) 10cf43: 85 f6 test %esi,%esi 10cf45: 0f 84 dd 00 00 00 je 10d028 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cf4b: 8b 3e mov (%esi),%edi 10cf4d: 85 ff test %edi,%edi 10cf4f: 0f 84 c7 00 00 00 je 10d01c return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10cf55: 39 d8 cmp %ebx,%eax 10cf57: 76 7b jbe 10cfd4 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10cf59: a1 d0 a8 12 00 mov 0x12a8d0,%eax 10cf5e: 40 inc %eax 10cf5f: a3 d0 a8 12 00 mov %eax,0x12a8d0 return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 10cf64: 85 db test %ebx,%ebx 10cf66: 0f 85 88 00 00 00 jne 10cff4 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 10cf6c: 8b 0d 60 ac 12 00 mov 0x12ac60,%ecx rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 10cf72: 85 c9 test %ecx,%ecx 10cf74: 0f 84 bb 00 00 00 je 10d035 <== NEVER TAKEN 10cf7a: 8b 3d 64 ac 12 00 mov 0x12ac64,%edi 10cf80: 89 f8 mov %edi,%eax 10cf82: eb 08 jmp 10cf8c 10cf84: 43 inc %ebx 10cf85: 83 c0 18 add $0x18,%eax 10cf88: 39 d9 cmp %ebx,%ecx 10cf8a: 76 0b jbe 10cf97 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cf8c: 83 38 00 cmpl $0x0,(%eax) 10cf8f: 75 f3 jne 10cf84 10cf91: 83 78 04 00 cmpl $0x0,0x4(%eax) 10cf95: 75 ed jne 10cf84 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10cf97: 89 1a mov %ebx,(%edx) if ( m != n ) 10cf99: 39 d9 cmp %ebx,%ecx 10cf9b: 0f 84 9b 00 00 00 je 10d03c 10cfa1: 8d 04 5b lea (%ebx,%ebx,2),%eax 10cfa4: c1 e0 03 shl $0x3,%eax } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 10cfa7: 01 c7 add %eax,%edi 10cfa9: b9 06 00 00 00 mov $0x6,%ecx 10cfae: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10cfb0: e8 73 1c 00 00 call 10ec28 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 10cfb5: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10cfbc: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10cfc3: 89 5d 08 mov %ebx,0x8(%ebp) } 10cfc6: 83 c4 0c add $0xc,%esp 10cfc9: 5b pop %ebx 10cfca: 5e pop %esi 10cfcb: 5f pop %edi 10cfcc: c9 leave _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10cfcd: e9 42 73 00 00 jmp 114314 10cfd2: 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; 10cfd4: 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 ); } 10cfd9: 83 c4 0c add $0xc,%esp 10cfdc: 5b pop %ebx 10cfdd: 5e pop %esi 10cfde: 5f pop %edi 10cfdf: c9 leave 10cfe0: c3 ret 10cfe1: 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; 10cfe4: 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 ); } 10cfe9: 83 c4 0c add $0xc,%esp 10cfec: 5b pop %ebx 10cfed: 5e pop %esi 10cfee: 5f pop %edi 10cfef: c9 leave 10cff0: c3 ret 10cff1: 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; 10cff4: 8d 04 5b lea (%ebx,%ebx,2),%eax 10cff7: c1 e0 03 shl $0x3,%eax 10cffa: 8b 0d 64 ac 12 00 mov 0x12ac64,%ecx 10d000: 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; 10d002: 8b 39 mov (%ecx),%edi 10d004: 85 ff test %edi,%edi 10d006: 74 40 je 10d048 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(); 10d008: e8 1b 1c 00 00 call 10ec28 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 10d00d: 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 ); } 10d012: 83 c4 0c add $0xc,%esp 10d015: 5b pop %ebx 10d016: 5e pop %esi 10d017: 5f pop %edi 10d018: c9 leave 10d019: c3 ret 10d01a: 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; 10d01c: 8b 4e 04 mov 0x4(%esi),%ecx 10d01f: 85 c9 test %ecx,%ecx 10d021: 0f 85 2e ff ff ff jne 10cf55 10d027: 90 nop if ( driver_table == NULL ) return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; 10d028: 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 ); } 10d02d: 83 c4 0c add $0xc,%esp 10d030: 5b pop %ebx 10d031: 5e pop %esi 10d032: 5f pop %edi 10d033: c9 leave 10d034: c3 ret if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10d035: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED 10d03b: 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(); 10d03c: e8 e7 1b 00 00 call 10ec28 <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; 10d041: 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; 10d046: eb 91 jmp 10cfd9 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d048: 8b 49 04 mov 0x4(%ecx),%ecx 10d04b: 85 c9 test %ecx,%ecx 10d04d: 75 b9 jne 10d008 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 10d04f: 89 1a mov %ebx,(%edx) 10d051: 8b 3d 64 ac 12 00 mov 0x12ac64,%edi 10d057: e9 4b ff ff ff jmp 10cfa7 =============================================================================== 0010d05c : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 10d05c: 55 push %ebp 10d05d: 89 e5 mov %esp,%ebp 10d05f: 57 push %edi 10d060: 83 ec 04 sub $0x4,%esp 10d063: 8b 45 08 mov 0x8(%ebp),%eax if ( rtems_interrupt_is_in_progress() ) 10d066: 8b 0d 54 ab 12 00 mov 0x12ab54,%ecx 10d06c: 85 c9 test %ecx,%ecx 10d06e: 75 44 jne 10d0b4 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 10d070: 39 05 60 ac 12 00 cmp %eax,0x12ac60 10d076: 77 0c ja 10d084 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; 10d078: b8 0d 00 00 00 mov $0xd,%eax } 10d07d: 5a pop %edx 10d07e: 5f pop %edi 10d07f: c9 leave 10d080: c3 ret 10d081: 8d 76 00 lea 0x0(%esi),%esi 10d084: 8b 15 d0 a8 12 00 mov 0x12a8d0,%edx 10d08a: 42 inc %edx 10d08b: 89 15 d0 a8 12 00 mov %edx,0x12a8d0 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( &_IO_Driver_address_table[major], 10d091: 8d 14 40 lea (%eax,%eax,2),%edx 10d094: 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( 10d097: 03 15 64 ac 12 00 add 0x12ac64,%edx 10d09d: b9 18 00 00 00 mov $0x18,%ecx 10d0a2: 31 c0 xor %eax,%eax 10d0a4: 89 d7 mov %edx,%edi 10d0a6: f3 aa rep stos %al,%es:(%edi) &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 10d0a8: e8 7b 1b 00 00 call 10ec28 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d0ad: 31 c0 xor %eax,%eax } return RTEMS_UNSATISFIED; } 10d0af: 5a pop %edx 10d0b0: 5f pop %edi 10d0b1: c9 leave 10d0b2: c3 ret 10d0b3: 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; 10d0b4: b8 12 00 00 00 mov $0x12,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d0b9: 5a pop %edx 10d0ba: 5f pop %edi 10d0bb: c9 leave 10d0bc: c3 ret =============================================================================== 00112114 : rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112114: 55 push %ebp 112115: 89 e5 mov %esp,%ebp 112117: 53 push %ebx 112118: 83 ec 04 sub $0x4,%esp 11211b: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 11211e: 39 05 60 68 12 00 cmp %eax,0x126860 112124: 76 1a jbe 112140 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; 112126: 8d 14 40 lea (%eax,%eax,2),%edx 112129: c1 e2 03 shl $0x3,%edx 11212c: 03 15 64 68 12 00 add 0x126864,%edx 112132: 8b 52 10 mov 0x10(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112135: 85 d2 test %edx,%edx 112137: 74 13 je 11214c } 112139: 59 pop %ecx 11213a: 5b pop %ebx 11213b: 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; 11213c: ff e2 jmp *%edx 11213e: 66 90 xchg %ax,%ax ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 112140: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 112145: 5a pop %edx 112146: 5b pop %ebx 112147: c9 leave 112148: c3 ret 112149: 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; 11214c: 31 c0 xor %eax,%eax } 11214e: 5a pop %edx 11214f: 5b pop %ebx 112150: c9 leave 112151: c3 ret =============================================================================== 0010df48 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10df48: 55 push %ebp 10df49: 89 e5 mov %esp,%ebp 10df4b: 57 push %edi 10df4c: 56 push %esi 10df4d: 53 push %ebx 10df4e: 83 ec 1c sub $0x1c,%esp 10df51: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10df54: 85 ff test %edi,%edi 10df56: 74 4d je 10dfa5 <== NEVER TAKEN 10df58: 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 ] ) 10df5f: 8b 55 e4 mov -0x1c(%ebp),%edx 10df62: 8b 04 95 48 99 12 00 mov 0x129948(,%edx,4),%eax 10df69: 85 c0 test %eax,%eax 10df6b: 74 2f je 10df9c continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; 10df6d: 8b 70 04 mov 0x4(%eax),%esi if ( !information ) 10df70: 85 f6 test %esi,%esi 10df72: 74 28 je 10df9c continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10df74: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 10df79: 74 21 je 10df9c <== NEVER TAKEN 10df7b: bb 01 00 00 00 mov $0x1,%ebx the_thread = (Thread_Control *)information->local_table[ i ]; 10df80: 8b 46 1c mov 0x1c(%esi),%eax 10df83: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !the_thread ) 10df86: 85 c0 test %eax,%eax 10df88: 74 09 je 10df93 <== NEVER TAKEN continue; (*routine)(the_thread); 10df8a: 83 ec 0c sub $0xc,%esp 10df8d: 50 push %eax 10df8e: ff d7 call *%edi 10df90: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10df93: 43 inc %ebx 10df94: 0f b7 46 10 movzwl 0x10(%esi),%eax 10df98: 39 d8 cmp %ebx,%eax 10df9a: 73 e4 jae 10df80 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10df9c: ff 45 e4 incl -0x1c(%ebp) 10df9f: 83 7d e4 04 cmpl $0x4,-0x1c(%ebp) 10dfa3: 75 ba jne 10df5f (*routine)(the_thread); } } } 10dfa5: 8d 65 f4 lea -0xc(%ebp),%esp 10dfa8: 5b pop %ebx 10dfa9: 5e pop %esi 10dfaa: 5f pop %edi 10dfab: c9 leave 10dfac: c3 ret =============================================================================== 00116404 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 116404: 55 push %ebp 116405: 89 e5 mov %esp,%ebp 116407: 57 push %edi 116408: 56 push %esi 116409: 53 push %ebx 11640a: 83 ec 1c sub $0x1c,%esp 11640d: 8b 7d 08 mov 0x8(%ebp),%edi 116410: 8b 5d 0c mov 0xc(%ebp),%ebx 116413: 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 ) 116416: 85 db test %ebx,%ebx 116418: 74 62 je 11647c return RTEMS_INVALID_ADDRESS; if ( !count ) 11641a: 85 f6 test %esi,%esi 11641c: 74 5e je 11647c Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 11641e: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 11641f: 8d 45 e4 lea -0x1c(%ebp),%eax 116422: 50 push %eax 116423: 57 push %edi 116424: 68 20 0c 14 00 push $0x140c20 116429: e8 d2 4d 00 00 call 11b200 <_Objects_Get> switch ( location ) { 11642e: 83 c4 10 add $0x10,%esp 116431: 8b 55 e4 mov -0x1c(%ebp),%edx 116434: 85 d2 test %edx,%edx 116436: 74 10 je 116448 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116438: b8 04 00 00 00 mov $0x4,%eax } 11643d: 8d 65 f4 lea -0xc(%ebp),%esp 116440: 5b pop %ebx 116441: 5e pop %esi 116442: 5f pop %edi 116443: c9 leave 116444: c3 ret 116445: 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( 116448: 83 ec 08 sub $0x8,%esp 11644b: 56 push %esi 11644c: 6a 00 push $0x0 11644e: 57 push %edi 11644f: ff 75 10 pushl 0x10(%ebp) 116452: 53 push %ebx 116453: 83 c0 14 add $0x14,%eax 116456: 50 push %eax 116457: e8 7c 34 00 00 call 1198d8 <_CORE_message_queue_Broadcast> 11645c: 89 c3 mov %eax,%ebx NULL, #endif count ); _Thread_Enable_dispatch(); 11645e: 83 c4 20 add $0x20,%esp 116461: e8 ea 58 00 00 call 11bd50 <_Thread_Enable_dispatch> return 116466: 83 ec 0c sub $0xc,%esp 116469: 53 push %ebx 11646a: e8 69 03 00 00 call 1167d8 <_Message_queue_Translate_core_message_queue_return_code> 11646f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116472: 8d 65 f4 lea -0xc(%ebp),%esp 116475: 5b pop %ebx 116476: 5e pop %esi 116477: 5f pop %edi 116478: c9 leave 116479: c3 ret 11647a: 66 90 xchg %ax,%ax if ( !buffer ) return RTEMS_INVALID_ADDRESS; if ( !count ) return RTEMS_INVALID_ADDRESS; 11647c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116481: 8d 65 f4 lea -0xc(%ebp),%esp 116484: 5b pop %ebx 116485: 5e pop %esi 116486: 5f pop %edi 116487: c9 leave 116488: c3 ret =============================================================================== 001138a0 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { 1138a0: 55 push %ebp 1138a1: 89 e5 mov %esp,%ebp 1138a3: 57 push %edi 1138a4: 56 push %esi 1138a5: 53 push %ebx 1138a6: 83 ec 2c sub $0x2c,%esp 1138a9: 8b 5d 08 mov 0x8(%ebp),%ebx 1138ac: 8b 75 0c mov 0xc(%ebp),%esi 1138af: 8b 4d 10 mov 0x10(%ebp),%ecx 1138b2: 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 ) ) 1138b5: 85 db test %ebx,%ebx 1138b7: 74 2f je 1138e8 return RTEMS_INVALID_NAME; if ( !id ) 1138b9: 85 ff test %edi,%edi 1138bb: 0f 84 a3 00 00 00 je 113964 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 1138c1: 85 f6 test %esi,%esi 1138c3: 74 13 je 1138d8 return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 1138c5: 85 c9 test %ecx,%ecx 1138c7: 75 2f jne 1138f8 return RTEMS_INVALID_SIZE; 1138c9: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1138ce: 8d 65 f4 lea -0xc(%ebp),%esp 1138d1: 5b pop %ebx 1138d2: 5e pop %esi 1138d3: 5f pop %edi 1138d4: c9 leave 1138d5: c3 ret 1138d6: 66 90 xchg %ax,%ax !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) return RTEMS_INVALID_NUMBER; 1138d8: b8 0a 00 00 00 mov $0xa,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1138dd: 8d 65 f4 lea -0xc(%ebp),%esp 1138e0: 5b pop %ebx 1138e1: 5e pop %esi 1138e2: 5f pop %edi 1138e3: c9 leave 1138e4: c3 ret 1138e5: 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; 1138e8: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1138ed: 8d 65 f4 lea -0xc(%ebp),%esp 1138f0: 5b pop %ebx 1138f1: 5e pop %esi 1138f2: 5f pop %edi 1138f3: c9 leave 1138f4: c3 ret 1138f5: 8d 76 00 lea 0x0(%esi),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1138f8: a1 90 f6 12 00 mov 0x12f690,%eax 1138fd: 40 inc %eax 1138fe: a3 90 f6 12 00 mov %eax,0x12f690 #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 113903: 89 4d d4 mov %ecx,-0x2c(%ebp) 113906: e8 75 54 00 00 call 118d80 <_Message_queue_Allocate> 11390b: 89 c2 mov %eax,%edx if ( !the_message_queue ) { 11390d: 85 c0 test %eax,%eax 11390f: 8b 4d d4 mov -0x2c(%ebp),%ecx 113912: 74 7c je 113990 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 113914: 8b 45 14 mov 0x14(%ebp),%eax 113917: 89 42 10 mov %eax,0x10(%edx) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 11391a: a8 04 test $0x4,%al 11391c: 0f 95 c0 setne %al 11391f: 0f b6 c0 movzbl %al,%eax 113922: 89 45 e4 mov %eax,-0x1c(%ebp) else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 113925: 51 push %ecx 113926: 56 push %esi 113927: 8d 45 e4 lea -0x1c(%ebp),%eax 11392a: 50 push %eax 11392b: 8d 42 14 lea 0x14(%edx),%eax 11392e: 50 push %eax 11392f: 89 55 d4 mov %edx,-0x2c(%ebp) 113932: e8 e1 10 00 00 call 114a18 <_CORE_message_queue_Initialize> 113937: 83 c4 10 add $0x10,%esp 11393a: 84 c0 test %al,%al 11393c: 8b 55 d4 mov -0x2c(%ebp),%edx 11393f: 75 2f jne 113970 */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 113941: 83 ec 08 sub $0x8,%esp 113944: 52 push %edx 113945: 68 a0 f9 12 00 push $0x12f9a0 11394a: e8 79 1e 00 00 call 1157c8 <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 11394f: e8 84 2b 00 00 call 1164d8 <_Thread_Enable_dispatch> return RTEMS_UNSATISFIED; 113954: 83 c4 10 add $0x10,%esp 113957: b8 0d 00 00 00 mov $0xd,%eax 11395c: e9 6d ff ff ff jmp 1138ce 113961: 8d 76 00 lea 0x0(%esi),%esi if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 113964: b8 09 00 00 00 mov $0x9,%eax 113969: e9 60 ff ff ff jmp 1138ce 11396e: 66 90 xchg %ax,%ax Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 113970: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 113973: 0f b7 f0 movzwl %ax,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 113976: 8b 0d bc f9 12 00 mov 0x12f9bc,%ecx 11397c: 89 14 b1 mov %edx,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 11397f: 89 5a 0c mov %ebx,0xc(%edx) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 113982: 89 07 mov %eax,(%edi) name, 0 ); #endif _Thread_Enable_dispatch(); 113984: e8 4f 2b 00 00 call 1164d8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 113989: 31 c0 xor %eax,%eax 11398b: e9 3e ff ff ff jmp 1138ce _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); if ( !the_message_queue ) { _Thread_Enable_dispatch(); 113990: e8 43 2b 00 00 call 1164d8 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 113995: b8 05 00 00 00 mov $0x5,%eax 11399a: e9 2f ff ff ff jmp 1138ce =============================================================================== 0011658c : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 11658c: 55 push %ebp 11658d: 89 e5 mov %esp,%ebp 11658f: 53 push %ebx 116590: 83 ec 18 sub $0x18,%esp register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); 116593: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 116596: 50 push %eax 116597: ff 75 08 pushl 0x8(%ebp) 11659a: 68 20 0c 14 00 push $0x140c20 11659f: e8 5c 4c 00 00 call 11b200 <_Objects_Get> 1165a4: 89 c3 mov %eax,%ebx switch ( location ) { 1165a6: 83 c4 10 add $0x10,%esp 1165a9: 8b 4d f4 mov -0xc(%ebp),%ecx 1165ac: 85 c9 test %ecx,%ecx 1165ae: 75 3c jne 1165ec case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 1165b0: 83 ec 08 sub $0x8,%esp 1165b3: 50 push %eax 1165b4: 68 20 0c 14 00 push $0x140c20 1165b9: e8 ce 47 00 00 call 11ad8c <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 1165be: 83 c4 0c add $0xc,%esp 1165c1: 6a 05 push $0x5 1165c3: 6a 00 push $0x0 1165c5: 8d 43 14 lea 0x14(%ebx),%eax 1165c8: 50 push %eax 1165c9: e8 8e 33 00 00 call 11995c <_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 ); 1165ce: 58 pop %eax 1165cf: 5a pop %edx 1165d0: 53 push %ebx 1165d1: 68 20 0c 14 00 push $0x140c20 1165d6: e8 a9 4a 00 00 call 11b084 <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 1165db: e8 70 57 00 00 call 11bd50 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1165e0: 83 c4 10 add $0x10,%esp 1165e3: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1165e5: 8b 5d fc mov -0x4(%ebp),%ebx 1165e8: c9 leave 1165e9: c3 ret 1165ea: 66 90 xchg %ax,%ax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1165ec: b8 04 00 00 00 mov $0x4,%eax } 1165f1: 8b 5d fc mov -0x4(%ebp),%ebx 1165f4: c9 leave 1165f5: c3 ret =============================================================================== 001165f8 : rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { 1165f8: 55 push %ebp 1165f9: 89 e5 mov %esp,%ebp 1165fb: 53 push %ebx 1165fc: 83 ec 14 sub $0x14,%esp 1165ff: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116602: 85 db test %ebx,%ebx 116604: 74 46 je 11664c Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 116606: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 116607: 8d 45 f4 lea -0xc(%ebp),%eax 11660a: 50 push %eax 11660b: ff 75 08 pushl 0x8(%ebp) 11660e: 68 20 0c 14 00 push $0x140c20 116613: e8 e8 4b 00 00 call 11b200 <_Objects_Get> switch ( location ) { 116618: 83 c4 10 add $0x10,%esp 11661b: 8b 55 f4 mov -0xc(%ebp),%edx 11661e: 85 d2 test %edx,%edx 116620: 74 0a je 11662c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116622: b8 04 00 00 00 mov $0x4,%eax } 116627: 8b 5d fc mov -0x4(%ebp),%ebx 11662a: c9 leave 11662b: 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 ); 11662c: 83 ec 0c sub $0xc,%esp 11662f: 83 c0 14 add $0x14,%eax 116632: 50 push %eax 116633: e8 60 33 00 00 call 119998 <_CORE_message_queue_Flush> 116638: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 11663a: e8 11 57 00 00 call 11bd50 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11663f: 83 c4 10 add $0x10,%esp 116642: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116644: 8b 5d fc mov -0x4(%ebp),%ebx 116647: c9 leave 116648: c3 ret 116649: 8d 76 00 lea 0x0(%esi),%esi { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) return RTEMS_INVALID_ADDRESS; 11664c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116651: 8b 5d fc mov -0x4(%ebp),%ebx 116654: c9 leave 116655: c3 ret =============================================================================== 00116658 : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { 116658: 55 push %ebp 116659: 89 e5 mov %esp,%ebp 11665b: 53 push %ebx 11665c: 83 ec 14 sub $0x14,%esp 11665f: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116662: 85 db test %ebx,%ebx 116664: 74 3a je 1166a0 116666: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 116667: 8d 45 f4 lea -0xc(%ebp),%eax 11666a: 50 push %eax 11666b: ff 75 08 pushl 0x8(%ebp) 11666e: 68 20 0c 14 00 push $0x140c20 116673: e8 88 4b 00 00 call 11b200 <_Objects_Get> switch ( location ) { 116678: 83 c4 10 add $0x10,%esp 11667b: 8b 55 f4 mov -0xc(%ebp),%edx 11667e: 85 d2 test %edx,%edx 116680: 74 0a je 11668c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116682: b8 04 00 00 00 mov $0x4,%eax } 116687: 8b 5d fc mov -0x4(%ebp),%ebx 11668a: c9 leave 11668b: 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; 11668c: 8b 40 5c mov 0x5c(%eax),%eax 11668f: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 116691: e8 ba 56 00 00 call 11bd50 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116696: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116698: 8b 5d fc mov -0x4(%ebp),%ebx 11669b: c9 leave 11669c: c3 ret 11669d: 8d 76 00 lea 0x0(%esi),%esi { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) return RTEMS_INVALID_ADDRESS; 1166a0: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1166a5: 8b 5d fc mov -0x4(%ebp),%ebx 1166a8: c9 leave 1166a9: c3 ret =============================================================================== 001139c4 : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 1139c4: 55 push %ebp 1139c5: 89 e5 mov %esp,%ebp 1139c7: 56 push %esi 1139c8: 53 push %ebx 1139c9: 83 ec 10 sub $0x10,%esp 1139cc: 8b 5d 0c mov 0xc(%ebp),%ebx 1139cf: 8b 75 10 mov 0x10(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 1139d2: 85 db test %ebx,%ebx 1139d4: 74 6e je 113a44 return RTEMS_INVALID_ADDRESS; if ( !size ) 1139d6: 85 f6 test %esi,%esi 1139d8: 74 6a je 113a44 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 1139da: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 1139db: 8d 45 f4 lea -0xc(%ebp),%eax 1139de: 50 push %eax 1139df: ff 75 08 pushl 0x8(%ebp) 1139e2: 68 a0 f9 12 00 push $0x12f9a0 1139e7: e8 1c 1f 00 00 call 115908 <_Objects_Get> switch ( location ) { 1139ec: 83 c4 10 add $0x10,%esp 1139ef: 8b 55 f4 mov -0xc(%ebp),%edx 1139f2: 85 d2 test %edx,%edx 1139f4: 75 42 jne 113a38 if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 1139f6: 83 ec 08 sub $0x8,%esp 1139f9: 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; 1139fc: 8b 55 14 mov 0x14(%ebp),%edx 1139ff: 83 e2 01 and $0x1,%edx 113a02: 83 f2 01 xor $0x1,%edx 113a05: 52 push %edx 113a06: 56 push %esi 113a07: 53 push %ebx 113a08: ff 70 08 pushl 0x8(%eax) 113a0b: 83 c0 14 add $0x14,%eax 113a0e: 50 push %eax 113a0f: e8 a4 10 00 00 call 114ab8 <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 113a14: 83 c4 20 add $0x20,%esp 113a17: e8 bc 2a 00 00 call 1164d8 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 113a1c: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code 113a1f: a1 18 f9 12 00 mov 0x12f918,%eax size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 113a24: ff 70 34 pushl 0x34(%eax) 113a27: e8 a0 00 00 00 call 113acc <_Message_queue_Translate_core_message_queue_return_code> 113a2c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113a2f: 8d 65 f8 lea -0x8(%ebp),%esp 113a32: 5b pop %ebx 113a33: 5e pop %esi 113a34: c9 leave 113a35: c3 ret 113a36: 66 90 xchg %ax,%ax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 113a38: b8 04 00 00 00 mov $0x4,%eax } 113a3d: 8d 65 f8 lea -0x8(%ebp),%esp 113a40: 5b pop %ebx 113a41: 5e pop %esi 113a42: c9 leave 113a43: c3 ret if ( !buffer ) return RTEMS_INVALID_ADDRESS; if ( !size ) return RTEMS_INVALID_ADDRESS; 113a44: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113a49: 8d 65 f8 lea -0x8(%ebp),%esp 113a4c: 5b pop %ebx 113a4d: 5e pop %esi 113a4e: c9 leave 113a4f: c3 ret =============================================================================== 0010b3f0 : rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { 10b3f0: 55 push %ebp 10b3f1: 89 e5 mov %esp,%ebp 10b3f3: 56 push %esi 10b3f4: 53 push %ebx 10b3f5: 83 ec 10 sub $0x10,%esp 10b3f8: 8b 75 08 mov 0x8(%ebp),%esi 10b3fb: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10b3fe: 85 db test %ebx,%ebx 10b400: 74 5e je 10b460 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 10b402: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 10b403: 8d 45 f4 lea -0xc(%ebp),%eax 10b406: 50 push %eax 10b407: 56 push %esi 10b408: 68 e0 67 12 00 push $0x1267e0 10b40d: e8 9a 19 00 00 call 10cdac <_Objects_Get> switch ( location ) { 10b412: 83 c4 10 add $0x10,%esp 10b415: 8b 55 f4 mov -0xc(%ebp),%edx 10b418: 85 d2 test %edx,%edx 10b41a: 74 0c je 10b428 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b41c: b8 04 00 00 00 mov $0x4,%eax } 10b421: 8d 65 f8 lea -0x8(%ebp),%esp 10b424: 5b pop %ebx 10b425: 5e pop %esi 10b426: c9 leave 10b427: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 10b428: 6a 00 push $0x0 10b42a: 6a 00 push $0x0 10b42c: 68 ff ff ff 7f push $0x7fffffff 10b431: 6a 00 push $0x0 10b433: 56 push %esi 10b434: ff 75 10 pushl 0x10(%ebp) 10b437: 53 push %ebx the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_message_queue_Send( 10b438: 83 c0 14 add $0x14,%eax 10b43b: 50 push %eax 10b43c: e8 f3 0b 00 00 call 10c034 <_CORE_message_queue_Submit> 10b441: 89 c3 mov %eax,%ebx MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 10b443: 83 c4 20 add $0x20,%esp 10b446: e8 b1 24 00 00 call 10d8fc <_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); 10b44b: 83 ec 0c sub $0xc,%esp 10b44e: 53 push %ebx 10b44f: e8 18 00 00 00 call 10b46c <_Message_queue_Translate_core_message_queue_return_code> 10b454: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b457: 8d 65 f8 lea -0x8(%ebp),%esp 10b45a: 5b pop %ebx 10b45b: 5e pop %esi 10b45c: c9 leave 10b45d: c3 ret 10b45e: 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; 10b460: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b465: 8d 65 f8 lea -0x8(%ebp),%esp 10b468: 5b pop %ebx 10b469: 5e pop %esi 10b46a: c9 leave 10b46b: c3 ret =============================================================================== 001167e8 : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { 1167e8: 55 push %ebp 1167e9: 89 e5 mov %esp,%ebp 1167eb: 56 push %esi 1167ec: 53 push %ebx 1167ed: 83 ec 10 sub $0x10,%esp 1167f0: 8b 75 08 mov 0x8(%ebp),%esi 1167f3: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 1167f6: 85 db test %ebx,%ebx 1167f8: 74 5e je 116858 1167fa: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 1167fb: 8d 45 f4 lea -0xc(%ebp),%eax 1167fe: 50 push %eax 1167ff: 56 push %esi 116800: 68 20 0c 14 00 push $0x140c20 116805: e8 f6 49 00 00 call 11b200 <_Objects_Get> switch ( location ) { 11680a: 83 c4 10 add $0x10,%esp 11680d: 8b 55 f4 mov -0xc(%ebp),%edx 116810: 85 d2 test %edx,%edx 116812: 74 0c je 116820 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116814: b8 04 00 00 00 mov $0x4,%eax } 116819: 8d 65 f8 lea -0x8(%ebp),%esp 11681c: 5b pop %ebx 11681d: 5e pop %esi 11681e: c9 leave 11681f: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 116820: 6a 00 push $0x0 116822: 6a 00 push $0x0 116824: 68 00 00 00 80 push $0x80000000 116829: 6a 00 push $0x0 11682b: 56 push %esi 11682c: ff 75 10 pushl 0x10(%ebp) 11682f: 53 push %ebx the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_message_queue_Urgent( 116830: 83 c0 14 add $0x14,%eax 116833: 50 push %eax 116834: e8 3b 33 00 00 call 119b74 <_CORE_message_queue_Submit> 116839: 89 c3 mov %eax,%ebx id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 11683b: 83 c4 20 add $0x20,%esp 11683e: e8 0d 55 00 00 call 11bd50 <_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); 116843: 83 ec 0c sub $0xc,%esp 116846: 53 push %ebx 116847: e8 8c ff ff ff call 1167d8 <_Message_queue_Translate_core_message_queue_return_code> 11684c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11684f: 8d 65 f8 lea -0x8(%ebp),%esp 116852: 5b pop %ebx 116853: 5e pop %esi 116854: c9 leave 116855: c3 ret 116856: 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; 116858: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11685d: 8d 65 f8 lea -0x8(%ebp),%esp 116860: 5b pop %ebx 116861: 5e pop %esi 116862: c9 leave 116863: c3 ret =============================================================================== 0010d02c : const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 10d02c: 55 push %ebp 10d02d: 89 e5 mov %esp,%ebp 10d02f: 83 ec 08 sub $0x8,%esp 10d032: 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 ) 10d035: 83 f8 01 cmp $0x1,%eax 10d038: 74 2a je 10d064 api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 10d03a: 83 f8 02 cmp $0x2,%eax 10d03d: 74 09 je 10d048 #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; 10d03f: b8 bb 3a 12 00 mov $0x123abb,%eax class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; } 10d044: c9 leave 10d045: c3 ret 10d046: 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; 10d048: b8 c0 81 12 00 mov $0x1281c0,%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 ); 10d04d: 83 ec 08 sub $0x8,%esp 10d050: ff 75 0c pushl 0xc(%ebp) 10d053: 50 push %eax 10d054: e8 67 4a 00 00 call 111ac0 if ( class_assoc ) 10d059: 83 c4 10 add $0x10,%esp 10d05c: 85 c0 test %eax,%eax 10d05e: 74 0c je 10d06c return class_assoc->name; 10d060: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10d062: c9 leave 10d063: 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; 10d064: b8 a0 81 12 00 mov $0x1281a0,%eax 10d069: eb e2 jmp 10d04d 10d06b: 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"; 10d06c: b8 c3 3a 12 00 mov $0x123ac3,%eax } 10d071: c9 leave 10d072: c3 ret =============================================================================== 0010d074 : }; const char *rtems_object_get_api_name( int api ) { 10d074: 55 push %ebp 10d075: 89 e5 mov %esp,%ebp 10d077: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); 10d07a: ff 75 08 pushl 0x8(%ebp) 10d07d: 68 40 82 12 00 push $0x128240 10d082: e8 39 4a 00 00 call 111ac0 if ( api_assoc ) 10d087: 83 c4 10 add $0x10,%esp 10d08a: 85 c0 test %eax,%eax 10d08c: 74 06 je 10d094 return api_assoc->name; 10d08e: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10d090: c9 leave 10d091: c3 ret 10d092: 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"; 10d094: b8 c3 3a 12 00 mov $0x123ac3,%eax } 10d099: c9 leave 10d09a: c3 ret =============================================================================== 0010d0dc : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 10d0dc: 55 push %ebp 10d0dd: 89 e5 mov %esp,%ebp 10d0df: 57 push %edi 10d0e0: 56 push %esi 10d0e1: 53 push %ebx 10d0e2: 83 ec 0c sub $0xc,%esp 10d0e5: 8b 5d 10 mov 0x10(%ebp),%ebx int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10d0e8: 85 db test %ebx,%ebx 10d0ea: 74 60 je 10d14c return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 10d0ec: 83 ec 08 sub $0x8,%esp 10d0ef: 0f b7 45 0c movzwl 0xc(%ebp),%eax 10d0f3: 50 push %eax 10d0f4: ff 75 08 pushl 0x8(%ebp) 10d0f7: e8 78 1a 00 00 call 10eb74 <_Objects_Get_information> if ( !obj_info ) 10d0fc: 83 c4 10 add $0x10,%esp 10d0ff: 85 c0 test %eax,%eax 10d101: 74 59 je 10d15c return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 10d103: 8b 50 08 mov 0x8(%eax),%edx 10d106: 89 13 mov %edx,(%ebx) info->maximum_id = obj_info->maximum_id; 10d108: 8b 50 0c mov 0xc(%eax),%edx 10d10b: 89 53 04 mov %edx,0x4(%ebx) info->auto_extend = obj_info->auto_extend; 10d10e: 8a 50 12 mov 0x12(%eax),%dl 10d111: 88 53 0c mov %dl,0xc(%ebx) info->maximum = obj_info->maximum; 10d114: 0f b7 70 10 movzwl 0x10(%eax),%esi 10d118: 89 73 08 mov %esi,0x8(%ebx) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10d11b: 85 f6 test %esi,%esi 10d11d: 74 44 je 10d163 <== NEVER TAKEN 10d11f: 8b 78 1c mov 0x1c(%eax),%edi 10d122: b9 01 00 00 00 mov $0x1,%ecx 10d127: b8 01 00 00 00 mov $0x1,%eax 10d12c: 31 d2 xor %edx,%edx 10d12e: 66 90 xchg %ax,%ax if ( !obj_info->local_table[i] ) unallocated++; 10d130: 83 3c 8f 01 cmpl $0x1,(%edi,%ecx,4) 10d134: 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++ ) 10d137: 40 inc %eax 10d138: 89 c1 mov %eax,%ecx 10d13a: 39 c6 cmp %eax,%esi 10d13c: 73 f2 jae 10d130 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 10d13e: 89 53 10 mov %edx,0x10(%ebx) return RTEMS_SUCCESSFUL; 10d141: 31 c0 xor %eax,%eax } 10d143: 8d 65 f4 lea -0xc(%ebp),%esp 10d146: 5b pop %ebx 10d147: 5e pop %esi 10d148: 5f pop %edi 10d149: c9 leave 10d14a: c3 ret 10d14b: 90 nop /* * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; 10d14c: b8 09 00 00 00 mov $0x9,%eax unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 10d151: 8d 65 f4 lea -0xc(%ebp),%esp 10d154: 5b pop %ebx 10d155: 5e pop %esi 10d156: 5f pop %edi 10d157: c9 leave 10d158: c3 ret 10d159: 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; 10d15c: b8 0a 00 00 00 mov $0xa,%eax 10d161: eb e0 jmp 10d143 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++ ) 10d163: 31 d2 xor %edx,%edx <== NOT EXECUTED 10d165: eb d7 jmp 10d13e <== NOT EXECUTED =============================================================================== 0010c568 : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { 10c568: 55 push %ebp 10c569: 89 e5 mov %esp,%ebp 10c56b: 53 push %ebx 10c56c: 83 ec 14 sub $0x14,%esp 10c56f: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10c572: 85 db test %ebx,%ebx 10c574: 74 26 je 10c59c return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); 10c576: 83 ec 08 sub $0x8,%esp 10c579: 8d 45 f4 lea -0xc(%ebp),%eax 10c57c: 50 push %eax 10c57d: ff 75 08 pushl 0x8(%ebp) 10c580: e8 d3 1a 00 00 call 10e058 <_Objects_Id_to_name> *name = name_u.name_u32; 10c585: 8b 55 f4 mov -0xc(%ebp),%edx 10c588: 89 13 mov %edx,(%ebx) return _Status_Object_name_errors_to_status[ status ]; 10c58a: 8b 04 85 2c 24 12 00 mov 0x12242c(,%eax,4),%eax 10c591: 83 c4 10 add $0x10,%esp } 10c594: 8b 5d fc mov -0x4(%ebp),%ebx 10c597: c9 leave 10c598: c3 ret 10c599: 8d 76 00 lea 0x0(%esi),%esi { Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) return RTEMS_INVALID_ADDRESS; 10c59c: 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 ]; } 10c5a1: 8b 5d fc mov -0x4(%ebp),%ebx 10c5a4: c9 leave 10c5a5: c3 ret =============================================================================== 0010d1c0 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 10d1c0: 55 push %ebp 10d1c1: 89 e5 mov %esp,%ebp 10d1c3: 57 push %edi 10d1c4: 56 push %esi 10d1c5: 53 push %ebx 10d1c6: 83 ec 1c sub $0x1c,%esp 10d1c9: 8b 75 08 mov 0x8(%ebp),%esi 10d1cc: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10d1cf: 85 ff test %edi,%edi 10d1d1: 74 61 je 10d234 return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10d1d3: 85 f6 test %esi,%esi 10d1d5: 74 35 je 10d20c information = _Objects_Get_information_id( tmpId ); 10d1d7: 83 ec 0c sub $0xc,%esp 10d1da: 56 push %esi 10d1db: e8 74 19 00 00 call 10eb54 <_Objects_Get_information_id> 10d1e0: 89 c3 mov %eax,%ebx if ( !information ) 10d1e2: 83 c4 10 add $0x10,%esp 10d1e5: 85 c0 test %eax,%eax 10d1e7: 74 16 je 10d1ff return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10d1e9: 50 push %eax 10d1ea: 8d 45 e4 lea -0x1c(%ebp),%eax 10d1ed: 50 push %eax 10d1ee: 56 push %esi 10d1ef: 53 push %ebx 10d1f0: e8 ff 1a 00 00 call 10ecf4 <_Objects_Get> switch ( location ) { 10d1f5: 83 c4 10 add $0x10,%esp 10d1f8: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d1fb: 85 c9 test %ecx,%ecx 10d1fd: 74 19 je 10d218 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d1ff: b8 04 00 00 00 mov $0x4,%eax } 10d204: 8d 65 f4 lea -0xc(%ebp),%esp 10d207: 5b pop %ebx 10d208: 5e pop %esi 10d209: 5f pop %edi 10d20a: c9 leave 10d20b: c3 ret Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10d20c: a1 98 a8 12 00 mov 0x12a898,%eax 10d211: 8b 70 08 mov 0x8(%eax),%esi 10d214: eb c1 jmp 10d1d7 10d216: 66 90 xchg %ax,%ax the_object = _Objects_Get( information, tmpId, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 10d218: 52 push %edx 10d219: 57 push %edi 10d21a: 50 push %eax 10d21b: 53 push %ebx 10d21c: e8 fb 1c 00 00 call 10ef1c <_Objects_Set_name> _Thread_Enable_dispatch(); 10d221: e8 06 27 00 00 call 10f92c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d226: 83 c4 10 add $0x10,%esp 10d229: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d22b: 8d 65 f4 lea -0xc(%ebp),%esp 10d22e: 5b pop %ebx 10d22f: 5e pop %esi 10d230: 5f pop %edi 10d231: c9 leave 10d232: c3 ret 10d233: 90 nop Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; 10d234: b8 09 00 00 00 mov $0x9,%eax 10d239: eb c9 jmp 10d204 =============================================================================== 00116864 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 116864: 55 push %ebp 116865: 89 e5 mov %esp,%ebp 116867: 57 push %edi 116868: 56 push %esi 116869: 53 push %ebx 11686a: 83 ec 1c sub $0x1c,%esp 11686d: 8b 5d 08 mov 0x8(%ebp),%ebx 116870: 8b 75 0c mov 0xc(%ebp),%esi 116873: 8b 55 10 mov 0x10(%ebp),%edx 116876: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 116879: 85 db test %ebx,%ebx 11687b: 74 47 je 1168c4 return RTEMS_INVALID_NAME; if ( !starting_address ) 11687d: 85 f6 test %esi,%esi 11687f: 74 23 je 1168a4 return RTEMS_INVALID_ADDRESS; if ( !id ) 116881: 8b 45 1c mov 0x1c(%ebp),%eax 116884: 85 c0 test %eax,%eax 116886: 74 1c je 1168a4 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 116888: 85 d2 test %edx,%edx 11688a: 74 28 je 1168b4 11688c: 85 ff test %edi,%edi 11688e: 74 24 je 1168b4 116890: 39 fa cmp %edi,%edx 116892: 72 20 jb 1168b4 116894: f7 c7 03 00 00 00 test $0x3,%edi 11689a: 75 18 jne 1168b4 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 11689c: f7 c6 03 00 00 00 test $0x3,%esi 1168a2: 74 30 je 1168d4 return RTEMS_INVALID_ADDRESS; 1168a4: b8 09 00 00 00 mov $0x9,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1168a9: 8d 65 f4 lea -0xc(%ebp),%esp 1168ac: 5b pop %ebx 1168ad: 5e pop %esi 1168ae: 5f pop %edi 1168af: c9 leave 1168b0: c3 ret 1168b1: 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; 1168b4: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1168b9: 8d 65 f4 lea -0xc(%ebp),%esp 1168bc: 5b pop %ebx 1168bd: 5e pop %esi 1168be: 5f pop %edi 1168bf: c9 leave 1168c0: c3 ret 1168c1: 8d 76 00 lea 0x0(%esi),%esi ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 1168c4: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1168c9: 8d 65 f4 lea -0xc(%ebp),%esp 1168cc: 5b pop %ebx 1168cd: 5e pop %esi 1168ce: 5f pop %edi 1168cf: c9 leave 1168d0: c3 ret 1168d1: 8d 76 00 lea 0x0(%esi),%esi 1168d4: a1 10 09 14 00 mov 0x140910,%eax 1168d9: 40 inc %eax 1168da: 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 ); 1168df: 83 ec 0c sub $0xc,%esp 1168e2: 68 a0 07 14 00 push $0x1407a0 1168e7: 89 55 e0 mov %edx,-0x20(%ebp) 1168ea: e8 21 44 00 00 call 11ad10 <_Objects_Allocate> 1168ef: 89 45 e4 mov %eax,-0x1c(%ebp) _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 1168f2: 83 c4 10 add $0x10,%esp 1168f5: 85 c0 test %eax,%eax 1168f7: 8b 55 e0 mov -0x20(%ebp),%edx 1168fa: 74 58 je 116954 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 1168fc: 8b 45 e4 mov -0x1c(%ebp),%eax 1168ff: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 116902: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 116905: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 116908: 8b 4d 18 mov 0x18(%ebp),%ecx 11690b: 89 48 1c mov %ecx,0x1c(%eax) the_partition->number_of_used_blocks = 0; 11690e: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) _Chain_Initialize( &the_partition->Memory, starting_address, 116915: 57 push %edi 116916: 89 d0 mov %edx,%eax 116918: 31 d2 xor %edx,%edx 11691a: f7 f7 div %edi 11691c: 50 push %eax 11691d: 56 push %esi 11691e: 8b 45 e4 mov -0x1c(%ebp),%eax 116921: 83 c0 24 add $0x24,%eax 116924: 50 push %eax 116925: e8 52 2f 00 00 call 11987c <_Chain_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 11692a: 8b 7d e4 mov -0x1c(%ebp),%edi 11692d: 8b 47 08 mov 0x8(%edi),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 116930: 0f b7 f0 movzwl %ax,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 116933: 8b 15 bc 07 14 00 mov 0x1407bc,%edx 116939: 89 3c b2 mov %edi,(%edx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 11693c: 89 5f 0c mov %ebx,0xc(%edi) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 11693f: 8b 55 1c mov 0x1c(%ebp),%edx 116942: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 116944: e8 07 54 00 00 call 11bd50 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116949: 83 c4 10 add $0x10,%esp 11694c: 31 c0 xor %eax,%eax 11694e: e9 66 ff ff ff jmp 1168b9 116953: 90 nop _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 116954: e8 f7 53 00 00 call 11bd50 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 116959: b8 05 00 00 00 mov $0x5,%eax 11695e: e9 56 ff ff ff jmp 1168b9 =============================================================================== 001169d0 : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 1169d0: 55 push %ebp 1169d1: 89 e5 mov %esp,%ebp 1169d3: 56 push %esi 1169d4: 53 push %ebx 1169d5: 83 ec 20 sub $0x20,%esp 1169d8: 8b 5d 0c mov 0xc(%ebp),%ebx register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 1169db: 85 db test %ebx,%ebx 1169dd: 74 59 je 116a38 Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 1169df: 52 push %edx return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); 1169e0: 8d 45 f4 lea -0xc(%ebp),%eax 1169e3: 50 push %eax 1169e4: ff 75 08 pushl 0x8(%ebp) 1169e7: 68 a0 07 14 00 push $0x1407a0 1169ec: e8 0f 48 00 00 call 11b200 <_Objects_Get> 1169f1: 89 c6 mov %eax,%esi switch ( location ) { 1169f3: 83 c4 10 add $0x10,%esp 1169f6: 8b 45 f4 mov -0xc(%ebp),%eax 1169f9: 85 c0 test %eax,%eax 1169fb: 75 2f jne 116a2c */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 1169fd: 83 ec 0c sub $0xc,%esp 116a00: 8d 46 24 lea 0x24(%esi),%eax 116a03: 50 push %eax 116a04: e8 4f 2e 00 00 call 119858 <_Chain_Get> case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 116a09: 83 c4 10 add $0x10,%esp 116a0c: 85 c0 test %eax,%eax 116a0e: 74 34 je 116a44 the_partition->number_of_used_blocks += 1; 116a10: ff 46 20 incl 0x20(%esi) _Thread_Enable_dispatch(); 116a13: 89 45 e4 mov %eax,-0x1c(%ebp) 116a16: e8 35 53 00 00 call 11bd50 <_Thread_Enable_dispatch> *buffer = the_buffer; 116a1b: 8b 45 e4 mov -0x1c(%ebp),%eax 116a1e: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 116a20: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116a22: 8d 65 f8 lea -0x8(%ebp),%esp 116a25: 5b pop %ebx 116a26: 5e pop %esi 116a27: c9 leave 116a28: c3 ret 116a29: 8d 76 00 lea 0x0(%esi),%esi case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116a2c: b8 04 00 00 00 mov $0x4,%eax } 116a31: 8d 65 f8 lea -0x8(%ebp),%esp 116a34: 5b pop %ebx 116a35: 5e pop %esi 116a36: c9 leave 116a37: c3 ret register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) return RTEMS_INVALID_ADDRESS; 116a38: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116a3d: 8d 65 f8 lea -0x8(%ebp),%esp 116a40: 5b pop %ebx 116a41: 5e pop %esi 116a42: c9 leave 116a43: c3 ret the_partition->number_of_used_blocks += 1; _Thread_Enable_dispatch(); *buffer = the_buffer; return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 116a44: e8 07 53 00 00 call 11bd50 <_Thread_Enable_dispatch> return RTEMS_UNSATISFIED; 116a49: b8 0d 00 00 00 mov $0xd,%eax 116a4e: eb e1 jmp 116a31 =============================================================================== 00116a74 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 116a74: 55 push %ebp 116a75: 89 e5 mov %esp,%ebp 116a77: 56 push %esi 116a78: 53 push %ebx 116a79: 83 ec 14 sub $0x14,%esp 116a7c: 8b 75 0c mov 0xc(%ebp),%esi register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); 116a7f: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 116a82: 50 push %eax 116a83: ff 75 08 pushl 0x8(%ebp) 116a86: 68 a0 07 14 00 push $0x1407a0 116a8b: e8 70 47 00 00 call 11b200 <_Objects_Get> 116a90: 89 c3 mov %eax,%ebx switch ( location ) { 116a92: 83 c4 10 add $0x10,%esp 116a95: 8b 45 f4 mov -0xc(%ebp),%eax 116a98: 85 c0 test %eax,%eax 116a9a: 74 0c je 116aa8 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116a9c: b8 04 00 00 00 mov $0x4,%eax } 116aa1: 8d 65 f8 lea -0x8(%ebp),%esp 116aa4: 5b pop %ebx 116aa5: 5e pop %esi 116aa6: c9 leave 116aa7: c3 ret ) { void *starting; void *ending; starting = the_partition->starting_address; 116aa8: 8b 43 10 mov 0x10(%ebx),%eax ending = _Addresses_Add_offset( starting, the_partition->length ); 116aab: 8b 53 14 mov 0x14(%ebx),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 116aae: 39 c6 cmp %eax,%esi 116ab0: 72 3a jb 116aec RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 116ab2: 8d 14 10 lea (%eax,%edx,1),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 116ab5: 39 d6 cmp %edx,%esi 116ab7: 77 33 ja 116aec <== NEVER TAKEN RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 116ab9: 89 f2 mov %esi,%edx 116abb: 29 c2 sub %eax,%edx 116abd: 89 d0 mov %edx,%eax offset = (uint32_t) _Addresses_Subtract( the_buffer, the_partition->starting_address ); return ((offset % the_partition->buffer_size) == 0); 116abf: 31 d2 xor %edx,%edx 116ac1: 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 ) && 116ac4: 85 d2 test %edx,%edx 116ac6: 75 24 jne 116aec RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 116ac8: 83 ec 08 sub $0x8,%esp 116acb: 56 push %esi 116acc: 8d 43 24 lea 0x24(%ebx),%eax 116acf: 50 push %eax 116ad0: e8 47 2d 00 00 call 11981c <_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; 116ad5: ff 4b 20 decl 0x20(%ebx) _Thread_Enable_dispatch(); 116ad8: e8 73 52 00 00 call 11bd50 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116add: 83 c4 10 add $0x10,%esp 116ae0: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116ae2: 8d 65 f8 lea -0x8(%ebp),%esp 116ae5: 5b pop %ebx 116ae6: 5e pop %esi 116ae7: c9 leave 116ae8: c3 ret 116ae9: 8d 76 00 lea 0x0(%esi),%esi _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 116aec: e8 5f 52 00 00 call 11bd50 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 116af1: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116af6: 8d 65 f8 lea -0x8(%ebp),%esp 116af9: 5b pop %ebx 116afa: 5e pop %esi 116afb: c9 leave 116afc: c3 ret =============================================================================== 00115e98 : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 115e98: 55 push %ebp 115e99: 89 e5 mov %esp,%ebp 115e9b: 57 push %edi 115e9c: 56 push %esi 115e9d: 53 push %ebx 115e9e: 83 ec 1c sub $0x1c,%esp 115ea1: 8b 5d 08 mov 0x8(%ebp),%ebx 115ea4: 8b 55 0c mov 0xc(%ebp),%edx 115ea7: 8b 7d 10 mov 0x10(%ebp),%edi 115eaa: 8b 75 18 mov 0x18(%ebp),%esi register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 115ead: 85 db test %ebx,%ebx 115eaf: 74 1b je 115ecc return RTEMS_INVALID_NAME; if ( !id ) 115eb1: 85 f6 test %esi,%esi 115eb3: 74 08 je 115ebd * id - port id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_port_create( 115eb5: 89 f8 mov %edi,%eax 115eb7: 09 d0 or %edx,%eax return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 115eb9: a8 03 test $0x3,%al 115ebb: 74 1f je 115edc !_Addresses_Is_aligned( external_start ) ) return RTEMS_INVALID_ADDRESS; 115ebd: b8 09 00 00 00 mov $0x9,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 115ec2: 8d 65 f4 lea -0xc(%ebp),%esp 115ec5: 5b pop %ebx 115ec6: 5e pop %esi 115ec7: 5f pop %edi 115ec8: c9 leave 115ec9: c3 ret 115eca: 66 90 xchg %ax,%ax ) { register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 115ecc: b8 03 00 00 00 mov $0x3,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 115ed1: 8d 65 f4 lea -0xc(%ebp),%esp 115ed4: 5b pop %ebx 115ed5: 5e pop %esi 115ed6: 5f pop %edi 115ed7: c9 leave 115ed8: c3 ret 115ed9: 8d 76 00 lea 0x0(%esi),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 115edc: a1 10 09 14 00 mov 0x140910,%eax 115ee1: 40 inc %eax 115ee2: 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 ); 115ee7: 83 ec 0c sub $0xc,%esp 115eea: 68 60 07 14 00 push $0x140760 115eef: 89 55 e4 mov %edx,-0x1c(%ebp) 115ef2: e8 19 4e 00 00 call 11ad10 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 115ef7: 83 c4 10 add $0x10,%esp 115efa: 85 c0 test %eax,%eax 115efc: 8b 55 e4 mov -0x1c(%ebp),%edx 115eff: 74 33 je 115f34 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 115f01: 89 50 10 mov %edx,0x10(%eax) the_port->external_base = external_start; 115f04: 89 78 14 mov %edi,0x14(%eax) the_port->length = length - 1; 115f07: 8b 55 14 mov 0x14(%ebp),%edx 115f0a: 4a dec %edx 115f0b: 89 50 18 mov %edx,0x18(%eax) Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 115f0e: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 115f11: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 115f14: 8b 0d 7c 07 14 00 mov 0x14077c,%ecx 115f1a: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 115f1d: 89 58 0c mov %ebx,0xc(%eax) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 115f20: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 115f22: e8 29 5e 00 00 call 11bd50 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115f27: 31 c0 xor %eax,%eax } 115f29: 8d 65 f4 lea -0xc(%ebp),%esp 115f2c: 5b pop %ebx 115f2d: 5e pop %esi 115f2e: 5f pop %edi 115f2f: c9 leave 115f30: c3 ret 115f31: 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(); 115f34: e8 17 5e 00 00 call 11bd50 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 115f39: b8 05 00 00 00 mov $0x5,%eax 115f3e: eb 82 jmp 115ec2 =============================================================================== 00115f40 : */ rtems_status_code rtems_port_delete( rtems_id id ) { 115f40: 55 push %ebp 115f41: 89 e5 mov %esp,%ebp 115f43: 83 ec 2c sub $0x2c,%esp register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); 115f46: 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 ); 115f49: 50 push %eax 115f4a: ff 75 08 pushl 0x8(%ebp) 115f4d: 68 60 07 14 00 push $0x140760 115f52: e8 a9 52 00 00 call 11b200 <_Objects_Get> switch ( location ) { 115f57: 83 c4 10 add $0x10,%esp 115f5a: 8b 4d f4 mov -0xc(%ebp),%ecx 115f5d: 85 c9 test %ecx,%ecx 115f5f: 75 2f jne 115f90 case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); 115f61: 83 ec 08 sub $0x8,%esp 115f64: 50 push %eax 115f65: 68 60 07 14 00 push $0x140760 115f6a: 89 45 e4 mov %eax,-0x1c(%ebp) 115f6d: e8 1a 4e 00 00 call 11ad8c <_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 ); 115f72: 58 pop %eax 115f73: 5a pop %edx 115f74: 8b 45 e4 mov -0x1c(%ebp),%eax 115f77: 50 push %eax 115f78: 68 60 07 14 00 push $0x140760 115f7d: e8 02 51 00 00 call 11b084 <_Objects_Free> _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 115f82: e8 c9 5d 00 00 call 11bd50 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115f87: 83 c4 10 add $0x10,%esp 115f8a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115f8c: c9 leave 115f8d: c3 ret 115f8e: 66 90 xchg %ax,%ax #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115f90: b8 04 00 00 00 mov $0x4,%eax } 115f95: c9 leave 115f96: c3 ret =============================================================================== 00115f98 : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 115f98: 55 push %ebp 115f99: 89 e5 mov %esp,%ebp 115f9b: 56 push %esi 115f9c: 53 push %ebx 115f9d: 83 ec 10 sub $0x10,%esp 115fa0: 8b 75 0c mov 0xc(%ebp),%esi 115fa3: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 115fa6: 85 db test %ebx,%ebx 115fa8: 74 4e je 115ff8 Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) _Objects_Get( &_Dual_ported_memory_Information, id, location ); 115faa: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); 115fab: 8d 45 f4 lea -0xc(%ebp),%eax 115fae: 50 push %eax 115faf: ff 75 08 pushl 0x8(%ebp) 115fb2: 68 60 07 14 00 push $0x140760 115fb7: e8 44 52 00 00 call 11b200 <_Objects_Get> switch ( location ) { 115fbc: 83 c4 10 add $0x10,%esp 115fbf: 8b 55 f4 mov -0xc(%ebp),%edx 115fc2: 85 d2 test %edx,%edx 115fc4: 74 0e je 115fd4 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115fc6: b8 04 00 00 00 mov $0x4,%eax } 115fcb: 8d 65 f8 lea -0x8(%ebp),%esp 115fce: 5b pop %ebx 115fcf: 5e pop %esi 115fd0: c9 leave 115fd1: c3 ret 115fd2: 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); 115fd4: 89 f2 mov %esi,%edx 115fd6: 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 ) 115fd9: 3b 50 18 cmp 0x18(%eax),%edx 115fdc: 77 16 ja 115ff4 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 115fde: 03 50 10 add 0x10(%eax),%edx 115fe1: 89 13 mov %edx,(%ebx) *internal = external; else *internal = _Addresses_Add_offset( the_port->internal_base, ending ); _Thread_Enable_dispatch(); 115fe3: e8 68 5d 00 00 call 11bd50 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115fe8: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115fea: 8d 65 f8 lea -0x8(%ebp),%esp 115fed: 5b pop %ebx 115fee: 5e pop %esi 115fef: c9 leave 115ff0: c3 ret 115ff1: 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; 115ff4: 89 33 mov %esi,(%ebx) 115ff6: eb eb jmp 115fe3 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) return RTEMS_INVALID_ADDRESS; 115ff8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115ffd: 8d 65 f8 lea -0x8(%ebp),%esp 116000: 5b pop %ebx 116001: 5e pop %esi 116002: c9 leave 116003: c3 ret =============================================================================== 00116028 : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 116028: 55 push %ebp 116029: 89 e5 mov %esp,%ebp 11602b: 56 push %esi 11602c: 53 push %ebx 11602d: 83 ec 10 sub $0x10,%esp 116030: 8b 75 0c mov 0xc(%ebp),%esi 116033: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 116036: 85 db test %ebx,%ebx 116038: 74 4e je 116088 11603a: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); 11603b: 8d 45 f4 lea -0xc(%ebp),%eax 11603e: 50 push %eax 11603f: ff 75 08 pushl 0x8(%ebp) 116042: 68 60 07 14 00 push $0x140760 116047: e8 b4 51 00 00 call 11b200 <_Objects_Get> switch ( location ) { 11604c: 83 c4 10 add $0x10,%esp 11604f: 8b 55 f4 mov -0xc(%ebp),%edx 116052: 85 d2 test %edx,%edx 116054: 74 0e je 116064 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116056: b8 04 00 00 00 mov $0x4,%eax } 11605b: 8d 65 f8 lea -0x8(%ebp),%esp 11605e: 5b pop %ebx 11605f: 5e pop %esi 116060: c9 leave 116061: c3 ret 116062: 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); 116064: 89 f2 mov %esi,%edx 116066: 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 ) 116069: 3b 50 18 cmp 0x18(%eax),%edx 11606c: 77 16 ja 116084 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 11606e: 03 50 14 add 0x14(%eax),%edx 116071: 89 13 mov %edx,(%ebx) *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, ending ); _Thread_Enable_dispatch(); 116073: e8 d8 5c 00 00 call 11bd50 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116078: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11607a: 8d 65 f8 lea -0x8(%ebp),%esp 11607d: 5b pop %ebx 11607e: 5e pop %esi 11607f: c9 leave 116080: c3 ret 116081: 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; 116084: 89 33 mov %esi,(%ebx) 116086: eb eb jmp 116073 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) return RTEMS_INVALID_ADDRESS; 116088: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11608d: 8d 65 f8 lea -0x8(%ebp),%esp 116090: 5b pop %ebx 116091: 5e pop %esi 116092: c9 leave 116093: c3 ret =============================================================================== 00116b00 : */ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { 116b00: 55 push %ebp 116b01: 89 e5 mov %esp,%ebp 116b03: 53 push %ebx 116b04: 83 ec 18 sub $0x18,%esp Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); 116b07: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 116b0a: 50 push %eax 116b0b: ff 75 08 pushl 0x8(%ebp) 116b0e: 68 e0 07 14 00 push $0x1407e0 116b13: e8 e8 46 00 00 call 11b200 <_Objects_Get> 116b18: 89 c3 mov %eax,%ebx switch ( location ) { 116b1a: 83 c4 10 add $0x10,%esp 116b1d: 8b 45 f4 mov -0xc(%ebp),%eax 116b20: 85 c0 test %eax,%eax 116b22: 74 0c je 116b30 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116b24: b8 04 00 00 00 mov $0x4,%eax } 116b29: 8b 5d fc mov -0x4(%ebp),%ebx 116b2c: c9 leave 116b2d: c3 ret 116b2e: 66 90 xchg %ax,%ax the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 116b30: a1 98 0b 14 00 mov 0x140b98,%eax 116b35: 39 43 40 cmp %eax,0x40(%ebx) 116b38: 74 12 je 116b4c _Thread_Enable_dispatch(); 116b3a: e8 11 52 00 00 call 11bd50 <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 116b3f: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116b44: 8b 5d fc mov -0x4(%ebp),%ebx 116b47: c9 leave 116b48: c3 ret 116b49: 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 ); 116b4c: 83 ec 0c sub $0xc,%esp 116b4f: 8d 43 10 lea 0x10(%ebx),%eax 116b52: 50 push %eax 116b53: e8 d0 62 00 00 call 11ce28 <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 116b58: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) _Thread_Enable_dispatch(); 116b5f: e8 ec 51 00 00 call 11bd50 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116b64: 83 c4 10 add $0x10,%esp 116b67: 31 c0 xor %eax,%eax 116b69: eb be jmp 116b29 =============================================================================== 0010c388 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 10c388: 55 push %ebp 10c389: 89 e5 mov %esp,%ebp 10c38b: 57 push %edi 10c38c: 56 push %esi 10c38d: 53 push %ebx 10c38e: 83 ec 1c sub $0x1c,%esp 10c391: 8b 5d 08 mov 0x8(%ebp),%ebx 10c394: 8b 75 0c mov 0xc(%ebp),%esi Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10c397: 85 db test %ebx,%ebx 10c399: 0f 84 a9 00 00 00 je 10c448 return RTEMS_INVALID_NAME; if ( !id ) 10c39f: 85 f6 test %esi,%esi 10c3a1: 0f 84 c5 00 00 00 je 10c46c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c3a7: a1 90 9a 12 00 mov 0x129a90,%eax 10c3ac: 40 inc %eax 10c3ad: a3 90 9a 12 00 mov %eax,0x129a90 * 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 ); 10c3b2: 83 ec 0c sub $0xc,%esp 10c3b5: 68 a0 99 12 00 push $0x1299a0 10c3ba: e8 4d 1e 00 00 call 10e20c <_Objects_Allocate> 10c3bf: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 10c3c1: 83 c4 10 add $0x10,%esp 10c3c4: 85 c0 test %eax,%eax 10c3c6: 0f 84 8c 00 00 00 je 10c458 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 10c3cc: a1 18 9d 12 00 mov 0x129d18,%eax 10c3d1: 89 42 40 mov %eax,0x40(%edx) the_period->state = RATE_MONOTONIC_INACTIVE; 10c3d4: 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; 10c3db: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 10c3e2: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx) the_watchdog->id = id; 10c3e9: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) the_watchdog->user_data = user_data; 10c3f0: 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 ); 10c3f7: 8d 42 54 lea 0x54(%edx),%eax 10c3fa: 89 45 e4 mov %eax,-0x1c(%ebp) 10c3fd: b9 38 00 00 00 mov $0x38,%ecx 10c402: 31 c0 xor %eax,%eax 10c404: 8b 7d e4 mov -0x1c(%ebp),%edi 10c407: f3 aa rep stos %al,%es:(%edi) 10c409: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10c410: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10c417: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10c41e: 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 ), 10c425: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10c428: 0f b7 f8 movzwl %ax,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c42b: 8b 0d bc 99 12 00 mov 0x1299bc,%ecx 10c431: 89 14 b9 mov %edx,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c434: 89 5a 0c mov %ebx,0xc(%edx) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 10c437: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10c439: e8 a2 2e 00 00 call 10f2e0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c43e: 31 c0 xor %eax,%eax } 10c440: 8d 65 f4 lea -0xc(%ebp),%esp 10c443: 5b pop %ebx 10c444: 5e pop %esi 10c445: 5f pop %edi 10c446: c9 leave 10c447: c3 ret ) { Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10c448: b8 03 00 00 00 mov $0x3,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c44d: 8d 65 f4 lea -0xc(%ebp),%esp 10c450: 5b pop %ebx 10c451: 5e pop %esi 10c452: 5f pop %edi 10c453: c9 leave 10c454: c3 ret 10c455: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { _Thread_Enable_dispatch(); 10c458: e8 83 2e 00 00 call 10f2e0 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10c45d: b8 05 00 00 00 mov $0x5,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c462: 8d 65 f4 lea -0xc(%ebp),%esp 10c465: 5b pop %ebx 10c466: 5e pop %esi 10c467: 5f pop %edi 10c468: c9 leave 10c469: c3 ret 10c46a: 66 90 xchg %ax,%ax if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10c46c: b8 09 00 00 00 mov $0x9,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c471: 8d 65 f4 lea -0xc(%ebp),%esp 10c474: 5b pop %ebx 10c475: 5e pop %esi 10c476: 5f pop %edi 10c477: c9 leave 10c478: c3 ret =============================================================================== 00111e04 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 111e04: 55 push %ebp 111e05: 89 e5 mov %esp,%ebp 111e07: 53 push %ebx 111e08: 83 ec 24 sub $0x24,%esp 111e0b: 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 ) 111e0e: 85 db test %ebx,%ebx 111e10: 0f 84 92 00 00 00 je 111ea8 111e16: 50 push %eax return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); 111e17: 8d 45 f4 lea -0xc(%ebp),%eax 111e1a: 50 push %eax 111e1b: ff 75 08 pushl 0x8(%ebp) 111e1e: 68 a0 99 12 00 push $0x1299a0 111e23: e8 68 c9 ff ff call 10e790 <_Objects_Get> switch ( location ) { 111e28: 83 c4 10 add $0x10,%esp 111e2b: 8b 4d f4 mov -0xc(%ebp),%ecx 111e2e: 85 c9 test %ecx,%ecx 111e30: 74 0a je 111e3c #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 111e32: b8 04 00 00 00 mov $0x4,%eax } 111e37: 8b 5d fc mov -0x4(%ebp),%ebx 111e3a: c9 leave 111e3b: c3 ret the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 111e3c: 8b 50 40 mov 0x40(%eax),%edx 111e3f: 8b 52 08 mov 0x8(%edx),%edx 111e42: 89 13 mov %edx,(%ebx) status->state = the_period->state; 111e44: 8b 50 38 mov 0x38(%eax),%edx 111e47: 89 53 04 mov %edx,0x4(%ebx) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 111e4a: 85 d2 test %edx,%edx 111e4c: 75 2a jne 111e78 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 111e4e: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 111e55: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Timespec_Set_to_zero( &status->executed_since_last_period ); 111e5c: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) 111e63: 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(); 111e6a: e8 71 d4 ff ff call 10f2e0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 111e6f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111e71: 8b 5d fc mov -0x4(%ebp),%ebx 111e74: c9 leave 111e75: c3 ret 111e76: 66 90 xchg %ax,%ax } else { /* * Grab the current status. */ valid_status = 111e78: 52 push %edx _Rate_monotonic_Get_status( 111e79: 8d 55 ec lea -0x14(%ebp),%edx } else { /* * Grab the current status. */ valid_status = 111e7c: 52 push %edx _Rate_monotonic_Get_status( 111e7d: 8d 55 e4 lea -0x1c(%ebp),%edx } else { /* * Grab the current status. */ valid_status = 111e80: 52 push %edx 111e81: 50 push %eax 111e82: e8 19 a6 ff ff call 10c4a0 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { 111e87: 83 c4 10 add $0x10,%esp 111e8a: 84 c0 test %al,%al 111e8c: 74 26 je 111eb4 _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 111e8e: 8b 45 e4 mov -0x1c(%ebp),%eax 111e91: 8b 55 e8 mov -0x18(%ebp),%edx 111e94: 89 43 08 mov %eax,0x8(%ebx) 111e97: 89 53 0c mov %edx,0xc(%ebx) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 111e9a: 8b 45 ec mov -0x14(%ebp),%eax 111e9d: 8b 55 f0 mov -0x10(%ebp),%edx 111ea0: 89 43 10 mov %eax,0x10(%ebx) 111ea3: 89 53 14 mov %edx,0x14(%ebx) 111ea6: eb c2 jmp 111e6a Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) return RTEMS_INVALID_ADDRESS; 111ea8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111ead: 8b 5d fc mov -0x4(%ebp),%ebx 111eb0: c9 leave 111eb1: c3 ret 111eb2: 66 90 xchg %ax,%ax valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { _Thread_Enable_dispatch(); 111eb4: e8 27 d4 ff ff call 10f2e0 <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 111eb9: b8 0b 00 00 00 mov $0xb,%eax 111ebe: e9 74 ff ff ff jmp 111e37 =============================================================================== 0010c69c : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 10c69c: 55 push %ebp 10c69d: 89 e5 mov %esp,%ebp 10c69f: 57 push %edi 10c6a0: 56 push %esi 10c6a1: 53 push %ebx 10c6a2: 83 ec 30 sub $0x30,%esp 10c6a5: 8b 5d 08 mov 0x8(%ebp),%ebx 10c6a8: 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 ); 10c6ab: 8d 45 e4 lea -0x1c(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 10c6ae: 50 push %eax 10c6af: 53 push %ebx 10c6b0: 68 a0 99 12 00 push $0x1299a0 10c6b5: e8 d6 20 00 00 call 10e790 <_Objects_Get> switch ( location ) { 10c6ba: 83 c4 10 add $0x10,%esp 10c6bd: 8b 55 e4 mov -0x1c(%ebp),%edx 10c6c0: 85 d2 test %edx,%edx 10c6c2: 74 10 je 10c6d4 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c6c4: b8 04 00 00 00 mov $0x4,%eax } 10c6c9: 8d 65 f4 lea -0xc(%ebp),%esp 10c6cc: 5b pop %ebx 10c6cd: 5e pop %esi 10c6ce: 5f pop %edi 10c6cf: c9 leave 10c6d0: c3 ret 10c6d1: 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 ) ) { 10c6d4: 8b 15 18 9d 12 00 mov 0x129d18,%edx 10c6da: 39 50 40 cmp %edx,0x40(%eax) 10c6dd: 74 15 je 10c6f4 _Thread_Enable_dispatch(); 10c6df: e8 fc 2b 00 00 call 10f2e0 <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 10c6e4: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c6e9: 8d 65 f4 lea -0xc(%ebp),%esp 10c6ec: 5b pop %ebx 10c6ed: 5e pop %esi 10c6ee: 5f pop %edi 10c6ef: c9 leave 10c6f0: c3 ret 10c6f1: 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 ) { 10c6f4: 85 f6 test %esi,%esi 10c6f6: 75 1c jne 10c714 switch ( the_period->state ) { 10c6f8: 8b 40 38 mov 0x38(%eax),%eax 10c6fb: 83 f8 04 cmp $0x4,%eax 10c6fe: 77 6c ja 10c76c <== NEVER TAKEN 10c700: 8b 04 85 dc 28 12 00 mov 0x1228dc(,%eax,4),%eax case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 10c707: 89 45 d4 mov %eax,-0x2c(%ebp) 10c70a: e8 d1 2b 00 00 call 10f2e0 <_Thread_Enable_dispatch> return( return_value ); 10c70f: 8b 45 d4 mov -0x2c(%ebp),%eax 10c712: eb b5 jmp 10c6c9 } _ISR_Disable( level ); 10c714: 9c pushf 10c715: fa cli 10c716: 5f pop %edi if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { 10c717: 8b 50 38 mov 0x38(%eax),%edx 10c71a: 85 d2 test %edx,%edx 10c71c: 74 52 je 10c770 _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { 10c71e: 83 fa 02 cmp $0x2,%edx 10c721: 0f 84 9e 00 00 00 je 10c7c5 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { 10c727: 83 fa 04 cmp $0x4,%edx 10c72a: 75 98 jne 10c6c4 <== NEVER TAKEN /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 10c72c: 83 ec 0c sub $0xc,%esp 10c72f: 50 push %eax 10c730: 89 45 d4 mov %eax,-0x2c(%ebp) 10c733: e8 74 fe ff ff call 10c5ac <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 10c738: 57 push %edi 10c739: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 10c73a: 8b 45 d4 mov -0x2c(%ebp),%eax 10c73d: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) the_period->next_length = length; 10c744: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c747: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c74a: 5b pop %ebx 10c74b: 5e pop %esi _Watchdog_Insert_ticks( &the_period->Timer, length ); 10c74c: 83 c0 10 add $0x10,%eax 10c74f: 50 push %eax 10c750: 68 60 9b 12 00 push $0x129b60 10c755: e8 92 39 00 00 call 1100ec <_Watchdog_Insert> _Thread_Enable_dispatch(); 10c75a: e8 81 2b 00 00 call 10f2e0 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 10c75f: 83 c4 10 add $0x10,%esp 10c762: b8 06 00 00 00 mov $0x6,%eax 10c767: e9 5d ff ff ff jmp 10c6c9 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 10c76c: 31 c0 xor %eax,%eax 10c76e: eb 97 jmp 10c707 <== NOT EXECUTED return( return_value ); } _ISR_Disable( level ); if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { _ISR_Enable( level ); 10c770: 57 push %edi 10c771: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 10c772: 83 ec 0c sub $0xc,%esp 10c775: 50 push %eax 10c776: 89 45 d4 mov %eax,-0x2c(%ebp) 10c779: e8 ba fd ff ff call 10c538 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 10c77e: 8b 45 d4 mov -0x2c(%ebp),%eax 10c781: 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; 10c788: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10c78f: c7 40 2c f4 ca 10 00 movl $0x10caf4,0x2c(%eax) the_watchdog->id = id; 10c796: 89 58 30 mov %ebx,0x30(%eax) the_watchdog->user_data = user_data; 10c799: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 10c7a0: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c7a3: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c7a6: 5e pop %esi 10c7a7: 5f pop %edi _Watchdog_Insert_ticks( &the_period->Timer, length ); 10c7a8: 83 c0 10 add $0x10,%eax 10c7ab: 50 push %eax 10c7ac: 68 60 9b 12 00 push $0x129b60 10c7b1: e8 36 39 00 00 call 1100ec <_Watchdog_Insert> _Thread_Enable_dispatch(); 10c7b6: e8 25 2b 00 00 call 10f2e0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c7bb: 83 c4 10 add $0x10,%esp 10c7be: 31 c0 xor %eax,%eax 10c7c0: e9 04 ff ff ff jmp 10c6c9 if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 10c7c5: 83 ec 0c sub $0xc,%esp 10c7c8: 50 push %eax 10c7c9: 89 45 d4 mov %eax,-0x2c(%ebp) 10c7cc: e8 db fd ff ff call 10c5ac <_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; 10c7d1: 8b 45 d4 mov -0x2c(%ebp),%eax 10c7d4: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) the_period->next_length = length; 10c7db: 89 70 3c mov %esi,0x3c(%eax) _ISR_Enable( level ); 10c7de: 57 push %edi 10c7df: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 10c7e0: 8b 15 18 9d 12 00 mov 0x129d18,%edx 10c7e6: 8b 48 08 mov 0x8(%eax),%ecx 10c7e9: 89 4a 20 mov %ecx,0x20(%edx) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10c7ec: 59 pop %ecx 10c7ed: 5b pop %ebx 10c7ee: 68 00 40 00 00 push $0x4000 10c7f3: 52 push %edx 10c7f4: 89 45 d4 mov %eax,-0x2c(%ebp) 10c7f7: e8 d8 32 00 00 call 10fad4 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 10c7fc: 9c pushf 10c7fd: fa cli 10c7fe: 59 pop %ecx local_state = the_period->state; 10c7ff: 8b 45 d4 mov -0x2c(%ebp),%eax 10c802: 8b 50 38 mov 0x38(%eax),%edx the_period->state = RATE_MONOTONIC_ACTIVE; 10c805: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) _ISR_Enable( level ); 10c80c: 51 push %ecx 10c80d: 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 ) 10c80e: 83 c4 10 add $0x10,%esp 10c811: 83 fa 03 cmp $0x3,%edx 10c814: 74 0c je 10c822 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 10c816: e8 c5 2a 00 00 call 10f2e0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c81b: 31 c0 xor %eax,%eax 10c81d: e9 a7 fe ff ff jmp 10c6c9 /* * 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 ); 10c822: 57 push %edi 10c823: 57 push %edi 10c824: 68 00 40 00 00 push $0x4000 10c829: ff 35 18 9d 12 00 pushl 0x129d18 10c82f: e8 48 27 00 00 call 10ef7c <_Thread_Clear_state> 10c834: 83 c4 10 add $0x10,%esp 10c837: eb dd jmp 10c816 =============================================================================== 0010c83c : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 10c83c: 55 push %ebp 10c83d: 89 e5 mov %esp,%ebp 10c83f: 57 push %edi 10c840: 56 push %esi 10c841: 53 push %ebx 10c842: 81 ec 8c 00 00 00 sub $0x8c,%esp 10c848: 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 ) 10c84b: 8b 7d 0c mov 0xc(%ebp),%edi 10c84e: 85 ff test %edi,%edi 10c850: 0f 84 be 00 00 00 je 10c914 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 10c856: 83 ec 08 sub $0x8,%esp 10c859: 68 f0 28 12 00 push $0x1228f0 10c85e: 56 push %esi 10c85f: ff 55 0c call *0xc(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 10c862: 59 pop %ecx 10c863: 5b pop %ebx 10c864: 68 28 29 12 00 push $0x122928 10c869: 56 push %esi 10c86a: ff 55 0c call *0xc(%ebp) (*print)( context, "--- Wall times are in seconds ---\n" ); 10c86d: 58 pop %eax 10c86e: 5a pop %edx 10c86f: 68 4c 29 12 00 push $0x12294c 10c874: 56 push %esi 10c875: ff 55 0c call *0xc(%ebp) Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 10c878: 5b pop %ebx 10c879: 5f pop %edi 10c87a: 68 70 29 12 00 push $0x122970 10c87f: 56 push %esi 10c880: ff 55 0c call *0xc(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 10c883: 5a pop %edx 10c884: 59 pop %ecx 10c885: 68 bc 29 12 00 push $0x1229bc 10c88a: 56 push %esi 10c88b: 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 ; 10c88e: 8b 1d a8 99 12 00 mov 0x1299a8,%ebx 10c894: 83 c4 10 add $0x10,%esp 10c897: 3b 1d ac 99 12 00 cmp 0x1299ac,%ebx 10c89d: 77 75 ja 10c914 <== NEVER TAKEN 10c89f: 8d 7d 88 lea -0x78(%ebp),%edi 10c8a2: eb 09 jmp 10c8ad id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 10c8a4: 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 ; 10c8a5: 39 1d ac 99 12 00 cmp %ebx,0x1299ac 10c8ab: 72 67 jb 10c914 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 10c8ad: 83 ec 08 sub $0x8,%esp 10c8b0: 57 push %edi 10c8b1: 53 push %ebx 10c8b2: e8 a1 54 00 00 call 111d58 if ( status != RTEMS_SUCCESSFUL ) 10c8b7: 83 c4 10 add $0x10,%esp 10c8ba: 85 c0 test %eax,%eax 10c8bc: 75 e6 jne 10c8a4 #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 ); 10c8be: 83 ec 08 sub $0x8,%esp 10c8c1: 8d 45 c0 lea -0x40(%ebp),%eax 10c8c4: 50 push %eax 10c8c5: 53 push %ebx 10c8c6: e8 39 55 00 00 call 111e04 #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 10c8cb: 83 c4 0c add $0xc,%esp 10c8ce: 8d 55 e3 lea -0x1d(%ebp),%edx 10c8d1: 52 push %edx 10c8d2: 6a 05 push $0x5 10c8d4: ff 75 c0 pushl -0x40(%ebp) 10c8d7: e8 b4 02 00 00 call 10cb90 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 10c8dc: 59 pop %ecx 10c8dd: 58 pop %eax 10c8de: ff 75 8c pushl -0x74(%ebp) 10c8e1: ff 75 88 pushl -0x78(%ebp) 10c8e4: 8d 45 e3 lea -0x1d(%ebp),%eax 10c8e7: 50 push %eax 10c8e8: 53 push %ebx 10c8e9: 68 0e 29 12 00 push $0x12290e 10c8ee: 56 push %esi 10c8ef: ff 55 0c call *0xc(%ebp) ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 10c8f2: 8b 45 88 mov -0x78(%ebp),%eax 10c8f5: 83 c4 20 add $0x20,%esp 10c8f8: 85 c0 test %eax,%eax 10c8fa: 75 20 jne 10c91c (*print)( context, "\n" ); 10c8fc: 83 ec 08 sub $0x8,%esp 10c8ff: 68 b1 09 12 00 push $0x1209b1 10c904: 56 push %esi 10c905: ff 55 0c call *0xc(%ebp) continue; 10c908: 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++ ) { 10c90b: 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 ; 10c90c: 39 1d ac 99 12 00 cmp %ebx,0x1299ac 10c912: 73 99 jae 10c8ad <== ALWAYS TAKEN the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 10c914: 8d 65 f4 lea -0xc(%ebp),%esp 10c917: 5b pop %ebx 10c918: 5e pop %esi 10c919: 5f pop %edi 10c91a: c9 leave 10c91b: 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 ); 10c91c: 52 push %edx 10c91d: 8d 55 d8 lea -0x28(%ebp),%edx 10c920: 52 push %edx 10c921: 50 push %eax 10c922: 8d 45 a0 lea -0x60(%ebp),%eax 10c925: 50 push %eax 10c926: e8 21 34 00 00 call 10fd4c <_Timespec_Divide_by_integer> (*print)( context, 10c92b: b9 d3 4d 62 10 mov $0x10624dd3,%ecx 10c930: 8b 45 dc mov -0x24(%ebp),%eax 10c933: f7 e9 imul %ecx 10c935: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c93b: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c941: c1 f8 06 sar $0x6,%eax 10c944: 8b 55 dc mov -0x24(%ebp),%edx 10c947: c1 fa 1f sar $0x1f,%edx 10c94a: 29 d0 sub %edx,%eax 10c94c: 50 push %eax 10c94d: ff 75 d8 pushl -0x28(%ebp) 10c950: 8b 45 9c mov -0x64(%ebp),%eax 10c953: f7 e9 imul %ecx 10c955: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c95b: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c961: c1 f8 06 sar $0x6,%eax 10c964: 8b 55 9c mov -0x64(%ebp),%edx 10c967: c1 fa 1f sar $0x1f,%edx 10c96a: 29 d0 sub %edx,%eax 10c96c: 50 push %eax 10c96d: ff 75 98 pushl -0x68(%ebp) 10c970: 8b 45 94 mov -0x6c(%ebp),%eax 10c973: f7 e9 imul %ecx 10c975: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) 10c97b: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c981: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c987: c1 f8 06 sar $0x6,%eax 10c98a: 8b 55 94 mov -0x6c(%ebp),%edx 10c98d: c1 fa 1f sar $0x1f,%edx 10c990: 29 d0 sub %edx,%eax 10c992: 50 push %eax 10c993: ff 75 90 pushl -0x70(%ebp) 10c996: 68 08 2a 12 00 push $0x122a08 10c99b: 56 push %esi 10c99c: 89 4d 84 mov %ecx,-0x7c(%ebp) 10c99f: 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); 10c9a2: 83 c4 2c add $0x2c,%esp 10c9a5: 8d 55 d8 lea -0x28(%ebp),%edx 10c9a8: 52 push %edx 10c9a9: ff 75 88 pushl -0x78(%ebp) 10c9ac: 8d 45 b8 lea -0x48(%ebp),%eax 10c9af: 50 push %eax 10c9b0: e8 97 33 00 00 call 10fd4c <_Timespec_Divide_by_integer> (*print)( context, 10c9b5: 8b 4d 84 mov -0x7c(%ebp),%ecx 10c9b8: 8b 45 dc mov -0x24(%ebp),%eax 10c9bb: f7 e9 imul %ecx 10c9bd: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c9c3: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c9c9: c1 f8 06 sar $0x6,%eax 10c9cc: 8b 55 dc mov -0x24(%ebp),%edx 10c9cf: c1 fa 1f sar $0x1f,%edx 10c9d2: 29 d0 sub %edx,%eax 10c9d4: 50 push %eax 10c9d5: ff 75 d8 pushl -0x28(%ebp) 10c9d8: 8b 45 b4 mov -0x4c(%ebp),%eax 10c9db: f7 e9 imul %ecx 10c9dd: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c9e3: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c9e9: c1 f8 06 sar $0x6,%eax 10c9ec: 8b 55 b4 mov -0x4c(%ebp),%edx 10c9ef: c1 fa 1f sar $0x1f,%edx 10c9f2: 29 d0 sub %edx,%eax 10c9f4: 50 push %eax 10c9f5: ff 75 b0 pushl -0x50(%ebp) 10c9f8: 8b 45 ac mov -0x54(%ebp),%eax 10c9fb: f7 e9 imul %ecx 10c9fd: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) 10ca03: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10ca09: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10ca0f: c1 f8 06 sar $0x6,%eax 10ca12: 8b 55 ac mov -0x54(%ebp),%edx 10ca15: c1 fa 1f sar $0x1f,%edx 10ca18: 29 d0 sub %edx,%eax 10ca1a: 50 push %eax 10ca1b: ff 75 a8 pushl -0x58(%ebp) 10ca1e: 68 28 2a 12 00 push $0x122a28 10ca23: 56 push %esi 10ca24: ff 55 0c call *0xc(%ebp) 10ca27: 83 c4 30 add $0x30,%esp 10ca2a: e9 75 fe ff ff jmp 10c8a4 =============================================================================== 0010ca48 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 10ca48: 55 push %ebp 10ca49: 89 e5 mov %esp,%ebp 10ca4b: 53 push %ebx 10ca4c: 83 ec 04 sub $0x4,%esp 10ca4f: a1 90 9a 12 00 mov 0x129a90,%eax 10ca54: 40 inc %eax 10ca55: a3 90 9a 12 00 mov %eax,0x129a90 /* * 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 ; 10ca5a: 8b 1d a8 99 12 00 mov 0x1299a8,%ebx 10ca60: 3b 1d ac 99 12 00 cmp 0x1299ac,%ebx 10ca66: 77 15 ja 10ca7d <== NEVER TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { (void) rtems_rate_monotonic_reset_statistics( id ); 10ca68: 83 ec 0c sub $0xc,%esp 10ca6b: 53 push %ebx 10ca6c: e8 17 00 00 00 call 10ca88 * 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++ ) { 10ca71: 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 ; 10ca72: 83 c4 10 add $0x10,%esp 10ca75: 39 1d ac 99 12 00 cmp %ebx,0x1299ac 10ca7b: 73 eb jae 10ca68 /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 10ca7d: 8b 5d fc mov -0x4(%ebp),%ebx 10ca80: c9 leave } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 10ca81: e9 5a 28 00 00 jmp 10f2e0 <_Thread_Enable_dispatch> =============================================================================== 0010ca88 : */ rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id ) { 10ca88: 55 push %ebp 10ca89: 89 e5 mov %esp,%ebp 10ca8b: 57 push %edi 10ca8c: 53 push %ebx 10ca8d: 83 ec 14 sub $0x14,%esp Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); 10ca90: 8d 45 f4 lea -0xc(%ebp),%eax 10ca93: 50 push %eax 10ca94: ff 75 08 pushl 0x8(%ebp) 10ca97: 68 a0 99 12 00 push $0x1299a0 10ca9c: e8 ef 1c 00 00 call 10e790 <_Objects_Get> 10caa1: 89 c2 mov %eax,%edx switch ( location ) { 10caa3: 83 c4 10 add $0x10,%esp 10caa6: 8b 45 f4 mov -0xc(%ebp),%eax 10caa9: 85 c0 test %eax,%eax 10caab: 75 3b jne 10cae8 case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 10caad: 8d 5a 54 lea 0x54(%edx),%ebx 10cab0: b9 38 00 00 00 mov $0x38,%ecx 10cab5: 31 c0 xor %eax,%eax 10cab7: 89 df mov %ebx,%edi 10cab9: f3 aa rep stos %al,%es:(%edi) 10cabb: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10cac2: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10cac9: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10cad0: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) _Thread_Enable_dispatch(); 10cad7: e8 04 28 00 00 call 10f2e0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10cadc: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cade: 8d 65 f8 lea -0x8(%ebp),%esp 10cae1: 5b pop %ebx 10cae2: 5f pop %edi 10cae3: c9 leave 10cae4: c3 ret 10cae5: 8d 76 00 lea 0x0(%esi),%esi #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10cae8: b8 04 00 00 00 mov $0x4,%eax } 10caed: 8d 65 f8 lea -0x8(%ebp),%esp 10caf0: 5b pop %ebx 10caf1: 5f pop %edi 10caf2: c9 leave 10caf3: c3 ret =============================================================================== 00117294 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 117294: 55 push %ebp 117295: 89 e5 mov %esp,%ebp 117297: 57 push %edi 117298: 56 push %esi 117299: 53 push %ebx 11729a: 83 ec 1c sub $0x1c,%esp 11729d: 8b 7d 08 mov 0x8(%ebp),%edi 1172a0: 8b 75 0c mov 0xc(%ebp),%esi rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 1172a3: 85 ff test %edi,%edi 1172a5: 0f 84 c1 00 00 00 je 11736c return RTEMS_INVALID_NAME; if ( !starting_address ) 1172ab: 85 f6 test %esi,%esi 1172ad: 0f 84 e1 00 00 00 je 117394 return RTEMS_INVALID_ADDRESS; if ( !id ) 1172b3: 8b 45 1c mov 0x1c(%ebp),%eax 1172b6: 85 c0 test %eax,%eax 1172b8: 0f 84 d6 00 00 00 je 117394 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 1172be: 83 ec 0c sub $0xc,%esp 1172c1: ff 35 c0 09 14 00 pushl 0x1409c0 1172c7: e8 d8 24 00 00 call 1197a4 <_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 ); 1172cc: c7 04 24 20 08 14 00 movl $0x140820,(%esp) 1172d3: e8 38 3a 00 00 call 11ad10 <_Objects_Allocate> 1172d8: 89 c3 mov %eax,%ebx the_region = _Region_Allocate(); if ( !the_region ) 1172da: 83 c4 10 add $0x10,%esp 1172dd: 85 c0 test %eax,%eax 1172df: 0f 84 bf 00 00 00 je 1173a4 return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 1172e5: ff 75 14 pushl 0x14(%ebp) 1172e8: ff 75 10 pushl 0x10(%ebp) 1172eb: 56 push %esi 1172ec: 8d 40 68 lea 0x68(%eax),%eax 1172ef: 50 push %eax 1172f0: e8 27 36 00 00 call 11a91c <_Heap_Initialize> 1172f5: 89 43 5c mov %eax,0x5c(%ebx) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 1172f8: 83 c4 10 add $0x10,%esp 1172fb: 85 c0 test %eax,%eax 1172fd: 74 7d je 11737c return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 1172ff: 89 73 50 mov %esi,0x50(%ebx) the_region->length = length; 117302: 8b 45 10 mov 0x10(%ebp),%eax 117305: 89 43 54 mov %eax,0x54(%ebx) the_region->page_size = page_size; 117308: 8b 55 14 mov 0x14(%ebp),%edx 11730b: 89 53 58 mov %edx,0x58(%ebx) the_region->attribute_set = attribute_set; 11730e: 8b 45 18 mov 0x18(%ebp),%eax 117311: 89 43 60 mov %eax,0x60(%ebx) the_region->number_of_used_blocks = 0; 117314: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) _Thread_queue_Initialize( 11731b: 6a 06 push $0x6 11731d: 6a 40 push $0x40 11731f: a8 04 test $0x4,%al 117321: 0f 95 c0 setne %al 117324: 0f b6 c0 movzbl %al,%eax 117327: 50 push %eax 117328: 8d 43 10 lea 0x10(%ebx),%eax 11732b: 50 push %eax 11732c: e8 ff 50 00 00 call 11c430 <_Thread_queue_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 117331: 8b 43 08 mov 0x8(%ebx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 117334: 0f b7 c8 movzwl %ax,%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 117337: 8b 15 3c 08 14 00 mov 0x14083c,%edx 11733d: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 117340: 89 7b 0c mov %edi,0xc(%ebx) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 117343: 8b 55 1c mov 0x1c(%ebp),%edx 117346: 89 02 mov %eax,(%edx) 117348: 83 c4 10 add $0x10,%esp return_status = RTEMS_SUCCESSFUL; 11734b: 31 c0 xor %eax,%eax } } _RTEMS_Unlock_allocator(); 11734d: 83 ec 0c sub $0xc,%esp 117350: ff 35 c0 09 14 00 pushl 0x1409c0 117356: 89 45 e4 mov %eax,-0x1c(%ebp) 117359: e8 8e 24 00 00 call 1197ec <_API_Mutex_Unlock> return return_status; 11735e: 83 c4 10 add $0x10,%esp 117361: 8b 45 e4 mov -0x1c(%ebp),%eax } 117364: 8d 65 f4 lea -0xc(%ebp),%esp 117367: 5b pop %ebx 117368: 5e pop %esi 117369: 5f pop %edi 11736a: c9 leave 11736b: c3 ret { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 11736c: b8 03 00 00 00 mov $0x3,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 117371: 8d 65 f4 lea -0xc(%ebp),%esp 117374: 5b pop %ebx 117375: 5e pop %esi 117376: 5f pop %edi 117377: c9 leave 117378: c3 ret 117379: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 11737c: 83 ec 08 sub $0x8,%esp 11737f: 53 push %ebx 117380: 68 20 08 14 00 push $0x140820 117385: e8 fa 3c 00 00 call 11b084 <_Objects_Free> 11738a: 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; 11738d: b8 08 00 00 00 mov $0x8,%eax 117392: eb b9 jmp 11734d if ( !starting_address ) return RTEMS_INVALID_ADDRESS; if ( !id ) return RTEMS_INVALID_ADDRESS; 117394: b8 09 00 00 00 mov $0x9,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 117399: 8d 65 f4 lea -0xc(%ebp),%esp 11739c: 5b pop %ebx 11739d: 5e pop %esi 11739e: 5f pop %edi 11739f: c9 leave 1173a0: c3 ret 1173a1: 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; 1173a4: b8 05 00 00 00 mov $0x5,%eax 1173a9: eb a2 jmp 11734d =============================================================================== 001173ac : */ rtems_status_code rtems_region_delete( rtems_id id ) { 1173ac: 55 push %ebp 1173ad: 89 e5 mov %esp,%ebp 1173af: 53 push %ebx 1173b0: 83 ec 30 sub $0x30,%esp Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 1173b3: ff 35 c0 09 14 00 pushl 0x1409c0 1173b9: e8 e6 23 00 00 call 1197a4 <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 1173be: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1173c1: 8d 45 f4 lea -0xc(%ebp),%eax 1173c4: 50 push %eax 1173c5: ff 75 08 pushl 0x8(%ebp) 1173c8: 68 20 08 14 00 push $0x140820 1173cd: e8 f2 3d 00 00 call 11b1c4 <_Objects_Get_no_protection> switch ( location ) { 1173d2: 83 c4 10 add $0x10,%esp 1173d5: 8b 5d f4 mov -0xc(%ebp),%ebx 1173d8: 85 db test %ebx,%ebx 1173da: 74 1c je 1173f8 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 1173dc: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 1173e1: 83 ec 0c sub $0xc,%esp 1173e4: ff 35 c0 09 14 00 pushl 0x1409c0 1173ea: e8 fd 23 00 00 call 1197ec <_API_Mutex_Unlock> return return_status; } 1173ef: 89 d8 mov %ebx,%eax 1173f1: 8b 5d fc mov -0x4(%ebp),%ebx 1173f4: c9 leave 1173f5: c3 ret 1173f6: 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 ) 1173f8: 8b 48 64 mov 0x64(%eax),%ecx 1173fb: 85 c9 test %ecx,%ecx 1173fd: 74 09 je 117408 return_status = RTEMS_RESOURCE_IN_USE; 1173ff: bb 0c 00 00 00 mov $0xc,%ebx 117404: eb db jmp 1173e1 117406: 66 90 xchg %ax,%ax else { _Objects_Close( &_Region_Information, &the_region->Object ); 117408: 83 ec 08 sub $0x8,%esp 11740b: 50 push %eax 11740c: 68 20 08 14 00 push $0x140820 117411: 89 45 e4 mov %eax,-0x1c(%ebp) 117414: e8 73 39 00 00 call 11ad8c <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 117419: 58 pop %eax 11741a: 5a pop %edx 11741b: 8b 45 e4 mov -0x1c(%ebp),%eax 11741e: 50 push %eax 11741f: 68 20 08 14 00 push $0x140820 117424: e8 5b 3c 00 00 call 11b084 <_Objects_Free> 117429: 83 c4 10 add $0x10,%esp _Region_Free( the_region ); return_status = RTEMS_SUCCESSFUL; 11742c: 31 db xor %ebx,%ebx 11742e: eb b1 jmp 1173e1 =============================================================================== 00117430 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 117430: 55 push %ebp 117431: 89 e5 mov %esp,%ebp 117433: 56 push %esi 117434: 53 push %ebx 117435: 83 ec 10 sub $0x10,%esp 117438: 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 ) 11743b: 85 db test %ebx,%ebx 11743d: 74 75 je 1174b4 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 11743f: 83 ec 0c sub $0xc,%esp 117442: ff 35 c0 09 14 00 pushl 0x1409c0 117448: e8 57 23 00 00 call 1197a4 <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 11744d: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 117450: 8d 45 f0 lea -0x10(%ebp),%eax 117453: 50 push %eax 117454: ff 75 08 pushl 0x8(%ebp) 117457: 68 20 08 14 00 push $0x140820 11745c: e8 63 3d 00 00 call 11b1c4 <_Objects_Get_no_protection> 117461: 89 c6 mov %eax,%esi switch ( location ) { 117463: 83 c4 10 add $0x10,%esp 117466: 8b 45 f0 mov -0x10(%ebp),%eax 117469: 85 c0 test %eax,%eax 11746b: 74 1f je 11748c break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 11746d: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 117472: 83 ec 0c sub $0xc,%esp 117475: ff 35 c0 09 14 00 pushl 0x1409c0 11747b: e8 6c 23 00 00 call 1197ec <_API_Mutex_Unlock> return return_status; 117480: 83 c4 10 add $0x10,%esp } 117483: 89 d8 mov %ebx,%eax 117485: 8d 65 f8 lea -0x8(%ebp),%esp 117488: 5b pop %ebx 117489: 5e pop %esi 11748a: c9 leave 11748b: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: extend_ok = _Heap_Extend( 11748c: 8d 45 f4 lea -0xc(%ebp),%eax 11748f: 50 push %eax 117490: ff 75 10 pushl 0x10(%ebp) 117493: 53 push %ebx 117494: 8d 46 68 lea 0x68(%esi),%eax 117497: 50 push %eax 117498: e8 5f 2e 00 00 call 11a2fc <_Heap_Extend> starting_address, length, &amount_extended ); if ( extend_ok ) { 11749d: 83 c4 10 add $0x10,%esp 1174a0: 84 c0 test %al,%al 1174a2: 74 20 je 1174c4 the_region->length += amount_extended; 1174a4: 8b 45 f4 mov -0xc(%ebp),%eax 1174a7: 01 46 54 add %eax,0x54(%esi) the_region->maximum_segment_size += amount_extended; 1174aa: 01 46 5c add %eax,0x5c(%esi) return_status = RTEMS_SUCCESSFUL; 1174ad: 31 db xor %ebx,%ebx 1174af: eb c1 jmp 117472 1174b1: 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; 1174b4: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 1174b9: 89 d8 mov %ebx,%eax 1174bb: 8d 65 f8 lea -0x8(%ebp),%esp 1174be: 5b pop %ebx 1174bf: 5e pop %esi 1174c0: c9 leave 1174c1: c3 ret 1174c2: 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; 1174c4: bb 09 00 00 00 mov $0x9,%ebx 1174c9: eb a7 jmp 117472 =============================================================================== 001174cc : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { 1174cc: 55 push %ebp 1174cd: 89 e5 mov %esp,%ebp 1174cf: 53 push %ebx 1174d0: 83 ec 14 sub $0x14,%esp 1174d3: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 1174d6: 85 db test %ebx,%ebx 1174d8: 74 76 je 117550 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 1174da: 83 ec 0c sub $0xc,%esp 1174dd: ff 35 c0 09 14 00 pushl 0x1409c0 1174e3: e8 bc 22 00 00 call 1197a4 <_API_Mutex_Lock> 1174e8: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1174eb: 8d 45 f4 lea -0xc(%ebp),%eax 1174ee: 50 push %eax 1174ef: ff 75 08 pushl 0x8(%ebp) 1174f2: 68 20 08 14 00 push $0x140820 1174f7: e8 c8 3c 00 00 call 11b1c4 <_Objects_Get_no_protection> switch ( location ) { 1174fc: 83 c4 10 add $0x10,%esp 1174ff: 8b 55 f4 mov -0xc(%ebp),%edx 117502: 85 d2 test %edx,%edx 117504: 74 1e je 117524 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 117506: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 11750b: 83 ec 0c sub $0xc,%esp 11750e: ff 35 c0 09 14 00 pushl 0x1409c0 117514: e8 d3 22 00 00 call 1197ec <_API_Mutex_Unlock> return return_status; 117519: 83 c4 10 add $0x10,%esp } 11751c: 89 d8 mov %ebx,%eax 11751e: 8b 5d fc mov -0x4(%ebp),%ebx 117521: c9 leave 117522: c3 ret 117523: 90 nop the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; 117524: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) the_info->Used.total = 0; 11752b: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) the_info->Used.largest = 0; 117532: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 117539: 83 ec 08 sub $0x8,%esp 11753c: 53 push %ebx 11753d: 83 c0 68 add $0x68,%eax 117540: 50 push %eax 117541: e8 b2 31 00 00 call 11a6f8 <_Heap_Get_free_information> return_status = RTEMS_SUCCESSFUL; break; 117546: 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; 117549: 31 db xor %ebx,%ebx break; 11754b: eb be jmp 11750b 11754d: 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; 117550: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 117555: 89 d8 mov %ebx,%eax 117557: 8b 5d fc mov -0x4(%ebp),%ebx 11755a: c9 leave 11755b: c3 ret =============================================================================== 001175d4 : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 1175d4: 55 push %ebp 1175d5: 89 e5 mov %esp,%ebp 1175d7: 57 push %edi 1175d8: 56 push %esi 1175d9: 53 push %ebx 1175da: 83 ec 2c sub $0x2c,%esp 1175dd: 8b 75 0c mov 0xc(%ebp),%esi 1175e0: 8b 5d 18 mov 0x18(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 1175e3: 85 db test %ebx,%ebx 1175e5: 0f 84 a1 00 00 00 je 11768c return RTEMS_INVALID_ADDRESS; *segment = NULL; 1175eb: c7 03 00 00 00 00 movl $0x0,(%ebx) if ( size == 0 ) 1175f1: 85 f6 test %esi,%esi 1175f3: 75 0f jne 117604 return RTEMS_INVALID_SIZE; 1175f5: b8 08 00 00 00 mov $0x8,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 1175fa: 8d 65 f4 lea -0xc(%ebp),%esp 1175fd: 5b pop %ebx 1175fe: 5e pop %esi 1175ff: 5f pop %edi 117600: c9 leave 117601: c3 ret 117602: 66 90 xchg %ax,%ax *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 117604: 83 ec 0c sub $0xc,%esp 117607: ff 35 c0 09 14 00 pushl 0x1409c0 11760d: e8 92 21 00 00 call 1197a4 <_API_Mutex_Lock> executing = _Thread_Executing; 117612: a1 98 0b 14 00 mov 0x140b98,%eax 117617: 89 45 d4 mov %eax,-0x2c(%ebp) 11761a: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 11761d: 8d 45 e4 lea -0x1c(%ebp),%eax 117620: 50 push %eax 117621: ff 75 08 pushl 0x8(%ebp) 117624: 68 20 08 14 00 push $0x140820 117629: e8 96 3b 00 00 call 11b1c4 <_Objects_Get_no_protection> 11762e: 89 c7 mov %eax,%edi switch ( location ) { 117630: 83 c4 10 add $0x10,%esp 117633: 8b 45 e4 mov -0x1c(%ebp),%eax 117636: 85 c0 test %eax,%eax 117638: 75 2a jne 117664 case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 11763a: 3b 77 5c cmp 0x5c(%edi),%esi 11763d: 76 2d jbe 11766c return_status = RTEMS_INVALID_SIZE; 11763f: b8 08 00 00 00 mov $0x8,%eax default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117644: 83 ec 0c sub $0xc,%esp 117647: ff 35 c0 09 14 00 pushl 0x1409c0 11764d: 89 45 d0 mov %eax,-0x30(%ebp) 117650: e8 97 21 00 00 call 1197ec <_API_Mutex_Unlock> return return_status; 117655: 83 c4 10 add $0x10,%esp 117658: 8b 45 d0 mov -0x30(%ebp),%eax } 11765b: 8d 65 f4 lea -0xc(%ebp),%esp 11765e: 5b pop %ebx 11765f: 5e pop %esi 117660: 5f pop %edi 117661: c9 leave 117662: c3 ret 117663: 90 nop break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 117664: b8 04 00 00 00 mov $0x4,%eax 117669: eb d9 jmp 117644 11766b: 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 ); 11766c: 6a 00 push $0x0 11766e: 6a 00 push $0x0 117670: 56 push %esi RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uintptr_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 117671: 8d 47 68 lea 0x68(%edi),%eax 117674: 50 push %eax 117675: e8 ae 2a 00 00 call 11a128 <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 11767a: 83 c4 10 add $0x10,%esp 11767d: 85 c0 test %eax,%eax 11767f: 74 17 je 117698 the_region->number_of_used_blocks += 1; 117681: ff 47 64 incl 0x64(%edi) *segment = the_segment; 117684: 89 03 mov %eax,(%ebx) return_status = RTEMS_SUCCESSFUL; 117686: 31 c0 xor %eax,%eax 117688: eb ba jmp 117644 11768a: 66 90 xchg %ax,%ax rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) return RTEMS_INVALID_ADDRESS; 11768c: b8 09 00 00 00 mov $0x9,%eax 117691: e9 64 ff ff ff jmp 1175fa 117696: 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 ) ) { 117698: f6 45 10 01 testb $0x1,0x10(%ebp) 11769c: 74 07 je 1176a5 return_status = RTEMS_UNSATISFIED; 11769e: b8 0d 00 00 00 mov $0xd,%eax 1176a3: eb 9f jmp 117644 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1176a5: a1 10 09 14 00 mov 0x140910,%eax 1176aa: 40 inc %eax 1176ab: 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(); 1176b0: 83 ec 0c sub $0xc,%esp 1176b3: ff 35 c0 09 14 00 pushl 0x1409c0 1176b9: e8 2e 21 00 00 call 1197ec <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 1176be: 8d 47 10 lea 0x10(%edi),%eax 1176c1: 8b 55 d4 mov -0x2c(%ebp),%edx 1176c4: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 1176c7: 8b 4d 08 mov 0x8(%ebp),%ecx 1176ca: 89 4a 20 mov %ecx,0x20(%edx) executing->Wait.count = size; 1176cd: 89 72 24 mov %esi,0x24(%edx) executing->Wait.return_argument = segment; 1176d0: 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; 1176d3: 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 ); 1176da: 83 c4 0c add $0xc,%esp 1176dd: 68 f4 c4 11 00 push $0x11c4f4 1176e2: ff 75 14 pushl 0x14(%ebp) 1176e5: 50 push %eax 1176e6: e8 dd 4a 00 00 call 11c1c8 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 1176eb: e8 60 46 00 00 call 11bd50 <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 1176f0: 8b 55 d4 mov -0x2c(%ebp),%edx 1176f3: 8b 42 34 mov 0x34(%edx),%eax 1176f6: 83 c4 10 add $0x10,%esp 1176f9: e9 fc fe ff ff jmp 1175fa =============================================================================== 001177b4 : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 1177b4: 55 push %ebp 1177b5: 89 e5 mov %esp,%ebp 1177b7: 56 push %esi 1177b8: 53 push %ebx 1177b9: 83 ec 20 sub $0x20,%esp 1177bc: 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 ) 1177bf: 85 db test %ebx,%ebx 1177c1: 0f 84 89 00 00 00 je 117850 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 1177c7: 83 ec 0c sub $0xc,%esp 1177ca: ff 35 c0 09 14 00 pushl 0x1409c0 1177d0: e8 cf 1f 00 00 call 1197a4 <_API_Mutex_Lock> 1177d5: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1177d8: 8d 45 f0 lea -0x10(%ebp),%eax 1177db: 50 push %eax 1177dc: ff 75 08 pushl 0x8(%ebp) 1177df: 68 20 08 14 00 push $0x140820 1177e4: e8 db 39 00 00 call 11b1c4 <_Objects_Get_no_protection> 1177e9: 89 c6 mov %eax,%esi switch ( location ) { 1177eb: 83 c4 10 add $0x10,%esp 1177ee: 8b 45 f0 mov -0x10(%ebp),%eax 1177f1: 85 c0 test %eax,%eax 1177f3: 74 1f je 117814 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1177f5: 83 ec 0c sub $0xc,%esp 1177f8: ff 35 c0 09 14 00 pushl 0x1409c0 1177fe: e8 e9 1f 00 00 call 1197ec <_API_Mutex_Unlock> return return_status; 117803: 83 c4 10 add $0x10,%esp 117806: b8 04 00 00 00 mov $0x4,%eax } 11780b: 8d 65 f8 lea -0x8(%ebp),%esp 11780e: 5b pop %ebx 11780f: 5e pop %esi 117810: c9 leave 117811: c3 ret 117812: 66 90 xchg %ax,%ax case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 117814: 83 ec 0c sub $0xc,%esp 117817: 8d 45 f4 lea -0xc(%ebp),%eax 11781a: 50 push %eax 11781b: 8d 45 ec lea -0x14(%ebp),%eax 11781e: 50 push %eax 11781f: ff 75 10 pushl 0x10(%ebp) 117822: ff 75 0c pushl 0xc(%ebp) 117825: 8d 46 68 lea 0x68(%esi),%eax 117828: 50 push %eax 117829: e8 f6 32 00 00 call 11ab24 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 11782e: 8b 55 ec mov -0x14(%ebp),%edx 117831: 89 13 mov %edx,(%ebx) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 117833: 83 c4 20 add $0x20,%esp 117836: 85 c0 test %eax,%eax 117838: 75 22 jne 11785c _Region_Process_queue( the_region ); /* unlocks allocator */ 11783a: 83 ec 0c sub $0xc,%esp 11783d: 56 push %esi 11783e: e8 51 71 00 00 call 11e994 <_Region_Process_queue> 117843: 83 c4 10 add $0x10,%esp else _RTEMS_Unlock_allocator(); if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; 117846: 31 c0 xor %eax,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117848: 8d 65 f8 lea -0x8(%ebp),%esp 11784b: 5b pop %ebx 11784c: 5e pop %esi 11784d: c9 leave 11784e: c3 ret 11784f: 90 nop rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) return RTEMS_INVALID_ADDRESS; 117850: b8 09 00 00 00 mov $0x9,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117855: 8d 65 f8 lea -0x8(%ebp),%esp 117858: 5b pop %ebx 117859: 5e pop %esi 11785a: c9 leave 11785b: c3 ret _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 11785c: 83 ec 0c sub $0xc,%esp 11785f: ff 35 c0 09 14 00 pushl 0x1409c0 117865: 89 45 e4 mov %eax,-0x1c(%ebp) 117868: e8 7f 1f 00 00 call 1197ec <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 11786d: 83 c4 10 add $0x10,%esp return RTEMS_UNSATISFIED; 117870: 8b 45 e4 mov -0x1c(%ebp),%eax 117873: 48 dec %eax 117874: 0f 94 c0 sete %al 117877: 0f b6 c0 movzbl %al,%eax 11787a: 8d 04 85 09 00 00 00 lea 0x9(,%eax,4),%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117881: 8d 65 f8 lea -0x8(%ebp),%esp 117884: 5b pop %ebx 117885: 5e pop %esi 117886: c9 leave 117887: c3 ret =============================================================================== 00117888 : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 117888: 55 push %ebp 117889: 89 e5 mov %esp,%ebp 11788b: 53 push %ebx 11788c: 83 ec 20 sub $0x20,%esp uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 11788f: ff 35 c0 09 14 00 pushl 0x1409c0 117895: e8 0a 1f 00 00 call 1197a4 <_API_Mutex_Lock> 11789a: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 11789d: 8d 45 f4 lea -0xc(%ebp),%eax 1178a0: 50 push %eax 1178a1: ff 75 08 pushl 0x8(%ebp) 1178a4: 68 20 08 14 00 push $0x140820 1178a9: e8 16 39 00 00 call 11b1c4 <_Objects_Get_no_protection> 1178ae: 89 c3 mov %eax,%ebx switch ( location ) { 1178b0: 83 c4 10 add $0x10,%esp 1178b3: 8b 45 f4 mov -0xc(%ebp),%eax 1178b6: 85 c0 test %eax,%eax 1178b8: 75 1e jne 1178d8 RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 1178ba: 83 ec 08 sub $0x8,%esp 1178bd: ff 75 0c pushl 0xc(%ebp) 1178c0: 8d 43 68 lea 0x68(%ebx),%eax 1178c3: 50 push %eax 1178c4: e8 cb 2c 00 00 call 11a594 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 1178c9: 83 c4 10 add $0x10,%esp 1178cc: 84 c0 test %al,%al 1178ce: 75 28 jne 1178f8 return_status = RTEMS_INVALID_ADDRESS; 1178d0: bb 09 00 00 00 mov $0x9,%ebx 1178d5: eb 06 jmp 1178dd 1178d7: 90 nop break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 1178d8: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 1178dd: 83 ec 0c sub $0xc,%esp 1178e0: ff 35 c0 09 14 00 pushl 0x1409c0 1178e6: e8 01 1f 00 00 call 1197ec <_API_Mutex_Unlock> return return_status; 1178eb: 83 c4 10 add $0x10,%esp } 1178ee: 89 d8 mov %ebx,%eax 1178f0: 8b 5d fc mov -0x4(%ebp),%ebx 1178f3: c9 leave 1178f4: c3 ret 1178f5: 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; 1178f8: ff 4b 64 decl 0x64(%ebx) _Region_Process_queue(the_region); /* unlocks allocator */ 1178fb: 83 ec 0c sub $0xc,%esp 1178fe: 53 push %ebx 1178ff: e8 90 70 00 00 call 11e994 <_Region_Process_queue> return RTEMS_SUCCESSFUL; 117904: 83 c4 10 add $0x10,%esp 117907: 31 db xor %ebx,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 117909: 89 d8 mov %ebx,%eax 11790b: 8b 5d fc mov -0x4(%ebp),%ebx 11790e: c9 leave 11790f: c3 ret =============================================================================== 0010b47c : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 10b47c: 55 push %ebp 10b47d: 89 e5 mov %esp,%ebp 10b47f: 57 push %edi 10b480: 56 push %esi 10b481: 53 push %ebx 10b482: 83 ec 3c sub $0x3c,%esp 10b485: 8b 75 08 mov 0x8(%ebp),%esi 10b488: 8b 5d 10 mov 0x10(%ebp),%ebx 10b48b: 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 ) ) 10b48e: 85 f6 test %esi,%esi 10b490: 74 4a je 10b4dc return RTEMS_INVALID_NAME; if ( !id ) 10b492: 85 ff test %edi,%edi 10b494: 0f 84 f6 00 00 00 je 10b590 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 10b49a: 89 da mov %ebx,%edx 10b49c: 81 e2 c0 00 00 00 and $0xc0,%edx 10b4a2: 74 48 je 10b4ec */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); 10b4a4: 89 d8 mov %ebx,%eax 10b4a6: 83 e0 30 and $0x30,%eax _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10b4a9: 83 f8 10 cmp $0x10,%eax 10b4ac: 74 0e je 10b4bc } if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; 10b4ae: b8 0b 00 00 00 mov $0xb,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b4b3: 8d 65 f4 lea -0xc(%ebp),%esp 10b4b6: 5b pop %ebx 10b4b7: 5e pop %esi 10b4b8: 5f pop %edi 10b4b9: c9 leave 10b4ba: c3 ret 10b4bb: 90 nop #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10b4bc: f6 c3 04 test $0x4,%bl 10b4bf: 74 ed je 10b4ae _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 10b4c1: 81 fa c0 00 00 00 cmp $0xc0,%edx 10b4c7: 74 e5 je 10b4ae 10b4c9: 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 ) ) 10b4ce: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b4d2: 76 1f jbe 10b4f3 return RTEMS_INVALID_NUMBER; 10b4d4: b8 0a 00 00 00 mov $0xa,%eax 10b4d9: eb d8 jmp 10b4b3 10b4db: 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; 10b4dc: b8 03 00 00 00 mov $0x3,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b4e1: 8d 65 f4 lea -0xc(%ebp),%esp 10b4e4: 5b pop %ebx 10b4e5: 5e pop %esi 10b4e6: 5f pop %edi 10b4e7: c9 leave 10b4e8: c3 ret 10b4e9: 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 ) ) 10b4ec: 89 d9 mov %ebx,%ecx 10b4ee: 83 e1 30 and $0x30,%ecx 10b4f1: 75 db jne 10b4ce rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b4f3: a1 d0 64 12 00 mov 0x1264d0,%eax 10b4f8: 40 inc %eax 10b4f9: 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 ); 10b4fe: 83 ec 0c sub $0xc,%esp 10b501: 68 20 64 12 00 push $0x126420 10b506: 89 4d c4 mov %ecx,-0x3c(%ebp) 10b509: e8 ea 13 00 00 call 10c8f8 <_Objects_Allocate> 10b50e: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 10b510: 83 c4 10 add $0x10,%esp 10b513: 85 c0 test %eax,%eax 10b515: 8b 4d c4 mov -0x3c(%ebp),%ecx 10b518: 0f 84 ba 00 00 00 je 10b5d8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 10b51e: 89 58 10 mov %ebx,0x10(%eax) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 10b521: 85 c9 test %ecx,%ecx 10b523: 74 77 je 10b59c /* * 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; 10b525: 31 c0 xor %eax,%eax 10b527: f6 c3 04 test $0x4,%bl 10b52a: 0f 95 c0 setne %al 10b52d: 89 45 d8 mov %eax,-0x28(%ebp) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 10b530: 83 f9 10 cmp $0x10,%ecx 10b533: 0f 84 ae 00 00 00 je 10b5e7 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; 10b539: c7 45 d0 01 00 00 00 movl $0x1,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b540: c6 45 d4 00 movb $0x0,-0x2c(%ebp) } mutex_status = _CORE_mutex_Initialize( 10b544: 50 push %eax 10b545: 31 c0 xor %eax,%eax 10b547: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b54b: 0f 94 c0 sete %al 10b54e: 50 push %eax 10b54f: 8d 45 d0 lea -0x30(%ebp),%eax 10b552: 50 push %eax 10b553: 8d 42 14 lea 0x14(%edx),%eax 10b556: 50 push %eax 10b557: 89 55 c4 mov %edx,-0x3c(%ebp) 10b55a: e8 91 0b 00 00 call 10c0f0 <_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 ) { 10b55f: 83 c4 10 add $0x10,%esp 10b562: 83 f8 05 cmp $0x5,%eax 10b565: 8b 55 c4 mov -0x3c(%ebp),%edx 10b568: 0f 84 a9 00 00 00 je 10b617 Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10b56e: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10b571: 0f b7 d8 movzwl %ax,%ebx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b574: 8b 0d 3c 64 12 00 mov 0x12643c,%ecx 10b57a: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10b57d: 89 72 0c mov %esi,0xc(%edx) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 10b580: 89 07 mov %eax,(%edi) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 10b582: e8 75 23 00 00 call 10d8fc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b587: 31 c0 xor %eax,%eax 10b589: e9 25 ff ff ff jmp 10b4b3 10b58e: 66 90 xchg %ax,%ax if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10b590: b8 09 00 00 00 mov $0x9,%eax 10b595: e9 19 ff ff ff jmp 10b4b3 10b59a: 66 90 xchg %ax,%ax */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 10b59c: 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; 10b5a3: 31 c0 xor %eax,%eax 10b5a5: f6 c3 04 test $0x4,%bl 10b5a8: 0f 95 c0 setne %al 10b5ab: 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; 10b5ae: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 10b5b5: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) _CORE_semaphore_Initialize( 10b5bc: 51 push %ecx 10b5bd: ff 75 0c pushl 0xc(%ebp) 10b5c0: 8d 45 e0 lea -0x20(%ebp),%eax 10b5c3: 50 push %eax 10b5c4: 8d 42 14 lea 0x14(%edx),%eax 10b5c7: 50 push %eax 10b5c8: 89 55 c4 mov %edx,-0x3c(%ebp) 10b5cb: e8 b0 0d 00 00 call 10c380 <_CORE_semaphore_Initialize> 10b5d0: 83 c4 10 add $0x10,%esp 10b5d3: 8b 55 c4 mov -0x3c(%ebp),%edx 10b5d6: eb 96 jmp 10b56e _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 10b5d8: e8 1f 23 00 00 call 10d8fc <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10b5dd: b8 05 00 00 00 mov $0x5,%eax 10b5e2: e9 cc fe ff ff jmp 10b4b3 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; 10b5e7: 8b 45 14 mov 0x14(%ebp),%eax 10b5ea: 89 45 dc mov %eax,-0x24(%ebp) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10b5ed: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b5f4: c6 45 d4 00 movb $0x0,-0x2c(%ebp) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 10b5f8: 83 7d d8 01 cmpl $0x1,-0x28(%ebp) 10b5fc: 0f 85 42 ff ff ff jne 10b544 if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 10b602: f6 c3 40 test $0x40,%bl 10b605: 74 30 je 10b637 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10b607: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b60e: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b612: e9 2d ff ff ff jmp 10b544 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b617: 83 ec 08 sub $0x8,%esp 10b61a: 52 push %edx 10b61b: 68 20 64 12 00 push $0x126420 10b620: e8 47 16 00 00 call 10cc6c <_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(); 10b625: e8 d2 22 00 00 call 10d8fc <_Thread_Enable_dispatch> return RTEMS_INVALID_PRIORITY; 10b62a: 83 c4 10 add $0x10,%esp 10b62d: b8 13 00 00 00 mov $0x13,%eax 10b632: e9 7c fe ff ff jmp 10b4b3 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 ) ) { 10b637: 81 e3 80 00 00 00 and $0x80,%ebx 10b63d: 0f 84 01 ff ff ff je 10b544 <== NEVER TAKEN the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 10b643: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b64a: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b64e: e9 f1 fe ff ff jmp 10b544 =============================================================================== 0010b654 : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 10b654: 55 push %ebp 10b655: 89 e5 mov %esp,%ebp 10b657: 53 push %ebx 10b658: 83 ec 18 sub $0x18,%esp register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); 10b65b: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) _Objects_Get( &_Semaphore_Information, id, location ); 10b65e: 50 push %eax 10b65f: ff 75 08 pushl 0x8(%ebp) 10b662: 68 20 64 12 00 push $0x126420 10b667: e8 40 17 00 00 call 10cdac <_Objects_Get> 10b66c: 89 c3 mov %eax,%ebx switch ( location ) { 10b66e: 83 c4 10 add $0x10,%esp 10b671: 8b 4d f4 mov -0xc(%ebp),%ecx 10b674: 85 c9 test %ecx,%ecx 10b676: 74 0c je 10b684 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b678: b8 04 00 00 00 mov $0x4,%eax } 10b67d: 8b 5d fc mov -0x4(%ebp),%ebx 10b680: c9 leave 10b681: c3 ret 10b682: 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); 10b684: 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) ) { 10b687: 83 e0 30 and $0x30,%eax 10b68a: 74 58 je 10b6e4 if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 10b68c: 8b 53 64 mov 0x64(%ebx),%edx 10b68f: 85 d2 test %edx,%edx 10b691: 75 15 jne 10b6a8 10b693: 83 f8 20 cmp $0x20,%eax 10b696: 74 10 je 10b6a8 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 10b698: e8 5f 22 00 00 call 10d8fc <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 10b69d: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b6a2: 8b 5d fc mov -0x4(%ebp),%ebx 10b6a5: c9 leave 10b6a6: c3 ret 10b6a7: 90 nop !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 10b6a8: 50 push %eax 10b6a9: 6a 03 push $0x3 10b6ab: 6a 00 push $0x0 10b6ad: 8d 43 14 lea 0x14(%ebx),%eax 10b6b0: 50 push %eax 10b6b1: e8 2e 0a 00 00 call 10c0e4 <_CORE_mutex_Flush> 10b6b6: 83 c4 10 add $0x10,%esp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 10b6b9: 83 ec 08 sub $0x8,%esp 10b6bc: 53 push %ebx 10b6bd: 68 20 64 12 00 push $0x126420 10b6c2: e8 ad 12 00 00 call 10c974 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b6c7: 58 pop %eax 10b6c8: 5a pop %edx 10b6c9: 53 push %ebx 10b6ca: 68 20 64 12 00 push $0x126420 10b6cf: e8 98 15 00 00 call 10cc6c <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 10b6d4: e8 23 22 00 00 call 10d8fc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b6d9: 83 c4 10 add $0x10,%esp 10b6dc: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b6de: 8b 5d fc mov -0x4(%ebp),%ebx 10b6e1: c9 leave 10b6e2: c3 ret 10b6e3: 90 nop &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 10b6e4: 51 push %ecx 10b6e5: 6a 02 push $0x2 10b6e7: 6a 00 push $0x0 10b6e9: 8d 43 14 lea 0x14(%ebx),%eax 10b6ec: 50 push %eax 10b6ed: e8 82 0c 00 00 call 10c374 <_CORE_semaphore_Flush> 10b6f2: 83 c4 10 add $0x10,%esp 10b6f5: eb c2 jmp 10b6b9 =============================================================================== 0010b6f8 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 10b6f8: 55 push %ebp 10b6f9: 89 e5 mov %esp,%ebp 10b6fb: 57 push %edi 10b6fc: 56 push %esi 10b6fd: 53 push %ebx 10b6fe: 83 ec 1c sub $0x1c,%esp 10b701: 8b 5d 08 mov 0x8(%ebp),%ebx 10b704: 8b 75 0c mov 0xc(%ebp),%esi 10b707: 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 ); 10b70a: 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 ); 10b70d: 50 push %eax 10b70e: 8d 45 e4 lea -0x1c(%ebp),%eax 10b711: 50 push %eax 10b712: 53 push %ebx 10b713: 68 20 64 12 00 push $0x126420 10b718: e8 37 16 00 00 call 10cd54 <_Objects_Get_isr_disable> switch ( location ) { 10b71d: 83 c4 10 add $0x10,%esp 10b720: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b723: 85 c9 test %ecx,%ecx 10b725: 74 0d je 10b734 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b727: b8 04 00 00 00 mov $0x4,%eax } 10b72c: 8d 65 f4 lea -0xc(%ebp),%esp 10b72f: 5b pop %ebx 10b730: 5e pop %esi 10b731: 5f pop %edi 10b732: c9 leave 10b733: 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) ) { 10b734: f6 40 10 30 testb $0x30,0x10(%eax) 10b738: 74 36 je 10b770 _CORE_mutex_Seize( 10b73a: 83 ec 0c sub $0xc,%esp 10b73d: ff 75 e0 pushl -0x20(%ebp) 10b740: 57 push %edi */ RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait ( rtems_option option_set ) { return (option_set & RTEMS_NO_WAIT) ? true : false; 10b741: 83 e6 01 and $0x1,%esi 10b744: 83 f6 01 xor $0x1,%esi 10b747: 56 push %esi 10b748: 53 push %ebx 10b749: 83 c0 14 add $0x14,%eax 10b74c: 50 push %eax 10b74d: e8 96 0a 00 00 call 10c1e8 <_CORE_mutex_Seize> id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10b752: 83 c4 14 add $0x14,%esp _Thread_Executing->Wait.return_code ); 10b755: 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( 10b75a: ff 70 34 pushl 0x34(%eax) 10b75d: e8 12 01 00 00 call 10b874 <_Semaphore_Translate_core_mutex_return_code> 10b762: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b765: 8d 65 f4 lea -0xc(%ebp),%esp 10b768: 5b pop %ebx 10b769: 5e pop %esi 10b76a: 5f pop %edi 10b76b: c9 leave 10b76c: c3 ret 10b76d: 8d 76 00 lea 0x0(%esi),%esi { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10b770: 8b 15 58 67 12 00 mov 0x126758,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10b776: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( the_semaphore->count != 0 ) { 10b77d: 8b 48 5c mov 0x5c(%eax),%ecx 10b780: 85 c9 test %ecx,%ecx 10b782: 75 2c jne 10b7b0 the_semaphore->count -= 1; _ISR_Enable( *level_p ); return; } if ( !wait ) { 10b784: 83 e6 01 and $0x1,%esi 10b787: 74 33 je 10b7bc _ISR_Enable( *level_p ); 10b789: ff 75 e0 pushl -0x20(%ebp) 10b78c: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 10b78d: 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( 10b794: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code ); 10b797: 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( 10b79c: ff 70 34 pushl 0x34(%eax) 10b79f: e8 e0 00 00 00 call 10b884 <_Semaphore_Translate_core_semaphore_return_code> 10b7a4: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b7a7: 8d 65 f4 lea -0xc(%ebp),%esp 10b7aa: 5b pop %ebx 10b7ab: 5e pop %esi 10b7ac: 5f pop %edi 10b7ad: c9 leave 10b7ae: c3 ret 10b7af: 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; 10b7b0: 49 dec %ecx 10b7b1: 89 48 5c mov %ecx,0x5c(%eax) _ISR_Enable( *level_p ); 10b7b4: ff 75 e0 pushl -0x20(%ebp) 10b7b7: 9d popf 10b7b8: eb da jmp 10b794 10b7ba: 66 90 xchg %ax,%ax 10b7bc: 8b 0d d0 64 12 00 mov 0x1264d0,%ecx 10b7c2: 41 inc %ecx 10b7c3: 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; 10b7c9: 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; 10b7d0: 83 c0 14 add $0x14,%eax 10b7d3: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10b7d6: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( *level_p ); 10b7d9: ff 75 e0 pushl -0x20(%ebp) 10b7dc: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 10b7dd: 52 push %edx 10b7de: 68 a0 e0 10 00 push $0x10e0a0 10b7e3: 57 push %edi 10b7e4: 50 push %eax 10b7e5: e8 8a 25 00 00 call 10dd74 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10b7ea: e8 0d 21 00 00 call 10d8fc <_Thread_Enable_dispatch> 10b7ef: 83 c4 10 add $0x10,%esp 10b7f2: eb a0 jmp 10b794 =============================================================================== 0010b7f4 : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 10b7f4: 55 push %ebp 10b7f5: 89 e5 mov %esp,%ebp 10b7f7: 53 push %ebx 10b7f8: 83 ec 18 sub $0x18,%esp 10b7fb: 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 ); 10b7fe: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) _Objects_Get( &_Semaphore_Information, id, location ); 10b801: 50 push %eax 10b802: 53 push %ebx 10b803: 68 20 64 12 00 push $0x126420 10b808: e8 9f 15 00 00 call 10cdac <_Objects_Get> switch ( location ) { 10b80d: 83 c4 10 add $0x10,%esp 10b810: 8b 55 f4 mov -0xc(%ebp),%edx 10b813: 85 d2 test %edx,%edx 10b815: 74 0d je 10b824 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b817: b8 04 00 00 00 mov $0x4,%eax } 10b81c: 8b 5d fc mov -0x4(%ebp),%ebx 10b81f: c9 leave 10b820: c3 ret 10b821: 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) ) { 10b824: f6 40 10 30 testb $0x30,0x10(%eax) 10b828: 75 26 jne 10b850 MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); } else { semaphore_status = _CORE_semaphore_Surrender( 10b82a: 52 push %edx 10b82b: 6a 00 push $0x0 10b82d: 53 push %ebx 10b82e: 83 c0 14 add $0x14,%eax 10b831: 50 push %eax 10b832: e8 89 0b 00 00 call 10c3c0 <_CORE_semaphore_Surrender> 10b837: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b839: e8 be 20 00 00 call 10d8fc <_Thread_Enable_dispatch> return 10b83e: 89 1c 24 mov %ebx,(%esp) 10b841: e8 3e 00 00 00 call 10b884 <_Semaphore_Translate_core_semaphore_return_code> 10b846: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b849: 8b 5d fc mov -0x4(%ebp),%ebx 10b84c: c9 leave 10b84d: c3 ret 10b84e: 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( 10b850: 51 push %ecx 10b851: 6a 00 push $0x0 10b853: 53 push %ebx 10b854: 83 c0 14 add $0x14,%eax 10b857: 50 push %eax 10b858: e8 2b 0a 00 00 call 10c288 <_CORE_mutex_Surrender> 10b85d: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b85f: e8 98 20 00 00 call 10d8fc <_Thread_Enable_dispatch> return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 10b864: 89 1c 24 mov %ebx,(%esp) 10b867: e8 08 00 00 00 call 10b874 <_Semaphore_Translate_core_mutex_return_code> 10b86c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b86f: 8b 5d fc mov -0x4(%ebp),%ebx 10b872: c9 leave 10b873: c3 ret =============================================================================== 00117da8 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 117da8: 55 push %ebp 117da9: 89 e5 mov %esp,%ebp 117dab: 53 push %ebx 117dac: 83 ec 14 sub $0x14,%esp 117daf: 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 ) 117db2: 85 db test %ebx,%ebx 117db4: 75 0a jne 117dc0 return RTEMS_INVALID_NUMBER; 117db6: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117dbb: 8b 5d fc mov -0x4(%ebp),%ebx 117dbe: c9 leave 117dbf: c3 ret ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 117dc0: 83 ec 08 sub $0x8,%esp 117dc3: 8d 45 f4 lea -0xc(%ebp),%eax 117dc6: 50 push %eax 117dc7: ff 75 08 pushl 0x8(%ebp) 117dca: e8 a5 3f 00 00 call 11bd74 <_Thread_Get> switch ( location ) { 117dcf: 83 c4 10 add $0x10,%esp 117dd2: 8b 55 f4 mov -0xc(%ebp),%edx 117dd5: 85 d2 test %edx,%edx 117dd7: 74 0b je 117de4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 117dd9: b8 04 00 00 00 mov $0x4,%eax } 117dde: 8b 5d fc mov -0x4(%ebp),%ebx 117de1: c9 leave 117de2: c3 ret 117de3: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 117de4: 8b 90 e4 00 00 00 mov 0xe4(%eax),%edx asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 117dea: 8b 4a 0c mov 0xc(%edx),%ecx 117ded: 85 c9 test %ecx,%ecx 117def: 74 3f je 117e30 if ( asr->is_enabled ) { 117df1: 80 7a 08 00 cmpb $0x0,0x8(%edx) 117df5: 74 25 je 117e1c rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 117df7: 9c pushf 117df8: fa cli 117df9: 59 pop %ecx *signal_set |= signals; 117dfa: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 117dfd: 51 push %ecx 117dfe: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 117dff: 8b 15 94 0b 14 00 mov 0x140b94,%edx 117e05: 85 d2 test %edx,%edx 117e07: 74 1b je 117e24 117e09: 3b 05 98 0b 14 00 cmp 0x140b98,%eax 117e0f: 75 13 jne 117e24 <== NEVER TAKEN _Thread_Dispatch_necessary = true; 117e11: c6 05 a4 0b 14 00 01 movb $0x1,0x140ba4 117e18: eb 0a jmp 117e24 117e1a: 66 90 xchg %ax,%ax rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 117e1c: 9c pushf 117e1d: fa cli 117e1e: 58 pop %eax *signal_set |= signals; 117e1f: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 117e22: 50 push %eax 117e23: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 117e24: e8 27 3f 00 00 call 11bd50 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 117e29: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117e2b: 8b 5d fc mov -0x4(%ebp),%ebx 117e2e: c9 leave 117e2f: c3 ret _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 117e30: e8 1b 3f 00 00 call 11bd50 <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 117e35: b8 0b 00 00 00 mov $0xb,%eax 117e3a: e9 7c ff ff ff jmp 117dbb =============================================================================== 0010b894 : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { 10b894: 55 push %ebp 10b895: 89 e5 mov %esp,%ebp 10b897: 57 push %edi 10b898: 56 push %esi 10b899: 53 push %ebx 10b89a: 83 ec 1c sub $0x1c,%esp 10b89d: 8b 5d 08 mov 0x8(%ebp),%ebx 10b8a0: 8b 7d 0c mov 0xc(%ebp),%edi 10b8a3: 8b 75 1c mov 0x1c(%ebp),%esi Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10b8a6: 85 f6 test %esi,%esi 10b8a8: 0f 84 3e 01 00 00 je 10b9ec return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10b8ae: 85 db test %ebx,%ebx 10b8b0: 0f 84 d2 00 00 00 je 10b988 /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 10b8b6: f7 45 18 00 80 00 00 testl $0x8000,0x18(%ebp) 10b8bd: 75 17 jne 10b8d6 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10b8bf: 85 ff test %edi,%edi 10b8c1: 0f 84 b1 00 00 00 je 10b978 ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 10b8c7: 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 ) && 10b8ce: 39 c7 cmp %eax,%edi 10b8d0: 0f 87 a2 00 00 00 ja 10b978 */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10b8d6: 83 ec 0c sub $0xc,%esp 10b8d9: ff 35 80 65 12 00 pushl 0x126580 10b8df: e8 78 06 00 00 call 10bf5c <_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 ); 10b8e4: c7 04 24 60 64 12 00 movl $0x126460,(%esp) 10b8eb: e8 08 10 00 00 call 10c8f8 <_Objects_Allocate> 10b8f0: 89 c2 mov %eax,%edx * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 10b8f2: 83 c4 10 add $0x10,%esp 10b8f5: 85 c0 test %eax,%eax 10b8f7: 0f 84 cf 00 00 00 je 10b9cc /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 10b8fd: 50 push %eax 10b8fe: 53 push %ebx */ RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level ( Modes_Control mode_set ) { return ( mode_set & RTEMS_INTERRUPT_MASK ); 10b8ff: 8b 45 14 mov 0x14(%ebp),%eax 10b902: 83 e0 01 and $0x1,%eax 10b905: 50 push %eax 10b906: 6a 00 push $0x0 10b908: 31 c0 xor %eax,%eax 10b90a: f7 45 14 00 02 00 00 testl $0x200,0x14(%ebp) 10b911: 0f 95 c0 setne %al 10b914: 50 push %eax 10b915: 31 c0 xor %eax,%eax 10b917: f7 45 14 00 01 00 00 testl $0x100,0x14(%ebp) 10b91e: 0f 94 c0 sete %al 10b921: 50 push %eax 10b922: 57 push %edi */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_floating_point( rtems_attribute attribute_set ) { return ( attribute_set & RTEMS_FLOATING_POINT ) ? true : false; 10b923: 8b 45 18 mov 0x18(%ebp),%eax 10b926: 83 e0 01 and $0x1,%eax 10b929: 50 push %eax 10b92a: ff 75 10 pushl 0x10(%ebp) 10b92d: 6a 00 push $0x0 10b92f: 52 push %edx 10b930: 68 60 64 12 00 push $0x126460 10b935: 89 55 e4 mov %edx,-0x1c(%ebp) 10b938: e8 5b 20 00 00 call 10d998 <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 10b93d: 83 c4 30 add $0x30,%esp 10b940: 84 c0 test %al,%al 10b942: 8b 55 e4 mov -0x1c(%ebp),%edx 10b945: 74 51 je 10b998 _RTEMS_Unlock_allocator(); return RTEMS_UNSATISFIED; } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 10b947: 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( 10b94d: 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; 10b954: 0f 94 40 08 sete 0x8(%eax) *id = the_thread->Object.id; 10b958: 8b 42 08 mov 0x8(%edx),%eax 10b95b: 89 06 mov %eax,(%esi) ); } #endif _RTEMS_Unlock_allocator(); 10b95d: 83 ec 0c sub $0xc,%esp 10b960: ff 35 80 65 12 00 pushl 0x126580 10b966: e8 39 06 00 00 call 10bfa4 <_API_Mutex_Unlock> return RTEMS_SUCCESSFUL; 10b96b: 83 c4 10 add $0x10,%esp 10b96e: 31 c0 xor %eax,%eax } 10b970: 8d 65 f4 lea -0xc(%ebp),%esp 10b973: 5b pop %ebx 10b974: 5e pop %esi 10b975: 5f pop %edi 10b976: c9 leave 10b977: 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; 10b978: b8 13 00 00 00 mov $0x13,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b97d: 8d 65 f4 lea -0xc(%ebp),%esp 10b980: 5b pop %ebx 10b981: 5e pop %esi 10b982: 5f pop %edi 10b983: c9 leave 10b984: c3 ret 10b985: 8d 76 00 lea 0x0(%esi),%esi if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10b988: b8 03 00 00 00 mov $0x3,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b98d: 8d 65 f4 lea -0xc(%ebp),%esp 10b990: 5b pop %ebx 10b991: 5e pop %esi 10b992: 5f pop %edi 10b993: c9 leave 10b994: c3 ret 10b995: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 10b998: 83 ec 0c sub $0xc,%esp 10b99b: ff 72 08 pushl 0x8(%edx) 10b99e: e8 39 13 00 00 call 10ccdc <_Objects_Get_information_id> 10b9a3: 5a pop %edx 10b9a4: 59 pop %ecx 10b9a5: 8b 55 e4 mov -0x1c(%ebp),%edx 10b9a8: 52 push %edx 10b9a9: 50 push %eax 10b9aa: e8 bd 12 00 00 call 10cc6c <_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(); 10b9af: 58 pop %eax 10b9b0: ff 35 80 65 12 00 pushl 0x126580 10b9b6: e8 e9 05 00 00 call 10bfa4 <_API_Mutex_Unlock> return RTEMS_UNSATISFIED; 10b9bb: 83 c4 10 add $0x10,%esp 10b9be: b8 0d 00 00 00 mov $0xd,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b9c3: 8d 65 f4 lea -0xc(%ebp),%esp 10b9c6: 5b pop %ebx 10b9c7: 5e pop %esi 10b9c8: 5f pop %edi 10b9c9: c9 leave 10b9ca: c3 ret 10b9cb: 90 nop */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10b9cc: 83 ec 0c sub $0xc,%esp 10b9cf: ff 35 80 65 12 00 pushl 0x126580 10b9d5: e8 ca 05 00 00 call 10bfa4 <_API_Mutex_Unlock> return RTEMS_TOO_MANY; 10b9da: 83 c4 10 add $0x10,%esp 10b9dd: b8 05 00 00 00 mov $0x5,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b9e2: 8d 65 f4 lea -0xc(%ebp),%esp 10b9e5: 5b pop %ebx 10b9e6: 5e pop %esi 10b9e7: 5f pop %edi 10b9e8: c9 leave 10b9e9: c3 ret 10b9ea: 66 90 xchg %ax,%ax RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) return RTEMS_INVALID_ADDRESS; 10b9ec: b8 09 00 00 00 mov $0x9,%eax 10b9f1: eb 8a jmp 10b97d =============================================================================== 0010b9f4 : */ rtems_status_code rtems_task_delete( rtems_id id ) { 10b9f4: 55 push %ebp 10b9f5: 89 e5 mov %esp,%ebp 10b9f7: 53 push %ebx 10b9f8: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 10b9fb: ff 35 80 65 12 00 pushl 0x126580 10ba01: e8 56 05 00 00 call 10bf5c <_API_Mutex_Lock> the_thread = _Thread_Get( id, &location ); 10ba06: 5a pop %edx 10ba07: 59 pop %ecx 10ba08: 8d 45 f4 lea -0xc(%ebp),%eax 10ba0b: 50 push %eax 10ba0c: ff 75 08 pushl 0x8(%ebp) 10ba0f: e8 0c 1f 00 00 call 10d920 <_Thread_Get> 10ba14: 89 c3 mov %eax,%ebx switch ( location ) { 10ba16: 83 c4 10 add $0x10,%esp 10ba19: 8b 45 f4 mov -0xc(%ebp),%eax 10ba1c: 85 c0 test %eax,%eax 10ba1e: 75 44 jne 10ba64 <== NEVER TAKEN case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 10ba20: 83 ec 0c sub $0xc,%esp 10ba23: ff 73 08 pushl 0x8(%ebx) 10ba26: e8 b1 12 00 00 call 10ccdc <_Objects_Get_information_id> 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 10ba2b: 5a pop %edx 10ba2c: 59 pop %ecx 10ba2d: 53 push %ebx 10ba2e: 50 push %eax 10ba2f: e8 a0 1b 00 00 call 10d5d4 <_Thread_Close> 10ba34: 58 pop %eax 10ba35: ff 73 08 pushl 0x8(%ebx) 10ba38: e8 9f 12 00 00 call 10ccdc <_Objects_Get_information_id> 10ba3d: 5a pop %edx 10ba3e: 59 pop %ecx 10ba3f: 53 push %ebx 10ba40: 50 push %eax 10ba41: e8 26 12 00 00 call 10cc6c <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10ba46: 58 pop %eax 10ba47: ff 35 80 65 12 00 pushl 0x126580 10ba4d: e8 52 05 00 00 call 10bfa4 <_API_Mutex_Unlock> _Thread_Enable_dispatch(); 10ba52: e8 a5 1e 00 00 call 10d8fc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ba57: 83 c4 10 add $0x10,%esp 10ba5a: 31 c0 xor %eax,%eax break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } 10ba5c: 8b 5d fc mov -0x4(%ebp),%ebx 10ba5f: c9 leave 10ba60: c3 ret 10ba61: 8d 76 00 lea 0x0(%esi),%esi case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 10ba64: 83 ec 0c sub $0xc,%esp 10ba67: ff 35 80 65 12 00 pushl 0x126580 10ba6d: e8 32 05 00 00 call 10bfa4 <_API_Mutex_Unlock> return RTEMS_INVALID_ID; 10ba72: 83 c4 10 add $0x10,%esp 10ba75: b8 04 00 00 00 mov $0x4,%eax } 10ba7a: 8b 5d fc mov -0x4(%ebp),%ebx 10ba7d: c9 leave 10ba7e: c3 ret =============================================================================== 0010d52c : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 10d52c: 55 push %ebp 10d52d: 89 e5 mov %esp,%ebp 10d52f: 56 push %esi 10d530: 53 push %ebx 10d531: 83 ec 10 sub $0x10,%esp 10d534: 8b 45 08 mov 0x8(%ebp),%eax 10d537: 8b 75 0c mov 0xc(%ebp),%esi 10d53a: 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() ) 10d53d: 80 3d 04 63 12 00 00 cmpb $0x0,0x126304 10d544: 74 6e je 10d5b4 return RTEMS_NOT_CONFIGURED; if ( !note ) 10d546: 85 db test %ebx,%ebx 10d548: 74 7e je 10d5c8 /* * 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 ) 10d54a: 83 fe 0f cmp $0xf,%esi 10d54d: 77 3d ja 10d58c /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d54f: 85 c0 test %eax,%eax 10d551: 74 45 je 10d598 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d553: 8b 15 78 ab 12 00 mov 0x12ab78,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d559: 3b 42 08 cmp 0x8(%edx),%eax 10d55c: 74 40 je 10d59e api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d55e: 83 ec 08 sub $0x8,%esp 10d561: 8d 55 f4 lea -0xc(%ebp),%edx 10d564: 52 push %edx 10d565: 50 push %eax 10d566: e8 fd 21 00 00 call 10f768 <_Thread_Get> switch ( location ) { 10d56b: 83 c4 10 add $0x10,%esp 10d56e: 8b 55 f4 mov -0xc(%ebp),%edx 10d571: 85 d2 test %edx,%edx 10d573: 75 4b jne 10d5c0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d575: 8b 80 e4 00 00 00 mov 0xe4(%eax),%eax 10d57b: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d57f: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10d581: e8 be 21 00 00 call 10f744 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d586: 31 c0 xor %eax,%eax 10d588: eb 07 jmp 10d591 10d58a: 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; 10d58c: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d591: 8d 65 f8 lea -0x8(%ebp),%esp 10d594: 5b pop %ebx 10d595: 5e pop %esi 10d596: c9 leave 10d597: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d598: 8b 15 78 ab 12 00 mov 0x12ab78,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d59e: 8b 82 e4 00 00 00 mov 0xe4(%edx),%eax 10d5a4: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d5a8: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 10d5aa: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d5ac: 8d 65 f8 lea -0x8(%ebp),%esp 10d5af: 5b pop %ebx 10d5b0: 5e pop %esi 10d5b1: c9 leave 10d5b2: c3 ret 10d5b3: 90 nop register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; 10d5b4: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d5b9: 8d 65 f8 lea -0x8(%ebp),%esp 10d5bc: 5b pop %ebx 10d5bd: 5e pop %esi 10d5be: c9 leave 10d5bf: c3 ret case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d5c0: b8 04 00 00 00 mov $0x4,%eax 10d5c5: eb ca jmp 10d591 10d5c7: 90 nop if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; if ( !note ) return RTEMS_INVALID_ADDRESS; 10d5c8: b8 09 00 00 00 mov $0x9,%eax 10d5cd: eb c2 jmp 10d591 =============================================================================== 0011818c : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { 11818c: 55 push %ebp 11818d: 89 e5 mov %esp,%ebp 11818f: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 118192: 8d 45 f4 lea -0xc(%ebp),%eax 118195: 50 push %eax 118196: ff 75 08 pushl 0x8(%ebp) 118199: e8 d6 3b 00 00 call 11bd74 <_Thread_Get> switch ( location ) { 11819e: 83 c4 10 add $0x10,%esp 1181a1: 8b 55 f4 mov -0xc(%ebp),%edx 1181a4: 85 d2 test %edx,%edx 1181a6: 74 08 je 1181b0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1181a8: b8 04 00 00 00 mov $0x4,%eax } 1181ad: c9 leave 1181ae: c3 ret 1181af: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 1181b0: f6 40 10 02 testb $0x2,0x10(%eax) 1181b4: 74 0e je 1181c4 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 1181b6: e8 95 3b 00 00 call 11bd50 <_Thread_Enable_dispatch> return RTEMS_ALREADY_SUSPENDED; 1181bb: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1181c0: c9 leave 1181c1: c3 ret 1181c2: 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(); 1181c4: e8 87 3b 00 00 call 11bd50 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1181c9: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1181cb: c9 leave 1181cc: c3 ret =============================================================================== 00111eb0 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 111eb0: 55 push %ebp 111eb1: 89 e5 mov %esp,%ebp 111eb3: 57 push %edi 111eb4: 56 push %esi 111eb5: 53 push %ebx 111eb6: 83 ec 1c sub $0x1c,%esp 111eb9: 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 ) 111ebc: 85 c9 test %ecx,%ecx 111ebe: 0f 84 40 01 00 00 je 112004 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 111ec4: 8b 1d 58 67 12 00 mov 0x126758,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 111eca: 8b bb e4 00 00 00 mov 0xe4(%ebx),%edi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 111ed0: 80 7b 74 01 cmpb $0x1,0x74(%ebx) 111ed4: 19 f6 sbb %esi,%esi 111ed6: 81 e6 00 01 00 00 and $0x100,%esi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 111edc: 8b 53 7c mov 0x7c(%ebx),%edx 111edf: 85 d2 test %edx,%edx 111ee1: 0f 85 f1 00 00 00 jne 111fd8 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 111ee7: 80 7f 08 01 cmpb $0x1,0x8(%edi) 111eeb: 19 d2 sbb %edx,%edx 111eed: 81 e2 00 04 00 00 and $0x400,%edx old_mode |= _ISR_Get_level(); 111ef3: 89 55 e4 mov %edx,-0x1c(%ebp) 111ef6: 89 4d e0 mov %ecx,-0x20(%ebp) 111ef9: e8 6e cd ff ff call 10ec6c <_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; 111efe: 8b 55 e4 mov -0x1c(%ebp),%edx 111f01: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); 111f03: 09 f0 or %esi,%eax 111f05: 8b 4d e0 mov -0x20(%ebp),%ecx 111f08: 89 01 mov %eax,(%ecx) *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 111f0a: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 111f11: 74 0b je 111f1e executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 111f13: f7 45 08 00 01 00 00 testl $0x100,0x8(%ebp) 111f1a: 0f 94 43 74 sete 0x74(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 111f1e: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 111f25: 74 1c je 111f43 if ( _Modes_Is_timeslice(mode_set) ) { 111f27: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 111f2e: 0f 84 b8 00 00 00 je 111fec executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 111f34: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 111f3b: a1 a0 64 12 00 mov 0x1264a0,%eax 111f40: 89 43 78 mov %eax,0x78(%ebx) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 111f43: f6 45 0c 01 testb $0x1,0xc(%ebp) 111f47: 74 0b je 111f54 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 111f49: f6 45 08 01 testb $0x1,0x8(%ebp) 111f4d: 0f 84 91 00 00 00 je 111fe4 111f53: fa cli * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 111f54: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 111f5b: 74 3f je 111f9c * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 111f5d: f7 45 08 00 04 00 00 testl $0x400,0x8(%ebp) 111f64: 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 ) { 111f67: 38 47 08 cmp %al,0x8(%edi) 111f6a: 74 30 je 111f9c asr->is_enabled = is_asr_enabled; 111f6c: 88 47 08 mov %al,0x8(%edi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 111f6f: 9c pushf 111f70: fa cli 111f71: 58 pop %eax _signals = information->signals_pending; 111f72: 8b 57 18 mov 0x18(%edi),%edx information->signals_pending = information->signals_posted; 111f75: 8b 4f 14 mov 0x14(%edi),%ecx 111f78: 89 4f 18 mov %ecx,0x18(%edi) information->signals_posted = _signals; 111f7b: 89 57 14 mov %edx,0x14(%edi) _ISR_Enable( _level ); 111f7e: 50 push %eax 111f7f: 9d popf /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 111f80: 8b 47 14 mov 0x14(%edi),%eax 111f83: 85 c0 test %eax,%eax 111f85: 0f 95 c0 setne %al needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 111f88: 83 3d 60 66 12 00 03 cmpl $0x3,0x126660 111f8f: 74 16 je 111fa7 <== ALWAYS TAKEN if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; 111f91: 31 c0 xor %eax,%eax } 111f93: 83 c4 1c add $0x1c,%esp 111f96: 5b pop %ebx 111f97: 5e pop %esi 111f98: 5f pop %edi 111f99: c9 leave 111f9a: c3 ret 111f9b: 90 nop /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 111f9c: 31 c0 xor %eax,%eax needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 111f9e: 83 3d 60 66 12 00 03 cmpl $0x3,0x126660 111fa5: 75 ea jne 111f91 <== NEVER TAKEN bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; 111fa7: 8b 15 58 67 12 00 mov 0x126758,%edx if ( are_signals_pending || 111fad: 84 c0 test %al,%al 111faf: 75 0e jne 111fbf 111fb1: 3b 15 5c 67 12 00 cmp 0x12675c,%edx 111fb7: 74 d8 je 111f91 (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { 111fb9: 80 7a 74 00 cmpb $0x0,0x74(%edx) 111fbd: 74 d2 je 111f91 <== NEVER TAKEN _Thread_Dispatch_necessary = true; 111fbf: c6 05 64 67 12 00 01 movb $0x1,0x126764 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); 111fc6: e8 b9 b7 ff ff call 10d784 <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; 111fcb: 31 c0 xor %eax,%eax } 111fcd: 83 c4 1c add $0x1c,%esp 111fd0: 5b pop %ebx 111fd1: 5e pop %esi 111fd2: 5f pop %edi 111fd3: c9 leave 111fd4: c3 ret 111fd5: 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; 111fd8: 81 ce 00 02 00 00 or $0x200,%esi 111fde: e9 04 ff ff ff jmp 111ee7 111fe3: 90 nop 111fe4: fb sti 111fe5: e9 6a ff ff ff jmp 111f54 111fea: 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; 111fec: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 111ff3: f6 45 0c 01 testb $0x1,0xc(%ebp) 111ff7: 0f 84 57 ff ff ff je 111f54 111ffd: e9 47 ff ff ff jmp 111f49 112002: 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; 112004: b8 09 00 00 00 mov $0x9,%eax if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; } 112009: 83 c4 1c add $0x1c,%esp 11200c: 5b pop %ebx 11200d: 5e pop %esi 11200e: 5f pop %edi 11200f: c9 leave 112010: c3 ret =============================================================================== 0010ed24 : */ rtems_status_code rtems_task_resume( rtems_id id ) { 10ed24: 55 push %ebp 10ed25: 89 e5 mov %esp,%ebp 10ed27: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10ed2a: 8d 45 f4 lea -0xc(%ebp),%eax 10ed2d: 50 push %eax 10ed2e: ff 75 08 pushl 0x8(%ebp) 10ed31: e8 22 1f 00 00 call 110c58 <_Thread_Get> switch ( location ) { 10ed36: 83 c4 10 add $0x10,%esp 10ed39: 8b 55 f4 mov -0xc(%ebp),%edx 10ed3c: 85 d2 test %edx,%edx 10ed3e: 74 08 je 10ed48 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10ed40: b8 04 00 00 00 mov $0x4,%eax } 10ed45: c9 leave 10ed46: c3 ret 10ed47: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 10ed48: f6 40 10 02 testb $0x2,0x10(%eax) 10ed4c: 75 0e jne 10ed5c _Thread_Resume( the_thread, true ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10ed4e: e8 e1 1e 00 00 call 110c34 <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10ed53: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ed58: c9 leave 10ed59: c3 ret 10ed5a: 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 ); 10ed5c: 83 ec 08 sub $0x8,%esp 10ed5f: 6a 01 push $0x1 10ed61: 50 push %eax 10ed62: e8 a9 26 00 00 call 111410 <_Thread_Resume> _Thread_Enable_dispatch(); 10ed67: e8 c8 1e 00 00 call 110c34 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ed6c: 83 c4 10 add $0x10,%esp 10ed6f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ed71: c9 leave 10ed72: c3 ret =============================================================================== 0010d6a4 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 10d6a4: 55 push %ebp 10d6a5: 89 e5 mov %esp,%ebp 10d6a7: 56 push %esi 10d6a8: 53 push %ebx 10d6a9: 83 ec 10 sub $0x10,%esp 10d6ac: 8b 45 08 mov 0x8(%ebp),%eax 10d6af: 8b 5d 0c mov 0xc(%ebp),%ebx 10d6b2: 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() ) 10d6b5: 80 3d 04 63 12 00 00 cmpb $0x0,0x126304 10d6bc: 74 66 je 10d724 /* * 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 ) 10d6be: 83 fb 0f cmp $0xf,%ebx 10d6c1: 77 39 ja 10d6fc /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d6c3: 85 c0 test %eax,%eax 10d6c5: 74 41 je 10d708 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d6c7: 8b 15 78 ab 12 00 mov 0x12ab78,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d6cd: 3b 42 08 cmp 0x8(%edx),%eax 10d6d0: 74 3c je 10d70e api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d6d2: 83 ec 08 sub $0x8,%esp 10d6d5: 8d 55 f4 lea -0xc(%ebp),%edx 10d6d8: 52 push %edx 10d6d9: 50 push %eax 10d6da: e8 89 20 00 00 call 10f768 <_Thread_Get> switch ( location ) { 10d6df: 83 c4 10 add $0x10,%esp 10d6e2: 8b 55 f4 mov -0xc(%ebp),%edx 10d6e5: 85 d2 test %edx,%edx 10d6e7: 75 47 jne 10d730 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d6e9: 8b 80 e4 00 00 00 mov 0xe4(%eax),%eax 10d6ef: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) _Thread_Enable_dispatch(); 10d6f3: e8 4c 20 00 00 call 10f744 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d6f8: 31 c0 xor %eax,%eax 10d6fa: eb 05 jmp 10d701 * 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; 10d6fc: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d701: 8d 65 f8 lea -0x8(%ebp),%esp 10d704: 5b pop %ebx 10d705: 5e pop %esi 10d706: c9 leave 10d707: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d708: 8b 15 78 ab 12 00 mov 0x12ab78,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d70e: 8b 82 e4 00 00 00 mov 0xe4(%edx),%eax 10d714: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) return RTEMS_SUCCESSFUL; 10d718: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d71a: 8d 65 f8 lea -0x8(%ebp),%esp 10d71d: 5b pop %ebx 10d71e: 5e pop %esi 10d71f: c9 leave 10d720: c3 ret 10d721: 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; 10d724: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d729: 8d 65 f8 lea -0x8(%ebp),%esp 10d72c: 5b pop %ebx 10d72d: 5e pop %esi 10d72e: c9 leave 10d72f: c3 ret case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d730: b8 04 00 00 00 mov $0x4,%eax } 10d735: 8d 65 f8 lea -0x8(%ebp),%esp 10d738: 5b pop %ebx 10d739: 5e pop %esi 10d73a: c9 leave 10d73b: c3 ret =============================================================================== 0010f9e8 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10f9e8: 55 push %ebp 10f9e9: 89 e5 mov %esp,%ebp 10f9eb: 56 push %esi 10f9ec: 53 push %ebx 10f9ed: 83 ec 10 sub $0x10,%esp 10f9f0: 8b 5d 0c mov 0xc(%ebp),%ebx 10f9f3: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10f9f6: 85 db test %ebx,%ebx 10f9f8: 74 0b je 10fa05 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 ) ); 10f9fa: 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 ) && 10fa01: 39 c3 cmp %eax,%ebx 10fa03: 77 5f ja 10fa64 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10fa05: 85 f6 test %esi,%esi 10fa07: 74 67 je 10fa70 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10fa09: 83 ec 08 sub $0x8,%esp 10fa0c: 8d 45 f4 lea -0xc(%ebp),%eax 10fa0f: 50 push %eax 10fa10: ff 75 08 pushl 0x8(%ebp) 10fa13: e8 80 20 00 00 call 111a98 <_Thread_Get> switch ( location ) { 10fa18: 83 c4 10 add $0x10,%esp 10fa1b: 8b 55 f4 mov -0xc(%ebp),%edx 10fa1e: 85 d2 test %edx,%edx 10fa20: 75 36 jne 10fa58 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10fa22: 8b 50 14 mov 0x14(%eax),%edx 10fa25: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10fa27: 85 db test %ebx,%ebx 10fa29: 74 1c je 10fa47 the_thread->real_priority = new_priority; 10fa2b: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10fa2e: 8b 48 1c mov 0x1c(%eax),%ecx 10fa31: 85 c9 test %ecx,%ecx 10fa33: 74 05 je 10fa3a 10fa35: 3b 58 14 cmp 0x14(%eax),%ebx 10fa38: 73 0d jae 10fa47 <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); 10fa3a: 52 push %edx 10fa3b: 6a 00 push $0x0 10fa3d: 53 push %ebx 10fa3e: 50 push %eax 10fa3f: e8 f8 1b 00 00 call 11163c <_Thread_Change_priority> 10fa44: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10fa47: e8 28 20 00 00 call 111a74 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10fa4c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fa4e: 8d 65 f8 lea -0x8(%ebp),%esp 10fa51: 5b pop %ebx 10fa52: 5e pop %esi 10fa53: c9 leave 10fa54: c3 ret 10fa55: 8d 76 00 lea 0x0(%esi),%esi case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10fa58: b8 04 00 00 00 mov $0x4,%eax } 10fa5d: 8d 65 f8 lea -0x8(%ebp),%esp 10fa60: 5b pop %ebx 10fa61: 5e pop %esi 10fa62: c9 leave 10fa63: 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; 10fa64: b8 13 00 00 00 mov $0x13,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fa69: 8d 65 f8 lea -0x8(%ebp),%esp 10fa6c: 5b pop %ebx 10fa6d: 5e pop %esi 10fa6e: c9 leave 10fa6f: 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; 10fa70: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fa75: 8d 65 f8 lea -0x8(%ebp),%esp 10fa78: 5b pop %ebx 10fa79: 5e pop %esi 10fa7a: c9 leave 10fa7b: c3 ret =============================================================================== 0010bb3c : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 10bb3c: 55 push %ebp 10bb3d: 89 e5 mov %esp,%ebp 10bb3f: 53 push %ebx 10bb40: 83 ec 14 sub $0x14,%esp 10bb43: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10bb46: 85 db test %ebx,%ebx 10bb48: 74 4e je 10bb98 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10bb4a: 83 ec 08 sub $0x8,%esp 10bb4d: 8d 45 f4 lea -0xc(%ebp),%eax 10bb50: 50 push %eax 10bb51: ff 75 08 pushl 0x8(%ebp) 10bb54: e8 c7 1d 00 00 call 10d920 <_Thread_Get> switch ( location ) { 10bb59: 83 c4 10 add $0x10,%esp 10bb5c: 8b 55 f4 mov -0xc(%ebp),%edx 10bb5f: 85 d2 test %edx,%edx 10bb61: 75 29 jne 10bb8c case OBJECTS_LOCAL: if ( _Thread_Start( 10bb63: 83 ec 0c sub $0xc,%esp 10bb66: ff 75 10 pushl 0x10(%ebp) 10bb69: 6a 00 push $0x0 10bb6b: 53 push %ebx 10bb6c: 6a 00 push $0x0 10bb6e: 50 push %eax 10bb6f: e8 d8 26 00 00 call 10e24c <_Thread_Start> 10bb74: 83 c4 20 add $0x20,%esp 10bb77: 84 c0 test %al,%al 10bb79: 75 29 jne 10bba4 the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10bb7b: e8 7c 1d 00 00 call 10d8fc <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10bb80: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bb85: 8b 5d fc mov -0x4(%ebp),%ebx 10bb88: c9 leave 10bb89: c3 ret 10bb8a: 66 90 xchg %ax,%ax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10bb8c: b8 04 00 00 00 mov $0x4,%eax } 10bb91: 8b 5d fc mov -0x4(%ebp),%ebx 10bb94: c9 leave 10bb95: c3 ret 10bb96: 66 90 xchg %ax,%ax { register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; 10bb98: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bb9d: 8b 5d fc mov -0x4(%ebp),%ebx 10bba0: c9 leave 10bba1: c3 ret 10bba2: 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(); 10bba4: e8 53 1d 00 00 call 10d8fc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10bba9: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bbab: 8b 5d fc mov -0x4(%ebp),%ebx 10bbae: c9 leave 10bbaf: c3 ret =============================================================================== 00110484 : */ rtems_status_code rtems_task_suspend( rtems_id id ) { 110484: 55 push %ebp 110485: 89 e5 mov %esp,%ebp 110487: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 11048a: 8d 45 f4 lea -0xc(%ebp),%eax 11048d: 50 push %eax 11048e: ff 75 08 pushl 0x8(%ebp) 110491: e8 8a d4 ff ff call 10d920 <_Thread_Get> switch ( location ) { 110496: 83 c4 10 add $0x10,%esp 110499: 8b 55 f4 mov -0xc(%ebp),%edx 11049c: 85 d2 test %edx,%edx 11049e: 74 08 je 1104a8 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1104a0: b8 04 00 00 00 mov $0x4,%eax } 1104a5: c9 leave 1104a6: c3 ret 1104a7: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 1104a8: f6 40 10 02 testb $0x2,0x10(%eax) 1104ac: 74 0e je 1104bc _Thread_Suspend( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 1104ae: e8 49 d4 ff ff call 10d8fc <_Thread_Enable_dispatch> return RTEMS_ALREADY_SUSPENDED; 1104b3: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1104b8: c9 leave 1104b9: c3 ret 1104ba: 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 ); 1104bc: 83 ec 0c sub $0xc,%esp 1104bf: 50 push %eax 1104c0: e8 97 08 00 00 call 110d5c <_Thread_Suspend> _Thread_Enable_dispatch(); 1104c5: e8 32 d4 ff ff call 10d8fc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1104ca: 83 c4 10 add $0x10,%esp 1104cd: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1104cf: c9 leave 1104d0: c3 ret =============================================================================== 0010c6a8 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 10c6a8: 55 push %ebp 10c6a9: 89 e5 mov %esp,%ebp 10c6ab: 57 push %edi 10c6ac: 56 push %esi 10c6ad: 53 push %ebx 10c6ae: 83 ec 1c sub $0x1c,%esp 10c6b1: 8b 5d 0c mov 0xc(%ebp),%ebx 10c6b4: 8b 7d 10 mov 0x10(%ebp),%edi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 10c6b7: 85 db test %ebx,%ebx 10c6b9: 0f 84 9d 00 00 00 je 10c75c return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10c6bf: 83 ec 08 sub $0x8,%esp 10c6c2: 8d 45 e4 lea -0x1c(%ebp),%eax 10c6c5: 50 push %eax 10c6c6: ff 75 08 pushl 0x8(%ebp) 10c6c9: e8 72 1f 00 00 call 10e640 <_Thread_Get> 10c6ce: 89 c6 mov %eax,%esi switch (location) { 10c6d0: 83 c4 10 add $0x10,%esp 10c6d3: 8b 45 e4 mov -0x1c(%ebp),%eax 10c6d6: 85 c0 test %eax,%eax 10c6d8: 74 0e je 10c6e8 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c6da: b8 04 00 00 00 mov $0x4,%eax } 10c6df: 8d 65 f4 lea -0xc(%ebp),%esp 10c6e2: 5b pop %ebx 10c6e3: 5e pop %esi 10c6e4: 5f pop %edi 10c6e5: c9 leave 10c6e6: c3 ret 10c6e7: 90 nop case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 10c6e8: 8b 86 f0 00 00 00 mov 0xf0(%esi),%eax while (tvp) { 10c6ee: 85 c0 test %eax,%eax 10c6f0: 75 44 jne 10c736 10c6f2: 66 90 xchg %ax,%ax /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); 10c6f4: 83 ec 0c sub $0xc,%esp 10c6f7: 6a 14 push $0x14 10c6f9: e8 92 2e 00 00 call 10f590 <_Workspace_Allocate> if (new == NULL) { 10c6fe: 83 c4 10 add $0x10,%esp 10c701: 85 c0 test %eax,%eax 10c703: 74 4b je 10c750 _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 10c705: 8b 13 mov (%ebx),%edx 10c707: 89 50 08 mov %edx,0x8(%eax) new->ptr = ptr; 10c70a: 89 58 04 mov %ebx,0x4(%eax) new->dtor = dtor; 10c70d: 89 78 10 mov %edi,0x10(%eax) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 10c710: 8b 96 f0 00 00 00 mov 0xf0(%esi),%edx 10c716: 89 10 mov %edx,(%eax) the_thread->task_variables = new; 10c718: 89 86 f0 00 00 00 mov %eax,0xf0(%esi) _Thread_Enable_dispatch(); 10c71e: e8 f9 1e 00 00 call 10e61c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c723: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c725: 8d 65 f4 lea -0xc(%ebp),%esp 10c728: 5b pop %ebx 10c729: 5e pop %esi 10c72a: 5f pop %edi 10c72b: c9 leave 10c72c: c3 ret 10c72d: 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; 10c730: 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) { 10c732: 85 c0 test %eax,%eax 10c734: 74 be je 10c6f4 if (tvp->ptr == ptr) { 10c736: 39 58 04 cmp %ebx,0x4(%eax) 10c739: 75 f5 jne 10c730 tvp->dtor = dtor; 10c73b: 89 78 10 mov %edi,0x10(%eax) _Thread_Enable_dispatch(); 10c73e: e8 d9 1e 00 00 call 10e61c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c743: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c745: 8d 65 f4 lea -0xc(%ebp),%esp 10c748: 5b pop %ebx 10c749: 5e pop %esi 10c74a: 5f pop %edi 10c74b: c9 leave 10c74c: c3 ret 10c74d: 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(); 10c750: e8 c7 1e 00 00 call 10e61c <_Thread_Enable_dispatch> return RTEMS_NO_MEMORY; 10c755: b8 1a 00 00 00 mov $0x1a,%eax 10c75a: eb 83 jmp 10c6df Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) return RTEMS_INVALID_ADDRESS; 10c75c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c761: 8d 65 f4 lea -0xc(%ebp),%esp 10c764: 5b pop %ebx 10c765: 5e pop %esi 10c766: 5f pop %edi 10c767: c9 leave 10c768: c3 ret =============================================================================== 0010c76c : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 10c76c: 55 push %ebp 10c76d: 89 e5 mov %esp,%ebp 10c76f: 53 push %ebx 10c770: 83 ec 14 sub $0x14,%esp 10c773: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 10c776: 85 db test %ebx,%ebx 10c778: 74 76 je 10c7f0 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 10c77a: 83 ec 08 sub $0x8,%esp 10c77d: 8d 45 f4 lea -0xc(%ebp),%eax 10c780: 50 push %eax 10c781: ff 75 08 pushl 0x8(%ebp) 10c784: e8 b7 1e 00 00 call 10e640 <_Thread_Get> switch (location) { 10c789: 83 c4 10 add $0x10,%esp 10c78c: 8b 55 f4 mov -0xc(%ebp),%edx 10c78f: 85 d2 test %edx,%edx 10c791: 74 0d je 10c7a0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c793: b8 04 00 00 00 mov $0x4,%eax } 10c798: 8b 5d fc mov -0x4(%ebp),%ebx 10c79b: c9 leave 10c79c: c3 ret 10c79d: 8d 76 00 lea 0x0(%esi),%esi the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; 10c7a0: 8b 88 f0 00 00 00 mov 0xf0(%eax),%ecx while (tvp) { 10c7a6: 85 c9 test %ecx,%ecx 10c7a8: 74 17 je 10c7c1 if (tvp->ptr == ptr) { 10c7aa: 39 59 04 cmp %ebx,0x4(%ecx) 10c7ad: 75 0c jne 10c7bb 10c7af: eb 49 jmp 10c7fa 10c7b1: 8d 76 00 lea 0x0(%esi),%esi 10c7b4: 39 5a 04 cmp %ebx,0x4(%edx) 10c7b7: 74 17 je 10c7d0 10c7b9: 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; 10c7bb: 8b 11 mov (%ecx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 10c7bd: 85 d2 test %edx,%edx 10c7bf: 75 f3 jne 10c7b4 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10c7c1: e8 56 1e 00 00 call 10e61c <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 10c7c6: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c7cb: 8b 5d fc mov -0x4(%ebp),%ebx 10c7ce: c9 leave 10c7cf: c3 ret case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 10c7d0: 8b 1a mov (%edx),%ebx 10c7d2: 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 ); 10c7d4: 83 ec 08 sub $0x8,%esp 10c7d7: 52 push %edx 10c7d8: 50 push %eax 10c7d9: e8 b2 00 00 00 call 10c890 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 10c7de: e8 39 1e 00 00 call 10e61c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c7e3: 83 c4 10 add $0x10,%esp 10c7e6: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c7e8: 8b 5d fc mov -0x4(%ebp),%ebx 10c7eb: c9 leave 10c7ec: c3 ret 10c7ed: 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; 10c7f0: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c7f5: 8b 5d fc mov -0x4(%ebp),%ebx 10c7f8: c9 leave 10c7f9: 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; 10c7fa: 8b 11 mov (%ecx),%edx 10c7fc: 89 90 f0 00 00 00 mov %edx,0xf0(%eax) 10c802: 89 ca mov %ecx,%edx 10c804: eb ce jmp 10c7d4 =============================================================================== 0010c808 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 10c808: 55 push %ebp 10c809: 89 e5 mov %esp,%ebp 10c80b: 56 push %esi 10c80c: 53 push %ebx 10c80d: 83 ec 10 sub $0x10,%esp 10c810: 8b 5d 0c mov 0xc(%ebp),%ebx 10c813: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 10c816: 85 db test %ebx,%ebx 10c818: 74 56 je 10c870 return RTEMS_INVALID_ADDRESS; if ( !result ) 10c81a: 85 f6 test %esi,%esi 10c81c: 74 52 je 10c870 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10c81e: 83 ec 08 sub $0x8,%esp 10c821: 8d 45 f4 lea -0xc(%ebp),%eax 10c824: 50 push %eax 10c825: ff 75 08 pushl 0x8(%ebp) 10c828: e8 13 1e 00 00 call 10e640 <_Thread_Get> switch (location) { 10c82d: 83 c4 10 add $0x10,%esp 10c830: 8b 55 f4 mov -0xc(%ebp),%edx 10c833: 85 d2 test %edx,%edx 10c835: 75 2d jne 10c864 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 10c837: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax while (tvp) { 10c83d: 85 c0 test %eax,%eax 10c83f: 75 09 jne 10c84a 10c841: eb 39 jmp 10c87c 10c843: 90 nop */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 10c844: 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) { 10c846: 85 c0 test %eax,%eax 10c848: 74 32 je 10c87c <== NEVER TAKEN if (tvp->ptr == ptr) { 10c84a: 39 58 04 cmp %ebx,0x4(%eax) 10c84d: 75 f5 jne 10c844 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 10c84f: 8b 40 0c mov 0xc(%eax),%eax 10c852: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10c854: e8 c3 1d 00 00 call 10e61c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c859: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c85b: 8d 65 f8 lea -0x8(%ebp),%esp 10c85e: 5b pop %ebx 10c85f: 5e pop %esi 10c860: c9 leave 10c861: c3 ret 10c862: 66 90 xchg %ax,%ax #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c864: b8 04 00 00 00 mov $0x4,%eax } 10c869: 8d 65 f8 lea -0x8(%ebp),%esp 10c86c: 5b pop %ebx 10c86d: 5e pop %esi 10c86e: c9 leave 10c86f: c3 ret if ( !ptr ) return RTEMS_INVALID_ADDRESS; if ( !result ) return RTEMS_INVALID_ADDRESS; 10c870: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c875: 8d 65 f8 lea -0x8(%ebp),%esp 10c878: 5b pop %ebx 10c879: 5e pop %esi 10c87a: c9 leave 10c87b: c3 ret _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10c87c: e8 9b 1d 00 00 call 10e61c <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 10c881: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c886: 8d 65 f8 lea -0x8(%ebp),%esp 10c889: 5b pop %ebx 10c88a: 5e pop %esi 10c88b: c9 leave 10c88c: c3 ret =============================================================================== 0010ca08 : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 10ca08: 55 push %ebp 10ca09: 89 e5 mov %esp,%ebp 10ca0b: 53 push %ebx 10ca0c: 83 ec 14 sub $0x14,%esp 10ca0f: 8b 5d 08 mov 0x8(%ebp),%ebx Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10ca12: 80 3d a4 85 12 00 00 cmpb $0x0,0x1285a4 10ca19: 0f 84 a9 00 00 00 je 10cac8 return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10ca1f: 85 db test %ebx,%ebx 10ca21: 0f 84 ad 00 00 00 je 10cad4 return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 10ca27: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) if ( !_TOD_Validate( time_buffer ) ) 10ca2e: 83 ec 0c sub $0xc,%esp 10ca31: 53 push %ebx 10ca32: e8 d1 f3 ff ff call 10be08 <_TOD_Validate> 10ca37: 83 c4 10 add $0x10,%esp 10ca3a: 84 c0 test %al,%al 10ca3c: 75 0a jne 10ca48 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; 10ca3e: b8 14 00 00 00 mov $0x14,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10ca43: 8b 5d fc mov -0x4(%ebp),%ebx 10ca46: c9 leave 10ca47: c3 ret time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 10ca48: 83 ec 0c sub $0xc,%esp 10ca4b: 53 push %ebx 10ca4c: e8 2b f3 ff ff call 10bd7c <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 10ca51: 83 c4 10 add $0x10,%esp 10ca54: 3b 05 28 86 12 00 cmp 0x128628,%eax 10ca5a: 76 e2 jbe 10ca3e 10ca5c: 8b 15 90 85 12 00 mov 0x128590,%edx 10ca62: 42 inc %edx 10ca63: 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 ); 10ca69: 83 ec 08 sub $0x8,%esp 10ca6c: 6a 10 push $0x10 10ca6e: ff 35 18 88 12 00 pushl 0x128818 10ca74: 89 45 f4 mov %eax,-0xc(%ebp) 10ca77: e8 c4 25 00 00 call 10f040 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10ca7c: 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( 10ca82: 8b 4a 08 mov 0x8(%edx),%ecx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10ca85: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 10ca8c: c7 42 64 98 e6 10 00 movl $0x10e698,0x64(%edx) the_watchdog->id = id; 10ca93: 89 4a 68 mov %ecx,0x68(%edx) the_watchdog->user_data = user_data; 10ca96: 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( 10ca9d: 8b 45 f4 mov -0xc(%ebp),%eax 10caa0: 2b 05 28 86 12 00 sub 0x128628,%eax 10caa6: 89 42 54 mov %eax,0x54(%edx) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 10caa9: 58 pop %eax 10caaa: 59 pop %ecx 10caab: 83 c2 48 add $0x48,%edx 10caae: 52 push %edx 10caaf: 68 54 86 12 00 push $0x128654 10cab4: e8 17 2b 00 00 call 10f5d0 <_Watchdog_Insert> &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 10cab9: e8 8e 1d 00 00 call 10e84c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10cabe: 83 c4 10 add $0x10,%esp 10cac1: 31 c0 xor %eax,%eax 10cac3: e9 7b ff ff ff jmp 10ca43 ) { Watchdog_Interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 10cac8: b8 0b 00 00 00 mov $0xb,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10cacd: 8b 5d fc mov -0x4(%ebp),%ebx 10cad0: c9 leave 10cad1: c3 ret 10cad2: 66 90 xchg %ax,%ax if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 10cad4: b8 09 00 00 00 mov $0x9,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10cad9: 8b 5d fc mov -0x4(%ebp),%ebx 10cadc: c9 leave 10cadd: c3 ret =============================================================================== 0011871c : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 11871c: 55 push %ebp 11871d: 89 e5 mov %esp,%ebp 11871f: 83 ec 1c sub $0x1c,%esp Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); 118722: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 118725: 50 push %eax 118726: ff 75 08 pushl 0x8(%ebp) 118729: 68 60 0c 14 00 push $0x140c60 11872e: e8 cd 2a 00 00 call 11b200 <_Objects_Get> switch ( location ) { 118733: 83 c4 10 add $0x10,%esp 118736: 8b 55 f4 mov -0xc(%ebp),%edx 118739: 85 d2 test %edx,%edx 11873b: 74 07 je 118744 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 11873d: b8 04 00 00 00 mov $0x4,%eax } 118742: c9 leave 118743: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 118744: 83 78 38 04 cmpl $0x4,0x38(%eax) 118748: 74 0f je 118759 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 11874a: 83 ec 0c sub $0xc,%esp 11874d: 83 c0 10 add $0x10,%eax 118750: 50 push %eax 118751: e8 d2 46 00 00 call 11ce28 <_Watchdog_Remove> 118756: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 118759: e8 f2 35 00 00 call 11bd50 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11875e: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118760: c9 leave 118761: c3 ret =============================================================================== 0010c038 : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 10c038: 55 push %ebp 10c039: 89 e5 mov %esp,%ebp 10c03b: 57 push %edi 10c03c: 56 push %esi 10c03d: 53 push %ebx 10c03e: 83 ec 0c sub $0xc,%esp 10c041: 8b 5d 08 mov 0x8(%ebp),%ebx 10c044: 8b 75 0c mov 0xc(%ebp),%esi Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 10c047: 85 db test %ebx,%ebx 10c049: 74 6d je 10c0b8 return RTEMS_INVALID_NAME; if ( !id ) 10c04b: 85 f6 test %esi,%esi 10c04d: 0f 84 89 00 00 00 je 10c0dc 10c053: a1 30 75 12 00 mov 0x127530,%eax 10c058: 40 inc %eax 10c059: 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 ); 10c05e: 83 ec 0c sub $0xc,%esp 10c061: 68 80 78 12 00 push $0x127880 10c066: e8 5d 0e 00 00 call 10cec8 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 10c06b: 83 c4 10 add $0x10,%esp 10c06e: 85 c0 test %eax,%eax 10c070: 74 56 je 10c0c8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 10c072: 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; 10c079: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10c080: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10c087: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10c08e: 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 ), 10c095: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10c098: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c09b: 8b 0d 9c 78 12 00 mov 0x12789c,%ecx 10c0a1: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c0a4: 89 58 0c mov %ebx,0xc(%eax) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 10c0a7: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10c0a9: e8 1e 1e 00 00 call 10decc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c0ae: 31 c0 xor %eax,%eax } 10c0b0: 8d 65 f4 lea -0xc(%ebp),%esp 10c0b3: 5b pop %ebx 10c0b4: 5e pop %esi 10c0b5: 5f pop %edi 10c0b6: c9 leave 10c0b7: c3 ret ) { Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10c0b8: b8 03 00 00 00 mov $0x3,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c0bd: 8d 65 f4 lea -0xc(%ebp),%esp 10c0c0: 5b pop %ebx 10c0c1: 5e pop %esi 10c0c2: 5f pop %edi 10c0c3: c9 leave 10c0c4: c3 ret 10c0c5: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { _Thread_Enable_dispatch(); 10c0c8: e8 ff 1d 00 00 call 10decc <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10c0cd: b8 05 00 00 00 mov $0x5,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c0d2: 8d 65 f4 lea -0xc(%ebp),%esp 10c0d5: 5b pop %ebx 10c0d6: 5e pop %esi 10c0d7: 5f pop %edi 10c0d8: c9 leave 10c0d9: c3 ret 10c0da: 66 90 xchg %ax,%ax if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10c0dc: b8 09 00 00 00 mov $0x9,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c0e1: 8d 65 f4 lea -0xc(%ebp),%esp 10c0e4: 5b pop %ebx 10c0e5: 5e pop %esi 10c0e6: 5f pop %edi 10c0e7: c9 leave 10c0e8: c3 ret =============================================================================== 00118818 : */ rtems_status_code rtems_timer_delete( rtems_id id ) { 118818: 55 push %ebp 118819: 89 e5 mov %esp,%ebp 11881b: 53 push %ebx 11881c: 83 ec 18 sub $0x18,%esp Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); 11881f: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 118822: 50 push %eax 118823: ff 75 08 pushl 0x8(%ebp) 118826: 68 60 0c 14 00 push $0x140c60 11882b: e8 d0 29 00 00 call 11b200 <_Objects_Get> 118830: 89 c3 mov %eax,%ebx switch ( location ) { 118832: 83 c4 10 add $0x10,%esp 118835: 8b 4d f4 mov -0xc(%ebp),%ecx 118838: 85 c9 test %ecx,%ecx 11883a: 75 38 jne 118874 case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); 11883c: 83 ec 08 sub $0x8,%esp 11883f: 50 push %eax 118840: 68 60 0c 14 00 push $0x140c60 118845: e8 42 25 00 00 call 11ad8c <_Objects_Close> (void) _Watchdog_Remove( &the_timer->Ticker ); 11884a: 8d 43 10 lea 0x10(%ebx),%eax 11884d: 89 04 24 mov %eax,(%esp) 118850: e8 d3 45 00 00 call 11ce28 <_Watchdog_Remove> */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 118855: 58 pop %eax 118856: 5a pop %edx 118857: 53 push %ebx 118858: 68 60 0c 14 00 push $0x140c60 11885d: e8 22 28 00 00 call 11b084 <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 118862: e8 e9 34 00 00 call 11bd50 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118867: 83 c4 10 add $0x10,%esp 11886a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11886c: 8b 5d fc mov -0x4(%ebp),%ebx 11886f: c9 leave 118870: c3 ret 118871: 8d 76 00 lea 0x0(%esi),%esi #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118874: b8 04 00 00 00 mov $0x4,%eax } 118879: 8b 5d fc mov -0x4(%ebp),%ebx 11887c: c9 leave 11887d: c3 ret =============================================================================== 0010c0ec : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 10c0ec: 55 push %ebp 10c0ed: 89 e5 mov %esp,%ebp 10c0ef: 57 push %edi 10c0f0: 56 push %esi 10c0f1: 53 push %ebx 10c0f2: 83 ec 2c sub $0x2c,%esp 10c0f5: 8b 5d 0c mov 0xc(%ebp),%ebx 10c0f8: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 10c0fb: 85 db test %ebx,%ebx 10c0fd: 0f 84 99 00 00 00 je 10c19c return RTEMS_INVALID_NUMBER; if ( !routine ) 10c103: 85 f6 test %esi,%esi 10c105: 0f 84 b1 00 00 00 je 10c1bc Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 10c10b: 57 push %edi return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); 10c10c: 8d 45 e4 lea -0x1c(%ebp),%eax 10c10f: 50 push %eax 10c110: ff 75 08 pushl 0x8(%ebp) 10c113: 68 80 78 12 00 push $0x127880 10c118: e8 5f 12 00 00 call 10d37c <_Objects_Get> 10c11d: 89 c7 mov %eax,%edi switch ( location ) { 10c11f: 83 c4 10 add $0x10,%esp 10c122: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c125: 85 c9 test %ecx,%ecx 10c127: 74 0f je 10c138 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c129: b8 04 00 00 00 mov $0x4,%eax } 10c12e: 8d 65 f4 lea -0xc(%ebp),%esp 10c131: 5b pop %ebx 10c132: 5e pop %esi 10c133: 5f pop %edi 10c134: c9 leave 10c135: c3 ret 10c136: 66 90 xchg %ax,%ax the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 10c138: 8d 50 10 lea 0x10(%eax),%edx 10c13b: 83 ec 0c sub $0xc,%esp 10c13e: 52 push %edx 10c13f: 89 55 d4 mov %edx,-0x2c(%ebp) 10c142: e8 d1 2b 00 00 call 10ed18 <_Watchdog_Remove> _ISR_Disable( level ); 10c147: 9c pushf 10c148: fa cli 10c149: 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 ) { 10c14a: 83 c4 10 add $0x10,%esp 10c14d: 8b 57 18 mov 0x18(%edi),%edx 10c150: 85 d2 test %edx,%edx 10c152: 8b 55 d4 mov -0x2c(%ebp),%edx 10c155: 75 55 jne 10c1ac /* * 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; 10c157: 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; 10c15e: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 10c165: 89 77 2c mov %esi,0x2c(%edi) the_watchdog->id = id; 10c168: 8b 4d 08 mov 0x8(%ebp),%ecx 10c16b: 89 4f 30 mov %ecx,0x30(%edi) the_watchdog->user_data = user_data; 10c16e: 8b 4d 14 mov 0x14(%ebp),%ecx 10c171: 89 4f 34 mov %ecx,0x34(%edi) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 10c174: 50 push %eax 10c175: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c176: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c179: 83 ec 08 sub $0x8,%esp 10c17c: 52 push %edx 10c17d: 68 00 76 12 00 push $0x127600 10c182: e8 51 2a 00 00 call 10ebd8 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 10c187: e8 40 1d 00 00 call 10decc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c18c: 83 c4 10 add $0x10,%esp 10c18f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c191: 8d 65 f4 lea -0xc(%ebp),%esp 10c194: 5b pop %ebx 10c195: 5e pop %esi 10c196: 5f pop %edi 10c197: c9 leave 10c198: c3 ret 10c199: 8d 76 00 lea 0x0(%esi),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; 10c19c: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c1a1: 8d 65 f4 lea -0xc(%ebp),%esp 10c1a4: 5b pop %ebx 10c1a5: 5e pop %esi 10c1a6: 5f pop %edi 10c1a7: c9 leave 10c1a8: c3 ret 10c1a9: 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 ); 10c1ac: 50 push %eax 10c1ad: 9d popf _Thread_Enable_dispatch(); 10c1ae: e8 19 1d 00 00 call 10decc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c1b3: 31 c0 xor %eax,%eax 10c1b5: e9 74 ff ff ff jmp 10c12e 10c1ba: 66 90 xchg %ax,%ax if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) return RTEMS_INVALID_ADDRESS; 10c1bc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c1c1: 8d 65 f4 lea -0xc(%ebp),%esp 10c1c4: 5b pop %ebx 10c1c5: 5e pop %esi 10c1c6: 5f pop %edi 10c1c7: c9 leave 10c1c8: c3 ret =============================================================================== 00118960 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 118960: 55 push %ebp 118961: 89 e5 mov %esp,%ebp 118963: 57 push %edi 118964: 56 push %esi 118965: 53 push %ebx 118966: 83 ec 2c sub $0x2c,%esp 118969: 8b 75 08 mov 0x8(%ebp),%esi 11896c: 8b 7d 0c mov 0xc(%ebp),%edi 11896f: 8b 5d 10 mov 0x10(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 118972: 80 3d 24 09 14 00 00 cmpb $0x0,0x140924 118979: 75 0d jne 118988 return RTEMS_NOT_DEFINED; 11897b: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118980: 8d 65 f4 lea -0xc(%ebp),%esp 118983: 5b pop %ebx 118984: 5e pop %esi 118985: 5f pop %edi 118986: c9 leave 118987: c3 ret rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 118988: 83 ec 0c sub $0xc,%esp 11898b: 57 push %edi 11898c: e8 93 d4 ff ff call 115e24 <_TOD_Validate> 118991: 83 c4 10 add $0x10,%esp 118994: 84 c0 test %al,%al 118996: 74 1e je 1189b6 return RTEMS_INVALID_CLOCK; if ( !routine ) 118998: 85 db test %ebx,%ebx 11899a: 0f 84 a4 00 00 00 je 118a44 return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 1189a0: 83 ec 0c sub $0xc,%esp 1189a3: 57 push %edi 1189a4: e8 ef d3 ff ff call 115d98 <_TOD_To_seconds> 1189a9: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 1189ab: 83 c4 10 add $0x10,%esp 1189ae: 3b 05 a8 09 14 00 cmp 0x1409a8,%eax 1189b4: 77 0e ja 1189c4 return RTEMS_INVALID_CLOCK; 1189b6: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1189bb: 8d 65 f4 lea -0xc(%ebp),%esp 1189be: 5b pop %ebx 1189bf: 5e pop %esi 1189c0: 5f pop %edi 1189c1: c9 leave 1189c2: c3 ret 1189c3: 90 nop 1189c4: 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 ); 1189c5: 8d 45 e4 lea -0x1c(%ebp),%eax 1189c8: 50 push %eax 1189c9: 56 push %esi 1189ca: 68 60 0c 14 00 push $0x140c60 1189cf: e8 2c 28 00 00 call 11b200 <_Objects_Get> switch ( location ) { 1189d4: 83 c4 10 add $0x10,%esp 1189d7: 8b 4d e4 mov -0x1c(%ebp),%ecx 1189da: 85 c9 test %ecx,%ecx 1189dc: 75 5a jne 118a38 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 1189de: 8d 48 10 lea 0x10(%eax),%ecx 1189e1: 83 ec 0c sub $0xc,%esp 1189e4: 51 push %ecx 1189e5: 89 45 d0 mov %eax,-0x30(%ebp) 1189e8: 89 4d d4 mov %ecx,-0x2c(%ebp) 1189eb: e8 38 44 00 00 call 11ce28 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY; 1189f0: 8b 55 d0 mov -0x30(%ebp),%edx 1189f3: 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; 1189fa: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118a01: 89 5a 2c mov %ebx,0x2c(%edx) the_watchdog->id = id; 118a04: 89 72 30 mov %esi,0x30(%edx) the_watchdog->user_data = user_data; 118a07: 8b 45 14 mov 0x14(%ebp),%eax 118a0a: 89 42 34 mov %eax,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( 118a0d: 2b 3d a8 09 14 00 sub 0x1409a8,%edi 118a13: 89 7a 1c mov %edi,0x1c(%edx) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 118a16: 58 pop %eax 118a17: 5a pop %edx 118a18: 8b 4d d4 mov -0x2c(%ebp),%ecx 118a1b: 51 push %ecx 118a1c: 68 d4 09 14 00 push $0x1409d4 118a21: e8 c2 42 00 00 call 11cce8 <_Watchdog_Insert> &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 118a26: e8 25 33 00 00 call 11bd50 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118a2b: 83 c4 10 add $0x10,%esp 118a2e: 31 c0 xor %eax,%eax 118a30: e9 4b ff ff ff jmp 118980 118a35: 8d 76 00 lea 0x0(%esi),%esi #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118a38: b8 04 00 00 00 mov $0x4,%eax 118a3d: e9 3e ff ff ff jmp 118980 118a42: 66 90 xchg %ax,%ax if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) return RTEMS_INVALID_ADDRESS; 118a44: b8 09 00 00 00 mov $0x9,%eax 118a49: e9 32 ff ff ff jmp 118980 =============================================================================== 001190f8 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 1190f8: 55 push %ebp 1190f9: 89 e5 mov %esp,%ebp 1190fb: 56 push %esi 1190fc: 53 push %ebx 1190fd: 83 ec 10 sub $0x10,%esp 119100: 8b 45 08 mov 0x8(%ebp),%eax 119103: 85 c0 test %eax,%eax 119105: 74 41 je 119148 ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 119107: 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 ) && 11910e: 39 d0 cmp %edx,%eax 119110: 76 42 jbe 119154 * 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 ) 119112: 40 inc %eax 119113: 75 33 jne 119148 return RTEMS_INVALID_PRIORITY; _priority = 0; 119115: 31 f6 xor %esi,%esi 119117: 8b 15 10 09 14 00 mov 0x140910,%edx 11911d: 42 inc %edx 11911e: 89 15 10 09 14 00 mov %edx,0x140910 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 119124: 8a 1d 40 c2 13 00 mov 0x13c240,%bl initialized = true; 11912a: c6 05 40 c2 13 00 01 movb $0x1,0x13c240 _Thread_Enable_dispatch(); 119131: e8 1a 2c 00 00 call 11bd50 <_Thread_Enable_dispatch> if ( tmpInitialized ) 119136: 84 db test %bl,%bl 119138: 74 1e je 119158 return RTEMS_INCORRECT_STATE; 11913a: b8 0e 00 00 00 mov $0xe,%eax 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 * 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; 119148: b8 13 00 00 00 mov $0x13,%eax initialized = false; } #endif return status; } 11914d: 8d 65 f8 lea -0x8(%ebp),%esp 119150: 5b pop %ebx 119151: 5e pop %esi 119152: c9 leave 119153: c3 ret 119154: 89 c6 mov %eax,%esi 119156: eb bf jmp 119117 * 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( 119158: 83 ec 08 sub $0x8,%esp 11915b: 8d 45 f4 lea -0xc(%ebp),%eax 11915e: 50 push %eax 11915f: 8b 45 10 mov 0x10(%ebp),%eax 119162: 80 cc 80 or $0x80,%ah 119165: 50 push %eax 119166: 68 00 01 00 00 push $0x100 11916b: ff 75 0c pushl 0xc(%ebp) 11916e: 56 push %esi 11916f: 68 45 4d 49 54 push $0x54494d45 119174: e8 c7 ec ff ff call 117e40 /* 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) { 119179: 83 c4 20 add $0x20,%esp 11917c: 85 c0 test %eax,%eax 11917e: 74 10 je 119190 initialized = false; 119180: c6 05 40 c2 13 00 00 movb $0x0,0x13c240 initialized = false; } #endif return status; } 119187: 8d 65 f8 lea -0x8(%ebp),%esp 11918a: 5b pop %ebx 11918b: 5e pop %esi 11918c: c9 leave 11918d: c3 ret 11918e: 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) 119190: 8b 45 f4 mov -0xc(%ebp),%eax */ #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return NULL; #endif return information->local_table[ index ]; 119193: 0f b7 c8 movzwl %ax,%ecx 119196: 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( 11919c: 8b 14 8a mov (%edx,%ecx,4),%edx 11919f: 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; 1191a5: c7 05 f0 c1 13 00 f4 movl $0x13c1f4,0x13c1f0 1191ac: c1 13 00 head->previous = NULL; 1191af: c7 05 f4 c1 13 00 00 movl $0x0,0x13c1f4 1191b6: 00 00 00 tail->previous = head; 1191b9: c7 05 f8 c1 13 00 f0 movl $0x13c1f0,0x13c1f8 1191c0: c1 13 00 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 1191c3: c7 05 28 c2 13 00 2c movl $0x13c22c,0x13c228 1191ca: c2 13 00 head->previous = NULL; 1191cd: c7 05 2c c2 13 00 00 movl $0x0,0x13c22c 1191d4: 00 00 00 tail->previous = head; 1191d7: c7 05 30 c2 13 00 28 movl $0x13c228,0x13c230 1191de: c2 13 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 1191e1: c7 05 d0 c1 13 00 00 movl $0x0,0x13c1d0 1191e8: 00 00 00 the_watchdog->routine = routine; 1191eb: c7 05 e4 c1 13 00 9c movl $0x11bb9c,0x13c1e4 1191f2: bb 11 00 the_watchdog->id = id; 1191f5: a3 e8 c1 13 00 mov %eax,0x13c1e8 the_watchdog->user_data = user_data; 1191fa: c7 05 ec c1 13 00 00 movl $0x0,0x13c1ec 119201: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 119204: c7 05 08 c2 13 00 00 movl $0x0,0x13c208 11920b: 00 00 00 the_watchdog->routine = routine; 11920e: c7 05 1c c2 13 00 9c movl $0x11bb9c,0x13c21c 119215: bb 11 00 the_watchdog->id = id; 119218: a3 20 c2 13 00 mov %eax,0x13c220 the_watchdog->user_data = user_data; 11921d: c7 05 24 c2 13 00 00 movl $0x0,0x13c224 119224: 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; 119227: c7 05 c4 c1 13 00 c8 movl $0x118fc8,0x13c1c4 11922e: 8f 11 00 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 119231: 8b 15 44 0a 14 00 mov 0x140a44,%edx 119237: 89 15 fc c1 13 00 mov %edx,0x13c1fc ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 11923d: 8b 15 a8 09 14 00 mov 0x1409a8,%edx 119243: 89 15 34 c2 13 00 mov %edx,0x13c234 ts->insert_chain = NULL; 119249: c7 05 38 c2 13 00 00 movl $0x0,0x13c238 119250: 00 00 00 ts->active = false; 119253: c6 05 3c c2 13 00 00 movb $0x0,0x13c23c /* * The default timer server is now available. */ _Timer_server = ts; 11925a: c7 05 a0 0c 14 00 c0 movl $0x13c1c0,0x140ca0 119261: c1 13 00 /* * Start the timer server */ status = rtems_task_start( 119264: 53 push %ebx 119265: 68 c0 c1 13 00 push $0x13c1c0 11926a: 68 00 8e 11 00 push $0x118e00 11926f: 50 push %eax 119270: e8 8b f2 ff ff call 118500 if (status) { initialized = false; } #endif return status; 119275: 83 c4 10 add $0x10,%esp 119278: e9 d0 fe ff ff jmp 11914d =============================================================================== 00118ad8 : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 118ad8: 55 push %ebp 118ad9: 89 e5 mov %esp,%ebp 118adb: 56 push %esi 118adc: 53 push %ebx 118add: 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 ); 118ae0: 8d 45 f4 lea -0xc(%ebp),%eax 118ae3: 50 push %eax 118ae4: ff 75 08 pushl 0x8(%ebp) 118ae7: 68 60 0c 14 00 push $0x140c60 118aec: e8 0f 27 00 00 call 11b200 <_Objects_Get> 118af1: 89 c3 mov %eax,%ebx switch ( location ) { 118af3: 83 c4 10 add $0x10,%esp 118af6: 8b 45 f4 mov -0xc(%ebp),%eax 118af9: 85 c0 test %eax,%eax 118afb: 74 0f je 118b0c #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118afd: b8 04 00 00 00 mov $0x4,%eax } 118b02: 8d 65 f8 lea -0x8(%ebp),%esp 118b05: 5b pop %ebx 118b06: 5e pop %esi 118b07: c9 leave 118b08: c3 ret 118b09: 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 ) { 118b0c: 8b 43 38 mov 0x38(%ebx),%eax 118b0f: 85 c0 test %eax,%eax 118b11: 74 1d je 118b30 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118b13: 48 dec %eax 118b14: 74 3a je 118b50 /* * 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; 118b16: b8 0b 00 00 00 mov $0xb,%eax } _Thread_Enable_dispatch(); 118b1b: 89 45 e4 mov %eax,-0x1c(%ebp) 118b1e: e8 2d 32 00 00 call 11bd50 <_Thread_Enable_dispatch> return status; 118b23: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118b26: 8d 65 f8 lea -0x8(%ebp),%esp 118b29: 5b pop %ebx 118b2a: 5e pop %esi 118b2b: c9 leave 118b2c: c3 ret 118b2d: 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 ); 118b30: 83 c3 10 add $0x10,%ebx 118b33: 83 ec 0c sub $0xc,%esp 118b36: 53 push %ebx 118b37: e8 ec 42 00 00 call 11ce28 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 118b3c: 59 pop %ecx 118b3d: 5e pop %esi 118b3e: 53 push %ebx 118b3f: 68 e0 09 14 00 push $0x1409e0 118b44: e8 9f 41 00 00 call 11cce8 <_Watchdog_Insert> 118b49: 83 c4 10 add $0x10,%esp rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 118b4c: 31 c0 xor %eax,%eax 118b4e: eb cb jmp 118b1b 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; 118b50: 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 ); 118b56: 83 ec 0c sub $0xc,%esp 118b59: 8d 43 10 lea 0x10(%ebx),%eax 118b5c: 50 push %eax 118b5d: e8 c6 42 00 00 call 11ce28 <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 118b62: 58 pop %eax 118b63: 5a pop %edx 118b64: 53 push %ebx 118b65: 56 push %esi 118b66: ff 56 04 call *0x4(%esi) 118b69: 83 c4 10 add $0x10,%esp rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 118b6c: 31 c0 xor %eax,%eax 118b6e: eb ab jmp 118b1b =============================================================================== 00118b70 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 118b70: 55 push %ebp 118b71: 89 e5 mov %esp,%ebp 118b73: 57 push %edi 118b74: 56 push %esi 118b75: 53 push %ebx 118b76: 83 ec 2c sub $0x2c,%esp 118b79: 8b 7d 0c mov 0xc(%ebp),%edi 118b7c: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 118b7f: 8b 1d a0 0c 14 00 mov 0x140ca0,%ebx if ( !timer_server ) 118b85: 85 db test %ebx,%ebx 118b87: 0f 84 9f 00 00 00 je 118c2c return RTEMS_INCORRECT_STATE; if ( !routine ) 118b8d: 85 f6 test %esi,%esi 118b8f: 0f 84 a3 00 00 00 je 118c38 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 118b95: 85 ff test %edi,%edi 118b97: 75 0f jne 118ba8 return RTEMS_INVALID_NUMBER; 118b99: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118b9e: 8d 65 f4 lea -0xc(%ebp),%esp 118ba1: 5b pop %ebx 118ba2: 5e pop %esi 118ba3: 5f pop %edi 118ba4: c9 leave 118ba5: c3 ret 118ba6: 66 90 xchg %ax,%ax 118ba8: 52 push %edx return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); 118ba9: 8d 45 e4 lea -0x1c(%ebp),%eax 118bac: 50 push %eax 118bad: ff 75 08 pushl 0x8(%ebp) 118bb0: 68 60 0c 14 00 push $0x140c60 118bb5: e8 46 26 00 00 call 11b200 <_Objects_Get> 118bba: 89 c2 mov %eax,%edx switch ( location ) { 118bbc: 83 c4 10 add $0x10,%esp 118bbf: 8b 45 e4 mov -0x1c(%ebp),%eax 118bc2: 85 c0 test %eax,%eax 118bc4: 75 56 jne 118c1c case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118bc6: 83 ec 0c sub $0xc,%esp 118bc9: 8d 42 10 lea 0x10(%edx),%eax 118bcc: 50 push %eax 118bcd: 89 55 d4 mov %edx,-0x2c(%ebp) 118bd0: e8 53 42 00 00 call 11ce28 <_Watchdog_Remove> _ISR_Disable( level ); 118bd5: 9c pushf 118bd6: fa cli 118bd7: 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 ) { 118bd8: 83 c4 10 add $0x10,%esp 118bdb: 8b 55 d4 mov -0x2c(%ebp),%edx 118bde: 8b 4a 18 mov 0x18(%edx),%ecx 118be1: 85 c9 test %ecx,%ecx 118be3: 75 5f jne 118c44 /* * 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; 118be5: 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; 118bec: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118bf3: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118bf6: 8b 4d 08 mov 0x8(%ebp),%ecx 118bf9: 89 4a 30 mov %ecx,0x30(%edx) the_watchdog->user_data = user_data; 118bfc: 8b 4d 14 mov 0x14(%ebp),%ecx 118bff: 89 4a 34 mov %ecx,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 118c02: 89 7a 1c mov %edi,0x1c(%edx) _ISR_Enable( level ); 118c05: 50 push %eax 118c06: 9d popf (*timer_server->schedule_operation)( timer_server, the_timer ); 118c07: 83 ec 08 sub $0x8,%esp 118c0a: 52 push %edx 118c0b: 53 push %ebx 118c0c: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 118c0f: e8 3c 31 00 00 call 11bd50 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118c14: 83 c4 10 add $0x10,%esp 118c17: 31 c0 xor %eax,%eax 118c19: eb 83 jmp 118b9e 118c1b: 90 nop #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118c1c: b8 04 00 00 00 mov $0x4,%eax } 118c21: 8d 65 f4 lea -0xc(%ebp),%esp 118c24: 5b pop %ebx 118c25: 5e pop %esi 118c26: 5f pop %edi 118c27: c9 leave 118c28: c3 ret 118c29: 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; 118c2c: b8 0e 00 00 00 mov $0xe,%eax 118c31: e9 68 ff ff ff jmp 118b9e 118c36: 66 90 xchg %ax,%ax if ( !routine ) return RTEMS_INVALID_ADDRESS; 118c38: b8 09 00 00 00 mov $0x9,%eax 118c3d: e9 5c ff ff ff jmp 118b9e 118c42: 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 ); 118c44: 50 push %eax 118c45: 9d popf _Thread_Enable_dispatch(); 118c46: e8 05 31 00 00 call 11bd50 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118c4b: 31 c0 xor %eax,%eax 118c4d: e9 4c ff ff ff jmp 118b9e =============================================================================== 00118c54 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 118c54: 55 push %ebp 118c55: 89 e5 mov %esp,%ebp 118c57: 57 push %edi 118c58: 56 push %esi 118c59: 53 push %ebx 118c5a: 83 ec 2c sub $0x2c,%esp 118c5d: 8b 7d 0c mov 0xc(%ebp),%edi 118c60: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 118c63: 8b 1d a0 0c 14 00 mov 0x140ca0,%ebx if ( !timer_server ) 118c69: 85 db test %ebx,%ebx 118c6b: 0f 84 d7 00 00 00 je 118d48 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 118c71: 80 3d 24 09 14 00 00 cmpb $0x0,0x140924 118c78: 0f 84 aa 00 00 00 je 118d28 <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 118c7e: 85 f6 test %esi,%esi 118c80: 0f 84 b2 00 00 00 je 118d38 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 118c86: 83 ec 0c sub $0xc,%esp 118c89: 57 push %edi 118c8a: e8 95 d1 ff ff call 115e24 <_TOD_Validate> 118c8f: 83 c4 10 add $0x10,%esp 118c92: 84 c0 test %al,%al 118c94: 75 0e jne 118ca4 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; 118c96: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118c9b: 8d 65 f4 lea -0xc(%ebp),%esp 118c9e: 5b pop %ebx 118c9f: 5e pop %esi 118ca0: 5f pop %edi 118ca1: c9 leave 118ca2: c3 ret 118ca3: 90 nop return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 118ca4: 83 ec 0c sub $0xc,%esp 118ca7: 57 push %edi 118ca8: e8 eb d0 ff ff call 115d98 <_TOD_To_seconds> 118cad: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 118caf: 83 c4 10 add $0x10,%esp 118cb2: 3b 05 a8 09 14 00 cmp 0x1409a8,%eax 118cb8: 76 dc jbe 118c96 118cba: 52 push %edx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); 118cbb: 8d 45 e4 lea -0x1c(%ebp),%eax 118cbe: 50 push %eax 118cbf: ff 75 08 pushl 0x8(%ebp) 118cc2: 68 60 0c 14 00 push $0x140c60 118cc7: e8 34 25 00 00 call 11b200 <_Objects_Get> 118ccc: 89 c2 mov %eax,%edx switch ( location ) { 118cce: 83 c4 10 add $0x10,%esp 118cd1: 8b 45 e4 mov -0x1c(%ebp),%eax 118cd4: 85 c0 test %eax,%eax 118cd6: 75 7c jne 118d54 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118cd8: 83 ec 0c sub $0xc,%esp 118cdb: 8d 42 10 lea 0x10(%edx),%eax 118cde: 50 push %eax 118cdf: 89 55 d4 mov %edx,-0x2c(%ebp) 118ce2: e8 41 41 00 00 call 11ce28 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 118ce7: 8b 55 d4 mov -0x2c(%ebp),%edx 118cea: 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; 118cf1: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118cf8: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118cfb: 8b 45 08 mov 0x8(%ebp),%eax 118cfe: 89 42 30 mov %eax,0x30(%edx) the_watchdog->user_data = user_data; 118d01: 8b 45 14 mov 0x14(%ebp),%eax 118d04: 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(); 118d07: 2b 3d a8 09 14 00 sub 0x1409a8,%edi 118d0d: 89 7a 1c mov %edi,0x1c(%edx) (*timer_server->schedule_operation)( timer_server, the_timer ); 118d10: 58 pop %eax 118d11: 59 pop %ecx 118d12: 52 push %edx 118d13: 53 push %ebx 118d14: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 118d17: e8 34 30 00 00 call 11bd50 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118d1c: 83 c4 10 add $0x10,%esp 118d1f: 31 c0 xor %eax,%eax 118d21: e9 75 ff ff ff jmp 118c9b 118d26: 66 90 xchg %ax,%ax if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 118d28: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118d2d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 118d30: 5b pop %ebx <== NOT EXECUTED 118d31: 5e pop %esi <== NOT EXECUTED 118d32: 5f pop %edi <== NOT EXECUTED 118d33: c9 leave <== NOT EXECUTED 118d34: c3 ret <== NOT EXECUTED 118d35: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; 118d38: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118d3d: 8d 65 f4 lea -0xc(%ebp),%esp 118d40: 5b pop %ebx 118d41: 5e pop %esi 118d42: 5f pop %edi 118d43: c9 leave 118d44: c3 ret 118d45: 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; 118d48: b8 0e 00 00 00 mov $0xe,%eax 118d4d: e9 49 ff ff ff jmp 118c9b 118d52: 66 90 xchg %ax,%ax #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118d54: b8 04 00 00 00 mov $0x4,%eax 118d59: e9 3d ff ff ff jmp 118c9b