=============================================================================== 0010c428 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 10c428: 55 push %ebp 10c429: 89 e5 mov %esp,%ebp 10c42b: 53 push %ebx 10c42c: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10c42f: 8b 1d b8 75 12 00 mov 0x1275b8,%ebx 10c435: 81 fb bc 75 12 00 cmp $0x1275bc,%ebx 10c43b: 74 10 je 10c44d <_API_extensions_Run_postdriver+0x25><== NEVER TAKEN 10c43d: 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)(); 10c440: 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 ) { 10c443: 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 ; 10c445: 81 fb bc 75 12 00 cmp $0x1275bc,%ebx 10c44b: 75 f3 jne 10c440 <_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)(); } } 10c44d: 58 pop %eax 10c44e: 5b pop %ebx 10c44f: c9 leave 10c450: c3 ret =============================================================================== 0010c454 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 10c454: 55 push %ebp 10c455: 89 e5 mov %esp,%ebp 10c457: 53 push %ebx 10c458: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10c45b: 8b 1d b8 75 12 00 mov 0x1275b8,%ebx 10c461: 81 fb bc 75 12 00 cmp $0x1275bc,%ebx 10c467: 74 1c je 10c485 <_API_extensions_Run_postswitch+0x31><== NEVER TAKEN 10c469: 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 ); 10c46c: 83 ec 0c sub $0xc,%esp 10c46f: ff 35 18 74 12 00 pushl 0x127418 10c475: 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 ) { 10c478: 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 ; 10c47a: 83 c4 10 add $0x10,%esp 10c47d: 81 fb bc 75 12 00 cmp $0x1275bc,%ebx 10c483: 75 e7 jne 10c46c <_API_extensions_Run_postswitch+0x18><== NEVER TAKEN #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10c485: 8b 5d fc mov -0x4(%ebp),%ebx 10c488: c9 leave 10c489: c3 ret =============================================================================== 0011a170 <_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 ) { 11a170: 55 push %ebp 11a171: 89 e5 mov %esp,%ebp 11a173: 57 push %edi 11a174: 56 push %esi 11a175: 53 push %ebx 11a176: 83 ec 1c sub $0x1c,%esp 11a179: 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 ) { 11a17c: 8b 45 10 mov 0x10(%ebp),%eax 11a17f: 39 43 4c cmp %eax,0x4c(%ebx) 11a182: 72 60 jb 11a1e4 <_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 ) { 11a184: 8b 43 48 mov 0x48(%ebx),%eax 11a187: 85 c0 test %eax,%eax 11a189: 75 45 jne 11a1d0 <_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))) { 11a18b: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 11a192: eb 18 jmp 11a1ac <_CORE_message_queue_Broadcast+0x3c> waitp = &the_thread->Wait; number_broadcasted += 1; 11a194: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 11a197: 8b 42 2c mov 0x2c(%edx),%eax 11a19a: 89 c7 mov %eax,%edi 11a19c: 8b 75 0c mov 0xc(%ebp),%esi 11a19f: 8b 4d 10 mov 0x10(%ebp),%ecx 11a1a2: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 11a1a4: 8b 42 28 mov 0x28(%edx),%eax 11a1a7: 8b 55 10 mov 0x10(%ebp),%edx 11a1aa: 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))) { 11a1ac: 83 ec 0c sub $0xc,%esp 11a1af: 53 push %ebx 11a1b0: e8 ab 23 00 00 call 11c560 <_Thread_queue_Dequeue> 11a1b5: 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 = 11a1b7: 83 c4 10 add $0x10,%esp 11a1ba: 85 c0 test %eax,%eax 11a1bc: 75 d6 jne 11a194 <_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; 11a1be: 8b 55 e4 mov -0x1c(%ebp),%edx 11a1c1: 8b 45 1c mov 0x1c(%ebp),%eax 11a1c4: 89 10 mov %edx,(%eax) 11a1c6: 31 c0 xor %eax,%eax return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 11a1c8: 8d 65 f4 lea -0xc(%ebp),%esp 11a1cb: 5b pop %ebx 11a1cc: 5e pop %esi 11a1cd: 5f pop %edi 11a1ce: c9 leave 11a1cf: 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; 11a1d0: 8b 55 1c mov 0x1c(%ebp),%edx 11a1d3: c7 02 00 00 00 00 movl $0x0,(%edx) 11a1d9: 31 c0 xor %eax,%eax #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 11a1db: 8d 65 f4 lea -0xc(%ebp),%esp 11a1de: 5b pop %ebx 11a1df: 5e pop %esi 11a1e0: 5f pop %edi 11a1e1: c9 leave 11a1e2: c3 ret 11a1e3: 90 nop { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 11a1e4: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 11a1e9: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11a1ec: 5b pop %ebx <== NOT EXECUTED 11a1ed: 5e pop %esi <== NOT EXECUTED 11a1ee: 5f pop %edi <== NOT EXECUTED 11a1ef: c9 leave <== NOT EXECUTED 11a1f0: c3 ret <== NOT EXECUTED =============================================================================== 001152c8 <_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 ) { 1152c8: 55 push %ebp 1152c9: 89 e5 mov %esp,%ebp 1152cb: 57 push %edi 1152cc: 56 push %esi 1152cd: 53 push %ebx 1152ce: 83 ec 0c sub $0xc,%esp 1152d1: 8b 5d 08 mov 0x8(%ebp),%ebx 1152d4: 8b 75 10 mov 0x10(%ebp),%esi 1152d7: 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; 1152da: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 1152dd: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 1152e4: 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)) { 1152e7: a8 03 test $0x3,%al 1152e9: 75 19 jne 115304 <_CORE_message_queue_Initialize+0x3c> 1152eb: 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)); 1152ed: 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 * 1152f0: 89 f8 mov %edi,%eax 1152f2: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 1152f5: 39 d0 cmp %edx,%eax 1152f7: 73 23 jae 11531c <_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; 1152f9: 31 c0 xor %eax,%eax } 1152fb: 8d 65 f4 lea -0xc(%ebp),%esp 1152fe: 5b pop %ebx 1152ff: 5e pop %esi 115300: 5f pop %edi 115301: c9 leave 115302: c3 ret 115303: 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); 115304: 8d 50 04 lea 0x4(%eax),%edx allocated_message_size &= ~(sizeof(uint32_t) - 1); 115307: 83 e2 fc and $0xfffffffc,%edx } if (allocated_message_size < maximum_message_size) 11530a: 39 d0 cmp %edx,%eax 11530c: 77 eb ja 1152f9 <_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)); 11530e: 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 * 115311: 89 f8 mov %edi,%eax 115313: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 115316: 39 d0 cmp %edx,%eax 115318: 72 df jb 1152f9 <_CORE_message_queue_Initialize+0x31><== NEVER TAKEN 11531a: 66 90 xchg %ax,%ax return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 11531c: 83 ec 0c sub $0xc,%esp 11531f: 50 push %eax 115320: e8 af 28 00 00 call 117bd4 <_Workspace_Allocate> 115325: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 115328: 83 c4 10 add $0x10,%esp 11532b: 85 c0 test %eax,%eax 11532d: 74 ca je 1152f9 <_CORE_message_queue_Initialize+0x31> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 11532f: 57 push %edi 115330: 56 push %esi 115331: 50 push %eax 115332: 8d 43 60 lea 0x60(%ebx),%eax 115335: 50 push %eax 115336: e8 2d 52 00 00 call 11a568 <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11533b: 8d 43 54 lea 0x54(%ebx),%eax 11533e: 89 43 50 mov %eax,0x50(%ebx) the_chain->permanent_null = NULL; 115341: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_chain->last = _Chain_Head(the_chain); 115348: 8d 43 50 lea 0x50(%ebx),%eax 11534b: 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( 11534e: 6a 06 push $0x6 115350: 68 80 00 00 00 push $0x80 115355: 8b 45 0c mov 0xc(%ebp),%eax 115358: 83 38 01 cmpl $0x1,(%eax) 11535b: 0f 94 c0 sete %al 11535e: 0f b6 c0 movzbl %al,%eax 115361: 50 push %eax 115362: 53 push %ebx 115363: e8 8c 1e 00 00 call 1171f4 <_Thread_queue_Initialize> 115368: b0 01 mov $0x1,%al THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 11536a: 83 c4 20 add $0x20,%esp } 11536d: 8d 65 f4 lea -0xc(%ebp),%esp 115370: 5b pop %ebx 115371: 5e pop %esi 115372: 5f pop %edi 115373: c9 leave 115374: c3 ret =============================================================================== 0010c5d4 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 10c5d4: 55 push %ebp 10c5d5: 89 e5 mov %esp,%ebp 10c5d7: 57 push %edi 10c5d8: 56 push %esi 10c5d9: 53 push %ebx 10c5da: 83 ec 0c sub $0xc,%esp 10c5dd: 8b 5d 08 mov 0x8(%ebp),%ebx 10c5e0: 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 ) { 10c5e3: 8b 45 10 mov 0x10(%ebp),%eax 10c5e6: 39 43 4c cmp %eax,0x4c(%ebx) 10c5e9: 72 51 jb 10c63c <_CORE_message_queue_Submit+0x68> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 10c5eb: 8b 43 48 mov 0x48(%ebx),%eax 10c5ee: 85 c0 test %eax,%eax 10c5f0: 74 5a je 10c64c <_CORE_message_queue_Submit+0x78> /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < the_message_queue->maximum_pending_messages ) { 10c5f2: 39 43 44 cmp %eax,0x44(%ebx) 10c5f5: 77 0d ja 10c604 <_CORE_message_queue_Submit+0x30> 10c5f7: 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 } 10c5fc: 8d 65 f4 lea -0xc(%ebp),%esp 10c5ff: 5b pop %ebx 10c600: 5e pop %esi 10c601: 5f pop %edi 10c602: c9 leave 10c603: c3 ret 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 *) 10c604: 83 ec 0c sub $0xc,%esp 10c607: 8d 43 60 lea 0x60(%ebx),%eax 10c60a: 50 push %eax 10c60b: e8 a0 ff ff ff call 10c5b0 <_Chain_Get> 10c610: 89 c2 mov %eax,%edx const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10c612: 8d 40 0c lea 0xc(%eax),%eax 10c615: 89 c7 mov %eax,%edi 10c617: 8b 4d 10 mov 0x10(%ebp),%ecx 10c61a: f3 a4 rep movsb %ds:(%esi),%es:(%edi) _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 10c61c: 8b 4d 10 mov 0x10(%ebp),%ecx 10c61f: 89 4a 08 mov %ecx,0x8(%edx) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 10c622: 83 c4 0c add $0xc,%esp 10c625: ff 75 1c pushl 0x1c(%ebp) 10c628: 52 push %edx 10c629: 53 push %ebx 10c62a: e8 1d 51 00 00 call 11174c <_CORE_message_queue_Insert_message> 10c62f: 31 c0 xor %eax,%eax the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10c631: 83 c4 10 add $0x10,%esp _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c634: 8d 65 f4 lea -0xc(%ebp),%esp 10c637: 5b pop %ebx 10c638: 5e pop %esi 10c639: 5f pop %edi 10c63a: c9 leave 10c63b: c3 ret ) { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 10c63c: 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 } 10c641: 8d 65 f4 lea -0xc(%ebp),%esp 10c644: 5b pop %ebx 10c645: 5e pop %esi 10c646: 5f pop %edi 10c647: c9 leave 10c648: c3 ret 10c649: 8d 76 00 lea 0x0(%esi),%esi /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 10c64c: 83 ec 0c sub $0xc,%esp 10c64f: 53 push %ebx 10c650: e8 fb 18 00 00 call 10df50 <_Thread_queue_Dequeue> 10c655: 89 c2 mov %eax,%edx if ( the_thread ) { 10c657: 83 c4 10 add $0x10,%esp 10c65a: 85 c0 test %eax,%eax 10c65c: 74 1e je 10c67c <_CORE_message_queue_Submit+0xa8> 10c65e: 8b 40 2c mov 0x2c(%eax),%eax 10c661: 89 c7 mov %eax,%edi 10c663: 8b 4d 10 mov 0x10(%ebp),%ecx 10c666: 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; 10c668: 8b 42 28 mov 0x28(%edx),%eax 10c66b: 8b 4d 10 mov 0x10(%ebp),%ecx 10c66e: 89 08 mov %ecx,(%eax) the_thread->Wait.count = (uint32_t) submit_type; 10c670: 8b 45 1c mov 0x1c(%ebp),%eax 10c673: 89 42 24 mov %eax,0x24(%edx) 10c676: 31 c0 xor %eax,%eax #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10c678: eb 82 jmp 10c5fc <_CORE_message_queue_Submit+0x28> 10c67a: 66 90 xchg %ax,%ax /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); if ( the_thread ) { 10c67c: 8b 43 48 mov 0x48(%ebx),%eax 10c67f: e9 6e ff ff ff jmp 10c5f2 <_CORE_message_queue_Submit+0x1e> =============================================================================== 0010c690 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10c690: 55 push %ebp 10c691: 89 e5 mov %esp,%ebp 10c693: 57 push %edi 10c694: 56 push %esi 10c695: 53 push %ebx 10c696: 83 ec 0c sub $0xc,%esp 10c699: 8b 45 08 mov 0x8(%ebp),%eax 10c69c: 8b 5d 0c mov 0xc(%ebp),%ebx 10c69f: 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; 10c6a2: 8d 78 40 lea 0x40(%eax),%edi 10c6a5: b9 04 00 00 00 mov $0x4,%ecx 10c6aa: 89 de mov %ebx,%esi 10c6ac: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10c6ae: 89 50 50 mov %edx,0x50(%eax) the_mutex->blocked_count = 0; 10c6b1: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10c6b8: 85 d2 test %edx,%edx 10c6ba: 75 30 jne 10c6ec <_CORE_mutex_Initialize+0x5c> the_mutex->nest_count = 1; 10c6bc: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) the_mutex->holder = _Thread_Executing; 10c6c3: 8b 15 18 74 12 00 mov 0x127418,%edx 10c6c9: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = _Thread_Executing->Object.id; 10c6cc: 8b 4a 08 mov 0x8(%edx),%ecx 10c6cf: 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; 10c6d2: 8b 48 48 mov 0x48(%eax),%ecx if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c6d5: 83 f9 02 cmp $0x2,%ecx 10c6d8: 74 05 je 10c6df <_CORE_mutex_Initialize+0x4f> 10c6da: 83 f9 03 cmp $0x3,%ecx 10c6dd: 75 22 jne 10c701 <_CORE_mutex_Initialize+0x71> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 10c6df: 8b 4a 14 mov 0x14(%edx),%ecx 10c6e2: 3b 48 4c cmp 0x4c(%eax),%ecx 10c6e5: 72 41 jb 10c728 <_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++; 10c6e7: ff 42 1c incl 0x1c(%edx) 10c6ea: eb 15 jmp 10c701 <_CORE_mutex_Initialize+0x71> } } else { the_mutex->nest_count = 0; 10c6ec: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_mutex->holder = NULL; 10c6f3: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) the_mutex->holder_id = 0; 10c6fa: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) } _Thread_queue_Initialize( 10c701: 6a 05 push $0x5 10c703: 68 00 04 00 00 push $0x400 10c708: 31 d2 xor %edx,%edx 10c70a: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10c70e: 0f 95 c2 setne %dl 10c711: 52 push %edx 10c712: 50 push %eax 10c713: e8 b4 1b 00 00 call 10e2cc <_Thread_queue_Initialize> 10c718: 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; 10c71a: 83 c4 10 add $0x10,%esp } 10c71d: 8d 65 f4 lea -0xc(%ebp),%esp 10c720: 5b pop %ebx 10c721: 5e pop %esi 10c722: 5f pop %edi 10c723: c9 leave 10c724: c3 ret 10c725: 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 ) 10c728: b8 06 00 00 00 mov $0x6,%eax STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c72d: 8d 65 f4 lea -0xc(%ebp),%esp 10c730: 5b pop %ebx 10c731: 5e pop %esi 10c732: 5f pop %edi 10c733: c9 leave 10c734: c3 ret =============================================================================== 0010c788 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10c788: 55 push %ebp 10c789: 89 e5 mov %esp,%ebp 10c78b: 53 push %ebx 10c78c: 83 ec 14 sub $0x14,%esp 10c78f: 8b 5d 08 mov 0x8(%ebp),%ebx 10c792: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c795: a1 58 73 12 00 mov 0x127358,%eax 10c79a: 85 c0 test %eax,%eax 10c79c: 74 04 je 10c7a2 <_CORE_mutex_Seize+0x1a> 10c79e: 84 d2 test %dl,%dl 10c7a0: 75 36 jne 10c7d8 <_CORE_mutex_Seize+0x50><== ALWAYS TAKEN 10c7a2: 83 ec 08 sub $0x8,%esp 10c7a5: 8d 45 18 lea 0x18(%ebp),%eax 10c7a8: 50 push %eax 10c7a9: 53 push %ebx 10c7aa: 88 55 f4 mov %dl,-0xc(%ebp) 10c7ad: e8 de 4f 00 00 call 111790 <_CORE_mutex_Seize_interrupt_trylock> 10c7b2: 83 c4 10 add $0x10,%esp 10c7b5: 85 c0 test %eax,%eax 10c7b7: 8a 55 f4 mov -0xc(%ebp),%dl 10c7ba: 74 14 je 10c7d0 <_CORE_mutex_Seize+0x48> 10c7bc: 84 d2 test %dl,%dl 10c7be: 75 30 jne 10c7f0 <_CORE_mutex_Seize+0x68> 10c7c0: ff 75 18 pushl 0x18(%ebp) 10c7c3: 9d popf 10c7c4: a1 18 74 12 00 mov 0x127418,%eax 10c7c9: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) } 10c7d0: 8b 5d fc mov -0x4(%ebp),%ebx 10c7d3: c9 leave 10c7d4: c3 ret 10c7d5: 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 ); 10c7d8: 83 3d 20 75 12 00 01 cmpl $0x1,0x127520 10c7df: 76 c1 jbe 10c7a2 <_CORE_mutex_Seize+0x1a> 10c7e1: 53 push %ebx 10c7e2: 6a 13 push $0x13 10c7e4: 6a 00 push $0x0 10c7e6: 6a 00 push $0x0 10c7e8: e8 f3 05 00 00 call 10cde0 <_Internal_error_Occurred> 10c7ed: 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; 10c7f0: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10c7f7: a1 18 74 12 00 mov 0x127418,%eax 10c7fc: 89 58 44 mov %ebx,0x44(%eax) 10c7ff: 8b 55 0c mov 0xc(%ebp),%edx 10c802: 89 50 20 mov %edx,0x20(%eax) 10c805: a1 58 73 12 00 mov 0x127358,%eax 10c80a: 40 inc %eax 10c80b: a3 58 73 12 00 mov %eax,0x127358 10c810: ff 75 18 pushl 0x18(%ebp) 10c813: 9d popf 10c814: 83 ec 08 sub $0x8,%esp 10c817: ff 75 14 pushl 0x14(%ebp) 10c81a: 53 push %ebx 10c81b: e8 18 ff ff ff call 10c738 <_CORE_mutex_Seize_interrupt_blocking> 10c820: 83 c4 10 add $0x10,%esp } 10c823: 8b 5d fc mov -0x4(%ebp),%ebx 10c826: c9 leave 10c827: c3 ret =============================================================================== 00111790 <_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 ) { 111790: 55 push %ebp 111791: 89 e5 mov %esp,%ebp 111793: 56 push %esi 111794: 53 push %ebx 111795: 8b 45 08 mov 0x8(%ebp),%eax 111798: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 11179b: 8b 15 18 74 12 00 mov 0x127418,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 1117a1: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 1117a8: 8b 58 50 mov 0x50(%eax),%ebx 1117ab: 85 db test %ebx,%ebx 1117ad: 74 31 je 1117e0 <_CORE_mutex_Seize_interrupt_trylock+0x50> the_mutex->lock = CORE_MUTEX_LOCKED; 1117af: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 1117b6: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 1117b9: 8b 5a 08 mov 0x8(%edx),%ebx 1117bc: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 1117bf: 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; 1117c6: 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 ) || 1117c9: 83 fb 02 cmp $0x2,%ebx 1117cc: 74 26 je 1117f4 <_CORE_mutex_Seize_interrupt_trylock+0x64> 1117ce: 83 fb 03 cmp $0x3,%ebx 1117d1: 74 3d je 111810 <_CORE_mutex_Seize_interrupt_trylock+0x80> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 1117d3: ff 31 pushl (%ecx) 1117d5: 9d popf 1117d6: 31 c0 xor %eax,%eax return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 1117d8: 8d 65 f8 lea -0x8(%ebp),%esp 1117db: 5b pop %ebx 1117dc: 5e pop %esi 1117dd: c9 leave 1117de: c3 ret 1117df: 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 ) ) { 1117e0: 3b 50 5c cmp 0x5c(%eax),%edx 1117e3: 74 17 je 1117fc <_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 ); 1117e5: b8 01 00 00 00 mov $0x1,%eax 1117ea: 8d 65 f8 lea -0x8(%ebp),%esp 1117ed: 5b pop %ebx 1117ee: 5e pop %esi 1117ef: c9 leave 1117f0: c3 ret 1117f1: 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++; 1117f4: ff 42 1c incl 0x1c(%edx) 1117f7: eb da jmp 1117d3 <_CORE_mutex_Seize_interrupt_trylock+0x43> 1117f9: 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 ) { 1117fc: 8b 58 40 mov 0x40(%eax),%ebx 1117ff: 85 db test %ebx,%ebx 111801: 75 45 jne 111848 <_CORE_mutex_Seize_interrupt_trylock+0xb8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 111803: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 111806: ff 31 pushl (%ecx) 111808: 9d popf 111809: 31 c0 xor %eax,%eax 11180b: eb dd jmp 1117ea <_CORE_mutex_Seize_interrupt_trylock+0x5a> 11180d: 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++; 111810: 8b 5a 1c mov 0x1c(%edx),%ebx 111813: 8d 73 01 lea 0x1(%ebx),%esi 111816: 89 72 1c mov %esi,0x1c(%edx) { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 111819: 8b 72 14 mov 0x14(%edx),%esi if ( current == ceiling ) { 11181c: 39 70 4c cmp %esi,0x4c(%eax) 11181f: 74 6b je 11188c <_CORE_mutex_Seize_interrupt_trylock+0xfc> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 111821: 72 39 jb 11185c <_CORE_mutex_Seize_interrupt_trylock+0xcc> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 111823: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 11182a: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 111831: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 111838: 89 5a 1c mov %ebx,0x1c(%edx) _ISR_Enable( *level_p ); 11183b: ff 31 pushl (%ecx) 11183d: 9d popf 11183e: 31 c0 xor %eax,%eax 111840: 8d 65 f8 lea -0x8(%ebp),%esp 111843: 5b pop %ebx 111844: 5e pop %esi 111845: c9 leave 111846: c3 ret 111847: 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 ) { 111848: 4b dec %ebx 111849: 75 9a jne 1117e5 <_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; 11184b: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) <== NOT EXECUTED _ISR_Enable( *level_p ); 111852: ff 31 pushl (%ecx) <== NOT EXECUTED 111854: 9d popf <== NOT EXECUTED 111855: 31 c0 xor %eax,%eax <== NOT EXECUTED 111857: eb 91 jmp 1117ea <_CORE_mutex_Seize_interrupt_trylock+0x5a><== NOT EXECUTED 111859: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 11185c: 8b 15 58 73 12 00 mov 0x127358,%edx 111862: 42 inc %edx 111863: 89 15 58 73 12 00 mov %edx,0x127358 return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 111869: ff 31 pushl (%ecx) 11186b: 9d popf _Thread_Change_priority( 11186c: 52 push %edx 11186d: 6a 00 push $0x0 11186f: ff 70 4c pushl 0x4c(%eax) 111872: ff 70 5c pushl 0x5c(%eax) 111875: e8 0e be ff ff call 10d688 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 11187a: e8 f1 c2 ff ff call 10db70 <_Thread_Enable_dispatch> 11187f: 31 c0 xor %eax,%eax 111881: 83 c4 10 add $0x10,%esp 111884: e9 61 ff ff ff jmp 1117ea <_CORE_mutex_Seize_interrupt_trylock+0x5a> 111889: 8d 76 00 lea 0x0(%esi),%esi Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); 11188c: ff 31 pushl (%ecx) 11188e: 9d popf 11188f: 31 c0 xor %eax,%eax 111891: e9 54 ff ff ff jmp 1117ea <_CORE_mutex_Seize_interrupt_trylock+0x5a> =============================================================================== 0010c828 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 10c828: 55 push %ebp 10c829: 89 e5 mov %esp,%ebp 10c82b: 53 push %ebx 10c82c: 83 ec 04 sub $0x4,%esp 10c82f: 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; 10c832: 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 ) { 10c835: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10c839: 74 15 je 10c850 <_CORE_mutex_Surrender+0x28> if ( !_Thread_Is_executing( holder ) ) 10c83b: 3b 05 18 74 12 00 cmp 0x127418,%eax 10c841: 74 0d je 10c850 <_CORE_mutex_Surrender+0x28> 10c843: b8 03 00 00 00 mov $0x3,%eax } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c848: 8b 5d fc mov -0x4(%ebp),%ebx 10c84b: c9 leave 10c84c: c3 ret 10c84d: 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 ) 10c850: 8b 53 54 mov 0x54(%ebx),%edx 10c853: 85 d2 test %edx,%edx 10c855: 74 65 je 10c8bc <_CORE_mutex_Surrender+0x94> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10c857: 4a dec %edx 10c858: 89 53 54 mov %edx,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10c85b: 85 d2 test %edx,%edx 10c85d: 75 5d jne 10c8bc <_CORE_mutex_Surrender+0x94> 10c85f: 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 ) || 10c862: 83 fa 02 cmp $0x2,%edx 10c865: 0f 84 99 00 00 00 je 10c904 <_CORE_mutex_Surrender+0xdc> 10c86b: 83 fa 03 cmp $0x3,%edx 10c86e: 0f 84 90 00 00 00 je 10c904 <_CORE_mutex_Surrender+0xdc> } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 10c874: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10c87b: 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 ) || 10c882: 83 fa 02 cmp $0x2,%edx 10c885: 74 5d je 10c8e4 <_CORE_mutex_Surrender+0xbc> 10c887: 83 fa 03 cmp $0x3,%edx 10c88a: 74 58 je 10c8e4 <_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 ) ) ) { 10c88c: 83 ec 0c sub $0xc,%esp 10c88f: 53 push %ebx 10c890: e8 bb 16 00 00 call 10df50 <_Thread_queue_Dequeue> 10c895: 83 c4 10 add $0x10,%esp 10c898: 85 c0 test %eax,%eax 10c89a: 74 7c je 10c918 <_CORE_mutex_Surrender+0xf0> } else #endif { the_mutex->holder = the_thread; 10c89c: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10c89f: 8b 50 08 mov 0x8(%eax),%edx 10c8a2: 89 53 60 mov %edx,0x60(%ebx) the_mutex->nest_count = 1; 10c8a5: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10c8ac: 8b 53 48 mov 0x48(%ebx),%edx 10c8af: 83 fa 02 cmp $0x2,%edx 10c8b2: 74 58 je 10c90c <_CORE_mutex_Surrender+0xe4> 10c8b4: 83 fa 03 cmp $0x3,%edx 10c8b7: 74 0b je 10c8c4 <_CORE_mutex_Surrender+0x9c> 10c8b9: 8d 76 00 lea 0x0(%esi),%esi } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c8bc: 31 c0 xor %eax,%eax return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c8be: 8b 5d fc mov -0x4(%ebp),%ebx 10c8c1: c9 leave 10c8c2: c3 ret 10c8c3: 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++; 10c8c4: ff 40 1c incl 0x1c(%eax) if (the_mutex->Attributes.priority_ceiling < 10c8c7: 8b 53 4c mov 0x4c(%ebx),%edx the_thread->current_priority){ 10c8ca: 3b 50 14 cmp 0x14(%eax),%edx 10c8cd: 73 ed jae 10c8bc <_CORE_mutex_Surrender+0x94> _Thread_Change_priority( 10c8cf: 51 push %ecx 10c8d0: 6a 00 push $0x0 10c8d2: 52 push %edx 10c8d3: 50 push %eax 10c8d4: e8 af 0d 00 00 call 10d688 <_Thread_Change_priority> 10c8d9: 31 c0 xor %eax,%eax 10c8db: 83 c4 10 add $0x10,%esp 10c8de: e9 65 ff ff ff jmp 10c848 <_CORE_mutex_Surrender+0x20> 10c8e3: 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 && 10c8e4: 8b 50 1c mov 0x1c(%eax),%edx 10c8e7: 85 d2 test %edx,%edx 10c8e9: 75 a1 jne 10c88c <_CORE_mutex_Surrender+0x64> holder->real_priority != holder->current_priority ) { 10c8eb: 8b 50 18 mov 0x18(%eax),%edx 10c8ee: 3b 50 14 cmp 0x14(%eax),%edx 10c8f1: 74 99 je 10c88c <_CORE_mutex_Surrender+0x64> _Thread_Change_priority( holder, holder->real_priority, true ); 10c8f3: 51 push %ecx 10c8f4: 6a 01 push $0x1 10c8f6: 52 push %edx 10c8f7: 50 push %eax 10c8f8: e8 8b 0d 00 00 call 10d688 <_Thread_Change_priority> 10c8fd: 83 c4 10 add $0x10,%esp 10c900: eb 8a jmp 10c88c <_CORE_mutex_Surrender+0x64> 10c902: 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--; 10c904: ff 48 1c decl 0x1c(%eax) 10c907: e9 68 ff ff ff jmp 10c874 <_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++; 10c90c: ff 40 1c incl 0x1c(%eax) 10c90f: 31 c0 xor %eax,%eax break; 10c911: e9 32 ff ff ff jmp 10c848 <_CORE_mutex_Surrender+0x20> 10c916: 66 90 xchg %ax,%ax } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c918: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) 10c91f: 31 c0 xor %eax,%eax 10c921: e9 22 ff ff ff jmp 10c848 <_CORE_mutex_Surrender+0x20> =============================================================================== 0010c974 <_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 ) { 10c974: 55 push %ebp 10c975: 89 e5 mov %esp,%ebp 10c977: 53 push %ebx 10c978: 83 ec 10 sub $0x10,%esp 10c97b: 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)) ) { 10c97e: 53 push %ebx 10c97f: e8 cc 15 00 00 call 10df50 <_Thread_queue_Dequeue> 10c984: 83 c4 10 add $0x10,%esp 10c987: 85 c0 test %eax,%eax 10c989: 74 09 je 10c994 <_CORE_semaphore_Surrender+0x20> 10c98b: 31 c0 xor %eax,%eax status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 10c98d: 8b 5d fc mov -0x4(%ebp),%ebx 10c990: c9 leave 10c991: c3 ret 10c992: 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 ); 10c994: 9c pushf 10c995: fa cli 10c996: 5a pop %edx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10c997: 8b 43 48 mov 0x48(%ebx),%eax 10c99a: 3b 43 40 cmp 0x40(%ebx),%eax 10c99d: 72 0d jb 10c9ac <_CORE_semaphore_Surrender+0x38><== ALWAYS TAKEN 10c99f: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10c9a4: 52 push %edx 10c9a5: 9d popf } return status; } 10c9a6: 8b 5d fc mov -0x4(%ebp),%ebx 10c9a9: c9 leave 10c9aa: c3 ret 10c9ab: 90 nop #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 10c9ac: 40 inc %eax 10c9ad: 89 43 48 mov %eax,0x48(%ebx) 10c9b0: 31 c0 xor %eax,%eax 10c9b2: eb f0 jmp 10c9a4 <_CORE_semaphore_Surrender+0x30> =============================================================================== 00111624 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 111624: 55 push %ebp 111625: 89 e5 mov %esp,%ebp 111627: 57 push %edi 111628: 56 push %esi 111629: 53 push %ebx 11162a: 8b 7d 08 mov 0x8(%ebp),%edi 11162d: 8b 4d 10 mov 0x10(%ebp),%ecx 111630: 8b 75 14 mov 0x14(%ebp),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 111633: 89 fa mov %edi,%edx Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 111635: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) next = starting_address; while ( count-- ) { 11163c: 85 c9 test %ecx,%ecx 11163e: 74 17 je 111657 <_Chain_Initialize+0x33><== NEVER TAKEN Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 111640: 8b 45 0c mov 0xc(%ebp),%eax 111643: eb 05 jmp 11164a <_Chain_Initialize+0x26> 111645: 8d 76 00 lea 0x0(%esi),%esi while ( count-- ) { 111648: 89 d8 mov %ebx,%eax current->next = next; 11164a: 89 02 mov %eax,(%edx) next->previous = current; 11164c: 89 50 04 mov %edx,0x4(%eax) 11164f: 8d 1c 30 lea (%eax,%esi,1),%ebx current = next; next = (Chain_Node *) 111652: 89 c2 mov %eax,%edx count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 111654: 49 dec %ecx 111655: 75 f1 jne 111648 <_Chain_Initialize+0x24> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 111657: 8d 47 04 lea 0x4(%edi),%eax 11165a: 89 02 mov %eax,(%edx) the_chain->last = current; 11165c: 89 57 08 mov %edx,0x8(%edi) } 11165f: 5b pop %ebx 111660: 5e pop %esi 111661: 5f pop %edi 111662: c9 leave 111663: c3 ret =============================================================================== 0010b66c <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10b66c: 55 push %ebp 10b66d: 89 e5 mov %esp,%ebp 10b66f: 57 push %edi 10b670: 56 push %esi 10b671: 53 push %ebx 10b672: 83 ec 2c sub $0x2c,%esp 10b675: 8b 45 08 mov 0x8(%ebp),%eax 10b678: 8b 4d 0c mov 0xc(%ebp),%ecx 10b67b: 8b 55 10 mov 0x10(%ebp),%edx 10b67e: 89 55 dc mov %edx,-0x24(%ebp) 10b681: 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; 10b684: 8b 1d 18 74 12 00 mov 0x127418,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10b68a: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10b691: 8b b3 f0 00 00 00 mov 0xf0(%ebx),%esi _ISR_Disable( level ); 10b697: 9c pushf 10b698: fa cli 10b699: 8f 45 e0 popl -0x20(%ebp) pending_events = api->pending_events; 10b69c: 8b 16 mov (%esi),%edx 10b69e: 89 55 d4 mov %edx,-0x2c(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10b6a1: 21 c2 and %eax,%edx 10b6a3: 89 55 e4 mov %edx,-0x1c(%ebp) 10b6a6: 74 0d je 10b6b5 <_Event_Seize+0x49> 10b6a8: 39 d0 cmp %edx,%eax 10b6aa: 0f 84 84 00 00 00 je 10b734 <_Event_Seize+0xc8> 10b6b0: f6 c1 02 test $0x2,%cl 10b6b3: 75 7f jne 10b734 <_Event_Seize+0xc8> <== ALWAYS TAKEN _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10b6b5: f6 c1 01 test $0x1,%cl 10b6b8: 75 62 jne 10b71c <_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; 10b6ba: 89 4b 30 mov %ecx,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10b6bd: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10b6c0: 89 7b 28 mov %edi,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10b6c3: c7 05 60 76 12 00 01 movl $0x1,0x127660 10b6ca: 00 00 00 _ISR_Enable( level ); 10b6cd: ff 75 e0 pushl -0x20(%ebp) 10b6d0: 9d popf if ( ticks ) { 10b6d1: 8b 45 dc mov -0x24(%ebp),%eax 10b6d4: 85 c0 test %eax,%eax 10b6d6: 0f 85 80 00 00 00 jne 10b75c <_Event_Seize+0xf0> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10b6dc: 83 ec 08 sub $0x8,%esp 10b6df: 68 00 01 00 00 push $0x100 10b6e4: 53 push %ebx 10b6e5: e8 36 2d 00 00 call 10e420 <_Thread_Set_state> _ISR_Disable( level ); 10b6ea: 9c pushf 10b6eb: fa cli 10b6ec: 5a pop %edx sync_state = _Event_Sync_state; 10b6ed: a1 60 76 12 00 mov 0x127660,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10b6f2: c7 05 60 76 12 00 00 movl $0x0,0x127660 10b6f9: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10b6fc: 83 c4 10 add $0x10,%esp 10b6ff: 83 f8 01 cmp $0x1,%eax 10b702: 74 4c je 10b750 <_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 ); 10b704: 89 55 10 mov %edx,0x10(%ebp) 10b707: 89 5d 0c mov %ebx,0xc(%ebp) 10b70a: 89 45 08 mov %eax,0x8(%ebp) } 10b70d: 8d 65 f4 lea -0xc(%ebp),%esp 10b710: 5b pop %ebx 10b711: 5e pop %esi 10b712: 5f pop %edi 10b713: 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 ); 10b714: e9 23 1f 00 00 jmp 10d63c <_Thread_blocking_operation_Cancel> 10b719: 8d 76 00 lea 0x0(%esi),%esi *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 10b71c: ff 75 e0 pushl -0x20(%ebp) 10b71f: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10b720: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10b727: 8b 55 e4 mov -0x1c(%ebp),%edx 10b72a: 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 ); } 10b72c: 8d 65 f4 lea -0xc(%ebp),%esp 10b72f: 5b pop %ebx 10b730: 5e pop %esi 10b731: 5f pop %edi 10b732: c9 leave 10b733: c3 ret 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 = 10b734: 8b 45 e4 mov -0x1c(%ebp),%eax 10b737: f7 d0 not %eax 10b739: 23 45 d4 and -0x2c(%ebp),%eax 10b73c: 89 06 mov %eax,(%esi) _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 10b73e: ff 75 e0 pushl -0x20(%ebp) 10b741: 9d popf *event_out = seized_events; 10b742: 8b 45 e4 mov -0x1c(%ebp),%eax 10b745: 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 ); } 10b747: 8d 65 f4 lea -0xc(%ebp),%esp 10b74a: 5b pop %ebx 10b74b: 5e pop %esi 10b74c: 5f pop %edi 10b74d: c9 leave 10b74e: c3 ret 10b74f: 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 ); 10b750: 52 push %edx 10b751: 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 ); } 10b752: 8d 65 f4 lea -0xc(%ebp),%esp 10b755: 5b pop %ebx 10b756: 5e pop %esi 10b757: 5f pop %edi 10b758: c9 leave 10b759: c3 ret 10b75a: 66 90 xchg %ax,%ax _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 10b75c: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b75f: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10b766: c7 43 64 10 b9 10 00 movl $0x10b910,0x64(%ebx) the_watchdog->id = id; 10b76d: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10b770: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b777: 8b 45 dc mov -0x24(%ebp),%eax 10b77a: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b77d: 83 ec 08 sub $0x8,%esp 10b780: 8d 43 48 lea 0x48(%ebx),%eax 10b783: 50 push %eax 10b784: 68 38 74 12 00 push $0x127438 10b789: e8 e2 32 00 00 call 10ea70 <_Watchdog_Insert> 10b78e: 83 c4 10 add $0x10,%esp 10b791: e9 46 ff ff ff jmp 10b6dc <_Event_Seize+0x70> =============================================================================== 0010b7ec <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10b7ec: 55 push %ebp 10b7ed: 89 e5 mov %esp,%ebp 10b7ef: 57 push %edi 10b7f0: 56 push %esi 10b7f1: 53 push %ebx 10b7f2: 83 ec 1c sub $0x1c,%esp 10b7f5: 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 ]; 10b7f8: 8b 8b f0 00 00 00 mov 0xf0(%ebx),%ecx option_set = (rtems_option) the_thread->Wait.option; 10b7fe: 8b 73 30 mov 0x30(%ebx),%esi _ISR_Disable( level ); 10b801: 9c pushf 10b802: fa cli 10b803: 8f 45 e4 popl -0x1c(%ebp) pending_events = api->pending_events; 10b806: 8b 11 mov (%ecx),%edx event_condition = (rtems_event_set) the_thread->Wait.count; 10b808: 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 ) ) { 10b80b: 89 c7 mov %eax,%edi 10b80d: 21 d7 and %edx,%edi 10b80f: 89 7d e0 mov %edi,-0x20(%ebp) 10b812: 74 74 je 10b888 <_Event_Surrender+0x9c> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 10b814: 8b 3d f4 73 12 00 mov 0x1273f4,%edi 10b81a: 85 ff test %edi,%edi 10b81c: 74 0c je 10b82a <_Event_Surrender+0x3e> 10b81e: 3b 1d 18 74 12 00 cmp 0x127418,%ebx 10b824: 0f 84 96 00 00 00 je 10b8c0 <_Event_Surrender+0xd4> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10b82a: f6 43 11 01 testb $0x1,0x11(%ebx) 10b82e: 74 4c je 10b87c <_Event_Surrender+0x90> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 10b830: 3b 45 e0 cmp -0x20(%ebp),%eax 10b833: 74 05 je 10b83a <_Event_Surrender+0x4e> 10b835: 83 e6 02 and $0x2,%esi 10b838: 74 42 je 10b87c <_Event_Surrender+0x90> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 10b83a: 8b 45 e0 mov -0x20(%ebp),%eax 10b83d: f7 d0 not %eax 10b83f: 21 d0 and %edx,%eax 10b841: 89 01 mov %eax,(%ecx) the_thread->Wait.count = 0; 10b843: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b84a: 8b 43 28 mov 0x28(%ebx),%eax 10b84d: 8b 7d e0 mov -0x20(%ebp),%edi 10b850: 89 38 mov %edi,(%eax) _ISR_Flash( level ); 10b852: ff 75 e4 pushl -0x1c(%ebp) 10b855: 9d popf 10b856: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10b857: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b85b: 74 37 je 10b894 <_Event_Surrender+0xa8> _ISR_Enable( level ); 10b85d: ff 75 e4 pushl -0x1c(%ebp) 10b860: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b861: 83 ec 08 sub $0x8,%esp 10b864: 68 f8 ff 03 10 push $0x1003fff8 10b869: 53 push %ebx 10b86a: e8 59 1f 00 00 call 10d7c8 <_Thread_Clear_state> 10b86f: 83 c4 10 add $0x10,%esp } return; } } _ISR_Enable( level ); } 10b872: 8d 65 f4 lea -0xc(%ebp),%esp 10b875: 5b pop %ebx 10b876: 5e pop %esi 10b877: 5f pop %edi 10b878: c9 leave 10b879: c3 ret 10b87a: 66 90 xchg %ax,%ax _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10b87c: ff 75 e4 pushl -0x1c(%ebp) 10b87f: 9d popf } 10b880: 8d 65 f4 lea -0xc(%ebp),%esp 10b883: 5b pop %ebx 10b884: 5e pop %esi 10b885: 5f pop %edi 10b886: c9 leave 10b887: c3 ret /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 10b888: ff 75 e4 pushl -0x1c(%ebp) 10b88b: 9d popf } return; } } _ISR_Enable( level ); } 10b88c: 8d 65 f4 lea -0xc(%ebp),%esp 10b88f: 5b pop %ebx 10b890: 5e pop %esi 10b891: 5f pop %edi 10b892: c9 leave 10b893: c3 ret RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10b894: 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 ); 10b89b: ff 75 e4 pushl -0x1c(%ebp) 10b89e: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10b89f: 83 ec 0c sub $0xc,%esp 10b8a2: 8d 43 48 lea 0x48(%ebx),%eax 10b8a5: 50 push %eax 10b8a6: e8 fd 32 00 00 call 10eba8 <_Watchdog_Remove> 10b8ab: 58 pop %eax 10b8ac: 5a pop %edx 10b8ad: 68 f8 ff 03 10 push $0x1003fff8 10b8b2: 53 push %ebx 10b8b3: e8 10 1f 00 00 call 10d7c8 <_Thread_Clear_state> 10b8b8: 83 c4 10 add $0x10,%esp 10b8bb: eb c3 jmp 10b880 <_Event_Surrender+0x94> 10b8bd: 8d 76 00 lea 0x0(%esi),%esi * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 10b8c0: 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() && 10b8c6: 83 ff 02 cmp $0x2,%edi 10b8c9: 74 0d je 10b8d8 <_Event_Surrender+0xec> <== NEVER TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 10b8cb: 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() && 10b8d1: 4f dec %edi 10b8d2: 0f 85 52 ff ff ff jne 10b82a <_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) ) { 10b8d8: 3b 45 e0 cmp -0x20(%ebp),%eax 10b8db: 74 05 je 10b8e2 <_Event_Surrender+0xf6> 10b8dd: 83 e6 02 and $0x2,%esi 10b8e0: 74 22 je 10b904 <_Event_Surrender+0x118><== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 10b8e2: 8b 45 e0 mov -0x20(%ebp),%eax 10b8e5: f7 d0 not %eax 10b8e7: 21 d0 and %edx,%eax 10b8e9: 89 01 mov %eax,(%ecx) the_thread->Wait.count = 0; 10b8eb: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b8f2: 8b 43 28 mov 0x28(%ebx),%eax 10b8f5: 8b 55 e0 mov -0x20(%ebp),%edx 10b8f8: 89 10 mov %edx,(%eax) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10b8fa: c7 05 60 76 12 00 03 movl $0x3,0x127660 10b901: 00 00 00 } _ISR_Enable( level ); 10b904: ff 75 e4 pushl -0x1c(%ebp) 10b907: 9d popf return; 10b908: e9 73 ff ff ff jmp 10b880 <_Event_Surrender+0x94> =============================================================================== 0010b910 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10b910: 55 push %ebp 10b911: 89 e5 mov %esp,%ebp 10b913: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10b916: 8d 45 f4 lea -0xc(%ebp),%eax 10b919: 50 push %eax 10b91a: ff 75 08 pushl 0x8(%ebp) 10b91d: e8 72 22 00 00 call 10db94 <_Thread_Get> switch ( location ) { 10b922: 83 c4 10 add $0x10,%esp 10b925: 8b 55 f4 mov -0xc(%ebp),%edx 10b928: 85 d2 test %edx,%edx 10b92a: 75 37 jne 10b963 <_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 ); 10b92c: 9c pushf 10b92d: fa cli 10b92e: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10b92f: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10b936: 3b 05 18 74 12 00 cmp 0x127418,%eax 10b93c: 74 2a je 10b968 <_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; 10b93e: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10b945: 52 push %edx 10b946: 9d popf 10b947: 83 ec 08 sub $0x8,%esp 10b94a: 68 f8 ff 03 10 push $0x1003fff8 10b94f: 50 push %eax 10b950: e8 73 1e 00 00 call 10d7c8 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b955: a1 58 73 12 00 mov 0x127358,%eax 10b95a: 48 dec %eax 10b95b: a3 58 73 12 00 mov %eax,0x127358 10b960: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b963: c9 leave 10b964: c3 ret 10b965: 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 ) 10b968: 8b 0d 60 76 12 00 mov 0x127660,%ecx 10b96e: 49 dec %ecx 10b96f: 75 cd jne 10b93e <_Event_Timeout+0x2e> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10b971: c7 05 60 76 12 00 02 movl $0x2,0x127660 10b978: 00 00 00 10b97b: eb c1 jmp 10b93e <_Event_Timeout+0x2e> =============================================================================== 001118f0 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 1118f0: 55 push %ebp 1118f1: 89 e5 mov %esp,%ebp 1118f3: 57 push %edi 1118f4: 56 push %esi 1118f5: 53 push %ebx 1118f6: 83 ec 2c sub $0x2c,%esp 1118f9: 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; 1118fc: 8b 45 08 mov 0x8(%ebp),%eax 1118ff: 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; 111902: 8b 50 10 mov 0x10(%eax),%edx 111905: 89 55 d4 mov %edx,-0x2c(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 111908: 89 f8 mov %edi,%eax 11190a: 83 c0 04 add $0x4,%eax 11190d: 89 45 e0 mov %eax,-0x20(%ebp) 111910: 0f 82 5a 01 00 00 jb 111a70 <_Heap_Allocate_aligned_with_boundary+0x180> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 111916: 8b 75 14 mov 0x14(%ebp),%esi 111919: 85 f6 test %esi,%esi 11191b: 0f 85 48 01 00 00 jne 111a69 <_Heap_Allocate_aligned_with_boundary+0x179> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 111921: 39 4d 08 cmp %ecx,0x8(%ebp) 111924: 0f 84 50 01 00 00 je 111a7a <_Heap_Allocate_aligned_with_boundary+0x18a> 11192a: 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; 111931: 8b 55 d4 mov -0x2c(%ebp),%edx 111934: 83 c2 07 add $0x7,%edx 111937: 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; 11193a: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp) 111941: 29 7d d8 sub %edi,-0x28(%ebp) 111944: eb 19 jmp 11195f <_Heap_Allocate_aligned_with_boundary+0x6f> 111946: 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; 111948: 8d 59 08 lea 0x8(%ecx),%ebx boundary ); } } if ( alloc_begin != 0 ) { 11194b: 85 db test %ebx,%ebx 11194d: 0f 85 e9 00 00 00 jne 111a3c <_Heap_Allocate_aligned_with_boundary+0x14c><== ALWAYS TAKEN break; } block = block->next; 111953: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 111956: 39 4d 08 cmp %ecx,0x8(%ebp) 111959: 0f 84 25 01 00 00 je 111a84 <_Heap_Allocate_aligned_with_boundary+0x194> _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 11195f: 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 ) { 111962: 8b 59 04 mov 0x4(%ecx),%ebx 111965: 39 5d e0 cmp %ebx,-0x20(%ebp) 111968: 73 e9 jae 111953 <_Heap_Allocate_aligned_with_boundary+0x63> if ( alignment == 0 ) { 11196a: 8b 55 10 mov 0x10(%ebp),%edx 11196d: 85 d2 test %edx,%edx 11196f: 74 d7 je 111948 <_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; 111971: 8b 45 08 mov 0x8(%ebp),%eax 111974: 8b 40 14 mov 0x14(%eax),%eax 111977: 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; 11197a: 83 e3 fe and $0xfffffffe,%ebx 11197d: 8d 1c 19 lea (%ecx,%ebx,1),%ebx 111980: 8d 51 08 lea 0x8(%ecx),%edx 111983: 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; 111986: 8b 75 c8 mov -0x38(%ebp),%esi 111989: 29 c6 sub %eax,%esi 11198b: 01 de add %ebx,%esi uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 11198d: 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); 111990: 89 d8 mov %ebx,%eax 111992: 31 d2 xor %edx,%edx 111994: f7 75 10 divl 0x10(%ebp) 111997: 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 ) { 111999: 39 de cmp %ebx,%esi 11199b: 73 0b jae 1119a8 <_Heap_Allocate_aligned_with_boundary+0xb8> 11199d: 89 f0 mov %esi,%eax 11199f: 31 d2 xor %edx,%edx 1119a1: f7 75 10 divl 0x10(%ebp) 1119a4: 89 f3 mov %esi,%ebx 1119a6: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 1119a8: 8b 45 14 mov 0x14(%ebp),%eax 1119ab: 85 c0 test %eax,%eax 1119ad: 74 59 je 111a08 <_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; 1119af: 8d 34 3b lea (%ebx,%edi,1),%esi 1119b2: 89 f0 mov %esi,%eax 1119b4: 31 d2 xor %edx,%edx 1119b6: f7 75 14 divl 0x14(%ebp) 1119b9: 89 f0 mov %esi,%eax 1119bb: 29 d0 sub %edx,%eax 1119bd: 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 ) { 1119bf: 39 c3 cmp %eax,%ebx 1119c1: 73 45 jae 111a08 <_Heap_Allocate_aligned_with_boundary+0x118> 1119c3: 39 c6 cmp %eax,%esi 1119c5: 76 41 jbe 111a08 <_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; 1119c7: 8b 45 cc mov -0x34(%ebp),%eax 1119ca: 01 f8 add %edi,%eax 1119cc: 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 ) { 1119cf: 39 d0 cmp %edx,%eax 1119d1: 77 80 ja 111953 <_Heap_Allocate_aligned_with_boundary+0x63> 1119d3: 89 ce mov %ecx,%esi 1119d5: eb 0e jmp 1119e5 <_Heap_Allocate_aligned_with_boundary+0xf5> 1119d7: 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 ) { 1119d8: 39 c1 cmp %eax,%ecx 1119da: 76 2a jbe 111a06 <_Heap_Allocate_aligned_with_boundary+0x116> if ( boundary_line < boundary_floor ) { 1119dc: 39 55 dc cmp %edx,-0x24(%ebp) 1119df: 0f 87 a3 00 00 00 ja 111a88 <_Heap_Allocate_aligned_with_boundary+0x198><== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; 1119e5: 89 d3 mov %edx,%ebx 1119e7: 29 fb sub %edi,%ebx 1119e9: 89 d8 mov %ebx,%eax 1119eb: 31 d2 xor %edx,%edx 1119ed: f7 75 10 divl 0x10(%ebp) 1119f0: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 1119f2: 8d 0c 3b lea (%ebx,%edi,1),%ecx 1119f5: 89 c8 mov %ecx,%eax 1119f7: 31 d2 xor %edx,%edx 1119f9: f7 75 14 divl 0x14(%ebp) 1119fc: 89 c8 mov %ecx,%eax 1119fe: 29 d0 sub %edx,%eax 111a00: 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 ) { 111a02: 39 c3 cmp %eax,%ebx 111a04: 72 d2 jb 1119d8 <_Heap_Allocate_aligned_with_boundary+0xe8> 111a06: 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 ) { 111a08: 39 5d cc cmp %ebx,-0x34(%ebp) 111a0b: 0f 87 42 ff ff ff ja 111953 <_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; 111a11: be f8 ff ff ff mov $0xfffffff8,%esi 111a16: 29 ce sub %ecx,%esi 111a18: 01 de add %ebx,%esi 111a1a: 89 d8 mov %ebx,%eax 111a1c: 31 d2 xor %edx,%edx 111a1e: f7 75 d4 divl -0x2c(%ebp) 111a21: 29 d6 sub %edx,%esi if ( free_size >= min_block_size || free_size == 0 ) { 111a23: 39 75 d0 cmp %esi,-0x30(%ebp) 111a26: 0f 86 1f ff ff ff jbe 11194b <_Heap_Allocate_aligned_with_boundary+0x5b> 111a2c: 85 f6 test %esi,%esi 111a2e: 0f 85 1f ff ff ff jne 111953 <_Heap_Allocate_aligned_with_boundary+0x63> boundary ); } } if ( alloc_begin != 0 ) { 111a34: 85 db test %ebx,%ebx 111a36: 0f 84 17 ff ff ff je 111953 <_Heap_Allocate_aligned_with_boundary+0x63><== NEVER TAKEN block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 111a3c: 8b 55 e4 mov -0x1c(%ebp),%edx 111a3f: 8b 45 08 mov 0x8(%ebp),%eax 111a42: 01 50 4c add %edx,0x4c(%eax) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 111a45: 57 push %edi 111a46: 53 push %ebx 111a47: 51 push %ecx 111a48: 50 push %eax 111a49: e8 a2 b2 ff ff call 10ccf0 <_Heap_Block_allocate> 111a4e: 89 d8 mov %ebx,%eax 111a50: 83 c4 10 add $0x10,%esp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 111a53: 8b 4d e4 mov -0x1c(%ebp),%ecx 111a56: 8b 55 08 mov 0x8(%ebp),%edx 111a59: 39 4a 44 cmp %ecx,0x44(%edx) 111a5c: 73 14 jae 111a72 <_Heap_Allocate_aligned_with_boundary+0x182> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 111a5e: 89 4a 44 mov %ecx,0x44(%edx) } return (void *) alloc_begin; } 111a61: 8d 65 f4 lea -0xc(%ebp),%esp 111a64: 5b pop %ebx 111a65: 5e pop %esi 111a66: 5f pop %edi 111a67: c9 leave 111a68: c3 ret /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 111a69: 3b 7d 14 cmp 0x14(%ebp),%edi 111a6c: 76 21 jbe 111a8f <_Heap_Allocate_aligned_with_boundary+0x19f> 111a6e: 66 90 xchg %ax,%ax ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 111a70: 31 c0 xor %eax,%eax } return (void *) alloc_begin; } 111a72: 8d 65 f4 lea -0xc(%ebp),%esp 111a75: 5b pop %ebx 111a76: 5e pop %esi 111a77: 5f pop %edi 111a78: c9 leave 111a79: c3 ret if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 111a7a: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 111a81: 8d 76 00 lea 0x0(%esi),%esi 111a84: 31 c0 xor %eax,%eax 111a86: eb cb jmp 111a53 <_Heap_Allocate_aligned_with_boundary+0x163> 111a88: 89 f1 mov %esi,%ecx <== NOT EXECUTED 111a8a: e9 c4 fe ff ff jmp 111953 <_Heap_Allocate_aligned_with_boundary+0x63><== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 111a8f: 8b 5d 10 mov 0x10(%ebp),%ebx 111a92: 85 db test %ebx,%ebx 111a94: 0f 85 87 fe ff ff jne 111921 <_Heap_Allocate_aligned_with_boundary+0x31> 111a9a: 89 55 10 mov %edx,0x10(%ebp) 111a9d: e9 7f fe ff ff jmp 111921 <_Heap_Allocate_aligned_with_boundary+0x31> =============================================================================== 0010ccf0 <_Heap_Block_allocate>: Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 10ccf0: 55 push %ebp 10ccf1: 89 e5 mov %esp,%ebp 10ccf3: 57 push %edi 10ccf4: 56 push %esi 10ccf5: 53 push %ebx 10ccf6: 83 ec 10 sub $0x10,%esp 10ccf9: 8b 75 08 mov 0x8(%ebp),%esi 10ccfc: 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; 10ccff: 89 5d ec mov %ebx,-0x14(%ebp) 10cd02: 8b 7d 10 mov 0x10(%ebp),%edi 10cd05: 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; 10cd08: 89 f8 mov %edi,%eax 10cd0a: 29 d8 sub %ebx,%eax Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 10cd0c: 8b 53 04 mov 0x4(%ebx),%edx 10cd0f: 83 e2 fe and $0xfffffffe,%edx 10cd12: f6 44 13 04 01 testb $0x1,0x4(%ebx,%edx,1) 10cd17: 0f 85 8b 00 00 00 jne 10cda8 <_Heap_Block_allocate+0xb8> free_list_anchor = block->prev; 10cd1d: 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; 10cd20: 8b 53 08 mov 0x8(%ebx),%edx Heap_Block *prev = block->prev; prev->next = next; 10cd23: 89 51 08 mov %edx,0x8(%ecx) next->prev = prev; 10cd26: 89 4a 0c mov %ecx,0xc(%edx) _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 10cd29: ff 4e 38 decl 0x38(%esi) ++stats->used_blocks; 10cd2c: ff 46 40 incl 0x40(%esi) stats->free_size -= _Heap_Block_size( block ); 10cd2f: 8b 53 04 mov 0x4(%ebx),%edx 10cd32: 83 e2 fe and $0xfffffffe,%edx 10cd35: 29 56 30 sub %edx,0x30(%esi) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 10cd38: 8b 56 10 mov 0x10(%esi),%edx 10cd3b: 89 55 e4 mov %edx,-0x1c(%ebp) 10cd3e: 39 d0 cmp %edx,%eax 10cd40: 72 72 jb 10cdb4 <_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; 10cd42: 8b 43 04 mov 0x4(%ebx),%eax 10cd45: 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 ) 10cd48: 8b 45 10 mov 0x10(%ebp),%eax 10cd4b: 31 d2 xor %edx,%edx 10cd4d: f7 75 e4 divl -0x1c(%ebp) 10cd50: 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; 10cd52: 89 f8 mov %edi,%eax 10cd54: 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; 10cd56: 01 46 30 add %eax,0x30(%esi) if ( _Heap_Is_prev_used( block ) ) { 10cd59: f6 43 04 01 testb $0x1,0x4(%ebx) 10cd5d: 75 69 jne 10cdc8 <_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); 10cd5f: 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; 10cd61: 8b 53 04 mov 0x4(%ebx),%edx 10cd64: 83 e2 fe and $0xfffffffe,%edx 10cd67: 01 d0 add %edx,%eax } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 10cd69: 89 c2 mov %eax,%edx 10cd6b: 83 ca 01 or $0x1,%edx 10cd6e: 89 53 04 mov %edx,0x4(%ebx) new_block->prev_size = block_size; 10cd71: 89 07 mov %eax,(%edi) new_block->size_and_flag = new_block_size; 10cd73: 8b 45 f0 mov -0x10(%ebp),%eax 10cd76: 83 e0 fe and $0xfffffffe,%eax 10cd79: 03 45 ec add -0x14(%ebp),%eax 10cd7c: 29 f8 sub %edi,%eax 10cd7e: 89 47 04 mov %eax,0x4(%edi) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 10cd81: ff 75 14 pushl 0x14(%ebp) 10cd84: 51 push %ecx 10cd85: 57 push %edi 10cd86: 56 push %esi 10cd87: e8 80 fe ff ff call 10cc0c <_Heap_Block_split> 10cd8c: 89 fb mov %edi,%ebx 10cd8e: 83 c4 10 add $0x10,%esp alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 10cd91: 8b 46 30 mov 0x30(%esi),%eax Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 10cd94: 39 46 34 cmp %eax,0x34(%esi) 10cd97: 76 03 jbe 10cd9c <_Heap_Block_allocate+0xac> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 10cd99: 89 46 34 mov %eax,0x34(%esi) } return block; } 10cd9c: 89 d8 mov %ebx,%eax 10cd9e: 8d 65 f4 lea -0xc(%ebp),%esp 10cda1: 5b pop %ebx 10cda2: 5e pop %esi 10cda3: 5f pop %edi 10cda4: c9 leave 10cda5: c3 ret 10cda6: 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 ); 10cda8: 89 f1 mov %esi,%ecx } if ( alloc_area_offset < heap->page_size ) { 10cdaa: 8b 56 10 mov 0x10(%esi),%edx 10cdad: 89 55 e4 mov %edx,-0x1c(%ebp) 10cdb0: 39 d0 cmp %edx,%eax 10cdb2: 73 8e jae 10cd42 <_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 ); 10cdb4: 03 45 14 add 0x14(%ebp),%eax 10cdb7: 50 push %eax 10cdb8: 51 push %ecx 10cdb9: 53 push %ebx 10cdba: 56 push %esi 10cdbb: e8 4c fe ff ff call 10cc0c <_Heap_Block_split> 10cdc0: 83 c4 10 add $0x10,%esp 10cdc3: eb cc jmp 10cd91 <_Heap_Block_allocate+0xa1> 10cdc5: 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; 10cdc8: 8b 51 08 mov 0x8(%ecx),%edx new_block->next = next; 10cdcb: 89 53 08 mov %edx,0x8(%ebx) new_block->prev = block_before; 10cdce: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10cdd1: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10cdd4: 89 5a 0c mov %ebx,0xc(%edx) _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 10cdd7: ff 46 38 incl 0x38(%esi) 10cdda: 89 d9 mov %ebx,%ecx 10cddc: eb 8b jmp 10cd69 <_Heap_Block_allocate+0x79> =============================================================================== 0010cc0c <_Heap_Block_split>: Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 10cc0c: 55 push %ebp 10cc0d: 89 e5 mov %esp,%ebp 10cc0f: 57 push %edi 10cc10: 56 push %esi 10cc11: 53 push %ebx 10cc12: 83 ec 14 sub $0x14,%esp 10cc15: 8b 4d 08 mov 0x8(%ebp),%ecx 10cc18: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; 10cc1b: 8b 79 10 mov 0x10(%ecx),%edi uintptr_t const min_block_size = heap->min_block_size; 10cc1e: 8b 41 14 mov 0x14(%ecx),%eax 10cc21: 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; 10cc24: 8b 43 04 mov 0x4(%ebx),%eax 10cc27: 89 45 e4 mov %eax,-0x1c(%ebp) 10cc2a: 89 c6 mov %eax,%esi 10cc2c: 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; 10cc2f: 8b 55 e8 mov -0x18(%ebp),%edx 10cc32: 83 ea 08 sub $0x8,%edx 10cc35: 8b 45 14 mov 0x14(%ebp),%eax 10cc38: 39 d0 cmp %edx,%eax 10cc3a: 73 02 jae 10cc3e <_Heap_Block_split+0x32> 10cc3c: 89 d0 mov %edx,%eax 10cc3e: 83 c0 08 add $0x8,%eax 10cc41: 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; 10cc44: 31 d2 xor %edx,%edx 10cc46: f7 f7 div %edi if ( remainder != 0 ) { 10cc48: 85 d2 test %edx,%edx 10cc4a: 75 70 jne 10ccbc <_Heap_Block_split+0xb0> 10cc4c: 8b 7d f0 mov -0x10(%ebp),%edi 10cc4f: 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); 10cc52: 8d 04 33 lea (%ebx,%esi,1),%eax 10cc55: 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 ) { 10cc58: 8d 56 04 lea 0x4(%esi),%edx 10cc5b: 2b 55 f0 sub -0x10(%ebp),%edx 10cc5e: 8b 7d e8 mov -0x18(%ebp),%edi 10cc61: 83 c7 04 add $0x4,%edi 10cc64: 39 fa cmp %edi,%edx 10cc66: 72 60 jb 10ccc8 <_Heap_Block_split+0xbc> 10cc68: 8b 55 ec mov -0x14(%ebp),%edx 10cc6b: 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; 10cc6d: 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; 10cc70: 8b 7d e4 mov -0x1c(%ebp),%edi 10cc73: 83 e7 01 and $0x1,%edi 10cc76: 0b 7d ec or -0x14(%ebp),%edi 10cc79: 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; 10cc7c: 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; 10cc7f: 8b 58 04 mov 0x4(%eax),%ebx 10cc82: 83 e3 fe and $0xfffffffe,%ebx if ( _Heap_Is_used( next_block ) ) { 10cc85: f6 44 18 04 01 testb $0x1,0x4(%eax,%ebx,1) 10cc8a: 75 4c jne 10ccd8 <_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; 10cc8c: 8b 48 08 mov 0x8(%eax),%ecx Heap_Block *prev = old_block->prev; 10cc8f: 8b 40 0c mov 0xc(%eax),%eax new_block->next = next; 10cc92: 89 4a 08 mov %ecx,0x8(%edx) new_block->prev = prev; 10cc95: 89 42 0c mov %eax,0xc(%edx) next->prev = new_block; 10cc98: 89 51 0c mov %edx,0xc(%ecx) prev->next = new_block; 10cc9b: 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; 10cc9e: 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); 10cca0: 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; 10cca3: 89 f1 mov %esi,%ecx 10cca5: 83 c9 01 or $0x1,%ecx 10cca8: 89 4a 04 mov %ecx,0x4(%edx) next_block->prev_size = free_block_size; 10ccab: 89 30 mov %esi,(%eax) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10ccad: 83 60 04 fe andl $0xfffffffe,0x4(%eax) } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; } } 10ccb1: 83 c4 14 add $0x14,%esp 10ccb4: 5b pop %ebx 10ccb5: 5e pop %esi 10ccb6: 5f pop %edi 10ccb7: c9 leave 10ccb8: c3 ret 10ccb9: 8d 76 00 lea 0x0(%esi),%esi ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; 10ccbc: 03 7d f0 add -0x10(%ebp),%edi 10ccbf: 29 d7 sub %edx,%edi 10ccc1: 89 7d ec mov %edi,-0x14(%ebp) 10ccc4: eb 8c jmp 10cc52 <_Heap_Block_split+0x46> 10ccc6: 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; 10ccc8: 8b 45 e0 mov -0x20(%ebp),%eax 10cccb: 83 48 04 01 orl $0x1,0x4(%eax) } } 10cccf: 83 c4 14 add $0x14,%esp 10ccd2: 5b pop %ebx 10ccd3: 5e pop %esi 10ccd4: 5f pop %edi 10ccd5: c9 leave 10ccd6: c3 ret 10ccd7: 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; 10ccd8: 8b 7d 10 mov 0x10(%ebp),%edi 10ccdb: 8b 5f 08 mov 0x8(%edi),%ebx new_block->next = next; 10ccde: 89 5a 08 mov %ebx,0x8(%edx) new_block->prev = block_before; 10cce1: 89 7a 0c mov %edi,0xc(%edx) block_before->next = new_block; 10cce4: 89 57 08 mov %edx,0x8(%edi) next->prev = new_block; 10cce7: 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; 10ccea: ff 41 38 incl 0x38(%ecx) 10cced: eb b4 jmp 10cca3 <_Heap_Block_split+0x97> =============================================================================== 00115258 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 115258: 55 push %ebp 115259: 89 e5 mov %esp,%ebp 11525b: 56 push %esi 11525c: 53 push %ebx 11525d: 8b 4d 08 mov 0x8(%ebp),%ecx 115260: 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; 115263: 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; 115266: 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; 115269: 3b 41 18 cmp 0x18(%ecx),%eax 11526c: 73 3a jae 1152a8 <_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 ) { 11526e: 39 d0 cmp %edx,%eax 115270: 74 0e je 115280 <_Heap_Extend+0x28> 115272: b8 02 00 00 00 mov $0x2,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 115277: 8d 65 f8 lea -0x8(%ebp),%esp 11527a: 5b pop %ebx 11527b: 5e pop %esi 11527c: c9 leave 11527d: c3 ret 11527e: 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; 115280: 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; 115283: 89 41 1c mov %eax,0x1c(%ecx) extend_size = new_heap_area_end 115286: 29 d8 sub %ebx,%eax 115288: 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); 11528b: 89 f0 mov %esi,%eax 11528d: 31 d2 xor %edx,%edx 11528f: f7 71 10 divl 0x10(%ecx) 115292: 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; 115294: 8b 45 14 mov 0x14(%ebp),%eax 115297: 89 30 mov %esi,(%eax) if( extend_size >= heap->min_block_size ) { 115299: 39 71 14 cmp %esi,0x14(%ecx) 11529c: 76 1a jbe 1152b8 <_Heap_Extend+0x60> <== ALWAYS TAKEN 11529e: 31 c0 xor %eax,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 1152a0: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 1152a3: 5b pop %ebx <== NOT EXECUTED 1152a4: 5e pop %esi <== NOT EXECUTED 1152a5: c9 leave <== NOT EXECUTED 1152a6: c3 ret <== NOT EXECUTED 1152a7: 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 ) { 1152a8: 39 d0 cmp %edx,%eax 1152aa: 73 c2 jae 11526e <_Heap_Extend+0x16> 1152ac: b8 01 00 00 00 mov $0x1,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 1152b1: 8d 65 f8 lea -0x8(%ebp),%esp 1152b4: 5b pop %ebx 1152b5: 5e pop %esi 1152b6: c9 leave 1152b7: c3 ret RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 1152b8: 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; 1152bb: 8b 43 04 mov 0x4(%ebx),%eax 1152be: 83 e0 01 and $0x1,%eax 1152c1: 09 f0 or %esi,%eax 1152c3: 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 = 1152c6: 8b 41 20 mov 0x20(%ecx),%eax 1152c9: 29 d0 sub %edx,%eax 1152cb: 83 c8 01 or $0x1,%eax 1152ce: 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; 1152d1: 89 51 24 mov %edx,0x24(%ecx) /* Statistics */ stats->size += extend_size; 1152d4: 01 71 2c add %esi,0x2c(%ecx) ++stats->used_blocks; 1152d7: ff 41 40 incl 0x40(%ecx) --stats->frees; /* Do not count subsequent call as actual free() */ 1152da: ff 49 50 decl 0x50(%ecx) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 1152dd: 83 ec 08 sub $0x8,%esp 1152e0: 83 c3 08 add $0x8,%ebx 1152e3: 53 push %ebx 1152e4: 51 push %ecx 1152e5: e8 ea a7 ff ff call 10fad4 <_Heap_Free> 1152ea: 31 c0 xor %eax,%eax 1152ec: 83 c4 10 add $0x10,%esp } return HEAP_EXTEND_SUCCESSFUL; } 1152ef: 8d 65 f8 lea -0x8(%ebp),%esp 1152f2: 5b pop %ebx 1152f3: 5e pop %esi 1152f4: c9 leave 1152f5: c3 ret =============================================================================== 00111aa4 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 111aa4: 55 push %ebp 111aa5: 89 e5 mov %esp,%ebp 111aa7: 57 push %edi 111aa8: 56 push %esi 111aa9: 53 push %ebx 111aaa: 83 ec 18 sub $0x18,%esp 111aad: 8b 5d 08 mov 0x8(%ebp),%ebx 111ab0: 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 ) 111ab3: 8d 48 f8 lea -0x8(%eax),%ecx 111ab6: 31 d2 xor %edx,%edx 111ab8: f7 73 10 divl 0x10(%ebx) 111abb: 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; 111abd: 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 111ac0: 39 c1 cmp %eax,%ecx 111ac2: 72 07 jb 111acb <_Heap_Free+0x27> && (uintptr_t) block <= (uintptr_t) heap->last_block; 111ac4: 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 111ac7: 39 f1 cmp %esi,%ecx 111ac9: 76 0d jbe 111ad8 <_Heap_Free+0x34> /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 111acb: 31 c0 xor %eax,%eax } 111acd: 83 c4 18 add $0x18,%esp 111ad0: 5b pop %ebx 111ad1: 5e pop %esi 111ad2: 5f pop %edi 111ad3: c9 leave 111ad4: c3 ret 111ad5: 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; 111ad8: 8b 51 04 mov 0x4(%ecx),%edx 111adb: 89 55 f0 mov %edx,-0x10(%ebp) 111ade: 83 e2 fe and $0xfffffffe,%edx 111ae1: 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); 111ae4: 01 ca add %ecx,%edx 111ae6: 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 111ae9: 39 d0 cmp %edx,%eax 111aeb: 77 de ja 111acb <_Heap_Free+0x27> <== NEVER TAKEN 111aed: 39 d6 cmp %edx,%esi 111aef: 72 da jb 111acb <_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; 111af1: 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 ) ) { 111af4: f7 c7 01 00 00 00 test $0x1,%edi 111afa: 74 cf je 111acb <_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; 111afc: 83 e7 fe and $0xfffffffe,%edi 111aff: 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 111b02: 39 d6 cmp %edx,%esi 111b04: 0f 84 e2 00 00 00 je 111bec <_Heap_Free+0x148> #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 111b0a: 8b 55 dc mov -0x24(%ebp),%edx 111b0d: 8b 7d e8 mov -0x18(%ebp),%edi 111b10: 8b 7c 3a 04 mov 0x4(%edx,%edi,1),%edi 111b14: 89 7d e0 mov %edi,-0x20(%ebp) 111b17: 8a 55 e0 mov -0x20(%ebp),%dl 111b1a: 83 e2 01 and $0x1,%edx 111b1d: 88 55 e7 mov %dl,-0x19(%ebp) 111b20: 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 ) ) { 111b24: f6 45 f0 01 testb $0x1,-0x10(%ebp) 111b28: 75 46 jne 111b70 <_Heap_Free+0xcc> uintptr_t const prev_size = block->prev_size; 111b2a: 8b 39 mov (%ecx),%edi 111b2c: 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); 111b2f: 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 111b31: 39 c8 cmp %ecx,%eax 111b33: 77 96 ja 111acb <_Heap_Free+0x27> <== NEVER TAKEN 111b35: 39 ce cmp %ecx,%esi 111b37: 72 92 jb 111acb <_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) ) { 111b39: f6 41 04 01 testb $0x1,0x4(%ecx) 111b3d: 74 8c je 111acb <_Heap_Free+0x27> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 111b3f: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 111b43: 0f 84 af 00 00 00 je 111bf8 <_Heap_Free+0x154> uintptr_t const size = block_size + prev_size + next_block_size; 111b49: 8b 45 ec mov -0x14(%ebp),%eax 111b4c: 03 45 e8 add -0x18(%ebp),%eax 111b4f: 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; 111b51: 8b 55 dc mov -0x24(%ebp),%edx 111b54: 8b 72 08 mov 0x8(%edx),%esi Heap_Block *prev = block->prev; 111b57: 8b 52 0c mov 0xc(%edx),%edx prev->next = next; 111b5a: 89 72 08 mov %esi,0x8(%edx) next->prev = prev; 111b5d: 89 56 0c mov %edx,0xc(%esi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 111b60: ff 4b 38 decl 0x38(%ebx) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 111b63: 89 c2 mov %eax,%edx 111b65: 83 ca 01 or $0x1,%edx 111b68: 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; 111b6b: 89 04 01 mov %eax,(%ecx,%eax,1) 111b6e: eb 2c jmp 111b9c <_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 */ 111b70: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 111b74: 74 3e je 111bb4 <_Heap_Free+0x110> uintptr_t const size = block_size + next_block_size; 111b76: 8b 7d e8 mov -0x18(%ebp),%edi 111b79: 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; 111b7c: 8b 75 dc mov -0x24(%ebp),%esi 111b7f: 8b 46 08 mov 0x8(%esi),%eax Heap_Block *prev = old_block->prev; 111b82: 8b 56 0c mov 0xc(%esi),%edx new_block->next = next; 111b85: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = prev; 111b88: 89 51 0c mov %edx,0xc(%ecx) next->prev = new_block; 111b8b: 89 48 0c mov %ecx,0xc(%eax) prev->next = new_block; 111b8e: 89 4a 08 mov %ecx,0x8(%edx) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 111b91: 89 f8 mov %edi,%eax 111b93: 83 c8 01 or $0x1,%eax 111b96: 89 41 04 mov %eax,0x4(%ecx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 111b99: 89 3c 39 mov %edi,(%ecx,%edi,1) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 111b9c: ff 4b 40 decl 0x40(%ebx) ++stats->frees; 111b9f: ff 43 50 incl 0x50(%ebx) stats->free_size += block_size; 111ba2: 8b 55 ec mov -0x14(%ebp),%edx 111ba5: 01 53 30 add %edx,0x30(%ebx) 111ba8: b0 01 mov $0x1,%al return( true ); } 111baa: 83 c4 18 add $0x18,%esp 111bad: 5b pop %ebx 111bae: 5e pop %esi 111baf: 5f pop %edi 111bb0: c9 leave 111bb1: c3 ret 111bb2: 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; 111bb4: 8b 43 08 mov 0x8(%ebx),%eax new_block->next = next; 111bb7: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = block_before; 111bba: 89 59 0c mov %ebx,0xc(%ecx) block_before->next = new_block; 111bbd: 89 4b 08 mov %ecx,0x8(%ebx) next->prev = new_block; 111bc0: 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; 111bc3: 8b 45 ec mov -0x14(%ebp),%eax 111bc6: 83 c8 01 or $0x1,%eax 111bc9: 89 41 04 mov %eax,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 111bcc: 8b 7d dc mov -0x24(%ebp),%edi 111bcf: 83 67 04 fe andl $0xfffffffe,0x4(%edi) next_block->prev_size = block_size; 111bd3: 8b 45 ec mov -0x14(%ebp),%eax 111bd6: 89 07 mov %eax,(%edi) /* Statistics */ ++stats->free_blocks; 111bd8: 8b 43 38 mov 0x38(%ebx),%eax 111bdb: 40 inc %eax 111bdc: 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; 111bdf: 3b 43 3c cmp 0x3c(%ebx),%eax 111be2: 76 b8 jbe 111b9c <_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; 111be4: 89 43 3c mov %eax,0x3c(%ebx) 111be7: eb b3 jmp 111b9c <_Heap_Free+0xf8> 111be9: 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 111bec: c6 45 e7 00 movb $0x0,-0x19(%ebp) 111bf0: e9 2f ff ff ff jmp 111b24 <_Heap_Free+0x80> 111bf5: 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; 111bf8: 8b 45 ec mov -0x14(%ebp),%eax 111bfb: 03 45 f0 add -0x10(%ebp),%eax prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 111bfe: 89 c6 mov %eax,%esi 111c00: 83 ce 01 or $0x1,%esi 111c03: 89 71 04 mov %esi,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 111c06: 8b 55 dc mov -0x24(%ebp),%edx 111c09: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 111c0d: 89 02 mov %eax,(%edx) 111c0f: eb 8b jmp 111b9c <_Heap_Free+0xf8> =============================================================================== 001152f8 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 1152f8: 55 push %ebp 1152f9: 89 e5 mov %esp,%ebp 1152fb: 57 push %edi 1152fc: 56 push %esi 1152fd: 53 push %ebx 1152fe: 8b 7d 08 mov 0x8(%ebp),%edi 115301: 8b 75 0c mov 0xc(%ebp),%esi Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 115304: c7 06 00 00 00 00 movl $0x0,(%esi) info->largest = 0; 11530a: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) info->total = 0; 115311: 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; 115318: 8b 57 08 mov 0x8(%edi),%edx for(the_block = _Heap_Free_list_first(the_heap); 11531b: 39 d7 cmp %edx,%edi 11531d: 74 2a je 115349 <_Heap_Get_free_information+0x51><== NEVER TAKEN 11531f: bb 01 00 00 00 mov $0x1,%ebx 115324: 31 c9 xor %ecx,%ecx 115326: eb 02 jmp 11532a <_Heap_Get_free_information+0x32> 115328: 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; 11532a: 8b 42 04 mov 0x4(%edx),%eax 11532d: 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; 115330: 01 c1 add %eax,%ecx if ( info->largest < the_size ) 115332: 39 46 04 cmp %eax,0x4(%esi) 115335: 73 03 jae 11533a <_Heap_Get_free_information+0x42> info->largest = the_size; 115337: 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) 11533a: 8b 52 08 mov 0x8(%edx),%edx 11533d: 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); 115340: 39 d7 cmp %edx,%edi 115342: 75 e4 jne 115328 <_Heap_Get_free_information+0x30> 115344: 89 1e mov %ebx,(%esi) 115346: 89 4e 08 mov %ecx,0x8(%esi) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 115349: 5b pop %ebx 11534a: 5e pop %esi 11534b: 5f pop %edi 11534c: c9 leave 11534d: c3 ret =============================================================================== 00115350 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 115350: 55 push %ebp 115351: 89 e5 mov %esp,%ebp 115353: 57 push %edi 115354: 56 push %esi 115355: 53 push %ebx 115356: 83 ec 04 sub $0x4,%esp 115359: 8b 45 08 mov 0x8(%ebp),%eax 11535c: 8b 75 0c mov 0xc(%ebp),%esi Heap_Block *the_block = the_heap->first_block; 11535f: 8b 58 20 mov 0x20(%eax),%ebx Heap_Block *const end = the_heap->last_block; 115362: 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; 115365: c7 06 00 00 00 00 movl $0x0,(%esi) the_info->Free.total = 0; 11536b: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi) the_info->Free.largest = 0; 115372: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) the_info->Used.number = 0; 115379: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) the_info->Used.total = 0; 115380: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) the_info->Used.largest = 0; 115387: c7 46 10 00 00 00 00 movl $0x0,0x10(%esi) while ( the_block != end ) { 11538e: 39 fb cmp %edi,%ebx 115390: 74 45 je 1153d7 <_Heap_Get_information+0x87><== NEVER TAKEN 115392: 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; 115395: 8d 46 0c lea 0xc(%esi),%eax 115398: 89 45 f0 mov %eax,-0x10(%ebp) 11539b: eb 16 jmp 1153b3 <_Heap_Get_information+0x63> 11539d: 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) ) 1153a0: 89 f0 mov %esi,%eax info = &the_info->Used; else info = &the_info->Free; info->number++; 1153a2: ff 00 incl (%eax) info->total += the_size; 1153a4: 01 50 08 add %edx,0x8(%eax) if ( info->largest < the_size ) 1153a7: 39 50 04 cmp %edx,0x4(%eax) 1153aa: 73 03 jae 1153af <_Heap_Get_information+0x5f> info->largest = the_size; 1153ac: 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 ) { 1153af: 39 df cmp %ebx,%edi 1153b1: 74 15 je 1153c8 <_Heap_Get_information+0x78> 1153b3: 89 ca mov %ecx,%edx 1153b5: 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); 1153b8: 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; 1153ba: 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) ) 1153bd: f6 c1 01 test $0x1,%cl 1153c0: 74 de je 1153a0 <_Heap_Get_information+0x50> 1153c2: 8b 45 f0 mov -0x10(%ebp),%eax 1153c5: eb db jmp 1153a2 <_Heap_Get_information+0x52> 1153c7: 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 ) { 1153c8: 8b 46 14 mov 0x14(%esi),%eax 1153cb: 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; 1153ce: 89 46 14 mov %eax,0x14(%esi) } 1153d1: 58 pop %eax 1153d2: 5b pop %ebx 1153d3: 5e pop %esi 1153d4: 5f pop %edi 1153d5: c9 leave 1153d6: 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 ) { 1153d7: b8 08 00 00 00 mov $0x8,%eax <== NOT EXECUTED 1153dc: eb f0 jmp 1153ce <_Heap_Get_information+0x7e><== NOT EXECUTED =============================================================================== 0011f924 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 11f924: 55 push %ebp 11f925: 89 e5 mov %esp,%ebp 11f927: 57 push %edi 11f928: 56 push %esi 11f929: 53 push %ebx 11f92a: 83 ec 2c sub $0x2c,%esp 11f92d: 8b 5d 08 mov 0x8(%ebp),%ebx 11f930: 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 ) 11f933: 8d 4e f8 lea -0x8(%esi),%ecx 11f936: 89 f0 mov %esi,%eax 11f938: 31 d2 xor %edx,%edx 11f93a: f7 73 10 divl 0x10(%ebx) 11f93d: 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; 11f93f: 8b 45 14 mov 0x14(%ebp),%eax 11f942: c7 00 00 00 00 00 movl $0x0,(%eax) *new_size = 0; 11f948: 8b 55 18 mov 0x18(%ebp),%edx 11f94b: 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 11f951: 39 4b 20 cmp %ecx,0x20(%ebx) 11f954: 76 0e jbe 11f964 <_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; 11f956: b8 02 00 00 00 mov $0x2,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11f95b: 8d 65 f4 lea -0xc(%ebp),%esp 11f95e: 5b pop %ebx 11f95f: 5e pop %esi 11f960: 5f pop %edi 11f961: c9 leave 11f962: c3 ret 11f963: 90 nop 11f964: 39 4b 24 cmp %ecx,0x24(%ebx) 11f967: 72 ed jb 11f956 <_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; 11f969: 8b 41 04 mov 0x4(%ecx),%eax 11f96c: 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; 11f96f: 8d 3c 01 lea (%ecx,%eax,1),%edi 11f972: 89 7d d4 mov %edi,-0x2c(%ebp) uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 11f975: 89 fa mov %edi,%edx 11f977: 29 f2 sub %esi,%edx 11f979: 83 c2 04 add $0x4,%edx 11f97c: 89 55 dc mov %edx,-0x24(%ebp) 11f97f: 8b 57 04 mov 0x4(%edi),%edx 11f982: 83 e2 fe and $0xfffffffe,%edx 11f985: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 11f988: 8b 54 17 04 mov 0x4(%edi,%edx,1),%edx 11f98c: 83 e2 01 and $0x1,%edx 11f98f: 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; 11f992: 8b 55 dc mov -0x24(%ebp),%edx 11f995: 8b 7d 14 mov 0x14(%ebp),%edi 11f998: 89 17 mov %edx,(%edi) if ( next_block_is_free ) { 11f99a: 8a 55 e0 mov -0x20(%ebp),%dl 11f99d: 80 f2 01 xor $0x1,%dl 11f9a0: 88 55 e0 mov %dl,-0x20(%ebp) 11f9a3: 75 17 jne 11f9bc <_Heap_Resize_block+0x98> block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { 11f9a5: 8b 55 dc mov -0x24(%ebp),%edx 11f9a8: 39 55 10 cmp %edx,0x10(%ebp) 11f9ab: 76 20 jbe 11f9cd <_Heap_Resize_block+0xa9> 11f9ad: b8 01 00 00 00 mov $0x1,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11f9b2: 8d 65 f4 lea -0xc(%ebp),%esp 11f9b5: 5b pop %ebx 11f9b6: 5e pop %esi 11f9b7: 5f pop %edi 11f9b8: c9 leave 11f9b9: c3 ret 11f9ba: 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; 11f9bc: 03 45 d0 add -0x30(%ebp),%eax alloc_size += next_block_size; 11f9bf: 8b 7d d0 mov -0x30(%ebp),%edi 11f9c2: 01 7d dc add %edi,-0x24(%ebp) } if ( new_alloc_size > alloc_size ) { 11f9c5: 8b 55 dc mov -0x24(%ebp),%edx 11f9c8: 39 55 10 cmp %edx,0x10(%ebp) 11f9cb: 77 e0 ja 11f9ad <_Heap_Resize_block+0x89><== NEVER TAKEN return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 11f9cd: 80 7d e0 00 cmpb $0x0,-0x20(%ebp) 11f9d1: 74 31 je 11fa04 <_Heap_Resize_block+0xe0> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 11f9d3: 8b 79 04 mov 0x4(%ecx),%edi 11f9d6: 83 e7 01 and $0x1,%edi 11f9d9: 09 c7 or %eax,%edi 11f9db: 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; 11f9de: 8b 7d d4 mov -0x2c(%ebp),%edi 11f9e1: 8b 7f 08 mov 0x8(%edi),%edi 11f9e4: 89 7d e4 mov %edi,-0x1c(%ebp) Heap_Block *prev = block->prev; 11f9e7: 8b 55 d4 mov -0x2c(%ebp),%edx 11f9ea: 8b 7a 0c mov 0xc(%edx),%edi prev->next = next; 11f9ed: 8b 55 e4 mov -0x1c(%ebp),%edx 11f9f0: 89 57 08 mov %edx,0x8(%edi) next->prev = prev; 11f9f3: 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; 11f9f6: 83 4c 08 04 01 orl $0x1,0x4(%eax,%ecx,1) /* Statistics */ --stats->free_blocks; 11f9fb: ff 4b 38 decl 0x38(%ebx) stats->free_size -= next_block_size; 11f9fe: 8b 7d d0 mov -0x30(%ebp),%edi 11fa01: 29 7b 30 sub %edi,0x30(%ebx) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 11fa04: ff 75 10 pushl 0x10(%ebp) 11fa07: 56 push %esi 11fa08: 51 push %ecx 11fa09: 53 push %ebx 11fa0a: e8 e1 d2 fe ff call 10ccf0 <_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; 11fa0f: 8b 50 04 mov 0x4(%eax),%edx 11fa12: 83 e2 fe and $0xfffffffe,%edx 11fa15: 29 f0 sub %esi,%eax 11fa17: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 11fa1b: 8b 55 18 mov 0x18(%ebp),%edx 11fa1e: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->resizes; 11fa20: ff 43 54 incl 0x54(%ebx) 11fa23: 31 c0 xor %eax,%eax 11fa25: 83 c4 10 add $0x10,%esp new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11fa28: 8d 65 f4 lea -0xc(%ebp),%esp 11fa2b: 5b pop %ebx 11fa2c: 5e pop %esi 11fa2d: 5f pop %edi 11fa2e: c9 leave 11fa2f: c3 ret =============================================================================== 0011fa30 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11fa30: 55 push %ebp 11fa31: 89 e5 mov %esp,%ebp 11fa33: 56 push %esi 11fa34: 53 push %ebx 11fa35: 8b 5d 08 mov 0x8(%ebp),%ebx 11fa38: 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 ) 11fa3b: 8d 4e f8 lea -0x8(%esi),%ecx 11fa3e: 89 f0 mov %esi,%eax 11fa40: 31 d2 xor %edx,%edx 11fa42: f7 73 10 divl 0x10(%ebx) 11fa45: 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; 11fa47: 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 11fa4a: 39 c1 cmp %eax,%ecx 11fa4c: 72 07 jb 11fa55 <_Heap_Size_of_alloc_area+0x25> && (uintptr_t) block <= (uintptr_t) heap->last_block; 11fa4e: 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 11fa51: 39 d1 cmp %edx,%ecx 11fa53: 76 07 jbe 11fa5c <_Heap_Size_of_alloc_area+0x2c><== ALWAYS TAKEN return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; return true; 11fa55: 31 c0 xor %eax,%eax } 11fa57: 5b pop %ebx 11fa58: 5e pop %esi 11fa59: c9 leave 11fa5a: c3 ret 11fa5b: 90 nop RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11fa5c: 8b 59 04 mov 0x4(%ecx),%ebx 11fa5f: 83 e3 fe and $0xfffffffe,%ebx 11fa62: 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 11fa64: 39 c8 cmp %ecx,%eax 11fa66: 77 ed ja 11fa55 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN 11fa68: 39 ca cmp %ecx,%edx 11fa6a: 72 e9 jb 11fa55 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 11fa6c: f6 41 04 01 testb $0x1,0x4(%ecx) 11fa70: 74 e3 je 11fa55 <_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; 11fa72: 29 f1 sub %esi,%ecx 11fa74: 8d 51 04 lea 0x4(%ecx),%edx 11fa77: 8b 45 10 mov 0x10(%ebp),%eax 11fa7a: 89 10 mov %edx,(%eax) 11fa7c: b0 01 mov $0x1,%al return true; } 11fa7e: 5b pop %ebx 11fa7f: 5e pop %esi 11fa80: c9 leave 11fa81: c3 ret =============================================================================== 0010d858 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10d858: 55 push %ebp 10d859: 89 e5 mov %esp,%ebp 10d85b: 57 push %edi 10d85c: 56 push %esi 10d85d: 53 push %ebx 10d85e: 83 ec 3c sub $0x3c,%esp 10d861: 8b 5d 08 mov 0x8(%ebp),%ebx uintptr_t const page_size = heap->page_size; 10d864: 8b 43 10 mov 0x10(%ebx),%eax 10d867: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10d86a: 8b 53 14 mov 0x14(%ebx),%edx 10d86d: 89 55 dc mov %edx,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10d870: 8b 43 24 mov 0x24(%ebx),%eax 10d873: 89 45 d8 mov %eax,-0x28(%ebp) Heap_Block *block = heap->first_block; 10d876: 8b 73 20 mov 0x20(%ebx),%esi Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d879: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10d87d: 75 1d jne 10d89c <_Heap_Walk+0x44> 10d87f: c7 45 e4 50 d8 10 00 movl $0x10d850,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d886: 83 3d 60 a7 12 00 03 cmpl $0x3,0x12a760 10d88d: 74 1d je 10d8ac <_Heap_Walk+0x54> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10d88f: b0 01 mov $0x1,%al block = next_block; } return true; } 10d891: 8d 65 f4 lea -0xc(%ebp),%esp 10d894: 5b pop %ebx 10d895: 5e pop %esi 10d896: 5f pop %edi 10d897: c9 leave 10d898: c3 ret 10d899: 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; 10d89c: c7 45 e4 20 dc 10 00 movl $0x10dc20,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d8a3: 83 3d 60 a7 12 00 03 cmpl $0x3,0x12a760 10d8aa: 75 e3 jne 10d88f <_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)( 10d8ac: 52 push %edx 10d8ad: ff 73 0c pushl 0xc(%ebx) 10d8b0: ff 73 08 pushl 0x8(%ebx) 10d8b3: ff 75 d8 pushl -0x28(%ebp) 10d8b6: 56 push %esi 10d8b7: ff 73 1c pushl 0x1c(%ebx) 10d8ba: ff 73 18 pushl 0x18(%ebx) 10d8bd: ff 75 dc pushl -0x24(%ebp) 10d8c0: ff 75 e0 pushl -0x20(%ebp) 10d8c3: 68 b0 28 12 00 push $0x1228b0 10d8c8: 6a 00 push $0x0 10d8ca: ff 75 0c pushl 0xc(%ebp) 10d8cd: 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 ) { 10d8d0: 83 c4 30 add $0x30,%esp 10d8d3: 8b 45 e0 mov -0x20(%ebp),%eax 10d8d6: 85 c0 test %eax,%eax 10d8d8: 0f 84 b2 00 00 00 je 10d990 <_Heap_Walk+0x138> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10d8de: f6 45 e0 03 testb $0x3,-0x20(%ebp) 10d8e2: 0f 85 b0 00 00 00 jne 10d998 <_Heap_Walk+0x140> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10d8e8: 8b 45 dc mov -0x24(%ebp),%eax 10d8eb: 31 d2 xor %edx,%edx 10d8ed: f7 75 e0 divl -0x20(%ebp) 10d8f0: 85 d2 test %edx,%edx 10d8f2: 0f 85 ac 00 00 00 jne 10d9a4 <_Heap_Walk+0x14c> ); return false; } if ( 10d8f8: 8d 46 08 lea 0x8(%esi),%eax 10d8fb: 31 d2 xor %edx,%edx 10d8fd: f7 75 e0 divl -0x20(%ebp) 10d900: 85 d2 test %edx,%edx 10d902: 0f 85 a8 00 00 00 jne 10d9b0 <_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; 10d908: 8b 56 04 mov 0x4(%esi),%edx 10d90b: 89 55 cc mov %edx,-0x34(%ebp) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10d90e: 83 e2 01 and $0x1,%edx 10d911: 0f 84 a1 00 00 00 je 10d9b8 <_Heap_Walk+0x160> ); return false; } if ( first_block->prev_size != page_size ) { 10d917: 8b 06 mov (%esi),%eax 10d919: 39 45 e0 cmp %eax,-0x20(%ebp) 10d91c: 75 4e jne 10d96c <_Heap_Walk+0x114> ); return false; } if ( _Heap_Is_free( last_block ) ) { 10d91e: 8b 55 d8 mov -0x28(%ebp),%edx 10d921: 8b 42 04 mov 0x4(%edx),%eax 10d924: 83 e0 fe and $0xfffffffe,%eax 10d927: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1) 10d92c: 0f 84 bd 02 00 00 je 10dbef <_Heap_Walk+0x397> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10d932: 8b 43 10 mov 0x10(%ebx),%eax 10d935: 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; 10d938: 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 ) { 10d93b: 39 cb cmp %ecx,%ebx 10d93d: 0f 84 09 01 00 00 je 10da4c <_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; 10d943: 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 10d946: 39 cf cmp %ecx,%edi 10d948: 76 76 jbe 10d9c0 <_Heap_Walk+0x168> <== ALWAYS TAKEN 10d94a: 66 90 xchg %ax,%ax if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 10d94c: 51 push %ecx 10d94d: 68 f8 29 12 00 push $0x1229f8 10d952: 66 90 xchg %ax,%ax return false; } if ( !prev_used ) { (*printer)( 10d954: 6a 01 push $0x1 10d956: ff 75 0c pushl 0xc(%ebp) 10d959: ff 55 e4 call *-0x1c(%ebp) 10d95c: 31 c0 xor %eax,%eax 10d95e: 83 c4 10 add $0x10,%esp block = next_block; } return true; } 10d961: 8d 65 f4 lea -0xc(%ebp),%esp 10d964: 5b pop %ebx 10d965: 5e pop %esi 10d966: 5f pop %edi 10d967: c9 leave 10d968: c3 ret 10d969: 8d 76 00 lea 0x0(%esi),%esi return false; } if ( first_block->prev_size != page_size ) { (*printer)( 10d96c: 83 ec 0c sub $0xc,%esp 10d96f: ff 75 e0 pushl -0x20(%ebp) 10d972: 50 push %eax 10d973: 68 cc 29 12 00 push $0x1229cc return false; } if ( free_block->prev != prev_block ) { (*printer)( 10d978: 6a 01 push $0x1 10d97a: ff 75 0c pushl 0xc(%ebp) 10d97d: ff 55 e4 call *-0x1c(%ebp) 10d980: 31 c0 xor %eax,%eax 10d982: 83 c4 20 add $0x20,%esp block = next_block; } return true; } 10d985: 8d 65 f4 lea -0xc(%ebp),%esp 10d988: 5b pop %ebx 10d989: 5e pop %esi 10d98a: 5f pop %edi 10d98b: c9 leave 10d98c: c3 ret 10d98d: 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" ); 10d990: 57 push %edi 10d991: 68 27 2c 12 00 push $0x122c27 10d996: eb bc jmp 10d954 <_Heap_Walk+0xfc> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 10d998: ff 75 e0 pushl -0x20(%ebp) 10d99b: 68 3a 2c 12 00 push $0x122c3a 10d9a0: eb b2 jmp 10d954 <_Heap_Walk+0xfc> 10d9a2: 66 90 xchg %ax,%ax return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 10d9a4: ff 75 dc pushl -0x24(%ebp) 10d9a7: 68 44 29 12 00 push $0x122944 10d9ac: eb a6 jmp 10d954 <_Heap_Walk+0xfc> 10d9ae: 66 90 xchg %ax,%ax } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10d9b0: 56 push %esi 10d9b1: 68 68 29 12 00 push $0x122968 10d9b6: eb 9c jmp 10d954 <_Heap_Walk+0xfc> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 10d9b8: 56 push %esi 10d9b9: 68 9c 29 12 00 push $0x12299c 10d9be: eb 94 jmp 10d954 <_Heap_Walk+0xfc> && (uintptr_t) block <= (uintptr_t) heap->last_block; 10d9c0: 8b 53 24 mov 0x24(%ebx),%edx 10d9c3: 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 10d9c6: 39 d1 cmp %edx,%ecx 10d9c8: 77 82 ja 10d94c <_Heap_Walk+0xf4> <== NEVER TAKEN ); return false; } if ( 10d9ca: 8d 41 08 lea 0x8(%ecx),%eax 10d9cd: 31 d2 xor %edx,%edx 10d9cf: f7 75 d4 divl -0x2c(%ebp) 10d9d2: 85 d2 test %edx,%edx 10d9d4: 0f 85 20 02 00 00 jne 10dbfa <_Heap_Walk+0x3a2> <== NEVER TAKEN ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d9da: 8b 41 04 mov 0x4(%ecx),%eax 10d9dd: 83 e0 fe and $0xfffffffe,%eax 10d9e0: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d9e5: 0f 85 29 02 00 00 jne 10dc14 <_Heap_Walk+0x3bc> <== NEVER TAKEN ); return false; } if ( free_block->prev != prev_block ) { 10d9eb: 8b 41 0c mov 0xc(%ecx),%eax 10d9ee: 39 d8 cmp %ebx,%eax 10d9f0: 0f 85 0f 02 00 00 jne 10dc05 <_Heap_Walk+0x3ad> <== NEVER TAKEN 10d9f6: 89 75 c8 mov %esi,-0x38(%ebp) 10d9f9: 89 c6 mov %eax,%esi 10d9fb: 89 5d c4 mov %ebx,-0x3c(%ebp) 10d9fe: eb 3d jmp 10da3d <_Heap_Walk+0x1e5> 10da00: 39 cf cmp %ecx,%edi 10da02: 0f 87 44 ff ff ff ja 10d94c <_Heap_Walk+0xf4> 10da08: 3b 4d d0 cmp -0x30(%ebp),%ecx 10da0b: 0f 87 3b ff ff ff ja 10d94c <_Heap_Walk+0xf4> <== NEVER TAKEN ); return false; } if ( 10da11: 8d 41 08 lea 0x8(%ecx),%eax 10da14: 31 d2 xor %edx,%edx 10da16: f7 75 d4 divl -0x2c(%ebp) 10da19: 85 d2 test %edx,%edx 10da1b: 0f 85 d9 01 00 00 jne 10dbfa <_Heap_Walk+0x3a2> ); return false; } if ( _Heap_Is_used( free_block ) ) { 10da21: 8b 41 04 mov 0x4(%ecx),%eax 10da24: 83 e0 fe and $0xfffffffe,%eax 10da27: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10da2c: 0f 85 e2 01 00 00 jne 10dc14 <_Heap_Walk+0x3bc> ); return false; } if ( free_block->prev != prev_block ) { 10da32: 8b 41 0c mov 0xc(%ecx),%eax 10da35: 39 d8 cmp %ebx,%eax 10da37: 0f 85 c8 01 00 00 jne 10dc05 <_Heap_Walk+0x3ad> (*printer)( 10da3d: 89 cb mov %ecx,%ebx return false; } prev_block = free_block; free_block = free_block->next; 10da3f: 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 ) { 10da42: 39 ce cmp %ecx,%esi 10da44: 75 ba jne 10da00 <_Heap_Walk+0x1a8> 10da46: 8b 75 c8 mov -0x38(%ebp),%esi 10da49: 8b 5d c4 mov -0x3c(%ebp),%ebx if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10da4c: 39 75 d8 cmp %esi,-0x28(%ebp) 10da4f: 0f 84 3a fe ff ff je 10d88f <_Heap_Walk+0x37> <== NEVER TAKEN 10da55: 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; 10da58: 89 c1 mov %eax,%ecx 10da5a: 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); 10da5d: 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 ) { 10da60: a8 01 test $0x1,%al 10da62: 74 30 je 10da94 <_Heap_Walk+0x23c> (*printer)( 10da64: 83 ec 0c sub $0xc,%esp 10da67: 51 push %ecx 10da68: 56 push %esi 10da69: 68 89 2c 12 00 push $0x122c89 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10da6e: 6a 00 push $0x0 10da70: ff 75 0c pushl 0xc(%ebp) 10da73: 89 4d c0 mov %ecx,-0x40(%ebp) 10da76: ff 55 e4 call *-0x1c(%ebp) 10da79: 83 c4 20 add $0x20,%esp 10da7c: 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 10da7f: 39 7b 20 cmp %edi,0x20(%ebx) 10da82: 76 20 jbe 10daa4 <_Heap_Walk+0x24c> <== ALWAYS TAKEN block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 10da84: 83 ec 0c sub $0xc,%esp 10da87: 57 push %edi 10da88: 56 push %esi 10da89: 68 a4 2a 12 00 push $0x122aa4 10da8e: e9 e5 fe ff ff jmp 10d978 <_Heap_Walk+0x120> 10da93: 90 nop "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10da94: 83 ec 08 sub $0x8,%esp 10da97: ff 36 pushl (%esi) 10da99: 51 push %ecx 10da9a: 56 push %esi 10da9b: 68 7c 2a 12 00 push $0x122a7c 10daa0: eb cc jmp 10da6e <_Heap_Walk+0x216> 10daa2: 66 90 xchg %ax,%ax 10daa4: 39 7b 24 cmp %edi,0x24(%ebx) 10daa7: 72 db jb 10da84 <_Heap_Walk+0x22c> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 10daa9: 89 c8 mov %ecx,%eax 10daab: 31 d2 xor %edx,%edx 10daad: f7 75 e0 divl -0x20(%ebp) 10dab0: 85 d2 test %edx,%edx 10dab2: 0f 85 02 01 00 00 jne 10dbba <_Heap_Walk+0x362> ); return false; } if ( block_size < min_block_size ) { 10dab8: 39 4d dc cmp %ecx,-0x24(%ebp) 10dabb: 0f 87 0b 01 00 00 ja 10dbcc <_Heap_Walk+0x374> ); return false; } if ( next_block_begin <= block_begin ) { 10dac1: 39 fe cmp %edi,%esi 10dac3: 0f 83 17 01 00 00 jae 10dbe0 <_Heap_Walk+0x388> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10dac9: f6 47 04 01 testb $0x1,0x4(%edi) 10dacd: 0f 85 91 00 00 00 jne 10db64 <_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; 10dad3: 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; 10dad6: 8b 46 04 mov 0x4(%esi),%eax 10dad9: 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; 10dadc: 83 e0 fe and $0xfffffffe,%eax 10dadf: 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); 10dae2: 01 f0 add %esi,%eax 10dae4: 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)( 10dae7: 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; 10daea: 39 53 0c cmp %edx,0xc(%ebx) 10daed: 0f 84 99 00 00 00 je 10db8c <_Heap_Walk+0x334> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10daf3: 39 da cmp %ebx,%edx 10daf5: 0f 84 a9 00 00 00 je 10dba4 <_Heap_Walk+0x34c> 10dafb: c7 45 c8 f5 27 12 00 movl $0x1227f5,-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)( 10db02: 8b 46 0c mov 0xc(%esi),%eax 10db05: 39 c1 cmp %eax,%ecx 10db07: 74 7b je 10db84 <_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)" : ""), 10db09: 39 d8 cmp %ebx,%eax 10db0b: 0f 84 9f 00 00 00 je 10dbb0 <_Heap_Walk+0x358> 10db11: b9 f5 27 12 00 mov $0x1227f5,%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)( 10db16: ff 75 c8 pushl -0x38(%ebp) 10db19: 52 push %edx 10db1a: 51 push %ecx 10db1b: 50 push %eax 10db1c: 56 push %esi 10db1d: 68 64 2b 12 00 push $0x122b64 10db22: 6a 00 push $0x0 10db24: ff 75 0c pushl 0xc(%ebp) 10db27: 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 ) { 10db2a: 8b 55 d0 mov -0x30(%ebp),%edx 10db2d: 8b 02 mov (%edx),%eax 10db2f: 83 c4 20 add $0x20,%esp 10db32: 39 45 d4 cmp %eax,-0x2c(%ebp) 10db35: 74 11 je 10db48 <_Heap_Walk+0x2f0> (*printer)( 10db37: 51 push %ecx 10db38: 52 push %edx 10db39: 50 push %eax 10db3a: ff 75 d4 pushl -0x2c(%ebp) 10db3d: 56 push %esi 10db3e: 68 90 2b 12 00 push $0x122b90 10db43: e9 30 fe ff ff jmp 10d978 <_Heap_Walk+0x120> ); return false; } if ( !prev_used ) { 10db48: f6 45 cc 01 testb $0x1,-0x34(%ebp) 10db4c: 74 4a je 10db98 <_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; 10db4e: 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 ) { 10db51: 39 d8 cmp %ebx,%eax 10db53: 75 0a jne 10db5f <_Heap_Walk+0x307> <== ALWAYS TAKEN 10db55: eb 21 jmp 10db78 <_Heap_Walk+0x320> <== NOT EXECUTED 10db57: 90 nop <== NOT EXECUTED if ( free_block == block ) { return true; } free_block = free_block->next; 10db58: 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 ) { 10db5b: 39 d8 cmp %ebx,%eax 10db5d: 74 19 je 10db78 <_Heap_Walk+0x320> if ( free_block == block ) { 10db5f: 39 f0 cmp %esi,%eax 10db61: 75 f5 jne 10db58 <_Heap_Walk+0x300> 10db63: 90 nop if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10db64: 39 7d d8 cmp %edi,-0x28(%ebp) 10db67: 0f 84 22 fd ff ff je 10d88f <_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 ) { 10db6d: 8b 47 04 mov 0x4(%edi),%eax 10db70: 89 fe mov %edi,%esi 10db72: e9 e1 fe ff ff jmp 10da58 <_Heap_Walk+0x200> 10db77: 90 nop return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10db78: 56 push %esi 10db79: 68 fc 2b 12 00 push $0x122bfc 10db7e: e9 d1 fd ff ff jmp 10d954 <_Heap_Walk+0xfc> 10db83: 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)( 10db84: b9 b4 2c 12 00 mov $0x122cb4,%ecx 10db89: eb 8b jmp 10db16 <_Heap_Walk+0x2be> 10db8b: 90 nop } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 10db8c: c7 45 c8 a0 2c 12 00 movl $0x122ca0,-0x38(%ebp) 10db93: e9 6a ff ff ff jmp 10db02 <_Heap_Walk+0x2aa> return false; } if ( !prev_used ) { (*printer)( 10db98: 56 push %esi 10db99: 68 cc 2b 12 00 push $0x122bcc 10db9e: e9 b1 fd ff ff jmp 10d954 <_Heap_Walk+0xfc> 10dba3: 90 nop " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10dba4: c7 45 c8 aa 2c 12 00 movl $0x122caa,-0x38(%ebp) 10dbab: e9 52 ff ff ff jmp 10db02 <_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)" : ""), 10dbb0: b9 bf 2c 12 00 mov $0x122cbf,%ecx 10dbb5: e9 5c ff ff ff jmp 10db16 <_Heap_Walk+0x2be> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 10dbba: 83 ec 0c sub $0xc,%esp 10dbbd: 51 push %ecx 10dbbe: 56 push %esi 10dbbf: 68 d4 2a 12 00 push $0x122ad4 10dbc4: e9 af fd ff ff jmp 10d978 <_Heap_Walk+0x120> 10dbc9: 8d 76 00 lea 0x0(%esi),%esi return false; } if ( block_size < min_block_size ) { (*printer)( 10dbcc: 83 ec 08 sub $0x8,%esp 10dbcf: ff 75 dc pushl -0x24(%ebp) 10dbd2: 51 push %ecx 10dbd3: 56 push %esi 10dbd4: 68 04 2b 12 00 push $0x122b04 10dbd9: e9 9a fd ff ff jmp 10d978 <_Heap_Walk+0x120> 10dbde: 66 90 xchg %ax,%ax return false; } if ( next_block_begin <= block_begin ) { (*printer)( 10dbe0: 83 ec 0c sub $0xc,%esp 10dbe3: 57 push %edi 10dbe4: 56 push %esi 10dbe5: 68 30 2b 12 00 push $0x122b30 10dbea: e9 89 fd ff ff jmp 10d978 <_Heap_Walk+0x120> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 10dbef: 53 push %ebx 10dbf0: 68 58 2c 12 00 push $0x122c58 10dbf5: e9 5a fd ff ff jmp 10d954 <_Heap_Walk+0xfc> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10dbfa: 51 push %ecx 10dbfb: 68 18 2a 12 00 push $0x122a18 10dc00: e9 4f fd ff ff jmp 10d954 <_Heap_Walk+0xfc> return false; } if ( free_block->prev != prev_block ) { (*printer)( 10dc05: 83 ec 0c sub $0xc,%esp 10dc08: 50 push %eax 10dc09: 51 push %ecx 10dc0a: 68 48 2a 12 00 push $0x122a48 10dc0f: e9 64 fd ff ff jmp 10d978 <_Heap_Walk+0x120> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 10dc14: 51 push %ecx 10dc15: 68 6d 2c 12 00 push $0x122c6d 10dc1a: e9 35 fd ff ff jmp 10d954 <_Heap_Walk+0xfc> =============================================================================== 0010c2f4 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 10c2f4: 55 push %ebp 10c2f5: 89 e5 mov %esp,%ebp 10c2f7: 53 push %ebx 10c2f8: 83 ec 04 sub $0x4,%esp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10c2fb: 8b 15 00 77 12 00 mov 0x127700,%edx 10c301: 85 d2 test %edx,%edx 10c303: 74 1a je 10c31f <_IO_Initialize_all_drivers+0x2b><== NEVER TAKEN 10c305: 31 db xor %ebx,%ebx 10c307: 90 nop (void) rtems_io_initialize( major, 0, NULL ); 10c308: 50 push %eax 10c309: 6a 00 push $0x0 10c30b: 6a 00 push $0x0 10c30d: 53 push %ebx 10c30e: e8 c9 52 00 00 call 1115dc void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10c313: 43 inc %ebx 10c314: 83 c4 10 add $0x10,%esp 10c317: 39 1d 00 77 12 00 cmp %ebx,0x127700 10c31d: 77 e9 ja 10c308 <_IO_Initialize_all_drivers+0x14> (void) rtems_io_initialize( major, 0, NULL ); } 10c31f: 8b 5d fc mov -0x4(%ebp),%ebx 10c322: c9 leave 10c323: c3 ret =============================================================================== 0010c324 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 10c324: 55 push %ebp 10c325: 89 e5 mov %esp,%ebp 10c327: 57 push %edi 10c328: 56 push %esi 10c329: 53 push %ebx 10c32a: 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; 10c32d: 8b 1d 54 32 12 00 mov 0x123254,%ebx drivers_in_table = Configuration.number_of_device_drivers; 10c333: a1 50 32 12 00 mov 0x123250,%eax 10c338: 89 45 e4 mov %eax,-0x1c(%ebp) number_of_drivers = Configuration.maximum_drivers; 10c33b: 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 ) 10c341: 39 f0 cmp %esi,%eax 10c343: 72 17 jb 10c35c <_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; 10c345: 89 1d 04 77 12 00 mov %ebx,0x127704 _IO_Number_of_drivers = number_of_drivers; 10c34b: 8b 45 e4 mov -0x1c(%ebp),%eax 10c34e: a3 00 77 12 00 mov %eax,0x127700 ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10c353: 8d 65 f4 lea -0xc(%ebp),%esp 10c356: 5b pop %ebx 10c357: 5e pop %esi 10c358: 5f pop %edi 10c359: c9 leave 10c35a: c3 ret 10c35b: 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 *) 10c35c: 8d 0c 76 lea (%esi,%esi,2),%ecx 10c35f: c1 e1 03 shl $0x3,%ecx 10c362: 83 ec 0c sub $0xc,%esp 10c365: 51 push %ecx 10c366: 89 4d dc mov %ecx,-0x24(%ebp) 10c369: e8 12 29 00 00 call 10ec80 <_Workspace_Allocate_or_fatal_error> 10c36e: 89 c2 mov %eax,%edx 10c370: a3 04 77 12 00 mov %eax,0x127704 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 10c375: 89 35 00 77 12 00 mov %esi,0x127700 memset( 10c37b: 31 c0 xor %eax,%eax 10c37d: 8b 4d dc mov -0x24(%ebp),%ecx 10c380: 89 d7 mov %edx,%edi 10c382: 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++ ) 10c384: 83 c4 10 add $0x10,%esp 10c387: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c38a: 85 c9 test %ecx,%ecx 10c38c: 74 c5 je 10c353 <_IO_Manager_initialization+0x2f><== NEVER TAKEN 10c38e: a1 04 77 12 00 mov 0x127704,%eax 10c393: 89 45 e0 mov %eax,-0x20(%ebp) 10c396: 31 c0 xor %eax,%eax 10c398: 31 d2 xor %edx,%edx 10c39a: 66 90 xchg %ax,%ax _IO_Driver_address_table[index] = driver_table[index]; 10c39c: 8b 7d e0 mov -0x20(%ebp),%edi 10c39f: 01 c7 add %eax,%edi 10c3a1: 8d 34 03 lea (%ebx,%eax,1),%esi 10c3a4: b9 06 00 00 00 mov $0x6,%ecx 10c3a9: 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++ ) 10c3ab: 42 inc %edx 10c3ac: 83 c0 18 add $0x18,%eax 10c3af: 39 55 e4 cmp %edx,-0x1c(%ebp) 10c3b2: 77 e8 ja 10c39c <_IO_Manager_initialization+0x78> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10c3b4: 8d 65 f4 lea -0xc(%ebp),%esp 10c3b7: 5b pop %ebx 10c3b8: 5e pop %esi 10c3b9: 5f pop %edi 10c3ba: c9 leave 10c3bb: c3 ret =============================================================================== 0010cde0 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10cde0: 55 push %ebp 10cde1: 89 e5 mov %esp,%ebp 10cde3: 53 push %ebx 10cde4: 83 ec 08 sub $0x8,%esp 10cde7: 8b 45 08 mov 0x8(%ebp),%eax 10cdea: 8b 55 0c mov 0xc(%ebp),%edx 10cded: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10cdf0: a3 00 74 12 00 mov %eax,0x127400 _Internal_errors_What_happened.is_internal = is_internal; 10cdf5: 88 15 04 74 12 00 mov %dl,0x127404 _Internal_errors_What_happened.the_error = the_error; 10cdfb: 89 1d 08 74 12 00 mov %ebx,0x127408 _User_extensions_Fatal( the_source, is_internal, the_error ); 10ce01: 53 push %ebx 10ce02: 0f b6 d2 movzbl %dl,%edx 10ce05: 52 push %edx 10ce06: 50 push %eax 10ce07: e8 0c 1b 00 00 call 10e918 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10ce0c: c7 05 20 75 12 00 05 movl $0x5,0x127520 <== NOT EXECUTED 10ce13: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10ce16: fa cli <== NOT EXECUTED 10ce17: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10ce19: f4 hlt <== NOT EXECUTED 10ce1a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ce1d: eb fe jmp 10ce1d <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 00111c14 <_Objects_API_maximum_class>: #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 111c14: 55 push %ebp 111c15: 89 e5 mov %esp,%ebp case OBJECTS_NO_API: default: break; } return 0; } 111c17: 8b 45 08 mov 0x8(%ebp),%eax 111c1a: 48 dec %eax 111c1b: 83 f8 03 cmp $0x3,%eax 111c1e: 77 0c ja 111c2c <_Objects_API_maximum_class+0x18> 111c20: 8b 04 85 50 1e 12 00 mov 0x121e50(,%eax,4),%eax 111c27: c9 leave 111c28: c3 ret 111c29: 8d 76 00 lea 0x0(%esi),%esi 111c2c: 31 c0 xor %eax,%eax 111c2e: c9 leave 111c2f: c3 ret =============================================================================== 0010ce78 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10ce78: 55 push %ebp 10ce79: 89 e5 mov %esp,%ebp 10ce7b: 56 push %esi 10ce7c: 53 push %ebx 10ce7d: 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 ) 10ce80: 8b 43 18 mov 0x18(%ebx),%eax 10ce83: 85 c0 test %eax,%eax 10ce85: 75 0d jne 10ce94 <_Objects_Allocate+0x1c><== ALWAYS TAKEN 10ce87: 31 c9 xor %ecx,%ecx <== NOT EXECUTED information->inactive--; } } return the_object; } 10ce89: 89 c8 mov %ecx,%eax 10ce8b: 8d 65 f8 lea -0x8(%ebp),%esp 10ce8e: 5b pop %ebx 10ce8f: 5e pop %esi 10ce90: c9 leave 10ce91: c3 ret 10ce92: 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 ); 10ce94: 8d 73 20 lea 0x20(%ebx),%esi 10ce97: 83 ec 0c sub $0xc,%esp 10ce9a: 56 push %esi 10ce9b: e8 10 f7 ff ff call 10c5b0 <_Chain_Get> 10cea0: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10cea2: 83 c4 10 add $0x10,%esp 10cea5: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10cea9: 74 de je 10ce89 <_Objects_Allocate+0x11> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10ceab: 85 c0 test %eax,%eax 10cead: 74 29 je 10ced8 <_Objects_Allocate+0x60> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10ceaf: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10ceb3: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10ceb7: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 10ceb9: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10cebd: 31 d2 xor %edx,%edx 10cebf: f7 f6 div %esi 10cec1: c1 e0 02 shl $0x2,%eax 10cec4: 03 43 30 add 0x30(%ebx),%eax 10cec7: ff 08 decl (%eax) information->inactive--; 10cec9: 66 ff 4b 2c decw 0x2c(%ebx) } } return the_object; } 10cecd: 89 c8 mov %ecx,%eax 10cecf: 8d 65 f8 lea -0x8(%ebp),%esp 10ced2: 5b pop %ebx 10ced3: 5e pop %esi 10ced4: c9 leave 10ced5: c3 ret 10ced6: 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 ); 10ced8: 83 ec 0c sub $0xc,%esp 10cedb: 53 push %ebx 10cedc: e8 3b 00 00 00 call 10cf1c <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10cee1: 89 34 24 mov %esi,(%esp) 10cee4: e8 c7 f6 ff ff call 10c5b0 <_Chain_Get> 10cee9: 89 c1 mov %eax,%ecx } if ( the_object ) { 10ceeb: 83 c4 10 add $0x10,%esp 10ceee: 85 c0 test %eax,%eax 10cef0: 74 97 je 10ce89 <_Objects_Allocate+0x11> 10cef2: eb bb jmp 10ceaf <_Objects_Allocate+0x37> =============================================================================== 0010cf1c <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10cf1c: 55 push %ebp 10cf1d: 89 e5 mov %esp,%ebp 10cf1f: 57 push %edi 10cf20: 56 push %esi 10cf21: 53 push %ebx 10cf22: 83 ec 4c sub $0x4c,%esp 10cf25: 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 ); 10cf28: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10cf2c: 89 45 d0 mov %eax,-0x30(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10cf2f: 8b 4b 34 mov 0x34(%ebx),%ecx 10cf32: 85 c9 test %ecx,%ecx 10cf34: 0f 84 72 02 00 00 je 10d1ac <_Objects_Extend_information+0x290> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10cf3a: 8b 7b 10 mov 0x10(%ebx),%edi 10cf3d: 66 89 7d d4 mov %di,-0x2c(%ebp) 10cf41: 8b 7b 14 mov 0x14(%ebx),%edi 10cf44: 31 d2 xor %edx,%edx 10cf46: 8b 45 d4 mov -0x2c(%ebp),%eax 10cf49: 66 f7 f7 div %di 10cf4c: 0f b7 f0 movzwl %ax,%esi for ( ; block < block_count; block++ ) { 10cf4f: 85 f6 test %esi,%esi 10cf51: 0f 84 6c 02 00 00 je 10d1c3 <_Objects_Extend_information+0x2a7><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) 10cf57: 8b 01 mov (%ecx),%eax 10cf59: 85 c0 test %eax,%eax 10cf5b: 0f 84 72 02 00 00 je 10d1d3 <_Objects_Extend_information+0x2b7><== NEVER TAKEN 10cf61: 0f b7 ff movzwl %di,%edi 10cf64: 8b 55 d0 mov -0x30(%ebp),%edx 10cf67: 89 55 cc mov %edx,-0x34(%ebp) 10cf6a: 31 d2 xor %edx,%edx 10cf6c: 8b 45 cc mov -0x34(%ebp),%eax 10cf6f: eb 09 jmp 10cf7a <_Objects_Extend_information+0x5e> 10cf71: 8d 76 00 lea 0x0(%esi),%esi 10cf74: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4) 10cf78: 74 07 je 10cf81 <_Objects_Extend_information+0x65> break; else index_base += information->allocation_size; 10cf7a: 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++ ) { 10cf7c: 42 inc %edx 10cf7d: 39 d6 cmp %edx,%esi 10cf7f: 77 f3 ja 10cf74 <_Objects_Extend_information+0x58> 10cf81: 89 45 cc mov %eax,-0x34(%ebp) else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10cf84: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax 10cf88: 01 f8 add %edi,%eax 10cf8a: 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 ) { 10cf8d: 3d ff ff 00 00 cmp $0xffff,%eax 10cf92: 0f 87 b1 01 00 00 ja 10d149 <_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; 10cf98: 0f af 7b 18 imul 0x18(%ebx),%edi if ( information->auto_extend ) { 10cf9c: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10cfa0: 0f 85 ae 01 00 00 jne 10d154 <_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 ); 10cfa6: 83 ec 0c sub $0xc,%esp 10cfa9: 57 push %edi 10cfaa: 89 55 b4 mov %edx,-0x4c(%ebp) 10cfad: e8 ce 1c 00 00 call 10ec80 <_Workspace_Allocate_or_fatal_error> 10cfb2: 89 45 c4 mov %eax,-0x3c(%ebp) 10cfb5: 83 c4 10 add $0x10,%esp 10cfb8: 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 ) { 10cfbb: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10cfbf: 39 45 cc cmp %eax,-0x34(%ebp) 10cfc2: 0f 82 fe 00 00 00 jb 10d0c6 <_Objects_Extend_information+0x1aa> */ /* * Up the block count and maximum */ block_count++; 10cfc8: 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 ); 10cfcb: 83 ec 0c sub $0xc,%esp 10cfce: 8d 04 7f lea (%edi,%edi,2),%eax 10cfd1: 03 45 d4 add -0x2c(%ebp),%eax 10cfd4: 03 45 d0 add -0x30(%ebp),%eax 10cfd7: c1 e0 02 shl $0x2,%eax 10cfda: 50 push %eax 10cfdb: 89 55 b4 mov %edx,-0x4c(%ebp) 10cfde: e8 c9 1c 00 00 call 10ecac <_Workspace_Allocate> 10cfe3: 89 45 c8 mov %eax,-0x38(%ebp) if ( !object_blocks ) { 10cfe6: 83 c4 10 add $0x10,%esp 10cfe9: 85 c0 test %eax,%eax 10cfeb: 8b 55 b4 mov -0x4c(%ebp),%edx 10cfee: 0f 84 ef 01 00 00 je 10d1e3 <_Objects_Extend_information+0x2c7> RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 10cff4: 8b 45 c8 mov -0x38(%ebp),%eax 10cff7: 8d 04 b8 lea (%eax,%edi,4),%eax 10cffa: 89 45 b8 mov %eax,-0x48(%ebp) 10cffd: 8b 4d c8 mov -0x38(%ebp),%ecx 10d000: 8d 3c f9 lea (%ecx,%edi,8),%edi 10d003: 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 ) { 10d006: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10d00a: 39 45 d0 cmp %eax,-0x30(%ebp) 10d00d: 0f 82 60 01 00 00 jb 10d173 <_Objects_Extend_information+0x257> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10d013: 8b 45 d0 mov -0x30(%ebp),%eax 10d016: 85 c0 test %eax,%eax 10d018: 74 16 je 10d030 <_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, 10d01a: 31 c0 xor %eax,%eax 10d01c: 8b 4d bc mov -0x44(%ebp),%ecx 10d01f: 8b 7d d0 mov -0x30(%ebp),%edi 10d022: 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; 10d024: 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++ ) { 10d02b: 40 inc %eax 10d02c: 39 c7 cmp %eax,%edi 10d02e: 77 f4 ja 10d024 <_Objects_Extend_information+0x108><== NEVER TAKEN 10d030: c1 e6 02 shl $0x2,%esi 10d033: 89 75 c0 mov %esi,-0x40(%ebp) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10d036: 8b 45 c8 mov -0x38(%ebp),%eax 10d039: 8b 7d c0 mov -0x40(%ebp),%edi 10d03c: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) inactive_per_block[block_count] = 0; 10d043: 8b 4d b8 mov -0x48(%ebp),%ecx 10d046: c7 04 39 00 00 00 00 movl $0x0,(%ecx,%edi,1) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10d04d: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10d051: 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 ; 10d054: 39 75 cc cmp %esi,-0x34(%ebp) 10d057: 73 19 jae 10d072 <_Objects_Extend_information+0x156><== NEVER TAKEN 10d059: 8b 7d cc mov -0x34(%ebp),%edi 10d05c: 8b 45 bc mov -0x44(%ebp),%eax 10d05f: 8d 0c b8 lea (%eax,%edi,4),%ecx 10d062: 89 f8 mov %edi,%eax index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10d064: 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++ ) { 10d06a: 40 inc %eax 10d06b: 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 ; 10d06e: 39 c6 cmp %eax,%esi 10d070: 77 f2 ja 10d064 <_Objects_Extend_information+0x148> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10d072: 9c pushf 10d073: fa cli 10d074: 5f pop %edi old_tables = information->object_blocks; 10d075: 8b 4b 34 mov 0x34(%ebx),%ecx information->object_blocks = object_blocks; 10d078: 8b 45 c8 mov -0x38(%ebp),%eax 10d07b: 89 43 34 mov %eax,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10d07e: 8b 45 b8 mov -0x48(%ebp),%eax 10d081: 89 43 30 mov %eax,0x30(%ebx) information->local_table = local_table; 10d084: 8b 45 bc mov -0x44(%ebp),%eax 10d087: 89 43 1c mov %eax,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10d08a: 8b 45 d4 mov -0x2c(%ebp),%eax 10d08d: 66 89 43 10 mov %ax,0x10(%ebx) information->maximum_id = _Objects_Build_id( 10d091: 8b 33 mov (%ebx),%esi 10d093: c1 e6 18 shl $0x18,%esi 10d096: 81 ce 00 00 01 00 or $0x10000,%esi 10d09c: 0f b7 43 04 movzwl 0x4(%ebx),%eax 10d0a0: c1 e0 1b shl $0x1b,%eax 10d0a3: 09 c6 or %eax,%esi 10d0a5: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax 10d0a9: 09 c6 or %eax,%esi 10d0ab: 89 73 0c mov %esi,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10d0ae: 57 push %edi 10d0af: 9d popf if ( old_tables ) 10d0b0: 85 c9 test %ecx,%ecx 10d0b2: 74 12 je 10d0c6 <_Objects_Extend_information+0x1aa> _Workspace_Free( old_tables ); 10d0b4: 83 ec 0c sub $0xc,%esp 10d0b7: 51 push %ecx 10d0b8: 89 55 b4 mov %edx,-0x4c(%ebp) 10d0bb: e8 08 1c 00 00 call 10ecc8 <_Workspace_Free> 10d0c0: 83 c4 10 add $0x10,%esp 10d0c3: 8b 55 b4 mov -0x4c(%ebp),%edx } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10d0c6: c1 e2 02 shl $0x2,%edx 10d0c9: 89 55 d0 mov %edx,-0x30(%ebp) 10d0cc: 8b 43 34 mov 0x34(%ebx),%eax 10d0cf: 8b 4d c4 mov -0x3c(%ebp),%ecx 10d0d2: 89 0c 10 mov %ecx,(%eax,%edx,1) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10d0d5: ff 73 18 pushl 0x18(%ebx) 10d0d8: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10d0dc: 52 push %edx 10d0dd: 8b 7d d0 mov -0x30(%ebp),%edi 10d0e0: ff 34 38 pushl (%eax,%edi,1) 10d0e3: 8d 7d dc lea -0x24(%ebp),%edi 10d0e6: 57 push %edi 10d0e7: e8 38 45 00 00 call 111624 <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10d0ec: 8d 43 20 lea 0x20(%ebx),%eax 10d0ef: 89 45 d4 mov %eax,-0x2c(%ebp) 10d0f2: 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 ) { 10d0f5: 83 c4 10 add $0x10,%esp 10d0f8: eb 2b jmp 10d125 <_Objects_Extend_information+0x209> 10d0fa: 66 90 xchg %ax,%ax the_object->id = _Objects_Build_id( 10d0fc: 8b 13 mov (%ebx),%edx 10d0fe: c1 e2 18 shl $0x18,%edx 10d101: 81 ca 00 00 01 00 or $0x10000,%edx 10d107: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10d10b: c1 e1 1b shl $0x1b,%ecx 10d10e: 09 ca or %ecx,%edx 10d110: 09 f2 or %esi,%edx 10d112: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10d115: 83 ec 08 sub $0x8,%esp 10d118: 50 push %eax 10d119: ff 75 d4 pushl -0x2c(%ebp) 10d11c: e8 53 f4 ff ff call 10c574 <_Chain_Append> index++; 10d121: 46 inc %esi 10d122: 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 ) { 10d125: 83 ec 0c sub $0xc,%esp 10d128: 57 push %edi 10d129: e8 82 f4 ff ff call 10c5b0 <_Chain_Get> 10d12e: 83 c4 10 add $0x10,%esp 10d131: 85 c0 test %eax,%eax 10d133: 75 c7 jne 10d0fc <_Objects_Extend_information+0x1e0> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10d135: 8b 43 30 mov 0x30(%ebx),%eax 10d138: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10d13c: 8b 4d d0 mov -0x30(%ebp),%ecx 10d13f: 89 14 08 mov %edx,(%eax,%ecx,1) information->inactive = 10d142: 8b 43 14 mov 0x14(%ebx),%eax 10d145: 66 01 43 2c add %ax,0x2c(%ebx) (Objects_Maximum)(information->inactive + information->allocation_size); } 10d149: 8d 65 f4 lea -0xc(%ebp),%esp 10d14c: 5b pop %ebx 10d14d: 5e pop %esi 10d14e: 5f pop %edi 10d14f: c9 leave 10d150: c3 ret 10d151: 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 ); 10d154: 83 ec 0c sub $0xc,%esp 10d157: 57 push %edi 10d158: 89 55 b4 mov %edx,-0x4c(%ebp) 10d15b: e8 4c 1b 00 00 call 10ecac <_Workspace_Allocate> 10d160: 89 45 c4 mov %eax,-0x3c(%ebp) if ( !new_object_block ) 10d163: 83 c4 10 add $0x10,%esp 10d166: 85 c0 test %eax,%eax 10d168: 8b 55 b4 mov -0x4c(%ebp),%edx 10d16b: 0f 85 4a fe ff ff jne 10cfbb <_Objects_Extend_information+0x9f> 10d171: eb d6 jmp 10d149 <_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, 10d173: c1 e6 02 shl $0x2,%esi 10d176: 89 75 c0 mov %esi,-0x40(%ebp) 10d179: 8b 73 34 mov 0x34(%ebx),%esi 10d17c: 8b 7d c8 mov -0x38(%ebp),%edi 10d17f: 8b 4d c0 mov -0x40(%ebp),%ecx 10d182: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10d184: 8b 73 30 mov 0x30(%ebx),%esi 10d187: 8b 7d b8 mov -0x48(%ebp),%edi 10d18a: 8b 4d c0 mov -0x40(%ebp),%ecx 10d18d: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10d18f: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10d193: 03 45 d0 add -0x30(%ebp),%eax 10d196: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx 10d19d: 8b 73 1c mov 0x1c(%ebx),%esi 10d1a0: 8b 7d bc mov -0x44(%ebp),%edi 10d1a3: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10d1a5: e9 8c fe ff ff jmp 10d036 <_Objects_Extend_information+0x11a> 10d1aa: 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 ) 10d1ac: 8b 53 10 mov 0x10(%ebx),%edx 10d1af: 66 89 55 d4 mov %dx,-0x2c(%ebp) 10d1b3: 0f b7 7b 14 movzwl 0x14(%ebx),%edi 10d1b7: 89 45 cc mov %eax,-0x34(%ebp) 10d1ba: 31 d2 xor %edx,%edx 10d1bc: 31 f6 xor %esi,%esi 10d1be: e9 c1 fd ff ff jmp 10cf84 <_Objects_Extend_information+0x68> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10d1c3: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED 10d1c6: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 10d1c9: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED 10d1cc: 31 d2 xor %edx,%edx <== NOT EXECUTED 10d1ce: e9 b1 fd ff ff jmp 10cf84 <_Objects_Extend_information+0x68><== NOT EXECUTED if ( information->object_blocks[ block ] == NULL ) 10d1d3: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED 10d1d6: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10d1d9: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED 10d1dc: 31 d2 xor %edx,%edx <== NOT EXECUTED 10d1de: e9 a1 fd ff ff jmp 10cf84 <_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 ); 10d1e3: 83 ec 0c sub $0xc,%esp 10d1e6: ff 75 c4 pushl -0x3c(%ebp) 10d1e9: e8 da 1a 00 00 call 10ecc8 <_Workspace_Free> return; 10d1ee: 83 c4 10 add $0x10,%esp 10d1f1: e9 53 ff ff ff jmp 10d149 <_Objects_Extend_information+0x22d> =============================================================================== 0010d288 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10d288: 55 push %ebp 10d289: 89 e5 mov %esp,%ebp 10d28b: 56 push %esi 10d28c: 53 push %ebx 10d28d: 8b 75 08 mov 0x8(%ebp),%esi 10d290: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10d293: 85 db test %ebx,%ebx 10d295: 75 09 jne 10d2a0 <_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 ) 10d297: 31 c0 xor %eax,%eax return NULL; #endif return info; } 10d299: 8d 65 f8 lea -0x8(%ebp),%esp 10d29c: 5b pop %ebx 10d29d: 5e pop %esi 10d29e: c9 leave 10d29f: 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 ); 10d2a0: 83 ec 0c sub $0xc,%esp 10d2a3: 56 push %esi 10d2a4: e8 6b 49 00 00 call 111c14 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10d2a9: 83 c4 10 add $0x10,%esp 10d2ac: 85 c0 test %eax,%eax 10d2ae: 74 e7 je 10d297 <_Objects_Get_information+0xf> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10d2b0: 39 c3 cmp %eax,%ebx 10d2b2: 77 e3 ja 10d297 <_Objects_Get_information+0xf> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10d2b4: 8b 04 b5 2c 73 12 00 mov 0x12732c(,%esi,4),%eax 10d2bb: 85 c0 test %eax,%eax 10d2bd: 74 d8 je 10d297 <_Objects_Get_information+0xf><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10d2bf: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !info ) 10d2c2: 85 c0 test %eax,%eax 10d2c4: 74 d3 je 10d299 <_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 ) 10d2c6: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10d2cb: 75 cc jne 10d299 <_Objects_Get_information+0x11> 10d2cd: eb c8 jmp 10d297 <_Objects_Get_information+0xf> =============================================================================== 0010d2d0 <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10d2d0: 55 push %ebp 10d2d1: 89 e5 mov %esp,%ebp 10d2d3: 56 push %esi 10d2d4: 53 push %ebx 10d2d5: 8b 55 08 mov 0x8(%ebp),%edx 10d2d8: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 10d2db: b8 01 00 00 00 mov $0x1,%eax 10d2e0: 2b 42 08 sub 0x8(%edx),%eax 10d2e3: 03 45 0c add 0xc(%ebp),%eax _ISR_Disable( level ); 10d2e6: 9c pushf 10d2e7: fa cli 10d2e8: 5e pop %esi if ( information->maximum >= index ) { 10d2e9: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10d2ed: 39 c8 cmp %ecx,%eax 10d2ef: 77 1b ja 10d30c <_Objects_Get_isr_disable+0x3c> if ( (the_object = information->local_table[ index ]) != NULL ) { 10d2f1: 8b 52 1c mov 0x1c(%edx),%edx 10d2f4: 8b 04 82 mov (%edx,%eax,4),%eax 10d2f7: 85 c0 test %eax,%eax 10d2f9: 74 21 je 10d31c <_Objects_Get_isr_disable+0x4c> *location = OBJECTS_LOCAL; 10d2fb: c7 03 00 00 00 00 movl $0x0,(%ebx) *level_p = level; 10d301: 8b 55 14 mov 0x14(%ebp),%edx 10d304: 89 32 mov %esi,(%edx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10d306: 5b pop %ebx 10d307: 5e pop %esi 10d308: c9 leave 10d309: c3 ret 10d30a: 66 90 xchg %ax,%ax } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 10d30c: 56 push %esi 10d30d: 9d popf *location = OBJECTS_ERROR; 10d30e: c7 03 01 00 00 00 movl $0x1,(%ebx) 10d314: 31 c0 xor %eax,%eax _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10d316: 5b pop %ebx 10d317: 5e pop %esi 10d318: c9 leave 10d319: c3 ret 10d31a: 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 ); 10d31c: 56 push %esi 10d31d: 9d popf *location = OBJECTS_ERROR; 10d31e: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10d324: eb e0 jmp 10d306 <_Objects_Get_isr_disable+0x36> =============================================================================== 0010e978 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 10e978: 55 push %ebp 10e979: 89 e5 mov %esp,%ebp 10e97b: 57 push %edi 10e97c: 56 push %esi 10e97d: 53 push %ebx 10e97e: 83 ec 2c sub $0x2c,%esp 10e981: 8b 7d 08 mov 0x8(%ebp),%edi 10e984: 8b 75 0c mov 0xc(%ebp),%esi 10e987: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 10e98a: 85 f6 test %esi,%esi 10e98c: 75 0e jne 10e99c <_Objects_Get_name_as_string+0x24> } } *d = '\0'; _Thread_Enable_dispatch(); return name; 10e98e: 31 db xor %ebx,%ebx } return NULL; /* unreachable path */ } 10e990: 89 d8 mov %ebx,%eax 10e992: 8d 65 f4 lea -0xc(%ebp),%esp 10e995: 5b pop %ebx 10e996: 5e pop %esi 10e997: 5f pop %edi 10e998: c9 leave 10e999: c3 ret 10e99a: 66 90 xchg %ax,%ax Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 10e99c: 85 db test %ebx,%ebx 10e99e: 74 f0 je 10e990 <_Objects_Get_name_as_string+0x18><== NEVER TAKEN return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10e9a0: 85 ff test %edi,%edi 10e9a2: 75 08 jne 10e9ac <_Objects_Get_name_as_string+0x34> 10e9a4: a1 98 b8 12 00 mov 0x12b898,%eax 10e9a9: 8b 78 08 mov 0x8(%eax),%edi information = _Objects_Get_information_id( tmpId ); 10e9ac: 83 ec 0c sub $0xc,%esp 10e9af: 57 push %edi 10e9b0: e8 03 ff ff ff call 10e8b8 <_Objects_Get_information_id> if ( !information ) 10e9b5: 83 c4 10 add $0x10,%esp 10e9b8: 85 c0 test %eax,%eax 10e9ba: 74 d2 je 10e98e <_Objects_Get_name_as_string+0x16><== NEVER TAKEN return NULL; the_object = _Objects_Get( information, tmpId, &location ); 10e9bc: 51 push %ecx 10e9bd: 8d 55 e4 lea -0x1c(%ebp),%edx 10e9c0: 52 push %edx 10e9c1: 57 push %edi 10e9c2: 50 push %eax 10e9c3: e8 74 00 00 00 call 10ea3c <_Objects_Get> switch ( location ) { 10e9c8: 83 c4 10 add $0x10,%esp 10e9cb: 8b 55 e4 mov -0x1c(%ebp),%edx 10e9ce: 85 d2 test %edx,%edx 10e9d0: 75 bc jne 10e98e <_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; 10e9d2: 8b 50 0c mov 0xc(%eax),%edx lname[ 0 ] = (u32_name >> 24) & 0xff; 10e9d5: 89 d1 mov %edx,%ecx 10e9d7: c1 e9 18 shr $0x18,%ecx 10e9da: 88 c8 mov %cl,%al 10e9dc: 88 4d df mov %cl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 10e9df: 89 d1 mov %edx,%ecx 10e9e1: c1 e9 10 shr $0x10,%ecx 10e9e4: 88 4d e0 mov %cl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 10e9e7: 89 d1 mov %edx,%ecx 10e9e9: c1 e9 08 shr $0x8,%ecx 10e9ec: 88 4d e1 mov %cl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 10e9ef: 88 55 e2 mov %dl,-0x1e(%ebp) lname[ 4 ] = '\0'; 10e9f2: c6 45 e3 00 movb $0x0,-0x1d(%ebp) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e9f6: 4e dec %esi 10e9f7: 89 75 d4 mov %esi,-0x2c(%ebp) 10e9fa: 74 3c je 10ea38 <_Objects_Get_name_as_string+0xc0><== NEVER TAKEN 10e9fc: 84 c0 test %al,%al 10e9fe: 74 38 je 10ea38 <_Objects_Get_name_as_string+0xc0> 10ea00: 89 d9 mov %ebx,%ecx 10ea02: 31 d2 xor %edx,%edx 10ea04: eb 0a jmp 10ea10 <_Objects_Get_name_as_string+0x98> 10ea06: 66 90 xchg %ax,%ax 10ea08: 8a 44 15 df mov -0x21(%ebp,%edx,1),%al 10ea0c: 84 c0 test %al,%al 10ea0e: 74 1b je 10ea2b <_Objects_Get_name_as_string+0xb3> *d = (isprint((unsigned char)*s)) ? *s : '*'; 10ea10: 0f b6 f0 movzbl %al,%esi 10ea13: 8b 3d 58 91 12 00 mov 0x129158,%edi 10ea19: f6 44 37 01 97 testb $0x97,0x1(%edi,%esi,1) 10ea1e: 75 02 jne 10ea22 <_Objects_Get_name_as_string+0xaa> 10ea20: b0 2a mov $0x2a,%al 10ea22: 88 01 mov %al,(%ecx) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10ea24: 42 inc %edx 10ea25: 41 inc %ecx 10ea26: 3b 55 d4 cmp -0x2c(%ebp),%edx 10ea29: 72 dd jb 10ea08 <_Objects_Get_name_as_string+0x90> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 10ea2b: c6 01 00 movb $0x0,(%ecx) _Thread_Enable_dispatch(); 10ea2e: e8 51 08 00 00 call 10f284 <_Thread_Enable_dispatch> return name; 10ea33: e9 58 ff ff ff jmp 10e990 <_Objects_Get_name_as_string+0x18> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10ea38: 89 d9 mov %ebx,%ecx 10ea3a: eb ef jmp 10ea2b <_Objects_Get_name_as_string+0xb3> =============================================================================== 0010d474 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 10d474: 55 push %ebp 10d475: 89 e5 mov %esp,%ebp 10d477: 57 push %edi 10d478: 56 push %esi 10d479: 53 push %ebx 10d47a: 83 ec 0c sub $0xc,%esp 10d47d: 8b 5d 08 mov 0x8(%ebp),%ebx 10d480: 8b 75 0c mov 0xc(%ebp),%esi 10d483: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Control *object; Objects_Id next_id; if ( !information ) 10d486: 85 db test %ebx,%ebx 10d488: 75 0a jne 10d494 <_Objects_Get_next+0x20> *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; 10d48a: 31 c0 xor %eax,%eax } 10d48c: 8d 65 f4 lea -0xc(%ebp),%esp 10d48f: 5b pop %ebx 10d490: 5e pop %esi 10d491: 5f pop %edi 10d492: c9 leave 10d493: c3 ret Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 10d494: 85 ff test %edi,%edi 10d496: 74 f2 je 10d48a <_Objects_Get_next+0x16> return NULL; if ( !next_id_p ) 10d498: 8b 45 14 mov 0x14(%ebp),%eax 10d49b: 85 c0 test %eax,%eax 10d49d: 74 eb je 10d48a <_Objects_Get_next+0x16> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 10d49f: 66 85 f6 test %si,%si 10d4a2: 75 04 jne 10d4a8 <_Objects_Get_next+0x34> next_id = information->minimum_id; 10d4a4: 8b 73 08 mov 0x8(%ebx),%esi 10d4a7: 90 nop else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 10d4a8: 66 39 73 10 cmp %si,0x10(%ebx) 10d4ac: 72 22 jb 10d4d0 <_Objects_Get_next+0x5c> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 10d4ae: 51 push %ecx 10d4af: 57 push %edi 10d4b0: 56 push %esi 10d4b1: 53 push %ebx 10d4b2: e8 2d 00 00 00 call 10d4e4 <_Objects_Get> next_id++; 10d4b7: 46 inc %esi } while (*location_p != OBJECTS_LOCAL); 10d4b8: 83 c4 10 add $0x10,%esp 10d4bb: 8b 17 mov (%edi),%edx 10d4bd: 85 d2 test %edx,%edx 10d4bf: 75 e7 jne 10d4a8 <_Objects_Get_next+0x34> *next_id_p = next_id; 10d4c1: 8b 55 14 mov 0x14(%ebp),%edx 10d4c4: 89 32 mov %esi,(%edx) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 10d4c6: 8d 65 f4 lea -0xc(%ebp),%esp 10d4c9: 5b pop %ebx 10d4ca: 5e pop %esi 10d4cb: 5f pop %edi 10d4cc: c9 leave 10d4cd: c3 ret 10d4ce: 66 90 xchg %ax,%ax do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 10d4d0: c7 07 01 00 00 00 movl $0x1,(%edi) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 10d4d6: 8b 45 14 mov 0x14(%ebp),%eax 10d4d9: c7 00 ff ff ff ff movl $0xffffffff,(%eax) 10d4df: 31 c0 xor %eax,%eax return 0; 10d4e1: eb a9 jmp 10d48c <_Objects_Get_next+0x18> =============================================================================== 0011b868 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 11b868: 55 push %ebp 11b869: 89 e5 mov %esp,%ebp 11b86b: 53 push %ebx 11b86c: 8b 55 08 mov 0x8(%ebp),%edx 11b86f: 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; 11b872: b8 01 00 00 00 mov $0x1,%eax 11b877: 2b 42 08 sub 0x8(%edx),%eax 11b87a: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 11b87d: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 11b881: 39 c8 cmp %ecx,%eax 11b883: 77 13 ja 11b898 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 11b885: 8b 52 1c mov 0x1c(%edx),%edx 11b888: 8b 04 82 mov (%edx,%eax,4),%eax 11b88b: 85 c0 test %eax,%eax 11b88d: 74 09 je 11b898 <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 11b88f: 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; } 11b895: 5b pop %ebx 11b896: c9 leave 11b897: 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; 11b898: c7 03 01 00 00 00 movl $0x1,(%ebx) 11b89e: 31 c0 xor %eax,%eax return NULL; } 11b8a0: 5b pop %ebx 11b8a1: c9 leave 11b8a2: c3 ret =============================================================================== 0010e5bc <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10e5bc: 55 push %ebp 10e5bd: 89 e5 mov %esp,%ebp 10e5bf: 83 ec 18 sub $0x18,%esp 10e5c2: 8b 55 08 mov 0x8(%ebp),%edx /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10e5c5: 85 d2 test %edx,%edx 10e5c7: 75 08 jne 10e5d1 <_Objects_Id_to_name+0x15> 10e5c9: a1 f8 a7 12 00 mov 0x12a7f8,%eax 10e5ce: 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); 10e5d1: 89 d0 mov %edx,%eax 10e5d3: c1 e8 18 shr $0x18,%eax 10e5d6: 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 ) 10e5d9: 8d 48 ff lea -0x1(%eax),%ecx 10e5dc: 83 f9 03 cmp $0x3,%ecx 10e5df: 77 3b ja 10e61c <_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 ] ) 10e5e1: 8b 04 85 0c a7 12 00 mov 0x12a70c(,%eax,4),%eax 10e5e8: 85 c0 test %eax,%eax 10e5ea: 74 30 je 10e61c <_Objects_Id_to_name+0x60> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10e5ec: 89 d1 mov %edx,%ecx 10e5ee: c1 e9 1b shr $0x1b,%ecx 10e5f1: 8b 04 88 mov (%eax,%ecx,4),%eax if ( !information ) 10e5f4: 85 c0 test %eax,%eax 10e5f6: 74 24 je 10e61c <_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 ); 10e5f8: 51 push %ecx 10e5f9: 8d 4d f4 lea -0xc(%ebp),%ecx 10e5fc: 51 push %ecx 10e5fd: 52 push %edx 10e5fe: 50 push %eax 10e5ff: e8 50 ff ff ff call 10e554 <_Objects_Get> if ( !the_object ) 10e604: 83 c4 10 add $0x10,%esp 10e607: 85 c0 test %eax,%eax 10e609: 74 11 je 10e61c <_Objects_Id_to_name+0x60> return OBJECTS_INVALID_ID; *name = the_object->name; 10e60b: 8b 50 0c mov 0xc(%eax),%edx 10e60e: 8b 45 0c mov 0xc(%ebp),%eax 10e611: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10e613: e8 ec 07 00 00 call 10ee04 <_Thread_Enable_dispatch> 10e618: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 10e61a: c9 leave 10e61b: c3 ret if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10e61c: b8 03 00 00 00 mov $0x3,%eax } 10e621: c9 leave 10e622: c3 ret =============================================================================== 0010d390 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10d390: 55 push %ebp 10d391: 89 e5 mov %esp,%ebp 10d393: 57 push %edi 10d394: 56 push %esi 10d395: 53 push %ebx 10d396: 83 ec 0c sub $0xc,%esp 10d399: 8b 45 08 mov 0x8(%ebp),%eax 10d39c: 8b 55 0c mov 0xc(%ebp),%edx 10d39f: 8b 5d 10 mov 0x10(%ebp),%ebx 10d3a2: 8b 75 20 mov 0x20(%ebp),%esi 10d3a5: 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; 10d3a9: 89 10 mov %edx,(%eax) information->the_class = the_class; 10d3ab: 66 89 58 04 mov %bx,0x4(%eax) information->size = size; 10d3af: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10d3b2: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10d3b9: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10d3c0: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10d3c7: 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; 10d3cd: 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; 10d3d3: 8b 3c 95 2c 73 12 00 mov 0x12732c(,%edx,4),%edi 10d3da: 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; 10d3dd: 8b 7d 14 mov 0x14(%ebp),%edi 10d3e0: 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 = 10d3e3: 89 f9 mov %edi,%ecx 10d3e5: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10d3e8: 8b 4d 14 mov 0x14(%ebp),%ecx 10d3eb: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10d3f1: 85 ff test %edi,%edi 10d3f3: 74 04 je 10d3f9 <_Objects_Initialize_information+0x69> 10d3f5: 85 c9 test %ecx,%ecx 10d3f7: 74 6a je 10d463 <_Objects_Initialize_information+0xd3> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10d3f9: 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; 10d3fd: 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 = 10d404: c1 e2 18 shl $0x18,%edx 10d407: 81 ca 00 00 01 00 or $0x10000,%edx 10d40d: c1 e3 1b shl $0x1b,%ebx 10d410: 09 da or %ebx,%edx 10d412: 31 db xor %ebx,%ebx 10d414: 85 c9 test %ecx,%ecx 10d416: 0f 95 c3 setne %bl 10d419: 09 da or %ebx,%edx 10d41b: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10d41e: f7 c6 03 00 00 00 test $0x3,%esi 10d424: 75 26 jne 10d44c <_Objects_Initialize_information+0xbc><== NEVER TAKEN name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10d426: 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); 10d42a: 8d 50 24 lea 0x24(%eax),%edx 10d42d: 89 50 20 mov %edx,0x20(%eax) the_chain->permanent_null = NULL; 10d430: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) the_chain->last = _Chain_Head(the_chain); 10d437: 8d 50 20 lea 0x20(%eax),%edx 10d43a: 89 50 28 mov %edx,0x28(%eax) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10d43d: 85 c9 test %ecx,%ecx 10d43f: 75 13 jne 10d454 <_Objects_Initialize_information+0xc4> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10d441: 8d 65 f4 lea -0xc(%ebp),%esp 10d444: 5b pop %ebx 10d445: 5e pop %esi 10d446: 5f pop %edi 10d447: c9 leave 10d448: c3 ret 10d449: 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) & 10d44c: 83 c6 04 add $0x4,%esi <== NOT EXECUTED 10d44f: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED 10d452: eb d2 jmp 10d426 <_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 ); 10d454: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10d457: 8d 65 f4 lea -0xc(%ebp),%esp 10d45a: 5b pop %ebx 10d45b: 5e pop %esi 10d45c: 5f pop %edi 10d45d: 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 ); 10d45e: e9 b9 fa ff ff jmp 10cf1c <_Objects_Extend_information> /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 10d463: 50 push %eax 10d464: 6a 14 push $0x14 10d466: 6a 01 push $0x1 10d468: 6a 00 push $0x0 10d46a: e8 71 f9 ff ff call 10cde0 <_Internal_error_Occurred> =============================================================================== 0010d480 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10d480: 55 push %ebp 10d481: 89 e5 mov %esp,%ebp 10d483: 57 push %edi 10d484: 56 push %esi 10d485: 53 push %ebx 10d486: 8b 45 08 mov 0x8(%ebp),%eax 10d489: 8b 4d 0c mov 0xc(%ebp),%ecx 10d48c: 8b 55 10 mov 0x10(%ebp),%edx 10d48f: 8b 7d 14 mov 0x14(%ebp),%edi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10d492: 85 ff test %edi,%edi 10d494: 74 56 je 10d4ec <_Objects_Name_to_id_u32+0x6c> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10d496: 85 c9 test %ecx,%ecx 10d498: 74 08 je 10d4a2 <_Objects_Name_to_id_u32+0x22> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10d49a: 8b 70 10 mov 0x10(%eax),%esi 10d49d: 66 85 f6 test %si,%si 10d4a0: 75 0a jne 10d4ac <_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++ ) { 10d4a2: 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 } 10d4a7: 5b pop %ebx 10d4a8: 5e pop %esi 10d4a9: 5f pop %edi 10d4aa: c9 leave 10d4ab: c3 ret if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10d4ac: 85 d2 test %edx,%edx 10d4ae: 75 20 jne 10d4d0 <_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++ ) { 10d4b0: 0f b7 f6 movzwl %si,%esi 10d4b3: 8b 58 1c mov 0x1c(%eax),%ebx 10d4b6: b8 01 00 00 00 mov $0x1,%eax 10d4bb: 90 nop the_object = information->local_table[ index ]; 10d4bc: 8b 14 83 mov (%ebx,%eax,4),%edx if ( !the_object ) 10d4bf: 85 d2 test %edx,%edx 10d4c1: 74 05 je 10d4c8 <_Objects_Name_to_id_u32+0x48> continue; if ( name == the_object->name.name_u32 ) { 10d4c3: 39 4a 0c cmp %ecx,0xc(%edx) 10d4c6: 74 18 je 10d4e0 <_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++ ) { 10d4c8: 40 inc %eax 10d4c9: 39 c6 cmp %eax,%esi 10d4cb: 73 ef jae 10d4bc <_Objects_Name_to_id_u32+0x3c> 10d4cd: eb d3 jmp 10d4a2 <_Objects_Name_to_id_u32+0x22> 10d4cf: 90 nop if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10d4d0: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10d4d6: 74 d8 je 10d4b0 <_Objects_Name_to_id_u32+0x30> 10d4d8: 4a dec %edx 10d4d9: 75 c7 jne 10d4a2 <_Objects_Name_to_id_u32+0x22> 10d4db: eb d3 jmp 10d4b0 <_Objects_Name_to_id_u32+0x30> 10d4dd: 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; 10d4e0: 8b 42 08 mov 0x8(%edx),%eax 10d4e3: 89 07 mov %eax,(%edi) 10d4e5: 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 } 10d4e7: 5b pop %ebx 10d4e8: 5e pop %esi 10d4e9: 5f pop %edi 10d4ea: c9 leave 10d4eb: c3 ret Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10d4ec: 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 } 10d4f1: 5b pop %ebx 10d4f2: 5e pop %esi 10d4f3: 5f pop %edi 10d4f4: c9 leave 10d4f5: c3 ret =============================================================================== 0010f2e0 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10f2e0: 55 push %ebp 10f2e1: 89 e5 mov %esp,%ebp 10f2e3: 53 push %ebx 10f2e4: 83 ec 0c sub $0xc,%esp 10f2e7: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10f2ea: 8b 45 08 mov 0x8(%ebp),%eax 10f2ed: 0f b7 40 38 movzwl 0x38(%eax),%eax 10f2f1: 50 push %eax 10f2f2: 53 push %ebx 10f2f3: e8 f0 79 00 00 call 116ce8 d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10f2f8: 0f be 0b movsbl (%ebx),%ecx 10f2fb: c1 e1 18 shl $0x18,%ecx 10f2fe: 83 c4 10 add $0x10,%esp 10f301: 83 f8 01 cmp $0x1,%eax 10f304: 76 32 jbe 10f338 <_Objects_Set_name+0x58> 10f306: 0f be 53 01 movsbl 0x1(%ebx),%edx 10f30a: c1 e2 10 shl $0x10,%edx 10f30d: 09 ca or %ecx,%edx 10f30f: 83 f8 02 cmp $0x2,%eax 10f312: 74 2c je 10f340 <_Objects_Set_name+0x60> 10f314: 0f be 4b 02 movsbl 0x2(%ebx),%ecx 10f318: c1 e1 08 shl $0x8,%ecx 10f31b: 09 d1 or %edx,%ecx 10f31d: 83 f8 03 cmp $0x3,%eax 10f320: 74 37 je 10f359 <_Objects_Set_name+0x79> 10f322: 0f be 43 03 movsbl 0x3(%ebx),%eax 10f326: 09 c1 or %eax,%ecx 10f328: 8b 55 0c mov 0xc(%ebp),%edx 10f32b: 89 4a 0c mov %ecx,0xc(%edx) ); } return true; } 10f32e: b0 01 mov $0x1,%al 10f330: 8b 5d fc mov -0x4(%ebp),%ebx 10f333: c9 leave 10f334: c3 ret 10f335: 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( 10f338: 89 ca mov %ecx,%edx 10f33a: 81 ca 00 00 20 00 or $0x200000,%edx 10f340: 89 d1 mov %edx,%ecx 10f342: 80 cd 20 or $0x20,%ch 10f345: b8 20 00 00 00 mov $0x20,%eax 10f34a: 09 c1 or %eax,%ecx 10f34c: 8b 55 0c mov 0xc(%ebp),%edx 10f34f: 89 4a 0c mov %ecx,0xc(%edx) ); } return true; } 10f352: b0 01 mov $0x1,%al 10f354: 8b 5d fc mov -0x4(%ebp),%ebx 10f357: c9 leave 10f358: c3 ret d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10f359: b0 20 mov $0x20,%al 10f35b: eb c9 jmp 10f326 <_Objects_Set_name+0x46> =============================================================================== 0010d4f8 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10d4f8: 55 push %ebp 10d4f9: 89 e5 mov %esp,%ebp 10d4fb: 57 push %edi 10d4fc: 56 push %esi 10d4fd: 53 push %ebx 10d4fe: 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 ); 10d501: 8b 45 08 mov 0x8(%ebp),%eax 10d504: 0f b7 58 08 movzwl 0x8(%eax),%ebx block_count = (information->maximum - index_base) / 10d508: 0f b7 48 14 movzwl 0x14(%eax),%ecx 10d50c: 0f b7 40 10 movzwl 0x10(%eax),%eax 10d510: 29 d8 sub %ebx,%eax 10d512: 31 d2 xor %edx,%edx 10d514: f7 f1 div %ecx information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10d516: 85 c0 test %eax,%eax 10d518: 74 21 je 10d53b <_Objects_Shrink_information+0x43><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 10d51a: 8b 55 08 mov 0x8(%ebp),%edx 10d51d: 8b 7a 30 mov 0x30(%edx),%edi 10d520: 3b 0f cmp (%edi),%ecx 10d522: 74 1f je 10d543 <_Objects_Shrink_information+0x4b><== NEVER TAKEN information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 10d524: 31 d2 xor %edx,%edx 10d526: eb 0e jmp 10d536 <_Objects_Shrink_information+0x3e> } index_base += information->allocation_size; 10d528: 01 cb add %ecx,%ebx 10d52a: 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 ] == 10d531: 3b 0c 97 cmp (%edi,%edx,4),%ecx 10d534: 74 12 je 10d548 <_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++ ) { 10d536: 42 inc %edx 10d537: 39 d0 cmp %edx,%eax 10d539: 77 ed ja 10d528 <_Objects_Shrink_information+0x30> return; } index_base += information->allocation_size; } } 10d53b: 8d 65 f4 lea -0xc(%ebp),%esp 10d53e: 5b pop %ebx 10d53f: 5e pop %esi 10d540: 5f pop %edi 10d541: c9 leave 10d542: 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 ] == 10d543: 31 f6 xor %esi,%esi 10d545: 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; 10d548: 8b 55 08 mov 0x8(%ebp),%edx 10d54b: 8b 42 20 mov 0x20(%edx),%eax 10d54e: 89 75 e4 mov %esi,-0x1c(%ebp) 10d551: eb 07 jmp 10d55a <_Objects_Shrink_information+0x62> 10d553: 90 nop if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 10d554: 85 ff test %edi,%edi 10d556: 74 2c je 10d584 <_Objects_Shrink_information+0x8c> 10d558: 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 ); 10d55a: 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; 10d55e: 8b 38 mov (%eax),%edi if ((index >= index_base) && 10d560: 39 da cmp %ebx,%edx 10d562: 72 f0 jb 10d554 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { 10d564: 8b 75 08 mov 0x8(%ebp),%esi 10d567: 0f b7 4e 14 movzwl 0x14(%esi),%ecx 10d56b: 8d 0c 0b lea (%ebx,%ecx,1),%ecx 10d56e: 39 ca cmp %ecx,%edx 10d570: 73 e2 jae 10d554 <_Objects_Shrink_information+0x5c> _Chain_Extract( &extract_me->Node ); 10d572: 83 ec 0c sub $0xc,%esp 10d575: 50 push %eax 10d576: e8 1d f0 ff ff call 10c598 <_Chain_Extract> 10d57b: 83 c4 10 add $0x10,%esp } } while ( the_object ); 10d57e: 85 ff test %edi,%edi 10d580: 75 d6 jne 10d558 <_Objects_Shrink_information+0x60> 10d582: 66 90 xchg %ax,%ax 10d584: 8b 75 e4 mov -0x1c(%ebp),%esi /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10d587: 83 ec 0c sub $0xc,%esp 10d58a: 8b 55 08 mov 0x8(%ebp),%edx 10d58d: 8b 42 34 mov 0x34(%edx),%eax 10d590: ff 34 30 pushl (%eax,%esi,1) 10d593: e8 30 17 00 00 call 10ecc8 <_Workspace_Free> information->object_blocks[ block ] = NULL; 10d598: 8b 55 08 mov 0x8(%ebp),%edx 10d59b: 8b 42 34 mov 0x34(%edx),%eax 10d59e: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive_per_block[ block ] = 0; 10d5a5: 8b 42 30 mov 0x30(%edx),%eax 10d5a8: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive -= information->allocation_size; 10d5af: 8b 42 14 mov 0x14(%edx),%eax 10d5b2: 66 29 42 2c sub %ax,0x2c(%edx) return; 10d5b6: 83 c4 10 add $0x10,%esp } index_base += information->allocation_size; } } 10d5b9: 8d 65 f4 lea -0xc(%ebp),%esp 10d5bc: 5b pop %ebx 10d5bd: 5e pop %esi 10d5be: 5f pop %edi 10d5bf: c9 leave 10d5c0: c3 ret =============================================================================== 00110d88 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 110d88: 55 push %ebp 110d89: 89 e5 mov %esp,%ebp 110d8b: 56 push %esi 110d8c: 53 push %ebx 110d8d: 8b 5d 08 mov 0x8(%ebp),%ebx 110d90: 8b 75 0c mov 0xc(%ebp),%esi if ( !the_heap ) 110d93: 85 db test %ebx,%ebx 110d95: 74 35 je 110dcc <_Protected_heap_Get_information+0x44> return false; if ( !the_info ) 110d97: 85 f6 test %esi,%esi 110d99: 74 31 je 110dcc <_Protected_heap_Get_information+0x44> return false; _RTEMS_Lock_allocator(); 110d9b: 83 ec 0c sub $0xc,%esp 110d9e: ff 35 90 eb 12 00 pushl 0x12eb90 110da4: e8 4b e5 ff ff call 10f2f4 <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 110da9: 5a pop %edx 110daa: 59 pop %ecx 110dab: 56 push %esi 110dac: 53 push %ebx 110dad: e8 9e 45 00 00 call 115350 <_Heap_Get_information> _RTEMS_Unlock_allocator(); 110db2: 58 pop %eax 110db3: ff 35 90 eb 12 00 pushl 0x12eb90 110db9: e8 7e e5 ff ff call 10f33c <_API_Mutex_Unlock> 110dbe: b0 01 mov $0x1,%al return true; 110dc0: 83 c4 10 add $0x10,%esp } 110dc3: 8d 65 f8 lea -0x8(%ebp),%esp 110dc6: 5b pop %ebx 110dc7: 5e pop %esi 110dc8: c9 leave 110dc9: c3 ret 110dca: 66 90 xchg %ax,%ax _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); return true; 110dcc: 31 c0 xor %eax,%eax } 110dce: 8d 65 f8 lea -0x8(%ebp),%esp 110dd1: 5b pop %ebx 110dd2: 5e pop %esi 110dd3: c9 leave 110dd4: c3 ret =============================================================================== 00110e2c <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 110e2c: 55 push %ebp 110e2d: 89 e5 mov %esp,%ebp 110e2f: 56 push %esi 110e30: 53 push %ebx 110e31: 83 ec 10 sub $0x10,%esp 110e34: 8b 5d 08 mov 0x8(%ebp),%ebx 110e37: 8b 75 0c mov 0xc(%ebp),%esi 110e3a: 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 ) { 110e3d: 8b 15 d8 ea 12 00 mov 0x12ead8,%edx 110e43: 85 d2 test %edx,%edx 110e45: 74 19 je 110e60 <_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 ); 110e47: 0f b6 c0 movzbl %al,%eax 110e4a: 89 45 10 mov %eax,0x10(%ebp) 110e4d: 89 75 0c mov %esi,0xc(%ebp) 110e50: 89 5d 08 mov %ebx,0x8(%ebp) } return status; } 110e53: 8d 65 f8 lea -0x8(%ebp),%esp 110e56: 5b pop %ebx 110e57: 5e pop %esi 110e58: 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 ); 110e59: e9 1e f2 ff ff jmp 11007c <_Heap_Walk> 110e5e: 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(); 110e60: 83 ec 0c sub $0xc,%esp 110e63: ff 35 90 eb 12 00 pushl 0x12eb90 110e69: 88 45 f4 mov %al,-0xc(%ebp) 110e6c: e8 83 e4 ff ff call 10f2f4 <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 110e71: 83 c4 0c add $0xc,%esp 110e74: 8a 45 f4 mov -0xc(%ebp),%al 110e77: 0f b6 c0 movzbl %al,%eax 110e7a: 50 push %eax 110e7b: 56 push %esi 110e7c: 53 push %ebx 110e7d: e8 fa f1 ff ff call 11007c <_Heap_Walk> _RTEMS_Unlock_allocator(); 110e82: 5a pop %edx 110e83: ff 35 90 eb 12 00 pushl 0x12eb90 110e89: 88 45 f4 mov %al,-0xc(%ebp) 110e8c: e8 ab e4 ff ff call 10f33c <_API_Mutex_Unlock> 110e91: 83 c4 10 add $0x10,%esp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 110e94: 8a 45 f4 mov -0xc(%ebp),%al 110e97: 8d 65 f8 lea -0x8(%ebp),%esp 110e9a: 5b pop %ebx 110e9b: 5e pop %esi 110e9c: c9 leave 110e9d: c3 ret =============================================================================== 00111364 <_RTEMS_tasks_Initialize_user_tasks>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks( void ) { 111364: 55 push %ebp 111365: 89 e5 mov %esp,%ebp 111367: 83 ec 08 sub $0x8,%esp if ( _RTEMS_tasks_Initialize_user_tasks_p ) 11136a: a1 60 32 12 00 mov 0x123260,%eax 11136f: 85 c0 test %eax,%eax 111371: 74 05 je 111378 <_RTEMS_tasks_Initialize_user_tasks+0x14> (*_RTEMS_tasks_Initialize_user_tasks_p)(); } 111373: c9 leave */ void _RTEMS_tasks_Initialize_user_tasks( void ) { if ( _RTEMS_tasks_Initialize_user_tasks_p ) (*_RTEMS_tasks_Initialize_user_tasks_p)(); 111374: ff e0 jmp *%eax 111376: 66 90 xchg %ax,%ax } 111378: c9 leave 111379: c3 ret =============================================================================== 0010c074 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 10c074: 55 push %ebp 10c075: 89 e5 mov %esp,%ebp 10c077: 57 push %edi 10c078: 56 push %esi 10c079: 53 push %ebx 10c07a: 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; 10c07d: 8b 1d 0c 32 12 00 mov 0x12320c,%ebx maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 10c083: 8b 3d 08 32 12 00 mov 0x123208,%edi /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 10c089: 85 db test %ebx,%ebx 10c08b: 74 46 je 10c0d3 <_RTEMS_tasks_Initialize_user_tasks_body+0x5f> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10c08d: 85 ff test %edi,%edi 10c08f: 74 42 je 10c0d3 <_RTEMS_tasks_Initialize_user_tasks_body+0x5f><== NEVER TAKEN 10c091: 31 f6 xor %esi,%esi 10c093: 90 nop return_value = rtems_task_create( 10c094: 83 ec 08 sub $0x8,%esp 10c097: 8d 45 e4 lea -0x1c(%ebp),%eax 10c09a: 50 push %eax 10c09b: ff 73 0c pushl 0xc(%ebx) 10c09e: ff 73 14 pushl 0x14(%ebx) 10c0a1: ff 73 04 pushl 0x4(%ebx) 10c0a4: ff 73 08 pushl 0x8(%ebx) 10c0a7: ff 33 pushl (%ebx) 10c0a9: e8 96 fd ff ff call 10be44 user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 10c0ae: 83 c4 20 add $0x20,%esp 10c0b1: 85 c0 test %eax,%eax 10c0b3: 75 26 jne 10c0db <_RTEMS_tasks_Initialize_user_tasks_body+0x67> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 10c0b5: 51 push %ecx 10c0b6: ff 73 18 pushl 0x18(%ebx) 10c0b9: ff 73 10 pushl 0x10(%ebx) 10c0bc: ff 75 e4 pushl -0x1c(%ebp) 10c0bf: e8 24 00 00 00 call 10c0e8 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 10c0c4: 83 c4 10 add $0x10,%esp 10c0c7: 85 c0 test %eax,%eax 10c0c9: 75 10 jne 10c0db <_RTEMS_tasks_Initialize_user_tasks_body+0x67> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10c0cb: 46 inc %esi 10c0cc: 83 c3 1c add $0x1c,%ebx 10c0cf: 39 f7 cmp %esi,%edi 10c0d1: 77 c1 ja 10c094 <_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 ); } } 10c0d3: 8d 65 f4 lea -0xc(%ebp),%esp 10c0d6: 5b pop %ebx 10c0d7: 5e pop %esi 10c0d8: 5f pop %edi 10c0d9: c9 leave 10c0da: 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 ); 10c0db: 52 push %edx 10c0dc: 50 push %eax 10c0dd: 6a 01 push $0x1 10c0df: 6a 01 push $0x1 10c0e1: e8 fa 0c 00 00 call 10cde0 <_Internal_error_Occurred> =============================================================================== 001113c0 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 1113c0: 55 push %ebp 1113c1: 89 e5 mov %esp,%ebp 1113c3: 57 push %edi 1113c4: 56 push %esi 1113c5: 53 push %ebx 1113c6: 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 ]; 1113c9: 8b 45 08 mov 0x8(%ebp),%eax 1113cc: 8b 98 f0 00 00 00 mov 0xf0(%eax),%ebx if ( !api ) 1113d2: 85 db test %ebx,%ebx 1113d4: 74 45 je 11141b <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 1113d6: 9c pushf 1113d7: fa cli 1113d8: 58 pop %eax signal_set = asr->signals_posted; 1113d9: 8b 73 14 mov 0x14(%ebx),%esi asr->signals_posted = 0; 1113dc: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 1113e3: 50 push %eax 1113e4: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 1113e5: 85 f6 test %esi,%esi 1113e7: 74 32 je 11141b <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN return; asr->nest_level += 1; 1113e9: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 1113ec: 50 push %eax 1113ed: 8d 7d e4 lea -0x1c(%ebp),%edi 1113f0: 57 push %edi 1113f1: 68 ff ff 00 00 push $0xffff 1113f6: ff 73 10 pushl 0x10(%ebx) 1113f9: e8 52 25 00 00 call 113950 (*asr->handler)( signal_set ); 1113fe: 89 34 24 mov %esi,(%esp) 111401: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 111404: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 111407: 83 c4 0c add $0xc,%esp 11140a: 57 push %edi 11140b: 68 ff ff 00 00 push $0xffff 111410: ff 75 e4 pushl -0x1c(%ebp) 111413: e8 38 25 00 00 call 113950 111418: 83 c4 10 add $0x10,%esp } 11141b: 8d 65 f4 lea -0xc(%ebp),%esp 11141e: 5b pop %ebx 11141f: 5e pop %esi 111420: 5f pop %edi 111421: c9 leave 111422: c3 ret =============================================================================== 0011131c <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 11131c: 55 push %ebp 11131d: 89 e5 mov %esp,%ebp /* * Per Task Variables */ tvp = executing->task_variables; 11131f: 8b 45 08 mov 0x8(%ebp),%eax 111322: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 111328: 85 c0 test %eax,%eax 11132a: 74 13 je 11133f <_RTEMS_tasks_Switch_extension+0x23> tvp->tval = *tvp->ptr; 11132c: 8b 50 04 mov 0x4(%eax),%edx 11132f: 8b 0a mov (%edx),%ecx 111331: 89 48 0c mov %ecx,0xc(%eax) *tvp->ptr = tvp->gval; 111334: 8b 48 08 mov 0x8(%eax),%ecx 111337: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 111339: 8b 00 mov (%eax),%eax /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 11133b: 85 c0 test %eax,%eax 11133d: 75 ed jne 11132c <_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; 11133f: 8b 45 0c mov 0xc(%ebp),%eax 111342: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 111348: 85 c0 test %eax,%eax 11134a: 74 13 je 11135f <_RTEMS_tasks_Switch_extension+0x43> tvp->gval = *tvp->ptr; 11134c: 8b 50 04 mov 0x4(%eax),%edx 11134f: 8b 0a mov (%edx),%ecx 111351: 89 48 08 mov %ecx,0x8(%eax) *tvp->ptr = tvp->tval; 111354: 8b 48 0c mov 0xc(%eax),%ecx 111357: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 111359: 8b 00 mov (%eax),%eax *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 11135b: 85 c0 test %eax,%eax 11135d: 75 ed jne 11134c <_RTEMS_tasks_Switch_extension+0x30><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 11135f: c9 leave 111360: c3 ret =============================================================================== 0010ca48 <_Rate_monotonic_Initiate_statistics>: } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { 10ca48: 55 push %ebp 10ca49: 89 e5 mov %esp,%ebp 10ca4b: 57 push %edi 10ca4c: 56 push %esi 10ca4d: 53 push %ebx 10ca4e: 83 ec 28 sub $0x28,%esp 10ca51: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *owning_thread = the_period->owner; 10ca54: 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 ); 10ca57: 8d 7d e0 lea -0x20(%ebp),%edi 10ca5a: 57 push %edi 10ca5b: e8 34 18 00 00 call 10e294 <_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; 10ca60: 8b 45 e0 mov -0x20(%ebp),%eax 10ca63: 8b 55 e4 mov -0x1c(%ebp),%edx 10ca66: 89 43 4c mov %eax,0x4c(%ebx) 10ca69: 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; 10ca6c: 8b 86 84 00 00 00 mov 0x84(%esi),%eax 10ca72: 8b 96 88 00 00 00 mov 0x88(%esi),%edx 10ca78: 89 43 44 mov %eax,0x44(%ebx) 10ca7b: 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) { 10ca7e: 83 c4 10 add $0x10,%esp 10ca81: 3b 35 38 a5 12 00 cmp 0x12a538,%esi 10ca87: 74 0b je 10ca94 <_Rate_monotonic_Initiate_statistics+0x4c> ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); } #endif } 10ca89: 8d 65 f4 lea -0xc(%ebp),%esp 10ca8c: 5b pop %ebx 10ca8d: 5e pop %esi 10ca8e: 5f pop %edi 10ca8f: c9 leave 10ca90: c3 ret 10ca91: 8d 76 00 lea 0x0(%esi),%esi /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 10ca94: 51 push %ecx 10ca95: 8d 75 d8 lea -0x28(%ebp),%esi 10ca98: 56 push %esi 10ca99: 57 push %edi 10ca9a: 68 40 a5 12 00 push $0x12a540 10ca9f: e8 74 38 00 00 call 110318 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); 10caa4: 58 pop %eax 10caa5: 5a pop %edx 10caa6: 56 push %esi 10caa7: 83 c3 44 add $0x44,%ebx 10caaa: 53 push %ebx 10caab: e8 64 37 00 00 call 110214 <_Timespec_Add_to> 10cab0: 83 c4 10 add $0x10,%esp } #endif } 10cab3: 8d 65 f4 lea -0xc(%ebp),%esp 10cab6: 5b pop %ebx 10cab7: 5e pop %esi 10cab8: 5f pop %edi 10cab9: c9 leave 10caba: c3 ret =============================================================================== 0010d09c <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 10d09c: 55 push %ebp 10d09d: 89 e5 mov %esp,%ebp 10d09f: 83 ec 2c sub $0x2c,%esp 10d0a2: 8d 45 f4 lea -0xc(%ebp),%eax 10d0a5: 50 push %eax 10d0a6: ff 75 08 pushl 0x8(%ebp) 10d0a9: 68 80 a3 12 00 push $0x12a380 10d0ae: e8 19 1c 00 00 call 10eccc <_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 ) { 10d0b3: 83 c4 10 add $0x10,%esp 10d0b6: 8b 55 f4 mov -0xc(%ebp),%edx 10d0b9: 85 d2 test %edx,%edx 10d0bb: 75 29 jne 10d0e6 <_Rate_monotonic_Timeout+0x4a><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 10d0bd: 8b 50 40 mov 0x40(%eax),%edx if ( _States_Is_waiting_for_period( the_thread->current_state ) && 10d0c0: f6 42 11 40 testb $0x40,0x11(%edx) 10d0c4: 74 08 je 10d0ce <_Rate_monotonic_Timeout+0x32> the_thread->Wait.id == the_period->Object.id ) { 10d0c6: 8b 4a 20 mov 0x20(%edx),%ecx 10d0c9: 3b 48 08 cmp 0x8(%eax),%ecx 10d0cc: 74 4e je 10d11c <_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 ) { 10d0ce: 83 78 38 01 cmpl $0x1,0x38(%eax) 10d0d2: 74 14 je 10d0e8 <_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; 10d0d4: 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; 10d0db: a1 78 a4 12 00 mov 0x12a478,%eax 10d0e0: 48 dec %eax 10d0e1: a3 78 a4 12 00 mov %eax,0x12a478 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10d0e6: c9 leave 10d0e7: 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; 10d0e8: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax) _Rate_monotonic_Initiate_statistics( the_period ); 10d0ef: 83 ec 0c sub $0xc,%esp 10d0f2: 50 push %eax 10d0f3: 89 45 e4 mov %eax,-0x1c(%ebp) 10d0f6: e8 4d f9 ff ff call 10ca48 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10d0fb: 8b 45 e4 mov -0x1c(%ebp),%eax 10d0fe: 8b 50 3c mov 0x3c(%eax),%edx 10d101: 89 50 1c mov %edx,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10d104: 5a pop %edx 10d105: 59 pop %ecx 10d106: 83 c0 10 add $0x10,%eax 10d109: 50 push %eax 10d10a: 68 58 a5 12 00 push $0x12a558 10d10f: e8 d4 34 00 00 call 1105e8 <_Watchdog_Insert> 10d114: 83 c4 10 add $0x10,%esp 10d117: eb c2 jmp 10d0db <_Rate_monotonic_Timeout+0x3f> 10d119: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10d11c: 83 ec 08 sub $0x8,%esp 10d11f: 68 f8 ff 03 10 push $0x1003fff8 10d124: 52 push %edx 10d125: 89 45 e4 mov %eax,-0x1c(%ebp) 10d128: e8 3f 20 00 00 call 10f16c <_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 ); 10d12d: 8b 45 e4 mov -0x1c(%ebp),%eax 10d130: 89 04 24 mov %eax,(%esp) 10d133: eb c1 jmp 10d0f6 <_Rate_monotonic_Timeout+0x5a> =============================================================================== 0010cb54 <_Rate_monotonic_Update_statistics>: } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 10cb54: 55 push %ebp 10cb55: 89 e5 mov %esp,%ebp 10cb57: 57 push %edi 10cb58: 56 push %esi 10cb59: 53 push %ebx 10cb5a: 83 ec 1c sub $0x1c,%esp 10cb5d: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 10cb60: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 10cb63: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 10cb67: 0f 84 bf 00 00 00 je 10cc2c <_Rate_monotonic_Update_statistics+0xd8> /* * Grab status for time statistics. */ valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 10cb6d: 52 push %edx 10cb6e: 8d 7d e0 lea -0x20(%ebp),%edi 10cb71: 57 push %edi 10cb72: 8d 75 d8 lea -0x28(%ebp),%esi 10cb75: 56 push %esi 10cb76: 53 push %ebx 10cb77: e8 40 ff ff ff call 10cabc <_Rate_monotonic_Get_status> if (!valid_status) 10cb7c: 83 c4 10 add $0x10,%esp 10cb7f: 84 c0 test %al,%al 10cb81: 75 09 jne 10cb8c <_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 } 10cb83: 8d 65 f4 lea -0xc(%ebp),%esp 10cb86: 5b pop %ebx 10cb87: 5e pop %esi 10cb88: 5f pop %edi 10cb89: c9 leave 10cb8a: c3 ret 10cb8b: 90 nop /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 10cb8c: 83 ec 08 sub $0x8,%esp 10cb8f: 57 push %edi 10cb90: 8d 43 6c lea 0x6c(%ebx),%eax 10cb93: 50 push %eax 10cb94: e8 7b 36 00 00 call 110214 <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 10cb99: 59 pop %ecx 10cb9a: 58 pop %eax 10cb9b: 8d 43 5c lea 0x5c(%ebx),%eax 10cb9e: 50 push %eax 10cb9f: 57 push %edi 10cba0: e8 4f 37 00 00 call 1102f4 <_Timespec_Less_than> 10cba5: 83 c4 10 add $0x10,%esp 10cba8: 84 c0 test %al,%al 10cbaa: 74 0c je 10cbb8 <_Rate_monotonic_Update_statistics+0x64> stats->min_cpu_time = executed; 10cbac: 8b 45 e0 mov -0x20(%ebp),%eax 10cbaf: 8b 55 e4 mov -0x1c(%ebp),%edx 10cbb2: 89 43 5c mov %eax,0x5c(%ebx) 10cbb5: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 10cbb8: 83 ec 08 sub $0x8,%esp 10cbbb: 8d 43 64 lea 0x64(%ebx),%eax 10cbbe: 50 push %eax 10cbbf: 57 push %edi 10cbc0: e8 0b 37 00 00 call 1102d0 <_Timespec_Greater_than> 10cbc5: 83 c4 10 add $0x10,%esp 10cbc8: 84 c0 test %al,%al 10cbca: 74 0c je 10cbd8 <_Rate_monotonic_Update_statistics+0x84> stats->max_cpu_time = executed; 10cbcc: 8b 45 e0 mov -0x20(%ebp),%eax 10cbcf: 8b 55 e4 mov -0x1c(%ebp),%edx 10cbd2: 89 43 64 mov %eax,0x64(%ebx) 10cbd5: 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 ); 10cbd8: 83 ec 08 sub $0x8,%esp 10cbdb: 56 push %esi 10cbdc: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10cbe2: 50 push %eax 10cbe3: e8 2c 36 00 00 call 110214 <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 10cbe8: 58 pop %eax 10cbe9: 5a pop %edx 10cbea: 8d 43 74 lea 0x74(%ebx),%eax 10cbed: 50 push %eax 10cbee: 56 push %esi 10cbef: e8 00 37 00 00 call 1102f4 <_Timespec_Less_than> 10cbf4: 83 c4 10 add $0x10,%esp 10cbf7: 84 c0 test %al,%al 10cbf9: 75 39 jne 10cc34 <_Rate_monotonic_Update_statistics+0xe0> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 10cbfb: 83 ec 08 sub $0x8,%esp 10cbfe: 8d 43 7c lea 0x7c(%ebx),%eax 10cc01: 50 push %eax 10cc02: 56 push %esi 10cc03: e8 c8 36 00 00 call 1102d0 <_Timespec_Greater_than> 10cc08: 83 c4 10 add $0x10,%esp 10cc0b: 84 c0 test %al,%al 10cc0d: 0f 84 70 ff ff ff je 10cb83 <_Rate_monotonic_Update_statistics+0x2f> stats->max_wall_time = since_last_period; 10cc13: 8b 45 d8 mov -0x28(%ebp),%eax 10cc16: 8b 55 dc mov -0x24(%ebp),%edx 10cc19: 89 43 7c mov %eax,0x7c(%ebx) 10cc1c: 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 } 10cc22: 8d 65 f4 lea -0xc(%ebp),%esp 10cc25: 5b pop %ebx 10cc26: 5e pop %esi 10cc27: 5f pop %edi 10cc28: c9 leave 10cc29: c3 ret 10cc2a: 66 90 xchg %ax,%ax */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 10cc2c: ff 43 58 incl 0x58(%ebx) 10cc2f: e9 39 ff ff ff jmp 10cb6d <_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; 10cc34: 8b 45 d8 mov -0x28(%ebp),%eax 10cc37: 8b 55 dc mov -0x24(%ebp),%edx 10cc3a: 89 43 74 mov %eax,0x74(%ebx) 10cc3d: 89 53 78 mov %edx,0x78(%ebx) 10cc40: eb b9 jmp 10cbfb <_Rate_monotonic_Update_statistics+0xa7> =============================================================================== 0010dfbc <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 10dfbc: 55 push %ebp 10dfbd: 89 e5 mov %esp,%ebp 10dfbf: 53 push %ebx 10dfc0: 83 ec 04 sub $0x4,%esp 10dfc3: 8b 5d 08 mov 0x8(%ebp),%ebx 10dfc6: a1 d8 b7 12 00 mov 0x12b7d8,%eax 10dfcb: 40 inc %eax 10dfcc: a3 d8 b7 12 00 mov %eax,0x12b7d8 long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 10dfd1: a1 6c b8 12 00 mov 0x12b86c,%eax if ( time->tv_sec < seconds ) 10dfd6: 8b 13 mov (%ebx),%edx 10dfd8: 39 d0 cmp %edx,%eax 10dfda: 7f 34 jg 10e010 <_TOD_Set+0x54> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 10dfdc: 51 push %ecx 10dfdd: 29 c2 sub %eax,%edx 10dfdf: 52 push %edx 10dfe0: 6a 00 push $0x0 10dfe2: 68 ac b8 12 00 push $0x12b8ac 10dfe7: e8 44 24 00 00 call 110430 <_Watchdog_Adjust> 10dfec: 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 ); 10dfef: 8b 03 mov (%ebx),%eax 10dff1: a3 6c b8 12 00 mov %eax,0x12b86c 10dff6: 8b 43 04 mov 0x4(%ebx),%eax 10dff9: a3 70 b8 12 00 mov %eax,0x12b870 _TOD_Is_set = true; 10dffe: c6 05 ec b7 12 00 01 movb $0x1,0x12b7ec _TOD_Activate(); _Thread_Enable_dispatch(); } 10e005: 8b 5d fc mov -0x4(%ebp),%ebx 10e008: c9 leave _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); 10e009: e9 76 12 00 00 jmp 10f284 <_Thread_Enable_dispatch> 10e00e: 66 90 xchg %ax,%ax 10e010: 51 push %ecx 10e011: 29 d0 sub %edx,%eax 10e013: 50 push %eax 10e014: 6a 01 push $0x1 10e016: 68 ac b8 12 00 push $0x12b8ac 10e01b: e8 10 24 00 00 call 110430 <_Watchdog_Adjust> 10e020: 83 c4 10 add $0x10,%esp 10e023: eb ca jmp 10dfef <_TOD_Set+0x33> =============================================================================== 0010ca40 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 10ca40: 55 push %ebp 10ca41: 89 e5 mov %esp,%ebp 10ca43: 53 push %ebx 10ca44: 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() ); 10ca47: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 10ca4e: a1 2c 32 12 00 mov 0x12322c,%eax 10ca53: 8d 04 80 lea (%eax,%eax,4),%eax 10ca56: 8d 04 80 lea (%eax,%eax,4),%eax 10ca59: 8d 04 80 lea (%eax,%eax,4),%eax 10ca5c: c1 e0 03 shl $0x3,%eax 10ca5f: 89 45 f4 mov %eax,-0xc(%ebp) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 10ca62: a1 c4 74 12 00 mov 0x1274c4,%eax 10ca67: 40 inc %eax 10ca68: a3 c4 74 12 00 mov %eax,0x1274c4 /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 10ca6d: 8d 5d f0 lea -0x10(%ebp),%ebx 10ca70: 53 push %ebx 10ca71: 68 d8 73 12 00 push $0x1273d8 10ca76: e8 e9 1c 00 00 call 10e764 <_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 ); 10ca7b: 58 pop %eax 10ca7c: 5a pop %edx 10ca7d: 53 push %ebx 10ca7e: 68 ec 73 12 00 push $0x1273ec 10ca83: e8 dc 1c 00 00 call 10e764 <_Timespec_Add_to> 10ca88: 89 c3 mov %eax,%ebx while ( seconds ) { 10ca8a: 83 c4 10 add $0x10,%esp 10ca8d: 85 c0 test %eax,%eax 10ca8f: 74 16 je 10caa7 <_TOD_Tickle_ticks+0x67> 10ca91: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 10ca94: 83 ec 0c sub $0xc,%esp 10ca97: 68 2c 74 12 00 push $0x12742c 10ca9c: e8 73 21 00 00 call 10ec14 <_Watchdog_Tickle> 10caa1: 83 c4 10 add $0x10,%esp 10caa4: 4b dec %ebx 10caa5: 75 ed jne 10ca94 <_TOD_Tickle_ticks+0x54><== NEVER TAKEN _Watchdog_Tickle_seconds(); seconds--; } } 10caa7: 8b 5d fc mov -0x4(%ebp),%ebx 10caaa: c9 leave 10caab: c3 ret =============================================================================== 0010c7c4 <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 10c7c4: 55 push %ebp 10c7c5: 89 e5 mov %esp,%ebp 10c7c7: 56 push %esi 10c7c8: 53 push %ebx 10c7c9: 8b 55 08 mov 0x8(%ebp),%edx uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 10c7cc: 8b 72 08 mov 0x8(%edx),%esi 10c7cf: 4e dec %esi year_mod_4 = the_tod->year & 3; 10c7d0: 8b 02 mov (%edx),%eax if ( year_mod_4 == 0 ) 10c7d2: 89 c3 mov %eax,%ebx 10c7d4: 83 e3 03 and $0x3,%ebx 10c7d7: 74 67 je 10c840 <_TOD_To_seconds+0x7c> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 10c7d9: 8b 4a 04 mov 0x4(%edx),%ecx 10c7dc: 0f b7 8c 09 c0 41 12 movzwl 0x1241c0(%ecx,%ecx,1),%ecx 10c7e3: 00 10c7e4: 8d 34 31 lea (%ecx,%esi,1),%esi time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 10c7e7: 0f b7 8c 1b f4 41 12 movzwl 0x1241f4(%ebx,%ebx,1),%ecx 10c7ee: 00 10c7ef: 2d c4 07 00 00 sub $0x7c4,%eax 10c7f4: c1 e8 02 shr $0x2,%eax 10c7f7: 8d 1c c0 lea (%eax,%eax,8),%ebx 10c7fa: 8d 1c d8 lea (%eax,%ebx,8),%ebx 10c7fd: 8d 1c 9b lea (%ebx,%ebx,4),%ebx 10c800: 8d 04 98 lea (%eax,%ebx,4),%eax 10c803: 01 c1 add %eax,%ecx ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10c805: 01 f1 add %esi,%ecx time *= TOD_SECONDS_PER_DAY; 10c807: 8d 04 89 lea (%ecx,%ecx,4),%eax 10c80a: 8d 04 81 lea (%ecx,%eax,4),%eax 10c80d: 8d 04 c1 lea (%ecx,%eax,8),%eax 10c810: c1 e0 02 shl $0x2,%eax 10c813: 29 c8 sub %ecx,%eax 10c815: c1 e0 07 shl $0x7,%eax time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 10c818: 8b 5a 14 mov 0x14(%edx),%ebx * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 10c81b: 8b 4a 0c mov 0xc(%edx),%ecx 10c81e: 8d 0c 49 lea (%ecx,%ecx,2),%ecx 10c821: 8d 0c 89 lea (%ecx,%ecx,4),%ecx 10c824: c1 e1 02 shl $0x2,%ecx 10c827: 03 4a 10 add 0x10(%edx),%ecx 10c82a: 8d 14 49 lea (%ecx,%ecx,2),%edx 10c82d: 8d 14 92 lea (%edx,%edx,4),%edx 10c830: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx 10c837: 8d 04 02 lea (%edx,%eax,1),%eax time += TOD_SECONDS_1970_THROUGH_1988; return( time ); } 10c83a: 5b pop %ebx 10c83b: 5e pop %esi 10c83c: c9 leave 10c83d: c3 ret 10c83e: 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 ]; 10c840: 8b 4a 04 mov 0x4(%edx),%ecx 10c843: 0f b7 8c 09 da 41 12 movzwl 0x1241da(%ecx,%ecx,1),%ecx 10c84a: 00 10c84b: 8d 34 31 lea (%ecx,%esi,1),%esi 10c84e: eb 97 jmp 10c7e7 <_TOD_To_seconds+0x23> =============================================================================== 0010c850 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10c850: 55 push %ebp 10c851: 89 e5 mov %esp,%ebp 10c853: 53 push %ebx 10c854: 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(); 10c857: 8b 1d 4c 72 12 00 mov 0x12724c,%ebx if ((!the_tod) || 10c85d: 85 c9 test %ecx,%ecx 10c85f: 74 53 je 10c8b4 <_TOD_Validate+0x64> <== NEVER TAKEN 10c861: b8 40 42 0f 00 mov $0xf4240,%eax 10c866: 31 d2 xor %edx,%edx 10c868: f7 f3 div %ebx (the_tod->ticks >= ticks_per_second) || 10c86a: 3b 41 18 cmp 0x18(%ecx),%eax 10c86d: 76 45 jbe 10c8b4 <_TOD_Validate+0x64> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10c86f: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10c873: 77 3f ja 10c8b4 <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10c875: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10c879: 77 39 ja 10c8b4 <_TOD_Validate+0x64> (the_tod->hour >= TOD_HOURS_PER_DAY) || 10c87b: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10c87f: 77 33 ja 10c8b4 <_TOD_Validate+0x64> (the_tod->month == 0) || 10c881: 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) || 10c884: 85 c0 test %eax,%eax 10c886: 74 2c je 10c8b4 <_TOD_Validate+0x64> <== NEVER TAKEN 10c888: 83 f8 0c cmp $0xc,%eax 10c88b: 77 27 ja 10c8b4 <_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) || 10c88d: 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) || 10c88f: 81 fa c3 07 00 00 cmp $0x7c3,%edx 10c895: 76 1d jbe 10c8b4 <_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) ) 10c897: 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) || 10c89a: 85 c9 test %ecx,%ecx 10c89c: 74 16 je 10c8b4 <_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 ) 10c89e: 83 e2 03 and $0x3,%edx 10c8a1: 75 16 jne 10c8b9 <_TOD_Validate+0x69> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10c8a3: 8b 04 85 34 42 12 00 mov 0x124234(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10c8aa: 39 c8 cmp %ecx,%eax 10c8ac: 0f 93 c0 setae %al 10c8af: eb 05 jmp 10c8b6 <_TOD_Validate+0x66> 10c8b1: 8d 76 00 lea 0x0(%esi),%esi 10c8b4: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10c8b6: 5b pop %ebx 10c8b7: c9 leave 10c8b8: 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 ]; 10c8b9: 8b 04 85 00 42 12 00 mov 0x124200(,%eax,4),%eax 10c8c0: eb e8 jmp 10c8aa <_TOD_Validate+0x5a> =============================================================================== 0010d688 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10d688: 55 push %ebp 10d689: 89 e5 mov %esp,%ebp 10d68b: 57 push %edi 10d68c: 56 push %esi 10d68d: 53 push %ebx 10d68e: 83 ec 28 sub $0x28,%esp 10d691: 8b 5d 08 mov 0x8(%ebp),%ebx 10d694: 8b 75 0c mov 0xc(%ebp),%esi 10d697: 8a 45 10 mov 0x10(%ebp),%al 10d69a: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10d69d: 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 ); 10d6a0: 53 push %ebx 10d6a1: e8 56 0e 00 00 call 10e4fc <_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 ) 10d6a6: 83 c4 10 add $0x10,%esp 10d6a9: 39 73 14 cmp %esi,0x14(%ebx) 10d6ac: 74 0d je 10d6bb <_Thread_Change_priority+0x33> _Thread_Set_priority( the_thread, new_priority ); 10d6ae: 83 ec 08 sub $0x8,%esp 10d6b1: 56 push %esi 10d6b2: 53 push %ebx 10d6b3: e8 fc 0c 00 00 call 10e3b4 <_Thread_Set_priority> 10d6b8: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10d6bb: 9c pushf 10d6bc: fa cli 10d6bd: 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; 10d6be: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10d6c1: 83 f8 04 cmp $0x4,%eax 10d6c4: 74 26 je 10d6ec <_Thread_Change_priority+0x64> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10d6c6: 83 e7 04 and $0x4,%edi 10d6c9: 74 15 je 10d6e0 <_Thread_Change_priority+0x58><== ALWAYS TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10d6cb: 52 push %edx 10d6cc: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10d6cd: a9 e0 be 03 00 test $0x3bee0,%eax 10d6d2: 0f 85 bc 00 00 00 jne 10d794 <_Thread_Change_priority+0x10c> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10d6d8: 8d 65 f4 lea -0xc(%ebp),%esp 10d6db: 5b pop %ebx 10d6dc: 5e pop %esi 10d6dd: 5f pop %edi 10d6de: c9 leave 10d6df: 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 ); 10d6e0: 89 c1 mov %eax,%ecx 10d6e2: 83 e1 fb and $0xfffffffb,%ecx 10d6e5: 89 4b 10 mov %ecx,0x10(%ebx) 10d6e8: eb e1 jmp 10d6cb <_Thread_Change_priority+0x43> 10d6ea: 66 90 xchg %ax,%ax } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10d6ec: 83 e7 04 and $0x4,%edi 10d6ef: 75 45 jne 10d736 <_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 ); 10d6f1: 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; 10d6f8: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10d6fe: 66 8b 8b 96 00 00 00 mov 0x96(%ebx),%cx 10d705: 66 09 08 or %cx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d708: 66 a1 0c 74 12 00 mov 0x12740c,%ax 10d70e: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10d714: 66 a3 0c 74 12 00 mov %ax,0x12740c _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10d71a: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10d71e: 0f 84 88 00 00 00 je 10d7ac <_Thread_Change_priority+0x124> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10d724: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10d72a: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10d72d: 8b 08 mov (%eax),%ecx after_node->next = the_node; 10d72f: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10d731: 89 0b mov %ecx,(%ebx) before_node->previous = the_node; 10d733: 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 ); 10d736: 52 push %edx 10d737: 9d popf 10d738: 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 ); 10d739: 66 8b 1d 0c 74 12 00 mov 0x12740c,%bx 10d740: 31 c0 xor %eax,%eax 10d742: 89 c1 mov %eax,%ecx 10d744: 66 0f bc cb bsf %bx,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10d748: 0f b7 c9 movzwl %cx,%ecx 10d74b: 66 8b 9c 09 a0 74 12 mov 0x1274a0(%ecx,%ecx,1),%bx 10d752: 00 10d753: 66 0f bc c3 bsf %bx,%ax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10d757: c1 e1 04 shl $0x4,%ecx 10d75a: 0f b7 c0 movzwl %ax,%eax 10d75d: 8d 04 01 lea (%ecx,%eax,1),%eax 10d760: 8d 0c 40 lea (%eax,%eax,2),%ecx 10d763: a1 20 73 12 00 mov 0x127320,%eax 10d768: 8b 04 88 mov (%eax,%ecx,4),%eax 10d76b: 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 ); 10d770: 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() && 10d776: 39 c8 cmp %ecx,%eax 10d778: 74 0d je 10d787 <_Thread_Change_priority+0xff> _Thread_Executing->is_preemptible ) 10d77a: 80 79 75 00 cmpb $0x0,0x75(%ecx) 10d77e: 74 07 je 10d787 <_Thread_Change_priority+0xff> _Context_Switch_necessary = true; 10d780: c6 05 28 74 12 00 01 movb $0x1,0x127428 _ISR_Enable( level ); 10d787: 52 push %edx 10d788: 9d popf } 10d789: 8d 65 f4 lea -0xc(%ebp),%esp 10d78c: 5b pop %ebx 10d78d: 5e pop %esi 10d78e: 5f pop %edi 10d78f: c9 leave 10d790: c3 ret 10d791: 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 ); 10d794: 89 5d 0c mov %ebx,0xc(%ebp) 10d797: 8b 43 44 mov 0x44(%ebx),%eax 10d79a: 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 ); } 10d79d: 8d 65 f4 lea -0xc(%ebp),%esp 10d7a0: 5b pop %ebx 10d7a1: 5e pop %esi 10d7a2: 5f pop %edi 10d7a3: 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 ); 10d7a4: e9 73 0b 00 00 jmp 10e31c <_Thread_queue_Requeue> 10d7a9: 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 ); 10d7ac: 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); 10d7b2: 8d 48 04 lea 0x4(%eax),%ecx 10d7b5: 89 0b mov %ecx,(%ebx) old_last_node = the_chain->last; 10d7b7: 8b 48 08 mov 0x8(%eax),%ecx the_chain->last = the_node; 10d7ba: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10d7bd: 89 19 mov %ebx,(%ecx) the_node->previous = old_last_node; 10d7bf: 89 4b 04 mov %ecx,0x4(%ebx) 10d7c2: e9 6f ff ff ff jmp 10d736 <_Thread_Change_priority+0xae> =============================================================================== 0010d7c8 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10d7c8: 55 push %ebp 10d7c9: 89 e5 mov %esp,%ebp 10d7cb: 53 push %ebx 10d7cc: 8b 45 08 mov 0x8(%ebp),%eax 10d7cf: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10d7d2: 9c pushf 10d7d3: fa cli 10d7d4: 5b pop %ebx current_state = the_thread->current_state; 10d7d5: 8b 48 10 mov 0x10(%eax),%ecx if ( current_state & state ) { 10d7d8: 85 ca test %ecx,%edx 10d7da: 74 70 je 10d84c <_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); 10d7dc: f7 d2 not %edx 10d7de: 21 ca and %ecx,%edx current_state = 10d7e0: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 10d7e3: 85 d2 test %edx,%edx 10d7e5: 75 65 jne 10d84c <_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; 10d7e7: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10d7ed: 66 8b 88 96 00 00 00 mov 0x96(%eax),%cx 10d7f4: 66 09 0a or %cx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d7f7: 66 8b 15 0c 74 12 00 mov 0x12740c,%dx 10d7fe: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10d804: 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); 10d80b: 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); 10d811: 8d 4a 04 lea 0x4(%edx),%ecx 10d814: 89 08 mov %ecx,(%eax) old_last_node = the_chain->last; 10d816: 8b 4a 08 mov 0x8(%edx),%ecx the_chain->last = the_node; 10d819: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10d81c: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10d81e: 89 48 04 mov %ecx,0x4(%eax) _ISR_Flash( level ); 10d821: 53 push %ebx 10d822: 9d popf 10d823: 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 ) { 10d824: 8b 50 14 mov 0x14(%eax),%edx 10d827: 8b 0d e8 73 12 00 mov 0x1273e8,%ecx 10d82d: 3b 51 14 cmp 0x14(%ecx),%edx 10d830: 73 1a jae 10d84c <_Thread_Clear_state+0x84> _Thread_Heir = the_thread; 10d832: a3 e8 73 12 00 mov %eax,0x1273e8 if ( _Thread_Executing->is_preemptible || 10d837: a1 18 74 12 00 mov 0x127418,%eax 10d83c: 80 78 75 00 cmpb $0x0,0x75(%eax) 10d840: 74 12 je 10d854 <_Thread_Clear_state+0x8c> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10d842: c6 05 28 74 12 00 01 movb $0x1,0x127428 10d849: 8d 76 00 lea 0x0(%esi),%esi } } } _ISR_Enable( level ); 10d84c: 53 push %ebx 10d84d: 9d popf } 10d84e: 5b pop %ebx 10d84f: c9 leave 10d850: c3 ret 10d851: 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 || 10d854: 85 d2 test %edx,%edx 10d856: 74 ea je 10d842 <_Thread_Clear_state+0x7a><== NEVER TAKEN 10d858: eb f2 jmp 10d84c <_Thread_Clear_state+0x84> =============================================================================== 0010d85c <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 10d85c: 55 push %ebp 10d85d: 89 e5 mov %esp,%ebp 10d85f: 56 push %esi 10d860: 53 push %ebx 10d861: 8b 75 08 mov 0x8(%ebp),%esi 10d864: 8b 5d 0c mov 0xc(%ebp),%ebx 10d867: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10d86b: 8b 46 1c mov 0x1c(%esi),%eax 10d86e: 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; 10d875: a1 58 73 12 00 mov 0x127358,%eax 10d87a: 48 dec %eax 10d87b: 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 ); 10d880: 83 ec 0c sub $0xc,%esp 10d883: 53 push %ebx 10d884: e8 27 11 00 00 call 10e9b0 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d889: a1 58 73 12 00 mov 0x127358,%eax 10d88e: 40 inc %eax 10d88f: 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 ); 10d894: 59 pop %ecx 10d895: 58 pop %eax 10d896: 53 push %ebx 10d897: 56 push %esi 10d898: e8 57 f6 ff ff call 10cef4 <_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 ); 10d89d: 58 pop %eax 10d89e: 5a pop %edx 10d89f: 6a 01 push $0x1 10d8a1: 53 push %ebx 10d8a2: e8 79 0b 00 00 call 10e420 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 10d8a7: 89 1c 24 mov %ebx,(%esp) 10d8aa: e8 c5 09 00 00 call 10e274 <_Thread_queue_Extract_with_proxy> 10d8af: 83 c4 10 add $0x10,%esp 10d8b2: 84 c0 test %al,%al 10d8b4: 75 06 jne 10d8bc <_Thread_Close+0x60> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 10d8b6: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d8ba: 74 68 je 10d924 <_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 ) ) 10d8bc: 3b 1d e0 73 12 00 cmp 0x1273e0,%ebx 10d8c2: 74 74 je 10d938 <_Thread_Close+0xdc> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 10d8c4: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx) 10d8cb: 00 00 00 if ( the_thread->Start.fp_context ) 10d8ce: 8b 83 c8 00 00 00 mov 0xc8(%ebx),%eax 10d8d4: 85 c0 test %eax,%eax 10d8d6: 74 0c je 10d8e4 <_Thread_Close+0x88> (void) _Workspace_Free( the_thread->Start.fp_context ); 10d8d8: 83 ec 0c sub $0xc,%esp 10d8db: 50 push %eax 10d8dc: e8 e7 13 00 00 call 10ecc8 <_Workspace_Free> 10d8e1: 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 ); 10d8e4: 83 ec 0c sub $0xc,%esp 10d8e7: 53 push %ebx 10d8e8: e8 e7 0c 00 00 call 10e5d4 <_Thread_Stack_Free> the_thread->Start.stack = NULL; 10d8ed: c7 83 cc 00 00 00 00 movl $0x0,0xcc(%ebx) 10d8f4: 00 00 00 if ( the_thread->extensions ) 10d8f7: 8b 83 fc 00 00 00 mov 0xfc(%ebx),%eax 10d8fd: 83 c4 10 add $0x10,%esp 10d900: 85 c0 test %eax,%eax 10d902: 74 0c je 10d910 <_Thread_Close+0xb4> (void) _Workspace_Free( the_thread->extensions ); 10d904: 83 ec 0c sub $0xc,%esp 10d907: 50 push %eax 10d908: e8 bb 13 00 00 call 10ecc8 <_Workspace_Free> 10d90d: 83 c4 10 add $0x10,%esp the_thread->extensions = NULL; 10d910: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10d917: 00 00 00 } 10d91a: 8d 65 f8 lea -0x8(%ebp),%esp 10d91d: 5b pop %ebx 10d91e: 5e pop %esi 10d91f: c9 leave 10d920: c3 ret 10d921: 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 ); 10d924: 83 ec 0c sub $0xc,%esp 10d927: 8d 43 48 lea 0x48(%ebx),%eax 10d92a: 50 push %eax 10d92b: e8 78 12 00 00 call 10eba8 <_Watchdog_Remove> 10d930: 83 c4 10 add $0x10,%esp 10d933: eb 87 jmp 10d8bc <_Thread_Close+0x60> 10d935: 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; 10d938: c7 05 e0 73 12 00 00 movl $0x0,0x1273e0 10d93f: 00 00 00 10d942: eb 80 jmp 10d8c4 <_Thread_Close+0x68> =============================================================================== 0010d9d8 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10d9d8: 55 push %ebp 10d9d9: 89 e5 mov %esp,%ebp 10d9db: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10d9de: 8d 45 f4 lea -0xc(%ebp),%eax 10d9e1: 50 push %eax 10d9e2: ff 75 08 pushl 0x8(%ebp) 10d9e5: e8 aa 01 00 00 call 10db94 <_Thread_Get> switch ( location ) { 10d9ea: 83 c4 10 add $0x10,%esp 10d9ed: 8b 55 f4 mov -0xc(%ebp),%edx 10d9f0: 85 d2 test %edx,%edx 10d9f2: 75 1c jne 10da10 <_Thread_Delay_ended+0x38><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10d9f4: 83 ec 08 sub $0x8,%esp 10d9f7: 68 18 00 00 10 push $0x10000018 10d9fc: 50 push %eax 10d9fd: e8 c6 fd ff ff call 10d7c8 <_Thread_Clear_state> 10da02: a1 58 73 12 00 mov 0x127358,%eax 10da07: 48 dec %eax 10da08: a3 58 73 12 00 mov %eax,0x127358 10da0d: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10da10: c9 leave 10da11: c3 ret =============================================================================== 0010da14 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10da14: 55 push %ebp 10da15: 89 e5 mov %esp,%ebp 10da17: 57 push %edi 10da18: 56 push %esi 10da19: 53 push %ebx 10da1a: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10da1d: 8b 1d 18 74 12 00 mov 0x127418,%ebx _ISR_Disable( level ); 10da23: 9c pushf 10da24: fa cli 10da25: 58 pop %eax while ( _Context_Switch_necessary == true ) { 10da26: 8a 15 28 74 12 00 mov 0x127428,%dl 10da2c: 84 d2 test %dl,%dl 10da2e: 0f 84 10 01 00 00 je 10db44 <_Thread_Dispatch+0x130> 10da34: 8d 7d d8 lea -0x28(%ebp),%edi 10da37: e9 d1 00 00 00 jmp 10db0d <_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 ); 10da3c: 50 push %eax 10da3d: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10da3e: 83 ec 0c sub $0xc,%esp 10da41: 8d 45 e0 lea -0x20(%ebp),%eax 10da44: 50 push %eax 10da45: e8 4e 3e 00 00 call 111898 <_TOD_Get_uptime> _Timestamp_Subtract( 10da4a: 83 c4 0c add $0xc,%esp 10da4d: 57 push %edi 10da4e: 8d 45 e0 lea -0x20(%ebp),%eax 10da51: 50 push %eax 10da52: 68 20 74 12 00 push $0x127420 10da57: e8 44 0d 00 00 call 10e7a0 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10da5c: 5a pop %edx 10da5d: 59 pop %ecx 10da5e: 57 push %edi 10da5f: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10da65: 50 push %eax 10da66: e8 f9 0c 00 00 call 10e764 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10da6b: 8b 45 e0 mov -0x20(%ebp),%eax 10da6e: 8b 55 e4 mov -0x1c(%ebp),%edx 10da71: a3 20 74 12 00 mov %eax,0x127420 10da76: 89 15 24 74 12 00 mov %edx,0x127424 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10da7c: a1 e4 73 12 00 mov 0x1273e4,%eax 10da81: 83 c4 10 add $0x10,%esp 10da84: 85 c0 test %eax,%eax 10da86: 74 10 je 10da98 <_Thread_Dispatch+0x84> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10da88: 8b 10 mov (%eax),%edx 10da8a: 89 93 ec 00 00 00 mov %edx,0xec(%ebx) *_Thread_libc_reent = heir->libc_reent; 10da90: 8b 96 ec 00 00 00 mov 0xec(%esi),%edx 10da96: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10da98: 83 ec 08 sub $0x8,%esp 10da9b: 56 push %esi 10da9c: 53 push %ebx 10da9d: e8 8e 0f 00 00 call 10ea30 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10daa2: 59 pop %ecx 10daa3: 58 pop %eax 10daa4: 81 c6 d0 00 00 00 add $0xd0,%esi 10daaa: 56 push %esi 10daab: 8d 83 d0 00 00 00 lea 0xd0(%ebx),%eax 10dab1: 50 push %eax 10dab2: e8 79 12 00 00 call 10ed30 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10dab7: 83 c4 10 add $0x10,%esp 10daba: 8b 93 e8 00 00 00 mov 0xe8(%ebx),%edx 10dac0: 85 d2 test %edx,%edx 10dac2: 74 36 je 10dafa <_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 ); 10dac4: a1 e0 73 12 00 mov 0x1273e0,%eax 10dac9: 39 c3 cmp %eax,%ebx 10dacb: 74 2d je 10dafa <_Thread_Dispatch+0xe6> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10dacd: 85 c0 test %eax,%eax 10dacf: 74 11 je 10dae2 <_Thread_Dispatch+0xce> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10dad1: 83 ec 0c sub $0xc,%esp 10dad4: 05 e8 00 00 00 add $0xe8,%eax 10dad9: 50 push %eax 10dada: e8 85 12 00 00 call 10ed64 <_CPU_Context_save_fp> 10dadf: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10dae2: 83 ec 0c sub $0xc,%esp 10dae5: 8d 83 e8 00 00 00 lea 0xe8(%ebx),%eax 10daeb: 50 push %eax 10daec: e8 7d 12 00 00 call 10ed6e <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10daf1: 89 1d e0 73 12 00 mov %ebx,0x1273e0 10daf7: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10dafa: 8b 1d 18 74 12 00 mov 0x127418,%ebx _ISR_Disable( level ); 10db00: 9c pushf 10db01: fa cli 10db02: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10db03: 8a 15 28 74 12 00 mov 0x127428,%dl 10db09: 84 d2 test %dl,%dl 10db0b: 74 37 je 10db44 <_Thread_Dispatch+0x130> heir = _Thread_Heir; 10db0d: 8b 35 e8 73 12 00 mov 0x1273e8,%esi _Thread_Dispatch_disable_level = 1; 10db13: c7 05 58 73 12 00 01 movl $0x1,0x127358 10db1a: 00 00 00 _Context_Switch_necessary = false; 10db1d: c6 05 28 74 12 00 00 movb $0x0,0x127428 _Thread_Executing = heir; 10db24: 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 ) 10db2a: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10db2e: 0f 85 08 ff ff ff jne 10da3c <_Thread_Dispatch+0x28> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10db34: 8b 15 24 73 12 00 mov 0x127324,%edx 10db3a: 89 56 78 mov %edx,0x78(%esi) 10db3d: e9 fa fe ff ff jmp 10da3c <_Thread_Dispatch+0x28> 10db42: 66 90 xchg %ax,%ax executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 10db44: c7 05 58 73 12 00 00 movl $0x0,0x127358 10db4b: 00 00 00 _ISR_Enable( level ); 10db4e: 50 push %eax 10db4f: 9d popf if ( _Thread_Do_post_task_switch_extension || 10db50: a1 fc 73 12 00 mov 0x1273fc,%eax 10db55: 85 c0 test %eax,%eax 10db57: 75 06 jne 10db5f <_Thread_Dispatch+0x14b><== NEVER TAKEN executing->do_post_task_switch_extension ) { 10db59: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10db5d: 74 09 je 10db68 <_Thread_Dispatch+0x154> executing->do_post_task_switch_extension = false; 10db5f: c6 43 74 00 movb $0x0,0x74(%ebx) _API_extensions_Run_postswitch(); 10db63: e8 ec e8 ff ff call 10c454 <_API_extensions_Run_postswitch> } } 10db68: 8d 65 f4 lea -0xc(%ebp),%esp 10db6b: 5b pop %ebx 10db6c: 5e pop %esi 10db6d: 5f pop %edi 10db6e: c9 leave 10db6f: c3 ret =============================================================================== 00113c0c <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 113c0c: 55 push %ebp 113c0d: 89 e5 mov %esp,%ebp Thread_Control *executing; executing = _Thread_Executing; 113c0f: a1 18 74 12 00 mov 0x127418,%eax if ( !_States_Is_ready( executing->current_state ) || 113c14: 8b 50 10 mov 0x10(%eax),%edx 113c17: 85 d2 test %edx,%edx 113c19: 75 0e jne 113c29 <_Thread_Evaluate_mode+0x1d><== NEVER TAKEN 113c1b: 3b 05 e8 73 12 00 cmp 0x1273e8,%eax 113c21: 74 11 je 113c34 <_Thread_Evaluate_mode+0x28> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 113c23: 80 78 75 00 cmpb $0x0,0x75(%eax) 113c27: 74 0b je 113c34 <_Thread_Evaluate_mode+0x28><== NEVER TAKEN _Context_Switch_necessary = true; 113c29: c6 05 28 74 12 00 01 movb $0x1,0x127428 113c30: b0 01 mov $0x1,%al return true; } return false; } 113c32: c9 leave 113c33: 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; 113c34: 31 c0 xor %eax,%eax } return false; } 113c36: c9 leave 113c37: c3 ret =============================================================================== 0010db94 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10db94: 55 push %ebp 10db95: 89 e5 mov %esp,%ebp 10db97: 53 push %ebx 10db98: 83 ec 04 sub $0x4,%esp 10db9b: 8b 45 08 mov 0x8(%ebp),%eax 10db9e: 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 ) ) { 10dba1: 85 c0 test %eax,%eax 10dba3: 74 4b je 10dbf0 <_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); 10dba5: 89 c2 mov %eax,%edx 10dba7: c1 ea 18 shr $0x18,%edx 10dbaa: 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 ) 10dbad: 8d 5a ff lea -0x1(%edx),%ebx 10dbb0: 83 fb 03 cmp $0x3,%ebx 10dbb3: 77 2b ja 10dbe0 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 10dbb5: 89 c3 mov %eax,%ebx 10dbb7: c1 eb 1b shr $0x1b,%ebx 10dbba: 4b dec %ebx 10dbbb: 75 23 jne 10dbe0 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 10dbbd: 8b 14 95 2c 73 12 00 mov 0x12732c(,%edx,4),%edx if ( !api_information ) { 10dbc4: 85 d2 test %edx,%edx 10dbc6: 74 18 je 10dbe0 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 10dbc8: 8b 52 04 mov 0x4(%edx),%edx if ( !information ) { 10dbcb: 85 d2 test %edx,%edx 10dbcd: 74 11 je 10dbe0 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10dbcf: 53 push %ebx 10dbd0: 51 push %ecx 10dbd1: 50 push %eax 10dbd2: 52 push %edx 10dbd3: e8 50 f7 ff ff call 10d328 <_Objects_Get> 10dbd8: 83 c4 10 add $0x10,%esp done: return tp; } 10dbdb: 8b 5d fc mov -0x4(%ebp),%ebx 10dbde: c9 leave 10dbdf: c3 ret goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 10dbe0: c7 01 01 00 00 00 movl $0x1,(%ecx) 10dbe6: 31 c0 xor %eax,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10dbe8: 8b 5d fc mov -0x4(%ebp),%ebx 10dbeb: c9 leave 10dbec: c3 ret 10dbed: 8d 76 00 lea 0x0(%esi),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10dbf0: a1 58 73 12 00 mov 0x127358,%eax 10dbf5: 40 inc %eax 10dbf6: 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; 10dbfb: c7 01 00 00 00 00 movl $0x0,(%ecx) tp = _Thread_Executing; 10dc01: a1 18 74 12 00 mov 0x127418,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10dc06: 8b 5d fc mov -0x4(%ebp),%ebx 10dc09: c9 leave 10dc0a: c3 ret =============================================================================== 00113c38 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 113c38: 55 push %ebp 113c39: 89 e5 mov %esp,%ebp 113c3b: 53 push %ebx 113c3c: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 113c3f: 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; 113c45: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 113c4b: 85 c0 test %eax,%eax 113c4d: 74 79 je 113cc8 <_Thread_Handler+0x90> 113c4f: fa cli #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 113c50: a0 b4 6f 12 00 mov 0x126fb4,%al 113c55: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 113c58: 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) && 113c5f: 8b 93 e8 00 00 00 mov 0xe8(%ebx),%edx 113c65: 85 d2 test %edx,%edx 113c67: 74 24 je 113c8d <_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 ); 113c69: a1 e0 73 12 00 mov 0x1273e0,%eax 113c6e: 39 c3 cmp %eax,%ebx 113c70: 74 1b je 113c8d <_Thread_Handler+0x55> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 113c72: 85 c0 test %eax,%eax 113c74: 74 11 je 113c87 <_Thread_Handler+0x4f> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 113c76: 83 ec 0c sub $0xc,%esp 113c79: 05 e8 00 00 00 add $0xe8,%eax 113c7e: 50 push %eax 113c7f: e8 e0 b0 ff ff call 10ed64 <_CPU_Context_save_fp> 113c84: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 113c87: 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 ); 113c8d: 83 ec 0c sub $0xc,%esp 113c90: 53 push %ebx 113c91: e8 0a ac ff ff call 10e8a0 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 113c96: e8 d5 9e ff ff call 10db70 <_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) */ { 113c9b: 83 c4 10 add $0x10,%esp 113c9e: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 113ca2: 74 28 je 113ccc <_Thread_Handler+0x94> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 113ca4: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 113caa: 85 c0 test %eax,%eax 113cac: 74 2d je 113cdb <_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 ); 113cae: 83 ec 0c sub $0xc,%esp 113cb1: 53 push %ebx 113cb2: e8 25 ac ff ff call 10e8dc <_User_extensions_Thread_exitted> _Internal_error_Occurred( 113cb7: 83 c4 0c add $0xc,%esp 113cba: 6a 06 push $0x6 113cbc: 6a 01 push $0x1 113cbe: 6a 00 push $0x0 113cc0: e8 1b 91 ff ff call 10cde0 <_Internal_error_Occurred> 113cc5: 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); 113cc8: fb sti 113cc9: eb 85 jmp 113c50 <_Thread_Handler+0x18> 113ccb: 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 (); 113ccc: e8 bf bf 00 00 call 11fc90 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 113cd1: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 113cd7: 85 c0 test %eax,%eax 113cd9: 75 d3 jne 113cae <_Thread_Handler+0x76> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 113cdb: 83 ec 0c sub $0xc,%esp 113cde: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 113ce4: ff 93 9c 00 00 00 call *0x9c(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 113cea: 89 43 28 mov %eax,0x28(%ebx) 113ced: 83 c4 10 add $0x10,%esp 113cf0: eb bc jmp 113cae <_Thread_Handler+0x76> =============================================================================== 0010de74 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 10de74: 55 push %ebp 10de75: 89 e5 mov %esp,%ebp 10de77: 53 push %ebx 10de78: 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; 10de7b: a1 30 32 12 00 mov 0x123230,%eax maximum_extensions = Configuration.maximum_extensions; 10de80: 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) 10de86: 8b 1d 44 32 12 00 mov 0x123244,%ebx 10de8c: 85 db test %ebx,%ebx 10de8e: 0f 94 c3 sete %bl 10de91: 8b 0d 40 32 12 00 mov 0x123240,%ecx 10de97: 85 c9 test %ecx,%ecx 10de99: 0f 94 c1 sete %cl 10de9c: 38 cb cmp %cl,%bl 10de9e: 0f 85 9d 00 00 00 jne 10df41 <_Thread_Handler_initialization+0xcd><== NEVER TAKEN INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 10dea4: c6 05 28 74 12 00 00 movb $0x0,0x127428 _Thread_Executing = NULL; 10deab: c7 05 18 74 12 00 00 movl $0x0,0x127418 10deb2: 00 00 00 _Thread_Heir = NULL; 10deb5: c7 05 e8 73 12 00 00 movl $0x0,0x1273e8 10debc: 00 00 00 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 10debf: c7 05 e0 73 12 00 00 movl $0x0,0x1273e0 10dec6: 00 00 00 #endif _Thread_Do_post_task_switch_extension = 0; 10dec9: c7 05 fc 73 12 00 00 movl $0x0,0x1273fc 10ded0: 00 00 00 _Thread_Maximum_extensions = maximum_extensions; 10ded3: 89 15 f8 73 12 00 mov %edx,0x1273f8 _Thread_Ticks_per_timeslice = ticks_per_timeslice; 10ded9: a3 24 73 12 00 mov %eax,0x127324 _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 10dede: 83 ec 0c sub $0xc,%esp 10dee1: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax 10dee8: 8d 44 40 03 lea 0x3(%eax,%eax,2),%eax 10deec: c1 e0 02 shl $0x2,%eax 10deef: 50 push %eax 10def0: e8 8b 0d 00 00 call 10ec80 <_Workspace_Allocate_or_fatal_error> 10def5: a3 20 73 12 00 mov %eax,0x127320 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 10defa: 0f b6 1d 14 32 12 00 movzbl 0x123214,%ebx 10df01: 31 d2 xor %edx,%edx 10df03: 83 c4 10 add $0x10,%esp 10df06: 66 90 xchg %ax,%ax */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10df08: 8d 48 04 lea 0x4(%eax),%ecx 10df0b: 89 08 mov %ecx,(%eax) the_chain->permanent_null = NULL; 10df0d: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10df14: 89 40 08 mov %eax,0x8(%eax) 10df17: 42 inc %edx 10df18: 83 c0 0c add $0xc,%eax 10df1b: 39 da cmp %ebx,%edx 10df1d: 76 e9 jbe 10df08 <_Thread_Handler_initialization+0x94> /* * Initialize this class of objects. */ _Objects_Initialize_information( 10df1f: 50 push %eax 10df20: 6a 08 push $0x8 10df22: 6a 00 push $0x0 10df24: 68 04 01 00 00 push $0x104 10df29: 6a 01 push $0x1 10df2b: 6a 01 push $0x1 10df2d: 6a 01 push $0x1 10df2f: 68 e0 74 12 00 push $0x1274e0 10df34: e8 57 f4 ff ff call 10d390 <_Objects_Initialize_information> 10df39: 83 c4 20 add $0x20,%esp false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 10df3c: 8b 5d fc mov -0x4(%ebp),%ebx 10df3f: c9 leave 10df40: 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( 10df41: 52 push %edx 10df42: 6a 0f push $0xf 10df44: 6a 01 push $0x1 10df46: 6a 00 push $0x0 10df48: e8 93 ee ff ff call 10cde0 <_Internal_error_Occurred> =============================================================================== 0010dc0c <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10dc0c: 55 push %ebp 10dc0d: 89 e5 mov %esp,%ebp 10dc0f: 57 push %edi 10dc10: 56 push %esi 10dc11: 53 push %ebx 10dc12: 83 ec 24 sub $0x24,%esp 10dc15: 8b 5d 0c mov 0xc(%ebp),%ebx 10dc18: 8b 75 14 mov 0x14(%ebp),%esi 10dc1b: 0f b6 7d 18 movzbl 0x18(%ebp),%edi 10dc1f: 8a 45 20 mov 0x20(%ebp),%al 10dc22: 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; 10dc25: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10dc2c: 00 00 00 10dc2f: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10dc36: 00 00 00 10dc39: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10dc40: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10dc43: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10dc4a: 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 ); 10dc4d: 56 push %esi 10dc4e: 53 push %ebx 10dc4f: e8 1c 09 00 00 call 10e570 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10dc54: 83 c4 10 add $0x10,%esp 10dc57: 85 c0 test %eax,%eax 10dc59: 0f 84 8d 01 00 00 je 10ddec <_Thread_Initialize+0x1e0> 10dc5f: 39 c6 cmp %eax,%esi 10dc61: 0f 87 85 01 00 00 ja 10ddec <_Thread_Initialize+0x1e0><== NEVER TAKEN Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10dc67: 8b 93 cc 00 00 00 mov 0xcc(%ebx),%edx 10dc6d: 89 93 c4 00 00 00 mov %edx,0xc4(%ebx) the_stack->size = size; 10dc73: 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 ) { 10dc79: 89 f8 mov %edi,%eax 10dc7b: 84 c0 test %al,%al 10dc7d: 0f 85 81 01 00 00 jne 10de04 <_Thread_Initialize+0x1f8> 10dc83: 31 c0 xor %eax,%eax 10dc85: 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; 10dc8c: 89 83 e8 00 00 00 mov %eax,0xe8(%ebx) the_thread->Start.fp_context = fp_area; 10dc92: 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; 10dc98: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10dc9f: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10dca6: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10dcad: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10dcb4: a1 f8 73 12 00 mov 0x1273f8,%eax 10dcb9: 85 c0 test %eax,%eax 10dcbb: 0f 85 5f 01 00 00 jne 10de20 <_Thread_Initialize+0x214> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10dcc1: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10dcc8: 00 00 00 10dccb: 31 ff xor %edi,%edi /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10dccd: 8a 45 e7 mov -0x19(%ebp),%al 10dcd0: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10dcd6: 8b 45 24 mov 0x24(%ebp),%eax 10dcd9: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10dcdf: 8b 45 28 mov 0x28(%ebp),%eax 10dce2: 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; 10dce8: 8b 45 2c mov 0x2c(%ebp),%eax 10dceb: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10dcf1: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10dcf8: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10dcff: 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; 10dd06: 8b 45 1c mov 0x1c(%ebp),%eax 10dd09: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10dd0c: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10dd12: 83 ec 08 sub $0x8,%esp 10dd15: 50 push %eax 10dd16: 53 push %ebx 10dd17: e8 98 06 00 00 call 10e3b4 <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10dd1c: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10dd23: 00 00 00 10dd26: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10dd2d: 00 00 00 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10dd30: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10dd34: 8b 45 08 mov 0x8(%ebp),%eax 10dd37: 8b 40 1c mov 0x1c(%eax),%eax 10dd3a: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10dd3d: 8b 45 30 mov 0x30(%ebp),%eax 10dd40: 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 ); 10dd43: 89 1c 24 mov %ebx,(%esp) 10dd46: e8 1d 0c 00 00 call 10e968 <_User_extensions_Thread_create> if ( extension_status ) 10dd4b: 83 c4 10 add $0x10,%esp 10dd4e: 84 c0 test %al,%al 10dd50: 0f 85 a2 00 00 00 jne 10ddf8 <_Thread_Initialize+0x1ec> return true; failed: if ( the_thread->libc_reent ) 10dd56: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 10dd5c: 85 c0 test %eax,%eax 10dd5e: 74 0c je 10dd6c <_Thread_Initialize+0x160> _Workspace_Free( the_thread->libc_reent ); 10dd60: 83 ec 0c sub $0xc,%esp 10dd63: 50 push %eax 10dd64: e8 5f 0f 00 00 call 10ecc8 <_Workspace_Free> 10dd69: 83 c4 10 add $0x10,%esp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10dd6c: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10dd72: 85 c0 test %eax,%eax 10dd74: 74 0c je 10dd82 <_Thread_Initialize+0x176> _Workspace_Free( the_thread->API_Extensions[i] ); 10dd76: 83 ec 0c sub $0xc,%esp 10dd79: 50 push %eax 10dd7a: e8 49 0f 00 00 call 10ecc8 <_Workspace_Free> 10dd7f: 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] ) 10dd82: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax 10dd88: 85 c0 test %eax,%eax 10dd8a: 74 0c je 10dd98 <_Thread_Initialize+0x18c><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10dd8c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dd8f: 50 push %eax <== NOT EXECUTED 10dd90: e8 33 0f 00 00 call 10ecc8 <_Workspace_Free> <== NOT EXECUTED 10dd95: 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] ) 10dd98: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax 10dd9e: 85 c0 test %eax,%eax 10dda0: 74 0c je 10ddae <_Thread_Initialize+0x1a2><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10dda2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dda5: 50 push %eax <== NOT EXECUTED 10dda6: e8 1d 0f 00 00 call 10ecc8 <_Workspace_Free> <== NOT EXECUTED 10ddab: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( extensions_area ) 10ddae: 85 ff test %edi,%edi 10ddb0: 74 0c je 10ddbe <_Thread_Initialize+0x1b2> (void) _Workspace_Free( extensions_area ); 10ddb2: 83 ec 0c sub $0xc,%esp 10ddb5: 57 push %edi 10ddb6: e8 0d 0f 00 00 call 10ecc8 <_Workspace_Free> 10ddbb: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10ddbe: 8b 45 e0 mov -0x20(%ebp),%eax 10ddc1: 85 c0 test %eax,%eax 10ddc3: 74 0e je 10ddd3 <_Thread_Initialize+0x1c7> (void) _Workspace_Free( fp_area ); 10ddc5: 83 ec 0c sub $0xc,%esp 10ddc8: ff 75 e0 pushl -0x20(%ebp) 10ddcb: e8 f8 0e 00 00 call 10ecc8 <_Workspace_Free> 10ddd0: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10ddd3: 83 ec 0c sub $0xc,%esp 10ddd6: 53 push %ebx 10ddd7: e8 f8 07 00 00 call 10e5d4 <_Thread_Stack_Free> 10dddc: 31 c0 xor %eax,%eax return false; 10ddde: 83 c4 10 add $0x10,%esp } 10dde1: 8d 65 f4 lea -0xc(%ebp),%esp 10dde4: 5b pop %ebx 10dde5: 5e pop %esi 10dde6: 5f pop %edi 10dde7: c9 leave 10dde8: c3 ret 10dde9: 8d 76 00 lea 0x0(%esi),%esi if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return false; 10ddec: 31 c0 xor %eax,%eax } 10ddee: 8d 65 f4 lea -0xc(%ebp),%esp 10ddf1: 5b pop %ebx 10ddf2: 5e pop %esi 10ddf3: 5f pop %edi 10ddf4: c9 leave 10ddf5: c3 ret 10ddf6: 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 ) 10ddf8: b0 01 mov $0x1,%al _Thread_Stack_Free( the_thread ); return false; } 10ddfa: 8d 65 f4 lea -0xc(%ebp),%esp 10ddfd: 5b pop %ebx 10ddfe: 5e pop %esi 10ddff: 5f pop %edi 10de00: c9 leave 10de01: c3 ret 10de02: 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 ); 10de04: 83 ec 0c sub $0xc,%esp 10de07: 6a 6c push $0x6c 10de09: e8 9e 0e 00 00 call 10ecac <_Workspace_Allocate> 10de0e: 89 45 e0 mov %eax,-0x20(%ebp) if ( !fp_area ) 10de11: 83 c4 10 add $0x10,%esp 10de14: 85 c0 test %eax,%eax 10de16: 74 55 je 10de6d <_Thread_Initialize+0x261> 10de18: 8b 45 e0 mov -0x20(%ebp),%eax 10de1b: e9 6c fe ff ff jmp 10dc8c <_Thread_Initialize+0x80> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 10de20: 83 ec 0c sub $0xc,%esp 10de23: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10de2a: 50 push %eax 10de2b: e8 7c 0e 00 00 call 10ecac <_Workspace_Allocate> 10de30: 89 c7 mov %eax,%edi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10de32: 83 c4 10 add $0x10,%esp 10de35: 85 c0 test %eax,%eax 10de37: 0f 84 19 ff ff ff je 10dd56 <_Thread_Initialize+0x14a> goto failed; } the_thread->extensions = (void **) extensions_area; 10de3d: 89 c1 mov %eax,%ecx 10de3f: 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++ ) 10de45: 8b 35 f8 73 12 00 mov 0x1273f8,%esi 10de4b: 31 d2 xor %edx,%edx 10de4d: 31 c0 xor %eax,%eax 10de4f: eb 09 jmp 10de5a <_Thread_Initialize+0x24e> 10de51: 8d 76 00 lea 0x0(%esi),%esi 10de54: 8b 8b fc 00 00 00 mov 0xfc(%ebx),%ecx the_thread->extensions[i] = NULL; 10de5a: 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++ ) 10de61: 40 inc %eax 10de62: 89 c2 mov %eax,%edx 10de64: 39 c6 cmp %eax,%esi 10de66: 73 ec jae 10de54 <_Thread_Initialize+0x248> 10de68: e9 60 fe ff ff jmp 10dccd <_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 ) 10de6d: 31 ff xor %edi,%edi 10de6f: e9 e2 fe ff ff jmp 10dd56 <_Thread_Initialize+0x14a> =============================================================================== 00112bdc <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 112bdc: 55 push %ebp 112bdd: 89 e5 mov %esp,%ebp 112bdf: 53 push %ebx 112be0: 83 ec 10 sub $0x10,%esp 112be3: 8b 5d 08 mov 0x8(%ebp),%ebx the_thread->resource_count = 0; 112be6: 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; 112bed: 8a 83 ac 00 00 00 mov 0xac(%ebx),%al 112bf3: 88 43 75 mov %al,0x75(%ebx) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 112bf6: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 112bfc: 89 43 7c mov %eax,0x7c(%ebx) the_thread->budget_callout = the_thread->Start.budget_callout; 112bff: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax 112c05: 89 83 80 00 00 00 mov %eax,0x80(%ebx) the_thread->Start.pointer_argument = pointer_argument; 112c0b: 8b 45 0c mov 0xc(%ebp),%eax 112c0e: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 112c14: 8b 45 10 mov 0x10(%ebp),%eax 112c17: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 112c1d: 53 push %ebx 112c1e: e8 79 c1 ff ff call 10ed9c <_Thread_queue_Extract_with_proxy> 112c23: 83 c4 10 add $0x10,%esp 112c26: 84 c0 test %al,%al 112c28: 75 06 jne 112c30 <_Thread_Reset+0x54> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 112c2a: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 112c2e: 74 28 je 112c58 <_Thread_Reset+0x7c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 112c30: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax 112c36: 39 43 14 cmp %eax,0x14(%ebx) 112c39: 74 15 je 112c50 <_Thread_Reset+0x74> the_thread->real_priority = the_thread->Start.initial_priority; 112c3b: 89 43 18 mov %eax,0x18(%ebx) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 112c3e: 89 45 0c mov %eax,0xc(%ebp) 112c41: 89 5d 08 mov %ebx,0x8(%ebp) } } 112c44: 8b 5d fc mov -0x4(%ebp),%ebx 112c47: 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 ); 112c48: e9 1b c3 ff ff jmp 10ef68 <_Thread_Set_priority> 112c4d: 8d 76 00 lea 0x0(%esi),%esi } } 112c50: 8b 5d fc mov -0x4(%ebp),%ebx 112c53: c9 leave 112c54: c3 ret 112c55: 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 ); 112c58: 83 ec 0c sub $0xc,%esp 112c5b: 8d 43 48 lea 0x48(%ebx),%eax 112c5e: 50 push %eax 112c5f: e8 38 cb ff ff call 10f79c <_Watchdog_Remove> 112c64: 83 c4 10 add $0x10,%esp 112c67: eb c7 jmp 112c30 <_Thread_Reset+0x54> =============================================================================== 00111f54 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 111f54: 55 push %ebp 111f55: 89 e5 mov %esp,%ebp 111f57: 56 push %esi 111f58: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 111f59: a1 18 74 12 00 mov 0x127418,%eax ready = executing->ready; 111f5e: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 111f64: 9c pushf 111f65: fa cli 111f66: 59 pop %ecx if ( _Chain_Has_only_one_node( ready ) ) { 111f67: 8b 1a mov (%edx),%ebx 111f69: 3b 5a 08 cmp 0x8(%edx),%ebx 111f6c: 74 3e je 111fac <_Thread_Reset_timeslice+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 111f6e: 8b 30 mov (%eax),%esi previous = the_node->previous; 111f70: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 111f73: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 111f76: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 111f78: 8d 5a 04 lea 0x4(%edx),%ebx 111f7b: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 111f7d: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 111f80: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 111f83: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 111f85: 89 58 04 mov %ebx,0x4(%eax) return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 111f88: 51 push %ecx 111f89: 9d popf 111f8a: fa cli if ( _Thread_Is_heir( executing ) ) 111f8b: 3b 05 e8 73 12 00 cmp 0x1273e8,%eax 111f91: 74 0d je 111fa0 <_Thread_Reset_timeslice+0x4c><== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 111f93: c6 05 28 74 12 00 01 movb $0x1,0x127428 _ISR_Enable( level ); 111f9a: 51 push %ecx 111f9b: 9d popf } 111f9c: 5b pop %ebx 111f9d: 5e pop %esi 111f9e: c9 leave 111f9f: c3 ret _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 111fa0: 8b 02 mov (%edx),%eax 111fa2: a3 e8 73 12 00 mov %eax,0x1273e8 111fa7: eb ea jmp 111f93 <_Thread_Reset_timeslice+0x3f> 111fa9: 8d 76 00 lea 0x0(%esi),%esi executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 111fac: 51 push %ecx 111fad: 9d popf _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; _ISR_Enable( level ); } 111fae: 5b pop %ebx 111faf: 5e pop %esi 111fb0: c9 leave 111fb1: c3 ret =============================================================================== 00111738 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 111738: 55 push %ebp 111739: 89 e5 mov %esp,%ebp 11173b: 53 push %ebx 11173c: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 11173f: 9c pushf 111740: fa cli 111741: 59 pop %ecx _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 111742: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 111745: f6 c2 02 test $0x2,%dl 111748: 74 6e je 1117b8 <_Thread_Resume+0x80> <== NEVER TAKEN 11174a: 83 e2 fd and $0xfffffffd,%edx current_state = 11174d: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 111750: 85 d2 test %edx,%edx 111752: 75 64 jne 1117b8 <_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; 111754: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 11175a: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 111761: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 111764: 66 8b 15 4c b9 12 00 mov 0x12b94c,%dx 11176b: 0b 90 94 00 00 00 or 0x94(%eax),%edx 111771: 66 89 15 4c b9 12 00 mov %dx,0x12b94c _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 111778: 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); 11177e: 8d 5a 04 lea 0x4(%edx),%ebx 111781: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 111783: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 111786: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 111789: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 11178b: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 11178e: 51 push %ecx 11178f: 9d popf 111790: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 111791: 8b 50 14 mov 0x14(%eax),%edx 111794: 8b 1d 28 b9 12 00 mov 0x12b928,%ebx 11179a: 3b 53 14 cmp 0x14(%ebx),%edx 11179d: 73 19 jae 1117b8 <_Thread_Resume+0x80> _Thread_Heir = the_thread; 11179f: a3 28 b9 12 00 mov %eax,0x12b928 if ( _Thread_Executing->is_preemptible || 1117a4: a1 58 b9 12 00 mov 0x12b958,%eax 1117a9: 80 78 75 00 cmpb $0x0,0x75(%eax) 1117ad: 74 11 je 1117c0 <_Thread_Resume+0x88> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 1117af: c6 05 68 b9 12 00 01 movb $0x1,0x12b968 1117b6: 66 90 xchg %ax,%ax } } } _ISR_Enable( level ); 1117b8: 51 push %ecx 1117b9: 9d popf } 1117ba: 5b pop %ebx 1117bb: c9 leave 1117bc: c3 ret 1117bd: 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 || 1117c0: 85 d2 test %edx,%edx 1117c2: 74 eb je 1117af <_Thread_Resume+0x77> <== NEVER TAKEN 1117c4: eb f2 jmp 1117b8 <_Thread_Resume+0x80> =============================================================================== 0010e420 <_Thread_Set_state>: void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 10e420: 55 push %ebp 10e421: 89 e5 mov %esp,%ebp 10e423: 56 push %esi 10e424: 53 push %ebx 10e425: 8b 45 08 mov 0x8(%ebp),%eax 10e428: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10e42b: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10e431: 9c pushf 10e432: fa cli 10e433: 59 pop %ecx if ( !_States_Is_ready( the_thread->current_state ) ) { 10e434: 8b 58 10 mov 0x10(%eax),%ebx 10e437: 85 db test %ebx,%ebx 10e439: 75 2d jne 10e468 <_Thread_Set_state+0x48> _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; 10e43b: 89 70 10 mov %esi,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 10e43e: 8b 1a mov (%edx),%ebx 10e440: 3b 5a 08 cmp 0x8(%edx),%ebx 10e443: 74 3b je 10e480 <_Thread_Set_state+0x60> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10e445: 8b 18 mov (%eax),%ebx previous = the_node->previous; 10e447: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10e44a: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 10e44d: 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 ); 10e44f: 51 push %ecx 10e450: 9d popf 10e451: fa cli if ( _Thread_Is_heir( the_thread ) ) 10e452: 3b 05 e8 73 12 00 cmp 0x1273e8,%eax 10e458: 74 62 je 10e4bc <_Thread_Set_state+0x9c> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10e45a: 3b 05 18 74 12 00 cmp 0x127418,%eax 10e460: 74 12 je 10e474 <_Thread_Set_state+0x54> _Context_Switch_necessary = true; _ISR_Enable( level ); 10e462: 51 push %ecx 10e463: 9d popf } 10e464: 5b pop %ebx 10e465: 5e pop %esi 10e466: c9 leave 10e467: c3 ret Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = 10e468: 09 f3 or %esi,%ebx 10e46a: 89 58 10 mov %ebx,0x10(%eax) _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 10e46d: 51 push %ecx 10e46e: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10e46f: 5b pop %ebx 10e470: 5e pop %esi 10e471: c9 leave 10e472: c3 ret 10e473: 90 nop if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 10e474: c6 05 28 74 12 00 01 movb $0x1,0x127428 10e47b: eb e5 jmp 10e462 <_Thread_Set_state+0x42> 10e47d: 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); 10e480: 8d 5a 04 lea 0x4(%edx),%ebx 10e483: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 10e485: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10e48c: 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; 10e48f: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10e495: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 10e49c: 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 ); 10e49f: 66 83 3a 00 cmpw $0x0,(%edx) 10e4a3: 75 aa jne 10e44f <_Thread_Set_state+0x2f> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10e4a5: 66 8b 15 0c 74 12 00 mov 0x12740c,%dx 10e4ac: 23 90 98 00 00 00 and 0x98(%eax),%edx 10e4b2: 66 89 15 0c 74 12 00 mov %dx,0x12740c 10e4b9: eb 94 jmp 10e44f <_Thread_Set_state+0x2f> 10e4bb: 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 ); 10e4bc: 66 8b 35 0c 74 12 00 mov 0x12740c,%si 10e4c3: 31 d2 xor %edx,%edx 10e4c5: 89 d3 mov %edx,%ebx 10e4c7: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10e4cb: 0f b7 db movzwl %bx,%ebx 10e4ce: 66 8b b4 1b a0 74 12 mov 0x1274a0(%ebx,%ebx,1),%si 10e4d5: 00 10e4d6: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10e4da: c1 e3 04 shl $0x4,%ebx 10e4dd: 0f b7 d2 movzwl %dx,%edx 10e4e0: 8d 14 13 lea (%ebx,%edx,1),%edx 10e4e3: 8d 1c 52 lea (%edx,%edx,2),%ebx 10e4e6: 8b 15 20 73 12 00 mov 0x127320,%edx 10e4ec: 8b 14 9a mov (%edx,%ebx,4),%edx 10e4ef: 89 15 e8 73 12 00 mov %edx,0x1273e8 10e4f5: e9 60 ff ff ff jmp 10e45a <_Thread_Set_state+0x3a> =============================================================================== 0010e570 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10e570: 55 push %ebp 10e571: 89 e5 mov %esp,%ebp 10e573: 53 push %ebx 10e574: 83 ec 04 sub $0x4,%esp 10e577: a1 10 32 12 00 mov 0x123210,%eax 10e57c: 8b 5d 0c mov 0xc(%ebp),%ebx 10e57f: 39 c3 cmp %eax,%ebx 10e581: 73 02 jae 10e585 <_Thread_Stack_Allocate+0x15> 10e583: 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 ) { 10e585: a1 40 32 12 00 mov 0x123240,%eax 10e58a: 85 c0 test %eax,%eax 10e58c: 74 32 je 10e5c0 <_Thread_Stack_Allocate+0x50> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 10e58e: 83 ec 0c sub $0xc,%esp 10e591: 53 push %ebx 10e592: ff d0 call *%eax 10e594: 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 ) 10e597: 85 c0 test %eax,%eax 10e599: 74 11 je 10e5ac <_Thread_Stack_Allocate+0x3c> the_stack_size = 0; the_thread->Start.stack = stack_addr; 10e59b: 8b 55 08 mov 0x8(%ebp),%edx 10e59e: 89 82 cc 00 00 00 mov %eax,0xcc(%edx) return the_stack_size; } 10e5a4: 89 d8 mov %ebx,%eax 10e5a6: 8b 5d fc mov -0x4(%ebp),%ebx 10e5a9: c9 leave 10e5aa: c3 ret 10e5ab: 90 nop the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 10e5ac: 31 db xor %ebx,%ebx the_stack_size = 0; the_thread->Start.stack = stack_addr; 10e5ae: 8b 55 08 mov 0x8(%ebp),%edx 10e5b1: 89 82 cc 00 00 00 mov %eax,0xcc(%edx) return the_stack_size; } 10e5b7: 89 d8 mov %ebx,%eax 10e5b9: 8b 5d fc mov -0x4(%ebp),%ebx 10e5bc: c9 leave 10e5bd: c3 ret 10e5be: 66 90 xchg %ax,%ax RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 10e5c0: 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 ); 10e5c3: 83 ec 0c sub $0xc,%esp 10e5c6: 53 push %ebx 10e5c7: e8 e0 06 00 00 call 10ecac <_Workspace_Allocate> 10e5cc: 83 c4 10 add $0x10,%esp 10e5cf: eb c6 jmp 10e597 <_Thread_Stack_Allocate+0x27> =============================================================================== 0010e5d4 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10e5d4: 55 push %ebp 10e5d5: 89 e5 mov %esp,%ebp 10e5d7: 83 ec 08 sub $0x8,%esp 10e5da: 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 ) 10e5dd: a1 44 32 12 00 mov 0x123244,%eax 10e5e2: 85 c0 test %eax,%eax 10e5e4: 74 0e je 10e5f4 <_Thread_Stack_Free+0x20> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10e5e6: 8b 92 c4 00 00 00 mov 0xc4(%edx),%edx 10e5ec: 89 55 08 mov %edx,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10e5ef: 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 ); 10e5f0: ff e0 jmp *%eax 10e5f2: 66 90 xchg %ax,%ax else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10e5f4: 8b 82 c4 00 00 00 mov 0xc4(%edx),%eax 10e5fa: 89 45 08 mov %eax,0x8(%ebp) } 10e5fd: 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 ); 10e5fe: e9 c5 06 00 00 jmp 10ecc8 <_Workspace_Free> =============================================================================== 00111fb4 <_Thread_Suspend>: */ void _Thread_Suspend( Thread_Control *the_thread ) { 111fb4: 55 push %ebp 111fb5: 89 e5 mov %esp,%ebp 111fb7: 56 push %esi 111fb8: 53 push %ebx 111fb9: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 111fbc: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 111fc2: 9c pushf 111fc3: fa cli 111fc4: 59 pop %ecx #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { 111fc5: 8b 58 10 mov 0x10(%eax),%ebx 111fc8: 85 db test %ebx,%ebx 111fca: 75 34 jne 112000 <_Thread_Suspend+0x4c> _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 111fcc: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 111fd3: 8b 1a mov (%edx),%ebx 111fd5: 3b 5a 08 cmp 0x8(%edx),%ebx 111fd8: 74 3e je 112018 <_Thread_Suspend+0x64> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 111fda: 8b 18 mov (%eax),%ebx previous = the_node->previous; 111fdc: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 111fdf: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 111fe2: 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 ); 111fe4: 51 push %ecx 111fe5: 9d popf 111fe6: fa cli if ( _Thread_Is_heir( the_thread ) ) 111fe7: 3b 05 e8 73 12 00 cmp 0x1273e8,%eax 111fed: 74 65 je 112054 <_Thread_Suspend+0xa0> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 111fef: 3b 05 18 74 12 00 cmp 0x127418,%eax 111ff5: 74 15 je 11200c <_Thread_Suspend+0x58> _Context_Switch_necessary = true; _ISR_Enable( level ); 111ff7: 51 push %ecx 111ff8: 9d popf } 111ff9: 5b pop %ebx 111ffa: 5e pop %esi 111ffb: c9 leave 111ffc: c3 ret 111ffd: 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 = 112000: 83 cb 02 or $0x2,%ebx 112003: 89 58 10 mov %ebx,0x10(%eax) _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 112006: 51 push %ecx 112007: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 112008: 5b pop %ebx 112009: 5e pop %esi 11200a: c9 leave 11200b: c3 ret if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 11200c: c6 05 28 74 12 00 01 movb $0x1,0x127428 112013: eb e2 jmp 111ff7 <_Thread_Suspend+0x43> 112015: 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); 112018: 8d 5a 04 lea 0x4(%edx),%ebx 11201b: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 11201d: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 112024: 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; 112027: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 11202d: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 112034: 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 ); 112037: 66 83 3a 00 cmpw $0x0,(%edx) 11203b: 75 a7 jne 111fe4 <_Thread_Suspend+0x30> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 11203d: 66 8b 15 0c 74 12 00 mov 0x12740c,%dx 112044: 23 90 98 00 00 00 and 0x98(%eax),%edx 11204a: 66 89 15 0c 74 12 00 mov %dx,0x12740c 112051: eb 91 jmp 111fe4 <_Thread_Suspend+0x30> 112053: 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 ); 112054: 66 8b 35 0c 74 12 00 mov 0x12740c,%si 11205b: 31 d2 xor %edx,%edx 11205d: 89 d3 mov %edx,%ebx 11205f: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 112063: 0f b7 db movzwl %bx,%ebx 112066: 66 8b b4 1b a0 74 12 mov 0x1274a0(%ebx,%ebx,1),%si 11206d: 00 11206e: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 112072: c1 e3 04 shl $0x4,%ebx 112075: 0f b7 d2 movzwl %dx,%edx 112078: 8d 14 13 lea (%ebx,%edx,1),%edx 11207b: 8d 1c 52 lea (%edx,%edx,2),%ebx 11207e: 8b 15 20 73 12 00 mov 0x127320,%edx 112084: 8b 14 9a mov (%edx,%ebx,4),%edx 112087: 89 15 e8 73 12 00 mov %edx,0x1273e8 11208d: e9 5d ff ff ff jmp 111fef <_Thread_Suspend+0x3b> =============================================================================== 0010e700 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10e700: 55 push %ebp 10e701: 89 e5 mov %esp,%ebp 10e703: 56 push %esi 10e704: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10e705: a1 18 74 12 00 mov 0x127418,%eax ready = executing->ready; 10e70a: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10e710: 9c pushf 10e711: fa cli 10e712: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10e713: 8b 1a mov (%edx),%ebx 10e715: 3b 5a 08 cmp 0x8(%edx),%ebx 10e718: 74 3e je 10e758 <_Thread_Yield_processor+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10e71a: 8b 30 mov (%eax),%esi previous = the_node->previous; 10e71c: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10e71f: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10e722: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10e724: 8d 5a 04 lea 0x4(%edx),%ebx 10e727: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10e729: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10e72c: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10e72f: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10e731: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10e734: 51 push %ecx 10e735: 9d popf 10e736: fa cli if ( _Thread_Is_heir( executing ) ) 10e737: 3b 05 e8 73 12 00 cmp 0x1273e8,%eax 10e73d: 74 0d je 10e74c <_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; 10e73f: c6 05 28 74 12 00 01 movb $0x1,0x127428 _ISR_Enable( level ); 10e746: 51 push %ecx 10e747: 9d popf } 10e748: 5b pop %ebx 10e749: 5e pop %esi 10e74a: c9 leave 10e74b: c3 ret _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 10e74c: 8b 02 mov (%edx),%eax 10e74e: a3 e8 73 12 00 mov %eax,0x1273e8 10e753: eb ea jmp 10e73f <_Thread_Yield_processor+0x3f> 10e755: 8d 76 00 lea 0x0(%esi),%esi _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10e758: 3b 05 e8 73 12 00 cmp 0x1273e8,%eax 10e75e: 75 df jne 10e73f <_Thread_Yield_processor+0x3f><== NEVER TAKEN 10e760: eb e4 jmp 10e746 <_Thread_Yield_processor+0x46> =============================================================================== 0010df9c <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10df9c: 55 push %ebp 10df9d: 89 e5 mov %esp,%ebp 10df9f: 57 push %edi 10dfa0: 56 push %esi 10dfa1: 53 push %ebx 10dfa2: 83 ec 1c sub $0x1c,%esp 10dfa5: 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 ); 10dfa8: 9c pushf 10dfa9: fa cli 10dfaa: 58 pop %eax 10dfab: 89 f2 mov %esi,%edx 10dfad: 31 c9 xor %ecx,%ecx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10dfaf: 8d 5a 04 lea 0x4(%edx),%ebx 10dfb2: 39 1a cmp %ebx,(%edx) 10dfb4: 75 1a jne 10dfd0 <_Thread_queue_Dequeue_priority+0x34> for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10dfb6: 41 inc %ecx 10dfb7: 83 c2 0c add $0xc,%edx Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 10dfba: 83 f9 04 cmp $0x4,%ecx 10dfbd: 75 f0 jne 10dfaf <_Thread_queue_Dequeue_priority+0x13> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10dfbf: 50 push %eax 10dfc0: 9d popf 10dfc1: 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 ); } 10dfc3: 89 d8 mov %ebx,%eax 10dfc5: 8d 65 f4 lea -0xc(%ebp),%esp 10dfc8: 5b pop %ebx 10dfc9: 5e pop %esi 10dfca: 5f pop %edi 10dfcb: c9 leave 10dfcc: c3 ret 10dfcd: 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 *) 10dfd0: 8d 14 49 lea (%ecx,%ecx,2),%edx 10dfd3: 8b 1c 96 mov (%esi,%edx,4),%ebx */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10dfd6: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) new_first_node = the_thread->Wait.Block2n.first; 10dfdd: 8b 53 38 mov 0x38(%ebx),%edx new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 10dfe0: 8b 0b mov (%ebx),%ecx previous_node = the_thread->Object.Node.previous; 10dfe2: 8b 73 04 mov 0x4(%ebx),%esi 10dfe5: 8d 7b 3c lea 0x3c(%ebx),%edi 10dfe8: 39 fa cmp %edi,%edx 10dfea: 74 76 je 10e062 <_Thread_queue_Dequeue_priority+0xc6> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; 10dfec: 8b 7b 40 mov 0x40(%ebx),%edi 10dfef: 89 7d e4 mov %edi,-0x1c(%ebp) new_second_node = new_first_node->next; 10dff2: 8b 3a mov (%edx),%edi previous_node->next = new_first_node; 10dff4: 89 16 mov %edx,(%esi) next_node->previous = new_first_node; 10dff6: 89 51 04 mov %edx,0x4(%ecx) new_first_node->next = next_node; 10dff9: 89 0a mov %ecx,(%edx) new_first_node->previous = previous_node; 10dffb: 89 72 04 mov %esi,0x4(%edx) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10dffe: 8b 4b 38 mov 0x38(%ebx),%ecx 10e001: 3b 4b 40 cmp 0x40(%ebx),%ecx 10e004: 74 14 je 10e01a <_Thread_queue_Dequeue_priority+0x7e> /* > two threads on 2-n */ new_second_node->previous = 10e006: 8d 4a 38 lea 0x38(%edx),%ecx 10e009: 89 4f 04 mov %ecx,0x4(%edi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 10e00c: 89 7a 38 mov %edi,0x38(%edx) new_first_thread->Wait.Block2n.last = last_node; 10e00f: 8b 4d e4 mov -0x1c(%ebp),%ecx 10e012: 89 4a 40 mov %ecx,0x40(%edx) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 10e015: 83 c2 3c add $0x3c,%edx 10e018: 89 11 mov %edx,(%ecx) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10e01a: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10e01e: 74 18 je 10e038 <_Thread_queue_Dequeue_priority+0x9c> _ISR_Enable( level ); 10e020: 50 push %eax 10e021: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10e022: 83 ec 08 sub $0x8,%esp 10e025: 68 f8 ff 03 10 push $0x1003fff8 10e02a: 53 push %ebx 10e02b: e8 98 f7 ff ff call 10d7c8 <_Thread_Clear_state> 10e030: 83 c4 10 add $0x10,%esp 10e033: eb 8e jmp 10dfc3 <_Thread_queue_Dequeue_priority+0x27> 10e035: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10e038: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10e03f: 50 push %eax 10e040: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10e041: 83 ec 0c sub $0xc,%esp 10e044: 8d 43 48 lea 0x48(%ebx),%eax 10e047: 50 push %eax 10e048: e8 5b 0b 00 00 call 10eba8 <_Watchdog_Remove> 10e04d: 58 pop %eax 10e04e: 5a pop %edx 10e04f: 68 f8 ff 03 10 push $0x1003fff8 10e054: 53 push %ebx 10e055: e8 6e f7 ff ff call 10d7c8 <_Thread_Clear_state> 10e05a: 83 c4 10 add $0x10,%esp 10e05d: e9 61 ff ff ff jmp 10dfc3 <_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; 10e062: 89 0e mov %ecx,(%esi) next_node->previous = previous_node; 10e064: 89 71 04 mov %esi,0x4(%ecx) 10e067: eb b1 jmp 10e01a <_Thread_queue_Dequeue_priority+0x7e> =============================================================================== 00111d38 <_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 ) { 111d38: 55 push %ebp 111d39: 89 e5 mov %esp,%ebp 111d3b: 56 push %esi 111d3c: 53 push %ebx 111d3d: 8b 55 08 mov 0x8(%ebp),%edx 111d40: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 111d43: 9c pushf 111d44: fa cli 111d45: 59 pop %ecx sync_state = the_thread_queue->sync_state; 111d46: 8b 42 30 mov 0x30(%edx),%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 111d49: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 111d50: 83 f8 01 cmp $0x1,%eax 111d53: 74 0b je 111d60 <_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; 111d55: 8b 55 10 mov 0x10(%ebp),%edx 111d58: 89 0a mov %ecx,(%edx) return sync_state; } 111d5a: 5b pop %ebx 111d5b: 5e pop %esi 111d5c: c9 leave 111d5d: c3 ret 111d5e: 66 90 xchg %ax,%ax Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 111d60: 8d 72 04 lea 0x4(%edx),%esi 111d63: 89 33 mov %esi,(%ebx) old_last_node = the_chain->last; 111d65: 8b 72 08 mov 0x8(%edx),%esi the_chain->last = the_node; 111d68: 89 5a 08 mov %ebx,0x8(%edx) old_last_node->next = the_node; 111d6b: 89 1e mov %ebx,(%esi) the_node->previous = old_last_node; 111d6d: 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; 111d70: 89 53 44 mov %edx,0x44(%ebx) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 111d73: 51 push %ecx 111d74: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return sync_state; } 111d75: 5b pop %ebx 111d76: 5e pop %esi 111d77: c9 leave 111d78: c3 ret =============================================================================== 0010e104 <_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 ) { 10e104: 55 push %ebp 10e105: 89 e5 mov %esp,%ebp 10e107: 57 push %edi 10e108: 56 push %esi 10e109: 53 push %ebx 10e10a: 83 ec 08 sub $0x8,%esp 10e10d: 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); 10e110: 8d 47 3c lea 0x3c(%edi),%eax 10e113: 89 47 38 mov %eax,0x38(%edi) the_chain->permanent_null = NULL; 10e116: c7 47 3c 00 00 00 00 movl $0x0,0x3c(%edi) the_chain->last = _Chain_Head(the_chain); 10e11d: 8d 47 38 lea 0x38(%edi),%eax 10e120: 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; 10e123: 8b 57 14 mov 0x14(%edi),%edx header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10e126: 89 d0 mov %edx,%eax 10e128: c1 e8 06 shr $0x6,%eax 10e12b: 8d 04 40 lea (%eax,%eax,2),%eax 10e12e: 8b 4d 08 mov 0x8(%ebp),%ecx 10e131: 8d 34 81 lea (%ecx,%eax,4),%esi block_state = the_thread_queue->state; 10e134: 8b 59 38 mov 0x38(%ecx),%ebx if ( _Thread_queue_Is_reverse_search( priority ) ) 10e137: f6 c2 20 test $0x20,%dl 10e13a: 75 60 jne 10e19c <_Thread_queue_Enqueue_priority+0x98> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e13c: 8d 46 04 lea 0x4(%esi),%eax 10e13f: 89 75 f0 mov %esi,-0x10(%ebp) 10e142: 89 7d ec mov %edi,-0x14(%ebp) 10e145: 89 c7 mov %eax,%edi goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10e147: 9c pushf 10e148: fa cli 10e149: 5e pop %esi search_thread = (Thread_Control *) header->first; 10e14a: 8b 4d f0 mov -0x10(%ebp),%ecx 10e14d: 8b 01 mov (%ecx),%eax while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10e14f: 39 f8 cmp %edi,%eax 10e151: 75 17 jne 10e16a <_Thread_queue_Enqueue_priority+0x66> 10e153: e9 09 01 00 00 jmp 10e261 <_Thread_queue_Enqueue_priority+0x15d> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10e158: 56 push %esi 10e159: 9d popf 10e15a: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10e15b: 85 58 10 test %ebx,0x10(%eax) 10e15e: 0f 84 a8 00 00 00 je 10e20c <_Thread_queue_Enqueue_priority+0x108><== NEVER TAKEN _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10e164: 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 ) ) { 10e166: 39 f8 cmp %edi,%eax 10e168: 74 07 je 10e171 <_Thread_queue_Enqueue_priority+0x6d> search_priority = search_thread->current_priority; 10e16a: 8b 48 14 mov 0x14(%eax),%ecx if ( priority <= search_priority ) 10e16d: 39 ca cmp %ecx,%edx 10e16f: 77 e7 ja 10e158 <_Thread_queue_Enqueue_priority+0x54> 10e171: 89 4d f0 mov %ecx,-0x10(%ebp) 10e174: 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 ) ) { 10e177: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10e179: 8b 4d 08 mov 0x8(%ebp),%ecx 10e17c: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10e180: 0f 84 8e 00 00 00 je 10e214 <_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; 10e186: 8b 45 10 mov 0x10(%ebp),%eax 10e189: 89 18 mov %ebx,(%eax) return the_thread_queue->sync_state; 10e18b: 8b 55 08 mov 0x8(%ebp),%edx 10e18e: 8b 42 30 mov 0x30(%edx),%eax } 10e191: 83 c4 08 add $0x8,%esp 10e194: 5b pop %ebx 10e195: 5e pop %esi 10e196: 5f pop %edi 10e197: c9 leave 10e198: c3 ret 10e199: 8d 76 00 lea 0x0(%esi),%esi 10e19c: 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; 10e19f: 0f b6 0d 14 32 12 00 movzbl 0x123214,%ecx 10e1a6: 41 inc %ecx _ISR_Disable( level ); 10e1a7: 9c pushf 10e1a8: fa cli 10e1a9: 5f pop %edi search_thread = (Thread_Control *) header->last; 10e1aa: 8b 46 08 mov 0x8(%esi),%eax while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10e1ad: 39 f0 cmp %esi,%eax 10e1af: 75 12 jne 10e1c3 <_Thread_queue_Enqueue_priority+0xbf> 10e1b1: eb 17 jmp 10e1ca <_Thread_queue_Enqueue_priority+0xc6> 10e1b3: 90 nop break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10e1b4: 57 push %edi 10e1b5: 9d popf 10e1b6: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10e1b7: 85 58 10 test %ebx,0x10(%eax) 10e1ba: 74 4c je 10e208 <_Thread_queue_Enqueue_priority+0x104> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 10e1bc: 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 ) ) { 10e1bf: 39 f0 cmp %esi,%eax 10e1c1: 74 07 je 10e1ca <_Thread_queue_Enqueue_priority+0xc6> search_priority = search_thread->current_priority; 10e1c3: 8b 48 14 mov 0x14(%eax),%ecx if ( priority >= search_priority ) 10e1c6: 39 ca cmp %ecx,%edx 10e1c8: 72 ea jb 10e1b4 <_Thread_queue_Enqueue_priority+0xb0> 10e1ca: 89 fe mov %edi,%esi 10e1cc: 89 4d ec mov %ecx,-0x14(%ebp) 10e1cf: 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 ) ) { 10e1d2: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10e1d4: 8b 4d 08 mov 0x8(%ebp),%ecx 10e1d7: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10e1db: 75 a9 jne 10e186 <_Thread_queue_Enqueue_priority+0x82> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10e1dd: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10e1e4: 3b 55 ec cmp -0x14(%ebp),%edx 10e1e7: 74 56 je 10e23f <_Thread_queue_Enqueue_priority+0x13b> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10e1e9: 8b 10 mov (%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10e1eb: 89 17 mov %edx,(%edi) the_node->previous = search_node; 10e1ed: 89 47 04 mov %eax,0x4(%edi) search_node->next = the_node; 10e1f0: 89 38 mov %edi,(%eax) next_node->previous = the_node; 10e1f2: 89 7a 04 mov %edi,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10e1f5: 89 4f 44 mov %ecx,0x44(%edi) _ISR_Enable( level ); 10e1f8: 56 push %esi 10e1f9: 9d popf 10e1fa: b8 01 00 00 00 mov $0x1,%eax * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10e1ff: 83 c4 08 add $0x8,%esp 10e202: 5b pop %ebx 10e203: 5e pop %esi 10e204: 5f pop %edi 10e205: c9 leave 10e206: c3 ret 10e207: 90 nop if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10e208: 57 push %edi 10e209: 9d popf goto restart_reverse_search; 10e20a: eb 93 jmp 10e19f <_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 ); 10e20c: 56 push %esi <== NOT EXECUTED 10e20d: 9d popf <== NOT EXECUTED goto restart_forward_search; 10e20e: e9 34 ff ff ff jmp 10e147 <_Thread_queue_Enqueue_priority+0x43><== NOT EXECUTED 10e213: 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; 10e214: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10e21b: 3b 55 f0 cmp -0x10(%ebp),%edx 10e21e: 74 1f je 10e23f <_Thread_queue_Enqueue_priority+0x13b> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10e220: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10e223: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10e225: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10e228: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10e22a: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10e22d: 89 4f 44 mov %ecx,0x44(%edi) _ISR_Enable( level ); 10e230: 56 push %esi 10e231: 9d popf 10e232: b8 01 00 00 00 mov $0x1,%eax * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10e237: 83 c4 08 add $0x8,%esp 10e23a: 5b pop %ebx 10e23b: 5e pop %esi 10e23c: 5f pop %edi 10e23d: c9 leave 10e23e: c3 ret 10e23f: 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; 10e242: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10e245: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10e247: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10e24a: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10e24c: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10e24f: 8b 45 08 mov 0x8(%ebp),%eax 10e252: 89 47 44 mov %eax,0x44(%edi) _ISR_Enable( level ); 10e255: 53 push %ebx 10e256: 9d popf 10e257: b8 01 00 00 00 mov $0x1,%eax return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10e25c: e9 30 ff ff ff jmp 10e191 <_Thread_queue_Enqueue_priority+0x8d> 10e261: 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 ) ) { 10e264: 89 f3 mov %esi,%ebx 10e266: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp) 10e26d: e9 07 ff ff ff jmp 10e179 <_Thread_queue_Enqueue_priority+0x75> =============================================================================== 00111d7c <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 111d7c: 55 push %ebp 111d7d: 89 e5 mov %esp,%ebp 111d7f: 83 ec 08 sub $0x8,%esp 111d82: 8b 45 08 mov 0x8(%ebp),%eax 111d85: 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 ) 111d88: 83 78 34 01 cmpl $0x1,0x34(%eax) 111d8c: 74 0e je 111d9c <_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 ); 111d8e: 89 55 0c mov %edx,0xc(%ebp) 111d91: 89 45 08 mov %eax,0x8(%ebp) } 111d94: 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 ); 111d95: e9 5a 1f 00 00 jmp 113cf4 <_Thread_queue_Extract_fifo> 111d9a: 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 ); 111d9c: 51 push %ecx 111d9d: 6a 00 push $0x0 111d9f: 52 push %edx 111da0: 50 push %eax 111da1: e8 06 00 00 00 call 111dac <_Thread_queue_Extract_priority_helper> 111da6: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 111da9: c9 leave 111daa: c3 ret =============================================================================== 00113cf4 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 113cf4: 55 push %ebp 113cf5: 89 e5 mov %esp,%ebp 113cf7: 53 push %ebx 113cf8: 83 ec 04 sub $0x4,%esp 113cfb: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 113cfe: 9c pushf 113cff: fa cli 113d00: 58 pop %eax if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 113d01: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 113d08: 74 2e je 113d38 <_Thread_queue_Extract_fifo+0x44> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 113d0a: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 113d0c: 8b 53 04 mov 0x4(%ebx),%edx next->previous = previous; 113d0f: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 113d12: 89 0a mov %ecx,(%edx) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 113d14: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 113d1b: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 113d1f: 74 1f je 113d40 <_Thread_queue_Extract_fifo+0x4c> _ISR_Enable( level ); 113d21: 50 push %eax 113d22: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 113d23: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 113d2a: 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 } 113d2d: 8b 5d fc mov -0x4(%ebp),%ebx 113d30: c9 leave 113d31: e9 92 9a ff ff jmp 10d7c8 <_Thread_Clear_state> 113d36: 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 ); 113d38: 50 push %eax 113d39: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 113d3a: 8b 5d fc mov -0x4(%ebp),%ebx 113d3d: c9 leave 113d3e: c3 ret 113d3f: 90 nop 113d40: 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 ); 113d47: 50 push %eax 113d48: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 113d49: 83 ec 0c sub $0xc,%esp 113d4c: 8d 43 48 lea 0x48(%ebx),%eax 113d4f: 50 push %eax 113d50: e8 53 ae ff ff call 10eba8 <_Watchdog_Remove> 113d55: 83 c4 10 add $0x10,%esp 113d58: eb c9 jmp 113d23 <_Thread_queue_Extract_fifo+0x2f> =============================================================================== 00111dac <_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 ) { 111dac: 55 push %ebp 111dad: 89 e5 mov %esp,%ebp 111daf: 57 push %edi 111db0: 56 push %esi 111db1: 53 push %ebx 111db2: 83 ec 1c sub $0x1c,%esp 111db5: 8b 5d 0c mov 0xc(%ebp),%ebx 111db8: 8a 45 10 mov 0x10(%ebp),%al 111dbb: 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 ); 111dbe: 9c pushf 111dbf: fa cli 111dc0: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 111dc3: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 111dca: 74 6c je 111e38 <_Thread_queue_Extract_priority_helper+0x8c> /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 111dcc: 8b 13 mov (%ebx),%edx previous_node = the_node->previous; 111dce: 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)); 111dd1: 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; 111dd4: 8d 73 3c lea 0x3c(%ebx),%esi 111dd7: 39 f0 cmp %esi,%eax 111dd9: 74 69 je 111e44 <_Thread_queue_Extract_priority_helper+0x98> 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; 111ddb: 8b 7b 40 mov 0x40(%ebx),%edi new_second_node = new_first_node->next; 111dde: 8b 30 mov (%eax),%esi previous_node->next = new_first_node; 111de0: 89 01 mov %eax,(%ecx) next_node->previous = new_first_node; 111de2: 89 42 04 mov %eax,0x4(%edx) new_first_node->next = next_node; 111de5: 89 10 mov %edx,(%eax) new_first_node->previous = previous_node; 111de7: 89 48 04 mov %ecx,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 111dea: 8b 53 38 mov 0x38(%ebx),%edx 111ded: 3b 53 40 cmp 0x40(%ebx),%edx 111df0: 74 11 je 111e03 <_Thread_queue_Extract_priority_helper+0x57> /* > two threads on 2-n */ new_second_node->previous = 111df2: 8d 50 38 lea 0x38(%eax),%edx 111df5: 89 56 04 mov %edx,0x4(%esi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 111df8: 89 70 38 mov %esi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 111dfb: 89 78 40 mov %edi,0x40(%eax) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 111dfe: 83 c0 3c add $0x3c,%eax 111e01: 89 07 mov %eax,(%edi) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 111e03: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 111e07: 75 23 jne 111e2c <_Thread_queue_Extract_priority_helper+0x80> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 111e09: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 111e0d: 74 3d je 111e4c <_Thread_queue_Extract_priority_helper+0xa0> _ISR_Enable( level ); 111e0f: ff 75 e4 pushl -0x1c(%ebp) 111e12: 9d popf 111e13: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 111e1a: 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 } 111e1d: 8d 65 f4 lea -0xc(%ebp),%esp 111e20: 5b pop %ebx 111e21: 5e pop %esi 111e22: 5f pop %edi 111e23: c9 leave 111e24: e9 9f b9 ff ff jmp 10d7c8 <_Thread_Clear_state> 111e29: 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 ); 111e2c: ff 75 e4 pushl -0x1c(%ebp) 111e2f: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 111e30: 8d 65 f4 lea -0xc(%ebp),%esp 111e33: 5b pop %ebx 111e34: 5e pop %esi 111e35: 5f pop %edi 111e36: c9 leave 111e37: c3 ret Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 111e38: ff 75 e4 pushl -0x1c(%ebp) 111e3b: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 111e3c: 8d 65 f4 lea -0xc(%ebp),%esp 111e3f: 5b pop %ebx 111e40: 5e pop %esi 111e41: 5f pop %edi 111e42: c9 leave 111e43: 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; 111e44: 89 11 mov %edx,(%ecx) next_node->previous = previous_node; 111e46: 89 4a 04 mov %ecx,0x4(%edx) 111e49: eb b8 jmp 111e03 <_Thread_queue_Extract_priority_helper+0x57> 111e4b: 90 nop 111e4c: 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 ); 111e53: ff 75 e4 pushl -0x1c(%ebp) 111e56: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 111e57: 83 ec 0c sub $0xc,%esp 111e5a: 8d 43 48 lea 0x48(%ebx),%eax 111e5d: 50 push %eax 111e5e: e8 45 cd ff ff call 10eba8 <_Watchdog_Remove> 111e63: 83 c4 10 add $0x10,%esp 111e66: eb ab jmp 111e13 <_Thread_queue_Extract_priority_helper+0x67> =============================================================================== 0010e274 <_Thread_queue_Extract_with_proxy>: */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 10e274: 55 push %ebp 10e275: 89 e5 mov %esp,%ebp 10e277: 83 ec 08 sub $0x8,%esp 10e27a: 8b 45 08 mov 0x8(%ebp),%eax States_Control state; state = the_thread->current_state; 10e27d: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax) 10e284: 75 06 jne 10e28c <_Thread_queue_Extract_with_proxy+0x18> 10e286: 31 c0 xor %eax,%eax _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); return true; } return false; } 10e288: c9 leave 10e289: c3 ret 10e28a: 66 90 xchg %ax,%ax if ( proxy_extract_callout ) (*proxy_extract_callout)( the_thread ); } #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 10e28c: 83 ec 08 sub $0x8,%esp 10e28f: 50 push %eax 10e290: ff 70 44 pushl 0x44(%eax) 10e293: e8 e4 3a 00 00 call 111d7c <_Thread_queue_Extract> 10e298: b0 01 mov $0x1,%al return true; 10e29a: 83 c4 10 add $0x10,%esp } return false; } 10e29d: c9 leave 10e29e: c3 ret =============================================================================== 0012049c <_Thread_queue_First>: */ Thread_Control *_Thread_queue_First( Thread_queue_Control *the_thread_queue ) { 12049c: 55 push %ebp 12049d: 89 e5 mov %esp,%ebp 12049f: 83 ec 08 sub $0x8,%esp 1204a2: 8b 45 08 mov 0x8(%ebp),%eax Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 1204a5: 83 78 34 01 cmpl $0x1,0x34(%eax) 1204a9: 74 0d je 1204b8 <_Thread_queue_First+0x1c> 1204ab: ba b8 20 12 00 mov $0x1220b8,%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 ); 1204b0: 89 45 08 mov %eax,0x8(%ebp) } 1204b3: 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 ); 1204b4: ff e2 jmp *%edx 1204b6: 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 ) 1204b8: ba c4 04 12 00 mov $0x1204c4,%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 ); 1204bd: 89 45 08 mov %eax,0x8(%ebp) } 1204c0: 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 ); 1204c1: ff e2 jmp *%edx =============================================================================== 001220b8 <_Thread_queue_First_fifo>: */ Thread_Control *_Thread_queue_First_fifo( Thread_queue_Control *the_thread_queue ) { 1220b8: 55 push %ebp 1220b9: 89 e5 mov %esp,%ebp 1220bb: 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)); 1220be: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1220c0: 83 c2 04 add $0x4,%edx 1220c3: 39 d0 cmp %edx,%eax 1220c5: 74 05 je 1220cc <_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; } 1220c7: c9 leave 1220c8: c3 ret 1220c9: 8d 76 00 lea 0x0(%esi),%esi 1220cc: 31 c0 xor %eax,%eax 1220ce: c9 leave 1220cf: c3 ret =============================================================================== 0010e2a0 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 10e2a0: 55 push %ebp 10e2a1: 89 e5 mov %esp,%ebp 10e2a3: 56 push %esi 10e2a4: 53 push %ebx 10e2a5: 8b 5d 08 mov 0x8(%ebp),%ebx 10e2a8: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10e2ab: eb 06 jmp 10e2b3 <_Thread_queue_Flush+0x13> 10e2ad: 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; 10e2b0: 89 70 34 mov %esi,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10e2b3: 83 ec 0c sub $0xc,%esp 10e2b6: 53 push %ebx 10e2b7: e8 94 fc ff ff call 10df50 <_Thread_queue_Dequeue> 10e2bc: 83 c4 10 add $0x10,%esp 10e2bf: 85 c0 test %eax,%eax 10e2c1: 75 ed jne 10e2b0 <_Thread_queue_Flush+0x10> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10e2c3: 8d 65 f8 lea -0x8(%ebp),%esp 10e2c6: 5b pop %ebx 10e2c7: 5e pop %esi 10e2c8: c9 leave 10e2c9: c3 ret =============================================================================== 00111e68 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 111e68: 55 push %ebp 111e69: 89 e5 mov %esp,%ebp 111e6b: 83 ec 08 sub $0x8,%esp 111e6e: 8b 45 08 mov 0x8(%ebp),%eax Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 111e71: 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 && 111e74: 8b 4a 30 mov 0x30(%edx),%ecx 111e77: 85 c9 test %ecx,%ecx 111e79: 74 08 je 111e83 <_Thread_queue_Process_timeout+0x1b> 111e7b: 3b 05 18 74 12 00 cmp 0x127418,%eax 111e81: 74 19 je 111e9c <_Thread_queue_Process_timeout+0x34><== ALWAYS TAKEN 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; 111e83: 8b 52 3c mov 0x3c(%edx),%edx 111e86: 89 50 34 mov %edx,0x34(%eax) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 111e89: 83 ec 08 sub $0x8,%esp 111e8c: 50 push %eax 111e8d: ff 70 44 pushl 0x44(%eax) 111e90: e8 e7 fe ff ff call 111d7c <_Thread_queue_Extract> 111e95: 83 c4 10 add $0x10,%esp } } 111e98: c9 leave 111e99: c3 ret 111e9a: 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 ) { 111e9c: 83 f9 03 cmp $0x3,%ecx 111e9f: 74 f7 je 111e98 <_Thread_queue_Process_timeout+0x30> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 111ea1: 8b 4a 3c mov 0x3c(%edx),%ecx 111ea4: 89 48 34 mov %ecx,0x34(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 111ea7: 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 ); } } 111eae: c9 leave 111eaf: c3 ret =============================================================================== 0010e31c <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10e31c: 55 push %ebp 10e31d: 89 e5 mov %esp,%ebp 10e31f: 57 push %edi 10e320: 56 push %esi 10e321: 53 push %ebx 10e322: 83 ec 1c sub $0x1c,%esp 10e325: 8b 75 08 mov 0x8(%ebp),%esi 10e328: 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 ) 10e32b: 85 f6 test %esi,%esi 10e32d: 74 06 je 10e335 <_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 ) { 10e32f: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10e333: 74 0b je 10e340 <_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 ); } } 10e335: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10e338: 5b pop %ebx <== NOT EXECUTED 10e339: 5e pop %esi <== NOT EXECUTED 10e33a: 5f pop %edi <== NOT EXECUTED 10e33b: c9 leave <== NOT EXECUTED 10e33c: c3 ret <== NOT EXECUTED 10e33d: 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 ); 10e340: 9c pushf 10e341: fa cli 10e342: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10e343: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10e34a: 75 0c jne 10e358 <_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 ); 10e34c: 53 push %ebx 10e34d: 9d popf } } 10e34e: 8d 65 f4 lea -0xc(%ebp),%esp 10e351: 5b pop %ebx 10e352: 5e pop %esi 10e353: 5f pop %edi 10e354: c9 leave 10e355: c3 ret 10e356: 66 90 xchg %ax,%ax 10e358: 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 ); 10e35f: 50 push %eax 10e360: 6a 01 push $0x1 10e362: 57 push %edi 10e363: 56 push %esi 10e364: e8 43 3a 00 00 call 111dac <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10e369: 83 c4 0c add $0xc,%esp 10e36c: 8d 45 e4 lea -0x1c(%ebp),%eax 10e36f: 50 push %eax 10e370: 57 push %edi 10e371: 56 push %esi 10e372: e8 8d fd ff ff call 10e104 <_Thread_queue_Enqueue_priority> 10e377: 83 c4 10 add $0x10,%esp 10e37a: eb d0 jmp 10e34c <_Thread_queue_Requeue+0x30> =============================================================================== 0010e37c <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10e37c: 55 push %ebp 10e37d: 89 e5 mov %esp,%ebp 10e37f: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10e382: 8d 45 f4 lea -0xc(%ebp),%eax 10e385: 50 push %eax 10e386: ff 75 08 pushl 0x8(%ebp) 10e389: e8 06 f8 ff ff call 10db94 <_Thread_Get> switch ( location ) { 10e38e: 83 c4 10 add $0x10,%esp 10e391: 8b 55 f4 mov -0xc(%ebp),%edx 10e394: 85 d2 test %edx,%edx 10e396: 75 17 jne 10e3af <_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 ); 10e398: 83 ec 0c sub $0xc,%esp 10e39b: 50 push %eax 10e39c: e8 c7 3a 00 00 call 111e68 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10e3a1: a1 58 73 12 00 mov 0x127358,%eax 10e3a6: 48 dec %eax 10e3a7: a3 58 73 12 00 mov %eax,0x127358 10e3ac: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10e3af: c9 leave 10e3b0: c3 ret =============================================================================== 0011982c <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 11982c: 55 push %ebp 11982d: 89 e5 mov %esp,%ebp 11982f: 57 push %edi 119830: 56 push %esi 119831: 53 push %ebx 119832: 83 ec 4c sub $0x4c,%esp 119835: 8b 5d 08 mov 0x8(%ebp),%ebx 119838: 8d 45 e0 lea -0x20(%ebp),%eax 11983b: 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); 11983e: 89 45 dc mov %eax,-0x24(%ebp) the_chain->permanent_null = NULL; 119841: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_chain->last = _Chain_Head(the_chain); 119848: 8d 4d dc lea -0x24(%ebp),%ecx 11984b: 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; 11984e: 8d 7d d0 lea -0x30(%ebp),%edi 119851: 8d 45 d4 lea -0x2c(%ebp),%eax 119854: 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); 119857: 89 45 d0 mov %eax,-0x30(%ebp) the_chain->permanent_null = NULL; 11985a: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 119861: 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 ); 119864: 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 ); 119867: 8d 4b 68 lea 0x68(%ebx),%ecx 11986a: 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 ); 11986d: 8d 43 08 lea 0x8(%ebx),%eax 119870: 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 ); 119873: 8d 53 40 lea 0x40(%ebx),%edx 119876: 89 55 c0 mov %edx,-0x40(%ebp) 119879: 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; 11987c: 8d 4d dc lea -0x24(%ebp),%ecx 11987f: 89 4b 78 mov %ecx,0x78(%ebx) 119882: 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; 119884: a1 44 2d 14 00 mov 0x142d44,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 119889: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 11988c: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 11988f: 51 push %ecx 119890: 57 push %edi 119891: 29 d0 sub %edx,%eax 119893: 50 push %eax 119894: 56 push %esi 119895: e8 e2 3a 00 00 call 11d37c <_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(); 11989a: a1 6c 2c 14 00 mov 0x142c6c,%eax Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 11989f: 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 ) { 1198a2: 83 c4 10 add $0x10,%esp 1198a5: 39 d0 cmp %edx,%eax 1198a7: 77 63 ja 11990c <_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 ) { 1198a9: 72 7d jb 119928 <_Timer_server_Body+0xfc> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 1198ab: 89 43 74 mov %eax,0x74(%ebx) 1198ae: 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 ); 1198b0: 8b 43 78 mov 0x78(%ebx),%eax 1198b3: 83 ec 0c sub $0xc,%esp 1198b6: 50 push %eax 1198b7: e8 50 08 00 00 call 11a10c <_Chain_Get> if ( timer == NULL ) { 1198bc: 83 c4 10 add $0x10,%esp 1198bf: 85 c0 test %eax,%eax 1198c1: 74 35 je 1198f8 <_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 ) { 1198c3: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 1198c6: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 1198c9: 74 19 je 1198e4 <_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 ) { 1198cb: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 1198ce: 75 e0 jne 1198b0 <_Timer_server_Body+0x84><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 1198d0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1198d3: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 1198d6: 50 push %eax <== NOT EXECUTED 1198d7: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 1198da: e8 35 3b 00 00 call 11d414 <_Watchdog_Insert> <== NOT EXECUTED 1198df: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1198e2: eb cc jmp 1198b0 <_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 ); 1198e4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1198e7: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 1198ea: 50 push %eax <== NOT EXECUTED 1198eb: 56 push %esi <== NOT EXECUTED 1198ec: e8 23 3b 00 00 call 11d414 <_Watchdog_Insert> <== NOT EXECUTED 1198f1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1198f4: eb ba jmp 1198b0 <_Timer_server_Body+0x84><== NOT EXECUTED 1198f6: 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 ); 1198f8: 9c pushf 1198f9: fa cli 1198fa: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 1198fb: 8b 55 b4 mov -0x4c(%ebp),%edx 1198fe: 3b 55 dc cmp -0x24(%ebp),%edx 119901: 74 41 je 119944 <_Timer_server_Body+0x118><== ALWAYS TAKEN ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 119903: 50 push %eax <== NOT EXECUTED 119904: 9d popf <== NOT EXECUTED 119905: e9 7a ff ff ff jmp 119884 <_Timer_server_Body+0x58><== NOT EXECUTED 11990a: 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 ); 11990c: 51 push %ecx 11990d: 57 push %edi 11990e: 89 c1 mov %eax,%ecx 119910: 29 d1 sub %edx,%ecx 119912: 51 push %ecx 119913: ff 75 c4 pushl -0x3c(%ebp) 119916: 89 45 b8 mov %eax,-0x48(%ebp) 119919: e8 5e 3a 00 00 call 11d37c <_Watchdog_Adjust_to_chain> 11991e: 83 c4 10 add $0x10,%esp 119921: 8b 45 b8 mov -0x48(%ebp),%eax 119924: eb 85 jmp 1198ab <_Timer_server_Body+0x7f> 119926: 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 ); 119928: 51 push %ecx 119929: 29 c2 sub %eax,%edx 11992b: 52 push %edx 11992c: 6a 01 push $0x1 11992e: ff 75 c4 pushl -0x3c(%ebp) 119931: 89 45 b8 mov %eax,-0x48(%ebp) 119934: e8 cb 39 00 00 call 11d304 <_Watchdog_Adjust> 119939: 83 c4 10 add $0x10,%esp 11993c: 8b 45 b8 mov -0x48(%ebp),%eax 11993f: e9 67 ff ff ff jmp 1198ab <_Timer_server_Body+0x7f> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 119944: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 11994b: 50 push %eax 11994c: 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 ) ) { 11994d: 8b 4d b0 mov -0x50(%ebp),%ecx 119950: 3b 4d d0 cmp -0x30(%ebp),%ecx 119953: 75 23 jne 119978 <_Timer_server_Body+0x14c> 119955: eb 33 jmp 11998a <_Timer_server_Body+0x15e> 119957: 90 nop { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 119958: 8b 10 mov (%eax),%edx the_chain->first = new_first; 11995a: 89 55 d0 mov %edx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 11995d: 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; 119960: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 119967: 51 push %ecx 119968: 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 ); 119969: 83 ec 08 sub $0x8,%esp 11996c: ff 70 24 pushl 0x24(%eax) 11996f: ff 70 20 pushl 0x20(%eax) 119972: ff 50 1c call *0x1c(%eax) } 119975: 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 ); 119978: 9c pushf 119979: fa cli 11997a: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11997b: 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)) 11997e: 39 45 b0 cmp %eax,-0x50(%ebp) 119981: 75 d5 jne 119958 <_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 ); 119983: 51 push %ecx 119984: 9d popf 119985: e9 f2 fe ff ff jmp 11987c <_Timer_server_Body+0x50> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 11998a: c6 43 7c 00 movb $0x0,0x7c(%ebx) 11998e: a1 d8 2b 14 00 mov 0x142bd8,%eax 119993: 40 inc %eax 119994: a3 d8 2b 14 00 mov %eax,0x142bd8 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 119999: 83 ec 08 sub $0x8,%esp 11999c: 6a 08 push $0x8 11999e: ff 33 pushl (%ebx) 1199a0: e8 a7 31 00 00 call 11cb4c <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 1199a5: 89 d8 mov %ebx,%eax 1199a7: e8 e0 fd ff ff call 11978c <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 1199ac: 89 d8 mov %ebx,%eax 1199ae: e8 29 fe ff ff call 1197dc <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 1199b3: e8 9c 27 00 00 call 11c154 <_Thread_Enable_dispatch> ts->active = true; 1199b8: 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 ); 1199bc: 58 pop %eax 1199bd: ff 75 bc pushl -0x44(%ebp) 1199c0: e8 87 3b 00 00 call 11d54c <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 1199c5: 59 pop %ecx 1199c6: ff 75 c0 pushl -0x40(%ebp) 1199c9: e8 7e 3b 00 00 call 11d54c <_Watchdog_Remove> 1199ce: 83 c4 10 add $0x10,%esp 1199d1: e9 a6 fe ff ff jmp 11987c <_Timer_server_Body+0x50> =============================================================================== 001199d8 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 1199d8: 55 push %ebp 1199d9: 89 e5 mov %esp,%ebp 1199db: 57 push %edi 1199dc: 56 push %esi 1199dd: 53 push %ebx 1199de: 83 ec 2c sub $0x2c,%esp 1199e1: 8b 5d 08 mov 0x8(%ebp),%ebx 1199e4: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 1199e7: 8b 53 78 mov 0x78(%ebx),%edx 1199ea: 85 d2 test %edx,%edx 1199ec: 74 16 je 119a04 <_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 ); 1199ee: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 1199f1: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 1199f4: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 1199f7: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1199fa: 5b pop %ebx <== NOT EXECUTED 1199fb: 5e pop %esi <== NOT EXECUTED 1199fc: 5f pop %edi <== NOT EXECUTED 1199fd: 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 ); 1199fe: e9 cd 06 00 00 jmp 11a0d0 <_Chain_Append> <== NOT EXECUTED 119a03: 90 nop <== NOT EXECUTED 119a04: 8b 15 d8 2b 14 00 mov 0x142bd8,%edx 119a0a: 42 inc %edx 119a0b: 89 15 d8 2b 14 00 mov %edx,0x142bd8 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 119a11: 8b 50 38 mov 0x38(%eax),%edx 119a14: 83 fa 01 cmp $0x1,%edx 119a17: 74 77 je 119a90 <_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 ) { 119a19: 83 fa 03 cmp $0x3,%edx 119a1c: 74 0e je 119a2c <_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 ); } } 119a1e: 8d 65 f4 lea -0xc(%ebp),%esp 119a21: 5b pop %ebx 119a22: 5e pop %esi 119a23: 5f pop %edi 119a24: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 119a25: e9 2a 27 00 00 jmp 11c154 <_Thread_Enable_dispatch> 119a2a: 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 ); 119a2c: 9c pushf 119a2d: fa cli 119a2e: 8f 45 e4 popl -0x1c(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 119a31: 8b 0d 6c 2c 14 00 mov 0x142c6c,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 119a37: 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)); 119a3a: 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; 119a3d: 8d 7b 6c lea 0x6c(%ebx),%edi 119a40: 39 fa cmp %edi,%edx 119a42: 74 22 je 119a66 <_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; 119a44: 8b 7a 10 mov 0x10(%edx),%edi 119a47: 89 7d d4 mov %edi,-0x2c(%ebp) if ( snapshot > last_snapshot ) { 119a4a: 39 f1 cmp %esi,%ecx 119a4c: 0f 86 9e 00 00 00 jbe 119af0 <_Timer_server_Schedule_operation_method+0x118> /* * We advanced in time. */ delta = snapshot - last_snapshot; 119a52: 89 cf mov %ecx,%edi 119a54: 29 f7 sub %esi,%edi 119a56: 89 fe mov %edi,%esi if (delta_interval > delta) { 119a58: 39 7d d4 cmp %edi,-0x2c(%ebp) 119a5b: 0f 87 9b 00 00 00 ja 119afc <_Timer_server_Schedule_operation_method+0x124><== ALWAYS TAKEN 119a61: 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; 119a63: 89 7a 10 mov %edi,0x10(%edx) } ts->TOD_watchdogs.last_snapshot = snapshot; 119a66: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 119a69: ff 75 e4 pushl -0x1c(%ebp) 119a6c: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 119a6d: 83 ec 08 sub $0x8,%esp 119a70: 83 c0 10 add $0x10,%eax 119a73: 50 push %eax 119a74: 8d 43 68 lea 0x68(%ebx),%eax 119a77: 50 push %eax 119a78: e8 97 39 00 00 call 11d414 <_Watchdog_Insert> if ( !ts->active ) { 119a7d: 8a 43 7c mov 0x7c(%ebx),%al 119a80: 83 c4 10 add $0x10,%esp 119a83: 84 c0 test %al,%al 119a85: 75 97 jne 119a1e <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_tod_system_watchdog( ts ); 119a87: 89 d8 mov %ebx,%eax 119a89: e8 4e fd ff ff call 1197dc <_Timer_server_Reset_tod_system_watchdog> 119a8e: eb 8e jmp 119a1e <_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 ); 119a90: 9c pushf 119a91: fa cli 119a92: 8f 45 e4 popl -0x1c(%ebp) snapshot = _Watchdog_Ticks_since_boot; 119a95: 8b 0d 44 2d 14 00 mov 0x142d44,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 119a9b: 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)); 119a9e: 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; 119aa1: 8d 7b 34 lea 0x34(%ebx),%edi 119aa4: 39 fa cmp %edi,%edx 119aa6: 74 12 je 119aba <_Timer_server_Schedule_operation_method+0xe2> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 119aa8: 89 cf mov %ecx,%edi 119aaa: 29 f7 sub %esi,%edi 119aac: 89 fe mov %edi,%esi delta_interval = first_watchdog->delta_interval; 119aae: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 119ab1: 39 fe cmp %edi,%esi 119ab3: 72 37 jb 119aec <_Timer_server_Schedule_operation_method+0x114> 119ab5: 31 ff xor %edi,%edi delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 119ab7: 89 7a 10 mov %edi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 119aba: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 119abd: ff 75 e4 pushl -0x1c(%ebp) 119ac0: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 119ac1: 83 ec 08 sub $0x8,%esp 119ac4: 83 c0 10 add $0x10,%eax 119ac7: 50 push %eax 119ac8: 8d 43 30 lea 0x30(%ebx),%eax 119acb: 50 push %eax 119acc: e8 43 39 00 00 call 11d414 <_Watchdog_Insert> if ( !ts->active ) { 119ad1: 8a 43 7c mov 0x7c(%ebx),%al 119ad4: 83 c4 10 add $0x10,%esp 119ad7: 84 c0 test %al,%al 119ad9: 0f 85 3f ff ff ff jne 119a1e <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_interval_system_watchdog( ts ); 119adf: 89 d8 mov %ebx,%eax 119ae1: e8 a6 fc ff ff call 11978c <_Timer_server_Reset_interval_system_watchdog> 119ae6: e9 33 ff ff ff jmp 119a1e <_Timer_server_Schedule_operation_method+0x46> 119aeb: 90 nop */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; 119aec: 29 f7 sub %esi,%edi 119aee: eb c7 jmp 119ab7 <_Timer_server_Schedule_operation_method+0xdf> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 119af0: 8b 7d d4 mov -0x2c(%ebp),%edi 119af3: 01 f7 add %esi,%edi delta_interval += delta; 119af5: 29 cf sub %ecx,%edi 119af7: e9 67 ff ff ff jmp 119a63 <_Timer_server_Schedule_operation_method+0x8b> /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; 119afc: 8b 7d d4 mov -0x2c(%ebp),%edi 119aff: 29 f7 sub %esi,%edi 119b01: e9 5d ff ff ff jmp 119a63 <_Timer_server_Schedule_operation_method+0x8b> =============================================================================== 0010f3cc <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 10f3cc: 55 push %ebp 10f3cd: 89 e5 mov %esp,%ebp 10f3cf: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 10f3d2: 85 c0 test %eax,%eax 10f3d4: 74 1a je 10f3f0 <_Timespec_Is_valid+0x24> return false; if ( time->tv_sec < 0 ) 10f3d6: 8b 10 mov (%eax),%edx 10f3d8: 85 d2 test %edx,%edx 10f3da: 78 14 js 10f3f0 <_Timespec_Is_valid+0x24> return false; if ( time->tv_nsec < 0 ) 10f3dc: 8b 40 04 mov 0x4(%eax),%eax 10f3df: 85 c0 test %eax,%eax 10f3e1: 78 0d js 10f3f0 <_Timespec_Is_valid+0x24> #include #include #include bool _Timespec_Is_valid( 10f3e3: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10f3e8: 0f 96 c0 setbe %al if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 10f3eb: c9 leave 10f3ec: c3 ret 10f3ed: 8d 76 00 lea 0x0(%esi),%esi #include #include #include bool _Timespec_Is_valid( 10f3f0: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 10f3f2: c9 leave 10f3f3: c3 ret =============================================================================== 0010f430 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 10f430: 55 push %ebp 10f431: 89 e5 mov %esp,%ebp 10f433: 56 push %esi 10f434: 53 push %ebx 10f435: 8b 5d 08 mov 0x8(%ebp),%ebx uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 10f438: 8b 33 mov (%ebx),%esi 10f43a: 85 f6 test %esi,%esi 10f43c: 75 07 jne 10f445 <_Timespec_To_ticks+0x15> 10f43e: 8b 43 04 mov 0x4(%ebx),%eax 10f441: 85 c0 test %eax,%eax 10f443: 74 37 je 10f47c <_Timespec_To_ticks+0x4c> return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 10f445: e8 c6 31 00 00 call 112610 10f44a: 89 c1 mov %eax,%ecx 10f44c: 0f af ce imul %esi,%ecx ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 10f44f: a1 2c 52 12 00 mov 0x12522c,%eax 10f454: 8d 04 80 lea (%eax,%eax,4),%eax 10f457: 8d 04 80 lea (%eax,%eax,4),%eax 10f45a: 8d 34 80 lea (%eax,%eax,4),%esi 10f45d: c1 e6 03 shl $0x3,%esi 10f460: 8b 43 04 mov 0x4(%ebx),%eax 10f463: 31 d2 xor %edx,%edx 10f465: f7 f6 div %esi if (ticks) 10f467: 01 c8 add %ecx,%eax 10f469: 74 05 je 10f470 <_Timespec_To_ticks+0x40> return ticks; return 1; } 10f46b: 5b pop %ebx 10f46c: 5e pop %esi 10f46d: c9 leave 10f46e: c3 ret 10f46f: 90 nop ticks = time->tv_sec * TOD_TICKS_PER_SECOND; ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); if (ticks) 10f470: b8 01 00 00 00 mov $0x1,%eax return ticks; return 1; } 10f475: 5b pop %ebx 10f476: 5e pop %esi 10f477: c9 leave 10f478: c3 ret 10f479: 8d 76 00 lea 0x0(%esi),%esi const struct timespec *time ) { uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 10f47c: 31 c0 xor %eax,%eax if (ticks) return ticks; return 1; } 10f47e: 5b pop %ebx 10f47f: 5e pop %esi 10f480: c9 leave 10f481: c3 ret =============================================================================== 0010e918 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10e918: 55 push %ebp 10e919: 89 e5 mov %esp,%ebp 10e91b: 57 push %edi 10e91c: 56 push %esi 10e91d: 53 push %ebx 10e91e: 83 ec 1c sub $0x1c,%esp 10e921: 8b 75 08 mov 0x8(%ebp),%esi 10e924: 8b 7d 10 mov 0x10(%ebp),%edi 10e927: 8a 45 0c mov 0xc(%ebp),%al Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e92a: 8b 1d b4 75 12 00 mov 0x1275b4,%ebx 10e930: 81 fb ac 75 12 00 cmp $0x1275ac,%ebx 10e936: 74 25 je 10e95d <_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 ); 10e938: 0f b6 c0 movzbl %al,%eax 10e93b: 89 45 e4 mov %eax,-0x1c(%ebp) 10e93e: 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 ) 10e940: 8b 43 30 mov 0x30(%ebx),%eax 10e943: 85 c0 test %eax,%eax 10e945: 74 0b je 10e952 <_User_extensions_Fatal+0x3a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10e947: 52 push %edx 10e948: 57 push %edi 10e949: ff 75 e4 pushl -0x1c(%ebp) 10e94c: 56 push %esi 10e94d: ff d0 call *%eax 10e94f: 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 ) { 10e952: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e955: 81 fb ac 75 12 00 cmp $0x1275ac,%ebx 10e95b: 75 e3 jne 10e940 <_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 ); } } 10e95d: 8d 65 f4 lea -0xc(%ebp),%esp 10e960: 5b pop %ebx 10e961: 5e pop %esi 10e962: 5f pop %edi 10e963: c9 leave 10e964: c3 ret =============================================================================== 0010e7dc <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10e7dc: 55 push %ebp 10e7dd: 89 e5 mov %esp,%ebp 10e7df: 57 push %edi 10e7e0: 56 push %esi 10e7e1: 53 push %ebx 10e7e2: 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; 10e7e5: a1 58 32 12 00 mov 0x123258,%eax 10e7ea: 89 45 dc mov %eax,-0x24(%ebp) initial_extensions = Configuration.User_extension_table; 10e7ed: 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); 10e7f3: c7 05 ac 75 12 00 b0 movl $0x1275b0,0x1275ac 10e7fa: 75 12 00 the_chain->permanent_null = NULL; 10e7fd: c7 05 b0 75 12 00 00 movl $0x0,0x1275b0 10e804: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e807: c7 05 b4 75 12 00 ac movl $0x1275ac,0x1275b4 10e80e: 75 12 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e811: c7 05 5c 73 12 00 60 movl $0x127360,0x12735c 10e818: 73 12 00 the_chain->permanent_null = NULL; 10e81b: c7 05 60 73 12 00 00 movl $0x0,0x127360 10e822: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e825: c7 05 64 73 12 00 5c movl $0x12735c,0x127364 10e82c: 73 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10e82f: 85 f6 test %esi,%esi 10e831: 74 64 je 10e897 <_User_extensions_Handler_initialization+0xbb> extension = (User_extensions_Control *) 10e833: 89 c2 mov %eax,%edx 10e835: 8d 04 40 lea (%eax,%eax,2),%eax 10e838: 8d 0c 82 lea (%edx,%eax,4),%ecx 10e83b: c1 e1 02 shl $0x2,%ecx 10e83e: 83 ec 0c sub $0xc,%esp 10e841: 51 push %ecx 10e842: 89 4d d8 mov %ecx,-0x28(%ebp) 10e845: e8 36 04 00 00 call 10ec80 <_Workspace_Allocate_or_fatal_error> 10e84a: 89 c3 mov %eax,%ebx _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10e84c: 31 c0 xor %eax,%eax 10e84e: 8b 4d d8 mov -0x28(%ebp),%ecx 10e851: 89 df mov %ebx,%edi 10e853: f3 aa rep stos %al,%es:(%edi) extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e855: 83 c4 10 add $0x10,%esp 10e858: 8b 45 dc mov -0x24(%ebp),%eax 10e85b: 85 c0 test %eax,%eax 10e85d: 74 38 je 10e897 <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN 10e85f: 89 75 e4 mov %esi,-0x1c(%ebp) 10e862: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 10e869: 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; 10e86c: 8d 7b 14 lea 0x14(%ebx),%edi 10e86f: 8b 75 e4 mov -0x1c(%ebp),%esi 10e872: b9 08 00 00 00 mov $0x8,%ecx 10e877: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10e879: 83 ec 0c sub $0xc,%esp 10e87c: 53 push %ebx 10e87d: e8 12 38 00 00 call 112094 <_User_extensions_Add_set> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10e882: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e885: ff 45 e0 incl -0x20(%ebp) 10e888: 83 45 e4 20 addl $0x20,-0x1c(%ebp) 10e88c: 83 c4 10 add $0x10,%esp 10e88f: 8b 45 e0 mov -0x20(%ebp),%eax 10e892: 39 45 dc cmp %eax,-0x24(%ebp) 10e895: 77 d5 ja 10e86c <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10e897: 8d 65 f4 lea -0xc(%ebp),%esp 10e89a: 5b pop %ebx 10e89b: 5e pop %esi 10e89c: 5f pop %edi 10e89d: c9 leave 10e89e: c3 ret =============================================================================== 0010fe50 <_User_extensions_Remove_set>: #include void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 10fe50: 55 push %ebp 10fe51: 89 e5 mov %esp,%ebp 10fe53: 53 push %ebx 10fe54: 83 ec 10 sub $0x10,%esp 10fe57: 8b 5d 08 mov 0x8(%ebp),%ebx _Chain_Extract( &the_extension->Node ); 10fe5a: 53 push %ebx 10fe5b: e8 a4 da ff ff call 10d904 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 10fe60: 83 c4 10 add $0x10,%esp 10fe63: 8b 43 24 mov 0x24(%ebx),%eax 10fe66: 85 c0 test %eax,%eax 10fe68: 74 12 je 10fe7c <_User_extensions_Remove_set+0x2c> _Chain_Extract( &the_extension->Switch.Node ); 10fe6a: 83 c3 08 add $0x8,%ebx 10fe6d: 89 5d 08 mov %ebx,0x8(%ebp) } 10fe70: 8b 5d fc mov -0x4(%ebp),%ebx 10fe73: c9 leave /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 10fe74: e9 8b da ff ff jmp 10d904 <_Chain_Extract> 10fe79: 8d 76 00 lea 0x0(%esi),%esi } 10fe7c: 8b 5d fc mov -0x4(%ebp),%ebx 10fe7f: c9 leave 10fe80: c3 ret =============================================================================== 0010e8a0 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 10e8a0: 55 push %ebp 10e8a1: 89 e5 mov %esp,%ebp 10e8a3: 56 push %esi 10e8a4: 53 push %ebx 10e8a5: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e8a8: 8b 1d ac 75 12 00 mov 0x1275ac,%ebx 10e8ae: 81 fb b0 75 12 00 cmp $0x1275b0,%ebx 10e8b4: 74 1c je 10e8d2 <_User_extensions_Thread_begin+0x32><== NEVER TAKEN 10e8b6: 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 ) 10e8b8: 8b 43 28 mov 0x28(%ebx),%eax 10e8bb: 85 c0 test %eax,%eax 10e8bd: 74 09 je 10e8c8 <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 10e8bf: 83 ec 0c sub $0xc,%esp 10e8c2: 56 push %esi 10e8c3: ff d0 call *%eax 10e8c5: 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 ) { 10e8c8: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e8ca: 81 fb b0 75 12 00 cmp $0x1275b0,%ebx 10e8d0: 75 e6 jne 10e8b8 <_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 ); } } 10e8d2: 8d 65 f8 lea -0x8(%ebp),%esp 10e8d5: 5b pop %ebx 10e8d6: 5e pop %esi 10e8d7: c9 leave 10e8d8: c3 ret =============================================================================== 0010e968 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 10e968: 55 push %ebp 10e969: 89 e5 mov %esp,%ebp 10e96b: 56 push %esi 10e96c: 53 push %ebx 10e96d: 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 ; 10e970: 8b 1d ac 75 12 00 mov 0x1275ac,%ebx 10e976: 81 fb b0 75 12 00 cmp $0x1275b0,%ebx 10e97c: 74 26 je 10e9a4 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN 10e97e: 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 ) { 10e980: 8b 43 14 mov 0x14(%ebx),%eax 10e983: 85 c0 test %eax,%eax 10e985: 74 13 je 10e99a <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 10e987: 83 ec 08 sub $0x8,%esp 10e98a: 56 push %esi 10e98b: ff 35 18 74 12 00 pushl 0x127418 10e991: ff d0 call *%eax _Thread_Executing, the_thread ); if ( !status ) 10e993: 83 c4 10 add $0x10,%esp 10e996: 84 c0 test %al,%al 10e998: 74 0c je 10e9a6 <_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 ) { 10e99a: 8b 1b mov (%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 10e99c: 81 fb b0 75 12 00 cmp $0x1275b0,%ebx 10e9a2: 75 dc jne 10e980 <_User_extensions_Thread_create+0x18> 10e9a4: b0 01 mov $0x1,%al return false; } } return true; } 10e9a6: 8d 65 f8 lea -0x8(%ebp),%esp 10e9a9: 5b pop %ebx 10e9aa: 5e pop %esi 10e9ab: c9 leave 10e9ac: c3 ret =============================================================================== 0010e9b0 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 10e9b0: 55 push %ebp 10e9b1: 89 e5 mov %esp,%ebp 10e9b3: 56 push %esi 10e9b4: 53 push %ebx 10e9b5: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e9b8: 8b 1d b4 75 12 00 mov 0x1275b4,%ebx 10e9be: 81 fb ac 75 12 00 cmp $0x1275ac,%ebx 10e9c4: 74 23 je 10e9e9 <_User_extensions_Thread_delete+0x39><== NEVER TAKEN 10e9c6: 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 ) 10e9c8: 8b 43 20 mov 0x20(%ebx),%eax 10e9cb: 85 c0 test %eax,%eax 10e9cd: 74 0f je 10e9de <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 10e9cf: 83 ec 08 sub $0x8,%esp 10e9d2: 56 push %esi 10e9d3: ff 35 18 74 12 00 pushl 0x127418 10e9d9: ff d0 call *%eax 10e9db: 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 ) { 10e9de: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e9e1: 81 fb ac 75 12 00 cmp $0x1275ac,%ebx 10e9e7: 75 df jne 10e9c8 <_User_extensions_Thread_delete+0x18> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10e9e9: 8d 65 f8 lea -0x8(%ebp),%esp 10e9ec: 5b pop %ebx 10e9ed: 5e pop %esi 10e9ee: c9 leave 10e9ef: c3 ret =============================================================================== 0010e8dc <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10e8dc: 55 push %ebp 10e8dd: 89 e5 mov %esp,%ebp 10e8df: 56 push %esi 10e8e0: 53 push %ebx 10e8e1: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e8e4: 8b 1d b4 75 12 00 mov 0x1275b4,%ebx 10e8ea: 81 fb ac 75 12 00 cmp $0x1275ac,%ebx 10e8f0: 74 1d je 10e90f <_User_extensions_Thread_exitted+0x33><== NEVER TAKEN 10e8f2: 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 ) 10e8f4: 8b 43 2c mov 0x2c(%ebx),%eax 10e8f7: 85 c0 test %eax,%eax 10e8f9: 74 09 je 10e904 <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 10e8fb: 83 ec 0c sub $0xc,%esp 10e8fe: 56 push %esi 10e8ff: ff d0 call *%eax 10e901: 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 ) { 10e904: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e907: 81 fb ac 75 12 00 cmp $0x1275ac,%ebx 10e90d: 75 e5 jne 10e8f4 <_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 ); } } 10e90f: 8d 65 f8 lea -0x8(%ebp),%esp 10e912: 5b pop %ebx 10e913: 5e pop %esi 10e914: c9 leave 10e915: c3 ret =============================================================================== 0010f5a4 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 10f5a4: 55 push %ebp 10f5a5: 89 e5 mov %esp,%ebp 10f5a7: 56 push %esi 10f5a8: 53 push %ebx 10f5a9: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f5ac: 8b 1d 0c 96 12 00 mov 0x12960c,%ebx 10f5b2: 81 fb 10 96 12 00 cmp $0x129610,%ebx 10f5b8: 74 22 je 10f5dc <_User_extensions_Thread_restart+0x38><== NEVER TAKEN 10f5ba: 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 ) 10f5bc: 8b 43 1c mov 0x1c(%ebx),%eax 10f5bf: 85 c0 test %eax,%eax 10f5c1: 74 0f je 10f5d2 <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 10f5c3: 83 ec 08 sub $0x8,%esp 10f5c6: 56 push %esi 10f5c7: ff 35 78 94 12 00 pushl 0x129478 10f5cd: ff d0 call *%eax 10f5cf: 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 ) { 10f5d2: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f5d4: 81 fb 10 96 12 00 cmp $0x129610,%ebx 10f5da: 75 e0 jne 10f5bc <_User_extensions_Thread_restart+0x18> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10f5dc: 8d 65 f8 lea -0x8(%ebp),%esp 10f5df: 5b pop %ebx 10f5e0: 5e pop %esi 10f5e1: c9 leave 10f5e2: c3 ret =============================================================================== 0010e9f0 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 10e9f0: 55 push %ebp 10e9f1: 89 e5 mov %esp,%ebp 10e9f3: 56 push %esi 10e9f4: 53 push %ebx 10e9f5: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e9f8: 8b 1d ac 75 12 00 mov 0x1275ac,%ebx 10e9fe: 81 fb b0 75 12 00 cmp $0x1275b0,%ebx 10ea04: 74 22 je 10ea28 <_User_extensions_Thread_start+0x38><== NEVER TAKEN 10ea06: 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 ) 10ea08: 8b 43 18 mov 0x18(%ebx),%eax 10ea0b: 85 c0 test %eax,%eax 10ea0d: 74 0f je 10ea1e <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 10ea0f: 83 ec 08 sub $0x8,%esp 10ea12: 56 push %esi 10ea13: ff 35 18 74 12 00 pushl 0x127418 10ea19: ff d0 call *%eax 10ea1b: 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 ) { 10ea1e: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10ea20: 81 fb b0 75 12 00 cmp $0x1275b0,%ebx 10ea26: 75 e0 jne 10ea08 <_User_extensions_Thread_start+0x18> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10ea28: 8d 65 f8 lea -0x8(%ebp),%esp 10ea2b: 5b pop %ebx 10ea2c: 5e pop %esi 10ea2d: c9 leave 10ea2e: c3 ret =============================================================================== 0010ea30 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 10ea30: 55 push %ebp 10ea31: 89 e5 mov %esp,%ebp 10ea33: 57 push %edi 10ea34: 56 push %esi 10ea35: 53 push %ebx 10ea36: 83 ec 0c sub $0xc,%esp 10ea39: 8b 7d 08 mov 0x8(%ebp),%edi 10ea3c: 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 ; 10ea3f: 8b 1d 5c 73 12 00 mov 0x12735c,%ebx 10ea45: 81 fb 60 73 12 00 cmp $0x127360,%ebx 10ea4b: 74 18 je 10ea65 <_User_extensions_Thread_switch+0x35><== NEVER TAKEN 10ea4d: 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 ); 10ea50: 83 ec 08 sub $0x8,%esp 10ea53: 56 push %esi 10ea54: 57 push %edi 10ea55: 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 ) { 10ea58: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 10ea5a: 83 c4 10 add $0x10,%esp 10ea5d: 81 fb 60 73 12 00 cmp $0x127360,%ebx 10ea63: 75 eb jne 10ea50 <_User_extensions_Thread_switch+0x20> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10ea65: 8d 65 f4 lea -0xc(%ebp),%esp 10ea68: 5b pop %ebx 10ea69: 5e pop %esi 10ea6a: 5f pop %edi 10ea6b: c9 leave 10ea6c: c3 ret =============================================================================== 00110430 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 110430: 55 push %ebp 110431: 89 e5 mov %esp,%ebp 110433: 57 push %edi 110434: 56 push %esi 110435: 53 push %ebx 110436: 83 ec 1c sub $0x1c,%esp 110439: 8b 75 08 mov 0x8(%ebp),%esi 11043c: 8b 4d 0c mov 0xc(%ebp),%ecx 11043f: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 110442: 9c pushf 110443: fa cli 110444: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 110445: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 110447: 8d 7e 04 lea 0x4(%esi),%edi 11044a: 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 ) ) { 11044d: 39 fa cmp %edi,%edx 11044f: 74 3d je 11048e <_Watchdog_Adjust+0x5e> switch ( direction ) { 110451: 85 c9 test %ecx,%ecx 110453: 75 43 jne 110498 <_Watchdog_Adjust+0x68> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 110455: 85 db test %ebx,%ebx 110457: 74 35 je 11048e <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 110459: 8b 7a 10 mov 0x10(%edx),%edi 11045c: 39 fb cmp %edi,%ebx 11045e: 73 0f jae 11046f <_Watchdog_Adjust+0x3f> <== ALWAYS TAKEN 110460: eb 3e jmp 1104a0 <_Watchdog_Adjust+0x70> <== NOT EXECUTED 110462: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 110464: 29 fb sub %edi,%ebx 110466: 74 26 je 11048e <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 110468: 8b 7a 10 mov 0x10(%edx),%edi 11046b: 39 df cmp %ebx,%edi 11046d: 77 31 ja 1104a0 <_Watchdog_Adjust+0x70> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 11046f: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 110476: 50 push %eax 110477: 9d popf _Watchdog_Tickle( header ); 110478: 83 ec 0c sub $0xc,%esp 11047b: 56 push %esi 11047c: e8 cb 01 00 00 call 11064c <_Watchdog_Tickle> _ISR_Disable( level ); 110481: 9c pushf 110482: fa cli 110483: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 110484: 8b 16 mov (%esi),%edx if ( _Chain_Is_empty( header ) ) 110486: 83 c4 10 add $0x10,%esp 110489: 39 55 e4 cmp %edx,-0x1c(%ebp) 11048c: 75 d6 jne 110464 <_Watchdog_Adjust+0x34> } break; } } _ISR_Enable( level ); 11048e: 50 push %eax 11048f: 9d popf } 110490: 8d 65 f4 lea -0xc(%ebp),%esp 110493: 5b pop %ebx 110494: 5e pop %esi 110495: 5f pop %edi 110496: c9 leave 110497: c3 ret * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 110498: 49 dec %ecx 110499: 75 f3 jne 11048e <_Watchdog_Adjust+0x5e> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 11049b: 01 5a 10 add %ebx,0x10(%edx) break; 11049e: eb ee jmp 11048e <_Watchdog_Adjust+0x5e> case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 1104a0: 29 df sub %ebx,%edi 1104a2: 89 7a 10 mov %edi,0x10(%edx) break; 1104a5: eb e7 jmp 11048e <_Watchdog_Adjust+0x5e> =============================================================================== 0011d37c <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 11d37c: 55 push %ebp 11d37d: 89 e5 mov %esp,%ebp 11d37f: 57 push %edi 11d380: 56 push %esi 11d381: 53 push %ebx 11d382: 83 ec 0c sub $0xc,%esp 11d385: 8b 75 08 mov 0x8(%ebp),%esi 11d388: 8b 55 0c mov 0xc(%ebp),%edx 11d38b: 8b 5d 10 mov 0x10(%ebp),%ebx Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { 11d38e: 85 d2 test %edx,%edx 11d390: 74 63 je 11d3f5 <_Watchdog_Adjust_to_chain+0x79> return; } _ISR_Disable( level ); 11d392: 9c pushf 11d393: fa cli 11d394: 8f 45 ec popl -0x14(%ebp) 11d397: 8b 06 mov (%esi),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11d399: 8d 4e 04 lea 0x4(%esi),%ecx 11d39c: 89 4d f0 mov %ecx,-0x10(%ebp) 11d39f: 8d 7b 04 lea 0x4(%ebx),%edi 11d3a2: 89 55 e8 mov %edx,-0x18(%ebp) 11d3a5: 8d 76 00 lea 0x0(%esi),%esi while ( 1 ) { if ( units <= 0 ) { break; } if ( _Chain_Is_empty( header ) ) { 11d3a8: 39 45 f0 cmp %eax,-0x10(%ebp) 11d3ab: 74 44 je 11d3f1 <_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 ) { 11d3ad: 8b 50 10 mov 0x10(%eax),%edx 11d3b0: 3b 55 e8 cmp -0x18(%ebp),%edx 11d3b3: 77 57 ja 11d40c <_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; 11d3b5: 29 55 e8 sub %edx,-0x18(%ebp) first->delta_interval = 0; 11d3b8: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) 11d3bf: 90 nop ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 11d3c0: 8b 08 mov (%eax),%ecx previous = the_node->previous; 11d3c2: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 11d3c5: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 11d3c8: 89 0a mov %ecx,(%edx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 11d3ca: 89 38 mov %edi,(%eax) old_last_node = the_chain->last; 11d3cc: 8b 53 08 mov 0x8(%ebx),%edx the_chain->last = the_node; 11d3cf: 89 43 08 mov %eax,0x8(%ebx) old_last_node->next = the_node; 11d3d2: 89 02 mov %eax,(%edx) the_node->previous = old_last_node; 11d3d4: 89 50 04 mov %edx,0x4(%eax) while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 11d3d7: ff 75 ec pushl -0x14(%ebp) 11d3da: 9d popf 11d3db: fa cli */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11d3dc: 8b 06 mov (%esi),%eax if ( _Chain_Is_empty( header ) ) 11d3de: 39 45 f0 cmp %eax,-0x10(%ebp) 11d3e1: 74 1d je 11d400 <_Watchdog_Adjust_to_chain+0x84> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 11d3e3: 8b 50 10 mov 0x10(%eax),%edx 11d3e6: 85 d2 test %edx,%edx 11d3e8: 74 d6 je 11d3c0 <_Watchdog_Adjust_to_chain+0x44> } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 11d3ea: 8b 4d e8 mov -0x18(%ebp),%ecx 11d3ed: 85 c9 test %ecx,%ecx 11d3ef: 75 b7 jne 11d3a8 <_Watchdog_Adjust_to_chain+0x2c> if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 11d3f1: ff 75 ec pushl -0x14(%ebp) 11d3f4: 9d popf } 11d3f5: 83 c4 0c add $0xc,%esp 11d3f8: 5b pop %ebx 11d3f9: 5e pop %esi 11d3fa: 5f pop %edi 11d3fb: c9 leave 11d3fc: c3 ret 11d3fd: 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; 11d400: 8b 45 f0 mov -0x10(%ebp),%eax } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 11d403: 8b 4d e8 mov -0x18(%ebp),%ecx 11d406: 85 c9 test %ecx,%ecx 11d408: 75 9e jne 11d3a8 <_Watchdog_Adjust_to_chain+0x2c> 11d40a: eb e5 jmp 11d3f1 <_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; 11d40c: 2b 55 e8 sub -0x18(%ebp),%edx 11d40f: 89 50 10 mov %edx,0x10(%eax) break; 11d412: eb dd jmp 11d3f1 <_Watchdog_Adjust_to_chain+0x75> =============================================================================== 0010ea70 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10ea70: 55 push %ebp 10ea71: 89 e5 mov %esp,%ebp 10ea73: 57 push %edi 10ea74: 56 push %esi 10ea75: 53 push %ebx 10ea76: 83 ec 04 sub $0x4,%esp 10ea79: 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; 10ea7c: 8b 3d f4 73 12 00 mov 0x1273f4,%edi _ISR_Disable( level ); 10ea82: 9c pushf 10ea83: fa cli 10ea84: 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 ) { 10ea87: 8b 43 08 mov 0x8(%ebx),%eax 10ea8a: 85 c0 test %eax,%eax 10ea8c: 0f 85 9e 00 00 00 jne 10eb30 <_Watchdog_Insert+0xc0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10ea92: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx) _Watchdog_Sync_count++; 10ea99: a1 c0 74 12 00 mov 0x1274c0,%eax 10ea9e: 40 inc %eax 10ea9f: a3 c0 74 12 00 mov %eax,0x1274c0 restart: delta_interval = the_watchdog->initial; 10eaa4: 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 ; 10eaa7: 8b 4d 08 mov 0x8(%ebp),%ecx 10eaaa: 8b 11 mov (%ecx),%edx ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10eaac: 85 c0 test %eax,%eax 10eaae: 74 5d je 10eb0d <_Watchdog_Insert+0x9d> 10eab0: 8b 32 mov (%edx),%esi 10eab2: 85 f6 test %esi,%esi 10eab4: 74 57 je 10eb0d <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10eab6: 8b 4a 10 mov 0x10(%edx),%ecx 10eab9: 39 c8 cmp %ecx,%eax 10eabb: 73 22 jae 10eadf <_Watchdog_Insert+0x6f> 10eabd: eb 49 jmp 10eb08 <_Watchdog_Insert+0x98> 10eabf: 90 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10eac0: 8b 35 14 74 12 00 mov 0x127414,%esi 10eac6: 39 f7 cmp %esi,%edi 10eac8: 72 72 jb 10eb3c <_Watchdog_Insert+0xcc> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10eaca: 29 c8 sub %ecx,%eax RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 10eacc: 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 ) ) 10eace: 85 c0 test %eax,%eax 10ead0: 74 3b je 10eb0d <_Watchdog_Insert+0x9d> 10ead2: 8b 0a mov (%edx),%ecx 10ead4: 85 c9 test %ecx,%ecx 10ead6: 74 35 je 10eb0d <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10ead8: 8b 4a 10 mov 0x10(%edx),%ecx 10eadb: 39 c1 cmp %eax,%ecx 10eadd: 77 29 ja 10eb08 <_Watchdog_Insert+0x98> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 10eadf: ff 75 f0 pushl -0x10(%ebp) 10eae2: 9d popf 10eae3: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10eae4: 83 7b 08 01 cmpl $0x1,0x8(%ebx) 10eae8: 74 d6 je 10eac0 <_Watchdog_Insert+0x50> _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 10eaea: 89 3d 14 74 12 00 mov %edi,0x127414 _Watchdog_Sync_count--; 10eaf0: a1 c0 74 12 00 mov 0x1274c0,%eax 10eaf5: 48 dec %eax 10eaf6: a3 c0 74 12 00 mov %eax,0x1274c0 _ISR_Enable( level ); 10eafb: ff 75 f0 pushl -0x10(%ebp) 10eafe: 9d popf } 10eaff: 58 pop %eax 10eb00: 5b pop %ebx 10eb01: 5e pop %esi 10eb02: 5f pop %edi 10eb03: c9 leave 10eb04: c3 ret 10eb05: 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; 10eb08: 29 c1 sub %eax,%ecx 10eb0a: 89 4a 10 mov %ecx,0x10(%edx) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 10eb0d: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10eb14: 89 43 10 mov %eax,0x10(%ebx) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10eb17: 8b 42 04 mov 0x4(%edx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10eb1a: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10eb1d: 8b 10 mov (%eax),%edx after_node->next = the_node; 10eb1f: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10eb21: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10eb23: 89 5a 04 mov %ebx,0x4(%edx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10eb26: a1 c4 74 12 00 mov 0x1274c4,%eax 10eb2b: 89 43 14 mov %eax,0x14(%ebx) 10eb2e: eb ba jmp 10eaea <_Watchdog_Insert+0x7a> * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 10eb30: ff 75 f0 pushl -0x10(%ebp) 10eb33: 9d popf exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10eb34: 58 pop %eax 10eb35: 5b pop %ebx 10eb36: 5e pop %esi 10eb37: 5f pop %edi 10eb38: c9 leave 10eb39: c3 ret 10eb3a: 66 90 xchg %ax,%ax if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; 10eb3c: 89 3d 14 74 12 00 mov %edi,0x127414 goto restart; 10eb42: e9 5d ff ff ff jmp 10eaa4 <_Watchdog_Insert+0x34> =============================================================================== 0010eba8 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10eba8: 55 push %ebp 10eba9: 89 e5 mov %esp,%ebp 10ebab: 56 push %esi 10ebac: 53 push %ebx 10ebad: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10ebb0: 9c pushf 10ebb1: fa cli 10ebb2: 59 pop %ecx previous_state = the_watchdog->state; 10ebb3: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10ebb6: 83 f8 01 cmp $0x1,%eax 10ebb9: 74 4d je 10ec08 <_Watchdog_Remove+0x60> 10ebbb: 73 0f jae 10ebcc <_Watchdog_Remove+0x24> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10ebbd: 8b 1d c4 74 12 00 mov 0x1274c4,%ebx 10ebc3: 89 5a 18 mov %ebx,0x18(%edx) _ISR_Enable( level ); 10ebc6: 51 push %ecx 10ebc7: 9d popf return( previous_state ); } 10ebc8: 5b pop %ebx 10ebc9: 5e pop %esi 10ebca: c9 leave 10ebcb: c3 ret Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 10ebcc: 83 f8 03 cmp $0x3,%eax 10ebcf: 77 ec ja 10ebbd <_Watchdog_Remove+0x15> <== NEVER TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10ebd1: 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 ); 10ebd8: 8b 1a mov (%edx),%ebx next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10ebda: 8b 33 mov (%ebx),%esi 10ebdc: 85 f6 test %esi,%esi 10ebde: 74 06 je 10ebe6 <_Watchdog_Remove+0x3e> next_watchdog->delta_interval += the_watchdog->delta_interval; 10ebe0: 8b 72 10 mov 0x10(%edx),%esi 10ebe3: 01 73 10 add %esi,0x10(%ebx) if ( _Watchdog_Sync_count ) 10ebe6: 8b 35 c0 74 12 00 mov 0x1274c0,%esi 10ebec: 85 f6 test %esi,%esi 10ebee: 74 0c je 10ebfc <_Watchdog_Remove+0x54> _Watchdog_Sync_level = _ISR_Nest_level; 10ebf0: 8b 35 f4 73 12 00 mov 0x1273f4,%esi 10ebf6: 89 35 14 74 12 00 mov %esi,0x127414 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10ebfc: 8b 72 04 mov 0x4(%edx),%esi next->previous = previous; 10ebff: 89 73 04 mov %esi,0x4(%ebx) previous->next = next; 10ec02: 89 1e mov %ebx,(%esi) 10ec04: eb b7 jmp 10ebbd <_Watchdog_Remove+0x15> 10ec06: 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; 10ec08: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10ec0f: eb ac jmp 10ebbd <_Watchdog_Remove+0x15> =============================================================================== 00110034 <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 110034: 55 push %ebp 110035: 89 e5 mov %esp,%ebp 110037: 57 push %edi 110038: 56 push %esi 110039: 53 push %ebx 11003a: 83 ec 2c sub $0x2c,%esp 11003d: 8b 55 08 mov 0x8(%ebp),%edx 110040: 8b 45 0c mov 0xc(%ebp),%eax printk( 110043: 8b 78 24 mov 0x24(%eax),%edi 110046: 8b 70 20 mov 0x20(%eax),%esi 110049: 8b 58 1c mov 0x1c(%eax),%ebx 11004c: 8b 48 0c mov 0xc(%eax),%ecx 11004f: 89 4d d4 mov %ecx,-0x2c(%ebp) 110052: 8b 48 10 mov 0x10(%eax),%ecx 110055: 89 4d e0 mov %ecx,-0x20(%ebp) 110058: 85 d2 test %edx,%edx 11005a: 74 2c je 110088 <_Watchdog_Report+0x54> 11005c: b9 03 34 12 00 mov $0x123403,%ecx 110061: 83 ec 0c sub $0xc,%esp 110064: 57 push %edi 110065: 56 push %esi 110066: 53 push %ebx 110067: 50 push %eax 110068: ff 75 d4 pushl -0x2c(%ebp) 11006b: ff 75 e0 pushl -0x20(%ebp) 11006e: 51 push %ecx 11006f: 52 push %edx 110070: 68 06 3e 12 00 push $0x123e06 110075: e8 1e 9f ff ff call 109f98 11007a: 83 c4 30 add $0x30,%esp watch, watch->routine, watch->id, watch->user_data ); } 11007d: 8d 65 f4 lea -0xc(%ebp),%esp 110080: 5b pop %ebx 110081: 5e pop %esi 110082: 5f pop %edi 110083: c9 leave 110084: c3 ret 110085: 8d 76 00 lea 0x0(%esi),%esi void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( 110088: b9 55 3c 12 00 mov $0x123c55,%ecx 11008d: 89 ca mov %ecx,%edx 11008f: eb d0 jmp 110061 <_Watchdog_Report+0x2d> =============================================================================== 0010ffc4 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10ffc4: 55 push %ebp 10ffc5: 89 e5 mov %esp,%ebp 10ffc7: 57 push %edi 10ffc8: 56 push %esi 10ffc9: 53 push %ebx 10ffca: 83 ec 20 sub $0x20,%esp 10ffcd: 8b 7d 08 mov 0x8(%ebp),%edi 10ffd0: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10ffd3: 9c pushf 10ffd4: fa cli 10ffd5: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10ffd8: 56 push %esi 10ffd9: 57 push %edi 10ffda: 68 d0 3d 12 00 push $0x123dd0 10ffdf: e8 b4 9f ff ff call 109f98 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10ffe4: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ffe6: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10ffe9: 83 c4 10 add $0x10,%esp 10ffec: 39 f3 cmp %esi,%ebx 10ffee: 74 31 je 110021 <_Watchdog_Report_chain+0x5d><== NEVER TAKEN node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10fff0: 83 ec 08 sub $0x8,%esp 10fff3: 53 push %ebx 10fff4: 6a 00 push $0x0 10fff6: e8 39 00 00 00 call 110034 <_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 ) 10fffb: 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 ; 10fffd: 83 c4 10 add $0x10,%esp 110000: 39 f3 cmp %esi,%ebx 110002: 75 ec jne 10fff0 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 110004: 83 ec 08 sub $0x8,%esp 110007: 57 push %edi 110008: 68 e7 3d 12 00 push $0x123de7 11000d: e8 86 9f ff ff call 109f98 110012: 83 c4 10 add $0x10,%esp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 110015: ff 75 e4 pushl -0x1c(%ebp) 110018: 9d popf } 110019: 8d 65 f4 lea -0xc(%ebp),%esp 11001c: 5b pop %ebx 11001d: 5e pop %esi 11001e: 5f pop %edi 11001f: c9 leave 110020: c3 ret _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 110021: 83 ec 0c sub $0xc,%esp 110024: 68 f6 3d 12 00 push $0x123df6 110029: e8 6a 9f ff ff call 109f98 11002e: 83 c4 10 add $0x10,%esp 110031: eb e2 jmp 110015 <_Watchdog_Report_chain+0x51> =============================================================================== 0010ec14 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10ec14: 55 push %ebp 10ec15: 89 e5 mov %esp,%ebp 10ec17: 57 push %edi 10ec18: 56 push %esi 10ec19: 53 push %ebx 10ec1a: 83 ec 1c sub $0x1c,%esp 10ec1d: 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 ); 10ec20: 9c pushf 10ec21: fa cli 10ec22: 5e pop %esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10ec23: 8b 1f mov (%edi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ec25: 8d 47 04 lea 0x4(%edi),%eax 10ec28: 89 45 e4 mov %eax,-0x1c(%ebp) if ( _Chain_Is_empty( header ) ) 10ec2b: 39 c3 cmp %eax,%ebx 10ec2d: 74 11 je 10ec40 <_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) { 10ec2f: 8b 43 10 mov 0x10(%ebx),%eax 10ec32: 85 c0 test %eax,%eax 10ec34: 74 34 je 10ec6a <_Watchdog_Tickle+0x56> the_watchdog->delta_interval--; 10ec36: 48 dec %eax 10ec37: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10ec3a: 85 c0 test %eax,%eax 10ec3c: 74 2c je 10ec6a <_Watchdog_Tickle+0x56> 10ec3e: 66 90 xchg %ax,%ax the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 10ec40: 56 push %esi 10ec41: 9d popf } 10ec42: 8d 65 f4 lea -0xc(%ebp),%esp 10ec45: 5b pop %ebx 10ec46: 5e pop %esi 10ec47: 5f pop %edi 10ec48: c9 leave 10ec49: c3 ret _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10ec4a: 83 ec 08 sub $0x8,%esp 10ec4d: ff 73 24 pushl 0x24(%ebx) 10ec50: ff 73 20 pushl 0x20(%ebx) 10ec53: ff 53 1c call *0x1c(%ebx) 10ec56: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10ec59: 9c pushf 10ec5a: fa cli 10ec5b: 5e pop %esi RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10ec5c: 8b 1f mov (%edi),%ebx the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10ec5e: 39 5d e4 cmp %ebx,-0x1c(%ebp) 10ec61: 74 dd je 10ec40 <_Watchdog_Tickle+0x2c> 10ec63: 8b 43 10 mov 0x10(%ebx),%eax 10ec66: 85 c0 test %eax,%eax 10ec68: 75 d6 jne 10ec40 <_Watchdog_Tickle+0x2c> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10ec6a: 83 ec 0c sub $0xc,%esp 10ec6d: 53 push %ebx 10ec6e: e8 35 ff ff ff call 10eba8 <_Watchdog_Remove> _ISR_Enable( level ); 10ec73: 56 push %esi 10ec74: 9d popf switch( watchdog_state ) { 10ec75: 83 c4 10 add $0x10,%esp 10ec78: 83 f8 02 cmp $0x2,%eax 10ec7b: 75 dc jne 10ec59 <_Watchdog_Tickle+0x45> <== NEVER TAKEN 10ec7d: eb cb jmp 10ec4a <_Watchdog_Tickle+0x36> =============================================================================== 0010ece0 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 10ece0: 55 push %ebp 10ece1: 89 e5 mov %esp,%ebp 10ece3: 57 push %edi 10ece4: 53 push %ebx uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 10ece5: 8b 1d 20 32 12 00 mov 0x123220,%ebx uintptr_t size = Configuration.work_space_size; 10eceb: 8b 15 24 32 12 00 mov 0x123224,%edx if ( Configuration.do_zero_of_workspace ) 10ecf1: 80 3d 48 32 12 00 00 cmpb $0x0,0x123248 10ecf8: 75 1e jne 10ed18 <_Workspace_Handler_initialization+0x38> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 10ecfa: 6a 04 push $0x4 10ecfc: 52 push %edx 10ecfd: 53 push %ebx 10ecfe: 68 80 73 12 00 push $0x127380 10ed03: e8 b4 dd ff ff call 10cabc <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 10ed08: 83 c4 10 add $0x10,%esp 10ed0b: 85 c0 test %eax,%eax 10ed0d: 74 13 je 10ed22 <_Workspace_Handler_initialization+0x42> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 10ed0f: 8d 65 f8 lea -0x8(%ebp),%esp 10ed12: 5b pop %ebx 10ed13: 5f pop %edi 10ed14: c9 leave 10ed15: c3 ret 10ed16: 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 ); 10ed18: 31 c0 xor %eax,%eax 10ed1a: 89 df mov %ebx,%edi 10ed1c: 89 d1 mov %edx,%ecx 10ed1e: f3 aa rep stos %al,%es:(%edi) 10ed20: eb d8 jmp 10ecfa <_Workspace_Handler_initialization+0x1a> size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 10ed22: 52 push %edx 10ed23: 6a 03 push $0x3 10ed25: 6a 01 push $0x1 10ed27: 6a 00 push $0x0 10ed29: e8 b2 e0 ff ff call 10cde0 <_Internal_error_Occurred> =============================================================================== 00110f90 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 110f90: 55 push %ebp 110f91: 89 e5 mov %esp,%ebp 110f93: 57 push %edi 110f94: 56 push %esi 110f95: 53 push %ebx 110f96: 83 ec 2c sub $0x2c,%esp 110f99: 8b 5d 08 mov 0x8(%ebp),%ebx 110f9c: 8b 7d 0c mov 0xc(%ebp),%edi 110f9f: 8b 45 10 mov 0x10(%ebp),%eax 110fa2: 8b 75 14 mov 0x14(%ebp),%esi Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 110fa5: 85 db test %ebx,%ebx 110fa7: 0f 84 87 00 00 00 je 111034 return RTEMS_INVALID_NAME; if ( !id ) 110fad: 85 f6 test %esi,%esi 110faf: 0f 84 bb 00 00 00 je 111070 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 110fb5: f7 c7 10 00 00 00 test $0x10,%edi 110fbb: 0f 84 83 00 00 00 je 111044 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 110fc1: 85 c0 test %eax,%eax 110fc3: 0f 84 87 00 00 00 je 111050 if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 110fc9: 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; 110fd0: 89 45 e4 mov %eax,-0x1c(%ebp) 110fd3: a1 58 73 12 00 mov 0x127358,%eax 110fd8: 40 inc %eax 110fd9: 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 ); 110fde: 83 ec 0c sub $0xc,%esp 110fe1: 68 20 76 12 00 push $0x127620 110fe6: e8 8d be ff ff call 10ce78 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 110feb: 83 c4 10 add $0x10,%esp 110fee: 85 c0 test %eax,%eax 110ff0: 74 6a je 11105c _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 110ff2: 89 78 10 mov %edi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 110ff5: 83 ec 08 sub $0x8,%esp 110ff8: 8d 55 e0 lea -0x20(%ebp),%edx 110ffb: 52 push %edx 110ffc: 8d 50 14 lea 0x14(%eax),%edx 110fff: 52 push %edx 111000: 89 45 d4 mov %eax,-0x2c(%ebp) 111003: e8 5c 06 00 00 call 111664 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 111008: 8b 45 d4 mov -0x2c(%ebp),%eax 11100b: 8b 50 08 mov 0x8(%eax),%edx 11100e: 0f b7 fa movzwl %dx,%edi 111011: 8b 0d 3c 76 12 00 mov 0x12763c,%ecx 111017: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 11101a: 89 58 0c mov %ebx,0xc(%eax) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 11101d: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 11101f: e8 4c cb ff ff call 10db70 <_Thread_Enable_dispatch> 111024: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 111026: 83 c4 10 add $0x10,%esp } 111029: 8d 65 f4 lea -0xc(%ebp),%esp 11102c: 5b pop %ebx 11102d: 5e pop %esi 11102e: 5f pop %edi 11102f: c9 leave 111030: c3 ret 111031: 8d 76 00 lea 0x0(%esi),%esi ) { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 111034: b8 03 00 00 00 mov $0x3,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 111039: 8d 65 f4 lea -0xc(%ebp),%esp 11103c: 5b pop %ebx 11103d: 5e pop %esi 11103e: 5f pop %edi 11103f: c9 leave 111040: c3 ret 111041: 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; 111044: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) 11104b: eb 83 jmp 110fd0 11104d: 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 ) 111050: b0 0a mov $0xa,%al *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 111052: 8d 65 f4 lea -0xc(%ebp),%esp 111055: 5b pop %ebx 111056: 5e pop %esi 111057: 5f pop %edi 111058: c9 leave 111059: c3 ret 11105a: 66 90 xchg %ax,%ax _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 11105c: e8 0f cb ff ff call 10db70 <_Thread_Enable_dispatch> 111061: b8 05 00 00 00 mov $0x5,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 111066: 8d 65 f4 lea -0xc(%ebp),%esp 111069: 5b pop %ebx 11106a: 5e pop %esi 11106b: 5f pop %edi 11106c: c9 leave 11106d: c3 ret 11106e: 66 90 xchg %ax,%ax CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 111070: b8 09 00 00 00 mov $0x9,%eax 111075: eb b2 jmp 111029 =============================================================================== 00116318 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 116318: 55 push %ebp 116319: 89 e5 mov %esp,%ebp 11631b: 53 push %ebx 11631c: 83 ec 04 sub $0x4,%esp 11631f: 8b 45 08 mov 0x8(%ebp),%eax 116322: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !time_buffer ) 116325: 85 db test %ebx,%ebx 116327: 74 3b je 116364 return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 116329: 85 c0 test %eax,%eax 11632b: 74 2b je 116358 return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 11632d: 83 f8 01 cmp $0x1,%eax 116330: 74 3e je 116370 return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 116332: 83 f8 02 cmp $0x2,%eax 116335: 74 45 je 11637c *interval = rtems_clock_get_ticks_since_boot(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 116337: 83 f8 03 cmp $0x3,%eax 11633a: 74 4c je 116388 *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 11633c: 83 f8 04 cmp $0x4,%eax 11633f: 74 0b je 11634c 116341: b8 0a 00 00 00 mov $0xa,%eax return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 116346: 5a pop %edx 116347: 5b pop %ebx 116348: c9 leave 116349: c3 ret 11634a: 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 ); 11634c: 89 5d 08 mov %ebx,0x8(%ebp) return RTEMS_INVALID_NUMBER; } 11634f: 59 pop %ecx 116350: 5b pop %ebx 116351: 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 ); 116352: e9 49 01 00 00 jmp 1164a0 116357: 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 ); 116358: 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; } 11635b: 58 pop %eax 11635c: 5b pop %ebx 11635d: 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 ); 11635e: e9 7d 00 00 00 jmp 1163e0 116363: 90 nop rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { if ( !time_buffer ) 116364: 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; } 116369: 5a pop %edx 11636a: 5b pop %ebx 11636b: c9 leave 11636c: c3 ret 11636d: 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); 116370: 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; } 116373: 5b pop %ebx 116374: 5b pop %ebx 116375: 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); 116376: e9 19 00 00 00 jmp 116394 11637b: 90 nop if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 11637c: e8 53 00 00 00 call 1163d4 116381: 89 03 mov %eax,(%ebx) 116383: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116385: eb bf jmp 116346 116387: 90 nop } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 116388: e8 33 00 00 00 call 1163c0 11638d: 89 03 mov %eax,(%ebx) 11638f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116391: eb b3 jmp 116346 =============================================================================== 0010c628 : #include rtems_status_code rtems_clock_get_tod( rtems_time_of_day *time_buffer ) { 10c628: 55 push %ebp 10c629: 89 e5 mov %esp,%ebp 10c62b: 56 push %esi 10c62c: 53 push %ebx 10c62d: 83 ec 50 sub $0x50,%esp 10c630: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 10c633: 85 db test %ebx,%ebx 10c635: 0f 84 a1 00 00 00 je 10c6dc return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 10c63b: 80 3d ec b7 12 00 00 cmpb $0x0,0x12b7ec 10c642: 75 0c jne 10c650 10c644: 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; } 10c649: 8d 65 f8 lea -0x8(%ebp),%esp 10c64c: 5b pop %ebx 10c64d: 5e pop %esi 10c64e: c9 leave 10c64f: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 10c650: 9c pushf 10c651: fa cli 10c652: 5e pop %esi _TOD_Get( &now ); 10c653: 83 ec 0c sub $0xc,%esp 10c656: 8d 45 e8 lea -0x18(%ebp),%eax 10c659: 50 push %eax 10c65a: e8 79 18 00 00 call 10ded8 <_TOD_Get> _ISR_Enable(level); 10c65f: 56 push %esi 10c660: 9d popf useconds = (suseconds_t)now.tv_nsec; 10c661: 8b 4d ec mov -0x14(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 10c664: 8b 45 e8 mov -0x18(%ebp),%eax 10c667: 89 45 f0 mov %eax,-0x10(%ebp) time->tv_usec = useconds; 10c66a: be d3 4d 62 10 mov $0x10624dd3,%esi 10c66f: 89 c8 mov %ecx,%eax 10c671: f7 ee imul %esi 10c673: 89 45 b0 mov %eax,-0x50(%ebp) 10c676: 89 55 b4 mov %edx,-0x4c(%ebp) 10c679: 8b 75 b4 mov -0x4c(%ebp),%esi 10c67c: c1 fe 06 sar $0x6,%esi 10c67f: 89 c8 mov %ecx,%eax 10c681: 99 cltd 10c682: 29 d6 sub %edx,%esi 10c684: 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 ); 10c687: 58 pop %eax 10c688: 5a pop %edx 10c689: 8d 45 c4 lea -0x3c(%ebp),%eax 10c68c: 50 push %eax 10c68d: 8d 45 f0 lea -0x10(%ebp),%eax 10c690: 50 push %eax 10c691: e8 0e 97 00 00 call 115da4 /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 10c696: 8b 45 d8 mov -0x28(%ebp),%eax 10c699: 05 6c 07 00 00 add $0x76c,%eax 10c69e: 89 03 mov %eax,(%ebx) tmbuf->month = time.tm_mon + 1; 10c6a0: 8b 45 d4 mov -0x2c(%ebp),%eax 10c6a3: 40 inc %eax 10c6a4: 89 43 04 mov %eax,0x4(%ebx) tmbuf->day = time.tm_mday; 10c6a7: 8b 45 d0 mov -0x30(%ebp),%eax 10c6aa: 89 43 08 mov %eax,0x8(%ebx) tmbuf->hour = time.tm_hour; 10c6ad: 8b 45 cc mov -0x34(%ebp),%eax 10c6b0: 89 43 0c mov %eax,0xc(%ebx) tmbuf->minute = time.tm_min; 10c6b3: 8b 45 c8 mov -0x38(%ebp),%eax 10c6b6: 89 43 10 mov %eax,0x10(%ebx) tmbuf->second = time.tm_sec; 10c6b9: 8b 45 c4 mov -0x3c(%ebp),%eax 10c6bc: 89 43 14 mov %eax,0x14(%ebx) tmbuf->ticks = now.tv_usec / 10c6bf: 8b 45 f4 mov -0xc(%ebp),%eax 10c6c2: 31 d2 xor %edx,%edx 10c6c4: f7 35 4c 72 12 00 divl 0x12724c 10c6ca: 89 43 18 mov %eax,0x18(%ebx) 10c6cd: 31 c0 xor %eax,%eax rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; 10c6cf: 83 c4 10 add $0x10,%esp } 10c6d2: 8d 65 f8 lea -0x8(%ebp),%esp 10c6d5: 5b pop %ebx 10c6d6: 5e pop %esi 10c6d7: c9 leave 10c6d8: c3 ret 10c6d9: 8d 76 00 lea 0x0(%esi),%esi { rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 10c6dc: b8 09 00 00 00 mov $0x9,%eax 10c6e1: e9 63 ff ff ff jmp 10c649 =============================================================================== 001164a0 : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 1164a0: 55 push %ebp 1164a1: 89 e5 mov %esp,%ebp 1164a3: 56 push %esi 1164a4: 53 push %ebx 1164a5: 83 ec 20 sub $0x20,%esp 1164a8: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !time ) 1164ab: 85 db test %ebx,%ebx 1164ad: 74 59 je 116508 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 1164af: 80 3d ec 2b 14 00 00 cmpb $0x0,0x142bec 1164b6: 75 0c jne 1164c4 1164b8: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 1164bd: 8d 65 f8 lea -0x8(%ebp),%esp 1164c0: 5b pop %ebx 1164c1: 5e pop %esi 1164c2: c9 leave 1164c3: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 1164c4: 9c pushf 1164c5: fa cli 1164c6: 5e pop %esi _TOD_Get( &now ); 1164c7: 83 ec 0c sub $0xc,%esp 1164ca: 8d 45 f0 lea -0x10(%ebp),%eax 1164cd: 50 push %eax 1164ce: e8 2d 43 00 00 call 11a800 <_TOD_Get> _ISR_Enable(level); 1164d3: 56 push %esi 1164d4: 9d popf useconds = (suseconds_t)now.tv_nsec; 1164d5: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 1164d8: 8b 45 f0 mov -0x10(%ebp),%eax 1164db: 89 03 mov %eax,(%ebx) time->tv_usec = useconds; 1164dd: be d3 4d 62 10 mov $0x10624dd3,%esi 1164e2: 89 c8 mov %ecx,%eax 1164e4: f7 ee imul %esi 1164e6: 89 45 e0 mov %eax,-0x20(%ebp) 1164e9: 89 55 e4 mov %edx,-0x1c(%ebp) 1164ec: 8b 75 e4 mov -0x1c(%ebp),%esi 1164ef: c1 fe 06 sar $0x6,%esi 1164f2: 89 c8 mov %ecx,%eax 1164f4: 99 cltd 1164f5: 29 d6 sub %edx,%esi 1164f7: 89 73 04 mov %esi,0x4(%ebx) 1164fa: 31 c0 xor %eax,%eax if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; 1164fc: 83 c4 10 add $0x10,%esp } 1164ff: 8d 65 f8 lea -0x8(%ebp),%esp 116502: 5b pop %ebx 116503: 5e pop %esi 116504: c9 leave 116505: c3 ret 116506: 66 90 xchg %ax,%ax rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { if ( !time ) 116508: b8 09 00 00 00 mov $0x9,%eax 11650d: eb ae jmp 1164bd =============================================================================== 0010b7c4 : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 10b7c4: 55 push %ebp 10b7c5: 89 e5 mov %esp,%ebp 10b7c7: 83 ec 08 sub $0x8,%esp 10b7ca: 8b 45 08 mov 0x8(%ebp),%eax if ( !uptime ) 10b7cd: 85 c0 test %eax,%eax 10b7cf: 74 13 je 10b7e4 return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 10b7d1: 83 ec 0c sub $0xc,%esp 10b7d4: 50 push %eax 10b7d5: e8 9e 15 00 00 call 10cd78 <_TOD_Get_uptime_as_timespec> 10b7da: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b7dc: 83 c4 10 add $0x10,%esp } 10b7df: c9 leave 10b7e0: c3 ret 10b7e1: 8d 76 00 lea 0x0(%esi),%esi */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime ) 10b7e4: b0 09 mov $0x9,%al return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); return RTEMS_SUCCESSFUL; } 10b7e6: c9 leave 10b7e7: c3 ret =============================================================================== 0010c700 : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 10c700: 55 push %ebp 10c701: 89 e5 mov %esp,%ebp 10c703: 53 push %ebx 10c704: 83 ec 14 sub $0x14,%esp 10c707: 8b 5d 08 mov 0x8(%ebp),%ebx struct timespec newtime; if ( !time_buffer ) 10c70a: 85 db test %ebx,%ebx 10c70c: 74 66 je 10c774 return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 10c70e: 83 ec 0c sub $0xc,%esp 10c711: 53 push %ebx 10c712: e8 39 01 00 00 call 10c850 <_TOD_Validate> 10c717: 83 c4 10 add $0x10,%esp 10c71a: 84 c0 test %al,%al 10c71c: 75 0a jne 10c728 10c71e: b8 14 00 00 00 mov $0x14,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10c723: 8b 5d fc mov -0x4(%ebp),%ebx 10c726: c9 leave 10c727: c3 ret if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 10c728: 83 ec 0c sub $0xc,%esp 10c72b: 53 push %ebx 10c72c: e8 93 00 00 00 call 10c7c4 <_TOD_To_seconds> 10c731: 89 45 f0 mov %eax,-0x10(%ebp) newtime.tv_nsec = time_buffer->ticks * 10c734: 8b 43 18 mov 0x18(%ebx),%eax 10c737: 0f af 05 4c 72 12 00 imul 0x12724c,%eax 10c73e: 8d 04 80 lea (%eax,%eax,4),%eax 10c741: 8d 04 80 lea (%eax,%eax,4),%eax 10c744: 8d 04 80 lea (%eax,%eax,4),%eax 10c747: c1 e0 03 shl $0x3,%eax 10c74a: 89 45 f4 mov %eax,-0xc(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c74d: a1 d8 b7 12 00 mov 0x12b7d8,%eax 10c752: 40 inc %eax 10c753: a3 d8 b7 12 00 mov %eax,0x12b7d8 rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 10c758: 8d 45 f0 lea -0x10(%ebp),%eax 10c75b: 89 04 24 mov %eax,(%esp) 10c75e: e8 59 18 00 00 call 10dfbc <_TOD_Set> _Thread_Enable_dispatch(); 10c763: e8 1c 2b 00 00 call 10f284 <_Thread_Enable_dispatch> 10c768: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10c76a: 83 c4 10 add $0x10,%esp } return RTEMS_INVALID_CLOCK; } 10c76d: 8b 5d fc mov -0x4(%ebp),%ebx 10c770: c9 leave 10c771: c3 ret 10c772: 66 90 xchg %ax,%ax rtems_time_of_day *time_buffer ) { struct timespec newtime; if ( !time_buffer ) 10c774: b8 09 00 00 00 mov $0x9,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10c779: 8b 5d fc mov -0x4(%ebp),%ebx 10c77c: c9 leave 10c77d: c3 ret =============================================================================== 0010b5d0 : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { 10b5d0: 55 push %ebp 10b5d1: 89 e5 mov %esp,%ebp 10b5d3: 83 ec 08 sub $0x8,%esp _TOD_Tickle_ticks(); 10b5d6: e8 65 14 00 00 call 10ca40 <_TOD_Tickle_ticks> */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); 10b5db: 83 ec 0c sub $0xc,%esp 10b5de: 68 38 74 12 00 push $0x127438 10b5e3: e8 2c 36 00 00 call 10ec14 <_Watchdog_Tickle> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 10b5e8: e8 d3 30 00 00 call 10e6c0 <_Thread_Tickle_timeslice> * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void ) { return ( _Context_Switch_necessary ); 10b5ed: a0 28 74 12 00 mov 0x127428,%al if ( _Thread_Is_context_switch_necessary() && 10b5f2: 83 c4 10 add $0x10,%esp 10b5f5: 84 c0 test %al,%al 10b5f7: 74 09 je 10b602 * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); 10b5f9: a1 58 73 12 00 mov 0x127358,%eax 10b5fe: 85 c0 test %eax,%eax 10b600: 74 06 je 10b608 _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 10b602: 31 c0 xor %eax,%eax 10b604: c9 leave 10b605: c3 ret 10b606: 66 90 xchg %ax,%ax _Thread_Tickle_timeslice(); if ( _Thread_Is_context_switch_necessary() && _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); 10b608: e8 07 24 00 00 call 10da14 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; } 10b60d: 31 c0 xor %eax,%eax 10b60f: c9 leave 10b610: c3 ret =============================================================================== 0010b798 : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { 10b798: 55 push %ebp 10b799: 89 e5 mov %esp,%ebp 10b79b: 53 push %ebx 10b79c: 83 ec 1c sub $0x1c,%esp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); 10b79f: 8d 45 f4 lea -0xc(%ebp),%eax 10b7a2: 50 push %eax 10b7a3: ff 75 08 pushl 0x8(%ebp) 10b7a6: e8 e9 23 00 00 call 10db94 <_Thread_Get> switch ( location ) { 10b7ab: 83 c4 10 add $0x10,%esp 10b7ae: 8b 55 f4 mov -0xc(%ebp),%edx 10b7b1: 85 d2 test %edx,%edx 10b7b3: 75 2b jne 10b7e0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 10b7b5: 8b 90 f0 00 00 00 mov 0xf0(%eax),%edx rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 10b7bb: 9c pushf 10b7bc: fa cli 10b7bd: 59 pop %ecx *the_event_set |= the_new_events; 10b7be: 8b 5d 0c mov 0xc(%ebp),%ebx 10b7c1: 09 1a or %ebx,(%edx) _ISR_Enable( level ); 10b7c3: 51 push %ecx 10b7c4: 9d popf _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 10b7c5: 83 ec 0c sub $0xc,%esp 10b7c8: 50 push %eax 10b7c9: e8 1e 00 00 00 call 10b7ec <_Event_Surrender> _Thread_Enable_dispatch(); 10b7ce: e8 9d 23 00 00 call 10db70 <_Thread_Enable_dispatch> 10b7d3: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b7d5: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b7d8: 8b 5d fc mov -0x4(%ebp),%ebx 10b7db: c9 leave 10b7dc: c3 ret 10b7dd: 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 ) { 10b7e0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b7e5: 8b 5d fc mov -0x4(%ebp),%ebx 10b7e8: c9 leave 10b7e9: c3 ret =============================================================================== 0010d738 : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { 10d738: 55 push %ebp 10d739: 89 e5 mov %esp,%ebp 10d73b: 57 push %edi 10d73c: 56 push %esi 10d73d: 53 push %ebx 10d73e: 83 ec 1c sub $0x1c,%esp 10d741: 8b 75 0c mov 0xc(%ebp),%esi 10d744: 8b 5d 10 mov 0x10(%ebp),%ebx Extension_Control *the_extension; if ( !id ) 10d747: 85 db test %ebx,%ebx 10d749: 0f 84 85 00 00 00 je 10d7d4 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10d74f: 8b 45 08 mov 0x8(%ebp),%eax 10d752: 85 c0 test %eax,%eax 10d754: 75 0e jne 10d764 10d756: b8 03 00 00 00 mov $0x3,%eax ); *id = the_extension->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10d75b: 8d 65 f4 lea -0xc(%ebp),%esp 10d75e: 5b pop %ebx 10d75f: 5e pop %esi 10d760: 5f pop %edi 10d761: c9 leave 10d762: c3 ret 10d763: 90 nop rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d764: a1 d8 b7 12 00 mov 0x12b7d8,%eax 10d769: 40 inc %eax 10d76a: a3 d8 b7 12 00 mov %eax,0x12b7d8 #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 10d76f: 83 ec 0c sub $0xc,%esp 10d772: 68 60 ba 12 00 push $0x12ba60 10d777: e8 4c 0d 00 00 call 10e4c8 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 10d77c: 83 c4 10 add $0x10,%esp 10d77f: 85 c0 test %eax,%eax 10d781: 74 45 je 10d7c8 <== NEVER TAKEN RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 10d783: 8d 78 24 lea 0x24(%eax),%edi 10d786: b9 08 00 00 00 mov $0x8,%ecx 10d78b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10d78d: 83 ec 0c sub $0xc,%esp 10d790: 8d 50 10 lea 0x10(%eax),%edx 10d793: 52 push %edx 10d794: 89 45 e4 mov %eax,-0x1c(%ebp) 10d797: e8 c4 29 00 00 call 110160 <_User_extensions_Add_set> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d79c: 8b 45 e4 mov -0x1c(%ebp),%eax 10d79f: 8b 50 08 mov 0x8(%eax),%edx 10d7a2: 0f b7 f2 movzwl %dx,%esi 10d7a5: 8b 0d 7c ba 12 00 mov 0x12ba7c,%ecx 10d7ab: 89 04 b1 mov %eax,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10d7ae: 8b 4d 08 mov 0x8(%ebp),%ecx 10d7b1: 89 48 0c mov %ecx,0xc(%eax) &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 10d7b4: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10d7b6: e8 c9 1a 00 00 call 10f284 <_Thread_Enable_dispatch> 10d7bb: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10d7bd: 83 c4 10 add $0x10,%esp } 10d7c0: 8d 65 f4 lea -0xc(%ebp),%esp 10d7c3: 5b pop %ebx 10d7c4: 5e pop %esi 10d7c5: 5f pop %edi 10d7c6: c9 leave 10d7c7: c3 ret _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { _Thread_Enable_dispatch(); 10d7c8: e8 b7 1a 00 00 call 10f284 <_Thread_Enable_dispatch> 10d7cd: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10d7d2: eb 87 jmp 10d75b rtems_id *id ) { Extension_Control *the_extension; if ( !id ) 10d7d4: b8 09 00 00 00 mov $0x9,%eax 10d7d9: eb 80 jmp 10d75b =============================================================================== 0010d5bc : #include rtems_status_code rtems_extension_delete( rtems_id id ) { 10d5bc: 55 push %ebp 10d5bd: 89 e5 mov %esp,%ebp 10d5bf: 53 push %ebx 10d5c0: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get ( Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) 10d5c3: 8d 45 f4 lea -0xc(%ebp),%eax 10d5c6: 50 push %eax 10d5c7: ff 75 08 pushl 0x8(%ebp) 10d5ca: 68 40 aa 12 00 push $0x12aa40 10d5cf: e8 2c 11 00 00 call 10e700 <_Objects_Get> 10d5d4: 89 c3 mov %eax,%ebx Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 10d5d6: 83 c4 10 add $0x10,%esp 10d5d9: 8b 55 f4 mov -0xc(%ebp),%edx 10d5dc: 85 d2 test %edx,%edx 10d5de: 75 38 jne 10d618 case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 10d5e0: 83 ec 0c sub $0xc,%esp 10d5e3: 8d 40 10 lea 0x10(%eax),%eax 10d5e6: 50 push %eax 10d5e7: e8 64 28 00 00 call 10fe50 <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 10d5ec: 59 pop %ecx 10d5ed: 58 pop %eax 10d5ee: 53 push %ebx 10d5ef: 68 40 aa 12 00 push $0x12aa40 10d5f4: e8 d3 0c 00 00 call 10e2cc <_Objects_Close> RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 10d5f9: 58 pop %eax 10d5fa: 5a pop %edx 10d5fb: 53 push %ebx 10d5fc: 68 40 aa 12 00 push $0x12aa40 10d601: e8 ca 0f 00 00 call 10e5d0 <_Objects_Free> _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 10d606: e8 3d 19 00 00 call 10ef48 <_Thread_Enable_dispatch> 10d60b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10d60d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d610: 8b 5d fc mov -0x4(%ebp),%ebx 10d613: c9 leave 10d614: c3 ret 10d615: 8d 76 00 lea 0x0(%esi),%esi { Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 10d618: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d61d: 8b 5d fc mov -0x4(%ebp),%ebx 10d620: c9 leave 10d621: c3 ret =============================================================================== 00113a90 : rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 113a90: 55 push %ebp 113a91: 89 e5 mov %esp,%ebp 113a93: 56 push %esi 113a94: 53 push %ebx 113a95: 8b 45 08 mov 0x8(%ebp),%eax 113a98: 8b 4d 0c mov 0xc(%ebp),%ecx 113a9b: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113a9e: 39 05 00 77 12 00 cmp %eax,0x127700 113aa4: 76 22 jbe 113ac8 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; 113aa6: 8d 34 40 lea (%eax,%eax,2),%esi 113aa9: 8b 15 04 77 12 00 mov 0x127704,%edx 113aaf: 8b 54 f2 08 mov 0x8(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113ab3: 85 d2 test %edx,%edx 113ab5: 74 1d je 113ad4 113ab7: 89 5d 10 mov %ebx,0x10(%ebp) 113aba: 89 4d 0c mov %ecx,0xc(%ebp) 113abd: 89 45 08 mov %eax,0x8(%ebp) } 113ac0: 5b pop %ebx 113ac1: 5e pop %esi 113ac2: 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; 113ac3: ff e2 jmp *%edx 113ac5: 8d 76 00 lea 0x0(%esi),%esi void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113ac8: 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; } 113acd: 5b pop %ebx 113ace: 5e pop %esi 113acf: c9 leave 113ad0: c3 ret 113ad1: 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; 113ad4: 31 c0 xor %eax,%eax } 113ad6: 5b pop %ebx 113ad7: 5e pop %esi 113ad8: c9 leave 113ad9: c3 ret =============================================================================== 00113adc : rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 113adc: 55 push %ebp 113add: 89 e5 mov %esp,%ebp 113adf: 56 push %esi 113ae0: 53 push %ebx 113ae1: 8b 45 08 mov 0x8(%ebp),%eax 113ae4: 8b 4d 0c mov 0xc(%ebp),%ecx 113ae7: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113aea: 39 05 00 77 12 00 cmp %eax,0x127700 113af0: 76 22 jbe 113b14 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; 113af2: 8d 34 40 lea (%eax,%eax,2),%esi 113af5: 8b 15 04 77 12 00 mov 0x127704,%edx 113afb: 8b 54 f2 14 mov 0x14(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113aff: 85 d2 test %edx,%edx 113b01: 74 1d je 113b20 113b03: 89 5d 10 mov %ebx,0x10(%ebp) 113b06: 89 4d 0c mov %ecx,0xc(%ebp) 113b09: 89 45 08 mov %eax,0x8(%ebp) } 113b0c: 5b pop %ebx 113b0d: 5e pop %esi 113b0e: 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; 113b0f: ff e2 jmp *%edx 113b11: 8d 76 00 lea 0x0(%esi),%esi void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113b14: 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; } 113b19: 5b pop %ebx 113b1a: 5e pop %esi 113b1b: c9 leave 113b1c: c3 ret 113b1d: 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; 113b20: 31 c0 xor %eax,%eax } 113b22: 5b pop %ebx 113b23: 5e pop %esi 113b24: c9 leave 113b25: c3 ret =============================================================================== 001115dc : rtems_status_code rtems_io_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 1115dc: 55 push %ebp 1115dd: 89 e5 mov %esp,%ebp 1115df: 56 push %esi 1115e0: 53 push %ebx 1115e1: 8b 45 08 mov 0x8(%ebp),%eax 1115e4: 8b 4d 0c mov 0xc(%ebp),%ecx 1115e7: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 1115ea: 39 05 00 77 12 00 cmp %eax,0x127700 1115f0: 76 1e jbe 111610 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; 1115f2: 8d 34 40 lea (%eax,%eax,2),%esi 1115f5: 8b 15 04 77 12 00 mov 0x127704,%edx 1115fb: 8b 14 f2 mov (%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 1115fe: 85 d2 test %edx,%edx 111600: 74 1a je 11161c 111602: 89 5d 10 mov %ebx,0x10(%ebp) 111605: 89 4d 0c mov %ecx,0xc(%ebp) 111608: 89 45 08 mov %eax,0x8(%ebp) } 11160b: 5b pop %ebx 11160c: 5e pop %esi 11160d: 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; 11160e: ff e2 jmp *%edx void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111610: 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; } 111615: 5b pop %ebx 111616: 5e pop %esi 111617: c9 leave 111618: c3 ret 111619: 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; 11161c: 31 c0 xor %eax,%eax } 11161e: 5b pop %ebx 11161f: 5e pop %esi 111620: c9 leave 111621: c3 ret =============================================================================== 00113b28 : rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 113b28: 55 push %ebp 113b29: 89 e5 mov %esp,%ebp 113b2b: 56 push %esi 113b2c: 53 push %ebx 113b2d: 8b 45 08 mov 0x8(%ebp),%eax 113b30: 8b 4d 0c mov 0xc(%ebp),%ecx 113b33: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113b36: 39 05 00 77 12 00 cmp %eax,0x127700 113b3c: 76 22 jbe 113b60 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; 113b3e: 8d 34 40 lea (%eax,%eax,2),%esi 113b41: 8b 15 04 77 12 00 mov 0x127704,%edx 113b47: 8b 54 f2 04 mov 0x4(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113b4b: 85 d2 test %edx,%edx 113b4d: 74 1d je 113b6c 113b4f: 89 5d 10 mov %ebx,0x10(%ebp) 113b52: 89 4d 0c mov %ecx,0xc(%ebp) 113b55: 89 45 08 mov %eax,0x8(%ebp) } 113b58: 5b pop %ebx 113b59: 5e pop %esi 113b5a: 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; 113b5b: ff e2 jmp *%edx 113b5d: 8d 76 00 lea 0x0(%esi),%esi void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113b60: 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; } 113b65: 5b pop %ebx 113b66: 5e pop %esi 113b67: c9 leave 113b68: c3 ret 113b69: 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; 113b6c: 31 c0 xor %eax,%eax } 113b6e: 5b pop %ebx 113b6f: 5e pop %esi 113b70: c9 leave 113b71: c3 ret =============================================================================== 00113b74 : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 113b74: 55 push %ebp 113b75: 89 e5 mov %esp,%ebp 113b77: 56 push %esi 113b78: 53 push %ebx 113b79: 8b 45 08 mov 0x8(%ebp),%eax 113b7c: 8b 4d 0c mov 0xc(%ebp),%ecx 113b7f: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113b82: 39 05 00 77 12 00 cmp %eax,0x127700 113b88: 76 22 jbe 113bac return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; 113b8a: 8d 34 40 lea (%eax,%eax,2),%esi 113b8d: 8b 15 04 77 12 00 mov 0x127704,%edx 113b93: 8b 54 f2 0c mov 0xc(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113b97: 85 d2 test %edx,%edx 113b99: 74 1d je 113bb8 113b9b: 89 5d 10 mov %ebx,0x10(%ebp) 113b9e: 89 4d 0c mov %ecx,0xc(%ebp) 113ba1: 89 45 08 mov %eax,0x8(%ebp) } 113ba4: 5b pop %ebx 113ba5: 5e pop %esi 113ba6: 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; 113ba7: ff e2 jmp *%edx 113ba9: 8d 76 00 lea 0x0(%esi),%esi void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113bac: 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; } 113bb1: 5b pop %ebx 113bb2: 5e pop %esi 113bb3: c9 leave 113bb4: c3 ret 113bb5: 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; 113bb8: 31 c0 xor %eax,%eax } 113bba: 5b pop %ebx 113bbb: 5e pop %esi 113bbc: c9 leave 113bbd: c3 ret =============================================================================== 0010d518 : 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 ) { 10d518: 55 push %ebp 10d519: 89 e5 mov %esp,%ebp 10d51b: 57 push %edi 10d51c: 56 push %esi 10d51d: 53 push %ebx 10d51e: 83 ec 0c sub $0xc,%esp 10d521: 8b 5d 08 mov 0x8(%ebp),%ebx 10d524: 8b 75 0c mov 0xc(%ebp),%esi 10d527: 8b 55 10 mov 0x10(%ebp),%edx rtems_device_major_number major_limit = _IO_Number_of_drivers; 10d52a: a1 20 b8 12 00 mov 0x12b820,%eax if ( rtems_interrupt_is_in_progress() ) 10d52f: 8b 0d 14 b5 12 00 mov 0x12b514,%ecx 10d535: 85 c9 test %ecx,%ecx 10d537: 0f 85 ab 00 00 00 jne 10d5e8 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 10d53d: 85 d2 test %edx,%edx 10d53f: 0f 84 e3 00 00 00 je 10d628 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 10d545: 89 02 mov %eax,(%edx) if ( driver_table == NULL ) 10d547: 85 f6 test %esi,%esi 10d549: 0f 84 d9 00 00 00 je 10d628 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d54f: 8b 3e mov (%esi),%edi 10d551: 85 ff test %edi,%edi 10d553: 0f 84 c3 00 00 00 je 10d61c return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10d559: 39 d8 cmp %ebx,%eax 10d55b: 76 7b jbe 10d5d8 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d55d: a1 78 b4 12 00 mov 0x12b478,%eax 10d562: 40 inc %eax 10d563: a3 78 b4 12 00 mov %eax,0x12b478 return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 10d568: 85 db test %ebx,%ebx 10d56a: 0f 85 88 00 00 00 jne 10d5f8 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 10d570: 8b 0d 20 b8 12 00 mov 0x12b820,%ecx rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 10d576: 85 c9 test %ecx,%ecx 10d578: 0f 84 b7 00 00 00 je 10d635 <== NEVER TAKEN 10d57e: 8b 3d 24 b8 12 00 mov 0x12b824,%edi 10d584: 89 f8 mov %edi,%eax 10d586: eb 08 jmp 10d590 10d588: 43 inc %ebx 10d589: 83 c0 18 add $0x18,%eax 10d58c: 39 d9 cmp %ebx,%ecx 10d58e: 76 0b jbe 10d59b static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d590: 83 38 00 cmpl $0x0,(%eax) 10d593: 75 f3 jne 10d588 10d595: 83 78 04 00 cmpl $0x0,0x4(%eax) 10d599: 75 ed jne 10d588 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10d59b: 89 1a mov %ebx,(%edx) if ( m != n ) 10d59d: 39 d9 cmp %ebx,%ecx 10d59f: 0f 84 97 00 00 00 je 10d63c 10d5a5: 8d 04 5b lea (%ebx,%ebx,2),%eax 10d5a8: 8d 04 c7 lea (%edi,%eax,8),%eax } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 10d5ab: b9 06 00 00 00 mov $0x6,%ecx 10d5b0: 89 c7 mov %eax,%edi 10d5b2: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10d5b4: e8 37 19 00 00 call 10eef0 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 10d5b9: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10d5c0: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10d5c7: 89 5d 08 mov %ebx,0x8(%ebp) } 10d5ca: 83 c4 0c add $0xc,%esp 10d5cd: 5b pop %ebx 10d5ce: 5e pop %esi 10d5cf: 5f pop %edi 10d5d0: c9 leave _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10d5d1: e9 ba 7d 00 00 jmp 115390 10d5d6: 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 ) 10d5d8: 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 ); } 10d5dd: 83 c4 0c add $0xc,%esp 10d5e0: 5b pop %ebx 10d5e1: 5e pop %esi 10d5e2: 5f pop %edi 10d5e3: c9 leave 10d5e4: c3 ret 10d5e5: 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() ) 10d5e8: 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 ); } 10d5ed: 83 c4 0c add $0xc,%esp 10d5f0: 5b pop %ebx 10d5f1: 5e pop %esi 10d5f2: 5f pop %edi 10d5f3: c9 leave 10d5f4: c3 ret 10d5f5: 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; 10d5f8: 8d 04 5b lea (%ebx,%ebx,2),%eax 10d5fb: c1 e0 03 shl $0x3,%eax 10d5fe: 03 05 24 b8 12 00 add 0x12b824,%eax static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d604: 8b 38 mov (%eax),%edi 10d606: 85 ff test %edi,%edi 10d608: 74 3e je 10d648 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(); 10d60a: e8 e1 18 00 00 call 10eef0 <_Thread_Enable_dispatch> 10d60f: 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 ); } 10d614: 83 c4 0c add $0xc,%esp 10d617: 5b pop %ebx 10d618: 5e pop %esi 10d619: 5f pop %edi 10d61a: c9 leave 10d61b: 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; 10d61c: 8b 4e 04 mov 0x4(%esi),%ecx 10d61f: 85 c9 test %ecx,%ecx 10d621: 0f 85 32 ff ff ff jne 10d559 10d627: 90 nop _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10d628: b8 09 00 00 00 mov $0x9,%eax } 10d62d: 83 c4 0c add $0xc,%esp 10d630: 5b pop %ebx 10d631: 5e pop %esi 10d632: 5f pop %edi 10d633: c9 leave 10d634: c3 ret if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10d635: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED 10d63b: 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(); 10d63c: e8 af 18 00 00 call 10eef0 <_Thread_Enable_dispatch> 10d641: b8 05 00 00 00 mov $0x5,%eax return sc; 10d646: eb 95 jmp 10d5dd static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d648: 8b 48 04 mov 0x4(%eax),%ecx 10d64b: 85 c9 test %ecx,%ecx 10d64d: 75 bb jne 10d60a if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 10d64f: 89 1a mov %ebx,(%edx) 10d651: e9 55 ff ff ff jmp 10d5ab =============================================================================== 0010d658 : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 10d658: 55 push %ebp 10d659: 89 e5 mov %esp,%ebp 10d65b: 57 push %edi 10d65c: 83 ec 04 sub $0x4,%esp 10d65f: 8b 45 08 mov 0x8(%ebp),%eax if ( rtems_interrupt_is_in_progress() ) 10d662: 8b 15 14 b5 12 00 mov 0x12b514,%edx 10d668: 85 d2 test %edx,%edx 10d66a: 75 44 jne 10d6b0 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 10d66c: 39 05 20 b8 12 00 cmp %eax,0x12b820 10d672: 77 0c ja 10d680 10d674: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d679: 5a pop %edx 10d67a: 5f pop %edi 10d67b: c9 leave 10d67c: c3 ret 10d67d: 8d 76 00 lea 0x0(%esi),%esi 10d680: 8b 15 78 b4 12 00 mov 0x12b478,%edx 10d686: 42 inc %edx 10d687: 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( 10d68d: 8d 14 40 lea (%eax,%eax,2),%edx 10d690: c1 e2 03 shl $0x3,%edx 10d693: 03 15 24 b8 12 00 add 0x12b824,%edx 10d699: b9 18 00 00 00 mov $0x18,%ecx 10d69e: 31 c0 xor %eax,%eax 10d6a0: 89 d7 mov %edx,%edi 10d6a2: f3 aa rep stos %al,%es:(%edi) &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 10d6a4: e8 47 18 00 00 call 10eef0 <_Thread_Enable_dispatch> 10d6a9: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d6ab: 5a pop %edx 10d6ac: 5f pop %edi 10d6ad: c9 leave 10d6ae: c3 ret 10d6af: 90 nop rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { if ( rtems_interrupt_is_in_progress() ) 10d6b0: b8 12 00 00 00 mov $0x12,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d6b5: 5a pop %edx 10d6b6: 5f pop %edi 10d6b7: c9 leave 10d6b8: c3 ret =============================================================================== 00113bc0 : rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 113bc0: 55 push %ebp 113bc1: 89 e5 mov %esp,%ebp 113bc3: 56 push %esi 113bc4: 53 push %ebx 113bc5: 8b 45 08 mov 0x8(%ebp),%eax 113bc8: 8b 4d 0c mov 0xc(%ebp),%ecx 113bcb: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113bce: 39 05 00 77 12 00 cmp %eax,0x127700 113bd4: 76 22 jbe 113bf8 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; 113bd6: 8d 34 40 lea (%eax,%eax,2),%esi 113bd9: 8b 15 04 77 12 00 mov 0x127704,%edx 113bdf: 8b 54 f2 10 mov 0x10(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 113be3: 85 d2 test %edx,%edx 113be5: 74 1d je 113c04 113be7: 89 5d 10 mov %ebx,0x10(%ebp) 113bea: 89 4d 0c mov %ecx,0xc(%ebp) 113bed: 89 45 08 mov %eax,0x8(%ebp) } 113bf0: 5b pop %ebx 113bf1: 5e pop %esi 113bf2: 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; 113bf3: ff e2 jmp *%edx 113bf5: 8d 76 00 lea 0x0(%esi),%esi void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 113bf8: 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; } 113bfd: 5b pop %ebx 113bfe: 5e pop %esi 113bff: c9 leave 113c00: c3 ret 113c01: 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; 113c04: 31 c0 xor %eax,%eax } 113c06: 5b pop %ebx 113c07: 5e pop %esi 113c08: c9 leave 113c09: c3 ret =============================================================================== 0010e460 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10e460: 55 push %ebp 10e461: 89 e5 mov %esp,%ebp 10e463: 57 push %edi 10e464: 56 push %esi 10e465: 53 push %ebx 10e466: 83 ec 1c sub $0x1c,%esp 10e469: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10e46c: 85 ff test %edi,%edi 10e46e: 74 4d je 10e4bd <== NEVER TAKEN 10e470: 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 ] ) 10e477: 8b 55 e4 mov -0x1c(%ebp),%edx 10e47a: 8b 04 95 ac b7 12 00 mov 0x12b7ac(,%edx,4),%eax 10e481: 85 c0 test %eax,%eax 10e483: 74 2f je 10e4b4 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10e485: 8b 70 04 mov 0x4(%eax),%esi if ( !information ) 10e488: 85 f6 test %esi,%esi 10e48a: 74 28 je 10e4b4 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10e48c: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 10e491: 74 21 je 10e4b4 <== NEVER TAKEN 10e493: bb 01 00 00 00 mov $0x1,%ebx the_thread = (Thread_Control *)information->local_table[ i ]; 10e498: 8b 46 1c mov 0x1c(%esi),%eax 10e49b: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !the_thread ) 10e49e: 85 c0 test %eax,%eax 10e4a0: 74 09 je 10e4ab <== NEVER TAKEN continue; (*routine)(the_thread); 10e4a2: 83 ec 0c sub $0xc,%esp 10e4a5: 50 push %eax 10e4a6: ff d7 call *%edi 10e4a8: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10e4ab: 43 inc %ebx 10e4ac: 0f b7 46 10 movzwl 0x10(%esi),%eax 10e4b0: 39 d8 cmp %ebx,%eax 10e4b2: 73 e4 jae 10e498 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10e4b4: ff 45 e4 incl -0x1c(%ebp) 10e4b7: 83 7d e4 05 cmpl $0x5,-0x1c(%ebp) 10e4bb: 75 ba jne 10e477 (*routine)(the_thread); } } } 10e4bd: 8d 65 f4 lea -0xc(%ebp),%esp 10e4c0: 5b pop %ebx 10e4c1: 5e pop %esi 10e4c2: 5f pop %edi 10e4c3: c9 leave 10e4c4: c3 ret =============================================================================== 00116c78 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 116c78: 55 push %ebp 116c79: 89 e5 mov %esp,%ebp 116c7b: 57 push %edi 116c7c: 56 push %esi 116c7d: 53 push %ebx 116c7e: 83 ec 1c sub $0x1c,%esp 116c81: 8b 7d 08 mov 0x8(%ebp),%edi 116c84: 8b 5d 0c mov 0xc(%ebp),%ebx 116c87: 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 ) 116c8a: 85 db test %ebx,%ebx 116c8c: 74 62 je 116cf0 return RTEMS_INVALID_ADDRESS; if ( !count ) 116c8e: 85 f6 test %esi,%esi 116c90: 74 5e je 116cf0 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 116c92: 51 push %ecx 116c93: 8d 45 e4 lea -0x1c(%ebp),%eax 116c96: 50 push %eax 116c97: 57 push %edi 116c98: 68 00 2f 14 00 push $0x142f00 116c9d: e8 02 4c 00 00 call 11b8a4 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 116ca2: 83 c4 10 add $0x10,%esp 116ca5: 8b 55 e4 mov -0x1c(%ebp),%edx 116ca8: 85 d2 test %edx,%edx 116caa: 74 10 je 116cbc 116cac: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116cb1: 8d 65 f4 lea -0xc(%ebp),%esp 116cb4: 5b pop %ebx 116cb5: 5e pop %esi 116cb6: 5f pop %edi 116cb7: c9 leave 116cb8: c3 ret 116cb9: 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( 116cbc: 83 ec 08 sub $0x8,%esp 116cbf: 56 push %esi 116cc0: 6a 00 push $0x0 116cc2: 57 push %edi 116cc3: ff 75 10 pushl 0x10(%ebp) 116cc6: 53 push %ebx 116cc7: 83 c0 14 add $0x14,%eax 116cca: 50 push %eax 116ccb: e8 a0 34 00 00 call 11a170 <_CORE_message_queue_Broadcast> 116cd0: 89 c3 mov %eax,%ebx NULL, #endif count ); _Thread_Enable_dispatch(); 116cd2: 83 c4 20 add $0x20,%esp 116cd5: e8 7a 54 00 00 call 11c154 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( core_status ); 116cda: 83 ec 0c sub $0xc,%esp 116cdd: 53 push %ebx 116cde: e8 69 03 00 00 call 11704c <_Message_queue_Translate_core_message_queue_return_code> #endif count ); _Thread_Enable_dispatch(); return 116ce3: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116ce6: 8d 65 f4 lea -0xc(%ebp),%esp 116ce9: 5b pop %ebx 116cea: 5e pop %esi 116ceb: 5f pop %edi 116cec: c9 leave 116ced: c3 ret 116cee: 66 90 xchg %ax,%ax #endif count ); _Thread_Enable_dispatch(); return 116cf0: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116cf5: 8d 65 f4 lea -0xc(%ebp),%esp 116cf8: 5b pop %ebx 116cf9: 5e pop %esi 116cfa: 5f pop %edi 116cfb: c9 leave 116cfc: c3 ret =============================================================================== 0011418c : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { 11418c: 55 push %ebp 11418d: 89 e5 mov %esp,%ebp 11418f: 57 push %edi 114190: 56 push %esi 114191: 53 push %ebx 114192: 83 ec 2c sub $0x2c,%esp 114195: 8b 5d 08 mov 0x8(%ebp),%ebx 114198: 8b 75 0c mov 0xc(%ebp),%esi 11419b: 8b 4d 10 mov 0x10(%ebp),%ecx 11419e: 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 ) ) 1141a1: 85 db test %ebx,%ebx 1141a3: 74 2f je 1141d4 return RTEMS_INVALID_NAME; if ( !id ) 1141a5: 85 ff test %edi,%edi 1141a7: 0f 84 a3 00 00 00 je 114250 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 1141ad: 85 f6 test %esi,%esi 1141af: 74 13 je 1141c4 return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 1141b1: 85 c9 test %ecx,%ecx 1141b3: 75 2f jne 1141e4 1141b5: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1141ba: 8d 65 f4 lea -0xc(%ebp),%esp 1141bd: 5b pop %ebx 1141be: 5e pop %esi 1141bf: 5f pop %edi 1141c0: c9 leave 1141c1: c3 ret 1141c2: 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 ) 1141c4: b8 0a 00 00 00 mov $0xa,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1141c9: 8d 65 f4 lea -0xc(%ebp),%esp 1141cc: 5b pop %ebx 1141cd: 5e pop %esi 1141ce: 5f pop %edi 1141cf: c9 leave 1141d0: c3 ret 1141d1: 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 ) ) 1141d4: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1141d9: 8d 65 f4 lea -0xc(%ebp),%esp 1141dc: 5b pop %ebx 1141dd: 5e pop %esi 1141de: 5f pop %edi 1141df: c9 leave 1141e0: c3 ret 1141e1: 8d 76 00 lea 0x0(%esi),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1141e4: a1 18 18 13 00 mov 0x131818,%eax 1141e9: 40 inc %eax 1141ea: a3 18 18 13 00 mov %eax,0x131818 #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 1141ef: 89 4d d4 mov %ecx,-0x2c(%ebp) 1141f2: e8 69 5f 00 00 call 11a160 <_Message_queue_Allocate> 1141f7: 89 c2 mov %eax,%edx if ( !the_message_queue ) { 1141f9: 85 c0 test %eax,%eax 1141fb: 8b 4d d4 mov -0x2c(%ebp),%ecx 1141fe: 74 7c je 11427c _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 114200: 8b 45 14 mov 0x14(%ebp),%eax 114203: 89 42 10 mov %eax,0x10(%edx) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 114206: a8 04 test $0x4,%al 114208: 0f 95 c0 setne %al 11420b: 0f b6 c0 movzbl %al,%eax 11420e: 89 45 e4 mov %eax,-0x1c(%ebp) else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 114211: 51 push %ecx 114212: 56 push %esi 114213: 8d 45 e4 lea -0x1c(%ebp),%eax 114216: 50 push %eax 114217: 8d 42 14 lea 0x14(%edx),%eax 11421a: 50 push %eax 11421b: 89 55 d4 mov %edx,-0x2c(%ebp) 11421e: e8 a5 10 00 00 call 1152c8 <_CORE_message_queue_Initialize> 114223: 83 c4 10 add $0x10,%esp 114226: 84 c0 test %al,%al 114228: 8b 55 d4 mov -0x2c(%ebp),%edx 11422b: 75 2f jne 11425c */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 11422d: 83 ec 08 sub $0x8,%esp 114230: 52 push %edx 114231: 68 40 1b 13 00 push $0x131b40 114236: e8 39 1e 00 00 call 116074 <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 11423b: e8 2c 28 00 00 call 116a6c <_Thread_Enable_dispatch> 114240: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 114245: 83 c4 10 add $0x10,%esp 114248: e9 6d ff ff ff jmp 1141ba 11424d: 8d 76 00 lea 0x0(%esi),%esi #endif if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 114250: b8 09 00 00 00 mov $0x9,%eax 114255: e9 60 ff ff ff jmp 1141ba 11425a: 66 90 xchg %ax,%ax #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 11425c: 8b 42 08 mov 0x8(%edx),%eax 11425f: 0f b7 f0 movzwl %ax,%esi 114262: 8b 0d 5c 1b 13 00 mov 0x131b5c,%ecx 114268: 89 14 b1 mov %edx,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 11426b: 89 5a 0c mov %ebx,0xc(%edx) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 11426e: 89 07 mov %eax,(%edi) name, 0 ); #endif _Thread_Enable_dispatch(); 114270: e8 f7 27 00 00 call 116a6c <_Thread_Enable_dispatch> 114275: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 114277: e9 3e ff ff ff jmp 1141ba _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); if ( !the_message_queue ) { _Thread_Enable_dispatch(); 11427c: e8 eb 27 00 00 call 116a6c <_Thread_Enable_dispatch> 114281: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 114286: e9 2f ff ff ff jmp 1141ba =============================================================================== 00116e00 : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 116e00: 55 push %ebp 116e01: 89 e5 mov %esp,%ebp 116e03: 53 push %ebx 116e04: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 116e07: 8d 45 f4 lea -0xc(%ebp),%eax 116e0a: 50 push %eax 116e0b: ff 75 08 pushl 0x8(%ebp) 116e0e: 68 00 2f 14 00 push $0x142f00 116e13: e8 8c 4a 00 00 call 11b8a4 <_Objects_Get> 116e18: 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 ) { 116e1a: 83 c4 10 add $0x10,%esp 116e1d: 8b 4d f4 mov -0xc(%ebp),%ecx 116e20: 85 c9 test %ecx,%ecx 116e22: 75 3c jne 116e60 case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 116e24: 83 ec 08 sub $0x8,%esp 116e27: 50 push %eax 116e28: 68 00 2f 14 00 push $0x142f00 116e2d: e8 02 46 00 00 call 11b434 <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 116e32: 83 c4 0c add $0xc,%esp 116e35: 6a 05 push $0x5 116e37: 6a 00 push $0x0 116e39: 8d 43 14 lea 0x14(%ebx),%eax 116e3c: 50 push %eax 116e3d: e8 b2 33 00 00 call 11a1f4 <_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 ); 116e42: 58 pop %eax 116e43: 5a pop %edx 116e44: 53 push %ebx 116e45: 68 00 2f 14 00 push $0x142f00 116e4a: e8 e9 48 00 00 call 11b738 <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 116e4f: e8 00 53 00 00 call 11c154 <_Thread_Enable_dispatch> 116e54: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116e56: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116e59: 8b 5d fc mov -0x4(%ebp),%ebx 116e5c: c9 leave 116e5d: c3 ret 116e5e: 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 ) { 116e60: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116e65: 8b 5d fc mov -0x4(%ebp),%ebx 116e68: c9 leave 116e69: c3 ret =============================================================================== 00116e6c : rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { 116e6c: 55 push %ebp 116e6d: 89 e5 mov %esp,%ebp 116e6f: 53 push %ebx 116e70: 83 ec 14 sub $0x14,%esp 116e73: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116e76: 85 db test %ebx,%ebx 116e78: 74 46 je 116ec0 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 116e7a: 51 push %ecx 116e7b: 8d 45 f4 lea -0xc(%ebp),%eax 116e7e: 50 push %eax 116e7f: ff 75 08 pushl 0x8(%ebp) 116e82: 68 00 2f 14 00 push $0x142f00 116e87: e8 18 4a 00 00 call 11b8a4 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 116e8c: 83 c4 10 add $0x10,%esp 116e8f: 8b 55 f4 mov -0xc(%ebp),%edx 116e92: 85 d2 test %edx,%edx 116e94: 74 0a je 116ea0 116e96: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116e9b: 8b 5d fc mov -0x4(%ebp),%ebx 116e9e: c9 leave 116e9f: 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 ); 116ea0: 83 ec 0c sub $0xc,%esp 116ea3: 83 c0 14 add $0x14,%eax 116ea6: 50 push %eax 116ea7: e8 84 33 00 00 call 11a230 <_CORE_message_queue_Flush> 116eac: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 116eae: e8 a1 52 00 00 call 11c154 <_Thread_Enable_dispatch> 116eb3: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116eb5: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116eb8: 8b 5d fc mov -0x4(%ebp),%ebx 116ebb: c9 leave 116ebc: c3 ret 116ebd: 8d 76 00 lea 0x0(%esi),%esi ) { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116ec0: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116ec5: 8b 5d fc mov -0x4(%ebp),%ebx 116ec8: c9 leave 116ec9: c3 ret =============================================================================== 00116ecc : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { 116ecc: 55 push %ebp 116ecd: 89 e5 mov %esp,%ebp 116ecf: 53 push %ebx 116ed0: 83 ec 14 sub $0x14,%esp 116ed3: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116ed6: 85 db test %ebx,%ebx 116ed8: 74 3a je 116f14 116eda: 51 push %ecx 116edb: 8d 45 f4 lea -0xc(%ebp),%eax 116ede: 50 push %eax 116edf: ff 75 08 pushl 0x8(%ebp) 116ee2: 68 00 2f 14 00 push $0x142f00 116ee7: e8 b8 49 00 00 call 11b8a4 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 116eec: 83 c4 10 add $0x10,%esp 116eef: 8b 55 f4 mov -0xc(%ebp),%edx 116ef2: 85 d2 test %edx,%edx 116ef4: 74 0a je 116f00 116ef6: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116efb: 8b 5d fc mov -0x4(%ebp),%ebx 116efe: c9 leave 116eff: 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; 116f00: 8b 40 5c mov 0x5c(%eax),%eax 116f03: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 116f05: e8 4a 52 00 00 call 11c154 <_Thread_Enable_dispatch> 116f0a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116f0c: 8b 5d fc mov -0x4(%ebp),%ebx 116f0f: c9 leave 116f10: c3 ret 116f11: 8d 76 00 lea 0x0(%esi),%esi ) { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116f14: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116f19: 8b 5d fc mov -0x4(%ebp),%ebx 116f1c: c9 leave 116f1d: c3 ret =============================================================================== 001142b0 : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 1142b0: 55 push %ebp 1142b1: 89 e5 mov %esp,%ebp 1142b3: 56 push %esi 1142b4: 53 push %ebx 1142b5: 83 ec 10 sub $0x10,%esp 1142b8: 8b 5d 0c mov 0xc(%ebp),%ebx 1142bb: 8b 75 10 mov 0x10(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 1142be: 85 db test %ebx,%ebx 1142c0: 74 6e je 114330 return RTEMS_INVALID_ADDRESS; if ( !size ) 1142c2: 85 f6 test %esi,%esi 1142c4: 74 6a je 114330 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 1142c6: 51 push %ecx 1142c7: 8d 45 f4 lea -0xc(%ebp),%eax 1142ca: 50 push %eax 1142cb: ff 75 08 pushl 0x8(%ebp) 1142ce: 68 40 1b 13 00 push $0x131b40 1142d3: e8 cc 1e 00 00 call 1161a4 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 1142d8: 83 c4 10 add $0x10,%esp 1142db: 8b 55 f4 mov -0xc(%ebp),%edx 1142de: 85 d2 test %edx,%edx 1142e0: 75 42 jne 114324 if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 1142e2: 83 ec 08 sub $0x8,%esp 1142e5: ff 75 18 pushl 0x18(%ebp) 1142e8: 8b 55 14 mov 0x14(%ebp),%edx 1142eb: 83 e2 01 and $0x1,%edx 1142ee: 83 f2 01 xor $0x1,%edx 1142f1: 52 push %edx 1142f2: 56 push %esi 1142f3: 53 push %ebx 1142f4: ff 70 08 pushl 0x8(%eax) 1142f7: 83 c0 14 add $0x14,%eax 1142fa: 50 push %eax 1142fb: e8 78 10 00 00 call 115378 <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 114300: 83 c4 20 add $0x20,%esp 114303: e8 64 27 00 00 call 116a6c <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 114308: 83 ec 0c sub $0xc,%esp 11430b: a1 d8 18 13 00 mov 0x1318d8,%eax 114310: ff 70 34 pushl 0x34(%eax) 114313: e8 a0 00 00 00 call 1143b8 <_Message_queue_Translate_core_message_queue_return_code> 114318: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11431b: 8d 65 f8 lea -0x8(%ebp),%esp 11431e: 5b pop %ebx 11431f: 5e pop %esi 114320: c9 leave 114321: c3 ret 114322: 66 90 xchg %ax,%ax if ( !size ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 114324: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 114329: 8d 65 f8 lea -0x8(%ebp),%esp 11432c: 5b pop %ebx 11432d: 5e pop %esi 11432e: c9 leave 11432f: c3 ret size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 114330: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 114335: 8d 65 f8 lea -0x8(%ebp),%esp 114338: 5b pop %ebx 114339: 5e pop %esi 11433a: c9 leave 11433b: c3 ret =============================================================================== 0010b9a4 : rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { 10b9a4: 55 push %ebp 10b9a5: 89 e5 mov %esp,%ebp 10b9a7: 56 push %esi 10b9a8: 53 push %ebx 10b9a9: 83 ec 10 sub $0x10,%esp 10b9ac: 8b 75 08 mov 0x8(%ebp),%esi 10b9af: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10b9b2: 85 db test %ebx,%ebx 10b9b4: 74 5e je 10ba14 <== NEVER TAKEN RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 10b9b6: 51 push %ecx 10b9b7: 8d 45 f4 lea -0xc(%ebp),%eax 10b9ba: 50 push %eax 10b9bb: 56 push %esi 10b9bc: 68 80 76 12 00 push $0x127680 10b9c1: e8 62 19 00 00 call 10d328 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 10b9c6: 83 c4 10 add $0x10,%esp 10b9c9: 8b 55 f4 mov -0xc(%ebp),%edx 10b9cc: 85 d2 test %edx,%edx 10b9ce: 74 0c je 10b9dc 10b9d0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b9d5: 8d 65 f8 lea -0x8(%ebp),%esp 10b9d8: 5b pop %ebx 10b9d9: 5e pop %esi 10b9da: c9 leave 10b9db: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 10b9dc: 6a 00 push $0x0 10b9de: 6a 00 push $0x0 10b9e0: 68 ff ff ff 7f push $0x7fffffff 10b9e5: 6a 00 push $0x0 10b9e7: 56 push %esi 10b9e8: ff 75 10 pushl 0x10(%ebp) 10b9eb: 53 push %ebx 10b9ec: 83 c0 14 add $0x14,%eax 10b9ef: 50 push %eax 10b9f0: e8 df 0b 00 00 call 10c5d4 <_CORE_message_queue_Submit> 10b9f5: 89 c3 mov %eax,%ebx MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 10b9f7: 83 c4 20 add $0x20,%esp 10b9fa: e8 71 21 00 00 call 10db70 <_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); 10b9ff: 83 ec 0c sub $0xc,%esp 10ba02: 53 push %ebx 10ba03: e8 18 00 00 00 call 10ba20 <_Message_queue_Translate_core_message_queue_return_code> 10ba08: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba0b: 8d 65 f8 lea -0x8(%ebp),%esp 10ba0e: 5b pop %ebx 10ba0f: 5e pop %esi 10ba10: c9 leave 10ba11: c3 ret 10ba12: 66 90 xchg %ax,%ax { register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10ba14: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba19: 8d 65 f8 lea -0x8(%ebp),%esp 10ba1c: 5b pop %ebx 10ba1d: 5e pop %esi 10ba1e: c9 leave 10ba1f: c3 ret =============================================================================== 0011705c : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { 11705c: 55 push %ebp 11705d: 89 e5 mov %esp,%ebp 11705f: 56 push %esi 117060: 53 push %ebx 117061: 83 ec 10 sub $0x10,%esp 117064: 8b 75 08 mov 0x8(%ebp),%esi 117067: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 11706a: 85 db test %ebx,%ebx 11706c: 74 5e je 1170cc 11706e: 51 push %ecx 11706f: 8d 45 f4 lea -0xc(%ebp),%eax 117072: 50 push %eax 117073: 56 push %esi 117074: 68 00 2f 14 00 push $0x142f00 117079: e8 26 48 00 00 call 11b8a4 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 11707e: 83 c4 10 add $0x10,%esp 117081: 8b 55 f4 mov -0xc(%ebp),%edx 117084: 85 d2 test %edx,%edx 117086: 74 0c je 117094 117088: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11708d: 8d 65 f8 lea -0x8(%ebp),%esp 117090: 5b pop %ebx 117091: 5e pop %esi 117092: c9 leave 117093: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 117094: 6a 00 push $0x0 117096: 6a 00 push $0x0 117098: 68 00 00 00 80 push $0x80000000 11709d: 6a 00 push $0x0 11709f: 56 push %esi 1170a0: ff 75 10 pushl 0x10(%ebp) 1170a3: 53 push %ebx 1170a4: 83 c0 14 add $0x14,%eax 1170a7: 50 push %eax 1170a8: e8 73 33 00 00 call 11a420 <_CORE_message_queue_Submit> 1170ad: 89 c3 mov %eax,%ebx id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 1170af: 83 c4 20 add $0x20,%esp 1170b2: e8 9d 50 00 00 call 11c154 <_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); 1170b7: 83 ec 0c sub $0xc,%esp 1170ba: 53 push %ebx 1170bb: e8 8c ff ff ff call 11704c <_Message_queue_Translate_core_message_queue_return_code> 1170c0: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1170c3: 8d 65 f8 lea -0x8(%ebp),%esp 1170c6: 5b pop %ebx 1170c7: 5e pop %esi 1170c8: c9 leave 1170c9: c3 ret 1170ca: 66 90 xchg %ax,%ax { register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 1170cc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1170d1: 8d 65 f8 lea -0x8(%ebp),%esp 1170d4: 5b pop %ebx 1170d5: 5e pop %esi 1170d6: c9 leave 1170d7: c3 ret =============================================================================== 0010d434 : const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 10d434: 55 push %ebp 10d435: 89 e5 mov %esp,%ebp 10d437: 83 ec 08 sub $0x8,%esp 10d43a: 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 ) 10d43d: 83 f8 01 cmp $0x1,%eax 10d440: 74 2a je 10d46c api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 10d442: 83 f8 02 cmp $0x2,%eax 10d445: 74 09 je 10d450 10d447: b8 47 4b 12 00 mov $0x124b47,%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"; } 10d44c: c9 leave 10d44d: c3 ret 10d44e: 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 ) 10d450: 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 ); 10d455: 83 ec 08 sub $0x8,%esp 10d458: ff 75 0c pushl 0xc(%ebp) 10d45b: 50 push %eax 10d45c: e8 67 53 00 00 call 1127c8 if ( class_assoc ) 10d461: 83 c4 10 add $0x10,%esp 10d464: 85 c0 test %eax,%eax 10d466: 74 0c je 10d474 return class_assoc->name; 10d468: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10d46a: c9 leave 10d46b: c3 ret ) { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 10d46c: b8 60 90 12 00 mov $0x129060,%eax 10d471: eb e2 jmp 10d455 10d473: 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 ) 10d474: b8 4f 4b 12 00 mov $0x124b4f,%eax return class_assoc->name; return "BAD CLASS"; } 10d479: c9 leave 10d47a: c3 ret =============================================================================== 0010d47c : }; const char *rtems_object_get_api_name( int api ) { 10d47c: 55 push %ebp 10d47d: 89 e5 mov %esp,%ebp 10d47f: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); 10d482: ff 75 08 pushl 0x8(%ebp) 10d485: 68 00 91 12 00 push $0x129100 10d48a: e8 39 53 00 00 call 1127c8 if ( api_assoc ) 10d48f: 83 c4 10 add $0x10,%esp 10d492: 85 c0 test %eax,%eax 10d494: 74 06 je 10d49c return api_assoc->name; 10d496: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10d498: c9 leave 10d499: c3 ret 10d49a: 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 ) 10d49c: b8 4f 4b 12 00 mov $0x124b4f,%eax return api_assoc->name; return "BAD CLASS"; } 10d4a1: c9 leave 10d4a2: c3 ret =============================================================================== 0010d4e4 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 10d4e4: 55 push %ebp 10d4e5: 89 e5 mov %esp,%ebp 10d4e7: 57 push %edi 10d4e8: 56 push %esi 10d4e9: 53 push %ebx 10d4ea: 83 ec 0c sub $0xc,%esp 10d4ed: 8b 5d 10 mov 0x10(%ebp),%ebx int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10d4f0: 85 db test %ebx,%ebx 10d4f2: 74 5c je 10d550 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 10d4f4: 83 ec 08 sub $0x8,%esp 10d4f7: ff 75 0c pushl 0xc(%ebp) 10d4fa: ff 75 08 pushl 0x8(%ebp) 10d4fd: e8 42 1a 00 00 call 10ef44 <_Objects_Get_information> if ( !obj_info ) 10d502: 83 c4 10 add $0x10,%esp 10d505: 85 c0 test %eax,%eax 10d507: 74 57 je 10d560 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 10d509: 8b 50 08 mov 0x8(%eax),%edx 10d50c: 89 13 mov %edx,(%ebx) info->maximum_id = obj_info->maximum_id; 10d50e: 8b 50 0c mov 0xc(%eax),%edx 10d511: 89 53 04 mov %edx,0x4(%ebx) info->auto_extend = obj_info->auto_extend; 10d514: 8a 50 12 mov 0x12(%eax),%dl 10d517: 88 53 0c mov %dl,0xc(%ebx) info->maximum = obj_info->maximum; 10d51a: 0f b7 70 10 movzwl 0x10(%eax),%esi 10d51e: 89 73 08 mov %esi,0x8(%ebx) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10d521: 85 f6 test %esi,%esi 10d523: 74 3f je 10d564 <== NEVER TAKEN 10d525: 8b 78 1c mov 0x1c(%eax),%edi 10d528: b9 01 00 00 00 mov $0x1,%ecx 10d52d: b8 01 00 00 00 mov $0x1,%eax 10d532: 31 d2 xor %edx,%edx if ( !obj_info->local_table[i] ) unallocated++; 10d534: 83 3c 8f 01 cmpl $0x1,(%edi,%ecx,4) 10d538: 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++ ) 10d53b: 40 inc %eax 10d53c: 89 c1 mov %eax,%ecx 10d53e: 39 c6 cmp %eax,%esi 10d540: 73 f2 jae 10d534 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 10d542: 89 53 10 mov %edx,0x10(%ebx) 10d545: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10d547: 8d 65 f4 lea -0xc(%ebp),%esp 10d54a: 5b pop %ebx 10d54b: 5e pop %esi 10d54c: 5f pop %edi 10d54d: c9 leave 10d54e: c3 ret 10d54f: 90 nop int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10d550: b8 09 00 00 00 mov $0x9,%eax unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 10d555: 8d 65 f4 lea -0xc(%ebp),%esp 10d558: 5b pop %ebx 10d559: 5e pop %esi 10d55a: 5f pop %edi 10d55b: c9 leave 10d55c: c3 ret 10d55d: 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 ) 10d560: b0 0a mov $0xa,%al 10d562: eb e3 jmp 10d547 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++ ) 10d564: 31 d2 xor %edx,%edx <== NOT EXECUTED 10d566: eb da jmp 10d542 <== NOT EXECUTED =============================================================================== 0010cb10 : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { 10cb10: 55 push %ebp 10cb11: 89 e5 mov %esp,%ebp 10cb13: 53 push %ebx 10cb14: 83 ec 14 sub $0x14,%esp 10cb17: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10cb1a: 85 db test %ebx,%ebx 10cb1c: 74 26 je 10cb44 return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); 10cb1e: 83 ec 08 sub $0x8,%esp 10cb21: 8d 45 f4 lea -0xc(%ebp),%eax 10cb24: 50 push %eax 10cb25: ff 75 08 pushl 0x8(%ebp) 10cb28: e8 8f 1a 00 00 call 10e5bc <_Objects_Id_to_name> *name = name_u.name_u32; 10cb2d: 8b 55 f4 mov -0xc(%ebp),%edx 10cb30: 89 13 mov %edx,(%ebx) return _Status_Object_name_errors_to_status[ status ]; 10cb32: 8b 04 85 8c 36 12 00 mov 0x12368c(,%eax,4),%eax 10cb39: 83 c4 10 add $0x10,%esp } 10cb3c: 8b 5d fc mov -0x4(%ebp),%ebx 10cb3f: c9 leave 10cb40: c3 ret 10cb41: 8d 76 00 lea 0x0(%esi),%esi ) { Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10cb44: 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 ]; } 10cb49: 8b 5d fc mov -0x4(%ebp),%ebx 10cb4c: c9 leave 10cb4d: c3 ret =============================================================================== 0010d5c0 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 10d5c0: 55 push %ebp 10d5c1: 89 e5 mov %esp,%ebp 10d5c3: 57 push %edi 10d5c4: 56 push %esi 10d5c5: 53 push %ebx 10d5c6: 83 ec 1c sub $0x1c,%esp 10d5c9: 8b 75 08 mov 0x8(%ebp),%esi 10d5cc: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10d5cf: 85 ff test %edi,%edi 10d5d1: 74 61 je 10d634 return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10d5d3: 85 f6 test %esi,%esi 10d5d5: 74 35 je 10d60c information = _Objects_Get_information_id( tmpId ); 10d5d7: 83 ec 0c sub $0xc,%esp 10d5da: 56 push %esi 10d5db: e8 44 19 00 00 call 10ef24 <_Objects_Get_information_id> 10d5e0: 89 c3 mov %eax,%ebx if ( !information ) 10d5e2: 83 c4 10 add $0x10,%esp 10d5e5: 85 c0 test %eax,%eax 10d5e7: 74 16 je 10d5ff return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10d5e9: 50 push %eax 10d5ea: 8d 45 e4 lea -0x1c(%ebp),%eax 10d5ed: 50 push %eax 10d5ee: 56 push %esi 10d5ef: 53 push %ebx 10d5f0: e8 b3 1a 00 00 call 10f0a8 <_Objects_Get> switch ( location ) { 10d5f5: 83 c4 10 add $0x10,%esp 10d5f8: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d5fb: 85 c9 test %ecx,%ecx 10d5fd: 74 19 je 10d618 case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10d5ff: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d604: 8d 65 f4 lea -0xc(%ebp),%esp 10d607: 5b pop %ebx 10d608: 5e pop %esi 10d609: 5f pop %edi 10d60a: c9 leave 10d60b: c3 ret Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10d60c: a1 58 b5 12 00 mov 0x12b558,%eax 10d611: 8b 70 08 mov 0x8(%eax),%esi 10d614: eb c1 jmp 10d5d7 10d616: 66 90 xchg %ax,%ax the_object = _Objects_Get( information, tmpId, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 10d618: 52 push %edx 10d619: 57 push %edi 10d61a: 50 push %eax 10d61b: 53 push %ebx 10d61c: e8 bf 1c 00 00 call 10f2e0 <_Objects_Set_name> _Thread_Enable_dispatch(); 10d621: e8 b2 23 00 00 call 10f9d8 <_Thread_Enable_dispatch> 10d626: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10d628: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d62b: 8d 65 f4 lea -0xc(%ebp),%esp 10d62e: 5b pop %ebx 10d62f: 5e pop %esi 10d630: 5f pop %edi 10d631: c9 leave 10d632: c3 ret 10d633: 90 nop Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10d634: b8 09 00 00 00 mov $0x9,%eax 10d639: eb c9 jmp 10d604 =============================================================================== 001170d8 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 1170d8: 55 push %ebp 1170d9: 89 e5 mov %esp,%ebp 1170db: 57 push %edi 1170dc: 56 push %esi 1170dd: 53 push %ebx 1170de: 83 ec 1c sub $0x1c,%esp 1170e1: 8b 5d 08 mov 0x8(%ebp),%ebx 1170e4: 8b 75 0c mov 0xc(%ebp),%esi 1170e7: 8b 55 10 mov 0x10(%ebp),%edx 1170ea: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 1170ed: 85 db test %ebx,%ebx 1170ef: 74 47 je 117138 return RTEMS_INVALID_NAME; if ( !starting_address ) 1170f1: 85 f6 test %esi,%esi 1170f3: 74 23 je 117118 return RTEMS_INVALID_ADDRESS; if ( !id ) 1170f5: 8b 45 1c mov 0x1c(%ebp),%eax 1170f8: 85 c0 test %eax,%eax 1170fa: 74 1c je 117118 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 1170fc: 85 d2 test %edx,%edx 1170fe: 74 28 je 117128 117100: 85 ff test %edi,%edi 117102: 74 24 je 117128 117104: 39 fa cmp %edi,%edx 117106: 72 20 jb 117128 117108: f7 c7 03 00 00 00 test $0x3,%edi 11710e: 75 18 jne 117128 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 117110: f7 c6 03 00 00 00 test $0x3,%esi 117116: 74 30 je 117148 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 117118: b8 09 00 00 00 mov $0x9,%eax } 11711d: 8d 65 f4 lea -0xc(%ebp),%esp 117120: 5b pop %ebx 117121: 5e pop %esi 117122: 5f pop %edi 117123: c9 leave 117124: c3 ret 117125: 8d 76 00 lea 0x0(%esi),%esi 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 117128: b8 08 00 00 00 mov $0x8,%eax } 11712d: 8d 65 f4 lea -0xc(%ebp),%esp 117130: 5b pop %ebx 117131: 5e pop %esi 117132: 5f pop %edi 117133: c9 leave 117134: c3 ret 117135: 8d 76 00 lea 0x0(%esi),%esi rtems_id *id ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 117138: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11713d: 8d 65 f4 lea -0xc(%ebp),%esp 117140: 5b pop %ebx 117141: 5e pop %esi 117142: 5f pop %edi 117143: c9 leave 117144: c3 ret 117145: 8d 76 00 lea 0x0(%esi),%esi 117148: a1 d8 2b 14 00 mov 0x142bd8,%eax 11714d: 40 inc %eax 11714e: a3 d8 2b 14 00 mov %eax,0x142bd8 * 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 ); 117153: 83 ec 0c sub $0xc,%esp 117156: 68 60 2a 14 00 push $0x142a60 11715b: 89 55 e0 mov %edx,-0x20(%ebp) 11715e: e8 55 42 00 00 call 11b3b8 <_Objects_Allocate> 117163: 89 45 e4 mov %eax,-0x1c(%ebp) _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 117166: 83 c4 10 add $0x10,%esp 117169: 85 c0 test %eax,%eax 11716b: 8b 55 e0 mov -0x20(%ebp),%edx 11716e: 74 58 je 1171c8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 117170: 8b 45 e4 mov -0x1c(%ebp),%eax 117173: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 117176: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 117179: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 11717c: 8b 4d 18 mov 0x18(%ebp),%ecx 11717f: 89 48 1c mov %ecx,0x1c(%eax) the_partition->number_of_used_blocks = 0; 117182: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) _Chain_Initialize( &the_partition->Memory, starting_address, 117189: 57 push %edi 11718a: 89 d0 mov %edx,%eax 11718c: 31 d2 xor %edx,%edx 11718e: f7 f7 div %edi 117190: 50 push %eax 117191: 56 push %esi 117192: 8b 45 e4 mov -0x1c(%ebp),%eax 117195: 83 c0 24 add $0x24,%eax 117198: 50 push %eax 117199: e8 92 2f 00 00 call 11a130 <_Chain_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 11719e: 8b 7d e4 mov -0x1c(%ebp),%edi 1171a1: 8b 47 08 mov 0x8(%edi),%eax 1171a4: 0f b7 f0 movzwl %ax,%esi 1171a7: 8b 15 7c 2a 14 00 mov 0x142a7c,%edx 1171ad: 89 3c b2 mov %edi,(%edx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1171b0: 89 5f 0c mov %ebx,0xc(%edi) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 1171b3: 8b 55 1c mov 0x1c(%ebp),%edx 1171b6: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 1171b8: e8 97 4f 00 00 call 11c154 <_Thread_Enable_dispatch> 1171bd: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1171bf: 83 c4 10 add $0x10,%esp 1171c2: e9 66 ff ff ff jmp 11712d 1171c7: 90 nop _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 1171c8: e8 87 4f 00 00 call 11c154 <_Thread_Enable_dispatch> 1171cd: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 1171d2: e9 56 ff ff ff jmp 11712d =============================================================================== 00117244 : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 117244: 55 push %ebp 117245: 89 e5 mov %esp,%ebp 117247: 56 push %esi 117248: 53 push %ebx 117249: 83 ec 20 sub $0x20,%esp 11724c: 8b 5d 0c mov 0xc(%ebp),%ebx register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 11724f: 85 db test %ebx,%ebx 117251: 74 59 je 1172ac RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 117253: 52 push %edx 117254: 8d 45 f4 lea -0xc(%ebp),%eax 117257: 50 push %eax 117258: ff 75 08 pushl 0x8(%ebp) 11725b: 68 60 2a 14 00 push $0x142a60 117260: e8 3f 46 00 00 call 11b8a4 <_Objects_Get> 117265: 89 c6 mov %eax,%esi return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 117267: 83 c4 10 add $0x10,%esp 11726a: 8b 45 f4 mov -0xc(%ebp),%eax 11726d: 85 c0 test %eax,%eax 11726f: 75 2f jne 1172a0 */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 117271: 83 ec 0c sub $0xc,%esp 117274: 8d 46 24 lea 0x24(%esi),%eax 117277: 50 push %eax 117278: e8 8f 2e 00 00 call 11a10c <_Chain_Get> case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 11727d: 83 c4 10 add $0x10,%esp 117280: 85 c0 test %eax,%eax 117282: 74 34 je 1172b8 the_partition->number_of_used_blocks += 1; 117284: ff 46 20 incl 0x20(%esi) _Thread_Enable_dispatch(); 117287: 89 45 e4 mov %eax,-0x1c(%ebp) 11728a: e8 c5 4e 00 00 call 11c154 <_Thread_Enable_dispatch> *buffer = the_buffer; 11728f: 8b 45 e4 mov -0x1c(%ebp),%eax 117292: 89 03 mov %eax,(%ebx) 117294: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117296: 8d 65 f8 lea -0x8(%ebp),%esp 117299: 5b pop %ebx 11729a: 5e pop %esi 11729b: c9 leave 11729c: c3 ret 11729d: 8d 76 00 lea 0x0(%esi),%esi if ( !buffer ) return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 1172a0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1172a5: 8d 65 f8 lea -0x8(%ebp),%esp 1172a8: 5b pop %ebx 1172a9: 5e pop %esi 1172aa: c9 leave 1172ab: c3 ret { register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 1172ac: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1172b1: 8d 65 f8 lea -0x8(%ebp),%esp 1172b4: 5b pop %ebx 1172b5: 5e pop %esi 1172b6: c9 leave 1172b7: c3 ret the_partition->number_of_used_blocks += 1; _Thread_Enable_dispatch(); *buffer = the_buffer; return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 1172b8: e8 97 4e 00 00 call 11c154 <_Thread_Enable_dispatch> 1172bd: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 1172c2: eb e1 jmp 1172a5 =============================================================================== 001172e8 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 1172e8: 55 push %ebp 1172e9: 89 e5 mov %esp,%ebp 1172eb: 56 push %esi 1172ec: 53 push %ebx 1172ed: 83 ec 14 sub $0x14,%esp 1172f0: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 1172f3: 8d 45 f4 lea -0xc(%ebp),%eax 1172f6: 50 push %eax 1172f7: ff 75 08 pushl 0x8(%ebp) 1172fa: 68 60 2a 14 00 push $0x142a60 1172ff: e8 a0 45 00 00 call 11b8a4 <_Objects_Get> 117304: 89 c3 mov %eax,%ebx register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 117306: 83 c4 10 add $0x10,%esp 117309: 8b 45 f4 mov -0xc(%ebp),%eax 11730c: 85 c0 test %eax,%eax 11730e: 74 0c je 11731c 117310: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117315: 8d 65 f8 lea -0x8(%ebp),%esp 117318: 5b pop %ebx 117319: 5e pop %esi 11731a: c9 leave 11731b: c3 ret ) { void *starting; void *ending; starting = the_partition->starting_address; 11731c: 8b 43 10 mov 0x10(%ebx),%eax ending = _Addresses_Add_offset( starting, the_partition->length ); 11731f: 8b 53 14 mov 0x14(%ebx),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 117322: 39 c6 cmp %eax,%esi 117324: 72 3a jb 117360 117326: 8d 14 10 lea (%eax,%edx,1),%edx 117329: 39 d6 cmp %edx,%esi 11732b: 77 33 ja 117360 <== NEVER TAKEN return ( 11732d: 89 f2 mov %esi,%edx 11732f: 29 c2 sub %eax,%edx 117331: 89 d0 mov %edx,%eax 117333: 31 d2 xor %edx,%edx 117335: f7 73 18 divl 0x18(%ebx) 117338: 85 d2 test %edx,%edx 11733a: 75 24 jne 117360 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 11733c: 83 ec 08 sub $0x8,%esp 11733f: 56 push %esi 117340: 8d 43 24 lea 0x24(%ebx),%eax 117343: 50 push %eax 117344: e8 87 2d 00 00 call 11a0d0 <_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; 117349: ff 4b 20 decl 0x20(%ebx) _Thread_Enable_dispatch(); 11734c: e8 03 4e 00 00 call 11c154 <_Thread_Enable_dispatch> 117351: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 117353: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117356: 8d 65 f8 lea -0x8(%ebp),%esp 117359: 5b pop %ebx 11735a: 5e pop %esi 11735b: c9 leave 11735c: c3 ret 11735d: 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(); 117360: e8 ef 4d 00 00 call 11c154 <_Thread_Enable_dispatch> 117365: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11736a: 8d 65 f8 lea -0x8(%ebp),%esp 11736d: 5b pop %ebx 11736e: 5e pop %esi 11736f: c9 leave 117370: c3 ret =============================================================================== 00116710 : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 116710: 55 push %ebp 116711: 89 e5 mov %esp,%ebp 116713: 57 push %edi 116714: 56 push %esi 116715: 53 push %ebx 116716: 83 ec 1c sub $0x1c,%esp 116719: 8b 5d 08 mov 0x8(%ebp),%ebx 11671c: 8b 55 0c mov 0xc(%ebp),%edx 11671f: 8b 7d 10 mov 0x10(%ebp),%edi 116722: 8b 75 18 mov 0x18(%ebp),%esi register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 116725: 85 db test %ebx,%ebx 116727: 74 1b je 116744 return RTEMS_INVALID_NAME; if ( !id ) 116729: 85 f6 test %esi,%esi 11672b: 74 08 je 116735 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 11672d: 89 f8 mov %edi,%eax 11672f: 09 d0 or %edx,%eax 116731: a8 03 test $0x3,%al 116733: 74 1f je 116754 (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 116735: b8 09 00 00 00 mov $0x9,%eax } 11673a: 8d 65 f4 lea -0xc(%ebp),%esp 11673d: 5b pop %ebx 11673e: 5e pop %esi 11673f: 5f pop %edi 116740: c9 leave 116741: c3 ret 116742: 66 90 xchg %ax,%ax rtems_id *id ) { register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 116744: b8 03 00 00 00 mov $0x3,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 116749: 8d 65 f4 lea -0xc(%ebp),%esp 11674c: 5b pop %ebx 11674d: 5e pop %esi 11674e: 5f pop %edi 11674f: c9 leave 116750: c3 ret 116751: 8d 76 00 lea 0x0(%esi),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 116754: a1 d8 2b 14 00 mov 0x142bd8,%eax 116759: 40 inc %eax 11675a: a3 d8 2b 14 00 mov %eax,0x142bd8 * of free port control blocks. */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) 11675f: 83 ec 0c sub $0xc,%esp 116762: 68 20 2a 14 00 push $0x142a20 116767: 89 55 e4 mov %edx,-0x1c(%ebp) 11676a: e8 49 4c 00 00 call 11b3b8 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 11676f: 83 c4 10 add $0x10,%esp 116772: 85 c0 test %eax,%eax 116774: 8b 55 e4 mov -0x1c(%ebp),%edx 116777: 74 33 je 1167ac _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 116779: 89 50 10 mov %edx,0x10(%eax) the_port->external_base = external_start; 11677c: 89 78 14 mov %edi,0x14(%eax) the_port->length = length - 1; 11677f: 8b 55 14 mov 0x14(%ebp),%edx 116782: 4a dec %edx 116783: 89 50 18 mov %edx,0x18(%eax) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 116786: 8b 50 08 mov 0x8(%eax),%edx 116789: 0f b7 fa movzwl %dx,%edi 11678c: 8b 0d 3c 2a 14 00 mov 0x142a3c,%ecx 116792: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 116795: 89 58 0c mov %ebx,0xc(%eax) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 116798: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 11679a: e8 b5 59 00 00 call 11c154 <_Thread_Enable_dispatch> 11679f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 1167a1: 8d 65 f4 lea -0xc(%ebp),%esp 1167a4: 5b pop %ebx 1167a5: 5e pop %esi 1167a6: 5f pop %edi 1167a7: c9 leave 1167a8: c3 ret 1167a9: 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(); 1167ac: e8 a3 59 00 00 call 11c154 <_Thread_Enable_dispatch> 1167b1: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 1167b6: eb 82 jmp 11673a =============================================================================== 001167b8 : */ rtems_status_code rtems_port_delete( rtems_id id ) { 1167b8: 55 push %ebp 1167b9: 89 e5 mov %esp,%ebp 1167bb: 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 *) 1167be: 8d 45 f4 lea -0xc(%ebp),%eax 1167c1: 50 push %eax 1167c2: ff 75 08 pushl 0x8(%ebp) 1167c5: 68 20 2a 14 00 push $0x142a20 1167ca: e8 d5 50 00 00 call 11b8a4 <_Objects_Get> register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 1167cf: 83 c4 10 add $0x10,%esp 1167d2: 8b 4d f4 mov -0xc(%ebp),%ecx 1167d5: 85 c9 test %ecx,%ecx 1167d7: 75 2f jne 116808 case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); 1167d9: 83 ec 08 sub $0x8,%esp 1167dc: 50 push %eax 1167dd: 68 20 2a 14 00 push $0x142a20 1167e2: 89 45 e4 mov %eax,-0x1c(%ebp) 1167e5: e8 4a 4c 00 00 call 11b434 <_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 ); 1167ea: 58 pop %eax 1167eb: 5a pop %edx 1167ec: 8b 45 e4 mov -0x1c(%ebp),%eax 1167ef: 50 push %eax 1167f0: 68 20 2a 14 00 push $0x142a20 1167f5: e8 3e 4f 00 00 call 11b738 <_Objects_Free> _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 1167fa: e8 55 59 00 00 call 11c154 <_Thread_Enable_dispatch> 1167ff: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116801: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116804: c9 leave 116805: c3 ret 116806: 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 ) { 116808: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11680d: c9 leave 11680e: c3 ret =============================================================================== 00116810 : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 116810: 55 push %ebp 116811: 89 e5 mov %esp,%ebp 116813: 56 push %esi 116814: 53 push %ebx 116815: 83 ec 10 sub $0x10,%esp 116818: 8b 75 0c mov 0xc(%ebp),%esi 11681b: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 11681e: 85 db test %ebx,%ebx 116820: 74 4e je 116870 RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 116822: 51 push %ecx 116823: 8d 45 f4 lea -0xc(%ebp),%eax 116826: 50 push %eax 116827: ff 75 08 pushl 0x8(%ebp) 11682a: 68 20 2a 14 00 push $0x142a20 11682f: e8 70 50 00 00 call 11b8a4 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 116834: 83 c4 10 add $0x10,%esp 116837: 8b 55 f4 mov -0xc(%ebp),%edx 11683a: 85 d2 test %edx,%edx 11683c: 74 0e je 11684c 11683e: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116843: 8d 65 f8 lea -0x8(%ebp),%esp 116846: 5b pop %ebx 116847: 5e pop %esi 116848: c9 leave 116849: c3 ret 11684a: 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 ); 11684c: 89 f2 mov %esi,%edx 11684e: 2b 50 14 sub 0x14(%eax),%edx if ( ending > the_port->length ) 116851: 3b 50 18 cmp 0x18(%eax),%edx 116854: 77 16 ja 11686c *internal = external; else *internal = _Addresses_Add_offset( the_port->internal_base, 116856: 03 50 10 add 0x10(%eax),%edx 116859: 89 13 mov %edx,(%ebx) ending ); _Thread_Enable_dispatch(); 11685b: e8 f4 58 00 00 call 11c154 <_Thread_Enable_dispatch> 116860: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116862: 8d 65 f8 lea -0x8(%ebp),%esp 116865: 5b pop %ebx 116866: 5e pop %esi 116867: c9 leave 116868: c3 ret 116869: 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; 11686c: 89 33 mov %esi,(%ebx) 11686e: eb eb jmp 11685b { register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 116870: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116875: 8d 65 f8 lea -0x8(%ebp),%esp 116878: 5b pop %ebx 116879: 5e pop %esi 11687a: c9 leave 11687b: c3 ret =============================================================================== 001168a0 : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 1168a0: 55 push %ebp 1168a1: 89 e5 mov %esp,%ebp 1168a3: 56 push %esi 1168a4: 53 push %ebx 1168a5: 83 ec 10 sub $0x10,%esp 1168a8: 8b 75 0c mov 0xc(%ebp),%esi 1168ab: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 1168ae: 85 db test %ebx,%ebx 1168b0: 74 4e je 116900 1168b2: 51 push %ecx 1168b3: 8d 45 f4 lea -0xc(%ebp),%eax 1168b6: 50 push %eax 1168b7: ff 75 08 pushl 0x8(%ebp) 1168ba: 68 20 2a 14 00 push $0x142a20 1168bf: e8 e0 4f 00 00 call 11b8a4 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 1168c4: 83 c4 10 add $0x10,%esp 1168c7: 8b 55 f4 mov -0xc(%ebp),%edx 1168ca: 85 d2 test %edx,%edx 1168cc: 74 0e je 1168dc 1168ce: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1168d3: 8d 65 f8 lea -0x8(%ebp),%esp 1168d6: 5b pop %ebx 1168d7: 5e pop %esi 1168d8: c9 leave 1168d9: c3 ret 1168da: 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 ); 1168dc: 89 f2 mov %esi,%edx 1168de: 2b 50 10 sub 0x10(%eax),%edx if ( ending > the_port->length ) 1168e1: 3b 50 18 cmp 0x18(%eax),%edx 1168e4: 77 16 ja 1168fc *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, 1168e6: 03 50 14 add 0x14(%eax),%edx 1168e9: 89 13 mov %edx,(%ebx) ending ); _Thread_Enable_dispatch(); 1168eb: e8 64 58 00 00 call 11c154 <_Thread_Enable_dispatch> 1168f0: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1168f2: 8d 65 f8 lea -0x8(%ebp),%esp 1168f5: 5b pop %ebx 1168f6: 5e pop %esi 1168f7: c9 leave 1168f8: c3 ret 1168f9: 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; 1168fc: 89 33 mov %esi,(%ebx) 1168fe: eb eb jmp 1168eb { register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 116900: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116905: 8d 65 f8 lea -0x8(%ebp),%esp 116908: 5b pop %ebx 116909: 5e pop %esi 11690a: c9 leave 11690b: c3 ret =============================================================================== 00117374 : */ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { 117374: 55 push %ebp 117375: 89 e5 mov %esp,%ebp 117377: 53 push %ebx 117378: 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 *) 11737b: 8d 45 f4 lea -0xc(%ebp),%eax 11737e: 50 push %eax 11737f: ff 75 08 pushl 0x8(%ebp) 117382: 68 a0 2a 14 00 push $0x142aa0 117387: e8 18 45 00 00 call 11b8a4 <_Objects_Get> 11738c: 89 c3 mov %eax,%ebx Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 11738e: 83 c4 10 add $0x10,%esp 117391: 8b 45 f4 mov -0xc(%ebp),%eax 117394: 85 c0 test %eax,%eax 117396: 74 0c je 1173a4 117398: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11739d: 8b 5d fc mov -0x4(%ebp),%ebx 1173a0: c9 leave 1173a1: c3 ret 1173a2: 66 90 xchg %ax,%ax the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 1173a4: 8b 43 40 mov 0x40(%ebx),%eax 1173a7: 3b 05 98 2c 14 00 cmp 0x142c98,%eax 1173ad: 74 11 je 1173c0 _Thread_Enable_dispatch(); 1173af: e8 a0 4d 00 00 call 11c154 <_Thread_Enable_dispatch> 1173b4: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1173b9: 8b 5d fc mov -0x4(%ebp),%ebx 1173bc: c9 leave 1173bd: c3 ret 1173be: 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 ); 1173c0: 83 ec 0c sub $0xc,%esp 1173c3: 8d 43 10 lea 0x10(%ebx),%eax 1173c6: 50 push %eax 1173c7: e8 80 61 00 00 call 11d54c <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 1173cc: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) _Thread_Enable_dispatch(); 1173d3: e8 7c 4d 00 00 call 11c154 <_Thread_Enable_dispatch> 1173d8: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1173da: 83 c4 10 add $0x10,%esp 1173dd: eb be jmp 11739d =============================================================================== 0010c930 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 10c930: 55 push %ebp 10c931: 89 e5 mov %esp,%ebp 10c933: 57 push %edi 10c934: 56 push %esi 10c935: 53 push %ebx 10c936: 83 ec 1c sub $0x1c,%esp 10c939: 8b 5d 08 mov 0x8(%ebp),%ebx 10c93c: 8b 75 0c mov 0xc(%ebp),%esi Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10c93f: 85 db test %ebx,%ebx 10c941: 0f 84 a9 00 00 00 je 10c9f0 return RTEMS_INVALID_NAME; if ( !id ) 10c947: 85 f6 test %esi,%esi 10c949: 0f 84 c5 00 00 00 je 10ca14 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c94f: a1 78 a4 12 00 mov 0x12a478,%eax 10c954: 40 inc %eax 10c955: 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 *) 10c95a: 83 ec 0c sub $0xc,%esp 10c95d: 68 80 a3 12 00 push $0x12a380 10c962: e8 f1 1d 00 00 call 10e758 <_Objects_Allocate> 10c967: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 10c969: 83 c4 10 add $0x10,%esp 10c96c: 85 c0 test %eax,%eax 10c96e: 0f 84 8c 00 00 00 je 10ca00 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 10c974: a1 38 a5 12 00 mov 0x12a538,%eax 10c979: 89 42 40 mov %eax,0x40(%edx) the_period->state = RATE_MONOTONIC_INACTIVE; 10c97c: 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; 10c983: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 10c98a: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx) the_watchdog->id = id; 10c991: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) the_watchdog->user_data = user_data; 10c998: 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 ); 10c99f: 8d 42 54 lea 0x54(%edx),%eax 10c9a2: 89 45 e4 mov %eax,-0x1c(%ebp) 10c9a5: b9 38 00 00 00 mov $0x38,%ecx 10c9aa: 31 c0 xor %eax,%eax 10c9ac: 8b 7d e4 mov -0x1c(%ebp),%edi 10c9af: f3 aa rep stos %al,%es:(%edi) 10c9b1: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10c9b8: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10c9bf: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10c9c6: 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; 10c9cd: 8b 42 08 mov 0x8(%edx),%eax 10c9d0: 0f b7 f8 movzwl %ax,%edi 10c9d3: 8b 0d 9c a3 12 00 mov 0x12a39c,%ecx 10c9d9: 89 14 b9 mov %edx,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c9dc: 89 5a 0c mov %ebx,0xc(%edx) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 10c9df: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10c9e1: e8 2e 2b 00 00 call 10f514 <_Thread_Enable_dispatch> 10c9e6: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10c9e8: 8d 65 f4 lea -0xc(%ebp),%esp 10c9eb: 5b pop %ebx 10c9ec: 5e pop %esi 10c9ed: 5f pop %edi 10c9ee: c9 leave 10c9ef: c3 ret rtems_id *id ) { Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10c9f0: b8 03 00 00 00 mov $0x3,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c9f5: 8d 65 f4 lea -0xc(%ebp),%esp 10c9f8: 5b pop %ebx 10c9f9: 5e pop %esi 10c9fa: 5f pop %edi 10c9fb: c9 leave 10c9fc: c3 ret 10c9fd: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { _Thread_Enable_dispatch(); 10ca00: e8 0f 2b 00 00 call 10f514 <_Thread_Enable_dispatch> 10ca05: b8 05 00 00 00 mov $0x5,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10ca0a: 8d 65 f4 lea -0xc(%ebp),%esp 10ca0d: 5b pop %ebx 10ca0e: 5e pop %esi 10ca0f: 5f pop %edi 10ca10: c9 leave 10ca11: c3 ret 10ca12: 66 90 xchg %ax,%ax Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10ca14: b8 09 00 00 00 mov $0x9,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10ca19: 8d 65 f4 lea -0xc(%ebp),%esp 10ca1c: 5b pop %ebx 10ca1d: 5e pop %esi 10ca1e: 5f pop %edi 10ca1f: c9 leave 10ca20: c3 ret =============================================================================== 00112f24 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 112f24: 55 push %ebp 112f25: 89 e5 mov %esp,%ebp 112f27: 53 push %ebx 112f28: 83 ec 24 sub $0x24,%esp 112f2b: 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 ) 112f2e: 85 db test %ebx,%ebx 112f30: 0f 84 92 00 00 00 je 112fc8 112f36: 50 push %eax 112f37: 8d 45 f4 lea -0xc(%ebp),%eax 112f3a: 50 push %eax 112f3b: ff 75 08 pushl 0x8(%ebp) 112f3e: 68 80 a3 12 00 push $0x12a380 112f43: e8 84 bd ff ff call 10eccc <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 112f48: 83 c4 10 add $0x10,%esp 112f4b: 8b 4d f4 mov -0xc(%ebp),%ecx 112f4e: 85 c9 test %ecx,%ecx 112f50: 74 0a je 112f5c 112f52: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112f57: 8b 5d fc mov -0x4(%ebp),%ebx 112f5a: c9 leave 112f5b: c3 ret the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 112f5c: 8b 50 40 mov 0x40(%eax),%edx 112f5f: 8b 52 08 mov 0x8(%edx),%edx 112f62: 89 13 mov %edx,(%ebx) status->state = the_period->state; 112f64: 8b 50 38 mov 0x38(%eax),%edx 112f67: 89 53 04 mov %edx,0x4(%ebx) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 112f6a: 85 d2 test %edx,%edx 112f6c: 75 2a jne 112f98 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 112f6e: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 112f75: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Timespec_Set_to_zero( &status->executed_since_last_period ); 112f7c: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) 112f83: 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(); 112f8a: e8 85 c5 ff ff call 10f514 <_Thread_Enable_dispatch> 112f8f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112f91: 8b 5d fc mov -0x4(%ebp),%ebx 112f94: c9 leave 112f95: c3 ret 112f96: 66 90 xchg %ax,%ax /* * Grab the current status. */ valid_status = _Rate_monotonic_Get_status( 112f98: 52 push %edx 112f99: 8d 55 ec lea -0x14(%ebp),%edx 112f9c: 52 push %edx 112f9d: 8d 55 e4 lea -0x1c(%ebp),%edx 112fa0: 52 push %edx 112fa1: 50 push %eax 112fa2: e8 15 9b ff ff call 10cabc <_Rate_monotonic_Get_status> the_period, &since_last_period, &executed ); if (!valid_status) { 112fa7: 83 c4 10 add $0x10,%esp 112faa: 84 c0 test %al,%al 112fac: 74 26 je 112fd4 _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 112fae: 8b 45 e4 mov -0x1c(%ebp),%eax 112fb1: 8b 55 e8 mov -0x18(%ebp),%edx 112fb4: 89 43 08 mov %eax,0x8(%ebx) 112fb7: 89 53 0c mov %edx,0xc(%ebx) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 112fba: 8b 45 ec mov -0x14(%ebp),%eax 112fbd: 8b 55 f0 mov -0x10(%ebp),%edx 112fc0: 89 43 10 mov %eax,0x10(%ebx) 112fc3: 89 53 14 mov %edx,0x14(%ebx) 112fc6: eb c2 jmp 112f8a Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) 112fc8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112fcd: 8b 5d fc mov -0x4(%ebp),%ebx 112fd0: c9 leave 112fd1: c3 ret 112fd2: 66 90 xchg %ax,%ax valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { _Thread_Enable_dispatch(); 112fd4: e8 3b c5 ff ff call 10f514 <_Thread_Enable_dispatch> 112fd9: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; 112fde: e9 74 ff ff ff jmp 112f57 =============================================================================== 0010cc44 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 10cc44: 55 push %ebp 10cc45: 89 e5 mov %esp,%ebp 10cc47: 57 push %edi 10cc48: 56 push %esi 10cc49: 53 push %ebx 10cc4a: 83 ec 30 sub $0x30,%esp 10cc4d: 8b 5d 08 mov 0x8(%ebp),%ebx 10cc50: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 10cc53: 8d 45 e4 lea -0x1c(%ebp),%eax 10cc56: 50 push %eax 10cc57: 53 push %ebx 10cc58: 68 80 a3 12 00 push $0x12a380 10cc5d: e8 6a 20 00 00 call 10eccc <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 10cc62: 83 c4 10 add $0x10,%esp 10cc65: 8b 7d e4 mov -0x1c(%ebp),%edi 10cc68: 85 ff test %edi,%edi 10cc6a: 74 10 je 10cc7c the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 10cc6c: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cc71: 8d 65 f4 lea -0xc(%ebp),%esp 10cc74: 5b pop %ebx 10cc75: 5e pop %esi 10cc76: 5f pop %edi 10cc77: c9 leave 10cc78: c3 ret 10cc79: 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 ) ) { 10cc7c: 8b 50 40 mov 0x40(%eax),%edx 10cc7f: 3b 15 38 a5 12 00 cmp 0x12a538,%edx 10cc85: 74 15 je 10cc9c _Thread_Enable_dispatch(); 10cc87: e8 88 28 00 00 call 10f514 <_Thread_Enable_dispatch> 10cc8c: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cc91: 8d 65 f4 lea -0xc(%ebp),%esp 10cc94: 5b pop %ebx 10cc95: 5e pop %esi 10cc96: 5f pop %edi 10cc97: c9 leave 10cc98: c3 ret 10cc99: 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 ) { 10cc9c: 85 f6 test %esi,%esi 10cc9e: 0f 84 b0 00 00 00 je 10cd54 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 10cca4: 9c pushf 10cca5: fa cli 10cca6: 5f pop %edi switch ( the_period->state ) { 10cca7: 8b 50 38 mov 0x38(%eax),%edx 10ccaa: 83 fa 02 cmp $0x2,%edx 10ccad: 0f 84 bd 00 00 00 je 10cd70 10ccb3: 83 fa 04 cmp $0x4,%edx 10ccb6: 74 5c je 10cd14 10ccb8: 85 d2 test %edx,%edx 10ccba: 75 b0 jne 10cc6c <== NEVER TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 10ccbc: 57 push %edi 10ccbd: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 10ccbe: 83 ec 0c sub $0xc,%esp 10ccc1: 50 push %eax 10ccc2: 89 45 d4 mov %eax,-0x2c(%ebp) 10ccc5: e8 7e fd ff ff call 10ca48 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 10ccca: 8b 45 d4 mov -0x2c(%ebp),%eax 10cccd: 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; 10ccd4: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10ccdb: c7 40 2c 9c d0 10 00 movl $0x10d09c,0x2c(%eax) the_watchdog->id = id; 10cce2: 89 58 30 mov %ebx,0x30(%eax) the_watchdog->user_data = user_data; 10cce5: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 10ccec: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10ccef: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10ccf2: 5a pop %edx 10ccf3: 59 pop %ecx 10ccf4: 83 c0 10 add $0x10,%eax 10ccf7: 50 push %eax 10ccf8: 68 58 a5 12 00 push $0x12a558 10ccfd: e8 e6 38 00 00 call 1105e8 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 10cd02: e8 0d 28 00 00 call 10f514 <_Thread_Enable_dispatch> 10cd07: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10cd09: 83 c4 10 add $0x10,%esp 10cd0c: e9 60 ff ff ff jmp 10cc71 10cd11: 8d 76 00 lea 0x0(%esi),%esi case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 10cd14: 83 ec 0c sub $0xc,%esp 10cd17: 50 push %eax 10cd18: 89 45 d4 mov %eax,-0x2c(%ebp) 10cd1b: e8 34 fe ff ff call 10cb54 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 10cd20: 57 push %edi 10cd21: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 10cd22: 8b 45 d4 mov -0x2c(%ebp),%eax 10cd25: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) the_period->next_length = length; 10cd2c: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10cd2f: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10cd32: 59 pop %ecx 10cd33: 5b pop %ebx 10cd34: 83 c0 10 add $0x10,%eax 10cd37: 50 push %eax 10cd38: 68 58 a5 12 00 push $0x12a558 10cd3d: e8 a6 38 00 00 call 1105e8 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 10cd42: e8 cd 27 00 00 call 10f514 <_Thread_Enable_dispatch> 10cd47: b8 06 00 00 00 mov $0x6,%eax return RTEMS_TIMEOUT; 10cd4c: 83 c4 10 add $0x10,%esp 10cd4f: e9 1d ff ff ff jmp 10cc71 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 10cd54: 8b 40 38 mov 0x38(%eax),%eax 10cd57: 83 f8 04 cmp $0x4,%eax 10cd5a: 76 74 jbe 10cdd0 <== ALWAYS TAKEN 10cd5c: 31 c0 xor %eax,%eax case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 10cd5e: 89 45 d4 mov %eax,-0x2c(%ebp) 10cd61: e8 ae 27 00 00 call 10f514 <_Thread_Enable_dispatch> return( return_value ); 10cd66: 8b 45 d4 mov -0x2c(%ebp),%eax 10cd69: e9 03 ff ff ff jmp 10cc71 10cd6e: 66 90 xchg %ax,%ax case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 10cd70: 83 ec 0c sub $0xc,%esp 10cd73: 50 push %eax 10cd74: 89 45 d4 mov %eax,-0x2c(%ebp) 10cd77: e8 d8 fd ff ff call 10cb54 <_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; 10cd7c: 8b 45 d4 mov -0x2c(%ebp),%eax 10cd7f: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) the_period->next_length = length; 10cd86: 89 70 3c mov %esi,0x3c(%eax) _ISR_Enable( level ); 10cd89: 57 push %edi 10cd8a: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 10cd8b: 8b 15 38 a5 12 00 mov 0x12a538,%edx 10cd91: 8b 48 08 mov 0x8(%eax),%ecx 10cd94: 89 4a 20 mov %ecx,0x20(%edx) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10cd97: 5e pop %esi 10cd98: 5f pop %edi 10cd99: 68 00 40 00 00 push $0x4000 10cd9e: 52 push %edx 10cd9f: 89 45 d4 mov %eax,-0x2c(%ebp) 10cda2: e8 49 30 00 00 call 10fdf0 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 10cda7: 9c pushf 10cda8: fa cli 10cda9: 59 pop %ecx local_state = the_period->state; 10cdaa: 8b 45 d4 mov -0x2c(%ebp),%eax 10cdad: 8b 50 38 mov 0x38(%eax),%edx the_period->state = RATE_MONOTONIC_ACTIVE; 10cdb0: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) _ISR_Enable( level ); 10cdb7: 51 push %ecx 10cdb8: 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 ) 10cdb9: 83 c4 10 add $0x10,%esp 10cdbc: 83 fa 03 cmp $0x3,%edx 10cdbf: 74 18 je 10cdd9 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 10cdc1: e8 4e 27 00 00 call 10f514 <_Thread_Enable_dispatch> 10cdc6: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10cdc8: e9 a4 fe ff ff jmp 10cc71 10cdcd: 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 ) { 10cdd0: 8b 04 85 28 3b 12 00 mov 0x123b28(,%eax,4),%eax 10cdd7: eb 85 jmp 10cd5e /* * 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 ); 10cdd9: 83 ec 08 sub $0x8,%esp 10cddc: 68 00 40 00 00 push $0x4000 10cde1: ff 35 38 a5 12 00 pushl 0x12a538 10cde7: e8 80 23 00 00 call 10f16c <_Thread_Clear_state> 10cdec: 83 c4 10 add $0x10,%esp 10cdef: eb d0 jmp 10cdc1 =============================================================================== 0010cdf4 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 10cdf4: 55 push %ebp 10cdf5: 89 e5 mov %esp,%ebp 10cdf7: 57 push %edi 10cdf8: 56 push %esi 10cdf9: 53 push %ebx 10cdfa: 83 ec 7c sub $0x7c,%esp 10cdfd: 8b 7d 08 mov 0x8(%ebp),%edi 10ce00: 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 ) 10ce03: 85 f6 test %esi,%esi 10ce05: 0f 84 bd 00 00 00 je 10cec8 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 10ce0b: 83 ec 08 sub $0x8,%esp 10ce0e: 68 3c 3b 12 00 push $0x123b3c 10ce13: 57 push %edi 10ce14: ff d6 call *%esi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 10ce16: 59 pop %ecx 10ce17: 5b pop %ebx 10ce18: 68 74 3b 12 00 push $0x123b74 10ce1d: 57 push %edi 10ce1e: ff d6 call *%esi (*print)( context, "--- Wall times are in seconds ---\n" ); 10ce20: 58 pop %eax 10ce21: 5a pop %edx 10ce22: 68 98 3b 12 00 push $0x123b98 10ce27: 57 push %edi 10ce28: ff d6 call *%esi Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 10ce2a: 59 pop %ecx 10ce2b: 5b pop %ebx 10ce2c: 68 bc 3b 12 00 push $0x123bbc 10ce31: 57 push %edi 10ce32: ff d6 call *%esi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 10ce34: 58 pop %eax 10ce35: 5a pop %edx 10ce36: 68 08 3c 12 00 push $0x123c08 10ce3b: 57 push %edi 10ce3c: 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 ; 10ce3e: 8b 1d 88 a3 12 00 mov 0x12a388,%ebx 10ce44: 83 c4 10 add $0x10,%esp 10ce47: 3b 1d 8c a3 12 00 cmp 0x12a38c,%ebx 10ce4d: 77 79 ja 10cec8 <== 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); 10ce4f: 89 75 84 mov %esi,-0x7c(%ebp) 10ce52: eb 09 jmp 10ce5d * 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++ ) { 10ce54: 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 ; 10ce55: 39 1d 8c a3 12 00 cmp %ebx,0x12a38c 10ce5b: 72 6b jb 10cec8 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 10ce5d: 83 ec 08 sub $0x8,%esp 10ce60: 8d 45 88 lea -0x78(%ebp),%eax 10ce63: 50 push %eax 10ce64: 53 push %ebx 10ce65: e8 0e 60 00 00 call 112e78 if ( status != RTEMS_SUCCESSFUL ) 10ce6a: 83 c4 10 add $0x10,%esp 10ce6d: 85 c0 test %eax,%eax 10ce6f: 75 e3 jne 10ce54 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 10ce71: 83 ec 08 sub $0x8,%esp 10ce74: 8d 55 c0 lea -0x40(%ebp),%edx 10ce77: 52 push %edx 10ce78: 53 push %ebx 10ce79: e8 a6 60 00 00 call 112f24 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 10ce7e: 83 c4 0c add $0xc,%esp 10ce81: 8d 45 e3 lea -0x1d(%ebp),%eax 10ce84: 50 push %eax 10ce85: 6a 05 push $0x5 10ce87: ff 75 c0 pushl -0x40(%ebp) 10ce8a: e8 a9 02 00 00 call 10d138 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 10ce8f: 59 pop %ecx 10ce90: 5e pop %esi 10ce91: ff 75 8c pushl -0x74(%ebp) 10ce94: ff 75 88 pushl -0x78(%ebp) 10ce97: 8d 55 e3 lea -0x1d(%ebp),%edx 10ce9a: 52 push %edx 10ce9b: 53 push %ebx 10ce9c: 68 5a 3b 12 00 push $0x123b5a 10cea1: 57 push %edi 10cea2: ff 55 84 call *-0x7c(%ebp) ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 10cea5: 8b 45 88 mov -0x78(%ebp),%eax 10cea8: 83 c4 20 add $0x20,%esp 10ceab: 85 c0 test %eax,%eax 10cead: 75 21 jne 10ced0 (*print)( context, "\n" ); 10ceaf: 83 ec 08 sub $0x8,%esp 10ceb2: 68 fd 1c 12 00 push $0x121cfd 10ceb7: 57 push %edi 10ceb8: ff 55 84 call *-0x7c(%ebp) continue; 10cebb: 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++ ) { 10cebe: 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 ; 10cebf: 39 1d 8c a3 12 00 cmp %ebx,0x12a38c 10cec5: 73 96 jae 10ce5d <== ALWAYS TAKEN 10cec7: 90 nop the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 10cec8: 8d 65 f4 lea -0xc(%ebp),%esp 10cecb: 5b pop %ebx 10cecc: 5e pop %esi 10cecd: 5f pop %edi 10cece: c9 leave 10cecf: 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 ); 10ced0: 52 push %edx 10ced1: 8d 55 d8 lea -0x28(%ebp),%edx 10ced4: 52 push %edx 10ced5: 50 push %eax 10ced6: 8d 45 a0 lea -0x60(%ebp),%eax 10ced9: 50 push %eax 10ceda: e8 71 33 00 00 call 110250 <_Timespec_Divide_by_integer> (*print)( context, 10cedf: 8b 4d dc mov -0x24(%ebp),%ecx 10cee2: be d3 4d 62 10 mov $0x10624dd3,%esi 10cee7: 89 c8 mov %ecx,%eax 10cee9: f7 ee imul %esi 10ceeb: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 10cef1: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 10cef7: c1 f8 06 sar $0x6,%eax 10cefa: c1 f9 1f sar $0x1f,%ecx 10cefd: 29 c8 sub %ecx,%eax 10ceff: 50 push %eax 10cf00: ff 75 d8 pushl -0x28(%ebp) 10cf03: 8b 4d 9c mov -0x64(%ebp),%ecx 10cf06: 89 c8 mov %ecx,%eax 10cf08: f7 ee imul %esi 10cf0a: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 10cf10: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 10cf16: c1 f8 06 sar $0x6,%eax 10cf19: c1 f9 1f sar $0x1f,%ecx 10cf1c: 29 c8 sub %ecx,%eax 10cf1e: 50 push %eax 10cf1f: ff 75 98 pushl -0x68(%ebp) 10cf22: 8b 4d 94 mov -0x6c(%ebp),%ecx 10cf25: 89 c8 mov %ecx,%eax 10cf27: f7 ee imul %esi 10cf29: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) 10cf2f: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 10cf35: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 10cf3b: c1 f8 06 sar $0x6,%eax 10cf3e: c1 f9 1f sar $0x1f,%ecx 10cf41: 29 c8 sub %ecx,%eax 10cf43: 50 push %eax 10cf44: ff 75 90 pushl -0x70(%ebp) 10cf47: 68 54 3c 12 00 push $0x123c54 10cf4c: 57 push %edi 10cf4d: 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); 10cf50: 83 c4 2c add $0x2c,%esp 10cf53: 8d 55 d8 lea -0x28(%ebp),%edx 10cf56: 52 push %edx 10cf57: ff 75 88 pushl -0x78(%ebp) 10cf5a: 8d 45 b8 lea -0x48(%ebp),%eax 10cf5d: 50 push %eax 10cf5e: e8 ed 32 00 00 call 110250 <_Timespec_Divide_by_integer> (*print)( context, 10cf63: 8b 4d dc mov -0x24(%ebp),%ecx 10cf66: 89 c8 mov %ecx,%eax 10cf68: f7 ee imul %esi 10cf6a: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 10cf70: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 10cf76: c1 f8 06 sar $0x6,%eax 10cf79: c1 f9 1f sar $0x1f,%ecx 10cf7c: 29 c8 sub %ecx,%eax 10cf7e: 50 push %eax 10cf7f: ff 75 d8 pushl -0x28(%ebp) 10cf82: 8b 4d b4 mov -0x4c(%ebp),%ecx 10cf85: 89 c8 mov %ecx,%eax 10cf87: f7 ee imul %esi 10cf89: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 10cf8f: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 10cf95: c1 f8 06 sar $0x6,%eax 10cf98: c1 f9 1f sar $0x1f,%ecx 10cf9b: 29 c8 sub %ecx,%eax 10cf9d: 50 push %eax 10cf9e: ff 75 b0 pushl -0x50(%ebp) 10cfa1: 8b 4d ac mov -0x54(%ebp),%ecx 10cfa4: 89 c8 mov %ecx,%eax 10cfa6: f7 ee imul %esi 10cfa8: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) 10cfae: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 10cfb4: 8b b5 7c ff ff ff mov -0x84(%ebp),%esi 10cfba: c1 fe 06 sar $0x6,%esi 10cfbd: 89 c8 mov %ecx,%eax 10cfbf: 99 cltd 10cfc0: 29 d6 sub %edx,%esi 10cfc2: 56 push %esi 10cfc3: ff 75 a8 pushl -0x58(%ebp) 10cfc6: 68 74 3c 12 00 push $0x123c74 10cfcb: 57 push %edi 10cfcc: ff 55 84 call *-0x7c(%ebp) 10cfcf: 83 c4 30 add $0x30,%esp 10cfd2: e9 7d fe ff ff jmp 10ce54 =============================================================================== 0010cff0 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 10cff0: 55 push %ebp 10cff1: 89 e5 mov %esp,%ebp 10cff3: 53 push %ebx 10cff4: 83 ec 04 sub $0x4,%esp 10cff7: a1 78 a4 12 00 mov 0x12a478,%eax 10cffc: 40 inc %eax 10cffd: a3 78 a4 12 00 mov %eax,0x12a478 /* * 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 ; 10d002: 8b 1d 88 a3 12 00 mov 0x12a388,%ebx 10d008: 3b 1d 8c a3 12 00 cmp 0x12a38c,%ebx 10d00e: 77 15 ja 10d025 <== NEVER TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 10d010: 83 ec 0c sub $0xc,%esp 10d013: 53 push %ebx 10d014: e8 17 00 00 00 call 10d030 * 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++ ) { 10d019: 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 ; 10d01a: 83 c4 10 add $0x10,%esp 10d01d: 39 1d 8c a3 12 00 cmp %ebx,0x12a38c 10d023: 73 eb jae 10d010 /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 10d025: 8b 5d fc mov -0x4(%ebp),%ebx 10d028: c9 leave } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 10d029: e9 e6 24 00 00 jmp 10f514 <_Thread_Enable_dispatch> =============================================================================== 0010d030 : */ rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id ) { 10d030: 55 push %ebp 10d031: 89 e5 mov %esp,%ebp 10d033: 57 push %edi 10d034: 53 push %ebx 10d035: 83 ec 14 sub $0x14,%esp 10d038: 8d 45 f4 lea -0xc(%ebp),%eax 10d03b: 50 push %eax 10d03c: ff 75 08 pushl 0x8(%ebp) 10d03f: 68 80 a3 12 00 push $0x12a380 10d044: e8 83 1c 00 00 call 10eccc <_Objects_Get> 10d049: 89 c2 mov %eax,%edx Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 10d04b: 83 c4 10 add $0x10,%esp 10d04e: 8b 45 f4 mov -0xc(%ebp),%eax 10d051: 85 c0 test %eax,%eax 10d053: 75 3b jne 10d090 case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 10d055: 8d 5a 54 lea 0x54(%edx),%ebx 10d058: b9 38 00 00 00 mov $0x38,%ecx 10d05d: 31 c0 xor %eax,%eax 10d05f: 89 df mov %ebx,%edi 10d061: f3 aa rep stos %al,%es:(%edi) 10d063: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10d06a: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10d071: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10d078: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) _Thread_Enable_dispatch(); 10d07f: e8 90 24 00 00 call 10f514 <_Thread_Enable_dispatch> 10d084: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d086: 8d 65 f8 lea -0x8(%ebp),%esp 10d089: 5b pop %ebx 10d08a: 5f pop %edi 10d08b: c9 leave 10d08c: c3 ret 10d08d: 8d 76 00 lea 0x0(%esi),%esi { Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 10d090: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d095: 8d 65 f8 lea -0x8(%ebp),%esp 10d098: 5b pop %ebx 10d099: 5f pop %edi 10d09a: c9 leave 10d09b: c3 ret =============================================================================== 00117b18 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 117b18: 55 push %ebp 117b19: 89 e5 mov %esp,%ebp 117b1b: 57 push %edi 117b1c: 56 push %esi 117b1d: 53 push %ebx 117b1e: 83 ec 1c sub $0x1c,%esp 117b21: 8b 75 08 mov 0x8(%ebp),%esi 117b24: 8b 5d 0c mov 0xc(%ebp),%ebx 117b27: 8b 7d 1c mov 0x1c(%ebp),%edi rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 117b2a: 85 f6 test %esi,%esi 117b2c: 0f 84 92 00 00 00 je 117bc4 return RTEMS_INVALID_NAME; if ( !starting_address ) 117b32: 85 db test %ebx,%ebx 117b34: 74 09 je 117b3f return RTEMS_INVALID_ADDRESS; if ( !id ) 117b36: 85 ff test %edi,%edi 117b38: 74 05 je 117b3f return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 117b3a: f6 c3 03 test $0x3,%bl 117b3d: 74 0d je 117b4c return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); return return_status; 117b3f: b8 09 00 00 00 mov $0x9,%eax } 117b44: 8d 65 f4 lea -0xc(%ebp),%esp 117b47: 5b pop %ebx 117b48: 5e pop %esi 117b49: 5f pop %edi 117b4a: c9 leave 117b4b: c3 ret return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 117b4c: 83 ec 0c sub $0xc,%esp 117b4f: ff 35 90 2c 14 00 pushl 0x142c90 117b55: e8 fe 24 00 00 call 11a058 <_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 ); 117b5a: c7 04 24 e0 2a 14 00 movl $0x142ae0,(%esp) 117b61: e8 52 38 00 00 call 11b3b8 <_Objects_Allocate> 117b66: 89 c2 mov %eax,%edx the_region = _Region_Allocate(); if ( !the_region ) 117b68: 83 c4 10 add $0x10,%esp 117b6b: 85 c0 test %eax,%eax 117b6d: 74 65 je 117bd4 return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 117b6f: ff 75 14 pushl 0x14(%ebp) 117b72: ff 75 10 pushl 0x10(%ebp) 117b75: 53 push %ebx 117b76: 8d 40 68 lea 0x68(%eax),%eax 117b79: 50 push %eax 117b7a: 89 55 e4 mov %edx,-0x1c(%ebp) 117b7d: e8 1a 33 00 00 call 11ae9c <_Heap_Initialize> 117b82: 8b 55 e4 mov -0x1c(%ebp),%edx 117b85: 89 42 5c mov %eax,0x5c(%edx) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 117b88: 83 c4 10 add $0x10,%esp 117b8b: 85 c0 test %eax,%eax 117b8d: 75 4d jne 117bdc */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 117b8f: 83 ec 08 sub $0x8,%esp 117b92: 52 push %edx 117b93: 68 e0 2a 14 00 push $0x142ae0 117b98: e8 9b 3b 00 00 call 11b738 <_Objects_Free> 117b9d: b8 08 00 00 00 mov $0x8,%eax 117ba2: 83 c4 10 add $0x10,%esp *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 117ba5: 83 ec 0c sub $0xc,%esp 117ba8: ff 35 90 2c 14 00 pushl 0x142c90 117bae: 89 45 e4 mov %eax,-0x1c(%ebp) 117bb1: e8 ea 24 00 00 call 11a0a0 <_API_Mutex_Unlock> return return_status; 117bb6: 83 c4 10 add $0x10,%esp 117bb9: 8b 45 e4 mov -0x1c(%ebp),%eax } 117bbc: 8d 65 f4 lea -0xc(%ebp),%esp 117bbf: 5b pop %ebx 117bc0: 5e pop %esi 117bc1: 5f pop %edi 117bc2: c9 leave 117bc3: c3 ret ) { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 117bc4: b8 03 00 00 00 mov $0x3,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 117bc9: 8d 65 f4 lea -0xc(%ebp),%esp 117bcc: 5b pop %ebx 117bcd: 5e pop %esi 117bce: 5f pop %edi 117bcf: c9 leave 117bd0: c3 ret 117bd1: 8d 76 00 lea 0x0(%esi),%esi _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region ) 117bd4: b8 05 00 00 00 mov $0x5,%eax 117bd9: eb ca jmp 117ba5 117bdb: 90 nop return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 117bdc: 89 5a 50 mov %ebx,0x50(%edx) the_region->length = length; 117bdf: 8b 45 10 mov 0x10(%ebp),%eax 117be2: 89 42 54 mov %eax,0x54(%edx) the_region->page_size = page_size; 117be5: 8b 45 14 mov 0x14(%ebp),%eax 117be8: 89 42 58 mov %eax,0x58(%edx) the_region->attribute_set = attribute_set; 117beb: 8b 45 18 mov 0x18(%ebp),%eax 117bee: 89 42 60 mov %eax,0x60(%edx) the_region->number_of_used_blocks = 0; 117bf1: c7 42 64 00 00 00 00 movl $0x0,0x64(%edx) _Thread_queue_Initialize( 117bf8: 6a 06 push $0x6 117bfa: 6a 40 push $0x40 117bfc: 8b 45 18 mov 0x18(%ebp),%eax 117bff: c1 e8 02 shr $0x2,%eax 117c02: 83 e0 01 and $0x1,%eax 117c05: 50 push %eax 117c06: 8d 42 10 lea 0x10(%edx),%eax 117c09: 50 push %eax 117c0a: 89 55 e4 mov %edx,-0x1c(%ebp) 117c0d: e8 ca 4c 00 00 call 11c8dc <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 117c12: 8b 55 e4 mov -0x1c(%ebp),%edx 117c15: 8b 42 08 mov 0x8(%edx),%eax 117c18: 0f b7 d8 movzwl %ax,%ebx 117c1b: 8b 0d fc 2a 14 00 mov 0x142afc,%ecx 117c21: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 117c24: 89 72 0c mov %esi,0xc(%edx) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 117c27: 89 07 mov %eax,(%edi) 117c29: 31 c0 xor %eax,%eax 117c2b: 83 c4 10 add $0x10,%esp 117c2e: e9 72 ff ff ff jmp 117ba5 =============================================================================== 00117c34 : */ rtems_status_code rtems_region_delete( rtems_id id ) { 117c34: 55 push %ebp 117c35: 89 e5 mov %esp,%ebp 117c37: 53 push %ebx 117c38: 83 ec 30 sub $0x30,%esp Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 117c3b: ff 35 90 2c 14 00 pushl 0x142c90 117c41: e8 12 24 00 00 call 11a058 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 117c46: 83 c4 0c add $0xc,%esp 117c49: 8d 45 f4 lea -0xc(%ebp),%eax 117c4c: 50 push %eax 117c4d: ff 75 08 pushl 0x8(%ebp) 117c50: 68 e0 2a 14 00 push $0x142ae0 117c55: e8 0e 3c 00 00 call 11b868 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 117c5a: 83 c4 10 add $0x10,%esp 117c5d: 8b 5d f4 mov -0xc(%ebp),%ebx 117c60: 85 db test %ebx,%ebx 117c62: 74 1c je 117c80 117c64: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117c69: 83 ec 0c sub $0xc,%esp 117c6c: ff 35 90 2c 14 00 pushl 0x142c90 117c72: e8 29 24 00 00 call 11a0a0 <_API_Mutex_Unlock> return return_status; } 117c77: 89 d8 mov %ebx,%eax 117c79: 8b 5d fc mov -0x4(%ebp),%ebx 117c7c: c9 leave 117c7d: c3 ret 117c7e: 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 ) 117c80: 8b 48 64 mov 0x64(%eax),%ecx 117c83: 85 c9 test %ecx,%ecx 117c85: 74 09 je 117c90 117c87: bb 0c 00 00 00 mov $0xc,%ebx 117c8c: eb db jmp 117c69 117c8e: 66 90 xchg %ax,%ax return_status = RTEMS_RESOURCE_IN_USE; else { _Objects_Close( &_Region_Information, &the_region->Object ); 117c90: 83 ec 08 sub $0x8,%esp 117c93: 50 push %eax 117c94: 68 e0 2a 14 00 push $0x142ae0 117c99: 89 45 e4 mov %eax,-0x1c(%ebp) 117c9c: e8 93 37 00 00 call 11b434 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 117ca1: 58 pop %eax 117ca2: 5a pop %edx 117ca3: 8b 45 e4 mov -0x1c(%ebp),%eax 117ca6: 50 push %eax 117ca7: 68 e0 2a 14 00 push $0x142ae0 117cac: e8 87 3a 00 00 call 11b738 <_Objects_Free> 117cb1: 31 db xor %ebx,%ebx 117cb3: 83 c4 10 add $0x10,%esp 117cb6: eb b1 jmp 117c69 =============================================================================== 00117cb8 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 117cb8: 55 push %ebp 117cb9: 89 e5 mov %esp,%ebp 117cbb: 56 push %esi 117cbc: 53 push %ebx 117cbd: 83 ec 10 sub $0x10,%esp 117cc0: 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 ) 117cc3: 85 db test %ebx,%ebx 117cc5: 74 71 je 117d38 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 117cc7: 83 ec 0c sub $0xc,%esp 117cca: ff 35 90 2c 14 00 pushl 0x142c90 117cd0: e8 83 23 00 00 call 11a058 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 117cd5: 83 c4 0c add $0xc,%esp 117cd8: 8d 45 f0 lea -0x10(%ebp),%eax 117cdb: 50 push %eax 117cdc: ff 75 08 pushl 0x8(%ebp) 117cdf: 68 e0 2a 14 00 push $0x142ae0 117ce4: e8 7f 3b 00 00 call 11b868 <_Objects_Get_no_protection> 117ce9: 89 c6 mov %eax,%esi the_region = _Region_Get( id, &location ); switch ( location ) { 117ceb: 83 c4 10 add $0x10,%esp 117cee: 8b 45 f0 mov -0x10(%ebp),%eax 117cf1: 85 c0 test %eax,%eax 117cf3: 74 1f je 117d14 117cf5: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117cfa: 83 ec 0c sub $0xc,%esp 117cfd: ff 35 90 2c 14 00 pushl 0x142c90 117d03: e8 98 23 00 00 call 11a0a0 <_API_Mutex_Unlock> return return_status; 117d08: 83 c4 10 add $0x10,%esp } 117d0b: 89 d8 mov %ebx,%eax 117d0d: 8d 65 f8 lea -0x8(%ebp),%esp 117d10: 5b pop %ebx 117d11: 5e pop %esi 117d12: c9 leave 117d13: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: heap_status = _Heap_Extend( 117d14: 8d 45 f4 lea -0xc(%ebp),%eax 117d17: 50 push %eax 117d18: ff 75 10 pushl 0x10(%ebp) 117d1b: 53 push %ebx 117d1c: 8d 46 68 lea 0x68(%esi),%eax 117d1f: 50 push %eax 117d20: e8 7f 2e 00 00 call 11aba4 <_Heap_Extend> starting_address, length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { 117d25: 83 c4 10 add $0x10,%esp 117d28: 85 c0 test %eax,%eax 117d2a: 74 18 je 117d44 the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 117d2c: 48 dec %eax 117d2d: 74 25 je 117d54 117d2f: bb 18 00 00 00 mov $0x18,%ebx 117d34: eb c4 jmp 117cfa 117d36: 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 ) 117d38: b3 09 mov $0x9,%bl break; } _RTEMS_Unlock_allocator(); return return_status; } 117d3a: 89 d8 mov %ebx,%eax 117d3c: 8d 65 f8 lea -0x8(%ebp),%esp 117d3f: 5b pop %ebx 117d40: 5e pop %esi 117d41: c9 leave 117d42: c3 ret 117d43: 90 nop length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; 117d44: 8b 45 f4 mov -0xc(%ebp),%eax 117d47: 01 46 54 add %eax,0x54(%esi) the_region->maximum_segment_size += amount_extended; 117d4a: 01 46 5c add %eax,0x5c(%esi) 117d4d: 31 db xor %ebx,%ebx 117d4f: eb a9 jmp 117cfa 117d51: 8d 76 00 lea 0x0(%esi),%esi return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 117d54: bb 09 00 00 00 mov $0x9,%ebx 117d59: eb 9f jmp 117cfa =============================================================================== 00117d5c : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { 117d5c: 55 push %ebp 117d5d: 89 e5 mov %esp,%ebp 117d5f: 53 push %ebx 117d60: 83 ec 14 sub $0x14,%esp 117d63: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 117d66: 85 db test %ebx,%ebx 117d68: 74 76 je 117de0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 117d6a: 83 ec 0c sub $0xc,%esp 117d6d: ff 35 90 2c 14 00 pushl 0x142c90 117d73: e8 e0 22 00 00 call 11a058 <_API_Mutex_Lock> 117d78: 83 c4 0c add $0xc,%esp 117d7b: 8d 45 f4 lea -0xc(%ebp),%eax 117d7e: 50 push %eax 117d7f: ff 75 08 pushl 0x8(%ebp) 117d82: 68 e0 2a 14 00 push $0x142ae0 117d87: e8 dc 3a 00 00 call 11b868 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 117d8c: 83 c4 10 add $0x10,%esp 117d8f: 8b 55 f4 mov -0xc(%ebp),%edx 117d92: 85 d2 test %edx,%edx 117d94: 74 1e je 117db4 117d96: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117d9b: 83 ec 0c sub $0xc,%esp 117d9e: ff 35 90 2c 14 00 pushl 0x142c90 117da4: e8 f7 22 00 00 call 11a0a0 <_API_Mutex_Unlock> return return_status; 117da9: 83 c4 10 add $0x10,%esp } 117dac: 89 d8 mov %ebx,%eax 117dae: 8b 5d fc mov -0x4(%ebp),%ebx 117db1: c9 leave 117db2: c3 ret 117db3: 90 nop the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; 117db4: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) the_info->Used.total = 0; 117dbb: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) the_info->Used.largest = 0; 117dc2: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 117dc9: 83 ec 08 sub $0x8,%esp 117dcc: 53 push %ebx 117dcd: 83 c0 68 add $0x68,%eax 117dd0: 50 push %eax 117dd1: e8 de 2f 00 00 call 11adb4 <_Heap_Get_free_information> 117dd6: 31 db xor %ebx,%ebx return_status = RTEMS_SUCCESSFUL; break; 117dd8: 83 c4 10 add $0x10,%esp 117ddb: eb be jmp 117d9b 117ddd: 8d 76 00 lea 0x0(%esi),%esi { Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 117de0: b3 09 mov $0x9,%bl break; } _RTEMS_Unlock_allocator(); return return_status; } 117de2: 89 d8 mov %ebx,%eax 117de4: 8b 5d fc mov -0x4(%ebp),%ebx 117de7: c9 leave 117de8: c3 ret =============================================================================== 00117e64 : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 117e64: 55 push %ebp 117e65: 89 e5 mov %esp,%ebp 117e67: 57 push %edi 117e68: 56 push %esi 117e69: 53 push %ebx 117e6a: 83 ec 2c sub $0x2c,%esp 117e6d: 8b 75 0c mov 0xc(%ebp),%esi 117e70: 8b 5d 18 mov 0x18(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 117e73: 85 db test %ebx,%ebx 117e75: 0f 84 a1 00 00 00 je 117f1c return RTEMS_INVALID_ADDRESS; *segment = NULL; 117e7b: c7 03 00 00 00 00 movl $0x0,(%ebx) if ( size == 0 ) 117e81: 85 f6 test %esi,%esi 117e83: 75 0f jne 117e94 117e85: b8 08 00 00 00 mov $0x8,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117e8a: 8d 65 f4 lea -0xc(%ebp),%esp 117e8d: 5b pop %ebx 117e8e: 5e pop %esi 117e8f: 5f pop %edi 117e90: c9 leave 117e91: c3 ret 117e92: 66 90 xchg %ax,%ax *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 117e94: 83 ec 0c sub $0xc,%esp 117e97: ff 35 90 2c 14 00 pushl 0x142c90 117e9d: e8 b6 21 00 00 call 11a058 <_API_Mutex_Lock> executing = _Thread_Executing; 117ea2: a1 98 2c 14 00 mov 0x142c98,%eax 117ea7: 89 45 d4 mov %eax,-0x2c(%ebp) 117eaa: 83 c4 0c add $0xc,%esp 117ead: 8d 45 e4 lea -0x1c(%ebp),%eax 117eb0: 50 push %eax 117eb1: ff 75 08 pushl 0x8(%ebp) 117eb4: 68 e0 2a 14 00 push $0x142ae0 117eb9: e8 aa 39 00 00 call 11b868 <_Objects_Get_no_protection> 117ebe: 89 c7 mov %eax,%edi the_region = _Region_Get( id, &location ); switch ( location ) { 117ec0: 83 c4 10 add $0x10,%esp 117ec3: 8b 45 e4 mov -0x1c(%ebp),%eax 117ec6: 85 c0 test %eax,%eax 117ec8: 75 2a jne 117ef4 case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 117eca: 3b 77 5c cmp 0x5c(%edi),%esi 117ecd: 76 2d jbe 117efc 117ecf: b8 08 00 00 00 mov $0x8,%eax default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117ed4: 83 ec 0c sub $0xc,%esp 117ed7: ff 35 90 2c 14 00 pushl 0x142c90 117edd: 89 45 d0 mov %eax,-0x30(%ebp) 117ee0: e8 bb 21 00 00 call 11a0a0 <_API_Mutex_Unlock> return return_status; 117ee5: 83 c4 10 add $0x10,%esp 117ee8: 8b 45 d0 mov -0x30(%ebp),%eax } 117eeb: 8d 65 f4 lea -0xc(%ebp),%esp 117eee: 5b pop %ebx 117eef: 5e pop %esi 117ef0: 5f pop %edi 117ef1: c9 leave 117ef2: c3 ret 117ef3: 90 nop _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; 117ef4: b8 04 00 00 00 mov $0x4,%eax 117ef9: eb d9 jmp 117ed4 117efb: 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 ); 117efc: 6a 00 push $0x0 117efe: 6a 00 push $0x0 117f00: 56 push %esi 117f01: 8d 47 68 lea 0x68(%edi),%eax 117f04: 50 push %eax 117f05: e8 e6 2a 00 00 call 11a9f0 <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 117f0a: 83 c4 10 add $0x10,%esp 117f0d: 85 c0 test %eax,%eax 117f0f: 74 17 je 117f28 the_region->number_of_used_blocks += 1; 117f11: ff 47 64 incl 0x64(%edi) *segment = the_segment; 117f14: 89 03 mov %eax,(%ebx) 117f16: 31 c0 xor %eax,%eax 117f18: eb ba jmp 117ed4 117f1a: 66 90 xchg %ax,%ax Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 117f1c: b8 09 00 00 00 mov $0x9,%eax 117f21: e9 64 ff ff ff jmp 117e8a 117f26: 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 ) ) { 117f28: f6 45 10 01 testb $0x1,0x10(%ebp) 117f2c: 74 07 je 117f35 117f2e: b8 0d 00 00 00 mov $0xd,%eax 117f33: eb 9f jmp 117ed4 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 117f35: a1 d8 2b 14 00 mov 0x142bd8,%eax 117f3a: 40 inc %eax 117f3b: a3 d8 2b 14 00 mov %eax,0x142bd8 * 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(); 117f40: 83 ec 0c sub $0xc,%esp 117f43: ff 35 90 2c 14 00 pushl 0x142c90 117f49: e8 52 21 00 00 call 11a0a0 <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 117f4e: 8d 47 10 lea 0x10(%edi),%eax 117f51: 8b 55 d4 mov -0x2c(%ebp),%edx 117f54: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 117f57: 8b 4d 08 mov 0x8(%ebp),%ecx 117f5a: 89 4a 20 mov %ecx,0x20(%edx) executing->Wait.count = size; 117f5d: 89 72 24 mov %esi,0x24(%edx) executing->Wait.return_argument = segment; 117f60: 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; 117f63: 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 ); 117f6a: 83 c4 0c add $0xc,%esp 117f6d: 68 8c c9 11 00 push $0x11c98c 117f72: ff 75 14 pushl 0x14(%ebp) 117f75: 50 push %eax 117f76: e8 01 47 00 00 call 11c67c <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 117f7b: e8 d4 41 00 00 call 11c154 <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 117f80: 8b 55 d4 mov -0x2c(%ebp),%edx 117f83: 8b 42 34 mov 0x34(%edx),%eax 117f86: 83 c4 10 add $0x10,%esp 117f89: e9 fc fe ff ff jmp 117e8a =============================================================================== 00117f90 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 117f90: 55 push %ebp 117f91: 89 e5 mov %esp,%ebp 117f93: 56 push %esi 117f94: 53 push %ebx 117f95: 83 ec 20 sub $0x20,%esp 117f98: 8b 5d 0c mov 0xc(%ebp),%ebx 117f9b: 8b 75 10 mov 0x10(%ebp),%esi Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 117f9e: 85 db test %ebx,%ebx 117fa0: 74 72 je 118014 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !size ) 117fa2: 85 f6 test %esi,%esi 117fa4: 74 6e je 118014 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 117fa6: 83 ec 0c sub $0xc,%esp 117fa9: ff 35 90 2c 14 00 pushl 0x142c90 117faf: e8 a4 20 00 00 call 11a058 <_API_Mutex_Lock> 117fb4: 83 c4 0c add $0xc,%esp 117fb7: 8d 45 f4 lea -0xc(%ebp),%eax 117fba: 50 push %eax 117fbb: ff 75 08 pushl 0x8(%ebp) 117fbe: 68 e0 2a 14 00 push $0x142ae0 117fc3: e8 a0 38 00 00 call 11b868 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 117fc8: 83 c4 10 add $0x10,%esp 117fcb: 8b 55 f4 mov -0xc(%ebp),%edx 117fce: 85 d2 test %edx,%edx 117fd0: 75 36 jne 118008 <== NEVER TAKEN case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 117fd2: 52 push %edx 117fd3: 56 push %esi 117fd4: 53 push %ebx 117fd5: 83 c0 68 add $0x68,%eax 117fd8: 50 push %eax 117fd9: e8 ee 32 00 00 call 11b2cc <_Heap_Size_of_alloc_area> 117fde: 83 c4 10 add $0x10,%esp 117fe1: 84 c0 test %al,%al 117fe3: 74 3b je 118020 <== NEVER TAKEN 117fe5: 31 c0 xor %eax,%eax case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117fe7: 83 ec 0c sub $0xc,%esp 117fea: ff 35 90 2c 14 00 pushl 0x142c90 117ff0: 89 45 e4 mov %eax,-0x1c(%ebp) 117ff3: e8 a8 20 00 00 call 11a0a0 <_API_Mutex_Unlock> return return_status; 117ff8: 83 c4 10 add $0x10,%esp 117ffb: 8b 45 e4 mov -0x1c(%ebp),%eax } 117ffe: 8d 65 f8 lea -0x8(%ebp),%esp 118001: 5b pop %ebx 118002: 5e pop %esi 118003: c9 leave 118004: c3 ret 118005: 8d 76 00 lea 0x0(%esi),%esi return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 118008: 4a dec %edx 118009: 75 da jne 117fe5 <== NEVER TAKEN 11800b: b8 04 00 00 00 mov $0x4,%eax 118010: eb d5 jmp 117fe7 118012: 66 90 xchg %ax,%ax return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 118014: b8 09 00 00 00 mov $0x9,%eax } 118019: 8d 65 f8 lea -0x8(%ebp),%esp 11801c: 5b pop %ebx 11801d: 5e pop %esi 11801e: c9 leave 11801f: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 118020: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED 118025: eb c0 jmp 117fe7 <== NOT EXECUTED =============================================================================== 0011804c : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 11804c: 55 push %ebp 11804d: 89 e5 mov %esp,%ebp 11804f: 56 push %esi 118050: 53 push %ebx 118051: 83 ec 20 sub $0x20,%esp 118054: 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 ) 118057: 85 db test %ebx,%ebx 118059: 0f 84 a5 00 00 00 je 118104 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 11805f: 83 ec 0c sub $0xc,%esp 118062: ff 35 90 2c 14 00 pushl 0x142c90 118068: e8 eb 1f 00 00 call 11a058 <_API_Mutex_Lock> 11806d: 83 c4 0c add $0xc,%esp 118070: 8d 45 f0 lea -0x10(%ebp),%eax 118073: 50 push %eax 118074: ff 75 08 pushl 0x8(%ebp) 118077: 68 e0 2a 14 00 push $0x142ae0 11807c: e8 e7 37 00 00 call 11b868 <_Objects_Get_no_protection> 118081: 89 c6 mov %eax,%esi the_region = _Region_Get( id, &location ); switch ( location ) { 118083: 83 c4 10 add $0x10,%esp 118086: 8b 45 f0 mov -0x10(%ebp),%eax 118089: 85 c0 test %eax,%eax 11808b: 74 1f je 1180ac default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 11808d: 83 ec 0c sub $0xc,%esp 118090: ff 35 90 2c 14 00 pushl 0x142c90 118096: e8 05 20 00 00 call 11a0a0 <_API_Mutex_Unlock> 11809b: b8 04 00 00 00 mov $0x4,%eax return return_status; 1180a0: 83 c4 10 add $0x10,%esp } 1180a3: 8d 65 f8 lea -0x8(%ebp),%esp 1180a6: 5b pop %ebx 1180a7: 5e pop %esi 1180a8: c9 leave 1180a9: c3 ret 1180aa: 66 90 xchg %ax,%ax case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 1180ac: 83 ec 0c sub $0xc,%esp 1180af: 8d 45 f4 lea -0xc(%ebp),%eax 1180b2: 50 push %eax 1180b3: 8d 45 ec lea -0x14(%ebp),%eax 1180b6: 50 push %eax 1180b7: ff 75 10 pushl 0x10(%ebp) 1180ba: ff 75 0c pushl 0xc(%ebp) 1180bd: 8d 46 68 lea 0x68(%esi),%eax 1180c0: 50 push %eax 1180c1: e8 fa 30 00 00 call 11b1c0 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 1180c6: 8b 55 ec mov -0x14(%ebp),%edx 1180c9: 89 13 mov %edx,(%ebx) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 1180cb: 83 c4 20 add $0x20,%esp 1180ce: 85 c0 test %eax,%eax 1180d0: 75 16 jne 1180e8 _Region_Process_queue( the_region ); /* unlocks allocator */ 1180d2: 83 ec 0c sub $0xc,%esp 1180d5: 56 push %esi 1180d6: e8 19 7c 00 00 call 11fcf4 <_Region_Process_queue> 1180db: 31 c0 xor %eax,%eax 1180dd: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return return_status; } 1180e0: 8d 65 f8 lea -0x8(%ebp),%esp 1180e3: 5b pop %ebx 1180e4: 5e pop %esi 1180e5: c9 leave 1180e6: c3 ret 1180e7: 90 nop _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 1180e8: 83 ec 0c sub $0xc,%esp 1180eb: ff 35 90 2c 14 00 pushl 0x142c90 1180f1: 89 45 e4 mov %eax,-0x1c(%ebp) 1180f4: e8 a7 1f 00 00 call 11a0a0 <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 1180f9: 83 c4 10 add $0x10,%esp 1180fc: 8b 45 e4 mov -0x1c(%ebp),%eax 1180ff: 83 f8 01 cmp $0x1,%eax 118102: 74 0c je 118110 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 118104: b8 09 00 00 00 mov $0x9,%eax } 118109: 8d 65 f8 lea -0x8(%ebp),%esp 11810c: 5b pop %ebx 11810d: 5e pop %esi 11810e: c9 leave 11810f: c3 ret _RTEMS_Unlock_allocator(); if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 118110: b0 0d mov $0xd,%al 118112: eb 8f jmp 1180a3 =============================================================================== 00118114 : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 118114: 55 push %ebp 118115: 89 e5 mov %esp,%ebp 118117: 53 push %ebx 118118: 83 ec 20 sub $0x20,%esp uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 11811b: ff 35 90 2c 14 00 pushl 0x142c90 118121: e8 32 1f 00 00 call 11a058 <_API_Mutex_Lock> 118126: 83 c4 0c add $0xc,%esp 118129: 8d 45 f4 lea -0xc(%ebp),%eax 11812c: 50 push %eax 11812d: ff 75 08 pushl 0x8(%ebp) 118130: 68 e0 2a 14 00 push $0x142ae0 118135: e8 2e 37 00 00 call 11b868 <_Objects_Get_no_protection> 11813a: 89 c3 mov %eax,%ebx the_region = _Region_Get( id, &location ); switch ( location ) { 11813c: 83 c4 10 add $0x10,%esp 11813f: 8b 45 f4 mov -0xc(%ebp),%eax 118142: 85 c0 test %eax,%eax 118144: 74 1e je 118164 118146: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 11814b: 83 ec 0c sub $0xc,%esp 11814e: ff 35 90 2c 14 00 pushl 0x142c90 118154: e8 47 1f 00 00 call 11a0a0 <_API_Mutex_Unlock> return return_status; 118159: 83 c4 10 add $0x10,%esp } 11815c: 89 d8 mov %ebx,%eax 11815e: 8b 5d fc mov -0x4(%ebp),%ebx 118161: c9 leave 118162: c3 ret 118163: 90 nop RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 118164: 83 ec 08 sub $0x8,%esp 118167: ff 75 0c pushl 0xc(%ebp) 11816a: 8d 43 68 lea 0x68(%ebx),%eax 11816d: 50 push %eax 11816e: e8 d1 2a 00 00 call 11ac44 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 118173: 83 c4 10 add $0x10,%esp 118176: 84 c0 test %al,%al 118178: 75 0a jne 118184 else { the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator */ return RTEMS_SUCCESSFUL; 11817a: bb 09 00 00 00 mov $0x9,%ebx 11817f: eb ca jmp 11814b 118181: 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; 118184: ff 4b 64 decl 0x64(%ebx) _Region_Process_queue(the_region); /* unlocks allocator */ 118187: 83 ec 0c sub $0xc,%esp 11818a: 53 push %ebx 11818b: e8 64 7b 00 00 call 11fcf4 <_Region_Process_queue> 118190: 31 db xor %ebx,%ebx return RTEMS_SUCCESSFUL; 118192: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return return_status; } 118195: 89 d8 mov %ebx,%eax 118197: 8b 5d fc mov -0x4(%ebp),%ebx 11819a: c9 leave 11819b: c3 ret =============================================================================== 0010ba30 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 10ba30: 55 push %ebp 10ba31: 89 e5 mov %esp,%ebp 10ba33: 57 push %edi 10ba34: 56 push %esi 10ba35: 53 push %ebx 10ba36: 83 ec 3c sub $0x3c,%esp 10ba39: 8b 75 08 mov 0x8(%ebp),%esi 10ba3c: 8b 5d 10 mov 0x10(%ebp),%ebx 10ba3f: 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 ) ) 10ba42: 85 f6 test %esi,%esi 10ba44: 74 4a je 10ba90 return RTEMS_INVALID_NAME; if ( !id ) 10ba46: 85 ff test %edi,%edi 10ba48: 0f 84 f6 00 00 00 je 10bb44 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 10ba4e: 89 da mov %ebx,%edx 10ba50: 81 e2 c0 00 00 00 and $0xc0,%edx 10ba56: 74 48 je 10baa0 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10ba58: 89 d8 mov %ebx,%eax 10ba5a: 83 e0 30 and $0x30,%eax 10ba5d: 83 f8 10 cmp $0x10,%eax 10ba60: 74 0e je 10ba70 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10ba62: b8 0b 00 00 00 mov $0xb,%eax } 10ba67: 8d 65 f4 lea -0xc(%ebp),%esp 10ba6a: 5b pop %ebx 10ba6b: 5e pop %esi 10ba6c: 5f pop %edi 10ba6d: c9 leave 10ba6e: c3 ret 10ba6f: 90 nop #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10ba70: f6 c3 04 test $0x4,%bl 10ba73: 74 ed je 10ba62 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 10ba75: 81 fa c0 00 00 00 cmp $0xc0,%edx 10ba7b: 74 e5 je 10ba62 10ba7d: 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 ) ) 10ba82: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10ba86: 76 1f jbe 10baa7 10ba88: b8 0a 00 00 00 mov $0xa,%eax 10ba8d: eb d8 jmp 10ba67 10ba8f: 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 ) ) 10ba90: b8 03 00 00 00 mov $0x3,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10ba95: 8d 65 f4 lea -0xc(%ebp),%esp 10ba98: 5b pop %ebx 10ba99: 5e pop %esi 10ba9a: 5f pop %edi 10ba9b: c9 leave 10ba9c: c3 ret 10ba9d: 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 ) ) 10baa0: 89 d9 mov %ebx,%ecx 10baa2: 83 e1 30 and $0x30,%ecx 10baa5: 75 db jne 10ba82 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10baa7: a1 58 73 12 00 mov 0x127358,%eax 10baac: 40 inc %eax 10baad: 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 ); 10bab2: 83 ec 0c sub $0xc,%esp 10bab5: 68 a0 72 12 00 push $0x1272a0 10baba: 89 4d c4 mov %ecx,-0x3c(%ebp) 10babd: e8 b6 13 00 00 call 10ce78 <_Objects_Allocate> 10bac2: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 10bac4: 83 c4 10 add $0x10,%esp 10bac7: 85 c0 test %eax,%eax 10bac9: 8b 4d c4 mov -0x3c(%ebp),%ecx 10bacc: 0f 84 ba 00 00 00 je 10bb8c _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 10bad2: 89 58 10 mov %ebx,0x10(%eax) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 10bad5: 85 c9 test %ecx,%ecx 10bad7: 74 77 je 10bb50 /* * 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; 10bad9: 31 c0 xor %eax,%eax 10badb: f6 c3 04 test $0x4,%bl 10bade: 0f 95 c0 setne %al 10bae1: 89 45 d8 mov %eax,-0x28(%ebp) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 10bae4: 83 f9 10 cmp $0x10,%ecx 10bae7: 0f 84 ae 00 00 00 je 10bb9b 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; 10baed: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10baf4: c6 45 d4 00 movb $0x0,-0x2c(%ebp) } mutex_status = _CORE_mutex_Initialize( 10baf8: 50 push %eax 10baf9: 31 c0 xor %eax,%eax 10bafb: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10baff: 0f 94 c0 sete %al 10bb02: 50 push %eax 10bb03: 8d 45 d0 lea -0x30(%ebp),%eax 10bb06: 50 push %eax 10bb07: 8d 42 14 lea 0x14(%edx),%eax 10bb0a: 50 push %eax 10bb0b: 89 55 c4 mov %edx,-0x3c(%ebp) 10bb0e: e8 7d 0b 00 00 call 10c690 <_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 ) { 10bb13: 83 c4 10 add $0x10,%esp 10bb16: 83 f8 06 cmp $0x6,%eax 10bb19: 8b 55 c4 mov -0x3c(%ebp),%edx 10bb1c: 0f 84 a9 00 00 00 je 10bbcb <== NEVER TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10bb22: 8b 42 08 mov 0x8(%edx),%eax 10bb25: 0f b7 d8 movzwl %ax,%ebx 10bb28: 8b 0d bc 72 12 00 mov 0x1272bc,%ecx 10bb2e: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10bb31: 89 72 0c mov %esi,0xc(%edx) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 10bb34: 89 07 mov %eax,(%edi) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 10bb36: e8 35 20 00 00 call 10db70 <_Thread_Enable_dispatch> 10bb3b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10bb3d: e9 25 ff ff ff jmp 10ba67 10bb42: 66 90 xchg %ax,%ax CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10bb44: b8 09 00 00 00 mov $0x9,%eax 10bb49: e9 19 ff ff ff jmp 10ba67 10bb4e: 66 90 xchg %ax,%ax */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 10bb50: 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; 10bb57: 31 c0 xor %eax,%eax 10bb59: f6 c3 04 test $0x4,%bl 10bb5c: 0f 95 c0 setne %al 10bb5f: 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; 10bb62: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 10bb69: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) _CORE_semaphore_Initialize( 10bb70: 51 push %ecx 10bb71: ff 75 0c pushl 0xc(%ebp) 10bb74: 8d 45 e0 lea -0x20(%ebp),%eax 10bb77: 50 push %eax 10bb78: 8d 42 14 lea 0x14(%edx),%eax 10bb7b: 50 push %eax 10bb7c: 89 55 c4 mov %edx,-0x3c(%ebp) 10bb7f: e8 b0 0d 00 00 call 10c934 <_CORE_semaphore_Initialize> 10bb84: 83 c4 10 add $0x10,%esp 10bb87: 8b 55 c4 mov -0x3c(%ebp),%edx 10bb8a: eb 96 jmp 10bb22 _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 10bb8c: e8 df 1f 00 00 call 10db70 <_Thread_Enable_dispatch> 10bb91: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10bb96: e9 cc fe ff ff jmp 10ba67 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; 10bb9b: 8b 45 14 mov 0x14(%ebp),%eax 10bb9e: 89 45 dc mov %eax,-0x24(%ebp) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10bba1: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10bba8: c6 45 d4 00 movb $0x0,-0x2c(%ebp) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 10bbac: 83 7d d8 01 cmpl $0x1,-0x28(%ebp) 10bbb0: 0f 85 42 ff ff ff jne 10baf8 if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 10bbb6: f6 c3 40 test $0x40,%bl 10bbb9: 74 30 je 10bbeb the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10bbbb: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10bbc2: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10bbc6: e9 2d ff ff ff jmp 10baf8 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10bbcb: 83 ec 08 sub $0x8,%esp 10bbce: 52 push %edx 10bbcf: 68 a0 72 12 00 push $0x1272a0 10bbd4: e8 1f 16 00 00 call 10d1f8 <_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(); 10bbd9: e8 92 1f 00 00 call 10db70 <_Thread_Enable_dispatch> 10bbde: b8 13 00 00 00 mov $0x13,%eax return RTEMS_INVALID_PRIORITY; 10bbe3: 83 c4 10 add $0x10,%esp 10bbe6: e9 7c fe ff ff jmp 10ba67 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 ) ) { 10bbeb: 84 db test %bl,%bl 10bbed: 0f 89 05 ff ff ff jns 10baf8 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 10bbf3: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10bbfa: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10bbfe: e9 f5 fe ff ff jmp 10baf8 =============================================================================== 0010bc04 : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 10bc04: 55 push %ebp 10bc05: 89 e5 mov %esp,%ebp 10bc07: 53 push %ebx 10bc08: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 10bc0b: 8d 45 f4 lea -0xc(%ebp),%eax 10bc0e: 50 push %eax 10bc0f: ff 75 08 pushl 0x8(%ebp) 10bc12: 68 a0 72 12 00 push $0x1272a0 10bc17: e8 0c 17 00 00 call 10d328 <_Objects_Get> 10bc1c: 89 c3 mov %eax,%ebx register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 10bc1e: 83 c4 10 add $0x10,%esp 10bc21: 8b 4d f4 mov -0xc(%ebp),%ecx 10bc24: 85 c9 test %ecx,%ecx 10bc26: 74 0c je 10bc34 10bc28: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bc2d: 8b 5d fc mov -0x4(%ebp),%ebx 10bc30: c9 leave 10bc31: c3 ret 10bc32: 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); 10bc34: 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) ) { 10bc37: 83 e0 30 and $0x30,%eax 10bc3a: 74 58 je 10bc94 if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 10bc3c: 8b 53 64 mov 0x64(%ebx),%edx 10bc3f: 85 d2 test %edx,%edx 10bc41: 75 15 jne 10bc58 10bc43: 83 f8 20 cmp $0x20,%eax 10bc46: 74 10 je 10bc58 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 10bc48: e8 23 1f 00 00 call 10db70 <_Thread_Enable_dispatch> 10bc4d: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bc52: 8b 5d fc mov -0x4(%ebp),%ebx 10bc55: c9 leave 10bc56: c3 ret 10bc57: 90 nop !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 10bc58: 50 push %eax 10bc59: 6a 04 push $0x4 10bc5b: 6a 00 push $0x0 10bc5d: 8d 43 14 lea 0x14(%ebx),%eax 10bc60: 50 push %eax 10bc61: e8 1e 0a 00 00 call 10c684 <_CORE_mutex_Flush> 10bc66: 83 c4 10 add $0x10,%esp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 10bc69: 83 ec 08 sub $0x8,%esp 10bc6c: 53 push %ebx 10bc6d: 68 a0 72 12 00 push $0x1272a0 10bc72: e8 7d 12 00 00 call 10cef4 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10bc77: 58 pop %eax 10bc78: 5a pop %edx 10bc79: 53 push %ebx 10bc7a: 68 a0 72 12 00 push $0x1272a0 10bc7f: e8 74 15 00 00 call 10d1f8 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 10bc84: e8 e7 1e 00 00 call 10db70 <_Thread_Enable_dispatch> 10bc89: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10bc8b: 83 c4 10 add $0x10,%esp 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 &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 10bc94: 51 push %ecx 10bc95: 6a 02 push $0x2 10bc97: 6a 00 push $0x0 10bc99: 8d 43 14 lea 0x14(%ebx),%eax 10bc9c: 50 push %eax 10bc9d: e8 86 0c 00 00 call 10c928 <_CORE_semaphore_Flush> 10bca2: 83 c4 10 add $0x10,%esp 10bca5: eb c2 jmp 10bc69 =============================================================================== 0010bca8 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 10bca8: 55 push %ebp 10bca9: 89 e5 mov %esp,%ebp 10bcab: 57 push %edi 10bcac: 56 push %esi 10bcad: 53 push %ebx 10bcae: 83 ec 1c sub $0x1c,%esp 10bcb1: 8b 5d 08 mov 0x8(%ebp),%ebx 10bcb4: 8b 75 0c mov 0xc(%ebp),%esi 10bcb7: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Id id, Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) 10bcba: 8d 45 e0 lea -0x20(%ebp),%eax 10bcbd: 50 push %eax 10bcbe: 8d 45 e4 lea -0x1c(%ebp),%eax 10bcc1: 50 push %eax 10bcc2: 53 push %ebx 10bcc3: 68 a0 72 12 00 push $0x1272a0 10bcc8: e8 03 16 00 00 call 10d2d0 <_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 ) { 10bccd: 83 c4 10 add $0x10,%esp 10bcd0: 8b 4d e4 mov -0x1c(%ebp),%ecx 10bcd3: 85 c9 test %ecx,%ecx 10bcd5: 74 0d je 10bce4 10bcd7: b8 04 00 00 00 mov $0x4,%eax break; } return RTEMS_INVALID_ID; } 10bcdc: 8d 65 f4 lea -0xc(%ebp),%esp 10bcdf: 5b pop %ebx 10bce0: 5e pop %esi 10bce1: 5f pop %edi 10bce2: c9 leave 10bce3: 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) ) { 10bce4: f6 40 10 30 testb $0x30,0x10(%eax) 10bce8: 74 36 je 10bd20 _CORE_mutex_Seize( 10bcea: 83 ec 0c sub $0xc,%esp 10bced: ff 75 e0 pushl -0x20(%ebp) 10bcf0: 57 push %edi 10bcf1: 83 e6 01 and $0x1,%esi 10bcf4: 83 f6 01 xor $0x1,%esi 10bcf7: 56 push %esi 10bcf8: 53 push %ebx 10bcf9: 83 c0 14 add $0x14,%eax 10bcfc: 50 push %eax 10bcfd: e8 86 0a 00 00 call 10c788 <_CORE_mutex_Seize> id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10bd02: 83 c4 14 add $0x14,%esp 10bd05: a1 18 74 12 00 mov 0x127418,%eax 10bd0a: ff 70 34 pushl 0x34(%eax) 10bd0d: e8 12 01 00 00 call 10be24 <_Semaphore_Translate_core_mutex_return_code> 10bd12: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10bd15: 8d 65 f4 lea -0xc(%ebp),%esp 10bd18: 5b pop %ebx 10bd19: 5e pop %esi 10bd1a: 5f pop %edi 10bd1b: c9 leave 10bd1c: c3 ret 10bd1d: 8d 76 00 lea 0x0(%esi),%esi { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10bd20: 8b 15 18 74 12 00 mov 0x127418,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10bd26: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( the_semaphore->count != 0 ) { 10bd2d: 8b 48 5c mov 0x5c(%eax),%ecx 10bd30: 85 c9 test %ecx,%ecx 10bd32: 75 2c jne 10bd60 the_semaphore->count -= 1; _ISR_Enable( *level_p ); return; } if ( !wait ) { 10bd34: 83 e6 01 and $0x1,%esi 10bd37: 74 33 je 10bd6c _ISR_Enable( *level_p ); 10bd39: ff 75 e0 pushl -0x20(%ebp) 10bd3c: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 10bd3d: 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( 10bd44: 83 ec 0c sub $0xc,%esp 10bd47: a1 18 74 12 00 mov 0x127418,%eax 10bd4c: ff 70 34 pushl 0x34(%eax) 10bd4f: e8 e0 00 00 00 call 10be34 <_Semaphore_Translate_core_semaphore_return_code> 10bd54: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10bd57: 8d 65 f4 lea -0xc(%ebp),%esp 10bd5a: 5b pop %ebx 10bd5b: 5e pop %esi 10bd5c: 5f pop %edi 10bd5d: c9 leave 10bd5e: c3 ret 10bd5f: 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; 10bd60: 49 dec %ecx 10bd61: 89 48 5c mov %ecx,0x5c(%eax) _ISR_Enable( *level_p ); 10bd64: ff 75 e0 pushl -0x20(%ebp) 10bd67: 9d popf 10bd68: eb da jmp 10bd44 10bd6a: 66 90 xchg %ax,%ax 10bd6c: 8b 0d 58 73 12 00 mov 0x127358,%ecx 10bd72: 41 inc %ecx 10bd73: 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; 10bd79: 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; 10bd80: 83 c0 14 add $0x14,%eax 10bd83: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10bd86: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( *level_p ); 10bd89: ff 75 e0 pushl -0x20(%ebp) 10bd8c: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 10bd8d: 52 push %edx 10bd8e: 68 7c e3 10 00 push $0x10e37c 10bd93: 57 push %edi 10bd94: 50 push %eax 10bd95: e8 d2 22 00 00 call 10e06c <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10bd9a: e8 d1 1d 00 00 call 10db70 <_Thread_Enable_dispatch> 10bd9f: 83 c4 10 add $0x10,%esp 10bda2: eb a0 jmp 10bd44 =============================================================================== 0010bda4 : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 10bda4: 55 push %ebp 10bda5: 89 e5 mov %esp,%ebp 10bda7: 53 push %ebx 10bda8: 83 ec 18 sub $0x18,%esp 10bdab: 8b 5d 08 mov 0x8(%ebp),%ebx RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 10bdae: 8d 45 f4 lea -0xc(%ebp),%eax 10bdb1: 50 push %eax 10bdb2: 53 push %ebx 10bdb3: 68 a0 72 12 00 push $0x1272a0 10bdb8: e8 6b 15 00 00 call 10d328 <_Objects_Get> Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 10bdbd: 83 c4 10 add $0x10,%esp 10bdc0: 8b 55 f4 mov -0xc(%ebp),%edx 10bdc3: 85 d2 test %edx,%edx 10bdc5: 74 0d je 10bdd4 10bdc7: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bdcc: 8b 5d fc mov -0x4(%ebp),%ebx 10bdcf: c9 leave 10bdd0: c3 ret 10bdd1: 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) ) { 10bdd4: f6 40 10 30 testb $0x30,0x10(%eax) 10bdd8: 75 26 jne 10be00 MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); } else { semaphore_status = _CORE_semaphore_Surrender( 10bdda: 52 push %edx 10bddb: 6a 00 push $0x0 10bddd: 53 push %ebx 10bdde: 83 c0 14 add $0x14,%eax 10bde1: 50 push %eax 10bde2: e8 8d 0b 00 00 call 10c974 <_CORE_semaphore_Surrender> 10bde7: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10bde9: e8 82 1d 00 00 call 10db70 <_Thread_Enable_dispatch> return _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); 10bdee: 89 1c 24 mov %ebx,(%esp) 10bdf1: e8 3e 00 00 00 call 10be34 <_Semaphore_Translate_core_semaphore_return_code> &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return 10bdf6: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bdf9: 8b 5d fc mov -0x4(%ebp),%ebx 10bdfc: c9 leave 10bdfd: c3 ret 10bdfe: 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( 10be00: 51 push %ecx 10be01: 6a 00 push $0x0 10be03: 53 push %ebx 10be04: 83 c0 14 add $0x14,%eax 10be07: 50 push %eax 10be08: e8 1b 0a 00 00 call 10c828 <_CORE_mutex_Surrender> 10be0d: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10be0f: e8 5c 1d 00 00 call 10db70 <_Thread_Enable_dispatch> return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 10be14: 89 1c 24 mov %ebx,(%esp) 10be17: e8 08 00 00 00 call 10be24 <_Semaphore_Translate_core_mutex_return_code> 10be1c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10be1f: 8b 5d fc mov -0x4(%ebp),%ebx 10be22: c9 leave 10be23: c3 ret =============================================================================== 00118670 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 118670: 55 push %ebp 118671: 89 e5 mov %esp,%ebp 118673: 53 push %ebx 118674: 83 ec 14 sub $0x14,%esp 118677: 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 ) 11867a: 85 db test %ebx,%ebx 11867c: 75 0a jne 118688 11867e: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118683: 8b 5d fc mov -0x4(%ebp),%ebx 118686: c9 leave 118687: c3 ret ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 118688: 83 ec 08 sub $0x8,%esp 11868b: 8d 45 f4 lea -0xc(%ebp),%eax 11868e: 50 push %eax 11868f: ff 75 08 pushl 0x8(%ebp) 118692: e8 0d 3b 00 00 call 11c1a4 <_Thread_Get> switch ( location ) { 118697: 83 c4 10 add $0x10,%esp 11869a: 8b 55 f4 mov -0xc(%ebp),%edx 11869d: 85 d2 test %edx,%edx 11869f: 74 0b je 1186ac 1186a1: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1186a6: 8b 5d fc mov -0x4(%ebp),%ebx 1186a9: c9 leave 1186aa: c3 ret 1186ab: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 1186ac: 8b 90 f0 00 00 00 mov 0xf0(%eax),%edx asr = &api->Signal; 1186b2: 8b 4a 0c mov 0xc(%edx),%ecx 1186b5: 85 c9 test %ecx,%ecx 1186b7: 74 43 je 1186fc if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 1186b9: 80 7a 08 00 cmpb $0x0,0x8(%edx) 1186bd: 74 29 je 1186e8 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 1186bf: 9c pushf 1186c0: fa cli 1186c1: 59 pop %ecx *signal_set |= signals; 1186c2: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 1186c5: 51 push %ecx 1186c6: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 1186c7: c6 40 74 01 movb $0x1,0x74(%eax) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 1186cb: 8b 15 74 2c 14 00 mov 0x142c74,%edx 1186d1: 85 d2 test %edx,%edx 1186d3: 74 1b je 1186f0 1186d5: 3b 05 98 2c 14 00 cmp 0x142c98,%eax 1186db: 75 13 jne 1186f0 <== NEVER TAKEN _ISR_Signals_to_thread_executing = true; 1186dd: c6 05 48 2d 14 00 01 movb $0x1,0x142d48 1186e4: eb 0a jmp 1186f0 1186e6: 66 90 xchg %ax,%ax rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 1186e8: 9c pushf 1186e9: fa cli 1186ea: 58 pop %eax *signal_set |= signals; 1186eb: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 1186ee: 50 push %eax 1186ef: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 1186f0: e8 5f 3a 00 00 call 11c154 <_Thread_Enable_dispatch> 1186f5: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1186f7: 8b 5d fc mov -0x4(%ebp),%ebx 1186fa: c9 leave 1186fb: c3 ret _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 1186fc: e8 53 3a 00 00 call 11c154 <_Thread_Enable_dispatch> 118701: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; 118706: e9 78 ff ff ff jmp 118683 =============================================================================== 0010be44 : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { 10be44: 55 push %ebp 10be45: 89 e5 mov %esp,%ebp 10be47: 57 push %edi 10be48: 56 push %esi 10be49: 53 push %ebx 10be4a: 83 ec 1c sub $0x1c,%esp 10be4d: 8b 5d 08 mov 0x8(%ebp),%ebx 10be50: 8b 4d 0c mov 0xc(%ebp),%ecx 10be53: 8b 7d 18 mov 0x18(%ebp),%edi 10be56: 8b 75 1c mov 0x1c(%ebp),%esi Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10be59: 85 f6 test %esi,%esi 10be5b: 0f 84 37 01 00 00 je 10bf98 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10be61: 85 db test %ebx,%ebx 10be63: 0f 84 cb 00 00 00 je 10bf34 /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 10be69: 66 85 ff test %di,%di 10be6c: 78 1d js 10be8b */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10be6e: 85 c9 test %ecx,%ecx 10be70: 75 0e jne 10be80 } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; 10be72: b8 13 00 00 00 mov $0x13,%eax } 10be77: 8d 65 f4 lea -0xc(%ebp),%esp 10be7a: 5b pop %ebx 10be7b: 5e pop %esi 10be7c: 5f pop %edi 10be7d: c9 leave 10be7e: c3 ret 10be7f: 90 nop 10be80: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax 10be87: 39 c1 cmp %eax,%ecx 10be89: 77 e7 ja 10be72 */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10be8b: 83 ec 0c sub $0xc,%esp 10be8e: ff 35 10 74 12 00 pushl 0x127410 10be94: 89 4d e4 mov %ecx,-0x1c(%ebp) 10be97: e8 60 06 00 00 call 10c4fc <_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 ); 10be9c: c7 04 24 e0 72 12 00 movl $0x1272e0,(%esp) 10bea3: e8 d0 0f 00 00 call 10ce78 <_Objects_Allocate> 10bea8: 89 c2 mov %eax,%edx * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 10beaa: 83 c4 10 add $0x10,%esp 10bead: 85 c0 test %eax,%eax 10beaf: 8b 4d e4 mov -0x1c(%ebp),%ecx 10beb2: 0f 84 c0 00 00 00 je 10bf78 /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 10beb8: 50 push %eax 10beb9: 53 push %ebx 10beba: 8b 45 14 mov 0x14(%ebp),%eax 10bebd: 83 e0 01 and $0x1,%eax 10bec0: 50 push %eax 10bec1: 6a 00 push $0x0 10bec3: 8b 45 14 mov 0x14(%ebp),%eax 10bec6: c1 e8 09 shr $0x9,%eax 10bec9: 83 e0 01 and $0x1,%eax 10becc: 50 push %eax 10becd: 8b 45 14 mov 0x14(%ebp),%eax 10bed0: c1 e8 08 shr $0x8,%eax 10bed3: 83 f0 01 xor $0x1,%eax 10bed6: 83 e0 01 and $0x1,%eax 10bed9: 50 push %eax 10beda: 51 push %ecx 10bedb: 83 e7 01 and $0x1,%edi 10bede: 57 push %edi 10bedf: ff 75 10 pushl 0x10(%ebp) 10bee2: 6a 00 push $0x0 10bee4: 52 push %edx 10bee5: 68 e0 72 12 00 push $0x1272e0 10beea: 89 55 e4 mov %edx,-0x1c(%ebp) 10beed: e8 1a 1d 00 00 call 10dc0c <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 10bef2: 83 c4 30 add $0x30,%esp 10bef5: 84 c0 test %al,%al 10bef7: 8b 55 e4 mov -0x1c(%ebp),%edx 10befa: 74 48 je 10bf44 } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 10befc: 8b 8a f0 00 00 00 mov 0xf0(%edx),%ecx 10bf02: 8b 45 14 mov 0x14(%ebp),%eax 10bf05: c1 e8 0a shr $0xa,%eax 10bf08: 83 f0 01 xor $0x1,%eax 10bf0b: 83 e0 01 and $0x1,%eax 10bf0e: 88 41 08 mov %al,0x8(%ecx) *id = the_thread->Object.id; 10bf11: 8b 42 08 mov 0x8(%edx),%eax 10bf14: 89 06 mov %eax,(%esi) ); } #endif _RTEMS_Unlock_allocator(); 10bf16: 83 ec 0c sub $0xc,%esp 10bf19: ff 35 10 74 12 00 pushl 0x127410 10bf1f: e8 20 06 00 00 call 10c544 <_API_Mutex_Unlock> 10bf24: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10bf26: 83 c4 10 add $0x10,%esp } 10bf29: 8d 65 f4 lea -0xc(%ebp),%esp 10bf2c: 5b pop %ebx 10bf2d: 5e pop %esi 10bf2e: 5f pop %edi 10bf2f: c9 leave 10bf30: c3 ret 10bf31: 8d 76 00 lea 0x0(%esi),%esi if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10bf34: b8 03 00 00 00 mov $0x3,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10bf39: 8d 65 f4 lea -0xc(%ebp),%esp 10bf3c: 5b pop %ebx 10bf3d: 5e pop %esi 10bf3e: 5f pop %edi 10bf3f: c9 leave 10bf40: c3 ret 10bf41: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 10bf44: 83 ec 0c sub $0xc,%esp 10bf47: ff 72 08 pushl 0x8(%edx) 10bf4a: e8 19 13 00 00 call 10d268 <_Objects_Get_information_id> 10bf4f: 5a pop %edx 10bf50: 59 pop %ecx 10bf51: 8b 55 e4 mov -0x1c(%ebp),%edx 10bf54: 52 push %edx 10bf55: 50 push %eax 10bf56: e8 9d 12 00 00 call 10d1f8 <_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(); 10bf5b: 58 pop %eax 10bf5c: ff 35 10 74 12 00 pushl 0x127410 10bf62: e8 dd 05 00 00 call 10c544 <_API_Mutex_Unlock> 10bf67: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 10bf6c: 83 c4 10 add $0x10,%esp } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10bf6f: 8d 65 f4 lea -0xc(%ebp),%esp 10bf72: 5b pop %ebx 10bf73: 5e pop %esi 10bf74: 5f pop %edi 10bf75: c9 leave 10bf76: c3 ret 10bf77: 90 nop */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10bf78: 83 ec 0c sub $0xc,%esp 10bf7b: ff 35 10 74 12 00 pushl 0x127410 10bf81: e8 be 05 00 00 call 10c544 <_API_Mutex_Unlock> 10bf86: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10bf8b: 83 c4 10 add $0x10,%esp } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10bf8e: 8d 65 f4 lea -0xc(%ebp),%esp 10bf91: 5b pop %ebx 10bf92: 5e pop %esi 10bf93: 5f pop %edi 10bf94: c9 leave 10bf95: c3 ret 10bf96: 66 90 xchg %ax,%ax Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10bf98: b8 09 00 00 00 mov $0x9,%eax 10bf9d: e9 d5 fe ff ff jmp 10be77 =============================================================================== 0010bfa4 : */ rtems_status_code rtems_task_delete( rtems_id id ) { 10bfa4: 55 push %ebp 10bfa5: 89 e5 mov %esp,%ebp 10bfa7: 53 push %ebx 10bfa8: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 10bfab: ff 35 10 74 12 00 pushl 0x127410 10bfb1: e8 46 05 00 00 call 10c4fc <_API_Mutex_Lock> the_thread = _Thread_Get( id, &location ); 10bfb6: 5a pop %edx 10bfb7: 59 pop %ecx 10bfb8: 8d 45 f4 lea -0xc(%ebp),%eax 10bfbb: 50 push %eax 10bfbc: ff 75 08 pushl 0x8(%ebp) 10bfbf: e8 d0 1b 00 00 call 10db94 <_Thread_Get> 10bfc4: 89 c3 mov %eax,%ebx switch ( location ) { 10bfc6: 83 c4 10 add $0x10,%esp 10bfc9: 8b 45 f4 mov -0xc(%ebp),%eax 10bfcc: 85 c0 test %eax,%eax 10bfce: 75 44 jne 10c014 case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 10bfd0: 83 ec 0c sub $0xc,%esp 10bfd3: ff 73 08 pushl 0x8(%ebx) 10bfd6: e8 8d 12 00 00 call 10d268 <_Objects_Get_information_id> 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 10bfdb: 5a pop %edx 10bfdc: 59 pop %ecx 10bfdd: 53 push %ebx 10bfde: 50 push %eax 10bfdf: e8 78 18 00 00 call 10d85c <_Thread_Close> 10bfe4: 58 pop %eax 10bfe5: ff 73 08 pushl 0x8(%ebx) 10bfe8: e8 7b 12 00 00 call 10d268 <_Objects_Get_information_id> 10bfed: 5a pop %edx 10bfee: 59 pop %ecx 10bfef: 53 push %ebx 10bff0: 50 push %eax 10bff1: e8 02 12 00 00 call 10d1f8 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10bff6: 58 pop %eax 10bff7: ff 35 10 74 12 00 pushl 0x127410 10bffd: e8 42 05 00 00 call 10c544 <_API_Mutex_Unlock> _Thread_Enable_dispatch(); 10c002: e8 69 1b 00 00 call 10db70 <_Thread_Enable_dispatch> 10c007: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10c009: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } 10c00c: 8b 5d fc mov -0x4(%ebp),%ebx 10c00f: c9 leave 10c010: c3 ret 10c011: 8d 76 00 lea 0x0(%esi),%esi case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 10c014: 83 ec 0c sub $0xc,%esp 10c017: ff 35 10 74 12 00 pushl 0x127410 10c01d: e8 22 05 00 00 call 10c544 <_API_Mutex_Unlock> 10c022: b8 04 00 00 00 mov $0x4,%eax return RTEMS_INVALID_ID; 10c027: 83 c4 10 add $0x10,%esp } 10c02a: 8b 5d fc mov -0x4(%ebp),%ebx 10c02d: c9 leave 10c02e: c3 ret =============================================================================== 0010dac0 : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 10dac0: 55 push %ebp 10dac1: 89 e5 mov %esp,%ebp 10dac3: 56 push %esi 10dac4: 53 push %ebx 10dac5: 83 ec 10 sub $0x10,%esp 10dac8: 8b 45 08 mov 0x8(%ebp),%eax 10dacb: 8b 75 0c mov 0xc(%ebp),%esi 10dace: 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() ) 10dad1: 80 3d e4 71 12 00 00 cmpb $0x0,0x1271e4 10dad8: 74 6e je 10db48 return RTEMS_NOT_CONFIGURED; if ( !note ) 10dada: 85 db test %ebx,%ebx 10dadc: 74 7e je 10db5c /* * 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 ) 10dade: 83 fe 0f cmp $0xf,%esi 10dae1: 77 3d ja 10db20 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10dae3: 85 c0 test %eax,%eax 10dae5: 74 45 je 10db2c _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10dae7: 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 ) || 10daed: 3b 42 08 cmp 0x8(%edx),%eax 10daf0: 74 40 je 10db32 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10daf2: 83 ec 08 sub $0x8,%esp 10daf5: 8d 55 f4 lea -0xc(%ebp),%edx 10daf8: 52 push %edx 10daf9: 50 push %eax 10dafa: e8 b9 1e 00 00 call 10f9b8 <_Thread_Get> switch ( location ) { 10daff: 83 c4 10 add $0x10,%esp 10db02: 8b 55 f4 mov -0xc(%ebp),%edx 10db05: 85 d2 test %edx,%edx 10db07: 75 4b jne 10db54 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10db09: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10db0f: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10db13: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10db15: e8 7a 1e 00 00 call 10f994 <_Thread_Enable_dispatch> 10db1a: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10db1c: eb 07 jmp 10db25 10db1e: 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 ) 10db20: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10db25: 8d 65 f8 lea -0x8(%ebp),%esp 10db28: 5b pop %ebx 10db29: 5e pop %esi 10db2a: c9 leave 10db2b: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10db2c: 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 ]; 10db32: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax 10db38: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10db3c: 89 03 mov %eax,(%ebx) 10db3e: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10db40: 8d 65 f8 lea -0x8(%ebp),%esp 10db43: 5b pop %ebx 10db44: 5e pop %esi 10db45: c9 leave 10db46: c3 ret 10db47: 90 nop { register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10db48: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10db4d: 8d 65 f8 lea -0x8(%ebp),%esp 10db50: 5b pop %ebx 10db51: 5e pop %esi 10db52: c9 leave 10db53: c3 ret *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 10db54: b8 04 00 00 00 mov $0x4,%eax 10db59: eb ca jmp 10db25 10db5b: 90 nop RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; if ( !note ) 10db5c: b8 09 00 00 00 mov $0x9,%eax 10db61: eb c2 jmp 10db25 =============================================================================== 00118a54 : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { 118a54: 55 push %ebp 118a55: 89 e5 mov %esp,%ebp 118a57: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 118a5a: 8d 45 f4 lea -0xc(%ebp),%eax 118a5d: 50 push %eax 118a5e: ff 75 08 pushl 0x8(%ebp) 118a61: e8 3e 37 00 00 call 11c1a4 <_Thread_Get> switch ( location ) { 118a66: 83 c4 10 add $0x10,%esp 118a69: 8b 55 f4 mov -0xc(%ebp),%edx 118a6c: 85 d2 test %edx,%edx 118a6e: 74 08 je 118a78 118a70: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a75: c9 leave 118a76: c3 ret 118a77: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 118a78: f6 40 10 02 testb $0x2,0x10(%eax) 118a7c: 74 0e je 118a8c _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 118a7e: e8 d1 36 00 00 call 11c154 <_Thread_Enable_dispatch> 118a83: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a88: c9 leave 118a89: c3 ret 118a8a: 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(); 118a8c: e8 c3 36 00 00 call 11c154 <_Thread_Enable_dispatch> 118a91: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a93: c9 leave 118a94: c3 ret =============================================================================== 00113950 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 113950: 55 push %ebp 113951: 89 e5 mov %esp,%ebp 113953: 57 push %edi 113954: 56 push %esi 113955: 53 push %ebx 113956: 83 ec 1c sub $0x1c,%esp 113959: 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 ) 11395c: 85 c9 test %ecx,%ecx 11395e: 0f 84 1c 01 00 00 je 113a80 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 113964: 8b 1d 18 74 12 00 mov 0x127418,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 11396a: 8b bb f0 00 00 00 mov 0xf0(%ebx),%edi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 113970: 80 7b 75 01 cmpb $0x1,0x75(%ebx) 113974: 19 f6 sbb %esi,%esi 113976: 81 e6 00 01 00 00 and $0x100,%esi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 11397c: 8b 53 7c mov 0x7c(%ebx),%edx 11397f: 85 d2 test %edx,%edx 113981: 0f 85 b5 00 00 00 jne 113a3c if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 113987: 80 7f 08 01 cmpb $0x1,0x8(%edi) 11398b: 19 d2 sbb %edx,%edx 11398d: 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(); 113993: 89 55 e4 mov %edx,-0x1c(%ebp) 113996: 89 4d e0 mov %ecx,-0x20(%ebp) 113999: e8 7e b5 ff ff call 10ef1c <_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; 11399e: 8b 55 e4 mov -0x1c(%ebp),%edx 1139a1: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 1139a3: 09 f0 or %esi,%eax 1139a5: 8b 4d e0 mov -0x20(%ebp),%ecx 1139a8: 89 01 mov %eax,(%ecx) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 1139aa: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 1139b1: 74 0f je 1139c2 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 1139b3: 8b 45 08 mov 0x8(%ebp),%eax 1139b6: c1 e8 08 shr $0x8,%eax 1139b9: 83 f0 01 xor $0x1,%eax 1139bc: 83 e0 01 and $0x1,%eax 1139bf: 88 43 75 mov %al,0x75(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 1139c2: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 1139c9: 74 18 je 1139e3 if ( _Modes_Is_timeslice(mode_set) ) { 1139cb: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 1139d2: 74 74 je 113a48 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 1139d4: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 1139db: a1 24 73 12 00 mov 0x127324,%eax 1139e0: 89 43 78 mov %eax,0x78(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 1139e3: f6 45 0c 01 testb $0x1,0xc(%ebp) 1139e7: 74 07 je 1139f0 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 1139e9: f6 45 08 01 testb $0x1,0x8(%ebp) 1139ed: 74 69 je 113a58 1139ef: fa cli */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 1139f0: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 1139f7: 74 2c je 113a25 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 1139f9: 8b 45 08 mov 0x8(%ebp),%eax 1139fc: c1 e8 0a shr $0xa,%eax 1139ff: 83 f0 01 xor $0x1,%eax 113a02: 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; 113a05: 38 47 08 cmp %al,0x8(%edi) 113a08: 74 1b je 113a25 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; 113a0a: 88 47 08 mov %al,0x8(%edi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 113a0d: 9c pushf 113a0e: fa cli 113a0f: 58 pop %eax _signals = information->signals_pending; 113a10: 8b 57 18 mov 0x18(%edi),%edx information->signals_pending = information->signals_posted; 113a13: 8b 4f 14 mov 0x14(%edi),%ecx 113a16: 89 4f 18 mov %ecx,0x18(%edi) information->signals_posted = _signals; 113a19: 89 57 14 mov %edx,0x14(%edi) _ISR_Enable( _level ); 113a1c: 50 push %eax 113a1d: 9d popf if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 113a1e: 8b 47 14 mov 0x14(%edi),%eax 113a21: 85 c0 test %eax,%eax 113a23: 75 53 jne 113a78 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; 113a25: 31 db xor %ebx,%ebx } } } if ( _System_state_Is_up( _System_state_Get() ) ) 113a27: 83 3d 20 75 12 00 03 cmpl $0x3,0x127520 113a2e: 74 2c je 113a5c <== ALWAYS TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); 113a30: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 113a32: 83 c4 1c add $0x1c,%esp 113a35: 5b pop %ebx 113a36: 5e pop %esi 113a37: 5f pop %edi 113a38: c9 leave 113a39: c3 ret 113a3a: 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; 113a3c: 81 ce 00 02 00 00 or $0x200,%esi 113a42: e9 40 ff ff ff jmp 113987 113a47: 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; 113a48: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 113a4f: f6 45 0c 01 testb $0x1,0xc(%ebp) 113a53: 74 9b je 1139f0 113a55: eb 92 jmp 1139e9 113a57: 90 nop 113a58: fb sti 113a59: eb 95 jmp 1139f0 113a5b: 90 nop } } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 113a5c: e8 ab 01 00 00 call 113c0c <_Thread_Evaluate_mode> 113a61: 84 c0 test %al,%al 113a63: 75 04 jne 113a69 113a65: 84 db test %bl,%bl 113a67: 74 c7 je 113a30 _Thread_Dispatch(); 113a69: e8 a6 9f ff ff call 10da14 <_Thread_Dispatch> 113a6e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 113a70: 83 c4 1c add $0x1c,%esp 113a73: 5b pop %ebx 113a74: 5e pop %esi 113a75: 5f pop %edi 113a76: c9 leave 113a77: 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; 113a78: c6 43 74 01 movb $0x1,0x74(%ebx) 113a7c: b3 01 mov $0x1,%bl 113a7e: eb a7 jmp 113a27 ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 113a80: 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; } 113a85: 83 c4 1c add $0x1c,%esp 113a88: 5b pop %ebx 113a89: 5e pop %esi 113a8a: 5f pop %edi 113a8b: c9 leave 113a8c: c3 ret =============================================================================== 0010f2f0 : */ rtems_status_code rtems_task_resume( rtems_id id ) { 10f2f0: 55 push %ebp 10f2f1: 89 e5 mov %esp,%ebp 10f2f3: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10f2f6: 8d 45 f4 lea -0xc(%ebp),%eax 10f2f9: 50 push %eax 10f2fa: ff 75 08 pushl 0x8(%ebp) 10f2fd: e8 16 1c 00 00 call 110f18 <_Thread_Get> switch ( location ) { 10f302: 83 c4 10 add $0x10,%esp 10f305: 8b 55 f4 mov -0xc(%ebp),%edx 10f308: 85 d2 test %edx,%edx 10f30a: 74 08 je 10f314 10f30c: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f311: c9 leave 10f312: c3 ret 10f313: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 10f314: f6 40 10 02 testb $0x2,0x10(%eax) 10f318: 75 0e jne 10f328 _Thread_Resume( the_thread, true ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10f31a: e8 a9 1b 00 00 call 110ec8 <_Thread_Enable_dispatch> 10f31f: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f324: c9 leave 10f325: c3 ret 10f326: 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 ); 10f328: 83 ec 08 sub $0x8,%esp 10f32b: 6a 01 push $0x1 10f32d: 50 push %eax 10f32e: e8 05 24 00 00 call 111738 <_Thread_Resume> _Thread_Enable_dispatch(); 10f333: e8 90 1b 00 00 call 110ec8 <_Thread_Enable_dispatch> 10f338: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f33a: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f33d: c9 leave 10f33e: c3 ret =============================================================================== 0010dc38 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 10dc38: 55 push %ebp 10dc39: 89 e5 mov %esp,%ebp 10dc3b: 56 push %esi 10dc3c: 53 push %ebx 10dc3d: 83 ec 10 sub $0x10,%esp 10dc40: 8b 45 08 mov 0x8(%ebp),%eax 10dc43: 8b 5d 0c mov 0xc(%ebp),%ebx 10dc46: 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() ) 10dc49: 80 3d e4 71 12 00 00 cmpb $0x0,0x1271e4 10dc50: 74 66 je 10dcb8 /* * 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 ) 10dc52: 83 fb 0f cmp $0xf,%ebx 10dc55: 77 39 ja 10dc90 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10dc57: 85 c0 test %eax,%eax 10dc59: 74 41 je 10dc9c _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10dc5b: 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 ) || 10dc61: 3b 42 08 cmp 0x8(%edx),%eax 10dc64: 74 3c je 10dca2 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10dc66: 83 ec 08 sub $0x8,%esp 10dc69: 8d 55 f4 lea -0xc(%ebp),%edx 10dc6c: 52 push %edx 10dc6d: 50 push %eax 10dc6e: e8 45 1d 00 00 call 10f9b8 <_Thread_Get> switch ( location ) { 10dc73: 83 c4 10 add $0x10,%esp 10dc76: 8b 55 f4 mov -0xc(%ebp),%edx 10dc79: 85 d2 test %edx,%edx 10dc7b: 75 47 jne 10dcc4 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10dc7d: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10dc83: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) _Thread_Enable_dispatch(); 10dc87: e8 08 1d 00 00 call 10f994 <_Thread_Enable_dispatch> 10dc8c: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10dc8e: eb 05 jmp 10dc95 /* * 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 ) 10dc90: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10dc95: 8d 65 f8 lea -0x8(%ebp),%esp 10dc98: 5b pop %ebx 10dc99: 5e pop %esi 10dc9a: c9 leave 10dc9b: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10dc9c: 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; 10dca2: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax 10dca8: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) 10dcac: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10dcae: 8d 65 f8 lea -0x8(%ebp),%esp 10dcb1: 5b pop %ebx 10dcb2: 5e pop %esi 10dcb3: c9 leave 10dcb4: c3 ret 10dcb5: 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() ) 10dcb8: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10dcbd: 8d 65 f8 lea -0x8(%ebp),%esp 10dcc0: 5b pop %ebx 10dcc1: 5e pop %esi 10dcc2: c9 leave 10dcc3: c3 ret api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 10dcc4: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10dcc9: 8d 65 f8 lea -0x8(%ebp),%esp 10dccc: 5b pop %ebx 10dccd: 5e pop %esi 10dcce: c9 leave 10dccf: c3 ret =============================================================================== 0010ffac : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10ffac: 55 push %ebp 10ffad: 89 e5 mov %esp,%ebp 10ffaf: 56 push %esi 10ffb0: 53 push %ebx 10ffb1: 83 ec 10 sub $0x10,%esp 10ffb4: 8b 5d 0c mov 0xc(%ebp),%ebx 10ffb7: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10ffba: 85 db test %ebx,%ebx 10ffbc: 74 0b je 10ffc9 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10ffbe: 0f b6 05 14 72 12 00 movzbl 0x127214,%eax 10ffc5: 39 c3 cmp %eax,%ebx 10ffc7: 77 5f ja 110028 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10ffc9: 85 f6 test %esi,%esi 10ffcb: 74 67 je 110034 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10ffcd: 83 ec 08 sub $0x8,%esp 10ffd0: 8d 45 f4 lea -0xc(%ebp),%eax 10ffd3: 50 push %eax 10ffd4: ff 75 08 pushl 0x8(%ebp) 10ffd7: e8 6c 1d 00 00 call 111d48 <_Thread_Get> switch ( location ) { 10ffdc: 83 c4 10 add $0x10,%esp 10ffdf: 8b 55 f4 mov -0xc(%ebp),%edx 10ffe2: 85 d2 test %edx,%edx 10ffe4: 75 36 jne 11001c case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10ffe6: 8b 50 14 mov 0x14(%eax),%edx 10ffe9: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10ffeb: 85 db test %ebx,%ebx 10ffed: 74 1c je 11000b the_thread->real_priority = new_priority; 10ffef: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10fff2: 8b 48 1c mov 0x1c(%eax),%ecx 10fff5: 85 c9 test %ecx,%ecx 10fff7: 74 05 je 10fffe the_thread->current_priority > new_priority ) 10fff9: 3b 58 14 cmp 0x14(%eax),%ebx 10fffc: 73 0d jae 11000b <== ALWAYS TAKEN _Thread_Change_priority( the_thread, new_priority, false ); 10fffe: 52 push %edx 10ffff: 6a 00 push $0x0 110001: 53 push %ebx 110002: 50 push %eax 110003: e8 08 18 00 00 call 111810 <_Thread_Change_priority> 110008: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 11000b: e8 e8 1c 00 00 call 111cf8 <_Thread_Enable_dispatch> 110010: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110012: 8d 65 f8 lea -0x8(%ebp),%esp 110015: 5b pop %ebx 110016: 5e pop %esi 110017: c9 leave 110018: c3 ret 110019: 8d 76 00 lea 0x0(%esi),%esi if ( !old_priority ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 11001c: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110021: 8d 65 f8 lea -0x8(%ebp),%esp 110024: 5b pop %ebx 110025: 5e pop %esi 110026: c9 leave 110027: c3 ret 110028: b8 13 00 00 00 mov $0x13,%eax 11002d: 8d 65 f8 lea -0x8(%ebp),%esp 110030: 5b pop %ebx 110031: 5e pop %esi 110032: c9 leave 110033: c3 ret if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 110034: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110039: 8d 65 f8 lea -0x8(%ebp),%esp 11003c: 5b pop %ebx 11003d: 5e pop %esi 11003e: c9 leave 11003f: c3 ret =============================================================================== 0010c0e8 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 10c0e8: 55 push %ebp 10c0e9: 89 e5 mov %esp,%ebp 10c0eb: 53 push %ebx 10c0ec: 83 ec 14 sub $0x14,%esp 10c0ef: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10c0f2: 85 db test %ebx,%ebx 10c0f4: 74 4e je 10c144 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10c0f6: 83 ec 08 sub $0x8,%esp 10c0f9: 8d 45 f4 lea -0xc(%ebp),%eax 10c0fc: 50 push %eax 10c0fd: ff 75 08 pushl 0x8(%ebp) 10c100: e8 8f 1a 00 00 call 10db94 <_Thread_Get> switch ( location ) { 10c105: 83 c4 10 add $0x10,%esp 10c108: 8b 55 f4 mov -0xc(%ebp),%edx 10c10b: 85 d2 test %edx,%edx 10c10d: 75 29 jne 10c138 case OBJECTS_LOCAL: if ( _Thread_Start( 10c10f: 83 ec 0c sub $0xc,%esp 10c112: ff 75 10 pushl 0x10(%ebp) 10c115: 6a 00 push $0x0 10c117: 53 push %ebx 10c118: 6a 00 push $0x0 10c11a: 50 push %eax 10c11b: e8 40 25 00 00 call 10e660 <_Thread_Start> 10c120: 83 c4 20 add $0x20,%esp 10c123: 84 c0 test %al,%al 10c125: 75 29 jne 10c150 the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10c127: e8 44 1a 00 00 call 10db70 <_Thread_Enable_dispatch> 10c12c: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c131: 8b 5d fc mov -0x4(%ebp),%ebx 10c134: c9 leave 10c135: c3 ret 10c136: 66 90 xchg %ax,%ax if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 10c138: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c13d: 8b 5d fc mov -0x4(%ebp),%ebx 10c140: c9 leave 10c141: c3 ret 10c142: 66 90 xchg %ax,%ax ) { register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10c144: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c149: 8b 5d fc mov -0x4(%ebp),%ebx 10c14c: c9 leave 10c14d: c3 ret 10c14e: 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(); 10c150: e8 1b 1a 00 00 call 10db70 <_Thread_Enable_dispatch> 10c155: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c157: 8b 5d fc mov -0x4(%ebp),%ebx 10c15a: c9 leave 10c15b: c3 ret =============================================================================== 00111508 : */ rtems_status_code rtems_task_suspend( rtems_id id ) { 111508: 55 push %ebp 111509: 89 e5 mov %esp,%ebp 11150b: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 11150e: 8d 45 f4 lea -0xc(%ebp),%eax 111511: 50 push %eax 111512: ff 75 08 pushl 0x8(%ebp) 111515: e8 7a c6 ff ff call 10db94 <_Thread_Get> switch ( location ) { 11151a: 83 c4 10 add $0x10,%esp 11151d: 8b 55 f4 mov -0xc(%ebp),%edx 111520: 85 d2 test %edx,%edx 111522: 74 08 je 11152c 111524: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111529: c9 leave 11152a: c3 ret 11152b: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 11152c: f6 40 10 02 testb $0x2,0x10(%eax) 111530: 74 0e je 111540 _Thread_Suspend( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 111532: e8 39 c6 ff ff call 10db70 <_Thread_Enable_dispatch> 111537: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11153c: c9 leave 11153d: c3 ret 11153e: 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 ); 111540: 83 ec 0c sub $0xc,%esp 111543: 50 push %eax 111544: e8 6b 0a 00 00 call 111fb4 <_Thread_Suspend> _Thread_Enable_dispatch(); 111549: e8 22 c6 ff ff call 10db70 <_Thread_Enable_dispatch> 11154e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 111550: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111553: c9 leave 111554: c3 ret =============================================================================== 0010c9c8 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 10c9c8: 55 push %ebp 10c9c9: 89 e5 mov %esp,%ebp 10c9cb: 57 push %edi 10c9cc: 56 push %esi 10c9cd: 53 push %ebx 10c9ce: 83 ec 1c sub $0x1c,%esp 10c9d1: 8b 5d 0c mov 0xc(%ebp),%ebx 10c9d4: 8b 7d 10 mov 0x10(%ebp),%edi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 10c9d7: 85 db test %ebx,%ebx 10c9d9: 0f 84 9d 00 00 00 je 10ca7c return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10c9df: 83 ec 08 sub $0x8,%esp 10c9e2: 8d 45 e4 lea -0x1c(%ebp),%eax 10c9e5: 50 push %eax 10c9e6: ff 75 08 pushl 0x8(%ebp) 10c9e9: e8 2a 1c 00 00 call 10e618 <_Thread_Get> 10c9ee: 89 c6 mov %eax,%esi switch (location) { 10c9f0: 83 c4 10 add $0x10,%esp 10c9f3: 8b 45 e4 mov -0x1c(%ebp),%eax 10c9f6: 85 c0 test %eax,%eax 10c9f8: 74 0e je 10ca08 10c9fa: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c9ff: 8d 65 f4 lea -0xc(%ebp),%esp 10ca02: 5b pop %ebx 10ca03: 5e pop %esi 10ca04: 5f pop %edi 10ca05: c9 leave 10ca06: c3 ret 10ca07: 90 nop case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 10ca08: 8b 86 00 01 00 00 mov 0x100(%esi),%eax while (tvp) { 10ca0e: 85 c0 test %eax,%eax 10ca10: 75 44 jne 10ca56 10ca12: 66 90 xchg %ax,%ax } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 10ca14: 83 ec 0c sub $0xc,%esp 10ca17: 6a 14 push $0x14 10ca19: e8 12 2d 00 00 call 10f730 <_Workspace_Allocate> _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 10ca1e: 83 c4 10 add $0x10,%esp 10ca21: 85 c0 test %eax,%eax 10ca23: 74 4b je 10ca70 _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 10ca25: 8b 13 mov (%ebx),%edx 10ca27: 89 50 08 mov %edx,0x8(%eax) new->ptr = ptr; 10ca2a: 89 58 04 mov %ebx,0x4(%eax) new->dtor = dtor; 10ca2d: 89 78 10 mov %edi,0x10(%eax) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 10ca30: 8b 96 00 01 00 00 mov 0x100(%esi),%edx 10ca36: 89 10 mov %edx,(%eax) the_thread->task_variables = new; 10ca38: 89 86 00 01 00 00 mov %eax,0x100(%esi) _Thread_Enable_dispatch(); 10ca3e: e8 b1 1b 00 00 call 10e5f4 <_Thread_Enable_dispatch> 10ca43: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ca45: 8d 65 f4 lea -0xc(%ebp),%esp 10ca48: 5b pop %ebx 10ca49: 5e pop %esi 10ca4a: 5f pop %edi 10ca4b: c9 leave 10ca4c: c3 ret 10ca4d: 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; 10ca50: 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) { 10ca52: 85 c0 test %eax,%eax 10ca54: 74 be je 10ca14 if (tvp->ptr == ptr) { 10ca56: 39 58 04 cmp %ebx,0x4(%eax) 10ca59: 75 f5 jne 10ca50 tvp->dtor = dtor; 10ca5b: 89 78 10 mov %edi,0x10(%eax) _Thread_Enable_dispatch(); 10ca5e: e8 91 1b 00 00 call 10e5f4 <_Thread_Enable_dispatch> 10ca63: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ca65: 8d 65 f4 lea -0xc(%ebp),%esp 10ca68: 5b pop %ebx 10ca69: 5e pop %esi 10ca6a: 5f pop %edi 10ca6b: c9 leave 10ca6c: c3 ret 10ca6d: 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(); 10ca70: e8 7f 1b 00 00 call 10e5f4 <_Thread_Enable_dispatch> 10ca75: b8 1a 00 00 00 mov $0x1a,%eax return RTEMS_NO_MEMORY; 10ca7a: eb 83 jmp 10c9ff { Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 10ca7c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ca81: 8d 65 f4 lea -0xc(%ebp),%esp 10ca84: 5b pop %ebx 10ca85: 5e pop %esi 10ca86: 5f pop %edi 10ca87: c9 leave 10ca88: c3 ret =============================================================================== 0010ca8c : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 10ca8c: 55 push %ebp 10ca8d: 89 e5 mov %esp,%ebp 10ca8f: 53 push %ebx 10ca90: 83 ec 14 sub $0x14,%esp 10ca93: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 10ca96: 85 db test %ebx,%ebx 10ca98: 74 4c je 10cae6 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 10ca9a: 83 ec 08 sub $0x8,%esp 10ca9d: 8d 45 f4 lea -0xc(%ebp),%eax 10caa0: 50 push %eax 10caa1: ff 75 08 pushl 0x8(%ebp) 10caa4: e8 6f 1b 00 00 call 10e618 <_Thread_Get> switch (location) { 10caa9: 83 c4 10 add $0x10,%esp 10caac: 8b 55 f4 mov -0xc(%ebp),%edx 10caaf: 85 d2 test %edx,%edx 10cab1: 74 0d je 10cac0 10cab3: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cab8: 8b 5d fc mov -0x4(%ebp),%ebx 10cabb: c9 leave 10cabc: c3 ret 10cabd: 8d 76 00 lea 0x0(%esi),%esi the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; 10cac0: 8b 90 00 01 00 00 mov 0x100(%eax),%edx while (tvp) { 10cac6: 85 d2 test %edx,%edx 10cac8: 74 17 je 10cae1 if (tvp->ptr == ptr) { 10caca: 39 5a 04 cmp %ebx,0x4(%edx) 10cacd: 75 0a jne 10cad9 10cacf: eb 3c jmp 10cb0d 10cad1: 8d 76 00 lea 0x0(%esi),%esi 10cad4: 39 5a 04 cmp %ebx,0x4(%edx) 10cad7: 74 17 je 10caf0 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; 10cad9: 89 d1 mov %edx,%ecx } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 10cadb: 8b 12 mov (%edx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 10cadd: 85 d2 test %edx,%edx 10cadf: 75 f3 jne 10cad4 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10cae1: e8 0e 1b 00 00 call 10e5f4 <_Thread_Enable_dispatch> 10cae6: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10caeb: 8b 5d fc mov -0x4(%ebp),%ebx 10caee: c9 leave 10caef: c3 ret case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 10caf0: 8b 1a mov (%edx),%ebx 10caf2: 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 ); 10caf4: 83 ec 08 sub $0x8,%esp 10caf7: 52 push %edx 10caf8: 50 push %eax 10caf9: e8 a2 00 00 00 call 10cba0 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 10cafe: e8 f1 1a 00 00 call 10e5f4 <_Thread_Enable_dispatch> 10cb03: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10cb05: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cb08: 8b 5d fc mov -0x4(%ebp),%ebx 10cb0b: c9 leave 10cb0c: 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; 10cb0d: 8b 0a mov (%edx),%ecx 10cb0f: 89 88 00 01 00 00 mov %ecx,0x100(%eax) 10cb15: eb dd jmp 10caf4 =============================================================================== 0010cb18 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 10cb18: 55 push %ebp 10cb19: 89 e5 mov %esp,%ebp 10cb1b: 56 push %esi 10cb1c: 53 push %ebx 10cb1d: 83 ec 10 sub $0x10,%esp 10cb20: 8b 5d 0c mov 0xc(%ebp),%ebx 10cb23: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 10cb26: 85 db test %ebx,%ebx 10cb28: 74 56 je 10cb80 return RTEMS_INVALID_ADDRESS; if ( !result ) 10cb2a: 85 f6 test %esi,%esi 10cb2c: 74 52 je 10cb80 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10cb2e: 83 ec 08 sub $0x8,%esp 10cb31: 8d 45 f4 lea -0xc(%ebp),%eax 10cb34: 50 push %eax 10cb35: ff 75 08 pushl 0x8(%ebp) 10cb38: e8 db 1a 00 00 call 10e618 <_Thread_Get> switch (location) { 10cb3d: 83 c4 10 add $0x10,%esp 10cb40: 8b 55 f4 mov -0xc(%ebp),%edx 10cb43: 85 d2 test %edx,%edx 10cb45: 75 2d jne 10cb74 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 10cb47: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 10cb4d: 85 c0 test %eax,%eax 10cb4f: 75 09 jne 10cb5a 10cb51: eb 39 jmp 10cb8c 10cb53: 90 nop */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 10cb54: 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) { 10cb56: 85 c0 test %eax,%eax 10cb58: 74 32 je 10cb8c <== NEVER TAKEN if (tvp->ptr == ptr) { 10cb5a: 39 58 04 cmp %ebx,0x4(%eax) 10cb5d: 75 f5 jne 10cb54 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 10cb5f: 8b 40 0c mov 0xc(%eax),%eax 10cb62: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10cb64: e8 8b 1a 00 00 call 10e5f4 <_Thread_Enable_dispatch> 10cb69: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cb6b: 8d 65 f8 lea -0x8(%ebp),%esp 10cb6e: 5b pop %ebx 10cb6f: 5e pop %esi 10cb70: c9 leave 10cb71: c3 ret 10cb72: 66 90 xchg %ax,%ax if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 10cb74: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cb79: 8d 65 f8 lea -0x8(%ebp),%esp 10cb7c: 5b pop %ebx 10cb7d: 5e pop %esi 10cb7e: c9 leave 10cb7f: c3 ret return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; 10cb80: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cb85: 8d 65 f8 lea -0x8(%ebp),%esp 10cb88: 5b pop %ebx 10cb89: 5e pop %esi 10cb8a: c9 leave 10cb8b: c3 ret _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10cb8c: e8 63 1a 00 00 call 10e5f4 <_Thread_Enable_dispatch> 10cb91: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cb96: 8d 65 f8 lea -0x8(%ebp),%esp 10cb99: 5b pop %ebx 10cb9a: 5e pop %esi 10cb9b: c9 leave 10cb9c: c3 ret =============================================================================== 0010cf88 : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 10cf88: 55 push %ebp 10cf89: 89 e5 mov %esp,%ebp 10cf8b: 53 push %ebx 10cf8c: 83 ec 14 sub $0x14,%esp 10cf8f: 8b 5d 08 mov 0x8(%ebp),%ebx Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10cf92: 80 3d 4c a8 12 00 00 cmpb $0x0,0x12a84c 10cf99: 0f 84 a9 00 00 00 je 10d048 return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10cf9f: 85 db test %ebx,%ebx 10cfa1: 0f 84 ad 00 00 00 je 10d054 return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 10cfa7: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) if ( !_TOD_Validate( time_buffer ) ) 10cfae: 83 ec 0c sub $0xc,%esp 10cfb1: 53 push %ebx 10cfb2: e8 d9 f3 ff ff call 10c390 <_TOD_Validate> 10cfb7: 83 c4 10 add $0x10,%esp 10cfba: 84 c0 test %al,%al 10cfbc: 75 0a jne 10cfc8 _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10cfbe: b8 14 00 00 00 mov $0x14,%eax } 10cfc3: 8b 5d fc mov -0x4(%ebp),%ebx 10cfc6: c9 leave 10cfc7: c3 ret time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 10cfc8: 83 ec 0c sub $0xc,%esp 10cfcb: 53 push %ebx 10cfcc: e8 33 f3 ff ff call 10c304 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 10cfd1: 83 c4 10 add $0x10,%esp 10cfd4: 3b 05 cc a8 12 00 cmp 0x12a8cc,%eax 10cfda: 76 e2 jbe 10cfbe 10cfdc: 8b 15 38 a8 12 00 mov 0x12a838,%edx 10cfe2: 42 inc %edx 10cfe3: 89 15 38 a8 12 00 mov %edx,0x12a838 return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 10cfe9: 83 ec 08 sub $0x8,%esp 10cfec: 6a 10 push $0x10 10cfee: ff 35 f8 a8 12 00 pushl 0x12a8f8 10cff4: 89 45 f4 mov %eax,-0xc(%ebp) 10cff7: e8 3c 23 00 00 call 10f338 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10cffc: 8b 15 f8 a8 12 00 mov 0x12a8f8,%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( 10d002: 8b 4a 08 mov 0x8(%edx),%ecx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10d005: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 10d00c: c7 42 64 f0 e8 10 00 movl $0x10e8f0,0x64(%edx) the_watchdog->id = id; 10d013: 89 4a 68 mov %ecx,0x68(%edx) the_watchdog->user_data = user_data; 10d016: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10d01d: 8b 45 f4 mov -0xc(%ebp),%eax 10d020: 2b 05 cc a8 12 00 sub 0x12a8cc,%eax 10d026: 89 42 54 mov %eax,0x54(%edx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 10d029: 58 pop %eax 10d02a: 59 pop %ecx 10d02b: 83 c2 48 add $0x48,%edx 10d02e: 52 push %edx 10d02f: 68 0c a9 12 00 push $0x12a90c 10d034: e8 c7 29 00 00 call 10fa00 <_Watchdog_Insert> ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 10d039: e8 4a 1a 00 00 call 10ea88 <_Thread_Enable_dispatch> 10d03e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10d040: 83 c4 10 add $0x10,%esp 10d043: e9 7b ff ff ff jmp 10cfc3 rtems_time_of_day *time_buffer ) { Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10d048: b8 0b 00 00 00 mov $0xb,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10d04d: 8b 5d fc mov -0x4(%ebp),%ebx 10d050: c9 leave 10d051: c3 ret 10d052: 66 90 xchg %ax,%ax Watchdog_Interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10d054: b8 09 00 00 00 mov $0x9,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10d059: 8b 5d fc mov -0x4(%ebp),%ebx 10d05c: c9 leave 10d05d: c3 ret =============================================================================== 00118fc0 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 118fc0: 55 push %ebp 118fc1: 89 e5 mov %esp,%ebp 118fc3: 83 ec 1c sub $0x1c,%esp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 118fc6: 8d 45 f4 lea -0xc(%ebp),%eax 118fc9: 50 push %eax 118fca: ff 75 08 pushl 0x8(%ebp) 118fcd: 68 40 2f 14 00 push $0x142f40 118fd2: e8 cd 28 00 00 call 11b8a4 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 118fd7: 83 c4 10 add $0x10,%esp 118fda: 8b 55 f4 mov -0xc(%ebp),%edx 118fdd: 85 d2 test %edx,%edx 118fdf: 74 07 je 118fe8 118fe1: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118fe6: c9 leave 118fe7: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 118fe8: 83 78 38 04 cmpl $0x4,0x38(%eax) 118fec: 74 0f je 118ffd <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 118fee: 83 ec 0c sub $0xc,%esp 118ff1: 83 c0 10 add $0x10,%eax 118ff4: 50 push %eax 118ff5: e8 52 45 00 00 call 11d54c <_Watchdog_Remove> 118ffa: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 118ffd: e8 52 31 00 00 call 11c154 <_Thread_Enable_dispatch> 119002: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 119004: c9 leave 119005: c3 ret =============================================================================== 00119008 : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 119008: 55 push %ebp 119009: 89 e5 mov %esp,%ebp 11900b: 57 push %edi 11900c: 56 push %esi 11900d: 53 push %ebx 11900e: 83 ec 0c sub $0xc,%esp 119011: 8b 5d 08 mov 0x8(%ebp),%ebx 119014: 8b 75 0c mov 0xc(%ebp),%esi Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 119017: 85 db test %ebx,%ebx 119019: 74 6d je 119088 return RTEMS_INVALID_NAME; if ( !id ) 11901b: 85 f6 test %esi,%esi 11901d: 0f 84 89 00 00 00 je 1190ac 119023: a1 d8 2b 14 00 mov 0x142bd8,%eax 119028: 40 inc %eax 119029: a3 d8 2b 14 00 mov %eax,0x142bd8 * 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 ); 11902e: 83 ec 0c sub $0xc,%esp 119031: 68 40 2f 14 00 push $0x142f40 119036: e8 7d 23 00 00 call 11b3b8 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 11903b: 83 c4 10 add $0x10,%esp 11903e: 85 c0 test %eax,%eax 119040: 74 56 je 119098 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 119042: 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; 119049: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 119050: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 119057: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 11905e: 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; 119065: 8b 50 08 mov 0x8(%eax),%edx 119068: 0f b7 fa movzwl %dx,%edi 11906b: 8b 0d 5c 2f 14 00 mov 0x142f5c,%ecx 119071: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 119074: 89 58 0c mov %ebx,0xc(%eax) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 119077: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 119079: e8 d6 30 00 00 call 11c154 <_Thread_Enable_dispatch> 11907e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 119080: 8d 65 f4 lea -0xc(%ebp),%esp 119083: 5b pop %ebx 119084: 5e pop %esi 119085: 5f pop %edi 119086: c9 leave 119087: c3 ret rtems_id *id ) { Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 119088: b8 03 00 00 00 mov $0x3,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11908d: 8d 65 f4 lea -0xc(%ebp),%esp 119090: 5b pop %ebx 119091: 5e pop %esi 119092: 5f pop %edi 119093: c9 leave 119094: c3 ret 119095: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { _Thread_Enable_dispatch(); 119098: e8 b7 30 00 00 call 11c154 <_Thread_Enable_dispatch> 11909d: b8 05 00 00 00 mov $0x5,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1190a2: 8d 65 f4 lea -0xc(%ebp),%esp 1190a5: 5b pop %ebx 1190a6: 5e pop %esi 1190a7: 5f pop %edi 1190a8: c9 leave 1190a9: c3 ret 1190aa: 66 90 xchg %ax,%ax Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 1190ac: b8 09 00 00 00 mov $0x9,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1190b1: 8d 65 f4 lea -0xc(%ebp),%esp 1190b4: 5b pop %ebx 1190b5: 5e pop %esi 1190b6: 5f pop %edi 1190b7: c9 leave 1190b8: c3 ret =============================================================================== 001190bc : */ rtems_status_code rtems_timer_delete( rtems_id id ) { 1190bc: 55 push %ebp 1190bd: 89 e5 mov %esp,%ebp 1190bf: 53 push %ebx 1190c0: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 1190c3: 8d 45 f4 lea -0xc(%ebp),%eax 1190c6: 50 push %eax 1190c7: ff 75 08 pushl 0x8(%ebp) 1190ca: 68 40 2f 14 00 push $0x142f40 1190cf: e8 d0 27 00 00 call 11b8a4 <_Objects_Get> 1190d4: 89 c3 mov %eax,%ebx Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1190d6: 83 c4 10 add $0x10,%esp 1190d9: 8b 4d f4 mov -0xc(%ebp),%ecx 1190dc: 85 c9 test %ecx,%ecx 1190de: 75 38 jne 119118 case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); 1190e0: 83 ec 08 sub $0x8,%esp 1190e3: 50 push %eax 1190e4: 68 40 2f 14 00 push $0x142f40 1190e9: e8 46 23 00 00 call 11b434 <_Objects_Close> (void) _Watchdog_Remove( &the_timer->Ticker ); 1190ee: 8d 43 10 lea 0x10(%ebx),%eax 1190f1: 89 04 24 mov %eax,(%esp) 1190f4: e8 53 44 00 00 call 11d54c <_Watchdog_Remove> */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 1190f9: 58 pop %eax 1190fa: 5a pop %edx 1190fb: 53 push %ebx 1190fc: 68 40 2f 14 00 push $0x142f40 119101: e8 32 26 00 00 call 11b738 <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 119106: e8 49 30 00 00 call 11c154 <_Thread_Enable_dispatch> 11910b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11910d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 119110: 8b 5d fc mov -0x4(%ebp),%ebx 119113: c9 leave 119114: c3 ret 119115: 8d 76 00 lea 0x0(%esi),%esi { Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 119118: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11911d: 8b 5d fc mov -0x4(%ebp),%ebx 119120: c9 leave 119121: c3 ret =============================================================================== 00119124 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 119124: 55 push %ebp 119125: 89 e5 mov %esp,%ebp 119127: 57 push %edi 119128: 56 push %esi 119129: 53 push %ebx 11912a: 83 ec 2c sub $0x2c,%esp 11912d: 8b 5d 0c mov 0xc(%ebp),%ebx 119130: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 119133: 85 db test %ebx,%ebx 119135: 0f 84 99 00 00 00 je 1191d4 return RTEMS_INVALID_NUMBER; if ( !routine ) 11913b: 85 f6 test %esi,%esi 11913d: 0f 84 b1 00 00 00 je 1191f4 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 119143: 57 push %edi 119144: 8d 45 e4 lea -0x1c(%ebp),%eax 119147: 50 push %eax 119148: ff 75 08 pushl 0x8(%ebp) 11914b: 68 40 2f 14 00 push $0x142f40 119150: e8 4f 27 00 00 call 11b8a4 <_Objects_Get> 119155: 89 c7 mov %eax,%edi return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 119157: 83 c4 10 add $0x10,%esp 11915a: 8b 4d e4 mov -0x1c(%ebp),%ecx 11915d: 85 c9 test %ecx,%ecx 11915f: 74 0f je 119170 119161: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 119166: 8d 65 f4 lea -0xc(%ebp),%esp 119169: 5b pop %ebx 11916a: 5e pop %esi 11916b: 5f pop %edi 11916c: c9 leave 11916d: c3 ret 11916e: 66 90 xchg %ax,%ax the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 119170: 8d 50 10 lea 0x10(%eax),%edx 119173: 83 ec 0c sub $0xc,%esp 119176: 52 push %edx 119177: 89 55 d4 mov %edx,-0x2c(%ebp) 11917a: e8 cd 43 00 00 call 11d54c <_Watchdog_Remove> _ISR_Disable( level ); 11917f: 9c pushf 119180: fa cli 119181: 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 ) { 119182: 83 c4 10 add $0x10,%esp 119185: 8b 57 18 mov 0x18(%edi),%edx 119188: 85 d2 test %edx,%edx 11918a: 8b 55 d4 mov -0x2c(%ebp),%edx 11918d: 75 55 jne 1191e4 /* * 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; 11918f: 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; 119196: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 11919d: 89 77 2c mov %esi,0x2c(%edi) the_watchdog->id = id; 1191a0: 8b 4d 08 mov 0x8(%ebp),%ecx 1191a3: 89 4f 30 mov %ecx,0x30(%edi) the_watchdog->user_data = user_data; 1191a6: 8b 4d 14 mov 0x14(%ebp),%ecx 1191a9: 89 4f 34 mov %ecx,0x34(%edi) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 1191ac: 50 push %eax 1191ad: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1191ae: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 1191b1: 83 ec 08 sub $0x8,%esp 1191b4: 52 push %edx 1191b5: 68 b8 2c 14 00 push $0x142cb8 1191ba: e8 55 42 00 00 call 11d414 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 1191bf: e8 90 2f 00 00 call 11c154 <_Thread_Enable_dispatch> 1191c4: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1191c6: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1191c9: 8d 65 f4 lea -0xc(%ebp),%esp 1191cc: 5b pop %ebx 1191cd: 5e pop %esi 1191ce: 5f pop %edi 1191cf: c9 leave 1191d0: c3 ret 1191d1: 8d 76 00 lea 0x0(%esi),%esi { Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 1191d4: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1191d9: 8d 65 f4 lea -0xc(%ebp),%esp 1191dc: 5b pop %ebx 1191dd: 5e pop %esi 1191de: 5f pop %edi 1191df: c9 leave 1191e0: c3 ret 1191e1: 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 ); 1191e4: 50 push %eax 1191e5: 9d popf _Thread_Enable_dispatch(); 1191e6: e8 69 2f 00 00 call 11c154 <_Thread_Enable_dispatch> 1191eb: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1191ed: e9 74 ff ff ff jmp 119166 1191f2: 66 90 xchg %ax,%ax ISR_Level level; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) 1191f4: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1191f9: 8d 65 f4 lea -0xc(%ebp),%esp 1191fc: 5b pop %ebx 1191fd: 5e pop %esi 1191fe: 5f pop %edi 1191ff: c9 leave 119200: c3 ret =============================================================================== 00119204 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 119204: 55 push %ebp 119205: 89 e5 mov %esp,%ebp 119207: 57 push %edi 119208: 56 push %esi 119209: 53 push %ebx 11920a: 83 ec 2c sub $0x2c,%esp 11920d: 8b 75 08 mov 0x8(%ebp),%esi 119210: 8b 7d 0c mov 0xc(%ebp),%edi 119213: 8b 5d 10 mov 0x10(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 119216: 80 3d ec 2b 14 00 00 cmpb $0x0,0x142bec 11921d: 75 0d jne 11922c 11921f: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 119224: 8d 65 f4 lea -0xc(%ebp),%esp 119227: 5b pop %ebx 119228: 5e pop %esi 119229: 5f pop %edi 11922a: c9 leave 11922b: c3 ret rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 11922c: 83 ec 0c sub $0xc,%esp 11922f: 57 push %edi 119230: e8 67 d4 ff ff call 11669c <_TOD_Validate> 119235: 83 c4 10 add $0x10,%esp 119238: 84 c0 test %al,%al 11923a: 74 1e je 11925a return RTEMS_INVALID_CLOCK; if ( !routine ) 11923c: 85 db test %ebx,%ebx 11923e: 0f 84 a4 00 00 00 je 1192e8 return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 119244: 83 ec 0c sub $0xc,%esp 119247: 57 push %edi 119248: e8 c3 d3 ff ff call 116610 <_TOD_To_seconds> 11924d: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 11924f: 83 c4 10 add $0x10,%esp 119252: 3b 05 6c 2c 14 00 cmp 0x142c6c,%eax 119258: 77 0e ja 119268 _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 11925a: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11925f: 8d 65 f4 lea -0xc(%ebp),%esp 119262: 5b pop %ebx 119263: 5e pop %esi 119264: 5f pop %edi 119265: c9 leave 119266: c3 ret 119267: 90 nop 119268: 50 push %eax 119269: 8d 45 e4 lea -0x1c(%ebp),%eax 11926c: 50 push %eax 11926d: 56 push %esi 11926e: 68 40 2f 14 00 push $0x142f40 119273: e8 2c 26 00 00 call 11b8a4 <_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 ) { 119278: 83 c4 10 add $0x10,%esp 11927b: 8b 4d e4 mov -0x1c(%ebp),%ecx 11927e: 85 c9 test %ecx,%ecx 119280: 75 5a jne 1192dc case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 119282: 8d 48 10 lea 0x10(%eax),%ecx 119285: 83 ec 0c sub $0xc,%esp 119288: 51 push %ecx 119289: 89 45 d4 mov %eax,-0x2c(%ebp) 11928c: 89 4d d0 mov %ecx,-0x30(%ebp) 11928f: e8 b8 42 00 00 call 11d54c <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY; 119294: 8b 55 d4 mov -0x2c(%ebp),%edx 119297: 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; 11929e: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 1192a5: 89 5a 2c mov %ebx,0x2c(%edx) the_watchdog->id = id; 1192a8: 89 72 30 mov %esi,0x30(%edx) the_watchdog->user_data = user_data; 1192ab: 8b 45 14 mov 0x14(%ebp),%eax 1192ae: 89 42 34 mov %eax,0x34(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1192b1: 2b 3d 6c 2c 14 00 sub 0x142c6c,%edi 1192b7: 89 7a 1c mov %edi,0x1c(%edx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 1192ba: 58 pop %eax 1192bb: 5a pop %edx 1192bc: 8b 4d d0 mov -0x30(%ebp),%ecx 1192bf: 51 push %ecx 1192c0: 68 ac 2c 14 00 push $0x142cac 1192c5: e8 4a 41 00 00 call 11d414 <_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(); 1192ca: e8 85 2e 00 00 call 11c154 <_Thread_Enable_dispatch> 1192cf: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1192d1: 83 c4 10 add $0x10,%esp 1192d4: e9 4b ff ff ff jmp 119224 1192d9: 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 ) { 1192dc: b8 04 00 00 00 mov $0x4,%eax 1192e1: e9 3e ff ff ff jmp 119224 1192e6: 66 90 xchg %ax,%ax return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) 1192e8: b8 09 00 00 00 mov $0x9,%eax 1192ed: e9 32 ff ff ff jmp 119224 =============================================================================== 00119604 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 119604: 55 push %ebp 119605: 89 e5 mov %esp,%ebp 119607: 56 push %esi 119608: 53 push %ebx 119609: 83 ec 10 sub $0x10,%esp 11960c: 8b 45 08 mov 0x8(%ebp),%eax 11960f: 85 c0 test %eax,%eax 119611: 75 0d jne 119620 if (status) { initialized = false; } #endif return status; 119613: b8 13 00 00 00 mov $0x13,%eax } 119618: 8d 65 f8 lea -0x8(%ebp),%esp 11961b: 5b pop %ebx 11961c: 5e pop %esi 11961d: c9 leave 11961e: c3 ret 11961f: 90 nop 119620: 0f b6 15 74 a6 13 00 movzbl 0x13a674,%edx 119627: 39 d0 cmp %edx,%eax 119629: 76 35 jbe 119660 * 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 ) 11962b: 40 inc %eax 11962c: 75 e5 jne 119613 11962e: 31 f6 xor %esi,%esi 119630: 8b 15 d8 2b 14 00 mov 0x142bd8,%edx 119636: 42 inc %edx 119637: 89 15 d8 2b 14 00 mov %edx,0x142bd8 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 11963d: 8a 1d 60 e4 13 00 mov 0x13e460,%bl initialized = true; 119643: c6 05 60 e4 13 00 01 movb $0x1,0x13e460 _Thread_Enable_dispatch(); 11964a: e8 05 2b 00 00 call 11c154 <_Thread_Enable_dispatch> if ( tmpInitialized ) 11964f: 84 db test %bl,%bl 119651: 74 11 je 119664 119653: b8 0e 00 00 00 mov $0xe,%eax initialized = false; } #endif return status; } 119658: 8d 65 f8 lea -0x8(%ebp),%esp 11965b: 5b pop %ebx 11965c: 5e pop %esi 11965d: c9 leave 11965e: c3 ret 11965f: 90 nop 119660: 89 c6 mov %eax,%esi 119662: eb cc jmp 119630 * 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( 119664: 83 ec 08 sub $0x8,%esp 119667: 8d 45 f4 lea -0xc(%ebp),%eax 11966a: 50 push %eax 11966b: 8b 45 10 mov 0x10(%ebp),%eax 11966e: 80 cc 80 or $0x80,%ah 119671: 50 push %eax 119672: 68 00 01 00 00 push $0x100 119677: ff 75 0c pushl 0xc(%ebp) 11967a: 56 push %esi 11967b: 68 45 4d 49 54 push $0x54494d45 119680: e8 87 f0 ff ff call 11870c /* 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) { 119685: 83 c4 20 add $0x20,%esp 119688: 85 c0 test %eax,%eax 11968a: 74 10 je 11969c initialized = false; 11968c: c6 05 60 e4 13 00 00 movb $0x0,0x13e460 initialized = false; } #endif return status; } 119693: 8d 65 f8 lea -0x8(%ebp),%esp 119696: 5b pop %ebx 119697: 5e pop %esi 119698: c9 leave 119699: c3 ret 11969a: 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) 11969c: 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( 11969f: 0f b7 c8 movzwl %ax,%ecx 1196a2: 8b 15 7c 2b 14 00 mov 0x142b7c,%edx 1196a8: 8b 14 8a mov (%edx,%ecx,4),%edx 1196ab: 89 15 80 e4 13 00 mov %edx,0x13e480 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1196b1: c7 05 b0 e4 13 00 b4 movl $0x13e4b4,0x13e4b0 1196b8: e4 13 00 the_chain->permanent_null = NULL; 1196bb: c7 05 b4 e4 13 00 00 movl $0x0,0x13e4b4 1196c2: 00 00 00 the_chain->last = _Chain_Head(the_chain); 1196c5: c7 05 b8 e4 13 00 b0 movl $0x13e4b0,0x13e4b8 1196cc: e4 13 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1196cf: c7 05 e8 e4 13 00 ec movl $0x13e4ec,0x13e4e8 1196d6: e4 13 00 the_chain->permanent_null = NULL; 1196d9: c7 05 ec e4 13 00 00 movl $0x0,0x13e4ec 1196e0: 00 00 00 the_chain->last = _Chain_Head(the_chain); 1196e3: c7 05 f0 e4 13 00 e8 movl $0x13e4e8,0x13e4f0 1196ea: e4 13 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 1196ed: c7 05 90 e4 13 00 00 movl $0x0,0x13e490 1196f4: 00 00 00 the_watchdog->routine = routine; 1196f7: c7 05 a4 e4 13 00 bc movl $0x11bfbc,0x13e4a4 1196fe: bf 11 00 the_watchdog->id = id; 119701: a3 a8 e4 13 00 mov %eax,0x13e4a8 the_watchdog->user_data = user_data; 119706: c7 05 ac e4 13 00 00 movl $0x0,0x13e4ac 11970d: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 119710: c7 05 c8 e4 13 00 00 movl $0x0,0x13e4c8 119717: 00 00 00 the_watchdog->routine = routine; 11971a: c7 05 dc e4 13 00 bc movl $0x11bfbc,0x13e4dc 119721: bf 11 00 the_watchdog->id = id; 119724: a3 e0 e4 13 00 mov %eax,0x13e4e0 the_watchdog->user_data = user_data; 119729: c7 05 e4 e4 13 00 00 movl $0x0,0x13e4e4 119730: 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; 119733: c7 05 84 e4 13 00 d8 movl $0x1199d8,0x13e484 11973a: 99 11 00 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 11973d: 8b 15 44 2d 14 00 mov 0x142d44,%edx 119743: 89 15 bc e4 13 00 mov %edx,0x13e4bc ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 119749: 8b 15 6c 2c 14 00 mov 0x142c6c,%edx 11974f: 89 15 f4 e4 13 00 mov %edx,0x13e4f4 ts->insert_chain = NULL; 119755: c7 05 f8 e4 13 00 00 movl $0x0,0x13e4f8 11975c: 00 00 00 ts->active = false; 11975f: c6 05 fc e4 13 00 00 movb $0x0,0x13e4fc /* * The default timer server is now available. */ _Timer_server = ts; 119766: c7 05 80 2f 14 00 80 movl $0x13e480,0x142f80 11976d: e4 13 00 /* * Start the timer server */ status = rtems_task_start( 119770: 52 push %edx 119771: 68 80 e4 13 00 push $0x13e480 119776: 68 2c 98 11 00 push $0x11982c 11977b: 50 push %eax 11977c: e8 23 f6 ff ff call 118da4 if (status) { initialized = false; } #endif return status; 119781: 83 c4 10 add $0x10,%esp 119784: e9 8f fe ff ff jmp 119618 =============================================================================== 0011937c : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 11937c: 55 push %ebp 11937d: 89 e5 mov %esp,%ebp 11937f: 56 push %esi 119380: 53 push %ebx 119381: 83 ec 24 sub $0x24,%esp 119384: 8d 45 f4 lea -0xc(%ebp),%eax 119387: 50 push %eax 119388: ff 75 08 pushl 0x8(%ebp) 11938b: 68 40 2f 14 00 push $0x142f40 119390: e8 0f 25 00 00 call 11b8a4 <_Objects_Get> 119395: 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 ) { 119397: 83 c4 10 add $0x10,%esp 11939a: 8b 45 f4 mov -0xc(%ebp),%eax 11939d: 85 c0 test %eax,%eax 11939f: 74 0f je 1193b0 1193a1: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1193a6: 8d 65 f8 lea -0x8(%ebp),%esp 1193a9: 5b pop %ebx 1193aa: 5e pop %esi 1193ab: c9 leave 1193ac: c3 ret 1193ad: 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 ) { 1193b0: 8b 43 38 mov 0x38(%ebx),%eax 1193b3: 85 c0 test %eax,%eax 1193b5: 74 1d je 1193d4 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 1193b7: 48 dec %eax 1193b8: 74 3a je 1193f4 1193ba: 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(); 1193bf: 89 45 e4 mov %eax,-0x1c(%ebp) 1193c2: e8 8d 2d 00 00 call 11c154 <_Thread_Enable_dispatch> 1193c7: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1193ca: 8d 65 f8 lea -0x8(%ebp),%esp 1193cd: 5b pop %ebx 1193ce: 5e pop %esi 1193cf: c9 leave 1193d0: c3 ret 1193d1: 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 ); 1193d4: 83 c3 10 add $0x10,%ebx 1193d7: 83 ec 0c sub $0xc,%esp 1193da: 53 push %ebx 1193db: e8 6c 41 00 00 call 11d54c <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 1193e0: 59 pop %ecx 1193e1: 5e pop %esi 1193e2: 53 push %ebx 1193e3: 68 b8 2c 14 00 push $0x142cb8 1193e8: e8 27 40 00 00 call 11d414 <_Watchdog_Insert> 1193ed: 31 c0 xor %eax,%eax 1193ef: 83 c4 10 add $0x10,%esp 1193f2: eb cb jmp 1193bf } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { Timer_server_Control *timer_server = _Timer_server; 1193f4: 8b 35 80 2f 14 00 mov 0x142f80,%esi if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 1193fa: 83 ec 0c sub $0xc,%esp 1193fd: 8d 43 10 lea 0x10(%ebx),%eax 119400: 50 push %eax 119401: e8 46 41 00 00 call 11d54c <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 119406: 58 pop %eax 119407: 5a pop %edx 119408: 53 push %ebx 119409: 56 push %esi 11940a: ff 56 04 call *0x4(%esi) 11940d: 31 c0 xor %eax,%eax 11940f: 83 c4 10 add $0x10,%esp 119412: eb ab jmp 1193bf =============================================================================== 00119414 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 119414: 55 push %ebp 119415: 89 e5 mov %esp,%ebp 119417: 57 push %edi 119418: 56 push %esi 119419: 53 push %ebx 11941a: 83 ec 2c sub $0x2c,%esp 11941d: 8b 7d 0c mov 0xc(%ebp),%edi 119420: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 119423: 8b 1d 80 2f 14 00 mov 0x142f80,%ebx if ( !timer_server ) 119429: 85 db test %ebx,%ebx 11942b: 0f 84 9f 00 00 00 je 1194d0 return RTEMS_INCORRECT_STATE; if ( !routine ) 119431: 85 f6 test %esi,%esi 119433: 0f 84 a3 00 00 00 je 1194dc return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 119439: 85 ff test %edi,%edi 11943b: 75 0f jne 11944c 11943d: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 119442: 8d 65 f4 lea -0xc(%ebp),%esp 119445: 5b pop %ebx 119446: 5e pop %esi 119447: 5f pop %edi 119448: c9 leave 119449: c3 ret 11944a: 66 90 xchg %ax,%ax 11944c: 52 push %edx 11944d: 8d 45 e4 lea -0x1c(%ebp),%eax 119450: 50 push %eax 119451: ff 75 08 pushl 0x8(%ebp) 119454: 68 40 2f 14 00 push $0x142f40 119459: e8 46 24 00 00 call 11b8a4 <_Objects_Get> 11945e: 89 c2 mov %eax,%edx if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 119460: 83 c4 10 add $0x10,%esp 119463: 8b 45 e4 mov -0x1c(%ebp),%eax 119466: 85 c0 test %eax,%eax 119468: 75 56 jne 1194c0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 11946a: 83 ec 0c sub $0xc,%esp 11946d: 8d 42 10 lea 0x10(%edx),%eax 119470: 50 push %eax 119471: 89 55 d4 mov %edx,-0x2c(%ebp) 119474: e8 d3 40 00 00 call 11d54c <_Watchdog_Remove> _ISR_Disable( level ); 119479: 9c pushf 11947a: fa cli 11947b: 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 ) { 11947c: 83 c4 10 add $0x10,%esp 11947f: 8b 55 d4 mov -0x2c(%ebp),%edx 119482: 8b 4a 18 mov 0x18(%edx),%ecx 119485: 85 c9 test %ecx,%ecx 119487: 75 5f jne 1194e8 /* * 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; 119489: 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; 119490: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 119497: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 11949a: 8b 4d 08 mov 0x8(%ebp),%ecx 11949d: 89 4a 30 mov %ecx,0x30(%edx) the_watchdog->user_data = user_data; 1194a0: 8b 4d 14 mov 0x14(%ebp),%ecx 1194a3: 89 4a 34 mov %ecx,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 1194a6: 89 7a 1c mov %edi,0x1c(%edx) _ISR_Enable( level ); 1194a9: 50 push %eax 1194aa: 9d popf (*timer_server->schedule_operation)( timer_server, the_timer ); 1194ab: 83 ec 08 sub $0x8,%esp 1194ae: 52 push %edx 1194af: 53 push %ebx 1194b0: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 1194b3: e8 9c 2c 00 00 call 11c154 <_Thread_Enable_dispatch> 1194b8: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1194ba: 83 c4 10 add $0x10,%esp 1194bd: eb 83 jmp 119442 1194bf: 90 nop if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1194c0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1194c5: 8d 65 f4 lea -0xc(%ebp),%esp 1194c8: 5b pop %ebx 1194c9: 5e pop %esi 1194ca: 5f pop %edi 1194cb: c9 leave 1194cc: c3 ret 1194cd: 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 ) 1194d0: b8 0e 00 00 00 mov $0xe,%eax 1194d5: e9 68 ff ff ff jmp 119442 1194da: 66 90 xchg %ax,%ax return RTEMS_INCORRECT_STATE; if ( !routine ) 1194dc: b8 09 00 00 00 mov $0x9,%eax 1194e1: e9 5c ff ff ff jmp 119442 1194e6: 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 ); 1194e8: 50 push %eax 1194e9: 9d popf _Thread_Enable_dispatch(); 1194ea: e8 65 2c 00 00 call 11c154 <_Thread_Enable_dispatch> 1194ef: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1194f1: e9 4c ff ff ff jmp 119442 =============================================================================== 001194f8 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 1194f8: 55 push %ebp 1194f9: 89 e5 mov %esp,%ebp 1194fb: 57 push %edi 1194fc: 56 push %esi 1194fd: 53 push %ebx 1194fe: 83 ec 2c sub $0x2c,%esp 119501: 8b 7d 0c mov 0xc(%ebp),%edi 119504: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 119507: 8b 1d 80 2f 14 00 mov 0x142f80,%ebx if ( !timer_server ) 11950d: 85 db test %ebx,%ebx 11950f: 0f 84 d7 00 00 00 je 1195ec return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 119515: 80 3d ec 2b 14 00 00 cmpb $0x0,0x142bec 11951c: 0f 84 aa 00 00 00 je 1195cc <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 119522: 85 f6 test %esi,%esi 119524: 0f 84 b2 00 00 00 je 1195dc return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 11952a: 83 ec 0c sub $0xc,%esp 11952d: 57 push %edi 11952e: e8 69 d1 ff ff call 11669c <_TOD_Validate> 119533: 83 c4 10 add $0x10,%esp 119536: 84 c0 test %al,%al 119538: 75 0e jne 119548 the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 11953a: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11953f: 8d 65 f4 lea -0xc(%ebp),%esp 119542: 5b pop %ebx 119543: 5e pop %esi 119544: 5f pop %edi 119545: c9 leave 119546: c3 ret 119547: 90 nop return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 119548: 83 ec 0c sub $0xc,%esp 11954b: 57 push %edi 11954c: e8 bf d0 ff ff call 116610 <_TOD_To_seconds> 119551: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 119553: 83 c4 10 add $0x10,%esp 119556: 3b 05 6c 2c 14 00 cmp 0x142c6c,%eax 11955c: 76 dc jbe 11953a 11955e: 52 push %edx 11955f: 8d 45 e4 lea -0x1c(%ebp),%eax 119562: 50 push %eax 119563: ff 75 08 pushl 0x8(%ebp) 119566: 68 40 2f 14 00 push $0x142f40 11956b: e8 34 23 00 00 call 11b8a4 <_Objects_Get> 119570: 89 c2 mov %eax,%edx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 119572: 83 c4 10 add $0x10,%esp 119575: 8b 45 e4 mov -0x1c(%ebp),%eax 119578: 85 c0 test %eax,%eax 11957a: 75 7c jne 1195f8 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 11957c: 83 ec 0c sub $0xc,%esp 11957f: 8d 42 10 lea 0x10(%edx),%eax 119582: 50 push %eax 119583: 89 55 d4 mov %edx,-0x2c(%ebp) 119586: e8 c1 3f 00 00 call 11d54c <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 11958b: 8b 55 d4 mov -0x2c(%ebp),%edx 11958e: 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; 119595: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 11959c: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 11959f: 8b 45 08 mov 0x8(%ebp),%eax 1195a2: 89 42 30 mov %eax,0x30(%edx) the_watchdog->user_data = user_data; 1195a5: 8b 45 14 mov 0x14(%ebp),%eax 1195a8: 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(); 1195ab: 2b 3d 6c 2c 14 00 sub 0x142c6c,%edi 1195b1: 89 7a 1c mov %edi,0x1c(%edx) (*timer_server->schedule_operation)( timer_server, the_timer ); 1195b4: 58 pop %eax 1195b5: 59 pop %ecx 1195b6: 52 push %edx 1195b7: 53 push %ebx 1195b8: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 1195bb: e8 94 2b 00 00 call 11c154 <_Thread_Enable_dispatch> 1195c0: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1195c2: 83 c4 10 add $0x10,%esp 1195c5: e9 75 ff ff ff jmp 11953f 1195ca: 66 90 xchg %ax,%ax Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 1195cc: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1195d1: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1195d4: 5b pop %ebx <== NOT EXECUTED 1195d5: 5e pop %esi <== NOT EXECUTED 1195d6: 5f pop %edi <== NOT EXECUTED 1195d7: c9 leave <== NOT EXECUTED 1195d8: c3 ret <== NOT EXECUTED 1195d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) 1195dc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1195e1: 8d 65 f4 lea -0xc(%ebp),%esp 1195e4: 5b pop %ebx 1195e5: 5e pop %esi 1195e6: 5f pop %edi 1195e7: c9 leave 1195e8: c3 ret 1195e9: 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 ) 1195ec: b8 0e 00 00 00 mov $0xe,%eax 1195f1: e9 49 ff ff ff jmp 11953f 1195f6: 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 ) { 1195f8: b8 04 00 00 00 mov $0x4,%eax 1195fd: e9 3d ff ff ff jmp 11953f