=============================================================================== 0010c43c <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 10c43c: 55 push %ebp 10c43d: 89 e5 mov %esp,%ebp 10c43f: 53 push %ebx 10c440: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10c443: 8b 1d b8 75 12 00 mov 0x1275b8,%ebx 10c449: 81 fb bc 75 12 00 cmp $0x1275bc,%ebx 10c44f: 74 10 je 10c461 <_API_extensions_Run_postdriver+0x25><== NEVER TAKEN 10c451: 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)(); 10c454: ff 53 08 call *0x8(%ebx) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 10c457: 8b 1b mov (%ebx),%ebx void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10c459: 81 fb bc 75 12 00 cmp $0x1275bc,%ebx 10c45f: 75 f3 jne 10c454 <_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)(); } } 10c461: 58 pop %eax 10c462: 5b pop %ebx 10c463: c9 leave 10c464: c3 ret =============================================================================== 0010c468 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 10c468: 55 push %ebp 10c469: 89 e5 mov %esp,%ebp 10c46b: 53 push %ebx 10c46c: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10c46f: 8b 1d b8 75 12 00 mov 0x1275b8,%ebx 10c475: 81 fb bc 75 12 00 cmp $0x1275bc,%ebx 10c47b: 74 1c je 10c499 <_API_extensions_Run_postswitch+0x31><== NEVER TAKEN 10c47d: 8d 76 00 lea 0x0(%esi),%esi * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); 10c480: 83 ec 0c sub $0xc,%esp 10c483: ff 35 18 74 12 00 pushl 0x127418 10c489: ff 53 0c call *0xc(%ebx) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 10c48c: 8b 1b mov (%ebx),%ebx void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10c48e: 83 c4 10 add $0x10,%esp 10c491: 81 fb bc 75 12 00 cmp $0x1275bc,%ebx 10c497: 75 e7 jne 10c480 <_API_extensions_Run_postswitch+0x18><== NEVER TAKEN #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10c499: 8b 5d fc mov -0x4(%ebp),%ebx 10c49c: c9 leave 10c49d: c3 ret =============================================================================== 00100200 <_Barrier_Manager_initialization>: #include #include #include void _Barrier_Manager_initialization(void) { 100200: 55 push %ebp 100201: 89 e5 mov %esp,%ebp } 100203: c9 leave 100204: c3 ret =============================================================================== 0011a144 <_CORE_message_queue_Broadcast>: Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 11a144: 55 push %ebp 11a145: 89 e5 mov %esp,%ebp 11a147: 57 push %edi 11a148: 56 push %esi 11a149: 53 push %ebx 11a14a: 83 ec 1c sub $0x1c,%esp 11a14d: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 11a150: 8b 45 10 mov 0x10(%ebp),%eax 11a153: 39 43 4c cmp %eax,0x4c(%ebx) 11a156: 72 60 jb 11a1b8 <_CORE_message_queue_Broadcast+0x74><== NEVER TAKEN * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 11a158: 8b 43 48 mov 0x48(%ebx),%eax 11a15b: 85 c0 test %eax,%eax 11a15d: 75 45 jne 11a1a4 <_CORE_message_queue_Broadcast+0x60> * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 11a15f: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 11a166: eb 18 jmp 11a180 <_CORE_message_queue_Broadcast+0x3c> waitp = &the_thread->Wait; number_broadcasted += 1; 11a168: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 11a16b: 8b 42 2c mov 0x2c(%edx),%eax 11a16e: 89 c7 mov %eax,%edi 11a170: 8b 75 0c mov 0xc(%ebp),%esi 11a173: 8b 4d 10 mov 0x10(%ebp),%ecx 11a176: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 11a178: 8b 42 28 mov 0x28(%edx),%eax 11a17b: 8b 55 10 mov 0x10(%ebp),%edx 11a17e: 89 10 mov %edx,(%eax) * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 11a180: 83 ec 0c sub $0xc,%esp 11a183: 53 push %ebx 11a184: e8 b3 23 00 00 call 11c53c <_Thread_queue_Dequeue> 11a189: 89 c2 mov %eax,%edx /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 11a18b: 83 c4 10 add $0x10,%esp 11a18e: 85 c0 test %eax,%eax 11a190: 75 d6 jne 11a168 <_CORE_message_queue_Broadcast+0x24> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 11a192: 8b 55 e4 mov -0x1c(%ebp),%edx 11a195: 8b 45 1c mov 0x1c(%ebp),%eax 11a198: 89 10 mov %edx,(%eax) 11a19a: 31 c0 xor %eax,%eax return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 11a19c: 8d 65 f4 lea -0xc(%ebp),%esp 11a19f: 5b pop %ebx 11a1a0: 5e pop %esi 11a1a1: 5f pop %edi 11a1a2: c9 leave 11a1a3: c3 ret * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 11a1a4: 8b 55 1c mov 0x1c(%ebp),%edx 11a1a7: c7 02 00 00 00 00 movl $0x0,(%edx) 11a1ad: 31 c0 xor %eax,%eax #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 11a1af: 8d 65 f4 lea -0xc(%ebp),%esp 11a1b2: 5b pop %ebx 11a1b3: 5e pop %esi 11a1b4: 5f pop %edi 11a1b5: c9 leave 11a1b6: c3 ret 11a1b7: 90 nop { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 11a1b8: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 11a1bd: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11a1c0: 5b pop %ebx <== NOT EXECUTED 11a1c1: 5e pop %esi <== NOT EXECUTED 11a1c2: 5f pop %edi <== NOT EXECUTED 11a1c3: c9 leave <== NOT EXECUTED 11a1c4: c3 ret <== NOT EXECUTED =============================================================================== 001152b4 <_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 ) { 1152b4: 55 push %ebp 1152b5: 89 e5 mov %esp,%ebp 1152b7: 57 push %edi 1152b8: 56 push %esi 1152b9: 53 push %ebx 1152ba: 83 ec 0c sub $0xc,%esp 1152bd: 8b 5d 08 mov 0x8(%ebp),%ebx 1152c0: 8b 75 10 mov 0x10(%ebp),%esi 1152c3: 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; 1152c6: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 1152c9: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 1152d0: 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)) { 1152d3: a8 03 test $0x3,%al 1152d5: 75 19 jne 1152f0 <_CORE_message_queue_Initialize+0x3c> 1152d7: 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)); 1152d9: 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 * 1152dc: 89 f8 mov %edi,%eax 1152de: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 1152e1: 39 d0 cmp %edx,%eax 1152e3: 73 23 jae 115308 <_CORE_message_queue_Initialize+0x54><== ALWAYS TAKEN THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 1152e5: 31 c0 xor %eax,%eax } 1152e7: 8d 65 f4 lea -0xc(%ebp),%esp 1152ea: 5b pop %ebx 1152eb: 5e pop %esi 1152ec: 5f pop %edi 1152ed: c9 leave 1152ee: c3 ret 1152ef: 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)) { allocated_message_size += sizeof(uint32_t); 1152f0: 8d 50 04 lea 0x4(%eax),%edx allocated_message_size &= ~(sizeof(uint32_t) - 1); 1152f3: 83 e2 fc and $0xfffffffc,%edx } if (allocated_message_size < maximum_message_size) 1152f6: 39 d0 cmp %edx,%eax 1152f8: 77 eb ja 1152e5 <_CORE_message_queue_Initialize+0x31><== NEVER TAKEN /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 1152fa: 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 * 1152fd: 89 f8 mov %edi,%eax 1152ff: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 115302: 39 d0 cmp %edx,%eax 115304: 72 df jb 1152e5 <_CORE_message_queue_Initialize+0x31><== NEVER TAKEN 115306: 66 90 xchg %ax,%ax return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 115308: 83 ec 0c sub $0xc,%esp 11530b: 50 push %eax 11530c: e8 a7 28 00 00 call 117bb8 <_Workspace_Allocate> 115311: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 115314: 83 c4 10 add $0x10,%esp 115317: 85 c0 test %eax,%eax 115319: 74 ca je 1152e5 <_CORE_message_queue_Initialize+0x31> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 11531b: 57 push %edi 11531c: 56 push %esi 11531d: 50 push %eax 11531e: 8d 43 60 lea 0x60(%ebx),%eax 115321: 50 push %eax 115322: e8 95 53 00 00 call 11a6bc <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 115327: 8d 43 54 lea 0x54(%ebx),%eax 11532a: 89 43 50 mov %eax,0x50(%ebx) the_chain->permanent_null = NULL; 11532d: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_chain->last = _Chain_Head(the_chain); 115334: 8d 43 50 lea 0x50(%ebx),%eax 115337: 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( 11533a: 6a 06 push $0x6 11533c: 68 80 00 00 00 push $0x80 115341: 8b 45 0c mov 0xc(%ebp),%eax 115344: 83 38 01 cmpl $0x1,(%eax) 115347: 0f 94 c0 sete %al 11534a: 0f b6 c0 movzbl %al,%eax 11534d: 50 push %eax 11534e: 53 push %ebx 11534f: e8 94 1e 00 00 call 1171e8 <_Thread_queue_Initialize> 115354: b0 01 mov $0x1,%al THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 115356: 83 c4 20 add $0x20,%esp } 115359: 8d 65 f4 lea -0xc(%ebp),%esp 11535c: 5b pop %ebx 11535d: 5e pop %esi 11535e: 5f pop %edi 11535f: c9 leave 115360: c3 ret =============================================================================== 0010c5e8 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 10c5e8: 55 push %ebp 10c5e9: 89 e5 mov %esp,%ebp 10c5eb: 57 push %edi 10c5ec: 56 push %esi 10c5ed: 53 push %ebx 10c5ee: 83 ec 0c sub $0xc,%esp 10c5f1: 8b 5d 08 mov 0x8(%ebp),%ebx 10c5f4: 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 ) { 10c5f7: 8b 45 10 mov 0x10(%ebp),%eax 10c5fa: 39 43 4c cmp %eax,0x4c(%ebx) 10c5fd: 72 79 jb 10c678 <_CORE_message_queue_Submit+0x90> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 10c5ff: 8b 53 48 mov 0x48(%ebx),%edx 10c602: 85 d2 test %edx,%edx 10c604: 74 3e je 10c644 <_CORE_message_queue_Submit+0x5c> RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 10c606: 83 ec 0c sub $0xc,%esp 10c609: 8d 43 60 lea 0x60(%ebx),%eax 10c60c: 50 push %eax 10c60d: e8 b2 ff ff ff call 10c5c4 <_Chain_Get> 10c612: 89 c2 mov %eax,%edx * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ the_message = _CORE_message_queue_Allocate_message_buffer( the_message_queue ); if ( the_message ) { 10c614: 83 c4 10 add $0x10,%esp 10c617: 85 c0 test %eax,%eax 10c619: 74 6d je 10c688 <_CORE_message_queue_Submit+0xa0> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10c61b: 8d 40 0c lea 0xc(%eax),%eax 10c61e: 89 c7 mov %eax,%edi 10c620: 8b 4d 10 mov 0x10(%ebp),%ecx 10c623: f3 a4 rep movsb %ds:(%esi),%es:(%edi) _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 10c625: 8b 4d 10 mov 0x10(%ebp),%ecx 10c628: 89 4a 08 mov %ecx,0x8(%edx) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 10c62b: 50 push %eax 10c62c: ff 75 1c pushl 0x1c(%ebp) 10c62f: 52 push %edx 10c630: 53 push %ebx 10c631: e8 62 51 00 00 call 111798 <_CORE_message_queue_Insert_message> 10c636: 31 c0 xor %eax,%eax the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10c638: 83 c4 10 add $0x10,%esp _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c63b: 8d 65 f4 lea -0xc(%ebp),%esp 10c63e: 5b pop %ebx 10c63f: 5e pop %esi 10c640: 5f pop %edi 10c641: c9 leave 10c642: c3 ret 10c643: 90 nop /* * 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 ); 10c644: 83 ec 0c sub $0xc,%esp 10c647: 53 push %ebx 10c648: e8 1f 19 00 00 call 10df6c <_Thread_queue_Dequeue> 10c64d: 89 c2 mov %eax,%edx if ( the_thread ) { 10c64f: 83 c4 10 add $0x10,%esp 10c652: 85 c0 test %eax,%eax 10c654: 74 b0 je 10c606 <_CORE_message_queue_Submit+0x1e> 10c656: 8b 40 2c mov 0x2c(%eax),%eax 10c659: 89 c7 mov %eax,%edi 10c65b: 8b 4d 10 mov 0x10(%ebp),%ecx 10c65e: 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; 10c660: 8b 42 28 mov 0x28(%edx),%eax 10c663: 8b 4d 10 mov 0x10(%ebp),%ecx 10c666: 89 08 mov %ecx,(%eax) the_thread->Wait.count = (uint32_t) submit_type; 10c668: 8b 45 1c mov 0x1c(%ebp),%eax 10c66b: 89 42 24 mov %eax,0x24(%edx) 10c66e: 31 c0 xor %eax,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c670: 8d 65 f4 lea -0xc(%ebp),%esp 10c673: 5b pop %ebx 10c674: 5e pop %esi 10c675: 5f pop %edi 10c676: c9 leave 10c677: c3 ret ) { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 10c678: 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 } 10c67d: 8d 65 f4 lea -0xc(%ebp),%esp 10c680: 5b pop %ebx 10c681: 5e pop %esi 10c682: 5f pop %edi 10c683: c9 leave 10c684: c3 ret 10c685: 8d 76 00 lea 0x0(%esi),%esi * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ the_message = _CORE_message_queue_Allocate_message_buffer( the_message_queue ); if ( the_message ) { 10c688: 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 } 10c68d: 8d 65 f4 lea -0xc(%ebp),%esp 10c690: 5b pop %ebx 10c691: 5e pop %esi 10c692: 5f pop %edi 10c693: c9 leave 10c694: c3 ret =============================================================================== 0010c6a4 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10c6a4: 55 push %ebp 10c6a5: 89 e5 mov %esp,%ebp 10c6a7: 57 push %edi 10c6a8: 56 push %esi 10c6a9: 53 push %ebx 10c6aa: 83 ec 0c sub $0xc,%esp 10c6ad: 8b 45 08 mov 0x8(%ebp),%eax 10c6b0: 8b 5d 0c mov 0xc(%ebp),%ebx 10c6b3: 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; 10c6b6: 8d 78 40 lea 0x40(%eax),%edi 10c6b9: b9 04 00 00 00 mov $0x4,%ecx 10c6be: 89 de mov %ebx,%esi 10c6c0: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10c6c2: 89 50 50 mov %edx,0x50(%eax) the_mutex->blocked_count = 0; 10c6c5: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10c6cc: 85 d2 test %edx,%edx 10c6ce: 75 30 jne 10c700 <_CORE_mutex_Initialize+0x5c> the_mutex->nest_count = 1; 10c6d0: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) the_mutex->holder = _Thread_Executing; 10c6d7: 8b 15 18 74 12 00 mov 0x127418,%edx 10c6dd: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = _Thread_Executing->Object.id; 10c6e0: 8b 4a 08 mov 0x8(%edx),%ecx 10c6e3: 89 48 60 mov %ecx,0x60(%eax) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10c6e6: 8b 48 48 mov 0x48(%eax),%ecx if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c6e9: 83 f9 02 cmp $0x2,%ecx 10c6ec: 74 05 je 10c6f3 <_CORE_mutex_Initialize+0x4f> 10c6ee: 83 f9 03 cmp $0x3,%ecx 10c6f1: 75 22 jne 10c715 <_CORE_mutex_Initialize+0x71> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 10c6f3: 8b 4a 14 mov 0x14(%edx),%ecx 10c6f6: 3b 48 4c cmp 0x4c(%eax),%ecx 10c6f9: 72 41 jb 10c73c <_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++; 10c6fb: ff 42 1c incl 0x1c(%edx) 10c6fe: eb 15 jmp 10c715 <_CORE_mutex_Initialize+0x71> } } else { the_mutex->nest_count = 0; 10c700: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_mutex->holder = NULL; 10c707: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) the_mutex->holder_id = 0; 10c70e: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) } _Thread_queue_Initialize( 10c715: 6a 05 push $0x5 10c717: 68 00 04 00 00 push $0x400 10c71c: 31 d2 xor %edx,%edx 10c71e: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10c722: 0f 95 c2 setne %dl 10c725: 52 push %edx 10c726: 50 push %eax 10c727: e8 bc 1b 00 00 call 10e2e8 <_Thread_queue_Initialize> 10c72c: 31 c0 xor %eax,%eax THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 10c72e: 83 c4 10 add $0x10,%esp } 10c731: 8d 65 f4 lea -0xc(%ebp),%esp 10c734: 5b pop %ebx 10c735: 5e pop %esi 10c736: 5f pop %edi 10c737: c9 leave 10c738: c3 ret 10c739: 8d 76 00 lea 0x0(%esi),%esi the_mutex->holder_id = _Thread_Executing->Object.id; 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 ) 10c73c: b8 06 00 00 00 mov $0x6,%eax STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c741: 8d 65 f4 lea -0xc(%ebp),%esp 10c744: 5b pop %ebx 10c745: 5e pop %esi 10c746: 5f pop %edi 10c747: c9 leave 10c748: c3 ret =============================================================================== 0010c79c <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10c79c: 55 push %ebp 10c79d: 89 e5 mov %esp,%ebp 10c79f: 53 push %ebx 10c7a0: 83 ec 14 sub $0x14,%esp 10c7a3: 8b 5d 08 mov 0x8(%ebp),%ebx 10c7a6: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c7a9: a1 58 73 12 00 mov 0x127358,%eax 10c7ae: 85 c0 test %eax,%eax 10c7b0: 74 04 je 10c7b6 <_CORE_mutex_Seize+0x1a> 10c7b2: 84 d2 test %dl,%dl 10c7b4: 75 36 jne 10c7ec <_CORE_mutex_Seize+0x50><== ALWAYS TAKEN 10c7b6: 83 ec 08 sub $0x8,%esp 10c7b9: 8d 45 18 lea 0x18(%ebp),%eax 10c7bc: 50 push %eax 10c7bd: 53 push %ebx 10c7be: 88 55 f4 mov %dl,-0xc(%ebp) 10c7c1: e8 16 50 00 00 call 1117dc <_CORE_mutex_Seize_interrupt_trylock> 10c7c6: 83 c4 10 add $0x10,%esp 10c7c9: 85 c0 test %eax,%eax 10c7cb: 8a 55 f4 mov -0xc(%ebp),%dl 10c7ce: 74 14 je 10c7e4 <_CORE_mutex_Seize+0x48> 10c7d0: 84 d2 test %dl,%dl 10c7d2: 75 30 jne 10c804 <_CORE_mutex_Seize+0x68> 10c7d4: ff 75 18 pushl 0x18(%ebp) 10c7d7: 9d popf 10c7d8: a1 18 74 12 00 mov 0x127418,%eax 10c7dd: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) } 10c7e4: 8b 5d fc mov -0x4(%ebp),%ebx 10c7e7: c9 leave 10c7e8: c3 ret 10c7e9: 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 ); 10c7ec: 83 3d 20 75 12 00 01 cmpl $0x1,0x127520 10c7f3: 76 c1 jbe 10c7b6 <_CORE_mutex_Seize+0x1a> 10c7f5: 53 push %ebx 10c7f6: 6a 13 push $0x13 10c7f8: 6a 00 push $0x0 10c7fa: 6a 00 push $0x0 10c7fc: e8 fb 05 00 00 call 10cdfc <_Internal_error_Occurred> 10c801: 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; 10c804: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10c80b: a1 18 74 12 00 mov 0x127418,%eax 10c810: 89 58 44 mov %ebx,0x44(%eax) 10c813: 8b 55 0c mov 0xc(%ebp),%edx 10c816: 89 50 20 mov %edx,0x20(%eax) 10c819: a1 58 73 12 00 mov 0x127358,%eax 10c81e: 40 inc %eax 10c81f: a3 58 73 12 00 mov %eax,0x127358 10c824: ff 75 18 pushl 0x18(%ebp) 10c827: 9d popf 10c828: 83 ec 08 sub $0x8,%esp 10c82b: ff 75 14 pushl 0x14(%ebp) 10c82e: 53 push %ebx 10c82f: e8 18 ff ff ff call 10c74c <_CORE_mutex_Seize_interrupt_blocking> 10c834: 83 c4 10 add $0x10,%esp } 10c837: 8b 5d fc mov -0x4(%ebp),%ebx 10c83a: c9 leave 10c83b: c3 ret =============================================================================== 001117dc <_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 ) { 1117dc: 55 push %ebp 1117dd: 89 e5 mov %esp,%ebp 1117df: 56 push %esi 1117e0: 53 push %ebx 1117e1: 8b 45 08 mov 0x8(%ebp),%eax 1117e4: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 1117e7: 8b 15 18 74 12 00 mov 0x127418,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 1117ed: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 1117f4: 8b 58 50 mov 0x50(%eax),%ebx 1117f7: 85 db test %ebx,%ebx 1117f9: 74 31 je 11182c <_CORE_mutex_Seize_interrupt_trylock+0x50> the_mutex->lock = CORE_MUTEX_LOCKED; 1117fb: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 111802: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 111805: 8b 5a 08 mov 0x8(%edx),%ebx 111808: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 11180b: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 111812: 8b 58 48 mov 0x48(%eax),%ebx if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 111815: 83 fb 02 cmp $0x2,%ebx 111818: 74 26 je 111840 <_CORE_mutex_Seize_interrupt_trylock+0x64> 11181a: 83 fb 03 cmp $0x3,%ebx 11181d: 74 35 je 111854 <_CORE_mutex_Seize_interrupt_trylock+0x78> */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); 11181f: ff 31 pushl (%ecx) 111821: 9d popf 111822: 31 c0 xor %eax,%eax return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 111824: 8d 65 f8 lea -0x8(%ebp),%esp 111827: 5b pop %ebx 111828: 5e pop %esi 111829: c9 leave 11182a: c3 ret 11182b: 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 ) ) { 11182c: 3b 50 5c cmp 0x5c(%eax),%edx 11182f: 74 17 je 111848 <_CORE_mutex_Seize_interrupt_trylock+0x6c> the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; _ISR_Enable( *level_p ); 111831: b8 01 00 00 00 mov $0x1,%eax 111836: 8d 65 f8 lea -0x8(%ebp),%esp 111839: 5b pop %ebx 11183a: 5e pop %esi 11183b: c9 leave 11183c: c3 ret 11183d: 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++; 111840: ff 42 1c incl 0x1c(%edx) 111843: eb da jmp 11181f <_CORE_mutex_Seize_interrupt_trylock+0x43> 111845: 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 ) { 111848: 8b 58 40 mov 0x40(%eax),%ebx 11184b: 85 db test %ebx,%ebx 11184d: 75 3d jne 11188c <_CORE_mutex_Seize_interrupt_trylock+0xb0> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 11184f: ff 40 54 incl 0x54(%eax) 111852: eb cb jmp 11181f <_CORE_mutex_Seize_interrupt_trylock+0x43> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 111854: 8b 5a 1c mov 0x1c(%edx),%ebx 111857: 8d 73 01 lea 0x1(%ebx),%esi 11185a: 89 72 1c mov %esi,0x1c(%edx) { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 11185d: 8b 72 14 mov 0x14(%edx),%esi if ( current == ceiling ) { 111860: 39 70 4c cmp %esi,0x4c(%eax) 111863: 74 ba je 11181f <_CORE_mutex_Seize_interrupt_trylock+0x43> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 111865: 72 39 jb 1118a0 <_CORE_mutex_Seize_interrupt_trylock+0xc4> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 111867: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 11186e: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 111875: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 11187c: 89 5a 1c mov %ebx,0x1c(%edx) _ISR_Enable( *level_p ); 11187f: ff 31 pushl (%ecx) 111881: 9d popf 111882: 31 c0 xor %eax,%eax 111884: 8d 65 f8 lea -0x8(%ebp),%esp 111887: 5b pop %ebx 111888: 5e pop %esi 111889: c9 leave 11188a: c3 ret 11188b: 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 ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 11188c: 4b dec %ebx 11188d: 75 a2 jne 111831 <_CORE_mutex_Seize_interrupt_trylock+0x55><== ALWAYS TAKEN case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 11188f: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) <== NOT EXECUTED _ISR_Enable( *level_p ); 111896: ff 31 pushl (%ecx) <== NOT EXECUTED 111898: 9d popf <== NOT EXECUTED 111899: 31 c0 xor %eax,%eax <== NOT EXECUTED 11189b: eb 99 jmp 111836 <_CORE_mutex_Seize_interrupt_trylock+0x5a><== NOT EXECUTED 11189d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1118a0: 8b 15 58 73 12 00 mov 0x127358,%edx 1118a6: 42 inc %edx 1118a7: 89 15 58 73 12 00 mov %edx,0x127358 return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 1118ad: ff 31 pushl (%ecx) 1118af: 9d popf _Thread_Change_priority( 1118b0: 52 push %edx 1118b1: 6a 00 push $0x0 1118b3: ff 70 4c pushl 0x4c(%eax) 1118b6: ff 70 5c pushl 0x5c(%eax) 1118b9: e8 e6 bd ff ff call 10d6a4 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 1118be: e8 c9 c2 ff ff call 10db8c <_Thread_Enable_dispatch> 1118c3: 31 c0 xor %eax,%eax 1118c5: 83 c4 10 add $0x10,%esp 1118c8: e9 69 ff ff ff jmp 111836 <_CORE_mutex_Seize_interrupt_trylock+0x5a> =============================================================================== 0010c83c <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 10c83c: 55 push %ebp 10c83d: 89 e5 mov %esp,%ebp 10c83f: 53 push %ebx 10c840: 83 ec 04 sub $0x4,%esp 10c843: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; Thread_Control *holder; #ifdef __RTEMS_STRICT_ORDER_MUTEX__ Chain_Node *first_node; #endif holder = the_mutex->holder; 10c846: 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 ) { 10c849: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10c84d: 74 15 je 10c864 <_CORE_mutex_Surrender+0x28> if ( !_Thread_Is_executing( holder ) ) 10c84f: 3b 05 18 74 12 00 cmp 0x127418,%eax 10c855: 74 0d je 10c864 <_CORE_mutex_Surrender+0x28> 10c857: b8 03 00 00 00 mov $0x3,%eax } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c85c: 8b 5d fc mov -0x4(%ebp),%ebx 10c85f: c9 leave 10c860: c3 ret 10c861: 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 ) 10c864: 8b 53 54 mov 0x54(%ebx),%edx 10c867: 85 d2 test %edx,%edx 10c869: 74 65 je 10c8d0 <_CORE_mutex_Surrender+0x94> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10c86b: 4a dec %edx 10c86c: 89 53 54 mov %edx,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10c86f: 85 d2 test %edx,%edx 10c871: 75 5d jne 10c8d0 <_CORE_mutex_Surrender+0x94> 10c873: 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 ) || 10c876: 83 fa 02 cmp $0x2,%edx 10c879: 0f 84 99 00 00 00 je 10c918 <_CORE_mutex_Surrender+0xdc> 10c87f: 83 fa 03 cmp $0x3,%edx 10c882: 0f 84 90 00 00 00 je 10c918 <_CORE_mutex_Surrender+0xdc> } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 10c888: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10c88f: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c896: 83 fa 02 cmp $0x2,%edx 10c899: 74 5d je 10c8f8 <_CORE_mutex_Surrender+0xbc> 10c89b: 83 fa 03 cmp $0x3,%edx 10c89e: 74 58 je 10c8f8 <_CORE_mutex_Surrender+0xbc> /* * 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 ) ) ) { 10c8a0: 83 ec 0c sub $0xc,%esp 10c8a3: 53 push %ebx 10c8a4: e8 c3 16 00 00 call 10df6c <_Thread_queue_Dequeue> 10c8a9: 83 c4 10 add $0x10,%esp 10c8ac: 85 c0 test %eax,%eax 10c8ae: 74 7c je 10c92c <_CORE_mutex_Surrender+0xf0> } else #endif { the_mutex->holder = the_thread; 10c8b0: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10c8b3: 8b 50 08 mov 0x8(%eax),%edx 10c8b6: 89 53 60 mov %edx,0x60(%ebx) the_mutex->nest_count = 1; 10c8b9: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10c8c0: 8b 53 48 mov 0x48(%ebx),%edx 10c8c3: 83 fa 02 cmp $0x2,%edx 10c8c6: 74 58 je 10c920 <_CORE_mutex_Surrender+0xe4> 10c8c8: 83 fa 03 cmp $0x3,%edx 10c8cb: 74 0b je 10c8d8 <_CORE_mutex_Surrender+0x9c> 10c8cd: 8d 76 00 lea 0x0(%esi),%esi } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c8d0: 31 c0 xor %eax,%eax return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c8d2: 8b 5d fc mov -0x4(%ebp),%ebx 10c8d5: c9 leave 10c8d6: c3 ret 10c8d7: 90 nop case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 10c8d8: ff 40 1c incl 0x1c(%eax) if (the_mutex->Attributes.priority_ceiling < 10c8db: 8b 53 4c mov 0x4c(%ebx),%edx the_thread->current_priority){ 10c8de: 3b 50 14 cmp 0x14(%eax),%edx 10c8e1: 73 ed jae 10c8d0 <_CORE_mutex_Surrender+0x94> _Thread_Change_priority( 10c8e3: 51 push %ecx 10c8e4: 6a 00 push $0x0 10c8e6: 52 push %edx 10c8e7: 50 push %eax 10c8e8: e8 b7 0d 00 00 call 10d6a4 <_Thread_Change_priority> 10c8ed: 31 c0 xor %eax,%eax 10c8ef: 83 c4 10 add $0x10,%esp 10c8f2: e9 65 ff ff ff jmp 10c85c <_CORE_mutex_Surrender+0x20> 10c8f7: 90 nop _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,true); #endif if ( holder->resource_count == 0 && 10c8f8: 8b 50 1c mov 0x1c(%eax),%edx 10c8fb: 85 d2 test %edx,%edx 10c8fd: 75 a1 jne 10c8a0 <_CORE_mutex_Surrender+0x64> holder->real_priority != holder->current_priority ) { 10c8ff: 8b 50 18 mov 0x18(%eax),%edx 10c902: 3b 50 14 cmp 0x14(%eax),%edx 10c905: 74 99 je 10c8a0 <_CORE_mutex_Surrender+0x64> _Thread_Change_priority( holder, holder->real_priority, true ); 10c907: 51 push %ecx 10c908: 6a 01 push $0x1 10c90a: 52 push %edx 10c90b: 50 push %eax 10c90c: e8 93 0d 00 00 call 10d6a4 <_Thread_Change_priority> 10c911: 83 c4 10 add $0x10,%esp 10c914: eb 8a jmp 10c8a0 <_CORE_mutex_Surrender+0x64> 10c916: 66 90 xchg %ax,%ax the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 10c918: ff 48 1c decl 0x1c(%eax) 10c91b: e9 68 ff ff ff jmp 10c888 <_CORE_mutex_Surrender+0x4c> case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 10c920: ff 40 1c incl 0x1c(%eax) 10c923: 31 c0 xor %eax,%eax break; 10c925: e9 32 ff ff ff jmp 10c85c <_CORE_mutex_Surrender+0x20> 10c92a: 66 90 xchg %ax,%ax } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c92c: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) 10c933: 31 c0 xor %eax,%eax 10c935: e9 22 ff ff ff jmp 10c85c <_CORE_mutex_Surrender+0x20> =============================================================================== 0010c988 <_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 ) { 10c988: 55 push %ebp 10c989: 89 e5 mov %esp,%ebp 10c98b: 53 push %ebx 10c98c: 83 ec 10 sub $0x10,%esp 10c98f: 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)) ) { 10c992: 53 push %ebx 10c993: e8 d4 15 00 00 call 10df6c <_Thread_queue_Dequeue> 10c998: 83 c4 10 add $0x10,%esp 10c99b: 85 c0 test %eax,%eax 10c99d: 74 09 je 10c9a8 <_CORE_semaphore_Surrender+0x20> 10c99f: 31 c0 xor %eax,%eax status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 10c9a1: 8b 5d fc mov -0x4(%ebp),%ebx 10c9a4: c9 leave 10c9a5: c3 ret 10c9a6: 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 ); 10c9a8: 9c pushf 10c9a9: fa cli 10c9aa: 5a pop %edx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10c9ab: 8b 43 48 mov 0x48(%ebx),%eax 10c9ae: 3b 43 40 cmp 0x40(%ebx),%eax 10c9b1: 72 0d jb 10c9c0 <_CORE_semaphore_Surrender+0x38><== ALWAYS TAKEN 10c9b3: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10c9b8: 52 push %edx 10c9b9: 9d popf } return status; } 10c9ba: 8b 5d fc mov -0x4(%ebp),%ebx 10c9bd: c9 leave 10c9be: c3 ret 10c9bf: 90 nop #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 10c9c0: 40 inc %eax 10c9c1: 89 43 48 mov %eax,0x48(%ebx) 10c9c4: 31 c0 xor %eax,%eax 10c9c6: eb f0 jmp 10c9b8 <_CORE_semaphore_Surrender+0x30> =============================================================================== 00111670 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 111670: 55 push %ebp 111671: 89 e5 mov %esp,%ebp 111673: 57 push %edi 111674: 56 push %esi 111675: 53 push %ebx 111676: 8b 7d 08 mov 0x8(%ebp),%edi 111679: 8b 4d 10 mov 0x10(%ebp),%ecx 11167c: 8b 75 14 mov 0x14(%ebp),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 11167f: 89 fa mov %edi,%edx Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 111681: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) next = starting_address; while ( count-- ) { 111688: 85 c9 test %ecx,%ecx 11168a: 74 17 je 1116a3 <_Chain_Initialize+0x33><== NEVER TAKEN Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 11168c: 8b 45 0c mov 0xc(%ebp),%eax 11168f: eb 05 jmp 111696 <_Chain_Initialize+0x26> 111691: 8d 76 00 lea 0x0(%esi),%esi while ( count-- ) { 111694: 89 d8 mov %ebx,%eax current->next = next; 111696: 89 02 mov %eax,(%edx) next->previous = current; 111698: 89 50 04 mov %edx,0x4(%eax) 11169b: 8d 1c 30 lea (%eax,%esi,1),%ebx current = next; next = (Chain_Node *) 11169e: 89 c2 mov %eax,%edx count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 1116a0: 49 dec %ecx 1116a1: 75 f1 jne 111694 <_Chain_Initialize+0x24> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 1116a3: 8d 47 04 lea 0x4(%edi),%eax 1116a6: 89 02 mov %eax,(%edx) the_chain->last = current; 1116a8: 89 57 08 mov %edx,0x8(%edi) } 1116ab: 5b pop %ebx 1116ac: 5e pop %esi 1116ad: 5f pop %edi 1116ae: c9 leave 1116af: c3 ret =============================================================================== 00100208 <_Dual_ported_memory_Manager_initialization>: #include #include #include void _Dual_ported_memory_Manager_initialization(void) { 100208: 55 push %ebp 100209: 89 e5 mov %esp,%ebp } 10020b: c9 leave 10020c: c3 ret =============================================================================== 00100210 <_Event_Manager_initialization>: #include #include #include void _Event_Manager_initialization(void) { 100210: 55 push %ebp 100211: 89 e5 mov %esp,%ebp } 100213: c9 leave 100214: c3 ret =============================================================================== 0010b6bc <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10b6bc: 55 push %ebp 10b6bd: 89 e5 mov %esp,%ebp 10b6bf: 57 push %edi 10b6c0: 56 push %esi 10b6c1: 53 push %ebx 10b6c2: 83 ec 2c sub $0x2c,%esp 10b6c5: 8b 45 08 mov 0x8(%ebp),%eax 10b6c8: 8b 4d 0c mov 0xc(%ebp),%ecx 10b6cb: 8b 55 10 mov 0x10(%ebp),%edx 10b6ce: 89 55 dc mov %edx,-0x24(%ebp) 10b6d1: 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; 10b6d4: 8b 1d 18 74 12 00 mov 0x127418,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10b6da: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10b6e1: 8b b3 f0 00 00 00 mov 0xf0(%ebx),%esi _ISR_Disable( level ); 10b6e7: 9c pushf 10b6e8: fa cli 10b6e9: 8f 45 e0 popl -0x20(%ebp) pending_events = api->pending_events; 10b6ec: 8b 16 mov (%esi),%edx 10b6ee: 89 55 d4 mov %edx,-0x2c(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10b6f1: 21 c2 and %eax,%edx 10b6f3: 89 55 e4 mov %edx,-0x1c(%ebp) 10b6f6: 74 0d je 10b705 <_Event_Seize+0x49> 10b6f8: 39 d0 cmp %edx,%eax 10b6fa: 0f 84 84 00 00 00 je 10b784 <_Event_Seize+0xc8> 10b700: f6 c1 02 test $0x2,%cl 10b703: 75 7f jne 10b784 <_Event_Seize+0xc8> <== ALWAYS TAKEN _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10b705: f6 c1 01 test $0x1,%cl 10b708: 75 62 jne 10b76c <_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; 10b70a: 89 4b 30 mov %ecx,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10b70d: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10b710: 89 7b 28 mov %edi,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10b713: c7 05 60 76 12 00 01 movl $0x1,0x127660 10b71a: 00 00 00 _ISR_Enable( level ); 10b71d: ff 75 e0 pushl -0x20(%ebp) 10b720: 9d popf if ( ticks ) { 10b721: 8b 45 dc mov -0x24(%ebp),%eax 10b724: 85 c0 test %eax,%eax 10b726: 0f 85 80 00 00 00 jne 10b7ac <_Event_Seize+0xf0> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10b72c: 83 ec 08 sub $0x8,%esp 10b72f: 68 00 01 00 00 push $0x100 10b734: 53 push %ebx 10b735: e8 02 2d 00 00 call 10e43c <_Thread_Set_state> _ISR_Disable( level ); 10b73a: 9c pushf 10b73b: fa cli 10b73c: 5a pop %edx sync_state = _Event_Sync_state; 10b73d: a1 60 76 12 00 mov 0x127660,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10b742: c7 05 60 76 12 00 00 movl $0x0,0x127660 10b749: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10b74c: 83 c4 10 add $0x10,%esp 10b74f: 83 f8 01 cmp $0x1,%eax 10b752: 74 4c je 10b7a0 <_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 ); 10b754: 89 55 10 mov %edx,0x10(%ebp) 10b757: 89 5d 0c mov %ebx,0xc(%ebp) 10b75a: 89 45 08 mov %eax,0x8(%ebp) } 10b75d: 8d 65 f4 lea -0xc(%ebp),%esp 10b760: 5b pop %ebx 10b761: 5e pop %esi 10b762: 5f pop %edi 10b763: 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 ); 10b764: e9 ef 1e 00 00 jmp 10d658 <_Thread_blocking_operation_Cancel> 10b769: 8d 76 00 lea 0x0(%esi),%esi *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 10b76c: ff 75 e0 pushl -0x20(%ebp) 10b76f: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10b770: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10b777: 8b 55 e4 mov -0x1c(%ebp),%edx 10b77a: 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 ); } 10b77c: 8d 65 f4 lea -0xc(%ebp),%esp 10b77f: 5b pop %ebx 10b780: 5e pop %esi 10b781: 5f pop %edi 10b782: c9 leave 10b783: c3 ret pending_events = api->pending_events; seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 10b784: 8b 45 e4 mov -0x1c(%ebp),%eax 10b787: f7 d0 not %eax 10b789: 23 45 d4 and -0x2c(%ebp),%eax 10b78c: 89 06 mov %eax,(%esi) _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 10b78e: ff 75 e0 pushl -0x20(%ebp) 10b791: 9d popf *event_out = seized_events; 10b792: 8b 45 e4 mov -0x1c(%ebp),%eax 10b795: 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 ); } 10b797: 8d 65 f4 lea -0xc(%ebp),%esp 10b79a: 5b pop %ebx 10b79b: 5e pop %esi 10b79c: 5f pop %edi 10b79d: c9 leave 10b79e: c3 ret 10b79f: 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 ); 10b7a0: 52 push %edx 10b7a1: 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 ); } 10b7a2: 8d 65 f4 lea -0xc(%ebp),%esp 10b7a5: 5b pop %ebx 10b7a6: 5e pop %esi 10b7a7: 5f pop %edi 10b7a8: c9 leave 10b7a9: c3 ret 10b7aa: 66 90 xchg %ax,%ax _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 10b7ac: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b7af: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10b7b6: c7 43 64 4c b9 10 00 movl $0x10b94c,0x64(%ebx) the_watchdog->id = id; 10b7bd: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10b7c0: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b7c7: 8b 45 dc mov -0x24(%ebp),%eax 10b7ca: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b7cd: 83 ec 08 sub $0x8,%esp 10b7d0: 8d 43 48 lea 0x48(%ebx),%eax 10b7d3: 50 push %eax 10b7d4: 68 38 74 12 00 push $0x127438 10b7d9: e8 ae 32 00 00 call 10ea8c <_Watchdog_Insert> 10b7de: 83 c4 10 add $0x10,%esp 10b7e1: e9 46 ff ff ff jmp 10b72c <_Event_Seize+0x70> =============================================================================== 0010b83c <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10b83c: 55 push %ebp 10b83d: 89 e5 mov %esp,%ebp 10b83f: 57 push %edi 10b840: 56 push %esi 10b841: 53 push %ebx 10b842: 83 ec 1c sub $0x1c,%esp 10b845: 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 ]; 10b848: 8b 8b f0 00 00 00 mov 0xf0(%ebx),%ecx option_set = (rtems_option) the_thread->Wait.option; 10b84e: 8b 73 30 mov 0x30(%ebx),%esi _ISR_Disable( level ); 10b851: 9c pushf 10b852: fa cli 10b853: 8f 45 e4 popl -0x1c(%ebp) pending_events = api->pending_events; 10b856: 8b 11 mov (%ecx),%edx event_condition = (rtems_event_set) the_thread->Wait.count; 10b858: 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 ) ) { 10b85b: 89 c7 mov %eax,%edi 10b85d: 21 d7 and %edx,%edi 10b85f: 89 7d e0 mov %edi,-0x20(%ebp) 10b862: 0f 84 ac 00 00 00 je 10b914 <_Event_Surrender+0xd8> /* * 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() && 10b868: 8b 3d f4 73 12 00 mov 0x1273f4,%edi 10b86e: 85 ff test %edi,%edi 10b870: 74 08 je 10b87a <_Event_Surrender+0x3e> 10b872: 3b 1d 18 74 12 00 cmp 0x127418,%ebx 10b878: 74 5a je 10b8d4 <_Event_Surrender+0x98> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10b87a: f6 43 11 01 testb $0x1,0x11(%ebx) 10b87e: 0f 84 90 00 00 00 je 10b914 <_Event_Surrender+0xd8> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 10b884: 3b 45 e0 cmp -0x20(%ebp),%eax 10b887: 74 09 je 10b892 <_Event_Surrender+0x56> 10b889: 83 e6 02 and $0x2,%esi 10b88c: 0f 84 82 00 00 00 je 10b914 <_Event_Surrender+0xd8> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 10b892: 8b 45 e0 mov -0x20(%ebp),%eax 10b895: f7 d0 not %eax 10b897: 21 d0 and %edx,%eax 10b899: 89 01 mov %eax,(%ecx) the_thread->Wait.count = 0; 10b89b: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b8a2: 8b 43 28 mov 0x28(%ebx),%eax 10b8a5: 8b 7d e0 mov -0x20(%ebp),%edi 10b8a8: 89 38 mov %edi,(%eax) _ISR_Flash( level ); 10b8aa: ff 75 e4 pushl -0x1c(%ebp) 10b8ad: 9d popf 10b8ae: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10b8af: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b8b3: 74 6b je 10b920 <_Event_Surrender+0xe4> _ISR_Enable( level ); 10b8b5: ff 75 e4 pushl -0x1c(%ebp) 10b8b8: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b8b9: 83 ec 08 sub $0x8,%esp 10b8bc: 68 f8 ff 03 10 push $0x1003fff8 10b8c1: 53 push %ebx 10b8c2: e8 1d 1f 00 00 call 10d7e4 <_Thread_Clear_state> 10b8c7: 83 c4 10 add $0x10,%esp } return; } } _ISR_Enable( level ); } 10b8ca: 8d 65 f4 lea -0xc(%ebp),%esp 10b8cd: 5b pop %ebx 10b8ce: 5e pop %esi 10b8cf: 5f pop %edi 10b8d0: c9 leave 10b8d1: c3 ret 10b8d2: 66 90 xchg %ax,%ax * 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) || 10b8d4: 8b 3d 60 76 12 00 mov 0x127660,%edi /* * 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() && 10b8da: 83 ff 02 cmp $0x2,%edi 10b8dd: 74 09 je 10b8e8 <_Event_Surrender+0xac> <== NEVER TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 10b8df: 8b 3d 60 76 12 00 mov 0x127660,%edi /* * 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() && 10b8e5: 4f dec %edi 10b8e6: 75 92 jne 10b87a <_Event_Surrender+0x3e> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 10b8e8: 3b 45 e0 cmp -0x20(%ebp),%eax 10b8eb: 74 05 je 10b8f2 <_Event_Surrender+0xb6> 10b8ed: 83 e6 02 and $0x2,%esi 10b8f0: 74 22 je 10b914 <_Event_Surrender+0xd8> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 10b8f2: 8b 45 e0 mov -0x20(%ebp),%eax 10b8f5: f7 d0 not %eax 10b8f7: 21 d0 and %edx,%eax 10b8f9: 89 01 mov %eax,(%ecx) the_thread->Wait.count = 0; 10b8fb: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b902: 8b 43 28 mov 0x28(%ebx),%eax 10b905: 8b 55 e0 mov -0x20(%ebp),%edx 10b908: 89 10 mov %edx,(%eax) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10b90a: c7 05 60 76 12 00 03 movl $0x3,0x127660 10b911: 00 00 00 _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10b914: ff 75 e4 pushl -0x1c(%ebp) 10b917: 9d popf } 10b918: 8d 65 f4 lea -0xc(%ebp),%esp 10b91b: 5b pop %ebx 10b91c: 5e pop %esi 10b91d: 5f pop %edi 10b91e: c9 leave 10b91f: c3 ret RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10b920: 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 ); 10b927: ff 75 e4 pushl -0x1c(%ebp) 10b92a: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10b92b: 83 ec 0c sub $0xc,%esp 10b92e: 8d 43 48 lea 0x48(%ebx),%eax 10b931: 50 push %eax 10b932: e8 7d 32 00 00 call 10ebb4 <_Watchdog_Remove> 10b937: 58 pop %eax 10b938: 5a pop %edx 10b939: 68 f8 ff 03 10 push $0x1003fff8 10b93e: 53 push %ebx 10b93f: e8 a0 1e 00 00 call 10d7e4 <_Thread_Clear_state> 10b944: 83 c4 10 add $0x10,%esp 10b947: eb cf jmp 10b918 <_Event_Surrender+0xdc> =============================================================================== 0010b94c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10b94c: 55 push %ebp 10b94d: 89 e5 mov %esp,%ebp 10b94f: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10b952: 8d 45 f4 lea -0xc(%ebp),%eax 10b955: 50 push %eax 10b956: ff 75 08 pushl 0x8(%ebp) 10b959: e8 52 22 00 00 call 10dbb0 <_Thread_Get> switch ( location ) { 10b95e: 83 c4 10 add $0x10,%esp 10b961: 8b 55 f4 mov -0xc(%ebp),%edx 10b964: 85 d2 test %edx,%edx 10b966: 75 37 jne 10b99f <_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 ); 10b968: 9c pushf 10b969: fa cli 10b96a: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10b96b: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10b972: 3b 05 18 74 12 00 cmp 0x127418,%eax 10b978: 74 2a je 10b9a4 <_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; 10b97a: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10b981: 52 push %edx 10b982: 9d popf 10b983: 83 ec 08 sub $0x8,%esp 10b986: 68 f8 ff 03 10 push $0x1003fff8 10b98b: 50 push %eax 10b98c: e8 53 1e 00 00 call 10d7e4 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b991: a1 58 73 12 00 mov 0x127358,%eax 10b996: 48 dec %eax 10b997: a3 58 73 12 00 mov %eax,0x127358 10b99c: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b99f: c9 leave 10b9a0: c3 ret 10b9a1: 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 ) 10b9a4: 8b 0d 60 76 12 00 mov 0x127660,%ecx 10b9aa: 49 dec %ecx 10b9ab: 75 cd jne 10b97a <_Event_Timeout+0x2e> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10b9ad: c7 05 60 76 12 00 02 movl $0x2,0x127660 10b9b4: 00 00 00 10b9b7: eb c1 jmp 10b97a <_Event_Timeout+0x2e> =============================================================================== 00100248 <_Extension_Manager_initialization>: #include #include #include void _Extension_Manager_initialization(void) { 100248: 55 push %ebp 100249: 89 e5 mov %esp,%ebp } 10024b: c9 leave 10024c: c3 ret =============================================================================== 00111928 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 111928: 55 push %ebp 111929: 89 e5 mov %esp,%ebp 11192b: 57 push %edi 11192c: 56 push %esi 11192d: 53 push %ebx 11192e: 83 ec 2c sub $0x2c,%esp 111931: 8b 7d 0c mov 0xc(%ebp),%edi return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 111934: 8b 45 08 mov 0x8(%ebp),%eax 111937: 8b 48 08 mov 0x8(%eax),%ecx Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; 11193a: 8b 50 10 mov 0x10(%eax),%edx 11193d: 89 55 d4 mov %edx,-0x2c(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 111940: 89 f8 mov %edi,%eax 111942: 83 c0 04 add $0x4,%eax 111945: 89 45 e0 mov %eax,-0x20(%ebp) 111948: 0f 82 5a 01 00 00 jb 111aa8 <_Heap_Allocate_aligned_with_boundary+0x180> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 11194e: 8b 75 14 mov 0x14(%ebp),%esi 111951: 85 f6 test %esi,%esi 111953: 0f 85 48 01 00 00 jne 111aa1 <_Heap_Allocate_aligned_with_boundary+0x179> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 111959: 39 4d 08 cmp %ecx,0x8(%ebp) 11195c: 0f 84 50 01 00 00 je 111ab2 <_Heap_Allocate_aligned_with_boundary+0x18a> 111962: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 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 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 111969: 8b 55 d4 mov -0x2c(%ebp),%edx 11196c: 83 c2 07 add $0x7,%edx 11196f: 89 55 c8 mov %edx,-0x38(%ebp) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 111972: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp) 111979: 29 7d d8 sub %edi,-0x28(%ebp) 11197c: eb 19 jmp 111997 <_Heap_Allocate_aligned_with_boundary+0x6f> 11197e: 66 90 xchg %ax,%ax RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 111980: 8d 59 08 lea 0x8(%ecx),%ebx boundary ); } } if ( alloc_begin != 0 ) { 111983: 85 db test %ebx,%ebx 111985: 0f 85 e9 00 00 00 jne 111a74 <_Heap_Allocate_aligned_with_boundary+0x14c><== ALWAYS TAKEN break; } block = block->next; 11198b: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 11198e: 39 4d 08 cmp %ecx,0x8(%ebp) 111991: 0f 84 25 01 00 00 je 111abc <_Heap_Allocate_aligned_with_boundary+0x194> _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 111997: ff 45 e4 incl -0x1c(%ebp) /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 11199a: 8b 59 04 mov 0x4(%ecx),%ebx 11199d: 39 5d e0 cmp %ebx,-0x20(%ebp) 1119a0: 73 e9 jae 11198b <_Heap_Allocate_aligned_with_boundary+0x63> if ( alignment == 0 ) { 1119a2: 8b 55 10 mov 0x10(%ebp),%edx 1119a5: 85 d2 test %edx,%edx 1119a7: 74 d7 je 111980 <_Heap_Allocate_aligned_with_boundary+0x58> uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 1119a9: 8b 45 08 mov 0x8(%ebp),%eax 1119ac: 8b 40 14 mov 0x14(%eax),%eax 1119af: 89 45 d0 mov %eax,-0x30(%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; 1119b2: 83 e3 fe and $0xfffffffe,%ebx 1119b5: 8d 1c 19 lea (%ecx,%ebx,1),%ebx 1119b8: 8d 51 08 lea 0x8(%ecx),%edx 1119bb: 89 55 cc mov %edx,-0x34(%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; 1119be: 8b 75 c8 mov -0x38(%ebp),%esi 1119c1: 29 c6 sub %eax,%esi 1119c3: 01 de add %ebx,%esi uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 1119c5: 03 5d d8 add -0x28(%ebp),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 1119c8: 89 d8 mov %ebx,%eax 1119ca: 31 d2 xor %edx,%edx 1119cc: f7 75 10 divl 0x10(%ebp) 1119cf: 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 ) { 1119d1: 39 de cmp %ebx,%esi 1119d3: 73 0b jae 1119e0 <_Heap_Allocate_aligned_with_boundary+0xb8> 1119d5: 89 f0 mov %esi,%eax 1119d7: 31 d2 xor %edx,%edx 1119d9: f7 75 10 divl 0x10(%ebp) 1119dc: 89 f3 mov %esi,%ebx 1119de: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 1119e0: 8b 45 14 mov 0x14(%ebp),%eax 1119e3: 85 c0 test %eax,%eax 1119e5: 74 59 je 111a40 <_Heap_Allocate_aligned_with_boundary+0x118> /* 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; 1119e7: 8d 34 3b lea (%ebx,%edi,1),%esi 1119ea: 89 f0 mov %esi,%eax 1119ec: 31 d2 xor %edx,%edx 1119ee: f7 75 14 divl 0x14(%ebp) 1119f1: 89 f0 mov %esi,%eax 1119f3: 29 d0 sub %edx,%eax 1119f5: 89 c2 mov %eax,%edx /* 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 ) { 1119f7: 39 c3 cmp %eax,%ebx 1119f9: 73 45 jae 111a40 <_Heap_Allocate_aligned_with_boundary+0x118> 1119fb: 39 c6 cmp %eax,%esi 1119fd: 76 41 jbe 111a40 <_Heap_Allocate_aligned_with_boundary+0x118> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 1119ff: 8b 45 cc mov -0x34(%ebp),%eax 111a02: 01 f8 add %edi,%eax 111a04: 89 45 dc mov %eax,-0x24(%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 ) { 111a07: 39 d0 cmp %edx,%eax 111a09: 77 80 ja 11198b <_Heap_Allocate_aligned_with_boundary+0x63> 111a0b: 89 ce mov %ecx,%esi 111a0d: eb 0e jmp 111a1d <_Heap_Allocate_aligned_with_boundary+0xf5> 111a0f: 90 nop /* 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 ) { 111a10: 39 c1 cmp %eax,%ecx 111a12: 76 2a jbe 111a3e <_Heap_Allocate_aligned_with_boundary+0x116> if ( boundary_line < boundary_floor ) { 111a14: 39 55 dc cmp %edx,-0x24(%ebp) 111a17: 0f 87 a3 00 00 00 ja 111ac0 <_Heap_Allocate_aligned_with_boundary+0x198><== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; 111a1d: 89 d3 mov %edx,%ebx 111a1f: 29 fb sub %edi,%ebx 111a21: 89 d8 mov %ebx,%eax 111a23: 31 d2 xor %edx,%edx 111a25: f7 75 10 divl 0x10(%ebp) 111a28: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 111a2a: 8d 0c 3b lea (%ebx,%edi,1),%ecx 111a2d: 89 c8 mov %ecx,%eax 111a2f: 31 d2 xor %edx,%edx 111a31: f7 75 14 divl 0x14(%ebp) 111a34: 89 c8 mov %ecx,%eax 111a36: 29 d0 sub %edx,%eax 111a38: 89 c2 mov %eax,%edx /* 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 ) { 111a3a: 39 c3 cmp %eax,%ebx 111a3c: 72 d2 jb 111a10 <_Heap_Allocate_aligned_with_boundary+0xe8> 111a3e: 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 ) { 111a40: 39 5d cc cmp %ebx,-0x34(%ebp) 111a43: 0f 87 42 ff ff ff ja 11198b <_Heap_Allocate_aligned_with_boundary+0x63> 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; 111a49: be f8 ff ff ff mov $0xfffffff8,%esi 111a4e: 29 ce sub %ecx,%esi 111a50: 01 de add %ebx,%esi 111a52: 89 d8 mov %ebx,%eax 111a54: 31 d2 xor %edx,%edx 111a56: f7 75 d4 divl -0x2c(%ebp) 111a59: 29 d6 sub %edx,%esi if ( free_size >= min_block_size || free_size == 0 ) { 111a5b: 39 75 d0 cmp %esi,-0x30(%ebp) 111a5e: 0f 86 1f ff ff ff jbe 111983 <_Heap_Allocate_aligned_with_boundary+0x5b> 111a64: 85 f6 test %esi,%esi 111a66: 0f 85 1f ff ff ff jne 11198b <_Heap_Allocate_aligned_with_boundary+0x63> boundary ); } } if ( alloc_begin != 0 ) { 111a6c: 85 db test %ebx,%ebx 111a6e: 0f 84 17 ff ff ff je 11198b <_Heap_Allocate_aligned_with_boundary+0x63><== NEVER TAKEN block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 111a74: 8b 55 e4 mov -0x1c(%ebp),%edx 111a77: 8b 45 08 mov 0x8(%ebp),%eax 111a7a: 01 50 4c add %edx,0x4c(%eax) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 111a7d: 57 push %edi 111a7e: 53 push %ebx 111a7f: 51 push %ecx 111a80: 50 push %eax 111a81: e8 86 b2 ff ff call 10cd0c <_Heap_Block_allocate> 111a86: 89 d8 mov %ebx,%eax 111a88: 83 c4 10 add $0x10,%esp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 111a8b: 8b 4d e4 mov -0x1c(%ebp),%ecx 111a8e: 8b 55 08 mov 0x8(%ebp),%edx 111a91: 39 4a 44 cmp %ecx,0x44(%edx) 111a94: 73 14 jae 111aaa <_Heap_Allocate_aligned_with_boundary+0x182> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 111a96: 89 4a 44 mov %ecx,0x44(%edx) } return (void *) alloc_begin; } 111a99: 8d 65 f4 lea -0xc(%ebp),%esp 111a9c: 5b pop %ebx 111a9d: 5e pop %esi 111a9e: 5f pop %edi 111a9f: c9 leave 111aa0: c3 ret /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 111aa1: 3b 7d 14 cmp 0x14(%ebp),%edi 111aa4: 76 21 jbe 111ac7 <_Heap_Allocate_aligned_with_boundary+0x19f> 111aa6: 66 90 xchg %ax,%ax ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 111aa8: 31 c0 xor %eax,%eax } return (void *) alloc_begin; } 111aaa: 8d 65 f4 lea -0xc(%ebp),%esp 111aad: 5b pop %ebx 111aae: 5e pop %esi 111aaf: 5f pop %edi 111ab0: c9 leave 111ab1: c3 ret if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 111ab2: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 111ab9: 8d 76 00 lea 0x0(%esi),%esi 111abc: 31 c0 xor %eax,%eax 111abe: eb cb jmp 111a8b <_Heap_Allocate_aligned_with_boundary+0x163> 111ac0: 89 f1 mov %esi,%ecx <== NOT EXECUTED 111ac2: e9 c4 fe ff ff jmp 11198b <_Heap_Allocate_aligned_with_boundary+0x63><== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 111ac7: 8b 5d 10 mov 0x10(%ebp),%ebx 111aca: 85 db test %ebx,%ebx 111acc: 0f 85 87 fe ff ff jne 111959 <_Heap_Allocate_aligned_with_boundary+0x31> 111ad2: 89 55 10 mov %edx,0x10(%ebp) 111ad5: e9 7f fe ff ff jmp 111959 <_Heap_Allocate_aligned_with_boundary+0x31> =============================================================================== 0010cd0c <_Heap_Block_allocate>: Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 10cd0c: 55 push %ebp 10cd0d: 89 e5 mov %esp,%ebp 10cd0f: 57 push %edi 10cd10: 56 push %esi 10cd11: 53 push %ebx 10cd12: 83 ec 10 sub $0x10,%esp 10cd15: 8b 75 08 mov 0x8(%ebp),%esi 10cd18: 8b 5d 0c mov 0xc(%ebp),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10cd1b: 89 5d ec mov %ebx,-0x14(%ebp) 10cd1e: 8b 7d 10 mov 0x10(%ebp),%edi 10cd21: 83 ef 08 sub $0x8,%edi Heap_Statistics *const stats = &heap->stats; uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin; 10cd24: 89 f8 mov %edi,%eax 10cd26: 29 d8 sub %ebx,%eax Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 10cd28: 8b 53 04 mov 0x4(%ebx),%edx 10cd2b: 83 e2 fe and $0xfffffffe,%edx 10cd2e: f6 44 13 04 01 testb $0x1,0x4(%ebx,%edx,1) 10cd33: 0f 85 8b 00 00 00 jne 10cdc4 <_Heap_Block_allocate+0xb8> free_list_anchor = block->prev; 10cd39: 8b 4b 0c mov 0xc(%ebx),%ecx return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 10cd3c: 8b 53 08 mov 0x8(%ebx),%edx Heap_Block *prev = block->prev; prev->next = next; 10cd3f: 89 51 08 mov %edx,0x8(%ecx) next->prev = prev; 10cd42: 89 4a 0c mov %ecx,0xc(%edx) _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 10cd45: ff 4e 38 decl 0x38(%esi) ++stats->used_blocks; 10cd48: ff 46 40 incl 0x40(%esi) stats->free_size -= _Heap_Block_size( block ); 10cd4b: 8b 53 04 mov 0x4(%ebx),%edx 10cd4e: 83 e2 fe and $0xfffffffe,%edx 10cd51: 29 56 30 sub %edx,0x30(%esi) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 10cd54: 8b 56 10 mov 0x10(%esi),%edx 10cd57: 89 55 e4 mov %edx,-0x1c(%ebp) 10cd5a: 39 d0 cmp %edx,%eax 10cd5c: 72 72 jb 10cdd0 <_Heap_Block_allocate+0xc4> - 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; 10cd5e: 8b 43 04 mov 0x4(%ebx),%eax 10cd61: 89 45 f0 mov %eax,-0x10(%ebp) 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 ) 10cd64: 8b 45 10 mov 0x10(%ebp),%eax 10cd67: 31 d2 xor %edx,%edx 10cd69: f7 75 e4 divl -0x1c(%ebp) 10cd6c: 29 d7 sub %edx,%edi _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); uintptr_t const new_block_begin = (uintptr_t) new_block; uintptr_t const new_block_size = block_end - new_block_begin; block_end = new_block_begin; block_size = block_end - block_begin; 10cd6e: 89 f8 mov %edi,%eax 10cd70: 29 d8 sub %ebx,%eax _HAssert( block_size >= heap->min_block_size ); _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; 10cd72: 01 46 30 add %eax,0x30(%esi) if ( _Heap_Is_prev_used( block ) ) { 10cd75: f6 43 04 01 testb $0x1,0x4(%ebx) 10cd79: 75 69 jne 10cde4 <_Heap_Block_allocate+0xd8> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); 10cd7b: 2b 1b sub (%ebx),%ebx Heap_Block *const prev_block = _Heap_Prev_block( block ); uintptr_t const prev_block_size = _Heap_Block_size( prev_block ); block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; 10cd7d: 8b 53 04 mov 0x4(%ebx),%edx 10cd80: 83 e2 fe and $0xfffffffe,%edx 10cd83: 01 d0 add %edx,%eax } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 10cd85: 89 c2 mov %eax,%edx 10cd87: 83 ca 01 or $0x1,%edx 10cd8a: 89 53 04 mov %edx,0x4(%ebx) new_block->prev_size = block_size; 10cd8d: 89 07 mov %eax,(%edi) new_block->size_and_flag = new_block_size; 10cd8f: 8b 45 f0 mov -0x10(%ebp),%eax 10cd92: 83 e0 fe and $0xfffffffe,%eax 10cd95: 03 45 ec add -0x14(%ebp),%eax 10cd98: 29 f8 sub %edi,%eax 10cd9a: 89 47 04 mov %eax,0x4(%edi) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 10cd9d: ff 75 14 pushl 0x14(%ebp) 10cda0: 51 push %ecx 10cda1: 57 push %edi 10cda2: 56 push %esi 10cda3: e8 80 fe ff ff call 10cc28 <_Heap_Block_split> 10cda8: 89 fb mov %edi,%ebx 10cdaa: 83 c4 10 add $0x10,%esp alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 10cdad: 8b 46 30 mov 0x30(%esi),%eax Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 10cdb0: 39 46 34 cmp %eax,0x34(%esi) 10cdb3: 76 03 jbe 10cdb8 <_Heap_Block_allocate+0xac> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 10cdb5: 89 46 34 mov %eax,0x34(%esi) } return block; } 10cdb8: 89 d8 mov %ebx,%eax 10cdba: 8d 65 f4 lea -0xc(%ebp),%esp 10cdbd: 5b pop %ebx 10cdbe: 5e pop %esi 10cdbf: 5f pop %edi 10cdc0: c9 leave 10cdc1: c3 ret 10cdc2: 66 90 xchg %ax,%ax /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); 10cdc4: 89 f1 mov %esi,%ecx } if ( alloc_area_offset < heap->page_size ) { 10cdc6: 8b 56 10 mov 0x10(%esi),%edx 10cdc9: 89 55 e4 mov %edx,-0x1c(%ebp) 10cdcc: 39 d0 cmp %edx,%eax 10cdce: 73 8e jae 10cd5e <_Heap_Block_allocate+0x52> Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); 10cdd0: 03 45 14 add 0x14(%ebp),%eax 10cdd3: 50 push %eax 10cdd4: 51 push %ecx 10cdd5: 53 push %ebx 10cdd6: 56 push %esi 10cdd7: e8 4c fe ff ff call 10cc28 <_Heap_Block_split> 10cddc: 83 c4 10 add $0x10,%esp 10cddf: eb cc jmp 10cdad <_Heap_Block_allocate+0xa1> 10cde1: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10cde4: 8b 51 08 mov 0x8(%ecx),%edx new_block->next = next; 10cde7: 89 53 08 mov %edx,0x8(%ebx) new_block->prev = block_before; 10cdea: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10cded: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10cdf0: 89 5a 0c mov %ebx,0xc(%edx) _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 10cdf3: ff 46 38 incl 0x38(%esi) 10cdf6: 89 d9 mov %ebx,%ecx 10cdf8: eb 8b jmp 10cd85 <_Heap_Block_allocate+0x79> =============================================================================== 0010cc28 <_Heap_Block_split>: Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 10cc28: 55 push %ebp 10cc29: 89 e5 mov %esp,%ebp 10cc2b: 57 push %edi 10cc2c: 56 push %esi 10cc2d: 53 push %ebx 10cc2e: 83 ec 14 sub $0x14,%esp 10cc31: 8b 4d 08 mov 0x8(%ebp),%ecx 10cc34: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; 10cc37: 8b 79 10 mov 0x10(%ecx),%edi uintptr_t const min_block_size = heap->min_block_size; 10cc3a: 8b 41 14 mov 0x14(%ecx),%eax 10cc3d: 89 45 e8 mov %eax,-0x18(%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; 10cc40: 8b 43 04 mov 0x4(%ebx),%eax 10cc43: 89 45 e4 mov %eax,-0x1c(%ebp) 10cc46: 89 c6 mov %eax,%esi 10cc48: 83 e6 fe and $0xfffffffe,%esi uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const used_size = _Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE; 10cc4b: 8b 55 e8 mov -0x18(%ebp),%edx 10cc4e: 83 ea 08 sub $0x8,%edx 10cc51: 8b 45 14 mov 0x14(%ebp),%eax 10cc54: 39 d0 cmp %edx,%eax 10cc56: 73 02 jae 10cc5a <_Heap_Block_split+0x32> 10cc58: 89 d0 mov %edx,%eax 10cc5a: 83 c0 08 add $0x8,%eax 10cc5d: 89 45 f0 mov %eax,-0x10(%ebp) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10cc60: 31 d2 xor %edx,%edx 10cc62: f7 f7 div %edi if ( remainder != 0 ) { 10cc64: 85 d2 test %edx,%edx 10cc66: 75 70 jne 10ccd8 <_Heap_Block_split+0xb0> 10cc68: 8b 7d f0 mov -0x10(%ebp),%edi 10cc6b: 89 7d ec mov %edi,-0x14(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10cc6e: 8d 04 33 lea (%ebx,%esi,1),%eax 10cc71: 89 45 e0 mov %eax,-0x20(%ebp) Heap_Block *next_block = _Heap_Block_at( block, block_size ); _HAssert( used_size <= block_size + HEAP_BLOCK_SIZE_OFFSET ); _HAssert( used_size + free_size == block_size + HEAP_BLOCK_SIZE_OFFSET ); if ( free_size >= free_size_limit ) { 10cc74: 8d 56 04 lea 0x4(%esi),%edx 10cc77: 2b 55 f0 sub -0x10(%ebp),%edx 10cc7a: 8b 7d e8 mov -0x18(%ebp),%edi 10cc7d: 83 c7 04 add $0x4,%edi 10cc80: 39 fa cmp %edi,%edx 10cc82: 72 60 jb 10cce4 <_Heap_Block_split+0xbc> 10cc84: 8b 55 ec mov -0x14(%ebp),%edx 10cc87: 01 da add %ebx,%edx Heap_Block *const free_block = _Heap_Block_at( block, used_block_size ); uintptr_t free_block_size = block_size - used_block_size; 10cc89: 2b 75 ec sub -0x14(%ebp),%esi uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 10cc8c: 8b 7d e4 mov -0x1c(%ebp),%edi 10cc8f: 83 e7 01 and $0x1,%edi 10cc92: 0b 7d ec or -0x14(%ebp),%edi 10cc95: 89 7b 04 mov %edi,0x4(%ebx) _HAssert( used_block_size + free_block_size == block_size ); _Heap_Block_set_size( block, used_block_size ); /* Statistics */ stats->free_size += free_block_size; 10cc98: 01 71 30 add %esi,0x30(%ecx) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10cc9b: 8b 58 04 mov 0x4(%eax),%ebx 10cc9e: 83 e3 fe and $0xfffffffe,%ebx if ( _Heap_Is_used( next_block ) ) { 10cca1: f6 44 18 04 01 testb $0x1,0x4(%eax,%ebx,1) 10cca6: 75 4c jne 10ccf4 <_Heap_Block_split+0xcc> RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 10cca8: 8b 48 08 mov 0x8(%eax),%ecx Heap_Block *prev = old_block->prev; 10ccab: 8b 40 0c mov 0xc(%eax),%eax new_block->next = next; 10ccae: 89 4a 08 mov %ecx,0x8(%edx) new_block->prev = prev; 10ccb1: 89 42 0c mov %eax,0xc(%edx) next->prev = new_block; 10ccb4: 89 51 0c mov %edx,0xc(%ecx) prev->next = new_block; 10ccb7: 89 50 08 mov %edx,0x8(%eax) } else { uintptr_t const next_block_size = _Heap_Block_size( next_block ); _Heap_Free_list_replace( next_block, free_block ); free_block_size += next_block_size; 10ccba: 01 de add %ebx,%esi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10ccbc: 8d 04 16 lea (%esi,%edx,1),%eax next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; 10ccbf: 89 f1 mov %esi,%ecx 10ccc1: 83 c9 01 or $0x1,%ecx 10ccc4: 89 4a 04 mov %ecx,0x4(%edx) next_block->prev_size = free_block_size; 10ccc7: 89 30 mov %esi,(%eax) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10ccc9: 83 60 04 fe andl $0xfffffffe,0x4(%eax) } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; } } 10cccd: 83 c4 14 add $0x14,%esp 10ccd0: 5b pop %ebx 10ccd1: 5e pop %esi 10ccd2: 5f pop %edi 10ccd3: c9 leave 10ccd4: c3 ret 10ccd5: 8d 76 00 lea 0x0(%esi),%esi ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; 10ccd8: 03 7d f0 add -0x10(%ebp),%edi 10ccdb: 29 d7 sub %edx,%edi 10ccdd: 89 7d ec mov %edi,-0x14(%ebp) 10cce0: eb 8c jmp 10cc6e <_Heap_Block_split+0x46> 10cce2: 66 90 xchg %ax,%ax free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 10cce4: 8b 45 e0 mov -0x20(%ebp),%eax 10cce7: 83 48 04 01 orl $0x1,0x4(%eax) } } 10cceb: 83 c4 14 add $0x14,%esp 10ccee: 5b pop %ebx 10ccef: 5e pop %esi 10ccf0: 5f pop %edi 10ccf1: c9 leave 10ccf2: c3 ret 10ccf3: 90 nop RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10ccf4: 8b 7d 10 mov 0x10(%ebp),%edi 10ccf7: 8b 5f 08 mov 0x8(%edi),%ebx new_block->next = next; 10ccfa: 89 5a 08 mov %ebx,0x8(%edx) new_block->prev = block_before; 10ccfd: 89 7a 0c mov %edi,0xc(%edx) block_before->next = new_block; 10cd00: 89 57 08 mov %edx,0x8(%edi) next->prev = new_block; 10cd03: 89 53 0c mov %edx,0xc(%ebx) if ( _Heap_Is_used( next_block ) ) { _Heap_Free_list_insert_after( free_list_anchor, free_block ); /* Statistics */ ++stats->free_blocks; 10cd06: ff 41 38 incl 0x38(%ecx) 10cd09: eb b4 jmp 10ccbf <_Heap_Block_split+0x97> =============================================================================== 00115290 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 115290: 55 push %ebp 115291: 89 e5 mov %esp,%ebp 115293: 56 push %esi 115294: 53 push %ebx 115295: 8b 4d 08 mov 0x8(%ebp),%ecx 115298: 8b 45 0c mov 0xc(%ebp),%eax Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; 11529b: 8b 51 1c mov 0x1c(%ecx),%edx uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block; 11529e: 8b 59 24 mov 0x24(%ecx),%ebx uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; 1152a1: 3b 41 18 cmp 0x18(%ecx),%eax 1152a4: 73 3a jae 1152e0 <_Heap_Extend+0x50> * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 1152a6: 39 d0 cmp %edx,%eax 1152a8: 74 0e je 1152b8 <_Heap_Extend+0x28> 1152aa: b8 02 00 00 00 mov $0x2,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 1152af: 8d 65 f8 lea -0x8(%ebp),%esp 1152b2: 5b pop %ebx 1152b3: 5e pop %esi 1152b4: c9 leave 1152b5: c3 ret 1152b6: 66 90 xchg %ax,%ax { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; 1152b8: 03 45 10 add 0x10(%ebp),%eax * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ heap->area_end = new_heap_area_end; 1152bb: 89 41 1c mov %eax,0x1c(%ecx) extend_size = new_heap_area_end 1152be: 29 d8 sub %ebx,%eax 1152c0: 8d 70 f8 lea -0x8(%eax),%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 1152c3: 89 f0 mov %esi,%eax 1152c5: 31 d2 xor %edx,%edx 1152c7: f7 71 10 divl 0x10(%ecx) 1152ca: 29 d6 sub %edx,%esi - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; 1152cc: 8b 45 14 mov 0x14(%ebp),%eax 1152cf: 89 30 mov %esi,(%eax) if( extend_size >= heap->min_block_size ) { 1152d1: 39 71 14 cmp %esi,0x14(%ecx) 1152d4: 76 1a jbe 1152f0 <_Heap_Extend+0x60> <== ALWAYS TAKEN 1152d6: 31 c0 xor %eax,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 1152d8: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 1152db: 5b pop %ebx <== NOT EXECUTED 1152dc: 5e pop %esi <== NOT EXECUTED 1152dd: c9 leave <== NOT EXECUTED 1152de: c3 ret <== NOT EXECUTED 1152df: 90 nop <== NOT EXECUTED * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { 1152e0: 39 d0 cmp %edx,%eax 1152e2: 73 c2 jae 1152a6 <_Heap_Extend+0x16> 1152e4: b8 01 00 00 00 mov $0x1,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 1152e9: 8d 65 f8 lea -0x8(%ebp),%esp 1152ec: 5b pop %ebx 1152ed: 5e pop %esi 1152ee: c9 leave 1152ef: c3 ret RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 1152f0: 8d 14 1e lea (%esi,%ebx,1),%edx uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 1152f3: 8b 43 04 mov 0x4(%ebx),%eax 1152f6: 83 e0 01 and $0x1,%eax 1152f9: 09 f0 or %esi,%eax 1152fb: 89 43 04 mov %eax,0x4(%ebx) if( extend_size >= heap->min_block_size ) { Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 1152fe: 8b 41 20 mov 0x20(%ecx),%eax 115301: 29 d0 sub %edx,%eax 115303: 83 c8 01 or $0x1,%eax 115306: 89 42 04 mov %eax,0x4(%edx) ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 115309: 89 51 24 mov %edx,0x24(%ecx) /* Statistics */ stats->size += extend_size; 11530c: 01 71 2c add %esi,0x2c(%ecx) ++stats->used_blocks; 11530f: ff 41 40 incl 0x40(%ecx) --stats->frees; /* Do not count subsequent call as actual free() */ 115312: ff 49 50 decl 0x50(%ecx) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 115315: 83 ec 08 sub $0x8,%esp 115318: 83 c3 08 add $0x8,%ebx 11531b: 53 push %ebx 11531c: 51 push %ecx 11531d: e8 ce a7 ff ff call 10faf0 <_Heap_Free> 115322: 31 c0 xor %eax,%eax 115324: 83 c4 10 add $0x10,%esp } return HEAP_EXTEND_SUCCESSFUL; } 115327: 8d 65 f8 lea -0x8(%ebp),%esp 11532a: 5b pop %ebx 11532b: 5e pop %esi 11532c: c9 leave 11532d: c3 ret =============================================================================== 00111adc <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 111adc: 55 push %ebp 111add: 89 e5 mov %esp,%ebp 111adf: 57 push %edi 111ae0: 56 push %esi 111ae1: 53 push %ebx 111ae2: 83 ec 18 sub $0x18,%esp 111ae5: 8b 5d 08 mov 0x8(%ebp),%ebx 111ae8: 8b 45 0c mov 0xc(%ebp),%eax 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 ) 111aeb: 8d 48 f8 lea -0x8(%eax),%ecx 111aee: 31 d2 xor %edx,%edx 111af0: f7 73 10 divl 0x10(%ebx) 111af3: 29 d1 sub %edx,%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; 111af5: 8b 43 20 mov 0x20(%ebx),%eax 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 111af8: 39 c1 cmp %eax,%ecx 111afa: 72 07 jb 111b03 <_Heap_Free+0x27> && (uintptr_t) block <= (uintptr_t) heap->last_block; 111afc: 8b 73 24 mov 0x24(%ebx),%esi 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 111aff: 39 f1 cmp %esi,%ecx 111b01: 76 0d jbe 111b10 <_Heap_Free+0x34> /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 111b03: 31 c0 xor %eax,%eax } 111b05: 83 c4 18 add $0x18,%esp 111b08: 5b pop %ebx 111b09: 5e pop %esi 111b0a: 5f pop %edi 111b0b: c9 leave 111b0c: c3 ret 111b0d: 8d 76 00 lea 0x0(%esi),%esi - 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; 111b10: 8b 51 04 mov 0x4(%ecx),%edx 111b13: 89 55 f0 mov %edx,-0x10(%ebp) 111b16: 83 e2 fe and $0xfffffffe,%edx 111b19: 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); 111b1c: 01 ca add %ecx,%edx 111b1e: 89 55 dc mov %edx,-0x24(%ebp) 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 111b21: 39 d0 cmp %edx,%eax 111b23: 77 de ja 111b03 <_Heap_Free+0x27> <== NEVER TAKEN 111b25: 39 d6 cmp %edx,%esi 111b27: 72 da jb 111b03 <_Heap_Free+0x27> <== NEVER TAKEN 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; 111b29: 8b 7a 04 mov 0x4(%edx),%edi if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 111b2c: f7 c7 01 00 00 00 test $0x1,%edi 111b32: 74 cf je 111b03 <_Heap_Free+0x27> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 111b34: 83 e7 fe and $0xfffffffe,%edi 111b37: 89 7d e8 mov %edi,-0x18(%ebp) _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 111b3a: 39 d6 cmp %edx,%esi 111b3c: 0f 84 e2 00 00 00 je 111c24 <_Heap_Free+0x148> #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 111b42: 8b 55 dc mov -0x24(%ebp),%edx 111b45: 8b 7d e8 mov -0x18(%ebp),%edi 111b48: 8b 7c 3a 04 mov 0x4(%edx,%edi,1),%edi 111b4c: 89 7d e0 mov %edi,-0x20(%ebp) 111b4f: 8a 55 e0 mov -0x20(%ebp),%dl 111b52: 83 e2 01 and $0x1,%edx 111b55: 88 55 e7 mov %dl,-0x19(%ebp) 111b58: 80 75 e7 01 xorb $0x1,-0x19(%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 ) ) { 111b5c: f6 45 f0 01 testb $0x1,-0x10(%ebp) 111b60: 75 46 jne 111ba8 <_Heap_Free+0xcc> uintptr_t const prev_size = block->prev_size; 111b62: 8b 39 mov (%ecx),%edi 111b64: 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); 111b67: 29 f9 sub %edi,%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 111b69: 39 c8 cmp %ecx,%eax 111b6b: 77 96 ja 111b03 <_Heap_Free+0x27> <== NEVER TAKEN 111b6d: 39 ce cmp %ecx,%esi 111b6f: 72 92 jb 111b03 <_Heap_Free+0x27> <== NEVER TAKEN return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { 111b71: f6 41 04 01 testb $0x1,0x4(%ecx) 111b75: 74 8c je 111b03 <_Heap_Free+0x27> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 111b77: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 111b7b: 0f 84 af 00 00 00 je 111c30 <_Heap_Free+0x154> uintptr_t const size = block_size + prev_size + next_block_size; 111b81: 8b 45 ec mov -0x14(%ebp),%eax 111b84: 03 45 e8 add -0x18(%ebp),%eax 111b87: 01 f8 add %edi,%eax return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 111b89: 8b 55 dc mov -0x24(%ebp),%edx 111b8c: 8b 72 08 mov 0x8(%edx),%esi Heap_Block *prev = block->prev; 111b8f: 8b 52 0c mov 0xc(%edx),%edx prev->next = next; 111b92: 89 72 08 mov %esi,0x8(%edx) next->prev = prev; 111b95: 89 56 0c mov %edx,0xc(%esi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 111b98: ff 4b 38 decl 0x38(%ebx) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 111b9b: 89 c2 mov %eax,%edx 111b9d: 83 ca 01 or $0x1,%edx 111ba0: 89 51 04 mov %edx,0x4(%ecx) next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 111ba3: 89 04 01 mov %eax,(%ecx,%eax,1) 111ba6: eb 2c jmp 111bd4 <_Heap_Free+0xf8> 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 */ 111ba8: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 111bac: 74 3e je 111bec <_Heap_Free+0x110> uintptr_t const size = block_size + next_block_size; 111bae: 8b 7d e8 mov -0x18(%ebp),%edi 111bb1: 03 7d ec add -0x14(%ebp),%edi RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 111bb4: 8b 75 dc mov -0x24(%ebp),%esi 111bb7: 8b 46 08 mov 0x8(%esi),%eax Heap_Block *prev = old_block->prev; 111bba: 8b 56 0c mov 0xc(%esi),%edx new_block->next = next; 111bbd: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = prev; 111bc0: 89 51 0c mov %edx,0xc(%ecx) next->prev = new_block; 111bc3: 89 48 0c mov %ecx,0xc(%eax) prev->next = new_block; 111bc6: 89 4a 08 mov %ecx,0x8(%edx) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 111bc9: 89 f8 mov %edi,%eax 111bcb: 83 c8 01 or $0x1,%eax 111bce: 89 41 04 mov %eax,0x4(%ecx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 111bd1: 89 3c 39 mov %edi,(%ecx,%edi,1) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 111bd4: ff 4b 40 decl 0x40(%ebx) ++stats->frees; 111bd7: ff 43 50 incl 0x50(%ebx) stats->free_size += block_size; 111bda: 8b 55 ec mov -0x14(%ebp),%edx 111bdd: 01 53 30 add %edx,0x30(%ebx) 111be0: b0 01 mov $0x1,%al return( true ); } 111be2: 83 c4 18 add $0x18,%esp 111be5: 5b pop %ebx 111be6: 5e pop %esi 111be7: 5f pop %edi 111be8: c9 leave 111be9: c3 ret 111bea: 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; 111bec: 8b 43 08 mov 0x8(%ebx),%eax new_block->next = next; 111bef: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = block_before; 111bf2: 89 59 0c mov %ebx,0xc(%ecx) block_before->next = new_block; 111bf5: 89 4b 08 mov %ecx,0x8(%ebx) next->prev = new_block; 111bf8: 89 48 0c mov %ecx,0xc(%eax) next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 111bfb: 8b 45 ec mov -0x14(%ebp),%eax 111bfe: 83 c8 01 or $0x1,%eax 111c01: 89 41 04 mov %eax,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 111c04: 8b 7d dc mov -0x24(%ebp),%edi 111c07: 83 67 04 fe andl $0xfffffffe,0x4(%edi) next_block->prev_size = block_size; 111c0b: 8b 45 ec mov -0x14(%ebp),%eax 111c0e: 89 07 mov %eax,(%edi) /* Statistics */ ++stats->free_blocks; 111c10: 8b 43 38 mov 0x38(%ebx),%eax 111c13: 40 inc %eax 111c14: 89 43 38 mov %eax,0x38(%ebx) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 111c17: 3b 43 3c cmp 0x3c(%ebx),%eax 111c1a: 76 b8 jbe 111bd4 <_Heap_Free+0xf8> next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 111c1c: 89 43 3c mov %eax,0x3c(%ebx) 111c1f: eb b3 jmp 111bd4 <_Heap_Free+0xf8> 111c21: 8d 76 00 lea 0x0(%esi),%esi _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 111c24: c6 45 e7 00 movb $0x0,-0x19(%ebp) 111c28: e9 2f ff ff ff jmp 111b5c <_Heap_Free+0x80> 111c2d: 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; 111c30: 8b 45 ec mov -0x14(%ebp),%eax 111c33: 03 45 f0 add -0x10(%ebp),%eax prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 111c36: 89 c6 mov %eax,%esi 111c38: 83 ce 01 or $0x1,%esi 111c3b: 89 71 04 mov %esi,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 111c3e: 8b 55 dc mov -0x24(%ebp),%edx 111c41: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 111c45: 89 02 mov %eax,(%edx) 111c47: eb 8b jmp 111bd4 <_Heap_Free+0xf8> =============================================================================== 001312a8 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 1312a8: 55 push %ebp 1312a9: 89 e5 mov %esp,%ebp 1312ab: 57 push %edi 1312ac: 56 push %esi 1312ad: 53 push %ebx 1312ae: 8b 7d 08 mov 0x8(%ebp),%edi 1312b1: 8b 75 0c mov 0xc(%ebp),%esi Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 1312b4: c7 06 00 00 00 00 movl $0x0,(%esi) info->largest = 0; 1312ba: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) info->total = 0; 1312c1: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 1312c8: 8b 57 08 mov 0x8(%edi),%edx for(the_block = _Heap_Free_list_first(the_heap); 1312cb: 39 d7 cmp %edx,%edi 1312cd: 74 2a je 1312f9 <_Heap_Get_free_information+0x51><== NEVER TAKEN 1312cf: bb 01 00 00 00 mov $0x1,%ebx 1312d4: 31 c9 xor %ecx,%ecx 1312d6: eb 02 jmp 1312da <_Heap_Get_free_information+0x32> 1312d8: 89 c3 mov %eax,%ebx - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 1312da: 8b 42 04 mov 0x4(%edx),%eax 1312dd: 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; 1312e0: 01 c1 add %eax,%ecx if ( info->largest < the_size ) 1312e2: 39 46 04 cmp %eax,0x4(%esi) 1312e5: 73 03 jae 1312ea <_Heap_Get_free_information+0x42> info->largest = the_size; 1312e7: 89 46 04 mov %eax,0x4(%esi) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 1312ea: 8b 52 08 mov 0x8(%edx),%edx 1312ed: 8d 43 01 lea 0x1(%ebx),%eax info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 1312f0: 39 d7 cmp %edx,%edi 1312f2: 75 e4 jne 1312d8 <_Heap_Get_free_information+0x30> 1312f4: 89 1e mov %ebx,(%esi) 1312f6: 89 4e 08 mov %ecx,0x8(%esi) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 1312f9: 5b pop %ebx 1312fa: 5e pop %esi 1312fb: 5f pop %edi 1312fc: c9 leave 1312fd: c3 ret =============================================================================== 00143d74 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 143d74: 55 push %ebp 143d75: 89 e5 mov %esp,%ebp 143d77: 57 push %edi 143d78: 56 push %esi 143d79: 53 push %ebx 143d7a: 83 ec 04 sub $0x4,%esp 143d7d: 8b 45 08 mov 0x8(%ebp),%eax 143d80: 8b 75 0c mov 0xc(%ebp),%esi Heap_Block *the_block = the_heap->first_block; 143d83: 8b 58 20 mov 0x20(%eax),%ebx Heap_Block *const end = the_heap->last_block; 143d86: 8b 78 24 mov 0x24(%eax),%edi _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 143d89: c7 06 00 00 00 00 movl $0x0,(%esi) the_info->Free.total = 0; 143d8f: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi) the_info->Free.largest = 0; 143d96: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) the_info->Used.number = 0; 143d9d: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) the_info->Used.total = 0; 143da4: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) the_info->Used.largest = 0; 143dab: c7 46 10 00 00 00 00 movl $0x0,0x10(%esi) while ( the_block != end ) { 143db2: 39 fb cmp %edi,%ebx 143db4: 74 45 je 143dfb <_Heap_Get_information+0x87><== NEVER TAKEN 143db6: 8b 4b 04 mov 0x4(%ebx),%ecx 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; 143db9: 8d 46 0c lea 0xc(%esi),%eax 143dbc: 89 45 f0 mov %eax,-0x10(%ebp) 143dbf: eb 16 jmp 143dd7 <_Heap_Get_information+0x63> 143dc1: 8d 76 00 lea 0x0(%esi),%esi 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) ) 143dc4: 89 f0 mov %esi,%eax info = &the_info->Used; else info = &the_info->Free; info->number++; 143dc6: ff 00 incl (%eax) info->total += the_size; 143dc8: 01 50 08 add %edx,0x8(%eax) if ( info->largest < the_size ) 143dcb: 39 50 04 cmp %edx,0x4(%eax) 143dce: 73 03 jae 143dd3 <_Heap_Get_information+0x5f> info->largest = the_size; 143dd0: 89 50 04 mov %edx,0x4(%eax) the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 143dd3: 39 df cmp %ebx,%edi 143dd5: 74 15 je 143dec <_Heap_Get_information+0x78> - 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; 143dd7: 89 ca mov %ecx,%edx 143dd9: 83 e2 fe and $0xfffffffe,%edx RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 143ddc: 01 d3 add %edx,%ebx 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; 143dde: 8b 4b 04 mov 0x4(%ebx),%ecx 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) ) 143de1: f6 c1 01 test $0x1,%cl 143de4: 74 de je 143dc4 <_Heap_Get_information+0x50> 143de6: 8b 45 f0 mov -0x10(%ebp),%eax 143de9: eb db jmp 143dc6 <_Heap_Get_information+0x52> 143deb: 90 nop the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 143dec: 8b 46 14 mov 0x14(%esi),%eax 143def: 83 c0 08 add $0x8,%eax /* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE; 143df2: 89 46 14 mov %eax,0x14(%esi) } 143df5: 58 pop %eax 143df6: 5b pop %ebx 143df7: 5e pop %esi 143df8: 5f pop %edi 143df9: c9 leave 143dfa: c3 ret the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 143dfb: b8 08 00 00 00 mov $0x8,%eax <== NOT EXECUTED 143e00: eb f0 jmp 143df2 <_Heap_Get_information+0x7e><== NOT EXECUTED =============================================================================== 0011f944 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 11f944: 55 push %ebp 11f945: 89 e5 mov %esp,%ebp 11f947: 57 push %edi 11f948: 56 push %esi 11f949: 53 push %ebx 11f94a: 83 ec 2c sub $0x2c,%esp 11f94d: 8b 5d 08 mov 0x8(%ebp),%ebx 11f950: 8b 75 0c mov 0xc(%ebp),%esi 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 ) 11f953: 8d 4e f8 lea -0x8(%esi),%ecx 11f956: 89 f0 mov %esi,%eax 11f958: 31 d2 xor %edx,%edx 11f95a: f7 73 10 divl 0x10(%ebx) 11f95d: 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; 11f95f: 8b 45 14 mov 0x14(%ebp),%eax 11f962: c7 00 00 00 00 00 movl $0x0,(%eax) *new_size = 0; 11f968: 8b 55 18 mov 0x18(%ebp),%edx 11f96b: c7 02 00 00 00 00 movl $0x0,(%edx) 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 11f971: 39 4b 20 cmp %ecx,0x20(%ebx) 11f974: 76 0e jbe 11f984 <_Heap_Resize_block+0x40> block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; /* Statistics */ ++stats->resizes; 11f976: b8 02 00 00 00 mov $0x2,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11f97b: 8d 65 f4 lea -0xc(%ebp),%esp 11f97e: 5b pop %ebx 11f97f: 5e pop %esi 11f980: 5f pop %edi 11f981: c9 leave 11f982: c3 ret 11f983: 90 nop 11f984: 39 4b 24 cmp %ecx,0x24(%ebx) 11f987: 72 ed jb 11f976 <_Heap_Resize_block+0x32> - 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; 11f989: 8b 41 04 mov 0x4(%ecx),%eax 11f98c: 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; 11f98f: 8d 3c 01 lea (%ecx,%eax,1),%edi 11f992: 89 7d d4 mov %edi,-0x2c(%ebp) uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 11f995: 89 fa mov %edi,%edx 11f997: 29 f2 sub %esi,%edx 11f999: 83 c2 04 add $0x4,%edx 11f99c: 89 55 dc mov %edx,-0x24(%ebp) 11f99f: 8b 57 04 mov 0x4(%edi),%edx 11f9a2: 83 e2 fe and $0xfffffffe,%edx 11f9a5: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 11f9a8: 8b 54 17 04 mov 0x4(%edi,%edx,1),%edx 11f9ac: 83 e2 01 and $0x1,%edx 11f9af: 89 55 e0 mov %edx,-0x20(%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; 11f9b2: 8b 55 dc mov -0x24(%ebp),%edx 11f9b5: 8b 7d 14 mov 0x14(%ebp),%edi 11f9b8: 89 17 mov %edx,(%edi) if ( next_block_is_free ) { 11f9ba: 8a 55 e0 mov -0x20(%ebp),%dl 11f9bd: 80 f2 01 xor $0x1,%dl 11f9c0: 88 55 e0 mov %dl,-0x20(%ebp) 11f9c3: 75 17 jne 11f9dc <_Heap_Resize_block+0x98> block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { 11f9c5: 8b 55 dc mov -0x24(%ebp),%edx 11f9c8: 39 55 10 cmp %edx,0x10(%ebp) 11f9cb: 76 20 jbe 11f9ed <_Heap_Resize_block+0xa9> 11f9cd: b8 01 00 00 00 mov $0x1,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11f9d2: 8d 65 f4 lea -0xc(%ebp),%esp 11f9d5: 5b pop %ebx 11f9d6: 5e pop %esi 11f9d7: 5f pop %edi 11f9d8: c9 leave 11f9d9: c3 ret 11f9da: 66 90 xchg %ax,%ax _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; if ( next_block_is_free ) { block_size += next_block_size; 11f9dc: 03 45 d0 add -0x30(%ebp),%eax alloc_size += next_block_size; 11f9df: 8b 7d d0 mov -0x30(%ebp),%edi 11f9e2: 01 7d dc add %edi,-0x24(%ebp) } if ( new_alloc_size > alloc_size ) { 11f9e5: 8b 55 dc mov -0x24(%ebp),%edx 11f9e8: 39 55 10 cmp %edx,0x10(%ebp) 11f9eb: 77 e0 ja 11f9cd <_Heap_Resize_block+0x89> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 11f9ed: 80 7d e0 00 cmpb $0x0,-0x20(%ebp) 11f9f1: 74 31 je 11fa24 <_Heap_Resize_block+0xe0> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 11f9f3: 8b 79 04 mov 0x4(%ecx),%edi 11f9f6: 83 e7 01 and $0x1,%edi 11f9f9: 09 c7 or %eax,%edi 11f9fb: 89 79 04 mov %edi,0x4(%ecx) return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 11f9fe: 8b 7d d4 mov -0x2c(%ebp),%edi 11fa01: 8b 7f 08 mov 0x8(%edi),%edi 11fa04: 89 7d e4 mov %edi,-0x1c(%ebp) Heap_Block *prev = block->prev; 11fa07: 8b 55 d4 mov -0x2c(%ebp),%edx 11fa0a: 8b 7a 0c mov 0xc(%edx),%edi prev->next = next; 11fa0d: 8b 55 e4 mov -0x1c(%ebp),%edx 11fa10: 89 57 08 mov %edx,0x8(%edi) next->prev = prev; 11fa13: 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; 11fa16: 83 4c 08 04 01 orl $0x1,0x4(%eax,%ecx,1) /* Statistics */ --stats->free_blocks; 11fa1b: ff 4b 38 decl 0x38(%ebx) stats->free_size -= next_block_size; 11fa1e: 8b 7d d0 mov -0x30(%ebp),%edi 11fa21: 29 7b 30 sub %edi,0x30(%ebx) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 11fa24: ff 75 10 pushl 0x10(%ebp) 11fa27: 56 push %esi 11fa28: 51 push %ecx 11fa29: 53 push %ebx 11fa2a: e8 dd d2 fe ff call 10cd0c <_Heap_Block_allocate> block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 11fa2f: 8b 50 04 mov 0x4(%eax),%edx 11fa32: 83 e2 fe and $0xfffffffe,%edx 11fa35: 29 f0 sub %esi,%eax 11fa37: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 11fa3b: 8b 55 18 mov 0x18(%ebp),%edx 11fa3e: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->resizes; 11fa40: ff 43 54 incl 0x54(%ebx) 11fa43: 31 c0 xor %eax,%eax 11fa45: 83 c4 10 add $0x10,%esp new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11fa48: 8d 65 f4 lea -0xc(%ebp),%esp 11fa4b: 5b pop %ebx 11fa4c: 5e pop %esi 11fa4d: 5f pop %edi 11fa4e: c9 leave 11fa4f: c3 ret =============================================================================== 0011fa50 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11fa50: 55 push %ebp 11fa51: 89 e5 mov %esp,%ebp 11fa53: 56 push %esi 11fa54: 53 push %ebx 11fa55: 8b 5d 08 mov 0x8(%ebp),%ebx 11fa58: 8b 75 0c mov 0xc(%ebp),%esi 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 ) 11fa5b: 8d 4e f8 lea -0x8(%esi),%ecx 11fa5e: 89 f0 mov %esi,%eax 11fa60: 31 d2 xor %edx,%edx 11fa62: f7 73 10 divl 0x10(%ebx) 11fa65: 29 d1 sub %edx,%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; 11fa67: 8b 43 20 mov 0x20(%ebx),%eax 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 11fa6a: 39 c1 cmp %eax,%ecx 11fa6c: 72 07 jb 11fa75 <_Heap_Size_of_alloc_area+0x25> && (uintptr_t) block <= (uintptr_t) heap->last_block; 11fa6e: 8b 53 24 mov 0x24(%ebx),%edx 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 11fa71: 39 d1 cmp %edx,%ecx 11fa73: 76 07 jbe 11fa7c <_Heap_Size_of_alloc_area+0x2c><== ALWAYS TAKEN return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; return true; 11fa75: 31 c0 xor %eax,%eax } 11fa77: 5b pop %ebx 11fa78: 5e pop %esi 11fa79: c9 leave 11fa7a: c3 ret 11fa7b: 90 nop RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11fa7c: 8b 59 04 mov 0x4(%ecx),%ebx 11fa7f: 83 e3 fe and $0xfffffffe,%ebx 11fa82: 01 d9 add %ebx,%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 11fa84: 39 c8 cmp %ecx,%eax 11fa86: 77 ed ja 11fa75 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN 11fa88: 39 ca cmp %ecx,%edx 11fa8a: 72 e9 jb 11fa75 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 11fa8c: f6 41 04 01 testb $0x1,0x4(%ecx) 11fa90: 74 e3 je 11fa75 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 11fa92: 29 f1 sub %esi,%ecx 11fa94: 8d 51 04 lea 0x4(%ecx),%edx 11fa97: 8b 45 10 mov 0x10(%ebp),%eax 11fa9a: 89 10 mov %edx,(%eax) 11fa9c: b0 01 mov $0x1,%al return true; } 11fa9e: 5b pop %ebx 11fa9f: 5e pop %esi 11faa0: c9 leave 11faa1: c3 ret =============================================================================== 0010d84c <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10d84c: 55 push %ebp 10d84d: 89 e5 mov %esp,%ebp 10d84f: 57 push %edi 10d850: 56 push %esi 10d851: 53 push %ebx 10d852: 83 ec 3c sub $0x3c,%esp 10d855: 8b 5d 08 mov 0x8(%ebp),%ebx uintptr_t const page_size = heap->page_size; 10d858: 8b 43 10 mov 0x10(%ebx),%eax 10d85b: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10d85e: 8b 53 14 mov 0x14(%ebx),%edx 10d861: 89 55 dc mov %edx,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10d864: 8b 43 24 mov 0x24(%ebx),%eax 10d867: 89 45 d8 mov %eax,-0x28(%ebp) Heap_Block *block = heap->first_block; 10d86a: 8b 73 20 mov 0x20(%ebx),%esi Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d86d: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10d871: 75 1d jne 10d890 <_Heap_Walk+0x44> 10d873: c7 45 e4 44 d8 10 00 movl $0x10d844,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d87a: 83 3d a0 a9 12 00 03 cmpl $0x3,0x12a9a0 10d881: 74 1d je 10d8a0 <_Heap_Walk+0x54> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10d883: b0 01 mov $0x1,%al block = next_block; } return true; } 10d885: 8d 65 f4 lea -0xc(%ebp),%esp 10d888: 5b pop %ebx 10d889: 5e pop %esi 10d88a: 5f pop %edi 10d88b: c9 leave 10d88c: c3 ret 10d88d: 8d 76 00 lea 0x0(%esi),%esi uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d890: c7 45 e4 14 dc 10 00 movl $0x10dc14,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d897: 83 3d a0 a9 12 00 03 cmpl $0x3,0x12a9a0 10d89e: 75 e3 jne 10d883 <_Heap_Walk+0x37> <== NEVER TAKEN 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)( 10d8a0: 52 push %edx 10d8a1: ff 73 0c pushl 0xc(%ebx) 10d8a4: ff 73 08 pushl 0x8(%ebx) 10d8a7: ff 75 d8 pushl -0x28(%ebp) 10d8aa: 56 push %esi 10d8ab: ff 73 1c pushl 0x1c(%ebx) 10d8ae: ff 73 18 pushl 0x18(%ebx) 10d8b1: ff 75 dc pushl -0x24(%ebp) 10d8b4: ff 75 e0 pushl -0x20(%ebp) 10d8b7: 68 f0 2a 12 00 push $0x122af0 10d8bc: 6a 00 push $0x0 10d8be: ff 75 0c pushl 0xc(%ebp) 10d8c1: ff 55 e4 call *-0x1c(%ebp) heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 10d8c4: 83 c4 30 add $0x30,%esp 10d8c7: 8b 45 e0 mov -0x20(%ebp),%eax 10d8ca: 85 c0 test %eax,%eax 10d8cc: 0f 84 b2 00 00 00 je 10d984 <_Heap_Walk+0x138> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10d8d2: f6 45 e0 03 testb $0x3,-0x20(%ebp) 10d8d6: 0f 85 b0 00 00 00 jne 10d98c <_Heap_Walk+0x140> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10d8dc: 8b 45 dc mov -0x24(%ebp),%eax 10d8df: 31 d2 xor %edx,%edx 10d8e1: f7 75 e0 divl -0x20(%ebp) 10d8e4: 85 d2 test %edx,%edx 10d8e6: 0f 85 ac 00 00 00 jne 10d998 <_Heap_Walk+0x14c> ); return false; } if ( 10d8ec: 8d 46 08 lea 0x8(%esi),%eax 10d8ef: 31 d2 xor %edx,%edx 10d8f1: f7 75 e0 divl -0x20(%ebp) 10d8f4: 85 d2 test %edx,%edx 10d8f6: 0f 85 a8 00 00 00 jne 10d9a4 <_Heap_Walk+0x158> 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; 10d8fc: 8b 56 04 mov 0x4(%esi),%edx 10d8ff: 89 55 cc mov %edx,-0x34(%ebp) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10d902: 83 e2 01 and $0x1,%edx 10d905: 0f 84 a1 00 00 00 je 10d9ac <_Heap_Walk+0x160> ); return false; } if ( first_block->prev_size != page_size ) { 10d90b: 8b 06 mov (%esi),%eax 10d90d: 39 45 e0 cmp %eax,-0x20(%ebp) 10d910: 75 4e jne 10d960 <_Heap_Walk+0x114> ); return false; } if ( _Heap_Is_free( last_block ) ) { 10d912: 8b 55 d8 mov -0x28(%ebp),%edx 10d915: 8b 42 04 mov 0x4(%edx),%eax 10d918: 83 e0 fe and $0xfffffffe,%eax 10d91b: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1) 10d920: 0f 84 bd 02 00 00 je 10dbe3 <_Heap_Walk+0x397> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10d926: 8b 43 10 mov 0x10(%ebx),%eax 10d929: 89 45 d4 mov %eax,-0x2c(%ebp) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10d92c: 8b 4b 08 mov 0x8(%ebx),%ecx const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 10d92f: 39 cb cmp %ecx,%ebx 10d931: 0f 84 09 01 00 00 je 10da40 <_Heap_Walk+0x1f4> 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; 10d937: 8b 7b 20 mov 0x20(%ebx),%edi 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 10d93a: 39 cf cmp %ecx,%edi 10d93c: 76 76 jbe 10d9b4 <_Heap_Walk+0x168> <== ALWAYS TAKEN 10d93e: 66 90 xchg %ax,%ax if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 10d940: 51 push %ecx 10d941: 68 38 2c 12 00 push $0x122c38 10d946: 66 90 xchg %ax,%ax return false; } if ( !prev_used ) { (*printer)( 10d948: 6a 01 push $0x1 10d94a: ff 75 0c pushl 0xc(%ebp) 10d94d: ff 55 e4 call *-0x1c(%ebp) 10d950: 31 c0 xor %eax,%eax 10d952: 83 c4 10 add $0x10,%esp block = next_block; } return true; } 10d955: 8d 65 f4 lea -0xc(%ebp),%esp 10d958: 5b pop %ebx 10d959: 5e pop %esi 10d95a: 5f pop %edi 10d95b: c9 leave 10d95c: c3 ret 10d95d: 8d 76 00 lea 0x0(%esi),%esi return false; } if ( first_block->prev_size != page_size ) { (*printer)( 10d960: 83 ec 0c sub $0xc,%esp 10d963: ff 75 e0 pushl -0x20(%ebp) 10d966: 50 push %eax 10d967: 68 0c 2c 12 00 push $0x122c0c return false; } if ( free_block->prev != prev_block ) { (*printer)( 10d96c: 6a 01 push $0x1 10d96e: ff 75 0c pushl 0xc(%ebp) 10d971: ff 55 e4 call *-0x1c(%ebp) 10d974: 31 c0 xor %eax,%eax 10d976: 83 c4 20 add $0x20,%esp block = next_block; } return true; } 10d979: 8d 65 f4 lea -0xc(%ebp),%esp 10d97c: 5b pop %ebx 10d97d: 5e pop %esi 10d97e: 5f pop %edi 10d97f: c9 leave 10d980: c3 ret 10d981: 8d 76 00 lea 0x0(%esi),%esi first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 10d984: 57 push %edi 10d985: 68 67 2e 12 00 push $0x122e67 10d98a: eb bc jmp 10d948 <_Heap_Walk+0xfc> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 10d98c: ff 75 e0 pushl -0x20(%ebp) 10d98f: 68 7a 2e 12 00 push $0x122e7a 10d994: eb b2 jmp 10d948 <_Heap_Walk+0xfc> 10d996: 66 90 xchg %ax,%ax return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 10d998: ff 75 dc pushl -0x24(%ebp) 10d99b: 68 84 2b 12 00 push $0x122b84 10d9a0: eb a6 jmp 10d948 <_Heap_Walk+0xfc> 10d9a2: 66 90 xchg %ax,%ax } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10d9a4: 56 push %esi 10d9a5: 68 a8 2b 12 00 push $0x122ba8 10d9aa: eb 9c jmp 10d948 <_Heap_Walk+0xfc> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 10d9ac: 56 push %esi 10d9ad: 68 dc 2b 12 00 push $0x122bdc 10d9b2: eb 94 jmp 10d948 <_Heap_Walk+0xfc> && (uintptr_t) block <= (uintptr_t) heap->last_block; 10d9b4: 8b 53 24 mov 0x24(%ebx),%edx 10d9b7: 89 55 d0 mov %edx,-0x30(%ebp) 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 10d9ba: 39 d1 cmp %edx,%ecx 10d9bc: 77 82 ja 10d940 <_Heap_Walk+0xf4> <== NEVER TAKEN ); return false; } if ( 10d9be: 8d 41 08 lea 0x8(%ecx),%eax 10d9c1: 31 d2 xor %edx,%edx 10d9c3: f7 75 d4 divl -0x2c(%ebp) 10d9c6: 85 d2 test %edx,%edx 10d9c8: 0f 85 20 02 00 00 jne 10dbee <_Heap_Walk+0x3a2> <== NEVER TAKEN ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d9ce: 8b 41 04 mov 0x4(%ecx),%eax 10d9d1: 83 e0 fe and $0xfffffffe,%eax 10d9d4: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d9d9: 0f 85 29 02 00 00 jne 10dc08 <_Heap_Walk+0x3bc> <== NEVER TAKEN ); return false; } if ( free_block->prev != prev_block ) { 10d9df: 8b 41 0c mov 0xc(%ecx),%eax 10d9e2: 39 d8 cmp %ebx,%eax 10d9e4: 0f 85 0f 02 00 00 jne 10dbf9 <_Heap_Walk+0x3ad> <== NEVER TAKEN 10d9ea: 89 75 c8 mov %esi,-0x38(%ebp) 10d9ed: 89 c6 mov %eax,%esi 10d9ef: 89 5d c4 mov %ebx,-0x3c(%ebp) 10d9f2: eb 3d jmp 10da31 <_Heap_Walk+0x1e5> 10d9f4: 39 cf cmp %ecx,%edi 10d9f6: 0f 87 44 ff ff ff ja 10d940 <_Heap_Walk+0xf4> 10d9fc: 3b 4d d0 cmp -0x30(%ebp),%ecx 10d9ff: 0f 87 3b ff ff ff ja 10d940 <_Heap_Walk+0xf4> <== NEVER TAKEN ); return false; } if ( 10da05: 8d 41 08 lea 0x8(%ecx),%eax 10da08: 31 d2 xor %edx,%edx 10da0a: f7 75 d4 divl -0x2c(%ebp) 10da0d: 85 d2 test %edx,%edx 10da0f: 0f 85 d9 01 00 00 jne 10dbee <_Heap_Walk+0x3a2> ); return false; } if ( _Heap_Is_used( free_block ) ) { 10da15: 8b 41 04 mov 0x4(%ecx),%eax 10da18: 83 e0 fe and $0xfffffffe,%eax 10da1b: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10da20: 0f 85 e2 01 00 00 jne 10dc08 <_Heap_Walk+0x3bc> ); return false; } if ( free_block->prev != prev_block ) { 10da26: 8b 41 0c mov 0xc(%ecx),%eax 10da29: 39 d8 cmp %ebx,%eax 10da2b: 0f 85 c8 01 00 00 jne 10dbf9 <_Heap_Walk+0x3ad> (*printer)( 10da31: 89 cb mov %ecx,%ebx return false; } prev_block = free_block; free_block = free_block->next; 10da33: 8b 49 08 mov 0x8(%ecx),%ecx const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 10da36: 39 ce cmp %ecx,%esi 10da38: 75 ba jne 10d9f4 <_Heap_Walk+0x1a8> 10da3a: 8b 75 c8 mov -0x38(%ebp),%esi 10da3d: 8b 5d c4 mov -0x3c(%ebp),%ebx if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10da40: 39 75 d8 cmp %esi,-0x28(%ebp) 10da43: 0f 84 3a fe ff ff je 10d883 <_Heap_Walk+0x37> <== NEVER TAKEN 10da49: 8b 45 cc mov -0x34(%ebp),%eax - 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; 10da4c: 89 c1 mov %eax,%ecx 10da4e: 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); 10da51: 8d 3c 31 lea (%ecx,%esi,1),%edi 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; if ( prev_used ) { 10da54: a8 01 test $0x1,%al 10da56: 74 30 je 10da88 <_Heap_Walk+0x23c> (*printer)( 10da58: 83 ec 0c sub $0xc,%esp 10da5b: 51 push %ecx 10da5c: 56 push %esi 10da5d: 68 c9 2e 12 00 push $0x122ec9 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10da62: 6a 00 push $0x0 10da64: ff 75 0c pushl 0xc(%ebp) 10da67: 89 4d c0 mov %ecx,-0x40(%ebp) 10da6a: ff 55 e4 call *-0x1c(%ebp) 10da6d: 83 c4 20 add $0x20,%esp 10da70: 8b 4d c0 mov -0x40(%ebp),%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 10da73: 39 7b 20 cmp %edi,0x20(%ebx) 10da76: 76 20 jbe 10da98 <_Heap_Walk+0x24c> <== ALWAYS TAKEN block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 10da78: 83 ec 0c sub $0xc,%esp 10da7b: 57 push %edi 10da7c: 56 push %esi 10da7d: 68 e4 2c 12 00 push $0x122ce4 10da82: e9 e5 fe ff ff jmp 10d96c <_Heap_Walk+0x120> 10da87: 90 nop "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10da88: 83 ec 08 sub $0x8,%esp 10da8b: ff 36 pushl (%esi) 10da8d: 51 push %ecx 10da8e: 56 push %esi 10da8f: 68 bc 2c 12 00 push $0x122cbc 10da94: eb cc jmp 10da62 <_Heap_Walk+0x216> 10da96: 66 90 xchg %ax,%ax 10da98: 39 7b 24 cmp %edi,0x24(%ebx) 10da9b: 72 db jb 10da78 <_Heap_Walk+0x22c> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 10da9d: 89 c8 mov %ecx,%eax 10da9f: 31 d2 xor %edx,%edx 10daa1: f7 75 e0 divl -0x20(%ebp) 10daa4: 85 d2 test %edx,%edx 10daa6: 0f 85 02 01 00 00 jne 10dbae <_Heap_Walk+0x362> ); return false; } if ( block_size < min_block_size ) { 10daac: 39 4d dc cmp %ecx,-0x24(%ebp) 10daaf: 0f 87 0b 01 00 00 ja 10dbc0 <_Heap_Walk+0x374> ); return false; } if ( next_block_begin <= block_begin ) { 10dab5: 39 fe cmp %edi,%esi 10dab7: 0f 83 17 01 00 00 jae 10dbd4 <_Heap_Walk+0x388> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10dabd: f6 47 04 01 testb $0x1,0x4(%edi) 10dac1: 0f 85 91 00 00 00 jne 10db58 <_Heap_Walk+0x30c> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10dac7: 8b 4b 08 mov 0x8(%ebx),%ecx 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; 10daca: 8b 46 04 mov 0x4(%esi),%eax 10dacd: 89 45 cc mov %eax,-0x34(%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; 10dad0: 83 e0 fe and $0xfffffffe,%eax 10dad3: 89 45 d4 mov %eax,-0x2c(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10dad6: 01 f0 add %esi,%eax 10dad8: 89 45 d0 mov %eax,-0x30(%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)( 10dadb: 8b 56 08 mov 0x8(%esi),%edx return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 10dade: 39 53 0c cmp %edx,0xc(%ebx) 10dae1: 0f 84 99 00 00 00 je 10db80 <_Heap_Walk+0x334> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10dae7: 39 da cmp %ebx,%edx 10dae9: 0f 84 a9 00 00 00 je 10db98 <_Heap_Walk+0x34c> 10daef: c7 45 c8 35 2a 12 00 movl $0x122a35,-0x38(%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)( 10daf6: 8b 46 0c mov 0xc(%esi),%eax 10daf9: 39 c1 cmp %eax,%ecx 10dafb: 74 7b je 10db78 <_Heap_Walk+0x32c> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 10dafd: 39 d8 cmp %ebx,%eax 10daff: 0f 84 9f 00 00 00 je 10dba4 <_Heap_Walk+0x358> 10db05: b9 35 2a 12 00 mov $0x122a35,%ecx 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)( 10db0a: ff 75 c8 pushl -0x38(%ebp) 10db0d: 52 push %edx 10db0e: 51 push %ecx 10db0f: 50 push %eax 10db10: 56 push %esi 10db11: 68 a4 2d 12 00 push $0x122da4 10db16: 6a 00 push $0x0 10db18: ff 75 0c pushl 0xc(%ebp) 10db1b: ff 55 e4 call *-0x1c(%ebp) block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 10db1e: 8b 55 d0 mov -0x30(%ebp),%edx 10db21: 8b 02 mov (%edx),%eax 10db23: 83 c4 20 add $0x20,%esp 10db26: 39 45 d4 cmp %eax,-0x2c(%ebp) 10db29: 74 11 je 10db3c <_Heap_Walk+0x2f0> (*printer)( 10db2b: 51 push %ecx 10db2c: 52 push %edx 10db2d: 50 push %eax 10db2e: ff 75 d4 pushl -0x2c(%ebp) 10db31: 56 push %esi 10db32: 68 d0 2d 12 00 push $0x122dd0 10db37: e9 30 fe ff ff jmp 10d96c <_Heap_Walk+0x120> ); return false; } if ( !prev_used ) { 10db3c: f6 45 cc 01 testb $0x1,-0x34(%ebp) 10db40: 74 4a je 10db8c <_Heap_Walk+0x340> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10db42: 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 ) { 10db45: 39 d8 cmp %ebx,%eax 10db47: 75 0a jne 10db53 <_Heap_Walk+0x307> <== ALWAYS TAKEN 10db49: eb 21 jmp 10db6c <_Heap_Walk+0x320> <== NOT EXECUTED 10db4b: 90 nop <== NOT EXECUTED if ( free_block == block ) { return true; } free_block = free_block->next; 10db4c: 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 ) { 10db4f: 39 d8 cmp %ebx,%eax 10db51: 74 19 je 10db6c <_Heap_Walk+0x320> if ( free_block == block ) { 10db53: 39 f0 cmp %esi,%eax 10db55: 75 f5 jne 10db4c <_Heap_Walk+0x300> 10db57: 90 nop if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10db58: 39 7d d8 cmp %edi,-0x28(%ebp) 10db5b: 0f 84 22 fd ff ff je 10d883 <_Heap_Walk+0x37> 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 ) { 10db61: 8b 47 04 mov 0x4(%edi),%eax 10db64: 89 fe mov %edi,%esi 10db66: e9 e1 fe ff ff jmp 10da4c <_Heap_Walk+0x200> 10db6b: 90 nop return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10db6c: 56 push %esi 10db6d: 68 3c 2e 12 00 push $0x122e3c 10db72: e9 d1 fd ff ff jmp 10d948 <_Heap_Walk+0xfc> 10db77: 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)( 10db78: b9 f4 2e 12 00 mov $0x122ef4,%ecx 10db7d: eb 8b jmp 10db0a <_Heap_Walk+0x2be> 10db7f: 90 nop } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 10db80: c7 45 c8 e0 2e 12 00 movl $0x122ee0,-0x38(%ebp) 10db87: e9 6a ff ff ff jmp 10daf6 <_Heap_Walk+0x2aa> return false; } if ( !prev_used ) { (*printer)( 10db8c: 56 push %esi 10db8d: 68 0c 2e 12 00 push $0x122e0c 10db92: e9 b1 fd ff ff jmp 10d948 <_Heap_Walk+0xfc> 10db97: 90 nop " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10db98: c7 45 c8 ea 2e 12 00 movl $0x122eea,-0x38(%ebp) 10db9f: e9 52 ff ff ff jmp 10daf6 <_Heap_Walk+0x2aa> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 10dba4: b9 ff 2e 12 00 mov $0x122eff,%ecx 10dba9: e9 5c ff ff ff jmp 10db0a <_Heap_Walk+0x2be> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 10dbae: 83 ec 0c sub $0xc,%esp 10dbb1: 51 push %ecx 10dbb2: 56 push %esi 10dbb3: 68 14 2d 12 00 push $0x122d14 10dbb8: e9 af fd ff ff jmp 10d96c <_Heap_Walk+0x120> 10dbbd: 8d 76 00 lea 0x0(%esi),%esi return false; } if ( block_size < min_block_size ) { (*printer)( 10dbc0: 83 ec 08 sub $0x8,%esp 10dbc3: ff 75 dc pushl -0x24(%ebp) 10dbc6: 51 push %ecx 10dbc7: 56 push %esi 10dbc8: 68 44 2d 12 00 push $0x122d44 10dbcd: e9 9a fd ff ff jmp 10d96c <_Heap_Walk+0x120> 10dbd2: 66 90 xchg %ax,%ax return false; } if ( next_block_begin <= block_begin ) { (*printer)( 10dbd4: 83 ec 0c sub $0xc,%esp 10dbd7: 57 push %edi 10dbd8: 56 push %esi 10dbd9: 68 70 2d 12 00 push $0x122d70 10dbde: e9 89 fd ff ff jmp 10d96c <_Heap_Walk+0x120> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 10dbe3: 53 push %ebx 10dbe4: 68 98 2e 12 00 push $0x122e98 10dbe9: e9 5a fd ff ff jmp 10d948 <_Heap_Walk+0xfc> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10dbee: 51 push %ecx 10dbef: 68 58 2c 12 00 push $0x122c58 10dbf4: e9 4f fd ff ff jmp 10d948 <_Heap_Walk+0xfc> return false; } if ( free_block->prev != prev_block ) { (*printer)( 10dbf9: 83 ec 0c sub $0xc,%esp 10dbfc: 50 push %eax 10dbfd: 51 push %ecx 10dbfe: 68 88 2c 12 00 push $0x122c88 10dc03: e9 64 fd ff ff jmp 10d96c <_Heap_Walk+0x120> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 10dc08: 51 push %ecx 10dc09: 68 ad 2e 12 00 push $0x122ead 10dc0e: e9 35 fd ff ff jmp 10d948 <_Heap_Walk+0xfc> =============================================================================== 0010c308 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 10c308: 55 push %ebp 10c309: 89 e5 mov %esp,%ebp 10c30b: 53 push %ebx 10c30c: 83 ec 04 sub $0x4,%esp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10c30f: 8b 15 c0 76 12 00 mov 0x1276c0,%edx 10c315: 85 d2 test %edx,%edx 10c317: 74 1a je 10c333 <_IO_Initialize_all_drivers+0x2b><== NEVER TAKEN 10c319: 31 db xor %ebx,%ebx 10c31b: 90 nop (void) rtems_io_initialize( major, 0, NULL ); 10c31c: 50 push %eax 10c31d: 6a 00 push $0x0 10c31f: 6a 00 push $0x0 10c321: 53 push %ebx 10c322: e8 01 53 00 00 call 111628 void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10c327: 43 inc %ebx 10c328: 83 c4 10 add $0x10,%esp 10c32b: 39 1d c0 76 12 00 cmp %ebx,0x1276c0 10c331: 77 e9 ja 10c31c <_IO_Initialize_all_drivers+0x14> (void) rtems_io_initialize( major, 0, NULL ); } 10c333: 8b 5d fc mov -0x4(%ebp),%ebx 10c336: c9 leave 10c337: c3 ret =============================================================================== 0010c338 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 10c338: 55 push %ebp 10c339: 89 e5 mov %esp,%ebp 10c33b: 57 push %edi 10c33c: 56 push %esi 10c33d: 53 push %ebx 10c33e: 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; 10c341: 8b 1d 54 32 12 00 mov 0x123254,%ebx drivers_in_table = Configuration.number_of_device_drivers; 10c347: a1 50 32 12 00 mov 0x123250,%eax 10c34c: 89 45 e4 mov %eax,-0x1c(%ebp) number_of_drivers = Configuration.maximum_drivers; 10c34f: 8b 35 4c 32 12 00 mov 0x12324c,%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 ) 10c355: 39 f0 cmp %esi,%eax 10c357: 72 17 jb 10c370 <_IO_Manager_initialization+0x38> * 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; 10c359: 89 1d c4 76 12 00 mov %ebx,0x1276c4 _IO_Number_of_drivers = number_of_drivers; 10c35f: 8b 45 e4 mov -0x1c(%ebp),%eax 10c362: a3 c0 76 12 00 mov %eax,0x1276c0 ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10c367: 8d 65 f4 lea -0xc(%ebp),%esp 10c36a: 5b pop %ebx 10c36b: 5e pop %esi 10c36c: 5f pop %edi 10c36d: c9 leave 10c36e: c3 ret 10c36f: 90 nop /* * 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 *) 10c370: 8d 0c 76 lea (%esi,%esi,2),%ecx 10c373: c1 e1 03 shl $0x3,%ecx 10c376: 83 ec 0c sub $0xc,%esp 10c379: 51 push %ecx 10c37a: 89 4d dc mov %ecx,-0x24(%ebp) 10c37d: e8 0a 29 00 00 call 10ec8c <_Workspace_Allocate_or_fatal_error> 10c382: 89 c2 mov %eax,%edx 10c384: a3 c4 76 12 00 mov %eax,0x1276c4 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 10c389: 89 35 c0 76 12 00 mov %esi,0x1276c0 memset( 10c38f: 31 c0 xor %eax,%eax 10c391: 8b 4d dc mov -0x24(%ebp),%ecx 10c394: 89 d7 mov %edx,%edi 10c396: 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++ ) 10c398: 83 c4 10 add $0x10,%esp 10c39b: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c39e: 85 c9 test %ecx,%ecx 10c3a0: 74 c5 je 10c367 <_IO_Manager_initialization+0x2f><== NEVER TAKEN 10c3a2: a1 c4 76 12 00 mov 0x1276c4,%eax 10c3a7: 89 45 e0 mov %eax,-0x20(%ebp) 10c3aa: 31 c0 xor %eax,%eax 10c3ac: 31 d2 xor %edx,%edx 10c3ae: 66 90 xchg %ax,%ax _IO_Driver_address_table[index] = driver_table[index]; 10c3b0: 8b 7d e0 mov -0x20(%ebp),%edi 10c3b3: 01 c7 add %eax,%edi 10c3b5: 8d 34 03 lea (%ebx,%eax,1),%esi 10c3b8: b9 06 00 00 00 mov $0x6,%ecx 10c3bd: 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++ ) 10c3bf: 42 inc %edx 10c3c0: 83 c0 18 add $0x18,%eax 10c3c3: 39 55 e4 cmp %edx,-0x1c(%ebp) 10c3c6: 77 e8 ja 10c3b0 <_IO_Manager_initialization+0x78> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10c3c8: 8d 65 f4 lea -0xc(%ebp),%esp 10c3cb: 5b pop %ebx 10c3cc: 5e pop %esi 10c3cd: 5f pop %edi 10c3ce: c9 leave 10c3cf: c3 ret =============================================================================== 0010cdfc <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10cdfc: 55 push %ebp 10cdfd: 89 e5 mov %esp,%ebp 10cdff: 53 push %ebx 10ce00: 83 ec 08 sub $0x8,%esp 10ce03: 8b 45 08 mov 0x8(%ebp),%eax 10ce06: 8b 55 0c mov 0xc(%ebp),%edx 10ce09: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10ce0c: a3 00 74 12 00 mov %eax,0x127400 _Internal_errors_What_happened.is_internal = is_internal; 10ce11: 88 15 04 74 12 00 mov %dl,0x127404 _Internal_errors_What_happened.the_error = the_error; 10ce17: 89 1d 08 74 12 00 mov %ebx,0x127408 _User_extensions_Fatal( the_source, is_internal, the_error ); 10ce1d: 53 push %ebx 10ce1e: 0f b6 d2 movzbl %dl,%edx 10ce21: 52 push %edx 10ce22: 50 push %eax 10ce23: e8 0c 1b 00 00 call 10e934 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10ce28: c7 05 20 75 12 00 05 movl $0x5,0x127520 <== NOT EXECUTED 10ce2f: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10ce32: fa cli <== NOT EXECUTED 10ce33: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10ce35: f4 hlt <== NOT EXECUTED 10ce36: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ce39: eb fe jmp 10ce39 <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 00100218 <_Message_queue_Manager_initialization>: #include #include #include void _Message_queue_Manager_initialization(void) { 100218: 55 push %ebp 100219: 89 e5 mov %esp,%ebp } 10021b: c9 leave 10021c: c3 ret =============================================================================== 00111c4c <_Objects_API_maximum_class>: #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 111c4c: 55 push %ebp 111c4d: 89 e5 mov %esp,%ebp case OBJECTS_NO_API: default: break; } return 0; } 111c4f: 8b 45 08 mov 0x8(%ebp),%eax 111c52: 48 dec %eax 111c53: 83 f8 03 cmp $0x3,%eax 111c56: 77 0c ja 111c64 <_Objects_API_maximum_class+0x18> 111c58: 8b 04 85 70 1f 12 00 mov 0x121f70(,%eax,4),%eax 111c5f: c9 leave 111c60: c3 ret 111c61: 8d 76 00 lea 0x0(%esi),%esi 111c64: 31 c0 xor %eax,%eax 111c66: c9 leave 111c67: c3 ret =============================================================================== 0010ce94 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10ce94: 55 push %ebp 10ce95: 89 e5 mov %esp,%ebp 10ce97: 56 push %esi 10ce98: 53 push %ebx 10ce99: 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 ) 10ce9c: 8b 43 18 mov 0x18(%ebx),%eax 10ce9f: 85 c0 test %eax,%eax 10cea1: 75 0d jne 10ceb0 <_Objects_Allocate+0x1c><== ALWAYS TAKEN 10cea3: 31 c9 xor %ecx,%ecx <== NOT EXECUTED information->inactive--; } } return the_object; } 10cea5: 89 c8 mov %ecx,%eax 10cea7: 8d 65 f8 lea -0x8(%ebp),%esp 10ceaa: 5b pop %ebx 10ceab: 5e pop %esi 10ceac: c9 leave 10cead: c3 ret 10ceae: 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 ); 10ceb0: 8d 73 20 lea 0x20(%ebx),%esi 10ceb3: 83 ec 0c sub $0xc,%esp 10ceb6: 56 push %esi 10ceb7: e8 08 f7 ff ff call 10c5c4 <_Chain_Get> 10cebc: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10cebe: 83 c4 10 add $0x10,%esp 10cec1: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10cec5: 74 de je 10cea5 <_Objects_Allocate+0x11> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10cec7: 85 c0 test %eax,%eax 10cec9: 74 29 je 10cef4 <_Objects_Allocate+0x60> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10cecb: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10cecf: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10ced3: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 10ced5: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10ced9: 31 d2 xor %edx,%edx 10cedb: f7 f6 div %esi 10cedd: c1 e0 02 shl $0x2,%eax 10cee0: 03 43 30 add 0x30(%ebx),%eax 10cee3: ff 08 decl (%eax) information->inactive--; 10cee5: 66 ff 4b 2c decw 0x2c(%ebx) } } return the_object; } 10cee9: 89 c8 mov %ecx,%eax 10ceeb: 8d 65 f8 lea -0x8(%ebp),%esp 10ceee: 5b pop %ebx 10ceef: 5e pop %esi 10cef0: c9 leave 10cef1: c3 ret 10cef2: 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 ); 10cef4: 83 ec 0c sub $0xc,%esp 10cef7: 53 push %ebx 10cef8: e8 3b 00 00 00 call 10cf38 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10cefd: 89 34 24 mov %esi,(%esp) 10cf00: e8 bf f6 ff ff call 10c5c4 <_Chain_Get> 10cf05: 89 c1 mov %eax,%ecx } if ( the_object ) { 10cf07: 83 c4 10 add $0x10,%esp 10cf0a: 85 c0 test %eax,%eax 10cf0c: 74 97 je 10cea5 <_Objects_Allocate+0x11> 10cf0e: eb bb jmp 10cecb <_Objects_Allocate+0x37> =============================================================================== 0010cf38 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10cf38: 55 push %ebp 10cf39: 89 e5 mov %esp,%ebp 10cf3b: 57 push %edi 10cf3c: 56 push %esi 10cf3d: 53 push %ebx 10cf3e: 83 ec 4c sub $0x4c,%esp 10cf41: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); 10cf44: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10cf48: 89 45 d0 mov %eax,-0x30(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10cf4b: 8b 4b 34 mov 0x34(%ebx),%ecx 10cf4e: 85 c9 test %ecx,%ecx 10cf50: 0f 84 72 02 00 00 je 10d1c8 <_Objects_Extend_information+0x290> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10cf56: 8b 7b 10 mov 0x10(%ebx),%edi 10cf59: 66 89 7d d4 mov %di,-0x2c(%ebp) 10cf5d: 8b 7b 14 mov 0x14(%ebx),%edi 10cf60: 31 d2 xor %edx,%edx 10cf62: 8b 45 d4 mov -0x2c(%ebp),%eax 10cf65: 66 f7 f7 div %di 10cf68: 0f b7 f0 movzwl %ax,%esi for ( ; block < block_count; block++ ) { 10cf6b: 85 f6 test %esi,%esi 10cf6d: 0f 84 6c 02 00 00 je 10d1df <_Objects_Extend_information+0x2a7><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) 10cf73: 8b 01 mov (%ecx),%eax 10cf75: 85 c0 test %eax,%eax 10cf77: 0f 84 72 02 00 00 je 10d1ef <_Objects_Extend_information+0x2b7><== NEVER TAKEN 10cf7d: 0f b7 ff movzwl %di,%edi 10cf80: 8b 55 d0 mov -0x30(%ebp),%edx 10cf83: 89 55 cc mov %edx,-0x34(%ebp) 10cf86: 31 d2 xor %edx,%edx 10cf88: 8b 45 cc mov -0x34(%ebp),%eax 10cf8b: eb 09 jmp 10cf96 <_Objects_Extend_information+0x5e> 10cf8d: 8d 76 00 lea 0x0(%esi),%esi 10cf90: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4) 10cf94: 74 07 je 10cf9d <_Objects_Extend_information+0x65> break; else index_base += information->allocation_size; 10cf96: 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++ ) { 10cf98: 42 inc %edx 10cf99: 39 d6 cmp %edx,%esi 10cf9b: 77 f3 ja 10cf90 <_Objects_Extend_information+0x58> 10cf9d: 89 45 cc mov %eax,-0x34(%ebp) else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10cfa0: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax 10cfa4: 01 f8 add %edi,%eax 10cfa6: 89 45 d4 mov %eax,-0x2c(%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 ) { 10cfa9: 3d ff ff 00 00 cmp $0xffff,%eax 10cfae: 0f 87 b1 01 00 00 ja 10d165 <_Objects_Extend_information+0x22d><== NEVER TAKEN /* * 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; 10cfb4: 0f af 7b 18 imul 0x18(%ebx),%edi if ( information->auto_extend ) { 10cfb8: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10cfbc: 0f 85 ae 01 00 00 jne 10d170 <_Objects_Extend_information+0x238> new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 10cfc2: 83 ec 0c sub $0xc,%esp 10cfc5: 57 push %edi 10cfc6: 89 55 b4 mov %edx,-0x4c(%ebp) 10cfc9: e8 be 1c 00 00 call 10ec8c <_Workspace_Allocate_or_fatal_error> 10cfce: 89 45 c4 mov %eax,-0x3c(%ebp) 10cfd1: 83 c4 10 add $0x10,%esp 10cfd4: 8b 55 b4 mov -0x4c(%ebp),%edx } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 10cfd7: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10cfdb: 39 45 cc cmp %eax,-0x34(%ebp) 10cfde: 0f 82 fe 00 00 00 jb 10d0e2 <_Objects_Extend_information+0x1aa> */ /* * Up the block count and maximum */ block_count++; 10cfe4: 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 ); 10cfe7: 83 ec 0c sub $0xc,%esp 10cfea: 8d 04 7f lea (%edi,%edi,2),%eax 10cfed: 03 45 d4 add -0x2c(%ebp),%eax 10cff0: 03 45 d0 add -0x30(%ebp),%eax 10cff3: c1 e0 02 shl $0x2,%eax 10cff6: 50 push %eax 10cff7: 89 55 b4 mov %edx,-0x4c(%ebp) 10cffa: e8 b9 1c 00 00 call 10ecb8 <_Workspace_Allocate> 10cfff: 89 45 c8 mov %eax,-0x38(%ebp) if ( !object_blocks ) { 10d002: 83 c4 10 add $0x10,%esp 10d005: 85 c0 test %eax,%eax 10d007: 8b 55 b4 mov -0x4c(%ebp),%edx 10d00a: 0f 84 ef 01 00 00 je 10d1ff <_Objects_Extend_information+0x2c7> RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 10d010: 8b 45 c8 mov -0x38(%ebp),%eax 10d013: 8d 04 b8 lea (%eax,%edi,4),%eax 10d016: 89 45 b8 mov %eax,-0x48(%ebp) 10d019: 8b 4d c8 mov -0x38(%ebp),%ecx 10d01c: 8d 3c f9 lea (%ecx,%edi,8),%edi 10d01f: 89 7d bc mov %edi,-0x44(%ebp) * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 10d022: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10d026: 39 45 d0 cmp %eax,-0x30(%ebp) 10d029: 0f 82 60 01 00 00 jb 10d18f <_Objects_Extend_information+0x257> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10d02f: 8b 45 d0 mov -0x30(%ebp),%eax 10d032: 85 c0 test %eax,%eax 10d034: 74 16 je 10d04c <_Objects_Extend_information+0x114><== NEVER TAKEN information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10d036: 31 c0 xor %eax,%eax 10d038: 8b 4d bc mov -0x44(%ebp),%ecx 10d03b: 8b 7d d0 mov -0x30(%ebp),%edi 10d03e: 66 90 xchg %ax,%ax /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 10d040: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10d047: 40 inc %eax 10d048: 39 c7 cmp %eax,%edi 10d04a: 77 f4 ja 10d040 <_Objects_Extend_information+0x108><== NEVER TAKEN 10d04c: c1 e6 02 shl $0x2,%esi 10d04f: 89 75 c0 mov %esi,-0x40(%ebp) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10d052: 8b 45 c8 mov -0x38(%ebp),%eax 10d055: 8b 7d c0 mov -0x40(%ebp),%edi 10d058: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) inactive_per_block[block_count] = 0; 10d05f: 8b 4d b8 mov -0x48(%ebp),%ecx 10d062: c7 04 39 00 00 00 00 movl $0x0,(%ecx,%edi,1) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10d069: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10d06d: 03 75 cc add -0x34(%ebp),%esi * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10d070: 39 75 cc cmp %esi,-0x34(%ebp) 10d073: 73 19 jae 10d08e <_Objects_Extend_information+0x156><== NEVER TAKEN 10d075: 8b 7d cc mov -0x34(%ebp),%edi 10d078: 8b 45 bc mov -0x44(%ebp),%eax 10d07b: 8d 0c b8 lea (%eax,%edi,4),%ecx 10d07e: 89 f8 mov %edi,%eax index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10d080: c7 01 00 00 00 00 movl $0x0,(%ecx) object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 10d086: 40 inc %eax 10d087: 83 c1 04 add $0x4,%ecx * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10d08a: 39 c6 cmp %eax,%esi 10d08c: 77 f2 ja 10d080 <_Objects_Extend_information+0x148> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10d08e: 9c pushf 10d08f: fa cli 10d090: 5f pop %edi old_tables = information->object_blocks; 10d091: 8b 4b 34 mov 0x34(%ebx),%ecx information->object_blocks = object_blocks; 10d094: 8b 45 c8 mov -0x38(%ebp),%eax 10d097: 89 43 34 mov %eax,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10d09a: 8b 45 b8 mov -0x48(%ebp),%eax 10d09d: 89 43 30 mov %eax,0x30(%ebx) information->local_table = local_table; 10d0a0: 8b 45 bc mov -0x44(%ebp),%eax 10d0a3: 89 43 1c mov %eax,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10d0a6: 8b 45 d4 mov -0x2c(%ebp),%eax 10d0a9: 66 89 43 10 mov %ax,0x10(%ebx) information->maximum_id = _Objects_Build_id( 10d0ad: 8b 33 mov (%ebx),%esi 10d0af: c1 e6 18 shl $0x18,%esi 10d0b2: 81 ce 00 00 01 00 or $0x10000,%esi 10d0b8: 0f b7 43 04 movzwl 0x4(%ebx),%eax 10d0bc: c1 e0 1b shl $0x1b,%eax 10d0bf: 09 c6 or %eax,%esi 10d0c1: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax 10d0c5: 09 c6 or %eax,%esi 10d0c7: 89 73 0c mov %esi,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10d0ca: 57 push %edi 10d0cb: 9d popf if ( old_tables ) 10d0cc: 85 c9 test %ecx,%ecx 10d0ce: 74 12 je 10d0e2 <_Objects_Extend_information+0x1aa> _Workspace_Free( old_tables ); 10d0d0: 83 ec 0c sub $0xc,%esp 10d0d3: 51 push %ecx 10d0d4: 89 55 b4 mov %edx,-0x4c(%ebp) 10d0d7: e8 f8 1b 00 00 call 10ecd4 <_Workspace_Free> 10d0dc: 83 c4 10 add $0x10,%esp 10d0df: 8b 55 b4 mov -0x4c(%ebp),%edx } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10d0e2: c1 e2 02 shl $0x2,%edx 10d0e5: 89 55 d0 mov %edx,-0x30(%ebp) 10d0e8: 8b 43 34 mov 0x34(%ebx),%eax 10d0eb: 8b 4d c4 mov -0x3c(%ebp),%ecx 10d0ee: 89 0c 10 mov %ecx,(%eax,%edx,1) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10d0f1: ff 73 18 pushl 0x18(%ebx) 10d0f4: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10d0f8: 52 push %edx 10d0f9: 8b 7d d0 mov -0x30(%ebp),%edi 10d0fc: ff 34 38 pushl (%eax,%edi,1) 10d0ff: 8d 7d dc lea -0x24(%ebp),%edi 10d102: 57 push %edi 10d103: e8 68 45 00 00 call 111670 <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10d108: 8d 43 20 lea 0x20(%ebx),%eax 10d10b: 89 45 d4 mov %eax,-0x2c(%ebp) 10d10e: 8b 75 cc mov -0x34(%ebp),%esi /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10d111: 83 c4 10 add $0x10,%esp 10d114: eb 2b jmp 10d141 <_Objects_Extend_information+0x209> 10d116: 66 90 xchg %ax,%ax the_object->id = _Objects_Build_id( 10d118: 8b 13 mov (%ebx),%edx 10d11a: c1 e2 18 shl $0x18,%edx 10d11d: 81 ca 00 00 01 00 or $0x10000,%edx 10d123: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10d127: c1 e1 1b shl $0x1b,%ecx 10d12a: 09 ca or %ecx,%edx 10d12c: 09 f2 or %esi,%edx 10d12e: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10d131: 83 ec 08 sub $0x8,%esp 10d134: 50 push %eax 10d135: ff 75 d4 pushl -0x2c(%ebp) 10d138: e8 4b f4 ff ff call 10c588 <_Chain_Append> index++; 10d13d: 46 inc %esi 10d13e: 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 ) { 10d141: 83 ec 0c sub $0xc,%esp 10d144: 57 push %edi 10d145: e8 7a f4 ff ff call 10c5c4 <_Chain_Get> 10d14a: 83 c4 10 add $0x10,%esp 10d14d: 85 c0 test %eax,%eax 10d14f: 75 c7 jne 10d118 <_Objects_Extend_information+0x1e0> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10d151: 8b 43 30 mov 0x30(%ebx),%eax 10d154: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10d158: 8b 4d d0 mov -0x30(%ebp),%ecx 10d15b: 89 14 08 mov %edx,(%eax,%ecx,1) information->inactive = 10d15e: 8b 43 14 mov 0x14(%ebx),%eax 10d161: 66 01 43 2c add %ax,0x2c(%ebx) (Objects_Maximum)(information->inactive + information->allocation_size); } 10d165: 8d 65 f4 lea -0xc(%ebp),%esp 10d168: 5b pop %ebx 10d169: 5e pop %esi 10d16a: 5f pop %edi 10d16b: c9 leave 10d16c: c3 ret 10d16d: 8d 76 00 lea 0x0(%esi),%esi * 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; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); 10d170: 83 ec 0c sub $0xc,%esp 10d173: 57 push %edi 10d174: 89 55 b4 mov %edx,-0x4c(%ebp) 10d177: e8 3c 1b 00 00 call 10ecb8 <_Workspace_Allocate> 10d17c: 89 45 c4 mov %eax,-0x3c(%ebp) if ( !new_object_block ) 10d17f: 83 c4 10 add $0x10,%esp 10d182: 85 c0 test %eax,%eax 10d184: 8b 55 b4 mov -0x4c(%ebp),%edx 10d187: 0f 85 4a fe ff ff jne 10cfd7 <_Objects_Extend_information+0x9f> 10d18d: eb d6 jmp 10d165 <_Objects_Extend_information+0x22d> /* * 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, 10d18f: c1 e6 02 shl $0x2,%esi 10d192: 89 75 c0 mov %esi,-0x40(%ebp) 10d195: 8b 73 34 mov 0x34(%ebx),%esi 10d198: 8b 7d c8 mov -0x38(%ebp),%edi 10d19b: 8b 4d c0 mov -0x40(%ebp),%ecx 10d19e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10d1a0: 8b 73 30 mov 0x30(%ebx),%esi 10d1a3: 8b 7d b8 mov -0x48(%ebp),%edi 10d1a6: 8b 4d c0 mov -0x40(%ebp),%ecx 10d1a9: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10d1ab: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10d1af: 03 45 d0 add -0x30(%ebp),%eax 10d1b2: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx 10d1b9: 8b 73 1c mov 0x1c(%ebx),%esi 10d1bc: 8b 7d bc mov -0x44(%ebp),%edi 10d1bf: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10d1c1: e9 8c fe ff ff jmp 10d052 <_Objects_Extend_information+0x11a> 10d1c6: 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 ) 10d1c8: 8b 53 10 mov 0x10(%ebx),%edx 10d1cb: 66 89 55 d4 mov %dx,-0x2c(%ebp) 10d1cf: 0f b7 7b 14 movzwl 0x14(%ebx),%edi 10d1d3: 89 45 cc mov %eax,-0x34(%ebp) 10d1d6: 31 d2 xor %edx,%edx 10d1d8: 31 f6 xor %esi,%esi 10d1da: e9 c1 fd ff ff jmp 10cfa0 <_Objects_Extend_information+0x68> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10d1df: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED 10d1e2: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 10d1e5: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED 10d1e8: 31 d2 xor %edx,%edx <== NOT EXECUTED 10d1ea: e9 b1 fd ff ff jmp 10cfa0 <_Objects_Extend_information+0x68><== NOT EXECUTED if ( information->object_blocks[ block ] == NULL ) 10d1ef: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED 10d1f2: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10d1f5: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED 10d1f8: 31 d2 xor %edx,%edx <== NOT EXECUTED 10d1fa: e9 a1 fd ff ff jmp 10cfa0 <_Objects_Extend_information+0x68><== 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 ); 10d1ff: 83 ec 0c sub $0xc,%esp 10d202: ff 75 c4 pushl -0x3c(%ebp) 10d205: e8 ca 1a 00 00 call 10ecd4 <_Workspace_Free> return; 10d20a: 83 c4 10 add $0x10,%esp 10d20d: e9 53 ff ff ff jmp 10d165 <_Objects_Extend_information+0x22d> =============================================================================== 0010d2a4 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10d2a4: 55 push %ebp 10d2a5: 89 e5 mov %esp,%ebp 10d2a7: 56 push %esi 10d2a8: 53 push %ebx 10d2a9: 8b 75 08 mov 0x8(%ebp),%esi 10d2ac: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10d2af: 85 db test %ebx,%ebx 10d2b1: 75 09 jne 10d2bc <_Objects_Get_information+0x18> * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 10d2b3: 31 c0 xor %eax,%eax return NULL; #endif return info; } 10d2b5: 8d 65 f8 lea -0x8(%ebp),%esp 10d2b8: 5b pop %ebx 10d2b9: 5e pop %esi 10d2ba: c9 leave 10d2bb: c3 ret /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); 10d2bc: 83 ec 0c sub $0xc,%esp 10d2bf: 56 push %esi 10d2c0: e8 87 49 00 00 call 111c4c <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10d2c5: 83 c4 10 add $0x10,%esp 10d2c8: 85 c0 test %eax,%eax 10d2ca: 74 e7 je 10d2b3 <_Objects_Get_information+0xf> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10d2cc: 39 c3 cmp %eax,%ebx 10d2ce: 77 e3 ja 10d2b3 <_Objects_Get_information+0xf> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10d2d0: 8b 04 b5 2c 73 12 00 mov 0x12732c(,%esi,4),%eax 10d2d7: 85 c0 test %eax,%eax 10d2d9: 74 d8 je 10d2b3 <_Objects_Get_information+0xf><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10d2db: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !info ) 10d2de: 85 c0 test %eax,%eax 10d2e0: 74 d3 je 10d2b5 <_Objects_Get_information+0x11><== NEVER TAKEN * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 10d2e2: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10d2e7: 75 cc jne 10d2b5 <_Objects_Get_information+0x11> 10d2e9: eb c8 jmp 10d2b3 <_Objects_Get_information+0xf> =============================================================================== 0010d2ec <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10d2ec: 55 push %ebp 10d2ed: 89 e5 mov %esp,%ebp 10d2ef: 56 push %esi 10d2f0: 53 push %ebx 10d2f1: 8b 55 08 mov 0x8(%ebp),%edx 10d2f4: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 10d2f7: b8 01 00 00 00 mov $0x1,%eax 10d2fc: 2b 42 08 sub 0x8(%edx),%eax 10d2ff: 03 45 0c add 0xc(%ebp),%eax _ISR_Disable( level ); 10d302: 9c pushf 10d303: fa cli 10d304: 5e pop %esi if ( information->maximum >= index ) { 10d305: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10d309: 39 c8 cmp %ecx,%eax 10d30b: 77 1b ja 10d328 <_Objects_Get_isr_disable+0x3c> if ( (the_object = information->local_table[ index ]) != NULL ) { 10d30d: 8b 52 1c mov 0x1c(%edx),%edx 10d310: 8b 04 82 mov (%edx,%eax,4),%eax 10d313: 85 c0 test %eax,%eax 10d315: 74 21 je 10d338 <_Objects_Get_isr_disable+0x4c> *location = OBJECTS_LOCAL; 10d317: c7 03 00 00 00 00 movl $0x0,(%ebx) *level_p = level; 10d31d: 8b 55 14 mov 0x14(%ebp),%edx 10d320: 89 32 mov %esi,(%edx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10d322: 5b pop %ebx 10d323: 5e pop %esi 10d324: c9 leave 10d325: c3 ret 10d326: 66 90 xchg %ax,%ax } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 10d328: 56 push %esi 10d329: 9d popf *location = OBJECTS_ERROR; 10d32a: c7 03 01 00 00 00 movl $0x1,(%ebx) 10d330: 31 c0 xor %eax,%eax _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10d332: 5b pop %ebx 10d333: 5e pop %esi 10d334: c9 leave 10d335: c3 ret 10d336: 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 ); 10d338: 56 push %esi 10d339: 9d popf *location = OBJECTS_ERROR; 10d33a: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10d340: eb e0 jmp 10d322 <_Objects_Get_isr_disable+0x36> =============================================================================== 00119524 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 119524: 55 push %ebp 119525: 89 e5 mov %esp,%ebp 119527: 57 push %edi 119528: 56 push %esi 119529: 53 push %ebx 11952a: 83 ec 2c sub $0x2c,%esp 11952d: 8b 7d 08 mov 0x8(%ebp),%edi 119530: 8b 75 0c mov 0xc(%ebp),%esi 119533: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 119536: 85 f6 test %esi,%esi 119538: 75 0e jne 119548 <_Objects_Get_name_as_string+0x24> } } *d = '\0'; _Thread_Enable_dispatch(); return name; 11953a: 31 db xor %ebx,%ebx } return NULL; /* unreachable path */ } 11953c: 89 d8 mov %ebx,%eax 11953e: 8d 65 f4 lea -0xc(%ebp),%esp 119541: 5b pop %ebx 119542: 5e pop %esi 119543: 5f pop %edi 119544: c9 leave 119545: c3 ret 119546: 66 90 xchg %ax,%ax Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 119548: 85 db test %ebx,%ebx 11954a: 74 f0 je 11953c <_Objects_Get_name_as_string+0x18> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 11954c: 85 ff test %edi,%edi 11954e: 75 08 jne 119558 <_Objects_Get_name_as_string+0x34> 119550: a1 38 4d 13 00 mov 0x134d38,%eax 119555: 8b 78 08 mov 0x8(%eax),%edi information = _Objects_Get_information_id( tmpId ); 119558: 83 ec 0c sub $0xc,%esp 11955b: 57 push %edi 11955c: e8 bf 89 ff ff call 111f20 <_Objects_Get_information_id> if ( !information ) 119561: 83 c4 10 add $0x10,%esp 119564: 85 c0 test %eax,%eax 119566: 74 d2 je 11953a <_Objects_Get_name_as_string+0x16><== NEVER TAKEN return NULL; the_object = _Objects_Get( information, tmpId, &location ); 119568: 51 push %ecx 119569: 8d 55 e4 lea -0x1c(%ebp),%edx 11956c: 52 push %edx 11956d: 57 push %edi 11956e: 50 push %eax 11956f: e8 6c 8a ff ff call 111fe0 <_Objects_Get> switch ( location ) { 119574: 83 c4 10 add $0x10,%esp 119577: 8b 55 e4 mov -0x1c(%ebp),%edx 11957a: 85 d2 test %edx,%edx 11957c: 75 bc jne 11953a <_Objects_Get_name_as_string+0x16><== NEVER TAKEN if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 11957e: 8b 50 0c mov 0xc(%eax),%edx lname[ 0 ] = (u32_name >> 24) & 0xff; 119581: 89 d1 mov %edx,%ecx 119583: c1 e9 18 shr $0x18,%ecx 119586: 88 c8 mov %cl,%al 119588: 88 4d df mov %cl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 11958b: 89 d1 mov %edx,%ecx 11958d: c1 e9 10 shr $0x10,%ecx 119590: 88 4d e0 mov %cl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 119593: 89 d1 mov %edx,%ecx 119595: c1 e9 08 shr $0x8,%ecx 119598: 88 4d e1 mov %cl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 11959b: 88 55 e2 mov %dl,-0x1e(%ebp) lname[ 4 ] = '\0'; 11959e: c6 45 e3 00 movb $0x0,-0x1d(%ebp) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 1195a2: 4e dec %esi 1195a3: 89 75 d4 mov %esi,-0x2c(%ebp) 1195a6: 74 3c je 1195e4 <_Objects_Get_name_as_string+0xc0><== NEVER TAKEN 1195a8: 84 c0 test %al,%al 1195aa: 74 38 je 1195e4 <_Objects_Get_name_as_string+0xc0> 1195ac: 89 d9 mov %ebx,%ecx 1195ae: 31 d2 xor %edx,%edx 1195b0: eb 0a jmp 1195bc <_Objects_Get_name_as_string+0x98> 1195b2: 66 90 xchg %ax,%ax 1195b4: 8a 44 15 df mov -0x21(%ebp,%edx,1),%al 1195b8: 84 c0 test %al,%al 1195ba: 74 1b je 1195d7 <_Objects_Get_name_as_string+0xb3> *d = (isprint((unsigned char)*s)) ? *s : '*'; 1195bc: 0f b6 f0 movzbl %al,%esi 1195bf: 8b 3d d8 22 13 00 mov 0x1322d8,%edi 1195c5: f6 44 37 01 97 testb $0x97,0x1(%edi,%esi,1) 1195ca: 75 02 jne 1195ce <_Objects_Get_name_as_string+0xaa> 1195cc: b0 2a mov $0x2a,%al 1195ce: 88 01 mov %al,(%ecx) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 1195d0: 42 inc %edx 1195d1: 41 inc %ecx 1195d2: 3b 55 d4 cmp -0x2c(%ebp),%edx 1195d5: 72 dd jb 1195b4 <_Objects_Get_name_as_string+0x90> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 1195d7: c6 01 00 movb $0x0,(%ecx) _Thread_Enable_dispatch(); 1195da: e8 b1 92 ff ff call 112890 <_Thread_Enable_dispatch> return name; 1195df: e9 58 ff ff ff jmp 11953c <_Objects_Get_name_as_string+0x18> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 1195e4: 89 d9 mov %ebx,%ecx 1195e6: eb ef jmp 1195d7 <_Objects_Get_name_as_string+0xb3> =============================================================================== 0011c2ec <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 11c2ec: 55 push %ebp 11c2ed: 89 e5 mov %esp,%ebp 11c2ef: 57 push %edi 11c2f0: 56 push %esi 11c2f1: 53 push %ebx 11c2f2: 83 ec 0c sub $0xc,%esp 11c2f5: 8b 5d 08 mov 0x8(%ebp),%ebx 11c2f8: 8b 75 0c mov 0xc(%ebp),%esi 11c2fb: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Control *object; Objects_Id next_id; if ( !information ) 11c2fe: 85 db test %ebx,%ebx 11c300: 75 0a jne 11c30c <_Objects_Get_next+0x20> *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; 11c302: 31 c0 xor %eax,%eax } 11c304: 8d 65 f4 lea -0xc(%ebp),%esp 11c307: 5b pop %ebx 11c308: 5e pop %esi 11c309: 5f pop %edi 11c30a: c9 leave 11c30b: c3 ret Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 11c30c: 85 ff test %edi,%edi 11c30e: 74 f2 je 11c302 <_Objects_Get_next+0x16> return NULL; if ( !next_id_p ) 11c310: 8b 45 14 mov 0x14(%ebp),%eax 11c313: 85 c0 test %eax,%eax 11c315: 74 eb je 11c302 <_Objects_Get_next+0x16> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 11c317: 66 85 f6 test %si,%si 11c31a: 75 04 jne 11c320 <_Objects_Get_next+0x34> next_id = information->minimum_id; 11c31c: 8b 73 08 mov 0x8(%ebx),%esi 11c31f: 90 nop else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 11c320: 66 39 73 10 cmp %si,0x10(%ebx) 11c324: 72 22 jb 11c348 <_Objects_Get_next+0x5c> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 11c326: 51 push %ecx 11c327: 57 push %edi 11c328: 56 push %esi 11c329: 53 push %ebx 11c32a: e8 b1 5c ff ff call 111fe0 <_Objects_Get> next_id++; 11c32f: 46 inc %esi } while (*location_p != OBJECTS_LOCAL); 11c330: 83 c4 10 add $0x10,%esp 11c333: 8b 17 mov (%edi),%edx 11c335: 85 d2 test %edx,%edx 11c337: 75 e7 jne 11c320 <_Objects_Get_next+0x34> *next_id_p = next_id; 11c339: 8b 55 14 mov 0x14(%ebp),%edx 11c33c: 89 32 mov %esi,(%edx) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 11c33e: 8d 65 f4 lea -0xc(%ebp),%esp 11c341: 5b pop %ebx 11c342: 5e pop %esi 11c343: 5f pop %edi 11c344: c9 leave 11c345: c3 ret 11c346: 66 90 xchg %ax,%ax do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 11c348: c7 07 01 00 00 00 movl $0x1,(%edi) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 11c34e: 8b 45 14 mov 0x14(%ebp),%eax 11c351: c7 00 ff ff ff ff movl $0xffffffff,(%eax) 11c357: 31 c0 xor %eax,%eax return 0; 11c359: eb a9 jmp 11c304 <_Objects_Get_next+0x18> =============================================================================== 0011b844 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 11b844: 55 push %ebp 11b845: 89 e5 mov %esp,%ebp 11b847: 53 push %ebx 11b848: 8b 55 08 mov 0x8(%ebp),%edx 11b84b: 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; 11b84e: b8 01 00 00 00 mov $0x1,%eax 11b853: 2b 42 08 sub 0x8(%edx),%eax 11b856: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 11b859: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 11b85d: 39 c8 cmp %ecx,%eax 11b85f: 77 13 ja 11b874 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 11b861: 8b 52 1c mov 0x1c(%edx),%edx 11b864: 8b 04 82 mov (%edx,%eax,4),%eax 11b867: 85 c0 test %eax,%eax 11b869: 74 09 je 11b874 <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 11b86b: 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; } 11b871: 5b pop %ebx 11b872: c9 leave 11b873: 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; 11b874: c7 03 01 00 00 00 movl $0x1,(%ebx) 11b87a: 31 c0 xor %eax,%eax return NULL; } 11b87c: 5b pop %ebx 11b87d: c9 leave 11b87e: c3 ret =============================================================================== 00112048 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 112048: 55 push %ebp 112049: 89 e5 mov %esp,%ebp 11204b: 83 ec 18 sub $0x18,%esp 11204e: 8b 55 08 mov 0x8(%ebp),%edx /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 112051: 85 d2 test %edx,%edx 112053: 75 08 jne 11205d <_Objects_Id_to_name+0x15> 112055: a1 38 4d 13 00 mov 0x134d38,%eax 11205a: 8b 50 08 mov 0x8(%eax),%edx */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 11205d: 89 d0 mov %edx,%eax 11205f: c1 e8 18 shr $0x18,%eax 112062: 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 ) 112065: 8d 48 ff lea -0x1(%eax),%ecx 112068: 83 f9 03 cmp $0x3,%ecx 11206b: 77 3b ja 1120a8 <_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 ] ) 11206d: 8b 04 85 4c 4c 13 00 mov 0x134c4c(,%eax,4),%eax 112074: 85 c0 test %eax,%eax 112076: 74 30 je 1120a8 <_Objects_Id_to_name+0x60> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 112078: 89 d1 mov %edx,%ecx 11207a: c1 e9 1b shr $0x1b,%ecx 11207d: 8b 04 88 mov (%eax,%ecx,4),%eax if ( !information ) 112080: 85 c0 test %eax,%eax 112082: 74 24 je 1120a8 <_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 ); 112084: 51 push %ecx 112085: 8d 4d f4 lea -0xc(%ebp),%ecx 112088: 51 push %ecx 112089: 52 push %edx 11208a: 50 push %eax 11208b: e8 50 ff ff ff call 111fe0 <_Objects_Get> if ( !the_object ) 112090: 83 c4 10 add $0x10,%esp 112093: 85 c0 test %eax,%eax 112095: 74 11 je 1120a8 <_Objects_Id_to_name+0x60> return OBJECTS_INVALID_ID; *name = the_object->name; 112097: 8b 50 0c mov 0xc(%eax),%edx 11209a: 8b 45 0c mov 0xc(%ebp),%eax 11209d: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 11209f: e8 ec 07 00 00 call 112890 <_Thread_Enable_dispatch> 1120a4: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 1120a6: c9 leave 1120a7: c3 ret if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 1120a8: b8 03 00 00 00 mov $0x3,%eax } 1120ad: c9 leave 1120ae: c3 ret =============================================================================== 0010d3ac <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10d3ac: 55 push %ebp 10d3ad: 89 e5 mov %esp,%ebp 10d3af: 57 push %edi 10d3b0: 56 push %esi 10d3b1: 53 push %ebx 10d3b2: 83 ec 0c sub $0xc,%esp 10d3b5: 8b 45 08 mov 0x8(%ebp),%eax 10d3b8: 8b 55 0c mov 0xc(%ebp),%edx 10d3bb: 8b 5d 10 mov 0x10(%ebp),%ebx 10d3be: 8b 75 20 mov 0x20(%ebp),%esi 10d3c1: 0f b7 7d 18 movzwl 0x18(%ebp),%edi uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 10d3c5: 89 10 mov %edx,(%eax) information->the_class = the_class; 10d3c7: 66 89 58 04 mov %bx,0x4(%eax) information->size = size; 10d3cb: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10d3ce: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10d3d5: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10d3dc: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10d3e3: 66 c7 40 2c 00 00 movw $0x0,0x2c(%eax) /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; 10d3e9: 66 c7 40 10 00 00 movw $0x0,0x10(%eax) /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 10d3ef: 8b 3c 95 2c 73 12 00 mov 0x12732c(,%edx,4),%edi 10d3f6: 89 04 9f mov %eax,(%edi,%ebx,4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 10d3f9: 8b 7d 14 mov 0x14(%ebp),%edi 10d3fc: c1 ef 1f shr $0x1f,%edi _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 10d3ff: 89 f9 mov %edi,%ecx 10d401: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10d404: 8b 4d 14 mov 0x14(%ebp),%ecx 10d407: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10d40d: 85 ff test %edi,%edi 10d40f: 74 04 je 10d415 <_Objects_Initialize_information+0x69> 10d411: 85 c9 test %ecx,%ecx 10d413: 74 6a je 10d47f <_Objects_Initialize_information+0xd3> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10d415: 66 89 48 14 mov %cx,0x14(%eax) /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 10d419: c7 40 1c a4 6f 12 00 movl $0x126fa4,0x1c(%eax) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 10d420: c1 e2 18 shl $0x18,%edx 10d423: 81 ca 00 00 01 00 or $0x10000,%edx 10d429: c1 e3 1b shl $0x1b,%ebx 10d42c: 09 da or %ebx,%edx 10d42e: 31 db xor %ebx,%ebx 10d430: 85 c9 test %ecx,%ecx 10d432: 0f 95 c3 setne %bl 10d435: 09 da or %ebx,%edx 10d437: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10d43a: f7 c6 03 00 00 00 test $0x3,%esi 10d440: 75 26 jne 10d468 <_Objects_Initialize_information+0xbc><== NEVER TAKEN name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10d442: 66 89 70 38 mov %si,0x38(%eax) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10d446: 8d 50 24 lea 0x24(%eax),%edx 10d449: 89 50 20 mov %edx,0x20(%eax) the_chain->permanent_null = NULL; 10d44c: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) the_chain->last = _Chain_Head(the_chain); 10d453: 8d 50 20 lea 0x20(%eax),%edx 10d456: 89 50 28 mov %edx,0x28(%eax) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10d459: 85 c9 test %ecx,%ecx 10d45b: 75 13 jne 10d470 <_Objects_Initialize_information+0xc4> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10d45d: 8d 65 f4 lea -0xc(%ebp),%esp 10d460: 5b pop %ebx 10d461: 5e pop %esi 10d462: 5f pop %edi 10d463: c9 leave 10d464: c3 ret 10d465: 8d 76 00 lea 0x0(%esi),%esi * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 10d468: 83 c6 04 add $0x4,%esi <== NOT EXECUTED 10d46b: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED 10d46e: eb d2 jmp 10d442 <_Objects_Initialize_information+0x96><== NOT EXECUTED /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 10d470: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10d473: 8d 65 f4 lea -0xc(%ebp),%esp 10d476: 5b pop %ebx 10d477: 5e pop %esi 10d478: 5f pop %edi 10d479: c9 leave /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 10d47a: e9 b9 fa ff ff jmp 10cf38 <_Objects_Extend_information> /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 10d47f: 50 push %eax 10d480: 6a 14 push $0x14 10d482: 6a 01 push $0x1 10d484: 6a 00 push $0x0 10d486: e8 71 f9 ff ff call 10cdfc <_Internal_error_Occurred> =============================================================================== 0010d49c <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10d49c: 55 push %ebp 10d49d: 89 e5 mov %esp,%ebp 10d49f: 57 push %edi 10d4a0: 56 push %esi 10d4a1: 53 push %ebx 10d4a2: 8b 45 08 mov 0x8(%ebp),%eax 10d4a5: 8b 4d 0c mov 0xc(%ebp),%ecx 10d4a8: 8b 55 10 mov 0x10(%ebp),%edx 10d4ab: 8b 7d 14 mov 0x14(%ebp),%edi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10d4ae: 85 ff test %edi,%edi 10d4b0: 74 56 je 10d508 <_Objects_Name_to_id_u32+0x6c> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10d4b2: 85 c9 test %ecx,%ecx 10d4b4: 74 08 je 10d4be <_Objects_Name_to_id_u32+0x22> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10d4b6: 8b 70 10 mov 0x10(%eax),%esi 10d4b9: 66 85 f6 test %si,%si 10d4bc: 75 0a jne 10d4c8 <_Objects_Name_to_id_u32+0x2c> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10d4be: b8 01 00 00 00 mov $0x1,%eax name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 10d4c3: 5b pop %ebx 10d4c4: 5e pop %esi 10d4c5: 5f pop %edi 10d4c6: c9 leave 10d4c7: c3 ret if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10d4c8: 85 d2 test %edx,%edx 10d4ca: 75 20 jne 10d4ec <_Objects_Name_to_id_u32+0x50> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10d4cc: 0f b7 f6 movzwl %si,%esi 10d4cf: 8b 58 1c mov 0x1c(%eax),%ebx 10d4d2: b8 01 00 00 00 mov $0x1,%eax 10d4d7: 90 nop the_object = information->local_table[ index ]; 10d4d8: 8b 14 83 mov (%ebx,%eax,4),%edx if ( !the_object ) 10d4db: 85 d2 test %edx,%edx 10d4dd: 74 05 je 10d4e4 <_Objects_Name_to_id_u32+0x48> continue; if ( name == the_object->name.name_u32 ) { 10d4df: 39 4a 0c cmp %ecx,0xc(%edx) 10d4e2: 74 18 je 10d4fc <_Objects_Name_to_id_u32+0x60> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10d4e4: 40 inc %eax 10d4e5: 39 c6 cmp %eax,%esi 10d4e7: 73 ef jae 10d4d8 <_Objects_Name_to_id_u32+0x3c> 10d4e9: eb d3 jmp 10d4be <_Objects_Name_to_id_u32+0x22> 10d4eb: 90 nop if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10d4ec: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10d4f2: 74 d8 je 10d4cc <_Objects_Name_to_id_u32+0x30> 10d4f4: 4a dec %edx 10d4f5: 75 c7 jne 10d4be <_Objects_Name_to_id_u32+0x22> 10d4f7: eb d3 jmp 10d4cc <_Objects_Name_to_id_u32+0x30> 10d4f9: 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; 10d4fc: 8b 42 08 mov 0x8(%edx),%eax 10d4ff: 89 07 mov %eax,(%edi) 10d501: 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 } 10d503: 5b pop %ebx 10d504: 5e pop %esi 10d505: 5f pop %edi 10d506: c9 leave 10d507: c3 ret Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10d508: 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 } 10d50d: 5b pop %ebx 10d50e: 5e pop %esi 10d50f: 5f pop %edi 10d510: c9 leave 10d511: c3 ret =============================================================================== 0010f2d4 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10f2d4: 55 push %ebp 10f2d5: 89 e5 mov %esp,%ebp 10f2d7: 53 push %ebx 10f2d8: 83 ec 0c sub $0xc,%esp 10f2db: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10f2de: 8b 45 08 mov 0x8(%ebp),%eax 10f2e1: 0f b7 40 38 movzwl 0x38(%eax),%eax 10f2e5: 50 push %eax 10f2e6: 53 push %ebx 10f2e7: e8 2c 7b 00 00 call 116e18 d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10f2ec: 0f be 0b movsbl (%ebx),%ecx 10f2ef: c1 e1 18 shl $0x18,%ecx 10f2f2: 83 c4 10 add $0x10,%esp 10f2f5: 83 f8 01 cmp $0x1,%eax 10f2f8: 76 32 jbe 10f32c <_Objects_Set_name+0x58> 10f2fa: 0f be 53 01 movsbl 0x1(%ebx),%edx 10f2fe: c1 e2 10 shl $0x10,%edx 10f301: 09 ca or %ecx,%edx 10f303: 83 f8 02 cmp $0x2,%eax 10f306: 74 2c je 10f334 <_Objects_Set_name+0x60> 10f308: 0f be 4b 02 movsbl 0x2(%ebx),%ecx 10f30c: c1 e1 08 shl $0x8,%ecx 10f30f: 09 d1 or %edx,%ecx 10f311: 83 f8 03 cmp $0x3,%eax 10f314: 74 37 je 10f34d <_Objects_Set_name+0x79> 10f316: 0f be 43 03 movsbl 0x3(%ebx),%eax 10f31a: 09 c1 or %eax,%ecx 10f31c: 8b 55 0c mov 0xc(%ebp),%edx 10f31f: 89 4a 0c mov %ecx,0xc(%edx) ); } return true; } 10f322: b0 01 mov $0x1,%al 10f324: 8b 5d fc mov -0x4(%ebp),%ebx 10f327: c9 leave 10f328: c3 ret 10f329: 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( 10f32c: 89 ca mov %ecx,%edx 10f32e: 81 ca 00 00 20 00 or $0x200000,%edx 10f334: 89 d1 mov %edx,%ecx 10f336: 80 cd 20 or $0x20,%ch 10f339: b8 20 00 00 00 mov $0x20,%eax 10f33e: 09 c1 or %eax,%ecx 10f340: 8b 55 0c mov 0xc(%ebp),%edx 10f343: 89 4a 0c mov %ecx,0xc(%edx) ); } return true; } 10f346: b0 01 mov $0x1,%al 10f348: 8b 5d fc mov -0x4(%ebp),%ebx 10f34b: c9 leave 10f34c: c3 ret d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10f34d: b0 20 mov $0x20,%al 10f34f: eb c9 jmp 10f31a <_Objects_Set_name+0x46> =============================================================================== 0010d514 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10d514: 55 push %ebp 10d515: 89 e5 mov %esp,%ebp 10d517: 57 push %edi 10d518: 56 push %esi 10d519: 53 push %ebx 10d51a: 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 ); 10d51d: 8b 45 08 mov 0x8(%ebp),%eax 10d520: 0f b7 58 08 movzwl 0x8(%eax),%ebx block_count = (information->maximum - index_base) / 10d524: 0f b7 48 14 movzwl 0x14(%eax),%ecx 10d528: 0f b7 40 10 movzwl 0x10(%eax),%eax 10d52c: 29 d8 sub %ebx,%eax 10d52e: 31 d2 xor %edx,%edx 10d530: f7 f1 div %ecx information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10d532: 85 c0 test %eax,%eax 10d534: 74 21 je 10d557 <_Objects_Shrink_information+0x43><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 10d536: 8b 55 08 mov 0x8(%ebp),%edx 10d539: 8b 7a 30 mov 0x30(%edx),%edi 10d53c: 3b 0f cmp (%edi),%ecx 10d53e: 74 1f je 10d55f <_Objects_Shrink_information+0x4b><== NEVER TAKEN information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 10d540: 31 d2 xor %edx,%edx 10d542: eb 0e jmp 10d552 <_Objects_Shrink_information+0x3e> } index_base += information->allocation_size; 10d544: 01 cb add %ecx,%ebx 10d546: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 10d54d: 3b 0c 97 cmp (%edi,%edx,4),%ecx 10d550: 74 12 je 10d564 <_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++ ) { 10d552: 42 inc %edx 10d553: 39 d0 cmp %edx,%eax 10d555: 77 ed ja 10d544 <_Objects_Shrink_information+0x30> return; } index_base += information->allocation_size; } } 10d557: 8d 65 f4 lea -0xc(%ebp),%esp 10d55a: 5b pop %ebx 10d55b: 5e pop %esi 10d55c: 5f pop %edi 10d55d: c9 leave 10d55e: 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 ] == 10d55f: 31 f6 xor %esi,%esi 10d561: 8d 76 00 lea 0x0(%esi),%esi information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 10d564: 8b 55 08 mov 0x8(%ebp),%edx 10d567: 8b 42 20 mov 0x20(%edx),%eax 10d56a: 89 75 e4 mov %esi,-0x1c(%ebp) 10d56d: eb 07 jmp 10d576 <_Objects_Shrink_information+0x62> 10d56f: 90 nop if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 10d570: 85 ff test %edi,%edi 10d572: 74 2c je 10d5a0 <_Objects_Shrink_information+0x8c> 10d574: 89 f8 mov %edi,%eax * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id ); 10d576: 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; 10d57a: 8b 38 mov (%eax),%edi if ((index >= index_base) && 10d57c: 39 da cmp %ebx,%edx 10d57e: 72 f0 jb 10d570 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { 10d580: 8b 75 08 mov 0x8(%ebp),%esi 10d583: 0f b7 4e 14 movzwl 0x14(%esi),%ecx 10d587: 8d 0c 0b lea (%ebx,%ecx,1),%ecx 10d58a: 39 ca cmp %ecx,%edx 10d58c: 73 e2 jae 10d570 <_Objects_Shrink_information+0x5c> _Chain_Extract( &extract_me->Node ); 10d58e: 83 ec 0c sub $0xc,%esp 10d591: 50 push %eax 10d592: e8 15 f0 ff ff call 10c5ac <_Chain_Extract> 10d597: 83 c4 10 add $0x10,%esp } } while ( the_object ); 10d59a: 85 ff test %edi,%edi 10d59c: 75 d6 jne 10d574 <_Objects_Shrink_information+0x60> 10d59e: 66 90 xchg %ax,%ax 10d5a0: 8b 75 e4 mov -0x1c(%ebp),%esi /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10d5a3: 83 ec 0c sub $0xc,%esp 10d5a6: 8b 55 08 mov 0x8(%ebp),%edx 10d5a9: 8b 42 34 mov 0x34(%edx),%eax 10d5ac: ff 34 30 pushl (%eax,%esi,1) 10d5af: e8 20 17 00 00 call 10ecd4 <_Workspace_Free> information->object_blocks[ block ] = NULL; 10d5b4: 8b 55 08 mov 0x8(%ebp),%edx 10d5b7: 8b 42 34 mov 0x34(%edx),%eax 10d5ba: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive_per_block[ block ] = 0; 10d5c1: 8b 42 30 mov 0x30(%edx),%eax 10d5c4: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive -= information->allocation_size; 10d5cb: 8b 42 14 mov 0x14(%edx),%eax 10d5ce: 66 29 42 2c sub %ax,0x2c(%edx) return; 10d5d2: 83 c4 10 add $0x10,%esp } index_base += information->allocation_size; } } 10d5d5: 8d 65 f4 lea -0xc(%ebp),%esp 10d5d8: 5b pop %ebx 10d5d9: 5e pop %esi 10d5da: 5f pop %edi 10d5db: c9 leave 10d5dc: c3 ret =============================================================================== 00100220 <_Partition_Manager_initialization>: #include #include #include void _Partition_Manager_initialization(void) { 100220: 55 push %ebp 100221: 89 e5 mov %esp,%ebp } 100223: c9 leave 100224: c3 ret =============================================================================== 0013147c <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 13147c: 55 push %ebp 13147d: 89 e5 mov %esp,%ebp 13147f: 56 push %esi 131480: 53 push %ebx 131481: 8b 5d 08 mov 0x8(%ebp),%ebx 131484: 8b 75 0c mov 0xc(%ebp),%esi if ( !the_heap ) 131487: 85 db test %ebx,%ebx 131489: 74 35 je 1314c0 <_Protected_heap_Get_information+0x44> return false; if ( !the_info ) 13148b: 85 f6 test %esi,%esi 13148d: 74 31 je 1314c0 <_Protected_heap_Get_information+0x44> return false; _RTEMS_Lock_allocator(); 13148f: 83 ec 0c sub $0xc,%esp 131492: ff 35 70 2f 17 00 pushl 0x172f70 131498: e8 fb 24 fe ff call 113998 <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 13149d: 5a pop %edx 13149e: 59 pop %ecx 13149f: 56 push %esi 1314a0: 53 push %ebx 1314a1: e8 ce 28 01 00 call 143d74 <_Heap_Get_information> _RTEMS_Unlock_allocator(); 1314a6: 58 pop %eax 1314a7: ff 35 70 2f 17 00 pushl 0x172f70 1314ad: e8 2e 25 fe ff call 1139e0 <_API_Mutex_Unlock> 1314b2: b0 01 mov $0x1,%al return true; 1314b4: 83 c4 10 add $0x10,%esp } 1314b7: 8d 65 f8 lea -0x8(%ebp),%esp 1314ba: 5b pop %ebx 1314bb: 5e pop %esi 1314bc: c9 leave 1314bd: c3 ret 1314be: 66 90 xchg %ax,%ax _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); return true; 1314c0: 31 c0 xor %eax,%eax } 1314c2: 8d 65 f8 lea -0x8(%ebp),%esp 1314c5: 5b pop %ebx 1314c6: 5e pop %esi 1314c7: c9 leave 1314c8: c3 ret =============================================================================== 00110e48 <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 110e48: 55 push %ebp 110e49: 89 e5 mov %esp,%ebp 110e4b: 56 push %esi 110e4c: 53 push %ebx 110e4d: 83 ec 10 sub $0x10,%esp 110e50: 8b 5d 08 mov 0x8(%ebp),%ebx 110e53: 8b 75 0c mov 0xc(%ebp),%esi 110e56: 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 ) { 110e59: 8b 15 58 dc 12 00 mov 0x12dc58,%edx 110e5f: 85 d2 test %edx,%edx 110e61: 74 19 je 110e7c <_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 ); 110e63: 0f b6 c0 movzbl %al,%eax 110e66: 89 45 10 mov %eax,0x10(%ebp) 110e69: 89 75 0c mov %esi,0xc(%ebp) 110e6c: 89 5d 08 mov %ebx,0x8(%ebp) } return status; } 110e6f: 8d 65 f8 lea -0x8(%ebp),%esp 110e72: 5b pop %ebx 110e73: 5e pop %esi 110e74: 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 ); 110e75: e9 1e f2 ff ff jmp 110098 <_Heap_Walk> 110e7a: 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(); 110e7c: 83 ec 0c sub $0xc,%esp 110e7f: ff 35 10 dd 12 00 pushl 0x12dd10 110e85: 88 45 f4 mov %al,-0xc(%ebp) 110e88: e8 7b e4 ff ff call 10f308 <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 110e8d: 83 c4 0c add $0xc,%esp 110e90: 8a 45 f4 mov -0xc(%ebp),%al 110e93: 0f b6 c0 movzbl %al,%eax 110e96: 50 push %eax 110e97: 56 push %esi 110e98: 53 push %ebx 110e99: e8 fa f1 ff ff call 110098 <_Heap_Walk> _RTEMS_Unlock_allocator(); 110e9e: 5a pop %edx 110e9f: ff 35 10 dd 12 00 pushl 0x12dd10 110ea5: 88 45 f4 mov %al,-0xc(%ebp) 110ea8: e8 a3 e4 ff ff call 10f350 <_API_Mutex_Unlock> 110ead: 83 c4 10 add $0x10,%esp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 110eb0: 8a 45 f4 mov -0xc(%ebp),%al 110eb3: 8d 65 f8 lea -0x8(%ebp),%esp 110eb6: 5b pop %ebx 110eb7: 5e pop %esi 110eb8: c9 leave 110eb9: c3 ret =============================================================================== 001113b0 <_RTEMS_tasks_Initialize_user_tasks>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks( void ) { 1113b0: 55 push %ebp 1113b1: 89 e5 mov %esp,%ebp 1113b3: 83 ec 08 sub $0x8,%esp if ( _RTEMS_tasks_Initialize_user_tasks_p ) 1113b6: a1 60 32 12 00 mov 0x123260,%eax 1113bb: 85 c0 test %eax,%eax 1113bd: 74 05 je 1113c4 <_RTEMS_tasks_Initialize_user_tasks+0x14> (*_RTEMS_tasks_Initialize_user_tasks_p)(); } 1113bf: c9 leave */ void _RTEMS_tasks_Initialize_user_tasks( void ) { if ( _RTEMS_tasks_Initialize_user_tasks_p ) (*_RTEMS_tasks_Initialize_user_tasks_p)(); 1113c0: ff e0 jmp *%eax 1113c2: 66 90 xchg %ax,%ax } 1113c4: c9 leave 1113c5: c3 ret =============================================================================== 0010c0b0 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 10c0b0: 55 push %ebp 10c0b1: 89 e5 mov %esp,%ebp 10c0b3: 57 push %edi 10c0b4: 56 push %esi 10c0b5: 53 push %ebx 10c0b6: 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; 10c0b9: 8b 1d 0c 32 12 00 mov 0x12320c,%ebx maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 10c0bf: 8b 3d 08 32 12 00 mov 0x123208,%edi /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 10c0c5: 85 db test %ebx,%ebx 10c0c7: 74 46 je 10c10f <_RTEMS_tasks_Initialize_user_tasks_body+0x5f> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10c0c9: 85 ff test %edi,%edi 10c0cb: 74 42 je 10c10f <_RTEMS_tasks_Initialize_user_tasks_body+0x5f><== NEVER TAKEN 10c0cd: 31 f6 xor %esi,%esi 10c0cf: 90 nop return_value = rtems_task_create( 10c0d0: 83 ec 08 sub $0x8,%esp 10c0d3: 8d 45 e4 lea -0x1c(%ebp),%eax 10c0d6: 50 push %eax 10c0d7: ff 73 0c pushl 0xc(%ebx) 10c0da: ff 73 14 pushl 0x14(%ebx) 10c0dd: ff 73 04 pushl 0x4(%ebx) 10c0e0: ff 73 08 pushl 0x8(%ebx) 10c0e3: ff 33 pushl (%ebx) 10c0e5: e8 96 fd ff ff call 10be80 user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 10c0ea: 83 c4 20 add $0x20,%esp 10c0ed: 85 c0 test %eax,%eax 10c0ef: 75 26 jne 10c117 <_RTEMS_tasks_Initialize_user_tasks_body+0x67> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 10c0f1: 51 push %ecx 10c0f2: ff 73 18 pushl 0x18(%ebx) 10c0f5: ff 73 10 pushl 0x10(%ebx) 10c0f8: ff 75 e4 pushl -0x1c(%ebp) 10c0fb: e8 24 00 00 00 call 10c124 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 10c100: 83 c4 10 add $0x10,%esp 10c103: 85 c0 test %eax,%eax 10c105: 75 10 jne 10c117 <_RTEMS_tasks_Initialize_user_tasks_body+0x67> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10c107: 46 inc %esi 10c108: 83 c3 1c add $0x1c,%ebx 10c10b: 39 f7 cmp %esi,%edi 10c10d: 77 c1 ja 10c0d0 <_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 ); } } 10c10f: 8d 65 f4 lea -0xc(%ebp),%esp 10c112: 5b pop %ebx 10c113: 5e pop %esi 10c114: 5f pop %edi 10c115: c9 leave 10c116: 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 ); 10c117: 52 push %edx 10c118: 50 push %eax 10c119: 6a 01 push $0x1 10c11b: 6a 01 push $0x1 10c11d: e8 da 0c 00 00 call 10cdfc <_Internal_error_Occurred> =============================================================================== 0011140c <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 11140c: 55 push %ebp 11140d: 89 e5 mov %esp,%ebp 11140f: 57 push %edi 111410: 56 push %esi 111411: 53 push %ebx 111412: 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 ]; 111415: 8b 45 08 mov 0x8(%ebp),%eax 111418: 8b 98 f0 00 00 00 mov 0xf0(%eax),%ebx if ( !api ) 11141e: 85 db test %ebx,%ebx 111420: 74 45 je 111467 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 111422: 9c pushf 111423: fa cli 111424: 58 pop %eax signal_set = asr->signals_posted; 111425: 8b 73 14 mov 0x14(%ebx),%esi asr->signals_posted = 0; 111428: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 11142f: 50 push %eax 111430: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 111431: 85 f6 test %esi,%esi 111433: 74 32 je 111467 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN return; asr->nest_level += 1; 111435: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 111438: 50 push %eax 111439: 8d 7d e4 lea -0x1c(%ebp),%edi 11143c: 57 push %edi 11143d: 68 ff ff 00 00 push $0xffff 111442: ff 73 10 pushl 0x10(%ebx) 111445: e8 2a 25 00 00 call 113974 (*asr->handler)( signal_set ); 11144a: 89 34 24 mov %esi,(%esp) 11144d: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 111450: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 111453: 83 c4 0c add $0xc,%esp 111456: 57 push %edi 111457: 68 ff ff 00 00 push $0xffff 11145c: ff 75 e4 pushl -0x1c(%ebp) 11145f: e8 10 25 00 00 call 113974 111464: 83 c4 10 add $0x10,%esp } 111467: 8d 65 f4 lea -0xc(%ebp),%esp 11146a: 5b pop %ebx 11146b: 5e pop %esi 11146c: 5f pop %edi 11146d: c9 leave 11146e: c3 ret =============================================================================== 00111368 <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 111368: 55 push %ebp 111369: 89 e5 mov %esp,%ebp /* * Per Task Variables */ tvp = executing->task_variables; 11136b: 8b 45 08 mov 0x8(%ebp),%eax 11136e: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 111374: 85 c0 test %eax,%eax 111376: 74 13 je 11138b <_RTEMS_tasks_Switch_extension+0x23> tvp->tval = *tvp->ptr; 111378: 8b 50 04 mov 0x4(%eax),%edx 11137b: 8b 0a mov (%edx),%ecx 11137d: 89 48 0c mov %ecx,0xc(%eax) *tvp->ptr = tvp->gval; 111380: 8b 48 08 mov 0x8(%eax),%ecx 111383: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 111385: 8b 00 mov (%eax),%eax /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 111387: 85 c0 test %eax,%eax 111389: 75 ed jne 111378 <_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; 11138b: 8b 45 0c mov 0xc(%ebp),%eax 11138e: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 111394: 85 c0 test %eax,%eax 111396: 74 13 je 1113ab <_RTEMS_tasks_Switch_extension+0x43> tvp->gval = *tvp->ptr; 111398: 8b 50 04 mov 0x4(%eax),%edx 11139b: 8b 0a mov (%edx),%ecx 11139d: 89 48 08 mov %ecx,0x8(%eax) *tvp->ptr = tvp->tval; 1113a0: 8b 48 0c mov 0xc(%eax),%ecx 1113a3: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 1113a5: 8b 00 mov (%eax),%eax *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 1113a7: 85 c0 test %eax,%eax 1113a9: 75 ed jne 111398 <_RTEMS_tasks_Switch_extension+0x30><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 1113ab: c9 leave 1113ac: c3 ret =============================================================================== 0014379c <_Rate_monotonic_Initiate_statistics>: } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { 14379c: 55 push %ebp 14379d: 89 e5 mov %esp,%ebp 14379f: 57 push %edi 1437a0: 56 push %esi 1437a1: 53 push %ebx 1437a2: 83 ec 28 sub $0x28,%esp 1437a5: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *owning_thread = the_period->owner; 1437a8: 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 ); 1437ab: 8d 7d e0 lea -0x20(%ebp),%edi 1437ae: 57 push %edi 1437af: e8 e8 d6 fe ff call 130e9c <_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; 1437b4: 8b 45 e0 mov -0x20(%ebp),%eax 1437b7: 8b 55 e4 mov -0x1c(%ebp),%edx 1437ba: 89 43 4c mov %eax,0x4c(%ebx) 1437bd: 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; 1437c0: 8b 86 84 00 00 00 mov 0x84(%esi),%eax 1437c6: 8b 96 88 00 00 00 mov 0x88(%esi),%edx 1437cc: 89 43 44 mov %eax,0x44(%ebx) 1437cf: 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) { 1437d2: 83 c4 10 add $0x10,%esp 1437d5: 3b 35 78 2f 17 00 cmp 0x172f78,%esi 1437db: 74 0b je 1437e8 <_Rate_monotonic_Initiate_statistics+0x4c> ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); } #endif } 1437dd: 8d 65 f4 lea -0xc(%ebp),%esp 1437e0: 5b pop %ebx 1437e1: 5e pop %esi 1437e2: 5f pop %edi 1437e3: c9 leave 1437e4: c3 ret 1437e5: 8d 76 00 lea 0x0(%esi),%esi /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 1437e8: 51 push %ecx 1437e9: 8d 75 d8 lea -0x28(%ebp),%esi 1437ec: 56 push %esi 1437ed: 57 push %edi 1437ee: 68 80 2f 17 00 push $0x172f80 1437f3: e8 80 28 fd ff call 116078 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); 1437f8: 58 pop %eax 1437f9: 5a pop %edx 1437fa: 56 push %esi 1437fb: 83 c3 44 add $0x44,%ebx 1437fe: 53 push %ebx 1437ff: e8 38 28 fd ff call 11603c <_Timespec_Add_to> 143804: 83 c4 10 add $0x10,%esp } #endif } 143807: 8d 65 f4 lea -0xc(%ebp),%esp 14380a: 5b pop %ebx 14380b: 5e pop %esi 14380c: 5f pop %edi 14380d: c9 leave 14380e: c3 ret =============================================================================== 00100240 <_Rate_monotonic_Manager_initialization>: #include #include void _Rate_monotonic_Manager_initialization(void) { 100240: 55 push %ebp 100241: 89 e5 mov %esp,%ebp } 100243: c9 leave 100244: c3 ret =============================================================================== 00143b48 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 143b48: 55 push %ebp 143b49: 89 e5 mov %esp,%ebp 143b4b: 83 ec 2c sub $0x2c,%esp 143b4e: 8d 45 f4 lea -0xc(%ebp),%eax 143b51: 50 push %eax 143b52: ff 75 08 pushl 0x8(%ebp) 143b55: 68 c0 33 17 00 push $0x1733c0 143b5a: e8 c5 0f fd ff call 114b24 <_Objects_Get> /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 143b5f: 83 c4 10 add $0x10,%esp 143b62: 8b 55 f4 mov -0xc(%ebp),%edx 143b65: 85 d2 test %edx,%edx 143b67: 75 29 jne 143b92 <_Rate_monotonic_Timeout+0x4a><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 143b69: 8b 50 40 mov 0x40(%eax),%edx if ( _States_Is_waiting_for_period( the_thread->current_state ) && 143b6c: f6 42 11 40 testb $0x40,0x11(%edx) 143b70: 74 08 je 143b7a <_Rate_monotonic_Timeout+0x32> the_thread->Wait.id == the_period->Object.id ) { 143b72: 8b 4a 20 mov 0x20(%edx),%ecx 143b75: 3b 48 08 cmp 0x8(%eax),%ecx 143b78: 74 4e je 143bc8 <_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 ) { 143b7a: 83 78 38 01 cmpl $0x1,0x38(%eax) 143b7e: 74 14 je 143b94 <_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; 143b80: 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; 143b87: a1 b8 2e 17 00 mov 0x172eb8,%eax 143b8c: 48 dec %eax 143b8d: a3 b8 2e 17 00 mov %eax,0x172eb8 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 143b92: c9 leave 143b93: 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; 143b94: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax) _Rate_monotonic_Initiate_statistics( the_period ); 143b9b: 83 ec 0c sub $0xc,%esp 143b9e: 50 push %eax 143b9f: 89 45 e4 mov %eax,-0x1c(%ebp) 143ba2: e8 f5 fb ff ff call 14379c <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 143ba7: 8b 45 e4 mov -0x1c(%ebp),%eax 143baa: 8b 50 3c mov 0x3c(%eax),%edx 143bad: 89 50 1c mov %edx,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 143bb0: 5a pop %edx 143bb1: 59 pop %ecx 143bb2: 83 c0 10 add $0x10,%eax 143bb5: 50 push %eax 143bb6: 68 98 2f 17 00 push $0x172f98 143bbb: e8 88 27 fd ff call 116348 <_Watchdog_Insert> 143bc0: 83 c4 10 add $0x10,%esp 143bc3: eb c2 jmp 143b87 <_Rate_monotonic_Timeout+0x3f> 143bc5: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 143bc8: 83 ec 08 sub $0x8,%esp 143bcb: 68 f8 ff 03 10 push $0x1003fff8 143bd0: 52 push %edx 143bd1: 89 45 e4 mov %eax,-0x1c(%ebp) 143bd4: e8 9b 14 fd ff call 115074 <_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 ); 143bd9: 8b 45 e4 mov -0x1c(%ebp),%eax 143bdc: 89 04 24 mov %eax,(%esp) 143bdf: eb c1 jmp 143ba2 <_Rate_monotonic_Timeout+0x5a> =============================================================================== 001438a8 <_Rate_monotonic_Update_statistics>: } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 1438a8: 55 push %ebp 1438a9: 89 e5 mov %esp,%ebp 1438ab: 57 push %edi 1438ac: 56 push %esi 1438ad: 53 push %ebx 1438ae: 83 ec 1c sub $0x1c,%esp 1438b1: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 1438b4: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 1438b7: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 1438bb: 0f 84 bf 00 00 00 je 143980 <_Rate_monotonic_Update_statistics+0xd8> /* * Grab status for time statistics. */ valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 1438c1: 52 push %edx 1438c2: 8d 7d e0 lea -0x20(%ebp),%edi 1438c5: 57 push %edi 1438c6: 8d 75 d8 lea -0x28(%ebp),%esi 1438c9: 56 push %esi 1438ca: 53 push %ebx 1438cb: e8 40 ff ff ff call 143810 <_Rate_monotonic_Get_status> if (!valid_status) 1438d0: 83 c4 10 add $0x10,%esp 1438d3: 84 c0 test %al,%al 1438d5: 75 09 jne 1438e0 <_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 } 1438d7: 8d 65 f4 lea -0xc(%ebp),%esp 1438da: 5b pop %ebx 1438db: 5e pop %esi 1438dc: 5f pop %edi 1438dd: c9 leave 1438de: c3 ret 1438df: 90 nop /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 1438e0: 83 ec 08 sub $0x8,%esp 1438e3: 57 push %edi 1438e4: 8d 43 6c lea 0x6c(%ebx),%eax 1438e7: 50 push %eax 1438e8: e8 4f 27 fd ff call 11603c <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 1438ed: 59 pop %ecx 1438ee: 58 pop %eax 1438ef: 8d 43 5c lea 0x5c(%ebx),%eax 1438f2: 50 push %eax 1438f3: 57 push %edi 1438f4: e8 53 06 00 00 call 143f4c <_Timespec_Less_than> 1438f9: 83 c4 10 add $0x10,%esp 1438fc: 84 c0 test %al,%al 1438fe: 74 0c je 14390c <_Rate_monotonic_Update_statistics+0x64> stats->min_cpu_time = executed; 143900: 8b 45 e0 mov -0x20(%ebp),%eax 143903: 8b 55 e4 mov -0x1c(%ebp),%edx 143906: 89 43 5c mov %eax,0x5c(%ebx) 143909: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 14390c: 83 ec 08 sub $0x8,%esp 14390f: 8d 43 64 lea 0x64(%ebx),%eax 143912: 50 push %eax 143913: 57 push %edi 143914: e8 0f 06 00 00 call 143f28 <_Timespec_Greater_than> 143919: 83 c4 10 add $0x10,%esp 14391c: 84 c0 test %al,%al 14391e: 74 0c je 14392c <_Rate_monotonic_Update_statistics+0x84> stats->max_cpu_time = executed; 143920: 8b 45 e0 mov -0x20(%ebp),%eax 143923: 8b 55 e4 mov -0x1c(%ebp),%edx 143926: 89 43 64 mov %eax,0x64(%ebx) 143929: 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 ); 14392c: 83 ec 08 sub $0x8,%esp 14392f: 56 push %esi 143930: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 143936: 50 push %eax 143937: e8 00 27 fd ff call 11603c <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 14393c: 58 pop %eax 14393d: 5a pop %edx 14393e: 8d 43 74 lea 0x74(%ebx),%eax 143941: 50 push %eax 143942: 56 push %esi 143943: e8 04 06 00 00 call 143f4c <_Timespec_Less_than> 143948: 83 c4 10 add $0x10,%esp 14394b: 84 c0 test %al,%al 14394d: 75 39 jne 143988 <_Rate_monotonic_Update_statistics+0xe0> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 14394f: 83 ec 08 sub $0x8,%esp 143952: 8d 43 7c lea 0x7c(%ebx),%eax 143955: 50 push %eax 143956: 56 push %esi 143957: e8 cc 05 00 00 call 143f28 <_Timespec_Greater_than> 14395c: 83 c4 10 add $0x10,%esp 14395f: 84 c0 test %al,%al 143961: 0f 84 70 ff ff ff je 1438d7 <_Rate_monotonic_Update_statistics+0x2f> stats->max_wall_time = since_last_period; 143967: 8b 45 d8 mov -0x28(%ebp),%eax 14396a: 8b 55 dc mov -0x24(%ebp),%edx 14396d: 89 43 7c mov %eax,0x7c(%ebx) 143970: 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 } 143976: 8d 65 f4 lea -0xc(%ebp),%esp 143979: 5b pop %ebx 14397a: 5e pop %esi 14397b: 5f pop %edi 14397c: c9 leave 14397d: c3 ret 14397e: 66 90 xchg %ax,%ax */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 143980: ff 43 58 incl 0x58(%ebx) 143983: e9 39 ff ff ff jmp 1438c1 <_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; 143988: 8b 45 d8 mov -0x28(%ebp),%eax 14398b: 8b 55 dc mov -0x24(%ebp),%edx 14398e: 89 43 74 mov %eax,0x74(%ebx) 143991: 89 53 78 mov %edx,0x78(%ebx) 143994: eb b9 jmp 14394f <_Rate_monotonic_Update_statistics+0xa7> =============================================================================== 00100228 <_Region_Manager_initialization>: #include #include #include void _Region_Manager_initialization(void) { 100228: 55 push %ebp 100229: 89 e5 mov %esp,%ebp } 10022b: c9 leave 10022c: c3 ret =============================================================================== 0010dfe8 <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 10dfe8: 55 push %ebp 10dfe9: 89 e5 mov %esp,%ebp 10dfeb: 53 push %ebx 10dfec: 83 ec 04 sub $0x4,%esp 10dfef: 8b 5d 08 mov 0x8(%ebp),%ebx 10dff2: a1 38 b9 12 00 mov 0x12b938,%eax 10dff7: 40 inc %eax 10dff8: a3 38 b9 12 00 mov %eax,0x12b938 long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 10dffd: a1 cc b9 12 00 mov 0x12b9cc,%eax if ( time->tv_sec < seconds ) 10e002: 8b 13 mov (%ebx),%edx 10e004: 39 d0 cmp %edx,%eax 10e006: 7f 34 jg 10e03c <_TOD_Set+0x54> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 10e008: 51 push %ecx 10e009: 29 c2 sub %eax,%edx 10e00b: 52 push %edx 10e00c: 6a 00 push $0x0 10e00e: 68 0c ba 12 00 push $0x12ba0c 10e013: e8 4c 24 00 00 call 110464 <_Watchdog_Adjust> 10e018: 83 c4 10 add $0x10,%esp _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 10e01b: 8b 03 mov (%ebx),%eax 10e01d: a3 cc b9 12 00 mov %eax,0x12b9cc 10e022: 8b 43 04 mov 0x4(%ebx),%eax 10e025: a3 d0 b9 12 00 mov %eax,0x12b9d0 _TOD_Is_set = true; 10e02a: c6 05 4c b9 12 00 01 movb $0x1,0x12b94c _TOD_Activate(); _Thread_Enable_dispatch(); } 10e031: 8b 5d fc mov -0x4(%ebp),%ebx 10e034: c9 leave _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); 10e035: e9 7e 12 00 00 jmp 10f2b8 <_Thread_Enable_dispatch> 10e03a: 66 90 xchg %ax,%ax 10e03c: 51 push %ecx 10e03d: 29 d0 sub %edx,%eax 10e03f: 50 push %eax 10e040: 6a 01 push $0x1 10e042: 68 0c ba 12 00 push $0x12ba0c 10e047: e8 18 24 00 00 call 110464 <_Watchdog_Adjust> 10e04c: 83 c4 10 add $0x10,%esp 10e04f: eb ca jmp 10e01b <_TOD_Set+0x33> =============================================================================== 0010ca54 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 10ca54: 55 push %ebp 10ca55: 89 e5 mov %esp,%ebp 10ca57: 53 push %ebx 10ca58: 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() ); 10ca5b: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 10ca62: a1 2c 32 12 00 mov 0x12322c,%eax 10ca67: 8d 04 80 lea (%eax,%eax,4),%eax 10ca6a: 8d 04 80 lea (%eax,%eax,4),%eax 10ca6d: 8d 04 80 lea (%eax,%eax,4),%eax 10ca70: c1 e0 03 shl $0x3,%eax 10ca73: 89 45 f4 mov %eax,-0xc(%ebp) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 10ca76: a1 c4 74 12 00 mov 0x1274c4,%eax 10ca7b: 40 inc %eax 10ca7c: a3 c4 74 12 00 mov %eax,0x1274c4 /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 10ca81: 8d 5d f0 lea -0x10(%ebp),%ebx 10ca84: 53 push %ebx 10ca85: 68 d8 73 12 00 push $0x1273d8 10ca8a: e8 f1 1c 00 00 call 10e780 <_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 ); 10ca8f: 58 pop %eax 10ca90: 5a pop %edx 10ca91: 53 push %ebx 10ca92: 68 ec 73 12 00 push $0x1273ec 10ca97: e8 e4 1c 00 00 call 10e780 <_Timespec_Add_to> 10ca9c: 89 c3 mov %eax,%ebx while ( seconds ) { 10ca9e: 83 c4 10 add $0x10,%esp 10caa1: 85 c0 test %eax,%eax 10caa3: 74 16 je 10cabb <_TOD_Tickle_ticks+0x67> 10caa5: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 10caa8: 83 ec 0c sub $0xc,%esp 10caab: 68 2c 74 12 00 push $0x12742c 10cab0: e8 6b 21 00 00 call 10ec20 <_Watchdog_Tickle> 10cab5: 83 c4 10 add $0x10,%esp 10cab8: 4b dec %ebx 10cab9: 75 ed jne 10caa8 <_TOD_Tickle_ticks+0x54><== NEVER TAKEN _Watchdog_Tickle_seconds(); seconds--; } } 10cabb: 8b 5d fc mov -0x4(%ebp),%ebx 10cabe: c9 leave 10cabf: c3 ret =============================================================================== 0010c804 <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 10c804: 55 push %ebp 10c805: 89 e5 mov %esp,%ebp 10c807: 56 push %esi 10c808: 53 push %ebx 10c809: 8b 55 08 mov 0x8(%ebp),%edx uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 10c80c: 8b 72 08 mov 0x8(%edx),%esi 10c80f: 4e dec %esi year_mod_4 = the_tod->year & 3; 10c810: 8b 02 mov (%edx),%eax if ( year_mod_4 == 0 ) 10c812: 89 c3 mov %eax,%ebx 10c814: 83 e3 03 and $0x3,%ebx 10c817: 74 67 je 10c880 <_TOD_To_seconds+0x7c> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 10c819: 8b 4a 04 mov 0x4(%edx),%ecx 10c81c: 0f b7 8c 09 00 43 12 movzwl 0x124300(%ecx,%ecx,1),%ecx 10c823: 00 10c824: 8d 34 31 lea (%ecx,%esi,1),%esi time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 10c827: 0f b7 8c 1b 34 43 12 movzwl 0x124334(%ebx,%ebx,1),%ecx 10c82e: 00 10c82f: 2d c4 07 00 00 sub $0x7c4,%eax 10c834: c1 e8 02 shr $0x2,%eax 10c837: 8d 1c c0 lea (%eax,%eax,8),%ebx 10c83a: 8d 1c d8 lea (%eax,%ebx,8),%ebx 10c83d: 8d 1c 9b lea (%ebx,%ebx,4),%ebx 10c840: 8d 04 98 lea (%eax,%ebx,4),%eax 10c843: 01 c1 add %eax,%ecx ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10c845: 01 f1 add %esi,%ecx time *= TOD_SECONDS_PER_DAY; 10c847: 8d 04 89 lea (%ecx,%ecx,4),%eax 10c84a: 8d 04 81 lea (%ecx,%eax,4),%eax 10c84d: 8d 04 c1 lea (%ecx,%eax,8),%eax 10c850: c1 e0 02 shl $0x2,%eax 10c853: 29 c8 sub %ecx,%eax 10c855: c1 e0 07 shl $0x7,%eax time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 10c858: 8b 5a 14 mov 0x14(%edx),%ebx * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 10c85b: 8b 4a 0c mov 0xc(%edx),%ecx 10c85e: 8d 0c 49 lea (%ecx,%ecx,2),%ecx 10c861: 8d 0c 89 lea (%ecx,%ecx,4),%ecx 10c864: c1 e1 02 shl $0x2,%ecx 10c867: 03 4a 10 add 0x10(%edx),%ecx 10c86a: 8d 14 49 lea (%ecx,%ecx,2),%edx 10c86d: 8d 14 92 lea (%edx,%edx,4),%edx 10c870: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx 10c877: 8d 04 02 lea (%edx,%eax,1),%eax time += TOD_SECONDS_1970_THROUGH_1988; return( time ); } 10c87a: 5b pop %ebx 10c87b: 5e pop %esi 10c87c: c9 leave 10c87d: c3 ret 10c87e: 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 ]; 10c880: 8b 4a 04 mov 0x4(%edx),%ecx 10c883: 0f b7 8c 09 1a 43 12 movzwl 0x12431a(%ecx,%ecx,1),%ecx 10c88a: 00 10c88b: 8d 34 31 lea (%ecx,%esi,1),%esi 10c88e: eb 97 jmp 10c827 <_TOD_To_seconds+0x23> =============================================================================== 0010c890 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10c890: 55 push %ebp 10c891: 89 e5 mov %esp,%ebp 10c893: 53 push %ebx 10c894: 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(); 10c897: 8b 1d ac 73 12 00 mov 0x1273ac,%ebx if ((!the_tod) || 10c89d: 85 c9 test %ecx,%ecx 10c89f: 74 53 je 10c8f4 <_TOD_Validate+0x64> <== NEVER TAKEN 10c8a1: b8 40 42 0f 00 mov $0xf4240,%eax 10c8a6: 31 d2 xor %edx,%edx 10c8a8: f7 f3 div %ebx (the_tod->ticks >= ticks_per_second) || 10c8aa: 3b 41 18 cmp 0x18(%ecx),%eax 10c8ad: 76 45 jbe 10c8f4 <_TOD_Validate+0x64> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10c8af: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10c8b3: 77 3f ja 10c8f4 <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10c8b5: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10c8b9: 77 39 ja 10c8f4 <_TOD_Validate+0x64> (the_tod->hour >= TOD_HOURS_PER_DAY) || 10c8bb: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10c8bf: 77 33 ja 10c8f4 <_TOD_Validate+0x64> (the_tod->month == 0) || 10c8c1: 8b 41 04 mov 0x4(%ecx),%eax uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c8c4: 85 c0 test %eax,%eax 10c8c6: 74 2c je 10c8f4 <_TOD_Validate+0x64> <== NEVER TAKEN 10c8c8: 83 f8 0c cmp $0xc,%eax 10c8cb: 77 27 ja 10c8f4 <_TOD_Validate+0x64> (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) || 10c8cd: 8b 11 mov (%ecx),%edx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c8cf: 81 fa c3 07 00 00 cmp $0x7c3,%edx 10c8d5: 76 1d jbe 10c8f4 <_TOD_Validate+0x64> (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) || (the_tod->day == 0) ) 10c8d7: 8b 49 08 mov 0x8(%ecx),%ecx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c8da: 85 c9 test %ecx,%ecx 10c8dc: 74 16 je 10c8f4 <_TOD_Validate+0x64> <== NEVER TAKEN (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10c8de: 83 e2 03 and $0x3,%edx 10c8e1: 75 16 jne 10c8f9 <_TOD_Validate+0x69> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10c8e3: 8b 04 85 74 43 12 00 mov 0x124374(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10c8ea: 39 c8 cmp %ecx,%eax 10c8ec: 0f 93 c0 setae %al 10c8ef: eb 05 jmp 10c8f6 <_TOD_Validate+0x66> 10c8f1: 8d 76 00 lea 0x0(%esi),%esi 10c8f4: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10c8f6: 5b pop %ebx 10c8f7: c9 leave 10c8f8: 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 ]; 10c8f9: 8b 04 85 40 43 12 00 mov 0x124340(,%eax,4),%eax 10c900: eb e8 jmp 10c8ea <_TOD_Validate+0x5a> =============================================================================== 0010d6a4 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10d6a4: 55 push %ebp 10d6a5: 89 e5 mov %esp,%ebp 10d6a7: 57 push %edi 10d6a8: 56 push %esi 10d6a9: 53 push %ebx 10d6aa: 83 ec 28 sub $0x28,%esp 10d6ad: 8b 5d 08 mov 0x8(%ebp),%ebx 10d6b0: 8b 75 0c mov 0xc(%ebp),%esi 10d6b3: 8a 45 10 mov 0x10(%ebp),%al 10d6b6: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10d6b9: 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 ); 10d6bc: 53 push %ebx 10d6bd: e8 56 0e 00 00 call 10e518 <_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 ) 10d6c2: 83 c4 10 add $0x10,%esp 10d6c5: 39 73 14 cmp %esi,0x14(%ebx) 10d6c8: 74 0d je 10d6d7 <_Thread_Change_priority+0x33> _Thread_Set_priority( the_thread, new_priority ); 10d6ca: 83 ec 08 sub $0x8,%esp 10d6cd: 56 push %esi 10d6ce: 53 push %ebx 10d6cf: e8 fc 0c 00 00 call 10e3d0 <_Thread_Set_priority> 10d6d4: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10d6d7: 9c pushf 10d6d8: fa cli 10d6d9: 5a pop %edx /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 10d6da: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10d6dd: 83 f8 04 cmp $0x4,%eax 10d6e0: 74 26 je 10d708 <_Thread_Change_priority+0x64> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10d6e2: 83 e7 04 and $0x4,%edi 10d6e5: 74 15 je 10d6fc <_Thread_Change_priority+0x58><== ALWAYS TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10d6e7: 52 push %edx 10d6e8: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10d6e9: a9 e0 be 03 00 test $0x3bee0,%eax 10d6ee: 0f 85 bc 00 00 00 jne 10d7b0 <_Thread_Change_priority+0x10c> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10d6f4: 8d 65 f4 lea -0xc(%ebp),%esp 10d6f7: 5b pop %ebx 10d6f8: 5e pop %esi 10d6f9: 5f pop %edi 10d6fa: c9 leave 10d6fb: c3 ret */ state = the_thread->current_state; if ( state != STATES_TRANSIENT ) { /* 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 ); 10d6fc: 89 c1 mov %eax,%ecx 10d6fe: 83 e1 fb and $0xfffffffb,%ecx 10d701: 89 4b 10 mov %ecx,0x10(%ebx) 10d704: eb e1 jmp 10d6e7 <_Thread_Change_priority+0x43> 10d706: 66 90 xchg %ax,%ax } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10d708: 83 e7 04 and $0x4,%edi 10d70b: 75 45 jne 10d752 <_Thread_Change_priority+0xae><== NEVER TAKEN * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10d70d: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10d714: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10d71a: 66 8b 8b 96 00 00 00 mov 0x96(%ebx),%cx 10d721: 66 09 08 or %cx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d724: 66 a1 0c 74 12 00 mov 0x12740c,%ax 10d72a: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10d730: 66 a3 0c 74 12 00 mov %ax,0x12740c _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10d736: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10d73a: 0f 84 88 00 00 00 je 10d7c8 <_Thread_Change_priority+0x124> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10d740: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10d746: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10d749: 8b 08 mov (%eax),%ecx after_node->next = the_node; 10d74b: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10d74d: 89 0b mov %ecx,(%ebx) before_node->previous = the_node; 10d74f: 89 59 04 mov %ebx,0x4(%ecx) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 10d752: 52 push %edx 10d753: 9d popf 10d754: fa cli RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10d755: 66 8b 1d 0c 74 12 00 mov 0x12740c,%bx 10d75c: 31 c0 xor %eax,%eax 10d75e: 89 c1 mov %eax,%ecx 10d760: 66 0f bc cb bsf %bx,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10d764: 0f b7 c9 movzwl %cx,%ecx 10d767: 66 8b 9c 09 a0 74 12 mov 0x1274a0(%ecx,%ecx,1),%bx 10d76e: 00 10d76f: 66 0f bc c3 bsf %bx,%ax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10d773: c1 e1 04 shl $0x4,%ecx 10d776: 0f b7 c0 movzwl %ax,%eax 10d779: 8d 04 01 lea (%ecx,%eax,1),%eax 10d77c: 8d 0c 40 lea (%eax,%eax,2),%ecx 10d77f: a1 20 73 12 00 mov 0x127320,%eax 10d784: 8b 04 88 mov (%eax,%ecx,4),%eax 10d787: a3 e8 73 12 00 mov %eax,0x1273e8 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10d78c: 8b 0d 18 74 12 00 mov 0x127418,%ecx * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 10d792: 39 c8 cmp %ecx,%eax 10d794: 74 0d je 10d7a3 <_Thread_Change_priority+0xff> _Thread_Executing->is_preemptible ) 10d796: 80 79 75 00 cmpb $0x0,0x75(%ecx) 10d79a: 74 07 je 10d7a3 <_Thread_Change_priority+0xff> _Context_Switch_necessary = true; 10d79c: c6 05 28 74 12 00 01 movb $0x1,0x127428 _ISR_Enable( level ); 10d7a3: 52 push %edx 10d7a4: 9d popf } 10d7a5: 8d 65 f4 lea -0xc(%ebp),%esp 10d7a8: 5b pop %ebx 10d7a9: 5e pop %esi 10d7aa: 5f pop %edi 10d7ab: c9 leave 10d7ac: c3 ret 10d7ad: 8d 76 00 lea 0x0(%esi),%esi /* 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 ); 10d7b0: 89 5d 0c mov %ebx,0xc(%ebp) 10d7b3: 8b 43 44 mov 0x44(%ebx),%eax 10d7b6: 89 45 08 mov %eax,0x8(%ebp) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10d7b9: 8d 65 f4 lea -0xc(%ebp),%esp 10d7bc: 5b pop %ebx 10d7bd: 5e pop %esi 10d7be: 5f pop %edi 10d7bf: 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 ); 10d7c0: e9 73 0b 00 00 jmp 10e338 <_Thread_queue_Requeue> 10d7c5: 8d 76 00 lea 0x0(%esi),%esi _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 10d7c8: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10d7ce: 8d 48 04 lea 0x4(%eax),%ecx 10d7d1: 89 0b mov %ecx,(%ebx) old_last_node = the_chain->last; 10d7d3: 8b 48 08 mov 0x8(%eax),%ecx the_chain->last = the_node; 10d7d6: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10d7d9: 89 19 mov %ebx,(%ecx) the_node->previous = old_last_node; 10d7db: 89 4b 04 mov %ecx,0x4(%ebx) 10d7de: e9 6f ff ff ff jmp 10d752 <_Thread_Change_priority+0xae> =============================================================================== 0010d7e4 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10d7e4: 55 push %ebp 10d7e5: 89 e5 mov %esp,%ebp 10d7e7: 53 push %ebx 10d7e8: 8b 45 08 mov 0x8(%ebp),%eax 10d7eb: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10d7ee: 9c pushf 10d7ef: fa cli 10d7f0: 5b pop %ebx current_state = the_thread->current_state; 10d7f1: 8b 48 10 mov 0x10(%eax),%ecx if ( current_state & state ) { 10d7f4: 85 ca test %ecx,%edx 10d7f6: 74 70 je 10d868 <_Thread_Clear_state+0x84> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10d7f8: f7 d2 not %edx 10d7fa: 21 ca and %ecx,%edx current_state = 10d7fc: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 10d7ff: 85 d2 test %edx,%edx 10d801: 75 65 jne 10d868 <_Thread_Clear_state+0x84> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10d803: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10d809: 66 8b 88 96 00 00 00 mov 0x96(%eax),%cx 10d810: 66 09 0a or %cx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d813: 66 8b 15 0c 74 12 00 mov 0x12740c,%dx 10d81a: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10d820: 66 89 15 0c 74 12 00 mov %dx,0x12740c _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10d827: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10d82d: 8d 4a 04 lea 0x4(%edx),%ecx 10d830: 89 08 mov %ecx,(%eax) old_last_node = the_chain->last; 10d832: 8b 4a 08 mov 0x8(%edx),%ecx the_chain->last = the_node; 10d835: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10d838: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10d83a: 89 48 04 mov %ecx,0x4(%eax) _ISR_Flash( level ); 10d83d: 53 push %ebx 10d83e: 9d popf 10d83f: fa cli * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 10d840: 8b 50 14 mov 0x14(%eax),%edx 10d843: 8b 0d e8 73 12 00 mov 0x1273e8,%ecx 10d849: 3b 51 14 cmp 0x14(%ecx),%edx 10d84c: 73 1a jae 10d868 <_Thread_Clear_state+0x84> _Thread_Heir = the_thread; 10d84e: a3 e8 73 12 00 mov %eax,0x1273e8 if ( _Thread_Executing->is_preemptible || 10d853: a1 18 74 12 00 mov 0x127418,%eax 10d858: 80 78 75 00 cmpb $0x0,0x75(%eax) 10d85c: 74 12 je 10d870 <_Thread_Clear_state+0x8c> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10d85e: c6 05 28 74 12 00 01 movb $0x1,0x127428 10d865: 8d 76 00 lea 0x0(%esi),%esi } } } _ISR_Enable( level ); 10d868: 53 push %ebx 10d869: 9d popf } 10d86a: 5b pop %ebx 10d86b: c9 leave 10d86c: c3 ret 10d86d: 8d 76 00 lea 0x0(%esi),%esi * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 10d870: 85 d2 test %edx,%edx 10d872: 74 ea je 10d85e <_Thread_Clear_state+0x7a><== NEVER TAKEN 10d874: eb f2 jmp 10d868 <_Thread_Clear_state+0x84> =============================================================================== 0010d878 <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 10d878: 55 push %ebp 10d879: 89 e5 mov %esp,%ebp 10d87b: 56 push %esi 10d87c: 53 push %ebx 10d87d: 8b 75 08 mov 0x8(%ebp),%esi 10d880: 8b 5d 0c mov 0xc(%ebp),%ebx 10d883: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10d887: 8b 46 1c mov 0x1c(%esi),%eax 10d88a: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10d891: a1 58 73 12 00 mov 0x127358,%eax 10d896: 48 dec %eax 10d897: a3 58 73 12 00 mov %eax,0x127358 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 10d89c: 83 ec 0c sub $0xc,%esp 10d89f: 53 push %ebx 10d8a0: e8 27 11 00 00 call 10e9cc <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d8a5: a1 58 73 12 00 mov 0x127358,%eax 10d8aa: 40 inc %eax 10d8ab: a3 58 73 12 00 mov %eax,0x127358 /* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object ); 10d8b0: 59 pop %ecx 10d8b1: 58 pop %eax 10d8b2: 53 push %ebx 10d8b3: 56 push %esi 10d8b4: e8 57 f6 ff ff call 10cf10 <_Objects_Close> /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); 10d8b9: 58 pop %eax 10d8ba: 5a pop %edx 10d8bb: 6a 01 push $0x1 10d8bd: 53 push %ebx 10d8be: e8 79 0b 00 00 call 10e43c <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 10d8c3: 89 1c 24 mov %ebx,(%esp) 10d8c6: e8 c5 09 00 00 call 10e290 <_Thread_queue_Extract_with_proxy> 10d8cb: 83 c4 10 add $0x10,%esp 10d8ce: 84 c0 test %al,%al 10d8d0: 75 06 jne 10d8d8 <_Thread_Close+0x60> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 10d8d2: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d8d6: 74 68 je 10d940 <_Thread_Close+0xc8> /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 10d8d8: 3b 1d e0 73 12 00 cmp 0x1273e0,%ebx 10d8de: 74 74 je 10d954 <_Thread_Close+0xdc> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 10d8e0: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx) 10d8e7: 00 00 00 if ( the_thread->Start.fp_context ) 10d8ea: 8b 83 c8 00 00 00 mov 0xc8(%ebx),%eax 10d8f0: 85 c0 test %eax,%eax 10d8f2: 74 0c je 10d900 <_Thread_Close+0x88> (void) _Workspace_Free( the_thread->Start.fp_context ); 10d8f4: 83 ec 0c sub $0xc,%esp 10d8f7: 50 push %eax 10d8f8: e8 d7 13 00 00 call 10ecd4 <_Workspace_Free> 10d8fd: 83 c4 10 add $0x10,%esp /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 10d900: 83 ec 0c sub $0xc,%esp 10d903: 53 push %ebx 10d904: e8 e7 0c 00 00 call 10e5f0 <_Thread_Stack_Free> the_thread->Start.stack = NULL; 10d909: c7 83 cc 00 00 00 00 movl $0x0,0xcc(%ebx) 10d910: 00 00 00 if ( the_thread->extensions ) 10d913: 8b 83 fc 00 00 00 mov 0xfc(%ebx),%eax 10d919: 83 c4 10 add $0x10,%esp 10d91c: 85 c0 test %eax,%eax 10d91e: 74 0c je 10d92c <_Thread_Close+0xb4> (void) _Workspace_Free( the_thread->extensions ); 10d920: 83 ec 0c sub $0xc,%esp 10d923: 50 push %eax 10d924: e8 ab 13 00 00 call 10ecd4 <_Workspace_Free> 10d929: 83 c4 10 add $0x10,%esp the_thread->extensions = NULL; 10d92c: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10d933: 00 00 00 } 10d936: 8d 65 f8 lea -0x8(%ebp),%esp 10d939: 5b pop %ebx 10d93a: 5e pop %esi 10d93b: c9 leave 10d93c: c3 ret 10d93d: 8d 76 00 lea 0x0(%esi),%esi */ _Thread_Set_state( the_thread, STATES_DORMANT ); if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 10d940: 83 ec 0c sub $0xc,%esp 10d943: 8d 43 48 lea 0x48(%ebx),%eax 10d946: 50 push %eax 10d947: e8 68 12 00 00 call 10ebb4 <_Watchdog_Remove> 10d94c: 83 c4 10 add $0x10,%esp 10d94f: eb 87 jmp 10d8d8 <_Thread_Close+0x60> 10d951: 8d 76 00 lea 0x0(%esi),%esi */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 10d954: c7 05 e0 73 12 00 00 movl $0x0,0x1273e0 10d95b: 00 00 00 10d95e: eb 80 jmp 10d8e0 <_Thread_Close+0x68> =============================================================================== 0010d9f4 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10d9f4: 55 push %ebp 10d9f5: 89 e5 mov %esp,%ebp 10d9f7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10d9fa: 8d 45 f4 lea -0xc(%ebp),%eax 10d9fd: 50 push %eax 10d9fe: ff 75 08 pushl 0x8(%ebp) 10da01: e8 aa 01 00 00 call 10dbb0 <_Thread_Get> switch ( location ) { 10da06: 83 c4 10 add $0x10,%esp 10da09: 8b 55 f4 mov -0xc(%ebp),%edx 10da0c: 85 d2 test %edx,%edx 10da0e: 75 1c jne 10da2c <_Thread_Delay_ended+0x38><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10da10: 83 ec 08 sub $0x8,%esp 10da13: 68 18 00 00 10 push $0x10000018 10da18: 50 push %eax 10da19: e8 c6 fd ff ff call 10d7e4 <_Thread_Clear_state> 10da1e: a1 58 73 12 00 mov 0x127358,%eax 10da23: 48 dec %eax 10da24: a3 58 73 12 00 mov %eax,0x127358 10da29: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10da2c: c9 leave 10da2d: c3 ret =============================================================================== 0010da30 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10da30: 55 push %ebp 10da31: 89 e5 mov %esp,%ebp 10da33: 57 push %edi 10da34: 56 push %esi 10da35: 53 push %ebx 10da36: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10da39: 8b 1d 18 74 12 00 mov 0x127418,%ebx _ISR_Disable( level ); 10da3f: 9c pushf 10da40: fa cli 10da41: 58 pop %eax while ( _Context_Switch_necessary == true ) { 10da42: 8a 15 28 74 12 00 mov 0x127428,%dl 10da48: 84 d2 test %dl,%dl 10da4a: 0f 84 10 01 00 00 je 10db60 <_Thread_Dispatch+0x130> 10da50: 8d 7d d8 lea -0x28(%ebp),%edi 10da53: e9 d1 00 00 00 jmp 10db29 <_Thread_Dispatch+0xf9> 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 ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; _ISR_Enable( level ); 10da58: 50 push %eax 10da59: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10da5a: 83 ec 0c sub $0xc,%esp 10da5d: 8d 45 e0 lea -0x20(%ebp),%eax 10da60: 50 push %eax 10da61: e8 6a 3e 00 00 call 1118d0 <_TOD_Get_uptime> _Timestamp_Subtract( 10da66: 83 c4 0c add $0xc,%esp 10da69: 57 push %edi 10da6a: 8d 45 e0 lea -0x20(%ebp),%eax 10da6d: 50 push %eax 10da6e: 68 20 74 12 00 push $0x127420 10da73: e8 44 0d 00 00 call 10e7bc <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10da78: 5a pop %edx 10da79: 59 pop %ecx 10da7a: 57 push %edi 10da7b: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10da81: 50 push %eax 10da82: e8 f9 0c 00 00 call 10e780 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10da87: 8b 45 e0 mov -0x20(%ebp),%eax 10da8a: 8b 55 e4 mov -0x1c(%ebp),%edx 10da8d: a3 20 74 12 00 mov %eax,0x127420 10da92: 89 15 24 74 12 00 mov %edx,0x127424 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10da98: a1 e4 73 12 00 mov 0x1273e4,%eax 10da9d: 83 c4 10 add $0x10,%esp 10daa0: 85 c0 test %eax,%eax 10daa2: 74 10 je 10dab4 <_Thread_Dispatch+0x84> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10daa4: 8b 10 mov (%eax),%edx 10daa6: 89 93 ec 00 00 00 mov %edx,0xec(%ebx) *_Thread_libc_reent = heir->libc_reent; 10daac: 8b 96 ec 00 00 00 mov 0xec(%esi),%edx 10dab2: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10dab4: 83 ec 08 sub $0x8,%esp 10dab7: 56 push %esi 10dab8: 53 push %ebx 10dab9: e8 8e 0f 00 00 call 10ea4c <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10dabe: 59 pop %ecx 10dabf: 58 pop %eax 10dac0: 81 c6 d0 00 00 00 add $0xd0,%esi 10dac6: 56 push %esi 10dac7: 8d 83 d0 00 00 00 lea 0xd0(%ebx),%eax 10dacd: 50 push %eax 10dace: e8 6d 12 00 00 call 10ed40 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10dad3: 83 c4 10 add $0x10,%esp 10dad6: 8b 93 e8 00 00 00 mov 0xe8(%ebx),%edx 10dadc: 85 d2 test %edx,%edx 10dade: 74 36 je 10db16 <_Thread_Dispatch+0xe6> #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 ); 10dae0: a1 e0 73 12 00 mov 0x1273e0,%eax 10dae5: 39 c3 cmp %eax,%ebx 10dae7: 74 2d je 10db16 <_Thread_Dispatch+0xe6> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10dae9: 85 c0 test %eax,%eax 10daeb: 74 11 je 10dafe <_Thread_Dispatch+0xce> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10daed: 83 ec 0c sub $0xc,%esp 10daf0: 05 e8 00 00 00 add $0xe8,%eax 10daf5: 50 push %eax 10daf6: e8 79 12 00 00 call 10ed74 <_CPU_Context_save_fp> 10dafb: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10dafe: 83 ec 0c sub $0xc,%esp 10db01: 8d 83 e8 00 00 00 lea 0xe8(%ebx),%eax 10db07: 50 push %eax 10db08: e8 71 12 00 00 call 10ed7e <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10db0d: 89 1d e0 73 12 00 mov %ebx,0x1273e0 10db13: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10db16: 8b 1d 18 74 12 00 mov 0x127418,%ebx _ISR_Disable( level ); 10db1c: 9c pushf 10db1d: fa cli 10db1e: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10db1f: 8a 15 28 74 12 00 mov 0x127428,%dl 10db25: 84 d2 test %dl,%dl 10db27: 74 37 je 10db60 <_Thread_Dispatch+0x130> heir = _Thread_Heir; 10db29: 8b 35 e8 73 12 00 mov 0x1273e8,%esi _Thread_Dispatch_disable_level = 1; 10db2f: c7 05 58 73 12 00 01 movl $0x1,0x127358 10db36: 00 00 00 _Context_Switch_necessary = false; 10db39: c6 05 28 74 12 00 00 movb $0x0,0x127428 _Thread_Executing = heir; 10db40: 89 35 18 74 12 00 mov %esi,0x127418 #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 ) 10db46: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10db4a: 0f 85 08 ff ff ff jne 10da58 <_Thread_Dispatch+0x28> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10db50: 8b 15 24 73 12 00 mov 0x127324,%edx 10db56: 89 56 78 mov %edx,0x78(%esi) 10db59: e9 fa fe ff ff jmp 10da58 <_Thread_Dispatch+0x28> 10db5e: 66 90 xchg %ax,%ax executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 10db60: c7 05 58 73 12 00 00 movl $0x0,0x127358 10db67: 00 00 00 _ISR_Enable( level ); 10db6a: 50 push %eax 10db6b: 9d popf if ( _Thread_Do_post_task_switch_extension || 10db6c: a1 fc 73 12 00 mov 0x1273fc,%eax 10db71: 85 c0 test %eax,%eax 10db73: 75 06 jne 10db7b <_Thread_Dispatch+0x14b><== NEVER TAKEN executing->do_post_task_switch_extension ) { 10db75: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10db79: 74 09 je 10db84 <_Thread_Dispatch+0x154> executing->do_post_task_switch_extension = false; 10db7b: c6 43 74 00 movb $0x0,0x74(%ebx) _API_extensions_Run_postswitch(); 10db7f: e8 e4 e8 ff ff call 10c468 <_API_extensions_Run_postswitch> } } 10db84: 8d 65 f4 lea -0xc(%ebp),%esp 10db87: 5b pop %ebx 10db88: 5e pop %esi 10db89: 5f pop %edi 10db8a: c9 leave 10db8b: c3 ret =============================================================================== 00113c30 <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 113c30: 55 push %ebp 113c31: 89 e5 mov %esp,%ebp Thread_Control *executing; executing = _Thread_Executing; 113c33: a1 18 74 12 00 mov 0x127418,%eax if ( !_States_Is_ready( executing->current_state ) || 113c38: 8b 50 10 mov 0x10(%eax),%edx 113c3b: 85 d2 test %edx,%edx 113c3d: 75 0e jne 113c4d <_Thread_Evaluate_mode+0x1d><== NEVER TAKEN 113c3f: 3b 05 e8 73 12 00 cmp 0x1273e8,%eax 113c45: 74 11 je 113c58 <_Thread_Evaluate_mode+0x28> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 113c47: 80 78 75 00 cmpb $0x0,0x75(%eax) 113c4b: 74 0b je 113c58 <_Thread_Evaluate_mode+0x28><== NEVER TAKEN _Context_Switch_necessary = true; 113c4d: c6 05 28 74 12 00 01 movb $0x1,0x127428 113c54: b0 01 mov $0x1,%al return true; } return false; } 113c56: c9 leave 113c57: c3 ret executing = _Thread_Executing; if ( !_States_Is_ready( executing->current_state ) || ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { _Context_Switch_necessary = true; return true; 113c58: 31 c0 xor %eax,%eax } return false; } 113c5a: c9 leave 113c5b: c3 ret =============================================================================== 0010dbb0 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10dbb0: 55 push %ebp 10dbb1: 89 e5 mov %esp,%ebp 10dbb3: 53 push %ebx 10dbb4: 83 ec 04 sub $0x4,%esp 10dbb7: 8b 45 08 mov 0x8(%ebp),%eax 10dbba: 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 ) ) { 10dbbd: 85 c0 test %eax,%eax 10dbbf: 74 4b je 10dc0c <_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); 10dbc1: 89 c2 mov %eax,%edx 10dbc3: c1 ea 18 shr $0x18,%edx 10dbc6: 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 ) 10dbc9: 8d 5a ff lea -0x1(%edx),%ebx 10dbcc: 83 fb 03 cmp $0x3,%ebx 10dbcf: 77 2b ja 10dbfc <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 10dbd1: 89 c3 mov %eax,%ebx 10dbd3: c1 eb 1b shr $0x1b,%ebx 10dbd6: 4b dec %ebx 10dbd7: 75 23 jne 10dbfc <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 10dbd9: 8b 14 95 2c 73 12 00 mov 0x12732c(,%edx,4),%edx if ( !api_information ) { 10dbe0: 85 d2 test %edx,%edx 10dbe2: 74 18 je 10dbfc <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 10dbe4: 8b 52 04 mov 0x4(%edx),%edx if ( !information ) { 10dbe7: 85 d2 test %edx,%edx 10dbe9: 74 11 je 10dbfc <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10dbeb: 53 push %ebx 10dbec: 51 push %ecx 10dbed: 50 push %eax 10dbee: 52 push %edx 10dbef: e8 50 f7 ff ff call 10d344 <_Objects_Get> 10dbf4: 83 c4 10 add $0x10,%esp done: return tp; } 10dbf7: 8b 5d fc mov -0x4(%ebp),%ebx 10dbfa: c9 leave 10dbfb: c3 ret goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 10dbfc: c7 01 01 00 00 00 movl $0x1,(%ecx) 10dc02: 31 c0 xor %eax,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10dc04: 8b 5d fc mov -0x4(%ebp),%ebx 10dc07: c9 leave 10dc08: c3 ret 10dc09: 8d 76 00 lea 0x0(%esi),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10dc0c: a1 58 73 12 00 mov 0x127358,%eax 10dc11: 40 inc %eax 10dc12: a3 58 73 12 00 mov %eax,0x127358 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; 10dc17: c7 01 00 00 00 00 movl $0x0,(%ecx) tp = _Thread_Executing; 10dc1d: a1 18 74 12 00 mov 0x127418,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10dc22: 8b 5d fc mov -0x4(%ebp),%ebx 10dc25: c9 leave 10dc26: c3 ret =============================================================================== 00113c5c <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 113c5c: 55 push %ebp 113c5d: 89 e5 mov %esp,%ebp 113c5f: 53 push %ebx 113c60: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 113c63: 8b 1d 18 74 12 00 mov 0x127418,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 113c69: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 113c6f: 85 c0 test %eax,%eax 113c71: 74 79 je 113cec <_Thread_Handler+0x90> 113c73: fa cli #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 113c74: a0 b4 6f 12 00 mov 0x126fb4,%al 113c79: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 113c7c: c6 05 b4 6f 12 00 01 movb $0x1,0x126fb4 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 113c83: 8b 93 e8 00 00 00 mov 0xe8(%ebx),%edx 113c89: 85 d2 test %edx,%edx 113c8b: 74 24 je 113cb1 <_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 ); 113c8d: a1 e0 73 12 00 mov 0x1273e0,%eax 113c92: 39 c3 cmp %eax,%ebx 113c94: 74 1b je 113cb1 <_Thread_Handler+0x55> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 113c96: 85 c0 test %eax,%eax 113c98: 74 11 je 113cab <_Thread_Handler+0x4f> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 113c9a: 83 ec 0c sub $0xc,%esp 113c9d: 05 e8 00 00 00 add $0xe8,%eax 113ca2: 50 push %eax 113ca3: e8 cc b0 ff ff call 10ed74 <_CPU_Context_save_fp> 113ca8: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 113cab: 89 1d e0 73 12 00 mov %ebx,0x1273e0 /* * 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 ); 113cb1: 83 ec 0c sub $0xc,%esp 113cb4: 53 push %ebx 113cb5: e8 02 ac ff ff call 10e8bc <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 113cba: e8 cd 9e ff ff call 10db8c <_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) */ { 113cbf: 83 c4 10 add $0x10,%esp 113cc2: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 113cc6: 74 28 je 113cf0 <_Thread_Handler+0x94> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 113cc8: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 113cce: 85 c0 test %eax,%eax 113cd0: 74 2d je 113cff <_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 ); 113cd2: 83 ec 0c sub $0xc,%esp 113cd5: 53 push %ebx 113cd6: e8 1d ac ff ff call 10e8f8 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 113cdb: 83 c4 0c add $0xc,%esp 113cde: 6a 06 push $0x6 113ce0: 6a 01 push $0x1 113ce2: 6a 00 push $0x0 113ce4: e8 13 91 ff ff call 10cdfc <_Internal_error_Occurred> 113ce9: 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); 113cec: fb sti 113ced: eb 85 jmp 113c74 <_Thread_Handler+0x18> 113cef: 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 (); 113cf0: e8 bb bf 00 00 call 11fcb0 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 113cf5: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 113cfb: 85 c0 test %eax,%eax 113cfd: 75 d3 jne 113cd2 <_Thread_Handler+0x76> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 113cff: 83 ec 0c sub $0xc,%esp 113d02: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 113d08: ff 93 9c 00 00 00 call *0x9c(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 113d0e: 89 43 28 mov %eax,0x28(%ebx) 113d11: 83 c4 10 add $0x10,%esp 113d14: eb bc jmp 113cd2 <_Thread_Handler+0x76> =============================================================================== 0010de90 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 10de90: 55 push %ebp 10de91: 89 e5 mov %esp,%ebp 10de93: 53 push %ebx 10de94: 83 ec 04 sub $0x4,%esp uint32_t maximum_extensions; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; 10de97: a1 30 32 12 00 mov 0x123230,%eax maximum_extensions = Configuration.maximum_extensions; 10de9c: 8b 15 28 32 12 00 mov 0x123228,%edx #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 10dea2: 8b 1d 44 32 12 00 mov 0x123244,%ebx 10dea8: 85 db test %ebx,%ebx 10deaa: 0f 94 c3 sete %bl 10dead: 8b 0d 40 32 12 00 mov 0x123240,%ecx 10deb3: 85 c9 test %ecx,%ecx 10deb5: 0f 94 c1 sete %cl 10deb8: 38 cb cmp %cl,%bl 10deba: 0f 85 9d 00 00 00 jne 10df5d <_Thread_Handler_initialization+0xcd><== NEVER TAKEN INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 10dec0: c6 05 28 74 12 00 00 movb $0x0,0x127428 _Thread_Executing = NULL; 10dec7: c7 05 18 74 12 00 00 movl $0x0,0x127418 10dece: 00 00 00 _Thread_Heir = NULL; 10ded1: c7 05 e8 73 12 00 00 movl $0x0,0x1273e8 10ded8: 00 00 00 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 10dedb: c7 05 e0 73 12 00 00 movl $0x0,0x1273e0 10dee2: 00 00 00 #endif _Thread_Do_post_task_switch_extension = 0; 10dee5: c7 05 fc 73 12 00 00 movl $0x0,0x1273fc 10deec: 00 00 00 _Thread_Maximum_extensions = maximum_extensions; 10deef: 89 15 f8 73 12 00 mov %edx,0x1273f8 _Thread_Ticks_per_timeslice = ticks_per_timeslice; 10def5: a3 24 73 12 00 mov %eax,0x127324 _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 10defa: 83 ec 0c sub $0xc,%esp 10defd: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax 10df04: 8d 44 40 03 lea 0x3(%eax,%eax,2),%eax 10df08: c1 e0 02 shl $0x2,%eax 10df0b: 50 push %eax 10df0c: e8 7b 0d 00 00 call 10ec8c <_Workspace_Allocate_or_fatal_error> 10df11: a3 20 73 12 00 mov %eax,0x127320 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 10df16: 0f b6 1d 14 32 12 00 movzbl 0x123214,%ebx 10df1d: 31 d2 xor %edx,%edx 10df1f: 83 c4 10 add $0x10,%esp 10df22: 66 90 xchg %ax,%ax */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10df24: 8d 48 04 lea 0x4(%eax),%ecx 10df27: 89 08 mov %ecx,(%eax) the_chain->permanent_null = NULL; 10df29: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10df30: 89 40 08 mov %eax,0x8(%eax) 10df33: 42 inc %edx 10df34: 83 c0 0c add $0xc,%eax 10df37: 39 da cmp %ebx,%edx 10df39: 76 e9 jbe 10df24 <_Thread_Handler_initialization+0x94> /* * Initialize this class of objects. */ _Objects_Initialize_information( 10df3b: 50 push %eax 10df3c: 6a 08 push $0x8 10df3e: 6a 00 push $0x0 10df40: 68 04 01 00 00 push $0x104 10df45: 6a 01 push $0x1 10df47: 6a 01 push $0x1 10df49: 6a 01 push $0x1 10df4b: 68 e0 74 12 00 push $0x1274e0 10df50: e8 57 f4 ff ff call 10d3ac <_Objects_Initialize_information> 10df55: 83 c4 20 add $0x20,%esp false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 10df58: 8b 5d fc mov -0x4(%ebp),%ebx 10df5b: c9 leave 10df5c: c3 ret * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) == (!Configuration.stack_free_hook) ) ) _Internal_error_Occurred( 10df5d: 52 push %edx 10df5e: 6a 0f push $0xf 10df60: 6a 01 push $0x1 10df62: 6a 00 push $0x0 10df64: e8 93 ee ff ff call 10cdfc <_Internal_error_Occurred> =============================================================================== 0010dc28 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10dc28: 55 push %ebp 10dc29: 89 e5 mov %esp,%ebp 10dc2b: 57 push %edi 10dc2c: 56 push %esi 10dc2d: 53 push %ebx 10dc2e: 83 ec 24 sub $0x24,%esp 10dc31: 8b 5d 0c mov 0xc(%ebp),%ebx 10dc34: 8b 75 14 mov 0x14(%ebp),%esi 10dc37: 0f b6 7d 18 movzbl 0x18(%ebp),%edi 10dc3b: 8a 45 20 mov 0x20(%ebp),%al 10dc3e: 88 45 e7 mov %al,-0x19(%ebp) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 10dc41: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10dc48: 00 00 00 10dc4b: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10dc52: 00 00 00 10dc55: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10dc5c: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10dc5f: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10dc66: 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 ); 10dc69: 56 push %esi 10dc6a: 53 push %ebx 10dc6b: e8 1c 09 00 00 call 10e58c <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10dc70: 83 c4 10 add $0x10,%esp 10dc73: 85 c0 test %eax,%eax 10dc75: 0f 84 8d 01 00 00 je 10de08 <_Thread_Initialize+0x1e0> 10dc7b: 39 c6 cmp %eax,%esi 10dc7d: 0f 87 85 01 00 00 ja 10de08 <_Thread_Initialize+0x1e0><== NEVER TAKEN Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10dc83: 8b 93 cc 00 00 00 mov 0xcc(%ebx),%edx 10dc89: 89 93 c4 00 00 00 mov %edx,0xc4(%ebx) the_stack->size = size; 10dc8f: 89 83 c0 00 00 00 mov %eax,0xc0(%ebx) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 10dc95: 89 f8 mov %edi,%eax 10dc97: 84 c0 test %al,%al 10dc99: 0f 85 81 01 00 00 jne 10de20 <_Thread_Initialize+0x1f8> 10dc9f: 31 c0 xor %eax,%eax 10dca1: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 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; 10dca8: 89 83 e8 00 00 00 mov %eax,0xe8(%ebx) the_thread->Start.fp_context = fp_area; 10dcae: 89 83 c8 00 00 00 mov %eax,0xc8(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10dcb4: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10dcbb: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10dcc2: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10dcc9: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10dcd0: a1 f8 73 12 00 mov 0x1273f8,%eax 10dcd5: 85 c0 test %eax,%eax 10dcd7: 0f 85 5f 01 00 00 jne 10de3c <_Thread_Initialize+0x214> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10dcdd: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10dce4: 00 00 00 10dce7: 31 ff xor %edi,%edi /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10dce9: 8a 45 e7 mov -0x19(%ebp),%al 10dcec: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10dcf2: 8b 45 24 mov 0x24(%ebp),%eax 10dcf5: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10dcfb: 8b 45 28 mov 0x28(%ebp),%eax 10dcfe: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10dd04: 8b 45 2c mov 0x2c(%ebp),%eax 10dd07: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10dd0d: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10dd14: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10dd1b: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 10dd22: 8b 45 1c mov 0x1c(%ebp),%eax 10dd25: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10dd28: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10dd2e: 83 ec 08 sub $0x8,%esp 10dd31: 50 push %eax 10dd32: 53 push %ebx 10dd33: e8 98 06 00 00 call 10e3d0 <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10dd38: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10dd3f: 00 00 00 10dd42: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10dd49: 00 00 00 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10dd4c: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10dd50: 8b 45 08 mov 0x8(%ebp),%eax 10dd53: 8b 40 1c mov 0x1c(%eax),%eax 10dd56: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10dd59: 8b 45 30 mov 0x30(%ebp),%eax 10dd5c: 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 ); 10dd5f: 89 1c 24 mov %ebx,(%esp) 10dd62: e8 1d 0c 00 00 call 10e984 <_User_extensions_Thread_create> if ( extension_status ) 10dd67: 83 c4 10 add $0x10,%esp 10dd6a: 84 c0 test %al,%al 10dd6c: 0f 85 a2 00 00 00 jne 10de14 <_Thread_Initialize+0x1ec> return true; failed: if ( the_thread->libc_reent ) 10dd72: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 10dd78: 85 c0 test %eax,%eax 10dd7a: 74 0c je 10dd88 <_Thread_Initialize+0x160> _Workspace_Free( the_thread->libc_reent ); 10dd7c: 83 ec 0c sub $0xc,%esp 10dd7f: 50 push %eax 10dd80: e8 4f 0f 00 00 call 10ecd4 <_Workspace_Free> 10dd85: 83 c4 10 add $0x10,%esp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10dd88: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10dd8e: 85 c0 test %eax,%eax 10dd90: 74 0c je 10dd9e <_Thread_Initialize+0x176> _Workspace_Free( the_thread->API_Extensions[i] ); 10dd92: 83 ec 0c sub $0xc,%esp 10dd95: 50 push %eax 10dd96: e8 39 0f 00 00 call 10ecd4 <_Workspace_Free> 10dd9b: 83 c4 10 add $0x10,%esp failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10dd9e: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax 10dda4: 85 c0 test %eax,%eax 10dda6: 74 0c je 10ddb4 <_Thread_Initialize+0x18c><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10dda8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ddab: 50 push %eax <== NOT EXECUTED 10ddac: e8 23 0f 00 00 call 10ecd4 <_Workspace_Free> <== NOT EXECUTED 10ddb1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10ddb4: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax 10ddba: 85 c0 test %eax,%eax 10ddbc: 74 0c je 10ddca <_Thread_Initialize+0x1a2><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10ddbe: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ddc1: 50 push %eax <== NOT EXECUTED 10ddc2: e8 0d 0f 00 00 call 10ecd4 <_Workspace_Free> <== NOT EXECUTED 10ddc7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( extensions_area ) 10ddca: 85 ff test %edi,%edi 10ddcc: 74 0c je 10ddda <_Thread_Initialize+0x1b2> (void) _Workspace_Free( extensions_area ); 10ddce: 83 ec 0c sub $0xc,%esp 10ddd1: 57 push %edi 10ddd2: e8 fd 0e 00 00 call 10ecd4 <_Workspace_Free> 10ddd7: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10ddda: 8b 45 e0 mov -0x20(%ebp),%eax 10dddd: 85 c0 test %eax,%eax 10dddf: 74 0e je 10ddef <_Thread_Initialize+0x1c7> (void) _Workspace_Free( fp_area ); 10dde1: 83 ec 0c sub $0xc,%esp 10dde4: ff 75 e0 pushl -0x20(%ebp) 10dde7: e8 e8 0e 00 00 call 10ecd4 <_Workspace_Free> 10ddec: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10ddef: 83 ec 0c sub $0xc,%esp 10ddf2: 53 push %ebx 10ddf3: e8 f8 07 00 00 call 10e5f0 <_Thread_Stack_Free> 10ddf8: 31 c0 xor %eax,%eax return false; 10ddfa: 83 c4 10 add $0x10,%esp } 10ddfd: 8d 65 f4 lea -0xc(%ebp),%esp 10de00: 5b pop %ebx 10de01: 5e pop %esi 10de02: 5f pop %edi 10de03: c9 leave 10de04: c3 ret 10de05: 8d 76 00 lea 0x0(%esi),%esi if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return false; 10de08: 31 c0 xor %eax,%eax } 10de0a: 8d 65 f4 lea -0xc(%ebp),%esp 10de0d: 5b pop %ebx 10de0e: 5e pop %esi 10de0f: 5f pop %edi 10de10: c9 leave 10de11: c3 ret 10de12: 66 90 xchg %ax,%ax * 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 ); if ( extension_status ) 10de14: b0 01 mov $0x1,%al _Thread_Stack_Free( the_thread ); return false; } 10de16: 8d 65 f4 lea -0xc(%ebp),%esp 10de19: 5b pop %ebx 10de1a: 5e pop %esi 10de1b: 5f pop %edi 10de1c: c9 leave 10de1d: c3 ret 10de1e: 66 90 xchg %ax,%ax /* * 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 ); 10de20: 83 ec 0c sub $0xc,%esp 10de23: 6a 6c push $0x6c 10de25: e8 8e 0e 00 00 call 10ecb8 <_Workspace_Allocate> 10de2a: 89 45 e0 mov %eax,-0x20(%ebp) if ( !fp_area ) 10de2d: 83 c4 10 add $0x10,%esp 10de30: 85 c0 test %eax,%eax 10de32: 74 55 je 10de89 <_Thread_Initialize+0x261> 10de34: 8b 45 e0 mov -0x20(%ebp),%eax 10de37: e9 6c fe ff ff jmp 10dca8 <_Thread_Initialize+0x80> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 10de3c: 83 ec 0c sub $0xc,%esp 10de3f: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10de46: 50 push %eax 10de47: e8 6c 0e 00 00 call 10ecb8 <_Workspace_Allocate> 10de4c: 89 c7 mov %eax,%edi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10de4e: 83 c4 10 add $0x10,%esp 10de51: 85 c0 test %eax,%eax 10de53: 0f 84 19 ff ff ff je 10dd72 <_Thread_Initialize+0x14a> goto failed; } the_thread->extensions = (void **) extensions_area; 10de59: 89 c1 mov %eax,%ecx 10de5b: 89 83 fc 00 00 00 mov %eax,0xfc(%ebx) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10de61: 8b 35 f8 73 12 00 mov 0x1273f8,%esi 10de67: 31 d2 xor %edx,%edx 10de69: 31 c0 xor %eax,%eax 10de6b: eb 09 jmp 10de76 <_Thread_Initialize+0x24e> 10de6d: 8d 76 00 lea 0x0(%esi),%esi 10de70: 8b 8b fc 00 00 00 mov 0xfc(%ebx),%ecx the_thread->extensions[i] = NULL; 10de76: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%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++ ) 10de7d: 40 inc %eax 10de7e: 89 c2 mov %eax,%edx 10de80: 39 c6 cmp %eax,%esi 10de82: 73 ec jae 10de70 <_Thread_Initialize+0x248> 10de84: e9 60 fe ff ff jmp 10dce9 <_Thread_Initialize+0xc1> * 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 ); if ( !fp_area ) 10de89: 31 ff xor %edi,%edi 10de8b: e9 e2 fe ff ff jmp 10dd72 <_Thread_Initialize+0x14a> =============================================================================== 00112bf8 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 112bf8: 55 push %ebp 112bf9: 89 e5 mov %esp,%ebp 112bfb: 53 push %ebx 112bfc: 83 ec 10 sub $0x10,%esp 112bff: 8b 5d 08 mov 0x8(%ebp),%ebx the_thread->resource_count = 0; 112c02: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->is_preemptible = the_thread->Start.is_preemptible; 112c09: 8a 83 ac 00 00 00 mov 0xac(%ebx),%al 112c0f: 88 43 75 mov %al,0x75(%ebx) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 112c12: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 112c18: 89 43 7c mov %eax,0x7c(%ebx) the_thread->budget_callout = the_thread->Start.budget_callout; 112c1b: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax 112c21: 89 83 80 00 00 00 mov %eax,0x80(%ebx) the_thread->Start.pointer_argument = pointer_argument; 112c27: 8b 45 0c mov 0xc(%ebp),%eax 112c2a: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 112c30: 8b 45 10 mov 0x10(%ebp),%eax 112c33: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 112c39: 53 push %ebx 112c3a: e8 79 c1 ff ff call 10edb8 <_Thread_queue_Extract_with_proxy> 112c3f: 83 c4 10 add $0x10,%esp 112c42: 84 c0 test %al,%al 112c44: 75 06 jne 112c4c <_Thread_Reset+0x54> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 112c46: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 112c4a: 74 28 je 112c74 <_Thread_Reset+0x7c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 112c4c: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax 112c52: 39 43 14 cmp %eax,0x14(%ebx) 112c55: 74 15 je 112c6c <_Thread_Reset+0x74> the_thread->real_priority = the_thread->Start.initial_priority; 112c57: 89 43 18 mov %eax,0x18(%ebx) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 112c5a: 89 45 0c mov %eax,0xc(%ebp) 112c5d: 89 5d 08 mov %ebx,0x8(%ebp) } } 112c60: 8b 5d fc mov -0x4(%ebp),%ebx 112c63: 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 ); 112c64: e9 1b c3 ff ff jmp 10ef84 <_Thread_Set_priority> 112c69: 8d 76 00 lea 0x0(%esi),%esi } } 112c6c: 8b 5d fc mov -0x4(%ebp),%ebx 112c6f: c9 leave 112c70: c3 ret 112c71: 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 ); 112c74: 83 ec 0c sub $0xc,%esp 112c77: 8d 43 48 lea 0x48(%ebx),%eax 112c7a: 50 push %eax 112c7b: e8 28 cb ff ff call 10f7a8 <_Watchdog_Remove> 112c80: 83 c4 10 add $0x10,%esp 112c83: eb c7 jmp 112c4c <_Thread_Reset+0x54> =============================================================================== 00111f80 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 111f80: 55 push %ebp 111f81: 89 e5 mov %esp,%ebp 111f83: 56 push %esi 111f84: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 111f85: a1 18 74 12 00 mov 0x127418,%eax ready = executing->ready; 111f8a: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 111f90: 9c pushf 111f91: fa cli 111f92: 59 pop %ecx if ( _Chain_Has_only_one_node( ready ) ) { 111f93: 8b 1a mov (%edx),%ebx 111f95: 3b 5a 08 cmp 0x8(%edx),%ebx 111f98: 74 2c je 111fc6 <_Thread_Reset_timeslice+0x46> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 111f9a: 8b 30 mov (%eax),%esi previous = the_node->previous; 111f9c: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 111f9f: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 111fa2: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 111fa4: 8d 5a 04 lea 0x4(%edx),%ebx 111fa7: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 111fa9: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 111fac: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 111faf: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 111fb1: 89 58 04 mov %ebx,0x4(%eax) return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 111fb4: 51 push %ecx 111fb5: 9d popf 111fb6: fa cli if ( _Thread_Is_heir( executing ) ) 111fb7: 3b 05 e8 73 12 00 cmp 0x1273e8,%eax 111fbd: 74 0d je 111fcc <_Thread_Reset_timeslice+0x4c><== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 111fbf: c6 05 28 74 12 00 01 movb $0x1,0x127428 _ISR_Enable( level ); 111fc6: 51 push %ecx 111fc7: 9d popf } 111fc8: 5b pop %ebx 111fc9: 5e pop %esi 111fca: c9 leave 111fcb: c3 ret _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 111fcc: 8b 02 mov (%edx),%eax 111fce: a3 e8 73 12 00 mov %eax,0x1273e8 111fd3: eb ea jmp 111fbf <_Thread_Reset_timeslice+0x3f> =============================================================================== 00111754 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 111754: 55 push %ebp 111755: 89 e5 mov %esp,%ebp 111757: 53 push %ebx 111758: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 11175b: 9c pushf 11175c: fa cli 11175d: 59 pop %ecx _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 11175e: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 111761: f6 c2 02 test $0x2,%dl 111764: 74 6e je 1117d4 <_Thread_Resume+0x80> <== NEVER TAKEN 111766: 83 e2 fd and $0xfffffffd,%edx current_state = 111769: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 11176c: 85 d2 test %edx,%edx 11176e: 75 64 jne 1117d4 <_Thread_Resume+0x80> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 111770: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 111776: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 11177d: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 111780: 66 8b 15 4c ba 12 00 mov 0x12ba4c,%dx 111787: 0b 90 94 00 00 00 or 0x94(%eax),%edx 11178d: 66 89 15 4c ba 12 00 mov %dx,0x12ba4c _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 111794: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 11179a: 8d 5a 04 lea 0x4(%edx),%ebx 11179d: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 11179f: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 1117a2: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 1117a5: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 1117a7: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 1117aa: 51 push %ecx 1117ab: 9d popf 1117ac: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 1117ad: 8b 50 14 mov 0x14(%eax),%edx 1117b0: 8b 1d 28 ba 12 00 mov 0x12ba28,%ebx 1117b6: 3b 53 14 cmp 0x14(%ebx),%edx 1117b9: 73 19 jae 1117d4 <_Thread_Resume+0x80> _Thread_Heir = the_thread; 1117bb: a3 28 ba 12 00 mov %eax,0x12ba28 if ( _Thread_Executing->is_preemptible || 1117c0: a1 58 ba 12 00 mov 0x12ba58,%eax 1117c5: 80 78 75 00 cmpb $0x0,0x75(%eax) 1117c9: 74 11 je 1117dc <_Thread_Resume+0x88> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 1117cb: c6 05 68 ba 12 00 01 movb $0x1,0x12ba68 1117d2: 66 90 xchg %ax,%ax } } } _ISR_Enable( level ); 1117d4: 51 push %ecx 1117d5: 9d popf } 1117d6: 5b pop %ebx 1117d7: c9 leave 1117d8: c3 ret 1117d9: 8d 76 00 lea 0x0(%esi),%esi _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 1117dc: 85 d2 test %edx,%edx 1117de: 74 eb je 1117cb <_Thread_Resume+0x77> <== NEVER TAKEN 1117e0: eb f2 jmp 1117d4 <_Thread_Resume+0x80> =============================================================================== 0010e43c <_Thread_Set_state>: void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 10e43c: 55 push %ebp 10e43d: 89 e5 mov %esp,%ebp 10e43f: 56 push %esi 10e440: 53 push %ebx 10e441: 8b 45 08 mov 0x8(%ebp),%eax 10e444: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10e447: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10e44d: 9c pushf 10e44e: fa cli 10e44f: 59 pop %ecx if ( !_States_Is_ready( the_thread->current_state ) ) { 10e450: 8b 58 10 mov 0x10(%eax),%ebx 10e453: 85 db test %ebx,%ebx 10e455: 75 2d jne 10e484 <_Thread_Set_state+0x48> _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; 10e457: 89 70 10 mov %esi,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 10e45a: 8b 1a mov (%edx),%ebx 10e45c: 3b 5a 08 cmp 0x8(%edx),%ebx 10e45f: 74 3b je 10e49c <_Thread_Set_state+0x60> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10e461: 8b 18 mov (%eax),%ebx previous = the_node->previous; 10e463: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10e466: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 10e469: 89 1a mov %ebx,(%edx) _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 10e46b: 51 push %ecx 10e46c: 9d popf 10e46d: fa cli if ( _Thread_Is_heir( the_thread ) ) 10e46e: 3b 05 e8 73 12 00 cmp 0x1273e8,%eax 10e474: 74 62 je 10e4d8 <_Thread_Set_state+0x9c> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10e476: 3b 05 18 74 12 00 cmp 0x127418,%eax 10e47c: 74 12 je 10e490 <_Thread_Set_state+0x54> _Context_Switch_necessary = true; _ISR_Enable( level ); 10e47e: 51 push %ecx 10e47f: 9d popf } 10e480: 5b pop %ebx 10e481: 5e pop %esi 10e482: c9 leave 10e483: c3 ret Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = 10e484: 09 f3 or %esi,%ebx 10e486: 89 58 10 mov %ebx,0x10(%eax) _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 10e489: 51 push %ecx 10e48a: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10e48b: 5b pop %ebx 10e48c: 5e pop %esi 10e48d: c9 leave 10e48e: c3 ret 10e48f: 90 nop if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 10e490: c6 05 28 74 12 00 01 movb $0x1,0x127428 10e497: eb e5 jmp 10e47e <_Thread_Set_state+0x42> 10e499: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e49c: 8d 5a 04 lea 0x4(%edx),%ebx 10e49f: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 10e4a1: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10e4a8: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10e4ab: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10e4b1: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 10e4b8: 66 21 1a and %bx,(%edx) the_thread->current_state = state; if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 10e4bb: 66 83 3a 00 cmpw $0x0,(%edx) 10e4bf: 75 aa jne 10e46b <_Thread_Set_state+0x2f> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10e4c1: 66 8b 15 0c 74 12 00 mov 0x12740c,%dx 10e4c8: 23 90 98 00 00 00 and 0x98(%eax),%edx 10e4ce: 66 89 15 0c 74 12 00 mov %dx,0x12740c 10e4d5: eb 94 jmp 10e46b <_Thread_Set_state+0x2f> 10e4d7: 90 nop RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10e4d8: 66 8b 35 0c 74 12 00 mov 0x12740c,%si 10e4df: 31 d2 xor %edx,%edx 10e4e1: 89 d3 mov %edx,%ebx 10e4e3: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10e4e7: 0f b7 db movzwl %bx,%ebx 10e4ea: 66 8b b4 1b a0 74 12 mov 0x1274a0(%ebx,%ebx,1),%si 10e4f1: 00 10e4f2: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10e4f6: c1 e3 04 shl $0x4,%ebx 10e4f9: 0f b7 d2 movzwl %dx,%edx 10e4fc: 8d 14 13 lea (%ebx,%edx,1),%edx 10e4ff: 8d 1c 52 lea (%edx,%edx,2),%ebx 10e502: 8b 15 20 73 12 00 mov 0x127320,%edx 10e508: 8b 14 9a mov (%edx,%ebx,4),%edx 10e50b: 89 15 e8 73 12 00 mov %edx,0x1273e8 10e511: e9 60 ff ff ff jmp 10e476 <_Thread_Set_state+0x3a> =============================================================================== 0010e58c <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10e58c: 55 push %ebp 10e58d: 89 e5 mov %esp,%ebp 10e58f: 53 push %ebx 10e590: 83 ec 04 sub $0x4,%esp 10e593: a1 10 32 12 00 mov 0x123210,%eax 10e598: 8b 5d 0c mov 0xc(%ebp),%ebx 10e59b: 39 c3 cmp %eax,%ebx 10e59d: 73 02 jae 10e5a1 <_Thread_Stack_Allocate+0x15> 10e59f: 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 ) { 10e5a1: a1 40 32 12 00 mov 0x123240,%eax 10e5a6: 85 c0 test %eax,%eax 10e5a8: 74 32 je 10e5dc <_Thread_Stack_Allocate+0x50> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 10e5aa: 83 ec 0c sub $0xc,%esp 10e5ad: 53 push %ebx 10e5ae: ff d0 call *%eax 10e5b0: 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 ) 10e5b3: 85 c0 test %eax,%eax 10e5b5: 74 11 je 10e5c8 <_Thread_Stack_Allocate+0x3c> the_stack_size = 0; the_thread->Start.stack = stack_addr; 10e5b7: 8b 55 08 mov 0x8(%ebp),%edx 10e5ba: 89 82 cc 00 00 00 mov %eax,0xcc(%edx) return the_stack_size; } 10e5c0: 89 d8 mov %ebx,%eax 10e5c2: 8b 5d fc mov -0x4(%ebp),%ebx 10e5c5: c9 leave 10e5c6: c3 ret 10e5c7: 90 nop the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 10e5c8: 31 db xor %ebx,%ebx the_stack_size = 0; the_thread->Start.stack = stack_addr; 10e5ca: 8b 55 08 mov 0x8(%ebp),%edx 10e5cd: 89 82 cc 00 00 00 mov %eax,0xcc(%edx) return the_stack_size; } 10e5d3: 89 d8 mov %ebx,%eax 10e5d5: 8b 5d fc mov -0x4(%ebp),%ebx 10e5d8: c9 leave 10e5d9: c3 ret 10e5da: 66 90 xchg %ax,%ax RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 10e5dc: 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 ); 10e5df: 83 ec 0c sub $0xc,%esp 10e5e2: 53 push %ebx 10e5e3: e8 d0 06 00 00 call 10ecb8 <_Workspace_Allocate> 10e5e8: 83 c4 10 add $0x10,%esp 10e5eb: eb c6 jmp 10e5b3 <_Thread_Stack_Allocate+0x27> =============================================================================== 0010e5f0 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10e5f0: 55 push %ebp 10e5f1: 89 e5 mov %esp,%ebp 10e5f3: 83 ec 08 sub $0x8,%esp 10e5f6: 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 ) 10e5f9: a1 44 32 12 00 mov 0x123244,%eax 10e5fe: 85 c0 test %eax,%eax 10e600: 74 0e je 10e610 <_Thread_Stack_Free+0x20> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10e602: 8b 92 c4 00 00 00 mov 0xc4(%edx),%edx 10e608: 89 55 08 mov %edx,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10e60b: 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 ); 10e60c: ff e0 jmp *%eax 10e60e: 66 90 xchg %ax,%ax else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10e610: 8b 82 c4 00 00 00 mov 0xc4(%edx),%eax 10e616: 89 45 08 mov %eax,0x8(%ebp) } 10e619: 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 ); 10e61a: e9 b5 06 00 00 jmp 10ecd4 <_Workspace_Free> =============================================================================== 00111fd8 <_Thread_Suspend>: */ void _Thread_Suspend( Thread_Control *the_thread ) { 111fd8: 55 push %ebp 111fd9: 89 e5 mov %esp,%ebp 111fdb: 56 push %esi 111fdc: 53 push %ebx 111fdd: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 111fe0: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 111fe6: 9c pushf 111fe7: fa cli 111fe8: 59 pop %ecx #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { 111fe9: 8b 58 10 mov 0x10(%eax),%ebx 111fec: 85 db test %ebx,%ebx 111fee: 75 34 jne 112024 <_Thread_Suspend+0x4c> _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 111ff0: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 111ff7: 8b 1a mov (%edx),%ebx 111ff9: 3b 5a 08 cmp 0x8(%edx),%ebx 111ffc: 74 3e je 11203c <_Thread_Suspend+0x64> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 111ffe: 8b 18 mov (%eax),%ebx previous = the_node->previous; 112000: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 112003: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 112006: 89 1a mov %ebx,(%edx) _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 112008: 51 push %ecx 112009: 9d popf 11200a: fa cli if ( _Thread_Is_heir( the_thread ) ) 11200b: 3b 05 e8 73 12 00 cmp 0x1273e8,%eax 112011: 74 65 je 112078 <_Thread_Suspend+0xa0> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 112013: 3b 05 18 74 12 00 cmp 0x127418,%eax 112019: 74 15 je 112030 <_Thread_Suspend+0x58> _Context_Switch_necessary = true; _ISR_Enable( level ); 11201b: 51 push %ecx 11201c: 9d popf } 11201d: 5b pop %ebx 11201e: 5e pop %esi 11201f: c9 leave 112020: c3 ret 112021: 8d 76 00 lea 0x0(%esi),%esi _ISR_Disable( level ); #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = 112024: 83 cb 02 or $0x2,%ebx 112027: 89 58 10 mov %ebx,0x10(%eax) _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 11202a: 51 push %ecx 11202b: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 11202c: 5b pop %ebx 11202d: 5e pop %esi 11202e: c9 leave 11202f: c3 ret if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 112030: c6 05 28 74 12 00 01 movb $0x1,0x127428 112037: eb e2 jmp 11201b <_Thread_Suspend+0x43> 112039: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11203c: 8d 5a 04 lea 0x4(%edx),%ebx 11203f: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 112041: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 112048: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 11204b: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 112051: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 112058: 66 21 1a and %bx,(%edx) the_thread->current_state = STATES_SUSPENDED; if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 11205b: 66 83 3a 00 cmpw $0x0,(%edx) 11205f: 75 a7 jne 112008 <_Thread_Suspend+0x30> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 112061: 66 8b 15 0c 74 12 00 mov 0x12740c,%dx 112068: 23 90 98 00 00 00 and 0x98(%eax),%edx 11206e: 66 89 15 0c 74 12 00 mov %dx,0x12740c 112075: eb 91 jmp 112008 <_Thread_Suspend+0x30> 112077: 90 nop RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 112078: 66 8b 35 0c 74 12 00 mov 0x12740c,%si 11207f: 31 d2 xor %edx,%edx 112081: 89 d3 mov %edx,%ebx 112083: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 112087: 0f b7 db movzwl %bx,%ebx 11208a: 66 8b b4 1b a0 74 12 mov 0x1274a0(%ebx,%ebx,1),%si 112091: 00 112092: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 112096: c1 e3 04 shl $0x4,%ebx 112099: 0f b7 d2 movzwl %dx,%edx 11209c: 8d 14 13 lea (%ebx,%edx,1),%edx 11209f: 8d 1c 52 lea (%edx,%edx,2),%ebx 1120a2: 8b 15 20 73 12 00 mov 0x127320,%edx 1120a8: 8b 14 9a mov (%edx,%ebx,4),%edx 1120ab: 89 15 e8 73 12 00 mov %edx,0x1273e8 1120b1: e9 5d ff ff ff jmp 112013 <_Thread_Suspend+0x3b> =============================================================================== 0010e71c <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10e71c: 55 push %ebp 10e71d: 89 e5 mov %esp,%ebp 10e71f: 56 push %esi 10e720: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10e721: a1 18 74 12 00 mov 0x127418,%eax ready = executing->ready; 10e726: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10e72c: 9c pushf 10e72d: fa cli 10e72e: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10e72f: 8b 1a mov (%edx),%ebx 10e731: 3b 5a 08 cmp 0x8(%edx),%ebx 10e734: 74 3e je 10e774 <_Thread_Yield_processor+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10e736: 8b 30 mov (%eax),%esi previous = the_node->previous; 10e738: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10e73b: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10e73e: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10e740: 8d 5a 04 lea 0x4(%edx),%ebx 10e743: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10e745: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10e748: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10e74b: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10e74d: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10e750: 51 push %ecx 10e751: 9d popf 10e752: fa cli if ( _Thread_Is_heir( executing ) ) 10e753: 3b 05 e8 73 12 00 cmp 0x1273e8,%eax 10e759: 74 0d je 10e768 <_Thread_Yield_processor+0x4c><== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 10e75b: c6 05 28 74 12 00 01 movb $0x1,0x127428 _ISR_Enable( level ); 10e762: 51 push %ecx 10e763: 9d popf } 10e764: 5b pop %ebx 10e765: 5e pop %esi 10e766: c9 leave 10e767: c3 ret _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 10e768: 8b 02 mov (%edx),%eax 10e76a: a3 e8 73 12 00 mov %eax,0x1273e8 10e76f: eb ea jmp 10e75b <_Thread_Yield_processor+0x3f> 10e771: 8d 76 00 lea 0x0(%esi),%esi _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10e774: 3b 05 e8 73 12 00 cmp 0x1273e8,%eax 10e77a: 75 df jne 10e75b <_Thread_Yield_processor+0x3f><== NEVER TAKEN 10e77c: eb e4 jmp 10e762 <_Thread_Yield_processor+0x46> =============================================================================== 0010dfb8 <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10dfb8: 55 push %ebp 10dfb9: 89 e5 mov %esp,%ebp 10dfbb: 57 push %edi 10dfbc: 56 push %esi 10dfbd: 53 push %ebx 10dfbe: 83 ec 1c sub $0x1c,%esp 10dfc1: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 10dfc4: 9c pushf 10dfc5: fa cli 10dfc6: 58 pop %eax 10dfc7: 89 f2 mov %esi,%edx 10dfc9: 31 c9 xor %ecx,%ecx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10dfcb: 8d 5a 04 lea 0x4(%edx),%ebx 10dfce: 39 1a cmp %ebx,(%edx) 10dfd0: 75 1a jne 10dfec <_Thread_queue_Dequeue_priority+0x34> for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10dfd2: 41 inc %ecx 10dfd3: 83 c2 0c add $0xc,%edx Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 10dfd6: 83 f9 04 cmp $0x4,%ecx 10dfd9: 75 f0 jne 10dfcb <_Thread_queue_Dequeue_priority+0x13> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10dfdb: 50 push %eax 10dfdc: 9d popf 10dfdd: 31 db xor %ebx,%ebx #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 10dfdf: 89 d8 mov %ebx,%eax 10dfe1: 8d 65 f4 lea -0xc(%ebp),%esp 10dfe4: 5b pop %ebx 10dfe5: 5e pop %esi 10dfe6: 5f pop %edi 10dfe7: c9 leave 10dfe8: c3 ret 10dfe9: 8d 76 00 lea 0x0(%esi),%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 ] ) ) { the_thread = (Thread_Control *) 10dfec: 8d 14 49 lea (%ecx,%ecx,2),%edx 10dfef: 8b 1c 96 mov (%esi,%edx,4),%ebx */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10dff2: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) new_first_node = the_thread->Wait.Block2n.first; 10dff9: 8b 53 38 mov 0x38(%ebx),%edx new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 10dffc: 8b 0b mov (%ebx),%ecx previous_node = the_thread->Object.Node.previous; 10dffe: 8b 73 04 mov 0x4(%ebx),%esi 10e001: 8d 7b 3c lea 0x3c(%ebx),%edi 10e004: 39 fa cmp %edi,%edx 10e006: 74 76 je 10e07e <_Thread_queue_Dequeue_priority+0xc6> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; 10e008: 8b 7b 40 mov 0x40(%ebx),%edi 10e00b: 89 7d e4 mov %edi,-0x1c(%ebp) new_second_node = new_first_node->next; 10e00e: 8b 3a mov (%edx),%edi previous_node->next = new_first_node; 10e010: 89 16 mov %edx,(%esi) next_node->previous = new_first_node; 10e012: 89 51 04 mov %edx,0x4(%ecx) new_first_node->next = next_node; 10e015: 89 0a mov %ecx,(%edx) new_first_node->previous = previous_node; 10e017: 89 72 04 mov %esi,0x4(%edx) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10e01a: 8b 4b 38 mov 0x38(%ebx),%ecx 10e01d: 3b 4b 40 cmp 0x40(%ebx),%ecx 10e020: 74 14 je 10e036 <_Thread_queue_Dequeue_priority+0x7e> /* > two threads on 2-n */ new_second_node->previous = 10e022: 8d 4a 38 lea 0x38(%edx),%ecx 10e025: 89 4f 04 mov %ecx,0x4(%edi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 10e028: 89 7a 38 mov %edi,0x38(%edx) new_first_thread->Wait.Block2n.last = last_node; 10e02b: 8b 4d e4 mov -0x1c(%ebp),%ecx 10e02e: 89 4a 40 mov %ecx,0x40(%edx) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 10e031: 83 c2 3c add $0x3c,%edx 10e034: 89 11 mov %edx,(%ecx) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10e036: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10e03a: 74 18 je 10e054 <_Thread_queue_Dequeue_priority+0x9c> _ISR_Enable( level ); 10e03c: 50 push %eax 10e03d: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10e03e: 83 ec 08 sub $0x8,%esp 10e041: 68 f8 ff 03 10 push $0x1003fff8 10e046: 53 push %ebx 10e047: e8 98 f7 ff ff call 10d7e4 <_Thread_Clear_state> 10e04c: 83 c4 10 add $0x10,%esp 10e04f: eb 8e jmp 10dfdf <_Thread_queue_Dequeue_priority+0x27> 10e051: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10e054: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10e05b: 50 push %eax 10e05c: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10e05d: 83 ec 0c sub $0xc,%esp 10e060: 8d 43 48 lea 0x48(%ebx),%eax 10e063: 50 push %eax 10e064: e8 4b 0b 00 00 call 10ebb4 <_Watchdog_Remove> 10e069: 58 pop %eax 10e06a: 5a pop %edx 10e06b: 68 f8 ff 03 10 push $0x1003fff8 10e070: 53 push %ebx 10e071: e8 6e f7 ff ff call 10d7e4 <_Thread_Clear_state> 10e076: 83 c4 10 add $0x10,%esp 10e079: e9 61 ff ff ff jmp 10dfdf <_Thread_queue_Dequeue_priority+0x27> new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 10e07e: 89 0e mov %ecx,(%esi) next_node->previous = previous_node; 10e080: 89 71 04 mov %esi,0x4(%ecx) 10e083: eb b1 jmp 10e036 <_Thread_queue_Dequeue_priority+0x7e> =============================================================================== 00111d70 <_Thread_queue_Enqueue_fifo>: Thread_blocking_operation_States _Thread_queue_Enqueue_fifo ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 111d70: 55 push %ebp 111d71: 89 e5 mov %esp,%ebp 111d73: 56 push %esi 111d74: 53 push %ebx 111d75: 8b 55 08 mov 0x8(%ebp),%edx 111d78: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 111d7b: 9c pushf 111d7c: fa cli 111d7d: 59 pop %ecx sync_state = the_thread_queue->sync_state; 111d7e: 8b 42 30 mov 0x30(%edx),%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 111d81: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 111d88: 83 f8 01 cmp $0x1,%eax 111d8b: 74 0b je 111d98 <_Thread_queue_Enqueue_fifo+0x28> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 111d8d: 8b 55 10 mov 0x10(%ebp),%edx 111d90: 89 0a mov %ecx,(%edx) return sync_state; } 111d92: 5b pop %ebx 111d93: 5e pop %esi 111d94: c9 leave 111d95: c3 ret 111d96: 66 90 xchg %ax,%ax Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 111d98: 8d 72 04 lea 0x4(%edx),%esi 111d9b: 89 33 mov %esi,(%ebx) old_last_node = the_chain->last; 111d9d: 8b 72 08 mov 0x8(%edx),%esi the_chain->last = the_node; 111da0: 89 5a 08 mov %ebx,0x8(%edx) old_last_node->next = the_node; 111da3: 89 1e mov %ebx,(%esi) the_node->previous = old_last_node; 111da5: 89 73 04 mov %esi,0x4(%ebx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { _Chain_Append_unprotected( &the_thread_queue->Queues.Fifo, &the_thread->Object.Node ); the_thread->Wait.queue = the_thread_queue; 111da8: 89 53 44 mov %edx,0x44(%ebx) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 111dab: 51 push %ecx 111dac: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return sync_state; } 111dad: 5b pop %ebx 111dae: 5e pop %esi 111daf: c9 leave 111db0: c3 ret =============================================================================== 0010e120 <_Thread_queue_Enqueue_priority>: Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 10e120: 55 push %ebp 10e121: 89 e5 mov %esp,%ebp 10e123: 57 push %edi 10e124: 56 push %esi 10e125: 53 push %ebx 10e126: 83 ec 08 sub $0x8,%esp 10e129: 8b 7d 0c mov 0xc(%ebp),%edi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e12c: 8d 47 3c lea 0x3c(%edi),%eax 10e12f: 89 47 38 mov %eax,0x38(%edi) the_chain->permanent_null = NULL; 10e132: c7 47 3c 00 00 00 00 movl $0x0,0x3c(%edi) the_chain->last = _Chain_Head(the_chain); 10e139: 8d 47 38 lea 0x38(%edi),%eax 10e13c: 89 47 40 mov %eax,0x40(%edi) Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 10e13f: 8b 57 14 mov 0x14(%edi),%edx header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10e142: 89 d0 mov %edx,%eax 10e144: c1 e8 06 shr $0x6,%eax 10e147: 8d 04 40 lea (%eax,%eax,2),%eax 10e14a: 8b 4d 08 mov 0x8(%ebp),%ecx 10e14d: 8d 34 81 lea (%ecx,%eax,4),%esi block_state = the_thread_queue->state; 10e150: 8b 59 38 mov 0x38(%ecx),%ebx if ( _Thread_queue_Is_reverse_search( priority ) ) 10e153: f6 c2 20 test $0x20,%dl 10e156: 75 60 jne 10e1b8 <_Thread_queue_Enqueue_priority+0x98> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e158: 8d 46 04 lea 0x4(%esi),%eax 10e15b: 89 75 f0 mov %esi,-0x10(%ebp) 10e15e: 89 7d ec mov %edi,-0x14(%ebp) 10e161: 89 c7 mov %eax,%edi goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10e163: 9c pushf 10e164: fa cli 10e165: 5e pop %esi search_thread = (Thread_Control *) header->first; 10e166: 8b 4d f0 mov -0x10(%ebp),%ecx 10e169: 8b 01 mov (%ecx),%eax while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10e16b: 39 f8 cmp %edi,%eax 10e16d: 75 17 jne 10e186 <_Thread_queue_Enqueue_priority+0x66> 10e16f: e9 09 01 00 00 jmp 10e27d <_Thread_queue_Enqueue_priority+0x15d> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10e174: 56 push %esi 10e175: 9d popf 10e176: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10e177: 85 58 10 test %ebx,0x10(%eax) 10e17a: 0f 84 a8 00 00 00 je 10e228 <_Thread_queue_Enqueue_priority+0x108><== NEVER TAKEN _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10e180: 8b 00 mov (%eax),%eax restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10e182: 39 f8 cmp %edi,%eax 10e184: 74 07 je 10e18d <_Thread_queue_Enqueue_priority+0x6d> search_priority = search_thread->current_priority; 10e186: 8b 48 14 mov 0x14(%eax),%ecx if ( priority <= search_priority ) 10e189: 39 ca cmp %ecx,%edx 10e18b: 77 e7 ja 10e174 <_Thread_queue_Enqueue_priority+0x54> 10e18d: 89 4d f0 mov %ecx,-0x10(%ebp) 10e190: 8b 7d ec mov -0x14(%ebp),%edi restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10e193: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10e195: 8b 4d 08 mov 0x8(%ebp),%ecx 10e198: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10e19c: 0f 84 8e 00 00 00 je 10e230 <_Thread_queue_Enqueue_priority+0x110> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 10e1a2: 8b 45 10 mov 0x10(%ebp),%eax 10e1a5: 89 18 mov %ebx,(%eax) return the_thread_queue->sync_state; 10e1a7: 8b 55 08 mov 0x8(%ebp),%edx 10e1aa: 8b 42 30 mov 0x30(%edx),%eax } 10e1ad: 83 c4 08 add $0x8,%esp 10e1b0: 5b pop %ebx 10e1b1: 5e pop %esi 10e1b2: 5f pop %edi 10e1b3: c9 leave 10e1b4: c3 ret 10e1b5: 8d 76 00 lea 0x0(%esi),%esi 10e1b8: 89 7d f0 mov %edi,-0x10(%ebp) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 10e1bb: 0f b6 0d 14 32 12 00 movzbl 0x123214,%ecx 10e1c2: 41 inc %ecx _ISR_Disable( level ); 10e1c3: 9c pushf 10e1c4: fa cli 10e1c5: 5f pop %edi search_thread = (Thread_Control *) header->last; 10e1c6: 8b 46 08 mov 0x8(%esi),%eax while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10e1c9: 39 f0 cmp %esi,%eax 10e1cb: 75 12 jne 10e1df <_Thread_queue_Enqueue_priority+0xbf> 10e1cd: eb 17 jmp 10e1e6 <_Thread_queue_Enqueue_priority+0xc6> 10e1cf: 90 nop break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10e1d0: 57 push %edi 10e1d1: 9d popf 10e1d2: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10e1d3: 85 58 10 test %ebx,0x10(%eax) 10e1d6: 74 4c je 10e224 <_Thread_queue_Enqueue_priority+0x104> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 10e1d8: 8b 40 04 mov 0x4(%eax),%eax restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10e1db: 39 f0 cmp %esi,%eax 10e1dd: 74 07 je 10e1e6 <_Thread_queue_Enqueue_priority+0xc6> search_priority = search_thread->current_priority; 10e1df: 8b 48 14 mov 0x14(%eax),%ecx if ( priority >= search_priority ) 10e1e2: 39 ca cmp %ecx,%edx 10e1e4: 72 ea jb 10e1d0 <_Thread_queue_Enqueue_priority+0xb0> 10e1e6: 89 fe mov %edi,%esi 10e1e8: 89 4d ec mov %ecx,-0x14(%ebp) 10e1eb: 8b 7d f0 mov -0x10(%ebp),%edi restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10e1ee: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10e1f0: 8b 4d 08 mov 0x8(%ebp),%ecx 10e1f3: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10e1f7: 75 a9 jne 10e1a2 <_Thread_queue_Enqueue_priority+0x82> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10e1f9: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10e200: 3b 55 ec cmp -0x14(%ebp),%edx 10e203: 74 56 je 10e25b <_Thread_queue_Enqueue_priority+0x13b> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10e205: 8b 10 mov (%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10e207: 89 17 mov %edx,(%edi) the_node->previous = search_node; 10e209: 89 47 04 mov %eax,0x4(%edi) search_node->next = the_node; 10e20c: 89 38 mov %edi,(%eax) next_node->previous = the_node; 10e20e: 89 7a 04 mov %edi,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10e211: 89 4f 44 mov %ecx,0x44(%edi) _ISR_Enable( level ); 10e214: 56 push %esi 10e215: 9d popf 10e216: b8 01 00 00 00 mov $0x1,%eax * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10e21b: 83 c4 08 add $0x8,%esp 10e21e: 5b pop %ebx 10e21f: 5e pop %esi 10e220: 5f pop %edi 10e221: c9 leave 10e222: c3 ret 10e223: 90 nop if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10e224: 57 push %edi 10e225: 9d popf goto restart_reverse_search; 10e226: eb 93 jmp 10e1bb <_Thread_queue_Enqueue_priority+0x9b> if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10e228: 56 push %esi <== NOT EXECUTED 10e229: 9d popf <== NOT EXECUTED goto restart_forward_search; 10e22a: e9 34 ff ff ff jmp 10e163 <_Thread_queue_Enqueue_priority+0x43><== NOT EXECUTED 10e22f: 90 nop <== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10e230: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10e237: 3b 55 f0 cmp -0x10(%ebp),%edx 10e23a: 74 1f je 10e25b <_Thread_queue_Enqueue_priority+0x13b> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10e23c: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10e23f: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10e241: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10e244: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10e246: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10e249: 89 4f 44 mov %ecx,0x44(%edi) _ISR_Enable( level ); 10e24c: 56 push %esi 10e24d: 9d popf 10e24e: b8 01 00 00 00 mov $0x1,%eax * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10e253: 83 c4 08 add $0x8,%esp 10e256: 5b pop %ebx 10e257: 5e pop %esi 10e258: 5f pop %edi 10e259: c9 leave 10e25a: c3 ret 10e25b: 83 c0 3c add $0x3c,%eax _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 10e25e: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10e261: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10e263: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10e266: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10e268: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10e26b: 8b 45 08 mov 0x8(%ebp),%eax 10e26e: 89 47 44 mov %eax,0x44(%edi) _ISR_Enable( level ); 10e271: 53 push %ebx 10e272: 9d popf 10e273: b8 01 00 00 00 mov $0x1,%eax return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10e278: e9 30 ff ff ff jmp 10e1ad <_Thread_queue_Enqueue_priority+0x8d> 10e27d: 8b 7d ec mov -0x14(%ebp),%edi restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10e280: 89 f3 mov %esi,%ebx 10e282: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp) 10e289: e9 07 ff ff ff jmp 10e195 <_Thread_queue_Enqueue_priority+0x75> =============================================================================== 00111db4 <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 111db4: 55 push %ebp 111db5: 89 e5 mov %esp,%ebp 111db7: 83 ec 08 sub $0x8,%esp 111dba: 8b 45 08 mov 0x8(%ebp),%eax 111dbd: 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 ) 111dc0: 83 78 34 01 cmpl $0x1,0x34(%eax) 111dc4: 74 0e je 111dd4 <_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 ); 111dc6: 89 55 0c mov %edx,0xc(%ebp) 111dc9: 89 45 08 mov %eax,0x8(%ebp) } 111dcc: 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 ); 111dcd: e9 46 1f 00 00 jmp 113d18 <_Thread_queue_Extract_fifo> 111dd2: 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 ); 111dd4: 51 push %ecx 111dd5: 6a 00 push $0x0 111dd7: 52 push %edx 111dd8: 50 push %eax 111dd9: e8 06 00 00 00 call 111de4 <_Thread_queue_Extract_priority_helper> 111dde: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 111de1: c9 leave 111de2: c3 ret =============================================================================== 00113d18 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 113d18: 55 push %ebp 113d19: 89 e5 mov %esp,%ebp 113d1b: 53 push %ebx 113d1c: 83 ec 04 sub $0x4,%esp 113d1f: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 113d22: 9c pushf 113d23: fa cli 113d24: 58 pop %eax if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 113d25: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 113d2c: 74 2e je 113d5c <_Thread_queue_Extract_fifo+0x44> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 113d2e: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 113d30: 8b 53 04 mov 0x4(%ebx),%edx next->previous = previous; 113d33: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 113d36: 89 0a mov %ecx,(%edx) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 113d38: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 113d3f: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 113d43: 74 1f je 113d64 <_Thread_queue_Extract_fifo+0x4c> _ISR_Enable( level ); 113d45: 50 push %eax 113d46: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 113d47: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 113d4e: 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 } 113d51: 8b 5d fc mov -0x4(%ebp),%ebx 113d54: c9 leave 113d55: e9 8a 9a ff ff jmp 10d7e4 <_Thread_Clear_state> 113d5a: 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 ); 113d5c: 50 push %eax 113d5d: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 113d5e: 8b 5d fc mov -0x4(%ebp),%ebx 113d61: c9 leave 113d62: c3 ret 113d63: 90 nop 113d64: 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 ); 113d6b: 50 push %eax 113d6c: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 113d6d: 83 ec 0c sub $0xc,%esp 113d70: 8d 43 48 lea 0x48(%ebx),%eax 113d73: 50 push %eax 113d74: e8 3b ae ff ff call 10ebb4 <_Watchdog_Remove> 113d79: 83 c4 10 add $0x10,%esp 113d7c: eb c9 jmp 113d47 <_Thread_queue_Extract_fifo+0x2f> =============================================================================== 00111de4 <_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 ) { 111de4: 55 push %ebp 111de5: 89 e5 mov %esp,%ebp 111de7: 57 push %edi 111de8: 56 push %esi 111de9: 53 push %ebx 111dea: 83 ec 1c sub $0x1c,%esp 111ded: 8b 5d 0c mov 0xc(%ebp),%ebx 111df0: 8a 45 10 mov 0x10(%ebp),%al 111df3: 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 ); 111df6: 9c pushf 111df7: fa cli 111df8: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 111dfb: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 111e02: 74 60 je 111e64 <_Thread_queue_Extract_priority_helper+0x80> /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 111e04: 8b 13 mov (%ebx),%edx previous_node = the_node->previous; 111e06: 8b 4b 04 mov 0x4(%ebx),%ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 111e09: 8b 43 38 mov 0x38(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 111e0c: 8d 73 3c lea 0x3c(%ebx),%esi 111e0f: 39 f0 cmp %esi,%eax 111e11: 74 5d je 111e70 <_Thread_queue_Extract_priority_helper+0x8c> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 111e13: 8b 7b 40 mov 0x40(%ebx),%edi new_second_node = new_first_node->next; 111e16: 8b 30 mov (%eax),%esi previous_node->next = new_first_node; 111e18: 89 01 mov %eax,(%ecx) next_node->previous = new_first_node; 111e1a: 89 42 04 mov %eax,0x4(%edx) new_first_node->next = next_node; 111e1d: 89 10 mov %edx,(%eax) new_first_node->previous = previous_node; 111e1f: 89 48 04 mov %ecx,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 111e22: 8b 53 38 mov 0x38(%ebx),%edx 111e25: 3b 53 40 cmp 0x40(%ebx),%edx 111e28: 74 11 je 111e3b <_Thread_queue_Extract_priority_helper+0x57> /* > two threads on 2-n */ new_second_node->previous = 111e2a: 8d 50 38 lea 0x38(%eax),%edx 111e2d: 89 56 04 mov %edx,0x4(%esi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 111e30: 89 70 38 mov %esi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 111e33: 89 78 40 mov %edi,0x40(%eax) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 111e36: 83 c0 3c add $0x3c,%eax 111e39: 89 07 mov %eax,(%edi) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 111e3b: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 111e3f: 75 23 jne 111e64 <_Thread_queue_Extract_priority_helper+0x80> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 111e41: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 111e45: 74 31 je 111e78 <_Thread_queue_Extract_priority_helper+0x94> _ISR_Enable( level ); 111e47: ff 75 e4 pushl -0x1c(%ebp) 111e4a: 9d popf 111e4b: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 111e52: 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 } 111e55: 8d 65 f4 lea -0xc(%ebp),%esp 111e58: 5b pop %ebx 111e59: 5e pop %esi 111e5a: 5f pop %edi 111e5b: c9 leave 111e5c: e9 83 b9 ff ff jmp 10d7e4 <_Thread_Clear_state> 111e61: 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 ); 111e64: ff 75 e4 pushl -0x1c(%ebp) 111e67: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 111e68: 8d 65 f4 lea -0xc(%ebp),%esp 111e6b: 5b pop %ebx 111e6c: 5e pop %esi 111e6d: 5f pop %edi 111e6e: c9 leave 111e6f: c3 ret new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 111e70: 89 11 mov %edx,(%ecx) next_node->previous = previous_node; 111e72: 89 4a 04 mov %ecx,0x4(%edx) 111e75: eb c4 jmp 111e3b <_Thread_queue_Extract_priority_helper+0x57> 111e77: 90 nop 111e78: 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 ); 111e7f: ff 75 e4 pushl -0x1c(%ebp) 111e82: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 111e83: 83 ec 0c sub $0xc,%esp 111e86: 8d 43 48 lea 0x48(%ebx),%eax 111e89: 50 push %eax 111e8a: e8 25 cd ff ff call 10ebb4 <_Watchdog_Remove> 111e8f: 83 c4 10 add $0x10,%esp 111e92: eb b7 jmp 111e4b <_Thread_queue_Extract_priority_helper+0x67> =============================================================================== 0010e290 <_Thread_queue_Extract_with_proxy>: */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 10e290: 55 push %ebp 10e291: 89 e5 mov %esp,%ebp 10e293: 83 ec 08 sub $0x8,%esp 10e296: 8b 45 08 mov 0x8(%ebp),%eax States_Control state; state = the_thread->current_state; 10e299: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax) 10e2a0: 75 06 jne 10e2a8 <_Thread_queue_Extract_with_proxy+0x18> 10e2a2: 31 c0 xor %eax,%eax _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); return true; } return false; } 10e2a4: c9 leave 10e2a5: c3 ret 10e2a6: 66 90 xchg %ax,%ax if ( proxy_extract_callout ) (*proxy_extract_callout)( the_thread ); } #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 10e2a8: 83 ec 08 sub $0x8,%esp 10e2ab: 50 push %eax 10e2ac: ff 70 44 pushl 0x44(%eax) 10e2af: e8 00 3b 00 00 call 111db4 <_Thread_queue_Extract> 10e2b4: b0 01 mov $0x1,%al return true; 10e2b6: 83 c4 10 add $0x10,%esp } return false; } 10e2b9: c9 leave 10e2ba: c3 ret =============================================================================== 00120588 <_Thread_queue_First>: */ Thread_Control *_Thread_queue_First( Thread_queue_Control *the_thread_queue ) { 120588: 55 push %ebp 120589: 89 e5 mov %esp,%ebp 12058b: 83 ec 08 sub $0x8,%esp 12058e: 8b 45 08 mov 0x8(%ebp),%eax Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 120591: 83 78 34 01 cmpl $0x1,0x34(%eax) 120595: 74 0d je 1205a4 <_Thread_queue_First+0x1c> 120597: ba 9c 21 12 00 mov $0x12219c,%edx 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 ); 12059c: 89 45 08 mov %eax,0x8(%ebp) } 12059f: 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 ); 1205a0: ff e2 jmp *%edx 1205a2: 66 90 xchg %ax,%ax Thread_queue_Control *the_thread_queue ) { Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 1205a4: ba b0 05 12 00 mov $0x1205b0,%edx 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 ); 1205a9: 89 45 08 mov %eax,0x8(%ebp) } 1205ac: 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 ); 1205ad: ff e2 jmp *%edx =============================================================================== 0012219c <_Thread_queue_First_fifo>: */ Thread_Control *_Thread_queue_First_fifo( Thread_queue_Control *the_thread_queue ) { 12219c: 55 push %ebp 12219d: 89 e5 mov %esp,%ebp 12219f: 8b 55 08 mov 0x8(%ebp),%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1221a2: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1221a4: 83 c2 04 add $0x4,%edx 1221a7: 39 d0 cmp %edx,%eax 1221a9: 74 05 je 1221b0 <_Thread_queue_First_fifo+0x14> if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) return (Thread_Control *) the_thread_queue->Queues.Fifo.first; return NULL; } 1221ab: c9 leave 1221ac: c3 ret 1221ad: 8d 76 00 lea 0x0(%esi),%esi 1221b0: 31 c0 xor %eax,%eax 1221b2: c9 leave 1221b3: c3 ret =============================================================================== 0010e2bc <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 10e2bc: 55 push %ebp 10e2bd: 89 e5 mov %esp,%ebp 10e2bf: 56 push %esi 10e2c0: 53 push %ebx 10e2c1: 8b 5d 08 mov 0x8(%ebp),%ebx 10e2c4: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10e2c7: eb 06 jmp 10e2cf <_Thread_queue_Flush+0x13> 10e2c9: 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; 10e2cc: 89 70 34 mov %esi,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10e2cf: 83 ec 0c sub $0xc,%esp 10e2d2: 53 push %ebx 10e2d3: e8 94 fc ff ff call 10df6c <_Thread_queue_Dequeue> 10e2d8: 83 c4 10 add $0x10,%esp 10e2db: 85 c0 test %eax,%eax 10e2dd: 75 ed jne 10e2cc <_Thread_queue_Flush+0x10> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10e2df: 8d 65 f8 lea -0x8(%ebp),%esp 10e2e2: 5b pop %ebx 10e2e3: 5e pop %esi 10e2e4: c9 leave 10e2e5: c3 ret =============================================================================== 00111e94 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 111e94: 55 push %ebp 111e95: 89 e5 mov %esp,%ebp 111e97: 83 ec 08 sub $0x8,%esp 111e9a: 8b 45 08 mov 0x8(%ebp),%eax Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 111e9d: 8b 50 44 mov 0x44(%eax),%edx * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && 111ea0: 8b 4a 30 mov 0x30(%edx),%ecx 111ea3: 85 c9 test %ecx,%ecx 111ea5: 74 08 je 111eaf <_Thread_queue_Process_timeout+0x1b> 111ea7: 3b 05 18 74 12 00 cmp 0x127418,%eax 111ead: 74 19 je 111ec8 <_Thread_queue_Process_timeout+0x34> if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 111eaf: 8b 52 3c mov 0x3c(%edx),%edx 111eb2: 89 50 34 mov %edx,0x34(%eax) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 111eb5: 83 ec 08 sub $0x8,%esp 111eb8: 50 push %eax 111eb9: ff 70 44 pushl 0x44(%eax) 111ebc: e8 f3 fe ff ff call 111db4 <_Thread_queue_Extract> 111ec1: 83 c4 10 add $0x10,%esp } } 111ec4: c9 leave 111ec5: c3 ret 111ec6: 66 90 xchg %ax,%ax * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 111ec8: 83 f9 03 cmp $0x3,%ecx 111ecb: 74 f7 je 111ec4 <_Thread_queue_Process_timeout+0x30> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 111ecd: 8b 4a 3c mov 0x3c(%edx),%ecx 111ed0: 89 48 34 mov %ecx,0x34(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 111ed3: c7 42 30 02 00 00 00 movl $0x2,0x30(%edx) } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); } } 111eda: c9 leave 111edb: c3 ret =============================================================================== 0010e338 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10e338: 55 push %ebp 10e339: 89 e5 mov %esp,%ebp 10e33b: 57 push %edi 10e33c: 56 push %esi 10e33d: 53 push %ebx 10e33e: 83 ec 1c sub $0x1c,%esp 10e341: 8b 75 08 mov 0x8(%ebp),%esi 10e344: 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 ) 10e347: 85 f6 test %esi,%esi 10e349: 74 06 je 10e351 <_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 ) { 10e34b: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10e34f: 74 0b je 10e35c <_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 ); } } 10e351: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10e354: 5b pop %ebx <== NOT EXECUTED 10e355: 5e pop %esi <== NOT EXECUTED 10e356: 5f pop %edi <== NOT EXECUTED 10e357: c9 leave <== NOT EXECUTED 10e358: c3 ret <== NOT EXECUTED 10e359: 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 ); 10e35c: 9c pushf 10e35d: fa cli 10e35e: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10e35f: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10e366: 75 0c jne 10e374 <_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 ); 10e368: 53 push %ebx 10e369: 9d popf } } 10e36a: 8d 65 f4 lea -0xc(%ebp),%esp 10e36d: 5b pop %ebx 10e36e: 5e pop %esi 10e36f: 5f pop %edi 10e370: c9 leave 10e371: c3 ret 10e372: 66 90 xchg %ax,%ax 10e374: 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 ); 10e37b: 50 push %eax 10e37c: 6a 01 push $0x1 10e37e: 57 push %edi 10e37f: 56 push %esi 10e380: e8 5f 3a 00 00 call 111de4 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10e385: 83 c4 0c add $0xc,%esp 10e388: 8d 45 e4 lea -0x1c(%ebp),%eax 10e38b: 50 push %eax 10e38c: 57 push %edi 10e38d: 56 push %esi 10e38e: e8 8d fd ff ff call 10e120 <_Thread_queue_Enqueue_priority> 10e393: 83 c4 10 add $0x10,%esp 10e396: eb d0 jmp 10e368 <_Thread_queue_Requeue+0x30> =============================================================================== 0010e398 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10e398: 55 push %ebp 10e399: 89 e5 mov %esp,%ebp 10e39b: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10e39e: 8d 45 f4 lea -0xc(%ebp),%eax 10e3a1: 50 push %eax 10e3a2: ff 75 08 pushl 0x8(%ebp) 10e3a5: e8 06 f8 ff ff call 10dbb0 <_Thread_Get> switch ( location ) { 10e3aa: 83 c4 10 add $0x10,%esp 10e3ad: 8b 55 f4 mov -0xc(%ebp),%edx 10e3b0: 85 d2 test %edx,%edx 10e3b2: 75 17 jne 10e3cb <_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 ); 10e3b4: 83 ec 0c sub $0xc,%esp 10e3b7: 50 push %eax 10e3b8: e8 d7 3a 00 00 call 111e94 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10e3bd: a1 58 73 12 00 mov 0x127358,%eax 10e3c2: 48 dec %eax 10e3c3: a3 58 73 12 00 mov %eax,0x127358 10e3c8: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10e3cb: c9 leave 10e3cc: c3 ret =============================================================================== 00100238 <_Timer_Manager_initialization>: #include #include void _Timer_Manager_initialization(void) { 100238: 55 push %ebp 100239: 89 e5 mov %esp,%ebp } 10023b: c9 leave 10023c: c3 ret =============================================================================== 00119828 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 119828: 55 push %ebp 119829: 89 e5 mov %esp,%ebp 11982b: 57 push %edi 11982c: 56 push %esi 11982d: 53 push %ebx 11982e: 83 ec 4c sub $0x4c,%esp 119831: 8b 5d 08 mov 0x8(%ebp),%ebx 119834: 8d 45 e0 lea -0x20(%ebp),%eax 119837: 89 45 b4 mov %eax,-0x4c(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11983a: 89 45 dc mov %eax,-0x24(%ebp) the_chain->permanent_null = NULL; 11983d: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_chain->last = _Chain_Head(the_chain); 119844: 8d 4d dc lea -0x24(%ebp),%ecx 119847: 89 4d e4 mov %ecx,-0x1c(%ebp) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11984a: 8d 7d d0 lea -0x30(%ebp),%edi 11984d: 8d 45 d4 lea -0x2c(%ebp),%eax 119850: 89 45 b0 mov %eax,-0x50(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 119853: 89 45 d0 mov %eax,-0x30(%ebp) the_chain->permanent_null = NULL; 119856: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 11985d: 89 7d d8 mov %edi,-0x28(%ebp) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 119860: 8d 73 30 lea 0x30(%ebx),%esi /* * 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 ); 119863: 8d 4b 68 lea 0x68(%ebx),%ecx 119866: 89 4d c4 mov %ecx,-0x3c(%ebp) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 119869: 8d 43 08 lea 0x8(%ebx),%eax 11986c: 89 45 bc mov %eax,-0x44(%ebp) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 11986f: 8d 53 40 lea 0x40(%ebx),%edx 119872: 89 55 c0 mov %edx,-0x40(%ebp) 119875: 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; 119878: 8d 4d dc lea -0x24(%ebp),%ecx 11987b: 89 4b 78 mov %ecx,0x78(%ebx) 11987e: 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; 119880: a1 e4 28 14 00 mov 0x1428e4,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 119885: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 119888: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 11988b: 51 push %ecx 11988c: 57 push %edi 11988d: 29 d0 sub %edx,%eax 11988f: 50 push %eax 119890: 56 push %esi 119891: e8 c2 3a 00 00 call 11d358 <_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(); 119896: a1 0c 28 14 00 mov 0x14280c,%eax Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 11989b: 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 ) { 11989e: 83 c4 10 add $0x10,%esp 1198a1: 39 d0 cmp %edx,%eax 1198a3: 77 63 ja 119908 <_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 ) { 1198a5: 72 7d jb 119924 <_Timer_server_Body+0xfc> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 1198a7: 89 43 74 mov %eax,0x74(%ebx) 1198aa: 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 ); 1198ac: 8b 43 78 mov 0x78(%ebx),%eax 1198af: 83 ec 0c sub $0xc,%esp 1198b2: 50 push %eax 1198b3: e8 28 08 00 00 call 11a0e0 <_Chain_Get> if ( timer == NULL ) { 1198b8: 83 c4 10 add $0x10,%esp 1198bb: 85 c0 test %eax,%eax 1198bd: 74 35 je 1198f4 <_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 ) { 1198bf: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 1198c2: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 1198c5: 74 19 je 1198e0 <_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 ) { 1198c7: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 1198ca: 75 e0 jne 1198ac <_Timer_server_Body+0x84><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 1198cc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1198cf: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 1198d2: 50 push %eax <== NOT EXECUTED 1198d3: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 1198d6: e8 15 3b 00 00 call 11d3f0 <_Watchdog_Insert> <== NOT EXECUTED 1198db: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1198de: eb cc jmp 1198ac <_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 ); 1198e0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1198e3: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 1198e6: 50 push %eax <== NOT EXECUTED 1198e7: 56 push %esi <== NOT EXECUTED 1198e8: e8 03 3b 00 00 call 11d3f0 <_Watchdog_Insert> <== NOT EXECUTED 1198ed: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1198f0: eb ba jmp 1198ac <_Timer_server_Body+0x84><== NOT EXECUTED 1198f2: 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 ); 1198f4: 9c pushf 1198f5: fa cli 1198f6: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 1198f7: 8b 55 b4 mov -0x4c(%ebp),%edx 1198fa: 3b 55 dc cmp -0x24(%ebp),%edx 1198fd: 74 41 je 119940 <_Timer_server_Body+0x118><== ALWAYS TAKEN ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 1198ff: 50 push %eax <== NOT EXECUTED 119900: 9d popf <== NOT EXECUTED 119901: e9 7a ff ff ff jmp 119880 <_Timer_server_Body+0x58><== NOT EXECUTED 119906: 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 ); 119908: 51 push %ecx 119909: 57 push %edi 11990a: 89 c1 mov %eax,%ecx 11990c: 29 d1 sub %edx,%ecx 11990e: 51 push %ecx 11990f: ff 75 c4 pushl -0x3c(%ebp) 119912: 89 45 b8 mov %eax,-0x48(%ebp) 119915: e8 3e 3a 00 00 call 11d358 <_Watchdog_Adjust_to_chain> 11991a: 83 c4 10 add $0x10,%esp 11991d: 8b 45 b8 mov -0x48(%ebp),%eax 119920: eb 85 jmp 1198a7 <_Timer_server_Body+0x7f> 119922: 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 ); 119924: 51 push %ecx 119925: 29 c2 sub %eax,%edx 119927: 52 push %edx 119928: 6a 01 push $0x1 11992a: ff 75 c4 pushl -0x3c(%ebp) 11992d: 89 45 b8 mov %eax,-0x48(%ebp) 119930: e8 ab 39 00 00 call 11d2e0 <_Watchdog_Adjust> 119935: 83 c4 10 add $0x10,%esp 119938: 8b 45 b8 mov -0x48(%ebp),%eax 11993b: e9 67 ff ff ff jmp 1198a7 <_Timer_server_Body+0x7f> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 119940: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 119947: 50 push %eax 119948: 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 ) ) { 119949: 8b 4d b0 mov -0x50(%ebp),%ecx 11994c: 3b 4d d0 cmp -0x30(%ebp),%ecx 11994f: 75 23 jne 119974 <_Timer_server_Body+0x14c> 119951: eb 33 jmp 119986 <_Timer_server_Body+0x15e> 119953: 90 nop { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 119954: 8b 10 mov (%eax),%edx the_chain->first = new_first; 119956: 89 55 d0 mov %edx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 119959: 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; 11995c: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 119963: 51 push %ecx 119964: 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 ); 119965: 83 ec 08 sub $0x8,%esp 119968: ff 70 24 pushl 0x24(%eax) 11996b: ff 70 20 pushl 0x20(%eax) 11996e: ff 50 1c call *0x1c(%eax) } 119971: 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 ); 119974: 9c pushf 119975: fa cli 119976: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 119977: 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)) 11997a: 39 45 b0 cmp %eax,-0x50(%ebp) 11997d: 75 d5 jne 119954 <_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 ); 11997f: 51 push %ecx 119980: 9d popf 119981: e9 f2 fe ff ff jmp 119878 <_Timer_server_Body+0x50> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 119986: c6 43 7c 00 movb $0x0,0x7c(%ebx) 11998a: a1 78 27 14 00 mov 0x142778,%eax 11998f: 40 inc %eax 119990: a3 78 27 14 00 mov %eax,0x142778 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 119995: 83 ec 08 sub $0x8,%esp 119998: 6a 08 push $0x8 11999a: ff 33 pushl (%ebx) 11999c: e8 87 31 00 00 call 11cb28 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 1199a1: 89 d8 mov %ebx,%eax 1199a3: e8 e0 fd ff ff call 119788 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 1199a8: 89 d8 mov %ebx,%eax 1199aa: e8 29 fe ff ff call 1197d8 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 1199af: e8 7c 27 00 00 call 11c130 <_Thread_Enable_dispatch> ts->active = true; 1199b4: 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 ); 1199b8: 58 pop %eax 1199b9: ff 75 bc pushl -0x44(%ebp) 1199bc: e8 57 3b 00 00 call 11d518 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 1199c1: 59 pop %ecx 1199c2: ff 75 c0 pushl -0x40(%ebp) 1199c5: e8 4e 3b 00 00 call 11d518 <_Watchdog_Remove> 1199ca: 83 c4 10 add $0x10,%esp 1199cd: e9 a6 fe ff ff jmp 119878 <_Timer_server_Body+0x50> =============================================================================== 001199d4 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 1199d4: 55 push %ebp 1199d5: 89 e5 mov %esp,%ebp 1199d7: 57 push %edi 1199d8: 56 push %esi 1199d9: 53 push %ebx 1199da: 83 ec 2c sub $0x2c,%esp 1199dd: 8b 5d 08 mov 0x8(%ebp),%ebx 1199e0: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 1199e3: 8b 53 78 mov 0x78(%ebx),%edx 1199e6: 85 d2 test %edx,%edx 1199e8: 74 16 je 119a00 <_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 ); 1199ea: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 1199ed: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 1199f0: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 1199f3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1199f6: 5b pop %ebx <== NOT EXECUTED 1199f7: 5e pop %esi <== NOT EXECUTED 1199f8: 5f pop %edi <== NOT EXECUTED 1199f9: 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 ); 1199fa: e9 a5 06 00 00 jmp 11a0a4 <_Chain_Append> <== NOT EXECUTED 1199ff: 90 nop <== NOT EXECUTED 119a00: 8b 15 78 27 14 00 mov 0x142778,%edx 119a06: 42 inc %edx 119a07: 89 15 78 27 14 00 mov %edx,0x142778 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 119a0d: 8b 50 38 mov 0x38(%eax),%edx 119a10: 83 fa 01 cmp $0x1,%edx 119a13: 74 77 je 119a8c <_Timer_server_Schedule_operation_method+0xb8> _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 ) { 119a15: 83 fa 03 cmp $0x3,%edx 119a18: 74 0e je 119a28 <_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 ); } } 119a1a: 8d 65 f4 lea -0xc(%ebp),%esp 119a1d: 5b pop %ebx 119a1e: 5e pop %esi 119a1f: 5f pop %edi 119a20: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 119a21: e9 0a 27 00 00 jmp 11c130 <_Thread_Enable_dispatch> 119a26: 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 ); 119a28: 9c pushf 119a29: fa cli 119a2a: 8f 45 e4 popl -0x1c(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 119a2d: 8b 0d 0c 28 14 00 mov 0x14280c,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 119a33: 8b 73 74 mov 0x74(%ebx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 119a36: 8b 53 68 mov 0x68(%ebx),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 119a39: 8d 7b 6c lea 0x6c(%ebx),%edi 119a3c: 39 fa cmp %edi,%edx 119a3e: 74 22 je 119a62 <_Timer_server_Schedule_operation_method+0x8e> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 119a40: 8b 7a 10 mov 0x10(%edx),%edi 119a43: 89 7d d4 mov %edi,-0x2c(%ebp) if ( snapshot > last_snapshot ) { 119a46: 39 f1 cmp %esi,%ecx 119a48: 0f 86 9e 00 00 00 jbe 119aec <_Timer_server_Schedule_operation_method+0x118> /* * We advanced in time. */ delta = snapshot - last_snapshot; 119a4e: 89 cf mov %ecx,%edi 119a50: 29 f7 sub %esi,%edi 119a52: 89 fe mov %edi,%esi if (delta_interval > delta) { 119a54: 39 7d d4 cmp %edi,-0x2c(%ebp) 119a57: 0f 87 9b 00 00 00 ja 119af8 <_Timer_server_Schedule_operation_method+0x124><== ALWAYS TAKEN 119a5d: 31 ff xor %edi,%edi <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 119a5f: 89 7a 10 mov %edi,0x10(%edx) } ts->TOD_watchdogs.last_snapshot = snapshot; 119a62: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 119a65: ff 75 e4 pushl -0x1c(%ebp) 119a68: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 119a69: 83 ec 08 sub $0x8,%esp 119a6c: 83 c0 10 add $0x10,%eax 119a6f: 50 push %eax 119a70: 8d 43 68 lea 0x68(%ebx),%eax 119a73: 50 push %eax 119a74: e8 77 39 00 00 call 11d3f0 <_Watchdog_Insert> if ( !ts->active ) { 119a79: 8a 43 7c mov 0x7c(%ebx),%al 119a7c: 83 c4 10 add $0x10,%esp 119a7f: 84 c0 test %al,%al 119a81: 75 97 jne 119a1a <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_tod_system_watchdog( ts ); 119a83: 89 d8 mov %ebx,%eax 119a85: e8 4e fd ff ff call 1197d8 <_Timer_server_Reset_tod_system_watchdog> 119a8a: eb 8e jmp 119a1a <_Timer_server_Schedule_operation_method+0x46> 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 ); 119a8c: 9c pushf 119a8d: fa cli 119a8e: 8f 45 e4 popl -0x1c(%ebp) snapshot = _Watchdog_Ticks_since_boot; 119a91: 8b 0d e4 28 14 00 mov 0x1428e4,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 119a97: 8b 73 3c mov 0x3c(%ebx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 119a9a: 8b 53 30 mov 0x30(%ebx),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 119a9d: 8d 7b 34 lea 0x34(%ebx),%edi 119aa0: 39 fa cmp %edi,%edx 119aa2: 74 12 je 119ab6 <_Timer_server_Schedule_operation_method+0xe2> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 119aa4: 89 cf mov %ecx,%edi 119aa6: 29 f7 sub %esi,%edi 119aa8: 89 fe mov %edi,%esi delta_interval = first_watchdog->delta_interval; 119aaa: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 119aad: 39 fe cmp %edi,%esi 119aaf: 72 37 jb 119ae8 <_Timer_server_Schedule_operation_method+0x114> 119ab1: 31 ff xor %edi,%edi delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 119ab3: 89 7a 10 mov %edi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 119ab6: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 119ab9: ff 75 e4 pushl -0x1c(%ebp) 119abc: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 119abd: 83 ec 08 sub $0x8,%esp 119ac0: 83 c0 10 add $0x10,%eax 119ac3: 50 push %eax 119ac4: 8d 43 30 lea 0x30(%ebx),%eax 119ac7: 50 push %eax 119ac8: e8 23 39 00 00 call 11d3f0 <_Watchdog_Insert> if ( !ts->active ) { 119acd: 8a 43 7c mov 0x7c(%ebx),%al 119ad0: 83 c4 10 add $0x10,%esp 119ad3: 84 c0 test %al,%al 119ad5: 0f 85 3f ff ff ff jne 119a1a <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_interval_system_watchdog( ts ); 119adb: 89 d8 mov %ebx,%eax 119add: e8 a6 fc ff ff call 119788 <_Timer_server_Reset_interval_system_watchdog> 119ae2: e9 33 ff ff ff jmp 119a1a <_Timer_server_Schedule_operation_method+0x46> 119ae7: 90 nop */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; 119ae8: 29 f7 sub %esi,%edi 119aea: eb c7 jmp 119ab3 <_Timer_server_Schedule_operation_method+0xdf> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 119aec: 8b 7d d4 mov -0x2c(%ebp),%edi 119aef: 01 f7 add %esi,%edi delta_interval += delta; 119af1: 29 cf sub %ecx,%edi 119af3: e9 67 ff ff ff jmp 119a5f <_Timer_server_Schedule_operation_method+0x8b> /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; 119af8: 8b 7d d4 mov -0x2c(%ebp),%edi 119afb: 29 f7 sub %esi,%edi 119afd: e9 5d ff ff ff jmp 119a5f <_Timer_server_Schedule_operation_method+0x8b> =============================================================================== 00129c08 <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 129c08: 55 push %ebp 129c09: 89 e5 mov %esp,%ebp 129c0b: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 129c0e: 85 c0 test %eax,%eax 129c10: 74 1a je 129c2c <_Timespec_Is_valid+0x24> return false; if ( time->tv_sec < 0 ) 129c12: 8b 10 mov (%eax),%edx 129c14: 85 d2 test %edx,%edx 129c16: 78 14 js 129c2c <_Timespec_Is_valid+0x24> return false; if ( time->tv_nsec < 0 ) 129c18: 8b 40 04 mov 0x4(%eax),%eax 129c1b: 85 c0 test %eax,%eax 129c1d: 78 0d js 129c2c <_Timespec_Is_valid+0x24> #include #include #include bool _Timespec_Is_valid( 129c1f: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 129c24: 0f 96 c0 setbe %al if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 129c27: c9 leave 129c28: c3 ret 129c29: 8d 76 00 lea 0x0(%esi),%esi #include #include #include bool _Timespec_Is_valid( 129c2c: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 129c2e: c9 leave 129c2f: c3 ret =============================================================================== 0010e934 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10e934: 55 push %ebp 10e935: 89 e5 mov %esp,%ebp 10e937: 57 push %edi 10e938: 56 push %esi 10e939: 53 push %ebx 10e93a: 83 ec 1c sub $0x1c,%esp 10e93d: 8b 75 08 mov 0x8(%ebp),%esi 10e940: 8b 7d 10 mov 0x10(%ebp),%edi 10e943: 8a 45 0c mov 0xc(%ebp),%al Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e946: 8b 1d b4 75 12 00 mov 0x1275b4,%ebx 10e94c: 81 fb ac 75 12 00 cmp $0x1275ac,%ebx 10e952: 74 25 je 10e979 <_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 ); 10e954: 0f b6 c0 movzbl %al,%eax 10e957: 89 45 e4 mov %eax,-0x1c(%ebp) 10e95a: 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 ) 10e95c: 8b 43 30 mov 0x30(%ebx),%eax 10e95f: 85 c0 test %eax,%eax 10e961: 74 0b je 10e96e <_User_extensions_Fatal+0x3a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10e963: 52 push %edx 10e964: 57 push %edi 10e965: ff 75 e4 pushl -0x1c(%ebp) 10e968: 56 push %esi 10e969: ff d0 call *%eax 10e96b: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10e96e: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e971: 81 fb ac 75 12 00 cmp $0x1275ac,%ebx 10e977: 75 e3 jne 10e95c <_User_extensions_Fatal+0x28> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 10e979: 8d 65 f4 lea -0xc(%ebp),%esp 10e97c: 5b pop %ebx 10e97d: 5e pop %esi 10e97e: 5f pop %edi 10e97f: c9 leave 10e980: c3 ret =============================================================================== 0010e7f8 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10e7f8: 55 push %ebp 10e7f9: 89 e5 mov %esp,%ebp 10e7fb: 57 push %edi 10e7fc: 56 push %esi 10e7fd: 53 push %ebx 10e7fe: 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; 10e801: a1 58 32 12 00 mov 0x123258,%eax 10e806: 89 45 dc mov %eax,-0x24(%ebp) initial_extensions = Configuration.User_extension_table; 10e809: 8b 35 5c 32 12 00 mov 0x12325c,%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e80f: c7 05 ac 75 12 00 b0 movl $0x1275b0,0x1275ac 10e816: 75 12 00 the_chain->permanent_null = NULL; 10e819: c7 05 b0 75 12 00 00 movl $0x0,0x1275b0 10e820: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e823: c7 05 b4 75 12 00 ac movl $0x1275ac,0x1275b4 10e82a: 75 12 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e82d: c7 05 5c 73 12 00 60 movl $0x127360,0x12735c 10e834: 73 12 00 the_chain->permanent_null = NULL; 10e837: c7 05 60 73 12 00 00 movl $0x0,0x127360 10e83e: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e841: c7 05 64 73 12 00 5c movl $0x12735c,0x127364 10e848: 73 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10e84b: 85 f6 test %esi,%esi 10e84d: 74 64 je 10e8b3 <_User_extensions_Handler_initialization+0xbb> extension = (User_extensions_Control *) 10e84f: 89 c2 mov %eax,%edx 10e851: 8d 04 40 lea (%eax,%eax,2),%eax 10e854: 8d 0c 82 lea (%edx,%eax,4),%ecx 10e857: c1 e1 02 shl $0x2,%ecx 10e85a: 83 ec 0c sub $0xc,%esp 10e85d: 51 push %ecx 10e85e: 89 4d d8 mov %ecx,-0x28(%ebp) 10e861: e8 26 04 00 00 call 10ec8c <_Workspace_Allocate_or_fatal_error> 10e866: 89 c3 mov %eax,%ebx _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10e868: 31 c0 xor %eax,%eax 10e86a: 8b 4d d8 mov -0x28(%ebp),%ecx 10e86d: 89 df mov %ebx,%edi 10e86f: f3 aa rep stos %al,%es:(%edi) extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e871: 83 c4 10 add $0x10,%esp 10e874: 8b 45 dc mov -0x24(%ebp),%eax 10e877: 85 c0 test %eax,%eax 10e879: 74 38 je 10e8b3 <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN 10e87b: 89 75 e4 mov %esi,-0x1c(%ebp) 10e87e: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 10e885: 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; 10e888: 8d 7b 14 lea 0x14(%ebx),%edi 10e88b: 8b 75 e4 mov -0x1c(%ebp),%esi 10e88e: b9 08 00 00 00 mov $0x8,%ecx 10e893: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10e895: 83 ec 0c sub $0xc,%esp 10e898: 53 push %ebx 10e899: e8 1a 38 00 00 call 1120b8 <_User_extensions_Add_set> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10e89e: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e8a1: ff 45 e0 incl -0x20(%ebp) 10e8a4: 83 45 e4 20 addl $0x20,-0x1c(%ebp) 10e8a8: 83 c4 10 add $0x10,%esp 10e8ab: 8b 45 e0 mov -0x20(%ebp),%eax 10e8ae: 39 45 dc cmp %eax,-0x24(%ebp) 10e8b1: 77 d5 ja 10e888 <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10e8b3: 8d 65 f4 lea -0xc(%ebp),%esp 10e8b6: 5b pop %ebx 10e8b7: 5e pop %esi 10e8b8: 5f pop %edi 10e8b9: c9 leave 10e8ba: c3 ret =============================================================================== 00113628 <_User_extensions_Remove_set>: #include void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 113628: 55 push %ebp 113629: 89 e5 mov %esp,%ebp 11362b: 53 push %ebx 11362c: 83 ec 10 sub $0x10,%esp 11362f: 8b 5d 08 mov 0x8(%ebp),%ebx _Chain_Extract( &the_extension->Node ); 113632: 53 push %ebx 113633: e8 10 dc ff ff call 111248 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 113638: 83 c4 10 add $0x10,%esp 11363b: 8b 43 24 mov 0x24(%ebx),%eax 11363e: 85 c0 test %eax,%eax 113640: 74 12 je 113654 <_User_extensions_Remove_set+0x2c> _Chain_Extract( &the_extension->Switch.Node ); 113642: 83 c3 08 add $0x8,%ebx 113645: 89 5d 08 mov %ebx,0x8(%ebp) } 113648: 8b 5d fc mov -0x4(%ebp),%ebx 11364b: c9 leave /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 11364c: e9 f7 db ff ff jmp 111248 <_Chain_Extract> 113651: 8d 76 00 lea 0x0(%esi),%esi } 113654: 8b 5d fc mov -0x4(%ebp),%ebx 113657: c9 leave 113658: c3 ret =============================================================================== 0010e8bc <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 10e8bc: 55 push %ebp 10e8bd: 89 e5 mov %esp,%ebp 10e8bf: 56 push %esi 10e8c0: 53 push %ebx 10e8c1: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e8c4: 8b 1d ac 75 12 00 mov 0x1275ac,%ebx 10e8ca: 81 fb b0 75 12 00 cmp $0x1275b0,%ebx 10e8d0: 74 1c je 10e8ee <_User_extensions_Thread_begin+0x32><== NEVER TAKEN 10e8d2: 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 ) 10e8d4: 8b 43 28 mov 0x28(%ebx),%eax 10e8d7: 85 c0 test %eax,%eax 10e8d9: 74 09 je 10e8e4 <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 10e8db: 83 ec 0c sub $0xc,%esp 10e8de: 56 push %esi 10e8df: ff d0 call *%eax 10e8e1: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10e8e4: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e8e6: 81 fb b0 75 12 00 cmp $0x1275b0,%ebx 10e8ec: 75 e6 jne 10e8d4 <_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 ); } } 10e8ee: 8d 65 f8 lea -0x8(%ebp),%esp 10e8f1: 5b pop %ebx 10e8f2: 5e pop %esi 10e8f3: c9 leave 10e8f4: c3 ret =============================================================================== 0010e984 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 10e984: 55 push %ebp 10e985: 89 e5 mov %esp,%ebp 10e987: 56 push %esi 10e988: 53 push %ebx 10e989: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 10e98c: 8b 1d ac 75 12 00 mov 0x1275ac,%ebx 10e992: 81 fb b0 75 12 00 cmp $0x1275b0,%ebx 10e998: 74 26 je 10e9c0 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN 10e99a: 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 ) { 10e99c: 8b 43 14 mov 0x14(%ebx),%eax 10e99f: 85 c0 test %eax,%eax 10e9a1: 74 13 je 10e9b6 <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 10e9a3: 83 ec 08 sub $0x8,%esp 10e9a6: 56 push %esi 10e9a7: ff 35 18 74 12 00 pushl 0x127418 10e9ad: ff d0 call *%eax _Thread_Executing, the_thread ); if ( !status ) 10e9af: 83 c4 10 add $0x10,%esp 10e9b2: 84 c0 test %al,%al 10e9b4: 74 0c je 10e9c2 <_User_extensions_Thread_create+0x3e> User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10e9b6: 8b 1b mov (%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 10e9b8: 81 fb b0 75 12 00 cmp $0x1275b0,%ebx 10e9be: 75 dc jne 10e99c <_User_extensions_Thread_create+0x18> 10e9c0: b0 01 mov $0x1,%al return false; } } return true; } 10e9c2: 8d 65 f8 lea -0x8(%ebp),%esp 10e9c5: 5b pop %ebx 10e9c6: 5e pop %esi 10e9c7: c9 leave 10e9c8: c3 ret =============================================================================== 0010e9cc <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 10e9cc: 55 push %ebp 10e9cd: 89 e5 mov %esp,%ebp 10e9cf: 56 push %esi 10e9d0: 53 push %ebx 10e9d1: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e9d4: 8b 1d b4 75 12 00 mov 0x1275b4,%ebx 10e9da: 81 fb ac 75 12 00 cmp $0x1275ac,%ebx 10e9e0: 74 23 je 10ea05 <_User_extensions_Thread_delete+0x39><== NEVER TAKEN 10e9e2: 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 ) 10e9e4: 8b 43 20 mov 0x20(%ebx),%eax 10e9e7: 85 c0 test %eax,%eax 10e9e9: 74 0f je 10e9fa <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 10e9eb: 83 ec 08 sub $0x8,%esp 10e9ee: 56 push %esi 10e9ef: ff 35 18 74 12 00 pushl 0x127418 10e9f5: ff d0 call *%eax 10e9f7: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10e9fa: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e9fd: 81 fb ac 75 12 00 cmp $0x1275ac,%ebx 10ea03: 75 df jne 10e9e4 <_User_extensions_Thread_delete+0x18> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10ea05: 8d 65 f8 lea -0x8(%ebp),%esp 10ea08: 5b pop %ebx 10ea09: 5e pop %esi 10ea0a: c9 leave 10ea0b: c3 ret =============================================================================== 0010e8f8 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10e8f8: 55 push %ebp 10e8f9: 89 e5 mov %esp,%ebp 10e8fb: 56 push %esi 10e8fc: 53 push %ebx 10e8fd: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e900: 8b 1d b4 75 12 00 mov 0x1275b4,%ebx 10e906: 81 fb ac 75 12 00 cmp $0x1275ac,%ebx 10e90c: 74 1d je 10e92b <_User_extensions_Thread_exitted+0x33><== NEVER TAKEN 10e90e: 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 ) 10e910: 8b 43 2c mov 0x2c(%ebx),%eax 10e913: 85 c0 test %eax,%eax 10e915: 74 09 je 10e920 <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 10e917: 83 ec 0c sub $0xc,%esp 10e91a: 56 push %esi 10e91b: ff d0 call *%eax 10e91d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10e920: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e923: 81 fb ac 75 12 00 cmp $0x1275ac,%ebx 10e929: 75 e5 jne 10e910 <_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 ); } } 10e92b: 8d 65 f8 lea -0x8(%ebp),%esp 10e92e: 5b pop %ebx 10e92f: 5e pop %esi 10e930: c9 leave 10e931: c3 ret =============================================================================== 0010f5c0 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 10f5c0: 55 push %ebp 10f5c1: 89 e5 mov %esp,%ebp 10f5c3: 56 push %esi 10f5c4: 53 push %ebx 10f5c5: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f5c8: 8b 1d 0c 96 12 00 mov 0x12960c,%ebx 10f5ce: 81 fb 10 96 12 00 cmp $0x129610,%ebx 10f5d4: 74 22 je 10f5f8 <_User_extensions_Thread_restart+0x38><== NEVER TAKEN 10f5d6: 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 ) 10f5d8: 8b 43 1c mov 0x1c(%ebx),%eax 10f5db: 85 c0 test %eax,%eax 10f5dd: 74 0f je 10f5ee <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 10f5df: 83 ec 08 sub $0x8,%esp 10f5e2: 56 push %esi 10f5e3: ff 35 78 94 12 00 pushl 0x129478 10f5e9: ff d0 call *%eax 10f5eb: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10f5ee: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f5f0: 81 fb 10 96 12 00 cmp $0x129610,%ebx 10f5f6: 75 e0 jne 10f5d8 <_User_extensions_Thread_restart+0x18> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10f5f8: 8d 65 f8 lea -0x8(%ebp),%esp 10f5fb: 5b pop %ebx 10f5fc: 5e pop %esi 10f5fd: c9 leave 10f5fe: c3 ret =============================================================================== 0010ea0c <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 10ea0c: 55 push %ebp 10ea0d: 89 e5 mov %esp,%ebp 10ea0f: 56 push %esi 10ea10: 53 push %ebx 10ea11: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10ea14: 8b 1d ac 75 12 00 mov 0x1275ac,%ebx 10ea1a: 81 fb b0 75 12 00 cmp $0x1275b0,%ebx 10ea20: 74 22 je 10ea44 <_User_extensions_Thread_start+0x38><== NEVER TAKEN 10ea22: 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 ) 10ea24: 8b 43 18 mov 0x18(%ebx),%eax 10ea27: 85 c0 test %eax,%eax 10ea29: 74 0f je 10ea3a <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 10ea2b: 83 ec 08 sub $0x8,%esp 10ea2e: 56 push %esi 10ea2f: ff 35 18 74 12 00 pushl 0x127418 10ea35: ff d0 call *%eax 10ea37: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10ea3a: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10ea3c: 81 fb b0 75 12 00 cmp $0x1275b0,%ebx 10ea42: 75 e0 jne 10ea24 <_User_extensions_Thread_start+0x18> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10ea44: 8d 65 f8 lea -0x8(%ebp),%esp 10ea47: 5b pop %ebx 10ea48: 5e pop %esi 10ea49: c9 leave 10ea4a: c3 ret =============================================================================== 0010ea4c <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 10ea4c: 55 push %ebp 10ea4d: 89 e5 mov %esp,%ebp 10ea4f: 57 push %edi 10ea50: 56 push %esi 10ea51: 53 push %ebx 10ea52: 83 ec 0c sub $0xc,%esp 10ea55: 8b 7d 08 mov 0x8(%ebp),%edi 10ea58: 8b 75 0c mov 0xc(%ebp),%esi Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 10ea5b: 8b 1d 5c 73 12 00 mov 0x12735c,%ebx 10ea61: 81 fb 60 73 12 00 cmp $0x127360,%ebx 10ea67: 74 18 je 10ea81 <_User_extensions_Thread_switch+0x35><== NEVER TAKEN 10ea69: 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 ); 10ea6c: 83 ec 08 sub $0x8,%esp 10ea6f: 56 push %esi 10ea70: 57 push %edi 10ea71: ff 53 08 call *0x8(%ebx) Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { 10ea74: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 10ea76: 83 c4 10 add $0x10,%esp 10ea79: 81 fb 60 73 12 00 cmp $0x127360,%ebx 10ea7f: 75 eb jne 10ea6c <_User_extensions_Thread_switch+0x20> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10ea81: 8d 65 f4 lea -0xc(%ebp),%esp 10ea84: 5b pop %ebx 10ea85: 5e pop %esi 10ea86: 5f pop %edi 10ea87: c9 leave 10ea88: c3 ret =============================================================================== 00110464 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 110464: 55 push %ebp 110465: 89 e5 mov %esp,%ebp 110467: 57 push %edi 110468: 56 push %esi 110469: 53 push %ebx 11046a: 83 ec 1c sub $0x1c,%esp 11046d: 8b 75 08 mov 0x8(%ebp),%esi 110470: 8b 4d 0c mov 0xc(%ebp),%ecx 110473: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 110476: 9c pushf 110477: fa cli 110478: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 110479: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11047b: 8d 7e 04 lea 0x4(%esi),%edi 11047e: 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 ) ) { 110481: 39 fa cmp %edi,%edx 110483: 74 3d je 1104c2 <_Watchdog_Adjust+0x5e> switch ( direction ) { 110485: 85 c9 test %ecx,%ecx 110487: 75 43 jne 1104cc <_Watchdog_Adjust+0x68> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 110489: 85 db test %ebx,%ebx 11048b: 74 35 je 1104c2 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 11048d: 8b 7a 10 mov 0x10(%edx),%edi 110490: 39 fb cmp %edi,%ebx 110492: 73 0f jae 1104a3 <_Watchdog_Adjust+0x3f> <== ALWAYS TAKEN 110494: eb 3e jmp 1104d4 <_Watchdog_Adjust+0x70> <== NOT EXECUTED 110496: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 110498: 29 fb sub %edi,%ebx 11049a: 74 26 je 1104c2 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 11049c: 8b 7a 10 mov 0x10(%edx),%edi 11049f: 39 df cmp %ebx,%edi 1104a1: 77 31 ja 1104d4 <_Watchdog_Adjust+0x70> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 1104a3: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 1104aa: 50 push %eax 1104ab: 9d popf _Watchdog_Tickle( header ); 1104ac: 83 ec 0c sub $0xc,%esp 1104af: 56 push %esi 1104b0: e8 bb 01 00 00 call 110670 <_Watchdog_Tickle> _ISR_Disable( level ); 1104b5: 9c pushf 1104b6: fa cli 1104b7: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1104b8: 8b 16 mov (%esi),%edx if ( _Chain_Is_empty( header ) ) 1104ba: 83 c4 10 add $0x10,%esp 1104bd: 39 55 e4 cmp %edx,-0x1c(%ebp) 1104c0: 75 d6 jne 110498 <_Watchdog_Adjust+0x34> } break; } } _ISR_Enable( level ); 1104c2: 50 push %eax 1104c3: 9d popf } 1104c4: 8d 65 f4 lea -0xc(%ebp),%esp 1104c7: 5b pop %ebx 1104c8: 5e pop %esi 1104c9: 5f pop %edi 1104ca: c9 leave 1104cb: c3 ret * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 1104cc: 49 dec %ecx 1104cd: 75 f3 jne 1104c2 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 1104cf: 01 5a 10 add %ebx,0x10(%edx) break; 1104d2: eb ee jmp 1104c2 <_Watchdog_Adjust+0x5e> case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 1104d4: 29 df sub %ebx,%edi 1104d6: 89 7a 10 mov %edi,0x10(%edx) break; 1104d9: eb e7 jmp 1104c2 <_Watchdog_Adjust+0x5e> =============================================================================== 0011d358 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 11d358: 55 push %ebp 11d359: 89 e5 mov %esp,%ebp 11d35b: 57 push %edi 11d35c: 56 push %esi 11d35d: 53 push %ebx 11d35e: 83 ec 0c sub $0xc,%esp 11d361: 8b 75 08 mov 0x8(%ebp),%esi 11d364: 8b 55 0c mov 0xc(%ebp),%edx 11d367: 8b 5d 10 mov 0x10(%ebp),%ebx Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { 11d36a: 85 d2 test %edx,%edx 11d36c: 74 63 je 11d3d1 <_Watchdog_Adjust_to_chain+0x79> return; } _ISR_Disable( level ); 11d36e: 9c pushf 11d36f: fa cli 11d370: 8f 45 ec popl -0x14(%ebp) 11d373: 8b 06 mov (%esi),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11d375: 8d 4e 04 lea 0x4(%esi),%ecx 11d378: 89 4d f0 mov %ecx,-0x10(%ebp) 11d37b: 8d 7b 04 lea 0x4(%ebx),%edi 11d37e: 89 55 e8 mov %edx,-0x18(%ebp) 11d381: 8d 76 00 lea 0x0(%esi),%esi while ( 1 ) { if ( units <= 0 ) { break; } if ( _Chain_Is_empty( header ) ) { 11d384: 39 45 f0 cmp %eax,-0x10(%ebp) 11d387: 74 44 je 11d3cd <_Watchdog_Adjust_to_chain+0x75> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { 11d389: 8b 50 10 mov 0x10(%eax),%edx 11d38c: 3b 55 e8 cmp -0x18(%ebp),%edx 11d38f: 77 57 ja 11d3e8 <_Watchdog_Adjust_to_chain+0x90> /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; 11d391: 29 55 e8 sub %edx,-0x18(%ebp) first->delta_interval = 0; 11d394: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) 11d39b: 90 nop ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 11d39c: 8b 08 mov (%eax),%ecx previous = the_node->previous; 11d39e: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 11d3a1: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 11d3a4: 89 0a mov %ecx,(%edx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 11d3a6: 89 38 mov %edi,(%eax) old_last_node = the_chain->last; 11d3a8: 8b 53 08 mov 0x8(%ebx),%edx the_chain->last = the_node; 11d3ab: 89 43 08 mov %eax,0x8(%ebx) old_last_node->next = the_node; 11d3ae: 89 02 mov %eax,(%edx) the_node->previous = old_last_node; 11d3b0: 89 50 04 mov %edx,0x4(%eax) while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 11d3b3: ff 75 ec pushl -0x14(%ebp) 11d3b6: 9d popf 11d3b7: fa cli */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11d3b8: 8b 06 mov (%esi),%eax if ( _Chain_Is_empty( header ) ) 11d3ba: 39 45 f0 cmp %eax,-0x10(%ebp) 11d3bd: 74 1d je 11d3dc <_Watchdog_Adjust_to_chain+0x84> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 11d3bf: 8b 50 10 mov 0x10(%eax),%edx 11d3c2: 85 d2 test %edx,%edx 11d3c4: 74 d6 je 11d39c <_Watchdog_Adjust_to_chain+0x44> } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 11d3c6: 8b 4d e8 mov -0x18(%ebp),%ecx 11d3c9: 85 c9 test %ecx,%ecx 11d3cb: 75 b7 jne 11d384 <_Watchdog_Adjust_to_chain+0x2c> if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 11d3cd: ff 75 ec pushl -0x14(%ebp) 11d3d0: 9d popf } 11d3d1: 83 c4 0c add $0xc,%esp 11d3d4: 5b pop %ebx 11d3d5: 5e pop %esi 11d3d6: 5f pop %edi 11d3d7: c9 leave 11d3d8: c3 ret 11d3d9: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11d3dc: 8b 45 f0 mov -0x10(%ebp),%eax } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 11d3df: 8b 4d e8 mov -0x18(%ebp),%ecx 11d3e2: 85 c9 test %ecx,%ecx 11d3e4: 75 9e jne 11d384 <_Watchdog_Adjust_to_chain+0x2c> 11d3e6: eb e5 jmp 11d3cd <_Watchdog_Adjust_to_chain+0x75> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { first->delta_interval -= units; 11d3e8: 2b 55 e8 sub -0x18(%ebp),%edx 11d3eb: 89 50 10 mov %edx,0x10(%eax) break; 11d3ee: eb dd jmp 11d3cd <_Watchdog_Adjust_to_chain+0x75> =============================================================================== 0010ea8c <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10ea8c: 55 push %ebp 10ea8d: 89 e5 mov %esp,%ebp 10ea8f: 57 push %edi 10ea90: 56 push %esi 10ea91: 53 push %ebx 10ea92: 83 ec 04 sub $0x4,%esp 10ea95: 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; 10ea98: 8b 3d f4 73 12 00 mov 0x1273f4,%edi _ISR_Disable( level ); 10ea9e: 9c pushf 10ea9f: fa cli 10eaa0: 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 ) { 10eaa3: 8b 43 08 mov 0x8(%ebx),%eax 10eaa6: 85 c0 test %eax,%eax 10eaa8: 75 69 jne 10eb13 <_Watchdog_Insert+0x87> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10eaaa: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx) _Watchdog_Sync_count++; 10eab1: a1 c0 74 12 00 mov 0x1274c0,%eax 10eab6: 40 inc %eax 10eab7: a3 c0 74 12 00 mov %eax,0x1274c0 restart: delta_interval = the_watchdog->initial; 10eabc: 8b 43 0c mov 0xc(%ebx),%eax * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 10eabf: 8b 4d 08 mov 0x8(%ebp),%ecx 10eac2: 8b 11 mov (%ecx),%edx ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10eac4: 85 c0 test %eax,%eax 10eac6: 74 5d je 10eb25 <_Watchdog_Insert+0x99> 10eac8: 8b 32 mov (%edx),%esi 10eaca: 85 f6 test %esi,%esi 10eacc: 74 57 je 10eb25 <_Watchdog_Insert+0x99> break; if ( delta_interval < after->delta_interval ) { 10eace: 8b 4a 10 mov 0x10(%edx),%ecx 10ead1: 39 c8 cmp %ecx,%eax 10ead3: 73 22 jae 10eaf7 <_Watchdog_Insert+0x6b> 10ead5: eb 49 jmp 10eb20 <_Watchdog_Insert+0x94> 10ead7: 90 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10ead8: 8b 35 14 74 12 00 mov 0x127414,%esi 10eade: 39 f7 cmp %esi,%edi 10eae0: 72 66 jb 10eb48 <_Watchdog_Insert+0xbc> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10eae2: 29 c8 sub %ecx,%eax RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 10eae4: 8b 12 mov (%edx),%edx */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10eae6: 85 c0 test %eax,%eax 10eae8: 74 3b je 10eb25 <_Watchdog_Insert+0x99> 10eaea: 8b 0a mov (%edx),%ecx 10eaec: 85 c9 test %ecx,%ecx 10eaee: 74 35 je 10eb25 <_Watchdog_Insert+0x99> break; if ( delta_interval < after->delta_interval ) { 10eaf0: 8b 4a 10 mov 0x10(%edx),%ecx 10eaf3: 39 c1 cmp %eax,%ecx 10eaf5: 77 29 ja 10eb20 <_Watchdog_Insert+0x94> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 10eaf7: ff 75 f0 pushl -0x10(%ebp) 10eafa: 9d popf 10eafb: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10eafc: 83 7b 08 01 cmpl $0x1,0x8(%ebx) 10eb00: 74 d6 je 10ead8 <_Watchdog_Insert+0x4c> _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; 10eb02: 89 3d 14 74 12 00 mov %edi,0x127414 _Watchdog_Sync_count--; 10eb08: a1 c0 74 12 00 mov 0x1274c0,%eax 10eb0d: 48 dec %eax 10eb0e: a3 c0 74 12 00 mov %eax,0x1274c0 _ISR_Enable( level ); 10eb13: ff 75 f0 pushl -0x10(%ebp) 10eb16: 9d popf } 10eb17: 58 pop %eax 10eb18: 5b pop %ebx 10eb19: 5e pop %esi 10eb1a: 5f pop %edi 10eb1b: c9 leave 10eb1c: c3 ret 10eb1d: 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; 10eb20: 29 c1 sub %eax,%ecx 10eb22: 89 4a 10 mov %ecx,0x10(%edx) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 10eb25: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10eb2c: 89 43 10 mov %eax,0x10(%ebx) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10eb2f: 8b 42 04 mov 0x4(%edx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10eb32: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10eb35: 8b 10 mov (%eax),%edx after_node->next = the_node; 10eb37: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10eb39: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10eb3b: 89 5a 04 mov %ebx,0x4(%edx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10eb3e: a1 c4 74 12 00 mov 0x1274c4,%eax 10eb43: 89 43 14 mov %eax,0x14(%ebx) 10eb46: eb ba jmp 10eb02 <_Watchdog_Insert+0x76> 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; 10eb48: 89 3d 14 74 12 00 mov %edi,0x127414 goto restart; 10eb4e: e9 69 ff ff ff jmp 10eabc <_Watchdog_Insert+0x30> =============================================================================== 0010ebb4 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10ebb4: 55 push %ebp 10ebb5: 89 e5 mov %esp,%ebp 10ebb7: 56 push %esi 10ebb8: 53 push %ebx 10ebb9: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10ebbc: 9c pushf 10ebbd: fa cli 10ebbe: 59 pop %ecx previous_state = the_watchdog->state; 10ebbf: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10ebc2: 83 f8 01 cmp $0x1,%eax 10ebc5: 74 4d je 10ec14 <_Watchdog_Remove+0x60> 10ebc7: 73 0f jae 10ebd8 <_Watchdog_Remove+0x24> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10ebc9: 8b 1d c4 74 12 00 mov 0x1274c4,%ebx 10ebcf: 89 5a 18 mov %ebx,0x18(%edx) _ISR_Enable( level ); 10ebd2: 51 push %ecx 10ebd3: 9d popf return( previous_state ); } 10ebd4: 5b pop %ebx 10ebd5: 5e pop %esi 10ebd6: c9 leave 10ebd7: c3 ret Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 10ebd8: 83 f8 03 cmp $0x3,%eax 10ebdb: 77 ec ja 10ebc9 <_Watchdog_Remove+0x15> <== NEVER TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10ebdd: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 10ebe4: 8b 1a mov (%edx),%ebx next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10ebe6: 8b 33 mov (%ebx),%esi 10ebe8: 85 f6 test %esi,%esi 10ebea: 74 06 je 10ebf2 <_Watchdog_Remove+0x3e> next_watchdog->delta_interval += the_watchdog->delta_interval; 10ebec: 8b 72 10 mov 0x10(%edx),%esi 10ebef: 01 73 10 add %esi,0x10(%ebx) if ( _Watchdog_Sync_count ) 10ebf2: 8b 35 c0 74 12 00 mov 0x1274c0,%esi 10ebf8: 85 f6 test %esi,%esi 10ebfa: 74 0c je 10ec08 <_Watchdog_Remove+0x54> _Watchdog_Sync_level = _ISR_Nest_level; 10ebfc: 8b 35 f4 73 12 00 mov 0x1273f4,%esi 10ec02: 89 35 14 74 12 00 mov %esi,0x127414 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10ec08: 8b 72 04 mov 0x4(%edx),%esi next->previous = previous; 10ec0b: 89 73 04 mov %esi,0x4(%ebx) previous->next = next; 10ec0e: 89 1e mov %ebx,(%esi) 10ec10: eb b7 jmp 10ebc9 <_Watchdog_Remove+0x15> 10ec12: 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; 10ec14: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10ec1b: eb ac jmp 10ebc9 <_Watchdog_Remove+0x15> =============================================================================== 00110018 <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 110018: 55 push %ebp 110019: 89 e5 mov %esp,%ebp 11001b: 57 push %edi 11001c: 56 push %esi 11001d: 53 push %ebx 11001e: 83 ec 2c sub $0x2c,%esp 110021: 8b 55 08 mov 0x8(%ebp),%edx 110024: 8b 45 0c mov 0xc(%ebp),%eax printk( 110027: 8b 78 24 mov 0x24(%eax),%edi 11002a: 8b 70 20 mov 0x20(%eax),%esi 11002d: 8b 58 1c mov 0x1c(%eax),%ebx 110030: 8b 48 0c mov 0xc(%eax),%ecx 110033: 89 4d d4 mov %ecx,-0x2c(%ebp) 110036: 8b 48 10 mov 0x10(%eax),%ecx 110039: 89 4d e0 mov %ecx,-0x20(%ebp) 11003c: 85 d2 test %edx,%edx 11003e: 74 2c je 11006c <_Watchdog_Report+0x54> 110040: b9 23 36 12 00 mov $0x123623,%ecx 110045: 83 ec 0c sub $0xc,%esp 110048: 57 push %edi 110049: 56 push %esi 11004a: 53 push %ebx 11004b: 50 push %eax 11004c: ff 75 d4 pushl -0x2c(%ebp) 11004f: ff 75 e0 pushl -0x20(%ebp) 110052: 51 push %ecx 110053: 52 push %edx 110054: 68 26 40 12 00 push $0x124026 110059: e8 62 9f ff ff call 109fc0 11005e: 83 c4 30 add $0x30,%esp watch, watch->routine, watch->id, watch->user_data ); } 110061: 8d 65 f4 lea -0xc(%ebp),%esp 110064: 5b pop %ebx 110065: 5e pop %esi 110066: 5f pop %edi 110067: c9 leave 110068: c3 ret 110069: 8d 76 00 lea 0x0(%esi),%esi void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( 11006c: b9 75 3e 12 00 mov $0x123e75,%ecx 110071: 89 ca mov %ecx,%edx 110073: eb d0 jmp 110045 <_Watchdog_Report+0x2d> =============================================================================== 0010ffa8 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10ffa8: 55 push %ebp 10ffa9: 89 e5 mov %esp,%ebp 10ffab: 57 push %edi 10ffac: 56 push %esi 10ffad: 53 push %ebx 10ffae: 83 ec 20 sub $0x20,%esp 10ffb1: 8b 7d 08 mov 0x8(%ebp),%edi 10ffb4: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10ffb7: 9c pushf 10ffb8: fa cli 10ffb9: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10ffbc: 56 push %esi 10ffbd: 57 push %edi 10ffbe: 68 f0 3f 12 00 push $0x123ff0 10ffc3: e8 f8 9f ff ff call 109fc0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10ffc8: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ffca: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10ffcd: 83 c4 10 add $0x10,%esp 10ffd0: 39 f3 cmp %esi,%ebx 10ffd2: 74 31 je 110005 <_Watchdog_Report_chain+0x5d><== NEVER TAKEN node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10ffd4: 83 ec 08 sub $0x8,%esp 10ffd7: 53 push %ebx 10ffd8: 6a 00 push $0x0 10ffda: e8 39 00 00 00 call 110018 <_Watchdog_Report> _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; node != _Chain_Tail(header) ; node = node->next ) 10ffdf: 8b 1b mov (%ebx),%ebx Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; 10ffe1: 83 c4 10 add $0x10,%esp 10ffe4: 39 f3 cmp %esi,%ebx 10ffe6: 75 ec jne 10ffd4 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10ffe8: 83 ec 08 sub $0x8,%esp 10ffeb: 57 push %edi 10ffec: 68 07 40 12 00 push $0x124007 10fff1: e8 ca 9f ff ff call 109fc0 10fff6: 83 c4 10 add $0x10,%esp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 10fff9: ff 75 e4 pushl -0x1c(%ebp) 10fffc: 9d popf } 10fffd: 8d 65 f4 lea -0xc(%ebp),%esp 110000: 5b pop %ebx 110001: 5e pop %esi 110002: 5f pop %edi 110003: c9 leave 110004: c3 ret _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 110005: 83 ec 0c sub $0xc,%esp 110008: 68 16 40 12 00 push $0x124016 11000d: e8 ae 9f ff ff call 109fc0 110012: 83 c4 10 add $0x10,%esp 110015: eb e2 jmp 10fff9 <_Watchdog_Report_chain+0x51> =============================================================================== 0010ec20 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10ec20: 55 push %ebp 10ec21: 89 e5 mov %esp,%ebp 10ec23: 57 push %edi 10ec24: 56 push %esi 10ec25: 53 push %ebx 10ec26: 83 ec 1c sub $0x1c,%esp 10ec29: 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 ); 10ec2c: 9c pushf 10ec2d: fa cli 10ec2e: 5e pop %esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10ec2f: 8b 1f mov (%edi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ec31: 8d 47 04 lea 0x4(%edi),%eax 10ec34: 89 45 e4 mov %eax,-0x1c(%ebp) if ( _Chain_Is_empty( header ) ) 10ec37: 39 c3 cmp %eax,%ebx 10ec39: 74 11 je 10ec4c <_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) { 10ec3b: 8b 43 10 mov 0x10(%ebx),%eax 10ec3e: 85 c0 test %eax,%eax 10ec40: 74 34 je 10ec76 <_Watchdog_Tickle+0x56> the_watchdog->delta_interval--; 10ec42: 48 dec %eax 10ec43: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10ec46: 85 c0 test %eax,%eax 10ec48: 74 2c je 10ec76 <_Watchdog_Tickle+0x56> 10ec4a: 66 90 xchg %ax,%ax the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 10ec4c: 56 push %esi 10ec4d: 9d popf } 10ec4e: 8d 65 f4 lea -0xc(%ebp),%esp 10ec51: 5b pop %ebx 10ec52: 5e pop %esi 10ec53: 5f pop %edi 10ec54: c9 leave 10ec55: c3 ret _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10ec56: 83 ec 08 sub $0x8,%esp 10ec59: ff 73 24 pushl 0x24(%ebx) 10ec5c: ff 73 20 pushl 0x20(%ebx) 10ec5f: ff 53 1c call *0x1c(%ebx) 10ec62: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10ec65: 9c pushf 10ec66: fa cli 10ec67: 5e pop %esi RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10ec68: 8b 1f mov (%edi),%ebx the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10ec6a: 39 5d e4 cmp %ebx,-0x1c(%ebp) 10ec6d: 74 dd je 10ec4c <_Watchdog_Tickle+0x2c> 10ec6f: 8b 43 10 mov 0x10(%ebx),%eax 10ec72: 85 c0 test %eax,%eax 10ec74: 75 d6 jne 10ec4c <_Watchdog_Tickle+0x2c> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10ec76: 83 ec 0c sub $0xc,%esp 10ec79: 53 push %ebx 10ec7a: e8 35 ff ff ff call 10ebb4 <_Watchdog_Remove> _ISR_Enable( level ); 10ec7f: 56 push %esi 10ec80: 9d popf switch( watchdog_state ) { 10ec81: 83 c4 10 add $0x10,%esp 10ec84: 83 f8 02 cmp $0x2,%eax 10ec87: 75 dc jne 10ec65 <_Watchdog_Tickle+0x45> <== NEVER TAKEN 10ec89: eb cb jmp 10ec56 <_Watchdog_Tickle+0x36> =============================================================================== 0010ecec <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 10ecec: 55 push %ebp 10eced: 89 e5 mov %esp,%ebp 10ecef: 57 push %edi 10ecf0: 53 push %ebx uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 10ecf1: 8b 1d 20 32 12 00 mov 0x123220,%ebx uintptr_t size = Configuration.work_space_size; 10ecf7: 8b 15 24 32 12 00 mov 0x123224,%edx if ( Configuration.do_zero_of_workspace ) 10ecfd: 80 3d 48 32 12 00 00 cmpb $0x0,0x123248 10ed04: 75 1e jne 10ed24 <_Workspace_Handler_initialization+0x38> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 10ed06: 6a 04 push $0x4 10ed08: 52 push %edx 10ed09: 53 push %ebx 10ed0a: 68 80 73 12 00 push $0x127380 10ed0f: e8 c4 dd ff ff call 10cad8 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 10ed14: 83 c4 10 add $0x10,%esp 10ed17: 85 c0 test %eax,%eax 10ed19: 74 13 je 10ed2e <_Workspace_Handler_initialization+0x42> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 10ed1b: 8d 65 f8 lea -0x8(%ebp),%esp 10ed1e: 5b pop %ebx 10ed1f: 5f pop %edi 10ed20: c9 leave 10ed21: c3 ret 10ed22: 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 ); 10ed24: 31 c0 xor %eax,%eax 10ed26: 89 df mov %ebx,%edi 10ed28: 89 d1 mov %edx,%ecx 10ed2a: f3 aa rep stos %al,%es:(%edi) 10ed2c: eb d8 jmp 10ed06 <_Workspace_Handler_initialization+0x1a> size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 10ed2e: 52 push %edx 10ed2f: 6a 03 push $0x3 10ed31: 6a 01 push $0x1 10ed33: 6a 00 push $0x0 10ed35: e8 c2 e0 ff ff call 10cdfc <_Internal_error_Occurred> =============================================================================== 00111114 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 111114: 55 push %ebp 111115: 89 e5 mov %esp,%ebp 111117: 57 push %edi 111118: 56 push %esi 111119: 53 push %ebx 11111a: 83 ec 2c sub $0x2c,%esp 11111d: 8b 5d 08 mov 0x8(%ebp),%ebx 111120: 8b 7d 0c mov 0xc(%ebp),%edi 111123: 8b 45 10 mov 0x10(%ebp),%eax 111126: 8b 75 14 mov 0x14(%ebp),%esi Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 111129: 85 db test %ebx,%ebx 11112b: 0f 84 87 00 00 00 je 1111b8 return RTEMS_INVALID_NAME; if ( !id ) 111131: 85 f6 test %esi,%esi 111133: 0f 84 bb 00 00 00 je 1111f4 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 111139: f7 c7 10 00 00 00 test $0x10,%edi 11113f: 0f 84 83 00 00 00 je 1111c8 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 111145: 85 c0 test %eax,%eax 111147: 0f 84 87 00 00 00 je 1111d4 if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 11114d: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 111154: 89 45 e4 mov %eax,-0x1c(%ebp) 111157: a1 58 73 12 00 mov 0x127358,%eax 11115c: 40 inc %eax 11115d: a3 58 73 12 00 mov %eax,0x127358 * 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 ); 111162: 83 ec 0c sub $0xc,%esp 111165: 68 20 76 12 00 push $0x127620 11116a: e8 25 bd ff ff call 10ce94 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 11116f: 83 c4 10 add $0x10,%esp 111172: 85 c0 test %eax,%eax 111174: 74 6a je 1111e0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 111176: 89 78 10 mov %edi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 111179: 83 ec 08 sub $0x8,%esp 11117c: 8d 55 e0 lea -0x20(%ebp),%edx 11117f: 52 push %edx 111180: 8d 50 14 lea 0x14(%eax),%edx 111183: 52 push %edx 111184: 89 45 d4 mov %eax,-0x2c(%ebp) 111187: e8 24 05 00 00 call 1116b0 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 11118c: 8b 45 d4 mov -0x2c(%ebp),%eax 11118f: 8b 50 08 mov 0x8(%eax),%edx 111192: 0f b7 fa movzwl %dx,%edi 111195: 8b 0d 3c 76 12 00 mov 0x12763c,%ecx 11119b: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 11119e: 89 58 0c mov %ebx,0xc(%eax) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 1111a1: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 1111a3: e8 e4 c9 ff ff call 10db8c <_Thread_Enable_dispatch> 1111a8: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1111aa: 83 c4 10 add $0x10,%esp } 1111ad: 8d 65 f4 lea -0xc(%ebp),%esp 1111b0: 5b pop %ebx 1111b1: 5e pop %esi 1111b2: 5f pop %edi 1111b3: c9 leave 1111b4: c3 ret 1111b5: 8d 76 00 lea 0x0(%esi),%esi ) { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 1111b8: b8 03 00 00 00 mov $0x3,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1111bd: 8d 65 f4 lea -0xc(%ebp),%esp 1111c0: 5b pop %ebx 1111c1: 5e pop %esi 1111c2: 5f pop %edi 1111c3: c9 leave 1111c4: c3 ret 1111c5: 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; 1111c8: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) 1111cf: eb 83 jmp 111154 1111d1: 8d 76 00 lea 0x0(%esi),%esi return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 1111d4: b0 0a mov $0xa,%al *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1111d6: 8d 65 f4 lea -0xc(%ebp),%esp 1111d9: 5b pop %ebx 1111da: 5e pop %esi 1111db: 5f pop %edi 1111dc: c9 leave 1111dd: c3 ret 1111de: 66 90 xchg %ax,%ax _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 1111e0: e8 a7 c9 ff ff call 10db8c <_Thread_Enable_dispatch> 1111e5: b8 05 00 00 00 mov $0x5,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1111ea: 8d 65 f4 lea -0xc(%ebp),%esp 1111ed: 5b pop %ebx 1111ee: 5e pop %esi 1111ef: 5f pop %edi 1111f0: c9 leave 1111f1: c3 ret 1111f2: 66 90 xchg %ax,%ax CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 1111f4: b8 09 00 00 00 mov $0x9,%eax 1111f9: eb b2 jmp 1111ad =============================================================================== 001123c4 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 1123c4: 55 push %ebp 1123c5: 89 e5 mov %esp,%ebp 1123c7: 53 push %ebx 1123c8: 83 ec 04 sub $0x4,%esp 1123cb: 8b 45 08 mov 0x8(%ebp),%eax 1123ce: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !time_buffer ) 1123d1: 85 db test %ebx,%ebx 1123d3: 74 3b je 112410 return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 1123d5: 85 c0 test %eax,%eax 1123d7: 74 2b je 112404 return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 1123d9: 83 f8 01 cmp $0x1,%eax 1123dc: 74 3e je 11241c return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 1123de: 83 f8 02 cmp $0x2,%eax 1123e1: 74 45 je 112428 *interval = rtems_clock_get_ticks_since_boot(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 1123e3: 83 f8 03 cmp $0x3,%eax 1123e6: 74 4c je 112434 *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 1123e8: 83 f8 04 cmp $0x4,%eax 1123eb: 74 0b je 1123f8 1123ed: b8 0a 00 00 00 mov $0xa,%eax return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 1123f2: 5a pop %edx 1123f3: 5b pop %ebx 1123f4: c9 leave 1123f5: c3 ret 1123f6: 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 ); 1123f8: 89 5d 08 mov %ebx,0x8(%ebp) return RTEMS_INVALID_NUMBER; } 1123fb: 59 pop %ecx 1123fc: 5b pop %ebx 1123fd: 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 ); 1123fe: e9 49 01 00 00 jmp 11254c 112403: 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 ); 112404: 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; } 112407: 58 pop %eax 112408: 5b pop %ebx 112409: 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 ); 11240a: e9 7d 00 00 00 jmp 11248c 11240f: 90 nop rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { if ( !time_buffer ) 112410: 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; } 112415: 5a pop %edx 112416: 5b pop %ebx 112417: c9 leave 112418: c3 ret 112419: 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); 11241c: 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; } 11241f: 5b pop %ebx 112420: 5b pop %ebx 112421: 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); 112422: e9 19 00 00 00 jmp 112440 112427: 90 nop if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 112428: e8 53 00 00 00 call 112480 11242d: 89 03 mov %eax,(%ebx) 11242f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 112431: eb bf jmp 1123f2 112433: 90 nop } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 112434: e8 33 00 00 00 call 11246c 112439: 89 03 mov %eax,(%ebx) 11243b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11243d: eb b3 jmp 1123f2 =============================================================================== 0010c668 : #include rtems_status_code rtems_clock_get_tod( rtems_time_of_day *time_buffer ) { 10c668: 55 push %ebp 10c669: 89 e5 mov %esp,%ebp 10c66b: 56 push %esi 10c66c: 53 push %ebx 10c66d: 83 ec 50 sub $0x50,%esp 10c670: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 10c673: 85 db test %ebx,%ebx 10c675: 0f 84 a1 00 00 00 je 10c71c return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 10c67b: 80 3d 4c b9 12 00 00 cmpb $0x0,0x12b94c 10c682: 75 0c jne 10c690 10c684: b8 0b 00 00 00 mov $0xb,%eax tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; } 10c689: 8d 65 f8 lea -0x8(%ebp),%esp 10c68c: 5b pop %ebx 10c68d: 5e pop %esi 10c68e: c9 leave 10c68f: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 10c690: 9c pushf 10c691: fa cli 10c692: 5e pop %esi _TOD_Get( &now ); 10c693: 83 ec 0c sub $0xc,%esp 10c696: 8d 45 e8 lea -0x18(%ebp),%eax 10c699: 50 push %eax 10c69a: e8 65 18 00 00 call 10df04 <_TOD_Get> _ISR_Enable(level); 10c69f: 56 push %esi 10c6a0: 9d popf useconds = (suseconds_t)now.tv_nsec; 10c6a1: 8b 4d ec mov -0x14(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 10c6a4: 8b 45 e8 mov -0x18(%ebp),%eax 10c6a7: 89 45 f0 mov %eax,-0x10(%ebp) time->tv_usec = useconds; 10c6aa: be d3 4d 62 10 mov $0x10624dd3,%esi 10c6af: 89 c8 mov %ecx,%eax 10c6b1: f7 ee imul %esi 10c6b3: 89 45 b0 mov %eax,-0x50(%ebp) 10c6b6: 89 55 b4 mov %edx,-0x4c(%ebp) 10c6b9: 8b 75 b4 mov -0x4c(%ebp),%esi 10c6bc: c1 fe 06 sar $0x6,%esi 10c6bf: 89 c8 mov %ecx,%eax 10c6c1: 99 cltd 10c6c2: 29 d6 sub %edx,%esi 10c6c4: 89 75 f4 mov %esi,-0xc(%ebp) /* Obtain the current time */ _TOD_Get_timeval( &now ); /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); 10c6c7: 58 pop %eax 10c6c8: 5a pop %edx 10c6c9: 8d 45 c4 lea -0x3c(%ebp),%eax 10c6cc: 50 push %eax 10c6cd: 8d 45 f0 lea -0x10(%ebp),%eax 10c6d0: 50 push %eax 10c6d1: e8 2a 97 00 00 call 115e00 /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 10c6d6: 8b 45 d8 mov -0x28(%ebp),%eax 10c6d9: 05 6c 07 00 00 add $0x76c,%eax 10c6de: 89 03 mov %eax,(%ebx) tmbuf->month = time.tm_mon + 1; 10c6e0: 8b 45 d4 mov -0x2c(%ebp),%eax 10c6e3: 40 inc %eax 10c6e4: 89 43 04 mov %eax,0x4(%ebx) tmbuf->day = time.tm_mday; 10c6e7: 8b 45 d0 mov -0x30(%ebp),%eax 10c6ea: 89 43 08 mov %eax,0x8(%ebx) tmbuf->hour = time.tm_hour; 10c6ed: 8b 45 cc mov -0x34(%ebp),%eax 10c6f0: 89 43 0c mov %eax,0xc(%ebx) tmbuf->minute = time.tm_min; 10c6f3: 8b 45 c8 mov -0x38(%ebp),%eax 10c6f6: 89 43 10 mov %eax,0x10(%ebx) tmbuf->second = time.tm_sec; 10c6f9: 8b 45 c4 mov -0x3c(%ebp),%eax 10c6fc: 89 43 14 mov %eax,0x14(%ebx) tmbuf->ticks = now.tv_usec / 10c6ff: 8b 45 f4 mov -0xc(%ebp),%eax 10c702: 31 d2 xor %edx,%edx 10c704: f7 35 ac 73 12 00 divl 0x1273ac 10c70a: 89 43 18 mov %eax,0x18(%ebx) 10c70d: 31 c0 xor %eax,%eax rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; 10c70f: 83 c4 10 add $0x10,%esp } 10c712: 8d 65 f8 lea -0x8(%ebp),%esp 10c715: 5b pop %ebx 10c716: 5e pop %esi 10c717: c9 leave 10c718: c3 ret 10c719: 8d 76 00 lea 0x0(%esi),%esi { rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 10c71c: b8 09 00 00 00 mov $0x9,%eax 10c721: e9 63 ff ff ff jmp 10c689 =============================================================================== 0011254c : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 11254c: 55 push %ebp 11254d: 89 e5 mov %esp,%ebp 11254f: 56 push %esi 112550: 53 push %ebx 112551: 83 ec 20 sub $0x20,%esp 112554: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !time ) 112557: 85 db test %ebx,%ebx 112559: 74 59 je 1125b4 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 11255b: 80 3d cc 2e 17 00 00 cmpb $0x0,0x172ecc 112562: 75 0c jne 112570 112564: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 112569: 8d 65 f8 lea -0x8(%ebp),%esp 11256c: 5b pop %ebx 11256d: 5e pop %esi 11256e: c9 leave 11256f: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 112570: 9c pushf 112571: fa cli 112572: 5e pop %esi _TOD_Get( &now ); 112573: 83 ec 0c sub $0xc,%esp 112576: 8d 45 f0 lea -0x10(%ebp),%eax 112579: 50 push %eax 11257a: e8 fd 1a 00 00 call 11407c <_TOD_Get> _ISR_Enable(level); 11257f: 56 push %esi 112580: 9d popf useconds = (suseconds_t)now.tv_nsec; 112581: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 112584: 8b 45 f0 mov -0x10(%ebp),%eax 112587: 89 03 mov %eax,(%ebx) time->tv_usec = useconds; 112589: be d3 4d 62 10 mov $0x10624dd3,%esi 11258e: 89 c8 mov %ecx,%eax 112590: f7 ee imul %esi 112592: 89 45 e0 mov %eax,-0x20(%ebp) 112595: 89 55 e4 mov %edx,-0x1c(%ebp) 112598: 8b 75 e4 mov -0x1c(%ebp),%esi 11259b: c1 fe 06 sar $0x6,%esi 11259e: 89 c8 mov %ecx,%eax 1125a0: 99 cltd 1125a1: 29 d6 sub %edx,%esi 1125a3: 89 73 04 mov %esi,0x4(%ebx) 1125a6: 31 c0 xor %eax,%eax if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; 1125a8: 83 c4 10 add $0x10,%esp } 1125ab: 8d 65 f8 lea -0x8(%ebp),%esp 1125ae: 5b pop %ebx 1125af: 5e pop %esi 1125b0: c9 leave 1125b1: c3 ret 1125b2: 66 90 xchg %ax,%ax rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { if ( !time ) 1125b4: b8 09 00 00 00 mov $0x9,%eax 1125b9: eb ae jmp 112569 =============================================================================== 00130254 : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 130254: 55 push %ebp 130255: 89 e5 mov %esp,%ebp 130257: 83 ec 08 sub $0x8,%esp 13025a: 8b 45 08 mov 0x8(%ebp),%eax if ( !uptime ) 13025d: 85 c0 test %eax,%eax 13025f: 74 13 je 130274 return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 130261: 83 ec 0c sub $0xc,%esp 130264: 50 push %eax 130265: e8 8a 0c 00 00 call 130ef4 <_TOD_Get_uptime_as_timespec> 13026a: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 13026c: 83 c4 10 add $0x10,%esp } 13026f: c9 leave 130270: c3 ret 130271: 8d 76 00 lea 0x0(%esi),%esi */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime ) 130274: b0 09 mov $0x9,%al return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); return RTEMS_SUCCESSFUL; } 130276: c9 leave 130277: c3 ret =============================================================================== 0010c740 : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 10c740: 55 push %ebp 10c741: 89 e5 mov %esp,%ebp 10c743: 53 push %ebx 10c744: 83 ec 14 sub $0x14,%esp 10c747: 8b 5d 08 mov 0x8(%ebp),%ebx struct timespec newtime; if ( !time_buffer ) 10c74a: 85 db test %ebx,%ebx 10c74c: 74 66 je 10c7b4 return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 10c74e: 83 ec 0c sub $0xc,%esp 10c751: 53 push %ebx 10c752: e8 39 01 00 00 call 10c890 <_TOD_Validate> 10c757: 83 c4 10 add $0x10,%esp 10c75a: 84 c0 test %al,%al 10c75c: 75 0a jne 10c768 10c75e: b8 14 00 00 00 mov $0x14,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10c763: 8b 5d fc mov -0x4(%ebp),%ebx 10c766: c9 leave 10c767: c3 ret if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 10c768: 83 ec 0c sub $0xc,%esp 10c76b: 53 push %ebx 10c76c: e8 93 00 00 00 call 10c804 <_TOD_To_seconds> 10c771: 89 45 f0 mov %eax,-0x10(%ebp) newtime.tv_nsec = time_buffer->ticks * 10c774: 8b 43 18 mov 0x18(%ebx),%eax 10c777: 0f af 05 ac 73 12 00 imul 0x1273ac,%eax 10c77e: 8d 04 80 lea (%eax,%eax,4),%eax 10c781: 8d 04 80 lea (%eax,%eax,4),%eax 10c784: 8d 04 80 lea (%eax,%eax,4),%eax 10c787: c1 e0 03 shl $0x3,%eax 10c78a: 89 45 f4 mov %eax,-0xc(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c78d: a1 38 b9 12 00 mov 0x12b938,%eax 10c792: 40 inc %eax 10c793: a3 38 b9 12 00 mov %eax,0x12b938 rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 10c798: 8d 45 f0 lea -0x10(%ebp),%eax 10c79b: 89 04 24 mov %eax,(%esp) 10c79e: e8 45 18 00 00 call 10dfe8 <_TOD_Set> _Thread_Enable_dispatch(); 10c7a3: e8 10 2b 00 00 call 10f2b8 <_Thread_Enable_dispatch> 10c7a8: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10c7aa: 83 c4 10 add $0x10,%esp } return RTEMS_INVALID_CLOCK; } 10c7ad: 8b 5d fc mov -0x4(%ebp),%ebx 10c7b0: c9 leave 10c7b1: c3 ret 10c7b2: 66 90 xchg %ax,%ax rtems_time_of_day *time_buffer ) { struct timespec newtime; if ( !time_buffer ) 10c7b4: b8 09 00 00 00 mov $0x9,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10c7b9: 8b 5d fc mov -0x4(%ebp),%ebx 10c7bc: c9 leave 10c7bd: c3 ret =============================================================================== 0010b620 : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { 10b620: 55 push %ebp 10b621: 89 e5 mov %esp,%ebp 10b623: 83 ec 08 sub $0x8,%esp _TOD_Tickle_ticks(); 10b626: e8 29 14 00 00 call 10ca54 <_TOD_Tickle_ticks> */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); 10b62b: 83 ec 0c sub $0xc,%esp 10b62e: 68 38 74 12 00 push $0x127438 10b633: e8 e8 35 00 00 call 10ec20 <_Watchdog_Tickle> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 10b638: e8 9f 30 00 00 call 10e6dc <_Thread_Tickle_timeslice> * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void ) { return ( _Context_Switch_necessary ); 10b63d: a0 28 74 12 00 mov 0x127428,%al if ( _Thread_Is_context_switch_necessary() && 10b642: 83 c4 10 add $0x10,%esp 10b645: 84 c0 test %al,%al 10b647: 74 09 je 10b652 * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); 10b649: a1 58 73 12 00 mov 0x127358,%eax 10b64e: 85 c0 test %eax,%eax 10b650: 74 06 je 10b658 _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 10b652: 31 c0 xor %eax,%eax 10b654: c9 leave 10b655: c3 ret 10b656: 66 90 xchg %ax,%ax _Thread_Tickle_timeslice(); if ( _Thread_Is_context_switch_necessary() && _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); 10b658: e8 d3 23 00 00 call 10da30 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; } 10b65d: 31 c0 xor %eax,%eax 10b65f: c9 leave 10b660: c3 ret =============================================================================== 0010b7e8 : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { 10b7e8: 55 push %ebp 10b7e9: 89 e5 mov %esp,%ebp 10b7eb: 53 push %ebx 10b7ec: 83 ec 1c sub $0x1c,%esp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); 10b7ef: 8d 45 f4 lea -0xc(%ebp),%eax 10b7f2: 50 push %eax 10b7f3: ff 75 08 pushl 0x8(%ebp) 10b7f6: e8 b5 23 00 00 call 10dbb0 <_Thread_Get> switch ( location ) { 10b7fb: 83 c4 10 add $0x10,%esp 10b7fe: 8b 55 f4 mov -0xc(%ebp),%edx 10b801: 85 d2 test %edx,%edx 10b803: 75 2b jne 10b830 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 10b805: 8b 90 f0 00 00 00 mov 0xf0(%eax),%edx rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 10b80b: 9c pushf 10b80c: fa cli 10b80d: 59 pop %ecx *the_event_set |= the_new_events; 10b80e: 8b 5d 0c mov 0xc(%ebp),%ebx 10b811: 09 1a or %ebx,(%edx) _ISR_Enable( level ); 10b813: 51 push %ecx 10b814: 9d popf _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 10b815: 83 ec 0c sub $0xc,%esp 10b818: 50 push %eax 10b819: e8 1e 00 00 00 call 10b83c <_Event_Surrender> _Thread_Enable_dispatch(); 10b81e: e8 69 23 00 00 call 10db8c <_Thread_Enable_dispatch> 10b823: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b825: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b828: 8b 5d fc mov -0x4(%ebp),%ebx 10b82b: c9 leave 10b82c: c3 ret 10b82d: 8d 76 00 lea 0x0(%esi),%esi register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); switch ( location ) { 10b830: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b835: 8b 5d fc mov -0x4(%ebp),%ebx 10b838: c9 leave 10b839: c3 ret =============================================================================== 00110e5c : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { 110e5c: 55 push %ebp 110e5d: 89 e5 mov %esp,%ebp 110e5f: 57 push %edi 110e60: 56 push %esi 110e61: 53 push %ebx 110e62: 83 ec 1c sub $0x1c,%esp 110e65: 8b 75 0c mov 0xc(%ebp),%esi 110e68: 8b 5d 10 mov 0x10(%ebp),%ebx Extension_Control *the_extension; if ( !id ) 110e6b: 85 db test %ebx,%ebx 110e6d: 0f 84 85 00 00 00 je 110ef8 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 110e73: 8b 45 08 mov 0x8(%ebp),%eax 110e76: 85 c0 test %eax,%eax 110e78: 75 0e jne 110e88 110e7a: b8 03 00 00 00 mov $0x3,%eax ); *id = the_extension->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 110e7f: 8d 65 f4 lea -0xc(%ebp),%esp 110e82: 5b pop %ebx 110e83: 5e pop %esi 110e84: 5f pop %edi 110e85: c9 leave 110e86: c3 ret 110e87: 90 nop rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 110e88: a1 78 4c 13 00 mov 0x134c78,%eax 110e8d: 40 inc %eax 110e8e: a3 78 4c 13 00 mov %eax,0x134c78 #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 110e93: 83 ec 0c sub $0xc,%esp 110e96: 68 00 4f 13 00 push $0x134f00 110e9b: e8 90 0c 00 00 call 111b30 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 110ea0: 83 c4 10 add $0x10,%esp 110ea3: 85 c0 test %eax,%eax 110ea5: 74 45 je 110eec RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 110ea7: 8d 78 24 lea 0x24(%eax),%edi 110eaa: b9 08 00 00 00 mov $0x8,%ecx 110eaf: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 110eb1: 83 ec 0c sub $0xc,%esp 110eb4: 8d 50 10 lea 0x10(%eax),%edx 110eb7: 52 push %edx 110eb8: 89 45 e4 mov %eax,-0x1c(%ebp) 110ebb: e8 68 26 00 00 call 113528 <_User_extensions_Add_set> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 110ec0: 8b 45 e4 mov -0x1c(%ebp),%eax 110ec3: 8b 50 08 mov 0x8(%eax),%edx 110ec6: 0f b7 f2 movzwl %dx,%esi 110ec9: 8b 0d 1c 4f 13 00 mov 0x134f1c,%ecx 110ecf: 89 04 b1 mov %eax,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 110ed2: 8b 4d 08 mov 0x8(%ebp),%ecx 110ed5: 89 48 0c mov %ecx,0xc(%eax) &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 110ed8: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 110eda: e8 b1 19 00 00 call 112890 <_Thread_Enable_dispatch> 110edf: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 110ee1: 83 c4 10 add $0x10,%esp } 110ee4: 8d 65 f4 lea -0xc(%ebp),%esp 110ee7: 5b pop %ebx 110ee8: 5e pop %esi 110ee9: 5f pop %edi 110eea: c9 leave 110eeb: c3 ret _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { _Thread_Enable_dispatch(); 110eec: e8 9f 19 00 00 call 112890 <_Thread_Enable_dispatch> 110ef1: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 110ef6: eb 87 jmp 110e7f rtems_id *id ) { Extension_Control *the_extension; if ( !id ) 110ef8: b8 09 00 00 00 mov $0x9,%eax 110efd: eb 80 jmp 110e7f =============================================================================== 00110f00 : #include rtems_status_code rtems_extension_delete( rtems_id id ) { 110f00: 55 push %ebp 110f01: 89 e5 mov %esp,%ebp 110f03: 53 push %ebx 110f04: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get ( Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) 110f07: 8d 45 f4 lea -0xc(%ebp),%eax 110f0a: 50 push %eax 110f0b: ff 75 08 pushl 0x8(%ebp) 110f0e: 68 00 4f 13 00 push $0x134f00 110f13: e8 c8 10 00 00 call 111fe0 <_Objects_Get> 110f18: 89 c3 mov %eax,%ebx Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 110f1a: 83 c4 10 add $0x10,%esp 110f1d: 8b 55 f4 mov -0xc(%ebp),%edx 110f20: 85 d2 test %edx,%edx 110f22: 75 38 jne 110f5c case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 110f24: 83 ec 0c sub $0xc,%esp 110f27: 8d 40 10 lea 0x10(%eax),%eax 110f2a: 50 push %eax 110f2b: e8 f8 26 00 00 call 113628 <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 110f30: 59 pop %ecx 110f31: 58 pop %eax 110f32: 53 push %ebx 110f33: 68 00 4f 13 00 push $0x134f00 110f38: e8 6f 0c 00 00 call 111bac <_Objects_Close> RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 110f3d: 58 pop %eax 110f3e: 5a pop %edx 110f3f: 53 push %ebx 110f40: 68 00 4f 13 00 push $0x134f00 110f45: e8 66 0f 00 00 call 111eb0 <_Objects_Free> _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 110f4a: e8 41 19 00 00 call 112890 <_Thread_Enable_dispatch> 110f4f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 110f51: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110f54: 8b 5d fc mov -0x4(%ebp),%ebx 110f57: c9 leave 110f58: c3 ret 110f59: 8d 76 00 lea 0x0(%esi),%esi { Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 110f5c: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110f61: 8b 5d fc mov -0x4(%ebp),%ebx 110f64: c9 leave 110f65: c3 ret =============================================================================== 00113ab4 : rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 113ab4: 55 push %ebp 113ab5: 89 e5 mov %esp,%ebp 113ab7: 56 push %esi 113ab8: 53 push %ebx 113ab9: 8b 45 08 mov 0x8(%ebp),%eax 113abc: 8b 4d 0c mov 0xc(%ebp),%ecx 113abf: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113ac2: 39 05 c0 76 12 00 cmp %eax,0x1276c0 113ac8: 76 22 jbe 113aec return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; 113aca: 8d 34 40 lea (%eax,%eax,2),%esi 113acd: 8b 15 c4 76 12 00 mov 0x1276c4,%edx 113ad3: 8b 54 f2 08 mov 0x8(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113ad7: 85 d2 test %edx,%edx 113ad9: 74 1d je 113af8 113adb: 89 5d 10 mov %ebx,0x10(%ebp) 113ade: 89 4d 0c mov %ecx,0xc(%ebp) 113ae1: 89 45 08 mov %eax,0x8(%ebp) } 113ae4: 5b pop %ebx 113ae5: 5e pop %esi 113ae6: 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; 113ae7: ff e2 jmp *%edx 113ae9: 8d 76 00 lea 0x0(%esi),%esi void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113aec: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 113af1: 5b pop %ebx 113af2: 5e pop %esi 113af3: c9 leave 113af4: c3 ret 113af5: 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; 113af8: 31 c0 xor %eax,%eax } 113afa: 5b pop %ebx 113afb: 5e pop %esi 113afc: c9 leave 113afd: c3 ret =============================================================================== 00113b00 : rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 113b00: 55 push %ebp 113b01: 89 e5 mov %esp,%ebp 113b03: 56 push %esi 113b04: 53 push %ebx 113b05: 8b 45 08 mov 0x8(%ebp),%eax 113b08: 8b 4d 0c mov 0xc(%ebp),%ecx 113b0b: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113b0e: 39 05 c0 76 12 00 cmp %eax,0x1276c0 113b14: 76 22 jbe 113b38 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; 113b16: 8d 34 40 lea (%eax,%eax,2),%esi 113b19: 8b 15 c4 76 12 00 mov 0x1276c4,%edx 113b1f: 8b 54 f2 14 mov 0x14(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113b23: 85 d2 test %edx,%edx 113b25: 74 1d je 113b44 113b27: 89 5d 10 mov %ebx,0x10(%ebp) 113b2a: 89 4d 0c mov %ecx,0xc(%ebp) 113b2d: 89 45 08 mov %eax,0x8(%ebp) } 113b30: 5b pop %ebx 113b31: 5e pop %esi 113b32: 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; 113b33: ff e2 jmp *%edx 113b35: 8d 76 00 lea 0x0(%esi),%esi void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113b38: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 113b3d: 5b pop %ebx 113b3e: 5e pop %esi 113b3f: c9 leave 113b40: c3 ret 113b41: 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; 113b44: 31 c0 xor %eax,%eax } 113b46: 5b pop %ebx 113b47: 5e pop %esi 113b48: c9 leave 113b49: c3 ret =============================================================================== 00111628 : rtems_status_code rtems_io_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 111628: 55 push %ebp 111629: 89 e5 mov %esp,%ebp 11162b: 56 push %esi 11162c: 53 push %ebx 11162d: 8b 45 08 mov 0x8(%ebp),%eax 111630: 8b 4d 0c mov 0xc(%ebp),%ecx 111633: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111636: 39 05 c0 76 12 00 cmp %eax,0x1276c0 11163c: 76 1e jbe 11165c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; 11163e: 8d 34 40 lea (%eax,%eax,2),%esi 111641: 8b 15 c4 76 12 00 mov 0x1276c4,%edx 111647: 8b 14 f2 mov (%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11164a: 85 d2 test %edx,%edx 11164c: 74 1a je 111668 11164e: 89 5d 10 mov %ebx,0x10(%ebp) 111651: 89 4d 0c mov %ecx,0xc(%ebp) 111654: 89 45 08 mov %eax,0x8(%ebp) } 111657: 5b pop %ebx 111658: 5e pop %esi 111659: 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; 11165a: ff e2 jmp *%edx void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 11165c: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 111661: 5b pop %ebx 111662: 5e pop %esi 111663: c9 leave 111664: c3 ret 111665: 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; 111668: 31 c0 xor %eax,%eax } 11166a: 5b pop %ebx 11166b: 5e pop %esi 11166c: c9 leave 11166d: c3 ret =============================================================================== 00113b4c : rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 113b4c: 55 push %ebp 113b4d: 89 e5 mov %esp,%ebp 113b4f: 56 push %esi 113b50: 53 push %ebx 113b51: 8b 45 08 mov 0x8(%ebp),%eax 113b54: 8b 4d 0c mov 0xc(%ebp),%ecx 113b57: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113b5a: 39 05 c0 76 12 00 cmp %eax,0x1276c0 113b60: 76 22 jbe 113b84 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; 113b62: 8d 34 40 lea (%eax,%eax,2),%esi 113b65: 8b 15 c4 76 12 00 mov 0x1276c4,%edx 113b6b: 8b 54 f2 04 mov 0x4(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113b6f: 85 d2 test %edx,%edx 113b71: 74 1d je 113b90 113b73: 89 5d 10 mov %ebx,0x10(%ebp) 113b76: 89 4d 0c mov %ecx,0xc(%ebp) 113b79: 89 45 08 mov %eax,0x8(%ebp) } 113b7c: 5b pop %ebx 113b7d: 5e pop %esi 113b7e: 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; 113b7f: ff e2 jmp *%edx 113b81: 8d 76 00 lea 0x0(%esi),%esi void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113b84: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 113b89: 5b pop %ebx 113b8a: 5e pop %esi 113b8b: c9 leave 113b8c: c3 ret 113b8d: 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; 113b90: 31 c0 xor %eax,%eax } 113b92: 5b pop %ebx 113b93: 5e pop %esi 113b94: c9 leave 113b95: c3 ret =============================================================================== 00113b98 : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 113b98: 55 push %ebp 113b99: 89 e5 mov %esp,%ebp 113b9b: 56 push %esi 113b9c: 53 push %ebx 113b9d: 8b 45 08 mov 0x8(%ebp),%eax 113ba0: 8b 4d 0c mov 0xc(%ebp),%ecx 113ba3: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113ba6: 39 05 c0 76 12 00 cmp %eax,0x1276c0 113bac: 76 22 jbe 113bd0 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; 113bae: 8d 34 40 lea (%eax,%eax,2),%esi 113bb1: 8b 15 c4 76 12 00 mov 0x1276c4,%edx 113bb7: 8b 54 f2 0c mov 0xc(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113bbb: 85 d2 test %edx,%edx 113bbd: 74 1d je 113bdc 113bbf: 89 5d 10 mov %ebx,0x10(%ebp) 113bc2: 89 4d 0c mov %ecx,0xc(%ebp) 113bc5: 89 45 08 mov %eax,0x8(%ebp) } 113bc8: 5b pop %ebx 113bc9: 5e pop %esi 113bca: 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; 113bcb: ff e2 jmp *%edx 113bcd: 8d 76 00 lea 0x0(%esi),%esi void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113bd0: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 113bd5: 5b pop %ebx 113bd6: 5e pop %esi 113bd7: c9 leave 113bd8: c3 ret 113bd9: 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; 113bdc: 31 c0 xor %eax,%eax } 113bde: 5b pop %ebx 113bdf: 5e pop %esi 113be0: c9 leave 113be1: c3 ret =============================================================================== 0010d52c : 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 ) { 10d52c: 55 push %ebp 10d52d: 89 e5 mov %esp,%ebp 10d52f: 57 push %edi 10d530: 56 push %esi 10d531: 53 push %ebx 10d532: 83 ec 0c sub $0xc,%esp 10d535: 8b 5d 08 mov 0x8(%ebp),%ebx 10d538: 8b 75 0c mov 0xc(%ebp),%esi 10d53b: 8b 55 10 mov 0x10(%ebp),%edx rtems_device_major_number major_limit = _IO_Number_of_drivers; 10d53e: a1 e0 b7 12 00 mov 0x12b7e0,%eax if ( rtems_interrupt_is_in_progress() ) 10d543: 8b 0d 14 b5 12 00 mov 0x12b514,%ecx 10d549: 85 c9 test %ecx,%ecx 10d54b: 0f 85 ab 00 00 00 jne 10d5fc return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 10d551: 85 d2 test %edx,%edx 10d553: 0f 84 e3 00 00 00 je 10d63c return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 10d559: 89 02 mov %eax,(%edx) if ( driver_table == NULL ) 10d55b: 85 f6 test %esi,%esi 10d55d: 0f 84 d9 00 00 00 je 10d63c static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d563: 8b 3e mov (%esi),%edi 10d565: 85 ff test %edi,%edi 10d567: 0f 84 c3 00 00 00 je 10d630 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10d56d: 39 d8 cmp %ebx,%eax 10d56f: 76 7b jbe 10d5ec rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d571: a1 78 b4 12 00 mov 0x12b478,%eax 10d576: 40 inc %eax 10d577: a3 78 b4 12 00 mov %eax,0x12b478 return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 10d57c: 85 db test %ebx,%ebx 10d57e: 0f 85 88 00 00 00 jne 10d60c static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 10d584: 8b 0d e0 b7 12 00 mov 0x12b7e0,%ecx rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 10d58a: 85 c9 test %ecx,%ecx 10d58c: 0f 84 b7 00 00 00 je 10d649 <== NEVER TAKEN 10d592: 8b 3d e4 b7 12 00 mov 0x12b7e4,%edi 10d598: 89 f8 mov %edi,%eax 10d59a: eb 08 jmp 10d5a4 10d59c: 43 inc %ebx 10d59d: 83 c0 18 add $0x18,%eax 10d5a0: 39 d9 cmp %ebx,%ecx 10d5a2: 76 0b jbe 10d5af static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d5a4: 83 38 00 cmpl $0x0,(%eax) 10d5a7: 75 f3 jne 10d59c 10d5a9: 83 78 04 00 cmpl $0x0,0x4(%eax) 10d5ad: 75 ed jne 10d59c if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10d5af: 89 1a mov %ebx,(%edx) if ( m != n ) 10d5b1: 39 d9 cmp %ebx,%ecx 10d5b3: 0f 84 97 00 00 00 je 10d650 10d5b9: 8d 04 5b lea (%ebx,%ebx,2),%eax 10d5bc: 8d 04 c7 lea (%edi,%eax,8),%eax } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 10d5bf: b9 06 00 00 00 mov $0x6,%ecx 10d5c4: 89 c7 mov %eax,%edi 10d5c6: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10d5c8: e8 3f 19 00 00 call 10ef0c <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 10d5cd: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10d5d4: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10d5db: 89 5d 08 mov %ebx,0x8(%ebp) } 10d5de: 83 c4 0c add $0xc,%esp 10d5e1: 5b pop %ebx 10d5e2: 5e pop %esi 10d5e3: 5f pop %edi 10d5e4: c9 leave _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10d5e5: e9 02 7e 00 00 jmp 1153ec 10d5ea: 66 90 xchg %ax,%ax return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10d5ec: 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 ); } 10d5f1: 83 c4 0c add $0xc,%esp 10d5f4: 5b pop %ebx 10d5f5: 5e pop %esi 10d5f6: 5f pop %edi 10d5f7: c9 leave 10d5f8: c3 ret 10d5f9: 8d 76 00 lea 0x0(%esi),%esi rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 10d5fc: 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 ); } 10d601: 83 c4 0c add $0xc,%esp 10d604: 5b pop %ebx 10d605: 5e pop %esi 10d606: 5f pop %edi 10d607: c9 leave 10d608: c3 ret 10d609: 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; 10d60c: 8d 04 5b lea (%ebx,%ebx,2),%eax 10d60f: c1 e0 03 shl $0x3,%eax 10d612: 03 05 e4 b7 12 00 add 0x12b7e4,%eax static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d618: 8b 38 mov (%eax),%edi 10d61a: 85 ff test %edi,%edi 10d61c: 74 3e je 10d65c 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(); 10d61e: e8 e9 18 00 00 call 10ef0c <_Thread_Enable_dispatch> 10d623: 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 ); } 10d628: 83 c4 0c add $0xc,%esp 10d62b: 5b pop %ebx 10d62c: 5e pop %esi 10d62d: 5f pop %edi 10d62e: c9 leave 10d62f: c3 ret static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d630: 8b 4e 04 mov 0x4(%esi),%ecx 10d633: 85 c9 test %ecx,%ecx 10d635: 0f 85 32 ff ff ff jne 10d56d 10d63b: 90 nop _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10d63c: b8 09 00 00 00 mov $0x9,%eax } 10d641: 83 c4 0c add $0xc,%esp 10d644: 5b pop %ebx 10d645: 5e pop %esi 10d646: 5f pop %edi 10d647: c9 leave 10d648: c3 ret if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10d649: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED 10d64f: 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(); 10d650: e8 b7 18 00 00 call 10ef0c <_Thread_Enable_dispatch> 10d655: b8 05 00 00 00 mov $0x5,%eax return sc; 10d65a: eb 95 jmp 10d5f1 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d65c: 8b 48 04 mov 0x4(%eax),%ecx 10d65f: 85 c9 test %ecx,%ecx 10d661: 75 bb jne 10d61e if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 10d663: 89 1a mov %ebx,(%edx) 10d665: e9 55 ff ff ff jmp 10d5bf =============================================================================== 0010d66c : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 10d66c: 55 push %ebp 10d66d: 89 e5 mov %esp,%ebp 10d66f: 57 push %edi 10d670: 83 ec 04 sub $0x4,%esp 10d673: 8b 45 08 mov 0x8(%ebp),%eax if ( rtems_interrupt_is_in_progress() ) 10d676: 8b 15 14 b5 12 00 mov 0x12b514,%edx 10d67c: 85 d2 test %edx,%edx 10d67e: 75 44 jne 10d6c4 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 10d680: 39 05 e0 b7 12 00 cmp %eax,0x12b7e0 10d686: 77 0c ja 10d694 10d688: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d68d: 5a pop %edx 10d68e: 5f pop %edi 10d68f: c9 leave 10d690: c3 ret 10d691: 8d 76 00 lea 0x0(%esi),%esi 10d694: 8b 15 78 b4 12 00 mov 0x12b478,%edx 10d69a: 42 inc %edx 10d69b: 89 15 78 b4 12 00 mov %edx,0x12b478 if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( 10d6a1: 8d 14 40 lea (%eax,%eax,2),%edx 10d6a4: c1 e2 03 shl $0x3,%edx 10d6a7: 03 15 e4 b7 12 00 add 0x12b7e4,%edx 10d6ad: b9 18 00 00 00 mov $0x18,%ecx 10d6b2: 31 c0 xor %eax,%eax 10d6b4: 89 d7 mov %edx,%edi 10d6b6: f3 aa rep stos %al,%es:(%edi) &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 10d6b8: e8 4f 18 00 00 call 10ef0c <_Thread_Enable_dispatch> 10d6bd: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d6bf: 5a pop %edx 10d6c0: 5f pop %edi 10d6c1: c9 leave 10d6c2: c3 ret 10d6c3: 90 nop rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { if ( rtems_interrupt_is_in_progress() ) 10d6c4: b8 12 00 00 00 mov $0x12,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d6c9: 5a pop %edx 10d6ca: 5f pop %edi 10d6cb: c9 leave 10d6cc: c3 ret =============================================================================== 00113be4 : rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 113be4: 55 push %ebp 113be5: 89 e5 mov %esp,%ebp 113be7: 56 push %esi 113be8: 53 push %ebx 113be9: 8b 45 08 mov 0x8(%ebp),%eax 113bec: 8b 4d 0c mov 0xc(%ebp),%ecx 113bef: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113bf2: 39 05 c0 76 12 00 cmp %eax,0x1276c0 113bf8: 76 22 jbe 113c1c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; 113bfa: 8d 34 40 lea (%eax,%eax,2),%esi 113bfd: 8b 15 c4 76 12 00 mov 0x1276c4,%edx 113c03: 8b 54 f2 10 mov 0x10(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113c07: 85 d2 test %edx,%edx 113c09: 74 1d je 113c28 113c0b: 89 5d 10 mov %ebx,0x10(%ebp) 113c0e: 89 4d 0c mov %ecx,0xc(%ebp) 113c11: 89 45 08 mov %eax,0x8(%ebp) } 113c14: 5b pop %ebx 113c15: 5e pop %esi 113c16: 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; 113c17: ff e2 jmp *%edx 113c19: 8d 76 00 lea 0x0(%esi),%esi void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113c1c: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 113c21: 5b pop %ebx 113c22: 5e pop %esi 113c23: c9 leave 113c24: c3 ret 113c25: 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; 113c28: 31 c0 xor %eax,%eax } 113c2a: 5b pop %ebx 113c2b: 5e pop %esi 113c2c: c9 leave 113c2d: c3 ret =============================================================================== 0010e494 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10e494: 55 push %ebp 10e495: 89 e5 mov %esp,%ebp 10e497: 57 push %edi 10e498: 56 push %esi 10e499: 53 push %ebx 10e49a: 83 ec 1c sub $0x1c,%esp 10e49d: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10e4a0: 85 ff test %edi,%edi 10e4a2: 74 4d je 10e4f1 <== NEVER TAKEN 10e4a4: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 10e4ab: 8b 55 e4 mov -0x1c(%ebp),%edx 10e4ae: 8b 04 95 0c b9 12 00 mov 0x12b90c(,%edx,4),%eax 10e4b5: 85 c0 test %eax,%eax 10e4b7: 74 2f je 10e4e8 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10e4b9: 8b 70 04 mov 0x4(%eax),%esi if ( !information ) 10e4bc: 85 f6 test %esi,%esi 10e4be: 74 28 je 10e4e8 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10e4c0: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 10e4c5: 74 21 je 10e4e8 <== NEVER TAKEN 10e4c7: bb 01 00 00 00 mov $0x1,%ebx the_thread = (Thread_Control *)information->local_table[ i ]; 10e4cc: 8b 46 1c mov 0x1c(%esi),%eax 10e4cf: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !the_thread ) 10e4d2: 85 c0 test %eax,%eax 10e4d4: 74 09 je 10e4df <== NEVER TAKEN continue; (*routine)(the_thread); 10e4d6: 83 ec 0c sub $0xc,%esp 10e4d9: 50 push %eax 10e4da: ff d7 call *%edi 10e4dc: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10e4df: 43 inc %ebx 10e4e0: 0f b7 46 10 movzwl 0x10(%esi),%eax 10e4e4: 39 d8 cmp %ebx,%eax 10e4e6: 73 e4 jae 10e4cc Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10e4e8: ff 45 e4 incl -0x1c(%ebp) 10e4eb: 83 7d e4 05 cmpl $0x5,-0x1c(%ebp) 10e4ef: 75 ba jne 10e4ab (*routine)(the_thread); } } } 10e4f1: 8d 65 f4 lea -0xc(%ebp),%esp 10e4f4: 5b pop %ebx 10e4f5: 5e pop %esi 10e4f6: 5f pop %edi 10e4f7: c9 leave 10e4f8: c3 ret =============================================================================== 00116c74 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 116c74: 55 push %ebp 116c75: 89 e5 mov %esp,%ebp 116c77: 57 push %edi 116c78: 56 push %esi 116c79: 53 push %ebx 116c7a: 83 ec 1c sub $0x1c,%esp 116c7d: 8b 7d 08 mov 0x8(%ebp),%edi 116c80: 8b 5d 0c mov 0xc(%ebp),%ebx 116c83: 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 ) 116c86: 85 db test %ebx,%ebx 116c88: 74 62 je 116cec return RTEMS_INVALID_ADDRESS; if ( !count ) 116c8a: 85 f6 test %esi,%esi 116c8c: 74 5e je 116cec RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 116c8e: 51 push %ecx 116c8f: 8d 45 e4 lea -0x1c(%ebp),%eax 116c92: 50 push %eax 116c93: 57 push %edi 116c94: 68 a0 2a 14 00 push $0x142aa0 116c99: e8 e2 4b 00 00 call 11b880 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 116c9e: 83 c4 10 add $0x10,%esp 116ca1: 8b 55 e4 mov -0x1c(%ebp),%edx 116ca4: 85 d2 test %edx,%edx 116ca6: 74 10 je 116cb8 116ca8: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116cad: 8d 65 f4 lea -0xc(%ebp),%esp 116cb0: 5b pop %ebx 116cb1: 5e pop %esi 116cb2: 5f pop %edi 116cb3: c9 leave 116cb4: c3 ret 116cb5: 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( 116cb8: 83 ec 08 sub $0x8,%esp 116cbb: 56 push %esi 116cbc: 6a 00 push $0x0 116cbe: 57 push %edi 116cbf: ff 75 10 pushl 0x10(%ebp) 116cc2: 53 push %ebx 116cc3: 83 c0 14 add $0x14,%eax 116cc6: 50 push %eax 116cc7: e8 78 34 00 00 call 11a144 <_CORE_message_queue_Broadcast> 116ccc: 89 c3 mov %eax,%ebx NULL, #endif count ); _Thread_Enable_dispatch(); 116cce: 83 c4 20 add $0x20,%esp 116cd1: e8 5a 54 00 00 call 11c130 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( core_status ); 116cd6: 83 ec 0c sub $0xc,%esp 116cd9: 53 push %ebx 116cda: e8 69 03 00 00 call 117048 <_Message_queue_Translate_core_message_queue_return_code> #endif count ); _Thread_Enable_dispatch(); return 116cdf: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116ce2: 8d 65 f4 lea -0xc(%ebp),%esp 116ce5: 5b pop %ebx 116ce6: 5e pop %esi 116ce7: 5f pop %edi 116ce8: c9 leave 116ce9: c3 ret 116cea: 66 90 xchg %ax,%ax #endif count ); _Thread_Enable_dispatch(); return 116cec: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116cf1: 8d 65 f4 lea -0xc(%ebp),%esp 116cf4: 5b pop %ebx 116cf5: 5e pop %esi 116cf6: 5f pop %edi 116cf7: c9 leave 116cf8: c3 ret =============================================================================== 00114178 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { 114178: 55 push %ebp 114179: 89 e5 mov %esp,%ebp 11417b: 57 push %edi 11417c: 56 push %esi 11417d: 53 push %ebx 11417e: 83 ec 2c sub $0x2c,%esp 114181: 8b 5d 08 mov 0x8(%ebp),%ebx 114184: 8b 75 0c mov 0xc(%ebp),%esi 114187: 8b 4d 10 mov 0x10(%ebp),%ecx 11418a: 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 ) ) 11418d: 85 db test %ebx,%ebx 11418f: 74 2f je 1141c0 return RTEMS_INVALID_NAME; if ( !id ) 114191: 85 ff test %edi,%edi 114193: 0f 84 a3 00 00 00 je 11423c if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 114199: 85 f6 test %esi,%esi 11419b: 74 13 je 1141b0 return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 11419d: 85 c9 test %ecx,%ecx 11419f: 75 2f jne 1141d0 1141a1: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1141a6: 8d 65 f4 lea -0xc(%ebp),%esp 1141a9: 5b pop %ebx 1141aa: 5e pop %esi 1141ab: 5f pop %edi 1141ac: c9 leave 1141ad: c3 ret 1141ae: 66 90 xchg %ax,%ax if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 1141b0: b8 0a 00 00 00 mov $0xa,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1141b5: 8d 65 f4 lea -0xc(%ebp),%esp 1141b8: 5b pop %ebx 1141b9: 5e pop %esi 1141ba: 5f pop %edi 1141bb: c9 leave 1141bc: c3 ret 1141bd: 8d 76 00 lea 0x0(%esi),%esi CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) 1141c0: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1141c5: 8d 65 f4 lea -0xc(%ebp),%esp 1141c8: 5b pop %ebx 1141c9: 5e pop %esi 1141ca: 5f pop %edi 1141cb: c9 leave 1141cc: c3 ret 1141cd: 8d 76 00 lea 0x0(%esi),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1141d0: a1 58 1a 13 00 mov 0x131a58,%eax 1141d5: 40 inc %eax 1141d6: a3 58 1a 13 00 mov %eax,0x131a58 #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 1141db: 89 4d d4 mov %ecx,-0x2c(%ebp) 1141de: e8 d1 60 00 00 call 11a2b4 <_Message_queue_Allocate> 1141e3: 89 c2 mov %eax,%edx if ( !the_message_queue ) { 1141e5: 85 c0 test %eax,%eax 1141e7: 8b 4d d4 mov -0x2c(%ebp),%ecx 1141ea: 74 7c je 114268 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 1141ec: 8b 45 14 mov 0x14(%ebp),%eax 1141ef: 89 42 10 mov %eax,0x10(%edx) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 1141f2: a8 04 test $0x4,%al 1141f4: 0f 95 c0 setne %al 1141f7: 0f b6 c0 movzbl %al,%eax 1141fa: 89 45 e4 mov %eax,-0x1c(%ebp) else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 1141fd: 51 push %ecx 1141fe: 56 push %esi 1141ff: 8d 45 e4 lea -0x1c(%ebp),%eax 114202: 50 push %eax 114203: 8d 42 14 lea 0x14(%edx),%eax 114206: 50 push %eax 114207: 89 55 d4 mov %edx,-0x2c(%ebp) 11420a: e8 a5 10 00 00 call 1152b4 <_CORE_message_queue_Initialize> 11420f: 83 c4 10 add $0x10,%esp 114212: 84 c0 test %al,%al 114214: 8b 55 d4 mov -0x2c(%ebp),%edx 114217: 75 2f jne 114248 */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 114219: 83 ec 08 sub $0x8,%esp 11421c: 52 push %edx 11421d: 68 80 1d 13 00 push $0x131d80 114222: e8 41 1e 00 00 call 116068 <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 114227: e8 34 28 00 00 call 116a60 <_Thread_Enable_dispatch> 11422c: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 114231: 83 c4 10 add $0x10,%esp 114234: e9 6d ff ff ff jmp 1141a6 114239: 8d 76 00 lea 0x0(%esi),%esi #endif if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 11423c: b8 09 00 00 00 mov $0x9,%eax 114241: e9 60 ff ff ff jmp 1141a6 114246: 66 90 xchg %ax,%ax #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 114248: 8b 42 08 mov 0x8(%edx),%eax 11424b: 0f b7 f0 movzwl %ax,%esi 11424e: 8b 0d 9c 1d 13 00 mov 0x131d9c,%ecx 114254: 89 14 b1 mov %edx,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 114257: 89 5a 0c mov %ebx,0xc(%edx) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 11425a: 89 07 mov %eax,(%edi) name, 0 ); #endif _Thread_Enable_dispatch(); 11425c: e8 ff 27 00 00 call 116a60 <_Thread_Enable_dispatch> 114261: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 114263: e9 3e ff ff ff jmp 1141a6 _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); if ( !the_message_queue ) { _Thread_Enable_dispatch(); 114268: e8 f3 27 00 00 call 116a60 <_Thread_Enable_dispatch> 11426d: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 114272: e9 2f ff ff ff jmp 1141a6 =============================================================================== 001188d8 : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 1188d8: 55 push %ebp 1188d9: 89 e5 mov %esp,%ebp 1188db: 53 push %ebx 1188dc: 83 ec 18 sub $0x18,%esp 1188df: 8d 45 f4 lea -0xc(%ebp),%eax 1188e2: 50 push %eax 1188e3: ff 75 08 pushl 0x8(%ebp) 1188e6: 68 00 50 13 00 push $0x135000 1188eb: e8 f0 96 ff ff call 111fe0 <_Objects_Get> 1188f0: 89 c3 mov %eax,%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 1188f2: 83 c4 10 add $0x10,%esp 1188f5: 8b 4d f4 mov -0xc(%ebp),%ecx 1188f8: 85 c9 test %ecx,%ecx 1188fa: 75 3c jne 118938 case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 1188fc: 83 ec 08 sub $0x8,%esp 1188ff: 50 push %eax 118900: 68 00 50 13 00 push $0x135000 118905: e8 a2 92 ff ff call 111bac <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 11890a: 83 c4 0c add $0xc,%esp 11890d: 6a 05 push $0x5 11890f: 6a 00 push $0x0 118911: 8d 43 14 lea 0x14(%ebx),%eax 118914: 50 push %eax 118915: e8 de 05 00 00 call 118ef8 <_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 ); 11891a: 58 pop %eax 11891b: 5a pop %edx 11891c: 53 push %ebx 11891d: 68 00 50 13 00 push $0x135000 118922: e8 89 95 ff ff call 111eb0 <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 118927: e8 64 9f ff ff call 112890 <_Thread_Enable_dispatch> 11892c: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11892e: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118931: 8b 5d fc mov -0x4(%ebp),%ebx 118934: c9 leave 118935: c3 ret 118936: 66 90 xchg %ax,%ax { register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 118938: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11893d: 8b 5d fc mov -0x4(%ebp),%ebx 118940: c9 leave 118941: c3 ret =============================================================================== 00116e68 : rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { 116e68: 55 push %ebp 116e69: 89 e5 mov %esp,%ebp 116e6b: 53 push %ebx 116e6c: 83 ec 14 sub $0x14,%esp 116e6f: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116e72: 85 db test %ebx,%ebx 116e74: 74 46 je 116ebc RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 116e76: 51 push %ecx 116e77: 8d 45 f4 lea -0xc(%ebp),%eax 116e7a: 50 push %eax 116e7b: ff 75 08 pushl 0x8(%ebp) 116e7e: 68 a0 2a 14 00 push $0x142aa0 116e83: e8 f8 49 00 00 call 11b880 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 116e88: 83 c4 10 add $0x10,%esp 116e8b: 8b 55 f4 mov -0xc(%ebp),%edx 116e8e: 85 d2 test %edx,%edx 116e90: 74 0a je 116e9c 116e92: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116e97: 8b 5d fc mov -0x4(%ebp),%ebx 116e9a: c9 leave 116e9b: 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 ); 116e9c: 83 ec 0c sub $0xc,%esp 116e9f: 83 c0 14 add $0x14,%eax 116ea2: 50 push %eax 116ea3: e8 5c 33 00 00 call 11a204 <_CORE_message_queue_Flush> 116ea8: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 116eaa: e8 81 52 00 00 call 11c130 <_Thread_Enable_dispatch> 116eaf: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116eb1: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116eb4: 8b 5d fc mov -0x4(%ebp),%ebx 116eb7: c9 leave 116eb8: c3 ret 116eb9: 8d 76 00 lea 0x0(%esi),%esi ) { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116ebc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116ec1: 8b 5d fc mov -0x4(%ebp),%ebx 116ec4: c9 leave 116ec5: c3 ret =============================================================================== 00116ec8 : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { 116ec8: 55 push %ebp 116ec9: 89 e5 mov %esp,%ebp 116ecb: 53 push %ebx 116ecc: 83 ec 14 sub $0x14,%esp 116ecf: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116ed2: 85 db test %ebx,%ebx 116ed4: 74 3a je 116f10 116ed6: 51 push %ecx 116ed7: 8d 45 f4 lea -0xc(%ebp),%eax 116eda: 50 push %eax 116edb: ff 75 08 pushl 0x8(%ebp) 116ede: 68 a0 2a 14 00 push $0x142aa0 116ee3: e8 98 49 00 00 call 11b880 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 116ee8: 83 c4 10 add $0x10,%esp 116eeb: 8b 55 f4 mov -0xc(%ebp),%edx 116eee: 85 d2 test %edx,%edx 116ef0: 74 0a je 116efc 116ef2: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116ef7: 8b 5d fc mov -0x4(%ebp),%ebx 116efa: c9 leave 116efb: 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; 116efc: 8b 40 5c mov 0x5c(%eax),%eax 116eff: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 116f01: e8 2a 52 00 00 call 11c130 <_Thread_Enable_dispatch> 116f06: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116f08: 8b 5d fc mov -0x4(%ebp),%ebx 116f0b: c9 leave 116f0c: c3 ret 116f0d: 8d 76 00 lea 0x0(%esi),%esi ) { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116f10: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116f15: 8b 5d fc mov -0x4(%ebp),%ebx 116f18: c9 leave 116f19: c3 ret =============================================================================== 0011429c : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 11429c: 55 push %ebp 11429d: 89 e5 mov %esp,%ebp 11429f: 56 push %esi 1142a0: 53 push %ebx 1142a1: 83 ec 10 sub $0x10,%esp 1142a4: 8b 5d 0c mov 0xc(%ebp),%ebx 1142a7: 8b 75 10 mov 0x10(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 1142aa: 85 db test %ebx,%ebx 1142ac: 74 6e je 11431c return RTEMS_INVALID_ADDRESS; if ( !size ) 1142ae: 85 f6 test %esi,%esi 1142b0: 74 6a je 11431c RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 1142b2: 51 push %ecx 1142b3: 8d 45 f4 lea -0xc(%ebp),%eax 1142b6: 50 push %eax 1142b7: ff 75 08 pushl 0x8(%ebp) 1142ba: 68 80 1d 13 00 push $0x131d80 1142bf: e8 d4 1e 00 00 call 116198 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 1142c4: 83 c4 10 add $0x10,%esp 1142c7: 8b 55 f4 mov -0xc(%ebp),%edx 1142ca: 85 d2 test %edx,%edx 1142cc: 75 42 jne 114310 if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 1142ce: 83 ec 08 sub $0x8,%esp 1142d1: ff 75 18 pushl 0x18(%ebp) 1142d4: 8b 55 14 mov 0x14(%ebp),%edx 1142d7: 83 e2 01 and $0x1,%edx 1142da: 83 f2 01 xor $0x1,%edx 1142dd: 52 push %edx 1142de: 56 push %esi 1142df: 53 push %ebx 1142e0: ff 70 08 pushl 0x8(%eax) 1142e3: 83 c0 14 add $0x14,%eax 1142e6: 50 push %eax 1142e7: e8 78 10 00 00 call 115364 <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 1142ec: 83 c4 20 add $0x20,%esp 1142ef: e8 6c 27 00 00 call 116a60 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 1142f4: 83 ec 0c sub $0xc,%esp 1142f7: a1 18 1b 13 00 mov 0x131b18,%eax 1142fc: ff 70 34 pushl 0x34(%eax) 1142ff: e8 a0 00 00 00 call 1143a4 <_Message_queue_Translate_core_message_queue_return_code> 114304: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 114307: 8d 65 f8 lea -0x8(%ebp),%esp 11430a: 5b pop %ebx 11430b: 5e pop %esi 11430c: c9 leave 11430d: c3 ret 11430e: 66 90 xchg %ax,%ax if ( !size ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 114310: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 114315: 8d 65 f8 lea -0x8(%ebp),%esp 114318: 5b pop %ebx 114319: 5e pop %esi 11431a: c9 leave 11431b: c3 ret size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 11431c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 114321: 8d 65 f8 lea -0x8(%ebp),%esp 114324: 5b pop %ebx 114325: 5e pop %esi 114326: c9 leave 114327: c3 ret =============================================================================== 0010b9e0 : rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { 10b9e0: 55 push %ebp 10b9e1: 89 e5 mov %esp,%ebp 10b9e3: 56 push %esi 10b9e4: 53 push %ebx 10b9e5: 83 ec 10 sub $0x10,%esp 10b9e8: 8b 75 08 mov 0x8(%ebp),%esi 10b9eb: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10b9ee: 85 db test %ebx,%ebx 10b9f0: 74 5e je 10ba50 <== NEVER TAKEN RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 10b9f2: 51 push %ecx 10b9f3: 8d 45 f4 lea -0xc(%ebp),%eax 10b9f6: 50 push %eax 10b9f7: 56 push %esi 10b9f8: 68 80 76 12 00 push $0x127680 10b9fd: e8 42 19 00 00 call 10d344 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 10ba02: 83 c4 10 add $0x10,%esp 10ba05: 8b 55 f4 mov -0xc(%ebp),%edx 10ba08: 85 d2 test %edx,%edx 10ba0a: 74 0c je 10ba18 10ba0c: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba11: 8d 65 f8 lea -0x8(%ebp),%esp 10ba14: 5b pop %ebx 10ba15: 5e pop %esi 10ba16: c9 leave 10ba17: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 10ba18: 6a 00 push $0x0 10ba1a: 6a 00 push $0x0 10ba1c: 68 ff ff ff 7f push $0x7fffffff 10ba21: 6a 00 push $0x0 10ba23: 56 push %esi 10ba24: ff 75 10 pushl 0x10(%ebp) 10ba27: 53 push %ebx 10ba28: 83 c0 14 add $0x14,%eax 10ba2b: 50 push %eax 10ba2c: e8 b7 0b 00 00 call 10c5e8 <_CORE_message_queue_Submit> 10ba31: 89 c3 mov %eax,%ebx MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 10ba33: 83 c4 20 add $0x20,%esp 10ba36: e8 51 21 00 00 call 10db8c <_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); 10ba3b: 83 ec 0c sub $0xc,%esp 10ba3e: 53 push %ebx 10ba3f: e8 18 00 00 00 call 10ba5c <_Message_queue_Translate_core_message_queue_return_code> 10ba44: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba47: 8d 65 f8 lea -0x8(%ebp),%esp 10ba4a: 5b pop %ebx 10ba4b: 5e pop %esi 10ba4c: c9 leave 10ba4d: c3 ret 10ba4e: 66 90 xchg %ax,%ax { register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10ba50: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba55: 8d 65 f8 lea -0x8(%ebp),%esp 10ba58: 5b pop %ebx 10ba59: 5e pop %esi 10ba5a: c9 leave 10ba5b: c3 ret =============================================================================== 00117058 : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { 117058: 55 push %ebp 117059: 89 e5 mov %esp,%ebp 11705b: 56 push %esi 11705c: 53 push %ebx 11705d: 83 ec 10 sub $0x10,%esp 117060: 8b 75 08 mov 0x8(%ebp),%esi 117063: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 117066: 85 db test %ebx,%ebx 117068: 74 5e je 1170c8 11706a: 51 push %ecx 11706b: 8d 45 f4 lea -0xc(%ebp),%eax 11706e: 50 push %eax 11706f: 56 push %esi 117070: 68 a0 2a 14 00 push $0x142aa0 117075: e8 06 48 00 00 call 11b880 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 11707a: 83 c4 10 add $0x10,%esp 11707d: 8b 55 f4 mov -0xc(%ebp),%edx 117080: 85 d2 test %edx,%edx 117082: 74 0c je 117090 117084: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117089: 8d 65 f8 lea -0x8(%ebp),%esp 11708c: 5b pop %ebx 11708d: 5e pop %esi 11708e: c9 leave 11708f: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 117090: 6a 00 push $0x0 117092: 6a 00 push $0x0 117094: 68 00 00 00 80 push $0x80000000 117099: 6a 00 push $0x0 11709b: 56 push %esi 11709c: ff 75 10 pushl 0x10(%ebp) 11709f: 53 push %ebx 1170a0: 83 c0 14 add $0x14,%eax 1170a3: 50 push %eax 1170a4: e8 4b 33 00 00 call 11a3f4 <_CORE_message_queue_Submit> 1170a9: 89 c3 mov %eax,%ebx id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 1170ab: 83 c4 20 add $0x20,%esp 1170ae: e8 7d 50 00 00 call 11c130 <_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); 1170b3: 83 ec 0c sub $0xc,%esp 1170b6: 53 push %ebx 1170b7: e8 8c ff ff ff call 117048 <_Message_queue_Translate_core_message_queue_return_code> 1170bc: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1170bf: 8d 65 f8 lea -0x8(%ebp),%esp 1170c2: 5b pop %ebx 1170c3: 5e pop %esi 1170c4: c9 leave 1170c5: c3 ret 1170c6: 66 90 xchg %ax,%ax { register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 1170c8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1170cd: 8d 65 f8 lea -0x8(%ebp),%esp 1170d0: 5b pop %ebx 1170d1: 5e pop %esi 1170d2: c9 leave 1170d3: c3 ret =============================================================================== 0010d420 : const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 10d420: 55 push %ebp 10d421: 89 e5 mov %esp,%ebp 10d423: 83 ec 08 sub $0x8,%esp 10d426: 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 ) 10d429: 83 f8 01 cmp $0x1,%eax 10d42c: 74 2a je 10d458 api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 10d42e: 83 f8 02 cmp $0x2,%eax 10d431: 74 09 je 10d43c 10d433: b8 87 4d 12 00 mov $0x124d87,%eax return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; } 10d438: c9 leave 10d439: c3 ret 10d43a: 66 90 xchg %ax,%ax 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; else if ( the_api == OBJECTS_CLASSIC_API ) 10d43c: b8 80 90 12 00 mov $0x129080,%eax else if ( the_api == OBJECTS_ITRON_API ) api_assoc = rtems_object_api_itron_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); 10d441: 83 ec 08 sub $0x8,%esp 10d444: ff 75 0c pushl 0xc(%ebp) 10d447: 50 push %eax 10d448: e8 cb 54 00 00 call 112918 if ( class_assoc ) 10d44d: 83 c4 10 add $0x10,%esp 10d450: 85 c0 test %eax,%eax 10d452: 74 0c je 10d460 return class_assoc->name; 10d454: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10d456: c9 leave 10d457: c3 ret ) { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 10d458: b8 60 90 12 00 mov $0x129060,%eax 10d45d: eb e2 jmp 10d441 10d45f: 90 nop api_assoc = rtems_object_api_itron_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) 10d460: b8 8f 4d 12 00 mov $0x124d8f,%eax return class_assoc->name; return "BAD CLASS"; } 10d465: c9 leave 10d466: c3 ret =============================================================================== 0010d468 : }; const char *rtems_object_get_api_name( int api ) { 10d468: 55 push %ebp 10d469: 89 e5 mov %esp,%ebp 10d46b: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); 10d46e: ff 75 08 pushl 0x8(%ebp) 10d471: 68 00 91 12 00 push $0x129100 10d476: e8 9d 54 00 00 call 112918 if ( api_assoc ) 10d47b: 83 c4 10 add $0x10,%esp 10d47e: 85 c0 test %eax,%eax 10d480: 74 06 je 10d488 return api_assoc->name; 10d482: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10d484: c9 leave 10d485: c3 ret 10d486: 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 ) 10d488: b8 8f 4d 12 00 mov $0x124d8f,%eax return api_assoc->name; return "BAD CLASS"; } 10d48d: c9 leave 10d48e: c3 ret =============================================================================== 0010d4d0 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 10d4d0: 55 push %ebp 10d4d1: 89 e5 mov %esp,%ebp 10d4d3: 57 push %edi 10d4d4: 56 push %esi 10d4d5: 53 push %ebx 10d4d6: 83 ec 0c sub $0xc,%esp 10d4d9: 8b 5d 10 mov 0x10(%ebp),%ebx int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10d4dc: 85 db test %ebx,%ebx 10d4de: 74 5c je 10d53c return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 10d4e0: 83 ec 08 sub $0x8,%esp 10d4e3: ff 75 0c pushl 0xc(%ebp) 10d4e6: ff 75 08 pushl 0x8(%ebp) 10d4e9: e8 4a 1a 00 00 call 10ef38 <_Objects_Get_information> if ( !obj_info ) 10d4ee: 83 c4 10 add $0x10,%esp 10d4f1: 85 c0 test %eax,%eax 10d4f3: 74 57 je 10d54c return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 10d4f5: 8b 50 08 mov 0x8(%eax),%edx 10d4f8: 89 13 mov %edx,(%ebx) info->maximum_id = obj_info->maximum_id; 10d4fa: 8b 50 0c mov 0xc(%eax),%edx 10d4fd: 89 53 04 mov %edx,0x4(%ebx) info->auto_extend = obj_info->auto_extend; 10d500: 8a 50 12 mov 0x12(%eax),%dl 10d503: 88 53 0c mov %dl,0xc(%ebx) info->maximum = obj_info->maximum; 10d506: 0f b7 70 10 movzwl 0x10(%eax),%esi 10d50a: 89 73 08 mov %esi,0x8(%ebx) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10d50d: 85 f6 test %esi,%esi 10d50f: 74 3f je 10d550 <== NEVER TAKEN 10d511: 8b 78 1c mov 0x1c(%eax),%edi 10d514: b9 01 00 00 00 mov $0x1,%ecx 10d519: b8 01 00 00 00 mov $0x1,%eax 10d51e: 31 d2 xor %edx,%edx if ( !obj_info->local_table[i] ) unallocated++; 10d520: 83 3c 8f 01 cmpl $0x1,(%edi,%ecx,4) 10d524: 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++ ) 10d527: 40 inc %eax 10d528: 89 c1 mov %eax,%ecx 10d52a: 39 c6 cmp %eax,%esi 10d52c: 73 f2 jae 10d520 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 10d52e: 89 53 10 mov %edx,0x10(%ebx) 10d531: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10d533: 8d 65 f4 lea -0xc(%ebp),%esp 10d536: 5b pop %ebx 10d537: 5e pop %esi 10d538: 5f pop %edi 10d539: c9 leave 10d53a: c3 ret 10d53b: 90 nop int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10d53c: b8 09 00 00 00 mov $0x9,%eax unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 10d541: 8d 65 f4 lea -0xc(%ebp),%esp 10d544: 5b pop %ebx 10d545: 5e pop %esi 10d546: 5f pop %edi 10d547: c9 leave 10d548: c3 ret 10d549: 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 ) 10d54c: b0 0a mov $0xa,%al 10d54e: eb e3 jmp 10d533 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++ ) 10d550: 31 d2 xor %edx,%edx <== NOT EXECUTED 10d552: eb da jmp 10d52e <== NOT EXECUTED =============================================================================== 00110398 : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { 110398: 55 push %ebp 110399: 89 e5 mov %esp,%ebp 11039b: 53 push %ebx 11039c: 83 ec 14 sub $0x14,%esp 11039f: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 1103a2: 85 db test %ebx,%ebx 1103a4: 74 26 je 1103cc return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); 1103a6: 83 ec 08 sub $0x8,%esp 1103a9: 8d 45 f4 lea -0xc(%ebp),%eax 1103ac: 50 push %eax 1103ad: ff 75 08 pushl 0x8(%ebp) 1103b0: e8 93 1c 00 00 call 112048 <_Objects_Id_to_name> *name = name_u.name_u32; 1103b5: 8b 55 f4 mov -0xc(%ebp),%edx 1103b8: 89 13 mov %edx,(%ebx) return _Status_Object_name_errors_to_status[ status ]; 1103ba: 8b 04 85 ac cb 12 00 mov 0x12cbac(,%eax,4),%eax 1103c1: 83 c4 10 add $0x10,%esp } 1103c4: 8b 5d fc mov -0x4(%ebp),%ebx 1103c7: c9 leave 1103c8: c3 ret 1103c9: 8d 76 00 lea 0x0(%esi),%esi ) { Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 1103cc: 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 ]; } 1103d1: 8b 5d fc mov -0x4(%ebp),%ebx 1103d4: c9 leave 1103d5: c3 ret =============================================================================== 0010d5ac : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 10d5ac: 55 push %ebp 10d5ad: 89 e5 mov %esp,%ebp 10d5af: 57 push %edi 10d5b0: 56 push %esi 10d5b1: 53 push %ebx 10d5b2: 83 ec 1c sub $0x1c,%esp 10d5b5: 8b 75 08 mov 0x8(%ebp),%esi 10d5b8: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10d5bb: 85 ff test %edi,%edi 10d5bd: 74 61 je 10d620 return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10d5bf: 85 f6 test %esi,%esi 10d5c1: 74 35 je 10d5f8 information = _Objects_Get_information_id( tmpId ); 10d5c3: 83 ec 0c sub $0xc,%esp 10d5c6: 56 push %esi 10d5c7: e8 4c 19 00 00 call 10ef18 <_Objects_Get_information_id> 10d5cc: 89 c3 mov %eax,%ebx if ( !information ) 10d5ce: 83 c4 10 add $0x10,%esp 10d5d1: 85 c0 test %eax,%eax 10d5d3: 74 16 je 10d5eb return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10d5d5: 50 push %eax 10d5d6: 8d 45 e4 lea -0x1c(%ebp),%eax 10d5d9: 50 push %eax 10d5da: 56 push %esi 10d5db: 53 push %ebx 10d5dc: e8 bb 1a 00 00 call 10f09c <_Objects_Get> switch ( location ) { 10d5e1: 83 c4 10 add $0x10,%esp 10d5e4: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d5e7: 85 c9 test %ecx,%ecx 10d5e9: 74 19 je 10d604 case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10d5eb: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d5f0: 8d 65 f4 lea -0xc(%ebp),%esp 10d5f3: 5b pop %ebx 10d5f4: 5e pop %esi 10d5f5: 5f pop %edi 10d5f6: c9 leave 10d5f7: c3 ret Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10d5f8: a1 58 b5 12 00 mov 0x12b558,%eax 10d5fd: 8b 70 08 mov 0x8(%eax),%esi 10d600: eb c1 jmp 10d5c3 10d602: 66 90 xchg %ax,%ax the_object = _Objects_Get( information, tmpId, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 10d604: 52 push %edx 10d605: 57 push %edi 10d606: 50 push %eax 10d607: 53 push %ebx 10d608: e8 c7 1c 00 00 call 10f2d4 <_Objects_Set_name> _Thread_Enable_dispatch(); 10d60d: e8 ba 23 00 00 call 10f9cc <_Thread_Enable_dispatch> 10d612: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10d614: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d617: 8d 65 f4 lea -0xc(%ebp),%esp 10d61a: 5b pop %ebx 10d61b: 5e pop %esi 10d61c: 5f pop %edi 10d61d: c9 leave 10d61e: c3 ret 10d61f: 90 nop Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10d620: b8 09 00 00 00 mov $0x9,%eax 10d625: eb c9 jmp 10d5f0 =============================================================================== 001170d4 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 1170d4: 55 push %ebp 1170d5: 89 e5 mov %esp,%ebp 1170d7: 57 push %edi 1170d8: 56 push %esi 1170d9: 53 push %ebx 1170da: 83 ec 1c sub $0x1c,%esp 1170dd: 8b 5d 08 mov 0x8(%ebp),%ebx 1170e0: 8b 75 0c mov 0xc(%ebp),%esi 1170e3: 8b 55 10 mov 0x10(%ebp),%edx 1170e6: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 1170e9: 85 db test %ebx,%ebx 1170eb: 74 47 je 117134 return RTEMS_INVALID_NAME; if ( !starting_address ) 1170ed: 85 f6 test %esi,%esi 1170ef: 74 23 je 117114 return RTEMS_INVALID_ADDRESS; if ( !id ) 1170f1: 8b 45 1c mov 0x1c(%ebp),%eax 1170f4: 85 c0 test %eax,%eax 1170f6: 74 1c je 117114 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 1170f8: 85 d2 test %edx,%edx 1170fa: 74 28 je 117124 1170fc: 85 ff test %edi,%edi 1170fe: 74 24 je 117124 117100: 39 fa cmp %edi,%edx 117102: 72 20 jb 117124 117104: f7 c7 03 00 00 00 test $0x3,%edi 11710a: 75 18 jne 117124 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 11710c: f7 c6 03 00 00 00 test $0x3,%esi 117112: 74 30 je 117144 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 117114: b8 09 00 00 00 mov $0x9,%eax } 117119: 8d 65 f4 lea -0xc(%ebp),%esp 11711c: 5b pop %ebx 11711d: 5e pop %esi 11711e: 5f pop %edi 11711f: c9 leave 117120: c3 ret 117121: 8d 76 00 lea 0x0(%esi),%esi 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 117124: b8 08 00 00 00 mov $0x8,%eax } 117129: 8d 65 f4 lea -0xc(%ebp),%esp 11712c: 5b pop %ebx 11712d: 5e pop %esi 11712e: 5f pop %edi 11712f: c9 leave 117130: c3 ret 117131: 8d 76 00 lea 0x0(%esi),%esi rtems_id *id ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 117134: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 117139: 8d 65 f4 lea -0xc(%ebp),%esp 11713c: 5b pop %ebx 11713d: 5e pop %esi 11713e: 5f pop %edi 11713f: c9 leave 117140: c3 ret 117141: 8d 76 00 lea 0x0(%esi),%esi 117144: a1 78 27 14 00 mov 0x142778,%eax 117149: 40 inc %eax 11714a: a3 78 27 14 00 mov %eax,0x142778 * 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 ); 11714f: 83 ec 0c sub $0xc,%esp 117152: 68 00 26 14 00 push $0x142600 117157: 89 55 e0 mov %edx,-0x20(%ebp) 11715a: e8 35 42 00 00 call 11b394 <_Objects_Allocate> 11715f: 89 45 e4 mov %eax,-0x1c(%ebp) _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 117162: 83 c4 10 add $0x10,%esp 117165: 85 c0 test %eax,%eax 117167: 8b 55 e0 mov -0x20(%ebp),%edx 11716a: 74 58 je 1171c4 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 11716c: 8b 45 e4 mov -0x1c(%ebp),%eax 11716f: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 117172: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 117175: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 117178: 8b 4d 18 mov 0x18(%ebp),%ecx 11717b: 89 48 1c mov %ecx,0x1c(%eax) the_partition->number_of_used_blocks = 0; 11717e: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) _Chain_Initialize( &the_partition->Memory, starting_address, 117185: 57 push %edi 117186: 89 d0 mov %edx,%eax 117188: 31 d2 xor %edx,%edx 11718a: f7 f7 div %edi 11718c: 50 push %eax 11718d: 56 push %esi 11718e: 8b 45 e4 mov -0x1c(%ebp),%eax 117191: 83 c0 24 add $0x24,%eax 117194: 50 push %eax 117195: e8 6a 2f 00 00 call 11a104 <_Chain_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 11719a: 8b 7d e4 mov -0x1c(%ebp),%edi 11719d: 8b 47 08 mov 0x8(%edi),%eax 1171a0: 0f b7 f0 movzwl %ax,%esi 1171a3: 8b 15 1c 26 14 00 mov 0x14261c,%edx 1171a9: 89 3c b2 mov %edi,(%edx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1171ac: 89 5f 0c mov %ebx,0xc(%edi) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 1171af: 8b 55 1c mov 0x1c(%ebp),%edx 1171b2: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 1171b4: e8 77 4f 00 00 call 11c130 <_Thread_Enable_dispatch> 1171b9: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1171bb: 83 c4 10 add $0x10,%esp 1171be: e9 66 ff ff ff jmp 117129 1171c3: 90 nop _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 1171c4: e8 67 4f 00 00 call 11c130 <_Thread_Enable_dispatch> 1171c9: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 1171ce: e9 56 ff ff ff jmp 117129 =============================================================================== 00117240 : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 117240: 55 push %ebp 117241: 89 e5 mov %esp,%ebp 117243: 56 push %esi 117244: 53 push %ebx 117245: 83 ec 20 sub $0x20,%esp 117248: 8b 5d 0c mov 0xc(%ebp),%ebx register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 11724b: 85 db test %ebx,%ebx 11724d: 74 59 je 1172a8 RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 11724f: 52 push %edx 117250: 8d 45 f4 lea -0xc(%ebp),%eax 117253: 50 push %eax 117254: ff 75 08 pushl 0x8(%ebp) 117257: 68 00 26 14 00 push $0x142600 11725c: e8 1f 46 00 00 call 11b880 <_Objects_Get> 117261: 89 c6 mov %eax,%esi return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 117263: 83 c4 10 add $0x10,%esp 117266: 8b 45 f4 mov -0xc(%ebp),%eax 117269: 85 c0 test %eax,%eax 11726b: 75 2f jne 11729c */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 11726d: 83 ec 0c sub $0xc,%esp 117270: 8d 46 24 lea 0x24(%esi),%eax 117273: 50 push %eax 117274: e8 67 2e 00 00 call 11a0e0 <_Chain_Get> case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 117279: 83 c4 10 add $0x10,%esp 11727c: 85 c0 test %eax,%eax 11727e: 74 34 je 1172b4 the_partition->number_of_used_blocks += 1; 117280: ff 46 20 incl 0x20(%esi) _Thread_Enable_dispatch(); 117283: 89 45 e4 mov %eax,-0x1c(%ebp) 117286: e8 a5 4e 00 00 call 11c130 <_Thread_Enable_dispatch> *buffer = the_buffer; 11728b: 8b 45 e4 mov -0x1c(%ebp),%eax 11728e: 89 03 mov %eax,(%ebx) 117290: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117292: 8d 65 f8 lea -0x8(%ebp),%esp 117295: 5b pop %ebx 117296: 5e pop %esi 117297: c9 leave 117298: c3 ret 117299: 8d 76 00 lea 0x0(%esi),%esi if ( !buffer ) return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 11729c: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1172a1: 8d 65 f8 lea -0x8(%ebp),%esp 1172a4: 5b pop %ebx 1172a5: 5e pop %esi 1172a6: c9 leave 1172a7: c3 ret { register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 1172a8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1172ad: 8d 65 f8 lea -0x8(%ebp),%esp 1172b0: 5b pop %ebx 1172b1: 5e pop %esi 1172b2: c9 leave 1172b3: c3 ret the_partition->number_of_used_blocks += 1; _Thread_Enable_dispatch(); *buffer = the_buffer; return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 1172b4: e8 77 4e 00 00 call 11c130 <_Thread_Enable_dispatch> 1172b9: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 1172be: eb e1 jmp 1172a1 =============================================================================== 001172e4 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 1172e4: 55 push %ebp 1172e5: 89 e5 mov %esp,%ebp 1172e7: 56 push %esi 1172e8: 53 push %ebx 1172e9: 83 ec 14 sub $0x14,%esp 1172ec: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 1172ef: 8d 45 f4 lea -0xc(%ebp),%eax 1172f2: 50 push %eax 1172f3: ff 75 08 pushl 0x8(%ebp) 1172f6: 68 00 26 14 00 push $0x142600 1172fb: e8 80 45 00 00 call 11b880 <_Objects_Get> 117300: 89 c3 mov %eax,%ebx register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 117302: 83 c4 10 add $0x10,%esp 117305: 8b 45 f4 mov -0xc(%ebp),%eax 117308: 85 c0 test %eax,%eax 11730a: 74 0c je 117318 11730c: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117311: 8d 65 f8 lea -0x8(%ebp),%esp 117314: 5b pop %ebx 117315: 5e pop %esi 117316: c9 leave 117317: c3 ret ) { void *starting; void *ending; starting = the_partition->starting_address; 117318: 8b 43 10 mov 0x10(%ebx),%eax ending = _Addresses_Add_offset( starting, the_partition->length ); 11731b: 8b 53 14 mov 0x14(%ebx),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 11731e: 39 c6 cmp %eax,%esi 117320: 72 3a jb 11735c 117322: 8d 14 10 lea (%eax,%edx,1),%edx 117325: 39 d6 cmp %edx,%esi 117327: 77 33 ja 11735c <== NEVER TAKEN return ( 117329: 89 f2 mov %esi,%edx 11732b: 29 c2 sub %eax,%edx 11732d: 89 d0 mov %edx,%eax 11732f: 31 d2 xor %edx,%edx 117331: f7 73 18 divl 0x18(%ebx) 117334: 85 d2 test %edx,%edx 117336: 75 24 jne 11735c RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 117338: 83 ec 08 sub $0x8,%esp 11733b: 56 push %esi 11733c: 8d 43 24 lea 0x24(%ebx),%eax 11733f: 50 push %eax 117340: e8 5f 2d 00 00 call 11a0a4 <_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; 117345: ff 4b 20 decl 0x20(%ebx) _Thread_Enable_dispatch(); 117348: e8 e3 4d 00 00 call 11c130 <_Thread_Enable_dispatch> 11734d: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11734f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117352: 8d 65 f8 lea -0x8(%ebp),%esp 117355: 5b pop %ebx 117356: 5e pop %esi 117357: c9 leave 117358: c3 ret 117359: 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(); 11735c: e8 cf 4d 00 00 call 11c130 <_Thread_Enable_dispatch> 117361: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117366: 8d 65 f8 lea -0x8(%ebp),%esp 117369: 5b pop %ebx 11736a: 5e pop %esi 11736b: c9 leave 11736c: c3 ret =============================================================================== 00116720 : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 116720: 55 push %ebp 116721: 89 e5 mov %esp,%ebp 116723: 57 push %edi 116724: 56 push %esi 116725: 53 push %ebx 116726: 83 ec 1c sub $0x1c,%esp 116729: 8b 5d 08 mov 0x8(%ebp),%ebx 11672c: 8b 55 0c mov 0xc(%ebp),%edx 11672f: 8b 7d 10 mov 0x10(%ebp),%edi 116732: 8b 75 18 mov 0x18(%ebp),%esi register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 116735: 85 db test %ebx,%ebx 116737: 74 1b je 116754 return RTEMS_INVALID_NAME; if ( !id ) 116739: 85 f6 test %esi,%esi 11673b: 74 08 je 116745 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 11673d: 89 f8 mov %edi,%eax 11673f: 09 d0 or %edx,%eax 116741: a8 03 test $0x3,%al 116743: 74 1f je 116764 (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 116745: b8 09 00 00 00 mov $0x9,%eax } 11674a: 8d 65 f4 lea -0xc(%ebp),%esp 11674d: 5b pop %ebx 11674e: 5e pop %esi 11674f: 5f pop %edi 116750: c9 leave 116751: c3 ret 116752: 66 90 xchg %ax,%ax rtems_id *id ) { register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 116754: b8 03 00 00 00 mov $0x3,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 116759: 8d 65 f4 lea -0xc(%ebp),%esp 11675c: 5b pop %ebx 11675d: 5e pop %esi 11675e: 5f pop %edi 11675f: c9 leave 116760: c3 ret 116761: 8d 76 00 lea 0x0(%esi),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 116764: a1 78 27 14 00 mov 0x142778,%eax 116769: 40 inc %eax 11676a: a3 78 27 14 00 mov %eax,0x142778 * of free port control blocks. */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) 11676f: 83 ec 0c sub $0xc,%esp 116772: 68 c0 25 14 00 push $0x1425c0 116777: 89 55 e4 mov %edx,-0x1c(%ebp) 11677a: e8 15 4c 00 00 call 11b394 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 11677f: 83 c4 10 add $0x10,%esp 116782: 85 c0 test %eax,%eax 116784: 8b 55 e4 mov -0x1c(%ebp),%edx 116787: 74 33 je 1167bc _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 116789: 89 50 10 mov %edx,0x10(%eax) the_port->external_base = external_start; 11678c: 89 78 14 mov %edi,0x14(%eax) the_port->length = length - 1; 11678f: 8b 55 14 mov 0x14(%ebp),%edx 116792: 4a dec %edx 116793: 89 50 18 mov %edx,0x18(%eax) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 116796: 8b 50 08 mov 0x8(%eax),%edx 116799: 0f b7 fa movzwl %dx,%edi 11679c: 8b 0d dc 25 14 00 mov 0x1425dc,%ecx 1167a2: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1167a5: 89 58 0c mov %ebx,0xc(%eax) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 1167a8: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 1167aa: e8 81 59 00 00 call 11c130 <_Thread_Enable_dispatch> 1167af: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 1167b1: 8d 65 f4 lea -0xc(%ebp),%esp 1167b4: 5b pop %ebx 1167b5: 5e pop %esi 1167b6: 5f pop %edi 1167b7: c9 leave 1167b8: c3 ret 1167b9: 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(); 1167bc: e8 6f 59 00 00 call 11c130 <_Thread_Enable_dispatch> 1167c1: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 1167c6: eb 82 jmp 11674a =============================================================================== 001167c8 : */ rtems_status_code rtems_port_delete( rtems_id id ) { 1167c8: 55 push %ebp 1167c9: 89 e5 mov %esp,%ebp 1167cb: 83 ec 2c sub $0x2c,%esp RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 1167ce: 8d 45 f4 lea -0xc(%ebp),%eax 1167d1: 50 push %eax 1167d2: ff 75 08 pushl 0x8(%ebp) 1167d5: 68 c0 25 14 00 push $0x1425c0 1167da: e8 a1 50 00 00 call 11b880 <_Objects_Get> register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 1167df: 83 c4 10 add $0x10,%esp 1167e2: 8b 4d f4 mov -0xc(%ebp),%ecx 1167e5: 85 c9 test %ecx,%ecx 1167e7: 75 2f jne 116818 case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); 1167e9: 83 ec 08 sub $0x8,%esp 1167ec: 50 push %eax 1167ed: 68 c0 25 14 00 push $0x1425c0 1167f2: 89 45 e4 mov %eax,-0x1c(%ebp) 1167f5: e8 16 4c 00 00 call 11b410 <_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 ); 1167fa: 58 pop %eax 1167fb: 5a pop %edx 1167fc: 8b 45 e4 mov -0x1c(%ebp),%eax 1167ff: 50 push %eax 116800: 68 c0 25 14 00 push $0x1425c0 116805: e8 0a 4f 00 00 call 11b714 <_Objects_Free> _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 11680a: e8 21 59 00 00 call 11c130 <_Thread_Enable_dispatch> 11680f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116811: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116814: c9 leave 116815: c3 ret 116816: 66 90 xchg %ax,%ax { register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 116818: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11681d: c9 leave 11681e: c3 ret =============================================================================== 00116820 : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 116820: 55 push %ebp 116821: 89 e5 mov %esp,%ebp 116823: 56 push %esi 116824: 53 push %ebx 116825: 83 ec 10 sub $0x10,%esp 116828: 8b 75 0c mov 0xc(%ebp),%esi 11682b: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 11682e: 85 db test %ebx,%ebx 116830: 74 4e je 116880 RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 116832: 51 push %ecx 116833: 8d 45 f4 lea -0xc(%ebp),%eax 116836: 50 push %eax 116837: ff 75 08 pushl 0x8(%ebp) 11683a: 68 c0 25 14 00 push $0x1425c0 11683f: e8 3c 50 00 00 call 11b880 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 116844: 83 c4 10 add $0x10,%esp 116847: 8b 55 f4 mov -0xc(%ebp),%edx 11684a: 85 d2 test %edx,%edx 11684c: 74 0e je 11685c 11684e: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116853: 8d 65 f8 lea -0x8(%ebp),%esp 116856: 5b pop %ebx 116857: 5e pop %esi 116858: c9 leave 116859: c3 ret 11685a: 66 90 xchg %ax,%ax return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); 11685c: 89 f2 mov %esi,%edx 11685e: 2b 50 14 sub 0x14(%eax),%edx if ( ending > the_port->length ) 116861: 3b 50 18 cmp 0x18(%eax),%edx 116864: 77 16 ja 11687c *internal = external; else *internal = _Addresses_Add_offset( the_port->internal_base, 116866: 03 50 10 add 0x10(%eax),%edx 116869: 89 13 mov %edx,(%ebx) ending ); _Thread_Enable_dispatch(); 11686b: e8 c0 58 00 00 call 11c130 <_Thread_Enable_dispatch> 116870: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116872: 8d 65 f8 lea -0x8(%ebp),%esp 116875: 5b pop %ebx 116876: 5e pop %esi 116877: c9 leave 116878: c3 ret 116879: 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; 11687c: 89 33 mov %esi,(%ebx) 11687e: eb eb jmp 11686b { register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 116880: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116885: 8d 65 f8 lea -0x8(%ebp),%esp 116888: 5b pop %ebx 116889: 5e pop %esi 11688a: c9 leave 11688b: c3 ret =============================================================================== 001168b0 : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 1168b0: 55 push %ebp 1168b1: 89 e5 mov %esp,%ebp 1168b3: 56 push %esi 1168b4: 53 push %ebx 1168b5: 83 ec 10 sub $0x10,%esp 1168b8: 8b 75 0c mov 0xc(%ebp),%esi 1168bb: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 1168be: 85 db test %ebx,%ebx 1168c0: 74 4e je 116910 1168c2: 51 push %ecx 1168c3: 8d 45 f4 lea -0xc(%ebp),%eax 1168c6: 50 push %eax 1168c7: ff 75 08 pushl 0x8(%ebp) 1168ca: 68 c0 25 14 00 push $0x1425c0 1168cf: e8 ac 4f 00 00 call 11b880 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 1168d4: 83 c4 10 add $0x10,%esp 1168d7: 8b 55 f4 mov -0xc(%ebp),%edx 1168da: 85 d2 test %edx,%edx 1168dc: 74 0e je 1168ec 1168de: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1168e3: 8d 65 f8 lea -0x8(%ebp),%esp 1168e6: 5b pop %ebx 1168e7: 5e pop %esi 1168e8: c9 leave 1168e9: c3 ret 1168ea: 66 90 xchg %ax,%ax the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); 1168ec: 89 f2 mov %esi,%edx 1168ee: 2b 50 10 sub 0x10(%eax),%edx if ( ending > the_port->length ) 1168f1: 3b 50 18 cmp 0x18(%eax),%edx 1168f4: 77 16 ja 11690c *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, 1168f6: 03 50 14 add 0x14(%eax),%edx 1168f9: 89 13 mov %edx,(%ebx) ending ); _Thread_Enable_dispatch(); 1168fb: e8 30 58 00 00 call 11c130 <_Thread_Enable_dispatch> 116900: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116902: 8d 65 f8 lea -0x8(%ebp),%esp 116905: 5b pop %ebx 116906: 5e pop %esi 116907: c9 leave 116908: c3 ret 116909: 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; 11690c: 89 33 mov %esi,(%ebx) 11690e: eb eb jmp 1168fb { register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 116910: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116915: 8d 65 f8 lea -0x8(%ebp),%esp 116918: 5b pop %ebx 116919: 5e pop %esi 11691a: c9 leave 11691b: c3 ret =============================================================================== 00117370 : */ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { 117370: 55 push %ebp 117371: 89 e5 mov %esp,%ebp 117373: 53 push %ebx 117374: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 117377: 8d 45 f4 lea -0xc(%ebp),%eax 11737a: 50 push %eax 11737b: ff 75 08 pushl 0x8(%ebp) 11737e: 68 40 26 14 00 push $0x142640 117383: e8 f8 44 00 00 call 11b880 <_Objects_Get> 117388: 89 c3 mov %eax,%ebx Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 11738a: 83 c4 10 add $0x10,%esp 11738d: 8b 45 f4 mov -0xc(%ebp),%eax 117390: 85 c0 test %eax,%eax 117392: 74 0c je 1173a0 117394: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117399: 8b 5d fc mov -0x4(%ebp),%ebx 11739c: c9 leave 11739d: c3 ret 11739e: 66 90 xchg %ax,%ax the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 1173a0: 8b 43 40 mov 0x40(%ebx),%eax 1173a3: 3b 05 38 28 14 00 cmp 0x142838,%eax 1173a9: 74 11 je 1173bc _Thread_Enable_dispatch(); 1173ab: e8 80 4d 00 00 call 11c130 <_Thread_Enable_dispatch> 1173b0: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1173b5: 8b 5d fc mov -0x4(%ebp),%ebx 1173b8: c9 leave 1173b9: c3 ret 1173ba: 66 90 xchg %ax,%ax 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 ); 1173bc: 83 ec 0c sub $0xc,%esp 1173bf: 8d 43 10 lea 0x10(%ebx),%eax 1173c2: 50 push %eax 1173c3: e8 50 61 00 00 call 11d518 <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 1173c8: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) _Thread_Enable_dispatch(); 1173cf: e8 5c 4d 00 00 call 11c130 <_Thread_Enable_dispatch> 1173d4: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1173d6: 83 c4 10 add $0x10,%esp 1173d9: eb be jmp 117399 =============================================================================== 0010c96c : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 10c96c: 55 push %ebp 10c96d: 89 e5 mov %esp,%ebp 10c96f: 57 push %edi 10c970: 56 push %esi 10c971: 53 push %ebx 10c972: 83 ec 1c sub $0x1c,%esp 10c975: 8b 5d 08 mov 0x8(%ebp),%ebx 10c978: 8b 75 0c mov 0xc(%ebp),%esi Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10c97b: 85 db test %ebx,%ebx 10c97d: 0f 84 a9 00 00 00 je 10ca2c return RTEMS_INVALID_NAME; if ( !id ) 10c983: 85 f6 test %esi,%esi 10c985: 0f 84 c5 00 00 00 je 10ca50 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c98b: a1 78 a4 12 00 mov 0x12a478,%eax 10c990: 40 inc %eax 10c991: a3 78 a4 12 00 mov %eax,0x12a478 * This function allocates a period control block from * the inactive chain of free period control blocks. */ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void ) { return (Rate_monotonic_Control *) 10c996: 83 ec 0c sub $0xc,%esp 10c999: 68 80 a3 12 00 push $0x12a380 10c99e: e8 d1 1d 00 00 call 10e774 <_Objects_Allocate> 10c9a3: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 10c9a5: 83 c4 10 add $0x10,%esp 10c9a8: 85 c0 test %eax,%eax 10c9aa: 0f 84 8c 00 00 00 je 10ca3c _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 10c9b0: a1 38 a5 12 00 mov 0x12a538,%eax 10c9b5: 89 42 40 mov %eax,0x40(%edx) the_period->state = RATE_MONOTONIC_INACTIVE; 10c9b8: 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; 10c9bf: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 10c9c6: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx) the_watchdog->id = id; 10c9cd: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) the_watchdog->user_data = user_data; 10c9d4: 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 ); 10c9db: 8d 42 54 lea 0x54(%edx),%eax 10c9de: 89 45 e4 mov %eax,-0x1c(%ebp) 10c9e1: b9 38 00 00 00 mov $0x38,%ecx 10c9e6: 31 c0 xor %eax,%eax 10c9e8: 8b 7d e4 mov -0x1c(%ebp),%edi 10c9eb: f3 aa rep stos %al,%es:(%edi) 10c9ed: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10c9f4: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10c9fb: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10ca02: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10ca09: 8b 42 08 mov 0x8(%edx),%eax 10ca0c: 0f b7 f8 movzwl %ax,%edi 10ca0f: 8b 0d 9c a3 12 00 mov 0x12a39c,%ecx 10ca15: 89 14 b9 mov %edx,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10ca18: 89 5a 0c mov %ebx,0xc(%edx) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 10ca1b: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10ca1d: e8 0e 2b 00 00 call 10f530 <_Thread_Enable_dispatch> 10ca22: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10ca24: 8d 65 f4 lea -0xc(%ebp),%esp 10ca27: 5b pop %ebx 10ca28: 5e pop %esi 10ca29: 5f pop %edi 10ca2a: c9 leave 10ca2b: c3 ret rtems_id *id ) { Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10ca2c: b8 03 00 00 00 mov $0x3,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10ca31: 8d 65 f4 lea -0xc(%ebp),%esp 10ca34: 5b pop %ebx 10ca35: 5e pop %esi 10ca36: 5f pop %edi 10ca37: c9 leave 10ca38: c3 ret 10ca39: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { _Thread_Enable_dispatch(); 10ca3c: e8 ef 2a 00 00 call 10f530 <_Thread_Enable_dispatch> 10ca41: b8 05 00 00 00 mov $0x5,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10ca46: 8d 65 f4 lea -0xc(%ebp),%esp 10ca49: 5b pop %ebx 10ca4a: 5e pop %esi 10ca4b: 5f pop %edi 10ca4c: c9 leave 10ca4d: c3 ret 10ca4e: 66 90 xchg %ax,%ax Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10ca50: b8 09 00 00 00 mov $0x9,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10ca55: 8d 65 f4 lea -0xc(%ebp),%esp 10ca58: 5b pop %ebx 10ca59: 5e pop %esi 10ca5a: 5f pop %edi 10ca5b: c9 leave 10ca5c: c3 ret =============================================================================== 001436dc : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 1436dc: 55 push %ebp 1436dd: 89 e5 mov %esp,%ebp 1436df: 53 push %ebx 1436e0: 83 ec 24 sub $0x24,%esp 1436e3: 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 ) 1436e6: 85 db test %ebx,%ebx 1436e8: 0f 84 92 00 00 00 je 143780 1436ee: 50 push %eax 1436ef: 8d 45 f4 lea -0xc(%ebp),%eax 1436f2: 50 push %eax 1436f3: ff 75 08 pushl 0x8(%ebp) 1436f6: 68 c0 33 17 00 push $0x1733c0 1436fb: e8 24 14 fd ff call 114b24 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 143700: 83 c4 10 add $0x10,%esp 143703: 8b 4d f4 mov -0xc(%ebp),%ecx 143706: 85 c9 test %ecx,%ecx 143708: 74 0a je 143714 14370a: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 14370f: 8b 5d fc mov -0x4(%ebp),%ebx 143712: c9 leave 143713: c3 ret the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 143714: 8b 50 40 mov 0x40(%eax),%edx 143717: 8b 52 08 mov 0x8(%edx),%edx 14371a: 89 13 mov %edx,(%ebx) status->state = the_period->state; 14371c: 8b 50 38 mov 0x38(%eax),%edx 14371f: 89 53 04 mov %edx,0x4(%ebx) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 143722: 85 d2 test %edx,%edx 143724: 75 2a jne 143750 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 143726: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 14372d: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Timespec_Set_to_zero( &status->executed_since_last_period ); 143734: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) 14373b: 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(); 143742: e8 d5 1c fd ff call 11541c <_Thread_Enable_dispatch> 143747: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 143749: 8b 5d fc mov -0x4(%ebp),%ebx 14374c: c9 leave 14374d: c3 ret 14374e: 66 90 xchg %ax,%ax /* * Grab the current status. */ valid_status = _Rate_monotonic_Get_status( 143750: 52 push %edx 143751: 8d 55 ec lea -0x14(%ebp),%edx 143754: 52 push %edx 143755: 8d 55 e4 lea -0x1c(%ebp),%edx 143758: 52 push %edx 143759: 50 push %eax 14375a: e8 b1 00 00 00 call 143810 <_Rate_monotonic_Get_status> the_period, &since_last_period, &executed ); if (!valid_status) { 14375f: 83 c4 10 add $0x10,%esp 143762: 84 c0 test %al,%al 143764: 74 26 je 14378c _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 143766: 8b 45 e4 mov -0x1c(%ebp),%eax 143769: 8b 55 e8 mov -0x18(%ebp),%edx 14376c: 89 43 08 mov %eax,0x8(%ebx) 14376f: 89 53 0c mov %edx,0xc(%ebx) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 143772: 8b 45 ec mov -0x14(%ebp),%eax 143775: 8b 55 f0 mov -0x10(%ebp),%edx 143778: 89 43 10 mov %eax,0x10(%ebx) 14377b: 89 53 14 mov %edx,0x14(%ebx) 14377e: eb c2 jmp 143742 Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) 143780: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 143785: 8b 5d fc mov -0x4(%ebp),%ebx 143788: c9 leave 143789: c3 ret 14378a: 66 90 xchg %ax,%ax valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { _Thread_Enable_dispatch(); 14378c: e8 8b 1c fd ff call 11541c <_Thread_Enable_dispatch> 143791: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; 143796: e9 74 ff ff ff jmp 14370f =============================================================================== 00143998 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 143998: 55 push %ebp 143999: 89 e5 mov %esp,%ebp 14399b: 57 push %edi 14399c: 56 push %esi 14399d: 53 push %ebx 14399e: 83 ec 30 sub $0x30,%esp 1439a1: 8b 5d 08 mov 0x8(%ebp),%ebx 1439a4: 8b 75 0c mov 0xc(%ebp),%esi 1439a7: 8d 45 e4 lea -0x1c(%ebp),%eax 1439aa: 50 push %eax 1439ab: 53 push %ebx 1439ac: 68 c0 33 17 00 push $0x1733c0 1439b1: e8 6e 11 fd ff call 114b24 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 1439b6: 83 c4 10 add $0x10,%esp 1439b9: 8b 7d e4 mov -0x1c(%ebp),%edi 1439bc: 85 ff test %edi,%edi 1439be: 74 10 je 1439d0 the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 1439c0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1439c5: 8d 65 f4 lea -0xc(%ebp),%esp 1439c8: 5b pop %ebx 1439c9: 5e pop %esi 1439ca: 5f pop %edi 1439cb: c9 leave 1439cc: c3 ret 1439cd: 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 ) ) { 1439d0: 8b 50 40 mov 0x40(%eax),%edx 1439d3: 3b 15 78 2f 17 00 cmp 0x172f78,%edx 1439d9: 74 15 je 1439f0 _Thread_Enable_dispatch(); 1439db: e8 3c 1a fd ff call 11541c <_Thread_Enable_dispatch> 1439e0: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1439e5: 8d 65 f4 lea -0xc(%ebp),%esp 1439e8: 5b pop %ebx 1439e9: 5e pop %esi 1439ea: 5f pop %edi 1439eb: c9 leave 1439ec: c3 ret 1439ed: 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 ) { 1439f0: 85 f6 test %esi,%esi 1439f2: 0f 84 b0 00 00 00 je 143aa8 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 1439f8: 9c pushf 1439f9: fa cli 1439fa: 5f pop %edi switch ( the_period->state ) { 1439fb: 8b 50 38 mov 0x38(%eax),%edx 1439fe: 83 fa 02 cmp $0x2,%edx 143a01: 0f 84 bd 00 00 00 je 143ac4 143a07: 83 fa 04 cmp $0x4,%edx 143a0a: 74 5c je 143a68 143a0c: 85 d2 test %edx,%edx 143a0e: 75 b0 jne 1439c0 <== NEVER TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 143a10: 57 push %edi 143a11: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 143a12: 83 ec 0c sub $0xc,%esp 143a15: 50 push %eax 143a16: 89 45 d4 mov %eax,-0x2c(%ebp) 143a19: e8 7e fd ff ff call 14379c <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 143a1e: 8b 45 d4 mov -0x2c(%ebp),%eax 143a21: 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; 143a28: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 143a2f: c7 40 2c 48 3b 14 00 movl $0x143b48,0x2c(%eax) the_watchdog->id = id; 143a36: 89 58 30 mov %ebx,0x30(%eax) the_watchdog->user_data = user_data; 143a39: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 143a40: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 143a43: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 143a46: 5a pop %edx 143a47: 59 pop %ecx 143a48: 83 c0 10 add $0x10,%eax 143a4b: 50 push %eax 143a4c: 68 98 2f 17 00 push $0x172f98 143a51: e8 f2 28 fd ff call 116348 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 143a56: e8 c1 19 fd ff call 11541c <_Thread_Enable_dispatch> 143a5b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 143a5d: 83 c4 10 add $0x10,%esp 143a60: e9 60 ff ff ff jmp 1439c5 143a65: 8d 76 00 lea 0x0(%esi),%esi case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 143a68: 83 ec 0c sub $0xc,%esp 143a6b: 50 push %eax 143a6c: 89 45 d4 mov %eax,-0x2c(%ebp) 143a6f: e8 34 fe ff ff call 1438a8 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 143a74: 57 push %edi 143a75: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 143a76: 8b 45 d4 mov -0x2c(%ebp),%eax 143a79: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) the_period->next_length = length; 143a80: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 143a83: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 143a86: 59 pop %ecx 143a87: 5b pop %ebx 143a88: 83 c0 10 add $0x10,%eax 143a8b: 50 push %eax 143a8c: 68 98 2f 17 00 push $0x172f98 143a91: e8 b2 28 fd ff call 116348 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 143a96: e8 81 19 fd ff call 11541c <_Thread_Enable_dispatch> 143a9b: b8 06 00 00 00 mov $0x6,%eax return RTEMS_TIMEOUT; 143aa0: 83 c4 10 add $0x10,%esp 143aa3: e9 1d ff ff ff jmp 1439c5 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 143aa8: 8b 40 38 mov 0x38(%eax),%eax 143aab: 83 f8 04 cmp $0x4,%eax 143aae: 76 74 jbe 143b24 <== ALWAYS TAKEN 143ab0: 31 c0 xor %eax,%eax case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 143ab2: 89 45 d4 mov %eax,-0x2c(%ebp) 143ab5: e8 62 19 fd ff call 11541c <_Thread_Enable_dispatch> return( return_value ); 143aba: 8b 45 d4 mov -0x2c(%ebp),%eax 143abd: e9 03 ff ff ff jmp 1439c5 143ac2: 66 90 xchg %ax,%ax case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 143ac4: 83 ec 0c sub $0xc,%esp 143ac7: 50 push %eax 143ac8: 89 45 d4 mov %eax,-0x2c(%ebp) 143acb: e8 d8 fd ff ff call 1438a8 <_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; 143ad0: 8b 45 d4 mov -0x2c(%ebp),%eax 143ad3: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) the_period->next_length = length; 143ada: 89 70 3c mov %esi,0x3c(%eax) _ISR_Enable( level ); 143add: 57 push %edi 143ade: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 143adf: 8b 15 78 2f 17 00 mov 0x172f78,%edx 143ae5: 8b 48 08 mov 0x8(%eax),%ecx 143ae8: 89 4a 20 mov %ecx,0x20(%edx) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 143aeb: 5e pop %esi 143aec: 5f pop %edi 143aed: 68 00 40 00 00 push $0x4000 143af2: 52 push %edx 143af3: 89 45 d4 mov %eax,-0x2c(%ebp) 143af6: e8 fd 21 fd ff call 115cf8 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 143afb: 9c pushf 143afc: fa cli 143afd: 59 pop %ecx local_state = the_period->state; 143afe: 8b 45 d4 mov -0x2c(%ebp),%eax 143b01: 8b 50 38 mov 0x38(%eax),%edx the_period->state = RATE_MONOTONIC_ACTIVE; 143b04: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) _ISR_Enable( level ); 143b0b: 51 push %ecx 143b0c: 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 ) 143b0d: 83 c4 10 add $0x10,%esp 143b10: 83 fa 03 cmp $0x3,%edx 143b13: 74 18 je 143b2d _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 143b15: e8 02 19 fd ff call 11541c <_Thread_Enable_dispatch> 143b1a: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 143b1c: e9 a4 fe ff ff jmp 1439c5 143b21: 8d 76 00 lea 0x0(%esi),%esi _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 143b24: 8b 04 85 4c 85 16 00 mov 0x16854c(,%eax,4),%eax 143b2b: eb 85 jmp 143ab2 /* * 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 ); 143b2d: 83 ec 08 sub $0x8,%esp 143b30: 68 00 40 00 00 push $0x4000 143b35: ff 35 78 2f 17 00 pushl 0x172f78 143b3b: e8 34 15 fd ff call 115074 <_Thread_Clear_state> 143b40: 83 c4 10 add $0x10,%esp 143b43: eb d0 jmp 143b15 =============================================================================== 00130434 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 130434: 55 push %ebp 130435: 89 e5 mov %esp,%ebp 130437: 57 push %edi 130438: 56 push %esi 130439: 53 push %ebx 13043a: 83 ec 7c sub $0x7c,%esp 13043d: 8b 7d 08 mov 0x8(%ebp),%edi 130440: 8b 75 0c mov 0xc(%ebp),%esi rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 130443: 85 f6 test %esi,%esi 130445: 0f 84 bd 00 00 00 je 130508 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 13044b: 83 ec 08 sub $0x8,%esp 13044e: 68 88 49 16 00 push $0x164988 130453: 57 push %edi 130454: ff d6 call *%esi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 130456: 59 pop %ecx 130457: 5b pop %ebx 130458: 68 c0 49 16 00 push $0x1649c0 13045d: 57 push %edi 13045e: ff d6 call *%esi (*print)( context, "--- Wall times are in seconds ---\n" ); 130460: 58 pop %eax 130461: 5a pop %edx 130462: 68 e4 49 16 00 push $0x1649e4 130467: 57 push %edi 130468: ff d6 call *%esi Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 13046a: 59 pop %ecx 13046b: 5b pop %ebx 13046c: 68 08 4a 16 00 push $0x164a08 130471: 57 push %edi 130472: ff d6 call *%esi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 130474: 58 pop %eax 130475: 5a pop %edx 130476: 68 54 4a 16 00 push $0x164a54 13047b: 57 push %edi 13047c: ff d6 call *%esi /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 13047e: 8b 1d c8 33 17 00 mov 0x1733c8,%ebx 130484: 83 c4 10 add $0x10,%esp 130487: 3b 1d cc 33 17 00 cmp 0x1733cc,%ebx 13048d: 77 79 ja 130508 <== NEVER TAKEN 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); 13048f: 89 75 84 mov %esi,-0x7c(%ebp) 130492: eb 09 jmp 13049d * 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++ ) { 130494: 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 ; 130495: 39 1d cc 33 17 00 cmp %ebx,0x1733cc 13049b: 72 6b jb 130508 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 13049d: 83 ec 08 sub $0x8,%esp 1304a0: 8d 45 88 lea -0x78(%ebp),%eax 1304a3: 50 push %eax 1304a4: 53 push %ebx 1304a5: e8 86 31 01 00 call 143630 if ( status != RTEMS_SUCCESSFUL ) 1304aa: 83 c4 10 add $0x10,%esp 1304ad: 85 c0 test %eax,%eax 1304af: 75 e3 jne 130494 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 1304b1: 83 ec 08 sub $0x8,%esp 1304b4: 8d 55 c0 lea -0x40(%ebp),%edx 1304b7: 52 push %edx 1304b8: 53 push %ebx 1304b9: e8 1e 32 01 00 call 1436dc #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 1304be: 83 c4 0c add $0xc,%esp 1304c1: 8d 45 e3 lea -0x1d(%ebp),%eax 1304c4: 50 push %eax 1304c5: 6a 05 push $0x5 1304c7: ff 75 c0 pushl -0x40(%ebp) 1304ca: e8 49 27 fe ff call 112c18 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 1304cf: 59 pop %ecx 1304d0: 5e pop %esi 1304d1: ff 75 8c pushl -0x74(%ebp) 1304d4: ff 75 88 pushl -0x78(%ebp) 1304d7: 8d 55 e3 lea -0x1d(%ebp),%edx 1304da: 52 push %edx 1304db: 53 push %ebx 1304dc: 68 a6 49 16 00 push $0x1649a6 1304e1: 57 push %edi 1304e2: ff 55 84 call *-0x7c(%ebp) ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 1304e5: 8b 45 88 mov -0x78(%ebp),%eax 1304e8: 83 c4 20 add $0x20,%esp 1304eb: 85 c0 test %eax,%eax 1304ed: 75 21 jne 130510 (*print)( context, "\n" ); 1304ef: 83 ec 08 sub $0x8,%esp 1304f2: 68 89 67 16 00 push $0x166789 1304f7: 57 push %edi 1304f8: ff 55 84 call *-0x7c(%ebp) continue; 1304fb: 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++ ) { 1304fe: 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 ; 1304ff: 39 1d cc 33 17 00 cmp %ebx,0x1733cc 130505: 73 96 jae 13049d <== ALWAYS TAKEN 130507: 90 nop the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 130508: 8d 65 f4 lea -0xc(%ebp),%esp 13050b: 5b pop %ebx 13050c: 5e pop %esi 13050d: 5f pop %edi 13050e: c9 leave 13050f: 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 ); 130510: 52 push %edx 130511: 8d 55 d8 lea -0x28(%ebp),%edx 130514: 52 push %edx 130515: 50 push %eax 130516: 8d 45 a0 lea -0x60(%ebp),%eax 130519: 50 push %eax 13051a: e8 fd 13 00 00 call 13191c <_Timespec_Divide_by_integer> (*print)( context, 13051f: 8b 4d dc mov -0x24(%ebp),%ecx 130522: be d3 4d 62 10 mov $0x10624dd3,%esi 130527: 89 c8 mov %ecx,%eax 130529: f7 ee imul %esi 13052b: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 130531: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 130537: c1 f8 06 sar $0x6,%eax 13053a: c1 f9 1f sar $0x1f,%ecx 13053d: 29 c8 sub %ecx,%eax 13053f: 50 push %eax 130540: ff 75 d8 pushl -0x28(%ebp) 130543: 8b 4d 9c mov -0x64(%ebp),%ecx 130546: 89 c8 mov %ecx,%eax 130548: f7 ee imul %esi 13054a: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 130550: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 130556: c1 f8 06 sar $0x6,%eax 130559: c1 f9 1f sar $0x1f,%ecx 13055c: 29 c8 sub %ecx,%eax 13055e: 50 push %eax 13055f: ff 75 98 pushl -0x68(%ebp) 130562: 8b 4d 94 mov -0x6c(%ebp),%ecx 130565: 89 c8 mov %ecx,%eax 130567: f7 ee imul %esi 130569: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) 13056f: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 130575: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 13057b: c1 f8 06 sar $0x6,%eax 13057e: c1 f9 1f sar $0x1f,%ecx 130581: 29 c8 sub %ecx,%eax 130583: 50 push %eax 130584: ff 75 90 pushl -0x70(%ebp) 130587: 68 a0 4a 16 00 push $0x164aa0 13058c: 57 push %edi 13058d: ff 55 84 call *-0x7c(%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); 130590: 83 c4 2c add $0x2c,%esp 130593: 8d 55 d8 lea -0x28(%ebp),%edx 130596: 52 push %edx 130597: ff 75 88 pushl -0x78(%ebp) 13059a: 8d 45 b8 lea -0x48(%ebp),%eax 13059d: 50 push %eax 13059e: e8 79 13 00 00 call 13191c <_Timespec_Divide_by_integer> (*print)( context, 1305a3: 8b 4d dc mov -0x24(%ebp),%ecx 1305a6: 89 c8 mov %ecx,%eax 1305a8: f7 ee imul %esi 1305aa: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 1305b0: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 1305b6: c1 f8 06 sar $0x6,%eax 1305b9: c1 f9 1f sar $0x1f,%ecx 1305bc: 29 c8 sub %ecx,%eax 1305be: 50 push %eax 1305bf: ff 75 d8 pushl -0x28(%ebp) 1305c2: 8b 4d b4 mov -0x4c(%ebp),%ecx 1305c5: 89 c8 mov %ecx,%eax 1305c7: f7 ee imul %esi 1305c9: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 1305cf: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 1305d5: c1 f8 06 sar $0x6,%eax 1305d8: c1 f9 1f sar $0x1f,%ecx 1305db: 29 c8 sub %ecx,%eax 1305dd: 50 push %eax 1305de: ff 75 b0 pushl -0x50(%ebp) 1305e1: 8b 4d ac mov -0x54(%ebp),%ecx 1305e4: 89 c8 mov %ecx,%eax 1305e6: f7 ee imul %esi 1305e8: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) 1305ee: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 1305f4: 8b b5 7c ff ff ff mov -0x84(%ebp),%esi 1305fa: c1 fe 06 sar $0x6,%esi 1305fd: 89 c8 mov %ecx,%eax 1305ff: 99 cltd 130600: 29 d6 sub %edx,%esi 130602: 56 push %esi 130603: ff 75 a8 pushl -0x58(%ebp) 130606: 68 c0 4a 16 00 push $0x164ac0 13060b: 57 push %edi 13060c: ff 55 84 call *-0x7c(%ebp) 13060f: 83 c4 30 add $0x30,%esp 130612: e9 7d fe ff ff jmp 130494 =============================================================================== 00130630 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 130630: 55 push %ebp 130631: 89 e5 mov %esp,%ebp 130633: 53 push %ebx 130634: 83 ec 04 sub $0x4,%esp 130637: a1 b8 2e 17 00 mov 0x172eb8,%eax 13063c: 40 inc %eax 13063d: a3 b8 2e 17 00 mov %eax,0x172eb8 /* * 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 ; 130642: 8b 1d c8 33 17 00 mov 0x1733c8,%ebx 130648: 3b 1d cc 33 17 00 cmp 0x1733cc,%ebx 13064e: 77 15 ja 130665 <== NEVER TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 130650: 83 ec 0c sub $0xc,%esp 130653: 53 push %ebx 130654: e8 17 00 00 00 call 130670 * 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++ ) { 130659: 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 ; 13065a: 83 c4 10 add $0x10,%esp 13065d: 39 1d cc 33 17 00 cmp %ebx,0x1733cc 130663: 73 eb jae 130650 /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 130665: 8b 5d fc mov -0x4(%ebp),%ebx 130668: c9 leave } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 130669: e9 ae 4d fe ff jmp 11541c <_Thread_Enable_dispatch> =============================================================================== 00130670 : */ rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id ) { 130670: 55 push %ebp 130671: 89 e5 mov %esp,%ebp 130673: 57 push %edi 130674: 53 push %ebx 130675: 83 ec 14 sub $0x14,%esp RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 130678: 8d 45 f4 lea -0xc(%ebp),%eax 13067b: 50 push %eax 13067c: ff 75 08 pushl 0x8(%ebp) 13067f: 68 c0 33 17 00 push $0x1733c0 130684: e8 9b 44 fe ff call 114b24 <_Objects_Get> 130689: 89 c2 mov %eax,%edx Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 13068b: 83 c4 10 add $0x10,%esp 13068e: 8b 45 f4 mov -0xc(%ebp),%eax 130691: 85 c0 test %eax,%eax 130693: 75 3b jne 1306d0 case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 130695: 8d 5a 54 lea 0x54(%edx),%ebx 130698: b9 38 00 00 00 mov $0x38,%ecx 13069d: 31 c0 xor %eax,%eax 13069f: 89 df mov %ebx,%edi 1306a1: f3 aa rep stos %al,%es:(%edi) 1306a3: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 1306aa: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 1306b1: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 1306b8: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) _Thread_Enable_dispatch(); 1306bf: e8 58 4d fe ff call 11541c <_Thread_Enable_dispatch> 1306c4: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1306c6: 8d 65 f8 lea -0x8(%ebp),%esp 1306c9: 5b pop %ebx 1306ca: 5f pop %edi 1306cb: c9 leave 1306cc: c3 ret 1306cd: 8d 76 00 lea 0x0(%esi),%esi { Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 1306d0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1306d5: 8d 65 f8 lea -0x8(%ebp),%esp 1306d8: 5b pop %ebx 1306d9: 5f pop %edi 1306da: c9 leave 1306db: c3 ret =============================================================================== 00117b14 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 117b14: 55 push %ebp 117b15: 89 e5 mov %esp,%ebp 117b17: 57 push %edi 117b18: 56 push %esi 117b19: 53 push %ebx 117b1a: 83 ec 1c sub $0x1c,%esp 117b1d: 8b 75 08 mov 0x8(%ebp),%esi 117b20: 8b 5d 0c mov 0xc(%ebp),%ebx 117b23: 8b 7d 1c mov 0x1c(%ebp),%edi rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 117b26: 85 f6 test %esi,%esi 117b28: 0f 84 92 00 00 00 je 117bc0 return RTEMS_INVALID_NAME; if ( !starting_address ) 117b2e: 85 db test %ebx,%ebx 117b30: 74 09 je 117b3b return RTEMS_INVALID_ADDRESS; if ( !id ) 117b32: 85 ff test %edi,%edi 117b34: 74 05 je 117b3b return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 117b36: f6 c3 03 test $0x3,%bl 117b39: 74 0d je 117b48 return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); return return_status; 117b3b: b8 09 00 00 00 mov $0x9,%eax } 117b40: 8d 65 f4 lea -0xc(%ebp),%esp 117b43: 5b pop %ebx 117b44: 5e pop %esi 117b45: 5f pop %edi 117b46: c9 leave 117b47: c3 ret return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 117b48: 83 ec 0c sub $0xc,%esp 117b4b: ff 35 30 28 14 00 pushl 0x142830 117b51: e8 d6 24 00 00 call 11a02c <_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 ); 117b56: c7 04 24 80 26 14 00 movl $0x142680,(%esp) 117b5d: e8 32 38 00 00 call 11b394 <_Objects_Allocate> 117b62: 89 c2 mov %eax,%edx the_region = _Region_Allocate(); if ( !the_region ) 117b64: 83 c4 10 add $0x10,%esp 117b67: 85 c0 test %eax,%eax 117b69: 74 65 je 117bd0 return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 117b6b: ff 75 14 pushl 0x14(%ebp) 117b6e: ff 75 10 pushl 0x10(%ebp) 117b71: 53 push %ebx 117b72: 8d 40 68 lea 0x68(%eax),%eax 117b75: 50 push %eax 117b76: 89 55 e4 mov %edx,-0x1c(%ebp) 117b79: e8 fa 32 00 00 call 11ae78 <_Heap_Initialize> 117b7e: 8b 55 e4 mov -0x1c(%ebp),%edx 117b81: 89 42 5c mov %eax,0x5c(%edx) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 117b84: 83 c4 10 add $0x10,%esp 117b87: 85 c0 test %eax,%eax 117b89: 75 4d jne 117bd8 */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 117b8b: 83 ec 08 sub $0x8,%esp 117b8e: 52 push %edx 117b8f: 68 80 26 14 00 push $0x142680 117b94: e8 7b 3b 00 00 call 11b714 <_Objects_Free> 117b99: b8 08 00 00 00 mov $0x8,%eax 117b9e: 83 c4 10 add $0x10,%esp *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 117ba1: 83 ec 0c sub $0xc,%esp 117ba4: ff 35 30 28 14 00 pushl 0x142830 117baa: 89 45 e4 mov %eax,-0x1c(%ebp) 117bad: e8 c2 24 00 00 call 11a074 <_API_Mutex_Unlock> return return_status; 117bb2: 83 c4 10 add $0x10,%esp 117bb5: 8b 45 e4 mov -0x1c(%ebp),%eax } 117bb8: 8d 65 f4 lea -0xc(%ebp),%esp 117bbb: 5b pop %ebx 117bbc: 5e pop %esi 117bbd: 5f pop %edi 117bbe: c9 leave 117bbf: c3 ret ) { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 117bc0: b8 03 00 00 00 mov $0x3,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 117bc5: 8d 65 f4 lea -0xc(%ebp),%esp 117bc8: 5b pop %ebx 117bc9: 5e pop %esi 117bca: 5f pop %edi 117bcb: c9 leave 117bcc: c3 ret 117bcd: 8d 76 00 lea 0x0(%esi),%esi _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region ) 117bd0: b8 05 00 00 00 mov $0x5,%eax 117bd5: eb ca jmp 117ba1 117bd7: 90 nop return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 117bd8: 89 5a 50 mov %ebx,0x50(%edx) the_region->length = length; 117bdb: 8b 45 10 mov 0x10(%ebp),%eax 117bde: 89 42 54 mov %eax,0x54(%edx) the_region->page_size = page_size; 117be1: 8b 45 14 mov 0x14(%ebp),%eax 117be4: 89 42 58 mov %eax,0x58(%edx) the_region->attribute_set = attribute_set; 117be7: 8b 45 18 mov 0x18(%ebp),%eax 117bea: 89 42 60 mov %eax,0x60(%edx) the_region->number_of_used_blocks = 0; 117bed: c7 42 64 00 00 00 00 movl $0x0,0x64(%edx) _Thread_queue_Initialize( 117bf4: 6a 06 push $0x6 117bf6: 6a 40 push $0x40 117bf8: 8b 45 18 mov 0x18(%ebp),%eax 117bfb: c1 e8 02 shr $0x2,%eax 117bfe: 83 e0 01 and $0x1,%eax 117c01: 50 push %eax 117c02: 8d 42 10 lea 0x10(%edx),%eax 117c05: 50 push %eax 117c06: 89 55 e4 mov %edx,-0x1c(%ebp) 117c09: e8 aa 4c 00 00 call 11c8b8 <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 117c0e: 8b 55 e4 mov -0x1c(%ebp),%edx 117c11: 8b 42 08 mov 0x8(%edx),%eax 117c14: 0f b7 d8 movzwl %ax,%ebx 117c17: 8b 0d 9c 26 14 00 mov 0x14269c,%ecx 117c1d: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 117c20: 89 72 0c mov %esi,0xc(%edx) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 117c23: 89 07 mov %eax,(%edi) 117c25: 31 c0 xor %eax,%eax 117c27: 83 c4 10 add $0x10,%esp 117c2a: e9 72 ff ff ff jmp 117ba1 =============================================================================== 00117c30 : */ rtems_status_code rtems_region_delete( rtems_id id ) { 117c30: 55 push %ebp 117c31: 89 e5 mov %esp,%ebp 117c33: 53 push %ebx 117c34: 83 ec 30 sub $0x30,%esp Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 117c37: ff 35 30 28 14 00 pushl 0x142830 117c3d: e8 ea 23 00 00 call 11a02c <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 117c42: 83 c4 0c add $0xc,%esp 117c45: 8d 45 f4 lea -0xc(%ebp),%eax 117c48: 50 push %eax 117c49: ff 75 08 pushl 0x8(%ebp) 117c4c: 68 80 26 14 00 push $0x142680 117c51: e8 ee 3b 00 00 call 11b844 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 117c56: 83 c4 10 add $0x10,%esp 117c59: 8b 5d f4 mov -0xc(%ebp),%ebx 117c5c: 85 db test %ebx,%ebx 117c5e: 74 1c je 117c7c 117c60: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117c65: 83 ec 0c sub $0xc,%esp 117c68: ff 35 30 28 14 00 pushl 0x142830 117c6e: e8 01 24 00 00 call 11a074 <_API_Mutex_Unlock> return return_status; } 117c73: 89 d8 mov %ebx,%eax 117c75: 8b 5d fc mov -0x4(%ebp),%ebx 117c78: c9 leave 117c79: c3 ret 117c7a: 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 ) 117c7c: 8b 48 64 mov 0x64(%eax),%ecx 117c7f: 85 c9 test %ecx,%ecx 117c81: 74 09 je 117c8c 117c83: bb 0c 00 00 00 mov $0xc,%ebx 117c88: eb db jmp 117c65 117c8a: 66 90 xchg %ax,%ax return_status = RTEMS_RESOURCE_IN_USE; else { _Objects_Close( &_Region_Information, &the_region->Object ); 117c8c: 83 ec 08 sub $0x8,%esp 117c8f: 50 push %eax 117c90: 68 80 26 14 00 push $0x142680 117c95: 89 45 e4 mov %eax,-0x1c(%ebp) 117c98: e8 73 37 00 00 call 11b410 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 117c9d: 58 pop %eax 117c9e: 5a pop %edx 117c9f: 8b 45 e4 mov -0x1c(%ebp),%eax 117ca2: 50 push %eax 117ca3: 68 80 26 14 00 push $0x142680 117ca8: e8 67 3a 00 00 call 11b714 <_Objects_Free> 117cad: 31 db xor %ebx,%ebx 117caf: 83 c4 10 add $0x10,%esp 117cb2: eb b1 jmp 117c65 =============================================================================== 00117cb4 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 117cb4: 55 push %ebp 117cb5: 89 e5 mov %esp,%ebp 117cb7: 56 push %esi 117cb8: 53 push %ebx 117cb9: 83 ec 10 sub $0x10,%esp 117cbc: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 117cbf: 85 db test %ebx,%ebx 117cc1: 74 71 je 117d34 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 117cc3: 83 ec 0c sub $0xc,%esp 117cc6: ff 35 30 28 14 00 pushl 0x142830 117ccc: e8 5b 23 00 00 call 11a02c <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 117cd1: 83 c4 0c add $0xc,%esp 117cd4: 8d 45 f0 lea -0x10(%ebp),%eax 117cd7: 50 push %eax 117cd8: ff 75 08 pushl 0x8(%ebp) 117cdb: 68 80 26 14 00 push $0x142680 117ce0: e8 5f 3b 00 00 call 11b844 <_Objects_Get_no_protection> 117ce5: 89 c6 mov %eax,%esi the_region = _Region_Get( id, &location ); switch ( location ) { 117ce7: 83 c4 10 add $0x10,%esp 117cea: 8b 45 f0 mov -0x10(%ebp),%eax 117ced: 85 c0 test %eax,%eax 117cef: 74 1f je 117d10 117cf1: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117cf6: 83 ec 0c sub $0xc,%esp 117cf9: ff 35 30 28 14 00 pushl 0x142830 117cff: e8 70 23 00 00 call 11a074 <_API_Mutex_Unlock> return return_status; 117d04: 83 c4 10 add $0x10,%esp } 117d07: 89 d8 mov %ebx,%eax 117d09: 8d 65 f8 lea -0x8(%ebp),%esp 117d0c: 5b pop %ebx 117d0d: 5e pop %esi 117d0e: c9 leave 117d0f: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: heap_status = _Heap_Extend( 117d10: 8d 45 f4 lea -0xc(%ebp),%eax 117d13: 50 push %eax 117d14: ff 75 10 pushl 0x10(%ebp) 117d17: 53 push %ebx 117d18: 8d 46 68 lea 0x68(%esi),%eax 117d1b: 50 push %eax 117d1c: e8 5f 2e 00 00 call 11ab80 <_Heap_Extend> starting_address, length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { 117d21: 83 c4 10 add $0x10,%esp 117d24: 85 c0 test %eax,%eax 117d26: 74 18 je 117d40 the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 117d28: 48 dec %eax 117d29: 74 25 je 117d50 117d2b: bb 18 00 00 00 mov $0x18,%ebx 117d30: eb c4 jmp 117cf6 117d32: 66 90 xchg %ax,%ax Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 117d34: b3 09 mov $0x9,%bl break; } _RTEMS_Unlock_allocator(); return return_status; } 117d36: 89 d8 mov %ebx,%eax 117d38: 8d 65 f8 lea -0x8(%ebp),%esp 117d3b: 5b pop %ebx 117d3c: 5e pop %esi 117d3d: c9 leave 117d3e: c3 ret 117d3f: 90 nop length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; 117d40: 8b 45 f4 mov -0xc(%ebp),%eax 117d43: 01 46 54 add %eax,0x54(%esi) the_region->maximum_segment_size += amount_extended; 117d46: 01 46 5c add %eax,0x5c(%esi) 117d49: 31 db xor %ebx,%ebx 117d4b: eb a9 jmp 117cf6 117d4d: 8d 76 00 lea 0x0(%esi),%esi return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 117d50: bb 09 00 00 00 mov $0x9,%ebx 117d55: eb 9f jmp 117cf6 =============================================================================== 00117d58 : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { 117d58: 55 push %ebp 117d59: 89 e5 mov %esp,%ebp 117d5b: 53 push %ebx 117d5c: 83 ec 14 sub $0x14,%esp 117d5f: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 117d62: 85 db test %ebx,%ebx 117d64: 74 76 je 117ddc return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 117d66: 83 ec 0c sub $0xc,%esp 117d69: ff 35 30 28 14 00 pushl 0x142830 117d6f: e8 b8 22 00 00 call 11a02c <_API_Mutex_Lock> 117d74: 83 c4 0c add $0xc,%esp 117d77: 8d 45 f4 lea -0xc(%ebp),%eax 117d7a: 50 push %eax 117d7b: ff 75 08 pushl 0x8(%ebp) 117d7e: 68 80 26 14 00 push $0x142680 117d83: e8 bc 3a 00 00 call 11b844 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 117d88: 83 c4 10 add $0x10,%esp 117d8b: 8b 55 f4 mov -0xc(%ebp),%edx 117d8e: 85 d2 test %edx,%edx 117d90: 74 1e je 117db0 117d92: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117d97: 83 ec 0c sub $0xc,%esp 117d9a: ff 35 30 28 14 00 pushl 0x142830 117da0: e8 cf 22 00 00 call 11a074 <_API_Mutex_Unlock> return return_status; 117da5: 83 c4 10 add $0x10,%esp } 117da8: 89 d8 mov %ebx,%eax 117daa: 8b 5d fc mov -0x4(%ebp),%ebx 117dad: c9 leave 117dae: c3 ret 117daf: 90 nop the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; 117db0: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) the_info->Used.total = 0; 117db7: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) the_info->Used.largest = 0; 117dbe: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 117dc5: 83 ec 08 sub $0x8,%esp 117dc8: 53 push %ebx 117dc9: 83 c0 68 add $0x68,%eax 117dcc: 50 push %eax 117dcd: e8 be 2f 00 00 call 11ad90 <_Heap_Get_free_information> 117dd2: 31 db xor %ebx,%ebx return_status = RTEMS_SUCCESSFUL; break; 117dd4: 83 c4 10 add $0x10,%esp 117dd7: eb be jmp 117d97 117dd9: 8d 76 00 lea 0x0(%esi),%esi { Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 117ddc: b3 09 mov $0x9,%bl break; } _RTEMS_Unlock_allocator(); return return_status; } 117dde: 89 d8 mov %ebx,%eax 117de0: 8b 5d fc mov -0x4(%ebp),%ebx 117de3: c9 leave 117de4: c3 ret =============================================================================== 00117e60 : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 117e60: 55 push %ebp 117e61: 89 e5 mov %esp,%ebp 117e63: 57 push %edi 117e64: 56 push %esi 117e65: 53 push %ebx 117e66: 83 ec 2c sub $0x2c,%esp 117e69: 8b 75 0c mov 0xc(%ebp),%esi 117e6c: 8b 5d 18 mov 0x18(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 117e6f: 85 db test %ebx,%ebx 117e71: 0f 84 a1 00 00 00 je 117f18 return RTEMS_INVALID_ADDRESS; *segment = NULL; 117e77: c7 03 00 00 00 00 movl $0x0,(%ebx) if ( size == 0 ) 117e7d: 85 f6 test %esi,%esi 117e7f: 75 0f jne 117e90 117e81: b8 08 00 00 00 mov $0x8,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117e86: 8d 65 f4 lea -0xc(%ebp),%esp 117e89: 5b pop %ebx 117e8a: 5e pop %esi 117e8b: 5f pop %edi 117e8c: c9 leave 117e8d: c3 ret 117e8e: 66 90 xchg %ax,%ax *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 117e90: 83 ec 0c sub $0xc,%esp 117e93: ff 35 30 28 14 00 pushl 0x142830 117e99: e8 8e 21 00 00 call 11a02c <_API_Mutex_Lock> executing = _Thread_Executing; 117e9e: a1 38 28 14 00 mov 0x142838,%eax 117ea3: 89 45 d4 mov %eax,-0x2c(%ebp) 117ea6: 83 c4 0c add $0xc,%esp 117ea9: 8d 45 e4 lea -0x1c(%ebp),%eax 117eac: 50 push %eax 117ead: ff 75 08 pushl 0x8(%ebp) 117eb0: 68 80 26 14 00 push $0x142680 117eb5: e8 8a 39 00 00 call 11b844 <_Objects_Get_no_protection> 117eba: 89 c7 mov %eax,%edi the_region = _Region_Get( id, &location ); switch ( location ) { 117ebc: 83 c4 10 add $0x10,%esp 117ebf: 8b 45 e4 mov -0x1c(%ebp),%eax 117ec2: 85 c0 test %eax,%eax 117ec4: 75 2a jne 117ef0 case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 117ec6: 3b 77 5c cmp 0x5c(%edi),%esi 117ec9: 76 2d jbe 117ef8 117ecb: b8 08 00 00 00 mov $0x8,%eax default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117ed0: 83 ec 0c sub $0xc,%esp 117ed3: ff 35 30 28 14 00 pushl 0x142830 117ed9: 89 45 d0 mov %eax,-0x30(%ebp) 117edc: e8 93 21 00 00 call 11a074 <_API_Mutex_Unlock> return return_status; 117ee1: 83 c4 10 add $0x10,%esp 117ee4: 8b 45 d0 mov -0x30(%ebp),%eax } 117ee7: 8d 65 f4 lea -0xc(%ebp),%esp 117eea: 5b pop %ebx 117eeb: 5e pop %esi 117eec: 5f pop %edi 117eed: c9 leave 117eee: c3 ret 117eef: 90 nop _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; 117ef0: b8 04 00 00 00 mov $0x4,%eax 117ef5: eb d9 jmp 117ed0 117ef7: 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 ); 117ef8: 6a 00 push $0x0 117efa: 6a 00 push $0x0 117efc: 56 push %esi 117efd: 8d 47 68 lea 0x68(%edi),%eax 117f00: 50 push %eax 117f01: e8 c6 2a 00 00 call 11a9cc <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 117f06: 83 c4 10 add $0x10,%esp 117f09: 85 c0 test %eax,%eax 117f0b: 74 17 je 117f24 the_region->number_of_used_blocks += 1; 117f0d: ff 47 64 incl 0x64(%edi) *segment = the_segment; 117f10: 89 03 mov %eax,(%ebx) 117f12: 31 c0 xor %eax,%eax 117f14: eb ba jmp 117ed0 117f16: 66 90 xchg %ax,%ax Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 117f18: b8 09 00 00 00 mov $0x9,%eax 117f1d: e9 64 ff ff ff jmp 117e86 117f22: 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 ) ) { 117f24: f6 45 10 01 testb $0x1,0x10(%ebp) 117f28: 74 07 je 117f31 117f2a: b8 0d 00 00 00 mov $0xd,%eax 117f2f: eb 9f jmp 117ed0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 117f31: a1 78 27 14 00 mov 0x142778,%eax 117f36: 40 inc %eax 117f37: a3 78 27 14 00 mov %eax,0x142778 * 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(); 117f3c: 83 ec 0c sub $0xc,%esp 117f3f: ff 35 30 28 14 00 pushl 0x142830 117f45: e8 2a 21 00 00 call 11a074 <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 117f4a: 8d 47 10 lea 0x10(%edi),%eax 117f4d: 8b 55 d4 mov -0x2c(%ebp),%edx 117f50: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 117f53: 8b 4d 08 mov 0x8(%ebp),%ecx 117f56: 89 4a 20 mov %ecx,0x20(%edx) executing->Wait.count = size; 117f59: 89 72 24 mov %esi,0x24(%edx) executing->Wait.return_argument = segment; 117f5c: 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; 117f5f: 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 ); 117f66: 83 c4 0c add $0xc,%esp 117f69: 68 68 c9 11 00 push $0x11c968 117f6e: ff 75 14 pushl 0x14(%ebp) 117f71: 50 push %eax 117f72: e8 e1 46 00 00 call 11c658 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 117f77: e8 b4 41 00 00 call 11c130 <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 117f7c: 8b 55 d4 mov -0x2c(%ebp),%edx 117f7f: 8b 42 34 mov 0x34(%edx),%eax 117f82: 83 c4 10 add $0x10,%esp 117f85: e9 fc fe ff ff jmp 117e86 =============================================================================== 00117f8c : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 117f8c: 55 push %ebp 117f8d: 89 e5 mov %esp,%ebp 117f8f: 56 push %esi 117f90: 53 push %ebx 117f91: 83 ec 20 sub $0x20,%esp 117f94: 8b 5d 0c mov 0xc(%ebp),%ebx 117f97: 8b 75 10 mov 0x10(%ebp),%esi Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 117f9a: 85 db test %ebx,%ebx 117f9c: 74 72 je 118010 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !size ) 117f9e: 85 f6 test %esi,%esi 117fa0: 74 6e je 118010 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 117fa2: 83 ec 0c sub $0xc,%esp 117fa5: ff 35 30 28 14 00 pushl 0x142830 117fab: e8 7c 20 00 00 call 11a02c <_API_Mutex_Lock> 117fb0: 83 c4 0c add $0xc,%esp 117fb3: 8d 45 f4 lea -0xc(%ebp),%eax 117fb6: 50 push %eax 117fb7: ff 75 08 pushl 0x8(%ebp) 117fba: 68 80 26 14 00 push $0x142680 117fbf: e8 80 38 00 00 call 11b844 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 117fc4: 83 c4 10 add $0x10,%esp 117fc7: 8b 55 f4 mov -0xc(%ebp),%edx 117fca: 85 d2 test %edx,%edx 117fcc: 75 36 jne 118004 <== NEVER TAKEN case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 117fce: 52 push %edx 117fcf: 56 push %esi 117fd0: 53 push %ebx 117fd1: 83 c0 68 add $0x68,%eax 117fd4: 50 push %eax 117fd5: e8 ce 32 00 00 call 11b2a8 <_Heap_Size_of_alloc_area> 117fda: 83 c4 10 add $0x10,%esp 117fdd: 84 c0 test %al,%al 117fdf: 74 3b je 11801c <== NEVER TAKEN 117fe1: 31 c0 xor %eax,%eax case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117fe3: 83 ec 0c sub $0xc,%esp 117fe6: ff 35 30 28 14 00 pushl 0x142830 117fec: 89 45 e4 mov %eax,-0x1c(%ebp) 117fef: e8 80 20 00 00 call 11a074 <_API_Mutex_Unlock> return return_status; 117ff4: 83 c4 10 add $0x10,%esp 117ff7: 8b 45 e4 mov -0x1c(%ebp),%eax } 117ffa: 8d 65 f8 lea -0x8(%ebp),%esp 117ffd: 5b pop %ebx 117ffe: 5e pop %esi 117fff: c9 leave 118000: c3 ret 118001: 8d 76 00 lea 0x0(%esi),%esi return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 118004: 4a dec %edx 118005: 75 da jne 117fe1 <== NEVER TAKEN 118007: b8 04 00 00 00 mov $0x4,%eax 11800c: eb d5 jmp 117fe3 11800e: 66 90 xchg %ax,%ax return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 118010: b8 09 00 00 00 mov $0x9,%eax } 118015: 8d 65 f8 lea -0x8(%ebp),%esp 118018: 5b pop %ebx 118019: 5e pop %esi 11801a: c9 leave 11801b: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 11801c: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED 118021: eb c0 jmp 117fe3 <== NOT EXECUTED =============================================================================== 00118048 : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 118048: 55 push %ebp 118049: 89 e5 mov %esp,%ebp 11804b: 56 push %esi 11804c: 53 push %ebx 11804d: 83 ec 20 sub $0x20,%esp 118050: 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 ) 118053: 85 db test %ebx,%ebx 118055: 0f 84 a5 00 00 00 je 118100 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 11805b: 83 ec 0c sub $0xc,%esp 11805e: ff 35 30 28 14 00 pushl 0x142830 118064: e8 c3 1f 00 00 call 11a02c <_API_Mutex_Lock> 118069: 83 c4 0c add $0xc,%esp 11806c: 8d 45 f0 lea -0x10(%ebp),%eax 11806f: 50 push %eax 118070: ff 75 08 pushl 0x8(%ebp) 118073: 68 80 26 14 00 push $0x142680 118078: e8 c7 37 00 00 call 11b844 <_Objects_Get_no_protection> 11807d: 89 c6 mov %eax,%esi the_region = _Region_Get( id, &location ); switch ( location ) { 11807f: 83 c4 10 add $0x10,%esp 118082: 8b 45 f0 mov -0x10(%ebp),%eax 118085: 85 c0 test %eax,%eax 118087: 74 1f je 1180a8 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 118089: 83 ec 0c sub $0xc,%esp 11808c: ff 35 30 28 14 00 pushl 0x142830 118092: e8 dd 1f 00 00 call 11a074 <_API_Mutex_Unlock> 118097: b8 04 00 00 00 mov $0x4,%eax return return_status; 11809c: 83 c4 10 add $0x10,%esp } 11809f: 8d 65 f8 lea -0x8(%ebp),%esp 1180a2: 5b pop %ebx 1180a3: 5e pop %esi 1180a4: c9 leave 1180a5: c3 ret 1180a6: 66 90 xchg %ax,%ax case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 1180a8: 83 ec 0c sub $0xc,%esp 1180ab: 8d 45 f4 lea -0xc(%ebp),%eax 1180ae: 50 push %eax 1180af: 8d 45 ec lea -0x14(%ebp),%eax 1180b2: 50 push %eax 1180b3: ff 75 10 pushl 0x10(%ebp) 1180b6: ff 75 0c pushl 0xc(%ebp) 1180b9: 8d 46 68 lea 0x68(%esi),%eax 1180bc: 50 push %eax 1180bd: e8 da 30 00 00 call 11b19c <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 1180c2: 8b 55 ec mov -0x14(%ebp),%edx 1180c5: 89 13 mov %edx,(%ebx) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 1180c7: 83 c4 20 add $0x20,%esp 1180ca: 85 c0 test %eax,%eax 1180cc: 75 16 jne 1180e4 _Region_Process_queue( the_region ); /* unlocks allocator */ 1180ce: 83 ec 0c sub $0xc,%esp 1180d1: 56 push %esi 1180d2: e8 29 7d 00 00 call 11fe00 <_Region_Process_queue> 1180d7: 31 c0 xor %eax,%eax 1180d9: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return return_status; } 1180dc: 8d 65 f8 lea -0x8(%ebp),%esp 1180df: 5b pop %ebx 1180e0: 5e pop %esi 1180e1: c9 leave 1180e2: c3 ret 1180e3: 90 nop _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 1180e4: 83 ec 0c sub $0xc,%esp 1180e7: ff 35 30 28 14 00 pushl 0x142830 1180ed: 89 45 e4 mov %eax,-0x1c(%ebp) 1180f0: e8 7f 1f 00 00 call 11a074 <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 1180f5: 83 c4 10 add $0x10,%esp 1180f8: 8b 45 e4 mov -0x1c(%ebp),%eax 1180fb: 83 f8 01 cmp $0x1,%eax 1180fe: 74 0c je 11810c return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 118100: b8 09 00 00 00 mov $0x9,%eax } 118105: 8d 65 f8 lea -0x8(%ebp),%esp 118108: 5b pop %ebx 118109: 5e pop %esi 11810a: c9 leave 11810b: c3 ret _RTEMS_Unlock_allocator(); if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 11810c: b0 0d mov $0xd,%al 11810e: eb 8f jmp 11809f =============================================================================== 00118110 : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 118110: 55 push %ebp 118111: 89 e5 mov %esp,%ebp 118113: 53 push %ebx 118114: 83 ec 20 sub $0x20,%esp uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 118117: ff 35 30 28 14 00 pushl 0x142830 11811d: e8 0a 1f 00 00 call 11a02c <_API_Mutex_Lock> 118122: 83 c4 0c add $0xc,%esp 118125: 8d 45 f4 lea -0xc(%ebp),%eax 118128: 50 push %eax 118129: ff 75 08 pushl 0x8(%ebp) 11812c: 68 80 26 14 00 push $0x142680 118131: e8 0e 37 00 00 call 11b844 <_Objects_Get_no_protection> 118136: 89 c3 mov %eax,%ebx the_region = _Region_Get( id, &location ); switch ( location ) { 118138: 83 c4 10 add $0x10,%esp 11813b: 8b 45 f4 mov -0xc(%ebp),%eax 11813e: 85 c0 test %eax,%eax 118140: 74 1e je 118160 118142: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 118147: 83 ec 0c sub $0xc,%esp 11814a: ff 35 30 28 14 00 pushl 0x142830 118150: e8 1f 1f 00 00 call 11a074 <_API_Mutex_Unlock> return return_status; 118155: 83 c4 10 add $0x10,%esp } 118158: 89 d8 mov %ebx,%eax 11815a: 8b 5d fc mov -0x4(%ebp),%ebx 11815d: c9 leave 11815e: c3 ret 11815f: 90 nop RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 118160: 83 ec 08 sub $0x8,%esp 118163: ff 75 0c pushl 0xc(%ebp) 118166: 8d 43 68 lea 0x68(%ebx),%eax 118169: 50 push %eax 11816a: e8 b1 2a 00 00 call 11ac20 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 11816f: 83 c4 10 add $0x10,%esp 118172: 84 c0 test %al,%al 118174: 75 0a jne 118180 else { the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator */ return RTEMS_SUCCESSFUL; 118176: bb 09 00 00 00 mov $0x9,%ebx 11817b: eb ca jmp 118147 11817d: 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; 118180: ff 4b 64 decl 0x64(%ebx) _Region_Process_queue(the_region); /* unlocks allocator */ 118183: 83 ec 0c sub $0xc,%esp 118186: 53 push %ebx 118187: e8 74 7c 00 00 call 11fe00 <_Region_Process_queue> 11818c: 31 db xor %ebx,%ebx return RTEMS_SUCCESSFUL; 11818e: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return return_status; } 118191: 89 d8 mov %ebx,%eax 118193: 8b 5d fc mov -0x4(%ebp),%ebx 118196: c9 leave 118197: c3 ret =============================================================================== 0010ba6c : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 10ba6c: 55 push %ebp 10ba6d: 89 e5 mov %esp,%ebp 10ba6f: 57 push %edi 10ba70: 56 push %esi 10ba71: 53 push %ebx 10ba72: 83 ec 3c sub $0x3c,%esp 10ba75: 8b 75 08 mov 0x8(%ebp),%esi 10ba78: 8b 5d 10 mov 0x10(%ebp),%ebx 10ba7b: 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 ) ) 10ba7e: 85 f6 test %esi,%esi 10ba80: 74 4a je 10bacc return RTEMS_INVALID_NAME; if ( !id ) 10ba82: 85 ff test %edi,%edi 10ba84: 0f 84 f6 00 00 00 je 10bb80 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 10ba8a: 89 da mov %ebx,%edx 10ba8c: 81 e2 c0 00 00 00 and $0xc0,%edx 10ba92: 74 48 je 10badc _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10ba94: 89 d8 mov %ebx,%eax 10ba96: 83 e0 30 and $0x30,%eax 10ba99: 83 f8 10 cmp $0x10,%eax 10ba9c: 74 0e je 10baac name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10ba9e: b8 0b 00 00 00 mov $0xb,%eax } 10baa3: 8d 65 f4 lea -0xc(%ebp),%esp 10baa6: 5b pop %ebx 10baa7: 5e pop %esi 10baa8: 5f pop %edi 10baa9: c9 leave 10baaa: c3 ret 10baab: 90 nop #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10baac: f6 c3 04 test $0x4,%bl 10baaf: 74 ed je 10ba9e _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 10bab1: 81 fa c0 00 00 00 cmp $0xc0,%edx 10bab7: 74 e5 je 10ba9e 10bab9: 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 ) ) 10babe: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10bac2: 76 1f jbe 10bae3 10bac4: b8 0a 00 00 00 mov $0xa,%eax 10bac9: eb d8 jmp 10baa3 10bacb: 90 nop 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 ) ) 10bacc: b8 03 00 00 00 mov $0x3,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10bad1: 8d 65 f4 lea -0xc(%ebp),%esp 10bad4: 5b pop %ebx 10bad5: 5e pop %esi 10bad6: 5f pop %edi 10bad7: c9 leave 10bad8: c3 ret 10bad9: 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 ) ) 10badc: 89 d9 mov %ebx,%ecx 10bade: 83 e1 30 and $0x30,%ecx 10bae1: 75 db jne 10babe rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10bae3: a1 58 73 12 00 mov 0x127358,%eax 10bae8: 40 inc %eax 10bae9: a3 58 73 12 00 mov %eax,0x127358 * 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 ); 10baee: 83 ec 0c sub $0xc,%esp 10baf1: 68 a0 72 12 00 push $0x1272a0 10baf6: 89 4d c4 mov %ecx,-0x3c(%ebp) 10baf9: e8 96 13 00 00 call 10ce94 <_Objects_Allocate> 10bafe: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 10bb00: 83 c4 10 add $0x10,%esp 10bb03: 85 c0 test %eax,%eax 10bb05: 8b 4d c4 mov -0x3c(%ebp),%ecx 10bb08: 0f 84 ba 00 00 00 je 10bbc8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 10bb0e: 89 58 10 mov %ebx,0x10(%eax) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 10bb11: 85 c9 test %ecx,%ecx 10bb13: 74 77 je 10bb8c /* * 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; 10bb15: 31 c0 xor %eax,%eax 10bb17: f6 c3 04 test $0x4,%bl 10bb1a: 0f 95 c0 setne %al 10bb1d: 89 45 d8 mov %eax,-0x28(%ebp) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 10bb20: 83 f9 10 cmp $0x10,%ecx 10bb23: 0f 84 ae 00 00 00 je 10bbd7 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; 10bb29: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10bb30: c6 45 d4 00 movb $0x0,-0x2c(%ebp) } mutex_status = _CORE_mutex_Initialize( 10bb34: 50 push %eax 10bb35: 31 c0 xor %eax,%eax 10bb37: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10bb3b: 0f 94 c0 sete %al 10bb3e: 50 push %eax 10bb3f: 8d 45 d0 lea -0x30(%ebp),%eax 10bb42: 50 push %eax 10bb43: 8d 42 14 lea 0x14(%edx),%eax 10bb46: 50 push %eax 10bb47: 89 55 c4 mov %edx,-0x3c(%ebp) 10bb4a: e8 55 0b 00 00 call 10c6a4 <_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 ) { 10bb4f: 83 c4 10 add $0x10,%esp 10bb52: 83 f8 06 cmp $0x6,%eax 10bb55: 8b 55 c4 mov -0x3c(%ebp),%edx 10bb58: 0f 84 a9 00 00 00 je 10bc07 <== NEVER TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10bb5e: 8b 42 08 mov 0x8(%edx),%eax 10bb61: 0f b7 d8 movzwl %ax,%ebx 10bb64: 8b 0d bc 72 12 00 mov 0x1272bc,%ecx 10bb6a: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10bb6d: 89 72 0c mov %esi,0xc(%edx) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 10bb70: 89 07 mov %eax,(%edi) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 10bb72: e8 15 20 00 00 call 10db8c <_Thread_Enable_dispatch> 10bb77: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10bb79: e9 25 ff ff ff jmp 10baa3 10bb7e: 66 90 xchg %ax,%ax CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10bb80: b8 09 00 00 00 mov $0x9,%eax 10bb85: e9 19 ff ff ff jmp 10baa3 10bb8a: 66 90 xchg %ax,%ax */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 10bb8c: 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; 10bb93: 31 c0 xor %eax,%eax 10bb95: f6 c3 04 test $0x4,%bl 10bb98: 0f 95 c0 setne %al 10bb9b: 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; 10bb9e: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 10bba5: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) _CORE_semaphore_Initialize( 10bbac: 51 push %ecx 10bbad: ff 75 0c pushl 0xc(%ebp) 10bbb0: 8d 45 e0 lea -0x20(%ebp),%eax 10bbb3: 50 push %eax 10bbb4: 8d 42 14 lea 0x14(%edx),%eax 10bbb7: 50 push %eax 10bbb8: 89 55 c4 mov %edx,-0x3c(%ebp) 10bbbb: e8 88 0d 00 00 call 10c948 <_CORE_semaphore_Initialize> 10bbc0: 83 c4 10 add $0x10,%esp 10bbc3: 8b 55 c4 mov -0x3c(%ebp),%edx 10bbc6: eb 96 jmp 10bb5e _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 10bbc8: e8 bf 1f 00 00 call 10db8c <_Thread_Enable_dispatch> 10bbcd: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10bbd2: e9 cc fe ff ff jmp 10baa3 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; 10bbd7: 8b 45 14 mov 0x14(%ebp),%eax 10bbda: 89 45 dc mov %eax,-0x24(%ebp) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10bbdd: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10bbe4: c6 45 d4 00 movb $0x0,-0x2c(%ebp) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 10bbe8: 83 7d d8 01 cmpl $0x1,-0x28(%ebp) 10bbec: 0f 85 42 ff ff ff jne 10bb34 if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 10bbf2: f6 c3 40 test $0x40,%bl 10bbf5: 74 30 je 10bc27 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10bbf7: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10bbfe: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10bc02: e9 2d ff ff ff jmp 10bb34 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10bc07: 83 ec 08 sub $0x8,%esp 10bc0a: 52 push %edx 10bc0b: 68 a0 72 12 00 push $0x1272a0 10bc10: e8 ff 15 00 00 call 10d214 <_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(); 10bc15: e8 72 1f 00 00 call 10db8c <_Thread_Enable_dispatch> 10bc1a: b8 13 00 00 00 mov $0x13,%eax return RTEMS_INVALID_PRIORITY; 10bc1f: 83 c4 10 add $0x10,%esp 10bc22: e9 7c fe ff ff jmp 10baa3 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 ) ) { 10bc27: 84 db test %bl,%bl 10bc29: 0f 89 05 ff ff ff jns 10bb34 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 10bc2f: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10bc36: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10bc3a: e9 f5 fe ff ff jmp 10bb34 =============================================================================== 0010bc40 : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 10bc40: 55 push %ebp 10bc41: 89 e5 mov %esp,%ebp 10bc43: 53 push %ebx 10bc44: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 10bc47: 8d 45 f4 lea -0xc(%ebp),%eax 10bc4a: 50 push %eax 10bc4b: ff 75 08 pushl 0x8(%ebp) 10bc4e: 68 a0 72 12 00 push $0x1272a0 10bc53: e8 ec 16 00 00 call 10d344 <_Objects_Get> 10bc58: 89 c3 mov %eax,%ebx register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 10bc5a: 83 c4 10 add $0x10,%esp 10bc5d: 8b 4d f4 mov -0xc(%ebp),%ecx 10bc60: 85 c9 test %ecx,%ecx 10bc62: 74 0c je 10bc70 10bc64: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bc69: 8b 5d fc mov -0x4(%ebp),%ebx 10bc6c: c9 leave 10bc6d: c3 ret 10bc6e: 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); 10bc70: 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) ) { 10bc73: 83 e0 30 and $0x30,%eax 10bc76: 74 58 je 10bcd0 if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 10bc78: 8b 53 64 mov 0x64(%ebx),%edx 10bc7b: 85 d2 test %edx,%edx 10bc7d: 75 15 jne 10bc94 10bc7f: 83 f8 20 cmp $0x20,%eax 10bc82: 74 10 je 10bc94 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 10bc84: e8 03 1f 00 00 call 10db8c <_Thread_Enable_dispatch> 10bc89: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bc8e: 8b 5d fc mov -0x4(%ebp),%ebx 10bc91: c9 leave 10bc92: c3 ret 10bc93: 90 nop !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 10bc94: 50 push %eax 10bc95: 6a 04 push $0x4 10bc97: 6a 00 push $0x0 10bc99: 8d 43 14 lea 0x14(%ebx),%eax 10bc9c: 50 push %eax 10bc9d: e8 f6 09 00 00 call 10c698 <_CORE_mutex_Flush> 10bca2: 83 c4 10 add $0x10,%esp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 10bca5: 83 ec 08 sub $0x8,%esp 10bca8: 53 push %ebx 10bca9: 68 a0 72 12 00 push $0x1272a0 10bcae: e8 5d 12 00 00 call 10cf10 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10bcb3: 58 pop %eax 10bcb4: 5a pop %edx 10bcb5: 53 push %ebx 10bcb6: 68 a0 72 12 00 push $0x1272a0 10bcbb: e8 54 15 00 00 call 10d214 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 10bcc0: e8 c7 1e 00 00 call 10db8c <_Thread_Enable_dispatch> 10bcc5: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10bcc7: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bcca: 8b 5d fc mov -0x4(%ebp),%ebx 10bccd: c9 leave 10bcce: c3 ret 10bccf: 90 nop &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 10bcd0: 51 push %ecx 10bcd1: 6a 02 push $0x2 10bcd3: 6a 00 push $0x0 10bcd5: 8d 43 14 lea 0x14(%ebx),%eax 10bcd8: 50 push %eax 10bcd9: e8 5e 0c 00 00 call 10c93c <_CORE_semaphore_Flush> 10bcde: 83 c4 10 add $0x10,%esp 10bce1: eb c2 jmp 10bca5 =============================================================================== 0010bce4 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 10bce4: 55 push %ebp 10bce5: 89 e5 mov %esp,%ebp 10bce7: 57 push %edi 10bce8: 56 push %esi 10bce9: 53 push %ebx 10bcea: 83 ec 1c sub $0x1c,%esp 10bced: 8b 5d 08 mov 0x8(%ebp),%ebx 10bcf0: 8b 75 0c mov 0xc(%ebp),%esi 10bcf3: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Id id, Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) 10bcf6: 8d 45 e0 lea -0x20(%ebp),%eax 10bcf9: 50 push %eax 10bcfa: 8d 45 e4 lea -0x1c(%ebp),%eax 10bcfd: 50 push %eax 10bcfe: 53 push %ebx 10bcff: 68 a0 72 12 00 push $0x1272a0 10bd04: e8 e3 15 00 00 call 10d2ec <_Objects_Get_isr_disable> register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { 10bd09: 83 c4 10 add $0x10,%esp 10bd0c: 8b 4d e4 mov -0x1c(%ebp),%ecx 10bd0f: 85 c9 test %ecx,%ecx 10bd11: 74 0d je 10bd20 10bd13: b8 04 00 00 00 mov $0x4,%eax break; } return RTEMS_INVALID_ID; } 10bd18: 8d 65 f4 lea -0xc(%ebp),%esp 10bd1b: 5b pop %ebx 10bd1c: 5e pop %esi 10bd1d: 5f pop %edi 10bd1e: c9 leave 10bd1f: 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) ) { 10bd20: f6 40 10 30 testb $0x30,0x10(%eax) 10bd24: 74 36 je 10bd5c _CORE_mutex_Seize( 10bd26: 83 ec 0c sub $0xc,%esp 10bd29: ff 75 e0 pushl -0x20(%ebp) 10bd2c: 57 push %edi 10bd2d: 83 e6 01 and $0x1,%esi 10bd30: 83 f6 01 xor $0x1,%esi 10bd33: 56 push %esi 10bd34: 53 push %ebx 10bd35: 83 c0 14 add $0x14,%eax 10bd38: 50 push %eax 10bd39: e8 5e 0a 00 00 call 10c79c <_CORE_mutex_Seize> id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10bd3e: 83 c4 14 add $0x14,%esp 10bd41: a1 18 74 12 00 mov 0x127418,%eax 10bd46: ff 70 34 pushl 0x34(%eax) 10bd49: e8 12 01 00 00 call 10be60 <_Semaphore_Translate_core_mutex_return_code> 10bd4e: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10bd51: 8d 65 f4 lea -0xc(%ebp),%esp 10bd54: 5b pop %ebx 10bd55: 5e pop %esi 10bd56: 5f pop %edi 10bd57: c9 leave 10bd58: c3 ret 10bd59: 8d 76 00 lea 0x0(%esi),%esi { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10bd5c: 8b 15 18 74 12 00 mov 0x127418,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10bd62: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( the_semaphore->count != 0 ) { 10bd69: 8b 48 5c mov 0x5c(%eax),%ecx 10bd6c: 85 c9 test %ecx,%ecx 10bd6e: 75 2c jne 10bd9c the_semaphore->count -= 1; _ISR_Enable( *level_p ); return; } if ( !wait ) { 10bd70: 83 e6 01 and $0x1,%esi 10bd73: 74 33 je 10bda8 _ISR_Enable( *level_p ); 10bd75: ff 75 e0 pushl -0x20(%ebp) 10bd78: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 10bd79: 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( 10bd80: 83 ec 0c sub $0xc,%esp 10bd83: a1 18 74 12 00 mov 0x127418,%eax 10bd88: ff 70 34 pushl 0x34(%eax) 10bd8b: e8 e0 00 00 00 call 10be70 <_Semaphore_Translate_core_semaphore_return_code> 10bd90: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10bd93: 8d 65 f4 lea -0xc(%ebp),%esp 10bd96: 5b pop %ebx 10bd97: 5e pop %esi 10bd98: 5f pop %edi 10bd99: c9 leave 10bd9a: c3 ret 10bd9b: 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; 10bd9c: 49 dec %ecx 10bd9d: 89 48 5c mov %ecx,0x5c(%eax) _ISR_Enable( *level_p ); 10bda0: ff 75 e0 pushl -0x20(%ebp) 10bda3: 9d popf 10bda4: eb da jmp 10bd80 10bda6: 66 90 xchg %ax,%ax 10bda8: 8b 0d 58 73 12 00 mov 0x127358,%ecx 10bdae: 41 inc %ecx 10bdaf: 89 0d 58 73 12 00 mov %ecx,0x127358 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; 10bdb5: 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; 10bdbc: 83 c0 14 add $0x14,%eax 10bdbf: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10bdc2: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( *level_p ); 10bdc5: ff 75 e0 pushl -0x20(%ebp) 10bdc8: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 10bdc9: 52 push %edx 10bdca: 68 98 e3 10 00 push $0x10e398 10bdcf: 57 push %edi 10bdd0: 50 push %eax 10bdd1: e8 b2 22 00 00 call 10e088 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10bdd6: e8 b1 1d 00 00 call 10db8c <_Thread_Enable_dispatch> 10bddb: 83 c4 10 add $0x10,%esp 10bdde: eb a0 jmp 10bd80 =============================================================================== 0010bde0 : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 10bde0: 55 push %ebp 10bde1: 89 e5 mov %esp,%ebp 10bde3: 53 push %ebx 10bde4: 83 ec 18 sub $0x18,%esp 10bde7: 8b 5d 08 mov 0x8(%ebp),%ebx RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 10bdea: 8d 45 f4 lea -0xc(%ebp),%eax 10bded: 50 push %eax 10bdee: 53 push %ebx 10bdef: 68 a0 72 12 00 push $0x1272a0 10bdf4: e8 4b 15 00 00 call 10d344 <_Objects_Get> Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 10bdf9: 83 c4 10 add $0x10,%esp 10bdfc: 8b 55 f4 mov -0xc(%ebp),%edx 10bdff: 85 d2 test %edx,%edx 10be01: 74 0d je 10be10 10be03: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10be08: 8b 5d fc mov -0x4(%ebp),%ebx 10be0b: c9 leave 10be0c: c3 ret 10be0d: 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) ) { 10be10: f6 40 10 30 testb $0x30,0x10(%eax) 10be14: 75 26 jne 10be3c MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); } else { semaphore_status = _CORE_semaphore_Surrender( 10be16: 52 push %edx 10be17: 6a 00 push $0x0 10be19: 53 push %ebx 10be1a: 83 c0 14 add $0x14,%eax 10be1d: 50 push %eax 10be1e: e8 65 0b 00 00 call 10c988 <_CORE_semaphore_Surrender> 10be23: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10be25: e8 62 1d 00 00 call 10db8c <_Thread_Enable_dispatch> return _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); 10be2a: 89 1c 24 mov %ebx,(%esp) 10be2d: e8 3e 00 00 00 call 10be70 <_Semaphore_Translate_core_semaphore_return_code> &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return 10be32: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10be35: 8b 5d fc mov -0x4(%ebp),%ebx 10be38: c9 leave 10be39: c3 ret 10be3a: 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( 10be3c: 51 push %ecx 10be3d: 6a 00 push $0x0 10be3f: 53 push %ebx 10be40: 83 c0 14 add $0x14,%eax 10be43: 50 push %eax 10be44: e8 f3 09 00 00 call 10c83c <_CORE_mutex_Surrender> 10be49: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10be4b: e8 3c 1d 00 00 call 10db8c <_Thread_Enable_dispatch> return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 10be50: 89 1c 24 mov %ebx,(%esp) 10be53: e8 08 00 00 00 call 10be60 <_Semaphore_Translate_core_mutex_return_code> 10be58: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10be5b: 8b 5d fc mov -0x4(%ebp),%ebx 10be5e: c9 leave 10be5f: c3 ret =============================================================================== 0011866c : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 11866c: 55 push %ebp 11866d: 89 e5 mov %esp,%ebp 11866f: 53 push %ebx 118670: 83 ec 14 sub $0x14,%esp 118673: 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 ) 118676: 85 db test %ebx,%ebx 118678: 75 0a jne 118684 11867a: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11867f: 8b 5d fc mov -0x4(%ebp),%ebx 118682: c9 leave 118683: c3 ret ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 118684: 83 ec 08 sub $0x8,%esp 118687: 8d 45 f4 lea -0xc(%ebp),%eax 11868a: 50 push %eax 11868b: ff 75 08 pushl 0x8(%ebp) 11868e: e8 ed 3a 00 00 call 11c180 <_Thread_Get> switch ( location ) { 118693: 83 c4 10 add $0x10,%esp 118696: 8b 55 f4 mov -0xc(%ebp),%edx 118699: 85 d2 test %edx,%edx 11869b: 74 0b je 1186a8 11869d: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1186a2: 8b 5d fc mov -0x4(%ebp),%ebx 1186a5: c9 leave 1186a6: c3 ret 1186a7: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 1186a8: 8b 90 f0 00 00 00 mov 0xf0(%eax),%edx asr = &api->Signal; 1186ae: 8b 4a 0c mov 0xc(%edx),%ecx 1186b1: 85 c9 test %ecx,%ecx 1186b3: 74 43 je 1186f8 if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 1186b5: 80 7a 08 00 cmpb $0x0,0x8(%edx) 1186b9: 74 29 je 1186e4 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 1186bb: 9c pushf 1186bc: fa cli 1186bd: 59 pop %ecx *signal_set |= signals; 1186be: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 1186c1: 51 push %ecx 1186c2: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 1186c3: c6 40 74 01 movb $0x1,0x74(%eax) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 1186c7: 8b 15 14 28 14 00 mov 0x142814,%edx 1186cd: 85 d2 test %edx,%edx 1186cf: 74 1b je 1186ec 1186d1: 3b 05 38 28 14 00 cmp 0x142838,%eax 1186d7: 75 13 jne 1186ec <== NEVER TAKEN _ISR_Signals_to_thread_executing = true; 1186d9: c6 05 e8 28 14 00 01 movb $0x1,0x1428e8 1186e0: eb 0a jmp 1186ec 1186e2: 66 90 xchg %ax,%ax rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 1186e4: 9c pushf 1186e5: fa cli 1186e6: 58 pop %eax *signal_set |= signals; 1186e7: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 1186ea: 50 push %eax 1186eb: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 1186ec: e8 3f 3a 00 00 call 11c130 <_Thread_Enable_dispatch> 1186f1: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1186f3: 8b 5d fc mov -0x4(%ebp),%ebx 1186f6: c9 leave 1186f7: c3 ret _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 1186f8: e8 33 3a 00 00 call 11c130 <_Thread_Enable_dispatch> 1186fd: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; 118702: e9 78 ff ff ff jmp 11867f =============================================================================== 0010be80 : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { 10be80: 55 push %ebp 10be81: 89 e5 mov %esp,%ebp 10be83: 57 push %edi 10be84: 56 push %esi 10be85: 53 push %ebx 10be86: 83 ec 1c sub $0x1c,%esp 10be89: 8b 5d 08 mov 0x8(%ebp),%ebx 10be8c: 8b 4d 0c mov 0xc(%ebp),%ecx 10be8f: 8b 7d 18 mov 0x18(%ebp),%edi 10be92: 8b 75 1c mov 0x1c(%ebp),%esi Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10be95: 85 f6 test %esi,%esi 10be97: 0f 84 37 01 00 00 je 10bfd4 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10be9d: 85 db test %ebx,%ebx 10be9f: 0f 84 cb 00 00 00 je 10bf70 /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 10bea5: 66 85 ff test %di,%di 10bea8: 78 1d js 10bec7 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10beaa: 85 c9 test %ecx,%ecx 10beac: 75 0e jne 10bebc } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; 10beae: b8 13 00 00 00 mov $0x13,%eax } 10beb3: 8d 65 f4 lea -0xc(%ebp),%esp 10beb6: 5b pop %ebx 10beb7: 5e pop %esi 10beb8: 5f pop %edi 10beb9: c9 leave 10beba: c3 ret 10bebb: 90 nop 10bebc: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax 10bec3: 39 c1 cmp %eax,%ecx 10bec5: 77 e7 ja 10beae */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10bec7: 83 ec 0c sub $0xc,%esp 10beca: ff 35 10 74 12 00 pushl 0x127410 10bed0: 89 4d e4 mov %ecx,-0x1c(%ebp) 10bed3: e8 38 06 00 00 call 10c510 <_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 ); 10bed8: c7 04 24 e0 72 12 00 movl $0x1272e0,(%esp) 10bedf: e8 b0 0f 00 00 call 10ce94 <_Objects_Allocate> 10bee4: 89 c2 mov %eax,%edx * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 10bee6: 83 c4 10 add $0x10,%esp 10bee9: 85 c0 test %eax,%eax 10beeb: 8b 4d e4 mov -0x1c(%ebp),%ecx 10beee: 0f 84 c0 00 00 00 je 10bfb4 /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 10bef4: 50 push %eax 10bef5: 53 push %ebx 10bef6: 8b 45 14 mov 0x14(%ebp),%eax 10bef9: 83 e0 01 and $0x1,%eax 10befc: 50 push %eax 10befd: 6a 00 push $0x0 10beff: 8b 45 14 mov 0x14(%ebp),%eax 10bf02: c1 e8 09 shr $0x9,%eax 10bf05: 83 e0 01 and $0x1,%eax 10bf08: 50 push %eax 10bf09: 8b 45 14 mov 0x14(%ebp),%eax 10bf0c: c1 e8 08 shr $0x8,%eax 10bf0f: 83 f0 01 xor $0x1,%eax 10bf12: 83 e0 01 and $0x1,%eax 10bf15: 50 push %eax 10bf16: 51 push %ecx 10bf17: 83 e7 01 and $0x1,%edi 10bf1a: 57 push %edi 10bf1b: ff 75 10 pushl 0x10(%ebp) 10bf1e: 6a 00 push $0x0 10bf20: 52 push %edx 10bf21: 68 e0 72 12 00 push $0x1272e0 10bf26: 89 55 e4 mov %edx,-0x1c(%ebp) 10bf29: e8 fa 1c 00 00 call 10dc28 <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 10bf2e: 83 c4 30 add $0x30,%esp 10bf31: 84 c0 test %al,%al 10bf33: 8b 55 e4 mov -0x1c(%ebp),%edx 10bf36: 74 48 je 10bf80 } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 10bf38: 8b 8a f0 00 00 00 mov 0xf0(%edx),%ecx 10bf3e: 8b 45 14 mov 0x14(%ebp),%eax 10bf41: c1 e8 0a shr $0xa,%eax 10bf44: 83 f0 01 xor $0x1,%eax 10bf47: 83 e0 01 and $0x1,%eax 10bf4a: 88 41 08 mov %al,0x8(%ecx) *id = the_thread->Object.id; 10bf4d: 8b 42 08 mov 0x8(%edx),%eax 10bf50: 89 06 mov %eax,(%esi) ); } #endif _RTEMS_Unlock_allocator(); 10bf52: 83 ec 0c sub $0xc,%esp 10bf55: ff 35 10 74 12 00 pushl 0x127410 10bf5b: e8 f8 05 00 00 call 10c558 <_API_Mutex_Unlock> 10bf60: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10bf62: 83 c4 10 add $0x10,%esp } 10bf65: 8d 65 f4 lea -0xc(%ebp),%esp 10bf68: 5b pop %ebx 10bf69: 5e pop %esi 10bf6a: 5f pop %edi 10bf6b: c9 leave 10bf6c: c3 ret 10bf6d: 8d 76 00 lea 0x0(%esi),%esi if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10bf70: b8 03 00 00 00 mov $0x3,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10bf75: 8d 65 f4 lea -0xc(%ebp),%esp 10bf78: 5b pop %ebx 10bf79: 5e pop %esi 10bf7a: 5f pop %edi 10bf7b: c9 leave 10bf7c: c3 ret 10bf7d: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 10bf80: 83 ec 0c sub $0xc,%esp 10bf83: ff 72 08 pushl 0x8(%edx) 10bf86: e8 f9 12 00 00 call 10d284 <_Objects_Get_information_id> 10bf8b: 5a pop %edx 10bf8c: 59 pop %ecx 10bf8d: 8b 55 e4 mov -0x1c(%ebp),%edx 10bf90: 52 push %edx 10bf91: 50 push %eax 10bf92: e8 7d 12 00 00 call 10d214 <_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(); 10bf97: 58 pop %eax 10bf98: ff 35 10 74 12 00 pushl 0x127410 10bf9e: e8 b5 05 00 00 call 10c558 <_API_Mutex_Unlock> 10bfa3: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 10bfa8: 83 c4 10 add $0x10,%esp } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10bfab: 8d 65 f4 lea -0xc(%ebp),%esp 10bfae: 5b pop %ebx 10bfaf: 5e pop %esi 10bfb0: 5f pop %edi 10bfb1: c9 leave 10bfb2: c3 ret 10bfb3: 90 nop */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10bfb4: 83 ec 0c sub $0xc,%esp 10bfb7: ff 35 10 74 12 00 pushl 0x127410 10bfbd: e8 96 05 00 00 call 10c558 <_API_Mutex_Unlock> 10bfc2: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10bfc7: 83 c4 10 add $0x10,%esp } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10bfca: 8d 65 f4 lea -0xc(%ebp),%esp 10bfcd: 5b pop %ebx 10bfce: 5e pop %esi 10bfcf: 5f pop %edi 10bfd0: c9 leave 10bfd1: c3 ret 10bfd2: 66 90 xchg %ax,%ax Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10bfd4: b8 09 00 00 00 mov $0x9,%eax 10bfd9: e9 d5 fe ff ff jmp 10beb3 =============================================================================== 0010bfe0 : */ rtems_status_code rtems_task_delete( rtems_id id ) { 10bfe0: 55 push %ebp 10bfe1: 89 e5 mov %esp,%ebp 10bfe3: 53 push %ebx 10bfe4: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 10bfe7: ff 35 10 74 12 00 pushl 0x127410 10bfed: e8 1e 05 00 00 call 10c510 <_API_Mutex_Lock> the_thread = _Thread_Get( id, &location ); 10bff2: 5a pop %edx 10bff3: 59 pop %ecx 10bff4: 8d 45 f4 lea -0xc(%ebp),%eax 10bff7: 50 push %eax 10bff8: ff 75 08 pushl 0x8(%ebp) 10bffb: e8 b0 1b 00 00 call 10dbb0 <_Thread_Get> 10c000: 89 c3 mov %eax,%ebx switch ( location ) { 10c002: 83 c4 10 add $0x10,%esp 10c005: 8b 45 f4 mov -0xc(%ebp),%eax 10c008: 85 c0 test %eax,%eax 10c00a: 75 44 jne 10c050 case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 10c00c: 83 ec 0c sub $0xc,%esp 10c00f: ff 73 08 pushl 0x8(%ebx) 10c012: e8 6d 12 00 00 call 10d284 <_Objects_Get_information_id> 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 10c017: 5a pop %edx 10c018: 59 pop %ecx 10c019: 53 push %ebx 10c01a: 50 push %eax 10c01b: e8 58 18 00 00 call 10d878 <_Thread_Close> 10c020: 58 pop %eax 10c021: ff 73 08 pushl 0x8(%ebx) 10c024: e8 5b 12 00 00 call 10d284 <_Objects_Get_information_id> 10c029: 5a pop %edx 10c02a: 59 pop %ecx 10c02b: 53 push %ebx 10c02c: 50 push %eax 10c02d: e8 e2 11 00 00 call 10d214 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10c032: 58 pop %eax 10c033: ff 35 10 74 12 00 pushl 0x127410 10c039: e8 1a 05 00 00 call 10c558 <_API_Mutex_Unlock> _Thread_Enable_dispatch(); 10c03e: e8 49 1b 00 00 call 10db8c <_Thread_Enable_dispatch> 10c043: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10c045: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } 10c048: 8b 5d fc mov -0x4(%ebp),%ebx 10c04b: c9 leave 10c04c: c3 ret 10c04d: 8d 76 00 lea 0x0(%esi),%esi case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 10c050: 83 ec 0c sub $0xc,%esp 10c053: ff 35 10 74 12 00 pushl 0x127410 10c059: e8 fa 04 00 00 call 10c558 <_API_Mutex_Unlock> 10c05e: b8 04 00 00 00 mov $0x4,%eax return RTEMS_INVALID_ID; 10c063: 83 c4 10 add $0x10,%esp } 10c066: 8b 5d fc mov -0x4(%ebp),%ebx 10c069: c9 leave 10c06a: c3 ret =============================================================================== 0010daec : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 10daec: 55 push %ebp 10daed: 89 e5 mov %esp,%ebp 10daef: 56 push %esi 10daf0: 53 push %ebx 10daf1: 83 ec 10 sub $0x10,%esp 10daf4: 8b 45 08 mov 0x8(%ebp),%eax 10daf7: 8b 75 0c mov 0xc(%ebp),%esi 10dafa: 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() ) 10dafd: 80 3d e4 71 12 00 00 cmpb $0x0,0x1271e4 10db04: 74 6e je 10db74 return RTEMS_NOT_CONFIGURED; if ( !note ) 10db06: 85 db test %ebx,%ebx 10db08: 74 7e je 10db88 /* * 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 ) 10db0a: 83 fe 0f cmp $0xf,%esi 10db0d: 77 3d ja 10db4c /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10db0f: 85 c0 test %eax,%eax 10db11: 74 45 je 10db58 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10db13: 8b 15 f8 b6 12 00 mov 0x12b6f8,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10db19: 3b 42 08 cmp 0x8(%edx),%eax 10db1c: 74 40 je 10db5e api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10db1e: 83 ec 08 sub $0x8,%esp 10db21: 8d 55 f4 lea -0xc(%ebp),%edx 10db24: 52 push %edx 10db25: 50 push %eax 10db26: e8 c1 1e 00 00 call 10f9ec <_Thread_Get> switch ( location ) { 10db2b: 83 c4 10 add $0x10,%esp 10db2e: 8b 55 f4 mov -0xc(%ebp),%edx 10db31: 85 d2 test %edx,%edx 10db33: 75 4b jne 10db80 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10db35: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10db3b: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10db3f: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10db41: e8 82 1e 00 00 call 10f9c8 <_Thread_Enable_dispatch> 10db46: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10db48: eb 07 jmp 10db51 10db4a: 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 ) 10db4c: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10db51: 8d 65 f8 lea -0x8(%ebp),%esp 10db54: 5b pop %ebx 10db55: 5e pop %esi 10db56: c9 leave 10db57: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10db58: 8b 15 f8 b6 12 00 mov 0x12b6f8,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10db5e: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax 10db64: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10db68: 89 03 mov %eax,(%ebx) 10db6a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10db6c: 8d 65 f8 lea -0x8(%ebp),%esp 10db6f: 5b pop %ebx 10db70: 5e pop %esi 10db71: c9 leave 10db72: c3 ret 10db73: 90 nop { register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10db74: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10db79: 8d 65 f8 lea -0x8(%ebp),%esp 10db7c: 5b pop %ebx 10db7d: 5e pop %esi 10db7e: c9 leave 10db7f: c3 ret *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 10db80: b8 04 00 00 00 mov $0x4,%eax 10db85: eb ca jmp 10db51 10db87: 90 nop RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; if ( !note ) 10db88: b8 09 00 00 00 mov $0x9,%eax 10db8d: eb c2 jmp 10db51 =============================================================================== 00118a50 : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { 118a50: 55 push %ebp 118a51: 89 e5 mov %esp,%ebp 118a53: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 118a56: 8d 45 f4 lea -0xc(%ebp),%eax 118a59: 50 push %eax 118a5a: ff 75 08 pushl 0x8(%ebp) 118a5d: e8 1e 37 00 00 call 11c180 <_Thread_Get> switch ( location ) { 118a62: 83 c4 10 add $0x10,%esp 118a65: 8b 55 f4 mov -0xc(%ebp),%edx 118a68: 85 d2 test %edx,%edx 118a6a: 74 08 je 118a74 118a6c: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a71: c9 leave 118a72: c3 ret 118a73: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 118a74: f6 40 10 02 testb $0x2,0x10(%eax) 118a78: 74 0e je 118a88 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 118a7a: e8 b1 36 00 00 call 11c130 <_Thread_Enable_dispatch> 118a7f: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a84: c9 leave 118a85: c3 ret 118a86: 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(); 118a88: e8 a3 36 00 00 call 11c130 <_Thread_Enable_dispatch> 118a8d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a8f: c9 leave 118a90: c3 ret =============================================================================== 00113974 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 113974: 55 push %ebp 113975: 89 e5 mov %esp,%ebp 113977: 57 push %edi 113978: 56 push %esi 113979: 53 push %ebx 11397a: 83 ec 1c sub $0x1c,%esp 11397d: 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 ) 113980: 85 c9 test %ecx,%ecx 113982: 0f 84 1c 01 00 00 je 113aa4 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 113988: 8b 1d 18 74 12 00 mov 0x127418,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 11398e: 8b bb f0 00 00 00 mov 0xf0(%ebx),%edi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 113994: 80 7b 75 01 cmpb $0x1,0x75(%ebx) 113998: 19 f6 sbb %esi,%esi 11399a: 81 e6 00 01 00 00 and $0x100,%esi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 1139a0: 8b 53 7c mov 0x7c(%ebx),%edx 1139a3: 85 d2 test %edx,%edx 1139a5: 0f 85 b5 00 00 00 jne 113a60 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 1139ab: 80 7f 08 01 cmpb $0x1,0x8(%edi) 1139af: 19 d2 sbb %edx,%edx 1139b1: 81 e2 00 04 00 00 and $0x400,%edx old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); 1139b7: 89 55 e4 mov %edx,-0x1c(%ebp) 1139ba: 89 4d e0 mov %ecx,-0x20(%ebp) 1139bd: e8 6a b5 ff ff call 10ef2c <_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; 1139c2: 8b 55 e4 mov -0x1c(%ebp),%edx 1139c5: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 1139c7: 09 f0 or %esi,%eax 1139c9: 8b 4d e0 mov -0x20(%ebp),%ecx 1139cc: 89 01 mov %eax,(%ecx) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 1139ce: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 1139d5: 74 0f je 1139e6 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 1139d7: 8b 45 08 mov 0x8(%ebp),%eax 1139da: c1 e8 08 shr $0x8,%eax 1139dd: 83 f0 01 xor $0x1,%eax 1139e0: 83 e0 01 and $0x1,%eax 1139e3: 88 43 75 mov %al,0x75(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 1139e6: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 1139ed: 74 18 je 113a07 if ( _Modes_Is_timeslice(mode_set) ) { 1139ef: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 1139f6: 74 74 je 113a6c executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 1139f8: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 1139ff: a1 24 73 12 00 mov 0x127324,%eax 113a04: 89 43 78 mov %eax,0x78(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 113a07: f6 45 0c 01 testb $0x1,0xc(%ebp) 113a0b: 74 07 je 113a14 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 113a0d: f6 45 08 01 testb $0x1,0x8(%ebp) 113a11: 74 69 je 113a7c 113a13: fa cli */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 113a14: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 113a1b: 74 2c je 113a49 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 113a1d: 8b 45 08 mov 0x8(%ebp),%eax 113a20: c1 e8 0a shr $0xa,%eax 113a23: 83 f0 01 xor $0x1,%eax 113a26: 83 e0 01 and $0x1,%eax if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 113a29: 38 47 08 cmp %al,0x8(%edi) 113a2c: 74 1b je 113a49 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 ) { asr->is_enabled = is_asr_enabled; 113a2e: 88 47 08 mov %al,0x8(%edi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 113a31: 9c pushf 113a32: fa cli 113a33: 58 pop %eax _signals = information->signals_pending; 113a34: 8b 57 18 mov 0x18(%edi),%edx information->signals_pending = information->signals_posted; 113a37: 8b 4f 14 mov 0x14(%edi),%ecx 113a3a: 89 4f 18 mov %ecx,0x18(%edi) information->signals_posted = _signals; 113a3d: 89 57 14 mov %edx,0x14(%edi) _ISR_Enable( _level ); 113a40: 50 push %eax 113a41: 9d popf if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 113a42: 8b 47 14 mov 0x14(%edi),%eax 113a45: 85 c0 test %eax,%eax 113a47: 75 53 jne 113a9c if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; 113a49: 31 db xor %ebx,%ebx } } } if ( _System_state_Is_up( _System_state_Get() ) ) 113a4b: 83 3d 20 75 12 00 03 cmpl $0x3,0x127520 113a52: 74 2c je 113a80 if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); 113a54: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 113a56: 83 c4 1c add $0x1c,%esp 113a59: 5b pop %ebx 113a5a: 5e pop %esi 113a5b: 5f pop %edi 113a5c: c9 leave 113a5d: c3 ret 113a5e: 66 90 xchg %ax,%ax 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; 113a60: 81 ce 00 02 00 00 or $0x200,%esi 113a66: e9 40 ff ff ff jmp 1139ab 113a6b: 90 nop 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; 113a6c: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 113a73: f6 45 0c 01 testb $0x1,0xc(%ebp) 113a77: 74 9b je 113a14 113a79: eb 92 jmp 113a0d 113a7b: 90 nop 113a7c: fb sti 113a7d: eb 95 jmp 113a14 113a7f: 90 nop } } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 113a80: e8 ab 01 00 00 call 113c30 <_Thread_Evaluate_mode> 113a85: 84 c0 test %al,%al 113a87: 75 04 jne 113a8d 113a89: 84 db test %bl,%bl 113a8b: 74 c7 je 113a54 _Thread_Dispatch(); 113a8d: e8 9e 9f ff ff call 10da30 <_Thread_Dispatch> 113a92: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 113a94: 83 c4 1c add $0x1c,%esp 113a97: 5b pop %ebx 113a98: 5e pop %esi 113a99: 5f pop %edi 113a9a: c9 leave 113a9b: c3 ret if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; 113a9c: c6 43 74 01 movb $0x1,0x74(%ebx) 113aa0: b3 01 mov $0x1,%bl 113aa2: eb a7 jmp 113a4b ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 113aa4: b8 09 00 00 00 mov $0x9,%eax if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 113aa9: 83 c4 1c add $0x1c,%esp 113aac: 5b pop %ebx 113aad: 5e pop %esi 113aae: 5f pop %edi 113aaf: c9 leave 113ab0: c3 ret =============================================================================== 0010f32c : */ rtems_status_code rtems_task_resume( rtems_id id ) { 10f32c: 55 push %ebp 10f32d: 89 e5 mov %esp,%ebp 10f32f: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10f332: 8d 45 f4 lea -0xc(%ebp),%eax 10f335: 50 push %eax 10f336: ff 75 08 pushl 0x8(%ebp) 10f339: e8 f6 1b 00 00 call 110f34 <_Thread_Get> switch ( location ) { 10f33e: 83 c4 10 add $0x10,%esp 10f341: 8b 55 f4 mov -0xc(%ebp),%edx 10f344: 85 d2 test %edx,%edx 10f346: 74 08 je 10f350 10f348: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f34d: c9 leave 10f34e: c3 ret 10f34f: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 10f350: f6 40 10 02 testb $0x2,0x10(%eax) 10f354: 75 0e jne 10f364 _Thread_Resume( the_thread, true ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10f356: e8 89 1b 00 00 call 110ee4 <_Thread_Enable_dispatch> 10f35b: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f360: c9 leave 10f361: c3 ret 10f362: 66 90 xchg %ax,%ax the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { _Thread_Resume( the_thread, true ); 10f364: 83 ec 08 sub $0x8,%esp 10f367: 6a 01 push $0x1 10f369: 50 push %eax 10f36a: e8 e5 23 00 00 call 111754 <_Thread_Resume> _Thread_Enable_dispatch(); 10f36f: e8 70 1b 00 00 call 110ee4 <_Thread_Enable_dispatch> 10f374: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f376: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f379: c9 leave 10f37a: c3 ret =============================================================================== 0010dc64 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 10dc64: 55 push %ebp 10dc65: 89 e5 mov %esp,%ebp 10dc67: 56 push %esi 10dc68: 53 push %ebx 10dc69: 83 ec 10 sub $0x10,%esp 10dc6c: 8b 45 08 mov 0x8(%ebp),%eax 10dc6f: 8b 5d 0c mov 0xc(%ebp),%ebx 10dc72: 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() ) 10dc75: 80 3d e4 71 12 00 00 cmpb $0x0,0x1271e4 10dc7c: 74 66 je 10dce4 /* * 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 ) 10dc7e: 83 fb 0f cmp $0xf,%ebx 10dc81: 77 39 ja 10dcbc /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10dc83: 85 c0 test %eax,%eax 10dc85: 74 41 je 10dcc8 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10dc87: 8b 15 f8 b6 12 00 mov 0x12b6f8,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10dc8d: 3b 42 08 cmp 0x8(%edx),%eax 10dc90: 74 3c je 10dcce api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10dc92: 83 ec 08 sub $0x8,%esp 10dc95: 8d 55 f4 lea -0xc(%ebp),%edx 10dc98: 52 push %edx 10dc99: 50 push %eax 10dc9a: e8 4d 1d 00 00 call 10f9ec <_Thread_Get> switch ( location ) { 10dc9f: 83 c4 10 add $0x10,%esp 10dca2: 8b 55 f4 mov -0xc(%ebp),%edx 10dca5: 85 d2 test %edx,%edx 10dca7: 75 47 jne 10dcf0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10dca9: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10dcaf: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) _Thread_Enable_dispatch(); 10dcb3: e8 10 1d 00 00 call 10f9c8 <_Thread_Enable_dispatch> 10dcb8: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10dcba: eb 05 jmp 10dcc1 /* * 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 ) 10dcbc: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10dcc1: 8d 65 f8 lea -0x8(%ebp),%esp 10dcc4: 5b pop %ebx 10dcc5: 5e pop %esi 10dcc6: c9 leave 10dcc7: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10dcc8: 8b 15 f8 b6 12 00 mov 0x12b6f8,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10dcce: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax 10dcd4: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) 10dcd8: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10dcda: 8d 65 f8 lea -0x8(%ebp),%esp 10dcdd: 5b pop %ebx 10dcde: 5e pop %esi 10dcdf: c9 leave 10dce0: c3 ret 10dce1: 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() ) 10dce4: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10dce9: 8d 65 f8 lea -0x8(%ebp),%esp 10dcec: 5b pop %ebx 10dced: 5e pop %esi 10dcee: c9 leave 10dcef: c3 ret api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 10dcf0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10dcf5: 8d 65 f8 lea -0x8(%ebp),%esp 10dcf8: 5b pop %ebx 10dcf9: 5e pop %esi 10dcfa: c9 leave 10dcfb: c3 ret =============================================================================== 0010ffe8 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10ffe8: 55 push %ebp 10ffe9: 89 e5 mov %esp,%ebp 10ffeb: 56 push %esi 10ffec: 53 push %ebx 10ffed: 83 ec 10 sub $0x10,%esp 10fff0: 8b 5d 0c mov 0xc(%ebp),%ebx 10fff3: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10fff6: 85 db test %ebx,%ebx 10fff8: 74 0b je 110005 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10fffa: 0f b6 05 14 72 12 00 movzbl 0x127214,%eax 110001: 39 c3 cmp %eax,%ebx 110003: 77 5f ja 110064 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 110005: 85 f6 test %esi,%esi 110007: 74 67 je 110070 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 110009: 83 ec 08 sub $0x8,%esp 11000c: 8d 45 f4 lea -0xc(%ebp),%eax 11000f: 50 push %eax 110010: ff 75 08 pushl 0x8(%ebp) 110013: e8 4c 1d 00 00 call 111d64 <_Thread_Get> switch ( location ) { 110018: 83 c4 10 add $0x10,%esp 11001b: 8b 55 f4 mov -0xc(%ebp),%edx 11001e: 85 d2 test %edx,%edx 110020: 75 36 jne 110058 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 110022: 8b 50 14 mov 0x14(%eax),%edx 110025: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 110027: 85 db test %ebx,%ebx 110029: 74 1c je 110047 the_thread->real_priority = new_priority; 11002b: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 11002e: 8b 48 1c mov 0x1c(%eax),%ecx 110031: 85 c9 test %ecx,%ecx 110033: 74 05 je 11003a the_thread->current_priority > new_priority ) 110035: 3b 58 14 cmp 0x14(%eax),%ebx 110038: 73 0d jae 110047 <== ALWAYS TAKEN _Thread_Change_priority( the_thread, new_priority, false ); 11003a: 52 push %edx 11003b: 6a 00 push $0x0 11003d: 53 push %ebx 11003e: 50 push %eax 11003f: e8 e8 17 00 00 call 11182c <_Thread_Change_priority> 110044: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 110047: e8 c8 1c 00 00 call 111d14 <_Thread_Enable_dispatch> 11004c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11004e: 8d 65 f8 lea -0x8(%ebp),%esp 110051: 5b pop %ebx 110052: 5e pop %esi 110053: c9 leave 110054: c3 ret 110055: 8d 76 00 lea 0x0(%esi),%esi if ( !old_priority ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 110058: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11005d: 8d 65 f8 lea -0x8(%ebp),%esp 110060: 5b pop %ebx 110061: 5e pop %esi 110062: c9 leave 110063: c3 ret 110064: b8 13 00 00 00 mov $0x13,%eax 110069: 8d 65 f8 lea -0x8(%ebp),%esp 11006c: 5b pop %ebx 11006d: 5e pop %esi 11006e: c9 leave 11006f: c3 ret if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 110070: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110075: 8d 65 f8 lea -0x8(%ebp),%esp 110078: 5b pop %ebx 110079: 5e pop %esi 11007a: c9 leave 11007b: c3 ret =============================================================================== 0010c124 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 10c124: 55 push %ebp 10c125: 89 e5 mov %esp,%ebp 10c127: 53 push %ebx 10c128: 83 ec 14 sub $0x14,%esp 10c12b: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10c12e: 85 db test %ebx,%ebx 10c130: 74 4e je 10c180 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10c132: 83 ec 08 sub $0x8,%esp 10c135: 8d 45 f4 lea -0xc(%ebp),%eax 10c138: 50 push %eax 10c139: ff 75 08 pushl 0x8(%ebp) 10c13c: e8 6f 1a 00 00 call 10dbb0 <_Thread_Get> switch ( location ) { 10c141: 83 c4 10 add $0x10,%esp 10c144: 8b 55 f4 mov -0xc(%ebp),%edx 10c147: 85 d2 test %edx,%edx 10c149: 75 29 jne 10c174 case OBJECTS_LOCAL: if ( _Thread_Start( 10c14b: 83 ec 0c sub $0xc,%esp 10c14e: ff 75 10 pushl 0x10(%ebp) 10c151: 6a 00 push $0x0 10c153: 53 push %ebx 10c154: 6a 00 push $0x0 10c156: 50 push %eax 10c157: e8 20 25 00 00 call 10e67c <_Thread_Start> 10c15c: 83 c4 20 add $0x20,%esp 10c15f: 84 c0 test %al,%al 10c161: 75 29 jne 10c18c the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10c163: e8 24 1a 00 00 call 10db8c <_Thread_Enable_dispatch> 10c168: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c16d: 8b 5d fc mov -0x4(%ebp),%ebx 10c170: c9 leave 10c171: c3 ret 10c172: 66 90 xchg %ax,%ax if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 10c174: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c179: 8b 5d fc mov -0x4(%ebp),%ebx 10c17c: c9 leave 10c17d: c3 ret 10c17e: 66 90 xchg %ax,%ax ) { register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10c180: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c185: 8b 5d fc mov -0x4(%ebp),%ebx 10c188: c9 leave 10c189: c3 ret 10c18a: 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(); 10c18c: e8 fb 19 00 00 call 10db8c <_Thread_Enable_dispatch> 10c191: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c193: 8b 5d fc mov -0x4(%ebp),%ebx 10c196: c9 leave 10c197: c3 ret =============================================================================== 00111554 : */ rtems_status_code rtems_task_suspend( rtems_id id ) { 111554: 55 push %ebp 111555: 89 e5 mov %esp,%ebp 111557: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 11155a: 8d 45 f4 lea -0xc(%ebp),%eax 11155d: 50 push %eax 11155e: ff 75 08 pushl 0x8(%ebp) 111561: e8 4a c6 ff ff call 10dbb0 <_Thread_Get> switch ( location ) { 111566: 83 c4 10 add $0x10,%esp 111569: 8b 55 f4 mov -0xc(%ebp),%edx 11156c: 85 d2 test %edx,%edx 11156e: 74 08 je 111578 111570: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111575: c9 leave 111576: c3 ret 111577: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 111578: f6 40 10 02 testb $0x2,0x10(%eax) 11157c: 74 0e je 11158c _Thread_Suspend( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 11157e: e8 09 c6 ff ff call 10db8c <_Thread_Enable_dispatch> 111583: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111588: c9 leave 111589: c3 ret 11158a: 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 ); 11158c: 83 ec 0c sub $0xc,%esp 11158f: 50 push %eax 111590: e8 43 0a 00 00 call 111fd8 <_Thread_Suspend> _Thread_Enable_dispatch(); 111595: e8 f2 c5 ff ff call 10db8c <_Thread_Enable_dispatch> 11159a: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11159c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11159f: c9 leave 1115a0: c3 ret =============================================================================== 00130998 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 130998: 55 push %ebp 130999: 89 e5 mov %esp,%ebp 13099b: 57 push %edi 13099c: 56 push %esi 13099d: 53 push %ebx 13099e: 83 ec 1c sub $0x1c,%esp 1309a1: 8b 5d 0c mov 0xc(%ebp),%ebx 1309a4: 8b 7d 10 mov 0x10(%ebp),%edi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 1309a7: 85 db test %ebx,%ebx 1309a9: 0f 84 9d 00 00 00 je 130a4c return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 1309af: 83 ec 08 sub $0x8,%esp 1309b2: 8d 45 e4 lea -0x1c(%ebp),%eax 1309b5: 50 push %eax 1309b6: ff 75 08 pushl 0x8(%ebp) 1309b9: e8 ae 4a fe ff call 11546c <_Thread_Get> 1309be: 89 c6 mov %eax,%esi switch (location) { 1309c0: 83 c4 10 add $0x10,%esp 1309c3: 8b 45 e4 mov -0x1c(%ebp),%eax 1309c6: 85 c0 test %eax,%eax 1309c8: 74 0e je 1309d8 1309ca: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1309cf: 8d 65 f4 lea -0xc(%ebp),%esp 1309d2: 5b pop %ebx 1309d3: 5e pop %esi 1309d4: 5f pop %edi 1309d5: c9 leave 1309d6: c3 ret 1309d7: 90 nop case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 1309d8: 8b 86 00 01 00 00 mov 0x100(%esi),%eax while (tvp) { 1309de: 85 c0 test %eax,%eax 1309e0: 75 44 jne 130a26 1309e2: 66 90 xchg %ax,%ax } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 1309e4: 83 ec 0c sub $0xc,%esp 1309e7: 6a 14 push $0x14 1309e9: e8 86 5b fe ff call 116574 <_Workspace_Allocate> _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 1309ee: 83 c4 10 add $0x10,%esp 1309f1: 85 c0 test %eax,%eax 1309f3: 74 4b je 130a40 _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 1309f5: 8b 13 mov (%ebx),%edx 1309f7: 89 50 08 mov %edx,0x8(%eax) new->ptr = ptr; 1309fa: 89 58 04 mov %ebx,0x4(%eax) new->dtor = dtor; 1309fd: 89 78 10 mov %edi,0x10(%eax) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 130a00: 8b 96 00 01 00 00 mov 0x100(%esi),%edx 130a06: 89 10 mov %edx,(%eax) the_thread->task_variables = new; 130a08: 89 86 00 01 00 00 mov %eax,0x100(%esi) _Thread_Enable_dispatch(); 130a0e: e8 09 4a fe ff call 11541c <_Thread_Enable_dispatch> 130a13: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 130a15: 8d 65 f4 lea -0xc(%ebp),%esp 130a18: 5b pop %ebx 130a19: 5e pop %esi 130a1a: 5f pop %edi 130a1b: c9 leave 130a1c: c3 ret 130a1d: 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; 130a20: 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) { 130a22: 85 c0 test %eax,%eax 130a24: 74 be je 1309e4 if (tvp->ptr == ptr) { 130a26: 39 58 04 cmp %ebx,0x4(%eax) 130a29: 75 f5 jne 130a20 tvp->dtor = dtor; 130a2b: 89 78 10 mov %edi,0x10(%eax) _Thread_Enable_dispatch(); 130a2e: e8 e9 49 fe ff call 11541c <_Thread_Enable_dispatch> 130a33: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 130a35: 8d 65 f4 lea -0xc(%ebp),%esp 130a38: 5b pop %ebx 130a39: 5e pop %esi 130a3a: 5f pop %edi 130a3b: c9 leave 130a3c: c3 ret 130a3d: 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(); 130a40: e8 d7 49 fe ff call 11541c <_Thread_Enable_dispatch> 130a45: b8 1a 00 00 00 mov $0x1a,%eax return RTEMS_NO_MEMORY; 130a4a: eb 83 jmp 1309cf { Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 130a4c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 130a51: 8d 65 f4 lea -0xc(%ebp),%esp 130a54: 5b pop %ebx 130a55: 5e pop %esi 130a56: 5f pop %edi 130a57: c9 leave 130a58: c3 ret =============================================================================== 00130a5c : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 130a5c: 55 push %ebp 130a5d: 89 e5 mov %esp,%ebp 130a5f: 53 push %ebx 130a60: 83 ec 14 sub $0x14,%esp 130a63: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 130a66: 85 db test %ebx,%ebx 130a68: 74 4c je 130ab6 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 130a6a: 83 ec 08 sub $0x8,%esp 130a6d: 8d 45 f4 lea -0xc(%ebp),%eax 130a70: 50 push %eax 130a71: ff 75 08 pushl 0x8(%ebp) 130a74: e8 f3 49 fe ff call 11546c <_Thread_Get> switch (location) { 130a79: 83 c4 10 add $0x10,%esp 130a7c: 8b 55 f4 mov -0xc(%ebp),%edx 130a7f: 85 d2 test %edx,%edx 130a81: 74 0d je 130a90 130a83: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 130a88: 8b 5d fc mov -0x4(%ebp),%ebx 130a8b: c9 leave 130a8c: c3 ret 130a8d: 8d 76 00 lea 0x0(%esi),%esi the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; 130a90: 8b 90 00 01 00 00 mov 0x100(%eax),%edx while (tvp) { 130a96: 85 d2 test %edx,%edx 130a98: 74 17 je 130ab1 if (tvp->ptr == ptr) { 130a9a: 39 5a 04 cmp %ebx,0x4(%edx) 130a9d: 75 0a jne 130aa9 130a9f: eb 3c jmp 130add 130aa1: 8d 76 00 lea 0x0(%esi),%esi 130aa4: 39 5a 04 cmp %ebx,0x4(%edx) 130aa7: 74 17 je 130ac0 else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 130aa9: 89 d1 mov %edx,%ecx } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 130aab: 8b 12 mov (%edx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 130aad: 85 d2 test %edx,%edx 130aaf: 75 f3 jne 130aa4 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 130ab1: e8 66 49 fe ff call 11541c <_Thread_Enable_dispatch> 130ab6: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 130abb: 8b 5d fc mov -0x4(%ebp),%ebx 130abe: c9 leave 130abf: c3 ret case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 130ac0: 8b 1a mov (%edx),%ebx 130ac2: 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 ); 130ac4: 83 ec 08 sub $0x8,%esp 130ac7: 52 push %edx 130ac8: 50 push %eax 130ac9: e8 a2 00 00 00 call 130b70 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 130ace: e8 49 49 fe ff call 11541c <_Thread_Enable_dispatch> 130ad3: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 130ad5: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 130ad8: 8b 5d fc mov -0x4(%ebp),%ebx 130adb: c9 leave 130adc: 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; 130add: 8b 0a mov (%edx),%ecx 130adf: 89 88 00 01 00 00 mov %ecx,0x100(%eax) 130ae5: eb dd jmp 130ac4 =============================================================================== 00130ae8 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 130ae8: 55 push %ebp 130ae9: 89 e5 mov %esp,%ebp 130aeb: 56 push %esi 130aec: 53 push %ebx 130aed: 83 ec 10 sub $0x10,%esp 130af0: 8b 5d 0c mov 0xc(%ebp),%ebx 130af3: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 130af6: 85 db test %ebx,%ebx 130af8: 74 56 je 130b50 return RTEMS_INVALID_ADDRESS; if ( !result ) 130afa: 85 f6 test %esi,%esi 130afc: 74 52 je 130b50 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 130afe: 83 ec 08 sub $0x8,%esp 130b01: 8d 45 f4 lea -0xc(%ebp),%eax 130b04: 50 push %eax 130b05: ff 75 08 pushl 0x8(%ebp) 130b08: e8 5f 49 fe ff call 11546c <_Thread_Get> switch (location) { 130b0d: 83 c4 10 add $0x10,%esp 130b10: 8b 55 f4 mov -0xc(%ebp),%edx 130b13: 85 d2 test %edx,%edx 130b15: 75 2d jne 130b44 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 130b17: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 130b1d: 85 c0 test %eax,%eax 130b1f: 75 09 jne 130b2a 130b21: eb 39 jmp 130b5c 130b23: 90 nop */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 130b24: 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) { 130b26: 85 c0 test %eax,%eax 130b28: 74 32 je 130b5c <== NEVER TAKEN if (tvp->ptr == ptr) { 130b2a: 39 58 04 cmp %ebx,0x4(%eax) 130b2d: 75 f5 jne 130b24 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 130b2f: 8b 40 0c mov 0xc(%eax),%eax 130b32: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 130b34: e8 e3 48 fe ff call 11541c <_Thread_Enable_dispatch> 130b39: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 130b3b: 8d 65 f8 lea -0x8(%ebp),%esp 130b3e: 5b pop %ebx 130b3f: 5e pop %esi 130b40: c9 leave 130b41: c3 ret 130b42: 66 90 xchg %ax,%ax if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 130b44: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 130b49: 8d 65 f8 lea -0x8(%ebp),%esp 130b4c: 5b pop %ebx 130b4d: 5e pop %esi 130b4e: c9 leave 130b4f: c3 ret return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; 130b50: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 130b55: 8d 65 f8 lea -0x8(%ebp),%esp 130b58: 5b pop %ebx 130b59: 5e pop %esi 130b5a: c9 leave 130b5b: c3 ret _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 130b5c: e8 bb 48 fe ff call 11541c <_Thread_Enable_dispatch> 130b61: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 130b66: 8d 65 f8 lea -0x8(%ebp),%esp 130b69: 5b pop %ebx 130b6a: 5e pop %esi 130b6b: c9 leave 130b6c: c3 ret =============================================================================== 0010cfc4 : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 10cfc4: 55 push %ebp 10cfc5: 89 e5 mov %esp,%ebp 10cfc7: 53 push %ebx 10cfc8: 83 ec 14 sub $0x14,%esp 10cfcb: 8b 5d 08 mov 0x8(%ebp),%ebx Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10cfce: 80 3d 6c a9 12 00 00 cmpb $0x0,0x12a96c 10cfd5: 0f 84 a9 00 00 00 je 10d084 return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10cfdb: 85 db test %ebx,%ebx 10cfdd: 0f 84 ad 00 00 00 je 10d090 return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 10cfe3: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) if ( !_TOD_Validate( time_buffer ) ) 10cfea: 83 ec 0c sub $0xc,%esp 10cfed: 53 push %ebx 10cfee: e8 ed f3 ff ff call 10c3e0 <_TOD_Validate> 10cff3: 83 c4 10 add $0x10,%esp 10cff6: 84 c0 test %al,%al 10cff8: 75 0a jne 10d004 _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10cffa: b8 14 00 00 00 mov $0x14,%eax } 10cfff: 8b 5d fc mov -0x4(%ebp),%ebx 10d002: c9 leave 10d003: c3 ret time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 10d004: 83 ec 0c sub $0xc,%esp 10d007: 53 push %ebx 10d008: e8 47 f3 ff ff call 10c354 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 10d00d: 83 c4 10 add $0x10,%esp 10d010: 3b 05 ec a9 12 00 cmp 0x12a9ec,%eax 10d016: 76 e2 jbe 10cffa 10d018: 8b 15 58 a9 12 00 mov 0x12a958,%edx 10d01e: 42 inc %edx 10d01f: 89 15 58 a9 12 00 mov %edx,0x12a958 return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 10d025: 83 ec 08 sub $0x8,%esp 10d028: 6a 10 push $0x10 10d02a: ff 35 18 aa 12 00 pushl 0x12aa18 10d030: 89 45 f4 mov %eax,-0xc(%ebp) 10d033: e8 1c 23 00 00 call 10f354 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10d038: 8b 15 18 aa 12 00 mov 0x12aa18,%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( 10d03e: 8b 4a 08 mov 0x8(%edx),%ecx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10d041: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 10d048: c7 42 64 0c e9 10 00 movl $0x10e90c,0x64(%edx) the_watchdog->id = id; 10d04f: 89 4a 68 mov %ecx,0x68(%edx) the_watchdog->user_data = user_data; 10d052: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10d059: 8b 45 f4 mov -0xc(%ebp),%eax 10d05c: 2b 05 ec a9 12 00 sub 0x12a9ec,%eax 10d062: 89 42 54 mov %eax,0x54(%edx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 10d065: 58 pop %eax 10d066: 59 pop %ecx 10d067: 83 c2 48 add $0x48,%edx 10d06a: 52 push %edx 10d06b: 68 2c aa 12 00 push $0x12aa2c 10d070: e8 a7 29 00 00 call 10fa1c <_Watchdog_Insert> ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 10d075: e8 2a 1a 00 00 call 10eaa4 <_Thread_Enable_dispatch> 10d07a: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10d07c: 83 c4 10 add $0x10,%esp 10d07f: e9 7b ff ff ff jmp 10cfff rtems_time_of_day *time_buffer ) { Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10d084: b8 0b 00 00 00 mov $0xb,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10d089: 8b 5d fc mov -0x4(%ebp),%ebx 10d08c: c9 leave 10d08d: c3 ret 10d08e: 66 90 xchg %ax,%ax Watchdog_Interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10d090: b8 09 00 00 00 mov $0x9,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10d095: 8b 5d fc mov -0x4(%ebp),%ebx 10d098: c9 leave 10d099: c3 ret =============================================================================== 00118fbc : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 118fbc: 55 push %ebp 118fbd: 89 e5 mov %esp,%ebp 118fbf: 83 ec 1c sub $0x1c,%esp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 118fc2: 8d 45 f4 lea -0xc(%ebp),%eax 118fc5: 50 push %eax 118fc6: ff 75 08 pushl 0x8(%ebp) 118fc9: 68 e0 2a 14 00 push $0x142ae0 118fce: e8 ad 28 00 00 call 11b880 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 118fd3: 83 c4 10 add $0x10,%esp 118fd6: 8b 55 f4 mov -0xc(%ebp),%edx 118fd9: 85 d2 test %edx,%edx 118fdb: 74 07 je 118fe4 118fdd: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118fe2: c9 leave 118fe3: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 118fe4: 83 78 38 04 cmpl $0x4,0x38(%eax) 118fe8: 74 0f je 118ff9 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 118fea: 83 ec 0c sub $0xc,%esp 118fed: 83 c0 10 add $0x10,%eax 118ff0: 50 push %eax 118ff1: e8 22 45 00 00 call 11d518 <_Watchdog_Remove> 118ff6: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 118ff9: e8 32 31 00 00 call 11c130 <_Thread_Enable_dispatch> 118ffe: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 119000: c9 leave 119001: c3 ret =============================================================================== 00119004 : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 119004: 55 push %ebp 119005: 89 e5 mov %esp,%ebp 119007: 57 push %edi 119008: 56 push %esi 119009: 53 push %ebx 11900a: 83 ec 0c sub $0xc,%esp 11900d: 8b 5d 08 mov 0x8(%ebp),%ebx 119010: 8b 75 0c mov 0xc(%ebp),%esi Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 119013: 85 db test %ebx,%ebx 119015: 74 6d je 119084 return RTEMS_INVALID_NAME; if ( !id ) 119017: 85 f6 test %esi,%esi 119019: 0f 84 89 00 00 00 je 1190a8 11901f: a1 78 27 14 00 mov 0x142778,%eax 119024: 40 inc %eax 119025: a3 78 27 14 00 mov %eax,0x142778 * 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 ); 11902a: 83 ec 0c sub $0xc,%esp 11902d: 68 e0 2a 14 00 push $0x142ae0 119032: e8 5d 23 00 00 call 11b394 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 119037: 83 c4 10 add $0x10,%esp 11903a: 85 c0 test %eax,%eax 11903c: 74 56 je 119094 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 11903e: 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; 119045: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 11904c: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 119053: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 11905a: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 119061: 8b 50 08 mov 0x8(%eax),%edx 119064: 0f b7 fa movzwl %dx,%edi 119067: 8b 0d fc 2a 14 00 mov 0x142afc,%ecx 11906d: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 119070: 89 58 0c mov %ebx,0xc(%eax) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 119073: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 119075: e8 b6 30 00 00 call 11c130 <_Thread_Enable_dispatch> 11907a: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 11907c: 8d 65 f4 lea -0xc(%ebp),%esp 11907f: 5b pop %ebx 119080: 5e pop %esi 119081: 5f pop %edi 119082: c9 leave 119083: c3 ret rtems_id *id ) { Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 119084: b8 03 00 00 00 mov $0x3,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 119089: 8d 65 f4 lea -0xc(%ebp),%esp 11908c: 5b pop %ebx 11908d: 5e pop %esi 11908e: 5f pop %edi 11908f: c9 leave 119090: c3 ret 119091: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { _Thread_Enable_dispatch(); 119094: e8 97 30 00 00 call 11c130 <_Thread_Enable_dispatch> 119099: b8 05 00 00 00 mov $0x5,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11909e: 8d 65 f4 lea -0xc(%ebp),%esp 1190a1: 5b pop %ebx 1190a2: 5e pop %esi 1190a3: 5f pop %edi 1190a4: c9 leave 1190a5: c3 ret 1190a6: 66 90 xchg %ax,%ax Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 1190a8: b8 09 00 00 00 mov $0x9,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1190ad: 8d 65 f4 lea -0xc(%ebp),%esp 1190b0: 5b pop %ebx 1190b1: 5e pop %esi 1190b2: 5f pop %edi 1190b3: c9 leave 1190b4: c3 ret =============================================================================== 001190b8 : */ rtems_status_code rtems_timer_delete( rtems_id id ) { 1190b8: 55 push %ebp 1190b9: 89 e5 mov %esp,%ebp 1190bb: 53 push %ebx 1190bc: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 1190bf: 8d 45 f4 lea -0xc(%ebp),%eax 1190c2: 50 push %eax 1190c3: ff 75 08 pushl 0x8(%ebp) 1190c6: 68 e0 2a 14 00 push $0x142ae0 1190cb: e8 b0 27 00 00 call 11b880 <_Objects_Get> 1190d0: 89 c3 mov %eax,%ebx Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1190d2: 83 c4 10 add $0x10,%esp 1190d5: 8b 4d f4 mov -0xc(%ebp),%ecx 1190d8: 85 c9 test %ecx,%ecx 1190da: 75 38 jne 119114 case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); 1190dc: 83 ec 08 sub $0x8,%esp 1190df: 50 push %eax 1190e0: 68 e0 2a 14 00 push $0x142ae0 1190e5: e8 26 23 00 00 call 11b410 <_Objects_Close> (void) _Watchdog_Remove( &the_timer->Ticker ); 1190ea: 8d 43 10 lea 0x10(%ebx),%eax 1190ed: 89 04 24 mov %eax,(%esp) 1190f0: e8 23 44 00 00 call 11d518 <_Watchdog_Remove> */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 1190f5: 58 pop %eax 1190f6: 5a pop %edx 1190f7: 53 push %ebx 1190f8: 68 e0 2a 14 00 push $0x142ae0 1190fd: e8 12 26 00 00 call 11b714 <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 119102: e8 29 30 00 00 call 11c130 <_Thread_Enable_dispatch> 119107: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 119109: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11910c: 8b 5d fc mov -0x4(%ebp),%ebx 11910f: c9 leave 119110: c3 ret 119111: 8d 76 00 lea 0x0(%esi),%esi { Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 119114: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 119119: 8b 5d fc mov -0x4(%ebp),%ebx 11911c: c9 leave 11911d: c3 ret =============================================================================== 00119120 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 119120: 55 push %ebp 119121: 89 e5 mov %esp,%ebp 119123: 57 push %edi 119124: 56 push %esi 119125: 53 push %ebx 119126: 83 ec 2c sub $0x2c,%esp 119129: 8b 5d 0c mov 0xc(%ebp),%ebx 11912c: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 11912f: 85 db test %ebx,%ebx 119131: 0f 84 99 00 00 00 je 1191d0 return RTEMS_INVALID_NUMBER; if ( !routine ) 119137: 85 f6 test %esi,%esi 119139: 0f 84 b1 00 00 00 je 1191f0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 11913f: 57 push %edi 119140: 8d 45 e4 lea -0x1c(%ebp),%eax 119143: 50 push %eax 119144: ff 75 08 pushl 0x8(%ebp) 119147: 68 e0 2a 14 00 push $0x142ae0 11914c: e8 2f 27 00 00 call 11b880 <_Objects_Get> 119151: 89 c7 mov %eax,%edi return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 119153: 83 c4 10 add $0x10,%esp 119156: 8b 4d e4 mov -0x1c(%ebp),%ecx 119159: 85 c9 test %ecx,%ecx 11915b: 74 0f je 11916c 11915d: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 119162: 8d 65 f4 lea -0xc(%ebp),%esp 119165: 5b pop %ebx 119166: 5e pop %esi 119167: 5f pop %edi 119168: c9 leave 119169: c3 ret 11916a: 66 90 xchg %ax,%ax the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 11916c: 8d 50 10 lea 0x10(%eax),%edx 11916f: 83 ec 0c sub $0xc,%esp 119172: 52 push %edx 119173: 89 55 d4 mov %edx,-0x2c(%ebp) 119176: e8 9d 43 00 00 call 11d518 <_Watchdog_Remove> _ISR_Disable( level ); 11917b: 9c pushf 11917c: fa cli 11917d: 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 ) { 11917e: 83 c4 10 add $0x10,%esp 119181: 8b 57 18 mov 0x18(%edi),%edx 119184: 85 d2 test %edx,%edx 119186: 8b 55 d4 mov -0x2c(%ebp),%edx 119189: 75 55 jne 1191e0 /* * 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; 11918b: 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; 119192: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 119199: 89 77 2c mov %esi,0x2c(%edi) the_watchdog->id = id; 11919c: 8b 4d 08 mov 0x8(%ebp),%ecx 11919f: 89 4f 30 mov %ecx,0x30(%edi) the_watchdog->user_data = user_data; 1191a2: 8b 4d 14 mov 0x14(%ebp),%ecx 1191a5: 89 4f 34 mov %ecx,0x34(%edi) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 1191a8: 50 push %eax 1191a9: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1191aa: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 1191ad: 83 ec 08 sub $0x8,%esp 1191b0: 52 push %edx 1191b1: 68 58 28 14 00 push $0x142858 1191b6: e8 35 42 00 00 call 11d3f0 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 1191bb: e8 70 2f 00 00 call 11c130 <_Thread_Enable_dispatch> 1191c0: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1191c2: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1191c5: 8d 65 f4 lea -0xc(%ebp),%esp 1191c8: 5b pop %ebx 1191c9: 5e pop %esi 1191ca: 5f pop %edi 1191cb: c9 leave 1191cc: c3 ret 1191cd: 8d 76 00 lea 0x0(%esi),%esi { Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 1191d0: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1191d5: 8d 65 f4 lea -0xc(%ebp),%esp 1191d8: 5b pop %ebx 1191d9: 5e pop %esi 1191da: 5f pop %edi 1191db: c9 leave 1191dc: c3 ret 1191dd: 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 ); 1191e0: 50 push %eax 1191e1: 9d popf _Thread_Enable_dispatch(); 1191e2: e8 49 2f 00 00 call 11c130 <_Thread_Enable_dispatch> 1191e7: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1191e9: e9 74 ff ff ff jmp 119162 1191ee: 66 90 xchg %ax,%ax ISR_Level level; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) 1191f0: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1191f5: 8d 65 f4 lea -0xc(%ebp),%esp 1191f8: 5b pop %ebx 1191f9: 5e pop %esi 1191fa: 5f pop %edi 1191fb: c9 leave 1191fc: c3 ret =============================================================================== 00119200 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 119200: 55 push %ebp 119201: 89 e5 mov %esp,%ebp 119203: 57 push %edi 119204: 56 push %esi 119205: 53 push %ebx 119206: 83 ec 2c sub $0x2c,%esp 119209: 8b 75 08 mov 0x8(%ebp),%esi 11920c: 8b 7d 0c mov 0xc(%ebp),%edi 11920f: 8b 5d 10 mov 0x10(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 119212: 80 3d 8c 27 14 00 00 cmpb $0x0,0x14278c 119219: 75 0d jne 119228 11921b: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 119220: 8d 65 f4 lea -0xc(%ebp),%esp 119223: 5b pop %ebx 119224: 5e pop %esi 119225: 5f pop %edi 119226: c9 leave 119227: c3 ret rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 119228: 83 ec 0c sub $0xc,%esp 11922b: 57 push %edi 11922c: e8 7b d4 ff ff call 1166ac <_TOD_Validate> 119231: 83 c4 10 add $0x10,%esp 119234: 84 c0 test %al,%al 119236: 74 1e je 119256 return RTEMS_INVALID_CLOCK; if ( !routine ) 119238: 85 db test %ebx,%ebx 11923a: 0f 84 a4 00 00 00 je 1192e4 return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 119240: 83 ec 0c sub $0xc,%esp 119243: 57 push %edi 119244: e8 d7 d3 ff ff call 116620 <_TOD_To_seconds> 119249: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 11924b: 83 c4 10 add $0x10,%esp 11924e: 3b 05 0c 28 14 00 cmp 0x14280c,%eax 119254: 77 0e ja 119264 _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 119256: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11925b: 8d 65 f4 lea -0xc(%ebp),%esp 11925e: 5b pop %ebx 11925f: 5e pop %esi 119260: 5f pop %edi 119261: c9 leave 119262: c3 ret 119263: 90 nop 119264: 50 push %eax 119265: 8d 45 e4 lea -0x1c(%ebp),%eax 119268: 50 push %eax 119269: 56 push %esi 11926a: 68 e0 2a 14 00 push $0x142ae0 11926f: e8 0c 26 00 00 call 11b880 <_Objects_Get> seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 119274: 83 c4 10 add $0x10,%esp 119277: 8b 4d e4 mov -0x1c(%ebp),%ecx 11927a: 85 c9 test %ecx,%ecx 11927c: 75 5a jne 1192d8 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 11927e: 8d 48 10 lea 0x10(%eax),%ecx 119281: 83 ec 0c sub $0xc,%esp 119284: 51 push %ecx 119285: 89 45 d4 mov %eax,-0x2c(%ebp) 119288: 89 4d d0 mov %ecx,-0x30(%ebp) 11928b: e8 88 42 00 00 call 11d518 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY; 119290: 8b 55 d4 mov -0x2c(%ebp),%edx 119293: 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; 11929a: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 1192a1: 89 5a 2c mov %ebx,0x2c(%edx) the_watchdog->id = id; 1192a4: 89 72 30 mov %esi,0x30(%edx) the_watchdog->user_data = user_data; 1192a7: 8b 45 14 mov 0x14(%ebp),%eax 1192aa: 89 42 34 mov %eax,0x34(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1192ad: 2b 3d 0c 28 14 00 sub 0x14280c,%edi 1192b3: 89 7a 1c mov %edi,0x1c(%edx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 1192b6: 58 pop %eax 1192b7: 5a pop %edx 1192b8: 8b 4d d0 mov -0x30(%ebp),%ecx 1192bb: 51 push %ecx 1192bc: 68 4c 28 14 00 push $0x14284c 1192c1: e8 2a 41 00 00 call 11d3f0 <_Watchdog_Insert> _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 1192c6: e8 65 2e 00 00 call 11c130 <_Thread_Enable_dispatch> 1192cb: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1192cd: 83 c4 10 add $0x10,%esp 1192d0: e9 4b ff ff ff jmp 119220 1192d5: 8d 76 00 lea 0x0(%esi),%esi seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1192d8: b8 04 00 00 00 mov $0x4,%eax 1192dd: e9 3e ff ff ff jmp 119220 1192e2: 66 90 xchg %ax,%ax return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) 1192e4: b8 09 00 00 00 mov $0x9,%eax 1192e9: e9 32 ff ff ff jmp 119220 =============================================================================== 00119600 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 119600: 55 push %ebp 119601: 89 e5 mov %esp,%ebp 119603: 56 push %esi 119604: 53 push %ebx 119605: 83 ec 10 sub $0x10,%esp 119608: 8b 45 08 mov 0x8(%ebp),%eax 11960b: 85 c0 test %eax,%eax 11960d: 75 0d jne 11961c if (status) { initialized = false; } #endif return status; 11960f: b8 13 00 00 00 mov $0x13,%eax } 119614: 8d 65 f8 lea -0x8(%ebp),%esp 119617: 5b pop %ebx 119618: 5e pop %esi 119619: c9 leave 11961a: c3 ret 11961b: 90 nop 11961c: 0f b6 15 14 a2 13 00 movzbl 0x13a214,%edx 119623: 39 d0 cmp %edx,%eax 119625: 76 35 jbe 11965c * 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 ) 119627: 40 inc %eax 119628: 75 e5 jne 11960f 11962a: 31 f6 xor %esi,%esi 11962c: 8b 15 78 27 14 00 mov 0x142778,%edx 119632: 42 inc %edx 119633: 89 15 78 27 14 00 mov %edx,0x142778 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 119639: 8a 1d 00 e0 13 00 mov 0x13e000,%bl initialized = true; 11963f: c6 05 00 e0 13 00 01 movb $0x1,0x13e000 _Thread_Enable_dispatch(); 119646: e8 e5 2a 00 00 call 11c130 <_Thread_Enable_dispatch> if ( tmpInitialized ) 11964b: 84 db test %bl,%bl 11964d: 74 11 je 119660 11964f: b8 0e 00 00 00 mov $0xe,%eax initialized = false; } #endif return status; } 119654: 8d 65 f8 lea -0x8(%ebp),%esp 119657: 5b pop %ebx 119658: 5e pop %esi 119659: c9 leave 11965a: c3 ret 11965b: 90 nop 11965c: 89 c6 mov %eax,%esi 11965e: eb cc jmp 11962c * 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( 119660: 83 ec 08 sub $0x8,%esp 119663: 8d 45 f4 lea -0xc(%ebp),%eax 119666: 50 push %eax 119667: 8b 45 10 mov 0x10(%ebp),%eax 11966a: 80 cc 80 or $0x80,%ah 11966d: 50 push %eax 11966e: 68 00 01 00 00 push $0x100 119673: ff 75 0c pushl 0xc(%ebp) 119676: 56 push %esi 119677: 68 45 4d 49 54 push $0x54494d45 11967c: e8 87 f0 ff ff call 118708 /* 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) { 119681: 83 c4 20 add $0x20,%esp 119684: 85 c0 test %eax,%eax 119686: 74 10 je 119698 initialized = false; 119688: c6 05 00 e0 13 00 00 movb $0x0,0x13e000 initialized = false; } #endif return status; } 11968f: 8d 65 f8 lea -0x8(%ebp),%esp 119692: 5b pop %ebx 119693: 5e pop %esi 119694: c9 leave 119695: c3 ret 119696: 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) 119698: 8b 45 f4 mov -0xc(%ebp),%eax /* * 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( 11969b: 0f b7 c8 movzwl %ax,%ecx 11969e: 8b 15 1c 27 14 00 mov 0x14271c,%edx 1196a4: 8b 14 8a mov (%edx,%ecx,4),%edx 1196a7: 89 15 20 e0 13 00 mov %edx,0x13e020 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1196ad: c7 05 50 e0 13 00 54 movl $0x13e054,0x13e050 1196b4: e0 13 00 the_chain->permanent_null = NULL; 1196b7: c7 05 54 e0 13 00 00 movl $0x0,0x13e054 1196be: 00 00 00 the_chain->last = _Chain_Head(the_chain); 1196c1: c7 05 58 e0 13 00 50 movl $0x13e050,0x13e058 1196c8: e0 13 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1196cb: c7 05 88 e0 13 00 8c movl $0x13e08c,0x13e088 1196d2: e0 13 00 the_chain->permanent_null = NULL; 1196d5: c7 05 8c e0 13 00 00 movl $0x0,0x13e08c 1196dc: 00 00 00 the_chain->last = _Chain_Head(the_chain); 1196df: c7 05 90 e0 13 00 88 movl $0x13e088,0x13e090 1196e6: e0 13 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 1196e9: c7 05 30 e0 13 00 00 movl $0x0,0x13e030 1196f0: 00 00 00 the_watchdog->routine = routine; 1196f3: c7 05 44 e0 13 00 98 movl $0x11bf98,0x13e044 1196fa: bf 11 00 the_watchdog->id = id; 1196fd: a3 48 e0 13 00 mov %eax,0x13e048 the_watchdog->user_data = user_data; 119702: c7 05 4c e0 13 00 00 movl $0x0,0x13e04c 119709: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11970c: c7 05 68 e0 13 00 00 movl $0x0,0x13e068 119713: 00 00 00 the_watchdog->routine = routine; 119716: c7 05 7c e0 13 00 98 movl $0x11bf98,0x13e07c 11971d: bf 11 00 the_watchdog->id = id; 119720: a3 80 e0 13 00 mov %eax,0x13e080 the_watchdog->user_data = user_data; 119725: c7 05 84 e0 13 00 00 movl $0x0,0x13e084 11972c: 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; 11972f: c7 05 24 e0 13 00 d4 movl $0x1199d4,0x13e024 119736: 99 11 00 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 119739: 8b 15 e4 28 14 00 mov 0x1428e4,%edx 11973f: 89 15 5c e0 13 00 mov %edx,0x13e05c ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 119745: 8b 15 0c 28 14 00 mov 0x14280c,%edx 11974b: 89 15 94 e0 13 00 mov %edx,0x13e094 ts->insert_chain = NULL; 119751: c7 05 98 e0 13 00 00 movl $0x0,0x13e098 119758: 00 00 00 ts->active = false; 11975b: c6 05 9c e0 13 00 00 movb $0x0,0x13e09c /* * The default timer server is now available. */ _Timer_server = ts; 119762: c7 05 20 2b 14 00 20 movl $0x13e020,0x142b20 119769: e0 13 00 /* * Start the timer server */ status = rtems_task_start( 11976c: 52 push %edx 11976d: 68 20 e0 13 00 push $0x13e020 119772: 68 28 98 11 00 push $0x119828 119777: 50 push %eax 119778: e8 23 f6 ff ff call 118da0 if (status) { initialized = false; } #endif return status; 11977d: 83 c4 10 add $0x10,%esp 119780: e9 8f fe ff ff jmp 119614 =============================================================================== 00119378 : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 119378: 55 push %ebp 119379: 89 e5 mov %esp,%ebp 11937b: 56 push %esi 11937c: 53 push %ebx 11937d: 83 ec 24 sub $0x24,%esp 119380: 8d 45 f4 lea -0xc(%ebp),%eax 119383: 50 push %eax 119384: ff 75 08 pushl 0x8(%ebp) 119387: 68 e0 2a 14 00 push $0x142ae0 11938c: e8 ef 24 00 00 call 11b880 <_Objects_Get> 119391: 89 c3 mov %eax,%ebx Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); switch ( location ) { 119393: 83 c4 10 add $0x10,%esp 119396: 8b 45 f4 mov -0xc(%ebp),%eax 119399: 85 c0 test %eax,%eax 11939b: 74 0f je 1193ac 11939d: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1193a2: 8d 65 f8 lea -0x8(%ebp),%esp 1193a5: 5b pop %ebx 1193a6: 5e pop %esi 1193a7: c9 leave 1193a8: c3 ret 1193a9: 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 ) { 1193ac: 8b 43 38 mov 0x38(%ebx),%eax 1193af: 85 c0 test %eax,%eax 1193b1: 74 1d je 1193d0 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 1193b3: 48 dec %eax 1193b4: 74 3a je 1193f0 1193b6: b8 0b 00 00 00 mov $0xb,%eax * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 1193bb: 89 45 e4 mov %eax,-0x1c(%ebp) 1193be: e8 6d 2d 00 00 call 11c130 <_Thread_Enable_dispatch> 1193c3: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1193c6: 8d 65 f8 lea -0x8(%ebp),%esp 1193c9: 5b pop %ebx 1193ca: 5e pop %esi 1193cb: c9 leave 1193cc: c3 ret 1193cd: 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 ); 1193d0: 83 c3 10 add $0x10,%ebx 1193d3: 83 ec 0c sub $0xc,%esp 1193d6: 53 push %ebx 1193d7: e8 3c 41 00 00 call 11d518 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 1193dc: 59 pop %ecx 1193dd: 5e pop %esi 1193de: 53 push %ebx 1193df: 68 58 28 14 00 push $0x142858 1193e4: e8 07 40 00 00 call 11d3f0 <_Watchdog_Insert> 1193e9: 31 c0 xor %eax,%eax 1193eb: 83 c4 10 add $0x10,%esp 1193ee: eb cb jmp 1193bb } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { Timer_server_Control *timer_server = _Timer_server; 1193f0: 8b 35 20 2b 14 00 mov 0x142b20,%esi if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 1193f6: 83 ec 0c sub $0xc,%esp 1193f9: 8d 43 10 lea 0x10(%ebx),%eax 1193fc: 50 push %eax 1193fd: e8 16 41 00 00 call 11d518 <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 119402: 58 pop %eax 119403: 5a pop %edx 119404: 53 push %ebx 119405: 56 push %esi 119406: ff 56 04 call *0x4(%esi) 119409: 31 c0 xor %eax,%eax 11940b: 83 c4 10 add $0x10,%esp 11940e: eb ab jmp 1193bb =============================================================================== 00119410 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 119410: 55 push %ebp 119411: 89 e5 mov %esp,%ebp 119413: 57 push %edi 119414: 56 push %esi 119415: 53 push %ebx 119416: 83 ec 2c sub $0x2c,%esp 119419: 8b 7d 0c mov 0xc(%ebp),%edi 11941c: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 11941f: 8b 1d 20 2b 14 00 mov 0x142b20,%ebx if ( !timer_server ) 119425: 85 db test %ebx,%ebx 119427: 0f 84 9f 00 00 00 je 1194cc return RTEMS_INCORRECT_STATE; if ( !routine ) 11942d: 85 f6 test %esi,%esi 11942f: 0f 84 a3 00 00 00 je 1194d8 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 119435: 85 ff test %edi,%edi 119437: 75 0f jne 119448 119439: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11943e: 8d 65 f4 lea -0xc(%ebp),%esp 119441: 5b pop %ebx 119442: 5e pop %esi 119443: 5f pop %edi 119444: c9 leave 119445: c3 ret 119446: 66 90 xchg %ax,%ax 119448: 52 push %edx 119449: 8d 45 e4 lea -0x1c(%ebp),%eax 11944c: 50 push %eax 11944d: ff 75 08 pushl 0x8(%ebp) 119450: 68 e0 2a 14 00 push $0x142ae0 119455: e8 26 24 00 00 call 11b880 <_Objects_Get> 11945a: 89 c2 mov %eax,%edx if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 11945c: 83 c4 10 add $0x10,%esp 11945f: 8b 45 e4 mov -0x1c(%ebp),%eax 119462: 85 c0 test %eax,%eax 119464: 75 56 jne 1194bc case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 119466: 83 ec 0c sub $0xc,%esp 119469: 8d 42 10 lea 0x10(%edx),%eax 11946c: 50 push %eax 11946d: 89 55 d4 mov %edx,-0x2c(%ebp) 119470: e8 a3 40 00 00 call 11d518 <_Watchdog_Remove> _ISR_Disable( level ); 119475: 9c pushf 119476: fa cli 119477: 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 ) { 119478: 83 c4 10 add $0x10,%esp 11947b: 8b 55 d4 mov -0x2c(%ebp),%edx 11947e: 8b 4a 18 mov 0x18(%edx),%ecx 119481: 85 c9 test %ecx,%ecx 119483: 75 5f jne 1194e4 /* * 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; 119485: 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; 11948c: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 119493: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 119496: 8b 4d 08 mov 0x8(%ebp),%ecx 119499: 89 4a 30 mov %ecx,0x30(%edx) the_watchdog->user_data = user_data; 11949c: 8b 4d 14 mov 0x14(%ebp),%ecx 11949f: 89 4a 34 mov %ecx,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 1194a2: 89 7a 1c mov %edi,0x1c(%edx) _ISR_Enable( level ); 1194a5: 50 push %eax 1194a6: 9d popf (*timer_server->schedule_operation)( timer_server, the_timer ); 1194a7: 83 ec 08 sub $0x8,%esp 1194aa: 52 push %edx 1194ab: 53 push %ebx 1194ac: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 1194af: e8 7c 2c 00 00 call 11c130 <_Thread_Enable_dispatch> 1194b4: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1194b6: 83 c4 10 add $0x10,%esp 1194b9: eb 83 jmp 11943e 1194bb: 90 nop if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1194bc: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1194c1: 8d 65 f4 lea -0xc(%ebp),%esp 1194c4: 5b pop %ebx 1194c5: 5e pop %esi 1194c6: 5f pop %edi 1194c7: c9 leave 1194c8: c3 ret 1194c9: 8d 76 00 lea 0x0(%esi),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 1194cc: b8 0e 00 00 00 mov $0xe,%eax 1194d1: e9 68 ff ff ff jmp 11943e 1194d6: 66 90 xchg %ax,%ax return RTEMS_INCORRECT_STATE; if ( !routine ) 1194d8: b8 09 00 00 00 mov $0x9,%eax 1194dd: e9 5c ff ff ff jmp 11943e 1194e2: 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 ); 1194e4: 50 push %eax 1194e5: 9d popf _Thread_Enable_dispatch(); 1194e6: e8 45 2c 00 00 call 11c130 <_Thread_Enable_dispatch> 1194eb: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1194ed: e9 4c ff ff ff jmp 11943e =============================================================================== 001194f4 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 1194f4: 55 push %ebp 1194f5: 89 e5 mov %esp,%ebp 1194f7: 57 push %edi 1194f8: 56 push %esi 1194f9: 53 push %ebx 1194fa: 83 ec 2c sub $0x2c,%esp 1194fd: 8b 7d 0c mov 0xc(%ebp),%edi 119500: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 119503: 8b 1d 20 2b 14 00 mov 0x142b20,%ebx if ( !timer_server ) 119509: 85 db test %ebx,%ebx 11950b: 0f 84 d7 00 00 00 je 1195e8 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 119511: 80 3d 8c 27 14 00 00 cmpb $0x0,0x14278c 119518: 0f 84 aa 00 00 00 je 1195c8 <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 11951e: 85 f6 test %esi,%esi 119520: 0f 84 b2 00 00 00 je 1195d8 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 119526: 83 ec 0c sub $0xc,%esp 119529: 57 push %edi 11952a: e8 7d d1 ff ff call 1166ac <_TOD_Validate> 11952f: 83 c4 10 add $0x10,%esp 119532: 84 c0 test %al,%al 119534: 75 0e jne 119544 the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 119536: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11953b: 8d 65 f4 lea -0xc(%ebp),%esp 11953e: 5b pop %ebx 11953f: 5e pop %esi 119540: 5f pop %edi 119541: c9 leave 119542: c3 ret 119543: 90 nop return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 119544: 83 ec 0c sub $0xc,%esp 119547: 57 push %edi 119548: e8 d3 d0 ff ff call 116620 <_TOD_To_seconds> 11954d: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 11954f: 83 c4 10 add $0x10,%esp 119552: 3b 05 0c 28 14 00 cmp 0x14280c,%eax 119558: 76 dc jbe 119536 11955a: 52 push %edx 11955b: 8d 45 e4 lea -0x1c(%ebp),%eax 11955e: 50 push %eax 11955f: ff 75 08 pushl 0x8(%ebp) 119562: 68 e0 2a 14 00 push $0x142ae0 119567: e8 14 23 00 00 call 11b880 <_Objects_Get> 11956c: 89 c2 mov %eax,%edx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 11956e: 83 c4 10 add $0x10,%esp 119571: 8b 45 e4 mov -0x1c(%ebp),%eax 119574: 85 c0 test %eax,%eax 119576: 75 7c jne 1195f4 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 119578: 83 ec 0c sub $0xc,%esp 11957b: 8d 42 10 lea 0x10(%edx),%eax 11957e: 50 push %eax 11957f: 89 55 d4 mov %edx,-0x2c(%ebp) 119582: e8 91 3f 00 00 call 11d518 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 119587: 8b 55 d4 mov -0x2c(%ebp),%edx 11958a: 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; 119591: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 119598: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 11959b: 8b 45 08 mov 0x8(%ebp),%eax 11959e: 89 42 30 mov %eax,0x30(%edx) the_watchdog->user_data = user_data; 1195a1: 8b 45 14 mov 0x14(%ebp),%eax 1195a4: 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(); 1195a7: 2b 3d 0c 28 14 00 sub 0x14280c,%edi 1195ad: 89 7a 1c mov %edi,0x1c(%edx) (*timer_server->schedule_operation)( timer_server, the_timer ); 1195b0: 58 pop %eax 1195b1: 59 pop %ecx 1195b2: 52 push %edx 1195b3: 53 push %ebx 1195b4: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 1195b7: e8 74 2b 00 00 call 11c130 <_Thread_Enable_dispatch> 1195bc: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1195be: 83 c4 10 add $0x10,%esp 1195c1: e9 75 ff ff ff jmp 11953b 1195c6: 66 90 xchg %ax,%ax Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 1195c8: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1195cd: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1195d0: 5b pop %ebx <== NOT EXECUTED 1195d1: 5e pop %esi <== NOT EXECUTED 1195d2: 5f pop %edi <== NOT EXECUTED 1195d3: c9 leave <== NOT EXECUTED 1195d4: c3 ret <== NOT EXECUTED 1195d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) 1195d8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1195dd: 8d 65 f4 lea -0xc(%ebp),%esp 1195e0: 5b pop %ebx 1195e1: 5e pop %esi 1195e2: 5f pop %edi 1195e3: c9 leave 1195e4: c3 ret 1195e5: 8d 76 00 lea 0x0(%esi),%esi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 1195e8: b8 0e 00 00 00 mov $0xe,%eax 1195ed: e9 49 ff ff ff jmp 11953b 1195f2: 66 90 xchg %ax,%ax seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1195f4: b8 04 00 00 00 mov $0x4,%eax 1195f9: e9 3d ff ff ff jmp 11953b