=============================================================================== 0010b348 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 10b348: 55 push %ebp 10b349: 89 e5 mov %esp,%ebp 10b34b: 53 push %ebx 10b34c: 83 ec 04 sub $0x4,%esp the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10b34f: 8b 1d 18 67 12 00 mov 0x126718,%ebx void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 10b355: 81 fb 1c 67 12 00 cmp $0x12671c,%ebx 10b35b: 74 10 je 10b36d <_API_extensions_Run_postdriver+0x25><== NEVER TAKEN 10b35d: 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)(); 10b360: 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 ) { 10b363: 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 ); 10b365: 81 fb 1c 67 12 00 cmp $0x12671c,%ebx 10b36b: 75 f3 jne 10b360 <_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)(); } } 10b36d: 58 pop %eax 10b36e: 5b pop %ebx 10b36f: c9 leave 10b370: c3 ret =============================================================================== 0010b374 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 10b374: 55 push %ebp 10b375: 89 e5 mov %esp,%ebp 10b377: 53 push %ebx 10b378: 83 ec 04 sub $0x4,%esp the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10b37b: 8b 1d 18 67 12 00 mov 0x126718,%ebx void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 10b381: 81 fb 1c 67 12 00 cmp $0x12671c,%ebx 10b387: 74 1c je 10b3a5 <_API_extensions_Run_postswitch+0x31><== NEVER TAKEN 10b389: 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 ); 10b38c: 83 ec 0c sub $0xc,%esp 10b38f: ff 35 78 67 12 00 pushl 0x126778 10b395: 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 ) { 10b398: 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 ); 10b39a: 83 c4 10 add $0x10,%esp 10b39d: 81 fb 1c 67 12 00 cmp $0x12671c,%ebx 10b3a3: 75 e7 jne 10b38c <_API_extensions_Run_postswitch+0x18><== NEVER TAKEN the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10b3a5: 8b 5d fc mov -0x4(%ebp),%ebx 10b3a8: c9 leave 10b3a9: c3 ret =============================================================================== 0010ff0c <_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 ) { 10ff0c: 55 push %ebp 10ff0d: 89 e5 mov %esp,%ebp 10ff0f: 57 push %edi 10ff10: 56 push %esi 10ff11: 53 push %ebx 10ff12: 83 ec 0c sub $0xc,%esp 10ff15: 8b 5d 08 mov 0x8(%ebp),%ebx 10ff18: 8b 75 10 mov 0x10(%ebp),%esi 10ff1b: 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; 10ff1e: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 10ff21: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 10ff28: 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)) { 10ff2b: a8 03 test $0x3,%al 10ff2d: 74 15 je 10ff44 <_CORE_message_queue_Initialize+0x38> allocated_message_size += sizeof(uint32_t); 10ff2f: 8d 50 04 lea 0x4(%eax),%edx allocated_message_size &= ~(sizeof(uint32_t) - 1); 10ff32: 83 e2 fc and $0xfffffffc,%edx } if (allocated_message_size < maximum_message_size) 10ff35: 39 d0 cmp %edx,%eax 10ff37: 76 0d jbe 10ff46 <_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; 10ff39: 31 c0 xor %eax,%eax STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 10ff3b: 8d 65 f4 lea -0xc(%ebp),%esp 10ff3e: 5b pop %ebx 10ff3f: 5e pop %esi 10ff40: 5f pop %edi 10ff41: c9 leave 10ff42: c3 ret 10ff43: 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)) { 10ff44: 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)); 10ff46: 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 * 10ff49: 89 f8 mov %edi,%eax 10ff4b: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 10ff4e: 39 d0 cmp %edx,%eax 10ff50: 72 e7 jb 10ff39 <_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 ); 10ff52: 83 ec 0c sub $0xc,%esp 10ff55: 50 push %eax 10ff56: e8 15 dd ff ff call 10dc70 <_Workspace_Allocate> return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 10ff5b: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 10ff5e: 83 c4 10 add $0x10,%esp 10ff61: 85 c0 test %eax,%eax 10ff63: 74 d4 je 10ff39 <_CORE_message_queue_Initialize+0x2d> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 10ff65: 57 push %edi 10ff66: 56 push %esi 10ff67: 50 push %eax 10ff68: 8d 43 60 lea 0x60(%ebx),%eax 10ff6b: 50 push %eax 10ff6c: e8 bb fe ff ff call 10fe2c <_Chain_Initialize> Chain_Node *tail = _Chain_Tail( the_chain ); 10ff71: 8d 43 54 lea 0x54(%ebx),%eax 10ff74: 89 43 50 mov %eax,0x50(%ebx) head->next = tail; head->previous = NULL; 10ff77: 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 ); 10ff7e: 8d 43 50 lea 0x50(%ebx),%eax 10ff81: 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( 10ff84: 6a 06 push $0x6 10ff86: 68 80 00 00 00 push $0x80 10ff8b: 8b 45 0c mov 0xc(%ebp),%eax 10ff8e: 83 38 01 cmpl $0x1,(%eax) 10ff91: 0f 94 c0 sete %al 10ff94: 0f b6 c0 movzbl %al,%eax 10ff97: 50 push %eax 10ff98: 53 push %ebx 10ff99: e8 3e d4 ff ff call 10d3dc <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 10ff9e: 83 c4 20 add $0x20,%esp 10ffa1: b0 01 mov $0x1,%al } 10ffa3: 8d 65 f4 lea -0xc(%ebp),%esp 10ffa6: 5b pop %ebx 10ffa7: 5e pop %esi 10ffa8: 5f pop %edi 10ffa9: c9 leave 10ffaa: c3 ret =============================================================================== 00111c20 <_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 ) { 111c20: 55 push %ebp 111c21: 89 e5 mov %esp,%ebp 111c23: 56 push %esi 111c24: 53 push %ebx 111c25: 8b 45 08 mov 0x8(%ebp),%eax 111c28: 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 ); 111c2b: 9c pushf 111c2c: fa cli 111c2d: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 111c2e: ff 40 48 incl 0x48(%eax) if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) 111c31: 81 7d 10 ff ff ff 7f cmpl $0x7fffffff,0x10(%ebp) 111c38: 74 1a je 111c54 <_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); 111c3a: 8d 48 50 lea 0x50(%eax),%ecx 111c3d: 89 4a 04 mov %ecx,0x4(%edx) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 111c40: 8b 48 50 mov 0x50(%eax),%ecx after_node->next = the_node; 111c43: 89 50 50 mov %edx,0x50(%eax) the_node->next = before_node; 111c46: 89 0a mov %ecx,(%edx) before_node->previous = the_node; 111c48: 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 ); 111c4b: 53 push %ebx 111c4c: 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 } 111c4d: 5b pop %ebx 111c4e: 5e pop %esi 111c4f: c9 leave 111c50: c3 ret 111c51: 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; 111c54: 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 ); 111c57: 8d 70 54 lea 0x54(%eax),%esi 111c5a: 89 32 mov %esi,(%edx) Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; 111c5c: 89 50 58 mov %edx,0x58(%eax) old_last->next = the_node; 111c5f: 89 11 mov %edx,(%ecx) the_node->previous = old_last; 111c61: 89 4a 04 mov %ecx,0x4(%edx) 111c64: eb e5 jmp 111c4b <_CORE_message_queue_Insert_message+0x2b> =============================================================================== 00110084 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 110084: 55 push %ebp 110085: 89 e5 mov %esp,%ebp 110087: 57 push %edi 110088: 56 push %esi 110089: 53 push %ebx 11008a: 83 ec 0c sub $0xc,%esp 11008d: 8b 5d 08 mov 0x8(%ebp),%ebx 110090: 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 ) { 110093: 8b 45 10 mov 0x10(%ebp),%eax 110096: 39 43 4c cmp %eax,0x4c(%ebx) 110099: 72 51 jb 1100ec <_CORE_message_queue_Submit+0x68> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 11009b: 8b 43 48 mov 0x48(%ebx),%eax 11009e: 85 c0 test %eax,%eax 1100a0: 74 5a je 1100fc <_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 < 1100a2: 39 43 44 cmp %eax,0x44(%ebx) 1100a5: 77 0d ja 1100b4 <_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; 1100a7: 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 } 1100ac: 8d 65 f4 lea -0xc(%ebp),%esp 1100af: 5b pop %ebx 1100b0: 5e pop %esi 1100b1: 5f pop %edi 1100b2: c9 leave 1100b3: 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 ); 1100b4: 83 ec 0c sub $0xc,%esp 1100b7: 8d 43 60 lea 0x60(%ebx),%eax 1100ba: 50 push %eax 1100bb: e8 00 b4 ff ff call 10b4c0 <_Chain_Get> 1100c0: 89 c2 mov %eax,%edx return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED; #endif _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, 1100c2: 8d 40 0c lea 0xc(%eax),%eax const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 1100c5: 89 c7 mov %eax,%edi 1100c7: 8b 4d 10 mov 0x10(%ebp),%ecx 1100ca: f3 a4 rep movsb %ds:(%esi),%es:(%edi) size ); the_message->Contents.size = size; 1100cc: 8b 4d 10 mov 0x10(%ebp),%ecx 1100cf: 89 4a 08 mov %ecx,0x8(%edx) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 1100d2: 83 c4 0c add $0xc,%esp 1100d5: ff 75 1c pushl 0x1c(%ebp) 1100d8: 52 push %edx 1100d9: 53 push %ebx 1100da: e8 41 1b 00 00 call 111c20 <_CORE_message_queue_Insert_message> the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 1100df: 83 c4 10 add $0x10,%esp 1100e2: 31 c0 xor %eax,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 1100e4: 8d 65 f4 lea -0xc(%ebp),%esp 1100e7: 5b pop %ebx 1100e8: 5e pop %esi 1100e9: 5f pop %edi 1100ea: c9 leave 1100eb: 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; 1100ec: 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 } 1100f1: 8d 65 f4 lea -0xc(%ebp),%esp 1100f4: 5b pop %ebx 1100f5: 5e pop %esi 1100f6: 5f pop %edi 1100f7: c9 leave 1100f8: c3 ret 1100f9: 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 ); 1100fc: 83 ec 0c sub $0xc,%esp 1100ff: 53 push %ebx 110100: e8 47 cf ff ff call 10d04c <_Thread_queue_Dequeue> 110105: 89 c2 mov %eax,%edx if ( the_thread ) { 110107: 83 c4 10 add $0x10,%esp 11010a: 85 c0 test %eax,%eax 11010c: 74 1e je 11012c <_CORE_message_queue_Submit+0xa8> 11010e: 8b 40 2c mov 0x2c(%eax),%eax 110111: 89 c7 mov %eax,%edi 110113: 8b 4d 10 mov 0x10(%ebp),%ecx 110116: 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; 110118: 8b 42 28 mov 0x28(%edx),%eax 11011b: 8b 4d 10 mov 0x10(%ebp),%ecx 11011e: 89 08 mov %ecx,(%eax) the_thread->Wait.count = (uint32_t) submit_type; 110120: 8b 45 1c mov 0x1c(%ebp),%eax 110123: 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; 110126: 31 c0 xor %eax,%eax 110128: eb 82 jmp 1100ac <_CORE_message_queue_Submit+0x28> 11012a: 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 ) { 11012c: 8b 43 48 mov 0x48(%ebx),%eax 11012f: e9 6e ff ff ff jmp 1100a2 <_CORE_message_queue_Submit+0x1e> =============================================================================== 0010b4f0 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10b4f0: 55 push %ebp 10b4f1: 89 e5 mov %esp,%ebp 10b4f3: 57 push %edi 10b4f4: 56 push %esi 10b4f5: 53 push %ebx 10b4f6: 83 ec 0c sub $0xc,%esp 10b4f9: 8b 45 08 mov 0x8(%ebp),%eax 10b4fc: 8b 5d 0c mov 0xc(%ebp),%ebx 10b4ff: 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; 10b502: 8d 78 40 lea 0x40(%eax),%edi 10b505: b9 04 00 00 00 mov $0x4,%ecx 10b50a: 89 de mov %ebx,%esi 10b50c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10b50e: 89 50 50 mov %edx,0x50(%eax) the_mutex->blocked_count = 0; 10b511: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10b518: 85 d2 test %edx,%edx 10b51a: 75 30 jne 10b54c <_CORE_mutex_Initialize+0x5c> the_mutex->nest_count = 1; 10b51c: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) the_mutex->holder = _Thread_Executing; 10b523: 8b 15 78 67 12 00 mov 0x126778,%edx 10b529: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = _Thread_Executing->Object.id; 10b52c: 8b 4a 08 mov 0x8(%edx),%ecx 10b52f: 89 48 60 mov %ecx,0x60(%eax) STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10b532: 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 ) || 10b535: 83 f9 02 cmp $0x2,%ecx 10b538: 74 05 je 10b53f <_CORE_mutex_Initialize+0x4f> 10b53a: 83 f9 03 cmp $0x3,%ecx 10b53d: 75 22 jne 10b561 <_CORE_mutex_Initialize+0x71> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 10b53f: 8b 48 4c mov 0x4c(%eax),%ecx 10b542: 39 4a 14 cmp %ecx,0x14(%edx) 10b545: 72 41 jb 10b588 <_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++; 10b547: ff 42 1c incl 0x1c(%edx) 10b54a: eb 15 jmp 10b561 <_CORE_mutex_Initialize+0x71> } } else { the_mutex->nest_count = 0; 10b54c: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_mutex->holder = NULL; 10b553: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) the_mutex->holder_id = 0; 10b55a: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) } _Thread_queue_Initialize( 10b561: 6a 04 push $0x4 10b563: 68 00 04 00 00 push $0x400 10b568: 31 d2 xor %edx,%edx 10b56a: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10b56e: 0f 95 c2 setne %dl 10b571: 52 push %edx 10b572: 50 push %eax 10b573: e8 64 1e 00 00 call 10d3dc <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 10b578: 83 c4 10 add $0x10,%esp 10b57b: 31 c0 xor %eax,%eax } 10b57d: 8d 65 f4 lea -0xc(%ebp),%esp 10b580: 5b pop %ebx 10b581: 5e pop %esi 10b582: 5f pop %edi 10b583: c9 leave 10b584: c3 ret 10b585: 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; 10b588: b8 05 00 00 00 mov $0x5,%eax STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10b58d: 8d 65 f4 lea -0xc(%ebp),%esp 10b590: 5b pop %ebx 10b591: 5e pop %esi 10b592: 5f pop %edi 10b593: c9 leave 10b594: c3 ret =============================================================================== 0010b5e8 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10b5e8: 55 push %ebp 10b5e9: 89 e5 mov %esp,%ebp 10b5eb: 53 push %ebx 10b5ec: 83 ec 14 sub $0x14,%esp 10b5ef: 8b 5d 08 mov 0x8(%ebp),%ebx 10b5f2: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10b5f5: a1 ec 64 12 00 mov 0x1264ec,%eax 10b5fa: 85 c0 test %eax,%eax 10b5fc: 74 04 je 10b602 <_CORE_mutex_Seize+0x1a> 10b5fe: 84 d2 test %dl,%dl 10b600: 75 36 jne 10b638 <_CORE_mutex_Seize+0x50><== ALWAYS TAKEN 10b602: 83 ec 08 sub $0x8,%esp 10b605: 8d 45 18 lea 0x18(%ebp),%eax 10b608: 50 push %eax 10b609: 53 push %ebx 10b60a: 88 55 f4 mov %dl,-0xc(%ebp) 10b60d: e8 22 4b 00 00 call 110134 <_CORE_mutex_Seize_interrupt_trylock> 10b612: 83 c4 10 add $0x10,%esp 10b615: 85 c0 test %eax,%eax 10b617: 8a 55 f4 mov -0xc(%ebp),%dl 10b61a: 74 14 je 10b630 <_CORE_mutex_Seize+0x48> 10b61c: 84 d2 test %dl,%dl 10b61e: 75 30 jne 10b650 <_CORE_mutex_Seize+0x68> 10b620: ff 75 18 pushl 0x18(%ebp) 10b623: 9d popf 10b624: a1 78 67 12 00 mov 0x126778,%eax 10b629: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) } 10b630: 8b 5d fc mov -0x4(%ebp),%ebx 10b633: c9 leave 10b634: c3 ret 10b635: 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 ); 10b638: 83 3d 80 66 12 00 01 cmpl $0x1,0x126680 10b63f: 76 c1 jbe 10b602 <_CORE_mutex_Seize+0x1a> 10b641: 53 push %ebx 10b642: 6a 12 push $0x12 10b644: 6a 00 push $0x0 10b646: 6a 00 push $0x0 10b648: e8 1b 06 00 00 call 10bc68 <_Internal_error_Occurred> 10b64d: 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; 10b650: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10b657: a1 78 67 12 00 mov 0x126778,%eax 10b65c: 89 58 44 mov %ebx,0x44(%eax) 10b65f: 8b 55 0c mov 0xc(%ebp),%edx 10b662: 89 50 20 mov %edx,0x20(%eax) 10b665: a1 ec 64 12 00 mov 0x1264ec,%eax 10b66a: 40 inc %eax 10b66b: a3 ec 64 12 00 mov %eax,0x1264ec 10b670: ff 75 18 pushl 0x18(%ebp) 10b673: 9d popf 10b674: 83 ec 08 sub $0x8,%esp 10b677: ff 75 14 pushl 0x14(%ebp) 10b67a: 53 push %ebx 10b67b: e8 18 ff ff ff call 10b598 <_CORE_mutex_Seize_interrupt_blocking> 10b680: 83 c4 10 add $0x10,%esp } 10b683: 8b 5d fc mov -0x4(%ebp),%ebx 10b686: c9 leave 10b687: c3 ret =============================================================================== 00110134 <_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 ) { 110134: 55 push %ebp 110135: 89 e5 mov %esp,%ebp 110137: 56 push %esi 110138: 53 push %ebx 110139: 8b 45 08 mov 0x8(%ebp),%eax 11013c: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 11013f: 8b 15 78 67 12 00 mov 0x126778,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 110145: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 11014c: 8b 58 50 mov 0x50(%eax),%ebx 11014f: 85 db test %ebx,%ebx 110151: 74 31 je 110184 <_CORE_mutex_Seize_interrupt_trylock+0x50> the_mutex->lock = CORE_MUTEX_LOCKED; 110153: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 11015a: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 11015d: 8b 5a 08 mov 0x8(%edx),%ebx 110160: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 110163: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 11016a: 8b 58 48 mov 0x48(%eax),%ebx if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 11016d: 83 fb 02 cmp $0x2,%ebx 110170: 74 26 je 110198 <_CORE_mutex_Seize_interrupt_trylock+0x64> 110172: 83 fb 03 cmp $0x3,%ebx 110175: 74 3d je 1101b4 <_CORE_mutex_Seize_interrupt_trylock+0x80> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 110177: ff 31 pushl (%ecx) 110179: 9d popf return 0; 11017a: 31 c0 xor %eax,%eax 11017c: 8d 65 f8 lea -0x8(%ebp),%esp 11017f: 5b pop %ebx 110180: 5e pop %esi 110181: c9 leave 110182: c3 ret 110183: 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 ) ) { 110184: 3b 50 5c cmp 0x5c(%eax),%edx 110187: 74 17 je 1101a0 <_CORE_mutex_Seize_interrupt_trylock+0x6c> /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; 110189: b8 01 00 00 00 mov $0x1,%eax 11018e: 8d 65 f8 lea -0x8(%ebp),%esp 110191: 5b pop %ebx 110192: 5e pop %esi 110193: c9 leave 110194: c3 ret 110195: 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++; 110198: ff 42 1c incl 0x1c(%edx) 11019b: eb da jmp 110177 <_CORE_mutex_Seize_interrupt_trylock+0x43> 11019d: 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 ) { 1101a0: 8b 50 40 mov 0x40(%eax),%edx 1101a3: 85 d2 test %edx,%edx 1101a5: 75 e2 jne 110189 <_CORE_mutex_Seize_interrupt_trylock+0x55> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 1101a7: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 1101aa: ff 31 pushl (%ecx) 1101ac: 9d popf return 0; 1101ad: 31 c0 xor %eax,%eax 1101af: eb dd jmp 11018e <_CORE_mutex_Seize_interrupt_trylock+0x5a> 1101b1: 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++; 1101b4: 8b 5a 1c mov 0x1c(%edx),%ebx 1101b7: 8d 73 01 lea 0x1(%ebx),%esi 1101ba: 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 ) { 1101bd: 8b 72 14 mov 0x14(%edx),%esi 1101c0: 39 70 4c cmp %esi,0x4c(%eax) 1101c3: 74 57 je 11021c <_CORE_mutex_Seize_interrupt_trylock+0xe8> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 1101c5: 72 25 jb 1101ec <_CORE_mutex_Seize_interrupt_trylock+0xb8> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 1101c7: c7 42 34 05 00 00 00 movl $0x5,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 1101ce: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 1101d5: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 1101dc: 89 5a 1c mov %ebx,0x1c(%edx) _ISR_Enable( *level_p ); 1101df: ff 31 pushl (%ecx) 1101e1: 9d popf return 0; 1101e2: 31 c0 xor %eax,%eax 1101e4: 8d 65 f8 lea -0x8(%ebp),%esp 1101e7: 5b pop %ebx 1101e8: 5e pop %esi 1101e9: c9 leave 1101ea: c3 ret 1101eb: 90 nop rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1101ec: 8b 15 ec 64 12 00 mov 0x1264ec,%edx 1101f2: 42 inc %edx 1101f3: 89 15 ec 64 12 00 mov %edx,0x1264ec return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 1101f9: ff 31 pushl (%ecx) 1101fb: 9d popf _Thread_Change_priority( 1101fc: 51 push %ecx 1101fd: 6a 00 push $0x0 1101ff: ff 70 4c pushl 0x4c(%eax) 110202: ff 70 5c pushl 0x5c(%eax) 110205: e8 ba c6 ff ff call 10c8c4 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 11020a: e8 ed ca ff ff call 10ccfc <_Thread_Enable_dispatch> 11020f: 83 c4 10 add $0x10,%esp return 0; 110212: 31 c0 xor %eax,%eax 110214: e9 75 ff ff ff jmp 11018e <_CORE_mutex_Seize_interrupt_trylock+0x5a> 110219: 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 ); 11021c: ff 31 pushl (%ecx) 11021e: 9d popf return 0; 11021f: 31 c0 xor %eax,%eax 110221: e9 68 ff ff ff jmp 11018e <_CORE_mutex_Seize_interrupt_trylock+0x5a> =============================================================================== 0010b688 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 10b688: 55 push %ebp 10b689: 89 e5 mov %esp,%ebp 10b68b: 53 push %ebx 10b68c: 83 ec 04 sub $0x4,%esp 10b68f: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; Thread_Control *holder; holder = the_mutex->holder; 10b692: 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 ) { 10b695: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10b699: 74 15 je 10b6b0 <_CORE_mutex_Surrender+0x28> if ( !_Thread_Is_executing( holder ) ) 10b69b: 3b 05 78 67 12 00 cmp 0x126778,%eax 10b6a1: 74 0d je 10b6b0 <_CORE_mutex_Surrender+0x28> return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; 10b6a3: b8 02 00 00 00 mov $0x2,%eax } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10b6a8: 8b 5d fc mov -0x4(%ebp),%ebx 10b6ab: c9 leave 10b6ac: c3 ret 10b6ad: 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 ) 10b6b0: 8b 53 54 mov 0x54(%ebx),%edx 10b6b3: 85 d2 test %edx,%edx 10b6b5: 74 51 je 10b708 <_CORE_mutex_Surrender+0x80> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10b6b7: 4a dec %edx 10b6b8: 89 53 54 mov %edx,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10b6bb: 85 d2 test %edx,%edx 10b6bd: 75 49 jne 10b708 <_CORE_mutex_Surrender+0x80> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10b6bf: 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 ) || 10b6c2: 83 fa 02 cmp $0x2,%edx 10b6c5: 74 69 je 10b730 <_CORE_mutex_Surrender+0xa8> 10b6c7: 83 fa 03 cmp $0x3,%edx 10b6ca: 74 64 je 10b730 <_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; 10b6cc: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10b6d3: 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 ) ) ) { 10b6da: 83 ec 0c sub $0xc,%esp 10b6dd: 53 push %ebx 10b6de: e8 69 19 00 00 call 10d04c <_Thread_queue_Dequeue> 10b6e3: 83 c4 10 add $0x10,%esp 10b6e6: 85 c0 test %eax,%eax 10b6e8: 74 7a je 10b764 <_CORE_mutex_Surrender+0xdc> } else #endif { the_mutex->holder = the_thread; 10b6ea: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10b6ed: 8b 50 08 mov 0x8(%eax),%edx 10b6f0: 89 53 60 mov %edx,0x60(%ebx) the_mutex->nest_count = 1; 10b6f3: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10b6fa: 8b 53 48 mov 0x48(%ebx),%edx 10b6fd: 83 fa 02 cmp $0x2,%edx 10b700: 74 56 je 10b758 <_CORE_mutex_Surrender+0xd0> 10b702: 83 fa 03 cmp $0x3,%edx 10b705: 74 09 je 10b710 <_CORE_mutex_Surrender+0x88> 10b707: 90 nop } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10b708: 31 c0 xor %eax,%eax } 10b70a: 8b 5d fc mov -0x4(%ebp),%ebx 10b70d: c9 leave 10b70e: c3 ret 10b70f: 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++; 10b710: ff 40 1c incl 0x1c(%eax) if (the_mutex->Attributes.priority_ceiling < 10b713: 8b 53 4c mov 0x4c(%ebx),%edx 10b716: 3b 50 14 cmp 0x14(%eax),%edx 10b719: 73 ed jae 10b708 <_CORE_mutex_Surrender+0x80> the_thread->current_priority){ _Thread_Change_priority( 10b71b: 51 push %ecx 10b71c: 6a 00 push $0x0 10b71e: 52 push %edx 10b71f: 50 push %eax 10b720: e8 9f 11 00 00 call 10c8c4 <_Thread_Change_priority> 10b725: 83 c4 10 add $0x10,%esp } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10b728: 31 c0 xor %eax,%eax 10b72a: e9 79 ff ff ff jmp 10b6a8 <_CORE_mutex_Surrender+0x20> 10b72f: 90 nop _CORE_mutex_Pop_priority( the_mutex, holder ); if ( pop_status != CORE_MUTEX_STATUS_SUCCESSFUL ) return pop_status; holder->resource_count--; 10b730: 8b 50 1c mov 0x1c(%eax),%edx 10b733: 4a dec %edx 10b734: 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 && 10b737: 85 d2 test %edx,%edx 10b739: 75 91 jne 10b6cc <_CORE_mutex_Surrender+0x44> holder->real_priority != holder->current_priority ) { 10b73b: 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 && 10b73e: 3b 50 14 cmp 0x14(%eax),%edx 10b741: 74 89 je 10b6cc <_CORE_mutex_Surrender+0x44> holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, true ); 10b743: 51 push %ecx 10b744: 6a 01 push $0x1 10b746: 52 push %edx 10b747: 50 push %eax 10b748: e8 77 11 00 00 call 10c8c4 <_Thread_Change_priority> 10b74d: 83 c4 10 add $0x10,%esp 10b750: e9 77 ff ff ff jmp 10b6cc <_CORE_mutex_Surrender+0x44> 10b755: 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++; 10b758: ff 40 1c incl 0x1c(%eax) } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10b75b: 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; 10b75d: e9 46 ff ff ff jmp 10b6a8 <_CORE_mutex_Surrender+0x20> 10b762: 66 90 xchg %ax,%ax } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10b764: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) return CORE_MUTEX_STATUS_SUCCESSFUL; 10b76b: 31 c0 xor %eax,%eax 10b76d: e9 36 ff ff ff jmp 10b6a8 <_CORE_mutex_Surrender+0x20> =============================================================================== 0010b7c0 <_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 ) { 10b7c0: 55 push %ebp 10b7c1: 89 e5 mov %esp,%ebp 10b7c3: 53 push %ebx 10b7c4: 83 ec 10 sub $0x10,%esp 10b7c7: 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)) ) { 10b7ca: 53 push %ebx 10b7cb: e8 7c 18 00 00 call 10d04c <_Thread_queue_Dequeue> 10b7d0: 83 c4 10 add $0x10,%esp 10b7d3: 85 c0 test %eax,%eax 10b7d5: 74 09 je 10b7e0 <_CORE_semaphore_Surrender+0x20> { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10b7d7: 31 c0 xor %eax,%eax status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 10b7d9: 8b 5d fc mov -0x4(%ebp),%ebx 10b7dc: c9 leave 10b7dd: c3 ret 10b7de: 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 ); 10b7e0: 9c pushf 10b7e1: fa cli 10b7e2: 5a pop %edx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10b7e3: 8b 43 48 mov 0x48(%ebx),%eax 10b7e6: 3b 43 40 cmp 0x40(%ebx),%eax 10b7e9: 72 0d jb 10b7f8 <_CORE_semaphore_Surrender+0x38><== ALWAYS TAKEN the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; 10b7eb: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED _ISR_Enable( level ); 10b7f0: 52 push %edx 10b7f1: 9d popf } return status; } 10b7f2: 8b 5d fc mov -0x4(%ebp),%ebx 10b7f5: c9 leave 10b7f6: c3 ret 10b7f7: 90 nop #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 10b7f8: 40 inc %eax 10b7f9: 89 43 48 mov %eax,0x48(%ebx) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10b7fc: 31 c0 xor %eax,%eax 10b7fe: eb f0 jmp 10b7f0 <_CORE_semaphore_Surrender+0x30> =============================================================================== 0010bc28 <_Chain_Get_with_empty_check>: bool _Chain_Get_with_empty_check( Chain_Control *chain, Chain_Node **node ) { 10bc28: 55 push %ebp 10bc29: 89 e5 mov %esp,%ebp 10bc2b: 57 push %edi 10bc2c: 56 push %esi 10bc2d: 53 push %ebx 10bc2e: 8b 45 08 mov 0x8(%ebp),%eax 10bc31: 8b 7d 0c mov 0xc(%ebp),%edi ISR_Level level; bool is_empty_now; _ISR_Disable( level ); 10bc34: 9c pushf 10bc35: fa cli 10bc36: 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 ); 10bc37: 8d 58 04 lea 0x4(%eax),%ebx Chain_Node *old_first = head->next; 10bc3a: 8b 10 mov (%eax),%edx if ( old_first != tail ) { 10bc3c: 39 d3 cmp %edx,%ebx 10bc3e: 74 18 je 10bc58 <_Chain_Get_with_empty_check+0x30> Chain_Node *new_first = old_first->next; 10bc40: 8b 0a mov (%edx),%ecx head->next = new_first; 10bc42: 89 08 mov %ecx,(%eax) new_first->previous = head; 10bc44: 89 41 04 mov %eax,0x4(%ecx) *the_node = old_first; 10bc47: 89 17 mov %edx,(%edi) is_empty_now = new_first == tail; 10bc49: 39 cb cmp %ecx,%ebx 10bc4b: 0f 94 c0 sete %al is_empty_now = _Chain_Get_with_empty_check_unprotected( chain, node ); _ISR_Enable( level ); 10bc4e: 56 push %esi 10bc4f: 9d popf return is_empty_now; } 10bc50: 5b pop %ebx 10bc51: 5e pop %esi 10bc52: 5f pop %edi 10bc53: c9 leave 10bc54: c3 ret 10bc55: 8d 76 00 lea 0x0(%esi),%esi } else *the_node = NULL; 10bc58: 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; 10bc5e: b0 01 mov $0x1,%al 10bc60: eb ec jmp 10bc4e <_Chain_Get_with_empty_check+0x26> =============================================================================== 0010fe2c <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 10fe2c: 55 push %ebp 10fe2d: 89 e5 mov %esp,%ebp 10fe2f: 57 push %edi 10fe30: 56 push %esi 10fe31: 53 push %ebx 10fe32: 83 ec 08 sub $0x8,%esp 10fe35: 8b 7d 08 mov 0x8(%ebp),%edi 10fe38: 8b 4d 10 mov 0x10(%ebp),%ecx 10fe3b: 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 ); 10fe3e: 8d 47 04 lea 0x4(%edi),%eax 10fe41: 89 45 f0 mov %eax,-0x10(%ebp) Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; 10fe44: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) while ( count-- ) { 10fe4b: 85 c9 test %ecx,%ecx 10fe4d: 74 35 je 10fe84 <_Chain_Initialize+0x58><== NEVER TAKEN 10fe4f: 49 dec %ecx 10fe50: 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; 10fe53: 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; 10fe56: 89 fa mov %edi,%edx 10fe58: eb 07 jmp 10fe61 <_Chain_Initialize+0x35> 10fe5a: 66 90 xchg %ax,%ax Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 10fe5c: 89 c2 mov %eax,%edx current->next = next; next->previous = current; current = next; next = (Chain_Node *) 10fe5e: 89 d8 mov %ebx,%eax 10fe60: 49 dec %ecx Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { current->next = next; 10fe61: 89 02 mov %eax,(%edx) next->previous = current; 10fe63: 89 50 04 mov %edx,0x4(%eax) * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 10fe66: 8d 1c 30 lea (%eax,%esi,1),%ebx Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 10fe69: 85 c9 test %ecx,%ecx 10fe6b: 75 ef jne 10fe5c <_Chain_Initialize+0x30> * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 10fe6d: 0f af 75 ec imul -0x14(%ebp),%esi 10fe71: 03 75 0c add 0xc(%ebp),%esi current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; 10fe74: 8b 45 f0 mov -0x10(%ebp),%eax 10fe77: 89 06 mov %eax,(%esi) tail->previous = current; 10fe79: 89 77 08 mov %esi,0x8(%edi) } 10fe7c: 83 c4 08 add $0x8,%esp 10fe7f: 5b pop %ebx 10fe80: 5e pop %esi 10fe81: 5f pop %edi 10fe82: c9 leave 10fe83: 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; 10fe84: 89 fe mov %edi,%esi <== NOT EXECUTED 10fe86: eb ec jmp 10fe74 <_Chain_Initialize+0x48><== NOT EXECUTED =============================================================================== 0010a618 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10a618: 55 push %ebp 10a619: 89 e5 mov %esp,%ebp 10a61b: 57 push %edi 10a61c: 56 push %esi 10a61d: 53 push %ebx 10a61e: 83 ec 2c sub $0x2c,%esp 10a621: 8b 45 08 mov 0x8(%ebp),%eax 10a624: 8b 4d 0c mov 0xc(%ebp),%ecx 10a627: 8b 55 10 mov 0x10(%ebp),%edx 10a62a: 89 55 dc mov %edx,-0x24(%ebp) 10a62d: 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; 10a630: 8b 1d 78 67 12 00 mov 0x126778,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10a636: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10a63d: 8b b3 e4 00 00 00 mov 0xe4(%ebx),%esi _ISR_Disable( level ); 10a643: 9c pushf 10a644: fa cli 10a645: 8f 45 e0 popl -0x20(%ebp) pending_events = api->pending_events; 10a648: 8b 16 mov (%esi),%edx 10a64a: 89 55 d4 mov %edx,-0x2c(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10a64d: 21 c2 and %eax,%edx 10a64f: 89 55 e4 mov %edx,-0x1c(%ebp) 10a652: 74 0d je 10a661 <_Event_Seize+0x49> 10a654: 39 d0 cmp %edx,%eax 10a656: 0f 84 84 00 00 00 je 10a6e0 <_Event_Seize+0xc8> (seized_events == event_in || _Options_Is_any( option_set )) ) { 10a65c: f6 c1 02 test $0x2,%cl 10a65f: 75 7f jne 10a6e0 <_Event_Seize+0xc8> _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10a661: f6 c1 01 test $0x1,%cl 10a664: 75 62 jne 10a6c8 <_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; 10a666: 89 4b 30 mov %ecx,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10a669: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10a66c: 89 7b 28 mov %edi,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10a66f: c7 05 e0 67 12 00 01 movl $0x1,0x1267e0 10a676: 00 00 00 _ISR_Enable( level ); 10a679: ff 75 e0 pushl -0x20(%ebp) 10a67c: 9d popf if ( ticks ) { 10a67d: 8b 45 dc mov -0x24(%ebp),%eax 10a680: 85 c0 test %eax,%eax 10a682: 0f 85 80 00 00 00 jne 10a708 <_Event_Seize+0xf0> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10a688: 83 ec 08 sub $0x8,%esp 10a68b: 68 00 01 00 00 push $0x100 10a690: 53 push %ebx 10a691: e8 5a 2e 00 00 call 10d4f0 <_Thread_Set_state> _ISR_Disable( level ); 10a696: 9c pushf 10a697: fa cli 10a698: 5a pop %edx sync_state = _Event_Sync_state; 10a699: a1 e0 67 12 00 mov 0x1267e0,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10a69e: c7 05 e0 67 12 00 00 movl $0x0,0x1267e0 10a6a5: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10a6a8: 83 c4 10 add $0x10,%esp 10a6ab: 83 f8 01 cmp $0x1,%eax 10a6ae: 74 4c je 10a6fc <_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 ); 10a6b0: 89 55 10 mov %edx,0x10(%ebp) 10a6b3: 89 5d 0c mov %ebx,0xc(%ebp) 10a6b6: 89 45 08 mov %eax,0x8(%ebp) } 10a6b9: 8d 65 f4 lea -0xc(%ebp),%esp 10a6bc: 5b pop %ebx 10a6bd: 5e pop %esi 10a6be: 5f pop %edi 10a6bf: 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 ); 10a6c0: e9 b3 21 00 00 jmp 10c878 <_Thread_blocking_operation_Cancel> 10a6c5: 8d 76 00 lea 0x0(%esi),%esi *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 10a6c8: ff 75 e0 pushl -0x20(%ebp) 10a6cb: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10a6cc: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10a6d3: 8b 55 e4 mov -0x1c(%ebp),%edx 10a6d6: 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 ); } 10a6d8: 8d 65 f4 lea -0xc(%ebp),%esp 10a6db: 5b pop %ebx 10a6dc: 5e pop %esi 10a6dd: 5f pop %edi 10a6de: c9 leave 10a6df: 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) ); 10a6e0: 8b 45 e4 mov -0x1c(%ebp),%eax 10a6e3: f7 d0 not %eax 10a6e5: 23 45 d4 and -0x2c(%ebp),%eax 10a6e8: 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 ); 10a6ea: ff 75 e0 pushl -0x20(%ebp) 10a6ed: 9d popf *event_out = seized_events; 10a6ee: 8b 45 e4 mov -0x1c(%ebp),%eax 10a6f1: 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 ); } 10a6f3: 8d 65 f4 lea -0xc(%ebp),%esp 10a6f6: 5b pop %ebx 10a6f7: 5e pop %esi 10a6f8: 5f pop %edi 10a6f9: c9 leave 10a6fa: c3 ret 10a6fb: 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 ); 10a6fc: 52 push %edx 10a6fd: 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 ); } 10a6fe: 8d 65 f4 lea -0xc(%ebp),%esp 10a701: 5b pop %ebx 10a702: 5e pop %esi 10a703: 5f pop %edi 10a704: c9 leave 10a705: c3 ret 10a706: 66 90 xchg %ax,%ax _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 10a708: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10a70b: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10a712: c7 43 64 bc a8 10 00 movl $0x10a8bc,0x64(%ebx) the_watchdog->id = id; 10a719: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10a71c: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10a723: 8b 45 dc mov -0x24(%ebp),%eax 10a726: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10a729: 83 ec 08 sub $0x8,%esp &executing->Timer, _Event_Timeout, executing->Object.id, NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); 10a72c: 8d 43 48 lea 0x48(%ebx),%eax 10a72f: 50 push %eax 10a730: 68 c0 65 12 00 push $0x1265c0 10a735: e8 ce 32 00 00 call 10da08 <_Watchdog_Insert> 10a73a: 83 c4 10 add $0x10,%esp 10a73d: e9 46 ff ff ff jmp 10a688 <_Event_Seize+0x70> =============================================================================== 0010a798 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10a798: 55 push %ebp 10a799: 89 e5 mov %esp,%ebp 10a79b: 57 push %edi 10a79c: 56 push %esi 10a79d: 53 push %ebx 10a79e: 83 ec 2c sub $0x2c,%esp 10a7a1: 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 ]; 10a7a4: 8b 8b e4 00 00 00 mov 0xe4(%ebx),%ecx option_set = (rtems_option) the_thread->Wait.option; 10a7aa: 8b 7b 30 mov 0x30(%ebx),%edi _ISR_Disable( level ); 10a7ad: 9c pushf 10a7ae: fa cli 10a7af: 8f 45 d4 popl -0x2c(%ebp) pending_events = api->pending_events; 10a7b2: 8b 11 mov (%ecx),%edx event_condition = (rtems_event_set) the_thread->Wait.count; 10a7b4: 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 ) ) { 10a7b7: 89 c6 mov %eax,%esi 10a7b9: 21 d6 and %edx,%esi 10a7bb: 89 75 e4 mov %esi,-0x1c(%ebp) 10a7be: 74 74 je 10a834 <_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() && 10a7c0: 8b 35 74 67 12 00 mov 0x126774,%esi 10a7c6: 85 f6 test %esi,%esi 10a7c8: 74 0c je 10a7d6 <_Event_Surrender+0x3e> 10a7ca: 3b 1d 78 67 12 00 cmp 0x126778,%ebx 10a7d0: 0f 84 96 00 00 00 je 10a86c <_Event_Surrender+0xd4> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10a7d6: f6 43 11 01 testb $0x1,0x11(%ebx) 10a7da: 74 4c je 10a828 <_Event_Surrender+0x90> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 10a7dc: 3b 45 e4 cmp -0x1c(%ebp),%eax 10a7df: 74 05 je 10a7e6 <_Event_Surrender+0x4e> 10a7e1: 83 e7 02 and $0x2,%edi 10a7e4: 74 42 je 10a828 <_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) ); 10a7e6: 8b 45 e4 mov -0x1c(%ebp),%eax 10a7e9: f7 d0 not %eax 10a7eb: 21 d0 and %edx,%eax 10a7ed: 89 01 mov %eax,(%ecx) api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 10a7ef: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10a7f6: 8b 43 28 mov 0x28(%ebx),%eax 10a7f9: 8b 75 e4 mov -0x1c(%ebp),%esi 10a7fc: 89 30 mov %esi,(%eax) _ISR_Flash( level ); 10a7fe: ff 75 d4 pushl -0x2c(%ebp) 10a801: 9d popf 10a802: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10a803: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10a807: 74 37 je 10a840 <_Event_Surrender+0xa8> _ISR_Enable( level ); 10a809: ff 75 d4 pushl -0x2c(%ebp) 10a80c: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10a80d: 83 ec 08 sub $0x8,%esp 10a810: 68 f8 ff 03 10 push $0x1003fff8 10a815: 53 push %ebx 10a816: e8 7d 21 00 00 call 10c998 <_Thread_Clear_state> 10a81b: 83 c4 10 add $0x10,%esp } return; } } _ISR_Enable( level ); } 10a81e: 8d 65 f4 lea -0xc(%ebp),%esp 10a821: 5b pop %ebx 10a822: 5e pop %esi 10a823: 5f pop %edi 10a824: c9 leave 10a825: c3 ret 10a826: 66 90 xchg %ax,%ax _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10a828: ff 75 d4 pushl -0x2c(%ebp) 10a82b: 9d popf } 10a82c: 8d 65 f4 lea -0xc(%ebp),%esp 10a82f: 5b pop %ebx 10a830: 5e pop %esi 10a831: 5f pop %edi 10a832: c9 leave 10a833: c3 ret /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 10a834: ff 75 d4 pushl -0x2c(%ebp) 10a837: 9d popf } return; } } _ISR_Enable( level ); } 10a838: 8d 65 f4 lea -0xc(%ebp),%esp 10a83b: 5b pop %ebx 10a83c: 5e pop %esi 10a83d: 5f pop %edi 10a83e: c9 leave 10a83f: c3 ret RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10a840: 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 ); 10a847: ff 75 d4 pushl -0x2c(%ebp) 10a84a: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10a84b: 83 ec 0c sub $0xc,%esp 10a84e: 8d 43 48 lea 0x48(%ebx),%eax 10a851: 50 push %eax 10a852: e8 f1 32 00 00 call 10db48 <_Watchdog_Remove> 10a857: 58 pop %eax 10a858: 5a pop %edx 10a859: 68 f8 ff 03 10 push $0x1003fff8 10a85e: 53 push %ebx 10a85f: e8 34 21 00 00 call 10c998 <_Thread_Clear_state> 10a864: 83 c4 10 add $0x10,%esp 10a867: eb c3 jmp 10a82c <_Event_Surrender+0x94> 10a869: 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) || 10a86c: 8b 35 e0 67 12 00 mov 0x1267e0,%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 ) && 10a872: 83 fe 02 cmp $0x2,%esi 10a875: 74 0d je 10a884 <_Event_Surrender+0xec> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 10a877: 8b 35 e0 67 12 00 mov 0x1267e0,%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) || 10a87d: 4e dec %esi 10a87e: 0f 85 52 ff ff ff jne 10a7d6 <_Event_Surrender+0x3e> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 10a884: 3b 45 e4 cmp -0x1c(%ebp),%eax 10a887: 74 05 je 10a88e <_Event_Surrender+0xf6> 10a889: 83 e7 02 and $0x2,%edi 10a88c: 74 22 je 10a8b0 <_Event_Surrender+0x118><== NEVER TAKEN 10a88e: 8b 45 e4 mov -0x1c(%ebp),%eax 10a891: f7 d0 not %eax 10a893: 21 d0 and %edx,%eax 10a895: 89 01 mov %eax,(%ecx) api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 10a897: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10a89e: 8b 43 28 mov 0x28(%ebx),%eax 10a8a1: 8b 55 e4 mov -0x1c(%ebp),%edx 10a8a4: 89 10 mov %edx,(%eax) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10a8a6: c7 05 e0 67 12 00 03 movl $0x3,0x1267e0 10a8ad: 00 00 00 } _ISR_Enable( level ); 10a8b0: ff 75 d4 pushl -0x2c(%ebp) 10a8b3: 9d popf return; 10a8b4: e9 73 ff ff ff jmp 10a82c <_Event_Surrender+0x94> =============================================================================== 0010a8bc <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10a8bc: 55 push %ebp 10a8bd: 89 e5 mov %esp,%ebp 10a8bf: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10a8c2: 8d 45 f4 lea -0xc(%ebp),%eax 10a8c5: 50 push %eax 10a8c6: ff 75 08 pushl 0x8(%ebp) 10a8c9: e8 52 24 00 00 call 10cd20 <_Thread_Get> switch ( location ) { 10a8ce: 83 c4 10 add $0x10,%esp 10a8d1: 8b 55 f4 mov -0xc(%ebp),%edx 10a8d4: 85 d2 test %edx,%edx 10a8d6: 75 37 jne 10a90f <_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 ); 10a8d8: 9c pushf 10a8d9: fa cli 10a8da: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10a8db: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10a8e2: 3b 05 78 67 12 00 cmp 0x126778,%eax 10a8e8: 74 2a je 10a914 <_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; 10a8ea: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10a8f1: 52 push %edx 10a8f2: 9d popf 10a8f3: 83 ec 08 sub $0x8,%esp 10a8f6: 68 f8 ff 03 10 push $0x1003fff8 10a8fb: 50 push %eax 10a8fc: e8 97 20 00 00 call 10c998 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10a901: a1 ec 64 12 00 mov 0x1264ec,%eax 10a906: 48 dec %eax 10a907: a3 ec 64 12 00 mov %eax,0x1264ec _Thread_Unblock( the_thread ); _Thread_Unnest_dispatch(); break; 10a90c: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10a90f: c9 leave 10a910: c3 ret 10a911: 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 ) 10a914: 8b 0d e0 67 12 00 mov 0x1267e0,%ecx 10a91a: 49 dec %ecx 10a91b: 75 cd jne 10a8ea <_Event_Timeout+0x2e> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10a91d: c7 05 e0 67 12 00 02 movl $0x2,0x1267e0 10a924: 00 00 00 10a927: eb c1 jmp 10a8ea <_Event_Timeout+0x2e> =============================================================================== 0011027c <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 11027c: 55 push %ebp 11027d: 89 e5 mov %esp,%ebp 11027f: 57 push %edi 110280: 56 push %esi 110281: 53 push %ebx 110282: 83 ec 2c sub $0x2c,%esp 110285: 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 110288: 8d 47 04 lea 0x4(%edi),%eax 11028b: 89 45 dc mov %eax,-0x24(%ebp) - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; 11028e: 8b 55 08 mov 0x8(%ebp),%edx 110291: 8b 52 10 mov 0x10(%edx),%edx 110294: 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 ) { 110297: 39 c7 cmp %eax,%edi 110299: 0f 87 69 01 00 00 ja 110408 <_Heap_Allocate_aligned_with_boundary+0x18c> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 11029f: 8b 5d 14 mov 0x14(%ebp),%ebx 1102a2: 85 db test %ebx,%ebx 1102a4: 0f 85 56 01 00 00 jne 110400 <_Heap_Allocate_aligned_with_boundary+0x184> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 1102aa: 8b 45 08 mov 0x8(%ebp),%eax 1102ad: 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 ) { 1102b0: 39 c8 cmp %ecx,%eax 1102b2: 0f 84 50 01 00 00 je 110408 <_Heap_Allocate_aligned_with_boundary+0x18c> 1102b8: 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 1102bf: 8b 55 cc mov -0x34(%ebp),%edx 1102c2: 83 c2 07 add $0x7,%edx 1102c5: 89 55 c8 mov %edx,-0x38(%ebp) + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 1102c8: c7 45 d0 04 00 00 00 movl $0x4,-0x30(%ebp) 1102cf: 29 7d d0 sub %edi,-0x30(%ebp) 1102d2: eb 1e jmp 1102f2 <_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; 1102d4: 8d 59 08 lea 0x8(%ecx),%ebx } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 1102d7: 85 db test %ebx,%ebx 1102d9: 0f 85 f1 00 00 00 jne 1103d0 <_Heap_Allocate_aligned_with_boundary+0x154><== ALWAYS TAKEN break; } block = block->next; 1102df: 8b 49 08 mov 0x8(%ecx),%ecx 1102e2: 8b 45 e4 mov -0x1c(%ebp),%eax 1102e5: 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 ) { 1102e6: 39 4d 08 cmp %ecx,0x8(%ebp) 1102e9: 0f 84 25 01 00 00 je 110414 <_Heap_Allocate_aligned_with_boundary+0x198> 1102ef: 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 ) { 1102f2: 8b 59 04 mov 0x4(%ecx),%ebx 1102f5: 39 5d dc cmp %ebx,-0x24(%ebp) 1102f8: 73 e5 jae 1102df <_Heap_Allocate_aligned_with_boundary+0x63> if ( alignment == 0 ) { 1102fa: 8b 55 10 mov 0x10(%ebp),%edx 1102fd: 85 d2 test %edx,%edx 1102ff: 74 d3 je 1102d4 <_Heap_Allocate_aligned_with_boundary+0x58> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 110301: 8b 45 08 mov 0x8(%ebp),%eax 110304: 8b 40 14 mov 0x14(%eax),%eax 110307: 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; 11030a: 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; 11030d: 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; 110310: 8d 51 08 lea 0x8(%ecx),%edx 110313: 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; 110316: 8b 75 c8 mov -0x38(%ebp),%esi 110319: 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 11031b: 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; 11031d: 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); 110320: 89 d8 mov %ebx,%eax 110322: 31 d2 xor %edx,%edx 110324: f7 75 10 divl 0x10(%ebp) 110327: 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 ) { 110329: 39 de cmp %ebx,%esi 11032b: 73 0b jae 110338 <_Heap_Allocate_aligned_with_boundary+0xbc> 11032d: 89 f0 mov %esi,%eax 11032f: 31 d2 xor %edx,%edx 110331: f7 75 10 divl 0x10(%ebp) 110334: 89 f3 mov %esi,%ebx 110336: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 110338: 8b 45 14 mov 0x14(%ebp),%eax 11033b: 85 c0 test %eax,%eax 11033d: 74 5b je 11039a <_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; 11033f: 8d 34 3b lea (%ebx,%edi,1),%esi 110342: 89 f0 mov %esi,%eax 110344: 31 d2 xor %edx,%edx 110346: f7 75 14 divl 0x14(%ebp) 110349: 89 f0 mov %esi,%eax 11034b: 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 ) { 11034d: 39 c3 cmp %eax,%ebx 11034f: 73 49 jae 11039a <_Heap_Allocate_aligned_with_boundary+0x11e> 110351: 39 c6 cmp %eax,%esi 110353: 76 45 jbe 11039a <_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; 110355: 8b 55 d4 mov -0x2c(%ebp),%edx 110358: 01 fa add %edi,%edx 11035a: 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 ) { 11035d: 39 c2 cmp %eax,%edx 11035f: 0f 87 7a ff ff ff ja 1102df <_Heap_Allocate_aligned_with_boundary+0x63> 110365: 89 ce mov %ecx,%esi 110367: eb 10 jmp 110379 <_Heap_Allocate_aligned_with_boundary+0xfd> 110369: 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 ) { 11036c: 39 c1 cmp %eax,%ecx 11036e: 76 28 jbe 110398 <_Heap_Allocate_aligned_with_boundary+0x11c> if ( boundary_line < boundary_floor ) { 110370: 39 45 e0 cmp %eax,-0x20(%ebp) 110373: 0f 87 9f 00 00 00 ja 110418 <_Heap_Allocate_aligned_with_boundary+0x19c><== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; 110379: 89 c3 mov %eax,%ebx 11037b: 29 fb sub %edi,%ebx 11037d: 89 d8 mov %ebx,%eax 11037f: 31 d2 xor %edx,%edx 110381: f7 75 10 divl 0x10(%ebp) 110384: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 110386: 8d 0c 3b lea (%ebx,%edi,1),%ecx 110389: 89 c8 mov %ecx,%eax 11038b: 31 d2 xor %edx,%edx 11038d: f7 75 14 divl 0x14(%ebp) 110390: 89 c8 mov %ecx,%eax 110392: 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 ) { 110394: 39 c3 cmp %eax,%ebx 110396: 72 d4 jb 11036c <_Heap_Allocate_aligned_with_boundary+0xf0> 110398: 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 ) { 11039a: 39 5d d4 cmp %ebx,-0x2c(%ebp) 11039d: 0f 87 3c ff ff ff ja 1102df <_Heap_Allocate_aligned_with_boundary+0x63> 1103a3: be f8 ff ff ff mov $0xfffffff8,%esi 1103a8: 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); 1103aa: 01 de add %ebx,%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 1103ac: 89 d8 mov %ebx,%eax 1103ae: 31 d2 xor %edx,%edx 1103b0: 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; 1103b3: 29 d6 sub %edx,%esi if ( free_size >= min_block_size || free_size == 0 ) { 1103b5: 39 75 d8 cmp %esi,-0x28(%ebp) 1103b8: 0f 86 19 ff ff ff jbe 1102d7 <_Heap_Allocate_aligned_with_boundary+0x5b> 1103be: 85 f6 test %esi,%esi 1103c0: 0f 85 19 ff ff ff jne 1102df <_Heap_Allocate_aligned_with_boundary+0x63> } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 1103c6: 85 db test %ebx,%ebx 1103c8: 0f 84 11 ff ff ff je 1102df <_Heap_Allocate_aligned_with_boundary+0x63><== NEVER TAKEN 1103ce: 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; 1103d0: 8b 45 08 mov 0x8(%ebp),%eax 1103d3: ff 40 48 incl 0x48(%eax) stats->searches += search_count; 1103d6: 8b 55 e4 mov -0x1c(%ebp),%edx 1103d9: 01 50 4c add %edx,0x4c(%eax) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 1103dc: 57 push %edi 1103dd: 53 push %ebx 1103de: 51 push %ecx 1103df: 50 push %eax 1103e0: e8 8f b7 ff ff call 10bb74 <_Heap_Block_allocate> 1103e5: 89 d8 mov %ebx,%eax 1103e7: 83 c4 10 add $0x10,%esp boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 1103ea: 8b 55 e4 mov -0x1c(%ebp),%edx 1103ed: 8b 4d 08 mov 0x8(%ebp),%ecx 1103f0: 39 51 44 cmp %edx,0x44(%ecx) 1103f3: 73 15 jae 11040a <_Heap_Allocate_aligned_with_boundary+0x18e> stats->max_search = search_count; 1103f5: 89 51 44 mov %edx,0x44(%ecx) } return (void *) alloc_begin; } 1103f8: 8d 65 f4 lea -0xc(%ebp),%esp 1103fb: 5b pop %ebx 1103fc: 5e pop %esi 1103fd: 5f pop %edi 1103fe: c9 leave 1103ff: c3 ret /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 110400: 3b 7d 14 cmp 0x14(%ebp),%edi 110403: 76 1a jbe 11041f <_Heap_Allocate_aligned_with_boundary+0x1a3> 110405: 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 ) { 110408: 31 c0 xor %eax,%eax if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 11040a: 8d 65 f4 lea -0xc(%ebp),%esp 11040d: 5b pop %ebx 11040e: 5e pop %esi 11040f: 5f pop %edi 110410: c9 leave 110411: c3 ret 110412: 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 ) { 110414: 31 c0 xor %eax,%eax 110416: eb d2 jmp 1103ea <_Heap_Allocate_aligned_with_boundary+0x16e> 110418: 89 f1 mov %esi,%ecx <== NOT EXECUTED 11041a: e9 c0 fe ff ff jmp 1102df <_Heap_Allocate_aligned_with_boundary+0x63><== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 11041f: 8b 4d 10 mov 0x10(%ebp),%ecx 110422: 85 c9 test %ecx,%ecx 110424: 0f 85 80 fe ff ff jne 1102aa <_Heap_Allocate_aligned_with_boundary+0x2e> alignment = page_size; 11042a: 89 55 10 mov %edx,0x10(%ebp) 11042d: e9 78 fe ff ff jmp 1102aa <_Heap_Allocate_aligned_with_boundary+0x2e> =============================================================================== 00110790 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 110790: 55 push %ebp 110791: 89 e5 mov %esp,%ebp 110793: 57 push %edi 110794: 56 push %esi 110795: 53 push %ebx 110796: 83 ec 4c sub $0x4c,%esp 110799: 8b 5d 08 mov 0x8(%ebp),%ebx 11079c: 8b 4d 10 mov 0x10(%ebp),%ecx Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; 11079f: 8b 43 20 mov 0x20(%ebx),%eax 1107a2: 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; 1107a5: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) Heap_Block *extend_last_block = NULL; 1107ac: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) uintptr_t const page_size = heap->page_size; 1107b3: 8b 53 10 mov 0x10(%ebx),%edx 1107b6: 89 55 d4 mov %edx,-0x2c(%ebp) uintptr_t const min_block_size = heap->min_block_size; 1107b9: 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; 1107bc: 8b 73 30 mov 0x30(%ebx),%esi 1107bf: 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 ) { 1107c2: 8b 55 0c mov 0xc(%ebp),%edx 1107c5: 01 ca add %ecx,%edx 1107c7: 89 55 cc mov %edx,-0x34(%ebp) 1107ca: 73 0c jae 1107d8 <_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; 1107cc: 31 c0 xor %eax,%eax if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 1107ce: 8d 65 f4 lea -0xc(%ebp),%esp 1107d1: 5b pop %ebx 1107d2: 5e pop %esi 1107d3: 5f pop %edi 1107d4: c9 leave 1107d5: c3 ret 1107d6: 66 90 xchg %ax,%ax if ( extend_area_end < extend_area_begin ) { return false; } extend_area_ok = _Heap_Get_first_and_last_block( 1107d8: 83 ec 08 sub $0x8,%esp 1107db: 8d 55 e0 lea -0x20(%ebp),%edx 1107de: 52 push %edx 1107df: 8d 55 e4 lea -0x1c(%ebp),%edx 1107e2: 52 push %edx 1107e3: 50 push %eax 1107e4: ff 75 d4 pushl -0x2c(%ebp) 1107e7: 51 push %ecx 1107e8: ff 75 0c pushl 0xc(%ebp) 1107eb: e8 90 b5 ff ff call 10bd80 <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 1107f0: 83 c4 20 add $0x20,%esp 1107f3: 84 c0 test %al,%al 1107f5: 74 d5 je 1107cc <_Heap_Extend+0x3c> 1107f7: 8b 7d d0 mov -0x30(%ebp),%edi 1107fa: c7 45 bc 00 00 00 00 movl $0x0,-0x44(%ebp) 110801: c7 45 b8 00 00 00 00 movl $0x0,-0x48(%ebp) 110808: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) 11080f: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 110816: 8b 75 cc mov -0x34(%ebp),%esi 110819: 89 5d b4 mov %ebx,-0x4c(%ebp) 11081c: eb 30 jmp 11084e <_Heap_Extend+0xbe> 11081e: 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 ) { 110820: 39 ce cmp %ecx,%esi 110822: 73 03 jae 110827 <_Heap_Extend+0x97> 110824: 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); 110827: 8d 59 f8 lea -0x8(%ecx),%ebx 11082a: 89 c8 mov %ecx,%eax 11082c: 31 d2 xor %edx,%edx 11082e: 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); 110831: 29 d3 sub %edx,%ebx link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 110833: 3b 4d 0c cmp 0xc(%ebp),%ecx 110836: 74 3c je 110874 <_Heap_Extend+0xe4> <== NEVER TAKEN start_block->prev_size = extend_area_end; merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 110838: 39 4d 0c cmp %ecx,0xc(%ebp) 11083b: 76 03 jbe 110840 <_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 ) 11083d: 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; 110840: 8b 7b 04 mov 0x4(%ebx),%edi 110843: 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); 110846: 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 ); 110849: 39 7d d0 cmp %edi,-0x30(%ebp) 11084c: 74 39 je 110887 <_Heap_Extend+0xf7> return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 11084e: 3b 7d d0 cmp -0x30(%ebp),%edi 110851: 0f 84 39 01 00 00 je 110990 <_Heap_Extend+0x200> 110857: 89 f8 mov %edi,%eax uintptr_t const sub_area_end = start_block->prev_size; 110859: 8b 0f mov (%edi),%ecx Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 11085b: 39 4d 0c cmp %ecx,0xc(%ebp) 11085e: 73 08 jae 110868 <_Heap_Extend+0xd8> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin 110860: 39 f0 cmp %esi,%eax 110862: 0f 82 64 ff ff ff jb 1107cc <_Heap_Extend+0x3c> ) { return false; } if ( extend_area_end == sub_area_begin ) { 110868: 39 f0 cmp %esi,%eax 11086a: 75 b4 jne 110820 <_Heap_Extend+0x90> 11086c: 89 7d c4 mov %edi,-0x3c(%ebp) 11086f: eb b6 jmp 110827 <_Heap_Extend+0x97> 110871: 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; 110874: 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 ) 110876: 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; 110879: 8b 7b 04 mov 0x4(%ebx),%edi 11087c: 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); 11087f: 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 ); 110882: 39 7d d0 cmp %edi,-0x30(%ebp) 110885: 75 c7 jne 11084e <_Heap_Extend+0xbe> <== NEVER TAKEN 110887: 8b 5d b4 mov -0x4c(%ebp),%ebx if ( extend_area_begin < heap->area_begin ) { 11088a: 8b 75 0c mov 0xc(%ebp),%esi 11088d: 3b 73 18 cmp 0x18(%ebx),%esi 110890: 0f 82 06 01 00 00 jb 11099c <_Heap_Extend+0x20c> heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { 110896: 8b 45 cc mov -0x34(%ebp),%eax 110899: 3b 43 1c cmp 0x1c(%ebx),%eax 11089c: 76 03 jbe 1108a1 <_Heap_Extend+0x111> heap->area_end = extend_area_end; 11089e: 89 43 1c mov %eax,0x1c(%ebx) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 1108a1: 8b 55 e0 mov -0x20(%ebp),%edx 1108a4: 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 = 1108a7: 89 d1 mov %edx,%ecx 1108a9: 29 c1 sub %eax,%ecx (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 1108ab: 8b 75 cc mov -0x34(%ebp),%esi 1108ae: 89 30 mov %esi,(%eax) extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 1108b0: 89 ce mov %ecx,%esi 1108b2: 83 ce 01 or $0x1,%esi 1108b5: 89 70 04 mov %esi,0x4(%eax) _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 1108b8: 89 0a mov %ecx,(%edx) extend_last_block->size_and_flag = 0; 1108ba: 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 ) { 1108c1: 39 43 20 cmp %eax,0x20(%ebx) 1108c4: 0f 86 da 00 00 00 jbe 1109a4 <_Heap_Extend+0x214> heap->first_block = extend_first_block; 1108ca: 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 ) { 1108cd: 8b 75 c4 mov -0x3c(%ebp),%esi 1108d0: 85 f6 test %esi,%esi 1108d2: 0f 84 10 01 00 00 je 1109e8 <_Heap_Extend+0x258> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 1108d8: 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 ); 1108db: 8b 4d 0c mov 0xc(%ebp),%ecx 1108de: 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; 1108e1: 89 c8 mov %ecx,%eax 1108e3: 31 d2 xor %edx,%edx 1108e5: f7 f6 div %esi if ( remainder != 0 ) { 1108e7: 85 d2 test %edx,%edx 1108e9: 0f 84 c9 00 00 00 je 1109b8 <_Heap_Extend+0x228> return value - remainder + alignment; 1108ef: 8d 04 31 lea (%ecx,%esi,1),%eax 1108f2: 29 d0 sub %edx,%eax uintptr_t const new_first_block_begin = 1108f4: 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; 1108f7: 8b 75 c4 mov -0x3c(%ebp),%esi 1108fa: 8b 0e mov (%esi),%ecx 1108fc: 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 = 1108ff: 89 f0 mov %esi,%eax 110901: 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; 110903: 83 c8 01 or $0x1,%eax 110906: 89 42 04 mov %eax,0x4(%edx) _Heap_Free_block( heap, new_first_block ); 110909: 89 d8 mov %ebx,%eax 11090b: e8 64 fe ff ff call 110774 <_Heap_Free_block> link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 110910: 8b 45 c8 mov -0x38(%ebp),%eax 110913: 85 c0 test %eax,%eax 110915: 0f 84 a5 00 00 00 je 1109c0 <_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, 11091b: 8b 4d cc mov -0x34(%ebp),%ecx 11091e: 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( 110921: 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); 110924: 89 c8 mov %ecx,%eax 110926: 31 d2 xor %edx,%edx 110928: f7 73 10 divl 0x10(%ebx) 11092b: 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) 11092d: 8b 55 c8 mov -0x38(%ebp),%edx 110930: 8b 42 04 mov 0x4(%edx),%eax 110933: 29 c8 sub %ecx,%eax | HEAP_PREV_BLOCK_USED; 110935: 83 c8 01 or $0x1,%eax 110938: 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; 11093c: 8b 42 04 mov 0x4(%edx),%eax 11093f: 83 e0 01 and $0x1,%eax block->size_and_flag = size | flag; 110942: 09 c8 or %ecx,%eax 110944: 89 42 04 mov %eax,0x4(%edx) _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 110947: 89 d8 mov %ebx,%eax 110949: e8 26 fe ff ff call 110774 <_Heap_Free_block> extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 11094e: 8b 75 c4 mov -0x3c(%ebp),%esi 110951: 85 f6 test %esi,%esi 110953: 0f 84 ab 00 00 00 je 110a04 <_Heap_Extend+0x274> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 110959: 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( 11095c: 8b 43 20 mov 0x20(%ebx),%eax 11095f: 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; 110961: 8b 4a 04 mov 0x4(%edx),%ecx 110964: 83 e1 01 and $0x1,%ecx block->size_and_flag = size | flag; 110967: 09 c8 or %ecx,%eax 110969: 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; 11096c: 8b 43 30 mov 0x30(%ebx),%eax 11096f: 2b 45 c0 sub -0x40(%ebp),%eax /* Statistics */ stats->size += extended_size; 110972: 01 43 2c add %eax,0x2c(%ebx) if ( extended_size_ptr != NULL ) 110975: 8b 55 14 mov 0x14(%ebp),%edx 110978: 85 d2 test %edx,%edx 11097a: 0f 84 a0 00 00 00 je 110a20 <_Heap_Extend+0x290> <== NEVER TAKEN *extended_size_ptr = extended_size; 110980: 8b 55 14 mov 0x14(%ebp),%edx 110983: 89 02 mov %eax,(%edx) return true; 110985: b0 01 mov $0x1,%al } 110987: 8d 65 f4 lea -0xc(%ebp),%esp 11098a: 5b pop %ebx 11098b: 5e pop %esi 11098c: 5f pop %edi 11098d: c9 leave 11098e: c3 ret 11098f: 90 nop return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 110990: 8b 55 b4 mov -0x4c(%ebp),%edx 110993: 8b 42 18 mov 0x18(%edx),%eax 110996: e9 be fe ff ff jmp 110859 <_Heap_Extend+0xc9> 11099b: 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; 11099c: 89 73 18 mov %esi,0x18(%ebx) 11099f: e9 fd fe ff ff jmp 1108a1 <_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 ) { 1109a4: 39 53 24 cmp %edx,0x24(%ebx) 1109a7: 0f 83 20 ff ff ff jae 1108cd <_Heap_Extend+0x13d> heap->last_block = extend_last_block; 1109ad: 89 53 24 mov %edx,0x24(%ebx) 1109b0: e9 18 ff ff ff jmp 1108cd <_Heap_Extend+0x13d> 1109b5: 8d 76 00 lea 0x0(%esi),%esi uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; } else { return value; 1109b8: 89 c8 mov %ecx,%eax 1109ba: e9 35 ff ff ff jmp 1108f4 <_Heap_Extend+0x164> 1109bf: 90 nop ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 1109c0: 8b 7d bc mov -0x44(%ebp),%edi 1109c3: 85 ff test %edi,%edi 1109c5: 74 87 je 11094e <_Heap_Extend+0x1be> _Heap_Link_above( 1109c7: 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 ); 1109ca: 8b 45 e4 mov -0x1c(%ebp),%eax 1109cd: 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; 1109d0: 8b 75 bc mov -0x44(%ebp),%esi 1109d3: 8b 56 04 mov 0x4(%esi),%edx 1109d6: 83 e2 01 and $0x1,%edx block->size_and_flag = size | flag; 1109d9: 09 d0 or %edx,%eax 1109db: 89 46 04 mov %eax,0x4(%esi) last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 1109de: 83 49 04 01 orl $0x1,0x4(%ecx) 1109e2: e9 67 ff ff ff jmp 11094e <_Heap_Extend+0x1be> 1109e7: 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 ) { 1109e8: 8b 4d b8 mov -0x48(%ebp),%ecx 1109eb: 85 c9 test %ecx,%ecx 1109ed: 0f 84 1d ff ff ff je 110910 <_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; 1109f3: 8b 45 b8 mov -0x48(%ebp),%eax 1109f6: 29 d0 sub %edx,%eax 1109f8: 83 c8 01 or $0x1,%eax 1109fb: 89 42 04 mov %eax,0x4(%edx) 1109fe: e9 0d ff ff ff jmp 110910 <_Heap_Extend+0x180> 110a03: 90 nop extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 110a04: 8b 4d c8 mov -0x38(%ebp),%ecx 110a07: 85 c9 test %ecx,%ecx 110a09: 0f 85 4a ff ff ff jne 110959 <_Heap_Extend+0x1c9> _Heap_Free_block( heap, extend_first_block ); 110a0f: 8b 55 e4 mov -0x1c(%ebp),%edx 110a12: 89 d8 mov %ebx,%eax 110a14: e8 5b fd ff ff call 110774 <_Heap_Free_block> 110a19: e9 3b ff ff ff jmp 110959 <_Heap_Extend+0x1c9> 110a1e: 66 90 xchg %ax,%ax stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 110a20: b0 01 mov $0x1,%al <== NOT EXECUTED 110a22: e9 a7 fd ff ff jmp 1107ce <_Heap_Extend+0x3e> <== NOT EXECUTED =============================================================================== 00110434 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 110434: 55 push %ebp 110435: 89 e5 mov %esp,%ebp 110437: 57 push %edi 110438: 56 push %esi 110439: 53 push %ebx 11043a: 83 ec 10 sub $0x10,%esp 11043d: 8b 4d 08 mov 0x8(%ebp),%ecx 110440: 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 ) { 110443: 85 c0 test %eax,%eax 110445: 0f 84 e9 00 00 00 je 110534 <_Heap_Free+0x100> 11044b: 8d 58 f8 lea -0x8(%eax),%ebx 11044e: 31 d2 xor %edx,%edx 110450: 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); 110453: 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 110455: 8b 41 20 mov 0x20(%ecx),%eax && (uintptr_t) block <= (uintptr_t) heap->last_block; 110458: 39 c3 cmp %eax,%ebx 11045a: 72 1c jb 110478 <_Heap_Free+0x44> 11045c: 8b 71 24 mov 0x24(%ecx),%esi 11045f: 39 f3 cmp %esi,%ebx 110461: 77 15 ja 110478 <_Heap_Free+0x44> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 110463: 8b 53 04 mov 0x4(%ebx),%edx 110466: 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; 110469: 83 e2 fe and $0xfffffffe,%edx 11046c: 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); 11046f: 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; 110472: 39 d0 cmp %edx,%eax 110474: 76 0e jbe 110484 <_Heap_Free+0x50> <== ALWAYS TAKEN 110476: 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 ); 110478: 31 c0 xor %eax,%eax --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 11047a: 83 c4 10 add $0x10,%esp 11047d: 5b pop %ebx 11047e: 5e pop %esi 11047f: 5f pop %edi 110480: c9 leave 110481: c3 ret 110482: 66 90 xchg %ax,%ax 110484: 39 d6 cmp %edx,%esi 110486: 72 f0 jb 110478 <_Heap_Free+0x44> <== NEVER TAKEN 110488: 8b 7a 04 mov 0x4(%edx),%edi return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 11048b: f7 c7 01 00 00 00 test $0x1,%edi 110491: 74 e5 je 110478 <_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; 110493: 83 e7 fe and $0xfffffffe,%edi 110496: 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 )); 110499: 39 d6 cmp %edx,%esi 11049b: 0f 84 d3 00 00 00 je 110574 <_Heap_Free+0x140> return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 1104a1: f6 44 3a 04 01 testb $0x1,0x4(%edx,%edi,1) 1104a6: 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 ) ) { 1104aa: f6 45 f0 01 testb $0x1,-0x10(%ebp) 1104ae: 75 44 jne 1104f4 <_Heap_Free+0xc0> uintptr_t const prev_size = block->prev_size; 1104b0: 8b 3b mov (%ebx),%edi 1104b2: 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); 1104b5: 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; 1104b7: 39 d8 cmp %ebx,%eax 1104b9: 77 bd ja 110478 <_Heap_Free+0x44> <== NEVER TAKEN 1104bb: 39 de cmp %ebx,%esi 1104bd: 72 b9 jb 110478 <_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) ) { 1104bf: f6 43 04 01 testb $0x1,0x4(%ebx) 1104c3: 74 b3 je 110478 <_Heap_Free+0x44> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 1104c5: 80 7d eb 00 cmpb $0x0,-0x15(%ebp) 1104c9: 0f 84 b1 00 00 00 je 110580 <_Heap_Free+0x14c> uintptr_t const size = block_size + prev_size + next_block_size; 1104cf: 8b 7d e4 mov -0x1c(%ebp),%edi 1104d2: 03 7d ec add -0x14(%ebp),%edi 1104d5: 03 7d f0 add -0x10(%ebp),%edi --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 1104d8: 8b 42 08 mov 0x8(%edx),%eax 1104db: 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; 1104de: 89 42 08 mov %eax,0x8(%edx) next->prev = prev; 1104e1: 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; 1104e4: ff 49 38 decl 0x38(%ecx) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 1104e7: 89 f8 mov %edi,%eax 1104e9: 83 c8 01 or $0x1,%eax 1104ec: 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; 1104ef: 89 3c 3b mov %edi,(%ebx,%edi,1) 1104f2: eb 29 jmp 11051d <_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 */ 1104f4: 80 7d eb 00 cmpb $0x0,-0x15(%ebp) 1104f8: 74 46 je 110540 <_Heap_Free+0x10c> uintptr_t const size = block_size + next_block_size; 1104fa: 8b 7d e4 mov -0x1c(%ebp),%edi 1104fd: 03 7d ec add -0x14(%ebp),%edi --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 110500: 8b 42 08 mov 0x8(%edx),%eax 110503: 8b 52 0c mov 0xc(%edx),%edx ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 110506: 89 43 08 mov %eax,0x8(%ebx) new_block->prev = prev; 110509: 89 53 0c mov %edx,0xc(%ebx) next->prev = new_block; 11050c: 89 58 0c mov %ebx,0xc(%eax) prev->next = new_block; 11050f: 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; 110512: 89 f8 mov %edi,%eax 110514: 83 c8 01 or $0x1,%eax 110517: 89 43 04 mov %eax,0x4(%ebx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 11051a: 89 3c 3b mov %edi,(%ebx,%edi,1) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 11051d: ff 49 40 decl 0x40(%ecx) ++stats->frees; 110520: ff 41 50 incl 0x50(%ecx) stats->free_size += block_size; 110523: 8b 55 ec mov -0x14(%ebp),%edx 110526: 01 51 30 add %edx,0x30(%ecx) return( true ); 110529: b0 01 mov $0x1,%al } 11052b: 83 c4 10 add $0x10,%esp 11052e: 5b pop %ebx 11052f: 5e pop %esi 110530: 5f pop %edi 110531: c9 leave 110532: c3 ret 110533: 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; 110534: b0 01 mov $0x1,%al --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 110536: 83 c4 10 add $0x10,%esp 110539: 5b pop %ebx 11053a: 5e pop %esi 11053b: 5f pop %edi 11053c: c9 leave 11053d: c3 ret 11053e: 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; 110540: 8b 41 08 mov 0x8(%ecx),%eax new_block->next = next; 110543: 89 43 08 mov %eax,0x8(%ebx) new_block->prev = block_before; 110546: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 110549: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 11054c: 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; 11054f: 8b 45 ec mov -0x14(%ebp),%eax 110552: 83 c8 01 or $0x1,%eax 110555: 89 43 04 mov %eax,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 110558: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = block_size; 11055c: 8b 45 ec mov -0x14(%ebp),%eax 11055f: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->free_blocks; 110561: 8b 41 38 mov 0x38(%ecx),%eax 110564: 40 inc %eax 110565: 89 41 38 mov %eax,0x38(%ecx) if ( stats->max_free_blocks < stats->free_blocks ) { 110568: 3b 41 3c cmp 0x3c(%ecx),%eax 11056b: 76 b0 jbe 11051d <_Heap_Free+0xe9> stats->max_free_blocks = stats->free_blocks; 11056d: 89 41 3c mov %eax,0x3c(%ecx) 110570: eb ab jmp 11051d <_Heap_Free+0xe9> 110572: 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 )); 110574: c6 45 eb 00 movb $0x0,-0x15(%ebp) 110578: e9 2d ff ff ff jmp 1104aa <_Heap_Free+0x76> 11057d: 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; 110580: 8b 45 ec mov -0x14(%ebp),%eax 110583: 03 45 f0 add -0x10(%ebp),%eax prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 110586: 89 c6 mov %eax,%esi 110588: 83 ce 01 or $0x1,%esi 11058b: 89 73 04 mov %esi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 11058e: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 110592: 89 02 mov %eax,(%edx) 110594: eb 87 jmp 11051d <_Heap_Free+0xe9> =============================================================================== 0010ba04 <_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 ) { 10ba04: 55 push %ebp 10ba05: 89 e5 mov %esp,%ebp 10ba07: 57 push %edi 10ba08: 56 push %esi 10ba09: 53 push %ebx 10ba0a: 8b 4d 08 mov 0x8(%ebp),%ecx 10ba0d: 8b 7d 0c mov 0xc(%ebp),%edi uintptr_t const heap_area_end = heap_area_begin + heap_area_size; 10ba10: 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 ); 10ba13: 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; 10ba16: 89 d8 mov %ebx,%eax 10ba18: 31 d2 xor %edx,%edx 10ba1a: f7 75 10 divl 0x10(%ebp) if ( remainder != 0 ) { 10ba1d: 85 d2 test %edx,%edx 10ba1f: 74 05 je 10ba26 <_Heap_Get_first_and_last_block+0x22> return value - remainder + alignment; 10ba21: 03 5d 10 add 0x10(%ebp),%ebx 10ba24: 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 ( 10ba26: 39 f1 cmp %esi,%ecx 10ba28: 77 2e ja 10ba58 <_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); 10ba2a: 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 = 10ba2d: 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 10ba2f: 39 df cmp %ebx,%edi 10ba31: 76 25 jbe 10ba58 <_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 ); 10ba33: 29 df sub %ebx,%edi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10ba35: 89 f8 mov %edi,%eax 10ba37: 31 d2 xor %edx,%edx 10ba39: f7 75 10 divl 0x10(%ebp) 10ba3c: 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 10ba3e: 39 7d 14 cmp %edi,0x14(%ebp) 10ba41: 77 15 ja 10ba58 <_Heap_Get_first_and_last_block+0x54> ) { /* Invalid area or area too small */ return false; } *first_block_ptr = first_block; 10ba43: 8b 45 18 mov 0x18(%ebp),%eax 10ba46: 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); 10ba48: 01 f7 add %esi,%edi 10ba4a: 8b 45 1c mov 0x1c(%ebp),%eax 10ba4d: 89 38 mov %edi,(%eax) *last_block_ptr = last_block; return true; 10ba4f: b0 01 mov $0x1,%al } 10ba51: 5b pop %ebx 10ba52: 5e pop %esi 10ba53: 5f pop %edi 10ba54: c9 leave 10ba55: c3 ret 10ba56: 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; 10ba58: 31 c0 xor %eax,%eax *first_block_ptr = first_block; *last_block_ptr = last_block; return true; } 10ba5a: 5b pop %ebx 10ba5b: 5e pop %esi 10ba5c: 5f pop %edi 10ba5d: c9 leave 10ba5e: c3 ret =============================================================================== 001141b8 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 1141b8: 55 push %ebp 1141b9: 89 e5 mov %esp,%ebp 1141bb: 57 push %edi 1141bc: 56 push %esi 1141bd: 53 push %ebx 1141be: 8b 7d 0c mov 0xc(%ebp),%edi Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 1141c1: c7 07 00 00 00 00 movl $0x0,(%edi) info->largest = 0; 1141c7: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) info->total = 0; 1141ce: 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; } } 1141d5: 8b 45 08 mov 0x8(%ebp),%eax 1141d8: 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); 1141db: 39 d0 cmp %edx,%eax 1141dd: 74 31 je 114210 <_Heap_Get_free_information+0x58> 1141df: b9 01 00 00 00 mov $0x1,%ecx 1141e4: 31 f6 xor %esi,%esi 1141e6: 31 db xor %ebx,%ebx 1141e8: eb 07 jmp 1141f1 <_Heap_Get_free_information+0x39> 1141ea: 66 90 xchg %ax,%ax 1141ec: 8b 77 04 mov 0x4(%edi),%esi 1141ef: 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; 1141f1: 8b 42 04 mov 0x4(%edx),%eax 1141f4: 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; 1141f7: 01 c3 add %eax,%ebx if ( info->largest < the_size ) 1141f9: 39 f0 cmp %esi,%eax 1141fb: 76 03 jbe 114200 <_Heap_Get_free_information+0x48> info->largest = the_size; 1141fd: 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) 114200: 8b 52 08 mov 0x8(%edx),%edx 114203: 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); 114206: 39 55 08 cmp %edx,0x8(%ebp) 114209: 75 e1 jne 1141ec <_Heap_Get_free_information+0x34> 11420b: 89 0f mov %ecx,(%edi) 11420d: 89 5f 08 mov %ebx,0x8(%edi) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 114210: 5b pop %ebx 114211: 5e pop %esi 114212: 5f pop %edi 114213: c9 leave 114214: c3 ret =============================================================================== 00110f50 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 110f50: 55 push %ebp 110f51: 89 e5 mov %esp,%ebp 110f53: 57 push %edi 110f54: 56 push %esi 110f55: 53 push %ebx 110f56: 83 ec 04 sub $0x4,%esp 110f59: 8b 45 08 mov 0x8(%ebp),%eax 110f5c: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Block *the_block = the_heap->first_block; 110f5f: 8b 50 20 mov 0x20(%eax),%edx Heap_Block *const end = the_heap->last_block; 110f62: 8b 40 24 mov 0x24(%eax),%eax 110f65: 89 45 f0 mov %eax,-0x10(%ebp) memset(the_info, 0, sizeof(*the_info)); 110f68: b9 18 00 00 00 mov $0x18,%ecx 110f6d: 31 c0 xor %eax,%eax 110f6f: 89 df mov %ebx,%edi 110f71: f3 aa rep stos %al,%es:(%edi) while ( the_block != end ) { 110f73: 3b 55 f0 cmp -0x10(%ebp),%edx 110f76: 74 38 je 110fb0 <_Heap_Get_information+0x60><== NEVER TAKEN 110f78: 8b 7a 04 mov 0x4(%edx),%edi 110f7b: eb 18 jmp 110f95 <_Heap_Get_information+0x45> 110f7d: 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; 110f80: 8d 43 0c lea 0xc(%ebx),%eax else info = &the_info->Free; info->number++; 110f83: ff 00 incl (%eax) info->total += the_size; 110f85: 01 48 08 add %ecx,0x8(%eax) if ( info->largest < the_size ) 110f88: 39 48 04 cmp %ecx,0x4(%eax) 110f8b: 73 03 jae 110f90 <_Heap_Get_information+0x40> info->largest = the_size; 110f8d: 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 ) { 110f90: 39 75 f0 cmp %esi,-0x10(%ebp) 110f93: 74 1b je 110fb0 <_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; 110f95: 89 f9 mov %edi,%ecx 110f97: 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); 110f9a: 8d 34 0a lea (%edx,%ecx,1),%esi 110f9d: 89 f2 mov %esi,%edx if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 110f9f: 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) ) 110fa2: f7 c7 01 00 00 00 test $0x1,%edi 110fa8: 75 d6 jne 110f80 <_Heap_Get_information+0x30> info = &the_info->Used; else info = &the_info->Free; 110faa: 89 d8 mov %ebx,%eax 110fac: eb d5 jmp 110f83 <_Heap_Get_information+0x33> 110fae: 66 90 xchg %ax,%ax if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 110fb0: 58 pop %eax 110fb1: 5b pop %ebx 110fb2: 5e pop %esi 110fb3: 5f pop %edi 110fb4: c9 leave 110fb5: c3 ret =============================================================================== 0011e098 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 11e098: 55 push %ebp 11e099: 89 e5 mov %esp,%ebp 11e09b: 57 push %edi 11e09c: 56 push %esi 11e09d: 53 push %ebx 11e09e: 83 ec 2c sub $0x2c,%esp 11e0a1: 8b 5d 08 mov 0x8(%ebp),%ebx 11e0a4: 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); 11e0a7: 8d 4e f8 lea -0x8(%esi),%ecx 11e0aa: 89 f0 mov %esi,%eax 11e0ac: 31 d2 xor %edx,%edx 11e0ae: 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); 11e0b1: 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; 11e0b3: 8b 45 14 mov 0x14(%ebp),%eax 11e0b6: c7 00 00 00 00 00 movl $0x0,(%eax) *new_size = 0; 11e0bc: 8b 55 18 mov 0x18(%ebp),%edx 11e0bf: 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; 11e0c5: 39 4b 20 cmp %ecx,0x20(%ebx) 11e0c8: 77 05 ja 11e0cf <_Heap_Resize_block+0x37> 11e0ca: 39 4b 24 cmp %ecx,0x24(%ebx) 11e0cd: 73 0d jae 11e0dc <_Heap_Resize_block+0x44> new_alloc_size, old_size, new_size ); } return HEAP_RESIZE_FATAL_ERROR; 11e0cf: b8 02 00 00 00 mov $0x2,%eax } 11e0d4: 8d 65 f4 lea -0xc(%ebp),%esp 11e0d7: 5b pop %ebx 11e0d8: 5e pop %esi 11e0d9: 5f pop %edi 11e0da: c9 leave 11e0db: 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; 11e0dc: 8b 41 04 mov 0x4(%ecx),%eax 11e0df: 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; 11e0e2: 8d 3c 01 lea (%ecx,%eax,1),%edi 11e0e5: 89 7d d4 mov %edi,-0x2c(%ebp) uintptr_t alloc_size = block_end - alloc_begin + HEAP_ALLOC_BONUS; 11e0e8: 89 fa mov %edi,%edx 11e0ea: 29 f2 sub %esi,%edx 11e0ec: 83 c2 04 add $0x4,%edx 11e0ef: 89 55 e0 mov %edx,-0x20(%ebp) 11e0f2: 8b 57 04 mov 0x4(%edi),%edx 11e0f5: 83 e2 fe and $0xfffffffe,%edx 11e0f8: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 11e0fb: f6 44 17 04 01 testb $0x1,0x4(%edi,%edx,1) 11e100: 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; 11e104: 8b 55 e0 mov -0x20(%ebp),%edx 11e107: 8b 7d 14 mov 0x14(%ebp),%edi 11e10a: 89 17 mov %edx,(%edi) if ( next_block_is_free ) { 11e10c: 80 7d df 00 cmpb $0x0,-0x21(%ebp) 11e110: 75 6e jne 11e180 <_Heap_Resize_block+0xe8> block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { 11e112: 8b 55 e0 mov -0x20(%ebp),%edx 11e115: 39 55 10 cmp %edx,0x10(%ebp) 11e118: 77 79 ja 11e193 <_Heap_Resize_block+0xfb> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 11e11a: 80 7d df 00 cmpb $0x0,-0x21(%ebp) 11e11e: 74 31 je 11e151 <_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; 11e120: 8b 79 04 mov 0x4(%ecx),%edi 11e123: 83 e7 01 and $0x1,%edi block->size_and_flag = size | flag; 11e126: 09 c7 or %eax,%edi 11e128: 89 79 04 mov %edi,0x4(%ecx) old_size, new_size ); } return HEAP_RESIZE_FATAL_ERROR; } 11e12b: 8b 7d d4 mov -0x2c(%ebp),%edi 11e12e: 8b 7f 08 mov 0x8(%edi),%edi 11e131: 89 7d e4 mov %edi,-0x1c(%ebp) 11e134: 8b 55 d4 mov -0x2c(%ebp),%edx 11e137: 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; 11e13a: 8b 55 e4 mov -0x1c(%ebp),%edx 11e13d: 89 57 08 mov %edx,0x8(%edi) next->prev = prev; 11e140: 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; 11e143: 83 4c 01 04 01 orl $0x1,0x4(%ecx,%eax,1) /* Statistics */ --stats->free_blocks; 11e148: ff 4b 38 decl 0x38(%ebx) stats->free_size -= next_block_size; 11e14b: 8b 7d d0 mov -0x30(%ebp),%edi 11e14e: 29 7b 30 sub %edi,0x30(%ebx) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 11e151: ff 75 10 pushl 0x10(%ebp) 11e154: 56 push %esi 11e155: 51 push %ecx 11e156: 53 push %ebx 11e157: e8 18 da fe ff call 10bb74 <_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; 11e15c: 8b 50 04 mov 0x4(%eax),%edx 11e15f: 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; 11e162: 29 f0 sub %esi,%eax 11e164: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 11e168: 8b 55 18 mov 0x18(%ebp),%edx 11e16b: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->resizes; 11e16d: ff 43 54 incl 0x54(%ebx) 11e170: 83 c4 10 add $0x10,%esp return HEAP_RESIZE_SUCCESSFUL; 11e173: 31 c0 xor %eax,%eax old_size, new_size ); } return HEAP_RESIZE_FATAL_ERROR; } 11e175: 8d 65 f4 lea -0xc(%ebp),%esp 11e178: 5b pop %ebx 11e179: 5e pop %esi 11e17a: 5f pop %edi 11e17b: c9 leave 11e17c: c3 ret 11e17d: 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; 11e180: 03 45 d0 add -0x30(%ebp),%eax alloc_size += next_block_size; 11e183: 8b 7d d0 mov -0x30(%ebp),%edi 11e186: 01 fa add %edi,%edx 11e188: 89 55 e0 mov %edx,-0x20(%ebp) } if ( new_alloc_size > alloc_size ) { 11e18b: 8b 55 e0 mov -0x20(%ebp),%edx 11e18e: 39 55 10 cmp %edx,0x10(%ebp) 11e191: 76 87 jbe 11e11a <_Heap_Resize_block+0x82> return HEAP_RESIZE_UNSATISFIED; 11e193: b8 01 00 00 00 mov $0x1,%eax old_size, new_size ); } return HEAP_RESIZE_FATAL_ERROR; } 11e198: 8d 65 f4 lea -0xc(%ebp),%esp 11e19b: 5b pop %ebx 11e19c: 5e pop %esi 11e19d: 5f pop %edi 11e19e: c9 leave 11e19f: c3 ret =============================================================================== 0011e1a0 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11e1a0: 55 push %ebp 11e1a1: 89 e5 mov %esp,%ebp 11e1a3: 56 push %esi 11e1a4: 53 push %ebx 11e1a5: 8b 5d 08 mov 0x8(%ebp),%ebx 11e1a8: 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); 11e1ab: 8d 4e f8 lea -0x8(%esi),%ecx 11e1ae: 89 f0 mov %esi,%eax 11e1b0: 31 d2 xor %edx,%edx 11e1b2: 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); 11e1b5: 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 11e1b7: 8b 43 20 mov 0x20(%ebx),%eax && (uintptr_t) block <= (uintptr_t) heap->last_block; 11e1ba: 39 c1 cmp %eax,%ecx 11e1bc: 72 07 jb 11e1c5 <_Heap_Size_of_alloc_area+0x25> 11e1be: 8b 53 24 mov 0x24(%ebx),%edx 11e1c1: 39 d1 cmp %edx,%ecx 11e1c3: 76 07 jbe 11e1cc <_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; 11e1c5: 31 c0 xor %eax,%eax } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; } 11e1c7: 5b pop %ebx 11e1c8: 5e pop %esi 11e1c9: c9 leave 11e1ca: c3 ret 11e1cb: 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; 11e1cc: 8b 59 04 mov 0x4(%ecx),%ebx 11e1cf: 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); 11e1d2: 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; 11e1d4: 39 c8 cmp %ecx,%eax 11e1d6: 77 ed ja 11e1c5 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN 11e1d8: 39 ca cmp %ecx,%edx 11e1da: 72 e9 jb 11e1c5 <_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 ) 11e1dc: f6 41 04 01 testb $0x1,0x4(%ecx) 11e1e0: 74 e3 je 11e1c5 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 11e1e2: 29 f1 sub %esi,%ecx 11e1e4: 8d 51 04 lea 0x4(%ecx),%edx 11e1e7: 8b 45 10 mov 0x10(%ebp),%eax 11e1ea: 89 10 mov %edx,(%eax) return true; 11e1ec: b0 01 mov $0x1,%al } 11e1ee: 5b pop %ebx 11e1ef: 5e pop %esi 11e1f0: c9 leave 11e1f1: c3 ret =============================================================================== 0010c6dc <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10c6dc: 55 push %ebp 10c6dd: 89 e5 mov %esp,%ebp 10c6df: 57 push %edi 10c6e0: 56 push %esi 10c6e1: 53 push %ebx 10c6e2: 83 ec 4c sub $0x4c,%esp 10c6e5: 8b 5d 08 mov 0x8(%ebp),%ebx uintptr_t const page_size = heap->page_size; 10c6e8: 8b 43 10 mov 0x10(%ebx),%eax 10c6eb: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10c6ee: 8b 53 14 mov 0x14(%ebx),%edx 10c6f1: 89 55 d0 mov %edx,-0x30(%ebp) Heap_Block *const first_block = heap->first_block; 10c6f4: 8b 43 20 mov 0x20(%ebx),%eax 10c6f7: 89 45 dc mov %eax,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10c6fa: 8b 53 24 mov 0x24(%ebx),%edx 10c6fd: 89 55 cc mov %edx,-0x34(%ebp) Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10c700: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10c704: 74 1a je 10c720 <_Heap_Walk+0x44> 10c706: c7 45 d8 94 c6 10 00 movl $0x10c694,-0x28(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10c70d: 83 3d 40 8b 12 00 03 cmpl $0x3,0x128b40 10c714: 74 1a je 10c730 <_Heap_Walk+0x54> <== ALWAYS TAKEN } block = next_block; } while ( block != first_block ); return true; 10c716: b0 01 mov $0x1,%al } 10c718: 8d 65 f4 lea -0xc(%ebp),%esp 10c71b: 5b pop %ebx 10c71c: 5e pop %esi 10c71d: 5f pop %edi 10c71e: c9 leave 10c71f: 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; 10c720: c7 45 d8 8c c6 10 00 movl $0x10c68c,-0x28(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10c727: 83 3d 40 8b 12 00 03 cmpl $0x3,0x128b40 10c72e: 75 e6 jne 10c716 <_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)( 10c730: 52 push %edx 10c731: ff 73 0c pushl 0xc(%ebx) 10c734: ff 73 08 pushl 0x8(%ebx) 10c737: ff 75 cc pushl -0x34(%ebp) 10c73a: ff 75 dc pushl -0x24(%ebp) 10c73d: ff 73 1c pushl 0x1c(%ebx) 10c740: ff 73 18 pushl 0x18(%ebx) 10c743: ff 75 d0 pushl -0x30(%ebp) 10c746: ff 75 e0 pushl -0x20(%ebp) 10c749: 68 c4 0f 12 00 push $0x120fc4 10c74e: 6a 00 push $0x0 10c750: ff 75 0c pushl 0xc(%ebp) 10c753: 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 ) { 10c756: 83 c4 30 add $0x30,%esp 10c759: 8b 45 e0 mov -0x20(%ebp),%eax 10c75c: 85 c0 test %eax,%eax 10c75e: 74 70 je 10c7d0 <_Heap_Walk+0xf4> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10c760: f6 45 e0 03 testb $0x3,-0x20(%ebp) 10c764: 75 72 jne 10c7d8 <_Heap_Walk+0xfc> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10c766: 8b 45 d0 mov -0x30(%ebp),%eax 10c769: 31 d2 xor %edx,%edx 10c76b: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10c76e: 85 d2 test %edx,%edx 10c770: 75 72 jne 10c7e4 <_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; 10c772: 8b 45 dc mov -0x24(%ebp),%eax 10c775: 83 c0 08 add $0x8,%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10c778: 31 d2 xor %edx,%edx 10c77a: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( 10c77d: 85 d2 test %edx,%edx 10c77f: 75 6f jne 10c7f0 <_Heap_Walk+0x114> block = next_block; } while ( block != first_block ); return true; } 10c781: 8b 45 dc mov -0x24(%ebp),%eax 10c784: 8b 40 04 mov 0x4(%eax),%eax 10c787: 89 45 e4 mov %eax,-0x1c(%ebp) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10c78a: a8 01 test $0x1,%al 10c78c: 0f 84 ce 02 00 00 je 10ca60 <_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; 10c792: 8b 55 cc mov -0x34(%ebp),%edx 10c795: 8b 42 04 mov 0x4(%edx),%eax 10c798: 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); 10c79b: 01 d0 add %edx,%eax ); return false; } if ( _Heap_Is_free( last_block ) ) { 10c79d: f6 40 04 01 testb $0x1,0x4(%eax) 10c7a1: 74 25 je 10c7c8 <_Heap_Walk+0xec> ); return false; } if ( 10c7a3: 39 45 dc cmp %eax,-0x24(%ebp) 10c7a6: 74 54 je 10c7fc <_Heap_Walk+0x120> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 10c7a8: 51 push %ecx 10c7a9: 68 e0 10 12 00 push $0x1210e0 10c7ae: 66 90 xchg %ax,%ax return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10c7b0: 6a 01 push $0x1 10c7b2: ff 75 0c pushl 0xc(%ebp) 10c7b5: ff 55 d8 call *-0x28(%ebp) 10c7b8: 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; 10c7bb: 31 c0 xor %eax,%eax block = next_block; } while ( block != first_block ); return true; } 10c7bd: 8d 65 f4 lea -0xc(%ebp),%esp 10c7c0: 5b pop %ebx 10c7c1: 5e pop %esi 10c7c2: 5f pop %edi 10c7c3: c9 leave 10c7c4: c3 ret 10c7c5: 8d 76 00 lea 0x0(%esi),%esi return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 10c7c8: 53 push %ebx 10c7c9: 68 7a 0f 12 00 push $0x120f7a 10c7ce: eb e0 jmp 10c7b0 <_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" ); 10c7d0: 57 push %edi 10c7d1: 68 49 0f 12 00 push $0x120f49 10c7d6: eb d8 jmp 10c7b0 <_Heap_Walk+0xd4> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 10c7d8: ff 75 e0 pushl -0x20(%ebp) 10c7db: 68 5c 0f 12 00 push $0x120f5c 10c7e0: eb ce jmp 10c7b0 <_Heap_Walk+0xd4> 10c7e2: 66 90 xchg %ax,%ax return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 10c7e4: ff 75 d0 pushl -0x30(%ebp) 10c7e7: 68 58 10 12 00 push $0x121058 10c7ec: eb c2 jmp 10c7b0 <_Heap_Walk+0xd4> 10c7ee: 66 90 xchg %ax,%ax } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10c7f0: ff 75 dc pushl -0x24(%ebp) 10c7f3: 68 7c 10 12 00 push $0x12107c 10c7f8: eb b6 jmp 10c7b0 <_Heap_Walk+0xd4> 10c7fa: 66 90 xchg %ax,%ax int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10c7fc: 8b 43 10 mov 0x10(%ebx),%eax 10c7ff: 89 45 c8 mov %eax,-0x38(%ebp) block = next_block; } while ( block != first_block ); return true; } 10c802: 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 ) { 10c805: 39 f3 cmp %esi,%ebx 10c807: 74 65 je 10c86e <_Heap_Walk+0x192> block = next_block; } while ( block != first_block ); return true; } 10c809: 8b 43 20 mov 0x20(%ebx),%eax 10c80c: 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; 10c80f: 39 f0 cmp %esi,%eax 10c811: 0f 87 55 02 00 00 ja 10ca6c <_Heap_Walk+0x390> <== NEVER TAKEN 10c817: 8b 7b 24 mov 0x24(%ebx),%edi 10c81a: 39 f7 cmp %esi,%edi 10c81c: 0f 82 4a 02 00 00 jb 10ca6c <_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; 10c822: 8d 46 08 lea 0x8(%esi),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10c825: 31 d2 xor %edx,%edx 10c827: f7 75 c8 divl -0x38(%ebp) ); return false; } if ( 10c82a: 85 d2 test %edx,%edx 10c82c: 0f 85 71 02 00 00 jne 10caa3 <_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; 10c832: 8b 46 04 mov 0x4(%esi),%eax 10c835: 83 e0 fe and $0xfffffffe,%eax ); return false; } if ( _Heap_Is_used( free_block ) ) { 10c838: f6 44 06 04 01 testb $0x1,0x4(%esi,%eax,1) 10c83d: 0f 85 6d 02 00 00 jne 10cab0 <_Heap_Walk+0x3d4> <== NEVER TAKEN 10c843: 89 da mov %ebx,%edx 10c845: 8d 76 00 lea 0x0(%esi),%esi ); return false; } if ( free_block->prev != prev_block ) { 10c848: 8b 46 0c mov 0xc(%esi),%eax 10c84b: 39 d0 cmp %edx,%eax 10c84d: 0f 85 6a 02 00 00 jne 10cabd <_Heap_Walk+0x3e1> return false; } prev_block = free_block; free_block = free_block->next; 10c853: 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 ) { 10c856: 39 cb cmp %ecx,%ebx 10c858: 74 1a je 10c874 <_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; 10c85a: 39 4d d4 cmp %ecx,-0x2c(%ebp) 10c85d: 0f 86 7d 01 00 00 jbe 10c9e0 <_Heap_Walk+0x304> if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 10c863: 51 push %ecx 10c864: 68 10 11 12 00 push $0x121110 10c869: e9 42 ff ff ff jmp 10c7b0 <_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 ) { 10c86e: 8b 53 20 mov 0x20(%ebx),%edx 10c871: 89 55 d4 mov %edx,-0x2c(%ebp) ); return false; } if ( _Heap_Is_used( free_block ) ) { 10c874: 8b 7d dc mov -0x24(%ebp),%edi 10c877: 8b 45 d4 mov -0x2c(%ebp),%eax 10c87a: 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; 10c87c: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c87f: 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); 10c882: 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; 10c885: 39 f0 cmp %esi,%eax 10c887: 76 23 jbe 10c8ac <_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)( 10c889: 83 ec 0c sub $0xc,%esp 10c88c: 56 push %esi 10c88d: 57 push %edi 10c88e: 68 94 11 12 00 push $0x121194 10c893: 90 nop 10c894: 6a 01 push $0x1 10c896: ff 75 0c pushl 0xc(%ebp) 10c899: ff 55 d8 call *-0x28(%ebp) "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 10c89c: 83 c4 20 add $0x20,%esp 10c89f: 31 c0 xor %eax,%eax block = next_block; } while ( block != first_block ); return true; } 10c8a1: 8d 65 f4 lea -0xc(%ebp),%esp 10c8a4: 5b pop %ebx 10c8a5: 5e pop %esi 10c8a6: 5f pop %edi 10c8a7: c9 leave 10c8a8: c3 ret 10c8a9: 8d 76 00 lea 0x0(%esi),%esi 10c8ac: 39 73 24 cmp %esi,0x24(%ebx) 10c8af: 72 d8 jb 10c889 <_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; 10c8b1: 3b 7d cc cmp -0x34(%ebp),%edi 10c8b4: 0f 95 45 d4 setne -0x2c(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10c8b8: 89 c8 mov %ecx,%eax 10c8ba: 31 d2 xor %edx,%edx 10c8bc: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 10c8bf: 85 d2 test %edx,%edx 10c8c1: 74 0a je 10c8cd <_Heap_Walk+0x1f1> 10c8c3: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10c8c7: 0f 85 a6 01 00 00 jne 10ca73 <_Heap_Walk+0x397> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 10c8cd: 39 4d d0 cmp %ecx,-0x30(%ebp) 10c8d0: 76 0a jbe 10c8dc <_Heap_Walk+0x200> 10c8d2: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10c8d6: 0f 85 a6 01 00 00 jne 10ca82 <_Heap_Walk+0x3a6> <== ALWAYS TAKEN ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 10c8dc: 39 f7 cmp %esi,%edi 10c8de: 72 0a jb 10c8ea <_Heap_Walk+0x20e> 10c8e0: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10c8e4: 0f 85 aa 01 00 00 jne 10ca94 <_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; 10c8ea: 8b 55 e4 mov -0x1c(%ebp),%edx 10c8ed: 83 e2 01 and $0x1,%edx ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10c8f0: f6 46 04 01 testb $0x1,0x4(%esi) 10c8f4: 74 4e je 10c944 <_Heap_Walk+0x268> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 10c8f6: 85 d2 test %edx,%edx 10c8f8: 74 2e je 10c928 <_Heap_Walk+0x24c> (*printer)( 10c8fa: 83 ec 0c sub $0xc,%esp 10c8fd: 51 push %ecx 10c8fe: 57 push %edi 10c8ff: 68 ab 0f 12 00 push $0x120fab 10c904: 6a 00 push $0x0 10c906: ff 75 0c pushl 0xc(%ebp) 10c909: ff 55 d8 call *-0x28(%ebp) 10c90c: 83 c4 20 add $0x20,%esp block->prev_size ); } block = next_block; } while ( block != first_block ); 10c90f: 39 75 dc cmp %esi,-0x24(%ebp) 10c912: 0f 84 fe fd ff ff je 10c716 <_Heap_Walk+0x3a> 10c918: 8b 56 04 mov 0x4(%esi),%edx 10c91b: 89 55 e4 mov %edx,-0x1c(%ebp) 10c91e: 8b 43 20 mov 0x20(%ebx),%eax 10c921: 89 f7 mov %esi,%edi 10c923: e9 54 ff ff ff jmp 10c87c <_Heap_Walk+0x1a0> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10c928: 83 ec 08 sub $0x8,%esp 10c92b: ff 37 pushl (%edi) 10c92d: 51 push %ecx 10c92e: 57 push %edi 10c92f: 68 f8 12 12 00 push $0x1212f8 10c934: 6a 00 push $0x0 10c936: ff 75 0c pushl 0xc(%ebp) 10c939: ff 55 d8 call *-0x28(%ebp) 10c93c: 83 c4 20 add $0x20,%esp 10c93f: eb ce jmp 10c90f <_Heap_Walk+0x233> 10c941: 8d 76 00 lea 0x0(%esi),%esi block = next_block; } while ( block != first_block ); return true; } 10c944: 8b 43 08 mov 0x8(%ebx),%eax 10c947: 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 ? 10c94a: 8b 47 08 mov 0x8(%edi),%eax 10c94d: 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)( 10c950: 39 43 0c cmp %eax,0xc(%ebx) 10c953: 0f 84 cb 00 00 00 je 10ca24 <_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)" : "") 10c959: 39 c3 cmp %eax,%ebx 10c95b: 0f 84 db 00 00 00 je 10ca3c <_Heap_Walk+0x360> 10c961: c7 45 c8 49 0e 12 00 movl $0x120e49,-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 ? 10c968: 8b 47 0c mov 0xc(%edi),%eax 10c96b: 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)( 10c96e: 39 45 b4 cmp %eax,-0x4c(%ebp) 10c971: 0f 84 b9 00 00 00 je 10ca30 <_Heap_Walk+0x354> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 10c977: 39 c3 cmp %eax,%ebx 10c979: 0f 84 c9 00 00 00 je 10ca48 <_Heap_Walk+0x36c> 10c97f: b8 49 0e 12 00 mov $0x120e49,%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)( 10c984: 83 ec 0c sub $0xc,%esp 10c987: ff 75 c8 pushl -0x38(%ebp) 10c98a: ff 75 e4 pushl -0x1c(%ebp) 10c98d: 50 push %eax 10c98e: ff 75 d4 pushl -0x2c(%ebp) 10c991: 51 push %ecx 10c992: 57 push %edi 10c993: 68 54 12 12 00 push $0x121254 10c998: 6a 00 push $0x0 10c99a: ff 75 0c pushl 0xc(%ebp) 10c99d: 89 55 c4 mov %edx,-0x3c(%ebp) 10c9a0: 89 4d c0 mov %ecx,-0x40(%ebp) 10c9a3: 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 ) { 10c9a6: 8b 06 mov (%esi),%eax 10c9a8: 83 c4 30 add $0x30,%esp 10c9ab: 8b 4d c0 mov -0x40(%ebp),%ecx 10c9ae: 39 c1 cmp %eax,%ecx 10c9b0: 8b 55 c4 mov -0x3c(%ebp),%edx 10c9b3: 75 5f jne 10ca14 <_Heap_Walk+0x338> ); return false; } if ( !prev_used ) { 10c9b5: 85 d2 test %edx,%edx 10c9b7: 0f 84 97 00 00 00 je 10ca54 <_Heap_Walk+0x378> block = next_block; } while ( block != first_block ); return true; } 10c9bd: 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 ) { 10c9c0: 39 c3 cmp %eax,%ebx 10c9c2: 74 0f je 10c9d3 <_Heap_Walk+0x2f7> <== NEVER TAKEN if ( free_block == block ) { 10c9c4: 39 c7 cmp %eax,%edi 10c9c6: 0f 84 43 ff ff ff je 10c90f <_Heap_Walk+0x233> return true; } free_block = free_block->next; 10c9cc: 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 ) { 10c9cf: 39 c3 cmp %eax,%ebx 10c9d1: 75 f1 jne 10c9c4 <_Heap_Walk+0x2e8> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10c9d3: 57 push %edi 10c9d4: 68 20 13 12 00 push $0x121320 10c9d9: e9 d2 fd ff ff jmp 10c7b0 <_Heap_Walk+0xd4> 10c9de: 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; 10c9e0: 39 f9 cmp %edi,%ecx 10c9e2: 0f 87 7b fe ff ff ja 10c863 <_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; 10c9e8: 8d 41 08 lea 0x8(%ecx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10c9eb: 31 d2 xor %edx,%edx 10c9ed: f7 75 c8 divl -0x38(%ebp) ); return false; } if ( 10c9f0: 85 d2 test %edx,%edx 10c9f2: 0f 85 ad 00 00 00 jne 10caa5 <_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; 10c9f8: 8b 41 04 mov 0x4(%ecx),%eax 10c9fb: 83 e0 fe and $0xfffffffe,%eax ); return false; } if ( _Heap_Is_used( free_block ) ) { 10c9fe: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10ca03: 0f 85 a9 00 00 00 jne 10cab2 <_Heap_Walk+0x3d6> 10ca09: 89 f2 mov %esi,%edx 10ca0b: 89 ce mov %ecx,%esi 10ca0d: e9 36 fe ff ff jmp 10c848 <_Heap_Walk+0x16c> 10ca12: 66 90 xchg %ax,%ax " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( 10ca14: 52 push %edx 10ca15: 56 push %esi 10ca16: 50 push %eax 10ca17: 51 push %ecx 10ca18: 57 push %edi 10ca19: 68 8c 12 12 00 push $0x12128c 10ca1e: e9 71 fe ff ff jmp 10c894 <_Heap_Walk+0x1b8> 10ca23: 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)( 10ca24: c7 45 c8 16 0f 12 00 movl $0x120f16,-0x38(%ebp) 10ca2b: e9 38 ff ff ff jmp 10c968 <_Heap_Walk+0x28c> 10ca30: b8 2f 0f 12 00 mov $0x120f2f,%eax 10ca35: e9 4a ff ff ff jmp 10c984 <_Heap_Walk+0x2a8> 10ca3a: 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)" : "") 10ca3c: c7 45 c8 25 0f 12 00 movl $0x120f25,-0x38(%ebp) 10ca43: e9 20 ff ff ff jmp 10c968 <_Heap_Walk+0x28c> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 10ca48: b8 3f 0f 12 00 mov $0x120f3f,%eax 10ca4d: e9 32 ff ff ff jmp 10c984 <_Heap_Walk+0x2a8> 10ca52: 66 90 xchg %ax,%ax return false; } if ( !prev_used ) { (*printer)( 10ca54: 57 push %edi 10ca55: 68 c8 12 12 00 push $0x1212c8 10ca5a: e9 51 fd ff ff jmp 10c7b0 <_Heap_Walk+0xd4> 10ca5f: 90 nop return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 10ca60: 56 push %esi 10ca61: 68 b0 10 12 00 push $0x1210b0 10ca66: e9 45 fd ff ff jmp 10c7b0 <_Heap_Walk+0xd4> 10ca6b: 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; 10ca6c: 89 f1 mov %esi,%ecx <== NOT EXECUTED 10ca6e: e9 f0 fd ff ff jmp 10c863 <_Heap_Walk+0x187> <== NOT EXECUTED return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 10ca73: 83 ec 0c sub $0xc,%esp 10ca76: 51 push %ecx 10ca77: 57 push %edi 10ca78: 68 c4 11 12 00 push $0x1211c4 10ca7d: e9 12 fe ff ff jmp 10c894 <_Heap_Walk+0x1b8> return false; } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( 10ca82: 83 ec 08 sub $0x8,%esp 10ca85: ff 75 d0 pushl -0x30(%ebp) 10ca88: 51 push %ecx 10ca89: 57 push %edi 10ca8a: 68 f4 11 12 00 push $0x1211f4 10ca8f: e9 00 fe ff ff jmp 10c894 <_Heap_Walk+0x1b8> return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 10ca94: 83 ec 0c sub $0xc,%esp 10ca97: 56 push %esi 10ca98: 57 push %edi 10ca99: 68 20 12 12 00 push $0x121220 10ca9e: e9 f1 fd ff ff jmp 10c894 <_Heap_Walk+0x1b8> ); return false; } if ( 10caa3: 89 f1 mov %esi,%ecx <== NOT EXECUTED !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10caa5: 51 push %ecx 10caa6: 68 30 11 12 00 push $0x121130 10caab: e9 00 fd ff ff jmp 10c7b0 <_Heap_Walk+0xd4> ); return false; } if ( _Heap_Is_used( free_block ) ) { 10cab0: 89 f1 mov %esi,%ecx <== NOT EXECUTED (*printer)( 10cab2: 51 push %ecx 10cab3: 68 8f 0f 12 00 push $0x120f8f 10cab8: e9 f3 fc ff ff jmp 10c7b0 <_Heap_Walk+0xd4> return false; } if ( free_block->prev != prev_block ) { (*printer)( 10cabd: 83 ec 0c sub $0xc,%esp 10cac0: 50 push %eax 10cac1: 56 push %esi 10cac2: 68 60 11 12 00 push $0x121160 10cac7: e9 c8 fd ff ff jmp 10c894 <_Heap_Walk+0x1b8> =============================================================================== 0010b294 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 10b294: 55 push %ebp 10b295: 89 e5 mov %esp,%ebp 10b297: 53 push %ebx 10b298: 83 ec 04 sub $0x4,%esp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10b29b: 8b 0d 40 68 12 00 mov 0x126840,%ecx 10b2a1: 85 c9 test %ecx,%ecx 10b2a3: 74 1a je 10b2bf <_IO_Initialize_all_drivers+0x2b><== NEVER TAKEN 10b2a5: 31 db xor %ebx,%ebx 10b2a7: 90 nop (void) rtems_io_initialize( major, 0, NULL ); 10b2a8: 52 push %edx 10b2a9: 6a 00 push $0x0 10b2ab: 6a 00 push $0x0 10b2ad: 53 push %ebx 10b2ae: e8 39 4b 00 00 call 10fdec void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10b2b3: 43 inc %ebx 10b2b4: 83 c4 10 add $0x10,%esp 10b2b7: 39 1d 40 68 12 00 cmp %ebx,0x126840 10b2bd: 77 e9 ja 10b2a8 <_IO_Initialize_all_drivers+0x14> (void) rtems_io_initialize( major, 0, NULL ); } 10b2bf: 8b 5d fc mov -0x4(%ebp),%ebx 10b2c2: c9 leave 10b2c3: c3 ret =============================================================================== 0010b1fc <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 10b1fc: 55 push %ebp 10b1fd: 89 e5 mov %esp,%ebp 10b1ff: 57 push %edi 10b200: 56 push %esi 10b201: 53 push %ebx 10b202: 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; 10b205: 8b 1d 34 23 12 00 mov 0x122334,%ebx drivers_in_table = Configuration.number_of_device_drivers; 10b20b: a1 30 23 12 00 mov 0x122330,%eax 10b210: 89 45 e4 mov %eax,-0x1c(%ebp) number_of_drivers = Configuration.maximum_drivers; 10b213: 8b 35 2c 23 12 00 mov 0x12232c,%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 ) 10b219: 39 f0 cmp %esi,%eax 10b21b: 73 5f jae 10b27c <_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( 10b21d: 8d 0c 76 lea (%esi,%esi,2),%ecx 10b220: c1 e1 03 shl $0x3,%ecx 10b223: 83 ec 0c sub $0xc,%esp 10b226: 51 push %ecx 10b227: 89 4d dc mov %ecx,-0x24(%ebp) 10b22a: e8 75 2a 00 00 call 10dca4 <_Workspace_Allocate_or_fatal_error> 10b22f: 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 *) 10b231: a3 44 68 12 00 mov %eax,0x126844 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 10b236: 89 35 40 68 12 00 mov %esi,0x126840 memset( 10b23c: 31 c0 xor %eax,%eax 10b23e: 8b 4d dc mov -0x24(%ebp),%ecx 10b241: 89 d7 mov %edx,%edi 10b243: 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++ ) 10b245: 83 c4 10 add $0x10,%esp 10b248: 8b 45 e4 mov -0x1c(%ebp),%eax 10b24b: 85 c0 test %eax,%eax 10b24d: 74 25 je 10b274 <_IO_Manager_initialization+0x78><== NEVER TAKEN 10b24f: a1 44 68 12 00 mov 0x126844,%eax 10b254: 89 45 e0 mov %eax,-0x20(%ebp) 10b257: 31 c0 xor %eax,%eax 10b259: 31 d2 xor %edx,%edx 10b25b: 90 nop _IO_Driver_address_table[index] = driver_table[index]; 10b25c: 8b 7d e0 mov -0x20(%ebp),%edi 10b25f: 01 c7 add %eax,%edi 10b261: 8d 34 03 lea (%ebx,%eax,1),%esi 10b264: b9 06 00 00 00 mov $0x6,%ecx 10b269: 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++ ) 10b26b: 42 inc %edx 10b26c: 83 c0 18 add $0x18,%eax 10b26f: 39 55 e4 cmp %edx,-0x1c(%ebp) 10b272: 77 e8 ja 10b25c <_IO_Manager_initialization+0x60> _IO_Driver_address_table[index] = driver_table[index]; } 10b274: 8d 65 f4 lea -0xc(%ebp),%esp 10b277: 5b pop %ebx 10b278: 5e pop %esi 10b279: 5f pop %edi 10b27a: c9 leave 10b27b: 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; 10b27c: 89 1d 44 68 12 00 mov %ebx,0x126844 _IO_Number_of_drivers = number_of_drivers; 10b282: 8b 45 e4 mov -0x1c(%ebp),%eax 10b285: a3 40 68 12 00 mov %eax,0x126840 sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; } 10b28a: 8d 65 f4 lea -0xc(%ebp),%esp 10b28d: 5b pop %ebx 10b28e: 5e pop %esi 10b28f: 5f pop %edi 10b290: c9 leave 10b291: c3 ret =============================================================================== 0010bc68 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10bc68: 55 push %ebp 10bc69: 89 e5 mov %esp,%ebp 10bc6b: 53 push %ebx 10bc6c: 83 ec 08 sub $0x8,%esp 10bc6f: 8b 45 08 mov 0x8(%ebp),%eax 10bc72: 8b 55 0c mov 0xc(%ebp),%edx 10bc75: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10bc78: a3 94 65 12 00 mov %eax,0x126594 _Internal_errors_What_happened.is_internal = is_internal; 10bc7d: 88 15 98 65 12 00 mov %dl,0x126598 _Internal_errors_What_happened.the_error = the_error; 10bc83: 89 1d 9c 65 12 00 mov %ebx,0x12659c _User_extensions_Fatal( the_source, is_internal, the_error ); 10bc89: 53 push %ebx 10bc8a: 0f b6 d2 movzbl %dl,%edx 10bc8d: 52 push %edx 10bc8e: 50 push %eax 10bc8f: e8 10 1c 00 00 call 10d8a4 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10bc94: c7 05 80 66 12 00 05 movl $0x5,0x126680 <== NOT EXECUTED 10bc9b: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10bc9e: fa cli <== NOT EXECUTED 10bc9f: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10bca1: f4 hlt <== NOT EXECUTED 10bca2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10bca5: eb fe jmp 10bca5 <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 00110598 <_Objects_API_maximum_class>: #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 110598: 55 push %ebp 110599: 89 e5 mov %esp,%ebp 11059b: 8b 45 08 mov 0x8(%ebp),%eax 11059e: 48 dec %eax 11059f: 83 f8 02 cmp $0x2,%eax 1105a2: 77 0c ja 1105b0 <_Objects_API_maximum_class+0x18> 1105a4: 8b 04 85 30 04 12 00 mov 0x120430(,%eax,4),%eax case OBJECTS_NO_API: default: break; } return 0; } 1105ab: c9 leave 1105ac: c3 ret 1105ad: 8d 76 00 lea 0x0(%esi),%esi #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 1105b0: 31 c0 xor %eax,%eax case OBJECTS_NO_API: default: break; } return 0; } 1105b2: c9 leave 1105b3: c3 ret =============================================================================== 0010bcf8 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10bcf8: 55 push %ebp 10bcf9: 89 e5 mov %esp,%ebp 10bcfb: 56 push %esi 10bcfc: 53 push %ebx 10bcfd: 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 ) 10bd00: 8b 43 18 mov 0x18(%ebx),%eax 10bd03: 85 c0 test %eax,%eax 10bd05: 75 0d jne 10bd14 <_Objects_Allocate+0x1c><== ALWAYS TAKEN return NULL; 10bd07: 31 c9 xor %ecx,%ecx <== NOT EXECUTED ); } #endif return the_object; } 10bd09: 89 c8 mov %ecx,%eax 10bd0b: 8d 65 f8 lea -0x8(%ebp),%esp 10bd0e: 5b pop %ebx 10bd0f: 5e pop %esi 10bd10: c9 leave 10bd11: c3 ret 10bd12: 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 ); 10bd14: 8d 73 20 lea 0x20(%ebx),%esi 10bd17: 83 ec 0c sub $0xc,%esp 10bd1a: 56 push %esi 10bd1b: e8 a0 f7 ff ff call 10b4c0 <_Chain_Get> 10bd20: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10bd22: 83 c4 10 add $0x10,%esp 10bd25: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10bd29: 74 de je 10bd09 <_Objects_Allocate+0x11> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10bd2b: 85 c0 test %eax,%eax 10bd2d: 74 29 je 10bd58 <_Objects_Allocate+0x60> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10bd2f: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10bd33: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10bd37: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 10bd39: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10bd3d: 31 d2 xor %edx,%edx 10bd3f: f7 f6 div %esi information->inactive_per_block[ block ]--; 10bd41: c1 e0 02 shl $0x2,%eax 10bd44: 03 43 30 add 0x30(%ebx),%eax 10bd47: ff 08 decl (%eax) information->inactive--; 10bd49: 66 ff 4b 2c decw 0x2c(%ebx) ); } #endif return the_object; } 10bd4d: 89 c8 mov %ecx,%eax 10bd4f: 8d 65 f8 lea -0x8(%ebp),%esp 10bd52: 5b pop %ebx 10bd53: 5e pop %esi 10bd54: c9 leave 10bd55: c3 ret 10bd56: 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 ); 10bd58: 83 ec 0c sub $0xc,%esp 10bd5b: 53 push %ebx 10bd5c: e8 3b 00 00 00 call 10bd9c <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10bd61: 89 34 24 mov %esi,(%esp) 10bd64: e8 57 f7 ff ff call 10b4c0 <_Chain_Get> 10bd69: 89 c1 mov %eax,%ecx } if ( the_object ) { 10bd6b: 83 c4 10 add $0x10,%esp 10bd6e: 85 c0 test %eax,%eax 10bd70: 74 97 je 10bd09 <_Objects_Allocate+0x11> 10bd72: eb bb jmp 10bd2f <_Objects_Allocate+0x37> =============================================================================== 0010bd9c <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10bd9c: 55 push %ebp 10bd9d: 89 e5 mov %esp,%ebp 10bd9f: 57 push %edi 10bda0: 56 push %esi 10bda1: 53 push %ebx 10bda2: 83 ec 4c sub $0x4c,%esp 10bda5: 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 ); 10bda8: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10bdac: 89 45 cc mov %eax,-0x34(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10bdaf: 8b 4b 34 mov 0x34(%ebx),%ecx 10bdb2: 85 c9 test %ecx,%ecx 10bdb4: 0f 84 62 02 00 00 je 10c01c <_Objects_Extend_information+0x280> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10bdba: 8b 73 10 mov 0x10(%ebx),%esi 10bdbd: 66 89 75 d0 mov %si,-0x30(%ebp) 10bdc1: 8b 7b 14 mov 0x14(%ebx),%edi 10bdc4: 89 f0 mov %esi,%eax 10bdc6: 31 d2 xor %edx,%edx 10bdc8: 66 f7 f7 div %di 10bdcb: 0f b7 f0 movzwl %ax,%esi for ( ; block < block_count; block++ ) { 10bdce: 85 f6 test %esi,%esi 10bdd0: 0f 84 5f 02 00 00 je 10c035 <_Objects_Extend_information+0x299><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) { 10bdd6: 8b 01 mov (%ecx),%eax 10bdd8: 85 c0 test %eax,%eax 10bdda: 0f 84 67 02 00 00 je 10c047 <_Objects_Extend_information+0x2ab><== NEVER TAKEN 10bde0: 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 ); 10bde3: 8b 55 cc mov -0x34(%ebp),%edx 10bde6: 89 55 d4 mov %edx,-0x2c(%ebp) index_base = minimum_index; block = 0; 10bde9: 31 d2 xor %edx,%edx 10bdeb: 8b 45 d4 mov -0x2c(%ebp),%eax 10bdee: eb 0a jmp 10bdfa <_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 ) { 10bdf0: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4) 10bdf4: 0f 84 c2 01 00 00 je 10bfbc <_Objects_Extend_information+0x220> do_extend = false; break; } else index_base += information->allocation_size; 10bdfa: 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++ ) { 10bdfc: 42 inc %edx 10bdfd: 39 d6 cmp %edx,%esi 10bdff: 77 ef ja 10bdf0 <_Objects_Extend_information+0x54> 10be01: 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; 10be04: b1 01 mov $0x1,%cl } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10be06: 0f b7 45 d0 movzwl -0x30(%ebp),%eax 10be0a: 01 f8 add %edi,%eax 10be0c: 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 ) { 10be0f: 3d ff ff 00 00 cmp $0xffff,%eax 10be14: 0f 87 9a 01 00 00 ja 10bfb4 <_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; 10be1a: 0f af 7b 18 imul 0x18(%ebx),%edi if ( information->auto_extend ) { 10be1e: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10be22: 0f 84 a0 01 00 00 je 10bfc8 <_Objects_Extend_information+0x22c> new_object_block = _Workspace_Allocate( block_size ); 10be28: 83 ec 0c sub $0xc,%esp 10be2b: 57 push %edi 10be2c: 89 55 b8 mov %edx,-0x48(%ebp) 10be2f: 88 4d b4 mov %cl,-0x4c(%ebp) 10be32: e8 39 1e 00 00 call 10dc70 <_Workspace_Allocate> 10be37: 89 45 c8 mov %eax,-0x38(%ebp) if ( !new_object_block ) 10be3a: 83 c4 10 add $0x10,%esp 10be3d: 85 c0 test %eax,%eax 10be3f: 8b 55 b8 mov -0x48(%ebp),%edx 10be42: 8a 4d b4 mov -0x4c(%ebp),%cl 10be45: 0f 84 69 01 00 00 je 10bfb4 <_Objects_Extend_information+0x218> } /* * Do we need to grow the tables? */ if ( do_extend ) { 10be4b: 84 c9 test %cl,%cl 10be4d: 0f 84 e6 00 00 00 je 10bf39 <_Objects_Extend_information+0x19d> */ /* * Up the block count and maximum */ block_count++; 10be53: 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 ); 10be56: 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 *)) + 10be59: 8d 04 7f lea (%edi,%edi,2),%eax ((maximum + minimum_index) * sizeof(Objects_Control *)); 10be5c: 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 *)) + 10be5f: 03 45 cc add -0x34(%ebp),%eax block_count++; /* * Allocate the tables and break it up. */ block_size = block_count * 10be62: 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 ); 10be65: 50 push %eax 10be66: 89 55 b8 mov %edx,-0x48(%ebp) 10be69: e8 02 1e 00 00 call 10dc70 <_Workspace_Allocate> 10be6e: 89 45 c4 mov %eax,-0x3c(%ebp) if ( !object_blocks ) { 10be71: 83 c4 10 add $0x10,%esp 10be74: 85 c0 test %eax,%eax 10be76: 8b 55 b8 mov -0x48(%ebp),%edx 10be79: 0f 84 da 01 00 00 je 10c059 <_Objects_Extend_information+0x2bd> 10be7f: 8b 45 c4 mov -0x3c(%ebp),%eax 10be82: 8d 04 b8 lea (%eax,%edi,4),%eax 10be85: 89 45 bc mov %eax,-0x44(%ebp) 10be88: 8b 4d c4 mov -0x3c(%ebp),%ecx 10be8b: 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 ) { 10be8e: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10be92: 39 4d cc cmp %ecx,-0x34(%ebp) 10be95: 0f 82 4d 01 00 00 jb 10bfe8 <_Objects_Extend_information+0x24c> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10be9b: 8b 4d cc mov -0x34(%ebp),%ecx 10be9e: 85 c9 test %ecx,%ecx 10bea0: 74 12 je 10beb4 <_Objects_Extend_information+0x118><== NEVER TAKEN 10bea2: 31 c9 xor %ecx,%ecx 10bea4: 8b 7d cc mov -0x34(%ebp),%edi 10bea7: 90 nop local_table[ index ] = NULL; 10bea8: 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++ ) { 10beaf: 41 inc %ecx 10beb0: 39 cf cmp %ecx,%edi 10beb2: 77 f4 ja 10bea8 <_Objects_Extend_information+0x10c><== NEVER TAKEN 10beb4: c1 e6 02 shl $0x2,%esi 10beb7: 89 75 c0 mov %esi,-0x40(%ebp) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10beba: 8b 4d c4 mov -0x3c(%ebp),%ecx 10bebd: 8b 75 c0 mov -0x40(%ebp),%esi 10bec0: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1) inactive_per_block[block_count] = 0; 10bec7: 8b 4d bc mov -0x44(%ebp),%ecx 10beca: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10bed1: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10bed5: 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 ; 10bed8: 39 75 d4 cmp %esi,-0x2c(%ebp) 10bedb: 73 0f jae 10beec <_Objects_Extend_information+0x150><== NEVER TAKEN 10bedd: 8b 4d d4 mov -0x2c(%ebp),%ecx index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10bee0: 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++ ) { 10bee7: 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 ; 10bee8: 39 f1 cmp %esi,%ecx 10beea: 72 f4 jb 10bee0 <_Objects_Extend_information+0x144> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10beec: 9c pushf 10beed: fa cli 10beee: 5f pop %edi old_tables = information->object_blocks; 10beef: 8b 73 34 mov 0x34(%ebx),%esi information->object_blocks = object_blocks; 10bef2: 8b 4d c4 mov -0x3c(%ebp),%ecx 10bef5: 89 4b 34 mov %ecx,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10bef8: 8b 4d bc mov -0x44(%ebp),%ecx 10befb: 89 4b 30 mov %ecx,0x30(%ebx) information->local_table = local_table; 10befe: 89 43 1c mov %eax,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10bf01: 8b 45 d0 mov -0x30(%ebp),%eax 10bf04: 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) | 10bf08: 8b 0b mov (%ebx),%ecx 10bf0a: c1 e1 18 shl $0x18,%ecx 10bf0d: 81 c9 00 00 01 00 or $0x10000,%ecx information->maximum_id = _Objects_Build_id( 10bf13: 0f b7 43 04 movzwl 0x4(%ebx),%eax (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10bf17: c1 e0 1b shl $0x1b,%eax 10bf1a: 09 c1 or %eax,%ecx 10bf1c: 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) | 10bf20: 09 c1 or %eax,%ecx 10bf22: 89 4b 0c mov %ecx,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10bf25: 57 push %edi 10bf26: 9d popf _Workspace_Free( old_tables ); 10bf27: 83 ec 0c sub $0xc,%esp 10bf2a: 56 push %esi 10bf2b: 89 55 b8 mov %edx,-0x48(%ebp) 10bf2e: e8 59 1d 00 00 call 10dc8c <_Workspace_Free> 10bf33: 83 c4 10 add $0x10,%esp 10bf36: 8b 55 b8 mov -0x48(%ebp),%edx } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10bf39: c1 e2 02 shl $0x2,%edx 10bf3c: 89 55 d0 mov %edx,-0x30(%ebp) 10bf3f: 8b 43 34 mov 0x34(%ebx),%eax 10bf42: 8b 4d c8 mov -0x38(%ebp),%ecx 10bf45: 89 0c 10 mov %ecx,(%eax,%edx,1) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10bf48: ff 73 18 pushl 0x18(%ebx) 10bf4b: 0f b7 43 14 movzwl 0x14(%ebx),%eax 10bf4f: 50 push %eax 10bf50: 51 push %ecx 10bf51: 8d 7d dc lea -0x24(%ebp),%edi 10bf54: 57 push %edi 10bf55: e8 d2 3e 00 00 call 10fe2c <_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 ) { 10bf5a: 83 c4 10 add $0x10,%esp 10bf5d: 8b 75 d4 mov -0x2c(%ebp),%esi information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10bf60: 8d 43 20 lea 0x20(%ebx),%eax 10bf63: 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 ) { 10bf66: eb 29 jmp 10bf91 <_Objects_Extend_information+0x1f5> 10bf68: 8b 13 mov (%ebx),%edx 10bf6a: c1 e2 18 shl $0x18,%edx 10bf6d: 81 ca 00 00 01 00 or $0x10000,%edx the_object->id = _Objects_Build_id( 10bf73: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10bf77: c1 e1 1b shl $0x1b,%ecx 10bf7a: 09 ca or %ecx,%edx uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10bf7c: 09 f2 or %esi,%edx 10bf7e: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10bf81: 83 ec 08 sub $0x8,%esp 10bf84: 50 push %eax 10bf85: ff 75 d4 pushl -0x2c(%ebp) 10bf88: e8 f7 f4 ff ff call 10b484 <_Chain_Append> index++; 10bf8d: 46 inc %esi 10bf8e: 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 ) { 10bf91: 83 ec 0c sub $0xc,%esp 10bf94: 57 push %edi 10bf95: e8 26 f5 ff ff call 10b4c0 <_Chain_Get> 10bf9a: 83 c4 10 add $0x10,%esp 10bf9d: 85 c0 test %eax,%eax 10bf9f: 75 c7 jne 10bf68 <_Objects_Extend_information+0x1cc> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10bfa1: 8b 43 14 mov 0x14(%ebx),%eax 10bfa4: 8b 53 30 mov 0x30(%ebx),%edx 10bfa7: 0f b7 c8 movzwl %ax,%ecx 10bfaa: 8b 75 d0 mov -0x30(%ebp),%esi 10bfad: 89 0c 32 mov %ecx,(%edx,%esi,1) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 10bfb0: 66 01 43 2c add %ax,0x2c(%ebx) } 10bfb4: 8d 65 f4 lea -0xc(%ebp),%esp 10bfb7: 5b pop %ebx 10bfb8: 5e pop %esi 10bfb9: 5f pop %edi 10bfba: c9 leave 10bfbb: c3 ret 10bfbc: 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; 10bfbf: 31 c9 xor %ecx,%ecx 10bfc1: e9 40 fe ff ff jmp 10be06 <_Objects_Extend_information+0x6a> 10bfc6: 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 ); 10bfc8: 83 ec 0c sub $0xc,%esp 10bfcb: 57 push %edi 10bfcc: 89 55 b8 mov %edx,-0x48(%ebp) 10bfcf: 88 4d b4 mov %cl,-0x4c(%ebp) 10bfd2: e8 cd 1c 00 00 call 10dca4 <_Workspace_Allocate_or_fatal_error> 10bfd7: 89 45 c8 mov %eax,-0x38(%ebp) 10bfda: 83 c4 10 add $0x10,%esp 10bfdd: 8a 4d b4 mov -0x4c(%ebp),%cl 10bfe0: 8b 55 b8 mov -0x48(%ebp),%edx 10bfe3: e9 63 fe ff ff jmp 10be4b <_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, 10bfe8: c1 e6 02 shl $0x2,%esi 10bfeb: 89 75 c0 mov %esi,-0x40(%ebp) 10bfee: 8b 73 34 mov 0x34(%ebx),%esi 10bff1: 8b 7d c4 mov -0x3c(%ebp),%edi 10bff4: 8b 4d c0 mov -0x40(%ebp),%ecx 10bff7: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10bff9: 8b 73 30 mov 0x30(%ebx),%esi 10bffc: 8b 7d bc mov -0x44(%ebp),%edi 10bfff: 8b 4d c0 mov -0x40(%ebp),%ecx 10c002: 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 *) ); 10c004: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10c008: 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, 10c00b: c1 e1 02 shl $0x2,%ecx 10c00e: 8b 73 1c mov 0x1c(%ebx),%esi 10c011: 89 c7 mov %eax,%edi 10c013: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10c015: e9 a0 fe ff ff jmp 10beba <_Objects_Extend_information+0x11e> 10c01a: 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 ) 10c01c: 8b 53 10 mov 0x10(%ebx),%edx 10c01f: 66 89 55 d0 mov %dx,-0x30(%ebp) 10c023: 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 ); 10c027: 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; 10c02a: b1 01 mov $0x1,%cl minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10c02c: 31 d2 xor %edx,%edx /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; 10c02e: 31 f6 xor %esi,%esi 10c030: e9 d1 fd ff ff jmp 10be06 <_Objects_Extend_information+0x6a> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10c035: 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 ); 10c038: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 10c03b: 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; 10c03e: b1 01 mov $0x1,%cl <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10c040: 31 d2 xor %edx,%edx <== NOT EXECUTED 10c042: e9 bf fd ff ff jmp 10be06 <_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 ) { 10c047: 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 ); 10c04a: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 10c04d: 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; 10c050: 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; 10c052: 31 d2 xor %edx,%edx <== NOT EXECUTED 10c054: e9 ad fd ff ff jmp 10be06 <_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 ); 10c059: 83 ec 0c sub $0xc,%esp 10c05c: ff 75 c8 pushl -0x38(%ebp) 10c05f: e8 28 1c 00 00 call 10dc8c <_Workspace_Free> return; 10c064: 83 c4 10 add $0x10,%esp 10c067: e9 48 ff ff ff jmp 10bfb4 <_Objects_Extend_information+0x218> =============================================================================== 0010c0fc <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 10c0fc: 55 push %ebp 10c0fd: 89 e5 mov %esp,%ebp 10c0ff: 56 push %esi 10c100: 53 push %ebx 10c101: 8b 75 08 mov 0x8(%ebp),%esi 10c104: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10c107: 66 85 db test %bx,%bx 10c10a: 75 0c jne 10c118 <_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; 10c10c: 31 c0 xor %eax,%eax if ( info->maximum == 0 ) return NULL; #endif return info; } 10c10e: 8d 65 f8 lea -0x8(%ebp),%esp 10c111: 5b pop %ebx 10c112: 5e pop %esi 10c113: c9 leave 10c114: c3 ret 10c115: 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 ); 10c118: 83 ec 0c sub $0xc,%esp 10c11b: 56 push %esi 10c11c: e8 77 44 00 00 call 110598 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10c121: 83 c4 10 add $0x10,%esp 10c124: 85 c0 test %eax,%eax 10c126: 74 e4 je 10c10c <_Objects_Get_information+0x10> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10c128: 0f b7 db movzwl %bx,%ebx 10c12b: 39 d8 cmp %ebx,%eax 10c12d: 72 dd jb 10c10c <_Objects_Get_information+0x10> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10c12f: 8b 14 b5 c4 64 12 00 mov 0x1264c4(,%esi,4),%edx return NULL; 10c136: 31 c0 xor %eax,%eax return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 10c138: 85 d2 test %edx,%edx 10c13a: 74 d2 je 10c10e <_Objects_Get_information+0x12><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10c13c: 8b 04 9a mov (%edx,%ebx,4),%eax if ( !info ) 10c13f: 85 c0 test %eax,%eax 10c141: 74 cb je 10c10e <_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; 10c143: 31 d2 xor %edx,%edx 10c145: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10c14a: 0f 95 c2 setne %dl 10c14d: f7 da neg %edx 10c14f: 21 d0 and %edx,%eax 10c151: eb bb jmp 10c10e <_Objects_Get_information+0x12> =============================================================================== 0010c154 <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10c154: 55 push %ebp 10c155: 89 e5 mov %esp,%ebp 10c157: 56 push %esi 10c158: 53 push %ebx 10c159: 8b 55 08 mov 0x8(%ebp),%edx 10c15c: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 10c15f: b8 01 00 00 00 mov $0x1,%eax 10c164: 2b 42 08 sub 0x8(%edx),%eax 10c167: 03 45 0c add 0xc(%ebp),%eax _ISR_Disable( level ); 10c16a: 9c pushf 10c16b: fa cli 10c16c: 5e pop %esi if ( information->maximum >= index ) { 10c16d: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10c171: 39 c8 cmp %ecx,%eax 10c173: 77 1b ja 10c190 <_Objects_Get_isr_disable+0x3c> if ( (the_object = information->local_table[ index ]) != NULL ) { 10c175: 8b 52 1c mov 0x1c(%edx),%edx 10c178: 8b 04 82 mov (%edx,%eax,4),%eax 10c17b: 85 c0 test %eax,%eax 10c17d: 74 21 je 10c1a0 <_Objects_Get_isr_disable+0x4c><== NEVER TAKEN *location = OBJECTS_LOCAL; 10c17f: c7 03 00 00 00 00 movl $0x0,(%ebx) *level_p = level; 10c185: 8b 55 14 mov 0x14(%ebp),%edx 10c188: 89 32 mov %esi,(%edx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10c18a: 5b pop %ebx 10c18b: 5e pop %esi 10c18c: c9 leave 10c18d: c3 ret 10c18e: 66 90 xchg %ax,%ax } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 10c190: 56 push %esi 10c191: 9d popf *location = OBJECTS_ERROR; 10c192: 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; 10c198: 31 c0 xor %eax,%eax #endif } 10c19a: 5b pop %ebx 10c19b: 5e pop %esi 10c19c: c9 leave 10c19d: c3 ret 10c19e: 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 ); 10c1a0: 56 push %esi 10c1a1: 9d popf *location = OBJECTS_ERROR; 10c1a2: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10c1a8: eb e0 jmp 10c18a <_Objects_Get_isr_disable+0x36> =============================================================================== 0010d874 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 10d874: 55 push %ebp 10d875: 89 e5 mov %esp,%ebp 10d877: 57 push %edi 10d878: 56 push %esi 10d879: 53 push %ebx 10d87a: 83 ec 3c sub $0x3c,%esp 10d87d: 8b 7d 08 mov 0x8(%ebp),%edi 10d880: 8b 75 0c mov 0xc(%ebp),%esi 10d883: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 10d886: 85 f6 test %esi,%esi 10d888: 75 0e jne 10d898 <_Objects_Get_name_as_string+0x24> #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; 10d88a: 31 db xor %ebx,%ebx _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } 10d88c: 89 d8 mov %ebx,%eax 10d88e: 8d 65 f4 lea -0xc(%ebp),%esp 10d891: 5b pop %ebx 10d892: 5e pop %esi 10d893: 5f pop %edi 10d894: c9 leave 10d895: c3 ret 10d896: 66 90 xchg %ax,%ax Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 10d898: 85 db test %ebx,%ebx 10d89a: 74 f0 je 10d88c <_Objects_Get_name_as_string+0x18> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10d89c: 85 ff test %edi,%edi 10d89e: 75 08 jne 10d8a8 <_Objects_Get_name_as_string+0x34> 10d8a0: a1 98 9b 12 00 mov 0x129b98,%eax 10d8a5: 8b 78 08 mov 0x8(%eax),%edi information = _Objects_Get_information_id( tmpId ); 10d8a8: 83 ec 0c sub $0xc,%esp 10d8ab: 57 push %edi 10d8ac: e8 f3 fe ff ff call 10d7a4 <_Objects_Get_information_id> if ( !information ) 10d8b1: 83 c4 10 add $0x10,%esp 10d8b4: 85 c0 test %eax,%eax 10d8b6: 74 d2 je 10d88a <_Objects_Get_name_as_string+0x16> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 10d8b8: 51 push %ecx 10d8b9: 8d 55 e4 lea -0x1c(%ebp),%edx 10d8bc: 52 push %edx 10d8bd: 57 push %edi 10d8be: 50 push %eax 10d8bf: e8 80 00 00 00 call 10d944 <_Objects_Get> switch ( location ) { 10d8c4: 83 c4 10 add $0x10,%esp 10d8c7: 8b 55 e4 mov -0x1c(%ebp),%edx 10d8ca: 85 d2 test %edx,%edx 10d8cc: 75 bc jne 10d88a <_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; 10d8ce: 8b 40 0c mov 0xc(%eax),%eax lname[ 0 ] = (u32_name >> 24) & 0xff; 10d8d1: 89 c2 mov %eax,%edx 10d8d3: c1 ea 18 shr $0x18,%edx 10d8d6: 88 55 c7 mov %dl,-0x39(%ebp) 10d8d9: 88 55 df mov %dl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 10d8dc: 89 c7 mov %eax,%edi 10d8de: c1 ef 10 shr $0x10,%edi 10d8e1: 89 f9 mov %edi,%ecx 10d8e3: 88 4d e0 mov %cl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 10d8e6: 89 c7 mov %eax,%edi 10d8e8: c1 ef 08 shr $0x8,%edi 10d8eb: 89 f9 mov %edi,%ecx 10d8ed: 88 4d e1 mov %cl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 10d8f0: 88 45 e2 mov %al,-0x1e(%ebp) lname[ 4 ] = '\0'; 10d8f3: c6 45 e3 00 movb $0x0,-0x1d(%ebp) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10d8f7: 4e dec %esi 10d8f8: 89 75 d4 mov %esi,-0x2c(%ebp) 10d8fb: 74 41 je 10d93e <_Objects_Get_name_as_string+0xca><== NEVER TAKEN 10d8fd: 84 d2 test %dl,%dl 10d8ff: 74 3d je 10d93e <_Objects_Get_name_as_string+0xca> 10d901: 89 d9 mov %ebx,%ecx 10d903: 31 c0 xor %eax,%eax 10d905: eb 09 jmp 10d910 <_Objects_Get_name_as_string+0x9c> 10d907: 90 nop 10d908: 8a 54 05 df mov -0x21(%ebp,%eax,1),%dl 10d90c: 84 d2 test %dl,%dl 10d90e: 74 21 je 10d931 <_Objects_Get_name_as_string+0xbd> *d = (isprint((unsigned char)*s)) ? *s : '*'; 10d910: 0f b6 f2 movzbl %dl,%esi 10d913: 8b 3d 28 72 12 00 mov 0x127228,%edi 10d919: 0f be 74 37 01 movsbl 0x1(%edi,%esi,1),%esi 10d91e: 81 e6 97 00 00 00 and $0x97,%esi 10d924: 75 02 jne 10d928 <_Objects_Get_name_as_string+0xb4> 10d926: b2 2a mov $0x2a,%dl 10d928: 88 11 mov %dl,(%ecx) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10d92a: 40 inc %eax 10d92b: 41 inc %ecx 10d92c: 3b 45 d4 cmp -0x2c(%ebp),%eax 10d92f: 72 d7 jb 10d908 <_Objects_Get_name_as_string+0x94> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 10d931: c6 01 00 movb $0x0,(%ecx) _Thread_Enable_dispatch(); 10d934: e8 e3 0a 00 00 call 10e41c <_Thread_Enable_dispatch> return name; 10d939: e9 4e ff ff ff jmp 10d88c <_Objects_Get_name_as_string+0x18> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10d93e: 89 d9 mov %ebx,%ecx 10d940: eb ef jmp 10d931 <_Objects_Get_name_as_string+0xbd> =============================================================================== 0010c2f4 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 10c2f4: 55 push %ebp 10c2f5: 89 e5 mov %esp,%ebp 10c2f7: 57 push %edi 10c2f8: 56 push %esi 10c2f9: 53 push %ebx 10c2fa: 83 ec 0c sub $0xc,%esp 10c2fd: 8b 5d 08 mov 0x8(%ebp),%ebx 10c300: 8b 75 0c mov 0xc(%ebp),%esi 10c303: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Control *object; Objects_Id next_id; if ( !information ) 10c306: 85 db test %ebx,%ebx 10c308: 75 0a jne 10c314 <_Objects_Get_next+0x20> if ( !location_p ) return NULL; if ( !next_id_p ) return NULL; 10c30a: 31 c0 xor %eax,%eax return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 10c30c: 8d 65 f4 lea -0xc(%ebp),%esp 10c30f: 5b pop %ebx 10c310: 5e pop %esi 10c311: 5f pop %edi 10c312: c9 leave 10c313: c3 ret Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 10c314: 85 ff test %edi,%edi 10c316: 74 f2 je 10c30a <_Objects_Get_next+0x16> return NULL; if ( !next_id_p ) 10c318: 8b 45 14 mov 0x14(%ebp),%eax 10c31b: 85 c0 test %eax,%eax 10c31d: 74 eb je 10c30a <_Objects_Get_next+0x16> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 10c31f: 66 85 f6 test %si,%si 10c322: 75 04 jne 10c328 <_Objects_Get_next+0x34> next_id = information->minimum_id; 10c324: 8b 73 08 mov 0x8(%ebx),%esi 10c327: 90 nop else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 10c328: 66 39 73 10 cmp %si,0x10(%ebx) 10c32c: 72 22 jb 10c350 <_Objects_Get_next+0x5c> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 10c32e: 51 push %ecx 10c32f: 57 push %edi 10c330: 56 push %esi 10c331: 53 push %ebx 10c332: e8 2d 00 00 00 call 10c364 <_Objects_Get> next_id++; 10c337: 46 inc %esi } while (*location_p != OBJECTS_LOCAL); 10c338: 83 c4 10 add $0x10,%esp 10c33b: 8b 17 mov (%edi),%edx 10c33d: 85 d2 test %edx,%edx 10c33f: 75 e7 jne 10c328 <_Objects_Get_next+0x34> *next_id_p = next_id; 10c341: 8b 55 14 mov 0x14(%ebp),%edx 10c344: 89 32 mov %esi,(%edx) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 10c346: 8d 65 f4 lea -0xc(%ebp),%esp 10c349: 5b pop %ebx 10c34a: 5e pop %esi 10c34b: 5f pop %edi 10c34c: c9 leave 10c34d: c3 ret 10c34e: 66 90 xchg %ax,%ax do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 10c350: c7 07 01 00 00 00 movl $0x1,(%edi) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 10c356: 8b 45 14 mov 0x14(%ebp),%eax 10c359: c7 00 ff ff ff ff movl $0xffffffff,(%eax) return 0; 10c35f: 31 c0 xor %eax,%eax 10c361: eb a9 jmp 10c30c <_Objects_Get_next+0x18> =============================================================================== 0011a788 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 11a788: 55 push %ebp 11a789: 89 e5 mov %esp,%ebp 11a78b: 53 push %ebx 11a78c: 8b 55 08 mov 0x8(%ebp),%edx 11a78f: 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; 11a792: b8 01 00 00 00 mov $0x1,%eax 11a797: 2b 42 08 sub 0x8(%edx),%eax 11a79a: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 11a79d: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 11a7a1: 39 c8 cmp %ecx,%eax 11a7a3: 77 13 ja 11a7b8 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 11a7a5: 8b 52 1c mov 0x1c(%edx),%edx 11a7a8: 8b 04 82 mov (%edx,%eax,4),%eax 11a7ab: 85 c0 test %eax,%eax 11a7ad: 74 09 je 11a7b8 <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 11a7af: 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; } 11a7b5: 5b pop %ebx 11a7b6: c9 leave 11a7b7: 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; 11a7b8: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 11a7be: 31 c0 xor %eax,%eax } 11a7c0: 5b pop %ebx 11a7c1: c9 leave 11a7c2: c3 ret =============================================================================== 0010d458 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10d458: 55 push %ebp 10d459: 89 e5 mov %esp,%ebp 10d45b: 83 ec 18 sub $0x18,%esp 10d45e: 8b 55 08 mov 0x8(%ebp),%edx /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10d461: 85 d2 test %edx,%edx 10d463: 75 08 jne 10d46d <_Objects_Id_to_name+0x15> 10d465: a1 58 87 12 00 mov 0x128758,%eax 10d46a: 8b 50 08 mov 0x8(%eax),%edx 10d46d: 89 d0 mov %edx,%eax 10d46f: c1 e8 18 shr $0x18,%eax 10d472: 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 ) 10d475: 8d 48 ff lea -0x1(%eax),%ecx 10d478: 83 f9 02 cmp $0x2,%ecx 10d47b: 77 3b ja 10d4b8 <_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 ] ) 10d47d: 8b 04 85 a4 84 12 00 mov 0x1284a4(,%eax,4),%eax 10d484: 85 c0 test %eax,%eax 10d486: 74 30 je 10d4b8 <_Objects_Id_to_name+0x60> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10d488: 89 d1 mov %edx,%ecx 10d48a: c1 e9 1b shr $0x1b,%ecx return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10d48d: 8b 04 88 mov (%eax,%ecx,4),%eax if ( !information ) 10d490: 85 c0 test %eax,%eax 10d492: 74 24 je 10d4b8 <_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 ); 10d494: 51 push %ecx 10d495: 8d 4d f4 lea -0xc(%ebp),%ecx 10d498: 51 push %ecx 10d499: 52 push %edx 10d49a: 50 push %eax 10d49b: e8 50 ff ff ff call 10d3f0 <_Objects_Get> if ( !the_object ) 10d4a0: 83 c4 10 add $0x10,%esp 10d4a3: 85 c0 test %eax,%eax 10d4a5: 74 11 je 10d4b8 <_Objects_Id_to_name+0x60> return OBJECTS_INVALID_ID; *name = the_object->name; 10d4a7: 8b 50 0c mov 0xc(%eax),%edx 10d4aa: 8b 45 0c mov 0xc(%ebp),%eax 10d4ad: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10d4af: e8 f4 0a 00 00 call 10dfa8 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10d4b4: 31 c0 xor %eax,%eax } 10d4b6: c9 leave 10d4b7: 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; 10d4b8: 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; } 10d4bd: c9 leave 10d4be: c3 ret =============================================================================== 0010c2f4 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10c2f4: 55 push %ebp 10c2f5: 89 e5 mov %esp,%ebp 10c2f7: 57 push %edi 10c2f8: 56 push %esi 10c2f9: 53 push %ebx 10c2fa: 8b 45 08 mov 0x8(%ebp),%eax 10c2fd: 8b 4d 0c mov 0xc(%ebp),%ecx 10c300: 8b 55 10 mov 0x10(%ebp),%edx 10c303: 8b 7d 14 mov 0x14(%ebp),%edi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10c306: 85 ff test %edi,%edi 10c308: 74 56 je 10c360 <_Objects_Name_to_id_u32+0x6c> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10c30a: 85 c9 test %ecx,%ecx 10c30c: 74 08 je 10c316 <_Objects_Name_to_id_u32+0x22> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10c30e: 8b 70 10 mov 0x10(%eax),%esi 10c311: 66 85 f6 test %si,%si 10c314: 75 0a jne 10c320 <_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; 10c316: b8 01 00 00 00 mov $0x1,%eax #endif } 10c31b: 5b pop %ebx 10c31c: 5e pop %esi 10c31d: 5f pop %edi 10c31e: c9 leave 10c31f: c3 ret if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10c320: 85 d2 test %edx,%edx 10c322: 75 20 jne 10c344 <_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++ ) { 10c324: 0f b7 f6 movzwl %si,%esi 10c327: 8b 58 1c mov 0x1c(%eax),%ebx 10c32a: b8 01 00 00 00 mov $0x1,%eax 10c32f: 90 nop the_object = information->local_table[ index ]; 10c330: 8b 14 83 mov (%ebx,%eax,4),%edx if ( !the_object ) 10c333: 85 d2 test %edx,%edx 10c335: 74 05 je 10c33c <_Objects_Name_to_id_u32+0x48> continue; if ( name == the_object->name.name_u32 ) { 10c337: 39 4a 0c cmp %ecx,0xc(%edx) 10c33a: 74 18 je 10c354 <_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++ ) { 10c33c: 40 inc %eax 10c33d: 39 c6 cmp %eax,%esi 10c33f: 73 ef jae 10c330 <_Objects_Name_to_id_u32+0x3c> 10c341: eb d3 jmp 10c316 <_Objects_Name_to_id_u32+0x22> 10c343: 90 nop return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && (node == OBJECTS_SEARCH_ALL_NODES || 10c344: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10c34a: 74 d8 je 10c324 <_Objects_Name_to_id_u32+0x30> node == OBJECTS_SEARCH_LOCAL_NODE || 10c34c: 4a dec %edx 10c34d: 75 c7 jne 10c316 <_Objects_Name_to_id_u32+0x22> 10c34f: eb d3 jmp 10c324 <_Objects_Name_to_id_u32+0x30> 10c351: 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; 10c354: 8b 42 08 mov 0x8(%edx),%eax 10c357: 89 07 mov %eax,(%edi) return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10c359: 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 } 10c35b: 5b pop %ebx 10c35c: 5e pop %esi 10c35d: 5f pop %edi 10c35e: c9 leave 10c35f: c3 ret #endif /* ASSERT: information->is_string == false */ if ( !id ) return OBJECTS_INVALID_ADDRESS; 10c360: 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 } 10c365: 5b pop %ebx 10c366: 5e pop %esi 10c367: 5f pop %edi 10c368: c9 leave 10c369: c3 ret =============================================================================== 0010e294 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10e294: 55 push %ebp 10e295: 89 e5 mov %esp,%ebp 10e297: 53 push %ebx 10e298: 83 ec 0c sub $0xc,%esp 10e29b: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10e29e: 8b 45 08 mov 0x8(%ebp),%eax 10e2a1: 0f b7 40 38 movzwl 0x38(%eax),%eax 10e2a5: 50 push %eax 10e2a6: 53 push %ebx 10e2a7: e8 3c 6d 00 00 call 114fe8 d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10e2ac: 0f be 0b movsbl (%ebx),%ecx 10e2af: c1 e1 18 shl $0x18,%ecx 10e2b2: 83 c4 10 add $0x10,%esp 10e2b5: 83 f8 01 cmp $0x1,%eax 10e2b8: 76 32 jbe 10e2ec <_Objects_Set_name+0x58> 10e2ba: 0f be 53 01 movsbl 0x1(%ebx),%edx 10e2be: c1 e2 10 shl $0x10,%edx 10e2c1: 09 ca or %ecx,%edx 10e2c3: 83 f8 02 cmp $0x2,%eax 10e2c6: 74 2c je 10e2f4 <_Objects_Set_name+0x60> 10e2c8: 0f be 4b 02 movsbl 0x2(%ebx),%ecx 10e2cc: c1 e1 08 shl $0x8,%ecx 10e2cf: 09 d1 or %edx,%ecx 10e2d1: 83 f8 03 cmp $0x3,%eax 10e2d4: 74 37 je 10e30d <_Objects_Set_name+0x79> 10e2d6: 0f be 43 03 movsbl 0x3(%ebx),%eax 10e2da: 09 c1 or %eax,%ecx 10e2dc: 8b 55 0c mov 0xc(%ebp),%edx 10e2df: 89 4a 0c mov %ecx,0xc(%edx) ); } return true; } 10e2e2: b0 01 mov $0x1,%al 10e2e4: 8b 5d fc mov -0x4(%ebp),%ebx 10e2e7: c9 leave 10e2e8: c3 ret 10e2e9: 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( 10e2ec: 89 ca mov %ecx,%edx 10e2ee: 81 ca 00 00 20 00 or $0x200000,%edx 10e2f4: 89 d1 mov %edx,%ecx 10e2f6: 80 cd 20 or $0x20,%ch 10e2f9: b8 20 00 00 00 mov $0x20,%eax 10e2fe: 09 c1 or %eax,%ecx 10e300: 8b 55 0c mov 0xc(%ebp),%edx 10e303: 89 4a 0c mov %ecx,0xc(%edx) ); } return true; } 10e306: b0 01 mov $0x1,%al 10e308: 8b 5d fc mov -0x4(%ebp),%ebx 10e30b: c9 leave 10e30c: c3 ret d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10e30d: b8 20 00 00 00 mov $0x20,%eax 10e312: eb c6 jmp 10e2da <_Objects_Set_name+0x46> =============================================================================== 0010c36c <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10c36c: 55 push %ebp 10c36d: 89 e5 mov %esp,%ebp 10c36f: 57 push %edi 10c370: 56 push %esi 10c371: 53 push %ebx 10c372: 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 ); 10c375: 8b 45 08 mov 0x8(%ebp),%eax 10c378: 0f b7 58 08 movzwl 0x8(%eax),%ebx block_count = (information->maximum - index_base) / 10c37c: 0f b7 48 14 movzwl 0x14(%eax),%ecx 10c380: 0f b7 40 10 movzwl 0x10(%eax),%eax 10c384: 29 d8 sub %ebx,%eax 10c386: 31 d2 xor %edx,%edx 10c388: f7 f1 div %ecx information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10c38a: 85 c0 test %eax,%eax 10c38c: 74 21 je 10c3af <_Objects_Shrink_information+0x43><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 10c38e: 8b 55 08 mov 0x8(%ebp),%edx 10c391: 8b 72 30 mov 0x30(%edx),%esi 10c394: 3b 0e cmp (%esi),%ecx 10c396: 74 1f je 10c3b7 <_Objects_Shrink_information+0x4b><== NEVER TAKEN 10c398: 31 d2 xor %edx,%edx 10c39a: eb 0e jmp 10c3aa <_Objects_Shrink_information+0x3e> information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 10c39c: 01 cb add %ecx,%ebx 10c39e: 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 ] == 10c3a5: 3b 0c 96 cmp (%esi,%edx,4),%ecx 10c3a8: 74 12 je 10c3bc <_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++ ) { 10c3aa: 42 inc %edx 10c3ab: 39 d0 cmp %edx,%eax 10c3ad: 77 ed ja 10c39c <_Objects_Shrink_information+0x30> return; } index_base += information->allocation_size; } } 10c3af: 8d 65 f4 lea -0xc(%ebp),%esp 10c3b2: 5b pop %ebx 10c3b3: 5e pop %esi 10c3b4: 5f pop %edi 10c3b5: c9 leave 10c3b6: 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 ] == 10c3b7: 31 ff xor %edi,%edi <== NOT EXECUTED 10c3b9: 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 ); 10c3bc: 8b 55 08 mov 0x8(%ebp),%edx 10c3bf: 8b 42 20 mov 0x20(%edx),%eax 10c3c2: 89 7d e4 mov %edi,-0x1c(%ebp) 10c3c5: eb 07 jmp 10c3ce <_Objects_Shrink_information+0x62> 10c3c7: 90 nop if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 10c3c8: 85 f6 test %esi,%esi 10c3ca: 74 2c je 10c3f8 <_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; 10c3cc: 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 ); 10c3ce: 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; 10c3d2: 8b 30 mov (%eax),%esi if ((index >= index_base) && 10c3d4: 39 da cmp %ebx,%edx 10c3d6: 72 f0 jb 10c3c8 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { 10c3d8: 8b 7d 08 mov 0x8(%ebp),%edi 10c3db: 0f b7 4f 14 movzwl 0x14(%edi),%ecx 10c3df: 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) && 10c3e2: 39 ca cmp %ecx,%edx 10c3e4: 73 e2 jae 10c3c8 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 10c3e6: 83 ec 0c sub $0xc,%esp 10c3e9: 50 push %eax 10c3ea: e8 b9 f0 ff ff call 10b4a8 <_Chain_Extract> 10c3ef: 83 c4 10 add $0x10,%esp } } while ( the_object ); 10c3f2: 85 f6 test %esi,%esi 10c3f4: 75 d6 jne 10c3cc <_Objects_Shrink_information+0x60> 10c3f6: 66 90 xchg %ax,%ax 10c3f8: 8b 7d e4 mov -0x1c(%ebp),%edi /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10c3fb: 83 ec 0c sub $0xc,%esp 10c3fe: 8b 55 08 mov 0x8(%ebp),%edx 10c401: 8b 42 34 mov 0x34(%edx),%eax 10c404: ff 34 38 pushl (%eax,%edi,1) 10c407: e8 80 18 00 00 call 10dc8c <_Workspace_Free> information->object_blocks[ block ] = NULL; 10c40c: 8b 55 08 mov 0x8(%ebp),%edx 10c40f: 8b 42 34 mov 0x34(%edx),%eax 10c412: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) information->inactive_per_block[ block ] = 0; 10c419: 8b 42 30 mov 0x30(%edx),%eax 10c41c: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) information->inactive -= information->allocation_size; 10c423: 8b 42 14 mov 0x14(%edx),%eax 10c426: 66 29 42 2c sub %ax,0x2c(%edx) return; 10c42a: 83 c4 10 add $0x10,%esp } index_base += information->allocation_size; } } 10c42d: 8d 65 f4 lea -0xc(%ebp),%esp 10c430: 5b pop %ebx 10c431: 5e pop %esi 10c432: 5f pop %edi 10c433: c9 leave 10c434: c3 ret =============================================================================== 0010cb1c <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 10cb1c: 55 push %ebp 10cb1d: 89 e5 mov %esp,%ebp 10cb1f: 56 push %esi 10cb20: 53 push %ebx 10cb21: 8b 5d 08 mov 0x8(%ebp),%ebx 10cb24: 8b 75 0c mov 0xc(%ebp),%esi if ( !the_heap ) 10cb27: 85 db test %ebx,%ebx 10cb29: 74 35 je 10cb60 <_Protected_heap_Get_information+0x44> return false; if ( !the_info ) 10cb2b: 85 f6 test %esi,%esi 10cb2d: 74 31 je 10cb60 <_Protected_heap_Get_information+0x44> return false; _RTEMS_Lock_allocator(); 10cb2f: 83 ec 0c sub $0xc,%esp 10cb32: ff 35 c0 65 12 00 pushl 0x1265c0 10cb38: e8 bf ef ff ff call 10bafc <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 10cb3d: 5a pop %edx 10cb3e: 59 pop %ecx 10cb3f: 56 push %esi 10cb40: 53 push %ebx 10cb41: e8 0a 44 00 00 call 110f50 <_Heap_Get_information> _RTEMS_Unlock_allocator(); 10cb46: 58 pop %eax 10cb47: ff 35 c0 65 12 00 pushl 0x1265c0 10cb4d: e8 f2 ef ff ff call 10bb44 <_API_Mutex_Unlock> return true; 10cb52: 83 c4 10 add $0x10,%esp 10cb55: b0 01 mov $0x1,%al } 10cb57: 8d 65 f8 lea -0x8(%ebp),%esp 10cb5a: 5b pop %ebx 10cb5b: 5e pop %esi 10cb5c: c9 leave 10cb5d: c3 ret 10cb5e: 66 90 xchg %ax,%ax { if ( !the_heap ) return false; if ( !the_info ) return false; 10cb60: 31 c0 xor %eax,%eax _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); return true; } 10cb62: 8d 65 f8 lea -0x8(%ebp),%esp 10cb65: 5b pop %ebx 10cb66: 5e pop %esi 10cb67: c9 leave 10cb68: c3 ret =============================================================================== 0010ffc4 <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 10ffc4: 55 push %ebp 10ffc5: 89 e5 mov %esp,%ebp 10ffc7: 56 push %esi 10ffc8: 53 push %ebx 10ffc9: 83 ec 10 sub $0x10,%esp 10ffcc: 8b 5d 08 mov 0x8(%ebp),%ebx 10ffcf: 8b 75 0c mov 0xc(%ebp),%esi 10ffd2: 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 ) { 10ffd5: 8b 15 cc d5 12 00 mov 0x12d5cc,%edx 10ffdb: 85 d2 test %edx,%edx 10ffdd: 74 19 je 10fff8 <_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 ); 10ffdf: 0f b6 c0 movzbl %al,%eax 10ffe2: 89 45 10 mov %eax,0x10(%ebp) 10ffe5: 89 75 0c mov %esi,0xc(%ebp) 10ffe8: 89 5d 08 mov %ebx,0x8(%ebp) } return status; } 10ffeb: 8d 65 f8 lea -0x8(%ebp),%esp 10ffee: 5b pop %ebx 10ffef: 5e pop %esi 10fff0: 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 ); 10fff1: e9 5a f2 ff ff jmp 10f250 <_Heap_Walk> 10fff6: 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(); 10fff8: 83 ec 0c sub $0xc,%esp 10fffb: ff 35 80 d6 12 00 pushl 0x12d680 110001: 88 45 f4 mov %al,-0xc(%ebp) 110004: e8 0b e5 ff ff call 10e514 <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 110009: 83 c4 0c add $0xc,%esp 11000c: 8a 45 f4 mov -0xc(%ebp),%al 11000f: 0f b6 c0 movzbl %al,%eax 110012: 50 push %eax 110013: 56 push %esi 110014: 53 push %ebx 110015: e8 36 f2 ff ff call 10f250 <_Heap_Walk> _RTEMS_Unlock_allocator(); 11001a: 5a pop %edx 11001b: ff 35 80 d6 12 00 pushl 0x12d680 110021: 88 45 f4 mov %al,-0xc(%ebp) 110024: e8 33 e5 ff ff call 10e55c <_API_Mutex_Unlock> 110029: 83 c4 10 add $0x10,%esp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 11002c: 8a 45 f4 mov -0xc(%ebp),%al 11002f: 8d 65 f8 lea -0x8(%ebp),%esp 110032: 5b pop %ebx 110033: 5e pop %esi 110034: c9 leave 110035: c3 ret =============================================================================== 0010fc3c <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 10fc3c: 55 push %ebp 10fc3d: 89 e5 mov %esp,%ebp 10fc3f: 53 push %ebx 10fc40: 83 ec 10 sub $0x10,%esp 10fc43: 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 ); 10fc46: 80 3d c4 22 12 00 01 cmpb $0x1,0x1222c4 10fc4d: 19 c0 sbb %eax,%eax 10fc4f: 83 e0 c0 and $0xffffffc0,%eax 10fc52: 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 ); 10fc55: 50 push %eax 10fc56: e8 15 e0 ff ff call 10dc70 <_Workspace_Allocate> if ( !api ) 10fc5b: 83 c4 10 add $0x10,%esp 10fc5e: 85 c0 test %eax,%eax 10fc60: 74 6a je 10fccc <_RTEMS_tasks_Create_extension+0x90> return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 10fc62: 89 83 e4 00 00 00 mov %eax,0xe4(%ebx) api->pending_events = EVENT_SETS_NONE_PENDING; 10fc68: c7 00 00 00 00 00 movl $0x0,(%eax) api->event_condition = 0; 10fc6e: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 10fc75: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 10fc79: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 10fc80: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 10fc87: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 10fc8e: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 10fc95: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 10fc9c: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10fca3: 00 00 00 if ( rtems_configuration_get_notepads_enabled() ) { 10fca6: 80 3d c4 22 12 00 00 cmpb $0x0,0x1222c4 10fcad: 74 13 je 10fcc2 <_RTEMS_tasks_Create_extension+0x86> 10fcaf: 31 d2 xor %edx,%edx 10fcb1: 8d 76 00 lea 0x0(%esi),%esi for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 10fcb4: c7 44 90 20 00 00 00 movl $0x0,0x20(%eax,%edx,4) 10fcbb: 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++) 10fcbc: 42 inc %edx 10fcbd: 83 fa 10 cmp $0x10,%edx 10fcc0: 75 f2 jne 10fcb4 <_RTEMS_tasks_Create_extension+0x78> api->Notepads[i] = 0; } return true; 10fcc2: b0 01 mov $0x1,%al } 10fcc4: 8b 5d fc mov -0x4(%ebp),%ebx 10fcc7: c9 leave 10fcc8: c3 ret 10fcc9: 8d 76 00 lea 0x0(%esi),%esi to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); if ( !api ) return false; 10fccc: 31 c0 xor %eax,%eax for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } 10fcce: 8b 5d fc mov -0x4(%ebp),%ebx 10fcd1: c9 leave 10fcd2: c3 ret =============================================================================== 0010fbe4 <_RTEMS_tasks_Delete_extension>: void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { 10fbe4: 55 push %ebp 10fbe5: 89 e5 mov %esp,%ebp 10fbe7: 56 push %esi 10fbe8: 53 push %ebx 10fbe9: 8b 75 0c mov 0xc(%ebp),%esi /* * Free per task variable memory */ tvp = deleted->task_variables; 10fbec: 8b 86 f0 00 00 00 mov 0xf0(%esi),%eax deleted->task_variables = NULL; 10fbf2: c7 86 f0 00 00 00 00 movl $0x0,0xf0(%esi) 10fbf9: 00 00 00 while (tvp) { 10fbfc: 85 c0 test %eax,%eax 10fbfe: 75 06 jne 10fc06 <_RTEMS_tasks_Delete_extension+0x22> 10fc00: eb 17 jmp 10fc19 <_RTEMS_tasks_Delete_extension+0x35> 10fc02: 66 90 xchg %ax,%ax next = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); tvp = next; 10fc04: 89 d8 mov %ebx,%eax */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { next = (rtems_task_variable_t *)tvp->next; 10fc06: 8b 18 mov (%eax),%ebx _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 10fc08: 83 ec 08 sub $0x8,%esp 10fc0b: 50 push %eax 10fc0c: 56 push %esi 10fc0d: e8 56 01 00 00 call 10fd68 <_RTEMS_Tasks_Invoke_task_variable_dtor> * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 10fc12: 83 c4 10 add $0x10,%esp 10fc15: 85 db test %ebx,%ebx 10fc17: 75 eb jne 10fc04 <_RTEMS_tasks_Delete_extension+0x20> /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); 10fc19: 83 ec 0c sub $0xc,%esp 10fc1c: ff b6 e4 00 00 00 pushl 0xe4(%esi) 10fc22: e8 65 e0 ff ff call 10dc8c <_Workspace_Free> deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; 10fc27: c7 86 e4 00 00 00 00 movl $0x0,0xe4(%esi) 10fc2e: 00 00 00 10fc31: 83 c4 10 add $0x10,%esp } 10fc34: 8d 65 f8 lea -0x8(%ebp),%esp 10fc37: 5b pop %ebx 10fc38: 5e pop %esi 10fc39: c9 leave 10fc3a: c3 ret =============================================================================== 0010fb68 <_RTEMS_tasks_Initialize_user_tasks>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks( void ) { 10fb68: 55 push %ebp 10fb69: 89 e5 mov %esp,%ebp 10fb6b: 83 ec 08 sub $0x8,%esp if ( _RTEMS_tasks_Initialize_user_tasks_p ) 10fb6e: a1 40 23 12 00 mov 0x122340,%eax 10fb73: 85 c0 test %eax,%eax 10fb75: 74 05 je 10fb7c <_RTEMS_tasks_Initialize_user_tasks+0x14> (*_RTEMS_tasks_Initialize_user_tasks_p)(); } 10fb77: c9 leave */ void _RTEMS_tasks_Initialize_user_tasks( void ) { if ( _RTEMS_tasks_Initialize_user_tasks_p ) (*_RTEMS_tasks_Initialize_user_tasks_p)(); 10fb78: ff e0 jmp *%eax 10fb7a: 66 90 xchg %ax,%ax } 10fb7c: c9 leave 10fb7d: c3 ret =============================================================================== 0010af78 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 10af78: 55 push %ebp 10af79: 89 e5 mov %esp,%ebp 10af7b: 57 push %edi 10af7c: 56 push %esi 10af7d: 53 push %ebx 10af7e: 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; 10af81: 8b 1d ec 22 12 00 mov 0x1222ec,%ebx maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 10af87: 8b 3d e8 22 12 00 mov 0x1222e8,%edi /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 10af8d: 85 db test %ebx,%ebx 10af8f: 74 46 je 10afd7 <_RTEMS_tasks_Initialize_user_tasks_body+0x5f> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10af91: 85 ff test %edi,%edi 10af93: 74 42 je 10afd7 <_RTEMS_tasks_Initialize_user_tasks_body+0x5f><== NEVER TAKEN 10af95: 31 f6 xor %esi,%esi 10af97: 90 nop return_value = rtems_task_create( 10af98: 83 ec 08 sub $0x8,%esp 10af9b: 8d 45 e4 lea -0x1c(%ebp),%eax 10af9e: 50 push %eax 10af9f: ff 73 0c pushl 0xc(%ebx) 10afa2: ff 73 14 pushl 0x14(%ebx) 10afa5: ff 73 04 pushl 0x4(%ebx) 10afa8: ff 73 08 pushl 0x8(%ebx) 10afab: ff 33 pushl (%ebx) 10afad: e8 92 fd ff ff call 10ad44 user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 10afb2: 83 c4 20 add $0x20,%esp 10afb5: 85 c0 test %eax,%eax 10afb7: 75 26 jne 10afdf <_RTEMS_tasks_Initialize_user_tasks_body+0x67> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 10afb9: 51 push %ecx 10afba: ff 73 18 pushl 0x18(%ebx) 10afbd: ff 73 10 pushl 0x10(%ebx) 10afc0: ff 75 e4 pushl -0x1c(%ebp) 10afc3: e8 24 00 00 00 call 10afec id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 10afc8: 83 c4 10 add $0x10,%esp 10afcb: 85 c0 test %eax,%eax 10afcd: 75 10 jne 10afdf <_RTEMS_tasks_Initialize_user_tasks_body+0x67> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10afcf: 46 inc %esi 10afd0: 83 c3 1c add $0x1c,%ebx 10afd3: 39 f7 cmp %esi,%edi 10afd5: 77 c1 ja 10af98 <_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 ); } } 10afd7: 8d 65 f4 lea -0xc(%ebp),%esp 10afda: 5b pop %ebx 10afdb: 5e pop %esi 10afdc: 5f pop %edi 10afdd: c9 leave 10afde: 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 ); 10afdf: 52 push %edx 10afe0: 50 push %eax 10afe1: 6a 01 push $0x1 10afe3: 6a 01 push $0x1 10afe5: e8 7e 0c 00 00 call 10bc68 <_Internal_error_Occurred> =============================================================================== 0010fb80 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 10fb80: 55 push %ebp 10fb81: 89 e5 mov %esp,%ebp 10fb83: 57 push %edi 10fb84: 56 push %esi 10fb85: 53 push %ebx 10fb86: 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 ]; 10fb89: 8b 45 08 mov 0x8(%ebp),%eax 10fb8c: 8b 98 e4 00 00 00 mov 0xe4(%eax),%ebx if ( !api ) 10fb92: 85 db test %ebx,%ebx 10fb94: 74 45 je 10fbdb <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 10fb96: 9c pushf 10fb97: fa cli 10fb98: 58 pop %eax signal_set = asr->signals_posted; 10fb99: 8b 73 14 mov 0x14(%ebx),%esi asr->signals_posted = 0; 10fb9c: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 10fba3: 50 push %eax 10fba4: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 10fba5: 85 f6 test %esi,%esi 10fba7: 74 32 je 10fbdb <_RTEMS_tasks_Post_switch_extension+0x5b> return; asr->nest_level += 1; 10fba9: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10fbac: 50 push %eax 10fbad: 8d 7d e4 lea -0x1c(%ebp),%edi 10fbb0: 57 push %edi 10fbb1: 68 ff ff 00 00 push $0xffff 10fbb6: ff 73 10 pushl 0x10(%ebx) 10fbb9: e8 be 1d 00 00 call 11197c (*asr->handler)( signal_set ); 10fbbe: 89 34 24 mov %esi,(%esp) 10fbc1: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 10fbc4: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10fbc7: 83 c4 0c add $0xc,%esp 10fbca: 57 push %edi 10fbcb: 68 ff ff 00 00 push $0xffff 10fbd0: ff 75 e4 pushl -0x1c(%ebp) 10fbd3: e8 a4 1d 00 00 call 11197c 10fbd8: 83 c4 10 add $0x10,%esp } 10fbdb: 8d 65 f4 lea -0xc(%ebp),%esp 10fbde: 5b pop %ebx 10fbdf: 5e pop %esi 10fbe0: 5f pop %edi 10fbe1: c9 leave 10fbe2: c3 ret =============================================================================== 0010fb20 <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 10fb20: 55 push %ebp 10fb21: 89 e5 mov %esp,%ebp /* * Per Task Variables */ tvp = executing->task_variables; 10fb23: 8b 45 08 mov 0x8(%ebp),%eax 10fb26: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax while (tvp) { 10fb2c: 85 c0 test %eax,%eax 10fb2e: 74 13 je 10fb43 <_RTEMS_tasks_Switch_extension+0x23> tvp->tval = *tvp->ptr; 10fb30: 8b 50 04 mov 0x4(%eax),%edx 10fb33: 8b 0a mov (%edx),%ecx 10fb35: 89 48 0c mov %ecx,0xc(%eax) *tvp->ptr = tvp->gval; 10fb38: 8b 48 08 mov 0x8(%eax),%ecx 10fb3b: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 10fb3d: 8b 00 mov (%eax),%eax /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 10fb3f: 85 c0 test %eax,%eax 10fb41: 75 ed jne 10fb30 <_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; 10fb43: 8b 45 0c mov 0xc(%ebp),%eax 10fb46: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax while (tvp) { 10fb4c: 85 c0 test %eax,%eax 10fb4e: 74 13 je 10fb63 <_RTEMS_tasks_Switch_extension+0x43> tvp->gval = *tvp->ptr; 10fb50: 8b 50 04 mov 0x4(%eax),%edx 10fb53: 8b 0a mov (%edx),%ecx 10fb55: 89 48 08 mov %ecx,0x8(%eax) *tvp->ptr = tvp->tval; 10fb58: 8b 48 0c mov 0xc(%eax),%ecx 10fb5b: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 10fb5d: 8b 00 mov (%eax),%eax *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 10fb5f: 85 c0 test %eax,%eax 10fb61: 75 ed jne 10fb50 <_RTEMS_tasks_Switch_extension+0x30><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 10fb63: c9 leave 10fb64: c3 ret =============================================================================== 0010b9d8 <_Rate_monotonic_Initiate_statistics>: } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { 10b9d8: 55 push %ebp 10b9d9: 89 e5 mov %esp,%ebp 10b9db: 57 push %edi 10b9dc: 56 push %esi 10b9dd: 53 push %ebx 10b9de: 83 ec 28 sub $0x28,%esp 10b9e1: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *owning_thread = the_period->owner; 10b9e4: 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 ); 10b9e7: 8d 7d e0 lea -0x20(%ebp),%edi 10b9ea: 57 push %edi 10b9eb: e8 14 17 00 00 call 10d104 <_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; 10b9f0: 8b 45 e0 mov -0x20(%ebp),%eax 10b9f3: 8b 55 e4 mov -0x1c(%ebp),%edx 10b9f6: 89 43 4c mov %eax,0x4c(%ebx) 10b9f9: 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; 10b9fc: 8b 86 84 00 00 00 mov 0x84(%esi),%eax 10ba02: 8b 96 88 00 00 00 mov 0x88(%esi),%edx 10ba08: 89 43 44 mov %eax,0x44(%ebx) 10ba0b: 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) { 10ba0e: 83 c4 10 add $0x10,%esp 10ba11: 39 35 18 88 12 00 cmp %esi,0x128818 10ba17: 74 0b je 10ba24 <_Rate_monotonic_Initiate_statistics+0x4c> ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); } #endif } 10ba19: 8d 65 f4 lea -0xc(%ebp),%esp 10ba1c: 5b pop %ebx 10ba1d: 5e pop %esi 10ba1e: 5f pop %edi 10ba1f: c9 leave 10ba20: c3 ret 10ba21: 8d 76 00 lea 0x0(%esi),%esi /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 10ba24: 50 push %eax &_Thread_Time_of_last_context_switch, &uptime, &ran 10ba25: 8d 75 d8 lea -0x28(%ebp),%esi /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 10ba28: 56 push %esi 10ba29: 57 push %edi 10ba2a: 68 4c 86 12 00 push $0x12864c 10ba2f: e8 88 37 00 00 call 10f1bc <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); 10ba34: 59 pop %ecx 10ba35: 5f pop %edi 10ba36: 56 push %esi 10ba37: 83 c3 44 add $0x44,%ebx 10ba3a: 53 push %ebx 10ba3b: e8 80 36 00 00 call 10f0c0 <_Timespec_Add_to> 10ba40: 83 c4 10 add $0x10,%esp } #endif } 10ba43: 8d 65 f4 lea -0xc(%ebp),%esp 10ba46: 5b pop %ebx 10ba47: 5e pop %esi 10ba48: 5f pop %edi 10ba49: c9 leave 10ba4a: c3 ret =============================================================================== 0010bf94 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 10bf94: 55 push %ebp 10bf95: 89 e5 mov %esp,%ebp 10bf97: 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 ); 10bf9a: 8d 45 f4 lea -0xc(%ebp),%eax 10bf9d: 50 push %eax 10bf9e: ff 75 08 pushl 0x8(%ebp) 10bfa1: 68 a0 84 12 00 push $0x1284a0 10bfa6: e8 d5 1b 00 00 call 10db80 <_Objects_Get> switch ( location ) { 10bfab: 83 c4 10 add $0x10,%esp 10bfae: 8b 55 f4 mov -0xc(%ebp),%edx 10bfb1: 85 d2 test %edx,%edx 10bfb3: 75 29 jne 10bfde <_Rate_monotonic_Timeout+0x4a><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 10bfb5: 8b 50 40 mov 0x40(%eax),%edx if ( _States_Is_waiting_for_period( the_thread->current_state ) && 10bfb8: f6 42 11 40 testb $0x40,0x11(%edx) 10bfbc: 74 08 je 10bfc6 <_Rate_monotonic_Timeout+0x32> 10bfbe: 8b 48 08 mov 0x8(%eax),%ecx 10bfc1: 39 4a 20 cmp %ecx,0x20(%edx) 10bfc4: 74 4e je 10c014 <_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 ) { 10bfc6: 83 78 38 01 cmpl $0x1,0x38(%eax) 10bfca: 74 14 je 10bfe0 <_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; 10bfcc: 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; 10bfd3: a1 8c 85 12 00 mov 0x12858c,%eax 10bfd8: 48 dec %eax 10bfd9: a3 8c 85 12 00 mov %eax,0x12858c case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10bfde: c9 leave 10bfdf: 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; 10bfe0: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax) _Rate_monotonic_Initiate_statistics( the_period ); 10bfe7: 83 ec 0c sub $0xc,%esp 10bfea: 50 push %eax 10bfeb: 89 45 e4 mov %eax,-0x1c(%ebp) 10bfee: e8 e5 f9 ff ff call 10b9d8 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10bff3: 8b 45 e4 mov -0x1c(%ebp),%eax 10bff6: 8b 50 3c mov 0x3c(%eax),%edx 10bff9: 89 50 1c mov %edx,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10bffc: 5a pop %edx 10bffd: 59 pop %ecx _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); 10bffe: 83 c0 10 add $0x10,%eax 10c001: 50 push %eax 10c002: 68 60 86 12 00 push $0x128660 10c007: e8 90 34 00 00 call 10f49c <_Watchdog_Insert> 10c00c: 83 c4 10 add $0x10,%esp 10c00f: eb c2 jmp 10bfd3 <_Rate_monotonic_Timeout+0x3f> 10c011: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10c014: 83 ec 08 sub $0x8,%esp 10c017: 68 f8 ff 03 10 push $0x1003fff8 10c01c: 52 push %edx 10c01d: 89 45 e4 mov %eax,-0x1c(%ebp) 10c020: e8 47 23 00 00 call 10e36c <_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 ); 10c025: 8b 45 e4 mov -0x1c(%ebp),%eax 10c028: 89 04 24 mov %eax,(%esp) 10c02b: eb c1 jmp 10bfee <_Rate_monotonic_Timeout+0x5a> =============================================================================== 0010ba4c <_Rate_monotonic_Update_statistics>: void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 10ba4c: 55 push %ebp 10ba4d: 89 e5 mov %esp,%ebp 10ba4f: 57 push %edi 10ba50: 56 push %esi 10ba51: 53 push %ebx 10ba52: 83 ec 1c sub $0x1c,%esp 10ba55: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 10ba58: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 10ba5b: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 10ba5f: 0f 84 bf 00 00 00 je 10bb24 <_Rate_monotonic_Update_statistics+0xd8> stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10ba65: 51 push %ecx _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 10ba66: 8d 7d e0 lea -0x20(%ebp),%edi stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10ba69: 57 push %edi _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 10ba6a: 8d 75 d8 lea -0x28(%ebp),%esi stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10ba6d: 56 push %esi 10ba6e: 53 push %ebx 10ba6f: e8 cc fe ff ff call 10b940 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) 10ba74: 83 c4 10 add $0x10,%esp 10ba77: 84 c0 test %al,%al 10ba79: 75 09 jne 10ba84 <_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 } 10ba7b: 8d 65 f4 lea -0xc(%ebp),%esp 10ba7e: 5b pop %ebx 10ba7f: 5e pop %esi 10ba80: 5f pop %edi 10ba81: c9 leave 10ba82: c3 ret 10ba83: 90 nop /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 10ba84: 83 ec 08 sub $0x8,%esp 10ba87: 57 push %edi 10ba88: 8d 43 6c lea 0x6c(%ebx),%eax 10ba8b: 50 push %eax 10ba8c: e8 2f 36 00 00 call 10f0c0 <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 10ba91: 58 pop %eax 10ba92: 5a pop %edx 10ba93: 8d 43 5c lea 0x5c(%ebx),%eax 10ba96: 50 push %eax 10ba97: 57 push %edi 10ba98: e8 fb 36 00 00 call 10f198 <_Timespec_Less_than> 10ba9d: 83 c4 10 add $0x10,%esp 10baa0: 84 c0 test %al,%al 10baa2: 74 0c je 10bab0 <_Rate_monotonic_Update_statistics+0x64> stats->min_cpu_time = executed; 10baa4: 8b 45 e0 mov -0x20(%ebp),%eax 10baa7: 8b 55 e4 mov -0x1c(%ebp),%edx 10baaa: 89 43 5c mov %eax,0x5c(%ebx) 10baad: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 10bab0: 83 ec 08 sub $0x8,%esp 10bab3: 8d 43 64 lea 0x64(%ebx),%eax 10bab6: 50 push %eax 10bab7: 57 push %edi 10bab8: e8 b7 36 00 00 call 10f174 <_Timespec_Greater_than> 10babd: 83 c4 10 add $0x10,%esp 10bac0: 84 c0 test %al,%al 10bac2: 74 0c je 10bad0 <_Rate_monotonic_Update_statistics+0x84> stats->max_cpu_time = executed; 10bac4: 8b 45 e0 mov -0x20(%ebp),%eax 10bac7: 8b 55 e4 mov -0x1c(%ebp),%edx 10baca: 89 43 64 mov %eax,0x64(%ebx) 10bacd: 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 ); 10bad0: 83 ec 08 sub $0x8,%esp 10bad3: 56 push %esi 10bad4: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10bada: 50 push %eax 10badb: e8 e0 35 00 00 call 10f0c0 <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 10bae0: 5a pop %edx 10bae1: 59 pop %ecx 10bae2: 8d 43 74 lea 0x74(%ebx),%eax 10bae5: 50 push %eax 10bae6: 56 push %esi 10bae7: e8 ac 36 00 00 call 10f198 <_Timespec_Less_than> 10baec: 83 c4 10 add $0x10,%esp 10baef: 84 c0 test %al,%al 10baf1: 75 39 jne 10bb2c <_Rate_monotonic_Update_statistics+0xe0> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 10baf3: 83 ec 08 sub $0x8,%esp 10baf6: 8d 43 7c lea 0x7c(%ebx),%eax 10baf9: 50 push %eax 10bafa: 56 push %esi 10bafb: e8 74 36 00 00 call 10f174 <_Timespec_Greater_than> 10bb00: 83 c4 10 add $0x10,%esp 10bb03: 84 c0 test %al,%al 10bb05: 0f 84 70 ff ff ff je 10ba7b <_Rate_monotonic_Update_statistics+0x2f> stats->max_wall_time = since_last_period; 10bb0b: 8b 45 d8 mov -0x28(%ebp),%eax 10bb0e: 8b 55 dc mov -0x24(%ebp),%edx 10bb11: 89 43 7c mov %eax,0x7c(%ebx) 10bb14: 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 } 10bb1a: 8d 65 f4 lea -0xc(%ebp),%esp 10bb1d: 5b pop %ebx 10bb1e: 5e pop %esi 10bb1f: 5f pop %edi 10bb20: c9 leave 10bb21: c3 ret 10bb22: 66 90 xchg %ax,%ax */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 10bb24: ff 43 58 incl 0x58(%ebx) 10bb27: e9 39 ff ff ff jmp 10ba65 <_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; 10bb2c: 8b 45 d8 mov -0x28(%ebp),%eax 10bb2f: 8b 55 dc mov -0x24(%ebp),%edx 10bb32: 89 43 74 mov %eax,0x74(%ebx) 10bb35: 89 53 78 mov %edx,0x78(%ebx) 10bb38: eb b9 jmp 10baf3 <_Rate_monotonic_Update_statistics+0xa7> =============================================================================== 0010c4d8 <_Scheduler_priority_Block>: #include void _Scheduler_priority_Block( Thread_Control *the_thread ) { 10c4d8: 55 push %ebp 10c4d9: 89 e5 mov %esp,%ebp 10c4db: 53 push %ebx 10c4dc: 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; 10c4df: 8b 88 8c 00 00 00 mov 0x8c(%eax),%ecx ready = sched_info->ready_chain; 10c4e5: 8b 11 mov (%ecx),%edx if ( _Chain_Has_only_one_node( ready ) ) { 10c4e7: 8b 5a 08 mov 0x8(%edx),%ebx 10c4ea: 39 1a cmp %ebx,(%edx) 10c4ec: 74 6e je 10c55c <_Scheduler_priority_Block+0x84> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10c4ee: 8b 08 mov (%eax),%ecx previous = the_node->previous; 10c4f0: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10c4f3: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 10c4f6: 89 0a mov %ecx,(%edx) _Scheduler_priority_Ready_queue_extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) 10c4f8: 3b 05 7c 67 12 00 cmp 0x12677c,%eax 10c4fe: 74 18 je 10c518 <_Scheduler_priority_Block+0x40> _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) 10c500: 3b 05 78 67 12 00 cmp 0x126778,%eax 10c506: 74 04 je 10c50c <_Scheduler_priority_Block+0x34> _Thread_Dispatch_necessary = true; } 10c508: 5b pop %ebx 10c509: c9 leave 10c50a: c3 ret 10c50b: 90 nop if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 10c50c: c6 05 84 67 12 00 01 movb $0x1,0x126784 } 10c513: 5b pop %ebx 10c514: c9 leave 10c515: c3 ret 10c516: 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 ); 10c518: 66 8b 1d a0 67 12 00 mov 0x1267a0,%bx 10c51f: 31 d2 xor %edx,%edx 10c521: 89 d1 mov %edx,%ecx 10c523: 66 0f bc cb bsf %bx,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10c527: 0f b7 c9 movzwl %cx,%ecx 10c52a: 66 8b 9c 09 c0 67 12 mov 0x1267c0(%ecx,%ecx,1),%bx 10c531: 00 10c532: 66 0f bc d3 bsf %bx,%dx return (_Priority_Bits_index( major ) << 4) + 10c536: c1 e1 04 shl $0x4,%ecx 10c539: 0f b7 d2 movzwl %dx,%edx 10c53c: 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 ] ) ) 10c53f: 8d 14 52 lea (%edx,%edx,2),%edx 10c542: c1 e2 02 shl $0x2,%edx 10c545: 03 15 00 22 12 00 add 0x122200,%edx 10c54b: 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 ); 10c54d: 83 c2 04 add $0x4,%edx 10c550: 39 d1 cmp %edx,%ecx 10c552: 74 44 je 10c598 <_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( 10c554: 89 0d 7c 67 12 00 mov %ecx,0x12677c 10c55a: eb a4 jmp 10c500 <_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 ); 10c55c: 8d 5a 04 lea 0x4(%edx),%ebx 10c55f: 89 1a mov %ebx,(%edx) head->next = tail; head->previous = NULL; 10c561: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) tail->previous = head; 10c568: 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; 10c56b: 8b 59 04 mov 0x4(%ecx),%ebx 10c56e: 66 8b 13 mov (%ebx),%dx 10c571: 66 23 51 0e and 0xe(%ecx),%dx 10c575: 66 89 13 mov %dx,(%ebx) if ( *the_priority_map->minor == 0 ) 10c578: 66 85 d2 test %dx,%dx 10c57b: 0f 85 77 ff ff ff jne 10c4f8 <_Scheduler_priority_Block+0x20> _Priority_Major_bit_map &= the_priority_map->block_major; 10c581: 66 8b 15 a0 67 12 00 mov 0x1267a0,%dx 10c588: 23 51 0c and 0xc(%ecx),%edx 10c58b: 66 89 15 a0 67 12 00 mov %dx,0x1267a0 10c592: e9 61 ff ff ff jmp 10c4f8 <_Scheduler_priority_Block+0x20> 10c597: 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; 10c598: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 10c59a: eb b8 jmp 10c554 <_Scheduler_priority_Block+0x7c><== NOT EXECUTED =============================================================================== 0010c6ec <_Scheduler_priority_Schedule>: #include #include #include void _Scheduler_priority_Schedule(void) { 10c6ec: 55 push %ebp 10c6ed: 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 ); 10c6ef: 66 8b 0d a0 67 12 00 mov 0x1267a0,%cx 10c6f6: 31 c0 xor %eax,%eax 10c6f8: 89 c2 mov %eax,%edx 10c6fa: 66 0f bc d1 bsf %cx,%dx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10c6fe: 0f b7 d2 movzwl %dx,%edx 10c701: 66 8b 8c 12 c0 67 12 mov 0x1267c0(%edx,%edx,1),%cx 10c708: 00 10c709: 66 0f bc c1 bsf %cx,%ax return (_Priority_Bits_index( major ) << 4) + 10c70d: c1 e2 04 shl $0x4,%edx 10c710: 0f b7 c0 movzwl %ax,%eax 10c713: 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 ] ) ) 10c716: 8d 04 40 lea (%eax,%eax,2),%eax 10c719: c1 e0 02 shl $0x2,%eax 10c71c: 03 05 00 22 12 00 add 0x122200,%eax _Scheduler_priority_Schedule_body(); } 10c722: 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 ); 10c724: 83 c0 04 add $0x4,%eax 10c727: 39 c2 cmp %eax,%edx 10c729: 74 09 je 10c734 <_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( 10c72b: 89 15 7c 67 12 00 mov %edx,0x12677c 10c731: c9 leave 10c732: c3 ret 10c733: 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; 10c734: 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( 10c736: 89 15 7c 67 12 00 mov %edx,0x12677c <== NOT EXECUTED 10c73c: c9 leave <== NOT EXECUTED 10c73d: c3 ret <== NOT EXECUTED =============================================================================== 0010c810 <_Scheduler_priority_Yield>: * ready chain * select heir */ void _Scheduler_priority_Yield(void) { 10c810: 55 push %ebp 10c811: 89 e5 mov %esp,%ebp 10c813: 56 push %esi 10c814: 53 push %ebx Scheduler_priority_Per_thread *sched_info; ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10c815: a1 78 67 12 00 mov 0x126778,%eax sched_info = (Scheduler_priority_Per_thread *) executing->scheduler_info; ready = sched_info->ready_chain; 10c81a: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx 10c820: 8b 12 mov (%edx),%edx _ISR_Disable( level ); 10c822: 9c pushf 10c823: fa cli 10c824: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10c825: 8b 5a 08 mov 0x8(%edx),%ebx 10c828: 39 1a cmp %ebx,(%edx) 10c82a: 74 40 je 10c86c <_Scheduler_priority_Yield+0x5c> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10c82c: 8b 30 mov (%eax),%esi previous = the_node->previous; 10c82e: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10c831: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10c834: 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; 10c836: 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 ); 10c839: 8d 72 04 lea 0x4(%edx),%esi 10c83c: 89 30 mov %esi,(%eax) Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; 10c83e: 89 42 08 mov %eax,0x8(%edx) old_last->next = the_node; 10c841: 89 03 mov %eax,(%ebx) the_node->previous = old_last; 10c843: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10c846: 51 push %ecx 10c847: 9d popf 10c848: fa cli if ( _Thread_Is_heir( executing ) ) 10c849: 3b 05 7c 67 12 00 cmp 0x12677c,%eax 10c84f: 74 0f je 10c860 <_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; 10c851: c6 05 84 67 12 00 01 movb $0x1,0x126784 _ISR_Enable( level ); 10c858: 51 push %ecx 10c859: 9d popf } 10c85a: 5b pop %ebx 10c85b: 5e pop %esi 10c85c: c9 leave 10c85d: c3 ret 10c85e: 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 ); 10c860: 8b 02 mov (%edx),%eax 10c862: a3 7c 67 12 00 mov %eax,0x12677c 10c867: eb e8 jmp 10c851 <_Scheduler_priority_Yield+0x41> 10c869: 8d 76 00 lea 0x0(%esi),%esi _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10c86c: 3b 05 7c 67 12 00 cmp 0x12677c,%eax 10c872: 75 dd jne 10c851 <_Scheduler_priority_Yield+0x41><== NEVER TAKEN 10c874: eb e2 jmp 10c858 <_Scheduler_priority_Yield+0x48> =============================================================================== 0010caa4 <_Scheduler_simple_Ready_queue_Enqueue>: #include void _Scheduler_simple_Ready_queue_Enqueue( Thread_Control *the_thread ) { 10caa4: 55 push %ebp 10caa5: 89 e5 mov %esp,%ebp 10caa7: 56 push %esi 10caa8: 53 push %ebx 10caa9: 8b 75 08 mov 0x8(%ebp),%esi Chain_Control *ready; Chain_Node *the_node; Thread_Control *current; ready = (Chain_Control *)_Scheduler.information; 10caac: 8b 15 60 21 12 00 mov 0x122160,%edx } } /* enqueue */ _Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node ); } 10cab2: 8b 02 mov (%edx),%eax RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 10cab4: 8d 4a 04 lea 0x4(%edx),%ecx ready = (Chain_Control *)_Scheduler.information; the_node = _Chain_First( ready ); current = (Thread_Control *)ready; for ( ; !_Chain_Is_tail( ready, the_node ) ; the_node = the_node->next ) { 10cab7: 39 c8 cmp %ecx,%eax 10cab9: 74 1a je 10cad5 <_Scheduler_simple_Ready_queue_Enqueue+0x31> current = (Thread_Control *) the_node; 10cabb: 89 c2 mov %eax,%edx /* break when AT END OR PAST our priority */ if ( the_thread->current_priority < current->current_priority ) { 10cabd: 8b 5e 14 mov 0x14(%esi),%ebx 10cac0: 3b 58 14 cmp 0x14(%eax),%ebx 10cac3: 73 0a jae 10cacf <_Scheduler_simple_Ready_queue_Enqueue+0x2b> 10cac5: eb 21 jmp 10cae8 <_Scheduler_simple_Ready_queue_Enqueue+0x44> 10cac7: 90 nop ready = (Chain_Control *)_Scheduler.information; the_node = _Chain_First( ready ); current = (Thread_Control *)ready; for ( ; !_Chain_Is_tail( ready, the_node ) ; the_node = the_node->next ) { current = (Thread_Control *) the_node; 10cac8: 89 c2 mov %eax,%edx /* break when AT END OR PAST our priority */ if ( the_thread->current_priority < current->current_priority ) { 10caca: 39 58 14 cmp %ebx,0x14(%eax) 10cacd: 77 19 ja 10cae8 <_Scheduler_simple_Ready_queue_Enqueue+0x44> ready = (Chain_Control *)_Scheduler.information; the_node = _Chain_First( ready ); current = (Thread_Control *)ready; for ( ; !_Chain_Is_tail( ready, the_node ) ; the_node = the_node->next ) { 10cacf: 8b 00 mov (%eax),%eax 10cad1: 39 c8 cmp %ecx,%eax 10cad3: 75 f3 jne 10cac8 <_Scheduler_simple_Ready_queue_Enqueue+0x24> Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10cad5: 89 56 04 mov %edx,0x4(%esi) before_node = after_node->next; 10cad8: 8b 02 mov (%edx),%eax after_node->next = the_node; 10cada: 89 32 mov %esi,(%edx) the_node->next = before_node; 10cadc: 89 06 mov %eax,(%esi) before_node->previous = the_node; 10cade: 89 70 04 mov %esi,0x4(%eax) } } /* enqueue */ _Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node ); } 10cae1: 5b pop %ebx 10cae2: 5e pop %esi 10cae3: c9 leave 10cae4: c3 ret 10cae5: 8d 76 00 lea 0x0(%esi),%esi for ( ; !_Chain_Is_tail( ready, the_node ) ; the_node = the_node->next ) { current = (Thread_Control *) the_node; /* break when AT END OR PAST our priority */ if ( the_thread->current_priority < current->current_priority ) { current = (Thread_Control *)current->Object.Node.previous; 10cae8: 8b 50 04 mov 0x4(%eax),%edx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10caeb: 89 56 04 mov %edx,0x4(%esi) before_node = after_node->next; 10caee: 8b 02 mov (%edx),%eax after_node->next = the_node; 10caf0: 89 32 mov %esi,(%edx) the_node->next = before_node; 10caf2: 89 06 mov %eax,(%esi) before_node->previous = the_node; 10caf4: 89 70 04 mov %esi,0x4(%eax) } } /* enqueue */ _Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node ); } 10caf7: 5b pop %ebx 10caf8: 5e pop %esi 10caf9: c9 leave 10cafa: c3 ret =============================================================================== 0010ca74 <_Scheduler_simple_Ready_queue_Enqueue_first>: #include void _Scheduler_simple_Ready_queue_Enqueue_first( Thread_Control *the_thread ) { 10ca74: 55 push %ebp 10ca75: 89 e5 mov %esp,%ebp 10ca77: 8b 4d 08 mov 0x8(%ebp),%ecx } } /* enqueue */ _Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node ); } 10ca7a: a1 60 21 12 00 mov 0x122160,%eax 10ca7f: 8b 00 mov (%eax),%eax */ for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) { current = (Thread_Control *) the_node; /* break when AT HEAD OF (or PAST) our priority */ if ( the_thread->current_priority <= current->current_priority ) { 10ca81: 8b 51 14 mov 0x14(%ecx),%edx 10ca84: 3b 50 14 cmp 0x14(%eax),%edx 10ca87: 76 0a jbe 10ca93 <_Scheduler_simple_Ready_queue_Enqueue_first+0x1f> 10ca89: 8d 76 00 lea 0x0(%esi),%esi * Do NOT need to check for end of chain because there is always * at least one task on the ready chain -- the IDLE task. It can * never block, should never attempt to obtain a semaphore or mutex, * and thus will always be there. */ for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) { 10ca8c: 8b 00 mov (%eax),%eax current = (Thread_Control *) the_node; /* break when AT HEAD OF (or PAST) our priority */ if ( the_thread->current_priority <= current->current_priority ) { 10ca8e: 39 50 14 cmp %edx,0x14(%eax) 10ca91: 72 f9 jb 10ca8c <_Scheduler_simple_Ready_queue_Enqueue_first+0x18><== NEVER TAKEN current = (Thread_Control *)current->Object.Node.previous; 10ca93: 8b 40 04 mov 0x4(%eax),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10ca96: 89 41 04 mov %eax,0x4(%ecx) before_node = after_node->next; 10ca99: 8b 10 mov (%eax),%edx after_node->next = the_node; 10ca9b: 89 08 mov %ecx,(%eax) the_node->next = before_node; 10ca9d: 89 11 mov %edx,(%ecx) before_node->previous = the_node; 10ca9f: 89 4a 04 mov %ecx,0x4(%edx) } } /* enqueue */ _Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node ); } 10caa2: c9 leave 10caa3: c3 ret =============================================================================== 0010ce7c <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 10ce7c: 55 push %ebp 10ce7d: 89 e5 mov %esp,%ebp 10ce7f: 53 push %ebx 10ce80: 83 ec 04 sub $0x4,%esp 10ce83: 8b 5d 08 mov 0x8(%ebp),%ebx 10ce86: a1 cc 98 12 00 mov 0x1298cc,%eax 10ce8b: 40 inc %eax 10ce8c: a3 cc 98 12 00 mov %eax,0x1298cc long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 10ce91: a1 68 99 12 00 mov 0x129968,%eax if ( time->tv_sec < seconds ) 10ce96: 8b 13 mov (%ebx),%edx 10ce98: 39 d0 cmp %edx,%eax 10ce9a: 7f 34 jg 10ced0 <_TOD_Set+0x54> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 10ce9c: 51 push %ecx _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); 10ce9d: 29 c2 sub %eax,%edx 10ce9f: 52 push %edx 10cea0: 6a 00 push $0x0 10cea2: 68 94 99 12 00 push $0x129994 10cea7: e8 7c 23 00 00 call 10f228 <_Watchdog_Adjust> 10ceac: 83 c4 10 add $0x10,%esp /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 10ceaf: 8b 03 mov (%ebx),%eax 10ceb1: a3 68 99 12 00 mov %eax,0x129968 10ceb6: 8b 43 04 mov 0x4(%ebx),%eax 10ceb9: a3 6c 99 12 00 mov %eax,0x12996c _TOD_Is_set = true; 10cebe: c6 05 dc 98 12 00 01 movb $0x1,0x1298dc _TOD_Activate(); _Thread_Enable_dispatch(); } 10cec5: 8b 5d fc mov -0x4(%ebp),%ebx 10cec8: c9 leave _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); 10cec9: e9 4e 15 00 00 jmp 10e41c <_Thread_Enable_dispatch> 10cece: 66 90 xchg %ax,%ax 10ced0: 51 push %ecx _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); if ( time->tv_sec < seconds ) _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); 10ced1: 29 d0 sub %edx,%eax 10ced3: 50 push %eax 10ced4: 6a 01 push $0x1 10ced6: 68 94 99 12 00 push $0x129994 10cedb: e8 48 23 00 00 call 10f228 <_Watchdog_Adjust> 10cee0: 83 c4 10 add $0x10,%esp 10cee3: eb ca jmp 10ceaf <_TOD_Set+0x33> =============================================================================== 0010b888 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 10b888: 55 push %ebp 10b889: 89 e5 mov %esp,%ebp 10b88b: 53 push %ebx 10b88c: 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() ); 10b88f: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 10b896: a1 0c 23 12 00 mov 0x12230c,%eax 10b89b: 8d 04 80 lea (%eax,%eax,4),%eax 10b89e: 8d 04 80 lea (%eax,%eax,4),%eax 10b8a1: 8d 04 80 lea (%eax,%eax,4),%eax 10b8a4: c1 e0 03 shl $0x3,%eax 10b8a7: 89 45 f4 mov %eax,-0xc(%ebp) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 10b8aa: a1 24 66 12 00 mov 0x126624,%eax 10b8af: 40 inc %eax 10b8b0: a3 24 66 12 00 mov %eax,0x126624 /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 10b8b5: 8d 5d f0 lea -0x10(%ebp),%ebx 10b8b8: 53 push %ebx 10b8b9: 68 78 65 12 00 push $0x126578 10b8be: e8 29 1e 00 00 call 10d6ec <_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 ); 10b8c3: 58 pop %eax 10b8c4: 5a pop %edx 10b8c5: 53 push %ebx 10b8c6: 68 88 65 12 00 push $0x126588 10b8cb: e8 1c 1e 00 00 call 10d6ec <_Timespec_Add_to> 10b8d0: 89 c3 mov %eax,%ebx while ( seconds ) { 10b8d2: 83 c4 10 add $0x10,%esp 10b8d5: 85 c0 test %eax,%eax 10b8d7: 74 16 je 10b8ef <_TOD_Tickle_ticks+0x67> 10b8d9: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 10b8dc: 83 ec 0c sub $0xc,%esp 10b8df: 68 b4 65 12 00 push $0x1265b4 10b8e4: e8 cb 22 00 00 call 10dbb4 <_Watchdog_Tickle> 10b8e9: 83 c4 10 add $0x10,%esp 10b8ec: 4b dec %ebx 10b8ed: 75 ed jne 10b8dc <_TOD_Tickle_ticks+0x54><== NEVER TAKEN _Watchdog_Tickle_seconds(); seconds--; } } 10b8ef: 8b 5d fc mov -0x4(%ebp),%ebx 10b8f2: c9 leave 10b8f3: c3 ret =============================================================================== 0010b7bc <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 10b7bc: 55 push %ebp 10b7bd: 89 e5 mov %esp,%ebp 10b7bf: 56 push %esi 10b7c0: 53 push %ebx 10b7c1: 8b 55 08 mov 0x8(%ebp),%edx uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 10b7c4: 8b 72 08 mov 0x8(%edx),%esi 10b7c7: 4e dec %esi year_mod_4 = the_tod->year & 3; 10b7c8: 8b 02 mov (%edx),%eax if ( year_mod_4 == 0 ) 10b7ca: 89 c3 mov %eax,%ebx 10b7cc: 83 e3 03 and $0x3,%ebx 10b7cf: 74 67 je 10b838 <_TOD_To_seconds+0x7c> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 10b7d1: 8b 4a 04 mov 0x4(%edx),%ecx 10b7d4: 0f b7 8c 09 c0 27 12 movzwl 0x1227c0(%ecx,%ecx,1),%ecx 10b7db: 00 10b7dc: 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 ]; 10b7df: 0f b7 8c 1b f4 27 12 movzwl 0x1227f4(%ebx,%ebx,1),%ecx 10b7e6: 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 ) * 10b7e7: 2d c4 07 00 00 sub $0x7c4,%eax 10b7ec: c1 e8 02 shr $0x2,%eax 10b7ef: 8d 1c c0 lea (%eax,%eax,8),%ebx 10b7f2: 8d 1c d8 lea (%eax,%ebx,8),%ebx 10b7f5: 8d 1c 9b lea (%ebx,%ebx,4),%ebx 10b7f8: 8d 04 98 lea (%eax,%ebx,4),%eax 10b7fb: 01 c1 add %eax,%ecx ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10b7fd: 01 f1 add %esi,%ecx time *= TOD_SECONDS_PER_DAY; 10b7ff: 8d 04 89 lea (%ecx,%ecx,4),%eax 10b802: 8d 04 81 lea (%ecx,%eax,4),%eax 10b805: 8d 04 c1 lea (%ecx,%eax,8),%eax 10b808: c1 e0 02 shl $0x2,%eax 10b80b: 29 c8 sub %ecx,%eax 10b80d: c1 e0 07 shl $0x7,%eax time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 10b810: 8b 5a 14 mov 0x14(%edx),%ebx 10b813: 8b 4a 0c mov 0xc(%edx),%ecx 10b816: 8d 0c 49 lea (%ecx,%ecx,2),%ecx 10b819: 8d 0c 89 lea (%ecx,%ecx,4),%ecx 10b81c: c1 e1 02 shl $0x2,%ecx 10b81f: 03 4a 10 add 0x10(%edx),%ecx * TOD_SECONDS_PER_MINUTE; 10b822: 8d 14 49 lea (%ecx,%ecx,2),%edx 10b825: 8d 14 92 lea (%edx,%edx,4),%edx time += the_tod->second; 10b828: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx time += TOD_SECONDS_1970_THROUGH_1988; 10b82f: 8d 04 02 lea (%edx,%eax,1),%eax return( time ); } 10b832: 5b pop %ebx 10b833: 5e pop %esi 10b834: c9 leave 10b835: c3 ret 10b836: 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 ]; 10b838: 8b 4a 04 mov 0x4(%edx),%ecx 10b83b: 0f b7 8c 09 da 27 12 movzwl 0x1227da(%ecx,%ecx,1),%ecx 10b842: 00 10b843: 8d 34 31 lea (%ecx,%esi,1),%esi 10b846: eb 97 jmp 10b7df <_TOD_To_seconds+0x23> =============================================================================== 0010b848 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10b848: 55 push %ebp 10b849: 89 e5 mov %esp,%ebp 10b84b: 53 push %ebx 10b84c: 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(); 10b84f: 8b 1d 6c 52 12 00 mov 0x12526c,%ebx if ((!the_tod) || 10b855: 85 c9 test %ecx,%ecx 10b857: 74 53 je 10b8ac <_TOD_Validate+0x64> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 10b859: b8 40 42 0f 00 mov $0xf4240,%eax 10b85e: 31 d2 xor %edx,%edx 10b860: f7 f3 div %ebx rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10b862: 3b 41 18 cmp 0x18(%ecx),%eax 10b865: 76 45 jbe 10b8ac <_TOD_Validate+0x64> (the_tod->ticks >= ticks_per_second) || 10b867: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10b86b: 77 3f ja 10b8ac <_TOD_Validate+0x64> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10b86d: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10b871: 77 39 ja 10b8ac <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10b873: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10b877: 77 33 ja 10b8ac <_TOD_Validate+0x64> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 10b879: 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) || 10b87c: 85 c0 test %eax,%eax 10b87e: 74 2c je 10b8ac <_TOD_Validate+0x64> <== NEVER TAKEN (the_tod->month == 0) || 10b880: 83 f8 0c cmp $0xc,%eax 10b883: 77 27 ja 10b8ac <_TOD_Validate+0x64> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10b885: 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) || 10b887: 81 fa c3 07 00 00 cmp $0x7c3,%edx 10b88d: 76 1d jbe 10b8ac <_TOD_Validate+0x64> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10b88f: 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) || 10b892: 85 c9 test %ecx,%ecx 10b894: 74 16 je 10b8ac <_TOD_Validate+0x64> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10b896: 83 e2 03 and $0x3,%edx 10b899: 75 16 jne 10b8b1 <_TOD_Validate+0x69> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10b89b: 8b 04 85 34 28 12 00 mov 0x122834(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10b8a2: 39 c8 cmp %ecx,%eax 10b8a4: 0f 93 c0 setae %al 10b8a7: eb 05 jmp 10b8ae <_TOD_Validate+0x66> 10b8a9: 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; 10b8ac: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10b8ae: 5b pop %ebx 10b8af: c9 leave 10b8b0: 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 ]; 10b8b1: 8b 04 85 00 28 12 00 mov 0x122800(,%eax,4),%eax 10b8b8: eb e8 jmp 10b8a2 <_TOD_Validate+0x5a> =============================================================================== 0010c8c4 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10c8c4: 55 push %ebp 10c8c5: 89 e5 mov %esp,%ebp 10c8c7: 57 push %edi 10c8c8: 56 push %esi 10c8c9: 53 push %ebx 10c8ca: 83 ec 28 sub $0x28,%esp 10c8cd: 8b 5d 08 mov 0x8(%ebp),%ebx 10c8d0: 8b 75 0c mov 0xc(%ebp),%esi 10c8d3: 8a 45 10 mov 0x10(%ebp),%al 10c8d6: 88 45 e7 mov %al,-0x19(%ebp) States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 10c8d9: 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 ); 10c8dc: 53 push %ebx 10c8dd: e8 4a 0c 00 00 call 10d52c <_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 ) 10c8e2: 83 c4 10 add $0x10,%esp 10c8e5: 39 73 14 cmp %esi,0x14(%ebx) 10c8e8: 74 0d je 10c8f7 <_Thread_Change_priority+0x33> _Thread_Set_priority( the_thread, new_priority ); 10c8ea: 83 ec 08 sub $0x8,%esp 10c8ed: 56 push %esi 10c8ee: 53 push %ebx 10c8ef: e8 e4 0b 00 00 call 10d4d8 <_Thread_Set_priority> 10c8f4: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10c8f7: 9c pushf 10c8f8: fa cli 10c8f9: 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; 10c8fa: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10c8fd: 83 f8 04 cmp $0x4,%eax 10c900: 74 22 je 10c924 <_Thread_Change_priority+0x60> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10c902: 83 e7 04 and $0x4,%edi 10c905: 74 11 je 10c918 <_Thread_Change_priority+0x54><== ALWAYS TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10c907: 56 push %esi 10c908: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10c909: a9 e0 be 03 00 test $0x3bee0,%eax 10c90e: 75 60 jne 10c970 <_Thread_Change_priority+0xac> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 10c910: 8d 65 f4 lea -0xc(%ebp),%esp 10c913: 5b pop %ebx 10c914: 5e pop %esi 10c915: 5f pop %edi 10c916: c9 leave 10c917: c3 ret RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10c918: 89 c2 mov %eax,%edx 10c91a: 83 e2 fb and $0xfffffffb,%edx 10c91d: 89 53 10 mov %edx,0x10(%ebx) 10c920: eb e5 jmp 10c907 <_Thread_Change_priority+0x43> 10c922: 66 90 xchg %ax,%ax } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10c924: 83 e7 04 and $0x4,%edi 10c927: 75 1a jne 10c943 <_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 ); 10c929: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) if ( prepend_it ) 10c930: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10c934: 74 52 je 10c988 <_Thread_Change_priority+0xc4> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 10c936: 83 ec 0c sub $0xc,%esp 10c939: 53 push %ebx 10c93a: ff 15 28 22 12 00 call *0x122228 10c940: 83 c4 10 add $0x10,%esp _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 10c943: 56 push %esi 10c944: 9d popf 10c945: 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(); 10c946: ff 15 08 22 12 00 call *0x122208 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10c94c: a1 78 67 12 00 mov 0x126778,%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() && 10c951: 3b 05 7c 67 12 00 cmp 0x12677c,%eax 10c957: 74 0d je 10c966 <_Thread_Change_priority+0xa2> 10c959: 80 78 74 00 cmpb $0x0,0x74(%eax) 10c95d: 74 07 je 10c966 <_Thread_Change_priority+0xa2> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 10c95f: c6 05 84 67 12 00 01 movb $0x1,0x126784 _ISR_Enable( level ); 10c966: 56 push %esi 10c967: 9d popf } 10c968: 8d 65 f4 lea -0xc(%ebp),%esp 10c96b: 5b pop %ebx 10c96c: 5e pop %esi 10c96d: 5f pop %edi 10c96e: c9 leave 10c96f: 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 ); 10c970: 89 5d 0c mov %ebx,0xc(%ebp) 10c973: 8b 43 44 mov 0x44(%ebx),%eax 10c976: 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 ); } 10c979: 8d 65 f4 lea -0xc(%ebp),%esp 10c97c: 5b pop %ebx 10c97d: 5e pop %esi 10c97e: 5f pop %edi 10c97f: 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 ); 10c980: e9 bb 0a 00 00 jmp 10d440 <_Thread_queue_Requeue> 10c985: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 10c988: 83 ec 0c sub $0xc,%esp 10c98b: 53 push %ebx 10c98c: ff 15 24 22 12 00 call *0x122224 10c992: 83 c4 10 add $0x10,%esp 10c995: eb ac jmp 10c943 <_Thread_Change_priority+0x7f> =============================================================================== 0010c998 <_Thread_Clear_state>: */ void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10c998: 55 push %ebp 10c999: 89 e5 mov %esp,%ebp 10c99b: 53 push %ebx 10c99c: 83 ec 04 sub $0x4,%esp 10c99f: 8b 55 08 mov 0x8(%ebp),%edx 10c9a2: 8b 45 0c mov 0xc(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10c9a5: 9c pushf 10c9a6: fa cli 10c9a7: 5b pop %ebx current_state = the_thread->current_state; 10c9a8: 8b 4a 10 mov 0x10(%edx),%ecx if ( current_state & state ) { 10c9ab: 85 c8 test %ecx,%eax 10c9ad: 74 0b je 10c9ba <_Thread_Clear_state+0x22> 10c9af: f7 d0 not %eax 10c9b1: 21 c8 and %ecx,%eax current_state = the_thread->current_state = _States_Clear( state, current_state ); 10c9b3: 89 42 10 mov %eax,0x10(%edx) if ( _States_Is_ready( current_state ) ) { 10c9b6: 85 c0 test %eax,%eax 10c9b8: 74 0a je 10c9c4 <_Thread_Clear_state+0x2c> _Scheduler_Unblock( the_thread ); } } _ISR_Enable( level ); 10c9ba: 53 push %ebx 10c9bb: 9d popf } 10c9bc: 8b 5d fc mov -0x4(%ebp),%ebx 10c9bf: c9 leave 10c9c0: c3 ret 10c9c1: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Scheduler_Unblock( Thread_Control *the_thread ) { _Scheduler.Operations.unblock( the_thread ); 10c9c4: 83 ec 0c sub $0xc,%esp 10c9c7: 52 push %edx 10c9c8: ff 15 14 22 12 00 call *0x122214 10c9ce: 83 c4 10 add $0x10,%esp 10c9d1: eb e7 jmp 10c9ba <_Thread_Clear_state+0x22> =============================================================================== 0010cb48 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10cb48: 55 push %ebp 10cb49: 89 e5 mov %esp,%ebp 10cb4b: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10cb4e: 8d 45 f4 lea -0xc(%ebp),%eax 10cb51: 50 push %eax 10cb52: ff 75 08 pushl 0x8(%ebp) 10cb55: e8 c6 01 00 00 call 10cd20 <_Thread_Get> switch ( location ) { 10cb5a: 83 c4 10 add $0x10,%esp 10cb5d: 8b 55 f4 mov -0xc(%ebp),%edx 10cb60: 85 d2 test %edx,%edx 10cb62: 75 1c jne 10cb80 <_Thread_Delay_ended+0x38><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10cb64: 83 ec 08 sub $0x8,%esp 10cb67: 68 18 00 00 10 push $0x10000018 10cb6c: 50 push %eax 10cb6d: e8 26 fe ff ff call 10c998 <_Thread_Clear_state> 10cb72: a1 ec 64 12 00 mov 0x1264ec,%eax 10cb77: 48 dec %eax 10cb78: a3 ec 64 12 00 mov %eax,0x1264ec 10cb7d: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10cb80: c9 leave 10cb81: c3 ret =============================================================================== 0010cb84 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10cb84: 55 push %ebp 10cb85: 89 e5 mov %esp,%ebp 10cb87: 57 push %edi 10cb88: 56 push %esi 10cb89: 53 push %ebx 10cb8a: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10cb8d: 8b 1d 78 67 12 00 mov 0x126778,%ebx _ISR_Disable( level ); 10cb93: 9c pushf 10cb94: fa cli 10cb95: 58 pop %eax while ( _Thread_Dispatch_necessary == true ) { 10cb96: 8a 15 84 67 12 00 mov 0x126784,%dl 10cb9c: 84 d2 test %dl,%dl 10cb9e: 0f 84 3c 01 00 00 je 10cce0 <_Thread_Dispatch+0x15c> heir = _Thread_Heir; 10cba4: 8b 35 7c 67 12 00 mov 0x12677c,%esi _Thread_Dispatch_disable_level = 1; 10cbaa: c7 05 ec 64 12 00 01 movl $0x1,0x1264ec 10cbb1: 00 00 00 _Thread_Dispatch_necessary = false; 10cbb4: c6 05 84 67 12 00 00 movb $0x0,0x126784 _Thread_Executing = heir; 10cbbb: 89 35 78 67 12 00 mov %esi,0x126778 /* * 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 ) 10cbc1: 39 f3 cmp %esi,%ebx 10cbc3: 0f 84 17 01 00 00 je 10cce0 <_Thread_Dispatch+0x15c> 10cbc9: 8d 7d d8 lea -0x28(%ebp),%edi 10cbcc: e9 f5 00 00 00 jmp 10ccc6 <_Thread_Dispatch+0x142> 10cbd1: 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 ); 10cbd4: 50 push %eax 10cbd5: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10cbd6: 83 ec 0c sub $0xc,%esp 10cbd9: 8d 45 e0 lea -0x20(%ebp),%eax 10cbdc: 50 push %eax 10cbdd: e8 46 36 00 00 call 110228 <_TOD_Get_uptime> _Timestamp_Subtract( 10cbe2: 83 c4 0c add $0xc,%esp 10cbe5: 57 push %edi 10cbe6: 8d 45 e0 lea -0x20(%ebp),%eax 10cbe9: 50 push %eax 10cbea: 68 ac 65 12 00 push $0x1265ac 10cbef: e8 34 0b 00 00 call 10d728 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10cbf4: 58 pop %eax 10cbf5: 5a pop %edx 10cbf6: 57 push %edi 10cbf7: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10cbfd: 50 push %eax 10cbfe: e8 e9 0a 00 00 call 10d6ec <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10cc03: 8b 45 e0 mov -0x20(%ebp),%eax 10cc06: 8b 55 e4 mov -0x1c(%ebp),%edx 10cc09: a3 ac 65 12 00 mov %eax,0x1265ac 10cc0e: 89 15 b0 65 12 00 mov %edx,0x1265b0 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10cc14: a1 84 65 12 00 mov 0x126584,%eax 10cc19: 83 c4 10 add $0x10,%esp 10cc1c: 85 c0 test %eax,%eax 10cc1e: 74 10 je 10cc30 <_Thread_Dispatch+0xac> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10cc20: 8b 10 mov (%eax),%edx 10cc22: 89 93 e0 00 00 00 mov %edx,0xe0(%ebx) *_Thread_libc_reent = heir->libc_reent; 10cc28: 8b 96 e0 00 00 00 mov 0xe0(%esi),%edx 10cc2e: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10cc30: 83 ec 08 sub $0x8,%esp 10cc33: 56 push %esi 10cc34: 53 push %ebx 10cc35: e8 8e 0d 00 00 call 10d9c8 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10cc3a: 5a pop %edx 10cc3b: 59 pop %ecx 10cc3c: 81 c6 c4 00 00 00 add $0xc4,%esi 10cc42: 56 push %esi 10cc43: 8d 83 c4 00 00 00 lea 0xc4(%ebx),%eax 10cc49: 50 push %eax 10cc4a: e8 81 10 00 00 call 10dcd0 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10cc4f: 83 c4 10 add $0x10,%esp 10cc52: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax 10cc58: 85 c0 test %eax,%eax 10cc5a: 74 36 je 10cc92 <_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 ); 10cc5c: a1 80 65 12 00 mov 0x126580,%eax 10cc61: 39 c3 cmp %eax,%ebx 10cc63: 74 2d je 10cc92 <_Thread_Dispatch+0x10e> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10cc65: 85 c0 test %eax,%eax 10cc67: 74 11 je 10cc7a <_Thread_Dispatch+0xf6> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10cc69: 83 ec 0c sub $0xc,%esp 10cc6c: 05 dc 00 00 00 add $0xdc,%eax 10cc71: 50 push %eax 10cc72: e8 8d 10 00 00 call 10dd04 <_CPU_Context_save_fp> 10cc77: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10cc7a: 83 ec 0c sub $0xc,%esp 10cc7d: 8d 83 dc 00 00 00 lea 0xdc(%ebx),%eax 10cc83: 50 push %eax 10cc84: e8 85 10 00 00 call 10dd0e <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10cc89: 89 1d 80 65 12 00 mov %ebx,0x126580 10cc8f: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10cc92: 8b 1d 78 67 12 00 mov 0x126778,%ebx _ISR_Disable( level ); 10cc98: 9c pushf 10cc99: fa cli 10cc9a: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 10cc9b: 8a 15 84 67 12 00 mov 0x126784,%dl 10cca1: 84 d2 test %dl,%dl 10cca3: 74 3b je 10cce0 <_Thread_Dispatch+0x15c> heir = _Thread_Heir; 10cca5: 8b 35 7c 67 12 00 mov 0x12677c,%esi _Thread_Dispatch_disable_level = 1; 10ccab: c7 05 ec 64 12 00 01 movl $0x1,0x1264ec 10ccb2: 00 00 00 _Thread_Dispatch_necessary = false; 10ccb5: c6 05 84 67 12 00 00 movb $0x0,0x126784 _Thread_Executing = heir; 10ccbc: 89 35 78 67 12 00 mov %esi,0x126778 /* * 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 ) 10ccc2: 39 de cmp %ebx,%esi 10ccc4: 74 1a je 10cce0 <_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 ) 10ccc6: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10ccca: 0f 85 04 ff ff ff jne 10cbd4 <_Thread_Dispatch+0x50> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10ccd0: 8b 15 c0 64 12 00 mov 0x1264c0,%edx 10ccd6: 89 56 78 mov %edx,0x78(%esi) 10ccd9: e9 f6 fe ff ff jmp 10cbd4 <_Thread_Dispatch+0x50> 10ccde: 66 90 xchg %ax,%ax _ISR_Disable( level ); } post_switch: _Thread_Dispatch_disable_level = 0; 10cce0: c7 05 ec 64 12 00 00 movl $0x0,0x1264ec 10cce7: 00 00 00 _ISR_Enable( level ); 10ccea: 50 push %eax 10cceb: 9d popf _API_extensions_Run_postswitch(); 10ccec: e8 83 e6 ff ff call 10b374 <_API_extensions_Run_postswitch> } 10ccf1: 8d 65 f4 lea -0xc(%ebp),%esp 10ccf4: 5b pop %ebx 10ccf5: 5e pop %esi 10ccf6: 5f pop %edi 10ccf7: c9 leave 10ccf8: c3 ret =============================================================================== 0010cd20 <_Thread_Get>: */ Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10cd20: 55 push %ebp 10cd21: 89 e5 mov %esp,%ebp 10cd23: 53 push %ebx 10cd24: 83 ec 04 sub $0x4,%esp 10cd27: 8b 45 08 mov 0x8(%ebp),%eax 10cd2a: 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 ) ) { 10cd2d: 85 c0 test %eax,%eax 10cd2f: 74 4b je 10cd7c <_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); 10cd31: 89 c2 mov %eax,%edx 10cd33: c1 ea 18 shr $0x18,%edx 10cd36: 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 ) 10cd39: 8d 5a ff lea -0x1(%edx),%ebx 10cd3c: 83 fb 02 cmp $0x2,%ebx 10cd3f: 77 2b ja 10cd6c <_Thread_Get+0x4c> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10cd41: 89 c3 mov %eax,%ebx 10cd43: 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 :) */ 10cd46: 4b dec %ebx 10cd47: 75 23 jne 10cd6c <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 10cd49: 8b 14 95 c4 64 12 00 mov 0x1264c4(,%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 ) { 10cd50: 85 d2 test %edx,%edx 10cd52: 74 18 je 10cd6c <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 10cd54: 8b 52 04 mov 0x4(%edx),%edx if ( !information ) { 10cd57: 85 d2 test %edx,%edx 10cd59: 74 11 je 10cd6c <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10cd5b: 53 push %ebx 10cd5c: 51 push %ecx 10cd5d: 50 push %eax 10cd5e: 52 push %edx 10cd5f: e8 48 f4 ff ff call 10c1ac <_Objects_Get> 10cd64: 83 c4 10 add $0x10,%esp done: return tp; } 10cd67: 8b 5d fc mov -0x4(%ebp),%ebx 10cd6a: c9 leave 10cd6b: c3 ret goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 10cd6c: 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; 10cd72: 31 c0 xor %eax,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10cd74: 8b 5d fc mov -0x4(%ebp),%ebx 10cd77: c9 leave 10cd78: c3 ret 10cd79: 8d 76 00 lea 0x0(%esi),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10cd7c: a1 ec 64 12 00 mov 0x1264ec,%eax 10cd81: 40 inc %eax 10cd82: a3 ec 64 12 00 mov %eax,0x1264ec 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; 10cd87: c7 01 00 00 00 00 movl $0x0,(%ecx) tp = _Thread_Executing; 10cd8d: a1 78 67 12 00 mov 0x126778,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10cd92: 8b 5d fc mov -0x4(%ebp),%ebx 10cd95: c9 leave 10cd96: c3 ret =============================================================================== 00111c68 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 111c68: 55 push %ebp 111c69: 89 e5 mov %esp,%ebp 111c6b: 53 push %ebx 111c6c: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 111c6f: 8b 1d 78 67 12 00 mov 0x126778,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 111c75: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax _ISR_Set_level(level); 111c7b: 85 c0 test %eax,%eax 111c7d: 74 79 je 111cf8 <_Thread_Handler+0x90> 111c7f: fa cli #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 111c80: a0 54 61 12 00 mov 0x126154,%al 111c85: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 111c88: c6 05 54 61 12 00 01 movb $0x1,0x126154 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 111c8f: 8b 93 dc 00 00 00 mov 0xdc(%ebx),%edx 111c95: 85 d2 test %edx,%edx 111c97: 74 24 je 111cbd <_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 ); 111c99: a1 80 65 12 00 mov 0x126580,%eax 111c9e: 39 c3 cmp %eax,%ebx 111ca0: 74 1b je 111cbd <_Thread_Handler+0x55> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 111ca2: 85 c0 test %eax,%eax 111ca4: 74 11 je 111cb7 <_Thread_Handler+0x4f> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 111ca6: 83 ec 0c sub $0xc,%esp 111ca9: 05 dc 00 00 00 add $0xdc,%eax 111cae: 50 push %eax 111caf: e8 50 c0 ff ff call 10dd04 <_CPU_Context_save_fp> 111cb4: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 111cb7: 89 1d 80 65 12 00 mov %ebx,0x126580 /* * 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 ); 111cbd: 83 ec 0c sub $0xc,%esp 111cc0: 53 push %ebx 111cc1: e8 66 bb ff ff call 10d82c <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 111cc6: e8 31 b0 ff ff call 10ccfc <_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) */ { 111ccb: 83 c4 10 add $0x10,%esp 111cce: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 111cd2: 74 28 je 111cfc <_Thread_Handler+0x94> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 111cd4: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax 111cda: 85 c0 test %eax,%eax 111cdc: 74 2d je 111d0b <_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 ); 111cde: 83 ec 0c sub $0xc,%esp 111ce1: 53 push %ebx 111ce2: e8 81 bb ff ff call 10d868 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 111ce7: 83 c4 0c add $0xc,%esp 111cea: 6a 05 push $0x5 111cec: 6a 01 push $0x1 111cee: 6a 00 push $0x0 111cf0: e8 73 9f ff ff call 10bc68 <_Internal_error_Occurred> 111cf5: 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); 111cf8: fb sti 111cf9: eb 85 jmp 111c80 <_Thread_Handler+0x18> 111cfb: 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 (); 111cfc: e8 ef c6 00 00 call 11e3f0 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 111d01: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax 111d07: 85 c0 test %eax,%eax 111d09: 75 d3 jne 111cde <_Thread_Handler+0x76> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 111d0b: 83 ec 0c sub $0xc,%esp 111d0e: ff b3 9c 00 00 00 pushl 0x9c(%ebx) 111d14: ff 93 90 00 00 00 call *0x90(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 111d1a: 89 43 28 mov %eax,0x28(%ebx) 111d1d: 83 c4 10 add $0x10,%esp 111d20: eb bc jmp 111cde <_Thread_Handler+0x76> =============================================================================== 0010cd98 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10cd98: 55 push %ebp 10cd99: 89 e5 mov %esp,%ebp 10cd9b: 57 push %edi 10cd9c: 56 push %esi 10cd9d: 53 push %ebx 10cd9e: 83 ec 24 sub $0x24,%esp 10cda1: 8b 5d 0c mov 0xc(%ebp),%ebx 10cda4: 8b 75 14 mov 0x14(%ebp),%esi 10cda7: 0f b6 7d 18 movzbl 0x18(%ebp),%edi 10cdab: 8a 45 20 mov 0x20(%ebp),%al 10cdae: 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; 10cdb1: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) 10cdb8: 00 00 00 10cdbb: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx) 10cdc2: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10cdc5: c7 83 e0 00 00 00 00 movl $0x0,0xe0(%ebx) 10cdcc: 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 ); 10cdcf: 56 push %esi 10cdd0: 53 push %ebx 10cdd1: e8 86 07 00 00 call 10d55c <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10cdd6: 83 c4 10 add $0x10,%esp 10cdd9: 85 c0 test %eax,%eax 10cddb: 0f 84 5b 01 00 00 je 10cf3c <_Thread_Initialize+0x1a4> 10cde1: 39 c6 cmp %eax,%esi 10cde3: 0f 87 53 01 00 00 ja 10cf3c <_Thread_Initialize+0x1a4><== NEVER TAKEN Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10cde9: 8b 93 c0 00 00 00 mov 0xc0(%ebx),%edx 10cdef: 89 93 b8 00 00 00 mov %edx,0xb8(%ebx) the_stack->size = size; 10cdf5: 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 ) { 10cdfb: 89 f8 mov %edi,%eax 10cdfd: 84 c0 test %al,%al 10cdff: 0f 85 47 01 00 00 jne 10cf4c <_Thread_Initialize+0x1b4> 10ce05: 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; 10ce07: 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; 10ce09: 89 83 dc 00 00 00 mov %eax,0xdc(%ebx) the_thread->Start.fp_context = fp_area; 10ce0f: 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; 10ce15: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10ce1c: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10ce23: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10ce2a: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10ce31: a1 90 65 12 00 mov 0x126590,%eax 10ce36: 85 c0 test %eax,%eax 10ce38: 0f 85 36 01 00 00 jne 10cf74 <_Thread_Initialize+0x1dc> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10ce3e: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10ce45: 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; 10ce48: 31 f6 xor %esi,%esi /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10ce4a: 8a 45 e4 mov -0x1c(%ebp),%al 10ce4d: 88 83 a0 00 00 00 mov %al,0xa0(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10ce53: 8b 45 24 mov 0x24(%ebp),%eax 10ce56: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.budget_callout = budget_callout; 10ce5c: 8b 45 28 mov 0x28(%ebp),%eax 10ce5f: 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; 10ce65: 8b 45 2c mov 0x2c(%ebp),%eax 10ce68: 89 83 ac 00 00 00 mov %eax,0xac(%ebx) the_thread->current_state = STATES_DORMANT; 10ce6e: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10ce75: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10ce7c: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->real_priority = priority; 10ce83: 8b 45 1c mov 0x1c(%ebp),%eax 10ce86: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10ce89: 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 ); 10ce8f: 83 ec 0c sub $0xc,%esp 10ce92: 53 push %ebx 10ce93: ff 15 18 22 12 00 call *0x122218 10ce99: 89 45 e4 mov %eax,-0x1c(%ebp) sched =_Scheduler_Allocate( the_thread ); if ( !sched ) 10ce9c: 83 c4 10 add $0x10,%esp 10ce9f: 85 c0 test %eax,%eax 10cea1: 74 42 je 10cee5 <_Thread_Initialize+0x14d> goto failed; _Thread_Set_priority( the_thread, priority ); 10cea3: 83 ec 08 sub $0x8,%esp 10cea6: ff 75 1c pushl 0x1c(%ebp) 10cea9: 53 push %ebx 10ceaa: e8 29 06 00 00 call 10d4d8 <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10ceaf: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10ceb6: 00 00 00 10ceb9: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10cec0: 00 00 00 _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 10cec3: 8b 45 08 mov 0x8(%ebp),%eax 10cec6: 8b 40 1c mov 0x1c(%eax),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10cec9: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10cecd: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10ced0: 8b 45 30 mov 0x30(%ebp),%eax 10ced3: 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 ); 10ced6: 89 1c 24 mov %ebx,(%esp) 10ced9: e8 16 0a 00 00 call 10d8f4 <_User_extensions_Thread_create> if ( extension_status ) 10cede: 83 c4 10 add $0x10,%esp 10cee1: 84 c0 test %al,%al 10cee3: 75 63 jne 10cf48 <_Thread_Initialize+0x1b0> return true; failed: _Workspace_Free( the_thread->libc_reent ); 10cee5: 83 ec 0c sub $0xc,%esp 10cee8: ff b3 e0 00 00 00 pushl 0xe0(%ebx) 10ceee: e8 99 0d 00 00 call 10dc8c <_Workspace_Free> for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 10cef3: 59 pop %ecx 10cef4: ff b3 e4 00 00 00 pushl 0xe4(%ebx) 10cefa: e8 8d 0d 00 00 call 10dc8c <_Workspace_Free> 10ceff: 5a pop %edx 10cf00: ff b3 e8 00 00 00 pushl 0xe8(%ebx) 10cf06: e8 81 0d 00 00 call 10dc8c <_Workspace_Free> _Workspace_Free( extensions_area ); 10cf0b: 89 34 24 mov %esi,(%esp) 10cf0e: e8 79 0d 00 00 call 10dc8c <_Workspace_Free> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 10cf13: 89 3c 24 mov %edi,(%esp) 10cf16: e8 71 0d 00 00 call 10dc8c <_Workspace_Free> #endif _Workspace_Free( sched ); 10cf1b: 58 pop %eax 10cf1c: ff 75 e4 pushl -0x1c(%ebp) 10cf1f: e8 68 0d 00 00 call 10dc8c <_Workspace_Free> _Thread_Stack_Free( the_thread ); 10cf24: 89 1c 24 mov %ebx,(%esp) 10cf27: e8 94 06 00 00 call 10d5c0 <_Thread_Stack_Free> return false; 10cf2c: 83 c4 10 add $0x10,%esp 10cf2f: 31 c0 xor %eax,%eax } 10cf31: 8d 65 f4 lea -0xc(%ebp),%esp 10cf34: 5b pop %ebx 10cf35: 5e pop %esi 10cf36: 5f pop %edi 10cf37: c9 leave 10cf38: c3 ret 10cf39: 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 */ 10cf3c: 31 c0 xor %eax,%eax _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 10cf3e: 8d 65 f4 lea -0xc(%ebp),%esp 10cf41: 5b pop %ebx 10cf42: 5e pop %esi 10cf43: 5f pop %edi 10cf44: c9 leave 10cf45: c3 ret 10cf46: 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; 10cf48: b0 01 mov $0x1,%al 10cf4a: eb f2 jmp 10cf3e <_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 ); 10cf4c: 83 ec 0c sub $0xc,%esp 10cf4f: 6a 6c push $0x6c 10cf51: e8 1a 0d 00 00 call 10dc70 <_Workspace_Allocate> 10cf56: 89 c7 mov %eax,%edi if ( !fp_area ) 10cf58: 83 c4 10 add $0x10,%esp 10cf5b: 85 c0 test %eax,%eax 10cf5d: 0f 85 a6 fe ff ff jne 10ce09 <_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; 10cf63: 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; 10cf65: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 10cf6c: e9 74 ff ff ff jmp 10cee5 <_Thread_Initialize+0x14d> 10cf71: 8d 76 00 lea 0x0(%esi),%esi /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 10cf74: 83 ec 0c sub $0xc,%esp 10cf77: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10cf7e: 50 push %eax 10cf7f: e8 ec 0c 00 00 call 10dc70 <_Workspace_Allocate> 10cf84: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10cf86: 83 c4 10 add $0x10,%esp 10cf89: 85 c0 test %eax,%eax 10cf8b: 74 26 je 10cfb3 <_Thread_Initialize+0x21b> goto failed; } the_thread->extensions = (void **) extensions_area; 10cf8d: 89 83 ec 00 00 00 mov %eax,0xec(%ebx) 10cf93: 8b 0d 90 65 12 00 mov 0x126590,%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++ ) 10cf99: 31 d2 xor %edx,%edx (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10cf9b: 31 c0 xor %eax,%eax 10cf9d: 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; 10cfa0: 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++ ) 10cfa7: 40 inc %eax 10cfa8: 89 c2 mov %eax,%edx 10cfaa: 39 c1 cmp %eax,%ecx 10cfac: 73 f2 jae 10cfa0 <_Thread_Initialize+0x208> 10cfae: e9 97 fe ff ff jmp 10ce4a <_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; 10cfb3: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 10cfba: e9 26 ff ff ff jmp 10cee5 <_Thread_Initialize+0x14d> =============================================================================== 0011146c <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 11146c: 55 push %ebp 11146d: 89 e5 mov %esp,%ebp 11146f: 53 push %ebx 111470: 83 ec 10 sub $0x10,%esp 111473: 8b 5d 08 mov 0x8(%ebp),%ebx the_thread->resource_count = 0; 111476: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->is_preemptible = the_thread->Start.is_preemptible; 11147d: 8a 83 a0 00 00 00 mov 0xa0(%ebx),%al 111483: 88 43 74 mov %al,0x74(%ebx) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 111486: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax 11148c: 89 43 7c mov %eax,0x7c(%ebx) the_thread->budget_callout = the_thread->Start.budget_callout; 11148f: 8b 83 a8 00 00 00 mov 0xa8(%ebx),%eax 111495: 89 83 80 00 00 00 mov %eax,0x80(%ebx) the_thread->Start.pointer_argument = pointer_argument; 11149b: 8b 45 0c mov 0xc(%ebp),%eax 11149e: 89 83 98 00 00 00 mov %eax,0x98(%ebx) the_thread->Start.numeric_argument = numeric_argument; 1114a4: 8b 45 10 mov 0x10(%ebp),%eax 1114a7: 89 83 9c 00 00 00 mov %eax,0x9c(%ebx) if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 1114ad: 53 push %ebx 1114ae: e8 95 c9 ff ff call 10de48 <_Thread_queue_Extract_with_proxy> 1114b3: 83 c4 10 add $0x10,%esp 1114b6: 84 c0 test %al,%al 1114b8: 75 06 jne 1114c0 <_Thread_Reset+0x54> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 1114ba: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 1114be: 74 28 je 1114e8 <_Thread_Reset+0x7c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 1114c0: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 1114c6: 39 43 14 cmp %eax,0x14(%ebx) 1114c9: 74 15 je 1114e0 <_Thread_Reset+0x74> the_thread->real_priority = the_thread->Start.initial_priority; 1114cb: 89 43 18 mov %eax,0x18(%ebx) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 1114ce: 89 45 0c mov %eax,0xc(%ebp) 1114d1: 89 5d 08 mov %ebx,0x8(%ebp) } } 1114d4: 8b 5d fc mov -0x4(%ebp),%ebx 1114d7: 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 ); 1114d8: e9 47 cb ff ff jmp 10e024 <_Thread_Set_priority> 1114dd: 8d 76 00 lea 0x0(%esi),%esi } } 1114e0: 8b 5d fc mov -0x4(%ebp),%ebx 1114e3: c9 leave 1114e4: c3 ret 1114e5: 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 ); 1114e8: 83 ec 0c sub $0xc,%esp 1114eb: 8d 43 48 lea 0x48(%ebx),%eax 1114ee: 50 push %eax 1114ef: e8 e0 d1 ff ff call 10e6d4 <_Watchdog_Remove> 1114f4: 83 c4 10 add $0x10,%esp 1114f7: eb c7 jmp 1114c0 <_Thread_Reset+0x54> =============================================================================== 0010d55c <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10d55c: 55 push %ebp 10d55d: 89 e5 mov %esp,%ebp 10d55f: 53 push %ebx 10d560: 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; 10d563: a1 f0 22 12 00 mov 0x1222f0,%eax 10d568: 8b 5d 0c mov 0xc(%ebp),%ebx 10d56b: 39 c3 cmp %eax,%ebx 10d56d: 73 02 jae 10d571 <_Thread_Stack_Allocate+0x15> 10d56f: 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 ) { 10d571: a1 20 23 12 00 mov 0x122320,%eax 10d576: 85 c0 test %eax,%eax 10d578: 74 32 je 10d5ac <_Thread_Stack_Allocate+0x50> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 10d57a: 83 ec 0c sub $0xc,%esp 10d57d: 53 push %ebx 10d57e: ff d0 call *%eax 10d580: 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 ) 10d583: 85 c0 test %eax,%eax 10d585: 74 11 je 10d598 <_Thread_Stack_Allocate+0x3c> the_stack_size = 0; the_thread->Start.stack = stack_addr; 10d587: 8b 55 08 mov 0x8(%ebp),%edx 10d58a: 89 82 c0 00 00 00 mov %eax,0xc0(%edx) return the_stack_size; } 10d590: 89 d8 mov %ebx,%eax 10d592: 8b 5d fc mov -0x4(%ebp),%ebx 10d595: c9 leave 10d596: c3 ret 10d597: 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; 10d598: 31 db xor %ebx,%ebx the_thread->Start.stack = stack_addr; 10d59a: 8b 55 08 mov 0x8(%ebp),%edx 10d59d: 89 82 c0 00 00 00 mov %eax,0xc0(%edx) return the_stack_size; } 10d5a3: 89 d8 mov %ebx,%eax 10d5a5: 8b 5d fc mov -0x4(%ebp),%ebx 10d5a8: c9 leave 10d5a9: c3 ret 10d5aa: 66 90 xchg %ax,%ax RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 10d5ac: 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 ); 10d5af: 83 ec 0c sub $0xc,%esp 10d5b2: 53 push %ebx 10d5b3: e8 b8 06 00 00 call 10dc70 <_Workspace_Allocate> 10d5b8: 83 c4 10 add $0x10,%esp 10d5bb: eb c6 jmp 10d583 <_Thread_Stack_Allocate+0x27> =============================================================================== 0010d5c0 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10d5c0: 55 push %ebp 10d5c1: 89 e5 mov %esp,%ebp 10d5c3: 83 ec 08 sub $0x8,%esp 10d5c6: 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 ) 10d5c9: a1 24 23 12 00 mov 0x122324,%eax 10d5ce: 85 c0 test %eax,%eax 10d5d0: 74 0e je 10d5e0 <_Thread_Stack_Free+0x20> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10d5d2: 8b 92 b8 00 00 00 mov 0xb8(%edx),%edx 10d5d8: 89 55 08 mov %edx,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10d5db: 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 ); 10d5dc: ff e0 jmp *%eax 10d5de: 66 90 xchg %ax,%ax else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10d5e0: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 10d5e6: 89 45 08 mov %eax,0x8(%ebp) } 10d5e9: 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 ); 10d5ea: e9 9d 06 00 00 jmp 10dc8c <_Workspace_Free> =============================================================================== 0010d098 <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10d098: 55 push %ebp 10d099: 89 e5 mov %esp,%ebp 10d09b: 57 push %edi 10d09c: 56 push %esi 10d09d: 53 push %ebx 10d09e: 83 ec 2c sub $0x2c,%esp 10d0a1: 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 ); 10d0a4: 9c pushf 10d0a5: fa cli 10d0a6: 58 pop %eax 10d0a7: 89 f9 mov %edi,%ecx for( index=0 ; 10d0a9: 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 ); } 10d0ab: 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 ); 10d0ad: 8d 34 52 lea (%edx,%edx,2),%esi 10d0b0: 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 ] ) ) { 10d0b4: 39 f3 cmp %esi,%ebx 10d0b6: 75 18 jne 10d0d0 <_Thread_queue_Dequeue_priority+0x38> Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10d0b8: 42 inc %edx 10d0b9: 83 c1 0c add $0xc,%ecx Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 10d0bc: 83 fa 04 cmp $0x4,%edx 10d0bf: 75 ea jne 10d0ab <_Thread_queue_Dequeue_priority+0x13> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10d0c1: 50 push %eax 10d0c2: 9d popf return NULL; 10d0c3: 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 ); } 10d0c5: 89 f0 mov %esi,%eax 10d0c7: 8d 65 f4 lea -0xc(%ebp),%esp 10d0ca: 5b pop %ebx 10d0cb: 5e pop %esi 10d0cc: 5f pop %edi 10d0cd: c9 leave 10d0ce: c3 ret 10d0cf: 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( 10d0d0: 89 de mov %ebx,%esi */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10d0d2: 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 ); } 10d0d9: 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; 10d0dc: 8b 0b mov (%ebx),%ecx previous_node = the_thread->Object.Node.previous; 10d0de: 8b 7b 04 mov 0x4(%ebx),%edi 10d0e1: 89 7d d4 mov %edi,-0x2c(%ebp) 10d0e4: 8d 7b 3c lea 0x3c(%ebx),%edi if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 10d0e7: 39 fa cmp %edi,%edx 10d0e9: 74 7f je 10d16a <_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 ); } 10d0eb: 8b 7b 40 mov 0x40(%ebx),%edi 10d0ee: 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; 10d0f1: 8b 3a mov (%edx),%edi 10d0f3: 89 7d e0 mov %edi,-0x20(%ebp) previous_node->next = new_first_node; 10d0f6: 8b 7d d4 mov -0x2c(%ebp),%edi 10d0f9: 89 17 mov %edx,(%edi) next_node->previous = new_first_node; 10d0fb: 89 51 04 mov %edx,0x4(%ecx) new_first_node->next = next_node; 10d0fe: 89 0a mov %ecx,(%edx) new_first_node->previous = previous_node; 10d100: 89 7a 04 mov %edi,0x4(%edx) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10d103: 8b 4b 40 mov 0x40(%ebx),%ecx 10d106: 39 4b 38 cmp %ecx,0x38(%ebx) 10d109: 74 17 je 10d122 <_Thread_queue_Dequeue_priority+0x8a> /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); 10d10b: 8d 4a 38 lea 0x38(%edx),%ecx 10d10e: 8b 7d e0 mov -0x20(%ebp),%edi 10d111: 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; 10d114: 89 7a 38 mov %edi,0x38(%edx) tail->previous = last_node; 10d117: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d11a: 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 ); 10d11d: 83 c2 3c add $0x3c,%edx 10d120: 89 11 mov %edx,(%ecx) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10d122: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d126: 74 18 je 10d140 <_Thread_queue_Dequeue_priority+0xa8> _ISR_Enable( level ); 10d128: 50 push %eax 10d129: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10d12a: 83 ec 08 sub $0x8,%esp 10d12d: 68 f8 ff 03 10 push $0x1003fff8 10d132: 53 push %ebx 10d133: e8 60 f8 ff ff call 10c998 <_Thread_Clear_state> 10d138: 83 c4 10 add $0x10,%esp 10d13b: eb 88 jmp 10d0c5 <_Thread_queue_Dequeue_priority+0x2d> 10d13d: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10d140: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10d147: 50 push %eax 10d148: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10d149: 83 ec 0c sub $0xc,%esp 10d14c: 8d 43 48 lea 0x48(%ebx),%eax 10d14f: 50 push %eax 10d150: e8 f3 09 00 00 call 10db48 <_Watchdog_Remove> 10d155: 58 pop %eax 10d156: 5a pop %edx 10d157: 68 f8 ff 03 10 push $0x1003fff8 10d15c: 53 push %ebx 10d15d: e8 36 f8 ff ff call 10c998 <_Thread_Clear_state> 10d162: 83 c4 10 add $0x10,%esp 10d165: e9 5b ff ff ff jmp 10d0c5 <_Thread_queue_Dequeue_priority+0x2d> head->next = new_second_node; tail->previous = last_node; last_node->next = tail; } } else { previous_node->next = next_node; 10d16a: 8b 7d d4 mov -0x2c(%ebp),%edi 10d16d: 89 0f mov %ecx,(%edi) next_node->previous = previous_node; 10d16f: 89 79 04 mov %edi,0x4(%ecx) 10d172: eb ae jmp 10d122 <_Thread_queue_Dequeue_priority+0x8a> =============================================================================== 001106fc <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 1106fc: 55 push %ebp 1106fd: 89 e5 mov %esp,%ebp 1106ff: 83 ec 08 sub $0x8,%esp 110702: 8b 45 08 mov 0x8(%ebp),%eax 110705: 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 ) 110708: 83 78 34 01 cmpl $0x1,0x34(%eax) 11070c: 74 0e je 11071c <_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 ); 11070e: 89 55 0c mov %edx,0xc(%ebp) 110711: 89 45 08 mov %eax,0x8(%ebp) } 110714: 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 ); 110715: e9 0a 16 00 00 jmp 111d24 <_Thread_queue_Extract_fifo> 11071a: 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 ); 11071c: 51 push %ecx 11071d: 6a 00 push $0x0 11071f: 52 push %edx 110720: 50 push %eax 110721: e8 06 00 00 00 call 11072c <_Thread_queue_Extract_priority_helper> 110726: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 110729: c9 leave 11072a: c3 ret =============================================================================== 00111d24 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 111d24: 55 push %ebp 111d25: 89 e5 mov %esp,%ebp 111d27: 53 push %ebx 111d28: 83 ec 04 sub $0x4,%esp 111d2b: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 111d2e: 9c pushf 111d2f: fa cli 111d30: 58 pop %eax if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 111d31: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 111d38: 74 2e je 111d68 <_Thread_queue_Extract_fifo+0x44> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 111d3a: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 111d3c: 8b 53 04 mov 0x4(%ebx),%edx next->previous = previous; 111d3f: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 111d42: 89 0a mov %ecx,(%edx) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 111d44: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 111d4b: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 111d4f: 74 1f je 111d70 <_Thread_queue_Extract_fifo+0x4c> _ISR_Enable( level ); 111d51: 50 push %eax 111d52: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 111d53: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 111d5a: 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 } 111d5d: 8b 5d fc mov -0x4(%ebp),%ebx 111d60: c9 leave 111d61: e9 32 ac ff ff jmp 10c998 <_Thread_Clear_state> 111d66: 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 ); 111d68: 50 push %eax 111d69: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 111d6a: 8b 5d fc mov -0x4(%ebp),%ebx 111d6d: c9 leave 111d6e: c3 ret 111d6f: 90 nop 111d70: 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 ); 111d77: 50 push %eax 111d78: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 111d79: 83 ec 0c sub $0xc,%esp 111d7c: 8d 43 48 lea 0x48(%ebx),%eax 111d7f: 50 push %eax 111d80: e8 c3 bd ff ff call 10db48 <_Watchdog_Remove> 111d85: 83 c4 10 add $0x10,%esp 111d88: eb c9 jmp 111d53 <_Thread_queue_Extract_fifo+0x2f> =============================================================================== 0011072c <_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 ) { 11072c: 55 push %ebp 11072d: 89 e5 mov %esp,%ebp 11072f: 57 push %edi 110730: 56 push %esi 110731: 53 push %ebx 110732: 83 ec 1c sub $0x1c,%esp 110735: 8b 5d 0c mov 0xc(%ebp),%ebx 110738: 8a 45 10 mov 0x10(%ebp),%al 11073b: 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 ); 11073e: 9c pushf 11073f: fa cli 110740: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 110743: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 11074a: 74 6c je 1107b8 <_Thread_queue_Extract_priority_helper+0x8c> /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 11074c: 8b 13 mov (%ebx),%edx previous_node = the_node->previous; 11074e: 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 } 110751: 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 ); 110754: 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 ) ) { 110757: 39 f0 cmp %esi,%eax 110759: 74 69 je 1107c4 <_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 } 11075b: 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; 11075e: 8b 30 mov (%eax),%esi previous_node->next = new_first_node; 110760: 89 01 mov %eax,(%ecx) next_node->previous = new_first_node; 110762: 89 42 04 mov %eax,0x4(%edx) new_first_node->next = next_node; 110765: 89 10 mov %edx,(%eax) new_first_node->previous = previous_node; 110767: 89 48 04 mov %ecx,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 11076a: 8b 53 40 mov 0x40(%ebx),%edx 11076d: 39 53 38 cmp %edx,0x38(%ebx) 110770: 74 11 je 110783 <_Thread_queue_Extract_priority_helper+0x57> /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); 110772: 8d 50 38 lea 0x38(%eax),%edx 110775: 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; 110778: 89 70 38 mov %esi,0x38(%eax) tail->previous = last_node; 11077b: 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 ); 11077e: 83 c0 3c add $0x3c,%eax 110781: 89 07 mov %eax,(%edi) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 110783: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 110787: 75 23 jne 1107ac <_Thread_queue_Extract_priority_helper+0x80> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 110789: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 11078d: 74 3d je 1107cc <_Thread_queue_Extract_priority_helper+0xa0> _ISR_Enable( level ); 11078f: ff 75 e4 pushl -0x1c(%ebp) 110792: 9d popf 110793: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 11079a: 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 } 11079d: 8d 65 f4 lea -0xc(%ebp),%esp 1107a0: 5b pop %ebx 1107a1: 5e pop %esi 1107a2: 5f pop %edi 1107a3: c9 leave 1107a4: e9 ef c1 ff ff jmp 10c998 <_Thread_Clear_state> 1107a9: 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 ); 1107ac: ff 75 e4 pushl -0x1c(%ebp) 1107af: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 1107b0: 8d 65 f4 lea -0xc(%ebp),%esp 1107b3: 5b pop %ebx 1107b4: 5e pop %esi 1107b5: 5f pop %edi 1107b6: c9 leave 1107b7: 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 ); 1107b8: ff 75 e4 pushl -0x1c(%ebp) 1107bb: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 1107bc: 8d 65 f4 lea -0xc(%ebp),%esp 1107bf: 5b pop %ebx 1107c0: 5e pop %esi 1107c1: 5f pop %edi 1107c2: c9 leave 1107c3: c3 ret head->next = new_second_node; tail->previous = last_node; last_node->next = tail; } } else { previous_node->next = next_node; 1107c4: 89 11 mov %edx,(%ecx) next_node->previous = previous_node; 1107c6: 89 4a 04 mov %ecx,0x4(%edx) 1107c9: eb b8 jmp 110783 <_Thread_queue_Extract_priority_helper+0x57> 1107cb: 90 nop 1107cc: 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 ); 1107d3: ff 75 e4 pushl -0x1c(%ebp) 1107d6: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 1107d7: 83 ec 0c sub $0xc,%esp 1107da: 8d 43 48 lea 0x48(%ebx),%eax 1107dd: 50 push %eax 1107de: e8 65 d3 ff ff call 10db48 <_Watchdog_Remove> 1107e3: 83 c4 10 add $0x10,%esp 1107e6: eb ab jmp 110793 <_Thread_queue_Extract_priority_helper+0x67> =============================================================================== 0010d384 <_Thread_queue_Extract_with_proxy>: */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 10d384: 55 push %ebp 10d385: 89 e5 mov %esp,%ebp 10d387: 83 ec 08 sub $0x8,%esp 10d38a: 8b 45 08 mov 0x8(%ebp),%eax States_Control state; state = the_thread->current_state; if ( _States_Is_waiting_on_thread_queue( state ) ) { 10d38d: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax) 10d394: 75 06 jne 10d39c <_Thread_queue_Extract_with_proxy+0x18> #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); return true; } return false; 10d396: 31 c0 xor %eax,%eax } 10d398: c9 leave 10d399: c3 ret 10d39a: 66 90 xchg %ax,%ax if ( proxy_extract_callout ) (*proxy_extract_callout)( the_thread ); } #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 10d39c: 83 ec 08 sub $0x8,%esp 10d39f: 50 push %eax 10d3a0: ff 70 44 pushl 0x44(%eax) 10d3a3: e8 54 33 00 00 call 1106fc <_Thread_queue_Extract> return true; 10d3a8: 83 c4 10 add $0x10,%esp 10d3ab: b0 01 mov $0x1,%al } return false; } 10d3ad: c9 leave 10d3ae: c3 ret =============================================================================== 0011e7ac <_Thread_queue_First>: */ Thread_Control *_Thread_queue_First( Thread_queue_Control *the_thread_queue ) { 11e7ac: 55 push %ebp 11e7ad: 89 e5 mov %esp,%ebp 11e7af: 83 ec 08 sub $0x8,%esp 11e7b2: 8b 45 08 mov 0x8(%ebp),%eax Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 11e7b5: 83 78 34 01 cmpl $0x1,0x34(%eax) 11e7b9: 74 0d je 11e7c8 <_Thread_queue_First+0x1c> first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; 11e7bb: ba 3c fb 11 00 mov $0x11fb3c,%edx return (*first_p)( the_thread_queue ); 11e7c0: 89 45 08 mov %eax,0x8(%ebp) } 11e7c3: 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 ); 11e7c4: ff e2 jmp *%edx 11e7c6: 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; 11e7c8: ba d4 e7 11 00 mov $0x11e7d4,%edx else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 11e7cd: 89 45 08 mov %eax,0x8(%ebp) } 11e7d0: 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 ); 11e7d1: ff e2 jmp *%edx =============================================================================== 0011fb3c <_Thread_queue_First_fifo>: */ Thread_Control *_Thread_queue_First_fifo( Thread_queue_Control *the_thread_queue ) { 11fb3c: 55 push %ebp 11fb3d: 89 e5 mov %esp,%ebp 11fb3f: 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; } 11fb42: 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 ); 11fb44: 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 ) ) 11fb47: 39 d0 cmp %edx,%eax 11fb49: 74 05 je 11fb50 <_Thread_queue_First_fifo+0x14> return (Thread_Control *) _Chain_First( &the_thread_queue->Queues.Fifo ); return NULL; } 11fb4b: c9 leave 11fb4c: c3 ret 11fb4d: 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; 11fb50: 31 c0 xor %eax,%eax } 11fb52: c9 leave 11fb53: c3 ret =============================================================================== 0010d3b0 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 10d3b0: 55 push %ebp 10d3b1: 89 e5 mov %esp,%ebp 10d3b3: 56 push %esi 10d3b4: 53 push %ebx 10d3b5: 8b 5d 08 mov 0x8(%ebp),%ebx 10d3b8: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10d3bb: eb 06 jmp 10d3c3 <_Thread_queue_Flush+0x13> 10d3bd: 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; 10d3c0: 89 70 34 mov %esi,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10d3c3: 83 ec 0c sub $0xc,%esp 10d3c6: 53 push %ebx 10d3c7: e8 80 fc ff ff call 10d04c <_Thread_queue_Dequeue> 10d3cc: 83 c4 10 add $0x10,%esp 10d3cf: 85 c0 test %eax,%eax 10d3d1: 75 ed jne 10d3c0 <_Thread_queue_Flush+0x10> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10d3d3: 8d 65 f8 lea -0x8(%ebp),%esp 10d3d6: 5b pop %ebx 10d3d7: 5e pop %esi 10d3d8: c9 leave 10d3d9: c3 ret =============================================================================== 0010d3dc <_Thread_queue_Initialize>: Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 10d3dc: 55 push %ebp 10d3dd: 89 e5 mov %esp,%ebp 10d3df: 56 push %esi 10d3e0: 53 push %ebx 10d3e1: 8b 45 08 mov 0x8(%ebp),%eax 10d3e4: 8b 55 0c mov 0xc(%ebp),%edx the_thread_queue->state = state; 10d3e7: 8b 4d 10 mov 0x10(%ebp),%ecx 10d3ea: 89 48 38 mov %ecx,0x38(%eax) the_thread_queue->discipline = the_discipline; 10d3ed: 89 50 34 mov %edx,0x34(%eax) the_thread_queue->timeout_status = timeout_status; 10d3f0: 8b 4d 14 mov 0x14(%ebp),%ecx 10d3f3: 89 48 3c mov %ecx,0x3c(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10d3f6: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10d3fd: 83 fa 01 cmp $0x1,%edx 10d400: 74 16 je 10d418 <_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 ); 10d402: 8d 50 04 lea 0x4(%eax),%edx 10d405: 89 10 mov %edx,(%eax) head->next = tail; head->previous = NULL; 10d407: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) tail->previous = head; 10d40e: 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 ); } } 10d411: 5b pop %ebx 10d412: 5e pop %esi 10d413: c9 leave 10d414: c3 ret 10d415: 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 ) { 10d418: 89 c1 mov %eax,%ecx 10d41a: 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 ); 10d41c: 8d 1c 52 lea (%edx,%edx,2),%ebx 10d41f: 8d 1c 98 lea (%eax,%ebx,4),%ebx 10d422: 8d 73 04 lea 0x4(%ebx),%esi 10d425: 89 31 mov %esi,(%ecx) head->next = tail; head->previous = NULL; 10d427: 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 ); 10d42e: 89 59 08 mov %ebx,0x8(%ecx) uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) 10d431: 42 inc %edx 10d432: 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 ; 10d435: 83 fa 04 cmp $0x4,%edx 10d438: 75 e2 jne 10d41c <_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 ); } } 10d43a: 5b pop %ebx 10d43b: 5e pop %esi 10d43c: c9 leave 10d43d: c3 ret =============================================================================== 0010d440 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10d440: 55 push %ebp 10d441: 89 e5 mov %esp,%ebp 10d443: 57 push %edi 10d444: 56 push %esi 10d445: 53 push %ebx 10d446: 83 ec 1c sub $0x1c,%esp 10d449: 8b 75 08 mov 0x8(%ebp),%esi 10d44c: 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 ) 10d44f: 85 f6 test %esi,%esi 10d451: 74 06 je 10d459 <_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 ) { 10d453: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10d457: 74 0b je 10d464 <_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 ); } } 10d459: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10d45c: 5b pop %ebx <== NOT EXECUTED 10d45d: 5e pop %esi <== NOT EXECUTED 10d45e: 5f pop %edi <== NOT EXECUTED 10d45f: c9 leave <== NOT EXECUTED 10d460: c3 ret <== NOT EXECUTED 10d461: 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 ); 10d464: 9c pushf 10d465: fa cli 10d466: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10d467: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10d46e: 75 0c jne 10d47c <_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 ); 10d470: 53 push %ebx 10d471: 9d popf } } 10d472: 8d 65 f4 lea -0xc(%ebp),%esp 10d475: 5b pop %ebx 10d476: 5e pop %esi 10d477: 5f pop %edi 10d478: c9 leave 10d479: c3 ret 10d47a: 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; 10d47c: 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 ); 10d483: 50 push %eax 10d484: 6a 01 push $0x1 10d486: 57 push %edi 10d487: 56 push %esi 10d488: e8 9f 32 00 00 call 11072c <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10d48d: 83 c4 0c add $0xc,%esp 10d490: 8d 45 e4 lea -0x1c(%ebp),%eax 10d493: 50 push %eax 10d494: 57 push %edi 10d495: 56 push %esi 10d496: e8 71 fd ff ff call 10d20c <_Thread_queue_Enqueue_priority> 10d49b: 83 c4 10 add $0x10,%esp 10d49e: eb d0 jmp 10d470 <_Thread_queue_Requeue+0x30> =============================================================================== 0010d4a0 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10d4a0: 55 push %ebp 10d4a1: 89 e5 mov %esp,%ebp 10d4a3: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10d4a6: 8d 45 f4 lea -0xc(%ebp),%eax 10d4a9: 50 push %eax 10d4aa: ff 75 08 pushl 0x8(%ebp) 10d4ad: e8 6e f8 ff ff call 10cd20 <_Thread_Get> switch ( location ) { 10d4b2: 83 c4 10 add $0x10,%esp 10d4b5: 8b 55 f4 mov -0xc(%ebp),%edx 10d4b8: 85 d2 test %edx,%edx 10d4ba: 75 17 jne 10d4d3 <_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 ); 10d4bc: 83 ec 0c sub $0xc,%esp 10d4bf: 50 push %eax 10d4c0: e8 23 33 00 00 call 1107e8 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10d4c5: a1 ec 64 12 00 mov 0x1264ec,%eax 10d4ca: 48 dec %eax 10d4cb: a3 ec 64 12 00 mov %eax,0x1264ec 10d4d0: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10d4d3: c9 leave 10d4d4: c3 ret =============================================================================== 001183e0 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 1183e0: 55 push %ebp 1183e1: 89 e5 mov %esp,%ebp 1183e3: 57 push %edi 1183e4: 56 push %esi 1183e5: 53 push %ebx 1183e6: 83 ec 4c sub $0x4c,%esp 1183e9: 8b 5d 08 mov 0x8(%ebp),%ebx ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 1183ec: 8d 45 e0 lea -0x20(%ebp),%eax 1183ef: 89 45 b4 mov %eax,-0x4c(%ebp) 1183f2: 89 45 dc mov %eax,-0x24(%ebp) head->previous = NULL; 1183f5: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) tail->previous = head; 1183fc: 8d 4d dc lea -0x24(%ebp),%ecx 1183ff: 89 4d e4 mov %ecx,-0x1c(%ebp) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 118402: 8d 7d d0 lea -0x30(%ebp),%edi 118405: 8d 45 d4 lea -0x2c(%ebp),%eax 118408: 89 45 b0 mov %eax,-0x50(%ebp) 11840b: 89 45 d0 mov %eax,-0x30(%ebp) head->previous = NULL; 11840e: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) tail->previous = head; 118415: 89 7d d8 mov %edi,-0x28(%ebp) 118418: 8d 73 30 lea 0x30(%ebx),%esi 11841b: 8d 4b 68 lea 0x68(%ebx),%ecx 11841e: 89 4d c4 mov %ecx,-0x3c(%ebp) 118421: 8d 43 08 lea 0x8(%ebx),%eax 118424: 89 45 c0 mov %eax,-0x40(%ebp) 118427: 8d 53 40 lea 0x40(%ebx),%edx 11842a: 89 55 bc mov %edx,-0x44(%ebp) 11842d: 8d 76 00 lea 0x0(%esi),%esi { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 118430: 8d 4d dc lea -0x24(%ebp),%ecx 118433: 89 4b 78 mov %ecx,0x78(%ebx) 118436: 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; 118438: a1 24 0a 14 00 mov 0x140a24,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 11843d: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 118440: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118443: 51 push %ecx 118444: 57 push %edi Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 118445: 29 d0 sub %edx,%eax watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118447: 50 push %eax 118448: 56 push %esi 118449: e8 5a 3d 00 00 call 11c1a8 <_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(); 11844e: a1 88 09 14 00 mov 0x140988,%eax Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 118453: 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 ) { 118456: 83 c4 10 add $0x10,%esp 118459: 39 d0 cmp %edx,%eax 11845b: 77 63 ja 1184c0 <_Timer_server_Body+0xe0> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 11845d: 72 7d jb 1184dc <_Timer_server_Body+0xfc> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 11845f: 89 43 74 mov %eax,0x74(%ebx) 118462: 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 ); 118464: 8b 43 78 mov 0x78(%ebx),%eax 118467: 83 ec 0c sub $0xc,%esp 11846a: 50 push %eax 11846b: e8 ac 09 00 00 call 118e1c <_Chain_Get> if ( timer == NULL ) { 118470: 83 c4 10 add $0x10,%esp 118473: 85 c0 test %eax,%eax 118475: 74 35 je 1184ac <_Timer_server_Body+0xcc><== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118477: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 11847a: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 11847d: 74 19 je 118498 <_Timer_server_Body+0xb8><== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 11847f: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 118482: 75 e0 jne 118464 <_Timer_server_Body+0x84><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 118484: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118487: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 11848a: 50 push %eax <== NOT EXECUTED 11848b: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 11848e: e8 a1 3d 00 00 call 11c234 <_Watchdog_Insert> <== NOT EXECUTED 118493: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118496: eb cc jmp 118464 <_Timer_server_Body+0x84><== NOT EXECUTED Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 118498: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11849b: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 11849e: 50 push %eax <== NOT EXECUTED 11849f: 56 push %esi <== NOT EXECUTED 1184a0: e8 8f 3d 00 00 call 11c234 <_Watchdog_Insert> <== NOT EXECUTED 1184a5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1184a8: eb ba jmp 118464 <_Timer_server_Body+0x84><== NOT EXECUTED 1184aa: 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 ); 1184ac: 9c pushf 1184ad: fa cli 1184ae: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 1184af: 8b 55 b4 mov -0x4c(%ebp),%edx 1184b2: 39 55 dc cmp %edx,-0x24(%ebp) 1184b5: 74 41 je 1184f8 <_Timer_server_Body+0x118><== ALWAYS TAKEN ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 1184b7: 50 push %eax <== NOT EXECUTED 1184b8: 9d popf <== NOT EXECUTED 1184b9: e9 7a ff ff ff jmp 118438 <_Timer_server_Body+0x58><== NOT EXECUTED 1184be: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1184c0: 51 push %ecx 1184c1: 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; 1184c2: 89 c1 mov %eax,%ecx 1184c4: 29 d1 sub %edx,%ecx _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1184c6: 51 push %ecx 1184c7: ff 75 c4 pushl -0x3c(%ebp) 1184ca: 89 45 b8 mov %eax,-0x48(%ebp) 1184cd: e8 d6 3c 00 00 call 11c1a8 <_Watchdog_Adjust_to_chain> 1184d2: 83 c4 10 add $0x10,%esp 1184d5: 8b 45 b8 mov -0x48(%ebp),%eax 1184d8: eb 85 jmp 11845f <_Timer_server_Body+0x7f> 1184da: 66 90 xchg %ax,%ax /* * 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 ); 1184dc: 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; 1184dd: 29 c2 sub %eax,%edx _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 1184df: 52 push %edx 1184e0: 6a 01 push $0x1 1184e2: ff 75 c4 pushl -0x3c(%ebp) 1184e5: 89 45 b8 mov %eax,-0x48(%ebp) 1184e8: e8 43 3c 00 00 call 11c130 <_Watchdog_Adjust> 1184ed: 83 c4 10 add $0x10,%esp 1184f0: 8b 45 b8 mov -0x48(%ebp),%eax 1184f3: e9 67 ff ff ff jmp 11845f <_Timer_server_Body+0x7f> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 1184f8: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 1184ff: 50 push %eax 118500: 9d popf _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 118501: 8b 4d b0 mov -0x50(%ebp),%ecx 118504: 39 4d d0 cmp %ecx,-0x30(%ebp) 118507: 75 23 jne 11852c <_Timer_server_Body+0x14c> 118509: eb 33 jmp 11853e <_Timer_server_Body+0x15e> 11850b: 90 nop Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 11850c: 8b 10 mov (%eax),%edx head->next = new_first; 11850e: 89 55 d0 mov %edx,-0x30(%ebp) new_first->previous = head; 118511: 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; 118514: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 11851b: 51 push %ecx 11851c: 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 ); 11851d: 83 ec 08 sub $0x8,%esp 118520: ff 70 24 pushl 0x24(%eax) 118523: ff 70 20 pushl 0x20(%eax) 118526: ff 50 1c call *0x1c(%eax) } 118529: 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 ); 11852c: 9c pushf 11852d: fa cli 11852e: 59 pop %ecx initialized = false; } #endif return status; } 11852f: 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)) 118532: 3b 45 b0 cmp -0x50(%ebp),%eax 118535: 75 d5 jne 11850c <_Timer_server_Body+0x12c> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 118537: 51 push %ecx 118538: 9d popf 118539: e9 f2 fe ff ff jmp 118430 <_Timer_server_Body+0x50> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 11853e: c6 43 7c 00 movb $0x0,0x7c(%ebx) 118542: a1 ec 08 14 00 mov 0x1408ec,%eax 118547: 40 inc %eax 118548: a3 ec 08 14 00 mov %eax,0x1408ec /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 11854d: 83 ec 08 sub $0x8,%esp 118550: 6a 08 push $0x8 118552: ff 33 pushl (%ebx) 118554: e8 37 36 00 00 call 11bb90 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 118559: 89 d8 mov %ebx,%eax 11855b: e8 e0 fd ff ff call 118340 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 118560: 89 d8 mov %ebx,%eax 118562: e8 29 fe ff ff call 118390 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 118567: e8 a8 2d 00 00 call 11b314 <_Thread_Enable_dispatch> ts->active = true; 11856c: 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 ); 118570: 5a pop %edx 118571: ff 75 c0 pushl -0x40(%ebp) 118574: e8 fb 3d 00 00 call 11c374 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 118579: 58 pop %eax 11857a: ff 75 bc pushl -0x44(%ebp) 11857d: e8 f2 3d 00 00 call 11c374 <_Watchdog_Remove> 118582: 83 c4 10 add $0x10,%esp 118585: e9 a6 fe ff ff jmp 118430 <_Timer_server_Body+0x50> =============================================================================== 0011858c <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 11858c: 55 push %ebp 11858d: 89 e5 mov %esp,%ebp 11858f: 57 push %edi 118590: 56 push %esi 118591: 53 push %ebx 118592: 83 ec 2c sub $0x2c,%esp 118595: 8b 5d 08 mov 0x8(%ebp),%ebx 118598: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 11859b: 8b 53 78 mov 0x78(%ebx),%edx 11859e: 85 d2 test %edx,%edx 1185a0: 74 16 je 1185b8 <_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 ); 1185a2: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 1185a5: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 1185a8: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 1185ab: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1185ae: 5b pop %ebx <== NOT EXECUTED 1185af: 5e pop %esi <== NOT EXECUTED 1185b0: 5f pop %edi <== NOT EXECUTED 1185b1: 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 ); 1185b2: e9 29 08 00 00 jmp 118de0 <_Chain_Append> <== NOT EXECUTED 1185b7: 90 nop <== NOT EXECUTED 1185b8: 8b 15 ec 08 14 00 mov 0x1408ec,%edx 1185be: 42 inc %edx 1185bf: 89 15 ec 08 14 00 mov %edx,0x1408ec * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 1185c5: 8b 50 38 mov 0x38(%eax),%edx 1185c8: 83 fa 01 cmp $0x1,%edx 1185cb: 74 7b je 118648 <_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 ) { 1185cd: 83 fa 03 cmp $0x3,%edx 1185d0: 74 0e je 1185e0 <_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 ); } } 1185d2: 8d 65 f4 lea -0xc(%ebp),%esp 1185d5: 5b pop %ebx 1185d6: 5e pop %esi 1185d7: 5f pop %edi 1185d8: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 1185d9: e9 36 2d 00 00 jmp 11b314 <_Thread_Enable_dispatch> 1185de: 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 ); 1185e0: 9c pushf 1185e1: fa cli 1185e2: 8f 45 e4 popl -0x1c(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 1185e5: 8b 0d 88 09 14 00 mov 0x140988,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 1185eb: 8b 53 74 mov 0x74(%ebx),%edx 1185ee: 89 55 d4 mov %edx,-0x2c(%ebp) initialized = false; } #endif return status; } 1185f1: 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 ); 1185f4: 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 ) ) { 1185f7: 39 fa cmp %edi,%edx 1185f9: 74 21 je 11861c <_Timer_server_Schedule_operation_method+0x90> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 1185fb: 8b 7a 10 mov 0x10(%edx),%edi if ( snapshot > last_snapshot ) { 1185fe: 3b 4d d4 cmp -0x2c(%ebp),%ecx 118601: 0f 86 a1 00 00 00 jbe 1186a8 <_Timer_server_Schedule_operation_method+0x11c> /* * We advanced in time. */ delta = snapshot - last_snapshot; 118607: 89 ce mov %ecx,%esi 118609: 2b 75 d4 sub -0x2c(%ebp),%esi 11860c: 89 75 d4 mov %esi,-0x2c(%ebp) if (delta_interval > delta) { 11860f: 39 f7 cmp %esi,%edi 118611: 0f 86 9b 00 00 00 jbe 1186b2 <_Timer_server_Schedule_operation_method+0x126><== NEVER TAKEN delta_interval -= delta; 118617: 29 f7 sub %esi,%edi * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 118619: 89 7a 10 mov %edi,0x10(%edx) } ts->TOD_watchdogs.last_snapshot = snapshot; 11861c: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 11861f: ff 75 e4 pushl -0x1c(%ebp) 118622: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 118623: 83 ec 08 sub $0x8,%esp 118626: 83 c0 10 add $0x10,%eax 118629: 50 push %eax 11862a: 8d 43 68 lea 0x68(%ebx),%eax 11862d: 50 push %eax 11862e: e8 01 3c 00 00 call 11c234 <_Watchdog_Insert> if ( !ts->active ) { 118633: 8a 43 7c mov 0x7c(%ebx),%al 118636: 83 c4 10 add $0x10,%esp 118639: 84 c0 test %al,%al 11863b: 75 95 jne 1185d2 <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_tod_system_watchdog( ts ); 11863d: 89 d8 mov %ebx,%eax 11863f: e8 4c fd ff ff call 118390 <_Timer_server_Reset_tod_system_watchdog> 118644: eb 8c jmp 1185d2 <_Timer_server_Schedule_operation_method+0x46> 118646: 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 ); 118648: 9c pushf 118649: fa cli 11864a: 8f 45 e4 popl -0x1c(%ebp) snapshot = _Watchdog_Ticks_since_boot; 11864d: 8b 0d 24 0a 14 00 mov 0x140a24,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 118653: 8b 7b 3c mov 0x3c(%ebx),%edi initialized = false; } #endif return status; } 118656: 8b 53 30 mov 0x30(%ebx),%edx 118659: 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 ) ) { 11865c: 39 f2 cmp %esi,%edx 11865e: 74 10 je 118670 <_Timer_server_Schedule_operation_method+0xe4> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 118660: 89 ce mov %ecx,%esi 118662: 29 fe sub %edi,%esi delta_interval = first_watchdog->delta_interval; 118664: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 118667: 39 fe cmp %edi,%esi 118669: 73 39 jae 1186a4 <_Timer_server_Schedule_operation_method+0x118> delta_interval -= delta; 11866b: 29 f7 sub %esi,%edi } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 11866d: 89 7a 10 mov %edi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 118670: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 118673: ff 75 e4 pushl -0x1c(%ebp) 118676: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 118677: 83 ec 08 sub $0x8,%esp 11867a: 83 c0 10 add $0x10,%eax 11867d: 50 push %eax 11867e: 8d 43 30 lea 0x30(%ebx),%eax 118681: 50 push %eax 118682: e8 ad 3b 00 00 call 11c234 <_Watchdog_Insert> if ( !ts->active ) { 118687: 8a 43 7c mov 0x7c(%ebx),%al 11868a: 83 c4 10 add $0x10,%esp 11868d: 84 c0 test %al,%al 11868f: 0f 85 3d ff ff ff jne 1185d2 <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_interval_system_watchdog( ts ); 118695: 89 d8 mov %ebx,%eax 118697: e8 a4 fc ff ff call 118340 <_Timer_server_Reset_interval_system_watchdog> 11869c: e9 31 ff ff ff jmp 1185d2 <_Timer_server_Schedule_operation_method+0x46> 1186a1: 8d 76 00 lea 0x0(%esi),%esi delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 1186a4: 31 ff xor %edi,%edi 1186a6: eb c5 jmp 11866d <_Timer_server_Schedule_operation_method+0xe1> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 1186a8: 03 7d d4 add -0x2c(%ebp),%edi delta_interval += delta; 1186ab: 29 cf sub %ecx,%edi 1186ad: e9 67 ff ff ff jmp 118619 <_Timer_server_Schedule_operation_method+0x8d> */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 1186b2: 31 ff xor %edi,%edi <== NOT EXECUTED 1186b4: e9 60 ff ff ff jmp 118619 <_Timer_server_Schedule_operation_method+0x8d><== NOT EXECUTED =============================================================================== 0010ee48 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 10ee48: 55 push %ebp 10ee49: 89 e5 mov %esp,%ebp 10ee4b: 57 push %edi 10ee4c: 56 push %esi 10ee4d: 53 push %ebx 10ee4e: 83 ec 2c sub $0x2c,%esp 10ee51: 8b 45 08 mov 0x8(%ebp),%eax 10ee54: 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; 10ee57: 8b 38 mov (%eax),%edi left += lhs->tv_nsec; 10ee59: 8b 70 04 mov 0x4(%eax),%esi right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10ee5c: bb 00 ca 9a 3b mov $0x3b9aca00,%ebx 10ee61: 8b 01 mov (%ecx),%eax 10ee63: f7 eb imul %ebx 10ee65: 89 45 e0 mov %eax,-0x20(%ebp) 10ee68: 89 55 e4 mov %edx,-0x1c(%ebp) right += rhs->tv_nsec; 10ee6b: 8b 41 04 mov 0x4(%ecx),%eax 10ee6e: 99 cltd 10ee6f: 01 45 e0 add %eax,-0x20(%ebp) 10ee72: 11 55 e4 adc %edx,-0x1c(%ebp) if ( right == 0 ) { 10ee75: 8b 55 e4 mov -0x1c(%ebp),%edx 10ee78: 0b 55 e0 or -0x20(%ebp),%edx 10ee7b: 74 73 je 10eef0 <_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; 10ee7d: 89 f8 mov %edi,%eax 10ee7f: f7 eb imul %ebx 10ee81: 89 45 d0 mov %eax,-0x30(%ebp) 10ee84: 89 55 d4 mov %edx,-0x2c(%ebp) left += lhs->tv_nsec; 10ee87: 89 f7 mov %esi,%edi 10ee89: c1 ff 1f sar $0x1f,%edi 10ee8c: 01 75 d0 add %esi,-0x30(%ebp) 10ee8f: 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; 10ee92: 69 4d d4 a0 86 01 00 imul $0x186a0,-0x2c(%ebp),%ecx 10ee99: bb a0 86 01 00 mov $0x186a0,%ebx 10ee9e: 8b 45 d0 mov -0x30(%ebp),%eax 10eea1: f7 e3 mul %ebx 10eea3: 8d 34 11 lea (%ecx,%edx,1),%esi 10eea6: ff 75 e4 pushl -0x1c(%ebp) 10eea9: ff 75 e0 pushl -0x20(%ebp) 10eeac: 56 push %esi 10eead: 50 push %eax 10eeae: e8 e9 0a 01 00 call 11f99c <__udivdi3> 10eeb3: 83 c4 10 add $0x10,%esp 10eeb6: 89 c3 mov %eax,%ebx 10eeb8: 89 d6 mov %edx,%esi *ival_percentage = answer / 1000; 10eeba: 6a 00 push $0x0 10eebc: 68 e8 03 00 00 push $0x3e8 10eec1: 52 push %edx 10eec2: 50 push %eax 10eec3: e8 d4 0a 01 00 call 11f99c <__udivdi3> 10eec8: 83 c4 10 add $0x10,%esp 10eecb: 8b 55 10 mov 0x10(%ebp),%edx 10eece: 89 02 mov %eax,(%edx) *fval_percentage = answer % 1000; 10eed0: 6a 00 push $0x0 10eed2: 68 e8 03 00 00 push $0x3e8 10eed7: 56 push %esi 10eed8: 53 push %ebx 10eed9: e8 ce 0b 01 00 call 11faac <__umoddi3> 10eede: 83 c4 10 add $0x10,%esp 10eee1: 8b 55 14 mov 0x14(%ebp),%edx 10eee4: 89 02 mov %eax,(%edx) } 10eee6: 8d 65 f4 lea -0xc(%ebp),%esp 10eee9: 5b pop %ebx 10eeea: 5e pop %esi 10eeeb: 5f pop %edi 10eeec: c9 leave 10eeed: c3 ret 10eeee: 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; 10eef0: 8b 45 10 mov 0x10(%ebp),%eax 10eef3: c7 00 00 00 00 00 movl $0x0,(%eax) *fval_percentage = 0; 10eef9: 8b 55 14 mov 0x14(%ebp),%edx 10eefc: c7 02 00 00 00 00 movl $0x0,(%edx) answer = (left * 100000) / right; *ival_percentage = answer / 1000; *fval_percentage = answer % 1000; } 10ef02: 8d 65 f4 lea -0xc(%ebp),%esp 10ef05: 5b pop %ebx 10ef06: 5e pop %esi 10ef07: 5f pop %edi 10ef08: c9 leave 10ef09: c3 ret =============================================================================== 0011f1d0 <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 11f1d0: 55 push %ebp 11f1d1: 89 e5 mov %esp,%ebp 11f1d3: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 11f1d6: 85 c0 test %eax,%eax 11f1d8: 74 1a je 11f1f4 <_Timespec_Is_valid+0x24> return false; if ( time->tv_sec < 0 ) 11f1da: 8b 10 mov (%eax),%edx 11f1dc: 85 d2 test %edx,%edx 11f1de: 78 14 js 11f1f4 <_Timespec_Is_valid+0x24> return false; if ( time->tv_nsec < 0 ) 11f1e0: 8b 40 04 mov 0x4(%eax),%eax 11f1e3: 85 c0 test %eax,%eax 11f1e5: 78 0d js 11f1f4 <_Timespec_Is_valid+0x24> #include #include #include bool _Timespec_Is_valid( 11f1e7: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 11f1ec: 0f 96 c0 setbe %al if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 11f1ef: c9 leave 11f1f0: c3 ret 11f1f1: 8d 76 00 lea 0x0(%esi),%esi if ( time->tv_sec < 0 ) return false; if ( time->tv_nsec < 0 ) return false; 11f1f4: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 11f1f6: c9 leave 11f1f7: c3 ret =============================================================================== 0011f1f8 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 11f1f8: 55 push %ebp 11f1f9: 89 e5 mov %esp,%ebp 11f1fb: 56 push %esi 11f1fc: 53 push %ebx 11f1fd: 8b 5d 08 mov 0x8(%ebp),%ebx uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 11f200: 8b 33 mov (%ebx),%esi 11f202: 85 f6 test %esi,%esi 11f204: 75 07 jne 11f20d <_Timespec_To_ticks+0x15> 11f206: 8b 43 04 mov 0x4(%ebx),%eax 11f209: 85 c0 test %eax,%eax 11f20b: 74 37 je 11f244 <_Timespec_To_ticks+0x4c> return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 11f20d: e8 ba 01 00 00 call 11f3cc 11f212: 89 c1 mov %eax,%ecx 11f214: 0f af ce imul %esi,%ecx ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 11f217: a1 8c 32 12 00 mov 0x12328c,%eax 11f21c: 8d 04 80 lea (%eax,%eax,4),%eax 11f21f: 8d 04 80 lea (%eax,%eax,4),%eax 11f222: 8d 34 80 lea (%eax,%eax,4),%esi 11f225: c1 e6 03 shl $0x3,%esi 11f228: 8b 43 04 mov 0x4(%ebx),%eax 11f22b: 31 d2 xor %edx,%edx 11f22d: f7 f6 div %esi if (ticks) 11f22f: 01 c8 add %ecx,%eax 11f231: 74 05 je 11f238 <_Timespec_To_ticks+0x40> return ticks; return 1; } 11f233: 5b pop %ebx 11f234: 5e pop %esi 11f235: c9 leave 11f236: c3 ret 11f237: 90 nop ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); if (ticks) return ticks; return 1; 11f238: b8 01 00 00 00 mov $0x1,%eax } 11f23d: 5b pop %ebx 11f23e: 5e pop %esi 11f23f: c9 leave 11f240: c3 ret 11f241: 8d 76 00 lea 0x0(%esi),%esi ) { uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) return 0; 11f244: 31 c0 xor %eax,%eax if (ticks) return ticks; return 1; } 11f246: 5b pop %ebx 11f247: 5e pop %esi 11f248: c9 leave 11f249: c3 ret =============================================================================== 0010d8a4 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10d8a4: 55 push %ebp 10d8a5: 89 e5 mov %esp,%ebp 10d8a7: 57 push %edi 10d8a8: 56 push %esi 10d8a9: 53 push %ebx 10d8aa: 83 ec 1c sub $0x1c,%esp 10d8ad: 8b 75 08 mov 0x8(%ebp),%esi 10d8b0: 8b 7d 10 mov 0x10(%ebp),%edi 10d8b3: 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 ); } } 10d8b6: 8b 1d 14 67 12 00 mov 0x126714,%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 10d8bc: 81 fb 0c 67 12 00 cmp $0x12670c,%ebx 10d8c2: 74 25 je 10d8e9 <_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 ); 10d8c4: 0f b6 c0 movzbl %al,%eax 10d8c7: 89 45 e4 mov %eax,-0x1c(%ebp) 10d8ca: 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 ) 10d8cc: 8b 43 30 mov 0x30(%ebx),%eax 10d8cf: 85 c0 test %eax,%eax 10d8d1: 74 0b je 10d8de <_User_extensions_Fatal+0x3a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10d8d3: 52 push %edx 10d8d4: 57 push %edi 10d8d5: ff 75 e4 pushl -0x1c(%ebp) 10d8d8: 56 push %esi 10d8d9: ff d0 call *%eax 10d8db: 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 ) { 10d8de: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 10d8e1: 81 fb 0c 67 12 00 cmp $0x12670c,%ebx 10d8e7: 75 e3 jne 10d8cc <_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 ); } } 10d8e9: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10d8ec: 5b pop %ebx <== NOT EXECUTED 10d8ed: 5e pop %esi <== NOT EXECUTED 10d8ee: 5f pop %edi <== NOT EXECUTED 10d8ef: c9 leave <== NOT EXECUTED 10d8f0: c3 ret <== NOT EXECUTED =============================================================================== 0010d768 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10d768: 55 push %ebp 10d769: 89 e5 mov %esp,%ebp 10d76b: 57 push %edi 10d76c: 56 push %esi 10d76d: 53 push %ebx 10d76e: 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; 10d771: a1 38 23 12 00 mov 0x122338,%eax 10d776: 89 45 dc mov %eax,-0x24(%ebp) initial_extensions = Configuration.User_extension_table; 10d779: 8b 35 3c 23 12 00 mov 0x12233c,%esi Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 10d77f: c7 05 0c 67 12 00 10 movl $0x126710,0x12670c 10d786: 67 12 00 head->previous = NULL; 10d789: c7 05 10 67 12 00 00 movl $0x0,0x126710 10d790: 00 00 00 tail->previous = head; 10d793: c7 05 14 67 12 00 0c movl $0x12670c,0x126714 10d79a: 67 12 00 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 10d79d: c7 05 f0 64 12 00 f4 movl $0x1264f4,0x1264f0 10d7a4: 64 12 00 head->previous = NULL; 10d7a7: c7 05 f4 64 12 00 00 movl $0x0,0x1264f4 10d7ae: 00 00 00 tail->previous = head; 10d7b1: c7 05 f8 64 12 00 f0 movl $0x1264f0,0x1264f8 10d7b8: 64 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10d7bb: 85 f6 test %esi,%esi 10d7bd: 74 64 je 10d823 <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( 10d7bf: 89 c2 mov %eax,%edx 10d7c1: 8d 04 40 lea (%eax,%eax,2),%eax 10d7c4: 8d 0c 82 lea (%edx,%eax,4),%ecx 10d7c7: c1 e1 02 shl $0x2,%ecx 10d7ca: 83 ec 0c sub $0xc,%esp 10d7cd: 51 push %ecx 10d7ce: 89 4d d8 mov %ecx,-0x28(%ebp) 10d7d1: e8 ce 04 00 00 call 10dca4 <_Workspace_Allocate_or_fatal_error> 10d7d6: 89 c3 mov %eax,%ebx number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10d7d8: 31 c0 xor %eax,%eax 10d7da: 8b 4d d8 mov -0x28(%ebp),%ecx 10d7dd: 89 df mov %ebx,%edi 10d7df: f3 aa rep stos %al,%es:(%edi) extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10d7e1: 83 c4 10 add $0x10,%esp 10d7e4: 8b 45 dc mov -0x24(%ebp),%eax 10d7e7: 85 c0 test %eax,%eax 10d7e9: 74 38 je 10d823 <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN 10d7eb: 89 75 e4 mov %esi,-0x1c(%ebp) 10d7ee: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 10d7f5: 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; 10d7f8: 8d 7b 14 lea 0x14(%ebx),%edi 10d7fb: 8b 75 e4 mov -0x1c(%ebp),%esi 10d7fe: b9 08 00 00 00 mov $0x8,%ecx 10d803: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10d805: 83 ec 0c sub $0xc,%esp 10d808: 53 push %ebx 10d809: e8 46 30 00 00 call 110854 <_User_extensions_Add_set> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10d80e: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10d811: ff 45 e0 incl -0x20(%ebp) 10d814: 83 45 e4 20 addl $0x20,-0x1c(%ebp) 10d818: 83 c4 10 add $0x10,%esp 10d81b: 8b 45 e0 mov -0x20(%ebp),%eax 10d81e: 39 45 dc cmp %eax,-0x24(%ebp) 10d821: 77 d5 ja 10d7f8 <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10d823: 8d 65 f4 lea -0xc(%ebp),%esp 10d826: 5b pop %ebx 10d827: 5e pop %esi 10d828: 5f pop %edi 10d829: c9 leave 10d82a: c3 ret =============================================================================== 0010ebf8 <_User_extensions_Remove_set>: #include void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 10ebf8: 55 push %ebp 10ebf9: 89 e5 mov %esp,%ebp 10ebfb: 53 push %ebx 10ebfc: 83 ec 10 sub $0x10,%esp 10ebff: 8b 5d 08 mov 0x8(%ebp),%ebx _Chain_Extract( &the_extension->Node ); 10ec02: 53 push %ebx 10ec03: e8 3c dc ff ff call 10c844 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 10ec08: 83 c4 10 add $0x10,%esp 10ec0b: 8b 43 24 mov 0x24(%ebx),%eax 10ec0e: 85 c0 test %eax,%eax 10ec10: 74 12 je 10ec24 <_User_extensions_Remove_set+0x2c> _Chain_Extract( &the_extension->Switch.Node ); 10ec12: 83 c3 08 add $0x8,%ebx 10ec15: 89 5d 08 mov %ebx,0x8(%ebp) } 10ec18: 8b 5d fc mov -0x4(%ebp),%ebx 10ec1b: c9 leave /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 10ec1c: e9 23 dc ff ff jmp 10c844 <_Chain_Extract> 10ec21: 8d 76 00 lea 0x0(%esi),%esi } 10ec24: 8b 5d fc mov -0x4(%ebp),%ebx 10ec27: c9 leave 10ec28: c3 ret =============================================================================== 0010d82c <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 10d82c: 55 push %ebp 10d82d: 89 e5 mov %esp,%ebp 10d82f: 56 push %esi 10d830: 53 push %ebx 10d831: 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 ); } } 10d834: 8b 1d 0c 67 12 00 mov 0x12670c,%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 10d83a: 81 fb 10 67 12 00 cmp $0x126710,%ebx 10d840: 74 1c je 10d85e <_User_extensions_Thread_begin+0x32><== NEVER TAKEN 10d842: 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 ) 10d844: 8b 43 28 mov 0x28(%ebx),%eax 10d847: 85 c0 test %eax,%eax 10d849: 74 09 je 10d854 <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 10d84b: 83 ec 0c sub $0xc,%esp 10d84e: 56 push %esi 10d84f: ff d0 call *%eax 10d851: 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 ) { 10d854: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 10d856: 81 fb 10 67 12 00 cmp $0x126710,%ebx 10d85c: 75 e6 jne 10d844 <_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 ); } } 10d85e: 8d 65 f8 lea -0x8(%ebp),%esp 10d861: 5b pop %ebx 10d862: 5e pop %esi 10d863: c9 leave 10d864: c3 ret =============================================================================== 0010d8f4 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 10d8f4: 55 push %ebp 10d8f5: 89 e5 mov %esp,%ebp 10d8f7: 56 push %esi 10d8f8: 53 push %ebx 10d8f9: 8b 75 08 mov 0x8(%ebp),%esi return false; } } return true; } 10d8fc: 8b 1d 0c 67 12 00 mov 0x12670c,%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 10d902: 81 fb 10 67 12 00 cmp $0x126710,%ebx 10d908: 74 26 je 10d930 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN 10d90a: 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 ) { 10d90c: 8b 43 14 mov 0x14(%ebx),%eax 10d90f: 85 c0 test %eax,%eax 10d911: 74 13 je 10d926 <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 10d913: 83 ec 08 sub $0x8,%esp 10d916: 56 push %esi 10d917: ff 35 78 67 12 00 pushl 0x126778 10d91d: ff d0 call *%eax _Thread_Executing, the_thread ); if ( !status ) 10d91f: 83 c4 10 add $0x10,%esp 10d922: 84 c0 test %al,%al 10d924: 74 16 je 10d93c <_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 ) { 10d926: 8b 1b mov (%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 10d928: 81 fb 10 67 12 00 cmp $0x126710,%ebx 10d92e: 75 dc jne 10d90c <_User_extensions_Thread_create+0x18> if ( !status ) return false; } } return true; 10d930: b0 01 mov $0x1,%al } 10d932: 8d 65 f8 lea -0x8(%ebp),%esp 10d935: 5b pop %ebx 10d936: 5e pop %esi 10d937: c9 leave 10d938: c3 ret 10d939: 8d 76 00 lea 0x0(%esi),%esi status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) return false; 10d93c: 31 c0 xor %eax,%eax } } return true; } 10d93e: 8d 65 f8 lea -0x8(%ebp),%esp 10d941: 5b pop %ebx 10d942: 5e pop %esi 10d943: c9 leave 10d944: c3 ret =============================================================================== 0010d948 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 10d948: 55 push %ebp 10d949: 89 e5 mov %esp,%ebp 10d94b: 56 push %esi 10d94c: 53 push %ebx 10d94d: 8b 75 08 mov 0x8(%ebp),%esi (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10d950: 8b 1d 14 67 12 00 mov 0x126714,%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 10d956: 81 fb 0c 67 12 00 cmp $0x12670c,%ebx 10d95c: 74 23 je 10d981 <_User_extensions_Thread_delete+0x39><== NEVER TAKEN 10d95e: 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 ) 10d960: 8b 43 20 mov 0x20(%ebx),%eax 10d963: 85 c0 test %eax,%eax 10d965: 74 0f je 10d976 <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 10d967: 83 ec 08 sub $0x8,%esp 10d96a: 56 push %esi 10d96b: ff 35 78 67 12 00 pushl 0x126778 10d971: ff d0 call *%eax 10d973: 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 ) { 10d976: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 10d979: 81 fb 0c 67 12 00 cmp $0x12670c,%ebx 10d97f: 75 df jne 10d960 <_User_extensions_Thread_delete+0x18> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10d981: 8d 65 f8 lea -0x8(%ebp),%esp 10d984: 5b pop %ebx 10d985: 5e pop %esi 10d986: c9 leave 10d987: c3 ret =============================================================================== 0010d868 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10d868: 55 push %ebp 10d869: 89 e5 mov %esp,%ebp 10d86b: 56 push %esi 10d86c: 53 push %ebx 10d86d: 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 ); } } 10d870: 8b 1d 14 67 12 00 mov 0x126714,%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 10d876: 81 fb 0c 67 12 00 cmp $0x12670c,%ebx 10d87c: 74 1d je 10d89b <_User_extensions_Thread_exitted+0x33><== NEVER TAKEN 10d87e: 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 ) 10d880: 8b 43 2c mov 0x2c(%ebx),%eax 10d883: 85 c0 test %eax,%eax 10d885: 74 09 je 10d890 <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 10d887: 83 ec 0c sub $0xc,%esp 10d88a: 56 push %esi 10d88b: ff d0 call *%eax 10d88d: 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 ) { 10d890: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 10d893: 81 fb 0c 67 12 00 cmp $0x12670c,%ebx 10d899: 75 e5 jne 10d880 <_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 ); } } 10d89b: 8d 65 f8 lea -0x8(%ebp),%esp 10d89e: 5b pop %ebx 10d89f: 5e pop %esi 10d8a0: c9 leave 10d8a1: c3 ret =============================================================================== 0010e4d4 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 10e4d4: 55 push %ebp 10e4d5: 89 e5 mov %esp,%ebp 10e4d7: 56 push %esi 10e4d8: 53 push %ebx 10e4d9: 8b 75 08 mov 0x8(%ebp),%esi (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10e4dc: 8b 1d ec 76 12 00 mov 0x1276ec,%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 10e4e2: 81 fb f0 76 12 00 cmp $0x1276f0,%ebx 10e4e8: 74 22 je 10e50c <_User_extensions_Thread_restart+0x38><== NEVER TAKEN 10e4ea: 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 ) 10e4ec: 8b 43 1c mov 0x1c(%ebx),%eax 10e4ef: 85 c0 test %eax,%eax 10e4f1: 74 0f je 10e502 <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 10e4f3: 83 ec 08 sub $0x8,%esp 10e4f6: 56 push %esi 10e4f7: ff 35 58 77 12 00 pushl 0x127758 10e4fd: ff d0 call *%eax 10e4ff: 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 ) { 10e502: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 10e504: 81 fb f0 76 12 00 cmp $0x1276f0,%ebx 10e50a: 75 e0 jne 10e4ec <_User_extensions_Thread_restart+0x18> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10e50c: 8d 65 f8 lea -0x8(%ebp),%esp 10e50f: 5b pop %ebx 10e510: 5e pop %esi 10e511: c9 leave 10e512: c3 ret =============================================================================== 0010d988 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 10d988: 55 push %ebp 10d989: 89 e5 mov %esp,%ebp 10d98b: 56 push %esi 10d98c: 53 push %ebx 10d98d: 8b 75 08 mov 0x8(%ebp),%esi (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10d990: 8b 1d 0c 67 12 00 mov 0x12670c,%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 10d996: 81 fb 10 67 12 00 cmp $0x126710,%ebx 10d99c: 74 22 je 10d9c0 <_User_extensions_Thread_start+0x38><== NEVER TAKEN 10d99e: 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 ) 10d9a0: 8b 43 18 mov 0x18(%ebx),%eax 10d9a3: 85 c0 test %eax,%eax 10d9a5: 74 0f je 10d9b6 <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 10d9a7: 83 ec 08 sub $0x8,%esp 10d9aa: 56 push %esi 10d9ab: ff 35 78 67 12 00 pushl 0x126778 10d9b1: ff d0 call *%eax 10d9b3: 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 ) { 10d9b6: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 10d9b8: 81 fb 10 67 12 00 cmp $0x126710,%ebx 10d9be: 75 e0 jne 10d9a0 <_User_extensions_Thread_start+0x18> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10d9c0: 8d 65 f8 lea -0x8(%ebp),%esp 10d9c3: 5b pop %ebx 10d9c4: 5e pop %esi 10d9c5: c9 leave 10d9c6: c3 ret =============================================================================== 0010d9c8 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 10d9c8: 55 push %ebp 10d9c9: 89 e5 mov %esp,%ebp 10d9cb: 57 push %edi 10d9cc: 56 push %esi 10d9cd: 53 push %ebx 10d9ce: 83 ec 0c sub $0xc,%esp 10d9d1: 8b 7d 08 mov 0x8(%ebp),%edi 10d9d4: 8b 75 0c mov 0xc(%ebp),%esi the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10d9d7: 8b 1d f0 64 12 00 mov 0x1264f0,%ebx ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); 10d9dd: 81 fb f4 64 12 00 cmp $0x1264f4,%ebx 10d9e3: 74 18 je 10d9fd <_User_extensions_Thread_switch+0x35><== NEVER TAKEN 10d9e5: 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 ); 10d9e8: 83 ec 08 sub $0x8,%esp 10d9eb: 56 push %esi 10d9ec: 57 push %edi 10d9ed: 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 ) { 10d9f0: 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 ); 10d9f2: 83 c4 10 add $0x10,%esp 10d9f5: 81 fb f4 64 12 00 cmp $0x1264f4,%ebx 10d9fb: 75 eb jne 10d9e8 <_User_extensions_Thread_switch+0x20> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10d9fd: 8d 65 f4 lea -0xc(%ebp),%esp 10da00: 5b pop %ebx 10da01: 5e pop %esi 10da02: 5f pop %edi 10da03: c9 leave 10da04: c3 ret =============================================================================== 0010f228 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10f228: 55 push %ebp 10f229: 89 e5 mov %esp,%ebp 10f22b: 57 push %edi 10f22c: 56 push %esi 10f22d: 53 push %ebx 10f22e: 83 ec 1c sub $0x1c,%esp 10f231: 8b 75 08 mov 0x8(%ebp),%esi 10f234: 8b 4d 0c mov 0xc(%ebp),%ecx 10f237: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10f23a: 9c pushf 10f23b: fa cli 10f23c: 58 pop %eax } } _ISR_Enable( level ); } 10f23d: 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 ); 10f23f: 8d 7e 04 lea 0x4(%esi),%edi 10f242: 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 ) ) { 10f245: 39 fa cmp %edi,%edx 10f247: 74 3d je 10f286 <_Watchdog_Adjust+0x5e> switch ( direction ) { 10f249: 85 c9 test %ecx,%ecx 10f24b: 75 43 jne 10f290 <_Watchdog_Adjust+0x68> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10f24d: 85 db test %ebx,%ebx 10f24f: 74 35 je 10f286 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 10f251: 8b 7a 10 mov 0x10(%edx),%edi 10f254: 39 fb cmp %edi,%ebx 10f256: 73 0f jae 10f267 <_Watchdog_Adjust+0x3f> <== ALWAYS TAKEN 10f258: eb 3e jmp 10f298 <_Watchdog_Adjust+0x70> <== NOT EXECUTED 10f25a: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10f25c: 29 fb sub %edi,%ebx 10f25e: 74 26 je 10f286 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 10f260: 8b 7a 10 mov 0x10(%edx),%edi 10f263: 39 df cmp %ebx,%edi 10f265: 77 31 ja 10f298 <_Watchdog_Adjust+0x70> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10f267: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10f26e: 50 push %eax 10f26f: 9d popf _Watchdog_Tickle( header ); 10f270: 83 ec 0c sub $0xc,%esp 10f273: 56 push %esi 10f274: e8 d3 01 00 00 call 10f44c <_Watchdog_Tickle> _ISR_Disable( level ); 10f279: 9c pushf 10f27a: fa cli 10f27b: 58 pop %eax } } _ISR_Enable( level ); } 10f27c: 8b 16 mov (%esi),%edx _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 10f27e: 83 c4 10 add $0x10,%esp 10f281: 39 55 e4 cmp %edx,-0x1c(%ebp) 10f284: 75 d6 jne 10f25c <_Watchdog_Adjust+0x34> } break; } } _ISR_Enable( level ); 10f286: 50 push %eax 10f287: 9d popf } 10f288: 8d 65 f4 lea -0xc(%ebp),%esp 10f28b: 5b pop %ebx 10f28c: 5e pop %esi 10f28d: 5f pop %edi 10f28e: c9 leave 10f28f: c3 ret * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 10f290: 49 dec %ecx 10f291: 75 f3 jne 10f286 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10f293: 01 5a 10 add %ebx,0x10(%edx) break; 10f296: eb ee jmp 10f286 <_Watchdog_Adjust+0x5e> case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 10f298: 29 df sub %ebx,%edi 10f29a: 89 7a 10 mov %edi,0x10(%edx) break; 10f29d: eb e7 jmp 10f286 <_Watchdog_Adjust+0x5e> =============================================================================== 0010da08 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10da08: 55 push %ebp 10da09: 89 e5 mov %esp,%ebp 10da0b: 57 push %edi 10da0c: 56 push %esi 10da0d: 53 push %ebx 10da0e: 83 ec 04 sub $0x4,%esp 10da11: 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; 10da14: 8b 3d 74 67 12 00 mov 0x126774,%edi _ISR_Disable( level ); 10da1a: 9c pushf 10da1b: fa cli 10da1c: 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 ) { 10da1f: 8b 43 08 mov 0x8(%ebx),%eax 10da22: 85 c0 test %eax,%eax 10da24: 0f 85 9e 00 00 00 jne 10dac8 <_Watchdog_Insert+0xc0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10da2a: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx) _Watchdog_Sync_count++; 10da31: a1 20 66 12 00 mov 0x126620,%eax 10da36: 40 inc %eax 10da37: a3 20 66 12 00 mov %eax,0x126620 restart: delta_interval = the_watchdog->initial; 10da3c: 8b 43 0c mov 0xc(%ebx),%eax RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) _Chain_First( header ) ); 10da3f: 8b 4d 08 mov 0x8(%ebp),%ecx 10da42: 8b 11 mov (%ecx),%edx for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10da44: 85 c0 test %eax,%eax 10da46: 74 5d je 10daa5 <_Watchdog_Insert+0x9d> 10da48: 8b 32 mov (%edx),%esi 10da4a: 85 f6 test %esi,%esi 10da4c: 74 57 je 10daa5 <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10da4e: 8b 4a 10 mov 0x10(%edx),%ecx 10da51: 39 c8 cmp %ecx,%eax 10da53: 73 22 jae 10da77 <_Watchdog_Insert+0x6f> 10da55: eb 49 jmp 10daa0 <_Watchdog_Insert+0x98> 10da57: 90 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10da58: 8b 35 a4 65 12 00 mov 0x1265a4,%esi 10da5e: 39 f7 cmp %esi,%edi 10da60: 72 72 jb 10dad4 <_Watchdog_Insert+0xcc> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10da62: 29 c8 sub %ecx,%eax exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10da64: 8b 12 mov (%edx),%edx for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10da66: 85 c0 test %eax,%eax 10da68: 74 3b je 10daa5 <_Watchdog_Insert+0x9d> 10da6a: 8b 0a mov (%edx),%ecx 10da6c: 85 c9 test %ecx,%ecx 10da6e: 74 35 je 10daa5 <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10da70: 8b 4a 10 mov 0x10(%edx),%ecx 10da73: 39 c1 cmp %eax,%ecx 10da75: 77 29 ja 10daa0 <_Watchdog_Insert+0x98> break; } delta_interval -= after->delta_interval; _ISR_Flash( level ); 10da77: ff 75 f0 pushl -0x10(%ebp) 10da7a: 9d popf 10da7b: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10da7c: 83 7b 08 01 cmpl $0x1,0x8(%ebx) 10da80: 74 d6 je 10da58 <_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; 10da82: 89 3d a4 65 12 00 mov %edi,0x1265a4 _Watchdog_Sync_count--; 10da88: a1 20 66 12 00 mov 0x126620,%eax 10da8d: 48 dec %eax 10da8e: a3 20 66 12 00 mov %eax,0x126620 _ISR_Enable( level ); 10da93: ff 75 f0 pushl -0x10(%ebp) 10da96: 9d popf } 10da97: 58 pop %eax 10da98: 5b pop %ebx 10da99: 5e pop %esi 10da9a: 5f pop %edi 10da9b: c9 leave 10da9c: c3 ret 10da9d: 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; 10daa0: 29 c1 sub %eax,%ecx 10daa2: 89 4a 10 mov %ecx,0x10(%edx) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 10daa5: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10daac: 89 43 10 mov %eax,0x10(%ebx) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10daaf: 8b 42 04 mov 0x4(%edx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10dab2: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10dab5: 8b 10 mov (%eax),%edx after_node->next = the_node; 10dab7: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10dab9: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10dabb: 89 5a 04 mov %ebx,0x4(%edx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10dabe: a1 24 66 12 00 mov 0x126624,%eax 10dac3: 89 43 14 mov %eax,0x14(%ebx) 10dac6: eb ba jmp 10da82 <_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 ); 10dac8: ff 75 f0 pushl -0x10(%ebp) 10dacb: 9d popf exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10dacc: 58 pop %eax 10dacd: 5b pop %ebx 10dace: 5e pop %esi 10dacf: 5f pop %edi 10dad0: c9 leave 10dad1: c3 ret 10dad2: 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; 10dad4: 89 3d a4 65 12 00 mov %edi,0x1265a4 goto restart; 10dada: e9 5d ff ff ff jmp 10da3c <_Watchdog_Insert+0x34> =============================================================================== 0010db48 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10db48: 55 push %ebp 10db49: 89 e5 mov %esp,%ebp 10db4b: 56 push %esi 10db4c: 53 push %ebx 10db4d: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10db50: 9c pushf 10db51: fa cli 10db52: 59 pop %ecx previous_state = the_watchdog->state; 10db53: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10db56: 83 f8 01 cmp $0x1,%eax 10db59: 74 4d je 10dba8 <_Watchdog_Remove+0x60> 10db5b: 73 0f jae 10db6c <_Watchdog_Remove+0x24> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10db5d: 8b 1d 24 66 12 00 mov 0x126624,%ebx 10db63: 89 5a 18 mov %ebx,0x18(%edx) _ISR_Enable( level ); 10db66: 51 push %ecx 10db67: 9d popf return( previous_state ); } 10db68: 5b pop %ebx 10db69: 5e pop %esi 10db6a: c9 leave 10db6b: c3 ret Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 10db6c: 83 f8 03 cmp $0x3,%eax 10db6f: 77 ec ja 10db5d <_Watchdog_Remove+0x15> <== NEVER TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10db71: 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 ); } 10db78: 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) ) 10db7a: 8b 33 mov (%ebx),%esi 10db7c: 85 f6 test %esi,%esi 10db7e: 74 06 je 10db86 <_Watchdog_Remove+0x3e> next_watchdog->delta_interval += the_watchdog->delta_interval; 10db80: 8b 72 10 mov 0x10(%edx),%esi 10db83: 01 73 10 add %esi,0x10(%ebx) if ( _Watchdog_Sync_count ) 10db86: 8b 35 20 66 12 00 mov 0x126620,%esi 10db8c: 85 f6 test %esi,%esi 10db8e: 74 0c je 10db9c <_Watchdog_Remove+0x54> _Watchdog_Sync_level = _ISR_Nest_level; 10db90: 8b 35 74 67 12 00 mov 0x126774,%esi 10db96: 89 35 a4 65 12 00 mov %esi,0x1265a4 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10db9c: 8b 72 04 mov 0x4(%edx),%esi next->previous = previous; 10db9f: 89 73 04 mov %esi,0x4(%ebx) previous->next = next; 10dba2: 89 1e mov %ebx,(%esi) 10dba4: eb b7 jmp 10db5d <_Watchdog_Remove+0x15> 10dba6: 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; 10dba8: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10dbaf: eb ac jmp 10db5d <_Watchdog_Remove+0x15> =============================================================================== 0010ee6c <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 10ee6c: 55 push %ebp 10ee6d: 89 e5 mov %esp,%ebp 10ee6f: 57 push %edi 10ee70: 56 push %esi 10ee71: 53 push %ebx 10ee72: 83 ec 2c sub $0x2c,%esp 10ee75: 8b 55 08 mov 0x8(%ebp),%edx 10ee78: 8b 45 0c mov 0xc(%ebp),%eax printk( 10ee7b: 8b 78 24 mov 0x24(%eax),%edi 10ee7e: 8b 70 20 mov 0x20(%eax),%esi 10ee81: 8b 58 1c mov 0x1c(%eax),%ebx 10ee84: 8b 48 0c mov 0xc(%eax),%ecx 10ee87: 89 4d d4 mov %ecx,-0x2c(%ebp) 10ee8a: 8b 48 10 mov 0x10(%eax),%ecx 10ee8d: 89 4d e4 mov %ecx,-0x1c(%ebp) 10ee90: 85 d2 test %edx,%edx 10ee92: 74 2c je 10eec0 <_Watchdog_Report+0x54> 10ee94: b9 e3 19 12 00 mov $0x1219e3,%ecx 10ee99: 83 ec 0c sub $0xc,%esp 10ee9c: 57 push %edi 10ee9d: 56 push %esi 10ee9e: 53 push %ebx 10ee9f: 50 push %eax 10eea0: ff 75 d4 pushl -0x2c(%ebp) 10eea3: ff 75 e4 pushl -0x1c(%ebp) 10eea6: 51 push %ecx 10eea7: 52 push %edx 10eea8: 68 36 24 12 00 push $0x122436 10eead: e8 7e a1 ff ff call 109030 10eeb2: 83 c4 30 add $0x30,%esp watch, watch->routine, watch->id, watch->user_data ); } 10eeb5: 8d 65 f4 lea -0xc(%ebp),%esp 10eeb8: 5b pop %ebx 10eeb9: 5e pop %esi 10eeba: 5f pop %edi 10eebb: c9 leave 10eebc: c3 ret 10eebd: 8d 76 00 lea 0x0(%esi),%esi void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( 10eec0: b9 a9 22 12 00 mov $0x1222a9,%ecx 10eec5: 89 ca mov %ecx,%edx 10eec7: eb d0 jmp 10ee99 <_Watchdog_Report+0x2d> =============================================================================== 0010edfc <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10edfc: 55 push %ebp 10edfd: 89 e5 mov %esp,%ebp 10edff: 57 push %edi 10ee00: 56 push %esi 10ee01: 53 push %ebx 10ee02: 83 ec 20 sub $0x20,%esp 10ee05: 8b 7d 08 mov 0x8(%ebp),%edi 10ee08: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10ee0b: 9c pushf 10ee0c: fa cli 10ee0d: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10ee10: 56 push %esi 10ee11: 57 push %edi 10ee12: 68 00 24 12 00 push $0x122400 10ee17: e8 14 a2 ff ff call 109030 printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); } 10ee1c: 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 ); 10ee1e: 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 ) ) { 10ee21: 83 c4 10 add $0x10,%esp 10ee24: 39 f3 cmp %esi,%ebx 10ee26: 74 31 je 10ee59 <_Watchdog_Report_chain+0x5d> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10ee28: 83 ec 08 sub $0x8,%esp 10ee2b: 53 push %ebx 10ee2c: 6a 00 push $0x0 10ee2e: e8 39 00 00 00 call 10ee6c <_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 ) 10ee33: 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 ) ; 10ee35: 83 c4 10 add $0x10,%esp 10ee38: 39 f3 cmp %esi,%ebx 10ee3a: 75 ec jne 10ee28 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10ee3c: 83 ec 08 sub $0x8,%esp 10ee3f: 57 push %edi 10ee40: 68 17 24 12 00 push $0x122417 10ee45: e8 e6 a1 ff ff call 109030 10ee4a: 83 c4 10 add $0x10,%esp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 10ee4d: ff 75 e4 pushl -0x1c(%ebp) 10ee50: 9d popf } 10ee51: 8d 65 f4 lea -0xc(%ebp),%esp 10ee54: 5b pop %ebx 10ee55: 5e pop %esi 10ee56: 5f pop %edi 10ee57: c9 leave 10ee58: c3 ret _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 10ee59: 83 ec 0c sub $0xc,%esp 10ee5c: 68 26 24 12 00 push $0x122426 10ee61: e8 ca a1 ff ff call 109030 10ee66: 83 c4 10 add $0x10,%esp 10ee69: eb e2 jmp 10ee4d <_Watchdog_Report_chain+0x51> =============================================================================== 0010dbb4 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10dbb4: 55 push %ebp 10dbb5: 89 e5 mov %esp,%ebp 10dbb7: 57 push %edi 10dbb8: 56 push %esi 10dbb9: 53 push %ebx 10dbba: 83 ec 1c sub $0x1c,%esp 10dbbd: 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 ); 10dbc0: 9c pushf 10dbc1: fa cli 10dbc2: 5e pop %esi } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } 10dbc3: 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 ); 10dbc5: 8d 47 04 lea 0x4(%edi),%eax 10dbc8: 89 45 e4 mov %eax,-0x1c(%ebp) * volatile data - till, 2003/7 */ _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 10dbcb: 39 c3 cmp %eax,%ebx 10dbcd: 74 11 je 10dbe0 <_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) { 10dbcf: 8b 43 10 mov 0x10(%ebx),%eax 10dbd2: 85 c0 test %eax,%eax 10dbd4: 74 34 je 10dc0a <_Watchdog_Tickle+0x56> the_watchdog->delta_interval--; 10dbd6: 48 dec %eax 10dbd7: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10dbda: 85 c0 test %eax,%eax 10dbdc: 74 2c je 10dc0a <_Watchdog_Tickle+0x56> 10dbde: 66 90 xchg %ax,%ax the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 10dbe0: 56 push %esi 10dbe1: 9d popf } 10dbe2: 8d 65 f4 lea -0xc(%ebp),%esp 10dbe5: 5b pop %ebx 10dbe6: 5e pop %esi 10dbe7: 5f pop %edi 10dbe8: c9 leave 10dbe9: c3 ret _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10dbea: 83 ec 08 sub $0x8,%esp 10dbed: ff 73 24 pushl 0x24(%ebx) 10dbf0: ff 73 20 pushl 0x20(%ebx) 10dbf3: ff 53 1c call *0x1c(%ebx) the_watchdog->id, the_watchdog->user_data ); break; 10dbf6: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10dbf9: 9c pushf 10dbfa: fa cli 10dbfb: 5e pop %esi } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } 10dbfc: 8b 1f mov (%edi),%ebx _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10dbfe: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10dc01: 74 dd je 10dbe0 <_Watchdog_Tickle+0x2c> } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && 10dc03: 8b 43 10 mov 0x10(%ebx),%eax 10dc06: 85 c0 test %eax,%eax 10dc08: 75 d6 jne 10dbe0 <_Watchdog_Tickle+0x2c> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10dc0a: 83 ec 0c sub $0xc,%esp 10dc0d: 53 push %ebx 10dc0e: e8 35 ff ff ff call 10db48 <_Watchdog_Remove> _ISR_Enable( level ); 10dc13: 56 push %esi 10dc14: 9d popf switch( watchdog_state ) { 10dc15: 83 c4 10 add $0x10,%esp 10dc18: 83 f8 02 cmp $0x2,%eax 10dc1b: 75 dc jne 10dbf9 <_Watchdog_Tickle+0x45> <== NEVER TAKEN 10dc1d: eb cb jmp 10dbea <_Watchdog_Tickle+0x36> =============================================================================== 0010dc20 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 10dc20: 55 push %ebp 10dc21: 89 e5 mov %esp,%ebp 10dc23: 57 push %edi 10dc24: 53 push %ebx uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 10dc25: 8b 1d 00 23 12 00 mov 0x122300,%ebx uintptr_t size = Configuration.work_space_size; 10dc2b: 8b 15 04 23 12 00 mov 0x122304,%edx if ( Configuration.do_zero_of_workspace ) 10dc31: 80 3d 28 23 12 00 00 cmpb $0x0,0x122328 10dc38: 75 1e jne 10dc58 <_Workspace_Handler_initialization+0x38> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 10dc3a: 6a 04 push $0x4 10dc3c: 52 push %edx 10dc3d: 53 push %ebx 10dc3e: 68 20 65 12 00 push $0x126520 10dc43: e8 18 de ff ff call 10ba60 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 10dc48: 83 c4 10 add $0x10,%esp 10dc4b: 85 c0 test %eax,%eax 10dc4d: 74 13 je 10dc62 <_Workspace_Handler_initialization+0x42> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 10dc4f: 8d 65 f8 lea -0x8(%ebp),%esp 10dc52: 5b pop %ebx 10dc53: 5f pop %edi 10dc54: c9 leave 10dc55: c3 ret 10dc56: 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 ); 10dc58: 31 c0 xor %eax,%eax 10dc5a: 89 df mov %ebx,%edi 10dc5c: 89 d1 mov %edx,%ecx 10dc5e: f3 aa rep stos %al,%es:(%edi) 10dc60: eb d8 jmp 10dc3a <_Workspace_Handler_initialization+0x1a> size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 10dc62: 50 push %eax 10dc63: 6a 02 push $0x2 10dc65: 6a 01 push $0x1 10dc67: 6a 00 push $0x0 10dc69: e8 fa df ff ff call 10bc68 <_Internal_error_Occurred> =============================================================================== 00112024 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 112024: 55 push %ebp 112025: 89 e5 mov %esp,%ebp 112027: 57 push %edi 112028: 56 push %esi 112029: 53 push %ebx 11202a: 83 ec 2c sub $0x2c,%esp 11202d: 8b 5d 08 mov 0x8(%ebp),%ebx 112030: 8b 7d 0c mov 0xc(%ebp),%edi 112033: 8b 45 10 mov 0x10(%ebp),%eax 112036: 8b 75 14 mov 0x14(%ebp),%esi Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 112039: 85 db test %ebx,%ebx 11203b: 0f 84 87 00 00 00 je 1120c8 return RTEMS_INVALID_NAME; if ( !id ) 112041: 85 f6 test %esi,%esi 112043: 0f 84 bf 00 00 00 je 112108 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 112049: f7 c7 10 00 00 00 test $0x10,%edi 11204f: 0f 84 83 00 00 00 je 1120d8 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 112055: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) if ( maximum_waiters == 0 ) 11205c: 85 c0 test %eax,%eax 11205e: 0f 84 80 00 00 00 je 1120e4 return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 112064: 89 45 e4 mov %eax,-0x1c(%ebp) 112067: a1 ec 88 12 00 mov 0x1288ec,%eax 11206c: 40 inc %eax 11206d: a3 ec 88 12 00 mov %eax,0x1288ec * 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 ); 112072: 83 ec 0c sub $0xc,%esp 112075: 68 e0 8b 12 00 push $0x128be0 11207a: e8 45 b9 ff ff call 10d9c4 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 11207f: 83 c4 10 add $0x10,%esp 112082: 85 c0 test %eax,%eax 112084: 74 6e je 1120f4 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 112086: 89 78 10 mov %edi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 112089: 83 ec 08 sub $0x8,%esp 11208c: 8d 55 e0 lea -0x20(%ebp),%edx 11208f: 52 push %edx 112090: 8d 50 14 lea 0x14(%eax),%edx 112093: 52 push %edx 112094: 89 45 d4 mov %eax,-0x2c(%ebp) 112097: e8 44 0a 00 00 call 112ae0 <_CORE_barrier_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 11209c: 8b 45 d4 mov -0x2c(%ebp),%eax 11209f: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 1120a2: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1120a5: 8b 0d fc 8b 12 00 mov 0x128bfc,%ecx 1120ab: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1120ae: 89 58 0c mov %ebx,0xc(%eax) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 1120b1: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 1120b3: e8 c8 c8 ff ff call 10e980 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1120b8: 83 c4 10 add $0x10,%esp 1120bb: 31 c0 xor %eax,%eax } 1120bd: 8d 65 f4 lea -0xc(%ebp),%esp 1120c0: 5b pop %ebx 1120c1: 5e pop %esi 1120c2: 5f pop %edi 1120c3: c9 leave 1120c4: c3 ret 1120c5: 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; 1120c8: b8 03 00 00 00 mov $0x3,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1120cd: 8d 65 f4 lea -0xc(%ebp),%esp 1120d0: 5b pop %ebx 1120d1: 5e pop %esi 1120d2: 5f pop %edi 1120d3: c9 leave 1120d4: c3 ret 1120d5: 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; 1120d8: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) 1120df: eb 83 jmp 112064 1120e1: 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; 1120e4: b8 0a 00 00 00 mov $0xa,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1120e9: 8d 65 f4 lea -0xc(%ebp),%esp 1120ec: 5b pop %ebx 1120ed: 5e pop %esi 1120ee: 5f pop %edi 1120ef: c9 leave 1120f0: c3 ret 1120f1: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 1120f4: e8 87 c8 ff ff call 10e980 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 1120f9: b8 05 00 00 00 mov $0x5,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1120fe: 8d 65 f4 lea -0xc(%ebp),%esp 112101: 5b pop %ebx 112102: 5e pop %esi 112103: 5f pop %edi 112104: c9 leave 112105: c3 ret 112106: 66 90 xchg %ax,%ax if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 112108: b8 09 00 00 00 mov $0x9,%eax 11210d: eb ae jmp 1120bd =============================================================================== 0010b708 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { 10b708: 55 push %ebp 10b709: 89 e5 mov %esp,%ebp 10b70b: 56 push %esi 10b70c: 53 push %ebx 10b70d: 8b 5d 10 mov 0x10(%ebp),%ebx 10b710: 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 ); 10b713: 83 ec 08 sub $0x8,%esp 10b716: ff 75 0c pushl 0xc(%ebp) 10b719: ff 75 08 pushl 0x8(%ebp) 10b71c: e8 9f 04 00 00 call 10bbc0 <_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 ) { 10b721: 83 c4 10 add $0x10,%esp 10b724: 84 c0 test %al,%al 10b726: 75 0c jne 10b734 sc = rtems_event_send( task, events ); } return sc; } 10b728: 31 c0 xor %eax,%eax 10b72a: 8d 65 f8 lea -0x8(%ebp),%esp 10b72d: 5b pop %ebx 10b72e: 5e pop %esi 10b72f: c9 leave 10b730: c3 ret 10b731: 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 ); 10b734: 89 75 0c mov %esi,0xc(%ebp) 10b737: 89 5d 08 mov %ebx,0x8(%ebp) } return sc; } 10b73a: 8d 65 f8 lea -0x8(%ebp),%esp 10b73d: 5b pop %ebx 10b73e: 5e pop %esi 10b73f: 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 ); 10b740: e9 5f f6 ff ff jmp 10ada4 =============================================================================== 0010b748 : rtems_chain_control *chain, rtems_id task, rtems_event_set events, rtems_chain_node **node ) { 10b748: 55 push %ebp 10b749: 89 e5 mov %esp,%ebp 10b74b: 56 push %esi 10b74c: 53 push %ebx 10b74d: 8b 5d 0c mov 0xc(%ebp),%ebx 10b750: 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 ); 10b753: 83 ec 08 sub $0x8,%esp 10b756: ff 75 14 pushl 0x14(%ebp) 10b759: ff 75 08 pushl 0x8(%ebp) 10b75c: e8 c7 04 00 00 call 10bc28 <_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 ) { 10b761: 83 c4 10 add $0x10,%esp 10b764: 84 c0 test %al,%al 10b766: 75 0c jne 10b774 sc = rtems_event_send( task, events ); } return sc; } 10b768: 31 c0 xor %eax,%eax 10b76a: 8d 65 f8 lea -0x8(%ebp),%esp 10b76d: 5b pop %ebx 10b76e: 5e pop %esi 10b76f: c9 leave 10b770: c3 ret 10b771: 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 ); 10b774: 89 75 0c mov %esi,0xc(%ebp) 10b777: 89 5d 08 mov %ebx,0x8(%ebp) } return sc; } 10b77a: 8d 65 f8 lea -0x8(%ebp),%esp 10b77d: 5b pop %ebx 10b77e: 5e pop %esi 10b77f: 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 ); 10b780: e9 1f f6 ff ff jmp 10ada4 =============================================================================== 0010b788 : rtems_chain_control *chain, rtems_event_set events, rtems_interval timeout, rtems_chain_node **node_ptr ) { 10b788: 55 push %ebp 10b789: 89 e5 mov %esp,%ebp 10b78b: 57 push %edi 10b78c: 56 push %esi 10b78d: 53 push %ebx 10b78e: 83 ec 1c sub $0x1c,%esp 10b791: 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( 10b794: 8d 7d e4 lea -0x1c(%ebp),%edi 10b797: 90 nop */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 10b798: 83 ec 0c sub $0xc,%esp 10b79b: 56 push %esi 10b79c: e8 c3 04 00 00 call 10bc64 <_Chain_Get> 10b7a1: 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 10b7a3: 83 c4 10 add $0x10,%esp 10b7a6: 85 c0 test %eax,%eax 10b7a8: 75 22 jne 10b7cc ) { rtems_event_set out; sc = rtems_event_receive( 10b7aa: 57 push %edi 10b7ab: ff 75 10 pushl 0x10(%ebp) 10b7ae: 6a 00 push $0x0 10b7b0: ff 75 0c pushl 0xc(%ebp) 10b7b3: e8 64 f4 ff ff call 10ac1c ) { rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( 10b7b8: 83 c4 10 add $0x10,%esp 10b7bb: 85 c0 test %eax,%eax 10b7bd: 74 d9 je 10b798 <== NEVER TAKEN timeout, &out ); } *node_ptr = node; 10b7bf: 8b 55 14 mov 0x14(%ebp),%edx 10b7c2: 89 1a mov %ebx,(%edx) return sc; } 10b7c4: 8d 65 f4 lea -0xc(%ebp),%esp 10b7c7: 5b pop %ebx 10b7c8: 5e pop %esi 10b7c9: 5f pop %edi 10b7ca: c9 leave 10b7cb: c3 ret rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL 10b7cc: 31 c0 xor %eax,%eax timeout, &out ); } *node_ptr = node; 10b7ce: 8b 55 14 mov 0x14(%ebp),%edx 10b7d1: 89 1a mov %ebx,(%edx) return sc; } 10b7d3: 8d 65 f4 lea -0xc(%ebp),%esp 10b7d6: 5b pop %ebx 10b7d7: 5e pop %esi 10b7d8: 5f pop %edi 10b7d9: c9 leave 10b7da: c3 ret =============================================================================== 0010b7dc : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { 10b7dc: 55 push %ebp 10b7dd: 89 e5 mov %esp,%ebp 10b7df: 56 push %esi 10b7e0: 53 push %ebx 10b7e1: 8b 5d 10 mov 0x10(%ebp),%ebx 10b7e4: 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 ); 10b7e7: 83 ec 08 sub $0x8,%esp 10b7ea: ff 75 0c pushl 0xc(%ebp) 10b7ed: ff 75 08 pushl 0x8(%ebp) 10b7f0: e8 b3 04 00 00 call 10bca8 <_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) { 10b7f5: 83 c4 10 add $0x10,%esp 10b7f8: 84 c0 test %al,%al 10b7fa: 75 0c jne 10b808 sc = rtems_event_send( task, events ); } return sc; } 10b7fc: 31 c0 xor %eax,%eax 10b7fe: 8d 65 f8 lea -0x8(%ebp),%esp 10b801: 5b pop %ebx 10b802: 5e pop %esi 10b803: c9 leave 10b804: c3 ret 10b805: 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 ); 10b808: 89 75 0c mov %esi,0xc(%ebp) 10b80b: 89 5d 08 mov %ebx,0x8(%ebp) } return sc; } 10b80e: 8d 65 f8 lea -0x8(%ebp),%esp 10b811: 5b pop %ebx 10b812: 5e pop %esi 10b813: 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 ); 10b814: e9 8b f5 ff ff jmp 10ada4 =============================================================================== 00115088 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 115088: 55 push %ebp 115089: 89 e5 mov %esp,%ebp 11508b: 53 push %ebx 11508c: 83 ec 04 sub $0x4,%esp 11508f: 8b 45 08 mov 0x8(%ebp),%eax 115092: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !time_buffer ) 115095: 85 db test %ebx,%ebx 115097: 74 3b je 1150d4 return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 115099: 85 c0 test %eax,%eax 11509b: 74 2b je 1150c8 return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 11509d: 83 f8 01 cmp $0x1,%eax 1150a0: 74 3e je 1150e0 return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 1150a2: 83 f8 02 cmp $0x2,%eax 1150a5: 74 45 je 1150ec *interval = rtems_clock_get_ticks_since_boot(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 1150a7: 83 f8 03 cmp $0x3,%eax 1150aa: 74 4c je 1150f8 *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 1150ac: 83 f8 04 cmp $0x4,%eax 1150af: 74 0b je 1150bc return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; 1150b1: b8 0a 00 00 00 mov $0xa,%eax } 1150b6: 5a pop %edx 1150b7: 5b pop %ebx 1150b8: c9 leave 1150b9: c3 ret 1150ba: 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 ); 1150bc: 89 5d 08 mov %ebx,0x8(%ebp) return RTEMS_INVALID_NUMBER; } 1150bf: 59 pop %ecx 1150c0: 5b pop %ebx 1150c1: 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 ); 1150c2: e9 41 01 00 00 jmp 115208 1150c7: 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 ); 1150c8: 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; } 1150cb: 58 pop %eax 1150cc: 5b pop %ebx 1150cd: 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 ); 1150ce: e9 81 00 00 00 jmp 115154 1150d3: 90 nop rtems_clock_get_options option, void *time_buffer ) { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 1150d4: 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; } 1150d9: 5a pop %edx 1150da: 5b pop %ebx 1150db: c9 leave 1150dc: c3 ret 1150dd: 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); 1150e0: 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; } 1150e3: 5b pop %ebx 1150e4: 5b pop %ebx 1150e5: 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); 1150e6: e9 19 00 00 00 jmp 115104 1150eb: 90 nop if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 1150ec: e8 57 00 00 00 call 115148 1150f1: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 1150f3: 31 c0 xor %eax,%eax 1150f5: eb bf jmp 1150b6 1150f7: 90 nop } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 1150f8: e8 37 00 00 00 call 115134 1150fd: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 1150ff: 31 c0 xor %eax,%eax 115101: eb b3 jmp 1150b6 =============================================================================== 00115208 : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 115208: 55 push %ebp 115209: 89 e5 mov %esp,%ebp 11520b: 56 push %esi 11520c: 53 push %ebx 11520d: 83 ec 10 sub $0x10,%esp 115210: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !time ) 115213: 85 db test %ebx,%ebx 115215: 74 51 je 115268 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 115217: 80 3d fc 08 14 00 00 cmpb $0x0,0x1408fc 11521e: 75 0c jne 11522c return RTEMS_NOT_DEFINED; 115220: b8 0b 00 00 00 mov $0xb,%eax _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 115225: 8d 65 f8 lea -0x8(%ebp),%esp 115228: 5b pop %ebx 115229: 5e pop %esi 11522a: c9 leave 11522b: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 11522c: 9c pushf 11522d: fa cli 11522e: 5e pop %esi _TOD_Get( &now ); 11522f: 83 ec 0c sub $0xc,%esp 115232: 8d 45 f0 lea -0x10(%ebp),%eax 115235: 50 push %eax 115236: e8 c9 42 00 00 call 119504 <_TOD_Get> _ISR_Enable(level); 11523b: 56 push %esi 11523c: 9d popf useconds = (suseconds_t)now.tv_nsec; 11523d: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 115240: 8b 45 f0 mov -0x10(%ebp),%eax 115243: 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; 115245: b8 d3 4d 62 10 mov $0x10624dd3,%eax 11524a: f7 e9 imul %ecx 11524c: 89 d0 mov %edx,%eax 11524e: c1 f8 06 sar $0x6,%eax 115251: c1 f9 1f sar $0x1f,%ecx 115254: 29 c8 sub %ecx,%eax 115256: 89 43 04 mov %eax,0x4(%ebx) if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; 115259: 83 c4 10 add $0x10,%esp 11525c: 31 c0 xor %eax,%eax } 11525e: 8d 65 f8 lea -0x8(%ebp),%esp 115261: 5b pop %ebx 115262: 5e pop %esi 115263: c9 leave 115264: c3 ret 115265: 8d 76 00 lea 0x0(%esi),%esi rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { if ( !time ) return RTEMS_INVALID_ADDRESS; 115268: b8 09 00 00 00 mov $0x9,%eax 11526d: eb b6 jmp 115225 =============================================================================== 0010a77c : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 10a77c: 55 push %ebp 10a77d: 89 e5 mov %esp,%ebp 10a77f: 83 ec 08 sub $0x8,%esp 10a782: 8b 45 08 mov 0x8(%ebp),%eax if ( !uptime ) 10a785: 85 c0 test %eax,%eax 10a787: 74 13 je 10a79c return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 10a789: 83 ec 0c sub $0xc,%esp 10a78c: 50 push %eax 10a78d: e8 42 14 00 00 call 10bbd4 <_TOD_Get_uptime_as_timespec> return RTEMS_SUCCESSFUL; 10a792: 83 c4 10 add $0x10,%esp 10a795: 31 c0 xor %eax,%eax } 10a797: c9 leave 10a798: c3 ret 10a799: 8d 76 00 lea 0x0(%esi),%esi rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime ) return RTEMS_INVALID_ADDRESS; 10a79c: b8 09 00 00 00 mov $0x9,%eax _TOD_Get_uptime_as_timespec( uptime ); return RTEMS_SUCCESSFUL; } 10a7a1: c9 leave 10a7a2: c3 ret =============================================================================== 0010b6f8 : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 10b6f8: 55 push %ebp 10b6f9: 89 e5 mov %esp,%ebp 10b6fb: 53 push %ebx 10b6fc: 83 ec 14 sub $0x14,%esp 10b6ff: 8b 5d 08 mov 0x8(%ebp),%ebx struct timespec newtime; if ( !time_buffer ) 10b702: 85 db test %ebx,%ebx 10b704: 74 66 je 10b76c return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 10b706: 83 ec 0c sub $0xc,%esp 10b709: 53 push %ebx 10b70a: e8 39 01 00 00 call 10b848 <_TOD_Validate> 10b70f: 83 c4 10 add $0x10,%esp 10b712: 84 c0 test %al,%al 10b714: 75 0a jne 10b720 _Thread_Disable_dispatch(); _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; 10b716: b8 14 00 00 00 mov $0x14,%eax } 10b71b: 8b 5d fc mov -0x4(%ebp),%ebx 10b71e: c9 leave 10b71f: c3 ret if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 10b720: 83 ec 0c sub $0xc,%esp 10b723: 53 push %ebx 10b724: e8 93 00 00 00 call 10b7bc <_TOD_To_seconds> 10b729: 89 45 f0 mov %eax,-0x10(%ebp) newtime.tv_nsec = time_buffer->ticks * 10b72c: 8b 43 18 mov 0x18(%ebx),%eax 10b72f: 0f af 05 6c 52 12 00 imul 0x12526c,%eax 10b736: 8d 04 80 lea (%eax,%eax,4),%eax 10b739: 8d 04 80 lea (%eax,%eax,4),%eax 10b73c: 8d 04 80 lea (%eax,%eax,4),%eax 10b73f: c1 e0 03 shl $0x3,%eax 10b742: 89 45 f4 mov %eax,-0xc(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b745: a1 cc 98 12 00 mov 0x1298cc,%eax 10b74a: 40 inc %eax 10b74b: a3 cc 98 12 00 mov %eax,0x1298cc rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 10b750: 8d 45 f0 lea -0x10(%ebp),%eax 10b753: 89 04 24 mov %eax,(%esp) 10b756: e8 21 17 00 00 call 10ce7c <_TOD_Set> _Thread_Enable_dispatch(); 10b75b: e8 bc 2c 00 00 call 10e41c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b760: 83 c4 10 add $0x10,%esp 10b763: 31 c0 xor %eax,%eax } return RTEMS_INVALID_CLOCK; } 10b765: 8b 5d fc mov -0x4(%ebp),%ebx 10b768: c9 leave 10b769: c3 ret 10b76a: 66 90 xchg %ax,%ax ) { struct timespec newtime; if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 10b76c: b8 09 00 00 00 mov $0x9,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10b771: 8b 5d fc mov -0x4(%ebp),%ebx 10b774: c9 leave 10b775: c3 ret =============================================================================== 0010a578 : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { 10a578: 55 push %ebp 10a579: 89 e5 mov %esp,%ebp 10a57b: 83 ec 08 sub $0x8,%esp _TOD_Tickle_ticks(); 10a57e: e8 05 13 00 00 call 10b888 <_TOD_Tickle_ticks> */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); 10a583: 83 ec 0c sub $0xc,%esp 10a586: 68 c0 65 12 00 push $0x1265c0 10a58b: e8 24 36 00 00 call 10dbb4 <_Watchdog_Tickle> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 10a590: e8 17 31 00 00 call 10d6ac <_Thread_Tickle_timeslice> * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void ) { return ( _Thread_Dispatch_necessary ); 10a595: a0 84 67 12 00 mov 0x126784,%al if ( _Thread_Is_context_switch_necessary() && 10a59a: 83 c4 10 add $0x10,%esp 10a59d: 84 c0 test %al,%al 10a59f: 74 09 je 10a5aa * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); 10a5a1: a1 ec 64 12 00 mov 0x1264ec,%eax 10a5a6: 85 c0 test %eax,%eax 10a5a8: 74 06 je 10a5b0 _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 10a5aa: 31 c0 xor %eax,%eax 10a5ac: c9 leave 10a5ad: c3 ret 10a5ae: 66 90 xchg %ax,%ax _Thread_Tickle_timeslice(); if ( _Thread_Is_context_switch_necessary() && _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); 10a5b0: e8 cf 25 00 00 call 10cb84 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; } 10a5b5: 31 c0 xor %eax,%eax 10a5b7: c9 leave 10a5b8: c3 ret =============================================================================== 0010a744 : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { 10a744: 55 push %ebp 10a745: 89 e5 mov %esp,%ebp 10a747: 53 push %ebx 10a748: 83 ec 1c sub $0x1c,%esp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); 10a74b: 8d 45 f4 lea -0xc(%ebp),%eax 10a74e: 50 push %eax 10a74f: ff 75 08 pushl 0x8(%ebp) 10a752: e8 c9 25 00 00 call 10cd20 <_Thread_Get> switch ( location ) { 10a757: 83 c4 10 add $0x10,%esp 10a75a: 8b 55 f4 mov -0xc(%ebp),%edx 10a75d: 85 d2 test %edx,%edx 10a75f: 75 2b jne 10a78c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 10a761: 8b 90 e4 00 00 00 mov 0xe4(%eax),%edx rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 10a767: 9c pushf 10a768: fa cli 10a769: 59 pop %ecx *the_event_set |= the_new_events; 10a76a: 8b 5d 0c mov 0xc(%ebp),%ebx 10a76d: 09 1a or %ebx,(%edx) _ISR_Enable( level ); 10a76f: 51 push %ecx 10a770: 9d popf _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 10a771: 83 ec 0c sub $0xc,%esp 10a774: 50 push %eax 10a775: e8 1e 00 00 00 call 10a798 <_Event_Surrender> _Thread_Enable_dispatch(); 10a77a: e8 7d 25 00 00 call 10ccfc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10a77f: 83 c4 10 add $0x10,%esp 10a782: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a784: 8b 5d fc mov -0x4(%ebp),%ebx 10a787: c9 leave 10a788: c3 ret 10a789: 8d 76 00 lea 0x0(%esi),%esi case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10a78c: b8 04 00 00 00 mov $0x4,%eax } 10a791: 8b 5d fc mov -0x4(%ebp),%ebx 10a794: c9 leave 10a795: c3 ret =============================================================================== 0010c6bc : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { 10c6bc: 55 push %ebp 10c6bd: 89 e5 mov %esp,%ebp 10c6bf: 57 push %edi 10c6c0: 56 push %esi 10c6c1: 53 push %ebx 10c6c2: 83 ec 1c sub $0x1c,%esp 10c6c5: 8b 75 0c mov 0xc(%ebp),%esi 10c6c8: 8b 5d 10 mov 0x10(%ebp),%ebx Extension_Control *the_extension; if ( !id ) 10c6cb: 85 db test %ebx,%ebx 10c6cd: 0f 84 85 00 00 00 je 10c758 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10c6d3: 8b 45 08 mov 0x8(%ebp),%eax 10c6d6: 85 c0 test %eax,%eax 10c6d8: 75 0e jne 10c6e8 return RTEMS_INVALID_NAME; 10c6da: b8 03 00 00 00 mov $0x3,%eax ); *id = the_extension->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 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 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c6e8: a1 cc 98 12 00 mov 0x1298cc,%eax 10c6ed: 40 inc %eax 10c6ee: a3 cc 98 12 00 mov %eax,0x1298cc #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 10c6f3: 83 ec 0c sub $0xc,%esp 10c6f6: 68 20 9b 12 00 push $0x129b20 10c6fb: e8 c0 0c 00 00 call 10d3c0 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 10c700: 83 c4 10 add $0x10,%esp 10c703: 85 c0 test %eax,%eax 10c705: 74 45 je 10c74c RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 10c707: 8d 78 24 lea 0x24(%eax),%edi 10c70a: b9 08 00 00 00 mov $0x8,%ecx 10c70f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10c711: 83 ec 0c sub $0xc,%esp _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } _User_extensions_Add_set_with_table( &the_extension->Extension, extension_table ); 10c714: 8d 50 10 lea 0x10(%eax),%edx 10c717: 52 push %edx 10c718: 89 45 e4 mov %eax,-0x1c(%ebp) 10c71b: e8 2c 28 00 00 call 10ef4c <_User_extensions_Add_set> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10c720: 8b 45 e4 mov -0x1c(%ebp),%eax 10c723: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10c726: 0f b7 f2 movzwl %dx,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c729: 8b 0d 3c 9b 12 00 mov 0x129b3c,%ecx 10c72f: 89 04 b1 mov %eax,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c732: 8b 4d 08 mov 0x8(%ebp),%ecx 10c735: 89 48 0c mov %ecx,0xc(%eax) &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 10c738: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10c73a: e8 dd 1c 00 00 call 10e41c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c73f: 83 c4 10 add $0x10,%esp 10c742: 31 c0 xor %eax,%eax } 10c744: 8d 65 f4 lea -0xc(%ebp),%esp 10c747: 5b pop %ebx 10c748: 5e pop %esi 10c749: 5f pop %edi 10c74a: c9 leave 10c74b: c3 ret _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { _Thread_Enable_dispatch(); 10c74c: e8 cb 1c 00 00 call 10e41c <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10c751: b8 05 00 00 00 mov $0x5,%eax 10c756: eb 87 jmp 10c6df ) { Extension_Control *the_extension; if ( !id ) return RTEMS_INVALID_ADDRESS; 10c758: b8 09 00 00 00 mov $0x9,%eax 10c75d: eb 80 jmp 10c6df =============================================================================== 0010c4f4 : #include rtems_status_code rtems_extension_delete( rtems_id id ) { 10c4f4: 55 push %ebp 10c4f5: 89 e5 mov %esp,%ebp 10c4f7: 53 push %ebx 10c4f8: 83 ec 18 sub $0x18,%esp Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); 10c4fb: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) _Objects_Get( &_Extension_Information, id, location ); 10c4fe: 50 push %eax 10c4ff: ff 75 08 pushl 0x8(%ebp) 10c502: 68 20 8b 12 00 push $0x128b20 10c507: e8 a8 10 00 00 call 10d5b4 <_Objects_Get> 10c50c: 89 c3 mov %eax,%ebx switch ( location ) { 10c50e: 83 c4 10 add $0x10,%esp 10c511: 8b 55 f4 mov -0xc(%ebp),%edx 10c514: 85 d2 test %edx,%edx 10c516: 75 38 jne 10c550 case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 10c518: 83 ec 0c sub $0xc,%esp 10c51b: 8d 40 10 lea 0x10(%eax),%eax 10c51e: 50 push %eax 10c51f: e8 d4 26 00 00 call 10ebf8 <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 10c524: 59 pop %ecx 10c525: 58 pop %eax 10c526: 53 push %ebx 10c527: 68 20 8b 12 00 push $0x128b20 10c52c: e8 4b 0c 00 00 call 10d17c <_Objects_Close> RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 10c531: 58 pop %eax 10c532: 5a pop %edx 10c533: 53 push %ebx 10c534: 68 20 8b 12 00 push $0x128b20 10c539: e8 36 0f 00 00 call 10d474 <_Objects_Free> _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 10c53e: e8 49 1b 00 00 call 10e08c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c543: 83 c4 10 add $0x10,%esp 10c546: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c548: 8b 5d fc mov -0x4(%ebp),%ebx 10c54b: c9 leave 10c54c: c3 ret 10c54d: 8d 76 00 lea 0x0(%esi),%esi #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c550: b8 04 00 00 00 mov $0x4,%eax } 10c555: 8b 5d fc mov -0x4(%ebp),%ebx 10c558: c9 leave 10c559: c3 ret =============================================================================== 00111ae0 : rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 111ae0: 55 push %ebp 111ae1: 89 e5 mov %esp,%ebp 111ae3: 53 push %ebx 111ae4: 83 ec 04 sub $0x4,%esp 111ae7: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111aea: 39 05 40 68 12 00 cmp %eax,0x126840 111af0: 76 1a jbe 111b0c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; 111af2: 8d 14 40 lea (%eax,%eax,2),%edx 111af5: c1 e2 03 shl $0x3,%edx 111af8: 03 15 44 68 12 00 add 0x126844,%edx 111afe: 8b 52 08 mov 0x8(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111b01: 85 d2 test %edx,%edx 111b03: 74 13 je 111b18 } 111b05: 59 pop %ecx 111b06: 5b pop %ebx 111b07: 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; 111b08: ff e2 jmp *%edx 111b0a: 66 90 xchg %ax,%ax ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 111b0c: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 111b11: 5a pop %edx 111b12: 5b pop %ebx 111b13: c9 leave 111b14: c3 ret 111b15: 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; 111b18: 31 c0 xor %eax,%eax } 111b1a: 5a pop %edx 111b1b: 5b pop %ebx 111b1c: c9 leave 111b1d: c3 ret =============================================================================== 00111b20 : rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 111b20: 55 push %ebp 111b21: 89 e5 mov %esp,%ebp 111b23: 53 push %ebx 111b24: 83 ec 04 sub $0x4,%esp 111b27: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111b2a: 39 05 40 68 12 00 cmp %eax,0x126840 111b30: 76 1a jbe 111b4c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; 111b32: 8d 14 40 lea (%eax,%eax,2),%edx 111b35: c1 e2 03 shl $0x3,%edx 111b38: 03 15 44 68 12 00 add 0x126844,%edx 111b3e: 8b 52 14 mov 0x14(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111b41: 85 d2 test %edx,%edx 111b43: 74 13 je 111b58 } 111b45: 59 pop %ecx 111b46: 5b pop %ebx 111b47: 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; 111b48: ff e2 jmp *%edx 111b4a: 66 90 xchg %ax,%ax ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 111b4c: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 111b51: 5a pop %edx 111b52: 5b pop %ebx 111b53: c9 leave 111b54: c3 ret 111b55: 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; 111b58: 31 c0 xor %eax,%eax } 111b5a: 5a pop %edx 111b5b: 5b pop %ebx 111b5c: c9 leave 111b5d: c3 ret =============================================================================== 0010fdec : rtems_status_code rtems_io_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 10fdec: 55 push %ebp 10fded: 89 e5 mov %esp,%ebp 10fdef: 53 push %ebx 10fdf0: 83 ec 04 sub $0x4,%esp 10fdf3: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 10fdf6: 39 05 40 68 12 00 cmp %eax,0x126840 10fdfc: 76 1a jbe 10fe18 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; 10fdfe: 8d 14 40 lea (%eax,%eax,2),%edx 10fe01: c1 e2 03 shl $0x3,%edx 10fe04: 03 15 44 68 12 00 add 0x126844,%edx 10fe0a: 8b 12 mov (%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 10fe0c: 85 d2 test %edx,%edx 10fe0e: 74 14 je 10fe24 } 10fe10: 59 pop %ecx 10fe11: 5b pop %ebx 10fe12: 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; 10fe13: ff e2 jmp *%edx 10fe15: 8d 76 00 lea 0x0(%esi),%esi ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 10fe18: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 10fe1d: 5a pop %edx 10fe1e: 5b pop %ebx 10fe1f: c9 leave 10fe20: c3 ret 10fe21: 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; 10fe24: 31 c0 xor %eax,%eax } 10fe26: 5a pop %edx 10fe27: 5b pop %ebx 10fe28: c9 leave 10fe29: c3 ret =============================================================================== 00111b60 : rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 111b60: 55 push %ebp 111b61: 89 e5 mov %esp,%ebp 111b63: 53 push %ebx 111b64: 83 ec 04 sub $0x4,%esp 111b67: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111b6a: 39 05 40 68 12 00 cmp %eax,0x126840 111b70: 76 1a jbe 111b8c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; 111b72: 8d 14 40 lea (%eax,%eax,2),%edx 111b75: c1 e2 03 shl $0x3,%edx 111b78: 03 15 44 68 12 00 add 0x126844,%edx 111b7e: 8b 52 04 mov 0x4(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111b81: 85 d2 test %edx,%edx 111b83: 74 13 je 111b98 } 111b85: 59 pop %ecx 111b86: 5b pop %ebx 111b87: 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; 111b88: ff e2 jmp *%edx 111b8a: 66 90 xchg %ax,%ax ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 111b8c: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 111b91: 5a pop %edx 111b92: 5b pop %ebx 111b93: c9 leave 111b94: c3 ret 111b95: 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; 111b98: 31 c0 xor %eax,%eax } 111b9a: 5a pop %edx 111b9b: 5b pop %ebx 111b9c: c9 leave 111b9d: c3 ret =============================================================================== 00111ba0 : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 111ba0: 55 push %ebp 111ba1: 89 e5 mov %esp,%ebp 111ba3: 53 push %ebx 111ba4: 83 ec 04 sub $0x4,%esp 111ba7: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111baa: 39 05 40 68 12 00 cmp %eax,0x126840 111bb0: 76 1a jbe 111bcc return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; 111bb2: 8d 14 40 lea (%eax,%eax,2),%edx 111bb5: c1 e2 03 shl $0x3,%edx 111bb8: 03 15 44 68 12 00 add 0x126844,%edx 111bbe: 8b 52 0c mov 0xc(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111bc1: 85 d2 test %edx,%edx 111bc3: 74 13 je 111bd8 } 111bc5: 59 pop %ecx 111bc6: 5b pop %ebx 111bc7: 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; 111bc8: ff e2 jmp *%edx 111bca: 66 90 xchg %ax,%ax ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 111bcc: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 111bd1: 5a pop %edx 111bd2: 5b pop %ebx 111bd3: c9 leave 111bd4: c3 ret 111bd5: 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; 111bd8: 31 c0 xor %eax,%eax } 111bda: 5a pop %edx 111bdb: 5b pop %ebx 111bdc: c9 leave 111bdd: c3 ret =============================================================================== 0010c3b4 : 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 ) { 10c3b4: 55 push %ebp 10c3b5: 89 e5 mov %esp,%ebp 10c3b7: 57 push %edi 10c3b8: 56 push %esi 10c3b9: 53 push %ebx 10c3ba: 83 ec 0c sub $0xc,%esp 10c3bd: 8b 5d 08 mov 0x8(%ebp),%ebx 10c3c0: 8b 75 0c mov 0xc(%ebp),%esi 10c3c3: 8b 55 10 mov 0x10(%ebp),%edx rtems_device_major_number major_limit = _IO_Number_of_drivers; 10c3c6: a1 40 98 12 00 mov 0x129840,%eax if ( rtems_interrupt_is_in_progress() ) 10c3cb: 8b 0d 74 97 12 00 mov 0x129774,%ecx 10c3d1: 85 c9 test %ecx,%ecx 10c3d3: 0f 85 ab 00 00 00 jne 10c484 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 10c3d9: 85 d2 test %edx,%edx 10c3db: 0f 84 e7 00 00 00 je 10c4c8 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 10c3e1: 89 02 mov %eax,(%edx) if ( driver_table == NULL ) 10c3e3: 85 f6 test %esi,%esi 10c3e5: 0f 84 dd 00 00 00 je 10c4c8 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10c3eb: 8b 3e mov (%esi),%edi 10c3ed: 85 ff test %edi,%edi 10c3ef: 0f 84 c7 00 00 00 je 10c4bc return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10c3f5: 39 d8 cmp %ebx,%eax 10c3f7: 76 7b jbe 10c474 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c3f9: a1 ec 94 12 00 mov 0x1294ec,%eax 10c3fe: 40 inc %eax 10c3ff: a3 ec 94 12 00 mov %eax,0x1294ec return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 10c404: 85 db test %ebx,%ebx 10c406: 0f 85 88 00 00 00 jne 10c494 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 10c40c: 8b 0d 40 98 12 00 mov 0x129840,%ecx rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 10c412: 85 c9 test %ecx,%ecx 10c414: 0f 84 bb 00 00 00 je 10c4d5 <== NEVER TAKEN 10c41a: 8b 3d 44 98 12 00 mov 0x129844,%edi 10c420: 89 f8 mov %edi,%eax 10c422: eb 08 jmp 10c42c 10c424: 43 inc %ebx 10c425: 83 c0 18 add $0x18,%eax 10c428: 39 d9 cmp %ebx,%ecx 10c42a: 76 0b jbe 10c437 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10c42c: 83 38 00 cmpl $0x0,(%eax) 10c42f: 75 f3 jne 10c424 10c431: 83 78 04 00 cmpl $0x0,0x4(%eax) 10c435: 75 ed jne 10c424 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10c437: 89 1a mov %ebx,(%edx) if ( m != n ) 10c439: 39 d9 cmp %ebx,%ecx 10c43b: 0f 84 9b 00 00 00 je 10c4dc 10c441: 8d 04 5b lea (%ebx,%ebx,2),%eax 10c444: c1 e0 03 shl $0x3,%eax } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 10c447: 01 c7 add %eax,%edi 10c449: b9 06 00 00 00 mov $0x6,%ecx 10c44e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10c450: e8 4b 1b 00 00 call 10dfa0 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 10c455: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10c45c: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10c463: 89 5d 08 mov %ebx,0x8(%ebp) } 10c466: 83 c4 0c add $0xc,%esp 10c469: 5b pop %ebx 10c46a: 5e pop %esi 10c46b: 5f pop %edi 10c46c: c9 leave _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10c46d: e9 b6 76 00 00 jmp 113b28 10c472: 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; 10c474: 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 ); } 10c479: 83 c4 0c add $0xc,%esp 10c47c: 5b pop %ebx 10c47d: 5e pop %esi 10c47e: 5f pop %edi 10c47f: c9 leave 10c480: c3 ret 10c481: 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; 10c484: 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 ); } 10c489: 83 c4 0c add $0xc,%esp 10c48c: 5b pop %ebx 10c48d: 5e pop %esi 10c48e: 5f pop %edi 10c48f: c9 leave 10c490: c3 ret 10c491: 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; 10c494: 8d 04 5b lea (%ebx,%ebx,2),%eax 10c497: c1 e0 03 shl $0x3,%eax 10c49a: 8b 0d 44 98 12 00 mov 0x129844,%ecx 10c4a0: 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; 10c4a2: 8b 39 mov (%ecx),%edi 10c4a4: 85 ff test %edi,%edi 10c4a6: 74 40 je 10c4e8 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(); 10c4a8: e8 f3 1a 00 00 call 10dfa0 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 10c4ad: 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 ); } 10c4b2: 83 c4 0c add $0xc,%esp 10c4b5: 5b pop %ebx 10c4b6: 5e pop %esi 10c4b7: 5f pop %edi 10c4b8: c9 leave 10c4b9: c3 ret 10c4ba: 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; 10c4bc: 8b 4e 04 mov 0x4(%esi),%ecx 10c4bf: 85 c9 test %ecx,%ecx 10c4c1: 0f 85 2e ff ff ff jne 10c3f5 10c4c7: 90 nop if ( driver_table == NULL ) return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; 10c4c8: 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 ); } 10c4cd: 83 c4 0c add $0xc,%esp 10c4d0: 5b pop %ebx 10c4d1: 5e pop %esi 10c4d2: 5f pop %edi 10c4d3: c9 leave 10c4d4: c3 ret if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10c4d5: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED 10c4db: 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(); 10c4dc: e8 bf 1a 00 00 call 10dfa0 <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; 10c4e1: 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; 10c4e6: eb 91 jmp 10c479 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10c4e8: 8b 49 04 mov 0x4(%ecx),%ecx 10c4eb: 85 c9 test %ecx,%ecx 10c4ed: 75 b9 jne 10c4a8 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 10c4ef: 89 1a mov %ebx,(%edx) 10c4f1: 8b 3d 44 98 12 00 mov 0x129844,%edi 10c4f7: e9 4b ff ff ff jmp 10c447 =============================================================================== 0010c4fc : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 10c4fc: 55 push %ebp 10c4fd: 89 e5 mov %esp,%ebp 10c4ff: 57 push %edi 10c500: 83 ec 04 sub $0x4,%esp 10c503: 8b 45 08 mov 0x8(%ebp),%eax if ( rtems_interrupt_is_in_progress() ) 10c506: 8b 0d 74 97 12 00 mov 0x129774,%ecx 10c50c: 85 c9 test %ecx,%ecx 10c50e: 75 44 jne 10c554 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 10c510: 39 05 40 98 12 00 cmp %eax,0x129840 10c516: 77 0c ja 10c524 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; 10c518: b8 0d 00 00 00 mov $0xd,%eax } 10c51d: 5a pop %edx 10c51e: 5f pop %edi 10c51f: c9 leave 10c520: c3 ret 10c521: 8d 76 00 lea 0x0(%esi),%esi 10c524: 8b 15 ec 94 12 00 mov 0x1294ec,%edx 10c52a: 42 inc %edx 10c52b: 89 15 ec 94 12 00 mov %edx,0x1294ec return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( &_IO_Driver_address_table[major], 10c531: 8d 14 40 lea (%eax,%eax,2),%edx 10c534: 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( 10c537: 03 15 44 98 12 00 add 0x129844,%edx 10c53d: b9 18 00 00 00 mov $0x18,%ecx 10c542: 31 c0 xor %eax,%eax 10c544: 89 d7 mov %edx,%edi 10c546: f3 aa rep stos %al,%es:(%edi) &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 10c548: e8 53 1a 00 00 call 10dfa0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c54d: 31 c0 xor %eax,%eax } return RTEMS_UNSATISFIED; } 10c54f: 5a pop %edx 10c550: 5f pop %edi 10c551: c9 leave 10c552: c3 ret 10c553: 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; 10c554: b8 12 00 00 00 mov $0x12,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10c559: 5a pop %edx 10c55a: 5f pop %edi 10c55b: c9 leave 10c55c: c3 ret =============================================================================== 00111be0 : rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 111be0: 55 push %ebp 111be1: 89 e5 mov %esp,%ebp 111be3: 53 push %ebx 111be4: 83 ec 04 sub $0x4,%esp 111be7: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111bea: 39 05 40 68 12 00 cmp %eax,0x126840 111bf0: 76 1a jbe 111c0c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; 111bf2: 8d 14 40 lea (%eax,%eax,2),%edx 111bf5: c1 e2 03 shl $0x3,%edx 111bf8: 03 15 44 68 12 00 add 0x126844,%edx 111bfe: 8b 52 10 mov 0x10(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111c01: 85 d2 test %edx,%edx 111c03: 74 13 je 111c18 } 111c05: 59 pop %ecx 111c06: 5b pop %ebx 111c07: 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; 111c08: ff e2 jmp *%edx 111c0a: 66 90 xchg %ax,%ax ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 111c0c: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 111c11: 5a pop %edx 111c12: 5b pop %ebx 111c13: c9 leave 111c14: c3 ret 111c15: 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; 111c18: 31 c0 xor %eax,%eax } 111c1a: 5a pop %edx 111c1b: 5b pop %ebx 111c1c: c9 leave 111c1d: c3 ret =============================================================================== 0010d358 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10d358: 55 push %ebp 10d359: 89 e5 mov %esp,%ebp 10d35b: 57 push %edi 10d35c: 56 push %esi 10d35d: 53 push %ebx 10d35e: 83 ec 1c sub $0x1c,%esp 10d361: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10d364: 85 ff test %edi,%edi 10d366: 74 4d je 10d3b5 <== NEVER TAKEN 10d368: 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 ] ) 10d36f: 8b 55 e4 mov -0x1c(%ebp),%edx 10d372: 8b 04 95 a4 98 12 00 mov 0x1298a4(,%edx,4),%eax 10d379: 85 c0 test %eax,%eax 10d37b: 74 2f je 10d3ac continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; 10d37d: 8b 70 04 mov 0x4(%eax),%esi if ( !information ) 10d380: 85 f6 test %esi,%esi 10d382: 74 28 je 10d3ac continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10d384: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 10d389: 74 21 je 10d3ac <== NEVER TAKEN 10d38b: bb 01 00 00 00 mov $0x1,%ebx the_thread = (Thread_Control *)information->local_table[ i ]; 10d390: 8b 46 1c mov 0x1c(%esi),%eax 10d393: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !the_thread ) 10d396: 85 c0 test %eax,%eax 10d398: 74 09 je 10d3a3 <== NEVER TAKEN continue; (*routine)(the_thread); 10d39a: 83 ec 0c sub $0xc,%esp 10d39d: 50 push %eax 10d39e: ff d7 call *%edi 10d3a0: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10d3a3: 43 inc %ebx 10d3a4: 0f b7 46 10 movzwl 0x10(%esi),%eax 10d3a8: 39 d8 cmp %ebx,%eax 10d3aa: 73 e4 jae 10d390 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10d3ac: ff 45 e4 incl -0x1c(%ebp) 10d3af: 83 7d e4 04 cmpl $0x4,-0x1c(%ebp) 10d3b3: 75 ba jne 10d36f (*routine)(the_thread); } } } 10d3b5: 8d 65 f4 lea -0xc(%ebp),%esp 10d3b8: 5b pop %ebx 10d3b9: 5e pop %esi 10d3ba: 5f pop %edi 10d3bb: c9 leave 10d3bc: c3 ret =============================================================================== 001159e4 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 1159e4: 55 push %ebp 1159e5: 89 e5 mov %esp,%ebp 1159e7: 57 push %edi 1159e8: 56 push %esi 1159e9: 53 push %ebx 1159ea: 83 ec 1c sub $0x1c,%esp 1159ed: 8b 7d 08 mov 0x8(%ebp),%edi 1159f0: 8b 5d 0c mov 0xc(%ebp),%ebx 1159f3: 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 ) 1159f6: 85 db test %ebx,%ebx 1159f8: 74 62 je 115a5c return RTEMS_INVALID_ADDRESS; if ( !count ) 1159fa: 85 f6 test %esi,%esi 1159fc: 74 5e je 115a5c Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 1159fe: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 1159ff: 8d 45 e4 lea -0x1c(%ebp),%eax 115a02: 50 push %eax 115a03: 57 push %edi 115a04: 68 00 0c 14 00 push $0x140c00 115a09: e8 b6 4d 00 00 call 11a7c4 <_Objects_Get> switch ( location ) { 115a0e: 83 c4 10 add $0x10,%esp 115a11: 8b 55 e4 mov -0x1c(%ebp),%edx 115a14: 85 d2 test %edx,%edx 115a16: 74 10 je 115a28 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115a18: b8 04 00 00 00 mov $0x4,%eax } 115a1d: 8d 65 f4 lea -0xc(%ebp),%esp 115a20: 5b pop %ebx 115a21: 5e pop %esi 115a22: 5f pop %edi 115a23: c9 leave 115a24: c3 ret 115a25: 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( 115a28: 83 ec 08 sub $0x8,%esp 115a2b: 56 push %esi 115a2c: 6a 00 push $0x0 115a2e: 57 push %edi 115a2f: ff 75 10 pushl 0x10(%ebp) 115a32: 53 push %ebx 115a33: 83 c0 14 add $0x14,%eax 115a36: 50 push %eax 115a37: e8 60 34 00 00 call 118e9c <_CORE_message_queue_Broadcast> 115a3c: 89 c3 mov %eax,%ebx NULL, #endif count ); _Thread_Enable_dispatch(); 115a3e: 83 c4 20 add $0x20,%esp 115a41: e8 ce 58 00 00 call 11b314 <_Thread_Enable_dispatch> return 115a46: 83 ec 0c sub $0xc,%esp 115a49: 53 push %ebx 115a4a: e8 69 03 00 00 call 115db8 <_Message_queue_Translate_core_message_queue_return_code> 115a4f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115a52: 8d 65 f4 lea -0xc(%ebp),%esp 115a55: 5b pop %ebx 115a56: 5e pop %esi 115a57: 5f pop %edi 115a58: c9 leave 115a59: c3 ret 115a5a: 66 90 xchg %ax,%ax if ( !buffer ) return RTEMS_INVALID_ADDRESS; if ( !count ) return RTEMS_INVALID_ADDRESS; 115a5c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115a61: 8d 65 f4 lea -0xc(%ebp),%esp 115a64: 5b pop %ebx 115a65: 5e pop %esi 115a66: 5f pop %edi 115a67: c9 leave 115a68: c3 ret =============================================================================== 0010f7b0 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { 10f7b0: 55 push %ebp 10f7b1: 89 e5 mov %esp,%ebp 10f7b3: 57 push %edi 10f7b4: 56 push %esi 10f7b5: 53 push %ebx 10f7b6: 83 ec 2c sub $0x2c,%esp 10f7b9: 8b 5d 08 mov 0x8(%ebp),%ebx 10f7bc: 8b 75 0c mov 0xc(%ebp),%esi 10f7bf: 8b 4d 10 mov 0x10(%ebp),%ecx 10f7c2: 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 ) ) 10f7c5: 85 db test %ebx,%ebx 10f7c7: 74 2f je 10f7f8 return RTEMS_INVALID_NAME; if ( !id ) 10f7c9: 85 ff test %edi,%edi 10f7cb: 0f 84 a3 00 00 00 je 10f874 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 10f7d1: 85 f6 test %esi,%esi 10f7d3: 74 13 je 10f7e8 return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 10f7d5: 85 c9 test %ecx,%ecx 10f7d7: 75 2f jne 10f808 return RTEMS_INVALID_SIZE; 10f7d9: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10f7de: 8d 65 f4 lea -0xc(%ebp),%esp 10f7e1: 5b pop %ebx 10f7e2: 5e pop %esi 10f7e3: 5f pop %edi 10f7e4: c9 leave 10f7e5: c3 ret 10f7e6: 66 90 xchg %ax,%ax !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) return RTEMS_INVALID_NUMBER; 10f7e8: b8 0a 00 00 00 mov $0xa,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10f7ed: 8d 65 f4 lea -0xc(%ebp),%esp 10f7f0: 5b pop %ebx 10f7f1: 5e pop %esi 10f7f2: 5f pop %edi 10f7f3: c9 leave 10f7f4: c3 ret 10f7f5: 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; 10f7f8: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10f7fd: 8d 65 f4 lea -0xc(%ebp),%esp 10f800: 5b pop %ebx 10f801: 5e pop %esi 10f802: 5f pop %edi 10f803: c9 leave 10f804: c3 ret 10f805: 8d 76 00 lea 0x0(%esi),%esi 10f808: a1 ec 64 12 00 mov 0x1264ec,%eax 10f80d: 40 inc %eax 10f80e: a3 ec 64 12 00 mov %eax,0x1264ec #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 10f813: 89 4d d4 mov %ecx,-0x2c(%ebp) 10f816: e8 4d 21 00 00 call 111968 <_Message_queue_Allocate> 10f81b: 89 c2 mov %eax,%edx if ( !the_message_queue ) { 10f81d: 85 c0 test %eax,%eax 10f81f: 8b 4d d4 mov -0x2c(%ebp),%ecx 10f822: 74 7c je 10f8a0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 10f824: 8b 45 14 mov 0x14(%ebp),%eax 10f827: 89 42 10 mov %eax,0x10(%edx) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 10f82a: a8 04 test $0x4,%al 10f82c: 0f 95 c0 setne %al 10f82f: 0f b6 c0 movzbl %al,%eax 10f832: 89 45 e4 mov %eax,-0x1c(%ebp) else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 10f835: 51 push %ecx 10f836: 56 push %esi 10f837: 8d 45 e4 lea -0x1c(%ebp),%eax 10f83a: 50 push %eax 10f83b: 8d 42 14 lea 0x14(%edx),%eax 10f83e: 50 push %eax 10f83f: 89 55 d4 mov %edx,-0x2c(%ebp) 10f842: e8 c5 06 00 00 call 10ff0c <_CORE_message_queue_Initialize> 10f847: 83 c4 10 add $0x10,%esp 10f84a: 84 c0 test %al,%al 10f84c: 8b 55 d4 mov -0x2c(%ebp),%edx 10f84f: 75 2f jne 10f880 */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 10f851: 83 ec 08 sub $0x8,%esp 10f854: 52 push %edx 10f855: 68 e0 68 12 00 push $0x1268e0 10f85a: e8 0d c8 ff ff call 10c06c <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 10f85f: e8 98 d4 ff ff call 10ccfc <_Thread_Enable_dispatch> return RTEMS_UNSATISFIED; 10f864: 83 c4 10 add $0x10,%esp 10f867: b8 0d 00 00 00 mov $0xd,%eax 10f86c: e9 6d ff ff ff jmp 10f7de 10f871: 8d 76 00 lea 0x0(%esi),%esi if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10f874: b8 09 00 00 00 mov $0x9,%eax 10f879: e9 60 ff ff ff jmp 10f7de 10f87e: 66 90 xchg %ax,%ax Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10f880: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10f883: 0f b7 f0 movzwl %ax,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10f886: 8b 0d fc 68 12 00 mov 0x1268fc,%ecx 10f88c: 89 14 b1 mov %edx,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10f88f: 89 5a 0c mov %ebx,0xc(%edx) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 10f892: 89 07 mov %eax,(%edi) name, 0 ); #endif _Thread_Enable_dispatch(); 10f894: e8 63 d4 ff ff call 10ccfc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10f899: 31 c0 xor %eax,%eax 10f89b: e9 3e ff ff ff jmp 10f7de _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); if ( !the_message_queue ) { _Thread_Enable_dispatch(); 10f8a0: e8 57 d4 ff ff call 10ccfc <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10f8a5: b8 05 00 00 00 mov $0x5,%eax 10f8aa: e9 2f ff ff ff jmp 10f7de =============================================================================== 0010f8b0 : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 10f8b0: 55 push %ebp 10f8b1: 89 e5 mov %esp,%ebp 10f8b3: 53 push %ebx 10f8b4: 83 ec 18 sub $0x18,%esp register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); 10f8b7: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 10f8ba: 50 push %eax 10f8bb: ff 75 08 pushl 0x8(%ebp) 10f8be: 68 e0 68 12 00 push $0x1268e0 10f8c3: e8 e4 c8 ff ff call 10c1ac <_Objects_Get> 10f8c8: 89 c3 mov %eax,%ebx switch ( location ) { 10f8ca: 83 c4 10 add $0x10,%esp 10f8cd: 8b 4d f4 mov -0xc(%ebp),%ecx 10f8d0: 85 c9 test %ecx,%ecx 10f8d2: 75 3c jne 10f910 case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 10f8d4: 83 ec 08 sub $0x8,%esp 10f8d7: 50 push %eax 10f8d8: 68 e0 68 12 00 push $0x1268e0 10f8dd: e8 92 c4 ff ff call 10bd74 <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 10f8e2: 83 c4 0c add $0xc,%esp 10f8e5: 6a 05 push $0x5 10f8e7: 6a 00 push $0x0 10f8e9: 8d 43 14 lea 0x14(%ebx),%eax 10f8ec: 50 push %eax 10f8ed: e8 96 05 00 00 call 10fe88 <_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 ); 10f8f2: 58 pop %eax 10f8f3: 5a pop %edx 10f8f4: 53 push %ebx 10f8f5: 68 e0 68 12 00 push $0x1268e0 10f8fa: e8 6d c7 ff ff call 10c06c <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 10f8ff: e8 f8 d3 ff ff call 10ccfc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10f904: 83 c4 10 add $0x10,%esp 10f907: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f909: 8b 5d fc mov -0x4(%ebp),%ebx 10f90c: c9 leave 10f90d: c3 ret 10f90e: 66 90 xchg %ax,%ax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10f910: b8 04 00 00 00 mov $0x4,%eax } 10f915: 8b 5d fc mov -0x4(%ebp),%ebx 10f918: c9 leave 10f919: c3 ret =============================================================================== 00115bd8 : rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { 115bd8: 55 push %ebp 115bd9: 89 e5 mov %esp,%ebp 115bdb: 53 push %ebx 115bdc: 83 ec 14 sub $0x14,%esp 115bdf: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 115be2: 85 db test %ebx,%ebx 115be4: 74 46 je 115c2c Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 115be6: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 115be7: 8d 45 f4 lea -0xc(%ebp),%eax 115bea: 50 push %eax 115beb: ff 75 08 pushl 0x8(%ebp) 115bee: 68 00 0c 14 00 push $0x140c00 115bf3: e8 cc 4b 00 00 call 11a7c4 <_Objects_Get> switch ( location ) { 115bf8: 83 c4 10 add $0x10,%esp 115bfb: 8b 55 f4 mov -0xc(%ebp),%edx 115bfe: 85 d2 test %edx,%edx 115c00: 74 0a je 115c0c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115c02: b8 04 00 00 00 mov $0x4,%eax } 115c07: 8b 5d fc mov -0x4(%ebp),%ebx 115c0a: c9 leave 115c0b: 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 ); 115c0c: 83 ec 0c sub $0xc,%esp 115c0f: 83 c0 14 add $0x14,%eax 115c12: 50 push %eax 115c13: e8 44 33 00 00 call 118f5c <_CORE_message_queue_Flush> 115c18: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 115c1a: e8 f5 56 00 00 call 11b314 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115c1f: 83 c4 10 add $0x10,%esp 115c22: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115c24: 8b 5d fc mov -0x4(%ebp),%ebx 115c27: c9 leave 115c28: c3 ret 115c29: 8d 76 00 lea 0x0(%esi),%esi { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) return RTEMS_INVALID_ADDRESS; 115c2c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115c31: 8b 5d fc mov -0x4(%ebp),%ebx 115c34: c9 leave 115c35: c3 ret =============================================================================== 00115c38 : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { 115c38: 55 push %ebp 115c39: 89 e5 mov %esp,%ebp 115c3b: 53 push %ebx 115c3c: 83 ec 14 sub $0x14,%esp 115c3f: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 115c42: 85 db test %ebx,%ebx 115c44: 74 3a je 115c80 115c46: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 115c47: 8d 45 f4 lea -0xc(%ebp),%eax 115c4a: 50 push %eax 115c4b: ff 75 08 pushl 0x8(%ebp) 115c4e: 68 00 0c 14 00 push $0x140c00 115c53: e8 6c 4b 00 00 call 11a7c4 <_Objects_Get> switch ( location ) { 115c58: 83 c4 10 add $0x10,%esp 115c5b: 8b 55 f4 mov -0xc(%ebp),%edx 115c5e: 85 d2 test %edx,%edx 115c60: 74 0a je 115c6c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115c62: b8 04 00 00 00 mov $0x4,%eax } 115c67: 8b 5d fc mov -0x4(%ebp),%ebx 115c6a: c9 leave 115c6b: 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; 115c6c: 8b 40 5c mov 0x5c(%eax),%eax 115c6f: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 115c71: e8 9e 56 00 00 call 11b314 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115c76: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115c78: 8b 5d fc mov -0x4(%ebp),%ebx 115c7b: c9 leave 115c7c: c3 ret 115c7d: 8d 76 00 lea 0x0(%esi),%esi { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) return RTEMS_INVALID_ADDRESS; 115c80: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115c85: 8b 5d fc mov -0x4(%ebp),%ebx 115c88: c9 leave 115c89: c3 ret =============================================================================== 0010f91c : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 10f91c: 55 push %ebp 10f91d: 89 e5 mov %esp,%ebp 10f91f: 56 push %esi 10f920: 53 push %ebx 10f921: 83 ec 10 sub $0x10,%esp 10f924: 8b 5d 0c mov 0xc(%ebp),%ebx 10f927: 8b 75 10 mov 0x10(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 10f92a: 85 db test %ebx,%ebx 10f92c: 74 6e je 10f99c return RTEMS_INVALID_ADDRESS; if ( !size ) 10f92e: 85 f6 test %esi,%esi 10f930: 74 6a je 10f99c Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 10f932: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 10f933: 8d 45 f4 lea -0xc(%ebp),%eax 10f936: 50 push %eax 10f937: ff 75 08 pushl 0x8(%ebp) 10f93a: 68 e0 68 12 00 push $0x1268e0 10f93f: e8 68 c8 ff ff call 10c1ac <_Objects_Get> switch ( location ) { 10f944: 83 c4 10 add $0x10,%esp 10f947: 8b 55 f4 mov -0xc(%ebp),%edx 10f94a: 85 d2 test %edx,%edx 10f94c: 75 42 jne 10f990 if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 10f94e: 83 ec 08 sub $0x8,%esp 10f951: ff 75 18 pushl 0x18(%ebp) 10f954: 8b 55 14 mov 0x14(%ebp),%edx 10f957: 83 e2 01 and $0x1,%edx 10f95a: 83 f2 01 xor $0x1,%edx 10f95d: 52 push %edx 10f95e: 56 push %esi 10f95f: 53 push %ebx 10f960: ff 70 08 pushl 0x8(%eax) 10f963: 83 c0 14 add $0x14,%eax 10f966: 50 push %eax 10f967: e8 40 06 00 00 call 10ffac <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 10f96c: 83 c4 20 add $0x20,%esp 10f96f: e8 88 d3 ff ff call 10ccfc <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 10f974: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code 10f977: a1 78 67 12 00 mov 0x126778,%eax size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 10f97c: ff 70 34 pushl 0x34(%eax) 10f97f: e8 a0 00 00 00 call 10fa24 <_Message_queue_Translate_core_message_queue_return_code> 10f984: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f987: 8d 65 f8 lea -0x8(%ebp),%esp 10f98a: 5b pop %ebx 10f98b: 5e pop %esi 10f98c: c9 leave 10f98d: c3 ret 10f98e: 66 90 xchg %ax,%ax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10f990: b8 04 00 00 00 mov $0x4,%eax } 10f995: 8d 65 f8 lea -0x8(%ebp),%esp 10f998: 5b pop %ebx 10f999: 5e pop %esi 10f99a: c9 leave 10f99b: c3 ret if ( !buffer ) return RTEMS_INVALID_ADDRESS; if ( !size ) return RTEMS_INVALID_ADDRESS; 10f99c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f9a1: 8d 65 f8 lea -0x8(%ebp),%esp 10f9a4: 5b pop %ebx 10f9a5: 5e pop %esi 10f9a6: c9 leave 10f9a7: c3 ret =============================================================================== 0010f9a8 : rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { 10f9a8: 55 push %ebp 10f9a9: 89 e5 mov %esp,%ebp 10f9ab: 56 push %esi 10f9ac: 53 push %ebx 10f9ad: 83 ec 10 sub $0x10,%esp 10f9b0: 8b 75 08 mov 0x8(%ebp),%esi 10f9b3: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10f9b6: 85 db test %ebx,%ebx 10f9b8: 74 5e je 10fa18 10f9ba: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 10f9bb: 8d 45 f4 lea -0xc(%ebp),%eax 10f9be: 50 push %eax 10f9bf: 56 push %esi 10f9c0: 68 e0 68 12 00 push $0x1268e0 10f9c5: e8 e2 c7 ff ff call 10c1ac <_Objects_Get> switch ( location ) { 10f9ca: 83 c4 10 add $0x10,%esp 10f9cd: 8b 55 f4 mov -0xc(%ebp),%edx 10f9d0: 85 d2 test %edx,%edx 10f9d2: 74 0c je 10f9e0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10f9d4: b8 04 00 00 00 mov $0x4,%eax } 10f9d9: 8d 65 f8 lea -0x8(%ebp),%esp 10f9dc: 5b pop %ebx 10f9dd: 5e pop %esi 10f9de: c9 leave 10f9df: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 10f9e0: 6a 00 push $0x0 10f9e2: 6a 00 push $0x0 10f9e4: 68 ff ff ff 7f push $0x7fffffff 10f9e9: 6a 00 push $0x0 10f9eb: 56 push %esi 10f9ec: ff 75 10 pushl 0x10(%ebp) 10f9ef: 53 push %ebx the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_message_queue_Send( 10f9f0: 83 c0 14 add $0x14,%eax 10f9f3: 50 push %eax 10f9f4: e8 8b 06 00 00 call 110084 <_CORE_message_queue_Submit> 10f9f9: 89 c3 mov %eax,%ebx MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 10f9fb: 83 c4 20 add $0x20,%esp 10f9fe: e8 f9 d2 ff ff call 10ccfc <_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); 10fa03: 83 ec 0c sub $0xc,%esp 10fa06: 53 push %ebx 10fa07: e8 18 00 00 00 call 10fa24 <_Message_queue_Translate_core_message_queue_return_code> 10fa0c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fa0f: 8d 65 f8 lea -0x8(%ebp),%esp 10fa12: 5b pop %ebx 10fa13: 5e pop %esi 10fa14: c9 leave 10fa15: c3 ret 10fa16: 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; 10fa18: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fa1d: 8d 65 f8 lea -0x8(%ebp),%esp 10fa20: 5b pop %ebx 10fa21: 5e pop %esi 10fa22: c9 leave 10fa23: c3 ret =============================================================================== 00115dc8 : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { 115dc8: 55 push %ebp 115dc9: 89 e5 mov %esp,%ebp 115dcb: 56 push %esi 115dcc: 53 push %ebx 115dcd: 83 ec 10 sub $0x10,%esp 115dd0: 8b 75 08 mov 0x8(%ebp),%esi 115dd3: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 115dd6: 85 db test %ebx,%ebx 115dd8: 74 5e je 115e38 115dda: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 115ddb: 8d 45 f4 lea -0xc(%ebp),%eax 115dde: 50 push %eax 115ddf: 56 push %esi 115de0: 68 00 0c 14 00 push $0x140c00 115de5: e8 da 49 00 00 call 11a7c4 <_Objects_Get> switch ( location ) { 115dea: 83 c4 10 add $0x10,%esp 115ded: 8b 55 f4 mov -0xc(%ebp),%edx 115df0: 85 d2 test %edx,%edx 115df2: 74 0c je 115e00 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115df4: b8 04 00 00 00 mov $0x4,%eax } 115df9: 8d 65 f8 lea -0x8(%ebp),%esp 115dfc: 5b pop %ebx 115dfd: 5e pop %esi 115dfe: c9 leave 115dff: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 115e00: 6a 00 push $0x0 115e02: 6a 00 push $0x0 115e04: 68 00 00 00 80 push $0x80000000 115e09: 6a 00 push $0x0 115e0b: 56 push %esi 115e0c: ff 75 10 pushl 0x10(%ebp) 115e0f: 53 push %ebx the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_message_queue_Urgent( 115e10: 83 c0 14 add $0x14,%eax 115e13: 50 push %eax 115e14: e8 1f 33 00 00 call 119138 <_CORE_message_queue_Submit> 115e19: 89 c3 mov %eax,%ebx id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 115e1b: 83 c4 20 add $0x20,%esp 115e1e: e8 f1 54 00 00 call 11b314 <_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); 115e23: 83 ec 0c sub $0xc,%esp 115e26: 53 push %ebx 115e27: e8 8c ff ff ff call 115db8 <_Message_queue_Translate_core_message_queue_return_code> 115e2c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115e2f: 8d 65 f8 lea -0x8(%ebp),%esp 115e32: 5b pop %ebx 115e33: 5e pop %esi 115e34: c9 leave 115e35: c3 ret 115e36: 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; 115e38: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115e3d: 8d 65 f8 lea -0x8(%ebp),%esp 115e40: 5b pop %ebx 115e41: 5e pop %esi 115e42: c9 leave 115e43: c3 ret =============================================================================== 0010c4cc : const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 10c4cc: 55 push %ebp 10c4cd: 89 e5 mov %esp,%ebp 10c4cf: 83 ec 08 sub $0x8,%esp 10c4d2: 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 ) 10c4d5: 83 f8 01 cmp $0x1,%eax 10c4d8: 74 2a je 10c504 api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 10c4da: 83 f8 02 cmp $0x2,%eax 10c4dd: 74 09 je 10c4e8 #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; 10c4df: b8 db 33 12 00 mov $0x1233db,%eax class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; } 10c4e4: c9 leave 10c4e5: c3 ret 10c4e6: 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; 10c4e8: b8 40 71 12 00 mov $0x127140,%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 ); 10c4ed: 83 ec 08 sub $0x8,%esp 10c4f0: ff 75 0c pushl 0xc(%ebp) 10c4f3: 50 push %eax 10c4f4: e8 03 4b 00 00 call 110ffc if ( class_assoc ) 10c4f9: 83 c4 10 add $0x10,%esp 10c4fc: 85 c0 test %eax,%eax 10c4fe: 74 0c je 10c50c return class_assoc->name; 10c500: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10c502: c9 leave 10c503: 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; 10c504: b8 20 71 12 00 mov $0x127120,%eax 10c509: eb e2 jmp 10c4ed 10c50b: 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"; 10c50c: b8 e3 33 12 00 mov $0x1233e3,%eax } 10c511: c9 leave 10c512: c3 ret =============================================================================== 0010c514 : }; const char *rtems_object_get_api_name( int api ) { 10c514: 55 push %ebp 10c515: 89 e5 mov %esp,%ebp 10c517: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); 10c51a: ff 75 08 pushl 0x8(%ebp) 10c51d: 68 c0 71 12 00 push $0x1271c0 10c522: e8 d5 4a 00 00 call 110ffc if ( api_assoc ) 10c527: 83 c4 10 add $0x10,%esp 10c52a: 85 c0 test %eax,%eax 10c52c: 74 06 je 10c534 return api_assoc->name; 10c52e: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10c530: c9 leave 10c531: c3 ret 10c532: 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"; 10c534: b8 e3 33 12 00 mov $0x1233e3,%eax } 10c539: c9 leave 10c53a: c3 ret =============================================================================== 0010c57c : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 10c57c: 55 push %ebp 10c57d: 89 e5 mov %esp,%ebp 10c57f: 57 push %edi 10c580: 56 push %esi 10c581: 53 push %ebx 10c582: 83 ec 0c sub $0xc,%esp 10c585: 8b 5d 10 mov 0x10(%ebp),%ebx int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10c588: 85 db test %ebx,%ebx 10c58a: 74 60 je 10c5ec return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 10c58c: 83 ec 08 sub $0x8,%esp 10c58f: 0f b7 45 0c movzwl 0xc(%ebp),%eax 10c593: 50 push %eax 10c594: ff 75 08 pushl 0x8(%ebp) 10c597: e8 c8 19 00 00 call 10df64 <_Objects_Get_information> if ( !obj_info ) 10c59c: 83 c4 10 add $0x10,%esp 10c59f: 85 c0 test %eax,%eax 10c5a1: 74 59 je 10c5fc return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 10c5a3: 8b 50 08 mov 0x8(%eax),%edx 10c5a6: 89 13 mov %edx,(%ebx) info->maximum_id = obj_info->maximum_id; 10c5a8: 8b 50 0c mov 0xc(%eax),%edx 10c5ab: 89 53 04 mov %edx,0x4(%ebx) info->auto_extend = obj_info->auto_extend; 10c5ae: 8a 50 12 mov 0x12(%eax),%dl 10c5b1: 88 53 0c mov %dl,0xc(%ebx) info->maximum = obj_info->maximum; 10c5b4: 0f b7 70 10 movzwl 0x10(%eax),%esi 10c5b8: 89 73 08 mov %esi,0x8(%ebx) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10c5bb: 85 f6 test %esi,%esi 10c5bd: 74 44 je 10c603 <== NEVER TAKEN 10c5bf: 8b 78 1c mov 0x1c(%eax),%edi 10c5c2: b9 01 00 00 00 mov $0x1,%ecx 10c5c7: b8 01 00 00 00 mov $0x1,%eax 10c5cc: 31 d2 xor %edx,%edx 10c5ce: 66 90 xchg %ax,%ax if ( !obj_info->local_table[i] ) unallocated++; 10c5d0: 83 3c 8f 01 cmpl $0x1,(%edi,%ecx,4) 10c5d4: 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++ ) 10c5d7: 40 inc %eax 10c5d8: 89 c1 mov %eax,%ecx 10c5da: 39 c6 cmp %eax,%esi 10c5dc: 73 f2 jae 10c5d0 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 10c5de: 89 53 10 mov %edx,0x10(%ebx) return RTEMS_SUCCESSFUL; 10c5e1: 31 c0 xor %eax,%eax } 10c5e3: 8d 65 f4 lea -0xc(%ebp),%esp 10c5e6: 5b pop %ebx 10c5e7: 5e pop %esi 10c5e8: 5f pop %edi 10c5e9: c9 leave 10c5ea: c3 ret 10c5eb: 90 nop /* * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; 10c5ec: b8 09 00 00 00 mov $0x9,%eax unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 10c5f1: 8d 65 f4 lea -0xc(%ebp),%esp 10c5f4: 5b pop %ebx 10c5f5: 5e pop %esi 10c5f6: 5f pop %edi 10c5f7: c9 leave 10c5f8: c3 ret 10c5f9: 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; 10c5fc: b8 0a 00 00 00 mov $0xa,%eax 10c601: eb e0 jmp 10c5e3 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++ ) 10c603: 31 d2 xor %edx,%edx <== NOT EXECUTED 10c605: eb d7 jmp 10c5de <== NOT EXECUTED =============================================================================== 0010ba18 : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { 10ba18: 55 push %ebp 10ba19: 89 e5 mov %esp,%ebp 10ba1b: 53 push %ebx 10ba1c: 83 ec 14 sub $0x14,%esp 10ba1f: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10ba22: 85 db test %ebx,%ebx 10ba24: 74 26 je 10ba4c return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); 10ba26: 83 ec 08 sub $0x8,%esp 10ba29: 8d 45 f4 lea -0xc(%ebp),%eax 10ba2c: 50 push %eax 10ba2d: ff 75 08 pushl 0x8(%ebp) 10ba30: e8 23 1a 00 00 call 10d458 <_Objects_Id_to_name> *name = name_u.name_u32; 10ba35: 8b 55 f4 mov -0xc(%ebp),%edx 10ba38: 89 13 mov %edx,(%ebx) return _Status_Object_name_errors_to_status[ status ]; 10ba3a: 8b 04 85 ec 1d 12 00 mov 0x121dec(,%eax,4),%eax 10ba41: 83 c4 10 add $0x10,%esp } 10ba44: 8b 5d fc mov -0x4(%ebp),%ebx 10ba47: c9 leave 10ba48: c3 ret 10ba49: 8d 76 00 lea 0x0(%esi),%esi { Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) return RTEMS_INVALID_ADDRESS; 10ba4c: 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 ]; } 10ba51: 8b 5d fc mov -0x4(%ebp),%ebx 10ba54: c9 leave 10ba55: c3 ret =============================================================================== 0010c660 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 10c660: 55 push %ebp 10c661: 89 e5 mov %esp,%ebp 10c663: 57 push %edi 10c664: 56 push %esi 10c665: 53 push %ebx 10c666: 83 ec 1c sub $0x1c,%esp 10c669: 8b 75 08 mov 0x8(%ebp),%esi 10c66c: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10c66f: 85 ff test %edi,%edi 10c671: 74 61 je 10c6d4 return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10c673: 85 f6 test %esi,%esi 10c675: 74 35 je 10c6ac information = _Objects_Get_information_id( tmpId ); 10c677: 83 ec 0c sub $0xc,%esp 10c67a: 56 push %esi 10c67b: e8 c4 18 00 00 call 10df44 <_Objects_Get_information_id> 10c680: 89 c3 mov %eax,%ebx if ( !information ) 10c682: 83 c4 10 add $0x10,%esp 10c685: 85 c0 test %eax,%eax 10c687: 74 16 je 10c69f return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10c689: 50 push %eax 10c68a: 8d 45 e4 lea -0x1c(%ebp),%eax 10c68d: 50 push %eax 10c68e: 56 push %esi 10c68f: 53 push %ebx 10c690: e8 4f 1a 00 00 call 10e0e4 <_Objects_Get> switch ( location ) { 10c695: 83 c4 10 add $0x10,%esp 10c698: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c69b: 85 c9 test %ecx,%ecx 10c69d: 74 19 je 10c6b8 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c69f: b8 04 00 00 00 mov $0x4,%eax } 10c6a4: 8d 65 f4 lea -0xc(%ebp),%esp 10c6a7: 5b pop %ebx 10c6a8: 5e pop %esi 10c6a9: 5f pop %edi 10c6aa: c9 leave 10c6ab: c3 ret Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10c6ac: a1 f8 97 12 00 mov 0x1297f8,%eax 10c6b1: 8b 70 08 mov 0x8(%eax),%esi 10c6b4: eb c1 jmp 10c677 10c6b6: 66 90 xchg %ax,%ax the_object = _Objects_Get( information, tmpId, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 10c6b8: 52 push %edx 10c6b9: 57 push %edi 10c6ba: 50 push %eax 10c6bb: 53 push %ebx 10c6bc: e8 d3 1b 00 00 call 10e294 <_Objects_Set_name> _Thread_Enable_dispatch(); 10c6c1: e8 de 25 00 00 call 10eca4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c6c6: 83 c4 10 add $0x10,%esp 10c6c9: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c6cb: 8d 65 f4 lea -0xc(%ebp),%esp 10c6ce: 5b pop %ebx 10c6cf: 5e pop %esi 10c6d0: 5f pop %edi 10c6d1: c9 leave 10c6d2: c3 ret 10c6d3: 90 nop Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; 10c6d4: b8 09 00 00 00 mov $0x9,%eax 10c6d9: eb c9 jmp 10c6a4 =============================================================================== 00115e44 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 115e44: 55 push %ebp 115e45: 89 e5 mov %esp,%ebp 115e47: 57 push %edi 115e48: 56 push %esi 115e49: 53 push %ebx 115e4a: 83 ec 1c sub $0x1c,%esp 115e4d: 8b 5d 08 mov 0x8(%ebp),%ebx 115e50: 8b 75 0c mov 0xc(%ebp),%esi 115e53: 8b 55 10 mov 0x10(%ebp),%edx 115e56: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 115e59: 85 db test %ebx,%ebx 115e5b: 74 47 je 115ea4 return RTEMS_INVALID_NAME; if ( !starting_address ) 115e5d: 85 f6 test %esi,%esi 115e5f: 74 23 je 115e84 return RTEMS_INVALID_ADDRESS; if ( !id ) 115e61: 8b 45 1c mov 0x1c(%ebp),%eax 115e64: 85 c0 test %eax,%eax 115e66: 74 1c je 115e84 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 115e68: 85 d2 test %edx,%edx 115e6a: 74 28 je 115e94 115e6c: 85 ff test %edi,%edi 115e6e: 74 24 je 115e94 115e70: 39 fa cmp %edi,%edx 115e72: 72 20 jb 115e94 115e74: f7 c7 03 00 00 00 test $0x3,%edi 115e7a: 75 18 jne 115e94 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 115e7c: f7 c6 03 00 00 00 test $0x3,%esi 115e82: 74 30 je 115eb4 return RTEMS_INVALID_ADDRESS; 115e84: b8 09 00 00 00 mov $0x9,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 115e89: 8d 65 f4 lea -0xc(%ebp),%esp 115e8c: 5b pop %ebx 115e8d: 5e pop %esi 115e8e: 5f pop %edi 115e8f: c9 leave 115e90: c3 ret 115e91: 8d 76 00 lea 0x0(%esi),%esi 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; 115e94: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 115e99: 8d 65 f4 lea -0xc(%ebp),%esp 115e9c: 5b pop %ebx 115e9d: 5e pop %esi 115e9e: 5f pop %edi 115e9f: c9 leave 115ea0: c3 ret 115ea1: 8d 76 00 lea 0x0(%esi),%esi ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 115ea4: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 115ea9: 8d 65 f4 lea -0xc(%ebp),%esp 115eac: 5b pop %ebx 115ead: 5e pop %esi 115eae: 5f pop %edi 115eaf: c9 leave 115eb0: c3 ret 115eb1: 8d 76 00 lea 0x0(%esi),%esi 115eb4: a1 ec 08 14 00 mov 0x1408ec,%eax 115eb9: 40 inc %eax 115eba: a3 ec 08 14 00 mov %eax,0x1408ec * 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 ); 115ebf: 83 ec 0c sub $0xc,%esp 115ec2: 68 80 07 14 00 push $0x140780 115ec7: 89 55 e0 mov %edx,-0x20(%ebp) 115eca: e8 05 44 00 00 call 11a2d4 <_Objects_Allocate> 115ecf: 89 45 e4 mov %eax,-0x1c(%ebp) _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 115ed2: 83 c4 10 add $0x10,%esp 115ed5: 85 c0 test %eax,%eax 115ed7: 8b 55 e0 mov -0x20(%ebp),%edx 115eda: 74 58 je 115f34 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 115edc: 8b 45 e4 mov -0x1c(%ebp),%eax 115edf: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 115ee2: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 115ee5: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 115ee8: 8b 4d 18 mov 0x18(%ebp),%ecx 115eeb: 89 48 1c mov %ecx,0x1c(%eax) the_partition->number_of_used_blocks = 0; 115eee: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) _Chain_Initialize( &the_partition->Memory, starting_address, 115ef5: 57 push %edi 115ef6: 89 d0 mov %edx,%eax 115ef8: 31 d2 xor %edx,%edx 115efa: f7 f7 div %edi 115efc: 50 push %eax 115efd: 56 push %esi 115efe: 8b 45 e4 mov -0x1c(%ebp),%eax 115f01: 83 c0 24 add $0x24,%eax 115f04: 50 push %eax 115f05: e8 36 2f 00 00 call 118e40 <_Chain_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 115f0a: 8b 7d e4 mov -0x1c(%ebp),%edi 115f0d: 8b 47 08 mov 0x8(%edi),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 115f10: 0f b7 f0 movzwl %ax,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 115f13: 8b 15 9c 07 14 00 mov 0x14079c,%edx 115f19: 89 3c b2 mov %edi,(%edx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 115f1c: 89 5f 0c mov %ebx,0xc(%edi) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 115f1f: 8b 55 1c mov 0x1c(%ebp),%edx 115f22: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 115f24: e8 eb 53 00 00 call 11b314 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115f29: 83 c4 10 add $0x10,%esp 115f2c: 31 c0 xor %eax,%eax 115f2e: e9 66 ff ff ff jmp 115e99 115f33: 90 nop _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 115f34: e8 db 53 00 00 call 11b314 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 115f39: b8 05 00 00 00 mov $0x5,%eax 115f3e: e9 56 ff ff ff jmp 115e99 =============================================================================== 00115fb0 : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 115fb0: 55 push %ebp 115fb1: 89 e5 mov %esp,%ebp 115fb3: 56 push %esi 115fb4: 53 push %ebx 115fb5: 83 ec 20 sub $0x20,%esp 115fb8: 8b 5d 0c mov 0xc(%ebp),%ebx register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 115fbb: 85 db test %ebx,%ebx 115fbd: 74 59 je 116018 <== NEVER TAKEN Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 115fbf: 52 push %edx return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); 115fc0: 8d 45 f4 lea -0xc(%ebp),%eax 115fc3: 50 push %eax 115fc4: ff 75 08 pushl 0x8(%ebp) 115fc7: 68 80 07 14 00 push $0x140780 115fcc: e8 f3 47 00 00 call 11a7c4 <_Objects_Get> 115fd1: 89 c6 mov %eax,%esi switch ( location ) { 115fd3: 83 c4 10 add $0x10,%esp 115fd6: 8b 45 f4 mov -0xc(%ebp),%eax 115fd9: 85 c0 test %eax,%eax 115fdb: 75 2f jne 11600c <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 115fdd: 83 ec 0c sub $0xc,%esp 115fe0: 8d 46 24 lea 0x24(%esi),%eax 115fe3: 50 push %eax 115fe4: e8 33 2e 00 00 call 118e1c <_Chain_Get> case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 115fe9: 83 c4 10 add $0x10,%esp 115fec: 85 c0 test %eax,%eax 115fee: 74 34 je 116024 the_partition->number_of_used_blocks += 1; 115ff0: ff 46 20 incl 0x20(%esi) _Thread_Enable_dispatch(); 115ff3: 89 45 e4 mov %eax,-0x1c(%ebp) 115ff6: e8 19 53 00 00 call 11b314 <_Thread_Enable_dispatch> *buffer = the_buffer; 115ffb: 8b 45 e4 mov -0x1c(%ebp),%eax 115ffe: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 116000: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116002: 8d 65 f8 lea -0x8(%ebp),%esp 116005: 5b pop %ebx 116006: 5e pop %esi 116007: c9 leave 116008: c3 ret 116009: 8d 76 00 lea 0x0(%esi),%esi case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 11600c: b8 04 00 00 00 mov $0x4,%eax } 116011: 8d 65 f8 lea -0x8(%ebp),%esp 116014: 5b pop %ebx 116015: 5e pop %esi 116016: c9 leave 116017: c3 ret register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) return RTEMS_INVALID_ADDRESS; 116018: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11601d: 8d 65 f8 lea -0x8(%ebp),%esp 116020: 5b pop %ebx 116021: 5e pop %esi 116022: c9 leave 116023: c3 ret the_partition->number_of_used_blocks += 1; _Thread_Enable_dispatch(); *buffer = the_buffer; return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 116024: e8 eb 52 00 00 call 11b314 <_Thread_Enable_dispatch> return RTEMS_UNSATISFIED; 116029: b8 0d 00 00 00 mov $0xd,%eax 11602e: eb e1 jmp 116011 =============================================================================== 00116054 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 116054: 55 push %ebp 116055: 89 e5 mov %esp,%ebp 116057: 56 push %esi 116058: 53 push %ebx 116059: 83 ec 14 sub $0x14,%esp 11605c: 8b 75 0c mov 0xc(%ebp),%esi register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); 11605f: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 116062: 50 push %eax 116063: ff 75 08 pushl 0x8(%ebp) 116066: 68 80 07 14 00 push $0x140780 11606b: e8 54 47 00 00 call 11a7c4 <_Objects_Get> 116070: 89 c3 mov %eax,%ebx switch ( location ) { 116072: 83 c4 10 add $0x10,%esp 116075: 8b 45 f4 mov -0xc(%ebp),%eax 116078: 85 c0 test %eax,%eax 11607a: 74 0c je 116088 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 11607c: b8 04 00 00 00 mov $0x4,%eax } 116081: 8d 65 f8 lea -0x8(%ebp),%esp 116084: 5b pop %ebx 116085: 5e pop %esi 116086: c9 leave 116087: c3 ret ) { void *starting; void *ending; starting = the_partition->starting_address; 116088: 8b 43 10 mov 0x10(%ebx),%eax ending = _Addresses_Add_offset( starting, the_partition->length ); 11608b: 8b 53 14 mov 0x14(%ebx),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 11608e: 39 c6 cmp %eax,%esi 116090: 72 3a jb 1160cc RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 116092: 8d 14 10 lea (%eax,%edx,1),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 116095: 39 d6 cmp %edx,%esi 116097: 77 33 ja 1160cc <== NEVER TAKEN RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 116099: 89 f2 mov %esi,%edx 11609b: 29 c2 sub %eax,%edx 11609d: 89 d0 mov %edx,%eax offset = (uint32_t) _Addresses_Subtract( the_buffer, the_partition->starting_address ); return ((offset % the_partition->buffer_size) == 0); 11609f: 31 d2 xor %edx,%edx 1160a1: 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 ) && 1160a4: 85 d2 test %edx,%edx 1160a6: 75 24 jne 1160cc RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 1160a8: 83 ec 08 sub $0x8,%esp 1160ab: 56 push %esi 1160ac: 8d 43 24 lea 0x24(%ebx),%eax 1160af: 50 push %eax 1160b0: e8 2b 2d 00 00 call 118de0 <_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; 1160b5: ff 4b 20 decl 0x20(%ebx) _Thread_Enable_dispatch(); 1160b8: e8 57 52 00 00 call 11b314 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1160bd: 83 c4 10 add $0x10,%esp 1160c0: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1160c2: 8d 65 f8 lea -0x8(%ebp),%esp 1160c5: 5b pop %ebx 1160c6: 5e pop %esi 1160c7: c9 leave 1160c8: c3 ret 1160c9: 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(); 1160cc: e8 43 52 00 00 call 11b314 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 1160d1: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1160d6: 8d 65 f8 lea -0x8(%ebp),%esp 1160d9: 5b pop %ebx 1160da: 5e pop %esi 1160db: c9 leave 1160dc: c3 ret =============================================================================== 00115478 : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 115478: 55 push %ebp 115479: 89 e5 mov %esp,%ebp 11547b: 57 push %edi 11547c: 56 push %esi 11547d: 53 push %ebx 11547e: 83 ec 1c sub $0x1c,%esp 115481: 8b 5d 08 mov 0x8(%ebp),%ebx 115484: 8b 55 0c mov 0xc(%ebp),%edx 115487: 8b 7d 10 mov 0x10(%ebp),%edi 11548a: 8b 75 18 mov 0x18(%ebp),%esi register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 11548d: 85 db test %ebx,%ebx 11548f: 74 1b je 1154ac return RTEMS_INVALID_NAME; if ( !id ) 115491: 85 f6 test %esi,%esi 115493: 74 08 je 11549d * id - port id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_port_create( 115495: 89 f8 mov %edi,%eax 115497: 09 d0 or %edx,%eax return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 115499: a8 03 test $0x3,%al 11549b: 74 1f je 1154bc !_Addresses_Is_aligned( external_start ) ) return RTEMS_INVALID_ADDRESS; 11549d: b8 09 00 00 00 mov $0x9,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1154a2: 8d 65 f4 lea -0xc(%ebp),%esp 1154a5: 5b pop %ebx 1154a6: 5e pop %esi 1154a7: 5f pop %edi 1154a8: c9 leave 1154a9: c3 ret 1154aa: 66 90 xchg %ax,%ax ) { register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 1154ac: b8 03 00 00 00 mov $0x3,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1154b1: 8d 65 f4 lea -0xc(%ebp),%esp 1154b4: 5b pop %ebx 1154b5: 5e pop %esi 1154b6: 5f pop %edi 1154b7: c9 leave 1154b8: c3 ret 1154b9: 8d 76 00 lea 0x0(%esi),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1154bc: a1 ec 08 14 00 mov 0x1408ec,%eax 1154c1: 40 inc %eax 1154c2: a3 ec 08 14 00 mov %eax,0x1408ec */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) _Objects_Allocate( &_Dual_ported_memory_Information ); 1154c7: 83 ec 0c sub $0xc,%esp 1154ca: 68 40 07 14 00 push $0x140740 1154cf: 89 55 e4 mov %edx,-0x1c(%ebp) 1154d2: e8 fd 4d 00 00 call 11a2d4 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 1154d7: 83 c4 10 add $0x10,%esp 1154da: 85 c0 test %eax,%eax 1154dc: 8b 55 e4 mov -0x1c(%ebp),%edx 1154df: 74 33 je 115514 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 1154e1: 89 50 10 mov %edx,0x10(%eax) the_port->external_base = external_start; 1154e4: 89 78 14 mov %edi,0x14(%eax) the_port->length = length - 1; 1154e7: 8b 55 14 mov 0x14(%ebp),%edx 1154ea: 4a dec %edx 1154eb: 89 50 18 mov %edx,0x18(%eax) Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 1154ee: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 1154f1: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1154f4: 8b 0d 5c 07 14 00 mov 0x14075c,%ecx 1154fa: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1154fd: 89 58 0c mov %ebx,0xc(%eax) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 115500: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 115502: e8 0d 5e 00 00 call 11b314 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115507: 31 c0 xor %eax,%eax } 115509: 8d 65 f4 lea -0xc(%ebp),%esp 11550c: 5b pop %ebx 11550d: 5e pop %esi 11550e: 5f pop %edi 11550f: c9 leave 115510: c3 ret 115511: 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(); 115514: e8 fb 5d 00 00 call 11b314 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 115519: b8 05 00 00 00 mov $0x5,%eax 11551e: eb 82 jmp 1154a2 =============================================================================== 00115520 : */ rtems_status_code rtems_port_delete( rtems_id id ) { 115520: 55 push %ebp 115521: 89 e5 mov %esp,%ebp 115523: 83 ec 2c sub $0x2c,%esp register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); 115526: 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 ); 115529: 50 push %eax 11552a: ff 75 08 pushl 0x8(%ebp) 11552d: 68 40 07 14 00 push $0x140740 115532: e8 8d 52 00 00 call 11a7c4 <_Objects_Get> switch ( location ) { 115537: 83 c4 10 add $0x10,%esp 11553a: 8b 4d f4 mov -0xc(%ebp),%ecx 11553d: 85 c9 test %ecx,%ecx 11553f: 75 2f jne 115570 case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); 115541: 83 ec 08 sub $0x8,%esp 115544: 50 push %eax 115545: 68 40 07 14 00 push $0x140740 11554a: 89 45 e4 mov %eax,-0x1c(%ebp) 11554d: e8 fe 4d 00 00 call 11a350 <_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 ); 115552: 58 pop %eax 115553: 5a pop %edx 115554: 8b 45 e4 mov -0x1c(%ebp),%eax 115557: 50 push %eax 115558: 68 40 07 14 00 push $0x140740 11555d: e8 e6 50 00 00 call 11a648 <_Objects_Free> _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 115562: e8 ad 5d 00 00 call 11b314 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115567: 83 c4 10 add $0x10,%esp 11556a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11556c: c9 leave 11556d: c3 ret 11556e: 66 90 xchg %ax,%ax #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115570: b8 04 00 00 00 mov $0x4,%eax } 115575: c9 leave 115576: c3 ret =============================================================================== 00115578 : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 115578: 55 push %ebp 115579: 89 e5 mov %esp,%ebp 11557b: 56 push %esi 11557c: 53 push %ebx 11557d: 83 ec 10 sub $0x10,%esp 115580: 8b 75 0c mov 0xc(%ebp),%esi 115583: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 115586: 85 db test %ebx,%ebx 115588: 74 4e je 1155d8 Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) _Objects_Get( &_Dual_ported_memory_Information, id, location ); 11558a: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); 11558b: 8d 45 f4 lea -0xc(%ebp),%eax 11558e: 50 push %eax 11558f: ff 75 08 pushl 0x8(%ebp) 115592: 68 40 07 14 00 push $0x140740 115597: e8 28 52 00 00 call 11a7c4 <_Objects_Get> switch ( location ) { 11559c: 83 c4 10 add $0x10,%esp 11559f: 8b 55 f4 mov -0xc(%ebp),%edx 1155a2: 85 d2 test %edx,%edx 1155a4: 74 0e je 1155b4 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1155a6: b8 04 00 00 00 mov $0x4,%eax } 1155ab: 8d 65 f8 lea -0x8(%ebp),%esp 1155ae: 5b pop %ebx 1155af: 5e pop %esi 1155b0: c9 leave 1155b1: c3 ret 1155b2: 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); 1155b4: 89 f2 mov %esi,%edx 1155b6: 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 ) 1155b9: 3b 50 18 cmp 0x18(%eax),%edx 1155bc: 77 16 ja 1155d4 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 1155be: 03 50 10 add 0x10(%eax),%edx 1155c1: 89 13 mov %edx,(%ebx) *internal = external; else *internal = _Addresses_Add_offset( the_port->internal_base, ending ); _Thread_Enable_dispatch(); 1155c3: e8 4c 5d 00 00 call 11b314 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1155c8: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1155ca: 8d 65 f8 lea -0x8(%ebp),%esp 1155cd: 5b pop %ebx 1155ce: 5e pop %esi 1155cf: c9 leave 1155d0: c3 ret 1155d1: 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; 1155d4: 89 33 mov %esi,(%ebx) 1155d6: eb eb jmp 1155c3 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) return RTEMS_INVALID_ADDRESS; 1155d8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1155dd: 8d 65 f8 lea -0x8(%ebp),%esp 1155e0: 5b pop %ebx 1155e1: 5e pop %esi 1155e2: c9 leave 1155e3: c3 ret =============================================================================== 00115608 : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 115608: 55 push %ebp 115609: 89 e5 mov %esp,%ebp 11560b: 56 push %esi 11560c: 53 push %ebx 11560d: 83 ec 10 sub $0x10,%esp 115610: 8b 75 0c mov 0xc(%ebp),%esi 115613: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 115616: 85 db test %ebx,%ebx 115618: 74 4e je 115668 11561a: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); 11561b: 8d 45 f4 lea -0xc(%ebp),%eax 11561e: 50 push %eax 11561f: ff 75 08 pushl 0x8(%ebp) 115622: 68 40 07 14 00 push $0x140740 115627: e8 98 51 00 00 call 11a7c4 <_Objects_Get> switch ( location ) { 11562c: 83 c4 10 add $0x10,%esp 11562f: 8b 55 f4 mov -0xc(%ebp),%edx 115632: 85 d2 test %edx,%edx 115634: 74 0e je 115644 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115636: b8 04 00 00 00 mov $0x4,%eax } 11563b: 8d 65 f8 lea -0x8(%ebp),%esp 11563e: 5b pop %ebx 11563f: 5e pop %esi 115640: c9 leave 115641: c3 ret 115642: 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); 115644: 89 f2 mov %esi,%edx 115646: 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 ) 115649: 3b 50 18 cmp 0x18(%eax),%edx 11564c: 77 16 ja 115664 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 11564e: 03 50 14 add 0x14(%eax),%edx 115651: 89 13 mov %edx,(%ebx) *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, ending ); _Thread_Enable_dispatch(); 115653: e8 bc 5c 00 00 call 11b314 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115658: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11565a: 8d 65 f8 lea -0x8(%ebp),%esp 11565d: 5b pop %ebx 11565e: 5e pop %esi 11565f: c9 leave 115660: c3 ret 115661: 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; 115664: 89 33 mov %esi,(%ebx) 115666: eb eb jmp 115653 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) return RTEMS_INVALID_ADDRESS; 115668: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11566d: 8d 65 f8 lea -0x8(%ebp),%esp 115670: 5b pop %ebx 115671: 5e pop %esi 115672: c9 leave 115673: c3 ret =============================================================================== 001160e0 : */ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { 1160e0: 55 push %ebp 1160e1: 89 e5 mov %esp,%ebp 1160e3: 53 push %ebx 1160e4: 83 ec 18 sub $0x18,%esp Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); 1160e7: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 1160ea: 50 push %eax 1160eb: ff 75 08 pushl 0x8(%ebp) 1160ee: 68 c0 07 14 00 push $0x1407c0 1160f3: e8 cc 46 00 00 call 11a7c4 <_Objects_Get> 1160f8: 89 c3 mov %eax,%ebx switch ( location ) { 1160fa: 83 c4 10 add $0x10,%esp 1160fd: 8b 45 f4 mov -0xc(%ebp),%eax 116100: 85 c0 test %eax,%eax 116102: 74 0c je 116110 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116104: b8 04 00 00 00 mov $0x4,%eax } 116109: 8b 5d fc mov -0x4(%ebp),%ebx 11610c: c9 leave 11610d: c3 ret 11610e: 66 90 xchg %ax,%ax the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 116110: a1 78 0b 14 00 mov 0x140b78,%eax 116115: 39 43 40 cmp %eax,0x40(%ebx) 116118: 74 12 je 11612c _Thread_Enable_dispatch(); 11611a: e8 f5 51 00 00 call 11b314 <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 11611f: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116124: 8b 5d fc mov -0x4(%ebp),%ebx 116127: c9 leave 116128: c3 ret 116129: 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 ); 11612c: 83 ec 0c sub $0xc,%esp 11612f: 8d 43 10 lea 0x10(%ebx),%eax 116132: 50 push %eax 116133: e8 3c 62 00 00 call 11c374 <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 116138: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) _Thread_Enable_dispatch(); 11613f: e8 d0 51 00 00 call 11b314 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116144: 83 c4 10 add $0x10,%esp 116147: 31 c0 xor %eax,%eax 116149: eb be jmp 116109 =============================================================================== 0010b828 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 10b828: 55 push %ebp 10b829: 89 e5 mov %esp,%ebp 10b82b: 57 push %edi 10b82c: 56 push %esi 10b82d: 53 push %ebx 10b82e: 83 ec 1c sub $0x1c,%esp 10b831: 8b 5d 08 mov 0x8(%ebp),%ebx 10b834: 8b 75 0c mov 0xc(%ebp),%esi Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10b837: 85 db test %ebx,%ebx 10b839: 0f 84 a9 00 00 00 je 10b8e8 return RTEMS_INVALID_NAME; if ( !id ) 10b83f: 85 f6 test %esi,%esi 10b841: 0f 84 c5 00 00 00 je 10b90c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b847: a1 8c 85 12 00 mov 0x12858c,%eax 10b84c: 40 inc %eax 10b84d: a3 8c 85 12 00 mov %eax,0x12858c * 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 ); 10b852: 83 ec 0c sub $0xc,%esp 10b855: 68 a0 84 12 00 push $0x1284a0 10b85a: e8 9d 1d 00 00 call 10d5fc <_Objects_Allocate> 10b85f: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 10b861: 83 c4 10 add $0x10,%esp 10b864: 85 c0 test %eax,%eax 10b866: 0f 84 8c 00 00 00 je 10b8f8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 10b86c: a1 18 88 12 00 mov 0x128818,%eax 10b871: 89 42 40 mov %eax,0x40(%edx) the_period->state = RATE_MONOTONIC_INACTIVE; 10b874: 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; 10b87b: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 10b882: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx) the_watchdog->id = id; 10b889: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) the_watchdog->user_data = user_data; 10b890: 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 ); 10b897: 8d 42 54 lea 0x54(%edx),%eax 10b89a: 89 45 e4 mov %eax,-0x1c(%ebp) 10b89d: b9 38 00 00 00 mov $0x38,%ecx 10b8a2: 31 c0 xor %eax,%eax 10b8a4: 8b 7d e4 mov -0x1c(%ebp),%edi 10b8a7: f3 aa rep stos %al,%es:(%edi) 10b8a9: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10b8b0: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10b8b7: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10b8be: 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 ), 10b8c5: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10b8c8: 0f b7 f8 movzwl %ax,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b8cb: 8b 0d bc 84 12 00 mov 0x1284bc,%ecx 10b8d1: 89 14 b9 mov %edx,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10b8d4: 89 5a 0c mov %ebx,0xc(%edx) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 10b8d7: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10b8d9: e8 f2 2d 00 00 call 10e6d0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b8de: 31 c0 xor %eax,%eax } 10b8e0: 8d 65 f4 lea -0xc(%ebp),%esp 10b8e3: 5b pop %ebx 10b8e4: 5e pop %esi 10b8e5: 5f pop %edi 10b8e6: c9 leave 10b8e7: c3 ret ) { Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10b8e8: b8 03 00 00 00 mov $0x3,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b8ed: 8d 65 f4 lea -0xc(%ebp),%esp 10b8f0: 5b pop %ebx 10b8f1: 5e pop %esi 10b8f2: 5f pop %edi 10b8f3: c9 leave 10b8f4: c3 ret 10b8f5: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { _Thread_Enable_dispatch(); 10b8f8: e8 d3 2d 00 00 call 10e6d0 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10b8fd: b8 05 00 00 00 mov $0x5,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b902: 8d 65 f4 lea -0xc(%ebp),%esp 10b905: 5b pop %ebx 10b906: 5e pop %esi 10b907: 5f pop %edi 10b908: c9 leave 10b909: c3 ret 10b90a: 66 90 xchg %ax,%ax if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10b90c: b8 09 00 00 00 mov $0x9,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b911: 8d 65 f4 lea -0xc(%ebp),%esp 10b914: 5b pop %ebx 10b915: 5e pop %esi 10b916: 5f pop %edi 10b917: c9 leave 10b918: c3 ret =============================================================================== 00111648 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 111648: 55 push %ebp 111649: 89 e5 mov %esp,%ebp 11164b: 53 push %ebx 11164c: 83 ec 24 sub $0x24,%esp 11164f: 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 ) 111652: 85 db test %ebx,%ebx 111654: 0f 84 92 00 00 00 je 1116ec 11165a: 50 push %eax return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); 11165b: 8d 45 f4 lea -0xc(%ebp),%eax 11165e: 50 push %eax 11165f: ff 75 08 pushl 0x8(%ebp) 111662: 68 a0 84 12 00 push $0x1284a0 111667: e8 14 c5 ff ff call 10db80 <_Objects_Get> switch ( location ) { 11166c: 83 c4 10 add $0x10,%esp 11166f: 8b 4d f4 mov -0xc(%ebp),%ecx 111672: 85 c9 test %ecx,%ecx 111674: 74 0a je 111680 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 111676: b8 04 00 00 00 mov $0x4,%eax } 11167b: 8b 5d fc mov -0x4(%ebp),%ebx 11167e: c9 leave 11167f: c3 ret the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 111680: 8b 50 40 mov 0x40(%eax),%edx 111683: 8b 52 08 mov 0x8(%edx),%edx 111686: 89 13 mov %edx,(%ebx) status->state = the_period->state; 111688: 8b 50 38 mov 0x38(%eax),%edx 11168b: 89 53 04 mov %edx,0x4(%ebx) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 11168e: 85 d2 test %edx,%edx 111690: 75 2a jne 1116bc #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 111692: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 111699: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Timespec_Set_to_zero( &status->executed_since_last_period ); 1116a0: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) 1116a7: 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(); 1116ae: e8 1d d0 ff ff call 10e6d0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1116b3: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1116b5: 8b 5d fc mov -0x4(%ebp),%ebx 1116b8: c9 leave 1116b9: c3 ret 1116ba: 66 90 xchg %ax,%ax } else { /* * Grab the current status. */ valid_status = 1116bc: 52 push %edx _Rate_monotonic_Get_status( 1116bd: 8d 55 ec lea -0x14(%ebp),%edx } else { /* * Grab the current status. */ valid_status = 1116c0: 52 push %edx _Rate_monotonic_Get_status( 1116c1: 8d 55 e4 lea -0x1c(%ebp),%edx } else { /* * Grab the current status. */ valid_status = 1116c4: 52 push %edx 1116c5: 50 push %eax 1116c6: e8 75 a2 ff ff call 10b940 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { 1116cb: 83 c4 10 add $0x10,%esp 1116ce: 84 c0 test %al,%al 1116d0: 74 26 je 1116f8 _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 1116d2: 8b 45 e4 mov -0x1c(%ebp),%eax 1116d5: 8b 55 e8 mov -0x18(%ebp),%edx 1116d8: 89 43 08 mov %eax,0x8(%ebx) 1116db: 89 53 0c mov %edx,0xc(%ebx) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 1116de: 8b 45 ec mov -0x14(%ebp),%eax 1116e1: 8b 55 f0 mov -0x10(%ebp),%edx 1116e4: 89 43 10 mov %eax,0x10(%ebx) 1116e7: 89 53 14 mov %edx,0x14(%ebx) 1116ea: eb c2 jmp 1116ae Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) return RTEMS_INVALID_ADDRESS; 1116ec: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1116f1: 8b 5d fc mov -0x4(%ebp),%ebx 1116f4: c9 leave 1116f5: c3 ret 1116f6: 66 90 xchg %ax,%ax valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { _Thread_Enable_dispatch(); 1116f8: e8 d3 cf ff ff call 10e6d0 <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 1116fd: b8 0b 00 00 00 mov $0xb,%eax 111702: e9 74 ff ff ff jmp 11167b =============================================================================== 0010bb3c : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 10bb3c: 55 push %ebp 10bb3d: 89 e5 mov %esp,%ebp 10bb3f: 57 push %edi 10bb40: 56 push %esi 10bb41: 53 push %ebx 10bb42: 83 ec 30 sub $0x30,%esp 10bb45: 8b 5d 08 mov 0x8(%ebp),%ebx 10bb48: 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 ); 10bb4b: 8d 45 e4 lea -0x1c(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 10bb4e: 50 push %eax 10bb4f: 53 push %ebx 10bb50: 68 a0 84 12 00 push $0x1284a0 10bb55: e8 26 20 00 00 call 10db80 <_Objects_Get> switch ( location ) { 10bb5a: 83 c4 10 add $0x10,%esp 10bb5d: 8b 55 e4 mov -0x1c(%ebp),%edx 10bb60: 85 d2 test %edx,%edx 10bb62: 74 10 je 10bb74 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10bb64: b8 04 00 00 00 mov $0x4,%eax } 10bb69: 8d 65 f4 lea -0xc(%ebp),%esp 10bb6c: 5b pop %ebx 10bb6d: 5e pop %esi 10bb6e: 5f pop %edi 10bb6f: c9 leave 10bb70: c3 ret 10bb71: 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 ) ) { 10bb74: 8b 15 18 88 12 00 mov 0x128818,%edx 10bb7a: 39 50 40 cmp %edx,0x40(%eax) 10bb7d: 74 15 je 10bb94 _Thread_Enable_dispatch(); 10bb7f: e8 4c 2b 00 00 call 10e6d0 <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 10bb84: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bb89: 8d 65 f4 lea -0xc(%ebp),%esp 10bb8c: 5b pop %ebx 10bb8d: 5e pop %esi 10bb8e: 5f pop %edi 10bb8f: c9 leave 10bb90: c3 ret 10bb91: 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 ) { 10bb94: 85 f6 test %esi,%esi 10bb96: 75 1c jne 10bbb4 switch ( the_period->state ) { 10bb98: 8b 40 38 mov 0x38(%eax),%eax 10bb9b: 83 f8 04 cmp $0x4,%eax 10bb9e: 77 6c ja 10bc0c <== NEVER TAKEN 10bba0: 8b 04 85 7c 22 12 00 mov 0x12227c(,%eax,4),%eax case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 10bba7: 89 45 d4 mov %eax,-0x2c(%ebp) 10bbaa: e8 21 2b 00 00 call 10e6d0 <_Thread_Enable_dispatch> return( return_value ); 10bbaf: 8b 45 d4 mov -0x2c(%ebp),%eax 10bbb2: eb b5 jmp 10bb69 } _ISR_Disable( level ); 10bbb4: 9c pushf 10bbb5: fa cli 10bbb6: 5f pop %edi if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { 10bbb7: 8b 50 38 mov 0x38(%eax),%edx 10bbba: 85 d2 test %edx,%edx 10bbbc: 74 52 je 10bc10 _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { 10bbbe: 83 fa 02 cmp $0x2,%edx 10bbc1: 0f 84 9e 00 00 00 je 10bc65 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { 10bbc7: 83 fa 04 cmp $0x4,%edx 10bbca: 75 98 jne 10bb64 <== NEVER TAKEN /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 10bbcc: 83 ec 0c sub $0xc,%esp 10bbcf: 50 push %eax 10bbd0: 89 45 d4 mov %eax,-0x2c(%ebp) 10bbd3: e8 74 fe ff ff call 10ba4c <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 10bbd8: 57 push %edi 10bbd9: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 10bbda: 8b 45 d4 mov -0x2c(%ebp),%eax 10bbdd: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) the_period->next_length = length; 10bbe4: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10bbe7: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10bbea: 5b pop %ebx 10bbeb: 5e pop %esi _Watchdog_Insert_ticks( &the_period->Timer, length ); 10bbec: 83 c0 10 add $0x10,%eax 10bbef: 50 push %eax 10bbf0: 68 60 86 12 00 push $0x128660 10bbf5: e8 a2 38 00 00 call 10f49c <_Watchdog_Insert> _Thread_Enable_dispatch(); 10bbfa: e8 d1 2a 00 00 call 10e6d0 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 10bbff: 83 c4 10 add $0x10,%esp 10bc02: b8 06 00 00 00 mov $0x6,%eax 10bc07: e9 5d ff ff ff jmp 10bb69 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 10bc0c: 31 c0 xor %eax,%eax 10bc0e: eb 97 jmp 10bba7 <== NOT EXECUTED return( return_value ); } _ISR_Disable( level ); if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { _ISR_Enable( level ); 10bc10: 57 push %edi 10bc11: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 10bc12: 83 ec 0c sub $0xc,%esp 10bc15: 50 push %eax 10bc16: 89 45 d4 mov %eax,-0x2c(%ebp) 10bc19: e8 ba fd ff ff call 10b9d8 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 10bc1e: 8b 45 d4 mov -0x2c(%ebp),%eax 10bc21: 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; 10bc28: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10bc2f: c7 40 2c 94 bf 10 00 movl $0x10bf94,0x2c(%eax) the_watchdog->id = id; 10bc36: 89 58 30 mov %ebx,0x30(%eax) the_watchdog->user_data = user_data; 10bc39: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 10bc40: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10bc43: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10bc46: 5e pop %esi 10bc47: 5f pop %edi _Watchdog_Insert_ticks( &the_period->Timer, length ); 10bc48: 83 c0 10 add $0x10,%eax 10bc4b: 50 push %eax 10bc4c: 68 60 86 12 00 push $0x128660 10bc51: e8 46 38 00 00 call 10f49c <_Watchdog_Insert> _Thread_Enable_dispatch(); 10bc56: e8 75 2a 00 00 call 10e6d0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10bc5b: 83 c4 10 add $0x10,%esp 10bc5e: 31 c0 xor %eax,%eax 10bc60: e9 04 ff ff ff jmp 10bb69 if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 10bc65: 83 ec 0c sub $0xc,%esp 10bc68: 50 push %eax 10bc69: 89 45 d4 mov %eax,-0x2c(%ebp) 10bc6c: e8 db fd ff ff call 10ba4c <_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; 10bc71: 8b 45 d4 mov -0x2c(%ebp),%eax 10bc74: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) the_period->next_length = length; 10bc7b: 89 70 3c mov %esi,0x3c(%eax) _ISR_Enable( level ); 10bc7e: 57 push %edi 10bc7f: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 10bc80: 8b 15 18 88 12 00 mov 0x128818,%edx 10bc86: 8b 48 08 mov 0x8(%eax),%ecx 10bc89: 89 4a 20 mov %ecx,0x20(%edx) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10bc8c: 59 pop %ecx 10bc8d: 5b pop %ebx 10bc8e: 68 00 40 00 00 push $0x4000 10bc93: 52 push %edx 10bc94: 89 45 d4 mov %eax,-0x2c(%ebp) 10bc97: e8 28 32 00 00 call 10eec4 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 10bc9c: 9c pushf 10bc9d: fa cli 10bc9e: 59 pop %ecx local_state = the_period->state; 10bc9f: 8b 45 d4 mov -0x2c(%ebp),%eax 10bca2: 8b 50 38 mov 0x38(%eax),%edx the_period->state = RATE_MONOTONIC_ACTIVE; 10bca5: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) _ISR_Enable( level ); 10bcac: 51 push %ecx 10bcad: 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 ) 10bcae: 83 c4 10 add $0x10,%esp 10bcb1: 83 fa 03 cmp $0x3,%edx 10bcb4: 74 0c je 10bcc2 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 10bcb6: e8 15 2a 00 00 call 10e6d0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10bcbb: 31 c0 xor %eax,%eax 10bcbd: e9 a7 fe ff ff jmp 10bb69 /* * 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 ); 10bcc2: 57 push %edi 10bcc3: 57 push %edi 10bcc4: 68 00 40 00 00 push $0x4000 10bcc9: ff 35 18 88 12 00 pushl 0x128818 10bccf: e8 98 26 00 00 call 10e36c <_Thread_Clear_state> 10bcd4: 83 c4 10 add $0x10,%esp 10bcd7: eb dd jmp 10bcb6 =============================================================================== 0010bcdc : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 10bcdc: 55 push %ebp 10bcdd: 89 e5 mov %esp,%ebp 10bcdf: 57 push %edi 10bce0: 56 push %esi 10bce1: 53 push %ebx 10bce2: 81 ec 8c 00 00 00 sub $0x8c,%esp 10bce8: 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 ) 10bceb: 8b 7d 0c mov 0xc(%ebp),%edi 10bcee: 85 ff test %edi,%edi 10bcf0: 0f 84 be 00 00 00 je 10bdb4 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 10bcf6: 83 ec 08 sub $0x8,%esp 10bcf9: 68 90 22 12 00 push $0x122290 10bcfe: 56 push %esi 10bcff: ff 55 0c call *0xc(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 10bd02: 59 pop %ecx 10bd03: 5b pop %ebx 10bd04: 68 c8 22 12 00 push $0x1222c8 10bd09: 56 push %esi 10bd0a: ff 55 0c call *0xc(%ebp) (*print)( context, "--- Wall times are in seconds ---\n" ); 10bd0d: 58 pop %eax 10bd0e: 5a pop %edx 10bd0f: 68 ec 22 12 00 push $0x1222ec 10bd14: 56 push %esi 10bd15: ff 55 0c call *0xc(%ebp) Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 10bd18: 5b pop %ebx 10bd19: 5f pop %edi 10bd1a: 68 10 23 12 00 push $0x122310 10bd1f: 56 push %esi 10bd20: ff 55 0c call *0xc(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 10bd23: 5a pop %edx 10bd24: 59 pop %ecx 10bd25: 68 5c 23 12 00 push $0x12235c 10bd2a: 56 push %esi 10bd2b: 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 ; 10bd2e: 8b 1d a8 84 12 00 mov 0x1284a8,%ebx 10bd34: 83 c4 10 add $0x10,%esp 10bd37: 3b 1d ac 84 12 00 cmp 0x1284ac,%ebx 10bd3d: 77 75 ja 10bdb4 <== NEVER TAKEN 10bd3f: 8d 7d 88 lea -0x78(%ebp),%edi 10bd42: eb 09 jmp 10bd4d id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 10bd44: 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 ; 10bd45: 39 1d ac 84 12 00 cmp %ebx,0x1284ac 10bd4b: 72 67 jb 10bdb4 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 10bd4d: 83 ec 08 sub $0x8,%esp 10bd50: 57 push %edi 10bd51: 53 push %ebx 10bd52: e8 45 58 00 00 call 11159c if ( status != RTEMS_SUCCESSFUL ) 10bd57: 83 c4 10 add $0x10,%esp 10bd5a: 85 c0 test %eax,%eax 10bd5c: 75 e6 jne 10bd44 #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 ); 10bd5e: 83 ec 08 sub $0x8,%esp 10bd61: 8d 45 c0 lea -0x40(%ebp),%eax 10bd64: 50 push %eax 10bd65: 53 push %ebx 10bd66: e8 dd 58 00 00 call 111648 #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 10bd6b: 83 c4 0c add $0xc,%esp 10bd6e: 8d 55 e3 lea -0x1d(%ebp),%edx 10bd71: 52 push %edx 10bd72: 6a 05 push $0x5 10bd74: ff 75 c0 pushl -0x40(%ebp) 10bd77: e8 b4 02 00 00 call 10c030 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 10bd7c: 59 pop %ecx 10bd7d: 58 pop %eax 10bd7e: ff 75 8c pushl -0x74(%ebp) 10bd81: ff 75 88 pushl -0x78(%ebp) 10bd84: 8d 45 e3 lea -0x1d(%ebp),%eax 10bd87: 50 push %eax 10bd88: 53 push %ebx 10bd89: 68 ae 22 12 00 push $0x1222ae 10bd8e: 56 push %esi 10bd8f: ff 55 0c call *0xc(%ebp) ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 10bd92: 8b 45 88 mov -0x78(%ebp),%eax 10bd95: 83 c4 20 add $0x20,%esp 10bd98: 85 c0 test %eax,%eax 10bd9a: 75 20 jne 10bdbc (*print)( context, "\n" ); 10bd9c: 83 ec 08 sub $0x8,%esp 10bd9f: 68 b1 04 12 00 push $0x1204b1 10bda4: 56 push %esi 10bda5: ff 55 0c call *0xc(%ebp) continue; 10bda8: 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++ ) { 10bdab: 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 ; 10bdac: 39 1d ac 84 12 00 cmp %ebx,0x1284ac 10bdb2: 73 99 jae 10bd4d <== ALWAYS TAKEN the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 10bdb4: 8d 65 f4 lea -0xc(%ebp),%esp 10bdb7: 5b pop %ebx 10bdb8: 5e pop %esi 10bdb9: 5f pop %edi 10bdba: c9 leave 10bdbb: 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 ); 10bdbc: 52 push %edx 10bdbd: 8d 55 d8 lea -0x28(%ebp),%edx 10bdc0: 52 push %edx 10bdc1: 50 push %eax 10bdc2: 8d 45 a0 lea -0x60(%ebp),%eax 10bdc5: 50 push %eax 10bdc6: e8 31 33 00 00 call 10f0fc <_Timespec_Divide_by_integer> (*print)( context, 10bdcb: b9 d3 4d 62 10 mov $0x10624dd3,%ecx 10bdd0: 8b 45 dc mov -0x24(%ebp),%eax 10bdd3: f7 e9 imul %ecx 10bdd5: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10bddb: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10bde1: c1 f8 06 sar $0x6,%eax 10bde4: 8b 55 dc mov -0x24(%ebp),%edx 10bde7: c1 fa 1f sar $0x1f,%edx 10bdea: 29 d0 sub %edx,%eax 10bdec: 50 push %eax 10bded: ff 75 d8 pushl -0x28(%ebp) 10bdf0: 8b 45 9c mov -0x64(%ebp),%eax 10bdf3: f7 e9 imul %ecx 10bdf5: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10bdfb: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10be01: c1 f8 06 sar $0x6,%eax 10be04: 8b 55 9c mov -0x64(%ebp),%edx 10be07: c1 fa 1f sar $0x1f,%edx 10be0a: 29 d0 sub %edx,%eax 10be0c: 50 push %eax 10be0d: ff 75 98 pushl -0x68(%ebp) 10be10: 8b 45 94 mov -0x6c(%ebp),%eax 10be13: f7 e9 imul %ecx 10be15: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) 10be1b: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10be21: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10be27: c1 f8 06 sar $0x6,%eax 10be2a: 8b 55 94 mov -0x6c(%ebp),%edx 10be2d: c1 fa 1f sar $0x1f,%edx 10be30: 29 d0 sub %edx,%eax 10be32: 50 push %eax 10be33: ff 75 90 pushl -0x70(%ebp) 10be36: 68 a8 23 12 00 push $0x1223a8 10be3b: 56 push %esi 10be3c: 89 4d 84 mov %ecx,-0x7c(%ebp) 10be3f: 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); 10be42: 83 c4 2c add $0x2c,%esp 10be45: 8d 55 d8 lea -0x28(%ebp),%edx 10be48: 52 push %edx 10be49: ff 75 88 pushl -0x78(%ebp) 10be4c: 8d 45 b8 lea -0x48(%ebp),%eax 10be4f: 50 push %eax 10be50: e8 a7 32 00 00 call 10f0fc <_Timespec_Divide_by_integer> (*print)( context, 10be55: 8b 4d 84 mov -0x7c(%ebp),%ecx 10be58: 8b 45 dc mov -0x24(%ebp),%eax 10be5b: f7 e9 imul %ecx 10be5d: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10be63: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10be69: c1 f8 06 sar $0x6,%eax 10be6c: 8b 55 dc mov -0x24(%ebp),%edx 10be6f: c1 fa 1f sar $0x1f,%edx 10be72: 29 d0 sub %edx,%eax 10be74: 50 push %eax 10be75: ff 75 d8 pushl -0x28(%ebp) 10be78: 8b 45 b4 mov -0x4c(%ebp),%eax 10be7b: f7 e9 imul %ecx 10be7d: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10be83: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10be89: c1 f8 06 sar $0x6,%eax 10be8c: 8b 55 b4 mov -0x4c(%ebp),%edx 10be8f: c1 fa 1f sar $0x1f,%edx 10be92: 29 d0 sub %edx,%eax 10be94: 50 push %eax 10be95: ff 75 b0 pushl -0x50(%ebp) 10be98: 8b 45 ac mov -0x54(%ebp),%eax 10be9b: f7 e9 imul %ecx 10be9d: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) 10bea3: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10bea9: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10beaf: c1 f8 06 sar $0x6,%eax 10beb2: 8b 55 ac mov -0x54(%ebp),%edx 10beb5: c1 fa 1f sar $0x1f,%edx 10beb8: 29 d0 sub %edx,%eax 10beba: 50 push %eax 10bebb: ff 75 a8 pushl -0x58(%ebp) 10bebe: 68 c8 23 12 00 push $0x1223c8 10bec3: 56 push %esi 10bec4: ff 55 0c call *0xc(%ebp) 10bec7: 83 c4 30 add $0x30,%esp 10beca: e9 75 fe ff ff jmp 10bd44 =============================================================================== 0010bee8 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 10bee8: 55 push %ebp 10bee9: 89 e5 mov %esp,%ebp 10beeb: 53 push %ebx 10beec: 83 ec 04 sub $0x4,%esp 10beef: a1 8c 85 12 00 mov 0x12858c,%eax 10bef4: 40 inc %eax 10bef5: a3 8c 85 12 00 mov %eax,0x12858c /* * 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 ; 10befa: 8b 1d a8 84 12 00 mov 0x1284a8,%ebx 10bf00: 3b 1d ac 84 12 00 cmp 0x1284ac,%ebx 10bf06: 77 15 ja 10bf1d <== NEVER TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { (void) rtems_rate_monotonic_reset_statistics( id ); 10bf08: 83 ec 0c sub $0xc,%esp 10bf0b: 53 push %ebx 10bf0c: e8 17 00 00 00 call 10bf28 * 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++ ) { 10bf11: 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 ; 10bf12: 83 c4 10 add $0x10,%esp 10bf15: 39 1d ac 84 12 00 cmp %ebx,0x1284ac 10bf1b: 73 eb jae 10bf08 /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 10bf1d: 8b 5d fc mov -0x4(%ebp),%ebx 10bf20: c9 leave } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 10bf21: e9 aa 27 00 00 jmp 10e6d0 <_Thread_Enable_dispatch> =============================================================================== 0010bf28 : */ rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id ) { 10bf28: 55 push %ebp 10bf29: 89 e5 mov %esp,%ebp 10bf2b: 57 push %edi 10bf2c: 53 push %ebx 10bf2d: 83 ec 14 sub $0x14,%esp Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); 10bf30: 8d 45 f4 lea -0xc(%ebp),%eax 10bf33: 50 push %eax 10bf34: ff 75 08 pushl 0x8(%ebp) 10bf37: 68 a0 84 12 00 push $0x1284a0 10bf3c: e8 3f 1c 00 00 call 10db80 <_Objects_Get> 10bf41: 89 c2 mov %eax,%edx switch ( location ) { 10bf43: 83 c4 10 add $0x10,%esp 10bf46: 8b 45 f4 mov -0xc(%ebp),%eax 10bf49: 85 c0 test %eax,%eax 10bf4b: 75 3b jne 10bf88 case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 10bf4d: 8d 5a 54 lea 0x54(%edx),%ebx 10bf50: b9 38 00 00 00 mov $0x38,%ecx 10bf55: 31 c0 xor %eax,%eax 10bf57: 89 df mov %ebx,%edi 10bf59: f3 aa rep stos %al,%es:(%edi) 10bf5b: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10bf62: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10bf69: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10bf70: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) _Thread_Enable_dispatch(); 10bf77: e8 54 27 00 00 call 10e6d0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10bf7c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bf7e: 8d 65 f8 lea -0x8(%ebp),%esp 10bf81: 5b pop %ebx 10bf82: 5f pop %edi 10bf83: c9 leave 10bf84: c3 ret 10bf85: 8d 76 00 lea 0x0(%esi),%esi #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10bf88: b8 04 00 00 00 mov $0x4,%eax } 10bf8d: 8d 65 f8 lea -0x8(%ebp),%esp 10bf90: 5b pop %ebx 10bf91: 5f pop %edi 10bf92: c9 leave 10bf93: c3 ret =============================================================================== 00116874 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 116874: 55 push %ebp 116875: 89 e5 mov %esp,%ebp 116877: 57 push %edi 116878: 56 push %esi 116879: 53 push %ebx 11687a: 83 ec 1c sub $0x1c,%esp 11687d: 8b 7d 08 mov 0x8(%ebp),%edi 116880: 8b 75 0c mov 0xc(%ebp),%esi rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 116883: 85 ff test %edi,%edi 116885: 0f 84 c1 00 00 00 je 11694c return RTEMS_INVALID_NAME; if ( !starting_address ) 11688b: 85 f6 test %esi,%esi 11688d: 0f 84 e1 00 00 00 je 116974 return RTEMS_INVALID_ADDRESS; if ( !id ) 116893: 8b 45 1c mov 0x1c(%ebp),%eax 116896: 85 c0 test %eax,%eax 116898: 0f 84 d6 00 00 00 je 116974 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 11689e: 83 ec 0c sub $0xc,%esp 1168a1: ff 35 a0 09 14 00 pushl 0x1409a0 1168a7: e8 bc 24 00 00 call 118d68 <_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 ); 1168ac: c7 04 24 00 08 14 00 movl $0x140800,(%esp) 1168b3: e8 1c 3a 00 00 call 11a2d4 <_Objects_Allocate> 1168b8: 89 c3 mov %eax,%ebx the_region = _Region_Allocate(); if ( !the_region ) 1168ba: 83 c4 10 add $0x10,%esp 1168bd: 85 c0 test %eax,%eax 1168bf: 0f 84 bf 00 00 00 je 116984 return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 1168c5: ff 75 14 pushl 0x14(%ebp) 1168c8: ff 75 10 pushl 0x10(%ebp) 1168cb: 56 push %esi 1168cc: 8d 40 68 lea 0x68(%eax),%eax 1168cf: 50 push %eax 1168d0: e8 0b 36 00 00 call 119ee0 <_Heap_Initialize> 1168d5: 89 43 5c mov %eax,0x5c(%ebx) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 1168d8: 83 c4 10 add $0x10,%esp 1168db: 85 c0 test %eax,%eax 1168dd: 74 7d je 11695c return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 1168df: 89 73 50 mov %esi,0x50(%ebx) the_region->length = length; 1168e2: 8b 45 10 mov 0x10(%ebp),%eax 1168e5: 89 43 54 mov %eax,0x54(%ebx) the_region->page_size = page_size; 1168e8: 8b 55 14 mov 0x14(%ebp),%edx 1168eb: 89 53 58 mov %edx,0x58(%ebx) the_region->attribute_set = attribute_set; 1168ee: 8b 45 18 mov 0x18(%ebp),%eax 1168f1: 89 43 60 mov %eax,0x60(%ebx) the_region->number_of_used_blocks = 0; 1168f4: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) _Thread_queue_Initialize( 1168fb: 6a 06 push $0x6 1168fd: 6a 40 push $0x40 1168ff: a8 04 test $0x4,%al 116901: 0f 95 c0 setne %al 116904: 0f b6 c0 movzbl %al,%eax 116907: 50 push %eax 116908: 8d 43 10 lea 0x10(%ebx),%eax 11690b: 50 push %eax 11690c: e8 e3 50 00 00 call 11b9f4 <_Thread_queue_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 116911: 8b 43 08 mov 0x8(%ebx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 116914: 0f b7 c8 movzwl %ax,%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 116917: 8b 15 1c 08 14 00 mov 0x14081c,%edx 11691d: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 116920: 89 7b 0c mov %edi,0xc(%ebx) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 116923: 8b 55 1c mov 0x1c(%ebp),%edx 116926: 89 02 mov %eax,(%edx) 116928: 83 c4 10 add $0x10,%esp return_status = RTEMS_SUCCESSFUL; 11692b: 31 c0 xor %eax,%eax } } _RTEMS_Unlock_allocator(); 11692d: 83 ec 0c sub $0xc,%esp 116930: ff 35 a0 09 14 00 pushl 0x1409a0 116936: 89 45 e4 mov %eax,-0x1c(%ebp) 116939: e8 72 24 00 00 call 118db0 <_API_Mutex_Unlock> return return_status; 11693e: 83 c4 10 add $0x10,%esp 116941: 8b 45 e4 mov -0x1c(%ebp),%eax } 116944: 8d 65 f4 lea -0xc(%ebp),%esp 116947: 5b pop %ebx 116948: 5e pop %esi 116949: 5f pop %edi 11694a: c9 leave 11694b: c3 ret { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 11694c: b8 03 00 00 00 mov $0x3,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 116951: 8d 65 f4 lea -0xc(%ebp),%esp 116954: 5b pop %ebx 116955: 5e pop %esi 116956: 5f pop %edi 116957: c9 leave 116958: c3 ret 116959: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 11695c: 83 ec 08 sub $0x8,%esp 11695f: 53 push %ebx 116960: 68 00 08 14 00 push $0x140800 116965: e8 de 3c 00 00 call 11a648 <_Objects_Free> 11696a: 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; 11696d: b8 08 00 00 00 mov $0x8,%eax 116972: eb b9 jmp 11692d if ( !starting_address ) return RTEMS_INVALID_ADDRESS; if ( !id ) return RTEMS_INVALID_ADDRESS; 116974: b8 09 00 00 00 mov $0x9,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 116979: 8d 65 f4 lea -0xc(%ebp),%esp 11697c: 5b pop %ebx 11697d: 5e pop %esi 11697e: 5f pop %edi 11697f: c9 leave 116980: c3 ret 116981: 8d 76 00 lea 0x0(%esi),%esi _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region ) return_status = RTEMS_TOO_MANY; 116984: b8 05 00 00 00 mov $0x5,%eax 116989: eb a2 jmp 11692d =============================================================================== 0011698c : */ rtems_status_code rtems_region_delete( rtems_id id ) { 11698c: 55 push %ebp 11698d: 89 e5 mov %esp,%ebp 11698f: 53 push %ebx 116990: 83 ec 30 sub $0x30,%esp Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 116993: ff 35 a0 09 14 00 pushl 0x1409a0 116999: e8 ca 23 00 00 call 118d68 <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 11699e: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1169a1: 8d 45 f4 lea -0xc(%ebp),%eax 1169a4: 50 push %eax 1169a5: ff 75 08 pushl 0x8(%ebp) 1169a8: 68 00 08 14 00 push $0x140800 1169ad: e8 d6 3d 00 00 call 11a788 <_Objects_Get_no_protection> switch ( location ) { 1169b2: 83 c4 10 add $0x10,%esp 1169b5: 8b 5d f4 mov -0xc(%ebp),%ebx 1169b8: 85 db test %ebx,%ebx 1169ba: 74 1c je 1169d8 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 1169bc: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 1169c1: 83 ec 0c sub $0xc,%esp 1169c4: ff 35 a0 09 14 00 pushl 0x1409a0 1169ca: e8 e1 23 00 00 call 118db0 <_API_Mutex_Unlock> return return_status; } 1169cf: 89 d8 mov %ebx,%eax 1169d1: 8b 5d fc mov -0x4(%ebp),%ebx 1169d4: c9 leave 1169d5: c3 ret 1169d6: 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 ) 1169d8: 8b 48 64 mov 0x64(%eax),%ecx 1169db: 85 c9 test %ecx,%ecx 1169dd: 74 09 je 1169e8 return_status = RTEMS_RESOURCE_IN_USE; 1169df: bb 0c 00 00 00 mov $0xc,%ebx 1169e4: eb db jmp 1169c1 1169e6: 66 90 xchg %ax,%ax else { _Objects_Close( &_Region_Information, &the_region->Object ); 1169e8: 83 ec 08 sub $0x8,%esp 1169eb: 50 push %eax 1169ec: 68 00 08 14 00 push $0x140800 1169f1: 89 45 e4 mov %eax,-0x1c(%ebp) 1169f4: e8 57 39 00 00 call 11a350 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 1169f9: 58 pop %eax 1169fa: 5a pop %edx 1169fb: 8b 45 e4 mov -0x1c(%ebp),%eax 1169fe: 50 push %eax 1169ff: 68 00 08 14 00 push $0x140800 116a04: e8 3f 3c 00 00 call 11a648 <_Objects_Free> 116a09: 83 c4 10 add $0x10,%esp _Region_Free( the_region ); return_status = RTEMS_SUCCESSFUL; 116a0c: 31 db xor %ebx,%ebx 116a0e: eb b1 jmp 1169c1 =============================================================================== 00116a10 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 116a10: 55 push %ebp 116a11: 89 e5 mov %esp,%ebp 116a13: 56 push %esi 116a14: 53 push %ebx 116a15: 83 ec 10 sub $0x10,%esp 116a18: 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 ) 116a1b: 85 db test %ebx,%ebx 116a1d: 74 75 je 116a94 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 116a1f: 83 ec 0c sub $0xc,%esp 116a22: ff 35 a0 09 14 00 pushl 0x1409a0 116a28: e8 3b 23 00 00 call 118d68 <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 116a2d: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 116a30: 8d 45 f0 lea -0x10(%ebp),%eax 116a33: 50 push %eax 116a34: ff 75 08 pushl 0x8(%ebp) 116a37: 68 00 08 14 00 push $0x140800 116a3c: e8 47 3d 00 00 call 11a788 <_Objects_Get_no_protection> 116a41: 89 c6 mov %eax,%esi switch ( location ) { 116a43: 83 c4 10 add $0x10,%esp 116a46: 8b 45 f0 mov -0x10(%ebp),%eax 116a49: 85 c0 test %eax,%eax 116a4b: 74 1f je 116a6c break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 116a4d: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 116a52: 83 ec 0c sub $0xc,%esp 116a55: ff 35 a0 09 14 00 pushl 0x1409a0 116a5b: e8 50 23 00 00 call 118db0 <_API_Mutex_Unlock> return return_status; 116a60: 83 c4 10 add $0x10,%esp } 116a63: 89 d8 mov %ebx,%eax 116a65: 8d 65 f8 lea -0x8(%ebp),%esp 116a68: 5b pop %ebx 116a69: 5e pop %esi 116a6a: c9 leave 116a6b: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: extend_ok = _Heap_Extend( 116a6c: 8d 45 f4 lea -0xc(%ebp),%eax 116a6f: 50 push %eax 116a70: ff 75 10 pushl 0x10(%ebp) 116a73: 53 push %ebx 116a74: 8d 46 68 lea 0x68(%esi),%eax 116a77: 50 push %eax 116a78: e8 43 2e 00 00 call 1198c0 <_Heap_Extend> starting_address, length, &amount_extended ); if ( extend_ok ) { 116a7d: 83 c4 10 add $0x10,%esp 116a80: 84 c0 test %al,%al 116a82: 74 20 je 116aa4 the_region->length += amount_extended; 116a84: 8b 45 f4 mov -0xc(%ebp),%eax 116a87: 01 46 54 add %eax,0x54(%esi) the_region->maximum_segment_size += amount_extended; 116a8a: 01 46 5c add %eax,0x5c(%esi) return_status = RTEMS_SUCCESSFUL; 116a8d: 31 db xor %ebx,%ebx 116a8f: eb c1 jmp 116a52 116a91: 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; 116a94: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 116a99: 89 d8 mov %ebx,%eax 116a9b: 8d 65 f8 lea -0x8(%ebp),%esp 116a9e: 5b pop %ebx 116a9f: 5e pop %esi 116aa0: c9 leave 116aa1: c3 ret 116aa2: 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; 116aa4: bb 09 00 00 00 mov $0x9,%ebx 116aa9: eb a7 jmp 116a52 =============================================================================== 00116aac : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { 116aac: 55 push %ebp 116aad: 89 e5 mov %esp,%ebp 116aaf: 53 push %ebx 116ab0: 83 ec 14 sub $0x14,%esp 116ab3: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 116ab6: 85 db test %ebx,%ebx 116ab8: 74 76 je 116b30 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 116aba: 83 ec 0c sub $0xc,%esp 116abd: ff 35 a0 09 14 00 pushl 0x1409a0 116ac3: e8 a0 22 00 00 call 118d68 <_API_Mutex_Lock> 116ac8: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 116acb: 8d 45 f4 lea -0xc(%ebp),%eax 116ace: 50 push %eax 116acf: ff 75 08 pushl 0x8(%ebp) 116ad2: 68 00 08 14 00 push $0x140800 116ad7: e8 ac 3c 00 00 call 11a788 <_Objects_Get_no_protection> switch ( location ) { 116adc: 83 c4 10 add $0x10,%esp 116adf: 8b 55 f4 mov -0xc(%ebp),%edx 116ae2: 85 d2 test %edx,%edx 116ae4: 74 1e je 116b04 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 116ae6: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 116aeb: 83 ec 0c sub $0xc,%esp 116aee: ff 35 a0 09 14 00 pushl 0x1409a0 116af4: e8 b7 22 00 00 call 118db0 <_API_Mutex_Unlock> return return_status; 116af9: 83 c4 10 add $0x10,%esp } 116afc: 89 d8 mov %ebx,%eax 116afe: 8b 5d fc mov -0x4(%ebp),%ebx 116b01: c9 leave 116b02: c3 ret 116b03: 90 nop the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; 116b04: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) the_info->Used.total = 0; 116b0b: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) the_info->Used.largest = 0; 116b12: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 116b19: 83 ec 08 sub $0x8,%esp 116b1c: 53 push %ebx 116b1d: 83 c0 68 add $0x68,%eax 116b20: 50 push %eax 116b21: e8 96 31 00 00 call 119cbc <_Heap_Get_free_information> return_status = RTEMS_SUCCESSFUL; break; 116b26: 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; 116b29: 31 db xor %ebx,%ebx break; 116b2b: eb be jmp 116aeb 116b2d: 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; 116b30: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 116b35: 89 d8 mov %ebx,%eax 116b37: 8b 5d fc mov -0x4(%ebp),%ebx 116b3a: c9 leave 116b3b: c3 ret =============================================================================== 00116bb4 : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 116bb4: 55 push %ebp 116bb5: 89 e5 mov %esp,%ebp 116bb7: 57 push %edi 116bb8: 56 push %esi 116bb9: 53 push %ebx 116bba: 83 ec 2c sub $0x2c,%esp 116bbd: 8b 75 0c mov 0xc(%ebp),%esi 116bc0: 8b 5d 18 mov 0x18(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 116bc3: 85 db test %ebx,%ebx 116bc5: 0f 84 a1 00 00 00 je 116c6c return RTEMS_INVALID_ADDRESS; *segment = NULL; 116bcb: c7 03 00 00 00 00 movl $0x0,(%ebx) if ( size == 0 ) 116bd1: 85 f6 test %esi,%esi 116bd3: 75 0f jne 116be4 return RTEMS_INVALID_SIZE; 116bd5: b8 08 00 00 00 mov $0x8,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 116bda: 8d 65 f4 lea -0xc(%ebp),%esp 116bdd: 5b pop %ebx 116bde: 5e pop %esi 116bdf: 5f pop %edi 116be0: c9 leave 116be1: c3 ret 116be2: 66 90 xchg %ax,%ax *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 116be4: 83 ec 0c sub $0xc,%esp 116be7: ff 35 a0 09 14 00 pushl 0x1409a0 116bed: e8 76 21 00 00 call 118d68 <_API_Mutex_Lock> executing = _Thread_Executing; 116bf2: a1 78 0b 14 00 mov 0x140b78,%eax 116bf7: 89 45 d4 mov %eax,-0x2c(%ebp) 116bfa: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 116bfd: 8d 45 e4 lea -0x1c(%ebp),%eax 116c00: 50 push %eax 116c01: ff 75 08 pushl 0x8(%ebp) 116c04: 68 00 08 14 00 push $0x140800 116c09: e8 7a 3b 00 00 call 11a788 <_Objects_Get_no_protection> 116c0e: 89 c7 mov %eax,%edi switch ( location ) { 116c10: 83 c4 10 add $0x10,%esp 116c13: 8b 45 e4 mov -0x1c(%ebp),%eax 116c16: 85 c0 test %eax,%eax 116c18: 75 2a jne 116c44 case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 116c1a: 3b 77 5c cmp 0x5c(%edi),%esi 116c1d: 76 2d jbe 116c4c return_status = RTEMS_INVALID_SIZE; 116c1f: b8 08 00 00 00 mov $0x8,%eax default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 116c24: 83 ec 0c sub $0xc,%esp 116c27: ff 35 a0 09 14 00 pushl 0x1409a0 116c2d: 89 45 d0 mov %eax,-0x30(%ebp) 116c30: e8 7b 21 00 00 call 118db0 <_API_Mutex_Unlock> return return_status; 116c35: 83 c4 10 add $0x10,%esp 116c38: 8b 45 d0 mov -0x30(%ebp),%eax } 116c3b: 8d 65 f4 lea -0xc(%ebp),%esp 116c3e: 5b pop %ebx 116c3f: 5e pop %esi 116c40: 5f pop %edi 116c41: c9 leave 116c42: c3 ret 116c43: 90 nop break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 116c44: b8 04 00 00 00 mov $0x4,%eax 116c49: eb d9 jmp 116c24 116c4b: 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 ); 116c4c: 6a 00 push $0x0 116c4e: 6a 00 push $0x0 116c50: 56 push %esi RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uintptr_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 116c51: 8d 47 68 lea 0x68(%edi),%eax 116c54: 50 push %eax 116c55: e8 92 2a 00 00 call 1196ec <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 116c5a: 83 c4 10 add $0x10,%esp 116c5d: 85 c0 test %eax,%eax 116c5f: 74 17 je 116c78 the_region->number_of_used_blocks += 1; 116c61: ff 47 64 incl 0x64(%edi) *segment = the_segment; 116c64: 89 03 mov %eax,(%ebx) return_status = RTEMS_SUCCESSFUL; 116c66: 31 c0 xor %eax,%eax 116c68: eb ba jmp 116c24 116c6a: 66 90 xchg %ax,%ax rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) return RTEMS_INVALID_ADDRESS; 116c6c: b8 09 00 00 00 mov $0x9,%eax 116c71: e9 64 ff ff ff jmp 116bda 116c76: 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 ) ) { 116c78: f6 45 10 01 testb $0x1,0x10(%ebp) 116c7c: 74 07 je 116c85 return_status = RTEMS_UNSATISFIED; 116c7e: b8 0d 00 00 00 mov $0xd,%eax 116c83: eb 9f jmp 116c24 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 116c85: a1 ec 08 14 00 mov 0x1408ec,%eax 116c8a: 40 inc %eax 116c8b: a3 ec 08 14 00 mov %eax,0x1408ec * 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(); 116c90: 83 ec 0c sub $0xc,%esp 116c93: ff 35 a0 09 14 00 pushl 0x1409a0 116c99: e8 12 21 00 00 call 118db0 <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 116c9e: 8d 47 10 lea 0x10(%edi),%eax 116ca1: 8b 55 d4 mov -0x2c(%ebp),%edx 116ca4: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 116ca7: 8b 4d 08 mov 0x8(%ebp),%ecx 116caa: 89 4a 20 mov %ecx,0x20(%edx) executing->Wait.count = size; 116cad: 89 72 24 mov %esi,0x24(%edx) executing->Wait.return_argument = segment; 116cb0: 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; 116cb3: 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 ); 116cba: 83 c4 0c add $0xc,%esp 116cbd: 68 b8 ba 11 00 push $0x11bab8 116cc2: ff 75 14 pushl 0x14(%ebp) 116cc5: 50 push %eax 116cc6: e8 c1 4a 00 00 call 11b78c <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 116ccb: e8 44 46 00 00 call 11b314 <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 116cd0: 8b 55 d4 mov -0x2c(%ebp),%edx 116cd3: 8b 42 34 mov 0x34(%edx),%eax 116cd6: 83 c4 10 add $0x10,%esp 116cd9: e9 fc fe ff ff jmp 116bda =============================================================================== 00116d94 : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 116d94: 55 push %ebp 116d95: 89 e5 mov %esp,%ebp 116d97: 56 push %esi 116d98: 53 push %ebx 116d99: 83 ec 20 sub $0x20,%esp 116d9c: 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 ) 116d9f: 85 db test %ebx,%ebx 116da1: 0f 84 89 00 00 00 je 116e30 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 116da7: 83 ec 0c sub $0xc,%esp 116daa: ff 35 a0 09 14 00 pushl 0x1409a0 116db0: e8 b3 1f 00 00 call 118d68 <_API_Mutex_Lock> 116db5: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 116db8: 8d 45 f0 lea -0x10(%ebp),%eax 116dbb: 50 push %eax 116dbc: ff 75 08 pushl 0x8(%ebp) 116dbf: 68 00 08 14 00 push $0x140800 116dc4: e8 bf 39 00 00 call 11a788 <_Objects_Get_no_protection> 116dc9: 89 c6 mov %eax,%esi switch ( location ) { 116dcb: 83 c4 10 add $0x10,%esp 116dce: 8b 45 f0 mov -0x10(%ebp),%eax 116dd1: 85 c0 test %eax,%eax 116dd3: 74 1f je 116df4 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 116dd5: 83 ec 0c sub $0xc,%esp 116dd8: ff 35 a0 09 14 00 pushl 0x1409a0 116dde: e8 cd 1f 00 00 call 118db0 <_API_Mutex_Unlock> return return_status; 116de3: 83 c4 10 add $0x10,%esp 116de6: b8 04 00 00 00 mov $0x4,%eax } 116deb: 8d 65 f8 lea -0x8(%ebp),%esp 116dee: 5b pop %ebx 116def: 5e pop %esi 116df0: c9 leave 116df1: c3 ret 116df2: 66 90 xchg %ax,%ax case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 116df4: 83 ec 0c sub $0xc,%esp 116df7: 8d 45 f4 lea -0xc(%ebp),%eax 116dfa: 50 push %eax 116dfb: 8d 45 ec lea -0x14(%ebp),%eax 116dfe: 50 push %eax 116dff: ff 75 10 pushl 0x10(%ebp) 116e02: ff 75 0c pushl 0xc(%ebp) 116e05: 8d 46 68 lea 0x68(%esi),%eax 116e08: 50 push %eax 116e09: e8 da 32 00 00 call 11a0e8 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 116e0e: 8b 55 ec mov -0x14(%ebp),%edx 116e11: 89 13 mov %edx,(%ebx) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 116e13: 83 c4 20 add $0x20,%esp 116e16: 85 c0 test %eax,%eax 116e18: 75 22 jne 116e3c _Region_Process_queue( the_region ); /* unlocks allocator */ 116e1a: 83 ec 0c sub $0xc,%esp 116e1d: 56 push %esi 116e1e: e8 d1 72 00 00 call 11e0f4 <_Region_Process_queue> 116e23: 83 c4 10 add $0x10,%esp else _RTEMS_Unlock_allocator(); if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; 116e26: 31 c0 xor %eax,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 116e28: 8d 65 f8 lea -0x8(%ebp),%esp 116e2b: 5b pop %ebx 116e2c: 5e pop %esi 116e2d: c9 leave 116e2e: c3 ret 116e2f: 90 nop rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) return RTEMS_INVALID_ADDRESS; 116e30: b8 09 00 00 00 mov $0x9,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 116e35: 8d 65 f8 lea -0x8(%ebp),%esp 116e38: 5b pop %ebx 116e39: 5e pop %esi 116e3a: c9 leave 116e3b: c3 ret _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 116e3c: 83 ec 0c sub $0xc,%esp 116e3f: ff 35 a0 09 14 00 pushl 0x1409a0 116e45: 89 45 e4 mov %eax,-0x1c(%ebp) 116e48: e8 63 1f 00 00 call 118db0 <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 116e4d: 83 c4 10 add $0x10,%esp return RTEMS_UNSATISFIED; 116e50: 8b 45 e4 mov -0x1c(%ebp),%eax 116e53: 48 dec %eax 116e54: 0f 94 c0 sete %al 116e57: 0f b6 c0 movzbl %al,%eax 116e5a: 8d 04 85 09 00 00 00 lea 0x9(,%eax,4),%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 116e61: 8d 65 f8 lea -0x8(%ebp),%esp 116e64: 5b pop %ebx 116e65: 5e pop %esi 116e66: c9 leave 116e67: c3 ret =============================================================================== 00116e68 : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 116e68: 55 push %ebp 116e69: 89 e5 mov %esp,%ebp 116e6b: 53 push %ebx 116e6c: 83 ec 20 sub $0x20,%esp uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 116e6f: ff 35 a0 09 14 00 pushl 0x1409a0 116e75: e8 ee 1e 00 00 call 118d68 <_API_Mutex_Lock> 116e7a: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 116e7d: 8d 45 f4 lea -0xc(%ebp),%eax 116e80: 50 push %eax 116e81: ff 75 08 pushl 0x8(%ebp) 116e84: 68 00 08 14 00 push $0x140800 116e89: e8 fa 38 00 00 call 11a788 <_Objects_Get_no_protection> 116e8e: 89 c3 mov %eax,%ebx switch ( location ) { 116e90: 83 c4 10 add $0x10,%esp 116e93: 8b 45 f4 mov -0xc(%ebp),%eax 116e96: 85 c0 test %eax,%eax 116e98: 75 1e jne 116eb8 RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 116e9a: 83 ec 08 sub $0x8,%esp 116e9d: ff 75 0c pushl 0xc(%ebp) 116ea0: 8d 43 68 lea 0x68(%ebx),%eax 116ea3: 50 push %eax 116ea4: e8 af 2c 00 00 call 119b58 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 116ea9: 83 c4 10 add $0x10,%esp 116eac: 84 c0 test %al,%al 116eae: 75 28 jne 116ed8 return_status = RTEMS_INVALID_ADDRESS; 116eb0: bb 09 00 00 00 mov $0x9,%ebx 116eb5: eb 06 jmp 116ebd 116eb7: 90 nop break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 116eb8: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 116ebd: 83 ec 0c sub $0xc,%esp 116ec0: ff 35 a0 09 14 00 pushl 0x1409a0 116ec6: e8 e5 1e 00 00 call 118db0 <_API_Mutex_Unlock> return return_status; 116ecb: 83 c4 10 add $0x10,%esp } 116ece: 89 d8 mov %ebx,%eax 116ed0: 8b 5d fc mov -0x4(%ebp),%ebx 116ed3: c9 leave 116ed4: c3 ret 116ed5: 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; 116ed8: ff 4b 64 decl 0x64(%ebx) _Region_Process_queue(the_region); /* unlocks allocator */ 116edb: 83 ec 0c sub $0xc,%esp 116ede: 53 push %ebx 116edf: e8 10 72 00 00 call 11e0f4 <_Region_Process_queue> return RTEMS_SUCCESSFUL; 116ee4: 83 c4 10 add $0x10,%esp 116ee7: 31 db xor %ebx,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 116ee9: 89 d8 mov %ebx,%eax 116eeb: 8b 5d fc mov -0x4(%ebp),%ebx 116eee: c9 leave 116eef: c3 ret =============================================================================== 0010a92c : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 10a92c: 55 push %ebp 10a92d: 89 e5 mov %esp,%ebp 10a92f: 57 push %edi 10a930: 56 push %esi 10a931: 53 push %ebx 10a932: 83 ec 3c sub $0x3c,%esp 10a935: 8b 75 08 mov 0x8(%ebp),%esi 10a938: 8b 5d 10 mov 0x10(%ebp),%ebx 10a93b: 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 ) ) 10a93e: 85 f6 test %esi,%esi 10a940: 74 4a je 10a98c return RTEMS_INVALID_NAME; if ( !id ) 10a942: 85 ff test %edi,%edi 10a944: 0f 84 f6 00 00 00 je 10aa40 <== NEVER TAKEN return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 10a94a: 89 da mov %ebx,%edx 10a94c: 81 e2 c0 00 00 00 and $0xc0,%edx 10a952: 74 48 je 10a99c */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); 10a954: 89 d8 mov %ebx,%eax 10a956: 83 e0 30 and $0x30,%eax _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10a959: 83 f8 10 cmp $0x10,%eax 10a95c: 74 0e je 10a96c } if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; 10a95e: b8 0b 00 00 00 mov $0xb,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10a963: 8d 65 f4 lea -0xc(%ebp),%esp 10a966: 5b pop %ebx 10a967: 5e pop %esi 10a968: 5f pop %edi 10a969: c9 leave 10a96a: c3 ret 10a96b: 90 nop #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10a96c: f6 c3 04 test $0x4,%bl 10a96f: 74 ed je 10a95e _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 10a971: 81 fa c0 00 00 00 cmp $0xc0,%edx 10a977: 74 e5 je 10a95e 10a979: 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 ) ) 10a97e: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10a982: 76 1f jbe 10a9a3 return RTEMS_INVALID_NUMBER; 10a984: b8 0a 00 00 00 mov $0xa,%eax 10a989: eb d8 jmp 10a963 10a98b: 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; 10a98c: b8 03 00 00 00 mov $0x3,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10a991: 8d 65 f4 lea -0xc(%ebp),%esp 10a994: 5b pop %ebx 10a995: 5e pop %esi 10a996: 5f pop %edi 10a997: c9 leave 10a998: c3 ret 10a999: 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 ) ) 10a99c: 89 d9 mov %ebx,%ecx 10a99e: 83 e1 30 and $0x30,%ecx 10a9a1: 75 db jne 10a97e rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a9a3: a1 ec 64 12 00 mov 0x1264ec,%eax 10a9a8: 40 inc %eax 10a9a9: a3 ec 64 12 00 mov %eax,0x1264ec * 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 ); 10a9ae: 83 ec 0c sub $0xc,%esp 10a9b1: 68 40 64 12 00 push $0x126440 10a9b6: 89 4d c4 mov %ecx,-0x3c(%ebp) 10a9b9: e8 3a 13 00 00 call 10bcf8 <_Objects_Allocate> 10a9be: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 10a9c0: 83 c4 10 add $0x10,%esp 10a9c3: 85 c0 test %eax,%eax 10a9c5: 8b 4d c4 mov -0x3c(%ebp),%ecx 10a9c8: 0f 84 ba 00 00 00 je 10aa88 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 10a9ce: 89 58 10 mov %ebx,0x10(%eax) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 10a9d1: 85 c9 test %ecx,%ecx 10a9d3: 74 77 je 10aa4c /* * 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; 10a9d5: 31 c0 xor %eax,%eax 10a9d7: f6 c3 04 test $0x4,%bl 10a9da: 0f 95 c0 setne %al 10a9dd: 89 45 d8 mov %eax,-0x28(%ebp) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 10a9e0: 83 f9 10 cmp $0x10,%ecx 10a9e3: 0f 84 ae 00 00 00 je 10aa97 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; 10a9e9: c7 45 d0 01 00 00 00 movl $0x1,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10a9f0: c6 45 d4 00 movb $0x0,-0x2c(%ebp) } mutex_status = _CORE_mutex_Initialize( 10a9f4: 50 push %eax 10a9f5: 31 c0 xor %eax,%eax 10a9f7: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10a9fb: 0f 94 c0 sete %al 10a9fe: 50 push %eax 10a9ff: 8d 45 d0 lea -0x30(%ebp),%eax 10aa02: 50 push %eax 10aa03: 8d 42 14 lea 0x14(%edx),%eax 10aa06: 50 push %eax 10aa07: 89 55 c4 mov %edx,-0x3c(%ebp) 10aa0a: e8 e1 0a 00 00 call 10b4f0 <_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 ) { 10aa0f: 83 c4 10 add $0x10,%esp 10aa12: 83 f8 05 cmp $0x5,%eax 10aa15: 8b 55 c4 mov -0x3c(%ebp),%edx 10aa18: 0f 84 a9 00 00 00 je 10aac7 Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10aa1e: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10aa21: 0f b7 d8 movzwl %ax,%ebx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10aa24: 8b 0d 5c 64 12 00 mov 0x12645c,%ecx 10aa2a: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10aa2d: 89 72 0c mov %esi,0xc(%edx) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 10aa30: 89 07 mov %eax,(%edi) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 10aa32: e8 c5 22 00 00 call 10ccfc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10aa37: 31 c0 xor %eax,%eax 10aa39: e9 25 ff ff ff jmp 10a963 10aa3e: 66 90 xchg %ax,%ax if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10aa40: b8 09 00 00 00 mov $0x9,%eax 10aa45: e9 19 ff ff ff jmp 10a963 10aa4a: 66 90 xchg %ax,%ax */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 10aa4c: 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; 10aa53: 31 c0 xor %eax,%eax 10aa55: f6 c3 04 test $0x4,%bl 10aa58: 0f 95 c0 setne %al 10aa5b: 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; 10aa5e: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 10aa65: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) _CORE_semaphore_Initialize( 10aa6c: 51 push %ecx 10aa6d: ff 75 0c pushl 0xc(%ebp) 10aa70: 8d 45 e0 lea -0x20(%ebp),%eax 10aa73: 50 push %eax 10aa74: 8d 42 14 lea 0x14(%edx),%eax 10aa77: 50 push %eax 10aa78: 89 55 c4 mov %edx,-0x3c(%ebp) 10aa7b: e8 00 0d 00 00 call 10b780 <_CORE_semaphore_Initialize> 10aa80: 83 c4 10 add $0x10,%esp 10aa83: 8b 55 c4 mov -0x3c(%ebp),%edx 10aa86: eb 96 jmp 10aa1e _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 10aa88: e8 6f 22 00 00 call 10ccfc <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10aa8d: b8 05 00 00 00 mov $0x5,%eax 10aa92: e9 cc fe ff ff jmp 10a963 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; 10aa97: 8b 45 14 mov 0x14(%ebp),%eax 10aa9a: 89 45 dc mov %eax,-0x24(%ebp) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10aa9d: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10aaa4: c6 45 d4 00 movb $0x0,-0x2c(%ebp) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 10aaa8: 83 7d d8 01 cmpl $0x1,-0x28(%ebp) 10aaac: 0f 85 42 ff ff ff jne 10a9f4 if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 10aab2: f6 c3 40 test $0x40,%bl 10aab5: 74 30 je 10aae7 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10aab7: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10aabe: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10aac2: e9 2d ff ff ff jmp 10a9f4 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10aac7: 83 ec 08 sub $0x8,%esp 10aaca: 52 push %edx 10aacb: 68 40 64 12 00 push $0x126440 10aad0: e8 97 15 00 00 call 10c06c <_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(); 10aad5: e8 22 22 00 00 call 10ccfc <_Thread_Enable_dispatch> return RTEMS_INVALID_PRIORITY; 10aada: 83 c4 10 add $0x10,%esp 10aadd: b8 13 00 00 00 mov $0x13,%eax 10aae2: e9 7c fe ff ff jmp 10a963 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 ) ) { 10aae7: 81 e3 80 00 00 00 and $0x80,%ebx 10aaed: 0f 84 01 ff ff ff je 10a9f4 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 10aaf3: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10aafa: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10aafe: e9 f1 fe ff ff jmp 10a9f4 =============================================================================== 0010ab04 : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 10ab04: 55 push %ebp 10ab05: 89 e5 mov %esp,%ebp 10ab07: 53 push %ebx 10ab08: 83 ec 18 sub $0x18,%esp register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); 10ab0b: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) _Objects_Get( &_Semaphore_Information, id, location ); 10ab0e: 50 push %eax 10ab0f: ff 75 08 pushl 0x8(%ebp) 10ab12: 68 40 64 12 00 push $0x126440 10ab17: e8 90 16 00 00 call 10c1ac <_Objects_Get> 10ab1c: 89 c3 mov %eax,%ebx switch ( location ) { 10ab1e: 83 c4 10 add $0x10,%esp 10ab21: 8b 4d f4 mov -0xc(%ebp),%ecx 10ab24: 85 c9 test %ecx,%ecx 10ab26: 74 0c je 10ab34 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10ab28: b8 04 00 00 00 mov $0x4,%eax } 10ab2d: 8b 5d fc mov -0x4(%ebp),%ebx 10ab30: c9 leave 10ab31: c3 ret 10ab32: 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); 10ab34: 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) ) { 10ab37: 83 e0 30 and $0x30,%eax 10ab3a: 74 58 je 10ab94 if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 10ab3c: 8b 53 64 mov 0x64(%ebx),%edx 10ab3f: 85 d2 test %edx,%edx 10ab41: 75 15 jne 10ab58 10ab43: 83 f8 20 cmp $0x20,%eax 10ab46: 74 10 je 10ab58 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 10ab48: e8 af 21 00 00 call 10ccfc <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 10ab4d: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ab52: 8b 5d fc mov -0x4(%ebp),%ebx 10ab55: c9 leave 10ab56: c3 ret 10ab57: 90 nop !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 10ab58: 50 push %eax 10ab59: 6a 03 push $0x3 10ab5b: 6a 00 push $0x0 10ab5d: 8d 43 14 lea 0x14(%ebx),%eax 10ab60: 50 push %eax 10ab61: e8 7e 09 00 00 call 10b4e4 <_CORE_mutex_Flush> 10ab66: 83 c4 10 add $0x10,%esp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 10ab69: 83 ec 08 sub $0x8,%esp 10ab6c: 53 push %ebx 10ab6d: 68 40 64 12 00 push $0x126440 10ab72: e8 fd 11 00 00 call 10bd74 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10ab77: 58 pop %eax 10ab78: 5a pop %edx 10ab79: 53 push %ebx 10ab7a: 68 40 64 12 00 push $0x126440 10ab7f: e8 e8 14 00 00 call 10c06c <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 10ab84: e8 73 21 00 00 call 10ccfc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ab89: 83 c4 10 add $0x10,%esp 10ab8c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ab8e: 8b 5d fc mov -0x4(%ebp),%ebx 10ab91: c9 leave 10ab92: c3 ret 10ab93: 90 nop &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 10ab94: 51 push %ecx 10ab95: 6a 02 push $0x2 10ab97: 6a 00 push $0x0 10ab99: 8d 43 14 lea 0x14(%ebx),%eax 10ab9c: 50 push %eax 10ab9d: e8 d2 0b 00 00 call 10b774 <_CORE_semaphore_Flush> 10aba2: 83 c4 10 add $0x10,%esp 10aba5: eb c2 jmp 10ab69 =============================================================================== 0010aba8 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 10aba8: 55 push %ebp 10aba9: 89 e5 mov %esp,%ebp 10abab: 57 push %edi 10abac: 56 push %esi 10abad: 53 push %ebx 10abae: 83 ec 1c sub $0x1c,%esp 10abb1: 8b 5d 08 mov 0x8(%ebp),%ebx 10abb4: 8b 75 0c mov 0xc(%ebp),%esi 10abb7: 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 ); 10abba: 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 ); 10abbd: 50 push %eax 10abbe: 8d 45 e4 lea -0x1c(%ebp),%eax 10abc1: 50 push %eax 10abc2: 53 push %ebx 10abc3: 68 40 64 12 00 push $0x126440 10abc8: e8 87 15 00 00 call 10c154 <_Objects_Get_isr_disable> switch ( location ) { 10abcd: 83 c4 10 add $0x10,%esp 10abd0: 8b 4d e4 mov -0x1c(%ebp),%ecx 10abd3: 85 c9 test %ecx,%ecx 10abd5: 74 0d je 10abe4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10abd7: b8 04 00 00 00 mov $0x4,%eax } 10abdc: 8d 65 f4 lea -0xc(%ebp),%esp 10abdf: 5b pop %ebx 10abe0: 5e pop %esi 10abe1: 5f pop %edi 10abe2: c9 leave 10abe3: 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) ) { 10abe4: f6 40 10 30 testb $0x30,0x10(%eax) 10abe8: 74 36 je 10ac20 _CORE_mutex_Seize( 10abea: 83 ec 0c sub $0xc,%esp 10abed: ff 75 e0 pushl -0x20(%ebp) 10abf0: 57 push %edi */ RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait ( rtems_option option_set ) { return (option_set & RTEMS_NO_WAIT) ? true : false; 10abf1: 83 e6 01 and $0x1,%esi 10abf4: 83 f6 01 xor $0x1,%esi 10abf7: 56 push %esi 10abf8: 53 push %ebx 10abf9: 83 c0 14 add $0x14,%eax 10abfc: 50 push %eax 10abfd: e8 e6 09 00 00 call 10b5e8 <_CORE_mutex_Seize> id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10ac02: 83 c4 14 add $0x14,%esp _Thread_Executing->Wait.return_code ); 10ac05: a1 78 67 12 00 mov 0x126778,%eax id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10ac0a: ff 70 34 pushl 0x34(%eax) 10ac0d: e8 12 01 00 00 call 10ad24 <_Semaphore_Translate_core_mutex_return_code> 10ac12: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10ac15: 8d 65 f4 lea -0xc(%ebp),%esp 10ac18: 5b pop %ebx 10ac19: 5e pop %esi 10ac1a: 5f pop %edi 10ac1b: c9 leave 10ac1c: c3 ret 10ac1d: 8d 76 00 lea 0x0(%esi),%esi { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10ac20: 8b 15 78 67 12 00 mov 0x126778,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10ac26: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( the_semaphore->count != 0 ) { 10ac2d: 8b 48 5c mov 0x5c(%eax),%ecx 10ac30: 85 c9 test %ecx,%ecx 10ac32: 75 2c jne 10ac60 the_semaphore->count -= 1; _ISR_Enable( *level_p ); return; } if ( !wait ) { 10ac34: 83 e6 01 and $0x1,%esi 10ac37: 74 33 je 10ac6c _ISR_Enable( *level_p ); 10ac39: ff 75 e0 pushl -0x20(%ebp) 10ac3c: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 10ac3d: 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( 10ac44: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code ); 10ac47: a1 78 67 12 00 mov 0x126778,%eax id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 10ac4c: ff 70 34 pushl 0x34(%eax) 10ac4f: e8 e0 00 00 00 call 10ad34 <_Semaphore_Translate_core_semaphore_return_code> 10ac54: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10ac57: 8d 65 f4 lea -0xc(%ebp),%esp 10ac5a: 5b pop %ebx 10ac5b: 5e pop %esi 10ac5c: 5f pop %edi 10ac5d: c9 leave 10ac5e: c3 ret 10ac5f: 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; 10ac60: 49 dec %ecx 10ac61: 89 48 5c mov %ecx,0x5c(%eax) _ISR_Enable( *level_p ); 10ac64: ff 75 e0 pushl -0x20(%ebp) 10ac67: 9d popf 10ac68: eb da jmp 10ac44 10ac6a: 66 90 xchg %ax,%ax 10ac6c: 8b 0d ec 64 12 00 mov 0x1264ec,%ecx 10ac72: 41 inc %ecx 10ac73: 89 0d ec 64 12 00 mov %ecx,0x1264ec 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; 10ac79: 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; 10ac80: 83 c0 14 add $0x14,%eax 10ac83: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10ac86: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( *level_p ); 10ac89: ff 75 e0 pushl -0x20(%ebp) 10ac8c: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 10ac8d: 52 push %edx 10ac8e: 68 a0 d4 10 00 push $0x10d4a0 10ac93: 57 push %edi 10ac94: 50 push %eax 10ac95: e8 da 24 00 00 call 10d174 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10ac9a: e8 5d 20 00 00 call 10ccfc <_Thread_Enable_dispatch> 10ac9f: 83 c4 10 add $0x10,%esp 10aca2: eb a0 jmp 10ac44 =============================================================================== 0010aca4 : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 10aca4: 55 push %ebp 10aca5: 89 e5 mov %esp,%ebp 10aca7: 53 push %ebx 10aca8: 83 ec 18 sub $0x18,%esp 10acab: 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 ); 10acae: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) _Objects_Get( &_Semaphore_Information, id, location ); 10acb1: 50 push %eax 10acb2: 53 push %ebx 10acb3: 68 40 64 12 00 push $0x126440 10acb8: e8 ef 14 00 00 call 10c1ac <_Objects_Get> switch ( location ) { 10acbd: 83 c4 10 add $0x10,%esp 10acc0: 8b 55 f4 mov -0xc(%ebp),%edx 10acc3: 85 d2 test %edx,%edx 10acc5: 74 0d je 10acd4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10acc7: b8 04 00 00 00 mov $0x4,%eax } 10accc: 8b 5d fc mov -0x4(%ebp),%ebx 10accf: c9 leave 10acd0: c3 ret 10acd1: 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) ) { 10acd4: f6 40 10 30 testb $0x30,0x10(%eax) 10acd8: 75 26 jne 10ad00 MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); } else { semaphore_status = _CORE_semaphore_Surrender( 10acda: 52 push %edx 10acdb: 6a 00 push $0x0 10acdd: 53 push %ebx 10acde: 83 c0 14 add $0x14,%eax 10ace1: 50 push %eax 10ace2: e8 d9 0a 00 00 call 10b7c0 <_CORE_semaphore_Surrender> 10ace7: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10ace9: e8 0e 20 00 00 call 10ccfc <_Thread_Enable_dispatch> return 10acee: 89 1c 24 mov %ebx,(%esp) 10acf1: e8 3e 00 00 00 call 10ad34 <_Semaphore_Translate_core_semaphore_return_code> 10acf6: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10acf9: 8b 5d fc mov -0x4(%ebp),%ebx 10acfc: c9 leave 10acfd: c3 ret 10acfe: 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( 10ad00: 51 push %ecx 10ad01: 6a 00 push $0x0 10ad03: 53 push %ebx 10ad04: 83 c0 14 add $0x14,%eax 10ad07: 50 push %eax 10ad08: e8 7b 09 00 00 call 10b688 <_CORE_mutex_Surrender> 10ad0d: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10ad0f: e8 e8 1f 00 00 call 10ccfc <_Thread_Enable_dispatch> return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 10ad14: 89 1c 24 mov %ebx,(%esp) 10ad17: e8 08 00 00 00 call 10ad24 <_Semaphore_Translate_core_mutex_return_code> 10ad1c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ad1f: 8b 5d fc mov -0x4(%ebp),%ebx 10ad22: c9 leave 10ad23: c3 ret =============================================================================== 00117388 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 117388: 55 push %ebp 117389: 89 e5 mov %esp,%ebp 11738b: 53 push %ebx 11738c: 83 ec 14 sub $0x14,%esp 11738f: 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 ) 117392: 85 db test %ebx,%ebx 117394: 75 0a jne 1173a0 return RTEMS_INVALID_NUMBER; 117396: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11739b: 8b 5d fc mov -0x4(%ebp),%ebx 11739e: c9 leave 11739f: c3 ret ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 1173a0: 83 ec 08 sub $0x8,%esp 1173a3: 8d 45 f4 lea -0xc(%ebp),%eax 1173a6: 50 push %eax 1173a7: ff 75 08 pushl 0x8(%ebp) 1173aa: e8 89 3f 00 00 call 11b338 <_Thread_Get> switch ( location ) { 1173af: 83 c4 10 add $0x10,%esp 1173b2: 8b 55 f4 mov -0xc(%ebp),%edx 1173b5: 85 d2 test %edx,%edx 1173b7: 74 0b je 1173c4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1173b9: b8 04 00 00 00 mov $0x4,%eax } 1173be: 8b 5d fc mov -0x4(%ebp),%ebx 1173c1: c9 leave 1173c2: c3 ret 1173c3: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 1173c4: 8b 90 e4 00 00 00 mov 0xe4(%eax),%edx asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 1173ca: 8b 4a 0c mov 0xc(%edx),%ecx 1173cd: 85 c9 test %ecx,%ecx 1173cf: 74 3f je 117410 if ( asr->is_enabled ) { 1173d1: 80 7a 08 00 cmpb $0x0,0x8(%edx) 1173d5: 74 25 je 1173fc rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 1173d7: 9c pushf 1173d8: fa cli 1173d9: 59 pop %ecx *signal_set |= signals; 1173da: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 1173dd: 51 push %ecx 1173de: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 1173df: 8b 15 74 0b 14 00 mov 0x140b74,%edx 1173e5: 85 d2 test %edx,%edx 1173e7: 74 1b je 117404 1173e9: 3b 05 78 0b 14 00 cmp 0x140b78,%eax 1173ef: 75 13 jne 117404 <== NEVER TAKEN _Thread_Dispatch_necessary = true; 1173f1: c6 05 84 0b 14 00 01 movb $0x1,0x140b84 1173f8: eb 0a jmp 117404 1173fa: 66 90 xchg %ax,%ax rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 1173fc: 9c pushf 1173fd: fa cli 1173fe: 58 pop %eax *signal_set |= signals; 1173ff: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 117402: 50 push %eax 117403: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 117404: e8 0b 3f 00 00 call 11b314 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 117409: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11740b: 8b 5d fc mov -0x4(%ebp),%ebx 11740e: c9 leave 11740f: c3 ret _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 117410: e8 ff 3e 00 00 call 11b314 <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 117415: b8 0b 00 00 00 mov $0xb,%eax 11741a: e9 7c ff ff ff jmp 11739b =============================================================================== 0010ad44 : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { 10ad44: 55 push %ebp 10ad45: 89 e5 mov %esp,%ebp 10ad47: 57 push %edi 10ad48: 56 push %esi 10ad49: 53 push %ebx 10ad4a: 83 ec 1c sub $0x1c,%esp 10ad4d: 8b 5d 08 mov 0x8(%ebp),%ebx 10ad50: 8b 7d 0c mov 0xc(%ebp),%edi 10ad53: 8b 75 1c mov 0x1c(%ebp),%esi Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10ad56: 85 f6 test %esi,%esi 10ad58: 0f 84 3e 01 00 00 je 10ae9c return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10ad5e: 85 db test %ebx,%ebx 10ad60: 0f 84 d2 00 00 00 je 10ae38 /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 10ad66: f7 45 18 00 80 00 00 testl $0x8000,0x18(%ebp) 10ad6d: 75 17 jne 10ad86 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10ad6f: 85 ff test %edi,%edi 10ad71: 0f 84 b1 00 00 00 je 10ae28 ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 10ad77: 0f b6 05 f4 22 12 00 movzbl 0x1222f4,%eax */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10ad7e: 39 c7 cmp %eax,%edi 10ad80: 0f 87 a2 00 00 00 ja 10ae28 */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10ad86: 83 ec 0c sub $0xc,%esp 10ad89: ff 35 a0 65 12 00 pushl 0x1265a0 10ad8f: e8 78 06 00 00 call 10b40c <_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 ); 10ad94: c7 04 24 80 64 12 00 movl $0x126480,(%esp) 10ad9b: e8 58 0f 00 00 call 10bcf8 <_Objects_Allocate> 10ada0: 89 c2 mov %eax,%edx * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 10ada2: 83 c4 10 add $0x10,%esp 10ada5: 85 c0 test %eax,%eax 10ada7: 0f 84 cf 00 00 00 je 10ae7c /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 10adad: 50 push %eax 10adae: 53 push %ebx */ RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level ( Modes_Control mode_set ) { return ( mode_set & RTEMS_INTERRUPT_MASK ); 10adaf: 8b 45 14 mov 0x14(%ebp),%eax 10adb2: 83 e0 01 and $0x1,%eax 10adb5: 50 push %eax 10adb6: 6a 00 push $0x0 10adb8: 31 c0 xor %eax,%eax 10adba: f7 45 14 00 02 00 00 testl $0x200,0x14(%ebp) 10adc1: 0f 95 c0 setne %al 10adc4: 50 push %eax 10adc5: 31 c0 xor %eax,%eax 10adc7: f7 45 14 00 01 00 00 testl $0x100,0x14(%ebp) 10adce: 0f 94 c0 sete %al 10add1: 50 push %eax 10add2: 57 push %edi */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_floating_point( rtems_attribute attribute_set ) { return ( attribute_set & RTEMS_FLOATING_POINT ) ? true : false; 10add3: 8b 45 18 mov 0x18(%ebp),%eax 10add6: 83 e0 01 and $0x1,%eax 10add9: 50 push %eax 10adda: ff 75 10 pushl 0x10(%ebp) 10addd: 6a 00 push $0x0 10addf: 52 push %edx 10ade0: 68 80 64 12 00 push $0x126480 10ade5: 89 55 e4 mov %edx,-0x1c(%ebp) 10ade8: e8 ab 1f 00 00 call 10cd98 <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 10aded: 83 c4 30 add $0x30,%esp 10adf0: 84 c0 test %al,%al 10adf2: 8b 55 e4 mov -0x1c(%ebp),%edx 10adf5: 74 51 je 10ae48 _RTEMS_Unlock_allocator(); return RTEMS_UNSATISFIED; } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 10adf7: 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( 10adfd: 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; 10ae04: 0f 94 40 08 sete 0x8(%eax) *id = the_thread->Object.id; 10ae08: 8b 42 08 mov 0x8(%edx),%eax 10ae0b: 89 06 mov %eax,(%esi) ); } #endif _RTEMS_Unlock_allocator(); 10ae0d: 83 ec 0c sub $0xc,%esp 10ae10: ff 35 a0 65 12 00 pushl 0x1265a0 10ae16: e8 39 06 00 00 call 10b454 <_API_Mutex_Unlock> return RTEMS_SUCCESSFUL; 10ae1b: 83 c4 10 add $0x10,%esp 10ae1e: 31 c0 xor %eax,%eax } 10ae20: 8d 65 f4 lea -0xc(%ebp),%esp 10ae23: 5b pop %ebx 10ae24: 5e pop %esi 10ae25: 5f pop %edi 10ae26: c9 leave 10ae27: 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; 10ae28: b8 13 00 00 00 mov $0x13,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10ae2d: 8d 65 f4 lea -0xc(%ebp),%esp 10ae30: 5b pop %ebx 10ae31: 5e pop %esi 10ae32: 5f pop %edi 10ae33: c9 leave 10ae34: c3 ret 10ae35: 8d 76 00 lea 0x0(%esi),%esi if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10ae38: b8 03 00 00 00 mov $0x3,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10ae3d: 8d 65 f4 lea -0xc(%ebp),%esp 10ae40: 5b pop %ebx 10ae41: 5e pop %esi 10ae42: 5f pop %edi 10ae43: c9 leave 10ae44: c3 ret 10ae45: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 10ae48: 83 ec 0c sub $0xc,%esp 10ae4b: ff 72 08 pushl 0x8(%edx) 10ae4e: e8 89 12 00 00 call 10c0dc <_Objects_Get_information_id> 10ae53: 5a pop %edx 10ae54: 59 pop %ecx 10ae55: 8b 55 e4 mov -0x1c(%ebp),%edx 10ae58: 52 push %edx 10ae59: 50 push %eax 10ae5a: e8 0d 12 00 00 call 10c06c <_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(); 10ae5f: 58 pop %eax 10ae60: ff 35 a0 65 12 00 pushl 0x1265a0 10ae66: e8 e9 05 00 00 call 10b454 <_API_Mutex_Unlock> return RTEMS_UNSATISFIED; 10ae6b: 83 c4 10 add $0x10,%esp 10ae6e: b8 0d 00 00 00 mov $0xd,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10ae73: 8d 65 f4 lea -0xc(%ebp),%esp 10ae76: 5b pop %ebx 10ae77: 5e pop %esi 10ae78: 5f pop %edi 10ae79: c9 leave 10ae7a: c3 ret 10ae7b: 90 nop */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10ae7c: 83 ec 0c sub $0xc,%esp 10ae7f: ff 35 a0 65 12 00 pushl 0x1265a0 10ae85: e8 ca 05 00 00 call 10b454 <_API_Mutex_Unlock> return RTEMS_TOO_MANY; 10ae8a: 83 c4 10 add $0x10,%esp 10ae8d: b8 05 00 00 00 mov $0x5,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10ae92: 8d 65 f4 lea -0xc(%ebp),%esp 10ae95: 5b pop %ebx 10ae96: 5e pop %esi 10ae97: 5f pop %edi 10ae98: c9 leave 10ae99: c3 ret 10ae9a: 66 90 xchg %ax,%ax RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) return RTEMS_INVALID_ADDRESS; 10ae9c: b8 09 00 00 00 mov $0x9,%eax 10aea1: eb 8a jmp 10ae2d =============================================================================== 0010aea4 : */ rtems_status_code rtems_task_delete( rtems_id id ) { 10aea4: 55 push %ebp 10aea5: 89 e5 mov %esp,%ebp 10aea7: 53 push %ebx 10aea8: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 10aeab: ff 35 a0 65 12 00 pushl 0x1265a0 10aeb1: e8 56 05 00 00 call 10b40c <_API_Mutex_Lock> the_thread = _Thread_Get( id, &location ); 10aeb6: 5a pop %edx 10aeb7: 59 pop %ecx 10aeb8: 8d 45 f4 lea -0xc(%ebp),%eax 10aebb: 50 push %eax 10aebc: ff 75 08 pushl 0x8(%ebp) 10aebf: e8 5c 1e 00 00 call 10cd20 <_Thread_Get> 10aec4: 89 c3 mov %eax,%ebx switch ( location ) { 10aec6: 83 c4 10 add $0x10,%esp 10aec9: 8b 45 f4 mov -0xc(%ebp),%eax 10aecc: 85 c0 test %eax,%eax 10aece: 75 44 jne 10af14 case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 10aed0: 83 ec 0c sub $0xc,%esp 10aed3: ff 73 08 pushl 0x8(%ebx) 10aed6: e8 01 12 00 00 call 10c0dc <_Objects_Get_information_id> 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 10aedb: 5a pop %edx 10aedc: 59 pop %ecx 10aedd: 53 push %ebx 10aede: 50 push %eax 10aedf: e8 f0 1a 00 00 call 10c9d4 <_Thread_Close> 10aee4: 58 pop %eax 10aee5: ff 73 08 pushl 0x8(%ebx) 10aee8: e8 ef 11 00 00 call 10c0dc <_Objects_Get_information_id> 10aeed: 5a pop %edx 10aeee: 59 pop %ecx 10aeef: 53 push %ebx 10aef0: 50 push %eax 10aef1: e8 76 11 00 00 call 10c06c <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10aef6: 58 pop %eax 10aef7: ff 35 a0 65 12 00 pushl 0x1265a0 10aefd: e8 52 05 00 00 call 10b454 <_API_Mutex_Unlock> _Thread_Enable_dispatch(); 10af02: e8 f5 1d 00 00 call 10ccfc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10af07: 83 c4 10 add $0x10,%esp 10af0a: 31 c0 xor %eax,%eax break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } 10af0c: 8b 5d fc mov -0x4(%ebp),%ebx 10af0f: c9 leave 10af10: c3 ret 10af11: 8d 76 00 lea 0x0(%esi),%esi case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 10af14: 83 ec 0c sub $0xc,%esp 10af17: ff 35 a0 65 12 00 pushl 0x1265a0 10af1d: e8 32 05 00 00 call 10b454 <_API_Mutex_Unlock> return RTEMS_INVALID_ID; 10af22: 83 c4 10 add $0x10,%esp 10af25: b8 04 00 00 00 mov $0x4,%eax } 10af2a: 8b 5d fc mov -0x4(%ebp),%ebx 10af2d: c9 leave 10af2e: c3 ret =============================================================================== 0010ca6c : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 10ca6c: 55 push %ebp 10ca6d: 89 e5 mov %esp,%ebp 10ca6f: 56 push %esi 10ca70: 53 push %ebx 10ca71: 83 ec 10 sub $0x10,%esp 10ca74: 8b 45 08 mov 0x8(%ebp),%eax 10ca77: 8b 75 0c mov 0xc(%ebp),%esi 10ca7a: 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() ) 10ca7d: 80 3d 24 52 12 00 00 cmpb $0x0,0x125224 10ca84: 74 6e je 10caf4 return RTEMS_NOT_CONFIGURED; if ( !note ) 10ca86: 85 db test %ebx,%ebx 10ca88: 74 7e je 10cb08 /* * 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 ) 10ca8a: 83 fe 0f cmp $0xf,%esi 10ca8d: 77 3d ja 10cacc /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10ca8f: 85 c0 test %eax,%eax 10ca91: 74 45 je 10cad8 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10ca93: 8b 15 18 9a 12 00 mov 0x129a18,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10ca99: 3b 42 08 cmp 0x8(%edx),%eax 10ca9c: 74 40 je 10cade api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10ca9e: 83 ec 08 sub $0x8,%esp 10caa1: 8d 55 f4 lea -0xc(%ebp),%edx 10caa4: 52 push %edx 10caa5: 50 push %eax 10caa6: e8 4d 21 00 00 call 10ebf8 <_Thread_Get> switch ( location ) { 10caab: 83 c4 10 add $0x10,%esp 10caae: 8b 55 f4 mov -0xc(%ebp),%edx 10cab1: 85 d2 test %edx,%edx 10cab3: 75 4b jne 10cb00 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10cab5: 8b 80 e4 00 00 00 mov 0xe4(%eax),%eax 10cabb: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10cabf: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10cac1: e8 0e 21 00 00 call 10ebd4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10cac6: 31 c0 xor %eax,%eax 10cac8: eb 07 jmp 10cad1 10caca: 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; 10cacc: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cad1: 8d 65 f8 lea -0x8(%ebp),%esp 10cad4: 5b pop %ebx 10cad5: 5e pop %esi 10cad6: c9 leave 10cad7: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10cad8: 8b 15 18 9a 12 00 mov 0x129a18,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10cade: 8b 82 e4 00 00 00 mov 0xe4(%edx),%eax 10cae4: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10cae8: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 10caea: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10caec: 8d 65 f8 lea -0x8(%ebp),%esp 10caef: 5b pop %ebx 10caf0: 5e pop %esi 10caf1: c9 leave 10caf2: c3 ret 10caf3: 90 nop register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; 10caf4: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10caf9: 8d 65 f8 lea -0x8(%ebp),%esp 10cafc: 5b pop %ebx 10cafd: 5e pop %esi 10cafe: c9 leave 10caff: c3 ret case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10cb00: b8 04 00 00 00 mov $0x4,%eax 10cb05: eb ca jmp 10cad1 10cb07: 90 nop if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; if ( !note ) return RTEMS_INVALID_ADDRESS; 10cb08: b8 09 00 00 00 mov $0x9,%eax 10cb0d: eb c2 jmp 10cad1 =============================================================================== 0011776c : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { 11776c: 55 push %ebp 11776d: 89 e5 mov %esp,%ebp 11776f: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 117772: 8d 45 f4 lea -0xc(%ebp),%eax 117775: 50 push %eax 117776: ff 75 08 pushl 0x8(%ebp) 117779: e8 ba 3b 00 00 call 11b338 <_Thread_Get> switch ( location ) { 11777e: 83 c4 10 add $0x10,%esp 117781: 8b 55 f4 mov -0xc(%ebp),%edx 117784: 85 d2 test %edx,%edx 117786: 74 08 je 117790 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 117788: b8 04 00 00 00 mov $0x4,%eax } 11778d: c9 leave 11778e: c3 ret 11778f: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 117790: f6 40 10 02 testb $0x2,0x10(%eax) 117794: 74 0e je 1177a4 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 117796: e8 79 3b 00 00 call 11b314 <_Thread_Enable_dispatch> return RTEMS_ALREADY_SUSPENDED; 11779b: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1177a0: c9 leave 1177a1: c3 ret 1177a2: 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(); 1177a4: e8 6b 3b 00 00 call 11b314 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1177a9: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1177ab: c9 leave 1177ac: c3 ret =============================================================================== 0011197c : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 11197c: 55 push %ebp 11197d: 89 e5 mov %esp,%ebp 11197f: 57 push %edi 111980: 56 push %esi 111981: 53 push %ebx 111982: 83 ec 1c sub $0x1c,%esp 111985: 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 ) 111988: 85 c9 test %ecx,%ecx 11198a: 0f 84 40 01 00 00 je 111ad0 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 111990: 8b 1d 78 67 12 00 mov 0x126778,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 111996: 8b bb e4 00 00 00 mov 0xe4(%ebx),%edi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 11199c: 80 7b 74 01 cmpb $0x1,0x74(%ebx) 1119a0: 19 f6 sbb %esi,%esi 1119a2: 81 e6 00 01 00 00 and $0x100,%esi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 1119a8: 8b 53 7c mov 0x7c(%ebx),%edx 1119ab: 85 d2 test %edx,%edx 1119ad: 0f 85 f1 00 00 00 jne 111aa4 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 1119b3: 80 7f 08 01 cmpb $0x1,0x8(%edi) 1119b7: 19 d2 sbb %edx,%edx 1119b9: 81 e2 00 04 00 00 and $0x400,%edx old_mode |= _ISR_Get_level(); 1119bf: 89 55 e4 mov %edx,-0x1c(%ebp) 1119c2: 89 4d e0 mov %ecx,-0x20(%ebp) 1119c5: e8 a2 c6 ff ff call 10e06c <_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; 1119ca: 8b 55 e4 mov -0x1c(%ebp),%edx 1119cd: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); 1119cf: 09 f0 or %esi,%eax 1119d1: 8b 4d e0 mov -0x20(%ebp),%ecx 1119d4: 89 01 mov %eax,(%ecx) *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 1119d6: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 1119dd: 74 0b je 1119ea executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 1119df: f7 45 08 00 01 00 00 testl $0x100,0x8(%ebp) 1119e6: 0f 94 43 74 sete 0x74(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 1119ea: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 1119f1: 74 1c je 111a0f if ( _Modes_Is_timeslice(mode_set) ) { 1119f3: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 1119fa: 0f 84 b8 00 00 00 je 111ab8 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 111a00: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 111a07: a1 c0 64 12 00 mov 0x1264c0,%eax 111a0c: 89 43 78 mov %eax,0x78(%ebx) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 111a0f: f6 45 0c 01 testb $0x1,0xc(%ebp) 111a13: 74 0b je 111a20 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 111a15: f6 45 08 01 testb $0x1,0x8(%ebp) 111a19: 0f 84 91 00 00 00 je 111ab0 111a1f: fa cli * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 111a20: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 111a27: 74 3f je 111a68 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 111a29: f7 45 08 00 04 00 00 testl $0x400,0x8(%ebp) 111a30: 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 ) { 111a33: 38 47 08 cmp %al,0x8(%edi) 111a36: 74 30 je 111a68 asr->is_enabled = is_asr_enabled; 111a38: 88 47 08 mov %al,0x8(%edi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 111a3b: 9c pushf 111a3c: fa cli 111a3d: 58 pop %eax _signals = information->signals_pending; 111a3e: 8b 57 18 mov 0x18(%edi),%edx information->signals_pending = information->signals_posted; 111a41: 8b 4f 14 mov 0x14(%edi),%ecx 111a44: 89 4f 18 mov %ecx,0x18(%edi) information->signals_posted = _signals; 111a47: 89 57 14 mov %edx,0x14(%edi) _ISR_Enable( _level ); 111a4a: 50 push %eax 111a4b: 9d popf /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 111a4c: 8b 47 14 mov 0x14(%edi),%eax 111a4f: 85 c0 test %eax,%eax 111a51: 0f 95 c0 setne %al needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 111a54: 83 3d 80 66 12 00 03 cmpl $0x3,0x126680 111a5b: 74 16 je 111a73 <== ALWAYS TAKEN if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; 111a5d: 31 c0 xor %eax,%eax } 111a5f: 83 c4 1c add $0x1c,%esp 111a62: 5b pop %ebx 111a63: 5e pop %esi 111a64: 5f pop %edi 111a65: c9 leave 111a66: c3 ret 111a67: 90 nop /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 111a68: 31 c0 xor %eax,%eax needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 111a6a: 83 3d 80 66 12 00 03 cmpl $0x3,0x126680 111a71: 75 ea jne 111a5d bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; 111a73: 8b 15 78 67 12 00 mov 0x126778,%edx if ( are_signals_pending || 111a79: 84 c0 test %al,%al 111a7b: 75 0e jne 111a8b 111a7d: 3b 15 7c 67 12 00 cmp 0x12677c,%edx 111a83: 74 d8 je 111a5d (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { 111a85: 80 7a 74 00 cmpb $0x0,0x74(%edx) 111a89: 74 d2 je 111a5d <== NEVER TAKEN _Thread_Dispatch_necessary = true; 111a8b: c6 05 84 67 12 00 01 movb $0x1,0x126784 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); 111a92: e8 ed b0 ff ff call 10cb84 <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; 111a97: 31 c0 xor %eax,%eax } 111a99: 83 c4 1c add $0x1c,%esp 111a9c: 5b pop %ebx 111a9d: 5e pop %esi 111a9e: 5f pop %edi 111a9f: c9 leave 111aa0: c3 ret 111aa1: 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; 111aa4: 81 ce 00 02 00 00 or $0x200,%esi 111aaa: e9 04 ff ff ff jmp 1119b3 111aaf: 90 nop 111ab0: fb sti 111ab1: e9 6a ff ff ff jmp 111a20 111ab6: 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; 111ab8: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 111abf: f6 45 0c 01 testb $0x1,0xc(%ebp) 111ac3: 0f 84 57 ff ff ff je 111a20 111ac9: e9 47 ff ff ff jmp 111a15 111ace: 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; 111ad0: b8 09 00 00 00 mov $0x9,%eax if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; } 111ad5: 83 c4 1c add $0x1c,%esp 111ad8: 5b pop %ebx 111ad9: 5e pop %esi 111ada: 5f pop %edi 111adb: c9 leave 111adc: c3 ret =============================================================================== 0010e1c4 : */ rtems_status_code rtems_task_resume( rtems_id id ) { 10e1c4: 55 push %ebp 10e1c5: 89 e5 mov %esp,%ebp 10e1c7: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10e1ca: 8d 45 f4 lea -0xc(%ebp),%eax 10e1cd: 50 push %eax 10e1ce: ff 75 08 pushl 0x8(%ebp) 10e1d1: e8 fa 1d 00 00 call 10ffd0 <_Thread_Get> switch ( location ) { 10e1d6: 83 c4 10 add $0x10,%esp 10e1d9: 8b 55 f4 mov -0xc(%ebp),%edx 10e1dc: 85 d2 test %edx,%edx 10e1de: 74 08 je 10e1e8 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10e1e0: b8 04 00 00 00 mov $0x4,%eax } 10e1e5: c9 leave 10e1e6: c3 ret 10e1e7: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 10e1e8: f6 40 10 02 testb $0x2,0x10(%eax) 10e1ec: 75 0e jne 10e1fc _Thread_Resume( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10e1ee: e8 b9 1d 00 00 call 10ffac <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10e1f3: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10e1f8: c9 leave 10e1f9: c3 ret 10e1fa: 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 ); 10e1fc: 83 ec 08 sub $0x8,%esp 10e1ff: 6a 02 push $0x2 10e201: 50 push %eax 10e202: e8 41 1a 00 00 call 10fc48 <_Thread_Clear_state> _Thread_Enable_dispatch(); 10e207: e8 a0 1d 00 00 call 10ffac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10e20c: 83 c4 10 add $0x10,%esp 10e20f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10e211: c9 leave 10e212: c3 ret =============================================================================== 0010cbe4 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 10cbe4: 55 push %ebp 10cbe5: 89 e5 mov %esp,%ebp 10cbe7: 56 push %esi 10cbe8: 53 push %ebx 10cbe9: 83 ec 10 sub $0x10,%esp 10cbec: 8b 45 08 mov 0x8(%ebp),%eax 10cbef: 8b 5d 0c mov 0xc(%ebp),%ebx 10cbf2: 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() ) 10cbf5: 80 3d 24 52 12 00 00 cmpb $0x0,0x125224 10cbfc: 74 66 je 10cc64 /* * 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 ) 10cbfe: 83 fb 0f cmp $0xf,%ebx 10cc01: 77 39 ja 10cc3c /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10cc03: 85 c0 test %eax,%eax 10cc05: 74 41 je 10cc48 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10cc07: 8b 15 18 9a 12 00 mov 0x129a18,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10cc0d: 3b 42 08 cmp 0x8(%edx),%eax 10cc10: 74 3c je 10cc4e api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10cc12: 83 ec 08 sub $0x8,%esp 10cc15: 8d 55 f4 lea -0xc(%ebp),%edx 10cc18: 52 push %edx 10cc19: 50 push %eax 10cc1a: e8 d9 1f 00 00 call 10ebf8 <_Thread_Get> switch ( location ) { 10cc1f: 83 c4 10 add $0x10,%esp 10cc22: 8b 55 f4 mov -0xc(%ebp),%edx 10cc25: 85 d2 test %edx,%edx 10cc27: 75 47 jne 10cc70 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10cc29: 8b 80 e4 00 00 00 mov 0xe4(%eax),%eax 10cc2f: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) _Thread_Enable_dispatch(); 10cc33: e8 9c 1f 00 00 call 10ebd4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10cc38: 31 c0 xor %eax,%eax 10cc3a: eb 05 jmp 10cc41 * 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; 10cc3c: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cc41: 8d 65 f8 lea -0x8(%ebp),%esp 10cc44: 5b pop %ebx 10cc45: 5e pop %esi 10cc46: c9 leave 10cc47: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10cc48: 8b 15 18 9a 12 00 mov 0x129a18,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10cc4e: 8b 82 e4 00 00 00 mov 0xe4(%edx),%eax 10cc54: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) return RTEMS_SUCCESSFUL; 10cc58: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cc5a: 8d 65 f8 lea -0x8(%ebp),%esp 10cc5d: 5b pop %ebx 10cc5e: 5e pop %esi 10cc5f: c9 leave 10cc60: c3 ret 10cc61: 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; 10cc64: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cc69: 8d 65 f8 lea -0x8(%ebp),%esp 10cc6c: 5b pop %ebx 10cc6d: 5e pop %esi 10cc6e: c9 leave 10cc6f: c3 ret case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10cc70: b8 04 00 00 00 mov $0x4,%eax } 10cc75: 8d 65 f8 lea -0x8(%ebp),%esp 10cc78: 5b pop %ebx 10cc79: 5e pop %esi 10cc7a: c9 leave 10cc7b: c3 ret =============================================================================== 0010ee88 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10ee88: 55 push %ebp 10ee89: 89 e5 mov %esp,%ebp 10ee8b: 56 push %esi 10ee8c: 53 push %ebx 10ee8d: 83 ec 10 sub $0x10,%esp 10ee90: 8b 5d 0c mov 0xc(%ebp),%ebx 10ee93: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10ee96: 85 db test %ebx,%ebx 10ee98: 74 0b je 10eea5 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 ) ); 10ee9a: 0f b6 05 54 52 12 00 movzbl 0x125254,%eax */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10eea1: 39 c3 cmp %eax,%ebx 10eea3: 77 5f ja 10ef04 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10eea5: 85 f6 test %esi,%esi 10eea7: 74 67 je 10ef10 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10eea9: 83 ec 08 sub $0x8,%esp 10eeac: 8d 45 f4 lea -0xc(%ebp),%eax 10eeaf: 50 push %eax 10eeb0: ff 75 08 pushl 0x8(%ebp) 10eeb3: e8 58 1f 00 00 call 110e10 <_Thread_Get> switch ( location ) { 10eeb8: 83 c4 10 add $0x10,%esp 10eebb: 8b 55 f4 mov -0xc(%ebp),%edx 10eebe: 85 d2 test %edx,%edx 10eec0: 75 36 jne 10eef8 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10eec2: 8b 50 14 mov 0x14(%eax),%edx 10eec5: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10eec7: 85 db test %ebx,%ebx 10eec9: 74 1c je 10eee7 the_thread->real_priority = new_priority; 10eecb: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10eece: 8b 48 1c mov 0x1c(%eax),%ecx 10eed1: 85 c9 test %ecx,%ecx 10eed3: 74 05 je 10eeda 10eed5: 3b 58 14 cmp 0x14(%eax),%ebx 10eed8: 73 0d jae 10eee7 <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); 10eeda: 52 push %edx 10eedb: 6a 00 push $0x0 10eedd: 53 push %ebx 10eede: 50 push %eax 10eedf: e8 d0 1a 00 00 call 1109b4 <_Thread_Change_priority> 10eee4: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10eee7: e8 00 1f 00 00 call 110dec <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10eeec: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10eeee: 8d 65 f8 lea -0x8(%ebp),%esp 10eef1: 5b pop %ebx 10eef2: 5e pop %esi 10eef3: c9 leave 10eef4: c3 ret 10eef5: 8d 76 00 lea 0x0(%esi),%esi case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10eef8: b8 04 00 00 00 mov $0x4,%eax } 10eefd: 8d 65 f8 lea -0x8(%ebp),%esp 10ef00: 5b pop %ebx 10ef01: 5e pop %esi 10ef02: c9 leave 10ef03: 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; 10ef04: b8 13 00 00 00 mov $0x13,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ef09: 8d 65 f8 lea -0x8(%ebp),%esp 10ef0c: 5b pop %ebx 10ef0d: 5e pop %esi 10ef0e: c9 leave 10ef0f: 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; 10ef10: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ef15: 8d 65 f8 lea -0x8(%ebp),%esp 10ef18: 5b pop %ebx 10ef19: 5e pop %esi 10ef1a: c9 leave 10ef1b: c3 ret =============================================================================== 0010afec : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 10afec: 55 push %ebp 10afed: 89 e5 mov %esp,%ebp 10afef: 53 push %ebx 10aff0: 83 ec 14 sub $0x14,%esp 10aff3: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10aff6: 85 db test %ebx,%ebx 10aff8: 74 4e je 10b048 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10affa: 83 ec 08 sub $0x8,%esp 10affd: 8d 45 f4 lea -0xc(%ebp),%eax 10b000: 50 push %eax 10b001: ff 75 08 pushl 0x8(%ebp) 10b004: e8 17 1d 00 00 call 10cd20 <_Thread_Get> switch ( location ) { 10b009: 83 c4 10 add $0x10,%esp 10b00c: 8b 55 f4 mov -0xc(%ebp),%edx 10b00f: 85 d2 test %edx,%edx 10b011: 75 29 jne 10b03c case OBJECTS_LOCAL: if ( _Thread_Start( 10b013: 83 ec 0c sub $0xc,%esp 10b016: ff 75 10 pushl 0x10(%ebp) 10b019: 6a 00 push $0x0 10b01b: 53 push %ebx 10b01c: 6a 00 push $0x0 10b01e: 50 push %eax 10b01f: e8 28 26 00 00 call 10d64c <_Thread_Start> 10b024: 83 c4 20 add $0x20,%esp 10b027: 84 c0 test %al,%al 10b029: 75 29 jne 10b054 the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10b02b: e8 cc 1c 00 00 call 10ccfc <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10b030: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b035: 8b 5d fc mov -0x4(%ebp),%ebx 10b038: c9 leave 10b039: c3 ret 10b03a: 66 90 xchg %ax,%ax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b03c: b8 04 00 00 00 mov $0x4,%eax } 10b041: 8b 5d fc mov -0x4(%ebp),%ebx 10b044: c9 leave 10b045: c3 ret 10b046: 66 90 xchg %ax,%ax { register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; 10b048: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b04d: 8b 5d fc mov -0x4(%ebp),%ebx 10b050: c9 leave 10b051: c3 ret 10b052: 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(); 10b054: e8 a3 1c 00 00 call 10ccfc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b059: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b05b: 8b 5d fc mov -0x4(%ebp),%ebx 10b05e: c9 leave 10b05f: c3 ret =============================================================================== 0010fd18 : */ rtems_status_code rtems_task_suspend( rtems_id id ) { 10fd18: 55 push %ebp 10fd19: 89 e5 mov %esp,%ebp 10fd1b: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10fd1e: 8d 45 f4 lea -0xc(%ebp),%eax 10fd21: 50 push %eax 10fd22: ff 75 08 pushl 0x8(%ebp) 10fd25: e8 f6 cf ff ff call 10cd20 <_Thread_Get> switch ( location ) { 10fd2a: 83 c4 10 add $0x10,%esp 10fd2d: 8b 55 f4 mov -0xc(%ebp),%edx 10fd30: 85 d2 test %edx,%edx 10fd32: 74 08 je 10fd3c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10fd34: b8 04 00 00 00 mov $0x4,%eax } 10fd39: c9 leave 10fd3a: c3 ret 10fd3b: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 10fd3c: f6 40 10 02 testb $0x2,0x10(%eax) 10fd40: 74 0e je 10fd50 _Thread_Suspend( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10fd42: e8 b5 cf ff ff call 10ccfc <_Thread_Enable_dispatch> return RTEMS_ALREADY_SUSPENDED; 10fd47: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fd4c: c9 leave 10fd4d: c3 ret 10fd4e: 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 ); 10fd50: 83 ec 08 sub $0x8,%esp 10fd53: 6a 02 push $0x2 10fd55: 50 push %eax 10fd56: e8 95 d7 ff ff call 10d4f0 <_Thread_Set_state> _Thread_Enable_dispatch(); 10fd5b: e8 9c cf ff ff call 10ccfc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10fd60: 83 c4 10 add $0x10,%esp 10fd63: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fd65: c9 leave 10fd66: c3 ret =============================================================================== 0010bb48 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 10bb48: 55 push %ebp 10bb49: 89 e5 mov %esp,%ebp 10bb4b: 57 push %edi 10bb4c: 56 push %esi 10bb4d: 53 push %ebx 10bb4e: 83 ec 1c sub $0x1c,%esp 10bb51: 8b 5d 0c mov 0xc(%ebp),%ebx 10bb54: 8b 7d 10 mov 0x10(%ebp),%edi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 10bb57: 85 db test %ebx,%ebx 10bb59: 0f 84 9d 00 00 00 je 10bbfc return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10bb5f: 83 ec 08 sub $0x8,%esp 10bb62: 8d 45 e4 lea -0x1c(%ebp),%eax 10bb65: 50 push %eax 10bb66: ff 75 08 pushl 0x8(%ebp) 10bb69: e8 4a 1e 00 00 call 10d9b8 <_Thread_Get> 10bb6e: 89 c6 mov %eax,%esi switch (location) { 10bb70: 83 c4 10 add $0x10,%esp 10bb73: 8b 45 e4 mov -0x1c(%ebp),%eax 10bb76: 85 c0 test %eax,%eax 10bb78: 74 0e je 10bb88 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10bb7a: b8 04 00 00 00 mov $0x4,%eax } 10bb7f: 8d 65 f4 lea -0xc(%ebp),%esp 10bb82: 5b pop %ebx 10bb83: 5e pop %esi 10bb84: 5f pop %edi 10bb85: c9 leave 10bb86: c3 ret 10bb87: 90 nop case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 10bb88: 8b 86 f0 00 00 00 mov 0xf0(%esi),%eax while (tvp) { 10bb8e: 85 c0 test %eax,%eax 10bb90: 75 44 jne 10bbd6 10bb92: 66 90 xchg %ax,%ax /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); 10bb94: 83 ec 0c sub $0xc,%esp 10bb97: 6a 14 push $0x14 10bb99: e8 6a 2d 00 00 call 10e908 <_Workspace_Allocate> if (new == NULL) { 10bb9e: 83 c4 10 add $0x10,%esp 10bba1: 85 c0 test %eax,%eax 10bba3: 74 4b je 10bbf0 _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 10bba5: 8b 13 mov (%ebx),%edx 10bba7: 89 50 08 mov %edx,0x8(%eax) new->ptr = ptr; 10bbaa: 89 58 04 mov %ebx,0x4(%eax) new->dtor = dtor; 10bbad: 89 78 10 mov %edi,0x10(%eax) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 10bbb0: 8b 96 f0 00 00 00 mov 0xf0(%esi),%edx 10bbb6: 89 10 mov %edx,(%eax) the_thread->task_variables = new; 10bbb8: 89 86 f0 00 00 00 mov %eax,0xf0(%esi) _Thread_Enable_dispatch(); 10bbbe: e8 d1 1d 00 00 call 10d994 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10bbc3: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bbc5: 8d 65 f4 lea -0xc(%ebp),%esp 10bbc8: 5b pop %ebx 10bbc9: 5e pop %esi 10bbca: 5f pop %edi 10bbcb: c9 leave 10bbcc: c3 ret 10bbcd: 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; 10bbd0: 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) { 10bbd2: 85 c0 test %eax,%eax 10bbd4: 74 be je 10bb94 if (tvp->ptr == ptr) { 10bbd6: 39 58 04 cmp %ebx,0x4(%eax) 10bbd9: 75 f5 jne 10bbd0 tvp->dtor = dtor; 10bbdb: 89 78 10 mov %edi,0x10(%eax) _Thread_Enable_dispatch(); 10bbde: e8 b1 1d 00 00 call 10d994 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10bbe3: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bbe5: 8d 65 f4 lea -0xc(%ebp),%esp 10bbe8: 5b pop %ebx 10bbe9: 5e pop %esi 10bbea: 5f pop %edi 10bbeb: c9 leave 10bbec: c3 ret 10bbed: 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(); 10bbf0: e8 9f 1d 00 00 call 10d994 <_Thread_Enable_dispatch> return RTEMS_NO_MEMORY; 10bbf5: b8 1a 00 00 00 mov $0x1a,%eax 10bbfa: eb 83 jmp 10bb7f Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) return RTEMS_INVALID_ADDRESS; 10bbfc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bc01: 8d 65 f4 lea -0xc(%ebp),%esp 10bc04: 5b pop %ebx 10bc05: 5e pop %esi 10bc06: 5f pop %edi 10bc07: c9 leave 10bc08: c3 ret =============================================================================== 0010bc0c : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 10bc0c: 55 push %ebp 10bc0d: 89 e5 mov %esp,%ebp 10bc0f: 53 push %ebx 10bc10: 83 ec 14 sub $0x14,%esp 10bc13: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 10bc16: 85 db test %ebx,%ebx 10bc18: 74 76 je 10bc90 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 10bc1a: 83 ec 08 sub $0x8,%esp 10bc1d: 8d 45 f4 lea -0xc(%ebp),%eax 10bc20: 50 push %eax 10bc21: ff 75 08 pushl 0x8(%ebp) 10bc24: e8 8f 1d 00 00 call 10d9b8 <_Thread_Get> switch (location) { 10bc29: 83 c4 10 add $0x10,%esp 10bc2c: 8b 55 f4 mov -0xc(%ebp),%edx 10bc2f: 85 d2 test %edx,%edx 10bc31: 74 0d je 10bc40 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10bc33: b8 04 00 00 00 mov $0x4,%eax } 10bc38: 8b 5d fc mov -0x4(%ebp),%ebx 10bc3b: c9 leave 10bc3c: c3 ret 10bc3d: 8d 76 00 lea 0x0(%esi),%esi the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; 10bc40: 8b 88 f0 00 00 00 mov 0xf0(%eax),%ecx while (tvp) { 10bc46: 85 c9 test %ecx,%ecx 10bc48: 74 17 je 10bc61 if (tvp->ptr == ptr) { 10bc4a: 39 59 04 cmp %ebx,0x4(%ecx) 10bc4d: 75 0c jne 10bc5b 10bc4f: eb 49 jmp 10bc9a 10bc51: 8d 76 00 lea 0x0(%esi),%esi 10bc54: 39 5a 04 cmp %ebx,0x4(%edx) 10bc57: 74 17 je 10bc70 10bc59: 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; 10bc5b: 8b 11 mov (%ecx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 10bc5d: 85 d2 test %edx,%edx 10bc5f: 75 f3 jne 10bc54 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10bc61: e8 2e 1d 00 00 call 10d994 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 10bc66: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bc6b: 8b 5d fc mov -0x4(%ebp),%ebx 10bc6e: c9 leave 10bc6f: c3 ret case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 10bc70: 8b 1a mov (%edx),%ebx 10bc72: 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 ); 10bc74: 83 ec 08 sub $0x8,%esp 10bc77: 52 push %edx 10bc78: 50 push %eax 10bc79: e8 b2 00 00 00 call 10bd30 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 10bc7e: e8 11 1d 00 00 call 10d994 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10bc83: 83 c4 10 add $0x10,%esp 10bc86: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bc88: 8b 5d fc mov -0x4(%ebp),%ebx 10bc8b: c9 leave 10bc8c: c3 ret 10bc8d: 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; 10bc90: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bc95: 8b 5d fc mov -0x4(%ebp),%ebx 10bc98: c9 leave 10bc99: 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; 10bc9a: 8b 11 mov (%ecx),%edx 10bc9c: 89 90 f0 00 00 00 mov %edx,0xf0(%eax) 10bca2: 89 ca mov %ecx,%edx 10bca4: eb ce jmp 10bc74 =============================================================================== 0010bca8 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 10bca8: 55 push %ebp 10bca9: 89 e5 mov %esp,%ebp 10bcab: 56 push %esi 10bcac: 53 push %ebx 10bcad: 83 ec 10 sub $0x10,%esp 10bcb0: 8b 5d 0c mov 0xc(%ebp),%ebx 10bcb3: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 10bcb6: 85 db test %ebx,%ebx 10bcb8: 74 56 je 10bd10 return RTEMS_INVALID_ADDRESS; if ( !result ) 10bcba: 85 f6 test %esi,%esi 10bcbc: 74 52 je 10bd10 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10bcbe: 83 ec 08 sub $0x8,%esp 10bcc1: 8d 45 f4 lea -0xc(%ebp),%eax 10bcc4: 50 push %eax 10bcc5: ff 75 08 pushl 0x8(%ebp) 10bcc8: e8 eb 1c 00 00 call 10d9b8 <_Thread_Get> switch (location) { 10bccd: 83 c4 10 add $0x10,%esp 10bcd0: 8b 55 f4 mov -0xc(%ebp),%edx 10bcd3: 85 d2 test %edx,%edx 10bcd5: 75 2d jne 10bd04 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 10bcd7: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax while (tvp) { 10bcdd: 85 c0 test %eax,%eax 10bcdf: 75 09 jne 10bcea 10bce1: eb 39 jmp 10bd1c 10bce3: 90 nop */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 10bce4: 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) { 10bce6: 85 c0 test %eax,%eax 10bce8: 74 32 je 10bd1c <== NEVER TAKEN if (tvp->ptr == ptr) { 10bcea: 39 58 04 cmp %ebx,0x4(%eax) 10bced: 75 f5 jne 10bce4 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 10bcef: 8b 40 0c mov 0xc(%eax),%eax 10bcf2: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10bcf4: e8 9b 1c 00 00 call 10d994 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10bcf9: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bcfb: 8d 65 f8 lea -0x8(%ebp),%esp 10bcfe: 5b pop %ebx 10bcff: 5e pop %esi 10bd00: c9 leave 10bd01: c3 ret 10bd02: 66 90 xchg %ax,%ax #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10bd04: b8 04 00 00 00 mov $0x4,%eax } 10bd09: 8d 65 f8 lea -0x8(%ebp),%esp 10bd0c: 5b pop %ebx 10bd0d: 5e pop %esi 10bd0e: c9 leave 10bd0f: c3 ret if ( !ptr ) return RTEMS_INVALID_ADDRESS; if ( !result ) return RTEMS_INVALID_ADDRESS; 10bd10: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bd15: 8d 65 f8 lea -0x8(%ebp),%esp 10bd18: 5b pop %ebx 10bd19: 5e pop %esi 10bd1a: c9 leave 10bd1b: c3 ret _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10bd1c: e8 73 1c 00 00 call 10d994 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 10bd21: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bd26: 8d 65 f8 lea -0x8(%ebp),%esp 10bd29: 5b pop %ebx 10bd2a: 5e pop %esi 10bd2b: c9 leave 10bd2c: c3 ret =============================================================================== 0010bea8 : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 10bea8: 55 push %ebp 10bea9: 89 e5 mov %esp,%ebp 10beab: 53 push %ebx 10beac: 83 ec 14 sub $0x14,%esp 10beaf: 8b 5d 08 mov 0x8(%ebp),%ebx Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10beb2: 80 3d fc 84 12 00 00 cmpb $0x0,0x1284fc 10beb9: 0f 84 a9 00 00 00 je 10bf68 return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10bebf: 85 db test %ebx,%ebx 10bec1: 0f 84 ad 00 00 00 je 10bf74 return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 10bec7: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) if ( !_TOD_Validate( time_buffer ) ) 10bece: 83 ec 0c sub $0xc,%esp 10bed1: 53 push %ebx 10bed2: e8 81 f4 ff ff call 10b358 <_TOD_Validate> 10bed7: 83 c4 10 add $0x10,%esp 10beda: 84 c0 test %al,%al 10bedc: 75 0a jne 10bee8 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; 10bede: b8 14 00 00 00 mov $0x14,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10bee3: 8b 5d fc mov -0x4(%ebp),%ebx 10bee6: c9 leave 10bee7: c3 ret time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 10bee8: 83 ec 0c sub $0xc,%esp 10beeb: 53 push %ebx 10beec: e8 db f3 ff ff call 10b2cc <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 10bef1: 83 c4 10 add $0x10,%esp 10bef4: 3b 05 88 85 12 00 cmp 0x128588,%eax 10befa: 76 e2 jbe 10bede 10befc: 8b 15 ec 84 12 00 mov 0x1284ec,%edx 10bf02: 42 inc %edx 10bf03: 89 15 ec 84 12 00 mov %edx,0x1284ec return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 10bf09: 83 ec 08 sub $0x8,%esp 10bf0c: 6a 10 push $0x10 10bf0e: ff 35 78 87 12 00 pushl 0x128778 10bf14: 89 45 f4 mov %eax,-0xc(%ebp) 10bf17: e8 9c 24 00 00 call 10e3b8 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10bf1c: 8b 15 78 87 12 00 mov 0x128778,%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( 10bf22: 8b 4a 08 mov 0x8(%edx),%ecx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10bf25: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 10bf2c: c7 42 64 10 da 10 00 movl $0x10da10,0x64(%edx) the_watchdog->id = id; 10bf33: 89 4a 68 mov %ecx,0x68(%edx) the_watchdog->user_data = user_data; 10bf36: 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( 10bf3d: 8b 45 f4 mov -0xc(%ebp),%eax 10bf40: 2b 05 88 85 12 00 sub 0x128588,%eax 10bf46: 89 42 54 mov %eax,0x54(%edx) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 10bf49: 58 pop %eax 10bf4a: 59 pop %ecx 10bf4b: 83 c2 48 add $0x48,%edx 10bf4e: 52 push %edx 10bf4f: 68 b4 85 12 00 push $0x1285b4 10bf54: e8 ef 29 00 00 call 10e948 <_Watchdog_Insert> &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 10bf59: e8 66 1c 00 00 call 10dbc4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10bf5e: 83 c4 10 add $0x10,%esp 10bf61: 31 c0 xor %eax,%eax 10bf63: e9 7b ff ff ff jmp 10bee3 ) { Watchdog_Interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 10bf68: b8 0b 00 00 00 mov $0xb,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10bf6d: 8b 5d fc mov -0x4(%ebp),%ebx 10bf70: c9 leave 10bf71: c3 ret 10bf72: 66 90 xchg %ax,%ax if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 10bf74: b8 09 00 00 00 mov $0x9,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10bf79: 8b 5d fc mov -0x4(%ebp),%ebx 10bf7c: c9 leave 10bf7d: c3 ret =============================================================================== 00117cfc : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 117cfc: 55 push %ebp 117cfd: 89 e5 mov %esp,%ebp 117cff: 83 ec 1c sub $0x1c,%esp Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); 117d02: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 117d05: 50 push %eax 117d06: ff 75 08 pushl 0x8(%ebp) 117d09: 68 40 0c 14 00 push $0x140c40 117d0e: e8 b1 2a 00 00 call 11a7c4 <_Objects_Get> switch ( location ) { 117d13: 83 c4 10 add $0x10,%esp 117d16: 8b 55 f4 mov -0xc(%ebp),%edx 117d19: 85 d2 test %edx,%edx 117d1b: 74 07 je 117d24 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 117d1d: b8 04 00 00 00 mov $0x4,%eax } 117d22: c9 leave 117d23: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 117d24: 83 78 38 04 cmpl $0x4,0x38(%eax) 117d28: 74 0f je 117d39 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 117d2a: 83 ec 0c sub $0xc,%esp 117d2d: 83 c0 10 add $0x10,%eax 117d30: 50 push %eax 117d31: e8 3e 46 00 00 call 11c374 <_Watchdog_Remove> 117d36: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 117d39: e8 d6 35 00 00 call 11b314 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 117d3e: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117d40: c9 leave 117d41: c3 ret =============================================================================== 0010b4d8 : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 10b4d8: 55 push %ebp 10b4d9: 89 e5 mov %esp,%ebp 10b4db: 57 push %edi 10b4dc: 56 push %esi 10b4dd: 53 push %ebx 10b4de: 83 ec 0c sub $0xc,%esp 10b4e1: 8b 5d 08 mov 0x8(%ebp),%ebx 10b4e4: 8b 75 0c mov 0xc(%ebp),%esi Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 10b4e7: 85 db test %ebx,%ebx 10b4e9: 74 6d je 10b558 return RTEMS_INVALID_NAME; if ( !id ) 10b4eb: 85 f6 test %esi,%esi 10b4ed: 0f 84 89 00 00 00 je 10b57c 10b4f3: a1 2c 7a 12 00 mov 0x127a2c,%eax 10b4f8: 40 inc %eax 10b4f9: a3 2c 7a 12 00 mov %eax,0x127a2c * 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 ); 10b4fe: 83 ec 0c sub $0xc,%esp 10b501: 68 40 7d 12 00 push $0x127d40 10b506: e8 ad 0d 00 00 call 10c2b8 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 10b50b: 83 c4 10 add $0x10,%esp 10b50e: 85 c0 test %eax,%eax 10b510: 74 56 je 10b568 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 10b512: 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; 10b519: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10b520: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10b527: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10b52e: 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 ), 10b535: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10b538: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b53b: 8b 0d 5c 7d 12 00 mov 0x127d5c,%ecx 10b541: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10b544: 89 58 0c mov %ebx,0xc(%eax) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 10b547: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10b549: e8 f6 1c 00 00 call 10d244 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b54e: 31 c0 xor %eax,%eax } 10b550: 8d 65 f4 lea -0xc(%ebp),%esp 10b553: 5b pop %ebx 10b554: 5e pop %esi 10b555: 5f pop %edi 10b556: c9 leave 10b557: c3 ret ) { Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10b558: b8 03 00 00 00 mov $0x3,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b55d: 8d 65 f4 lea -0xc(%ebp),%esp 10b560: 5b pop %ebx 10b561: 5e pop %esi 10b562: 5f pop %edi 10b563: c9 leave 10b564: c3 ret 10b565: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { _Thread_Enable_dispatch(); 10b568: e8 d7 1c 00 00 call 10d244 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10b56d: b8 05 00 00 00 mov $0x5,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b572: 8d 65 f4 lea -0xc(%ebp),%esp 10b575: 5b pop %ebx 10b576: 5e pop %esi 10b577: 5f pop %edi 10b578: c9 leave 10b579: c3 ret 10b57a: 66 90 xchg %ax,%ax if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10b57c: b8 09 00 00 00 mov $0x9,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b581: 8d 65 f4 lea -0xc(%ebp),%esp 10b584: 5b pop %ebx 10b585: 5e pop %esi 10b586: 5f pop %edi 10b587: c9 leave 10b588: c3 ret =============================================================================== 00117df8 : */ rtems_status_code rtems_timer_delete( rtems_id id ) { 117df8: 55 push %ebp 117df9: 89 e5 mov %esp,%ebp 117dfb: 53 push %ebx 117dfc: 83 ec 18 sub $0x18,%esp Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); 117dff: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 117e02: 50 push %eax 117e03: ff 75 08 pushl 0x8(%ebp) 117e06: 68 40 0c 14 00 push $0x140c40 117e0b: e8 b4 29 00 00 call 11a7c4 <_Objects_Get> 117e10: 89 c3 mov %eax,%ebx switch ( location ) { 117e12: 83 c4 10 add $0x10,%esp 117e15: 8b 4d f4 mov -0xc(%ebp),%ecx 117e18: 85 c9 test %ecx,%ecx 117e1a: 75 38 jne 117e54 case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); 117e1c: 83 ec 08 sub $0x8,%esp 117e1f: 50 push %eax 117e20: 68 40 0c 14 00 push $0x140c40 117e25: e8 26 25 00 00 call 11a350 <_Objects_Close> (void) _Watchdog_Remove( &the_timer->Ticker ); 117e2a: 8d 43 10 lea 0x10(%ebx),%eax 117e2d: 89 04 24 mov %eax,(%esp) 117e30: e8 3f 45 00 00 call 11c374 <_Watchdog_Remove> */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 117e35: 58 pop %eax 117e36: 5a pop %edx 117e37: 53 push %ebx 117e38: 68 40 0c 14 00 push $0x140c40 117e3d: e8 06 28 00 00 call 11a648 <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 117e42: e8 cd 34 00 00 call 11b314 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 117e47: 83 c4 10 add $0x10,%esp 117e4a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117e4c: 8b 5d fc mov -0x4(%ebp),%ebx 117e4f: c9 leave 117e50: c3 ret 117e51: 8d 76 00 lea 0x0(%esi),%esi #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 117e54: b8 04 00 00 00 mov $0x4,%eax } 117e59: 8b 5d fc mov -0x4(%ebp),%ebx 117e5c: c9 leave 117e5d: c3 ret =============================================================================== 0010b58c : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 10b58c: 55 push %ebp 10b58d: 89 e5 mov %esp,%ebp 10b58f: 57 push %edi 10b590: 56 push %esi 10b591: 53 push %ebx 10b592: 83 ec 2c sub $0x2c,%esp 10b595: 8b 5d 0c mov 0xc(%ebp),%ebx 10b598: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 10b59b: 85 db test %ebx,%ebx 10b59d: 0f 84 99 00 00 00 je 10b63c return RTEMS_INVALID_NUMBER; if ( !routine ) 10b5a3: 85 f6 test %esi,%esi 10b5a5: 0f 84 b1 00 00 00 je 10b65c Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 10b5ab: 57 push %edi return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); 10b5ac: 8d 45 e4 lea -0x1c(%ebp),%eax 10b5af: 50 push %eax 10b5b0: ff 75 08 pushl 0x8(%ebp) 10b5b3: 68 40 7d 12 00 push $0x127d40 10b5b8: e8 af 11 00 00 call 10c76c <_Objects_Get> 10b5bd: 89 c7 mov %eax,%edi switch ( location ) { 10b5bf: 83 c4 10 add $0x10,%esp 10b5c2: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b5c5: 85 c9 test %ecx,%ecx 10b5c7: 74 0f je 10b5d8 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b5c9: b8 04 00 00 00 mov $0x4,%eax } 10b5ce: 8d 65 f4 lea -0xc(%ebp),%esp 10b5d1: 5b pop %ebx 10b5d2: 5e pop %esi 10b5d3: 5f pop %edi 10b5d4: c9 leave 10b5d5: c3 ret 10b5d6: 66 90 xchg %ax,%ax the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 10b5d8: 8d 50 10 lea 0x10(%eax),%edx 10b5db: 83 ec 0c sub $0xc,%esp 10b5de: 52 push %edx 10b5df: 89 55 d4 mov %edx,-0x2c(%ebp) 10b5e2: e8 a9 2a 00 00 call 10e090 <_Watchdog_Remove> _ISR_Disable( level ); 10b5e7: 9c pushf 10b5e8: fa cli 10b5e9: 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 ) { 10b5ea: 83 c4 10 add $0x10,%esp 10b5ed: 8b 57 18 mov 0x18(%edi),%edx 10b5f0: 85 d2 test %edx,%edx 10b5f2: 8b 55 d4 mov -0x2c(%ebp),%edx 10b5f5: 75 55 jne 10b64c /* * 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; 10b5f7: 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; 10b5fe: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 10b605: 89 77 2c mov %esi,0x2c(%edi) the_watchdog->id = id; 10b608: 8b 4d 08 mov 0x8(%ebp),%ecx 10b60b: 89 4f 30 mov %ecx,0x30(%edi) the_watchdog->user_data = user_data; 10b60e: 8b 4d 14 mov 0x14(%ebp),%ecx 10b611: 89 4f 34 mov %ecx,0x34(%edi) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 10b614: 50 push %eax 10b615: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b616: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b619: 83 ec 08 sub $0x8,%esp 10b61c: 52 push %edx 10b61d: 68 00 7b 12 00 push $0x127b00 10b622: e8 29 29 00 00 call 10df50 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 10b627: e8 18 1c 00 00 call 10d244 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b62c: 83 c4 10 add $0x10,%esp 10b62f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b631: 8d 65 f4 lea -0xc(%ebp),%esp 10b634: 5b pop %ebx 10b635: 5e pop %esi 10b636: 5f pop %edi 10b637: c9 leave 10b638: c3 ret 10b639: 8d 76 00 lea 0x0(%esi),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; 10b63c: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b641: 8d 65 f4 lea -0xc(%ebp),%esp 10b644: 5b pop %ebx 10b645: 5e pop %esi 10b646: 5f pop %edi 10b647: c9 leave 10b648: c3 ret 10b649: 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 ); 10b64c: 50 push %eax 10b64d: 9d popf _Thread_Enable_dispatch(); 10b64e: e8 f1 1b 00 00 call 10d244 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b653: 31 c0 xor %eax,%eax 10b655: e9 74 ff ff ff jmp 10b5ce 10b65a: 66 90 xchg %ax,%ax if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) return RTEMS_INVALID_ADDRESS; 10b65c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b661: 8d 65 f4 lea -0xc(%ebp),%esp 10b664: 5b pop %ebx 10b665: 5e pop %esi 10b666: 5f pop %edi 10b667: c9 leave 10b668: c3 ret =============================================================================== 00117f40 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 117f40: 55 push %ebp 117f41: 89 e5 mov %esp,%ebp 117f43: 57 push %edi 117f44: 56 push %esi 117f45: 53 push %ebx 117f46: 83 ec 2c sub $0x2c,%esp 117f49: 8b 75 08 mov 0x8(%ebp),%esi 117f4c: 8b 7d 0c mov 0xc(%ebp),%edi 117f4f: 8b 5d 10 mov 0x10(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 117f52: 80 3d fc 08 14 00 00 cmpb $0x0,0x1408fc 117f59: 75 0d jne 117f68 return RTEMS_NOT_DEFINED; 117f5b: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117f60: 8d 65 f4 lea -0xc(%ebp),%esp 117f63: 5b pop %ebx 117f64: 5e pop %esi 117f65: 5f pop %edi 117f66: c9 leave 117f67: c3 ret rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 117f68: 83 ec 0c sub $0xc,%esp 117f6b: 57 push %edi 117f6c: e8 93 d4 ff ff call 115404 <_TOD_Validate> 117f71: 83 c4 10 add $0x10,%esp 117f74: 84 c0 test %al,%al 117f76: 74 1e je 117f96 return RTEMS_INVALID_CLOCK; if ( !routine ) 117f78: 85 db test %ebx,%ebx 117f7a: 0f 84 a4 00 00 00 je 118024 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 117f80: 83 ec 0c sub $0xc,%esp 117f83: 57 push %edi 117f84: e8 ef d3 ff ff call 115378 <_TOD_To_seconds> 117f89: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 117f8b: 83 c4 10 add $0x10,%esp 117f8e: 3b 05 88 09 14 00 cmp 0x140988,%eax 117f94: 77 0e ja 117fa4 return RTEMS_INVALID_CLOCK; 117f96: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117f9b: 8d 65 f4 lea -0xc(%ebp),%esp 117f9e: 5b pop %ebx 117f9f: 5e pop %esi 117fa0: 5f pop %edi 117fa1: c9 leave 117fa2: c3 ret 117fa3: 90 nop 117fa4: 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 ); 117fa5: 8d 45 e4 lea -0x1c(%ebp),%eax 117fa8: 50 push %eax 117fa9: 56 push %esi 117faa: 68 40 0c 14 00 push $0x140c40 117faf: e8 10 28 00 00 call 11a7c4 <_Objects_Get> switch ( location ) { 117fb4: 83 c4 10 add $0x10,%esp 117fb7: 8b 4d e4 mov -0x1c(%ebp),%ecx 117fba: 85 c9 test %ecx,%ecx 117fbc: 75 5a jne 118018 <== NEVER TAKEN case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 117fbe: 8d 48 10 lea 0x10(%eax),%ecx 117fc1: 83 ec 0c sub $0xc,%esp 117fc4: 51 push %ecx 117fc5: 89 45 d0 mov %eax,-0x30(%ebp) 117fc8: 89 4d d4 mov %ecx,-0x2c(%ebp) 117fcb: e8 a4 43 00 00 call 11c374 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY; 117fd0: 8b 55 d0 mov -0x30(%ebp),%edx 117fd3: 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; 117fda: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 117fe1: 89 5a 2c mov %ebx,0x2c(%edx) the_watchdog->id = id; 117fe4: 89 72 30 mov %esi,0x30(%edx) the_watchdog->user_data = user_data; 117fe7: 8b 45 14 mov 0x14(%ebp),%eax 117fea: 89 42 34 mov %eax,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( 117fed: 2b 3d 88 09 14 00 sub 0x140988,%edi 117ff3: 89 7a 1c mov %edi,0x1c(%edx) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 117ff6: 58 pop %eax 117ff7: 5a pop %edx 117ff8: 8b 4d d4 mov -0x2c(%ebp),%ecx 117ffb: 51 push %ecx 117ffc: 68 b4 09 14 00 push $0x1409b4 118001: e8 2e 42 00 00 call 11c234 <_Watchdog_Insert> &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 118006: e8 09 33 00 00 call 11b314 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11800b: 83 c4 10 add $0x10,%esp 11800e: 31 c0 xor %eax,%eax 118010: e9 4b ff ff ff jmp 117f60 118015: 8d 76 00 lea 0x0(%esi),%esi #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118018: b8 04 00 00 00 mov $0x4,%eax 11801d: e9 3e ff ff ff jmp 117f60 118022: 66 90 xchg %ax,%ax if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) return RTEMS_INVALID_ADDRESS; 118024: b8 09 00 00 00 mov $0x9,%eax 118029: e9 32 ff ff ff jmp 117f60 =============================================================================== 001186bc : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 1186bc: 55 push %ebp 1186bd: 89 e5 mov %esp,%ebp 1186bf: 56 push %esi 1186c0: 53 push %ebx 1186c1: 83 ec 10 sub $0x10,%esp 1186c4: 8b 45 08 mov 0x8(%ebp),%eax 1186c7: 85 c0 test %eax,%eax 1186c9: 74 41 je 11870c ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 1186cb: 0f b6 15 d4 82 13 00 movzbl 0x1382d4,%edx */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 1186d2: 39 d0 cmp %edx,%eax 1186d4: 76 42 jbe 118718 * 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 ) 1186d6: 40 inc %eax 1186d7: 75 33 jne 11870c return RTEMS_INVALID_PRIORITY; _priority = 0; 1186d9: 31 f6 xor %esi,%esi 1186db: 8b 15 ec 08 14 00 mov 0x1408ec,%edx 1186e1: 42 inc %edx 1186e2: 89 15 ec 08 14 00 mov %edx,0x1408ec /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 1186e8: 8a 1d 20 c2 13 00 mov 0x13c220,%bl initialized = true; 1186ee: c6 05 20 c2 13 00 01 movb $0x1,0x13c220 _Thread_Enable_dispatch(); 1186f5: e8 1a 2c 00 00 call 11b314 <_Thread_Enable_dispatch> if ( tmpInitialized ) 1186fa: 84 db test %bl,%bl 1186fc: 74 1e je 11871c return RTEMS_INCORRECT_STATE; 1186fe: b8 0e 00 00 00 mov $0xe,%eax initialized = false; } #endif return status; } 118703: 8d 65 f8 lea -0x8(%ebp),%esp 118706: 5b pop %ebx 118707: 5e pop %esi 118708: c9 leave 118709: c3 ret 11870a: 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; 11870c: b8 13 00 00 00 mov $0x13,%eax initialized = false; } #endif return status; } 118711: 8d 65 f8 lea -0x8(%ebp),%esp 118714: 5b pop %ebx 118715: 5e pop %esi 118716: c9 leave 118717: c3 ret 118718: 89 c6 mov %eax,%esi 11871a: eb bf jmp 1186db * 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( 11871c: 83 ec 08 sub $0x8,%esp 11871f: 8d 45 f4 lea -0xc(%ebp),%eax 118722: 50 push %eax 118723: 8b 45 10 mov 0x10(%ebp),%eax 118726: 80 cc 80 or $0x80,%ah 118729: 50 push %eax 11872a: 68 00 01 00 00 push $0x100 11872f: ff 75 0c pushl 0xc(%ebp) 118732: 56 push %esi 118733: 68 45 4d 49 54 push $0x54494d45 118738: e8 e3 ec ff ff call 117420 /* 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) { 11873d: 83 c4 20 add $0x20,%esp 118740: 85 c0 test %eax,%eax 118742: 74 10 je 118754 initialized = false; 118744: c6 05 20 c2 13 00 00 movb $0x0,0x13c220 initialized = false; } #endif return status; } 11874b: 8d 65 f8 lea -0x8(%ebp),%esp 11874e: 5b pop %ebx 11874f: 5e pop %esi 118750: c9 leave 118751: c3 ret 118752: 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) 118754: 8b 45 f4 mov -0xc(%ebp),%eax */ #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return NULL; #endif return information->local_table[ index ]; 118757: 0f b7 c8 movzwl %ax,%ecx 11875a: 8b 15 9c 08 14 00 mov 0x14089c,%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( 118760: 8b 14 8a mov (%edx,%ecx,4),%edx 118763: 89 15 a0 c1 13 00 mov %edx,0x13c1a0 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 118769: c7 05 d0 c1 13 00 d4 movl $0x13c1d4,0x13c1d0 118770: c1 13 00 head->previous = NULL; 118773: c7 05 d4 c1 13 00 00 movl $0x0,0x13c1d4 11877a: 00 00 00 tail->previous = head; 11877d: c7 05 d8 c1 13 00 d0 movl $0x13c1d0,0x13c1d8 118784: c1 13 00 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 118787: c7 05 08 c2 13 00 0c movl $0x13c20c,0x13c208 11878e: c2 13 00 head->previous = NULL; 118791: c7 05 0c c2 13 00 00 movl $0x0,0x13c20c 118798: 00 00 00 tail->previous = head; 11879b: c7 05 10 c2 13 00 08 movl $0x13c208,0x13c210 1187a2: c2 13 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 1187a5: c7 05 b0 c1 13 00 00 movl $0x0,0x13c1b0 1187ac: 00 00 00 the_watchdog->routine = routine; 1187af: c7 05 c4 c1 13 00 60 movl $0x11b160,0x13c1c4 1187b6: b1 11 00 the_watchdog->id = id; 1187b9: a3 c8 c1 13 00 mov %eax,0x13c1c8 the_watchdog->user_data = user_data; 1187be: c7 05 cc c1 13 00 00 movl $0x0,0x13c1cc 1187c5: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 1187c8: c7 05 e8 c1 13 00 00 movl $0x0,0x13c1e8 1187cf: 00 00 00 the_watchdog->routine = routine; 1187d2: c7 05 fc c1 13 00 60 movl $0x11b160,0x13c1fc 1187d9: b1 11 00 the_watchdog->id = id; 1187dc: a3 00 c2 13 00 mov %eax,0x13c200 the_watchdog->user_data = user_data; 1187e1: c7 05 04 c2 13 00 00 movl $0x0,0x13c204 1187e8: 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; 1187eb: c7 05 a4 c1 13 00 8c movl $0x11858c,0x13c1a4 1187f2: 85 11 00 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 1187f5: 8b 15 24 0a 14 00 mov 0x140a24,%edx 1187fb: 89 15 dc c1 13 00 mov %edx,0x13c1dc ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 118801: 8b 15 88 09 14 00 mov 0x140988,%edx 118807: 89 15 14 c2 13 00 mov %edx,0x13c214 ts->insert_chain = NULL; 11880d: c7 05 18 c2 13 00 00 movl $0x0,0x13c218 118814: 00 00 00 ts->active = false; 118817: c6 05 1c c2 13 00 00 movb $0x0,0x13c21c /* * The default timer server is now available. */ _Timer_server = ts; 11881e: c7 05 80 0c 14 00 a0 movl $0x13c1a0,0x140c80 118825: c1 13 00 /* * Start the timer server */ status = rtems_task_start( 118828: 53 push %ebx 118829: 68 a0 c1 13 00 push $0x13c1a0 11882e: 68 e0 83 11 00 push $0x1183e0 118833: 50 push %eax 118834: e8 a7 f2 ff ff call 117ae0 if (status) { initialized = false; } #endif return status; 118839: 83 c4 10 add $0x10,%esp 11883c: e9 d0 fe ff ff jmp 118711 =============================================================================== 001180b8 : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 1180b8: 55 push %ebp 1180b9: 89 e5 mov %esp,%ebp 1180bb: 56 push %esi 1180bc: 53 push %ebx 1180bd: 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 ); 1180c0: 8d 45 f4 lea -0xc(%ebp),%eax 1180c3: 50 push %eax 1180c4: ff 75 08 pushl 0x8(%ebp) 1180c7: 68 40 0c 14 00 push $0x140c40 1180cc: e8 f3 26 00 00 call 11a7c4 <_Objects_Get> 1180d1: 89 c3 mov %eax,%ebx switch ( location ) { 1180d3: 83 c4 10 add $0x10,%esp 1180d6: 8b 45 f4 mov -0xc(%ebp),%eax 1180d9: 85 c0 test %eax,%eax 1180db: 74 0f je 1180ec #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1180dd: b8 04 00 00 00 mov $0x4,%eax } 1180e2: 8d 65 f8 lea -0x8(%ebp),%esp 1180e5: 5b pop %ebx 1180e6: 5e pop %esi 1180e7: c9 leave 1180e8: c3 ret 1180e9: 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 ) { 1180ec: 8b 43 38 mov 0x38(%ebx),%eax 1180ef: 85 c0 test %eax,%eax 1180f1: 74 1d je 118110 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 1180f3: 48 dec %eax 1180f4: 74 3a je 118130 /* * 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; 1180f6: b8 0b 00 00 00 mov $0xb,%eax } _Thread_Enable_dispatch(); 1180fb: 89 45 e4 mov %eax,-0x1c(%ebp) 1180fe: e8 11 32 00 00 call 11b314 <_Thread_Enable_dispatch> return status; 118103: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118106: 8d 65 f8 lea -0x8(%ebp),%esp 118109: 5b pop %ebx 11810a: 5e pop %esi 11810b: c9 leave 11810c: c3 ret 11810d: 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 ); 118110: 83 c3 10 add $0x10,%ebx 118113: 83 ec 0c sub $0xc,%esp 118116: 53 push %ebx 118117: e8 58 42 00 00 call 11c374 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 11811c: 59 pop %ecx 11811d: 5e pop %esi 11811e: 53 push %ebx 11811f: 68 c0 09 14 00 push $0x1409c0 118124: e8 0b 41 00 00 call 11c234 <_Watchdog_Insert> 118129: 83 c4 10 add $0x10,%esp rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 11812c: 31 c0 xor %eax,%eax 11812e: eb cb jmp 1180fb 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; 118130: 8b 35 80 0c 14 00 mov 0x140c80,%esi if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 118136: 83 ec 0c sub $0xc,%esp 118139: 8d 43 10 lea 0x10(%ebx),%eax 11813c: 50 push %eax 11813d: e8 32 42 00 00 call 11c374 <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 118142: 58 pop %eax 118143: 5a pop %edx 118144: 53 push %ebx 118145: 56 push %esi 118146: ff 56 04 call *0x4(%esi) 118149: 83 c4 10 add $0x10,%esp rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 11814c: 31 c0 xor %eax,%eax 11814e: eb ab jmp 1180fb =============================================================================== 00118150 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 118150: 55 push %ebp 118151: 89 e5 mov %esp,%ebp 118153: 57 push %edi 118154: 56 push %esi 118155: 53 push %ebx 118156: 83 ec 2c sub $0x2c,%esp 118159: 8b 7d 0c mov 0xc(%ebp),%edi 11815c: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 11815f: 8b 1d 80 0c 14 00 mov 0x140c80,%ebx if ( !timer_server ) 118165: 85 db test %ebx,%ebx 118167: 0f 84 9f 00 00 00 je 11820c return RTEMS_INCORRECT_STATE; if ( !routine ) 11816d: 85 f6 test %esi,%esi 11816f: 0f 84 a3 00 00 00 je 118218 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 118175: 85 ff test %edi,%edi 118177: 75 0f jne 118188 return RTEMS_INVALID_NUMBER; 118179: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11817e: 8d 65 f4 lea -0xc(%ebp),%esp 118181: 5b pop %ebx 118182: 5e pop %esi 118183: 5f pop %edi 118184: c9 leave 118185: c3 ret 118186: 66 90 xchg %ax,%ax 118188: 52 push %edx return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); 118189: 8d 45 e4 lea -0x1c(%ebp),%eax 11818c: 50 push %eax 11818d: ff 75 08 pushl 0x8(%ebp) 118190: 68 40 0c 14 00 push $0x140c40 118195: e8 2a 26 00 00 call 11a7c4 <_Objects_Get> 11819a: 89 c2 mov %eax,%edx switch ( location ) { 11819c: 83 c4 10 add $0x10,%esp 11819f: 8b 45 e4 mov -0x1c(%ebp),%eax 1181a2: 85 c0 test %eax,%eax 1181a4: 75 56 jne 1181fc case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 1181a6: 83 ec 0c sub $0xc,%esp 1181a9: 8d 42 10 lea 0x10(%edx),%eax 1181ac: 50 push %eax 1181ad: 89 55 d4 mov %edx,-0x2c(%ebp) 1181b0: e8 bf 41 00 00 call 11c374 <_Watchdog_Remove> _ISR_Disable( level ); 1181b5: 9c pushf 1181b6: fa cli 1181b7: 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 ) { 1181b8: 83 c4 10 add $0x10,%esp 1181bb: 8b 55 d4 mov -0x2c(%ebp),%edx 1181be: 8b 4a 18 mov 0x18(%edx),%ecx 1181c1: 85 c9 test %ecx,%ecx 1181c3: 75 5f jne 118224 /* * 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; 1181c5: 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; 1181cc: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 1181d3: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 1181d6: 8b 4d 08 mov 0x8(%ebp),%ecx 1181d9: 89 4a 30 mov %ecx,0x30(%edx) the_watchdog->user_data = user_data; 1181dc: 8b 4d 14 mov 0x14(%ebp),%ecx 1181df: 89 4a 34 mov %ecx,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 1181e2: 89 7a 1c mov %edi,0x1c(%edx) _ISR_Enable( level ); 1181e5: 50 push %eax 1181e6: 9d popf (*timer_server->schedule_operation)( timer_server, the_timer ); 1181e7: 83 ec 08 sub $0x8,%esp 1181ea: 52 push %edx 1181eb: 53 push %ebx 1181ec: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 1181ef: e8 20 31 00 00 call 11b314 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1181f4: 83 c4 10 add $0x10,%esp 1181f7: 31 c0 xor %eax,%eax 1181f9: eb 83 jmp 11817e 1181fb: 90 nop #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1181fc: b8 04 00 00 00 mov $0x4,%eax } 118201: 8d 65 f4 lea -0xc(%ebp),%esp 118204: 5b pop %ebx 118205: 5e pop %esi 118206: 5f pop %edi 118207: c9 leave 118208: c3 ret 118209: 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; 11820c: b8 0e 00 00 00 mov $0xe,%eax 118211: e9 68 ff ff ff jmp 11817e 118216: 66 90 xchg %ax,%ax if ( !routine ) return RTEMS_INVALID_ADDRESS; 118218: b8 09 00 00 00 mov $0x9,%eax 11821d: e9 5c ff ff ff jmp 11817e 118222: 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 ); 118224: 50 push %eax 118225: 9d popf _Thread_Enable_dispatch(); 118226: e8 e9 30 00 00 call 11b314 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11822b: 31 c0 xor %eax,%eax 11822d: e9 4c ff ff ff jmp 11817e =============================================================================== 00118234 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 118234: 55 push %ebp 118235: 89 e5 mov %esp,%ebp 118237: 57 push %edi 118238: 56 push %esi 118239: 53 push %ebx 11823a: 83 ec 2c sub $0x2c,%esp 11823d: 8b 7d 0c mov 0xc(%ebp),%edi 118240: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 118243: 8b 1d 80 0c 14 00 mov 0x140c80,%ebx if ( !timer_server ) 118249: 85 db test %ebx,%ebx 11824b: 0f 84 d7 00 00 00 je 118328 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 118251: 80 3d fc 08 14 00 00 cmpb $0x0,0x1408fc 118258: 0f 84 aa 00 00 00 je 118308 <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 11825e: 85 f6 test %esi,%esi 118260: 0f 84 b2 00 00 00 je 118318 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 118266: 83 ec 0c sub $0xc,%esp 118269: 57 push %edi 11826a: e8 95 d1 ff ff call 115404 <_TOD_Validate> 11826f: 83 c4 10 add $0x10,%esp 118272: 84 c0 test %al,%al 118274: 75 0e jne 118284 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; 118276: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11827b: 8d 65 f4 lea -0xc(%ebp),%esp 11827e: 5b pop %ebx 11827f: 5e pop %esi 118280: 5f pop %edi 118281: c9 leave 118282: c3 ret 118283: 90 nop return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 118284: 83 ec 0c sub $0xc,%esp 118287: 57 push %edi 118288: e8 eb d0 ff ff call 115378 <_TOD_To_seconds> 11828d: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 11828f: 83 c4 10 add $0x10,%esp 118292: 3b 05 88 09 14 00 cmp 0x140988,%eax 118298: 76 dc jbe 118276 11829a: 52 push %edx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); 11829b: 8d 45 e4 lea -0x1c(%ebp),%eax 11829e: 50 push %eax 11829f: ff 75 08 pushl 0x8(%ebp) 1182a2: 68 40 0c 14 00 push $0x140c40 1182a7: e8 18 25 00 00 call 11a7c4 <_Objects_Get> 1182ac: 89 c2 mov %eax,%edx switch ( location ) { 1182ae: 83 c4 10 add $0x10,%esp 1182b1: 8b 45 e4 mov -0x1c(%ebp),%eax 1182b4: 85 c0 test %eax,%eax 1182b6: 75 7c jne 118334 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 1182b8: 83 ec 0c sub $0xc,%esp 1182bb: 8d 42 10 lea 0x10(%edx),%eax 1182be: 50 push %eax 1182bf: 89 55 d4 mov %edx,-0x2c(%ebp) 1182c2: e8 ad 40 00 00 call 11c374 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 1182c7: 8b 55 d4 mov -0x2c(%ebp),%edx 1182ca: 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; 1182d1: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 1182d8: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 1182db: 8b 45 08 mov 0x8(%ebp),%eax 1182de: 89 42 30 mov %eax,0x30(%edx) the_watchdog->user_data = user_data; 1182e1: 8b 45 14 mov 0x14(%ebp),%eax 1182e4: 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(); 1182e7: 2b 3d 88 09 14 00 sub 0x140988,%edi 1182ed: 89 7a 1c mov %edi,0x1c(%edx) (*timer_server->schedule_operation)( timer_server, the_timer ); 1182f0: 58 pop %eax 1182f1: 59 pop %ecx 1182f2: 52 push %edx 1182f3: 53 push %ebx 1182f4: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 1182f7: e8 18 30 00 00 call 11b314 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1182fc: 83 c4 10 add $0x10,%esp 1182ff: 31 c0 xor %eax,%eax 118301: e9 75 ff ff ff jmp 11827b 118306: 66 90 xchg %ax,%ax if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 118308: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11830d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 118310: 5b pop %ebx <== NOT EXECUTED 118311: 5e pop %esi <== NOT EXECUTED 118312: 5f pop %edi <== NOT EXECUTED 118313: c9 leave <== NOT EXECUTED 118314: c3 ret <== NOT EXECUTED 118315: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; 118318: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11831d: 8d 65 f4 lea -0xc(%ebp),%esp 118320: 5b pop %ebx 118321: 5e pop %esi 118322: 5f pop %edi 118323: c9 leave 118324: c3 ret 118325: 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; 118328: b8 0e 00 00 00 mov $0xe,%eax 11832d: e9 49 ff ff ff jmp 11827b 118332: 66 90 xchg %ax,%ax #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118334: b8 04 00 00 00 mov $0x4,%eax 118339: e9 3d ff ff ff jmp 11827b