=============================================================================== 0010be2c <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 10be2c: 55 push %ebp 10be2d: 89 e5 mov %esp,%ebp 10be2f: 53 push %ebx 10be30: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10be33: 8b 1d 78 56 12 00 mov 0x125678,%ebx 10be39: 81 fb 7c 56 12 00 cmp $0x12567c,%ebx 10be3f: 74 10 je 10be51 <_API_extensions_Run_postdriver+0x25><== NEVER TAKEN 10be41: 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)(); 10be44: 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 ) { 10be47: 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 ; 10be49: 81 fb 7c 56 12 00 cmp $0x12567c,%ebx 10be4f: 75 f3 jne 10be44 <_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)(); } } 10be51: 58 pop %eax 10be52: 5b pop %ebx 10be53: c9 leave 10be54: c3 ret =============================================================================== 0010be58 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 10be58: 55 push %ebp 10be59: 89 e5 mov %esp,%ebp 10be5b: 53 push %ebx 10be5c: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10be5f: 8b 1d 78 56 12 00 mov 0x125678,%ebx 10be65: 81 fb 7c 56 12 00 cmp $0x12567c,%ebx 10be6b: 74 1c je 10be89 <_API_extensions_Run_postswitch+0x31><== NEVER TAKEN 10be6d: 8d 76 00 lea 0x0(%esi),%esi !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); 10be70: 83 ec 0c sub $0xc,%esp 10be73: ff 35 d8 56 12 00 pushl 0x1256d8 10be79: 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 ) { 10be7c: 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 ; 10be7e: 83 c4 10 add $0x10,%esp 10be81: 81 fb 7c 56 12 00 cmp $0x12567c,%ebx 10be87: 75 e7 jne 10be70 <_API_extensions_Run_postswitch+0x18><== NEVER TAKEN the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10be89: 8b 5d fc mov -0x4(%ebp),%ebx 10be8c: c9 leave 10be8d: c3 ret =============================================================================== 00113254 <_CORE_barrier_Wait>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 113254: 55 push %ebp 113255: 89 e5 mov %esp,%ebp 113257: 57 push %edi 113258: 56 push %esi 113259: 53 push %ebx 11325a: 83 ec 1c sub $0x1c,%esp 11325d: 8b 45 08 mov 0x8(%ebp),%eax 113260: 8b 5d 0c mov 0xc(%ebp),%ebx 113263: 8b 75 14 mov 0x14(%ebp),%esi 113266: 8b 7d 18 mov 0x18(%ebp),%edi Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 113269: 8b 15 98 89 12 00 mov 0x128998,%edx executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 11326f: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 113276: 9c pushf 113277: fa cli 113278: 8f 45 e4 popl -0x1c(%ebp) the_barrier->number_of_waiting_threads++; 11327b: 8b 48 48 mov 0x48(%eax),%ecx 11327e: 41 inc %ecx 11327f: 89 48 48 mov %ecx,0x48(%eax) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 113282: 83 78 40 00 cmpl $0x0,0x40(%eax) 113286: 75 05 jne 11328d <_CORE_barrier_Wait+0x39> if ( the_barrier->number_of_waiting_threads == 113288: 3b 48 44 cmp 0x44(%eax),%ecx 11328b: 74 2b je 1132b8 <_CORE_barrier_Wait+0x64> 11328d: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 113294: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 113297: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( level ); 11329a: ff 75 e4 pushl -0x1c(%ebp) 11329d: 9d popf _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 11329e: c7 45 10 20 fb 10 00 movl $0x10fb20,0x10(%ebp) 1132a5: 89 75 0c mov %esi,0xc(%ebp) 1132a8: 89 45 08 mov %eax,0x8(%ebp) } 1132ab: 83 c4 1c add $0x1c,%esp 1132ae: 5b pop %ebx 1132af: 5e pop %esi 1132b0: 5f pop %edi 1132b1: c9 leave _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 1132b2: e9 19 c5 ff ff jmp 10f7d0 <_Thread_queue_Enqueue_with_handler> 1132b7: 90 nop <== NOT EXECUTED _ISR_Disable( level ); the_barrier->number_of_waiting_threads++; if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 1132b8: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) _ISR_Enable( level ); 1132bf: ff 75 e4 pushl -0x1c(%ebp) 1132c2: 9d popf _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 1132c3: 89 7d 10 mov %edi,0x10(%ebp) 1132c6: 89 5d 0c mov %ebx,0xc(%ebp) 1132c9: 89 45 08 mov %eax,0x8(%ebp) executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); } 1132cc: 83 c4 1c add $0x1c,%esp 1132cf: 5b pop %ebx 1132d0: 5e pop %esi 1132d1: 5f pop %edi 1132d2: c9 leave if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; _ISR_Enable( level ); _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 1132d3: e9 4c ff ff ff jmp 113224 <_CORE_barrier_Release> =============================================================================== 00119838 <_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 ) { 119838: 55 push %ebp 119839: 89 e5 mov %esp,%ebp 11983b: 57 push %edi 11983c: 56 push %esi 11983d: 53 push %ebx 11983e: 83 ec 1c sub $0x1c,%esp 119841: 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 ) { 119844: 8b 45 10 mov 0x10(%ebp),%eax 119847: 39 43 4c cmp %eax,0x4c(%ebx) 11984a: 72 60 jb 1198ac <_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 ) { 11984c: 8b 43 48 mov 0x48(%ebx),%eax 11984f: 85 c0 test %eax,%eax 119851: 75 45 jne 119898 <_CORE_message_queue_Broadcast+0x60> 119853: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 11985a: eb 18 jmp 119874 <_CORE_message_queue_Broadcast+0x3c> */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 11985c: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 11985f: 8b 42 2c mov 0x2c(%edx),%eax 119862: 89 c7 mov %eax,%edi 119864: 8b 75 0c mov 0xc(%ebp),%esi 119867: 8b 4d 10 mov 0x10(%ebp),%ecx 11986a: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 11986c: 8b 42 28 mov 0x28(%edx),%eax 11986f: 8b 55 10 mov 0x10(%ebp),%edx 119872: 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 = 119874: 83 ec 0c sub $0xc,%esp 119877: 53 push %ebx 119878: e8 cb 24 00 00 call 11bd48 <_Thread_queue_Dequeue> 11987d: 89 c2 mov %eax,%edx 11987f: 83 c4 10 add $0x10,%esp 119882: 85 c0 test %eax,%eax 119884: 75 d6 jne 11985c <_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; 119886: 8b 55 e4 mov -0x1c(%ebp),%edx 119889: 8b 45 1c mov 0x1c(%ebp),%eax 11988c: 89 10 mov %edx,(%eax) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 11988e: 31 c0 xor %eax,%eax } 119890: 8d 65 f4 lea -0xc(%ebp),%esp 119893: 5b pop %ebx 119894: 5e pop %esi 119895: 5f pop %edi 119896: c9 leave 119897: 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; 119898: 8b 55 1c mov 0x1c(%ebp),%edx 11989b: c7 02 00 00 00 00 movl $0x0,(%edx) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 1198a1: 31 c0 xor %eax,%eax #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 1198a3: 8d 65 f4 lea -0xc(%ebp),%esp 1198a6: 5b pop %ebx 1198a7: 5e pop %esi 1198a8: 5f pop %edi 1198a9: c9 leave 1198aa: c3 ret 1198ab: 90 nop <== NOT EXECUTED Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; 1198ac: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 1198b1: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1198b4: 5b pop %ebx <== NOT EXECUTED 1198b5: 5e pop %esi <== NOT EXECUTED 1198b6: 5f pop %edi <== NOT EXECUTED 1198b7: c9 leave <== NOT EXECUTED 1198b8: c3 ret <== NOT EXECUTED =============================================================================== 00114990 <_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 ) { 114990: 55 push %ebp 114991: 89 e5 mov %esp,%ebp 114993: 57 push %edi 114994: 56 push %esi 114995: 53 push %ebx 114996: 83 ec 0c sub $0xc,%esp 114999: 8b 5d 08 mov 0x8(%ebp),%ebx 11499c: 8b 75 10 mov 0x10(%ebp),%esi 11499f: 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; 1149a2: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 1149a5: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 1149ac: 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)) { 1149af: a8 03 test $0x3,%al 1149b1: 74 15 je 1149c8 <_CORE_message_queue_Initialize+0x38> allocated_message_size += sizeof(uint32_t); 1149b3: 8d 50 04 lea 0x4(%eax),%edx allocated_message_size &= ~(sizeof(uint32_t) - 1); 1149b6: 83 e2 fc and $0xfffffffc,%edx } if (allocated_message_size < maximum_message_size) 1149b9: 39 d0 cmp %edx,%eax 1149bb: 76 0d jbe 1149ca <_CORE_message_queue_Initialize+0x3a><== ALWAYS TAKEN */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) return false; 1149bd: 31 c0 xor %eax,%eax STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 1149bf: 8d 65 f4 lea -0xc(%ebp),%esp 1149c2: 5b pop %ebx 1149c3: 5e pop %esi 1149c4: 5f pop %edi 1149c5: c9 leave 1149c6: c3 ret 1149c7: 90 nop <== NOT EXECUTED /* * 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)) { 1149c8: 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)); 1149ca: 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 * 1149cd: 89 f8 mov %edi,%eax 1149cf: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 1149d2: 39 d0 cmp %edx,%eax 1149d4: 72 e7 jb 1149bd <_CORE_message_queue_Initialize+0x2d><== NEVER TAKEN /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); 1149d6: 83 ec 0c sub $0xc,%esp 1149d9: 50 push %eax 1149da: e8 0d 29 00 00 call 1172ec <_Workspace_Allocate> return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 1149df: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 1149e2: 83 c4 10 add $0x10,%esp 1149e5: 85 c0 test %eax,%eax 1149e7: 74 d4 je 1149bd <_CORE_message_queue_Initialize+0x2d> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 1149e9: 57 push %edi 1149ea: 56 push %esi 1149eb: 50 push %eax 1149ec: 8d 43 60 lea 0x60(%ebx),%eax 1149ef: 50 push %eax 1149f0: e8 33 46 00 00 call 119028 <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1149f5: 8d 43 54 lea 0x54(%ebx),%eax 1149f8: 89 43 50 mov %eax,0x50(%ebx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 1149fb: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_message_queue->message_buffers, (size_t) maximum_pending_messages, allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); 114a02: 8d 43 50 lea 0x50(%ebx),%eax 114a05: 89 43 58 mov %eax,0x58(%ebx) _Thread_queue_Initialize( 114a08: 6a 06 push $0x6 114a0a: 68 80 00 00 00 push $0x80 114a0f: 8b 45 0c mov 0xc(%ebp),%eax 114a12: 83 38 01 cmpl $0x1,(%eax) 114a15: 0f 94 c0 sete %al 114a18: 0f b6 c0 movzbl %al,%eax 114a1b: 50 push %eax 114a1c: 53 push %ebx 114a1d: e8 9a 1e 00 00 call 1168bc <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 114a22: 83 c4 20 add $0x20,%esp 114a25: b0 01 mov $0x1,%al } 114a27: 8d 65 f4 lea -0xc(%ebp),%esp 114a2a: 5b pop %ebx 114a2b: 5e pop %esi 114a2c: 5f pop %edi 114a2d: c9 leave 114a2e: c3 ret =============================================================================== 001104a4 <_CORE_message_queue_Insert_message>: void _CORE_message_queue_Insert_message( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message, CORE_message_queue_Submit_types submit_type ) { 1104a4: 55 push %ebp 1104a5: 89 e5 mov %esp,%ebp 1104a7: 53 push %ebx 1104a8: 8b 45 08 mov 0x8(%ebp),%eax 1104ab: 8b 55 0c mov 0xc(%ebp),%edx #endif _CORE_message_queue_Set_message_priority( the_message, submit_type ); #if !defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) _ISR_Disable( level ); 1104ae: 9c pushf 1104af: fa cli 1104b0: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 1104b1: ff 40 48 incl 0x48(%eax) if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) 1104b4: 81 7d 10 ff ff ff 7f cmpl $0x7fffffff,0x10(%ebp) 1104bb: 74 17 je 1104d4 <_CORE_message_queue_Insert_message+0x30> RTEMS_INLINE_ROUTINE void _CORE_message_queue_Prepend_unprotected ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Prepend_unprotected( 1104bd: 8d 48 50 lea 0x50(%eax),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 1104c0: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 1104c3: 8b 48 50 mov 0x50(%eax),%ecx after_node->next = the_node; 1104c6: 89 50 50 mov %edx,0x50(%eax) the_node->next = before_node; 1104c9: 89 0a mov %ecx,(%edx) before_node->previous = the_node; 1104cb: 89 51 04 mov %edx,0x4(%ecx) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); else _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 1104ce: 53 push %ebx 1104cf: 9d popf * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) (*the_message_queue->notify_handler)(the_message_queue->notify_argument); #endif } 1104d0: 5b pop %ebx 1104d1: c9 leave 1104d2: c3 ret 1104d3: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1104d4: 8d 48 54 lea 0x54(%eax),%ecx 1104d7: 89 0a mov %ecx,(%edx) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 1104d9: 8b 48 58 mov 0x58(%eax),%ecx the_chain->last = the_node; 1104dc: 89 50 58 mov %edx,0x58(%eax) old_last_node->next = the_node; 1104df: 89 11 mov %edx,(%ecx) the_node->previous = old_last_node; 1104e1: 89 4a 04 mov %ecx,0x4(%edx) 1104e4: eb e8 jmp 1104ce <_CORE_message_queue_Insert_message+0x2a> =============================================================================== 00114a30 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 114a30: 55 push %ebp 114a31: 89 e5 mov %esp,%ebp 114a33: 57 push %edi 114a34: 56 push %esi 114a35: 53 push %ebx 114a36: 83 ec 1c sub $0x1c,%esp 114a39: 8b 45 08 mov 0x8(%ebp),%eax 114a3c: 8b 55 0c mov 0xc(%ebp),%edx 114a3f: 89 55 dc mov %edx,-0x24(%ebp) 114a42: 8b 55 10 mov 0x10(%ebp),%edx 114a45: 89 55 e4 mov %edx,-0x1c(%ebp) 114a48: 8b 7d 14 mov 0x14(%ebp),%edi 114a4b: 8b 55 1c mov 0x1c(%ebp),%edx 114a4e: 89 55 d8 mov %edx,-0x28(%ebp) 114a51: 8a 5d 18 mov 0x18(%ebp),%bl ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 114a54: 8b 0d f8 fa 12 00 mov 0x12faf8,%ecx executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 114a5a: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) _ISR_Disable( level ); 114a61: 9c pushf 114a62: fa cli 114a63: 8f 45 e0 popl -0x20(%ebp) */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 114a66: 8b 50 50 mov 0x50(%eax),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 114a69: 8d 70 54 lea 0x54(%eax),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 114a6c: 39 f2 cmp %esi,%edx 114a6e: 74 44 je 114ab4 <_CORE_message_queue_Seize+0x84> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 114a70: 8b 0a mov (%edx),%ecx the_chain->first = new_first; 114a72: 89 48 50 mov %ecx,0x50(%eax) CORE_message_queue_Buffer_control *_CORE_message_queue_Get_pending_message ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) _Chain_Get_unprotected( &the_message_queue->Pending_messages ); 114a75: 8d 58 50 lea 0x50(%eax),%ebx 114a78: 89 59 04 mov %ebx,0x4(%ecx) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 114a7b: ff 48 48 decl 0x48(%eax) _ISR_Enable( level ); 114a7e: ff 75 e0 pushl -0x20(%ebp) 114a81: 9d popf *size_p = the_message->Contents.size; 114a82: 8b 4a 08 mov 0x8(%edx),%ecx 114a85: 89 0f mov %ecx,(%edi) _Thread_Executing->Wait.count = 114a87: 8b 0d f8 fa 12 00 mov 0x12faf8,%ecx 114a8d: c7 41 24 00 00 00 00 movl $0x0,0x24(%ecx) _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 114a94: 8d 72 0c lea 0xc(%edx),%esi const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 114a97: 8b 0f mov (%edi),%ecx 114a99: 8b 7d e4 mov -0x1c(%ebp),%edi 114a9c: f3 a4 rep movsb %ds:(%esi),%es:(%edi) RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 114a9e: 89 55 0c mov %edx,0xc(%ebp) 114aa1: 83 c0 60 add $0x60,%eax 114aa4: 89 45 08 mov %eax,0x8(%ebp) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 114aa7: 83 c4 1c add $0x1c,%esp 114aaa: 5b pop %ebx 114aab: 5e pop %esi 114aac: 5f pop %edi 114aad: c9 leave 114aae: e9 5d fe ff ff jmp 114910 <_Chain_Append> 114ab3: 90 nop <== NOT EXECUTED return; } #endif } if ( !wait ) { 114ab4: 84 db test %bl,%bl 114ab6: 75 14 jne 114acc <_CORE_message_queue_Seize+0x9c> _ISR_Enable( level ); 114ab8: ff 75 e0 pushl -0x20(%ebp) 114abb: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 114abc: c7 41 34 04 00 00 00 movl $0x4,0x34(%ecx) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 114ac3: 83 c4 1c add $0x1c,%esp 114ac6: 5b pop %ebx 114ac7: 5e pop %esi 114ac8: 5f pop %edi 114ac9: c9 leave 114aca: c3 ret 114acb: 90 nop <== NOT EXECUTED 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; 114acc: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax) executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 114ad3: 89 41 44 mov %eax,0x44(%ecx) executing->Wait.id = id; 114ad6: 8b 55 dc mov -0x24(%ebp),%edx 114ad9: 89 51 20 mov %edx,0x20(%ecx) executing->Wait.return_argument_second.mutable_object = buffer; 114adc: 8b 55 e4 mov -0x1c(%ebp),%edx 114adf: 89 51 2c mov %edx,0x2c(%ecx) executing->Wait.return_argument = size_p; 114ae2: 89 79 28 mov %edi,0x28(%ecx) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 114ae5: ff 75 e0 pushl -0x20(%ebp) 114ae8: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 114ae9: c7 45 10 80 69 11 00 movl $0x116980,0x10(%ebp) 114af0: 8b 55 d8 mov -0x28(%ebp),%edx 114af3: 89 55 0c mov %edx,0xc(%ebp) 114af6: 89 45 08 mov %eax,0x8(%ebp) } 114af9: 83 c4 1c add $0x1c,%esp 114afc: 5b pop %ebx 114afd: 5e pop %esi 114afe: 5f pop %edi 114aff: c9 leave executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 114b00: e9 2b 1b 00 00 jmp 116630 <_Thread_queue_Enqueue_with_handler> =============================================================================== 0010bfc0 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 10bfc0: 55 push %ebp 10bfc1: 89 e5 mov %esp,%ebp 10bfc3: 57 push %edi 10bfc4: 56 push %esi 10bfc5: 53 push %ebx 10bfc6: 83 ec 0c sub $0xc,%esp 10bfc9: 8b 5d 08 mov 0x8(%ebp),%ebx 10bfcc: 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 ) { 10bfcf: 8b 45 10 mov 0x10(%ebp),%eax 10bfd2: 39 43 4c cmp %eax,0x4c(%ebx) 10bfd5: 72 51 jb 10c028 <_CORE_message_queue_Submit+0x68> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 10bfd7: 8b 43 48 mov 0x48(%ebx),%eax 10bfda: 85 c0 test %eax,%eax 10bfdc: 74 5a je 10c038 <_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 < 10bfde: 39 43 44 cmp %eax,0x44(%ebx) 10bfe1: 77 0d ja 10bff0 <_CORE_message_queue_Submit+0x30> ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } #if !defined(RTEMS_SCORE_COREMSG_ENABLE_BLOCKING_SEND) return CORE_MESSAGE_QUEUE_STATUS_TOO_MANY; 10bfe3: 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 } 10bfe8: 8d 65 f4 lea -0xc(%ebp),%esp 10bfeb: 5b pop %ebx 10bfec: 5e pop %esi 10bfed: 5f pop %edi 10bfee: c9 leave 10bfef: c3 ret _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) _Chain_Get( &the_message_queue->Inactive_messages ); 10bff0: 83 ec 0c sub $0xc,%esp 10bff3: 8d 43 60 lea 0x60(%ebx),%eax 10bff6: 50 push %eax 10bff7: e8 a0 ff ff ff call 10bf9c <_Chain_Get> 10bffc: 89 c2 mov %eax,%edx return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED; #endif _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, 10bffe: 8d 40 0c lea 0xc(%eax),%eax const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10c001: 89 c7 mov %eax,%edi 10c003: 8b 4d 10 mov 0x10(%ebp),%ecx 10c006: f3 a4 rep movsb %ds:(%esi),%es:(%edi) size ); the_message->Contents.size = size; 10c008: 8b 4d 10 mov 0x10(%ebp),%ecx 10c00b: 89 4a 08 mov %ecx,0x8(%edx) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 10c00e: 83 c4 0c add $0xc,%esp 10c011: ff 75 1c pushl 0x1c(%ebp) 10c014: 52 push %edx 10c015: 53 push %ebx 10c016: e8 89 44 00 00 call 1104a4 <_CORE_message_queue_Insert_message> the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10c01b: 83 c4 10 add $0x10,%esp 10c01e: 31 c0 xor %eax,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c020: 8d 65 f4 lea -0xc(%ebp),%esp 10c023: 5b pop %ebx 10c024: 5e pop %esi 10c025: 5f pop %edi 10c026: c9 leave 10c027: c3 ret { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; 10c028: 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 } 10c02d: 8d 65 f4 lea -0xc(%ebp),%esp 10c030: 5b pop %ebx 10c031: 5e pop %esi 10c032: 5f pop %edi 10c033: c9 leave 10c034: c3 ret 10c035: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * 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 ); 10c038: 83 ec 0c sub $0xc,%esp 10c03b: 53 push %ebx 10c03c: e8 03 19 00 00 call 10d944 <_Thread_queue_Dequeue> 10c041: 89 c2 mov %eax,%edx if ( the_thread ) { 10c043: 83 c4 10 add $0x10,%esp 10c046: 85 c0 test %eax,%eax 10c048: 74 1e je 10c068 <_CORE_message_queue_Submit+0xa8> 10c04a: 8b 40 2c mov 0x2c(%eax),%eax 10c04d: 89 c7 mov %eax,%edi 10c04f: 8b 4d 10 mov 0x10(%ebp),%ecx 10c052: 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; 10c054: 8b 42 28 mov 0x28(%edx),%eax 10c057: 8b 4d 10 mov 0x10(%ebp),%ecx 10c05a: 89 08 mov %ecx,(%eax) the_thread->Wait.count = (uint32_t) submit_type; 10c05c: 8b 45 1c mov 0x1c(%ebp),%eax 10c05f: 89 42 24 mov %eax,0x24(%edx) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10c062: 31 c0 xor %eax,%eax 10c064: eb 82 jmp 10bfe8 <_CORE_message_queue_Submit+0x28> 10c066: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * 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 ) { 10c068: 8b 43 48 mov 0x48(%ebx),%eax 10c06b: e9 6e ff ff ff jmp 10bfde <_CORE_message_queue_Submit+0x1e> =============================================================================== 0010c07c <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10c07c: 55 push %ebp 10c07d: 89 e5 mov %esp,%ebp 10c07f: 57 push %edi 10c080: 56 push %esi 10c081: 53 push %ebx 10c082: 83 ec 0c sub $0xc,%esp 10c085: 8b 45 08 mov 0x8(%ebp),%eax 10c088: 8b 5d 0c mov 0xc(%ebp),%ebx 10c08b: 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; 10c08e: 8d 78 40 lea 0x40(%eax),%edi 10c091: b9 04 00 00 00 mov $0x4,%ecx 10c096: 89 de mov %ebx,%esi 10c098: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10c09a: 89 50 50 mov %edx,0x50(%eax) the_mutex->blocked_count = 0; 10c09d: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10c0a4: 85 d2 test %edx,%edx 10c0a6: 75 30 jne 10c0d8 <_CORE_mutex_Initialize+0x5c> the_mutex->nest_count = 1; 10c0a8: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) the_mutex->holder = _Thread_Executing; 10c0af: 8b 15 d8 56 12 00 mov 0x1256d8,%edx 10c0b5: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = _Thread_Executing->Object.id; 10c0b8: 8b 4a 08 mov 0x8(%edx),%ecx 10c0bb: 89 48 60 mov %ecx,0x60(%eax) STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c0be: 8b 48 48 mov 0x48(%eax),%ecx if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c0c1: 83 f9 02 cmp $0x2,%ecx 10c0c4: 74 05 je 10c0cb <_CORE_mutex_Initialize+0x4f> 10c0c6: 83 f9 03 cmp $0x3,%ecx 10c0c9: 75 22 jne 10c0ed <_CORE_mutex_Initialize+0x71> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 10c0cb: 8b 48 4c mov 0x4c(%eax),%ecx 10c0ce: 39 4a 14 cmp %ecx,0x14(%edx) 10c0d1: 72 41 jb 10c114 <_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++; 10c0d3: ff 42 1c incl 0x1c(%edx) 10c0d6: eb 15 jmp 10c0ed <_CORE_mutex_Initialize+0x71> } } else { the_mutex->nest_count = 0; 10c0d8: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_mutex->holder = NULL; 10c0df: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) the_mutex->holder_id = 0; 10c0e6: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) } _Thread_queue_Initialize( 10c0ed: 6a 05 push $0x5 10c0ef: 68 00 04 00 00 push $0x400 10c0f4: 31 d2 xor %edx,%edx 10c0f6: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10c0fa: 0f 95 c2 setne %dl 10c0fd: 52 push %edx 10c0fe: 50 push %eax 10c0ff: e8 f0 1b 00 00 call 10dcf4 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 10c104: 83 c4 10 add $0x10,%esp 10c107: 31 c0 xor %eax,%eax } 10c109: 8d 65 f4 lea -0xc(%ebp),%esp 10c10c: 5b pop %ebx 10c10d: 5e pop %esi 10c10e: 5f pop %edi 10c10f: c9 leave 10c110: c3 ret 10c111: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) return CORE_MUTEX_STATUS_CEILING_VIOLATED; 10c114: b8 06 00 00 00 mov $0x6,%eax STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c119: 8d 65 f4 lea -0xc(%ebp),%esp 10c11c: 5b pop %ebx 10c11d: 5e pop %esi 10c11e: 5f pop %edi 10c11f: c9 leave 10c120: c3 ret =============================================================================== 0010c174 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10c174: 55 push %ebp 10c175: 89 e5 mov %esp,%ebp 10c177: 53 push %ebx 10c178: 83 ec 14 sub $0x14,%esp 10c17b: 8b 5d 08 mov 0x8(%ebp),%ebx 10c17e: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c181: a1 34 54 12 00 mov 0x125434,%eax 10c186: 85 c0 test %eax,%eax 10c188: 74 04 je 10c18e <_CORE_mutex_Seize+0x1a> 10c18a: 84 d2 test %dl,%dl 10c18c: 75 36 jne 10c1c4 <_CORE_mutex_Seize+0x50><== ALWAYS TAKEN 10c18e: 83 ec 08 sub $0x8,%esp 10c191: 8d 45 18 lea 0x18(%ebp),%eax 10c194: 50 push %eax 10c195: 53 push %ebx 10c196: 88 55 f4 mov %dl,-0xc(%ebp) 10c199: e8 4a 43 00 00 call 1104e8 <_CORE_mutex_Seize_interrupt_trylock> 10c19e: 83 c4 10 add $0x10,%esp 10c1a1: 85 c0 test %eax,%eax 10c1a3: 8a 55 f4 mov -0xc(%ebp),%dl 10c1a6: 74 14 je 10c1bc <_CORE_mutex_Seize+0x48> 10c1a8: 84 d2 test %dl,%dl 10c1aa: 75 30 jne 10c1dc <_CORE_mutex_Seize+0x68> 10c1ac: ff 75 18 pushl 0x18(%ebp) 10c1af: 9d popf 10c1b0: a1 d8 56 12 00 mov 0x1256d8,%eax 10c1b5: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) } 10c1bc: 8b 5d fc mov -0x4(%ebp),%ebx 10c1bf: c9 leave 10c1c0: c3 ret 10c1c1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c1c4: 83 3d e0 55 12 00 01 cmpl $0x1,0x1255e0 10c1cb: 76 c1 jbe 10c18e <_CORE_mutex_Seize+0x1a> 10c1cd: 53 push %ebx 10c1ce: 6a 12 push $0x12 10c1d0: 6a 00 push $0x0 10c1d2: 6a 00 push $0x0 10c1d4: e8 23 06 00 00 call 10c7fc <_Internal_error_Occurred> 10c1d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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; 10c1dc: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10c1e3: a1 d8 56 12 00 mov 0x1256d8,%eax 10c1e8: 89 58 44 mov %ebx,0x44(%eax) 10c1eb: 8b 55 0c mov 0xc(%ebp),%edx 10c1ee: 89 50 20 mov %edx,0x20(%eax) 10c1f1: a1 34 54 12 00 mov 0x125434,%eax 10c1f6: 40 inc %eax 10c1f7: a3 34 54 12 00 mov %eax,0x125434 10c1fc: ff 75 18 pushl 0x18(%ebp) 10c1ff: 9d popf 10c200: 83 ec 08 sub $0x8,%esp 10c203: ff 75 14 pushl 0x14(%ebp) 10c206: 53 push %ebx 10c207: e8 18 ff ff ff call 10c124 <_CORE_mutex_Seize_interrupt_blocking> 10c20c: 83 c4 10 add $0x10,%esp } 10c20f: 8b 5d fc mov -0x4(%ebp),%ebx 10c212: c9 leave 10c213: c3 ret =============================================================================== 001104e8 <_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 ) { 1104e8: 55 push %ebp 1104e9: 89 e5 mov %esp,%ebp 1104eb: 56 push %esi 1104ec: 53 push %ebx 1104ed: 8b 45 08 mov 0x8(%ebp),%eax 1104f0: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 1104f3: 8b 15 d8 56 12 00 mov 0x1256d8,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 1104f9: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 110500: 8b 58 50 mov 0x50(%eax),%ebx 110503: 85 db test %ebx,%ebx 110505: 74 31 je 110538 <_CORE_mutex_Seize_interrupt_trylock+0x50> the_mutex->lock = CORE_MUTEX_LOCKED; 110507: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 11050e: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 110511: 8b 5a 08 mov 0x8(%edx),%ebx 110514: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 110517: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 11051e: 8b 58 48 mov 0x48(%eax),%ebx if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 110521: 83 fb 02 cmp $0x2,%ebx 110524: 74 26 je 11054c <_CORE_mutex_Seize_interrupt_trylock+0x64> 110526: 83 fb 03 cmp $0x3,%ebx 110529: 74 3d je 110568 <_CORE_mutex_Seize_interrupt_trylock+0x80> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 11052b: ff 31 pushl (%ecx) 11052d: 9d popf return 0; 11052e: 31 c0 xor %eax,%eax 110530: 8d 65 f8 lea -0x8(%ebp),%esp 110533: 5b pop %ebx 110534: 5e pop %esi 110535: c9 leave 110536: c3 ret 110537: 90 nop <== NOT EXECUTED /* * 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 ) ) { 110538: 3b 50 5c cmp 0x5c(%eax),%edx 11053b: 74 17 je 110554 <_CORE_mutex_Seize_interrupt_trylock+0x6c> /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; 11053d: b8 01 00 00 00 mov $0x1,%eax 110542: 8d 65 f8 lea -0x8(%ebp),%esp 110545: 5b pop %ebx 110546: 5e pop %esi 110547: c9 leave 110548: c3 ret 110549: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 11054c: ff 42 1c incl 0x1c(%edx) 11054f: eb da jmp 11052b <_CORE_mutex_Seize_interrupt_trylock+0x43> 110551: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * 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 ) { 110554: 8b 58 40 mov 0x40(%eax),%ebx 110557: 85 db test %ebx,%ebx 110559: 75 45 jne 1105a0 <_CORE_mutex_Seize_interrupt_trylock+0xb8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 11055b: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 11055e: ff 31 pushl (%ecx) 110560: 9d popf return 0; 110561: 31 c0 xor %eax,%eax 110563: eb dd jmp 110542 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 110565: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 110568: 8b 5a 1c mov 0x1c(%edx),%ebx 11056b: 8d 73 01 lea 0x1(%ebx),%esi 11056e: 89 72 1c mov %esi,0x1c(%edx) Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { 110571: 8b 72 14 mov 0x14(%edx),%esi 110574: 39 70 4c cmp %esi,0x4c(%eax) 110577: 74 6b je 1105e4 <_CORE_mutex_Seize_interrupt_trylock+0xfc> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 110579: 72 39 jb 1105b4 <_CORE_mutex_Seize_interrupt_trylock+0xcc> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 11057b: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 110582: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 110589: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 110590: 89 5a 1c mov %ebx,0x1c(%edx) _ISR_Enable( *level_p ); 110593: ff 31 pushl (%ecx) 110595: 9d popf return 0; 110596: 31 c0 xor %eax,%eax 110598: 8d 65 f8 lea -0x8(%ebp),%esp 11059b: 5b pop %ebx 11059c: 5e pop %esi 11059d: c9 leave 11059e: c3 ret 11059f: 90 nop <== NOT EXECUTED * 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 ) { 1105a0: 4b dec %ebx 1105a1: 75 9a jne 11053d <_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; 1105a3: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) <== NOT EXECUTED _ISR_Enable( *level_p ); 1105aa: ff 31 pushl (%ecx) <== NOT EXECUTED 1105ac: 9d popf <== NOT EXECUTED return 0; 1105ad: 31 c0 xor %eax,%eax <== NOT EXECUTED 1105af: eb 91 jmp 110542 <_CORE_mutex_Seize_interrupt_trylock+0x5a><== NOT EXECUTED 1105b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1105b4: 8b 15 34 54 12 00 mov 0x125434,%edx 1105ba: 42 inc %edx 1105bb: 89 15 34 54 12 00 mov %edx,0x125434 return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 1105c1: ff 31 pushl (%ecx) 1105c3: 9d popf _Thread_Change_priority( 1105c4: 52 push %edx 1105c5: 6a 00 push $0x0 1105c7: ff 70 4c pushl 0x4c(%eax) 1105ca: ff 70 5c pushl 0x5c(%eax) 1105cd: e8 d2 ca ff ff call 10d0a4 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 1105d2: e8 d1 cf ff ff call 10d5a8 <_Thread_Enable_dispatch> 1105d7: 83 c4 10 add $0x10,%esp return 0; 1105da: 31 c0 xor %eax,%eax 1105dc: e9 61 ff ff ff jmp 110542 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 1105e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); 1105e4: ff 31 pushl (%ecx) 1105e6: 9d popf return 0; 1105e7: 31 c0 xor %eax,%eax 1105e9: e9 54 ff ff ff jmp 110542 <_CORE_mutex_Seize_interrupt_trylock+0x5a> =============================================================================== 0010c214 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 10c214: 55 push %ebp 10c215: 89 e5 mov %esp,%ebp 10c217: 53 push %ebx 10c218: 83 ec 04 sub $0x4,%esp 10c21b: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; Thread_Control *holder; holder = the_mutex->holder; 10c21e: 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 ) { 10c221: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10c225: 74 15 je 10c23c <_CORE_mutex_Surrender+0x28> if ( !_Thread_Is_executing( holder ) ) 10c227: 3b 05 d8 56 12 00 cmp 0x1256d8,%eax 10c22d: 74 0d je 10c23c <_CORE_mutex_Surrender+0x28> return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; 10c22f: b8 03 00 00 00 mov $0x3,%eax } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c234: 8b 5d fc mov -0x4(%ebp),%ebx 10c237: c9 leave 10c238: c3 ret 10c239: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 10c23c: 8b 53 54 mov 0x54(%ebx),%edx 10c23f: 85 d2 test %edx,%edx 10c241: 74 51 je 10c294 <_CORE_mutex_Surrender+0x80> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10c243: 4a dec %edx 10c244: 89 53 54 mov %edx,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10c247: 85 d2 test %edx,%edx 10c249: 75 49 jne 10c294 <_CORE_mutex_Surrender+0x80> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c24b: 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 ) || 10c24e: 83 fa 02 cmp $0x2,%edx 10c251: 74 69 je 10c2bc <_CORE_mutex_Surrender+0xa8> 10c253: 83 fa 03 cmp $0x3,%edx 10c256: 74 64 je 10c2bc <_CORE_mutex_Surrender+0xa8> if ( holder->resource_count == 0 && holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, true ); } } the_mutex->holder = NULL; 10c258: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10c25f: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 10c266: 83 ec 0c sub $0xc,%esp 10c269: 53 push %ebx 10c26a: e8 d5 16 00 00 call 10d944 <_Thread_queue_Dequeue> 10c26f: 83 c4 10 add $0x10,%esp 10c272: 85 c0 test %eax,%eax 10c274: 74 7a je 10c2f0 <_CORE_mutex_Surrender+0xdc> } else #endif { the_mutex->holder = the_thread; 10c276: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10c279: 8b 50 08 mov 0x8(%eax),%edx 10c27c: 89 53 60 mov %edx,0x60(%ebx) the_mutex->nest_count = 1; 10c27f: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10c286: 8b 53 48 mov 0x48(%ebx),%edx 10c289: 83 fa 02 cmp $0x2,%edx 10c28c: 74 56 je 10c2e4 <_CORE_mutex_Surrender+0xd0> 10c28e: 83 fa 03 cmp $0x3,%edx 10c291: 74 09 je 10c29c <_CORE_mutex_Surrender+0x88> 10c293: 90 nop } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10c294: 31 c0 xor %eax,%eax } 10c296: 8b 5d fc mov -0x4(%ebp),%ebx 10c299: c9 leave 10c29a: c3 ret 10c29b: 90 nop <== NOT EXECUTED _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; 10c29c: ff 40 1c incl 0x1c(%eax) if (the_mutex->Attributes.priority_ceiling < 10c29f: 8b 53 4c mov 0x4c(%ebx),%edx 10c2a2: 3b 50 14 cmp 0x14(%eax),%edx 10c2a5: 73 ed jae 10c294 <_CORE_mutex_Surrender+0x80> the_thread->current_priority){ _Thread_Change_priority( 10c2a7: 51 push %ecx 10c2a8: 6a 00 push $0x0 10c2aa: 52 push %edx 10c2ab: 50 push %eax 10c2ac: e8 f3 0d 00 00 call 10d0a4 <_Thread_Change_priority> 10c2b1: 83 c4 10 add $0x10,%esp } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10c2b4: 31 c0 xor %eax,%eax 10c2b6: e9 79 ff ff ff jmp 10c234 <_CORE_mutex_Surrender+0x20> 10c2bb: 90 nop <== NOT EXECUTED _CORE_mutex_Pop_priority( the_mutex, holder ); if ( pop_status != CORE_MUTEX_STATUS_SUCCESSFUL ) return pop_status; holder->resource_count--; 10c2bc: 8b 50 1c mov 0x1c(%eax),%edx 10c2bf: 4a dec %edx 10c2c0: 89 50 1c mov %edx,0x1c(%eax) /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( holder->resource_count == 0 && 10c2c3: 85 d2 test %edx,%edx 10c2c5: 75 91 jne 10c258 <_CORE_mutex_Surrender+0x44> holder->real_priority != holder->current_priority ) { 10c2c7: 8b 50 18 mov 0x18(%eax),%edx /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( holder->resource_count == 0 && 10c2ca: 3b 50 14 cmp 0x14(%eax),%edx 10c2cd: 74 89 je 10c258 <_CORE_mutex_Surrender+0x44> holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, true ); 10c2cf: 51 push %ecx 10c2d0: 6a 01 push $0x1 10c2d2: 52 push %edx 10c2d3: 50 push %eax 10c2d4: e8 cb 0d 00 00 call 10d0a4 <_Thread_Change_priority> 10c2d9: 83 c4 10 add $0x10,%esp 10c2dc: e9 77 ff ff ff jmp 10c258 <_CORE_mutex_Surrender+0x44> 10c2e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: break; case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; 10c2e4: ff 40 1c incl 0x1c(%eax) } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; 10c2e7: 31 c0 xor %eax,%eax case CORE_MUTEX_DISCIPLINES_PRIORITY: break; case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; break; 10c2e9: e9 46 ff ff ff jmp 10c234 <_CORE_mutex_Surrender+0x20> 10c2ee: 66 90 xchg %ax,%ax <== NOT EXECUTED } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c2f0: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) return CORE_MUTEX_STATUS_SUCCESSFUL; 10c2f7: 31 c0 xor %eax,%eax 10c2f9: e9 36 ff ff ff jmp 10c234 <_CORE_mutex_Surrender+0x20> =============================================================================== 0010c34c <_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 ) { 10c34c: 55 push %ebp 10c34d: 89 e5 mov %esp,%ebp 10c34f: 53 push %ebx 10c350: 83 ec 10 sub $0x10,%esp 10c353: 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)) ) { 10c356: 53 push %ebx 10c357: e8 e8 15 00 00 call 10d944 <_Thread_queue_Dequeue> 10c35c: 83 c4 10 add $0x10,%esp 10c35f: 85 c0 test %eax,%eax 10c361: 74 09 je 10c36c <_CORE_semaphore_Surrender+0x20> { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10c363: 31 c0 xor %eax,%eax status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 10c365: 8b 5d fc mov -0x4(%ebp),%ebx 10c368: c9 leave 10c369: c3 ret 10c36a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 10c36c: 9c pushf 10c36d: fa cli 10c36e: 5a pop %edx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10c36f: 8b 43 48 mov 0x48(%ebx),%eax 10c372: 3b 43 40 cmp 0x40(%ebx),%eax 10c375: 72 0d jb 10c384 <_CORE_semaphore_Surrender+0x38><== ALWAYS TAKEN the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; 10c377: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED _ISR_Enable( level ); 10c37c: 52 push %edx 10c37d: 9d popf } return status; } 10c37e: 8b 5d fc mov -0x4(%ebp),%ebx 10c381: c9 leave 10c382: c3 ret 10c383: 90 nop <== NOT EXECUTED #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 10c384: 40 inc %eax 10c385: 89 43 48 mov %eax,0x48(%ebx) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10c388: 31 c0 xor %eax,%eax 10c38a: eb f0 jmp 10c37c <_CORE_semaphore_Surrender+0x30> =============================================================================== 0010bf9c <_Chain_Get>: */ Chain_Node *_Chain_Get( Chain_Control *the_chain ) { 10bf9c: 55 push %ebp 10bf9d: 89 e5 mov %esp,%ebp 10bf9f: 53 push %ebx 10bfa0: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 10bfa3: 9c pushf 10bfa4: fa cli 10bfa5: 5b pop %ebx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10bfa6: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10bfa8: 8d 4a 04 lea 0x4(%edx),%ecx if ( !_Chain_Is_empty( the_chain ) ) 10bfab: 39 c8 cmp %ecx,%eax 10bfad: 74 0d je 10bfbc <_Chain_Get+0x20> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 10bfaf: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 10bfb1: 89 0a mov %ecx,(%edx) new_first->previous = _Chain_Head(the_chain); 10bfb3: 89 51 04 mov %edx,0x4(%ecx) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level ); 10bfb6: 53 push %ebx 10bfb7: 9d popf return return_node; } 10bfb8: 5b pop %ebx 10bfb9: c9 leave 10bfba: c3 ret 10bfbb: 90 nop <== NOT EXECUTED ) { ISR_Level level; Chain_Node *return_node; return_node = NULL; 10bfbc: 31 c0 xor %eax,%eax 10bfbe: eb f6 jmp 10bfb6 <_Chain_Get+0x1a> =============================================================================== 0010c504 <_Chain_Get_with_empty_check>: bool _Chain_Get_with_empty_check( Chain_Control *chain, Chain_Node **node ) { 10c504: 55 push %ebp 10c505: 89 e5 mov %esp,%ebp 10c507: 57 push %edi 10c508: 56 push %esi 10c509: 53 push %ebx 10c50a: 8b 45 08 mov 0x8(%ebp),%eax 10c50d: 8b 7d 0c mov 0xc(%ebp),%edi ISR_Level level; bool is_empty_now; _ISR_Disable( level ); 10c510: 9c pushf 10c511: fa cli 10c512: 5e pop %esi Chain_Control *the_chain, Chain_Node **the_node ) { bool is_empty_now = true; Chain_Node *first = the_chain->first; 10c513: 8b 10 mov (%eax),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10c515: 8d 58 04 lea 0x4(%eax),%ebx ) { bool is_empty_now = true; Chain_Node *first = the_chain->first; if ( first != _Chain_Tail( the_chain ) ) { 10c518: 39 da cmp %ebx,%edx 10c51a: 74 18 je 10c534 <_Chain_Get_with_empty_check+0x30><== NEVER TAKEN Chain_Node *new_first = first->next; 10c51c: 8b 0a mov (%edx),%ecx the_chain->first = new_first; 10c51e: 89 08 mov %ecx,(%eax) new_first->previous = _Chain_Head( the_chain ); 10c520: 89 41 04 mov %eax,0x4(%ecx) *the_node = first; 10c523: 89 17 mov %edx,(%edi) is_empty_now = new_first == _Chain_Tail( the_chain ); 10c525: 39 cb cmp %ecx,%ebx 10c527: 0f 94 c0 sete %al is_empty_now = _Chain_Get_with_empty_check_unprotected( chain, node ); _ISR_Enable( level ); 10c52a: 56 push %esi 10c52b: 9d popf return is_empty_now; } 10c52c: 5b pop %ebx 10c52d: 5e pop %esi 10c52e: 5f pop %edi 10c52f: c9 leave 10c530: c3 ret 10c531: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } else *the_node = NULL; 10c534: c7 07 00 00 00 00 movl $0x0,(%edi) <== NOT EXECUTED RTEMS_INLINE_ROUTINE bool _Chain_Get_with_empty_check_unprotected( Chain_Control *the_chain, Chain_Node **the_node ) { bool is_empty_now = true; 10c53a: b0 01 mov $0x1,%al <== NOT EXECUTED 10c53c: eb ec jmp 10c52a <_Chain_Get_with_empty_check+0x26><== NOT EXECUTED =============================================================================== 00110454 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 110454: 55 push %ebp 110455: 89 e5 mov %esp,%ebp 110457: 57 push %edi 110458: 56 push %esi 110459: 53 push %ebx 11045a: 83 ec 04 sub $0x4,%esp 11045d: 8b 7d 08 mov 0x8(%ebp),%edi 110460: 8b 4d 10 mov 0x10(%ebp),%ecx 110463: 8b 75 14 mov 0x14(%ebp),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 110466: 89 fa mov %edi,%edx Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 110468: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) next = starting_address; while ( count-- ) { 11046f: 85 c9 test %ecx,%ecx 110471: 74 23 je 110496 <_Chain_Initialize+0x42><== NEVER TAKEN 110473: 49 dec %ecx 110474: 89 4d f0 mov %ecx,-0x10(%ebp) Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 110477: 8b 45 0c mov 0xc(%ebp),%eax 11047a: eb 05 jmp 110481 <_Chain_Initialize+0x2d> while ( count-- ) { 11047c: 89 c2 mov %eax,%edx current->next = next; next->previous = current; current = next; next = (Chain_Node *) 11047e: 89 d8 mov %ebx,%eax 110480: 49 dec %ecx count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { current->next = next; 110481: 89 02 mov %eax,(%edx) next->previous = current; 110483: 89 50 04 mov %edx,0x4(%eax) * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 110486: 8d 1c 30 lea (%eax,%esi,1),%ebx count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 110489: 85 c9 test %ecx,%ecx 11048b: 75 ef jne 11047c <_Chain_Initialize+0x28> * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 11048d: 8b 55 f0 mov -0x10(%ebp),%edx 110490: 0f af d6 imul %esi,%edx 110493: 03 55 0c add 0xc(%ebp),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 110496: 8d 47 04 lea 0x4(%edi),%eax 110499: 89 02 mov %eax,(%edx) current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); the_chain->last = current; 11049b: 89 57 08 mov %edx,0x8(%edi) } 11049e: 58 pop %eax 11049f: 5b pop %ebx 1104a0: 5e pop %esi 1104a1: 5f pop %edi 1104a2: c9 leave 1104a3: c3 ret =============================================================================== 0010b050 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10b050: 55 push %ebp 10b051: 89 e5 mov %esp,%ebp 10b053: 57 push %edi 10b054: 56 push %esi 10b055: 53 push %ebx 10b056: 83 ec 2c sub $0x2c,%esp 10b059: 8b 45 08 mov 0x8(%ebp),%eax 10b05c: 8b 4d 0c mov 0xc(%ebp),%ecx 10b05f: 8b 55 10 mov 0x10(%ebp),%edx 10b062: 89 55 dc mov %edx,-0x24(%ebp) 10b065: 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; 10b068: 8b 1d d8 56 12 00 mov 0x1256d8,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10b06e: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10b075: 8b b3 f0 00 00 00 mov 0xf0(%ebx),%esi _ISR_Disable( level ); 10b07b: 9c pushf 10b07c: fa cli 10b07d: 8f 45 e0 popl -0x20(%ebp) pending_events = api->pending_events; 10b080: 8b 16 mov (%esi),%edx 10b082: 89 55 d4 mov %edx,-0x2c(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10b085: 21 c2 and %eax,%edx 10b087: 89 55 e4 mov %edx,-0x1c(%ebp) 10b08a: 74 0d je 10b099 <_Event_Seize+0x49> 10b08c: 39 d0 cmp %edx,%eax 10b08e: 0f 84 84 00 00 00 je 10b118 <_Event_Seize+0xc8> (seized_events == event_in || _Options_Is_any( option_set )) ) { 10b094: f6 c1 02 test $0x2,%cl 10b097: 75 7f jne 10b118 <_Event_Seize+0xc8> _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10b099: f6 c1 01 test $0x1,%cl 10b09c: 75 62 jne 10b100 <_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; 10b09e: 89 4b 30 mov %ecx,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10b0a1: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10b0a4: 89 7b 28 mov %edi,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10b0a7: c7 05 e8 56 12 00 01 movl $0x1,0x1256e8 10b0ae: 00 00 00 _ISR_Enable( level ); 10b0b1: ff 75 e0 pushl -0x20(%ebp) 10b0b4: 9d popf if ( ticks ) { 10b0b5: 8b 45 dc mov -0x24(%ebp),%eax 10b0b8: 85 c0 test %eax,%eax 10b0ba: 0f 85 80 00 00 00 jne 10b140 <_Event_Seize+0xf0> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10b0c0: 83 ec 08 sub $0x8,%esp 10b0c3: 68 00 01 00 00 push $0x100 10b0c8: 53 push %ebx 10b0c9: e8 8e 2d 00 00 call 10de5c <_Thread_Set_state> _ISR_Disable( level ); 10b0ce: 9c pushf 10b0cf: fa cli 10b0d0: 5a pop %edx sync_state = _Event_Sync_state; 10b0d1: a1 e8 56 12 00 mov 0x1256e8,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10b0d6: c7 05 e8 56 12 00 00 movl $0x0,0x1256e8 10b0dd: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10b0e0: 83 c4 10 add $0x10,%esp 10b0e3: 83 f8 01 cmp $0x1,%eax 10b0e6: 74 4c je 10b134 <_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 ); 10b0e8: 89 55 10 mov %edx,0x10(%ebp) 10b0eb: 89 5d 0c mov %ebx,0xc(%ebp) 10b0ee: 89 45 08 mov %eax,0x8(%ebp) } 10b0f1: 8d 65 f4 lea -0xc(%ebp),%esp 10b0f4: 5b pop %ebx 10b0f5: 5e pop %esi 10b0f6: 5f pop %edi 10b0f7: 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 ); 10b0f8: e9 5b 1f 00 00 jmp 10d058 <_Thread_blocking_operation_Cancel> 10b0fd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 10b100: ff 75 e0 pushl -0x20(%ebp) 10b103: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10b104: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10b10b: 8b 55 e4 mov -0x1c(%ebp),%edx 10b10e: 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 ); } 10b110: 8d 65 f4 lea -0xc(%ebp),%esp 10b113: 5b pop %ebx 10b114: 5e pop %esi 10b115: 5f pop %edi 10b116: c9 leave 10b117: c3 ret RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) { return ( the_event_set & ~(the_mask) ); 10b118: 8b 45 e4 mov -0x1c(%ebp),%eax 10b11b: f7 d0 not %eax 10b11d: 23 45 d4 and -0x2c(%ebp),%eax 10b120: 89 06 mov %eax,(%esi) if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 10b122: ff 75 e0 pushl -0x20(%ebp) 10b125: 9d popf *event_out = seized_events; 10b126: 8b 45 e4 mov -0x1c(%ebp),%eax 10b129: 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 ); } 10b12b: 8d 65 f4 lea -0xc(%ebp),%esp 10b12e: 5b pop %ebx 10b12f: 5e pop %esi 10b130: 5f pop %edi 10b131: c9 leave 10b132: c3 ret 10b133: 90 nop <== NOT EXECUTED _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 ); 10b134: 52 push %edx 10b135: 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 ); } 10b136: 8d 65 f4 lea -0xc(%ebp),%esp 10b139: 5b pop %ebx 10b13a: 5e pop %esi 10b13b: 5f pop %edi 10b13c: c9 leave 10b13d: c3 ret 10b13e: 66 90 xchg %ax,%ax <== NOT EXECUTED _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 10b140: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b143: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10b14a: c7 43 64 f4 b2 10 00 movl $0x10b2f4,0x64(%ebx) the_watchdog->id = id; 10b151: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10b154: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b15b: 8b 45 dc mov -0x24(%ebp),%eax 10b15e: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b161: 83 ec 08 sub $0x8,%esp &executing->Timer, _Event_Timeout, executing->Object.id, NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); 10b164: 8d 43 48 lea 0x48(%ebx),%eax 10b167: 50 push %eax 10b168: 68 04 55 12 00 push $0x125504 10b16d: e8 52 33 00 00 call 10e4c4 <_Watchdog_Insert> 10b172: 83 c4 10 add $0x10,%esp 10b175: e9 46 ff ff ff jmp 10b0c0 <_Event_Seize+0x70> =============================================================================== 0010b1d0 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10b1d0: 55 push %ebp 10b1d1: 89 e5 mov %esp,%ebp 10b1d3: 57 push %edi 10b1d4: 56 push %esi 10b1d5: 53 push %ebx 10b1d6: 83 ec 2c sub $0x2c,%esp 10b1d9: 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 ]; 10b1dc: 8b 8b f0 00 00 00 mov 0xf0(%ebx),%ecx option_set = (rtems_option) the_thread->Wait.option; 10b1e2: 8b 7b 30 mov 0x30(%ebx),%edi _ISR_Disable( level ); 10b1e5: 9c pushf 10b1e6: fa cli 10b1e7: 8f 45 d4 popl -0x2c(%ebp) pending_events = api->pending_events; 10b1ea: 8b 11 mov (%ecx),%edx event_condition = (rtems_event_set) the_thread->Wait.count; 10b1ec: 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 ) ) { 10b1ef: 89 c6 mov %eax,%esi 10b1f1: 21 d6 and %edx,%esi 10b1f3: 89 75 e4 mov %esi,-0x1c(%ebp) 10b1f6: 74 74 je 10b26c <_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() && 10b1f8: 8b 35 d4 56 12 00 mov 0x1256d4,%esi 10b1fe: 85 f6 test %esi,%esi 10b200: 74 0c je 10b20e <_Event_Surrender+0x3e> 10b202: 3b 1d d8 56 12 00 cmp 0x1256d8,%ebx 10b208: 0f 84 96 00 00 00 je 10b2a4 <_Event_Surrender+0xd4> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10b20e: f6 43 11 01 testb $0x1,0x11(%ebx) 10b212: 74 4c je 10b260 <_Event_Surrender+0x90> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 10b214: 3b 45 e4 cmp -0x1c(%ebp),%eax 10b217: 74 05 je 10b21e <_Event_Surrender+0x4e> 10b219: 83 e7 02 and $0x2,%edi 10b21c: 74 42 je 10b260 <_Event_Surrender+0x90> <== NEVER TAKEN RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) { return ( the_event_set & ~(the_mask) ); 10b21e: 8b 45 e4 mov -0x1c(%ebp),%eax 10b221: f7 d0 not %eax 10b223: 21 d0 and %edx,%eax 10b225: 89 01 mov %eax,(%ecx) api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 10b227: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b22e: 8b 43 28 mov 0x28(%ebx),%eax 10b231: 8b 75 e4 mov -0x1c(%ebp),%esi 10b234: 89 30 mov %esi,(%eax) _ISR_Flash( level ); 10b236: ff 75 d4 pushl -0x2c(%ebp) 10b239: 9d popf 10b23a: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10b23b: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b23f: 74 37 je 10b278 <_Event_Surrender+0xa8> _ISR_Enable( level ); 10b241: ff 75 d4 pushl -0x2c(%ebp) 10b244: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b245: 83 ec 08 sub $0x8,%esp 10b248: 68 f8 ff 03 10 push $0x1003fff8 10b24d: 53 push %ebx 10b24e: e8 91 1f 00 00 call 10d1e4 <_Thread_Clear_state> 10b253: 83 c4 10 add $0x10,%esp } return; } } _ISR_Enable( level ); } 10b256: 8d 65 f4 lea -0xc(%ebp),%esp 10b259: 5b pop %ebx 10b25a: 5e pop %esi 10b25b: 5f pop %edi 10b25c: c9 leave 10b25d: c3 ret 10b25e: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10b260: ff 75 d4 pushl -0x2c(%ebp) 10b263: 9d popf } 10b264: 8d 65 f4 lea -0xc(%ebp),%esp 10b267: 5b pop %ebx 10b268: 5e pop %esi 10b269: 5f pop %edi 10b26a: c9 leave 10b26b: c3 ret /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 10b26c: ff 75 d4 pushl -0x2c(%ebp) 10b26f: 9d popf } return; } } _ISR_Enable( level ); } 10b270: 8d 65 f4 lea -0xc(%ebp),%esp 10b273: 5b pop %ebx 10b274: 5e pop %esi 10b275: 5f pop %edi 10b276: c9 leave 10b277: c3 ret RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10b278: 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 ); 10b27f: ff 75 d4 pushl -0x2c(%ebp) 10b282: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10b283: 83 ec 0c sub $0xc,%esp 10b286: 8d 43 48 lea 0x48(%ebx),%eax 10b289: 50 push %eax 10b28a: e8 6d 33 00 00 call 10e5fc <_Watchdog_Remove> 10b28f: 58 pop %eax 10b290: 5a pop %edx 10b291: 68 f8 ff 03 10 push $0x1003fff8 10b296: 53 push %ebx 10b297: e8 48 1f 00 00 call 10d1e4 <_Thread_Clear_state> 10b29c: 83 c4 10 add $0x10,%esp 10b29f: eb c3 jmp 10b264 <_Event_Surrender+0x94> 10b2a1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * 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) || 10b2a4: 8b 35 e8 56 12 00 mov 0x1256e8,%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 ) && 10b2aa: 83 fe 02 cmp $0x2,%esi 10b2ad: 74 0d je 10b2bc <_Event_Surrender+0xec> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 10b2af: 8b 35 e8 56 12 00 mov 0x1256e8,%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) || 10b2b5: 4e dec %esi 10b2b6: 0f 85 52 ff ff ff jne 10b20e <_Event_Surrender+0x3e> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 10b2bc: 3b 45 e4 cmp -0x1c(%ebp),%eax 10b2bf: 74 05 je 10b2c6 <_Event_Surrender+0xf6> 10b2c1: 83 e7 02 and $0x2,%edi 10b2c4: 74 22 je 10b2e8 <_Event_Surrender+0x118><== NEVER TAKEN 10b2c6: 8b 45 e4 mov -0x1c(%ebp),%eax 10b2c9: f7 d0 not %eax 10b2cb: 21 d0 and %edx,%eax 10b2cd: 89 01 mov %eax,(%ecx) api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 10b2cf: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b2d6: 8b 43 28 mov 0x28(%ebx),%eax 10b2d9: 8b 55 e4 mov -0x1c(%ebp),%edx 10b2dc: 89 10 mov %edx,(%eax) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10b2de: c7 05 e8 56 12 00 03 movl $0x3,0x1256e8 10b2e5: 00 00 00 } _ISR_Enable( level ); 10b2e8: ff 75 d4 pushl -0x2c(%ebp) 10b2eb: 9d popf return; 10b2ec: e9 73 ff ff ff jmp 10b264 <_Event_Surrender+0x94> =============================================================================== 0010b2f4 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10b2f4: 55 push %ebp 10b2f5: 89 e5 mov %esp,%ebp 10b2f7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10b2fa: 8d 45 f4 lea -0xc(%ebp),%eax 10b2fd: 50 push %eax 10b2fe: ff 75 08 pushl 0x8(%ebp) 10b301: e8 c6 22 00 00 call 10d5cc <_Thread_Get> switch ( location ) { 10b306: 83 c4 10 add $0x10,%esp 10b309: 8b 55 f4 mov -0xc(%ebp),%edx 10b30c: 85 d2 test %edx,%edx 10b30e: 75 37 jne 10b347 <_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 ); 10b310: 9c pushf 10b311: fa cli 10b312: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10b313: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10b31a: 3b 05 d8 56 12 00 cmp 0x1256d8,%eax 10b320: 74 2a je 10b34c <_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; 10b322: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10b329: 52 push %edx 10b32a: 9d popf 10b32b: 83 ec 08 sub $0x8,%esp 10b32e: 68 f8 ff 03 10 push $0x1003fff8 10b333: 50 push %eax 10b334: e8 ab 1e 00 00 call 10d1e4 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b339: a1 34 54 12 00 mov 0x125434,%eax 10b33e: 48 dec %eax 10b33f: a3 34 54 12 00 mov %eax,0x125434 _Thread_Unblock( the_thread ); _Thread_Unnest_dispatch(); break; 10b344: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b347: c9 leave 10b348: c3 ret 10b349: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10b34c: 8b 0d e8 56 12 00 mov 0x1256e8,%ecx 10b352: 49 dec %ecx 10b353: 75 cd jne 10b322 <_Event_Timeout+0x2e> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10b355: c7 05 e8 56 12 00 02 movl $0x2,0x1256e8 10b35c: 00 00 00 10b35f: eb c1 jmp 10b322 <_Event_Timeout+0x2e> =============================================================================== 0011064c <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 11064c: 55 push %ebp 11064d: 89 e5 mov %esp,%ebp 11064f: 57 push %edi 110650: 56 push %esi 110651: 53 push %ebx 110652: 83 ec 2c sub $0x2c,%esp 110655: 8b 7d 0c mov 0xc(%ebp),%edi Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE 110658: 8d 47 04 lea 0x4(%edi),%eax 11065b: 89 45 dc mov %eax,-0x24(%ebp) - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; 11065e: 8b 55 08 mov 0x8(%ebp),%edx 110661: 8b 52 10 mov 0x10(%edx),%edx 110664: 89 55 cc mov %edx,-0x34(%ebp) Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { 110667: 39 c7 cmp %eax,%edi 110669: 0f 87 69 01 00 00 ja 1107d8 <_Heap_Allocate_aligned_with_boundary+0x18c> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 11066f: 8b 5d 14 mov 0x14(%ebp),%ebx 110672: 85 db test %ebx,%ebx 110674: 0f 85 56 01 00 00 jne 1107d0 <_Heap_Allocate_aligned_with_boundary+0x184> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 11067a: 8b 45 08 mov 0x8(%ebp),%eax 11067d: 8b 48 08 mov 0x8(%eax),%ecx do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 110680: 39 c8 cmp %ecx,%eax 110682: 0f 84 50 01 00 00 je 1107d8 <_Heap_Allocate_aligned_with_boundary+0x18c> 110688: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp) uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 11068f: 8b 55 cc mov -0x34(%ebp),%edx 110692: 83 c2 07 add $0x7,%edx 110695: 89 55 c8 mov %edx,-0x38(%ebp) + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 110698: c7 45 d0 04 00 00 00 movl $0x4,-0x30(%ebp) 11069f: 29 7d d0 sub %edi,-0x30(%ebp) 1106a2: eb 1e jmp 1106c2 <_Heap_Allocate_aligned_with_boundary+0x76> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 1106a4: 8d 59 08 lea 0x8(%ecx),%ebx } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 1106a7: 85 db test %ebx,%ebx 1106a9: 0f 85 f1 00 00 00 jne 1107a0 <_Heap_Allocate_aligned_with_boundary+0x154><== ALWAYS TAKEN break; } block = block->next; 1106af: 8b 49 08 mov 0x8(%ecx),%ecx 1106b2: 8b 45 e4 mov -0x1c(%ebp),%eax 1106b5: 40 inc %eax do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 1106b6: 39 4d 08 cmp %ecx,0x8(%ebp) 1106b9: 0f 84 25 01 00 00 je 1107e4 <_Heap_Allocate_aligned_with_boundary+0x198> 1106bf: 89 45 e4 mov %eax,-0x1c(%ebp) /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 1106c2: 8b 59 04 mov 0x4(%ecx),%ebx 1106c5: 39 5d dc cmp %ebx,-0x24(%ebp) 1106c8: 73 e5 jae 1106af <_Heap_Allocate_aligned_with_boundary+0x63> if ( alignment == 0 ) { 1106ca: 8b 55 10 mov 0x10(%ebp),%edx 1106cd: 85 d2 test %edx,%edx 1106cf: 74 d3 je 1106a4 <_Heap_Allocate_aligned_with_boundary+0x58> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 1106d1: 8b 45 08 mov 0x8(%ebp),%eax 1106d4: 8b 40 14 mov 0x14(%eax),%eax 1106d7: 89 45 d8 mov %eax,-0x28(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 1106da: 83 e3 fe and $0xfffffffe,%ebx uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 1106dd: 8d 1c 19 lea (%ecx,%ebx,1),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 1106e0: 8d 51 08 lea 0x8(%ecx),%edx 1106e3: 89 55 d4 mov %edx,-0x2c(%ebp) uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 1106e6: 8b 75 c8 mov -0x38(%ebp),%esi 1106e9: 29 c6 sub %eax,%esi uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 1106eb: 01 de add %ebx,%esi + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; 1106ed: 03 5d d0 add -0x30(%ebp),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 1106f0: 89 d8 mov %ebx,%eax 1106f2: 31 d2 xor %edx,%edx 1106f4: f7 75 10 divl 0x10(%ebp) 1106f7: 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 ) { 1106f9: 39 de cmp %ebx,%esi 1106fb: 73 0b jae 110708 <_Heap_Allocate_aligned_with_boundary+0xbc> 1106fd: 89 f0 mov %esi,%eax 1106ff: 31 d2 xor %edx,%edx 110701: f7 75 10 divl 0x10(%ebp) 110704: 89 f3 mov %esi,%ebx 110706: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 110708: 8b 45 14 mov 0x14(%ebp),%eax 11070b: 85 c0 test %eax,%eax 11070d: 74 5b je 11076a <_Heap_Allocate_aligned_with_boundary+0x11e> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 11070f: 8d 34 3b lea (%ebx,%edi,1),%esi 110712: 89 f0 mov %esi,%eax 110714: 31 d2 xor %edx,%edx 110716: f7 75 14 divl 0x14(%ebp) 110719: 89 f0 mov %esi,%eax 11071b: 29 d0 sub %edx,%eax /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 11071d: 39 c3 cmp %eax,%ebx 11071f: 73 49 jae 11076a <_Heap_Allocate_aligned_with_boundary+0x11e> 110721: 39 c6 cmp %eax,%esi 110723: 76 45 jbe 11076a <_Heap_Allocate_aligned_with_boundary+0x11e> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 110725: 8b 55 d4 mov -0x2c(%ebp),%edx 110728: 01 fa add %edi,%edx 11072a: 89 55 e0 mov %edx,-0x20(%ebp) uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 11072d: 39 c2 cmp %eax,%edx 11072f: 0f 87 7a ff ff ff ja 1106af <_Heap_Allocate_aligned_with_boundary+0x63> 110735: 89 ce mov %ecx,%esi 110737: eb 10 jmp 110749 <_Heap_Allocate_aligned_with_boundary+0xfd> 110739: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* 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 ) { 11073c: 39 c1 cmp %eax,%ecx 11073e: 76 28 jbe 110768 <_Heap_Allocate_aligned_with_boundary+0x11c> if ( boundary_line < boundary_floor ) { 110740: 39 45 e0 cmp %eax,-0x20(%ebp) 110743: 0f 87 9f 00 00 00 ja 1107e8 <_Heap_Allocate_aligned_with_boundary+0x19c><== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; 110749: 89 c3 mov %eax,%ebx 11074b: 29 fb sub %edi,%ebx 11074d: 89 d8 mov %ebx,%eax 11074f: 31 d2 xor %edx,%edx 110751: f7 75 10 divl 0x10(%ebp) 110754: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 110756: 8d 0c 3b lea (%ebx,%edi,1),%ecx 110759: 89 c8 mov %ecx,%eax 11075b: 31 d2 xor %edx,%edx 11075d: f7 75 14 divl 0x14(%ebp) 110760: 89 c8 mov %ecx,%eax 110762: 29 d0 sub %edx,%eax /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 110764: 39 c3 cmp %eax,%ebx 110766: 72 d4 jb 11073c <_Heap_Allocate_aligned_with_boundary+0xf0> 110768: 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 ) { 11076a: 39 5d d4 cmp %ebx,-0x2c(%ebp) 11076d: 0f 87 3c ff ff ff ja 1106af <_Heap_Allocate_aligned_with_boundary+0x63> 110773: be f8 ff ff ff mov $0xfffffff8,%esi 110778: 29 ce sub %ecx,%esi uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 11077a: 01 de add %ebx,%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 11077c: 89 d8 mov %ebx,%eax 11077e: 31 d2 xor %edx,%edx 110780: f7 75 cc divl -0x34(%ebp) uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; 110783: 29 d6 sub %edx,%esi if ( free_size >= min_block_size || free_size == 0 ) { 110785: 39 75 d8 cmp %esi,-0x28(%ebp) 110788: 0f 86 19 ff ff ff jbe 1106a7 <_Heap_Allocate_aligned_with_boundary+0x5b> 11078e: 85 f6 test %esi,%esi 110790: 0f 85 19 ff ff ff jne 1106af <_Heap_Allocate_aligned_with_boundary+0x63> } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 110796: 85 db test %ebx,%ebx 110798: 0f 84 11 ff ff ff je 1106af <_Heap_Allocate_aligned_with_boundary+0x63><== NEVER TAKEN 11079e: 66 90 xchg %ax,%ax search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; 1107a0: 8b 45 08 mov 0x8(%ebp),%eax 1107a3: ff 40 48 incl 0x48(%eax) stats->searches += search_count; 1107a6: 8b 55 e4 mov -0x1c(%ebp),%edx 1107a9: 01 50 4c add %edx,0x4c(%eax) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 1107ac: 57 push %edi 1107ad: 53 push %ebx 1107ae: 51 push %ecx 1107af: 50 push %eax 1107b0: e8 53 bf ff ff call 10c708 <_Heap_Block_allocate> 1107b5: 89 d8 mov %ebx,%eax 1107b7: 83 c4 10 add $0x10,%esp boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 1107ba: 8b 55 e4 mov -0x1c(%ebp),%edx 1107bd: 8b 4d 08 mov 0x8(%ebp),%ecx 1107c0: 39 51 44 cmp %edx,0x44(%ecx) 1107c3: 73 15 jae 1107da <_Heap_Allocate_aligned_with_boundary+0x18e> stats->max_search = search_count; 1107c5: 89 51 44 mov %edx,0x44(%ecx) } return (void *) alloc_begin; } 1107c8: 8d 65 f4 lea -0xc(%ebp),%esp 1107cb: 5b pop %ebx 1107cc: 5e pop %esi 1107cd: 5f pop %edi 1107ce: c9 leave 1107cf: c3 ret /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 1107d0: 3b 7d 14 cmp 0x14(%ebp),%edi 1107d3: 76 1a jbe 1107ef <_Heap_Allocate_aligned_with_boundary+0x1a3> 1107d5: 8d 76 00 lea 0x0(%esi),%esi do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 1107d8: 31 c0 xor %eax,%eax if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 1107da: 8d 65 f4 lea -0xc(%ebp),%esp 1107dd: 5b pop %ebx 1107de: 5e pop %esi 1107df: 5f pop %edi 1107e0: c9 leave 1107e1: c3 ret 1107e2: 66 90 xchg %ax,%ax <== NOT EXECUTED do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 1107e4: 31 c0 xor %eax,%eax 1107e6: eb d2 jmp 1107ba <_Heap_Allocate_aligned_with_boundary+0x16e> 1107e8: 89 f1 mov %esi,%ecx <== NOT EXECUTED 1107ea: e9 c0 fe ff ff jmp 1106af <_Heap_Allocate_aligned_with_boundary+0x63><== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 1107ef: 8b 4d 10 mov 0x10(%ebp),%ecx 1107f2: 85 c9 test %ecx,%ecx 1107f4: 0f 85 80 fe ff ff jne 11067a <_Heap_Allocate_aligned_with_boundary+0x2e> alignment = page_size; 1107fa: 89 55 10 mov %edx,0x10(%ebp) 1107fd: e9 78 fe ff ff jmp 11067a <_Heap_Allocate_aligned_with_boundary+0x2e> =============================================================================== 0010c708 <_Heap_Block_allocate>: Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 10c708: 55 push %ebp 10c709: 89 e5 mov %esp,%ebp 10c70b: 57 push %edi 10c70c: 56 push %esi 10c70d: 53 push %ebx 10c70e: 83 ec 14 sub $0x14,%esp 10c711: 8b 5d 08 mov 0x8(%ebp),%ebx 10c714: 8b 75 0c mov 0xc(%ebp),%esi 10c717: 8b 45 10 mov 0x10(%ebp),%eax RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10c71a: 8d 50 f8 lea -0x8(%eax),%edx 10c71d: 89 55 f0 mov %edx,-0x10(%ebp) 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; 10c720: 29 f2 sub %esi,%edx 10c722: 89 55 e4 mov %edx,-0x1c(%ebp) } _Heap_Protection_block_initialize( heap, block ); return block; } 10c725: 8b 4e 04 mov 0x4(%esi),%ecx 10c728: 89 4d e8 mov %ecx,-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; 10c72b: 89 ca mov %ecx,%edx 10c72d: 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); 10c730: 8d 0c 16 lea (%esi,%edx,1),%ecx 10c733: 89 4d ec mov %ecx,-0x14(%ebp) Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 10c736: f6 41 04 01 testb $0x1,0x4(%ecx) 10c73a: 0f 85 80 00 00 00 jne 10c7c0 <_Heap_Block_allocate+0xb8> free_list_anchor = block->prev; 10c740: 8b 4e 0c mov 0xc(%esi),%ecx } _Heap_Protection_block_initialize( heap, block ); return block; } 10c743: 8b 7e 08 mov 0x8(%esi),%edi RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 10c746: 89 79 08 mov %edi,0x8(%ecx) next->prev = prev; 10c749: 89 4f 0c mov %ecx,0xc(%edi) free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 10c74c: ff 4b 38 decl 0x38(%ebx) ++stats->used_blocks; 10c74f: ff 43 40 incl 0x40(%ebx) stats->free_size -= _Heap_Block_size( block ); 10c752: 29 53 30 sub %edx,0x30(%ebx) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 10c755: 8b 53 10 mov 0x10(%ebx),%edx 10c758: 89 55 e0 mov %edx,-0x20(%ebp) 10c75b: 39 55 e4 cmp %edx,-0x1c(%ebp) 10c75e: 72 6d jb 10c7cd <_Heap_Block_allocate+0xc5> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10c760: 31 d2 xor %edx,%edx 10c762: f7 75 e0 divl -0x20(%ebp) 10c765: 89 d7 mov %edx,%edi uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 10c767: 8b 55 f0 mov -0x10(%ebp),%edx 10c76a: 29 fa sub %edi,%edx 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 ) 10c76c: 89 55 f0 mov %edx,-0x10(%ebp) uintptr_t block_end = block_begin + block_size; Heap_Block *const new_block = _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; 10c76f: 8b 45 ec mov -0x14(%ebp),%eax 10c772: 29 d0 sub %edx,%eax 10c774: 89 45 ec mov %eax,-0x14(%ebp) block_end = new_block_begin; block_size = block_end - block_begin; 10c777: 89 d0 mov %edx,%eax 10c779: 29 f0 sub %esi,%eax _HAssert( block_size >= heap->min_block_size ); _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; 10c77b: 01 43 30 add %eax,0x30(%ebx) if ( _Heap_Is_prev_used( block ) ) { 10c77e: f6 45 e8 01 testb $0x1,-0x18(%ebp) 10c782: 75 60 jne 10c7e4 <_Heap_Block_allocate+0xdc> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); 10c784: 2b 36 sub (%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; 10c786: 8b 7e 04 mov 0x4(%esi),%edi 10c789: 83 e7 fe and $0xfffffffe,%edi 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; 10c78c: 01 f8 add %edi,%eax } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 10c78e: 89 c7 mov %eax,%edi 10c790: 83 cf 01 or $0x1,%edi 10c793: 89 7e 04 mov %edi,0x4(%esi) new_block->prev_size = block_size; 10c796: 89 02 mov %eax,(%edx) new_block->size_and_flag = new_block_size; 10c798: 8b 45 ec mov -0x14(%ebp),%eax 10c79b: 89 42 04 mov %eax,0x4(%edx) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 10c79e: ff 75 14 pushl 0x14(%ebp) 10c7a1: 89 d8 mov %ebx,%eax 10c7a3: e8 f0 fc ff ff call 10c498 <_Heap_Block_split> 10c7a8: 58 pop %eax alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 10c7a9: 8b 43 30 mov 0x30(%ebx),%eax 10c7ac: 39 43 34 cmp %eax,0x34(%ebx) 10c7af: 76 03 jbe 10c7b4 <_Heap_Block_allocate+0xac> stats->min_free_size = stats->free_size; 10c7b1: 89 43 34 mov %eax,0x34(%ebx) } _Heap_Protection_block_initialize( heap, block ); return block; } 10c7b4: 8b 45 f0 mov -0x10(%ebp),%eax 10c7b7: 8d 65 f4 lea -0xc(%ebp),%esp 10c7ba: 5b pop %ebx 10c7bb: 5e pop %esi 10c7bc: 5f pop %edi 10c7bd: c9 leave 10c7be: c3 ret 10c7bf: 90 nop <== NOT EXECUTED /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); 10c7c0: 89 d9 mov %ebx,%ecx } if ( alloc_area_offset < heap->page_size ) { 10c7c2: 8b 53 10 mov 0x10(%ebx),%edx 10c7c5: 89 55 e0 mov %edx,-0x20(%ebp) 10c7c8: 39 55 e4 cmp %edx,-0x1c(%ebp) 10c7cb: 73 93 jae 10c760 <_Heap_Block_allocate+0x58> alloc_size += alloc_area_offset; 10c7cd: 8b 45 e4 mov -0x1c(%ebp),%eax 10c7d0: 03 45 14 add 0x14(%ebp),%eax Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); 10c7d3: 50 push %eax 10c7d4: 89 f2 mov %esi,%edx 10c7d6: 89 d8 mov %ebx,%eax 10c7d8: e8 bb fc ff ff call 10c498 <_Heap_Block_split> 10c7dd: 5a pop %edx 10c7de: 89 75 f0 mov %esi,-0x10(%ebp) 10c7e1: eb c6 jmp 10c7a9 <_Heap_Block_allocate+0xa1> 10c7e3: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10c7e4: 8b 79 08 mov 0x8(%ecx),%edi new_block->next = next; 10c7e7: 89 7e 08 mov %edi,0x8(%esi) new_block->prev = block_before; 10c7ea: 89 4e 0c mov %ecx,0xc(%esi) block_before->next = new_block; 10c7ed: 89 71 08 mov %esi,0x8(%ecx) next->prev = new_block; 10c7f0: 89 77 0c mov %esi,0xc(%edi) _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 10c7f3: ff 43 38 incl 0x38(%ebx) 10c7f6: 89 f1 mov %esi,%ecx 10c7f8: eb 94 jmp 10c78e <_Heap_Block_allocate+0x86> =============================================================================== 0010c498 <_Heap_Block_split>: Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 10c498: 55 push %ebp 10c499: 89 e5 mov %esp,%ebp 10c49b: 57 push %edi 10c49c: 56 push %esi 10c49d: 53 push %ebx 10c49e: 83 ec 18 sub $0x18,%esp 10c4a1: 89 c3 mov %eax,%ebx 10c4a3: 89 d6 mov %edx,%esi Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; 10c4a5: 8b 78 10 mov 0x10(%eax),%edi uintptr_t const min_block_size = heap->min_block_size; 10c4a8: 8b 40 14 mov 0x14(%eax),%eax 10c4ab: 89 45 e4 mov %eax,-0x1c(%ebp) } _Heap_Protection_block_initialize( heap, block ); return block; } 10c4ae: 8b 52 04 mov 0x4(%edx),%edx 10c4b1: 89 55 e0 mov %edx,-0x20(%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; 10c4b4: 83 e2 fe and $0xfffffffe,%edx 10c4b7: 89 55 ec mov %edx,-0x14(%ebp) { Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE; 10c4ba: 89 c2 mov %eax,%edx 10c4bc: 83 ea 08 sub $0x8,%edx return heap->stats.size; } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Max( uintptr_t a, uintptr_t b ) { return a > b ? a : b; 10c4bf: 8b 45 08 mov 0x8(%ebp),%eax 10c4c2: 39 d0 cmp %edx,%eax 10c4c4: 73 02 jae 10c4c8 <_Heap_Block_split+0x30> 10c4c6: 89 d0 mov %edx,%eax uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const used_size = 10c4c8: 83 c0 08 add $0x8,%eax 10c4cb: 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; 10c4ce: 31 d2 xor %edx,%edx 10c4d0: f7 f7 div %edi if ( remainder != 0 ) { 10c4d2: 85 d2 test %edx,%edx 10c4d4: 0f 84 8e 00 00 00 je 10c568 <_Heap_Block_split+0xd0> return value - remainder + alignment; 10c4da: 03 7d f0 add -0x10(%ebp),%edi 10c4dd: 29 d7 sub %edx,%edi 10c4df: 89 7d e8 mov %edi,-0x18(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c4e2: 8b 45 ec mov -0x14(%ebp),%eax 10c4e5: 01 f0 add %esi,%eax 10c4e7: 89 45 dc mov %eax,-0x24(%ebp) _Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE; uintptr_t const used_block_size = _Heap_Align_up( used_size, page_size ); uintptr_t const free_size = block_size + HEAP_ALLOC_BONUS - used_size; 10c4ea: 8b 55 ec mov -0x14(%ebp),%edx 10c4ed: 83 c2 04 add $0x4,%edx 10c4f0: 2b 55 f0 sub -0x10(%ebp),%edx uintptr_t const free_size_limit = min_block_size + HEAP_ALLOC_BONUS; 10c4f3: 8b 7d e4 mov -0x1c(%ebp),%edi 10c4f6: 83 c7 04 add $0x4,%edi Heap_Block *next_block = _Heap_Block_at( block, block_size ); _HAssert( used_size <= block_size + HEAP_ALLOC_BONUS ); _HAssert( used_size + free_size == block_size + HEAP_ALLOC_BONUS ); if ( free_size >= free_size_limit ) { 10c4f9: 39 fa cmp %edi,%edx 10c4fb: 72 77 jb 10c574 <_Heap_Block_split+0xdc> 10c4fd: 8b 55 e8 mov -0x18(%ebp),%edx 10c500: 01 f2 add %esi,%edx Heap_Block *const free_block = _Heap_Block_at( block, used_block_size ); uintptr_t free_block_size = block_size - used_block_size; 10c502: 8b 7d ec mov -0x14(%ebp),%edi 10c505: 2b 7d e8 sub -0x18(%ebp),%edi 10c508: 89 7d ec mov %edi,-0x14(%ebp) RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 10c50b: 8b 7d e0 mov -0x20(%ebp),%edi 10c50e: 83 e7 01 and $0x1,%edi 10c511: 89 7d f0 mov %edi,-0x10(%ebp) block->size_and_flag = size | flag; 10c514: 8b 7d e8 mov -0x18(%ebp),%edi 10c517: 09 7d f0 or %edi,-0x10(%ebp) 10c51a: 8b 7d f0 mov -0x10(%ebp),%edi 10c51d: 89 7e 04 mov %edi,0x4(%esi) _HAssert( used_block_size + free_block_size == block_size ); _Heap_Block_set_size( block, used_block_size ); /* Statistics */ stats->free_size += free_block_size; 10c520: 8b 75 ec mov -0x14(%ebp),%esi 10c523: 01 73 30 add %esi,0x30(%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; 10c526: 8b 70 04 mov 0x4(%eax),%esi 10c529: 83 e6 fe and $0xfffffffe,%esi if ( _Heap_Is_used( next_block ) ) { 10c52c: f6 44 30 04 01 testb $0x1,0x4(%eax,%esi,1) 10c531: 75 51 jne 10c584 <_Heap_Block_split+0xec> } _Heap_Protection_block_initialize( heap, block ); return block; } 10c533: 8b 48 08 mov 0x8(%eax),%ecx 10c536: 8b 40 0c mov 0xc(%eax),%eax ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 10c539: 89 4a 08 mov %ecx,0x8(%edx) new_block->prev = prev; 10c53c: 89 42 0c mov %eax,0xc(%edx) next->prev = new_block; 10c53f: 89 51 0c mov %edx,0xc(%ecx) prev->next = new_block; 10c542: 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; 10c545: 01 75 ec add %esi,-0x14(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c548: 8b 45 ec mov -0x14(%ebp),%eax 10c54b: 01 d0 add %edx,%eax next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; 10c54d: 8b 4d ec mov -0x14(%ebp),%ecx 10c550: 83 c9 01 or $0x1,%ecx 10c553: 89 4a 04 mov %ecx,0x4(%edx) next_block->prev_size = free_block_size; 10c556: 8b 7d ec mov -0x14(%ebp),%edi 10c559: 89 38 mov %edi,(%eax) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10c55b: 83 60 04 fe andl $0xfffffffe,0x4(%eax) _Heap_Protection_block_initialize( heap, free_block ); } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; } } 10c55f: 83 c4 18 add $0x18,%esp 10c562: 5b pop %ebx 10c563: 5e pop %esi 10c564: 5f pop %edi 10c565: c9 leave 10c566: c3 ret 10c567: 90 nop <== NOT EXECUTED uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; } else { return value; 10c568: 8b 7d f0 mov -0x10(%ebp),%edi 10c56b: 89 7d e8 mov %edi,-0x18(%ebp) 10c56e: e9 6f ff ff ff jmp 10c4e2 <_Heap_Block_split+0x4a> 10c573: 90 nop <== NOT EXECUTED next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; _Heap_Protection_block_initialize( heap, free_block ); } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 10c574: 8b 45 dc mov -0x24(%ebp),%eax 10c577: 83 48 04 01 orl $0x1,0x4(%eax) } } 10c57b: 83 c4 18 add $0x18,%esp 10c57e: 5b pop %ebx 10c57f: 5e pop %esi 10c580: 5f pop %edi 10c581: c9 leave 10c582: c3 ret 10c583: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10c584: 8b 71 08 mov 0x8(%ecx),%esi new_block->next = next; 10c587: 89 72 08 mov %esi,0x8(%edx) new_block->prev = block_before; 10c58a: 89 4a 0c mov %ecx,0xc(%edx) block_before->next = new_block; 10c58d: 89 51 08 mov %edx,0x8(%ecx) next->prev = new_block; 10c590: 89 56 0c mov %edx,0xc(%esi) if ( _Heap_Is_used( next_block ) ) { _Heap_Free_list_insert_after( free_list_anchor, free_block ); /* Statistics */ ++stats->free_blocks; 10c593: ff 43 38 incl 0x38(%ebx) 10c596: eb b5 jmp 10c54d <_Heap_Block_split+0xb5> =============================================================================== 00110bd0 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 110bd0: 55 push %ebp 110bd1: 89 e5 mov %esp,%ebp 110bd3: 57 push %edi 110bd4: 56 push %esi 110bd5: 53 push %ebx 110bd6: 83 ec 4c sub $0x4c,%esp 110bd9: 8b 5d 08 mov 0x8(%ebp),%ebx 110bdc: 8b 4d 10 mov 0x10(%ebp),%ecx Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; 110bdf: 8b 43 20 mov 0x20(%ebx),%eax 110be2: 89 45 d0 mov %eax,-0x30(%ebp) Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; 110be5: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) Heap_Block *extend_last_block = NULL; 110bec: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) uintptr_t const page_size = heap->page_size; 110bf3: 8b 53 10 mov 0x10(%ebx),%edx 110bf6: 89 55 d4 mov %edx,-0x2c(%ebp) uintptr_t const min_block_size = heap->min_block_size; 110bf9: 8b 43 14 mov 0x14(%ebx),%eax uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; uintptr_t const free_size = stats->free_size; 110bfc: 8b 73 30 mov 0x30(%ebx),%esi 110bff: 89 75 c0 mov %esi,-0x40(%ebp) uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { 110c02: 8b 55 0c mov 0xc(%ebp),%edx 110c05: 01 ca add %ecx,%edx 110c07: 89 55 cc mov %edx,-0x34(%ebp) 110c0a: 73 0c jae 110c18 <_Heap_Extend+0x48> _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; 110c0c: 31 c0 xor %eax,%eax if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 110c0e: 8d 65 f4 lea -0xc(%ebp),%esp 110c11: 5b pop %ebx 110c12: 5e pop %esi 110c13: 5f pop %edi 110c14: c9 leave 110c15: c3 ret 110c16: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( extend_area_end < extend_area_begin ) { return false; } extend_area_ok = _Heap_Get_first_and_last_block( 110c18: 83 ec 08 sub $0x8,%esp 110c1b: 8d 55 e0 lea -0x20(%ebp),%edx 110c1e: 52 push %edx 110c1f: 8d 55 e4 lea -0x1c(%ebp),%edx 110c22: 52 push %edx 110c23: 50 push %eax 110c24: ff 75 d4 pushl -0x2c(%ebp) 110c27: 51 push %ecx 110c28: ff 75 0c pushl 0xc(%ebp) 110c2b: e8 e4 bc ff ff call 10c914 <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 110c30: 83 c4 20 add $0x20,%esp 110c33: 84 c0 test %al,%al 110c35: 74 d5 je 110c0c <_Heap_Extend+0x3c> 110c37: 8b 7d d0 mov -0x30(%ebp),%edi 110c3a: c7 45 bc 00 00 00 00 movl $0x0,-0x44(%ebp) 110c41: c7 45 b8 00 00 00 00 movl $0x0,-0x48(%ebp) 110c48: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) 110c4f: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 110c56: 8b 75 cc mov -0x34(%ebp),%esi 110c59: 89 5d b4 mov %ebx,-0x4c(%ebp) 110c5c: eb 30 jmp 110c8e <_Heap_Extend+0xbe> 110c5e: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( extend_area_end == sub_area_begin ) { merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 110c60: 39 ce cmp %ecx,%esi 110c62: 73 03 jae 110c67 <_Heap_Extend+0x97> 110c64: 89 7d b8 mov %edi,-0x48(%ebp) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 110c67: 8d 59 f8 lea -0x8(%ecx),%ebx 110c6a: 89 c8 mov %ecx,%eax 110c6c: 31 d2 xor %edx,%edx 110c6e: f7 75 d4 divl -0x2c(%ebp) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 110c71: 29 d3 sub %edx,%ebx link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 110c73: 3b 4d 0c cmp 0xc(%ebp),%ecx 110c76: 74 3c je 110cb4 <_Heap_Extend+0xe4> start_block->prev_size = extend_area_end; merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 110c78: 39 4d 0c cmp %ecx,0xc(%ebp) 110c7b: 76 03 jbe 110c80 <_Heap_Extend+0xb0> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 110c7d: 89 5d bc mov %ebx,-0x44(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 110c80: 8b 7b 04 mov 0x4(%ebx),%edi 110c83: 83 e7 fe and $0xfffffffe,%edi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 110c86: 8d 3c 3b lea (%ebx,%edi,1),%edi link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 110c89: 39 7d d0 cmp %edi,-0x30(%ebp) 110c8c: 74 39 je 110cc7 <_Heap_Extend+0xf7> return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 110c8e: 3b 7d d0 cmp -0x30(%ebp),%edi 110c91: 0f 84 35 01 00 00 je 110dcc <_Heap_Extend+0x1fc> 110c97: 89 f8 mov %edi,%eax uintptr_t const sub_area_end = start_block->prev_size; 110c99: 8b 0f mov (%edi),%ecx Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 110c9b: 39 4d 0c cmp %ecx,0xc(%ebp) 110c9e: 73 08 jae 110ca8 <_Heap_Extend+0xd8> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin 110ca0: 39 f0 cmp %esi,%eax 110ca2: 0f 82 64 ff ff ff jb 110c0c <_Heap_Extend+0x3c> ) { return false; } if ( extend_area_end == sub_area_begin ) { 110ca8: 39 f0 cmp %esi,%eax 110caa: 75 b4 jne 110c60 <_Heap_Extend+0x90> 110cac: 89 7d c4 mov %edi,-0x3c(%ebp) 110caf: eb b6 jmp 110c67 <_Heap_Extend+0x97> 110cb1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } else if ( extend_area_end < sub_area_end ) { link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { start_block->prev_size = extend_area_end; 110cb4: 89 37 mov %esi,(%edi) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 110cb6: 89 5d c8 mov %ebx,-0x38(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 110cb9: 8b 7b 04 mov 0x4(%ebx),%edi 110cbc: 83 e7 fe and $0xfffffffe,%edi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 110cbf: 8d 3c 3b lea (%ebx,%edi,1),%edi } else if ( sub_area_end < extend_area_begin ) { link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 110cc2: 39 7d d0 cmp %edi,-0x30(%ebp) 110cc5: 75 c7 jne 110c8e <_Heap_Extend+0xbe> <== NEVER TAKEN 110cc7: 8b 5d b4 mov -0x4c(%ebp),%ebx if ( extend_area_begin < heap->area_begin ) { 110cca: 8b 75 0c mov 0xc(%ebp),%esi 110ccd: 3b 73 18 cmp 0x18(%ebx),%esi 110cd0: 0f 82 02 01 00 00 jb 110dd8 <_Heap_Extend+0x208> heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { 110cd6: 8b 45 cc mov -0x34(%ebp),%eax 110cd9: 3b 43 1c cmp 0x1c(%ebx),%eax 110cdc: 76 03 jbe 110ce1 <_Heap_Extend+0x111> heap->area_end = extend_area_end; 110cde: 89 43 1c mov %eax,0x1c(%ebx) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 110ce1: 8b 55 e0 mov -0x20(%ebp),%edx 110ce4: 8b 45 e4 mov -0x1c(%ebp),%eax heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 110ce7: 89 d1 mov %edx,%ecx 110ce9: 29 c1 sub %eax,%ecx (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 110ceb: 8b 75 cc mov -0x34(%ebp),%esi 110cee: 89 30 mov %esi,(%eax) extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 110cf0: 89 ce mov %ecx,%esi 110cf2: 83 ce 01 or $0x1,%esi 110cf5: 89 70 04 mov %esi,0x4(%eax) _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 110cf8: 89 0a mov %ecx,(%edx) extend_last_block->size_and_flag = 0; 110cfa: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 110d01: 39 43 20 cmp %eax,0x20(%ebx) 110d04: 0f 86 d6 00 00 00 jbe 110de0 <_Heap_Extend+0x210> heap->first_block = extend_first_block; 110d0a: 89 43 20 mov %eax,0x20(%ebx) } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { 110d0d: 8b 75 c4 mov -0x3c(%ebp),%esi 110d10: 85 f6 test %esi,%esi 110d12: 0f 84 04 01 00 00 je 110e1c <_Heap_Extend+0x24c> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 110d18: 8b 73 10 mov 0x10(%ebx),%esi uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); 110d1b: 8b 4d 0c mov 0xc(%ebp),%ecx 110d1e: 83 c1 08 add $0x8,%ecx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 110d21: 89 c8 mov %ecx,%eax 110d23: 31 d2 xor %edx,%edx 110d25: f7 f6 div %esi if ( remainder != 0 ) { 110d27: 85 d2 test %edx,%edx 110d29: 74 04 je 110d2f <_Heap_Extend+0x15f> <== ALWAYS TAKEN return value - remainder + alignment; 110d2b: 01 f1 add %esi,%ecx <== NOT EXECUTED 110d2d: 29 d1 sub %edx,%ecx <== NOT EXECUTED uintptr_t const new_first_block_begin = 110d2f: 8d 51 f8 lea -0x8(%ecx),%edx uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; 110d32: 8b 75 c4 mov -0x3c(%ebp),%esi 110d35: 8b 06 mov (%esi),%eax 110d37: 89 41 f8 mov %eax,-0x8(%ecx) uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const new_first_block_begin = new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = 110d3a: 89 f0 mov %esi,%eax 110d3c: 29 d0 sub %edx,%eax first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; 110d3e: 83 c8 01 or $0x1,%eax 110d41: 89 42 04 mov %eax,0x4(%edx) _Heap_Free_block( heap, new_first_block ); 110d44: 89 d8 mov %ebx,%eax 110d46: e8 69 fe ff ff call 110bb4 <_Heap_Free_block> link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 110d4b: 8b 45 c8 mov -0x38(%ebp),%eax 110d4e: 85 c0 test %eax,%eax 110d50: 0f 84 9e 00 00 00 je 110df4 <_Heap_Extend+0x224> ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE, 110d56: 8b 4d cc mov -0x34(%ebp),%ecx 110d59: 83 e9 08 sub $0x8,%ecx uintptr_t extend_area_end ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( 110d5c: 2b 4d c8 sub -0x38(%ebp),%ecx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 110d5f: 89 c8 mov %ecx,%eax 110d61: 31 d2 xor %edx,%edx 110d63: f7 73 10 divl 0x10(%ebx) 110d66: 29 d1 sub %edx,%ecx ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) 110d68: 8b 55 c8 mov -0x38(%ebp),%edx 110d6b: 8b 42 04 mov 0x4(%edx),%eax 110d6e: 29 c8 sub %ecx,%eax | HEAP_PREV_BLOCK_USED; 110d70: 83 c8 01 or $0x1,%eax 110d73: 89 44 11 04 mov %eax,0x4(%ecx,%edx,1) RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 110d77: 8b 42 04 mov 0x4(%edx),%eax 110d7a: 83 e0 01 and $0x1,%eax block->size_and_flag = size | flag; 110d7d: 09 c8 or %ecx,%eax 110d7f: 89 42 04 mov %eax,0x4(%edx) _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 110d82: 89 d8 mov %ebx,%eax 110d84: e8 2b fe ff ff call 110bb4 <_Heap_Free_block> extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 110d89: 8b 75 c4 mov -0x3c(%ebp),%esi 110d8c: 85 f6 test %esi,%esi 110d8e: 0f 84 a4 00 00 00 je 110e38 <_Heap_Extend+0x268> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 110d94: 8b 53 24 mov 0x24(%ebx),%edx * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( 110d97: 8b 43 20 mov 0x20(%ebx),%eax 110d9a: 29 d0 sub %edx,%eax RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 110d9c: 8b 4a 04 mov 0x4(%edx),%ecx 110d9f: 83 e1 01 and $0x1,%ecx block->size_and_flag = size | flag; 110da2: 09 c8 or %ecx,%eax 110da4: 89 42 04 mov %eax,0x4(%edx) _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 110da7: 8b 43 30 mov 0x30(%ebx),%eax 110daa: 2b 45 c0 sub -0x40(%ebp),%eax /* Statistics */ stats->size += extended_size; 110dad: 01 43 2c add %eax,0x2c(%ebx) if ( extended_size_ptr != NULL ) 110db0: 8b 55 14 mov 0x14(%ebp),%edx 110db3: 85 d2 test %edx,%edx 110db5: 0f 84 99 00 00 00 je 110e54 <_Heap_Extend+0x284> <== NEVER TAKEN *extended_size_ptr = extended_size; 110dbb: 8b 55 14 mov 0x14(%ebp),%edx 110dbe: 89 02 mov %eax,(%edx) return true; 110dc0: b0 01 mov $0x1,%al } 110dc2: 8d 65 f4 lea -0xc(%ebp),%esp 110dc5: 5b pop %ebx 110dc6: 5e pop %esi 110dc7: 5f pop %edi 110dc8: c9 leave 110dc9: c3 ret 110dca: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 110dcc: 8b 55 b4 mov -0x4c(%ebp),%edx 110dcf: 8b 42 18 mov 0x18(%edx),%eax 110dd2: e9 c2 fe ff ff jmp 110c99 <_Heap_Extend+0xc9> 110dd7: 90 nop <== NOT EXECUTED start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); if ( extend_area_begin < heap->area_begin ) { heap->area_begin = extend_area_begin; 110dd8: 89 73 18 mov %esi,0x18(%ebx) 110ddb: e9 01 ff ff ff jmp 110ce1 <_Heap_Extend+0x111> extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { heap->first_block = extend_first_block; } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 110de0: 39 53 24 cmp %edx,0x24(%ebx) 110de3: 0f 83 24 ff ff ff jae 110d0d <_Heap_Extend+0x13d> heap->last_block = extend_last_block; 110de9: 89 53 24 mov %edx,0x24(%ebx) 110dec: e9 1c ff ff ff jmp 110d0d <_Heap_Extend+0x13d> 110df1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 110df4: 8b 7d bc mov -0x44(%ebp),%edi 110df7: 85 ff test %edi,%edi 110df9: 74 8e je 110d89 <_Heap_Extend+0x1b9> _Heap_Link_above( 110dfb: 8b 4d e0 mov -0x20(%ebp),%ecx ) { uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); 110dfe: 8b 45 e4 mov -0x1c(%ebp),%eax 110e01: 2b 45 bc sub -0x44(%ebp),%eax RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 110e04: 8b 75 bc mov -0x44(%ebp),%esi 110e07: 8b 56 04 mov 0x4(%esi),%edx 110e0a: 83 e2 01 and $0x1,%edx block->size_and_flag = size | flag; 110e0d: 09 d0 or %edx,%eax 110e0f: 89 46 04 mov %eax,0x4(%esi) last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 110e12: 83 49 04 01 orl $0x1,0x4(%ecx) 110e16: e9 6e ff ff ff jmp 110d89 <_Heap_Extend+0x1b9> 110e1b: 90 nop <== NOT EXECUTED heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { _Heap_Merge_below( heap, extend_area_begin, merge_below_block ); } else if ( link_below_block != NULL ) { 110e1c: 8b 4d b8 mov -0x48(%ebp),%ecx 110e1f: 85 c9 test %ecx,%ecx 110e21: 0f 84 24 ff ff ff je 110d4b <_Heap_Extend+0x17b> { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = (link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED; 110e27: 8b 45 b8 mov -0x48(%ebp),%eax 110e2a: 29 d0 sub %edx,%eax 110e2c: 83 c8 01 or $0x1,%eax 110e2f: 89 42 04 mov %eax,0x4(%edx) 110e32: e9 14 ff ff ff jmp 110d4b <_Heap_Extend+0x17b> 110e37: 90 nop <== NOT EXECUTED extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 110e38: 8b 4d c8 mov -0x38(%ebp),%ecx 110e3b: 85 c9 test %ecx,%ecx 110e3d: 0f 85 51 ff ff ff jne 110d94 <_Heap_Extend+0x1c4> _Heap_Free_block( heap, extend_first_block ); 110e43: 8b 55 e4 mov -0x1c(%ebp),%edx 110e46: 89 d8 mov %ebx,%eax 110e48: e8 67 fd ff ff call 110bb4 <_Heap_Free_block> 110e4d: e9 42 ff ff ff jmp 110d94 <_Heap_Extend+0x1c4> 110e52: 66 90 xchg %ax,%ax <== NOT EXECUTED stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 110e54: b0 01 mov $0x1,%al <== NOT EXECUTED 110e56: e9 b3 fd ff ff jmp 110c0e <_Heap_Extend+0x3e> <== NOT EXECUTED =============================================================================== 00110804 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 110804: 55 push %ebp 110805: 89 e5 mov %esp,%ebp 110807: 57 push %edi 110808: 56 push %esi 110809: 53 push %ebx 11080a: 83 ec 10 sub $0x10,%esp 11080d: 8b 5d 08 mov 0x8(%ebp),%ebx 110810: 8b 45 0c mov 0xc(%ebp),%eax 110813: 8d 48 f8 lea -0x8(%eax),%ecx 110816: 31 d2 xor %edx,%edx 110818: f7 73 10 divl 0x10(%ebx) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 11081b: 29 d1 sub %edx,%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11081d: 8b 43 20 mov 0x20(%ebx),%eax && (uintptr_t) block <= (uintptr_t) heap->last_block; 110820: 39 c1 cmp %eax,%ecx 110822: 72 07 jb 11082b <_Heap_Free+0x27> 110824: 8b 73 24 mov 0x24(%ebx),%esi 110827: 39 f1 cmp %esi,%ecx 110829: 76 0d jbe 110838 <_Heap_Free+0x34> /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { _HAssert( false ); return( false ); 11082b: 31 c0 xor %eax,%eax --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 11082d: 83 c4 10 add $0x10,%esp 110830: 5b pop %ebx 110831: 5e pop %esi 110832: 5f pop %edi 110833: c9 leave 110834: c3 ret 110835: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 110838: 8b 51 04 mov 0x4(%ecx),%edx 11083b: 89 55 f0 mov %edx,-0x10(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 11083e: 83 e2 fe and $0xfffffffe,%edx 110841: 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); 110844: 8d 14 11 lea (%ecx,%edx,1),%edx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 110847: 39 d0 cmp %edx,%eax 110849: 77 e0 ja 11082b <_Heap_Free+0x27> <== NEVER TAKEN 11084b: 39 d6 cmp %edx,%esi 11084d: 72 dc jb 11082b <_Heap_Free+0x27> <== NEVER TAKEN 11084f: 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 ) ) { 110852: f7 c7 01 00 00 00 test $0x1,%edi 110858: 74 d1 je 11082b <_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; 11085a: 83 e7 fe and $0xfffffffe,%edi 11085d: 89 7d e4 mov %edi,-0x1c(%ebp) return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 110860: 39 d6 cmp %edx,%esi 110862: 0f 84 c8 00 00 00 je 110930 <_Heap_Free+0x12c> return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 110868: f6 44 3a 04 01 testb $0x1,0x4(%edx,%edi,1) 11086d: 0f 94 45 eb sete -0x15(%ebp) next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 110871: f6 45 f0 01 testb $0x1,-0x10(%ebp) 110875: 75 45 jne 1108bc <_Heap_Free+0xb8> uintptr_t const prev_size = block->prev_size; 110877: 8b 39 mov (%ecx),%edi 110879: 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); 11087c: 29 f9 sub %edi,%ecx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 11087e: 39 c8 cmp %ecx,%eax 110880: 77 a9 ja 11082b <_Heap_Free+0x27> <== NEVER TAKEN 110882: 39 ce cmp %ecx,%esi 110884: 72 a5 jb 11082b <_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) ) { 110886: f6 41 04 01 testb $0x1,0x4(%ecx) 11088a: 74 9f je 11082b <_Heap_Free+0x27> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 11088c: 80 7d eb 00 cmpb $0x0,-0x15(%ebp) 110890: 0f 84 a6 00 00 00 je 11093c <_Heap_Free+0x138> uintptr_t const size = block_size + prev_size + next_block_size; 110896: 8b 7d e4 mov -0x1c(%ebp),%edi 110899: 03 7d ec add -0x14(%ebp),%edi 11089c: 03 7d f0 add -0x10(%ebp),%edi --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 11089f: 8b 42 08 mov 0x8(%edx),%eax 1108a2: 8b 52 0c mov 0xc(%edx),%edx RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 1108a5: 89 42 08 mov %eax,0x8(%edx) next->prev = prev; 1108a8: 89 50 0c mov %edx,0xc(%eax) } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 1108ab: ff 4b 38 decl 0x38(%ebx) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 1108ae: 89 f8 mov %edi,%eax 1108b0: 83 c8 01 or $0x1,%eax 1108b3: 89 41 04 mov %eax,0x4(%ecx) next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 1108b6: 89 3c 39 mov %edi,(%ecx,%edi,1) 1108b9: eb 2a jmp 1108e5 <_Heap_Free+0xe1> 1108bb: 90 nop <== NOT EXECUTED 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 */ 1108bc: 80 7d eb 00 cmpb $0x0,-0x15(%ebp) 1108c0: 74 3a je 1108fc <_Heap_Free+0xf8> uintptr_t const size = block_size + next_block_size; 1108c2: 8b 7d e4 mov -0x1c(%ebp),%edi 1108c5: 03 7d ec add -0x14(%ebp),%edi --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 1108c8: 8b 42 08 mov 0x8(%edx),%eax 1108cb: 8b 52 0c mov 0xc(%edx),%edx ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 1108ce: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = prev; 1108d1: 89 51 0c mov %edx,0xc(%ecx) next->prev = new_block; 1108d4: 89 48 0c mov %ecx,0xc(%eax) prev->next = new_block; 1108d7: 89 4a 08 mov %ecx,0x8(%edx) next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 1108da: 89 f8 mov %edi,%eax 1108dc: 83 c8 01 or $0x1,%eax 1108df: 89 41 04 mov %eax,0x4(%ecx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 1108e2: 89 3c 39 mov %edi,(%ecx,%edi,1) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 1108e5: ff 4b 40 decl 0x40(%ebx) ++stats->frees; 1108e8: ff 43 50 incl 0x50(%ebx) stats->free_size += block_size; 1108eb: 8b 55 ec mov -0x14(%ebp),%edx 1108ee: 01 53 30 add %edx,0x30(%ebx) return( true ); 1108f1: b0 01 mov $0x1,%al } 1108f3: 83 c4 10 add $0x10,%esp 1108f6: 5b pop %ebx 1108f7: 5e pop %esi 1108f8: 5f pop %edi 1108f9: c9 leave 1108fa: c3 ret 1108fb: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 1108fc: 8b 43 08 mov 0x8(%ebx),%eax new_block->next = next; 1108ff: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = block_before; 110902: 89 59 0c mov %ebx,0xc(%ecx) block_before->next = new_block; 110905: 89 4b 08 mov %ecx,0x8(%ebx) next->prev = new_block; 110908: 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; 11090b: 8b 45 ec mov -0x14(%ebp),%eax 11090e: 83 c8 01 or $0x1,%eax 110911: 89 41 04 mov %eax,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 110914: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = block_size; 110918: 8b 45 ec mov -0x14(%ebp),%eax 11091b: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->free_blocks; 11091d: 8b 43 38 mov 0x38(%ebx),%eax 110920: 40 inc %eax 110921: 89 43 38 mov %eax,0x38(%ebx) if ( stats->max_free_blocks < stats->free_blocks ) { 110924: 3b 43 3c cmp 0x3c(%ebx),%eax 110927: 76 bc jbe 1108e5 <_Heap_Free+0xe1> stats->max_free_blocks = stats->free_blocks; 110929: 89 43 3c mov %eax,0x3c(%ebx) 11092c: eb b7 jmp 1108e5 <_Heap_Free+0xe1> 11092e: 66 90 xchg %ax,%ax <== NOT EXECUTED return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 110930: c6 45 eb 00 movb $0x0,-0x15(%ebp) 110934: e9 38 ff ff ff jmp 110871 <_Heap_Free+0x6d> 110939: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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; 11093c: 8b 45 ec mov -0x14(%ebp),%eax 11093f: 03 45 f0 add -0x10(%ebp),%eax prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 110942: 89 c6 mov %eax,%esi 110944: 83 ce 01 or $0x1,%esi 110947: 89 71 04 mov %esi,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 11094a: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 11094e: 89 02 mov %eax,(%edx) 110950: eb 93 jmp 1108e5 <_Heap_Free+0xe1> =============================================================================== 0010c598 <_Heap_Get_first_and_last_block>: uintptr_t page_size, uintptr_t min_block_size, Heap_Block **first_block_ptr, Heap_Block **last_block_ptr ) { 10c598: 55 push %ebp 10c599: 89 e5 mov %esp,%ebp 10c59b: 57 push %edi 10c59c: 56 push %esi 10c59d: 53 push %ebx 10c59e: 8b 5d 08 mov 0x8(%ebp),%ebx 10c5a1: 8b 7d 0c mov 0xc(%ebp),%edi uintptr_t const heap_area_end = heap_area_begin + heap_area_size; 10c5a4: 8d 34 1f lea (%edi,%ebx,1),%esi uintptr_t const alloc_area_begin = _Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); 10c5a7: 8d 4b 08 lea 0x8(%ebx),%ecx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10c5aa: 89 c8 mov %ecx,%eax 10c5ac: 31 d2 xor %edx,%edx 10c5ae: f7 75 10 divl 0x10(%ebp) if ( remainder != 0 ) { 10c5b1: 85 d2 test %edx,%edx 10c5b3: 74 05 je 10c5ba <_Heap_Get_first_and_last_block+0x22> return value - remainder + alignment; 10c5b5: 03 4d 10 add 0x10(%ebp),%ecx 10c5b8: 29 d1 sub %edx,%ecx _Heap_Align_down( heap_area_size - overhead, page_size ); Heap_Block *const first_block = (Heap_Block *) first_block_begin; Heap_Block *const last_block = _Heap_Block_at( first_block, first_block_size ); if ( 10c5ba: 39 f3 cmp %esi,%ebx 10c5bc: 77 2e ja 10c5ec <_Heap_Get_first_and_last_block+0x54> uintptr_t const alloc_area_begin = _Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); 10c5be: 8d 71 f8 lea -0x8(%ecx),%esi uintptr_t const heap_area_end = heap_area_begin + heap_area_size; uintptr_t const alloc_area_begin = _Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const overhead = 10c5c1: 29 d9 sub %ebx,%ecx Heap_Block *const last_block = _Heap_Block_at( first_block, first_block_size ); if ( heap_area_end < heap_area_begin || heap_area_size <= overhead 10c5c3: 39 cf cmp %ecx,%edi 10c5c5: 76 25 jbe 10c5ec <_Heap_Get_first_and_last_block+0x54> uintptr_t const first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); uintptr_t const first_block_size = _Heap_Align_down( heap_area_size - overhead, page_size ); 10c5c7: 29 cf sub %ecx,%edi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10c5c9: 89 f8 mov %edi,%eax 10c5cb: 31 d2 xor %edx,%edx 10c5cd: f7 75 10 divl 0x10(%ebp) 10c5d0: 29 d7 sub %edx,%edi _Heap_Block_at( first_block, first_block_size ); if ( heap_area_end < heap_area_begin || heap_area_size <= overhead || first_block_size < min_block_size 10c5d2: 39 7d 14 cmp %edi,0x14(%ebp) 10c5d5: 77 15 ja 10c5ec <_Heap_Get_first_and_last_block+0x54> ) { /* Invalid area or area too small */ return false; } *first_block_ptr = first_block; 10c5d7: 8b 45 18 mov 0x18(%ebp),%eax 10c5da: 89 30 mov %esi,(%eax) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c5dc: 01 f7 add %esi,%edi 10c5de: 8b 45 1c mov 0x1c(%ebp),%eax 10c5e1: 89 38 mov %edi,(%eax) *last_block_ptr = last_block; return true; 10c5e3: b0 01 mov $0x1,%al } 10c5e5: 5b pop %ebx 10c5e6: 5e pop %esi 10c5e7: 5f pop %edi 10c5e8: c9 leave 10c5e9: c3 ret 10c5ea: 66 90 xchg %ax,%ax <== NOT EXECUTED heap_area_end < heap_area_begin || heap_area_size <= overhead || first_block_size < min_block_size ) { /* Invalid area or area too small */ return false; 10c5ec: 31 c0 xor %eax,%eax *first_block_ptr = first_block; *last_block_ptr = last_block; return true; } 10c5ee: 5b pop %ebx 10c5ef: 5e pop %esi 10c5f0: 5f pop %edi 10c5f1: c9 leave 10c5f2: c3 ret =============================================================================== 001144cc <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 1144cc: 55 push %ebp 1144cd: 89 e5 mov %esp,%ebp 1144cf: 57 push %edi 1144d0: 56 push %esi 1144d1: 53 push %ebx 1144d2: 8b 7d 0c mov 0xc(%ebp),%edi Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 1144d5: c7 07 00 00 00 00 movl $0x0,(%edi) info->largest = 0; 1144db: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) info->total = 0; 1144e2: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 1144e9: 8b 45 08 mov 0x8(%ebp),%eax 1144ec: 8b 50 08 mov 0x8(%eax),%edx info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 1144ef: 39 d0 cmp %edx,%eax 1144f1: 74 31 je 114524 <_Heap_Get_free_information+0x58> 1144f3: bb 01 00 00 00 mov $0x1,%ebx 1144f8: 31 f6 xor %esi,%esi 1144fa: 31 c9 xor %ecx,%ecx 1144fc: eb 07 jmp 114505 <_Heap_Get_free_information+0x39> 1144fe: 66 90 xchg %ax,%ax <== NOT EXECUTED 114500: 8b 77 04 mov 0x4(%edi),%esi 114503: 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; 114505: 8b 42 04 mov 0x4(%edx),%eax 114508: 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; 11450b: 01 c1 add %eax,%ecx if ( info->largest < the_size ) 11450d: 39 f0 cmp %esi,%eax 11450f: 76 03 jbe 114514 <_Heap_Get_free_information+0x48> info->largest = the_size; 114511: 89 47 04 mov %eax,0x4(%edi) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 114514: 8b 52 08 mov 0x8(%edx),%edx 114517: 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); 11451a: 39 55 08 cmp %edx,0x8(%ebp) 11451d: 75 e1 jne 114500 <_Heap_Get_free_information+0x34> 11451f: 89 1f mov %ebx,(%edi) 114521: 89 4f 08 mov %ecx,0x8(%edi) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 114524: 5b pop %ebx 114525: 5e pop %esi 114526: 5f pop %edi 114527: c9 leave 114528: c3 ret =============================================================================== 0011137c <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 11137c: 55 push %ebp 11137d: 89 e5 mov %esp,%ebp 11137f: 57 push %edi 111380: 56 push %esi 111381: 53 push %ebx 111382: 8b 45 08 mov 0x8(%ebp),%eax 111385: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Block *the_block = the_heap->first_block; 111388: 8b 50 20 mov 0x20(%eax),%edx Heap_Block *const end = the_heap->last_block; 11138b: 8b 70 24 mov 0x24(%eax),%esi memset(the_info, 0, sizeof(*the_info)); 11138e: b9 18 00 00 00 mov $0x18,%ecx 111393: 31 c0 xor %eax,%eax 111395: 89 df mov %ebx,%edi 111397: f3 aa rep stos %al,%es:(%edi) while ( the_block != end ) { 111399: 39 f2 cmp %esi,%edx 11139b: 74 33 je 1113d0 <_Heap_Get_information+0x54><== NEVER TAKEN 11139d: 8b 7a 04 mov 0x4(%edx),%edi 1113a0: eb 16 jmp 1113b8 <_Heap_Get_information+0x3c> 1113a2: 66 90 xchg %ax,%ax <== NOT EXECUTED 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; 1113a4: 8d 43 0c lea 0xc(%ebx),%eax else info = &the_info->Free; info->number++; 1113a7: ff 00 incl (%eax) info->total += the_size; 1113a9: 01 48 08 add %ecx,0x8(%eax) if ( info->largest < the_size ) 1113ac: 39 48 04 cmp %ecx,0x4(%eax) 1113af: 73 03 jae 1113b4 <_Heap_Get_information+0x38> info->largest = the_size; 1113b1: 89 48 04 mov %ecx,0x4(%eax) Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; memset(the_info, 0, sizeof(*the_info)); while ( the_block != end ) { 1113b4: 39 d6 cmp %edx,%esi 1113b6: 74 18 je 1113d0 <_Heap_Get_information+0x54> - 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; 1113b8: 89 f9 mov %edi,%ecx 1113ba: 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); 1113bd: 01 ca add %ecx,%edx if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 1113bf: 8b 7a 04 mov 0x4(%edx),%edi while ( the_block != end ) { uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) 1113c2: f7 c7 01 00 00 00 test $0x1,%edi 1113c8: 75 da jne 1113a4 <_Heap_Get_information+0x28> info = &the_info->Used; else info = &the_info->Free; 1113ca: 89 d8 mov %ebx,%eax 1113cc: eb d9 jmp 1113a7 <_Heap_Get_information+0x2b> 1113ce: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 1113d0: 5b pop %ebx 1113d1: 5e pop %esi 1113d2: 5f pop %edi 1113d3: c9 leave 1113d4: c3 ret =============================================================================== 0010c5f4 <_Heap_Initialize>: Heap_Control *heap, void *heap_area_begin_ptr, uintptr_t heap_area_size, uintptr_t page_size ) { 10c5f4: 55 push %ebp 10c5f5: 89 e5 mov %esp,%ebp 10c5f7: 57 push %edi 10c5f8: 56 push %esi 10c5f9: 53 push %ebx 10c5fa: 83 ec 18 sub $0x18,%esp 10c5fd: 8b 5d 08 mov 0x8(%ebp),%ebx 10c600: 8b 7d 10 mov 0x10(%ebp),%edi 10c603: 8b 75 14 mov 0x14(%ebp),%esi uintptr_t first_block_begin = 0; uintptr_t first_block_size = 0; uintptr_t last_block_begin = 0; uintptr_t min_block_size = 0; bool area_ok = false; Heap_Block *first_block = NULL; 10c606: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) Heap_Block *last_block = NULL; 10c60d: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) if ( page_size == 0 ) { 10c614: 85 f6 test %esi,%esi 10c616: 74 2c je 10c644 <_Heap_Initialize+0x50> uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { 10c618: 89 f0 mov %esi,%eax 10c61a: 83 e0 03 and $0x3,%eax 10c61d: 74 05 je 10c624 <_Heap_Initialize+0x30> return value - remainder + alignment; 10c61f: 83 c6 04 add $0x4,%esi 10c622: 29 c6 sub %eax,%esi page_size = CPU_ALIGNMENT; } else { page_size = _Heap_Align_up( page_size, CPU_ALIGNMENT ); if ( page_size < CPU_ALIGNMENT ) { 10c624: 83 fe 03 cmp $0x3,%esi 10c627: 76 45 jbe 10c66e <_Heap_Initialize+0x7a> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10c629: b8 10 00 00 00 mov $0x10,%eax 10c62e: 31 d2 xor %edx,%edx 10c630: f7 f6 div %esi 10c632: 89 d1 mov %edx,%ecx if ( remainder != 0 ) { 10c634: 85 d2 test %edx,%edx 10c636: 0f 84 bf 00 00 00 je 10c6fb <_Heap_Initialize+0x107> return value - remainder + alignment; 10c63c: 8d 56 10 lea 0x10(%esi),%edx 10c63f: 29 ca sub %ecx,%edx 10c641: eb 0b jmp 10c64e <_Heap_Initialize+0x5a> 10c643: 90 nop <== NOT EXECUTED bool area_ok = false; Heap_Block *first_block = NULL; Heap_Block *last_block = NULL; if ( page_size == 0 ) { page_size = CPU_ALIGNMENT; 10c644: be 04 00 00 00 mov $0x4,%esi } else { return value; 10c649: ba 10 00 00 00 mov $0x10,%edx return 0; } } min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); area_ok = _Heap_Get_first_and_last_block( 10c64e: 8d 45 ec lea -0x14(%ebp),%eax 10c651: 50 push %eax 10c652: 8d 45 f0 lea -0x10(%ebp),%eax 10c655: 50 push %eax 10c656: 52 push %edx 10c657: 56 push %esi 10c658: 57 push %edi 10c659: ff 75 0c pushl 0xc(%ebp) 10c65c: 89 55 dc mov %edx,-0x24(%ebp) 10c65f: e8 34 ff ff ff call 10c598 <_Heap_Get_first_and_last_block> page_size, min_block_size, &first_block, &last_block ); if ( !area_ok ) { 10c664: 83 c4 18 add $0x18,%esp 10c667: 84 c0 test %al,%al 10c669: 8b 55 dc mov -0x24(%ebp),%edx 10c66c: 75 0a jne 10c678 <_Heap_Initialize+0x84> return 0; 10c66e: 31 c0 xor %eax,%eax _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return first_block_size; } 10c670: 8d 65 f4 lea -0xc(%ebp),%esp 10c673: 5b pop %ebx 10c674: 5e pop %esi 10c675: 5f pop %edi 10c676: c9 leave 10c677: c3 ret uintptr_t page_size ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr; uintptr_t const heap_area_end = heap_area_begin + heap_area_size; 10c678: 03 7d 0c add 0xc(%ebp),%edi 10c67b: 89 7d e0 mov %edi,-0x20(%ebp) ); if ( !area_ok ) { return 0; } memset(heap, 0, sizeof(*heap)); 10c67e: b9 58 00 00 00 mov $0x58,%ecx 10c683: 31 c0 xor %eax,%eax 10c685: 89 df mov %ebx,%edi 10c687: f3 aa rep stos %al,%es:(%edi) heap->Protection.block_initialize = _Heap_Protection_block_initialize_default; heap->Protection.block_check = _Heap_Protection_block_check_default; heap->Protection.block_error = _Heap_Protection_block_error_default; #endif first_block_begin = (uintptr_t) first_block; 10c689: 8b 4d f0 mov -0x10(%ebp),%ecx last_block_begin = (uintptr_t) last_block; first_block_size = last_block_begin - first_block_begin; 10c68c: 8b 45 ec mov -0x14(%ebp),%eax 10c68f: 29 c8 sub %ecx,%eax /* First block */ first_block->prev_size = heap_area_end; 10c691: 8b 7d e0 mov -0x20(%ebp),%edi 10c694: 89 39 mov %edi,(%ecx) first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 10c696: 89 c7 mov %eax,%edi 10c698: 83 cf 01 or $0x1,%edi 10c69b: 89 79 04 mov %edi,0x4(%ecx) first_block->next = _Heap_Free_list_tail( heap ); 10c69e: 89 59 08 mov %ebx,0x8(%ecx) first_block->prev = _Heap_Free_list_head( heap ); 10c6a1: 89 59 0c mov %ebx,0xc(%ecx) _Heap_Protection_block_initialize( heap, first_block ); /* Heap control */ heap->page_size = page_size; 10c6a4: 89 73 10 mov %esi,0x10(%ebx) heap->min_block_size = min_block_size; 10c6a7: 89 53 14 mov %edx,0x14(%ebx) heap->area_begin = heap_area_begin; 10c6aa: 8b 55 0c mov 0xc(%ebp),%edx 10c6ad: 89 53 18 mov %edx,0x18(%ebx) heap->area_end = heap_area_end; 10c6b0: 8b 7d e0 mov -0x20(%ebp),%edi 10c6b3: 89 7b 1c mov %edi,0x1c(%ebx) heap->first_block = first_block; 10c6b6: 89 4b 20 mov %ecx,0x20(%ebx) heap->last_block = last_block; 10c6b9: 8b 55 ec mov -0x14(%ebp),%edx 10c6bc: 89 53 24 mov %edx,0x24(%ebx) _Heap_Free_list_head( heap )->next = first_block; 10c6bf: 89 4b 08 mov %ecx,0x8(%ebx) _Heap_Free_list_tail( heap )->prev = first_block; 10c6c2: 89 4b 0c mov %ecx,0xc(%ebx) /* Last block */ last_block->prev_size = first_block_size; 10c6c5: 89 02 mov %eax,(%edx) * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( 10c6c7: 29 d1 sub %edx,%ecx 10c6c9: 89 4a 04 mov %ecx,0x4(%edx) last_block->size_and_flag = 0; _Heap_Set_last_block_size( heap ); _Heap_Protection_block_initialize( heap, last_block ); /* Statistics */ stats->size = first_block_size; 10c6cc: 89 43 2c mov %eax,0x2c(%ebx) stats->free_size = first_block_size; 10c6cf: 89 43 30 mov %eax,0x30(%ebx) stats->min_free_size = first_block_size; 10c6d2: 89 43 34 mov %eax,0x34(%ebx) stats->free_blocks = 1; 10c6d5: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) stats->max_free_blocks = 1; 10c6dc: c7 43 3c 01 00 00 00 movl $0x1,0x3c(%ebx) stats->instance = instance++; 10c6e3: 8b 15 a0 50 12 00 mov 0x1250a0,%edx 10c6e9: 89 53 28 mov %edx,0x28(%ebx) 10c6ec: 42 inc %edx 10c6ed: 89 15 a0 50 12 00 mov %edx,0x1250a0 _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return first_block_size; } 10c6f3: 8d 65 f4 lea -0xc(%ebp),%esp 10c6f6: 5b pop %ebx 10c6f7: 5e pop %esi 10c6f8: 5f pop %edi 10c6f9: c9 leave 10c6fa: c3 ret uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; } else { return value; 10c6fb: ba 10 00 00 00 mov $0x10,%edx 10c700: e9 49 ff ff ff jmp 10c64e <_Heap_Initialize+0x5a> =============================================================================== 0011dc94 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 11dc94: 55 push %ebp 11dc95: 89 e5 mov %esp,%ebp 11dc97: 57 push %edi 11dc98: 56 push %esi 11dc99: 53 push %ebx 11dc9a: 83 ec 2c sub $0x2c,%esp 11dc9d: 8b 5d 08 mov 0x8(%ebp),%ebx 11dca0: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 11dca3: 8d 4e f8 lea -0x8(%esi),%ecx 11dca6: 89 f0 mov %esi,%eax 11dca8: 31 d2 xor %edx,%edx 11dcaa: f7 73 10 divl 0x10(%ebx) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 11dcad: 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; 11dcaf: 8b 45 14 mov 0x14(%ebp),%eax 11dcb2: c7 00 00 00 00 00 movl $0x0,(%eax) *new_size = 0; 11dcb8: 8b 55 18 mov 0x18(%ebp),%edx 11dcbb: c7 02 00 00 00 00 movl $0x0,(%edx) const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 11dcc1: 39 4b 20 cmp %ecx,0x20(%ebx) 11dcc4: 77 05 ja 11dccb <_Heap_Resize_block+0x37> 11dcc6: 39 4b 24 cmp %ecx,0x24(%ebx) 11dcc9: 73 0d jae 11dcd8 <_Heap_Resize_block+0x44> new_alloc_size, old_size, new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; 11dccb: b8 02 00 00 00 mov $0x2,%eax } } 11dcd0: 8d 65 f4 lea -0xc(%ebp),%esp 11dcd3: 5b pop %ebx 11dcd4: 5e pop %esi 11dcd5: 5f pop %edi 11dcd6: c9 leave 11dcd7: c3 ret - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 11dcd8: 8b 41 04 mov 0x4(%ecx),%eax 11dcdb: 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; 11dcde: 8d 3c 01 lea (%ecx,%eax,1),%edi 11dce1: 89 7d d4 mov %edi,-0x2c(%ebp) uintptr_t alloc_size = block_end - alloc_begin + HEAP_ALLOC_BONUS; 11dce4: 89 fa mov %edi,%edx 11dce6: 29 f2 sub %esi,%edx 11dce8: 83 c2 04 add $0x4,%edx 11dceb: 89 55 e0 mov %edx,-0x20(%ebp) 11dcee: 8b 57 04 mov 0x4(%edi),%edx 11dcf1: 83 e2 fe and $0xfffffffe,%edx 11dcf4: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 11dcf7: f6 44 17 04 01 testb $0x1,0x4(%edi,%edx,1) 11dcfc: 0f 94 45 df sete -0x21(%ebp) bool next_block_is_free = _Heap_Is_free( next_block );; _HAssert( _Heap_Is_block_in_heap( heap, next_block ) ); _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; 11dd00: 8b 55 e0 mov -0x20(%ebp),%edx 11dd03: 8b 7d 14 mov 0x14(%ebp),%edi 11dd06: 89 17 mov %edx,(%edi) if ( next_block_is_free ) { 11dd08: 80 7d df 00 cmpb $0x0,-0x21(%ebp) 11dd0c: 75 6e jne 11dd7c <_Heap_Resize_block+0xe8> block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { 11dd0e: 8b 55 e0 mov -0x20(%ebp),%edx 11dd11: 39 55 10 cmp %edx,0x10(%ebp) 11dd14: 77 79 ja 11dd8f <_Heap_Resize_block+0xfb> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 11dd16: 80 7d df 00 cmpb $0x0,-0x21(%ebp) 11dd1a: 74 31 je 11dd4d <_Heap_Resize_block+0xb9> RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 11dd1c: 8b 79 04 mov 0x4(%ecx),%edi 11dd1f: 83 e7 01 and $0x1,%edi block->size_and_flag = size | flag; 11dd22: 09 c7 or %eax,%edi 11dd24: 89 79 04 mov %edi,0x4(%ecx) new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11dd27: 8b 7d d4 mov -0x2c(%ebp),%edi 11dd2a: 8b 7f 08 mov 0x8(%edi),%edi 11dd2d: 89 7d e4 mov %edi,-0x1c(%ebp) 11dd30: 8b 55 d4 mov -0x2c(%ebp),%edx 11dd33: 8b 7a 0c mov 0xc(%edx),%edi RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 11dd36: 8b 55 e4 mov -0x1c(%ebp),%edx 11dd39: 89 57 08 mov %edx,0x8(%edi) next->prev = prev; 11dd3c: 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; 11dd3f: 83 4c 01 04 01 orl $0x1,0x4(%ecx,%eax,1) /* Statistics */ --stats->free_blocks; 11dd44: ff 4b 38 decl 0x38(%ebx) stats->free_size -= next_block_size; 11dd47: 8b 7d d0 mov -0x30(%ebp),%edi 11dd4a: 29 7b 30 sub %edi,0x30(%ebx) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 11dd4d: ff 75 10 pushl 0x10(%ebp) 11dd50: 56 push %esi 11dd51: 51 push %ecx 11dd52: 53 push %ebx 11dd53: e8 b0 e9 fe ff call 10c708 <_Heap_Block_allocate> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 11dd58: 8b 50 04 mov 0x4(%eax),%edx 11dd5b: 83 e2 fe and $0xfffffffe,%edx block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_ALLOC_BONUS; 11dd5e: 29 f0 sub %esi,%eax 11dd60: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 11dd64: 8b 55 18 mov 0x18(%ebp),%edx 11dd67: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->resizes; 11dd69: ff 43 54 incl 0x54(%ebx) 11dd6c: 83 c4 10 add $0x10,%esp return HEAP_RESIZE_SUCCESSFUL; 11dd6f: 31 c0 xor %eax,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11dd71: 8d 65 f4 lea -0xc(%ebp),%esp 11dd74: 5b pop %ebx 11dd75: 5e pop %esi 11dd76: 5f pop %edi 11dd77: c9 leave 11dd78: c3 ret 11dd79: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; if ( next_block_is_free ) { block_size += next_block_size; 11dd7c: 03 45 d0 add -0x30(%ebp),%eax alloc_size += next_block_size; 11dd7f: 8b 7d d0 mov -0x30(%ebp),%edi 11dd82: 01 fa add %edi,%edx 11dd84: 89 55 e0 mov %edx,-0x20(%ebp) } if ( new_alloc_size > alloc_size ) { 11dd87: 8b 55 e0 mov -0x20(%ebp),%edx 11dd8a: 39 55 10 cmp %edx,0x10(%ebp) 11dd8d: 76 87 jbe 11dd16 <_Heap_Resize_block+0x82> return HEAP_RESIZE_UNSATISFIED; 11dd8f: b8 01 00 00 00 mov $0x1,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11dd94: 8d 65 f4 lea -0xc(%ebp),%esp 11dd97: 5b pop %ebx 11dd98: 5e pop %esi 11dd99: 5f pop %edi 11dd9a: c9 leave 11dd9b: c3 ret =============================================================================== 0011dd9c <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11dd9c: 55 push %ebp 11dd9d: 89 e5 mov %esp,%ebp 11dd9f: 56 push %esi 11dda0: 53 push %ebx 11dda1: 8b 5d 08 mov 0x8(%ebp),%ebx 11dda4: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 11dda7: 8d 4e f8 lea -0x8(%esi),%ecx 11ddaa: 89 f0 mov %esi,%eax 11ddac: 31 d2 xor %edx,%edx 11ddae: f7 73 10 divl 0x10(%ebx) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 11ddb1: 29 d1 sub %edx,%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11ddb3: 8b 43 20 mov 0x20(%ebx),%eax && (uintptr_t) block <= (uintptr_t) heap->last_block; 11ddb6: 39 c1 cmp %eax,%ecx 11ddb8: 72 07 jb 11ddc1 <_Heap_Size_of_alloc_area+0x25> 11ddba: 8b 53 24 mov 0x24(%ebx),%edx 11ddbd: 39 d1 cmp %edx,%ecx 11ddbf: 76 07 jbe 11ddc8 <_Heap_Size_of_alloc_area+0x2c><== ALWAYS TAKEN if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; 11ddc1: 31 c0 xor %eax,%eax } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; } 11ddc3: 5b pop %ebx 11ddc4: 5e pop %esi 11ddc5: c9 leave 11ddc6: c3 ret 11ddc7: 90 nop <== NOT EXECUTED - 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; 11ddc8: 8b 59 04 mov 0x4(%ecx),%ebx 11ddcb: 83 e3 fe and $0xfffffffe,%ebx RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11ddce: 01 d9 add %ebx,%ecx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 11ddd0: 39 c8 cmp %ecx,%eax 11ddd2: 77 ed ja 11ddc1 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN 11ddd4: 39 ca cmp %ecx,%edx 11ddd6: 72 e9 jb 11ddc1 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 11ddd8: f6 41 04 01 testb $0x1,0x4(%ecx) 11dddc: 74 e3 je 11ddc1 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 11ddde: 29 f1 sub %esi,%ecx 11dde0: 8d 51 04 lea 0x4(%ecx),%edx 11dde3: 8b 45 10 mov 0x10(%ebp),%eax 11dde6: 89 10 mov %edx,(%eax) return true; 11dde8: b0 01 mov $0x1,%al } 11ddea: 5b pop %ebx 11ddeb: 5e pop %esi 11ddec: c9 leave 11dded: c3 ret =============================================================================== 0010d22c <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10d22c: 55 push %ebp 10d22d: 89 e5 mov %esp,%ebp 10d22f: 57 push %edi 10d230: 56 push %esi 10d231: 53 push %ebx 10d232: 83 ec 4c sub $0x4c,%esp 10d235: 8b 5d 08 mov 0x8(%ebp),%ebx uintptr_t const page_size = heap->page_size; 10d238: 8b 43 10 mov 0x10(%ebx),%eax 10d23b: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10d23e: 8b 53 14 mov 0x14(%ebx),%edx 10d241: 89 55 d0 mov %edx,-0x30(%ebp) Heap_Block *const first_block = heap->first_block; 10d244: 8b 43 20 mov 0x20(%ebx),%eax 10d247: 89 45 dc mov %eax,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10d24a: 8b 53 24 mov 0x24(%ebx),%edx 10d24d: 89 55 cc mov %edx,-0x34(%ebp) Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d250: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10d254: 74 1a je 10d270 <_Heap_Walk+0x44> 10d256: c7 45 d8 e4 d1 10 00 movl $0x10d1e4,-0x28(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d25d: 83 3d a0 88 12 00 03 cmpl $0x3,0x1288a0 10d264: 74 1a je 10d280 <_Heap_Walk+0x54> <== ALWAYS TAKEN } block = next_block; } while ( block != first_block ); return true; 10d266: b0 01 mov $0x1,%al } 10d268: 8d 65 f4 lea -0xc(%ebp),%esp 10d26b: 5b pop %ebx 10d26c: 5e pop %esi 10d26d: 5f pop %edi 10d26e: c9 leave 10d26f: c3 ret uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d270: c7 45 d8 dc d1 10 00 movl $0x10d1dc,-0x28(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d277: 83 3d a0 88 12 00 03 cmpl $0x3,0x1288a0 10d27e: 75 e6 jne 10d266 <_Heap_Walk+0x3a> Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 10d280: 52 push %edx 10d281: ff 73 0c pushl 0xc(%ebx) 10d284: ff 73 08 pushl 0x8(%ebx) 10d287: ff 75 cc pushl -0x34(%ebp) 10d28a: ff 75 dc pushl -0x24(%ebp) 10d28d: ff 73 1c pushl 0x1c(%ebx) 10d290: ff 73 18 pushl 0x18(%ebx) 10d293: ff 75 d0 pushl -0x30(%ebp) 10d296: ff 75 e0 pushl -0x20(%ebp) 10d299: 68 d4 0c 12 00 push $0x120cd4 10d29e: 6a 00 push $0x0 10d2a0: ff 75 0c pushl 0xc(%ebp) 10d2a3: ff 55 d8 call *-0x28(%ebp) heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 10d2a6: 83 c4 30 add $0x30,%esp 10d2a9: 8b 45 e0 mov -0x20(%ebp),%eax 10d2ac: 85 c0 test %eax,%eax 10d2ae: 74 70 je 10d320 <_Heap_Walk+0xf4> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10d2b0: f6 45 e0 03 testb $0x3,-0x20(%ebp) 10d2b4: 75 72 jne 10d328 <_Heap_Walk+0xfc> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d2b6: 8b 45 d0 mov -0x30(%ebp),%eax 10d2b9: 31 d2 xor %edx,%edx 10d2bb: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10d2be: 85 d2 test %edx,%edx 10d2c0: 75 72 jne 10d334 <_Heap_Walk+0x108> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10d2c2: 8b 45 dc mov -0x24(%ebp),%eax 10d2c5: 83 c0 08 add $0x8,%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d2c8: 31 d2 xor %edx,%edx 10d2ca: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( 10d2cd: 85 d2 test %edx,%edx 10d2cf: 75 6f jne 10d340 <_Heap_Walk+0x114> block = next_block; } while ( block != first_block ); return true; } 10d2d1: 8b 45 dc mov -0x24(%ebp),%eax 10d2d4: 8b 40 04 mov 0x4(%eax),%eax 10d2d7: 89 45 e4 mov %eax,-0x1c(%ebp) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10d2da: a8 01 test $0x1,%al 10d2dc: 0f 84 8e 00 00 00 je 10d370 <_Heap_Walk+0x144> - 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; 10d2e2: 8b 55 cc mov -0x34(%ebp),%edx 10d2e5: 8b 42 04 mov 0x4(%edx),%eax 10d2e8: 83 e0 fe and $0xfffffffe,%eax RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10d2eb: 01 d0 add %edx,%eax ); return false; } if ( _Heap_Is_free( last_block ) ) { 10d2ed: f6 40 04 01 testb $0x1,0x4(%eax) 10d2f1: 74 25 je 10d318 <_Heap_Walk+0xec> ); return false; } if ( 10d2f3: 39 45 dc cmp %eax,-0x24(%ebp) 10d2f6: 74 54 je 10d34c <_Heap_Walk+0x120> <== ALWAYS TAKEN _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 10d2f8: 51 push %ecx <== NOT EXECUTED 10d2f9: 68 f0 0d 12 00 push $0x120df0 <== NOT EXECUTED 10d2fe: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10d300: 6a 01 push $0x1 10d302: ff 75 0c pushl 0xc(%ebp) 10d305: ff 55 d8 call *-0x28(%ebp) 10d308: 83 c4 10 add $0x10,%esp return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 10d30b: 31 c0 xor %eax,%eax block = next_block; } while ( block != first_block ); return true; } 10d30d: 8d 65 f4 lea -0xc(%ebp),%esp 10d310: 5b pop %ebx 10d311: 5e pop %esi 10d312: 5f pop %edi 10d313: c9 leave 10d314: c3 ret 10d315: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 10d318: 53 push %ebx 10d319: 68 8a 0c 12 00 push $0x120c8a 10d31e: eb e0 jmp 10d300 <_Heap_Walk+0xd4> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 10d320: 57 push %edi 10d321: 68 59 0c 12 00 push $0x120c59 10d326: eb d8 jmp 10d300 <_Heap_Walk+0xd4> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 10d328: ff 75 e0 pushl -0x20(%ebp) 10d32b: 68 6c 0c 12 00 push $0x120c6c 10d330: eb ce jmp 10d300 <_Heap_Walk+0xd4> 10d332: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 10d334: ff 75 d0 pushl -0x30(%ebp) 10d337: 68 68 0d 12 00 push $0x120d68 10d33c: eb c2 jmp 10d300 <_Heap_Walk+0xd4> 10d33e: 66 90 xchg %ax,%ax <== NOT EXECUTED } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10d340: ff 75 dc pushl -0x24(%ebp) 10d343: 68 8c 0d 12 00 push $0x120d8c 10d348: eb b6 jmp 10d300 <_Heap_Walk+0xd4> 10d34a: 66 90 xchg %ax,%ax <== NOT EXECUTED int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10d34c: 8b 43 10 mov 0x10(%ebx),%eax 10d34f: 89 45 c8 mov %eax,-0x38(%ebp) block = next_block; } while ( block != first_block ); return true; } 10d352: 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 ) { 10d355: 39 cb cmp %ecx,%ebx 10d357: 0f 84 a8 00 00 00 je 10d405 <_Heap_Walk+0x1d9> block = next_block; } while ( block != first_block ); return true; } 10d35d: 8b 43 20 mov 0x20(%ebx),%eax 10d360: 89 45 d4 mov %eax,-0x2c(%ebp) const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 10d363: 39 c8 cmp %ecx,%eax 10d365: 76 11 jbe 10d378 <_Heap_Walk+0x14c> <== ALWAYS TAKEN 10d367: 90 nop <== NOT EXECUTED const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 10d368: 51 push %ecx 10d369: 68 20 0e 12 00 push $0x120e20 10d36e: eb 90 jmp 10d300 <_Heap_Walk+0xd4> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 10d370: 56 push %esi 10d371: 68 c0 0d 12 00 push $0x120dc0 10d376: eb 88 jmp 10d300 <_Heap_Walk+0xd4> 10d378: 8b 7b 24 mov 0x24(%ebx),%edi 10d37b: 39 cf cmp %ecx,%edi 10d37d: 72 e9 jb 10d368 <_Heap_Walk+0x13c> <== NEVER TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10d37f: 8d 41 08 lea 0x8(%ecx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d382: 31 d2 xor %edx,%edx 10d384: f7 75 c8 divl -0x38(%ebp) ); return false; } if ( 10d387: 85 d2 test %edx,%edx 10d389: 0f 85 44 02 00 00 jne 10d5d3 <_Heap_Walk+0x3a7> <== 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; 10d38f: 8b 41 04 mov 0x4(%ecx),%eax 10d392: 83 e0 fe and $0xfffffffe,%eax ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d395: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d39a: 0f 85 3e 02 00 00 jne 10d5de <_Heap_Walk+0x3b2> <== NEVER TAKEN 10d3a0: 89 da mov %ebx,%edx 10d3a2: 89 ce mov %ecx,%esi 10d3a4: eb 37 jmp 10d3dd <_Heap_Walk+0x1b1> 10d3a6: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } prev_block = free_block; free_block = free_block->next; 10d3a8: 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 ) { 10d3ab: 39 cb cmp %ecx,%ebx 10d3ad: 74 5c je 10d40b <_Heap_Walk+0x1df> 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; 10d3af: 39 4d d4 cmp %ecx,-0x2c(%ebp) 10d3b2: 77 b4 ja 10d368 <_Heap_Walk+0x13c> 10d3b4: 39 f9 cmp %edi,%ecx 10d3b6: 77 b0 ja 10d368 <_Heap_Walk+0x13c> <== NEVER TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10d3b8: 8d 41 08 lea 0x8(%ecx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d3bb: 31 d2 xor %edx,%edx 10d3bd: f7 75 c8 divl -0x38(%ebp) ); return false; } if ( 10d3c0: 85 d2 test %edx,%edx 10d3c2: 0f 85 0b 02 00 00 jne 10d5d3 <_Heap_Walk+0x3a7> - 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; 10d3c8: 8b 41 04 mov 0x4(%ecx),%eax 10d3cb: 83 e0 fe and $0xfffffffe,%eax ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d3ce: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d3d3: 0f 85 05 02 00 00 jne 10d5de <_Heap_Walk+0x3b2> 10d3d9: 89 f2 mov %esi,%edx 10d3db: 89 ce mov %ecx,%esi ); return false; } if ( free_block->prev != prev_block ) { 10d3dd: 8b 41 0c mov 0xc(%ecx),%eax 10d3e0: 39 d0 cmp %edx,%eax 10d3e2: 74 c4 je 10d3a8 <_Heap_Walk+0x17c> (*printer)( 10d3e4: 83 ec 0c sub $0xc,%esp 10d3e7: 50 push %eax 10d3e8: 51 push %ecx 10d3e9: 68 70 0e 12 00 push $0x120e70 10d3ee: 66 90 xchg %ax,%ax Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 10d3f0: 6a 01 push $0x1 10d3f2: ff 75 0c pushl 0xc(%ebp) 10d3f5: ff 55 d8 call *-0x28(%ebp) "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 10d3f8: 83 c4 20 add $0x20,%esp 10d3fb: 31 c0 xor %eax,%eax block = next_block; } while ( block != first_block ); return true; } 10d3fd: 8d 65 f4 lea -0xc(%ebp),%esp 10d400: 5b pop %ebx 10d401: 5e pop %esi 10d402: 5f pop %edi 10d403: c9 leave 10d404: c3 ret 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 ) { 10d405: 8b 53 20 mov 0x20(%ebx),%edx 10d408: 89 55 d4 mov %edx,-0x2c(%ebp) ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d40b: 8b 7d dc mov -0x24(%ebp),%edi 10d40e: 8b 45 d4 mov -0x2c(%ebp),%eax 10d411: 8d 76 00 lea 0x0(%esi),%esi 10d414: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d417: 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); 10d41a: 8d 34 39 lea (%ecx,%edi,1),%esi const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 10d41d: 39 f0 cmp %esi,%eax 10d41f: 76 0f jbe 10d430 <_Heap_Walk+0x204> <== ALWAYS TAKEN Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 10d421: 83 ec 0c sub $0xc,%esp 10d424: 56 push %esi 10d425: 57 push %edi 10d426: 68 a4 0e 12 00 push $0x120ea4 10d42b: eb c3 jmp 10d3f0 <_Heap_Walk+0x1c4> 10d42d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10d430: 39 73 24 cmp %esi,0x24(%ebx) 10d433: 72 ec jb 10d421 <_Heap_Walk+0x1f5> uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; 10d435: 3b 7d cc cmp -0x34(%ebp),%edi 10d438: 0f 95 45 d4 setne -0x2c(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10d43c: 89 c8 mov %ecx,%eax 10d43e: 31 d2 xor %edx,%edx 10d440: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 10d443: 85 d2 test %edx,%edx 10d445: 74 0a je 10d451 <_Heap_Walk+0x225> 10d447: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10d44b: 0f 85 52 01 00 00 jne 10d5a3 <_Heap_Walk+0x377> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 10d451: 39 4d d0 cmp %ecx,-0x30(%ebp) 10d454: 76 0a jbe 10d460 <_Heap_Walk+0x234> 10d456: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10d45a: 0f 85 52 01 00 00 jne 10d5b2 <_Heap_Walk+0x386> <== ALWAYS TAKEN ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 10d460: 39 f7 cmp %esi,%edi 10d462: 72 0a jb 10d46e <_Heap_Walk+0x242> 10d464: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp) 10d468: 0f 85 56 01 00 00 jne 10d5c4 <_Heap_Walk+0x398> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 10d46e: 8b 55 e4 mov -0x1c(%ebp),%edx 10d471: 83 e2 01 and $0x1,%edx ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10d474: f6 46 04 01 testb $0x1,0x4(%esi) 10d478: 74 4e je 10d4c8 <_Heap_Walk+0x29c> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 10d47a: 85 d2 test %edx,%edx 10d47c: 74 2e je 10d4ac <_Heap_Walk+0x280> (*printer)( 10d47e: 83 ec 0c sub $0xc,%esp 10d481: 51 push %ecx 10d482: 57 push %edi 10d483: 68 bb 0c 12 00 push $0x120cbb 10d488: 6a 00 push $0x0 10d48a: ff 75 0c pushl 0xc(%ebp) 10d48d: ff 55 d8 call *-0x28(%ebp) 10d490: 83 c4 20 add $0x20,%esp block->prev_size ); } block = next_block; } while ( block != first_block ); 10d493: 39 75 dc cmp %esi,-0x24(%ebp) 10d496: 0f 84 ca fd ff ff je 10d266 <_Heap_Walk+0x3a> 10d49c: 8b 56 04 mov 0x4(%esi),%edx 10d49f: 89 55 e4 mov %edx,-0x1c(%ebp) 10d4a2: 8b 43 20 mov 0x20(%ebx),%eax 10d4a5: 89 f7 mov %esi,%edi 10d4a7: e9 68 ff ff ff jmp 10d414 <_Heap_Walk+0x1e8> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10d4ac: 83 ec 08 sub $0x8,%esp 10d4af: ff 37 pushl (%edi) 10d4b1: 51 push %ecx 10d4b2: 57 push %edi 10d4b3: 68 08 10 12 00 push $0x121008 10d4b8: 6a 00 push $0x0 10d4ba: ff 75 0c pushl 0xc(%ebp) 10d4bd: ff 55 d8 call *-0x28(%ebp) 10d4c0: 83 c4 20 add $0x20,%esp 10d4c3: eb ce jmp 10d493 <_Heap_Walk+0x267> 10d4c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED block = next_block; } while ( block != first_block ); return true; } 10d4c8: 8b 43 08 mov 0x8(%ebx),%eax 10d4cb: 89 45 b4 mov %eax,-0x4c(%ebp) block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? 10d4ce: 8b 47 08 mov 0x8(%edi),%eax 10d4d1: 89 45 e4 mov %eax,-0x1c(%ebp) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10d4d4: 39 43 0c cmp %eax,0xc(%ebx) 10d4d7: 0f 84 97 00 00 00 je 10d574 <_Heap_Walk+0x348> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 10d4dd: 39 c3 cmp %eax,%ebx 10d4df: 0f 84 9b 00 00 00 je 10d580 <_Heap_Walk+0x354> 10d4e5: c7 45 c8 49 0b 12 00 movl $0x120b49,-0x38(%ebp) false, "block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n", block, block_size, block->prev, block->prev == first_free_block ? 10d4ec: 8b 47 0c mov 0xc(%edi),%eax 10d4ef: 89 45 d4 mov %eax,-0x2c(%ebp) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10d4f2: 39 45 b4 cmp %eax,-0x4c(%ebp) 10d4f5: 74 75 je 10d56c <_Heap_Walk+0x340> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 10d4f7: 39 c3 cmp %eax,%ebx 10d4f9: 0f 84 8d 00 00 00 je 10d58c <_Heap_Walk+0x360> 10d4ff: b8 49 0b 12 00 mov $0x120b49,%eax Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10d504: 83 ec 0c sub $0xc,%esp 10d507: ff 75 c8 pushl -0x38(%ebp) 10d50a: ff 75 e4 pushl -0x1c(%ebp) 10d50d: 50 push %eax 10d50e: ff 75 d4 pushl -0x2c(%ebp) 10d511: 51 push %ecx 10d512: 57 push %edi 10d513: 68 64 0f 12 00 push $0x120f64 10d518: 6a 00 push $0x0 10d51a: ff 75 0c pushl 0xc(%ebp) 10d51d: 89 55 c4 mov %edx,-0x3c(%ebp) 10d520: 89 4d c0 mov %ecx,-0x40(%ebp) 10d523: ff 55 d8 call *-0x28(%ebp) block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 10d526: 8b 06 mov (%esi),%eax 10d528: 83 c4 30 add $0x30,%esp 10d52b: 8b 4d c0 mov -0x40(%ebp),%ecx 10d52e: 39 c1 cmp %eax,%ecx 10d530: 8b 55 c4 mov -0x3c(%ebp),%edx 10d533: 75 27 jne 10d55c <_Heap_Walk+0x330> ); return false; } if ( !prev_used ) { 10d535: 85 d2 test %edx,%edx 10d537: 74 5f je 10d598 <_Heap_Walk+0x36c> block = next_block; } while ( block != first_block ); return true; } 10d539: 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 ) { 10d53c: 39 c3 cmp %eax,%ebx 10d53e: 74 0f je 10d54f <_Heap_Walk+0x323> <== NEVER TAKEN if ( free_block == block ) { 10d540: 39 c7 cmp %eax,%edi 10d542: 0f 84 4b ff ff ff je 10d493 <_Heap_Walk+0x267> return true; } free_block = free_block->next; 10d548: 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 ) { 10d54b: 39 c3 cmp %eax,%ebx 10d54d: 75 f1 jne 10d540 <_Heap_Walk+0x314> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10d54f: 57 push %edi 10d550: 68 30 10 12 00 push $0x121030 10d555: e9 a6 fd ff ff jmp 10d300 <_Heap_Walk+0xd4> 10d55a: 66 90 xchg %ax,%ax <== NOT EXECUTED " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( 10d55c: 52 push %edx 10d55d: 56 push %esi 10d55e: 50 push %eax 10d55f: 51 push %ecx 10d560: 57 push %edi 10d561: 68 9c 0f 12 00 push $0x120f9c 10d566: e9 85 fe ff ff jmp 10d3f0 <_Heap_Walk+0x1c4> 10d56b: 90 nop <== NOT EXECUTED 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)( 10d56c: b8 3f 0c 12 00 mov $0x120c3f,%eax 10d571: eb 91 jmp 10d504 <_Heap_Walk+0x2d8> 10d573: 90 nop <== NOT EXECUTED 10d574: c7 45 c8 26 0c 12 00 movl $0x120c26,-0x38(%ebp) 10d57b: e9 6c ff ff ff jmp 10d4ec <_Heap_Walk+0x2c0> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 10d580: c7 45 c8 35 0c 12 00 movl $0x120c35,-0x38(%ebp) 10d587: e9 60 ff ff ff jmp 10d4ec <_Heap_Walk+0x2c0> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 10d58c: b8 4f 0c 12 00 mov $0x120c4f,%eax 10d591: e9 6e ff ff ff jmp 10d504 <_Heap_Walk+0x2d8> 10d596: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !prev_used ) { (*printer)( 10d598: 57 push %edi 10d599: 68 d8 0f 12 00 push $0x120fd8 10d59e: e9 5d fd ff ff jmp 10d300 <_Heap_Walk+0xd4> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 10d5a3: 83 ec 0c sub $0xc,%esp 10d5a6: 51 push %ecx 10d5a7: 57 push %edi 10d5a8: 68 d4 0e 12 00 push $0x120ed4 10d5ad: e9 3e fe ff ff jmp 10d3f0 <_Heap_Walk+0x1c4> return false; } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( 10d5b2: 83 ec 08 sub $0x8,%esp 10d5b5: ff 75 d0 pushl -0x30(%ebp) 10d5b8: 51 push %ecx 10d5b9: 57 push %edi 10d5ba: 68 04 0f 12 00 push $0x120f04 10d5bf: e9 2c fe ff ff jmp 10d3f0 <_Heap_Walk+0x1c4> return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 10d5c4: 83 ec 0c sub $0xc,%esp 10d5c7: 56 push %esi 10d5c8: 57 push %edi 10d5c9: 68 30 0f 12 00 push $0x120f30 10d5ce: e9 1d fe ff ff jmp 10d3f0 <_Heap_Walk+0x1c4> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10d5d3: 51 push %ecx 10d5d4: 68 40 0e 12 00 push $0x120e40 10d5d9: e9 22 fd ff ff jmp 10d300 <_Heap_Walk+0xd4> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 10d5de: 51 push %ecx 10d5df: 68 9f 0c 12 00 push $0x120c9f 10d5e4: e9 17 fd ff ff jmp 10d300 <_Heap_Walk+0xd4> =============================================================================== 0010bd78 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 10bd78: 55 push %ebp 10bd79: 89 e5 mov %esp,%ebp 10bd7b: 53 push %ebx 10bd7c: 83 ec 04 sub $0x4,%esp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10bd7f: 8b 0d 80 57 12 00 mov 0x125780,%ecx 10bd85: 85 c9 test %ecx,%ecx 10bd87: 74 1a je 10bda3 <_IO_Initialize_all_drivers+0x2b><== NEVER TAKEN 10bd89: 31 db xor %ebx,%ebx 10bd8b: 90 nop (void) rtems_io_initialize( major, 0, NULL ); 10bd8c: 52 push %edx 10bd8d: 6a 00 push $0x0 10bd8f: 6a 00 push $0x0 10bd91: 53 push %ebx 10bd92: e8 7d 46 00 00 call 110414 void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10bd97: 43 inc %ebx 10bd98: 83 c4 10 add $0x10,%esp 10bd9b: 39 1d 80 57 12 00 cmp %ebx,0x125780 10bda1: 77 e9 ja 10bd8c <_IO_Initialize_all_drivers+0x14> (void) rtems_io_initialize( major, 0, NULL ); } 10bda3: 8b 5d fc mov -0x4(%ebp),%ebx 10bda6: c9 leave 10bda7: c3 ret =============================================================================== 0010bce0 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 10bce0: 55 push %ebp 10bce1: 89 e5 mov %esp,%ebp 10bce3: 57 push %edi 10bce4: 56 push %esi 10bce5: 53 push %ebx 10bce6: 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; 10bce9: 8b 1d 54 12 12 00 mov 0x121254,%ebx drivers_in_table = Configuration.number_of_device_drivers; 10bcef: a1 50 12 12 00 mov 0x121250,%eax 10bcf4: 89 45 e4 mov %eax,-0x1c(%ebp) number_of_drivers = Configuration.maximum_drivers; 10bcf7: 8b 35 4c 12 12 00 mov 0x12124c,%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 ) 10bcfd: 39 f0 cmp %esi,%eax 10bcff: 73 5f jae 10bd60 <_IO_Manager_initialization+0x80> * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( 10bd01: 8d 0c 76 lea (%esi,%esi,2),%ecx 10bd04: c1 e1 03 shl $0x3,%ecx 10bd07: 83 ec 0c sub $0xc,%esp 10bd0a: 51 push %ecx 10bd0b: 89 4d dc mov %ecx,-0x24(%ebp) 10bd0e: e8 45 2a 00 00 call 10e758 <_Workspace_Allocate_or_fatal_error> 10bd13: 89 c2 mov %eax,%edx /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 10bd15: a3 84 57 12 00 mov %eax,0x125784 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 10bd1a: 89 35 80 57 12 00 mov %esi,0x125780 memset( 10bd20: 31 c0 xor %eax,%eax 10bd22: 8b 4d dc mov -0x24(%ebp),%ecx 10bd25: 89 d7 mov %edx,%edi 10bd27: 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++ ) 10bd29: 83 c4 10 add $0x10,%esp 10bd2c: 8b 45 e4 mov -0x1c(%ebp),%eax 10bd2f: 85 c0 test %eax,%eax 10bd31: 74 25 je 10bd58 <_IO_Manager_initialization+0x78><== NEVER TAKEN 10bd33: a1 84 57 12 00 mov 0x125784,%eax 10bd38: 89 45 e0 mov %eax,-0x20(%ebp) 10bd3b: 31 c0 xor %eax,%eax 10bd3d: 31 d2 xor %edx,%edx 10bd3f: 90 nop _IO_Driver_address_table[index] = driver_table[index]; 10bd40: 8b 7d e0 mov -0x20(%ebp),%edi 10bd43: 01 c7 add %eax,%edi 10bd45: 8d 34 03 lea (%ebx,%eax,1),%esi 10bd48: b9 06 00 00 00 mov $0x6,%ecx 10bd4d: 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++ ) 10bd4f: 42 inc %edx 10bd50: 83 c0 18 add $0x18,%eax 10bd53: 39 55 e4 cmp %edx,-0x1c(%ebp) 10bd56: 77 e8 ja 10bd40 <_IO_Manager_initialization+0x60> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10bd58: 8d 65 f4 lea -0xc(%ebp),%esp 10bd5b: 5b pop %ebx 10bd5c: 5e pop %esi 10bd5d: 5f pop %edi 10bd5e: c9 leave 10bd5f: c3 ret * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 10bd60: 89 1d 84 57 12 00 mov %ebx,0x125784 _IO_Number_of_drivers = number_of_drivers; 10bd66: 8b 45 e4 mov -0x1c(%ebp),%eax 10bd69: a3 80 57 12 00 mov %eax,0x125780 ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10bd6e: 8d 65 f4 lea -0xc(%ebp),%esp 10bd71: 5b pop %ebx 10bd72: 5e pop %esi 10bd73: 5f pop %edi 10bd74: c9 leave 10bd75: c3 ret =============================================================================== 0010c7fc <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10c7fc: 55 push %ebp 10c7fd: 89 e5 mov %esp,%ebp 10c7ff: 53 push %ebx 10c800: 83 ec 08 sub $0x8,%esp 10c803: 8b 45 08 mov 0x8(%ebp),%eax 10c806: 8b 55 0c mov 0xc(%ebp),%edx 10c809: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10c80c: a3 d4 54 12 00 mov %eax,0x1254d4 _Internal_errors_What_happened.is_internal = is_internal; 10c811: 88 15 d8 54 12 00 mov %dl,0x1254d8 _Internal_errors_What_happened.the_error = the_error; 10c817: 89 1d dc 54 12 00 mov %ebx,0x1254dc _User_extensions_Fatal( the_source, is_internal, the_error ); 10c81d: 53 push %ebx 10c81e: 0f b6 d2 movzbl %dl,%edx 10c821: 52 push %edx 10c822: 50 push %eax 10c823: e8 38 1b 00 00 call 10e360 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10c828: c7 05 e0 55 12 00 05 movl $0x5,0x1255e0 <== NOT EXECUTED 10c82f: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10c832: fa cli <== NOT EXECUTED 10c833: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10c835: f4 hlt <== NOT EXECUTED 10c836: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10c839: eb fe jmp 10c839 <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 00110954 <_Objects_API_maximum_class>: #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 110954: 55 push %ebp 110955: 89 e5 mov %esp,%ebp 110957: 8b 45 08 mov 0x8(%ebp),%eax 11095a: 48 dec %eax 11095b: 83 f8 02 cmp $0x2,%eax 11095e: 77 0c ja 11096c <_Objects_API_maximum_class+0x18> 110960: 8b 04 85 10 01 12 00 mov 0x120110(,%eax,4),%eax case OBJECTS_NO_API: default: break; } return 0; } 110967: c9 leave 110968: c3 ret 110969: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 11096c: 31 c0 xor %eax,%eax case OBJECTS_NO_API: default: break; } return 0; } 11096e: c9 leave 11096f: c3 ret =============================================================================== 0010c88c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10c88c: 55 push %ebp 10c88d: 89 e5 mov %esp,%ebp 10c88f: 56 push %esi 10c890: 53 push %ebx 10c891: 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 ) 10c894: 8b 43 18 mov 0x18(%ebx),%eax 10c897: 85 c0 test %eax,%eax 10c899: 75 0d jne 10c8a8 <_Objects_Allocate+0x1c><== ALWAYS TAKEN return NULL; 10c89b: 31 c9 xor %ecx,%ecx <== NOT EXECUTED ); } #endif return the_object; } 10c89d: 89 c8 mov %ecx,%eax 10c89f: 8d 65 f8 lea -0x8(%ebp),%esp 10c8a2: 5b pop %ebx 10c8a3: 5e pop %esi 10c8a4: c9 leave 10c8a5: c3 ret 10c8a6: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * 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 ); 10c8a8: 8d 73 20 lea 0x20(%ebx),%esi 10c8ab: 83 ec 0c sub $0xc,%esp 10c8ae: 56 push %esi 10c8af: e8 e8 f6 ff ff call 10bf9c <_Chain_Get> 10c8b4: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10c8b6: 83 c4 10 add $0x10,%esp 10c8b9: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10c8bd: 74 de je 10c89d <_Objects_Allocate+0x11> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10c8bf: 85 c0 test %eax,%eax 10c8c1: 74 29 je 10c8ec <_Objects_Allocate+0x60> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10c8c3: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10c8c7: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10c8cb: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 10c8cd: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10c8d1: 31 d2 xor %edx,%edx 10c8d3: f7 f6 div %esi information->inactive_per_block[ block ]--; 10c8d5: c1 e0 02 shl $0x2,%eax 10c8d8: 03 43 30 add 0x30(%ebx),%eax 10c8db: ff 08 decl (%eax) information->inactive--; 10c8dd: 66 ff 4b 2c decw 0x2c(%ebx) ); } #endif return the_object; } 10c8e1: 89 c8 mov %ecx,%eax 10c8e3: 8d 65 f8 lea -0x8(%ebp),%esp 10c8e6: 5b pop %ebx 10c8e7: 5e pop %esi 10c8e8: c9 leave 10c8e9: c3 ret 10c8ea: 66 90 xchg %ax,%ax <== NOT EXECUTED * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 10c8ec: 83 ec 0c sub $0xc,%esp 10c8ef: 53 push %ebx 10c8f0: e8 3b 00 00 00 call 10c930 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10c8f5: 89 34 24 mov %esi,(%esp) 10c8f8: e8 9f f6 ff ff call 10bf9c <_Chain_Get> 10c8fd: 89 c1 mov %eax,%ecx } if ( the_object ) { 10c8ff: 83 c4 10 add $0x10,%esp 10c902: 85 c0 test %eax,%eax 10c904: 74 97 je 10c89d <_Objects_Allocate+0x11> 10c906: eb bb jmp 10c8c3 <_Objects_Allocate+0x37> =============================================================================== 0010c930 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 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 4c sub $0x4c,%esp 10c939: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 10c93c: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10c940: 89 45 cc mov %eax,-0x34(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10c943: 8b 4b 34 mov 0x34(%ebx),%ecx 10c946: 85 c9 test %ecx,%ecx 10c948: 0f 84 66 02 00 00 je 10cbb4 <_Objects_Extend_information+0x284> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10c94e: 8b 73 10 mov 0x10(%ebx),%esi 10c951: 66 89 75 d0 mov %si,-0x30(%ebp) 10c955: 8b 7b 14 mov 0x14(%ebx),%edi 10c958: 89 f0 mov %esi,%eax 10c95a: 31 d2 xor %edx,%edx 10c95c: 66 f7 f7 div %di 10c95f: 0f b7 f0 movzwl %ax,%esi for ( ; block < block_count; block++ ) { 10c962: 85 f6 test %esi,%esi 10c964: 0f 84 63 02 00 00 je 10cbcd <_Objects_Extend_information+0x29d><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) { 10c96a: 8b 01 mov (%ecx),%eax 10c96c: 85 c0 test %eax,%eax 10c96e: 0f 84 6b 02 00 00 je 10cbdf <_Objects_Extend_information+0x2af><== NEVER TAKEN 10c974: 0f b7 ff movzwl %di,%edi /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 10c977: 8b 55 cc mov -0x34(%ebp),%edx 10c97a: 89 55 d4 mov %edx,-0x2c(%ebp) index_base = minimum_index; block = 0; 10c97d: 31 d2 xor %edx,%edx 10c97f: 8b 45 d4 mov -0x2c(%ebp),%eax 10c982: eb 0a jmp 10c98e <_Objects_Extend_information+0x5e> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 10c984: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4) 10c988: 0f 84 c6 01 00 00 je 10cb54 <_Objects_Extend_information+0x224> do_extend = false; break; } else index_base += information->allocation_size; 10c98e: 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++ ) { 10c990: 42 inc %edx 10c991: 39 d6 cmp %edx,%esi 10c993: 77 ef ja 10c984 <_Objects_Extend_information+0x54> 10c995: 89 45 d4 mov %eax,-0x2c(%ebp) /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 10c998: b1 01 mov $0x1,%cl } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10c99a: 0f b7 45 d0 movzwl -0x30(%ebp),%eax 10c99e: 01 f8 add %edi,%eax 10c9a0: 89 45 d0 mov %eax,-0x30(%ebp) /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 10c9a3: 3d ff ff 00 00 cmp $0xffff,%eax 10c9a8: 0f 87 9e 01 00 00 ja 10cb4c <_Objects_Extend_information+0x21c> /* * 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; 10c9ae: 0f af 7b 18 imul 0x18(%ebx),%edi if ( information->auto_extend ) { 10c9b2: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10c9b6: 0f 84 a4 01 00 00 je 10cb60 <_Objects_Extend_information+0x230> new_object_block = _Workspace_Allocate( block_size ); 10c9bc: 83 ec 0c sub $0xc,%esp 10c9bf: 57 push %edi 10c9c0: 89 55 b8 mov %edx,-0x48(%ebp) 10c9c3: 88 4d b4 mov %cl,-0x4c(%ebp) 10c9c6: e8 59 1d 00 00 call 10e724 <_Workspace_Allocate> 10c9cb: 89 45 c8 mov %eax,-0x38(%ebp) if ( !new_object_block ) 10c9ce: 83 c4 10 add $0x10,%esp 10c9d1: 85 c0 test %eax,%eax 10c9d3: 8b 55 b8 mov -0x48(%ebp),%edx 10c9d6: 8a 4d b4 mov -0x4c(%ebp),%cl 10c9d9: 0f 84 6d 01 00 00 je 10cb4c <_Objects_Extend_information+0x21c> } /* * Do we need to grow the tables? */ if ( do_extend ) { 10c9df: 84 c9 test %cl,%cl 10c9e1: 0f 84 ea 00 00 00 je 10cad1 <_Objects_Extend_information+0x1a1> */ /* * Up the block count and maximum */ block_count++; 10c9e7: 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 ); 10c9ea: 83 ec 0c sub $0xc,%esp /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 10c9ed: 8d 04 7f lea (%edi,%edi,2),%eax ((maximum + minimum_index) * sizeof(Objects_Control *)); 10c9f0: 03 45 d0 add -0x30(%ebp),%eax /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 10c9f3: 03 45 cc add -0x34(%ebp),%eax block_count++; /* * Allocate the tables and break it up. */ block_size = block_count * 10c9f6: c1 e0 02 shl $0x2,%eax (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 10c9f9: 50 push %eax 10c9fa: 89 55 b8 mov %edx,-0x48(%ebp) 10c9fd: e8 22 1d 00 00 call 10e724 <_Workspace_Allocate> 10ca02: 89 45 c4 mov %eax,-0x3c(%ebp) if ( !object_blocks ) { 10ca05: 83 c4 10 add $0x10,%esp 10ca08: 85 c0 test %eax,%eax 10ca0a: 8b 55 b8 mov -0x48(%ebp),%edx 10ca0d: 0f 84 de 01 00 00 je 10cbf1 <_Objects_Extend_information+0x2c1> 10ca13: 8b 45 c4 mov -0x3c(%ebp),%eax 10ca16: 8d 04 b8 lea (%eax,%edi,4),%eax 10ca19: 89 45 bc mov %eax,-0x44(%ebp) 10ca1c: 8b 4d c4 mov -0x3c(%ebp),%ecx 10ca1f: 8d 04 f9 lea (%ecx,%edi,8),%eax * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 10ca22: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10ca26: 39 4d cc cmp %ecx,-0x34(%ebp) 10ca29: 0f 82 51 01 00 00 jb 10cb80 <_Objects_Extend_information+0x250> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10ca2f: 8b 4d cc mov -0x34(%ebp),%ecx 10ca32: 85 c9 test %ecx,%ecx 10ca34: 74 12 je 10ca48 <_Objects_Extend_information+0x118><== NEVER TAKEN 10ca36: 31 c9 xor %ecx,%ecx 10ca38: 8b 7d cc mov -0x34(%ebp),%edi 10ca3b: 90 nop local_table[ index ] = NULL; 10ca3c: c7 04 88 00 00 00 00 movl $0x0,(%eax,%ecx,4) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10ca43: 41 inc %ecx 10ca44: 39 cf cmp %ecx,%edi 10ca46: 77 f4 ja 10ca3c <_Objects_Extend_information+0x10c><== NEVER TAKEN 10ca48: c1 e6 02 shl $0x2,%esi 10ca4b: 89 75 c0 mov %esi,-0x40(%ebp) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10ca4e: 8b 4d c4 mov -0x3c(%ebp),%ecx 10ca51: 8b 75 c0 mov -0x40(%ebp),%esi 10ca54: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1) inactive_per_block[block_count] = 0; 10ca5b: 8b 4d bc mov -0x44(%ebp),%ecx 10ca5e: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10ca65: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10ca69: 03 75 d4 add -0x2c(%ebp),%esi * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10ca6c: 39 75 d4 cmp %esi,-0x2c(%ebp) 10ca6f: 73 0f jae 10ca80 <_Objects_Extend_information+0x150><== NEVER TAKEN 10ca71: 8b 4d d4 mov -0x2c(%ebp),%ecx index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10ca74: c7 04 88 00 00 00 00 movl $0x0,(%eax,%ecx,4) object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 10ca7b: 41 inc %ecx * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10ca7c: 39 f1 cmp %esi,%ecx 10ca7e: 72 f4 jb 10ca74 <_Objects_Extend_information+0x144> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10ca80: 9c pushf 10ca81: fa cli 10ca82: 5f pop %edi old_tables = information->object_blocks; 10ca83: 8b 4b 34 mov 0x34(%ebx),%ecx information->object_blocks = object_blocks; 10ca86: 8b 75 c4 mov -0x3c(%ebp),%esi 10ca89: 89 73 34 mov %esi,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10ca8c: 8b 75 bc mov -0x44(%ebp),%esi 10ca8f: 89 73 30 mov %esi,0x30(%ebx) information->local_table = local_table; 10ca92: 89 43 1c mov %eax,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10ca95: 8b 45 d0 mov -0x30(%ebp),%eax 10ca98: 66 89 43 10 mov %ax,0x10(%ebx) uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10ca9c: 8b 33 mov (%ebx),%esi 10ca9e: c1 e6 18 shl $0x18,%esi 10caa1: 81 ce 00 00 01 00 or $0x10000,%esi information->maximum_id = _Objects_Build_id( 10caa7: 0f b7 43 04 movzwl 0x4(%ebx),%eax (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10caab: c1 e0 1b shl $0x1b,%eax 10caae: 09 c6 or %eax,%esi 10cab0: 0f b7 45 d0 movzwl -0x30(%ebp),%eax uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10cab4: 09 c6 or %eax,%esi 10cab6: 89 73 0c mov %esi,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10cab9: 57 push %edi 10caba: 9d popf if ( old_tables ) 10cabb: 85 c9 test %ecx,%ecx 10cabd: 74 12 je 10cad1 <_Objects_Extend_information+0x1a1> _Workspace_Free( old_tables ); 10cabf: 83 ec 0c sub $0xc,%esp 10cac2: 51 push %ecx 10cac3: 89 55 b8 mov %edx,-0x48(%ebp) 10cac6: e8 75 1c 00 00 call 10e740 <_Workspace_Free> 10cacb: 83 c4 10 add $0x10,%esp 10cace: 8b 55 b8 mov -0x48(%ebp),%edx } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10cad1: c1 e2 02 shl $0x2,%edx 10cad4: 89 55 d0 mov %edx,-0x30(%ebp) 10cad7: 8b 43 34 mov 0x34(%ebx),%eax 10cada: 8b 4d c8 mov -0x38(%ebp),%ecx 10cadd: 89 0c 10 mov %ecx,(%eax,%edx,1) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10cae0: ff 73 18 pushl 0x18(%ebx) 10cae3: 0f b7 43 14 movzwl 0x14(%ebx),%eax 10cae7: 50 push %eax 10cae8: 51 push %ecx 10cae9: 8d 7d dc lea -0x24(%ebp),%edi 10caec: 57 push %edi 10caed: e8 62 39 00 00 call 110454 <_Chain_Initialize> /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10caf2: 83 c4 10 add $0x10,%esp 10caf5: 8b 75 d4 mov -0x2c(%ebp),%esi information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10caf8: 8d 43 20 lea 0x20(%ebx),%eax 10cafb: 89 45 d4 mov %eax,-0x2c(%ebp) /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10cafe: eb 29 jmp 10cb29 <_Objects_Extend_information+0x1f9> 10cb00: 8b 13 mov (%ebx),%edx 10cb02: c1 e2 18 shl $0x18,%edx 10cb05: 81 ca 00 00 01 00 or $0x10000,%edx the_object->id = _Objects_Build_id( 10cb0b: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10cb0f: c1 e1 1b shl $0x1b,%ecx 10cb12: 09 ca or %ecx,%edx uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10cb14: 09 f2 or %esi,%edx 10cb16: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10cb19: 83 ec 08 sub $0x8,%esp 10cb1c: 50 push %eax 10cb1d: ff 75 d4 pushl -0x2c(%ebp) 10cb20: e8 3b f4 ff ff call 10bf60 <_Chain_Append> index++; 10cb25: 46 inc %esi 10cb26: 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 ) { 10cb29: 83 ec 0c sub $0xc,%esp 10cb2c: 57 push %edi 10cb2d: e8 6a f4 ff ff call 10bf9c <_Chain_Get> 10cb32: 83 c4 10 add $0x10,%esp 10cb35: 85 c0 test %eax,%eax 10cb37: 75 c7 jne 10cb00 <_Objects_Extend_information+0x1d0> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10cb39: 8b 43 14 mov 0x14(%ebx),%eax 10cb3c: 8b 53 30 mov 0x30(%ebx),%edx 10cb3f: 0f b7 c8 movzwl %ax,%ecx 10cb42: 8b 75 d0 mov -0x30(%ebp),%esi 10cb45: 89 0c 32 mov %ecx,(%edx,%esi,1) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 10cb48: 66 01 43 2c add %ax,0x2c(%ebx) } 10cb4c: 8d 65 f4 lea -0xc(%ebp),%esp 10cb4f: 5b pop %ebx 10cb50: 5e pop %esi 10cb51: 5f pop %edi 10cb52: c9 leave 10cb53: c3 ret 10cb54: 89 45 d4 mov %eax,-0x2c(%ebp) else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; 10cb57: 31 c9 xor %ecx,%ecx 10cb59: e9 3c fe ff ff jmp 10c99a <_Objects_Extend_information+0x6a> 10cb5e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 10cb60: 83 ec 0c sub $0xc,%esp 10cb63: 57 push %edi 10cb64: 89 55 b8 mov %edx,-0x48(%ebp) 10cb67: 88 4d b4 mov %cl,-0x4c(%ebp) 10cb6a: e8 e9 1b 00 00 call 10e758 <_Workspace_Allocate_or_fatal_error> 10cb6f: 89 45 c8 mov %eax,-0x38(%ebp) 10cb72: 83 c4 10 add $0x10,%esp 10cb75: 8a 4d b4 mov -0x4c(%ebp),%cl 10cb78: 8b 55 b8 mov -0x48(%ebp),%edx 10cb7b: e9 5f fe ff ff jmp 10c9df <_Objects_Extend_information+0xaf> /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 10cb80: c1 e6 02 shl $0x2,%esi 10cb83: 89 75 c0 mov %esi,-0x40(%ebp) 10cb86: 8b 73 34 mov 0x34(%ebx),%esi 10cb89: 8b 7d c4 mov -0x3c(%ebp),%edi 10cb8c: 8b 4d c0 mov -0x40(%ebp),%ecx 10cb8f: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10cb91: 8b 73 30 mov 0x30(%ebx),%esi 10cb94: 8b 7d bc mov -0x44(%ebp),%edi 10cb97: 8b 4d c0 mov -0x40(%ebp),%ecx 10cb9a: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); 10cb9c: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10cba0: 03 4d cc add -0x34(%ebp),%ecx information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10cba3: c1 e1 02 shl $0x2,%ecx 10cba6: 8b 73 1c mov 0x1c(%ebx),%esi 10cba9: 89 c7 mov %eax,%edi 10cbab: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10cbad: e9 9c fe ff ff jmp 10ca4e <_Objects_Extend_information+0x11e> 10cbb2: 66 90 xchg %ax,%ax <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10cbb4: 8b 53 10 mov 0x10(%ebx),%edx 10cbb7: 66 89 55 d0 mov %dx,-0x30(%ebp) 10cbbb: 0f b7 7b 14 movzwl 0x14(%ebx),%edi /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 10cbbf: 89 45 d4 mov %eax,-0x2c(%ebp) /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 10cbc2: b1 01 mov $0x1,%cl minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10cbc4: 31 d2 xor %edx,%edx /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; 10cbc6: 31 f6 xor %esi,%esi 10cbc8: e9 cd fd ff ff jmp 10c99a <_Objects_Extend_information+0x6a> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10cbcd: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 10cbd0: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 10cbd3: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 10cbd6: b1 01 mov $0x1,%cl <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10cbd8: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cbda: e9 bb fd ff ff jmp 10c99a <_Objects_Extend_information+0x6a><== NOT EXECUTED block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 10cbdf: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 10cbe2: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 10cbe5: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; 10cbe8: 31 c9 xor %ecx,%ecx <== NOT EXECUTED * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 10cbea: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cbec: e9 a9 fd ff ff jmp 10c99a <_Objects_Extend_information+0x6a><== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 10cbf1: 83 ec 0c sub $0xc,%esp 10cbf4: ff 75 c8 pushl -0x38(%ebp) 10cbf7: e8 44 1b 00 00 call 10e740 <_Workspace_Free> return; 10cbfc: 83 c4 10 add $0x10,%esp 10cbff: e9 48 ff ff ff jmp 10cb4c <_Objects_Extend_information+0x21c> =============================================================================== 0010cd44 <_Objects_Get>: Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 10cd44: 55 push %ebp 10cd45: 89 e5 mov %esp,%ebp 10cd47: 53 push %ebx 10cd48: 83 ec 14 sub $0x14,%esp 10cd4b: 8b 55 08 mov 0x8(%ebp),%edx 10cd4e: 8b 5d 10 mov 0x10(%ebp),%ebx * always NULL. * * If the Id is valid but the object has not been created yet, then * the local_table entry will be NULL. */ index = id - information->minimum_id + 1; 10cd51: b8 01 00 00 00 mov $0x1,%eax 10cd56: 2b 42 08 sub 0x8(%edx),%eax 10cd59: 03 45 0c add 0xc(%ebp),%eax /* * If the index is less than maximum, then it is OK to use it to * index into the local_table array. */ if ( index <= information->maximum ) { 10cd5c: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10cd60: 39 c8 cmp %ecx,%eax 10cd62: 77 24 ja 10cd88 <_Objects_Get+0x44> 10cd64: 8b 0d 34 54 12 00 mov 0x125434,%ecx 10cd6a: 41 inc %ecx 10cd6b: 89 0d 34 54 12 00 mov %ecx,0x125434 _Thread_Disable_dispatch(); if ( (the_object = information->local_table[ index ]) != NULL ) { 10cd71: 8b 52 1c mov 0x1c(%edx),%edx 10cd74: 8b 04 82 mov (%edx,%eax,4),%eax 10cd77: 85 c0 test %eax,%eax 10cd79: 74 1b je 10cd96 <_Objects_Get+0x52> *location = OBJECTS_LOCAL; 10cd7b: c7 03 00 00 00 00 movl $0x0,(%ebx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cd81: 83 c4 14 add $0x14,%esp 10cd84: 5b pop %ebx 10cd85: c9 leave 10cd86: c3 ret 10cd87: 90 nop <== NOT EXECUTED /* * Object Id is not within this API and Class on this node. So * it may be global in a multiprocessing system. But it is clearly * invalid on a single processor system. */ *location = OBJECTS_ERROR; 10cd88: c7 03 01 00 00 00 movl $0x1,(%ebx) #if defined(RTEMS_MULTIPROCESSING) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; 10cd8e: 31 c0 xor %eax,%eax #endif } 10cd90: 83 c4 14 add $0x14,%esp 10cd93: 5b pop %ebx 10cd94: c9 leave 10cd95: c3 ret /* * Valid Id for this API, Class and Node but the object has not * been allocated yet. */ _Thread_Enable_dispatch(); 10cd96: 89 45 f4 mov %eax,-0xc(%ebp) 10cd99: e8 0a 08 00 00 call 10d5a8 <_Thread_Enable_dispatch> *location = OBJECTS_ERROR; 10cd9e: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10cda4: 8b 45 f4 mov -0xc(%ebp),%eax 10cda7: eb d8 jmp 10cd81 <_Objects_Get+0x3d> =============================================================================== 0010cc94 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 10cc94: 55 push %ebp 10cc95: 89 e5 mov %esp,%ebp 10cc97: 56 push %esi 10cc98: 53 push %ebx 10cc99: 8b 75 08 mov 0x8(%ebp),%esi 10cc9c: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10cc9f: 66 85 db test %bx,%bx 10cca2: 75 0c jne 10ccb0 <_Objects_Get_information+0x1c> the_class_api_maximum = _Objects_API_maximum_class( the_api ); if ( the_class_api_maximum == 0 ) return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) return NULL; 10cca4: 31 c0 xor %eax,%eax if ( info->maximum == 0 ) return NULL; #endif return info; } 10cca6: 8d 65 f8 lea -0x8(%ebp),%esp 10cca9: 5b pop %ebx 10ccaa: 5e pop %esi 10ccab: c9 leave 10ccac: c3 ret 10ccad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * 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 ); 10ccb0: 83 ec 0c sub $0xc,%esp 10ccb3: 56 push %esi 10ccb4: e8 9b 3c 00 00 call 110954 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10ccb9: 83 c4 10 add $0x10,%esp 10ccbc: 85 c0 test %eax,%eax 10ccbe: 74 e4 je 10cca4 <_Objects_Get_information+0x10> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10ccc0: 0f b7 db movzwl %bx,%ebx 10ccc3: 39 d8 cmp %ebx,%eax 10ccc5: 72 dd jb 10cca4 <_Objects_Get_information+0x10> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10ccc7: 8b 14 b5 0c 54 12 00 mov 0x12540c(,%esi,4),%edx return NULL; 10ccce: 31 c0 xor %eax,%eax return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 10ccd0: 85 d2 test %edx,%edx 10ccd2: 74 d2 je 10cca6 <_Objects_Get_information+0x12><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10ccd4: 8b 04 9a mov (%edx,%ebx,4),%eax if ( !info ) 10ccd7: 85 c0 test %eax,%eax 10ccd9: 74 cb je 10cca6 <_Objects_Get_information+0x12><== NEVER TAKEN * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) return NULL; 10ccdb: 31 d2 xor %edx,%edx 10ccdd: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10cce2: 0f 95 c2 setne %dl 10cce5: f7 da neg %edx 10cce7: 21 d0 and %edx,%eax 10cce9: eb bb jmp 10cca6 <_Objects_Get_information+0x12> =============================================================================== 0010ccec <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10ccec: 55 push %ebp 10cced: 89 e5 mov %esp,%ebp 10ccef: 56 push %esi 10ccf0: 53 push %ebx 10ccf1: 8b 55 08 mov 0x8(%ebp),%edx 10ccf4: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 10ccf7: b8 01 00 00 00 mov $0x1,%eax 10ccfc: 2b 42 08 sub 0x8(%edx),%eax 10ccff: 03 45 0c add 0xc(%ebp),%eax _ISR_Disable( level ); 10cd02: 9c pushf 10cd03: fa cli 10cd04: 5e pop %esi if ( information->maximum >= index ) { 10cd05: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10cd09: 39 c8 cmp %ecx,%eax 10cd0b: 77 1b ja 10cd28 <_Objects_Get_isr_disable+0x3c> if ( (the_object = information->local_table[ index ]) != NULL ) { 10cd0d: 8b 52 1c mov 0x1c(%edx),%edx 10cd10: 8b 04 82 mov (%edx,%eax,4),%eax 10cd13: 85 c0 test %eax,%eax 10cd15: 74 21 je 10cd38 <_Objects_Get_isr_disable+0x4c> *location = OBJECTS_LOCAL; 10cd17: c7 03 00 00 00 00 movl $0x0,(%ebx) *level_p = level; 10cd1d: 8b 55 14 mov 0x14(%ebp),%edx 10cd20: 89 32 mov %esi,(%edx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cd22: 5b pop %ebx 10cd23: 5e pop %esi 10cd24: c9 leave 10cd25: c3 ret 10cd26: 66 90 xchg %ax,%ax <== NOT EXECUTED } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 10cd28: 56 push %esi 10cd29: 9d popf *location = OBJECTS_ERROR; 10cd2a: c7 03 01 00 00 00 movl $0x1,(%ebx) #if defined(RTEMS_MULTIPROCESSING) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; 10cd30: 31 c0 xor %eax,%eax #endif } 10cd32: 5b pop %ebx 10cd33: 5e pop %esi 10cd34: c9 leave 10cd35: c3 ret 10cd36: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( (the_object = information->local_table[ index ]) != NULL ) { *location = OBJECTS_LOCAL; *level_p = level; return the_object; } _ISR_Enable( level ); 10cd38: 56 push %esi 10cd39: 9d popf *location = OBJECTS_ERROR; 10cd3a: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10cd40: eb e0 jmp 10cd22 <_Objects_Get_isr_disable+0x36> =============================================================================== 0010e3c8 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 10e3c8: 55 push %ebp 10e3c9: 89 e5 mov %esp,%ebp 10e3cb: 57 push %edi 10e3cc: 56 push %esi 10e3cd: 53 push %ebx 10e3ce: 83 ec 2c sub $0x2c,%esp 10e3d1: 8b 7d 08 mov 0x8(%ebp),%edi 10e3d4: 8b 75 0c mov 0xc(%ebp),%esi 10e3d7: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 10e3da: 85 f6 test %esi,%esi 10e3dc: 75 0e jne 10e3ec <_Objects_Get_name_as_string+0x24> #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; 10e3de: 31 db xor %ebx,%ebx _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } 10e3e0: 89 d8 mov %ebx,%eax 10e3e2: 8d 65 f4 lea -0xc(%ebp),%esp 10e3e5: 5b pop %ebx 10e3e6: 5e pop %esi 10e3e7: 5f pop %edi 10e3e8: c9 leave 10e3e9: c3 ret 10e3ea: 66 90 xchg %ax,%ax <== NOT EXECUTED Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 10e3ec: 85 db test %ebx,%ebx 10e3ee: 74 f0 je 10e3e0 <_Objects_Get_name_as_string+0x18> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10e3f0: 85 ff test %edi,%edi 10e3f2: 75 08 jne 10e3fc <_Objects_Get_name_as_string+0x34> 10e3f4: a1 78 16 13 00 mov 0x131678,%eax 10e3f9: 8b 78 08 mov 0x8(%eax),%edi information = _Objects_Get_information_id( tmpId ); 10e3fc: 83 ec 0c sub $0xc,%esp 10e3ff: 57 push %edi 10e400: e8 f3 fe ff ff call 10e2f8 <_Objects_Get_information_id> if ( !information ) 10e405: 83 c4 10 add $0x10,%esp 10e408: 85 c0 test %eax,%eax 10e40a: 74 d2 je 10e3de <_Objects_Get_name_as_string+0x16> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 10e40c: 51 push %ecx 10e40d: 8d 55 e4 lea -0x1c(%ebp),%edx 10e410: 52 push %edx 10e411: 57 push %edi 10e412: 50 push %eax 10e413: e8 7c 00 00 00 call 10e494 <_Objects_Get> switch ( location ) { 10e418: 83 c4 10 add $0x10,%esp 10e41b: 8b 55 e4 mov -0x1c(%ebp),%edx 10e41e: 85 d2 test %edx,%edx 10e420: 75 bc jne 10e3de <_Objects_Get_name_as_string+0x16> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 10e422: 8b 50 0c mov 0xc(%eax),%edx lname[ 0 ] = (u32_name >> 24) & 0xff; 10e425: 89 d1 mov %edx,%ecx 10e427: c1 e9 18 shr $0x18,%ecx 10e42a: 88 c8 mov %cl,%al 10e42c: 88 4d df mov %cl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 10e42f: 89 d1 mov %edx,%ecx 10e431: c1 e9 10 shr $0x10,%ecx 10e434: 88 4d e0 mov %cl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 10e437: 89 d1 mov %edx,%ecx 10e439: c1 e9 08 shr $0x8,%ecx 10e43c: 88 4d e1 mov %cl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 10e43f: 88 55 e2 mov %dl,-0x1e(%ebp) lname[ 4 ] = '\0'; 10e442: c6 45 e3 00 movb $0x0,-0x1d(%ebp) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e446: 4e dec %esi 10e447: 89 75 d4 mov %esi,-0x2c(%ebp) 10e44a: 74 42 je 10e48e <_Objects_Get_name_as_string+0xc6><== NEVER TAKEN 10e44c: 84 c0 test %al,%al 10e44e: 74 3e je 10e48e <_Objects_Get_name_as_string+0xc6> 10e450: 89 d9 mov %ebx,%ecx 10e452: 31 d2 xor %edx,%edx 10e454: eb 0a jmp 10e460 <_Objects_Get_name_as_string+0x98> 10e456: 66 90 xchg %ax,%ax <== NOT EXECUTED 10e458: 8a 44 15 df mov -0x21(%ebp,%edx,1),%al 10e45c: 84 c0 test %al,%al 10e45e: 74 21 je 10e481 <_Objects_Get_name_as_string+0xb9> *d = (isprint((unsigned char)*s)) ? *s : '*'; 10e460: 0f b6 f0 movzbl %al,%esi 10e463: 8b 3d 08 73 12 00 mov 0x127308,%edi 10e469: 0f be 74 37 01 movsbl 0x1(%edi,%esi,1),%esi 10e46e: 81 e6 97 00 00 00 and $0x97,%esi 10e474: 75 02 jne 10e478 <_Objects_Get_name_as_string+0xb0> 10e476: b0 2a mov $0x2a,%al 10e478: 88 01 mov %al,(%ecx) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e47a: 42 inc %edx 10e47b: 41 inc %ecx 10e47c: 3b 55 d4 cmp -0x2c(%ebp),%edx 10e47f: 72 d7 jb 10e458 <_Objects_Get_name_as_string+0x90> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 10e481: c6 01 00 movb $0x0,(%ecx) _Thread_Enable_dispatch(); 10e484: e8 6f 08 00 00 call 10ecf8 <_Thread_Enable_dispatch> return name; 10e489: e9 52 ff ff ff jmp 10e3e0 <_Objects_Get_name_as_string+0x18> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10e48e: 89 d9 mov %ebx,%ecx 10e490: eb ef jmp 10e481 <_Objects_Get_name_as_string+0xb9> =============================================================================== 0010ce8c <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 10ce8c: 55 push %ebp 10ce8d: 89 e5 mov %esp,%ebp 10ce8f: 57 push %edi 10ce90: 56 push %esi 10ce91: 53 push %ebx 10ce92: 83 ec 0c sub $0xc,%esp 10ce95: 8b 5d 08 mov 0x8(%ebp),%ebx 10ce98: 8b 75 0c mov 0xc(%ebp),%esi 10ce9b: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Control *object; Objects_Id next_id; if ( !information ) 10ce9e: 85 db test %ebx,%ebx 10cea0: 75 0a jne 10ceac <_Objects_Get_next+0x20> if ( !location_p ) return NULL; if ( !next_id_p ) return NULL; 10cea2: 31 c0 xor %eax,%eax return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 10cea4: 8d 65 f4 lea -0xc(%ebp),%esp 10cea7: 5b pop %ebx 10cea8: 5e pop %esi 10cea9: 5f pop %edi 10ceaa: c9 leave 10ceab: c3 ret Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 10ceac: 85 ff test %edi,%edi 10ceae: 74 f2 je 10cea2 <_Objects_Get_next+0x16> return NULL; if ( !next_id_p ) 10ceb0: 8b 45 14 mov 0x14(%ebp),%eax 10ceb3: 85 c0 test %eax,%eax 10ceb5: 74 eb je 10cea2 <_Objects_Get_next+0x16> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 10ceb7: 66 85 f6 test %si,%si 10ceba: 75 04 jne 10cec0 <_Objects_Get_next+0x34> next_id = information->minimum_id; 10cebc: 8b 73 08 mov 0x8(%ebx),%esi 10cebf: 90 nop else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 10cec0: 66 39 73 10 cmp %si,0x10(%ebx) 10cec4: 72 22 jb 10cee8 <_Objects_Get_next+0x5c> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 10cec6: 51 push %ecx 10cec7: 57 push %edi 10cec8: 56 push %esi 10cec9: 53 push %ebx 10ceca: e8 2d 00 00 00 call 10cefc <_Objects_Get> next_id++; 10cecf: 46 inc %esi } while (*location_p != OBJECTS_LOCAL); 10ced0: 83 c4 10 add $0x10,%esp 10ced3: 8b 17 mov (%edi),%edx 10ced5: 85 d2 test %edx,%edx 10ced7: 75 e7 jne 10cec0 <_Objects_Get_next+0x34> *next_id_p = next_id; 10ced9: 8b 55 14 mov 0x14(%ebp),%edx 10cedc: 89 32 mov %esi,(%edx) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 10cede: 8d 65 f4 lea -0xc(%ebp),%esp 10cee1: 5b pop %ebx 10cee2: 5e pop %esi 10cee3: 5f pop %edi 10cee4: c9 leave 10cee5: c3 ret 10cee6: 66 90 xchg %ax,%ax <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 10cee8: c7 07 01 00 00 00 movl $0x1,(%edi) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 10ceee: 8b 45 14 mov 0x14(%ebp),%eax 10cef1: c7 00 ff ff ff ff movl $0xffffffff,(%eax) return 0; 10cef7: 31 c0 xor %eax,%eax 10cef9: eb a9 jmp 10cea4 <_Objects_Get_next+0x18> =============================================================================== 0011b10c <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 11b10c: 55 push %ebp 11b10d: 89 e5 mov %esp,%ebp 11b10f: 53 push %ebx 11b110: 8b 55 08 mov 0x8(%ebp),%edx 11b113: 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; 11b116: b8 01 00 00 00 mov $0x1,%eax 11b11b: 2b 42 08 sub 0x8(%edx),%eax 11b11e: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 11b121: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 11b125: 39 c8 cmp %ecx,%eax 11b127: 77 13 ja 11b13c <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 11b129: 8b 52 1c mov 0x1c(%edx),%edx 11b12c: 8b 04 82 mov (%edx,%eax,4),%eax 11b12f: 85 c0 test %eax,%eax 11b131: 74 09 je 11b13c <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 11b133: 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; } 11b139: 5b pop %ebx 11b13a: c9 leave 11b13b: 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; 11b13c: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 11b142: 31 c0 xor %eax,%eax } 11b144: 5b pop %ebx 11b145: c9 leave 11b146: c3 ret =============================================================================== 0010dfec <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10dfec: 55 push %ebp 10dfed: 89 e5 mov %esp,%ebp 10dfef: 83 ec 18 sub $0x18,%esp 10dff2: 8b 55 08 mov 0x8(%ebp),%edx /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10dff5: 85 d2 test %edx,%edx 10dff7: 75 08 jne 10e001 <_Objects_Id_to_name+0x15> 10dff9: a1 18 8c 12 00 mov 0x128c18,%eax 10dffe: 8b 50 08 mov 0x8(%eax),%edx 10e001: 89 d0 mov %edx,%eax 10e003: c1 e8 18 shr $0x18,%eax 10e006: 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 ) 10e009: 8d 48 ff lea -0x1(%eax),%ecx 10e00c: 83 f9 02 cmp $0x2,%ecx 10e00f: 77 3b ja 10e04c <_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 ] ) 10e011: 8b 04 85 4c 89 12 00 mov 0x12894c(,%eax,4),%eax 10e018: 85 c0 test %eax,%eax 10e01a: 74 30 je 10e04c <_Objects_Id_to_name+0x60> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10e01c: 89 d1 mov %edx,%ecx 10e01e: c1 e9 1b shr $0x1b,%ecx return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10e021: 8b 04 88 mov (%eax,%ecx,4),%eax if ( !information ) 10e024: 85 c0 test %eax,%eax 10e026: 74 24 je 10e04c <_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 ); 10e028: 51 push %ecx 10e029: 8d 4d f4 lea -0xc(%ebp),%ecx 10e02c: 51 push %ecx 10e02d: 52 push %edx 10e02e: 50 push %eax 10e02f: e8 50 ff ff ff call 10df84 <_Objects_Get> if ( !the_object ) 10e034: 83 c4 10 add $0x10,%esp 10e037: 85 c0 test %eax,%eax 10e039: 74 11 je 10e04c <_Objects_Id_to_name+0x60> return OBJECTS_INVALID_ID; *name = the_object->name; 10e03b: 8b 50 0c mov 0xc(%eax),%edx 10e03e: 8b 45 0c mov 0xc(%ebp),%eax 10e041: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10e043: e8 08 08 00 00 call 10e850 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10e048: 31 c0 xor %eax,%eax } 10e04a: c9 leave 10e04b: c3 ret the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; 10e04c: b8 03 00 00 00 mov $0x3,%eax return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 10e051: c9 leave 10e052: c3 ret =============================================================================== 0010cdac <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10cdac: 55 push %ebp 10cdad: 89 e5 mov %esp,%ebp 10cdaf: 57 push %edi 10cdb0: 56 push %esi 10cdb1: 53 push %ebx 10cdb2: 83 ec 0c sub $0xc,%esp 10cdb5: 8b 45 08 mov 0x8(%ebp),%eax 10cdb8: 8b 55 0c mov 0xc(%ebp),%edx 10cdbb: 8b 5d 10 mov 0x10(%ebp),%ebx 10cdbe: 8b 75 20 mov 0x20(%ebp),%esi 10cdc1: 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; 10cdc5: 89 10 mov %edx,(%eax) information->the_class = the_class; 10cdc7: 66 89 58 04 mov %bx,0x4(%eax) information->size = size; 10cdcb: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10cdce: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10cdd5: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10cddc: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10cde3: 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; 10cde9: 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; 10cdef: 0f b7 db movzwl %bx,%ebx 10cdf2: 8b 3c 95 0c 54 12 00 mov 0x12540c(,%edx,4),%edi 10cdf9: 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; 10cdfc: 8b 7d 14 mov 0x14(%ebp),%edi 10cdff: 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 = 10ce02: 89 f9 mov %edi,%ecx 10ce04: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10ce07: 8b 4d 14 mov 0x14(%ebp),%ecx 10ce0a: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10ce10: 85 ff test %edi,%edi 10ce12: 74 04 je 10ce18 <_Objects_Initialize_information+0x6c> 10ce14: 85 c9 test %ecx,%ecx 10ce16: 74 67 je 10ce7f <_Objects_Initialize_information+0xd3> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10ce18: 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; 10ce1c: c7 40 1c a4 50 12 00 movl $0x1250a4,0x1c(%eax) uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10ce23: c1 e2 18 shl $0x18,%edx 10ce26: 81 ca 00 00 01 00 or $0x10000,%edx (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 10ce2c: c1 e3 1b shl $0x1b,%ebx 10ce2f: 09 da or %ebx,%edx /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; 10ce31: 31 db xor %ebx,%ebx 10ce33: 85 c9 test %ecx,%ecx 10ce35: 0f 95 c3 setne %bl uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 10ce38: 09 da or %ebx,%edx 10ce3a: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10ce3d: f7 c6 03 00 00 00 test $0x3,%esi 10ce43: 75 23 jne 10ce68 <_Objects_Initialize_information+0xbc><== NEVER TAKEN name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10ce45: 66 89 70 38 mov %si,0x38(%eax) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ce49: 8d 50 24 lea 0x24(%eax),%edx 10ce4c: 89 50 20 mov %edx,0x20(%eax) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10ce4f: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) _Chain_Initialize_empty( &information->Inactive ); 10ce56: 8d 50 20 lea 0x20(%eax),%edx 10ce59: 89 50 28 mov %edx,0x28(%eax) /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10ce5c: 85 c9 test %ecx,%ecx 10ce5e: 75 10 jne 10ce70 <_Objects_Initialize_information+0xc4> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10ce60: 8d 65 f4 lea -0xc(%ebp),%esp 10ce63: 5b pop %ebx 10ce64: 5e pop %esi 10ce65: 5f pop %edi 10ce66: c9 leave 10ce67: c3 ret * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 10ce68: 83 c6 04 add $0x4,%esi <== NOT EXECUTED 10ce6b: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED 10ce6e: eb d5 jmp 10ce45 <_Objects_Initialize_information+0x99><== NOT EXECUTED /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 10ce70: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10ce73: 8d 65 f4 lea -0xc(%ebp),%esp 10ce76: 5b pop %ebx 10ce77: 5e pop %esi 10ce78: 5f pop %edi 10ce79: 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 ); 10ce7a: e9 b1 fa ff ff jmp 10c930 <_Objects_Extend_information> /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 10ce7f: 50 push %eax 10ce80: 6a 13 push $0x13 10ce82: 6a 01 push $0x1 10ce84: 6a 00 push $0x0 10ce86: e8 71 f9 ff ff call 10c7fc <_Internal_error_Occurred> =============================================================================== 0010ce9c <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10ce9c: 55 push %ebp 10ce9d: 89 e5 mov %esp,%ebp 10ce9f: 57 push %edi 10cea0: 56 push %esi 10cea1: 53 push %ebx 10cea2: 8b 45 08 mov 0x8(%ebp),%eax 10cea5: 8b 4d 0c mov 0xc(%ebp),%ecx 10cea8: 8b 55 10 mov 0x10(%ebp),%edx 10ceab: 8b 7d 14 mov 0x14(%ebp),%edi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10ceae: 85 ff test %edi,%edi 10ceb0: 74 56 je 10cf08 <_Objects_Name_to_id_u32+0x6c> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10ceb2: 85 c9 test %ecx,%ecx 10ceb4: 74 08 je 10cebe <_Objects_Name_to_id_u32+0x22> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10ceb6: 8b 70 10 mov 0x10(%eax),%esi 10ceb9: 66 85 f6 test %si,%si 10cebc: 75 0a jne 10cec8 <_Objects_Name_to_id_u32+0x2c> return OBJECTS_INVALID_NAME; name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; 10cebe: b8 01 00 00 00 mov $0x1,%eax #endif } 10cec3: 5b pop %ebx 10cec4: 5e pop %esi 10cec5: 5f pop %edi 10cec6: c9 leave 10cec7: c3 ret if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10cec8: 85 d2 test %edx,%edx 10ceca: 75 20 jne 10ceec <_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++ ) { 10cecc: 0f b7 f6 movzwl %si,%esi 10cecf: 8b 58 1c mov 0x1c(%eax),%ebx 10ced2: b8 01 00 00 00 mov $0x1,%eax 10ced7: 90 nop the_object = information->local_table[ index ]; 10ced8: 8b 14 83 mov (%ebx,%eax,4),%edx if ( !the_object ) 10cedb: 85 d2 test %edx,%edx 10cedd: 74 05 je 10cee4 <_Objects_Name_to_id_u32+0x48> continue; if ( name == the_object->name.name_u32 ) { 10cedf: 39 4a 0c cmp %ecx,0xc(%edx) 10cee2: 74 18 je 10cefc <_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++ ) { 10cee4: 40 inc %eax 10cee5: 39 c6 cmp %eax,%esi 10cee7: 73 ef jae 10ced8 <_Objects_Name_to_id_u32+0x3c> 10cee9: eb d3 jmp 10cebe <_Objects_Name_to_id_u32+0x22> 10ceeb: 90 nop <== NOT EXECUTED return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && (node == OBJECTS_SEARCH_ALL_NODES || 10ceec: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10cef2: 74 d8 je 10cecc <_Objects_Name_to_id_u32+0x30> node == OBJECTS_SEARCH_LOCAL_NODE || 10cef4: 4a dec %edx 10cef5: 75 c7 jne 10cebe <_Objects_Name_to_id_u32+0x22> 10cef7: eb d3 jmp 10cecc <_Objects_Name_to_id_u32+0x30> 10cef9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_object = information->local_table[ index ]; if ( !the_object ) continue; if ( name == the_object->name.name_u32 ) { *id = the_object->id; 10cefc: 8b 42 08 mov 0x8(%edx),%eax 10ceff: 89 07 mov %eax,(%edi) return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10cf01: 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 } 10cf03: 5b pop %ebx 10cf04: 5e pop %esi 10cf05: 5f pop %edi 10cf06: c9 leave 10cf07: c3 ret #endif /* ASSERT: information->is_string == false */ if ( !id ) return OBJECTS_INVALID_ADDRESS; 10cf08: 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 } 10cf0d: 5b pop %ebx 10cf0e: 5e pop %esi 10cf0f: 5f pop %edi 10cf10: c9 leave 10cf11: c3 ret =============================================================================== 0010ed7c <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10ed7c: 55 push %ebp 10ed7d: 89 e5 mov %esp,%ebp 10ed7f: 53 push %ebx 10ed80: 83 ec 0c sub $0xc,%esp 10ed83: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10ed86: 8b 45 08 mov 0x8(%ebp),%eax 10ed89: 0f b7 40 38 movzwl 0x38(%eax),%eax 10ed8d: 50 push %eax 10ed8e: 53 push %ebx 10ed8f: e8 54 66 00 00 call 1153e8 d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10ed94: 0f be 0b movsbl (%ebx),%ecx 10ed97: c1 e1 18 shl $0x18,%ecx 10ed9a: 83 c4 10 add $0x10,%esp 10ed9d: 83 f8 01 cmp $0x1,%eax 10eda0: 76 32 jbe 10edd4 <_Objects_Set_name+0x58> 10eda2: 0f be 53 01 movsbl 0x1(%ebx),%edx 10eda6: c1 e2 10 shl $0x10,%edx 10eda9: 09 ca or %ecx,%edx 10edab: 83 f8 02 cmp $0x2,%eax 10edae: 74 2c je 10eddc <_Objects_Set_name+0x60> 10edb0: 0f be 4b 02 movsbl 0x2(%ebx),%ecx 10edb4: c1 e1 08 shl $0x8,%ecx 10edb7: 09 d1 or %edx,%ecx 10edb9: 83 f8 03 cmp $0x3,%eax 10edbc: 74 37 je 10edf5 <_Objects_Set_name+0x79> 10edbe: 0f be 43 03 movsbl 0x3(%ebx),%eax 10edc2: 09 c1 or %eax,%ecx 10edc4: 8b 55 0c mov 0xc(%ebp),%edx 10edc7: 89 4a 0c mov %ecx,0xc(%edx) ); } return true; } 10edca: b0 01 mov $0x1,%al 10edcc: 8b 5d fc mov -0x4(%ebp),%ebx 10edcf: c9 leave 10edd0: c3 ret 10edd1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10edd4: 89 ca mov %ecx,%edx 10edd6: 81 ca 00 00 20 00 or $0x200000,%edx 10eddc: 89 d1 mov %edx,%ecx 10edde: 80 cd 20 or $0x20,%ch 10ede1: b8 20 00 00 00 mov $0x20,%eax 10ede6: 09 c1 or %eax,%ecx 10ede8: 8b 55 0c mov 0xc(%ebp),%edx 10edeb: 89 4a 0c mov %ecx,0xc(%edx) ); } return true; } 10edee: b0 01 mov $0x1,%al 10edf0: 8b 5d fc mov -0x4(%ebp),%ebx 10edf3: c9 leave 10edf4: c3 ret d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10edf5: b8 20 00 00 00 mov $0x20,%eax 10edfa: eb c6 jmp 10edc2 <_Objects_Set_name+0x46> =============================================================================== 0010cf14 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10cf14: 55 push %ebp 10cf15: 89 e5 mov %esp,%ebp 10cf17: 57 push %edi 10cf18: 56 push %esi 10cf19: 53 push %ebx 10cf1a: 83 ec 1c sub $0x1c,%esp /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 10cf1d: 8b 45 08 mov 0x8(%ebp),%eax 10cf20: 0f b7 58 08 movzwl 0x8(%eax),%ebx block_count = (information->maximum - index_base) / 10cf24: 0f b7 48 14 movzwl 0x14(%eax),%ecx 10cf28: 0f b7 40 10 movzwl 0x10(%eax),%eax 10cf2c: 29 d8 sub %ebx,%eax 10cf2e: 31 d2 xor %edx,%edx 10cf30: f7 f1 div %ecx information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10cf32: 85 c0 test %eax,%eax 10cf34: 74 21 je 10cf57 <_Objects_Shrink_information+0x43><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 10cf36: 8b 55 08 mov 0x8(%ebp),%edx 10cf39: 8b 7a 30 mov 0x30(%edx),%edi 10cf3c: 3b 0f cmp (%edi),%ecx 10cf3e: 74 1f je 10cf5f <_Objects_Shrink_information+0x4b><== NEVER TAKEN 10cf40: 31 d2 xor %edx,%edx 10cf42: eb 0e jmp 10cf52 <_Objects_Shrink_information+0x3e> information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 10cf44: 01 cb add %ecx,%ebx 10cf46: 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 ] == 10cf4d: 3b 0c 97 cmp (%edi,%edx,4),%ecx 10cf50: 74 12 je 10cf64 <_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++ ) { 10cf52: 42 inc %edx 10cf53: 39 d0 cmp %edx,%eax 10cf55: 77 ed ja 10cf44 <_Objects_Shrink_information+0x30> return; } index_base += information->allocation_size; } } 10cf57: 8d 65 f4 lea -0xc(%ebp),%esp 10cf5a: 5b pop %ebx 10cf5b: 5e pop %esi 10cf5c: 5f pop %edi 10cf5d: c9 leave 10cf5e: 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 ] == 10cf5f: 31 f6 xor %esi,%esi <== NOT EXECUTED 10cf61: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 10cf64: 8b 55 08 mov 0x8(%ebp),%edx 10cf67: 8b 42 20 mov 0x20(%edx),%eax 10cf6a: 89 75 e4 mov %esi,-0x1c(%ebp) 10cf6d: eb 07 jmp 10cf76 <_Objects_Shrink_information+0x62> 10cf6f: 90 nop <== NOT EXECUTED if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 10cf70: 85 ff test %edi,%edi 10cf72: 74 2c je 10cfa0 <_Objects_Shrink_information+0x8c> index = _Objects_Get_index( the_object->id ); /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 10cf74: 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 ); 10cf76: 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; 10cf7a: 8b 38 mov (%eax),%edi if ((index >= index_base) && 10cf7c: 39 da cmp %ebx,%edx 10cf7e: 72 f0 jb 10cf70 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { 10cf80: 8b 75 08 mov 0x8(%ebp),%esi 10cf83: 0f b7 4e 14 movzwl 0x14(%esi),%ecx 10cf87: 8d 0c 0b lea (%ebx,%ecx,1),%ecx /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && 10cf8a: 39 ca cmp %ecx,%edx 10cf8c: 73 e2 jae 10cf70 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 10cf8e: 83 ec 0c sub $0xc,%esp 10cf91: 50 push %eax 10cf92: e8 ed ef ff ff call 10bf84 <_Chain_Extract> 10cf97: 83 c4 10 add $0x10,%esp } } while ( the_object ); 10cf9a: 85 ff test %edi,%edi 10cf9c: 75 d6 jne 10cf74 <_Objects_Shrink_information+0x60> 10cf9e: 66 90 xchg %ax,%ax 10cfa0: 8b 75 e4 mov -0x1c(%ebp),%esi /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10cfa3: 83 ec 0c sub $0xc,%esp 10cfa6: 8b 55 08 mov 0x8(%ebp),%edx 10cfa9: 8b 42 34 mov 0x34(%edx),%eax 10cfac: ff 34 30 pushl (%eax,%esi,1) 10cfaf: e8 8c 17 00 00 call 10e740 <_Workspace_Free> information->object_blocks[ block ] = NULL; 10cfb4: 8b 55 08 mov 0x8(%ebp),%edx 10cfb7: 8b 42 34 mov 0x34(%edx),%eax 10cfba: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive_per_block[ block ] = 0; 10cfc1: 8b 42 30 mov 0x30(%edx),%eax 10cfc4: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive -= information->allocation_size; 10cfcb: 8b 42 14 mov 0x14(%edx),%eax 10cfce: 66 29 42 2c sub %ax,0x2c(%edx) return; 10cfd2: 83 c4 10 add $0x10,%esp } index_base += information->allocation_size; } } 10cfd5: 8d 65 f4 lea -0xc(%ebp),%esp 10cfd8: 5b pop %ebx 10cfd9: 5e pop %esi 10cfda: 5f pop %edi 10cfdb: c9 leave 10cfdc: c3 ret =============================================================================== 0010d73c <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 10d73c: 55 push %ebp 10d73d: 89 e5 mov %esp,%ebp 10d73f: 56 push %esi 10d740: 53 push %ebx 10d741: 8b 5d 08 mov 0x8(%ebp),%ebx 10d744: 8b 75 0c mov 0xc(%ebp),%esi if ( !the_heap ) 10d747: 85 db test %ebx,%ebx 10d749: 74 35 je 10d780 <_Protected_heap_Get_information+0x44> return false; if ( !the_info ) 10d74b: 85 f6 test %esi,%esi 10d74d: 74 31 je 10d780 <_Protected_heap_Get_information+0x44> return false; _RTEMS_Lock_allocator(); 10d74f: 83 ec 0c sub $0xc,%esp 10d752: ff 35 a4 65 12 00 pushl 0x1265a4 10d758: e8 7b ee ff ff call 10c5d8 <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 10d75d: 5a pop %edx 10d75e: 59 pop %ecx 10d75f: 56 push %esi 10d760: 53 push %ebx 10d761: e8 16 3c 00 00 call 11137c <_Heap_Get_information> _RTEMS_Unlock_allocator(); 10d766: 58 pop %eax 10d767: ff 35 a4 65 12 00 pushl 0x1265a4 10d76d: e8 ae ee ff ff call 10c620 <_API_Mutex_Unlock> return true; 10d772: 83 c4 10 add $0x10,%esp 10d775: b0 01 mov $0x1,%al } 10d777: 8d 65 f8 lea -0x8(%ebp),%esp 10d77a: 5b pop %ebx 10d77b: 5e pop %esi 10d77c: c9 leave 10d77d: c3 ret 10d77e: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !the_heap ) return false; if ( !the_info ) return false; 10d780: 31 c0 xor %eax,%eax _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); return true; } 10d782: 8d 65 f8 lea -0x8(%ebp),%esp 10d785: 5b pop %ebx 10d786: 5e pop %esi 10d787: c9 leave 10d788: c3 ret =============================================================================== 00110ac4 <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 110ac4: 55 push %ebp 110ac5: 89 e5 mov %esp,%ebp 110ac7: 56 push %esi 110ac8: 53 push %ebx 110ac9: 83 ec 10 sub $0x10,%esp 110acc: 8b 5d 08 mov 0x8(%ebp),%ebx 110acf: 8b 75 0c mov 0xc(%ebp),%esi 110ad2: 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 ) { 110ad5: 8b 15 54 d2 12 00 mov 0x12d254,%edx 110adb: 85 d2 test %edx,%edx 110add: 74 19 je 110af8 <_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 ); 110adf: 0f b6 c0 movzbl %al,%eax 110ae2: 89 45 10 mov %eax,0x10(%ebp) 110ae5: 89 75 0c mov %esi,0xc(%ebp) 110ae8: 89 5d 08 mov %ebx,0x8(%ebp) } return status; } 110aeb: 8d 65 f8 lea -0x8(%ebp),%esp 110aee: 5b pop %ebx 110aef: 5e pop %esi 110af0: 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 ); 110af1: e9 76 f2 ff ff jmp 10fd6c <_Heap_Walk> 110af6: 66 90 xchg %ax,%ax <== NOT EXECUTED * 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(); 110af8: 83 ec 0c sub $0xc,%esp 110afb: ff 35 04 d3 12 00 pushl 0x12d304 110b01: 88 45 f4 mov %al,-0xc(%ebp) 110b04: e8 83 e4 ff ff call 10ef8c <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 110b09: 83 c4 0c add $0xc,%esp 110b0c: 8a 45 f4 mov -0xc(%ebp),%al 110b0f: 0f b6 c0 movzbl %al,%eax 110b12: 50 push %eax 110b13: 56 push %esi 110b14: 53 push %ebx 110b15: e8 52 f2 ff ff call 10fd6c <_Heap_Walk> _RTEMS_Unlock_allocator(); 110b1a: 5a pop %edx 110b1b: ff 35 04 d3 12 00 pushl 0x12d304 110b21: 88 45 f4 mov %al,-0xc(%ebp) 110b24: e8 ab e4 ff ff call 10efd4 <_API_Mutex_Unlock> 110b29: 83 c4 10 add $0x10,%esp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 110b2c: 8a 45 f4 mov -0xc(%ebp),%al 110b2f: 8d 65 f8 lea -0x8(%ebp),%esp 110b32: 5b pop %ebx 110b33: 5e pop %esi 110b34: c9 leave 110b35: c3 ret =============================================================================== 00110264 <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 110264: 55 push %ebp 110265: 89 e5 mov %esp,%ebp 110267: 53 push %ebx 110268: 83 ec 10 sub $0x10,%esp 11026b: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); 11026e: 80 3d e4 11 12 00 01 cmpb $0x1,0x1211e4 110275: 19 c0 sbb %eax,%eax 110277: 83 e0 c0 and $0xffffffc0,%eax 11027a: 83 c0 60 add $0x60,%eax if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 11027d: 50 push %eax 11027e: e8 a1 e4 ff ff call 10e724 <_Workspace_Allocate> if ( !api ) 110283: 83 c4 10 add $0x10,%esp 110286: 85 c0 test %eax,%eax 110288: 74 6a je 1102f4 <_RTEMS_tasks_Create_extension+0x90> return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 11028a: 89 83 f0 00 00 00 mov %eax,0xf0(%ebx) api->pending_events = EVENT_SETS_NONE_PENDING; 110290: c7 00 00 00 00 00 movl $0x0,(%eax) api->event_condition = 0; 110296: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 11029d: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 1102a1: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 1102a8: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 1102af: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 1102b6: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 1102bd: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 1102c4: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 1102cb: 00 00 00 if ( rtems_configuration_get_notepads_enabled() ) { 1102ce: 80 3d e4 11 12 00 00 cmpb $0x0,0x1211e4 1102d5: 74 13 je 1102ea <_RTEMS_tasks_Create_extension+0x86> 1102d7: 31 d2 xor %edx,%edx 1102d9: 8d 76 00 lea 0x0(%esi),%esi for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 1102dc: c7 44 90 20 00 00 00 movl $0x0,0x20(%eax,%edx,4) 1102e3: 00 api->event_condition = 0; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) 1102e4: 42 inc %edx 1102e5: 83 fa 10 cmp $0x10,%edx 1102e8: 75 f2 jne 1102dc <_RTEMS_tasks_Create_extension+0x78> api->Notepads[i] = 0; } return true; 1102ea: b0 01 mov $0x1,%al } 1102ec: 8b 5d fc mov -0x4(%ebp),%ebx 1102ef: c9 leave 1102f0: c3 ret 1102f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); if ( !api ) return false; 1102f4: 31 c0 xor %eax,%eax for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } 1102f6: 8b 5d fc mov -0x4(%ebp),%ebx 1102f9: c9 leave 1102fa: c3 ret =============================================================================== 0011020c <_RTEMS_tasks_Delete_extension>: void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { 11020c: 55 push %ebp 11020d: 89 e5 mov %esp,%ebp 11020f: 56 push %esi 110210: 53 push %ebx 110211: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Free per task variable memory */ tvp = deleted->task_variables; 110214: 8b 83 fc 00 00 00 mov 0xfc(%ebx),%eax deleted->task_variables = NULL; 11021a: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 110221: 00 00 00 while (tvp) { 110224: 85 c0 test %eax,%eax 110226: 75 06 jne 11022e <_RTEMS_tasks_Delete_extension+0x22> 110228: eb 17 jmp 110241 <_RTEMS_tasks_Delete_extension+0x35> 11022a: 66 90 xchg %ax,%ax <== NOT EXECUTED next = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); tvp = next; 11022c: 89 f0 mov %esi,%eax */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { next = (rtems_task_variable_t *)tvp->next; 11022e: 8b 30 mov (%eax),%esi _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 110230: 83 ec 08 sub $0x8,%esp 110233: 50 push %eax 110234: 53 push %ebx 110235: e8 56 01 00 00 call 110390 <_RTEMS_Tasks_Invoke_task_variable_dtor> * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 11023a: 83 c4 10 add $0x10,%esp 11023d: 85 f6 test %esi,%esi 11023f: 75 eb jne 11022c <_RTEMS_tasks_Delete_extension+0x20> /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); 110241: 83 ec 0c sub $0xc,%esp 110244: ff b3 f0 00 00 00 pushl 0xf0(%ebx) 11024a: e8 f1 e4 ff ff call 10e740 <_Workspace_Free> deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; 11024f: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 110256: 00 00 00 110259: 83 c4 10 add $0x10,%esp } 11025c: 8d 65 f8 lea -0x8(%ebp),%esp 11025f: 5b pop %ebx 110260: 5e pop %esi 110261: c9 leave 110262: c3 ret =============================================================================== 00110190 <_RTEMS_tasks_Initialize_user_tasks>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks( void ) { 110190: 55 push %ebp 110191: 89 e5 mov %esp,%ebp 110193: 83 ec 08 sub $0x8,%esp if ( _RTEMS_tasks_Initialize_user_tasks_p ) 110196: a1 60 12 12 00 mov 0x121260,%eax 11019b: 85 c0 test %eax,%eax 11019d: 74 05 je 1101a4 <_RTEMS_tasks_Initialize_user_tasks+0x14> (*_RTEMS_tasks_Initialize_user_tasks_p)(); } 11019f: c9 leave */ void _RTEMS_tasks_Initialize_user_tasks( void ) { if ( _RTEMS_tasks_Initialize_user_tasks_p ) (*_RTEMS_tasks_Initialize_user_tasks_p)(); 1101a0: ff e0 jmp *%eax 1101a2: 66 90 xchg %ax,%ax <== NOT EXECUTED } 1101a4: c9 leave 1101a5: c3 ret =============================================================================== 0010ba60 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 10ba60: 55 push %ebp 10ba61: 89 e5 mov %esp,%ebp 10ba63: 57 push %edi 10ba64: 56 push %esi 10ba65: 53 push %ebx 10ba66: 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; 10ba69: 8b 1d 0c 12 12 00 mov 0x12120c,%ebx maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 10ba6f: 8b 3d 08 12 12 00 mov 0x121208,%edi /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 10ba75: 85 db test %ebx,%ebx 10ba77: 74 46 je 10babf <_RTEMS_tasks_Initialize_user_tasks_body+0x5f> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10ba79: 85 ff test %edi,%edi 10ba7b: 74 42 je 10babf <_RTEMS_tasks_Initialize_user_tasks_body+0x5f><== NEVER TAKEN 10ba7d: 31 f6 xor %esi,%esi 10ba7f: 90 nop return_value = rtems_task_create( 10ba80: 83 ec 08 sub $0x8,%esp 10ba83: 8d 45 e4 lea -0x1c(%ebp),%eax 10ba86: 50 push %eax 10ba87: ff 73 0c pushl 0xc(%ebx) 10ba8a: ff 73 14 pushl 0x14(%ebx) 10ba8d: ff 73 04 pushl 0x4(%ebx) 10ba90: ff 73 08 pushl 0x8(%ebx) 10ba93: ff 33 pushl (%ebx) 10ba95: e8 92 fd ff ff call 10b82c user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 10ba9a: 83 c4 20 add $0x20,%esp 10ba9d: 85 c0 test %eax,%eax 10ba9f: 75 26 jne 10bac7 <_RTEMS_tasks_Initialize_user_tasks_body+0x67> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 10baa1: 51 push %ecx 10baa2: ff 73 18 pushl 0x18(%ebx) 10baa5: ff 73 10 pushl 0x10(%ebx) 10baa8: ff 75 e4 pushl -0x1c(%ebp) 10baab: e8 24 00 00 00 call 10bad4 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 10bab0: 83 c4 10 add $0x10,%esp 10bab3: 85 c0 test %eax,%eax 10bab5: 75 10 jne 10bac7 <_RTEMS_tasks_Initialize_user_tasks_body+0x67> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10bab7: 46 inc %esi 10bab8: 83 c3 1c add $0x1c,%ebx 10babb: 39 f7 cmp %esi,%edi 10babd: 77 c1 ja 10ba80 <_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 ); } } 10babf: 8d 65 f4 lea -0xc(%ebp),%esp 10bac2: 5b pop %ebx 10bac3: 5e pop %esi 10bac4: 5f pop %edi 10bac5: c9 leave 10bac6: 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 ); 10bac7: 52 push %edx 10bac8: 50 push %eax 10bac9: 6a 01 push $0x1 10bacb: 6a 01 push $0x1 10bacd: e8 2a 0d 00 00 call 10c7fc <_Internal_error_Occurred> =============================================================================== 001101a8 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 1101a8: 55 push %ebp 1101a9: 89 e5 mov %esp,%ebp 1101ab: 57 push %edi 1101ac: 56 push %esi 1101ad: 53 push %ebx 1101ae: 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 ]; 1101b1: 8b 45 08 mov 0x8(%ebp),%eax 1101b4: 8b 98 f0 00 00 00 mov 0xf0(%eax),%ebx if ( !api ) 1101ba: 85 db test %ebx,%ebx 1101bc: 74 45 je 110203 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 1101be: 9c pushf 1101bf: fa cli 1101c0: 58 pop %eax signal_set = asr->signals_posted; 1101c1: 8b 73 14 mov 0x14(%ebx),%esi asr->signals_posted = 0; 1101c4: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 1101cb: 50 push %eax 1101cc: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 1101cd: 85 f6 test %esi,%esi 1101cf: 74 32 je 110203 <_RTEMS_tasks_Post_switch_extension+0x5b> return; asr->nest_level += 1; 1101d1: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 1101d4: 50 push %eax 1101d5: 8d 7d e4 lea -0x1c(%ebp),%edi 1101d8: 57 push %edi 1101d9: 68 ff ff 00 00 push $0xffff 1101de: ff 73 10 pushl 0x10(%ebx) 1101e1: e8 b2 1c 00 00 call 111e98 (*asr->handler)( signal_set ); 1101e6: 89 34 24 mov %esi,(%esp) 1101e9: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 1101ec: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 1101ef: 83 c4 0c add $0xc,%esp 1101f2: 57 push %edi 1101f3: 68 ff ff 00 00 push $0xffff 1101f8: ff 75 e4 pushl -0x1c(%ebp) 1101fb: e8 98 1c 00 00 call 111e98 110200: 83 c4 10 add $0x10,%esp } 110203: 8d 65 f4 lea -0xc(%ebp),%esp 110206: 5b pop %ebx 110207: 5e pop %esi 110208: 5f pop %edi 110209: c9 leave 11020a: c3 ret =============================================================================== 00110148 <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 110148: 55 push %ebp 110149: 89 e5 mov %esp,%ebp /* * Per Task Variables */ tvp = executing->task_variables; 11014b: 8b 45 08 mov 0x8(%ebp),%eax 11014e: 8b 80 fc 00 00 00 mov 0xfc(%eax),%eax while (tvp) { 110154: 85 c0 test %eax,%eax 110156: 74 13 je 11016b <_RTEMS_tasks_Switch_extension+0x23> tvp->tval = *tvp->ptr; 110158: 8b 50 04 mov 0x4(%eax),%edx 11015b: 8b 0a mov (%edx),%ecx 11015d: 89 48 0c mov %ecx,0xc(%eax) *tvp->ptr = tvp->gval; 110160: 8b 48 08 mov 0x8(%eax),%ecx 110163: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 110165: 8b 00 mov (%eax),%eax /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 110167: 85 c0 test %eax,%eax 110169: 75 ed jne 110158 <_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; 11016b: 8b 45 0c mov 0xc(%ebp),%eax 11016e: 8b 80 fc 00 00 00 mov 0xfc(%eax),%eax while (tvp) { 110174: 85 c0 test %eax,%eax 110176: 74 13 je 11018b <_RTEMS_tasks_Switch_extension+0x43> tvp->gval = *tvp->ptr; 110178: 8b 50 04 mov 0x4(%eax),%edx 11017b: 8b 0a mov (%edx),%ecx 11017d: 89 48 08 mov %ecx,0x8(%eax) *tvp->ptr = tvp->tval; 110180: 8b 48 0c mov 0xc(%eax),%ecx 110183: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 110185: 8b 00 mov (%eax),%eax *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 110187: 85 c0 test %eax,%eax 110189: 75 ed jne 110178 <_RTEMS_tasks_Switch_extension+0x30><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 11018b: c9 leave 11018c: c3 ret =============================================================================== 0010c424 <_Rate_monotonic_Get_status>: bool _Rate_monotonic_Get_status( Rate_monotonic_Control *the_period, Rate_monotonic_Period_time_t *wall_since_last_period, Thread_CPU_usage_t *cpu_since_last_period ) { 10c424: 55 push %ebp 10c425: 89 e5 mov %esp,%ebp 10c427: 57 push %edi 10c428: 56 push %esi 10c429: 53 push %ebx 10c42a: 83 ec 38 sub $0x38,%esp 10c42d: 8b 5d 08 mov 0x8(%ebp),%ebx #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; 10c430: 8b 7b 40 mov 0x40(%ebx),%edi /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 10c433: 8d 75 e0 lea -0x20(%ebp),%esi 10c436: 56 push %esi 10c437: e8 58 18 00 00 call 10dc94 <_TOD_Get_uptime> _Timestamp_Subtract( 10c43c: 83 c4 0c add $0xc,%esp 10c43f: ff 75 0c pushl 0xc(%ebp) 10c442: 56 push %esi 10c443: 8d 43 4c lea 0x4c(%ebx),%eax 10c446: 50 push %eax 10c447: e8 10 39 00 00 call 10fd5c <_Timespec_Subtract> #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; 10c44c: 8b 87 84 00 00 00 mov 0x84(%edi),%eax 10c452: 8b 97 88 00 00 00 mov 0x88(%edi),%edx 10c458: 89 45 d8 mov %eax,-0x28(%ebp) 10c45b: 89 55 dc mov %edx,-0x24(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 10c45e: 83 c4 10 add $0x10,%esp 10c461: 39 3d 18 88 12 00 cmp %edi,0x128818 10c467: 74 0b je 10c474 <_Rate_monotonic_Get_status+0x50> if (used < the_period->cpu_usage_period_initiated) return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; 10c469: b0 01 mov $0x1,%al } 10c46b: 8d 65 f4 lea -0xc(%ebp),%esp 10c46e: 5b pop %ebx 10c46f: 5e pop %esi 10c470: 5f pop %edi 10c471: c9 leave 10c472: c3 ret 10c473: 90 nop <== NOT EXECUTED if (owning_thread == _Thread_Executing) { Thread_CPU_usage_t ran; /* How much time time since last context switch */ _Timestamp_Subtract( 10c474: 52 push %edx 10c475: 8d 7d d0 lea -0x30(%ebp),%edi 10c478: 57 push %edi 10c479: 56 push %esi 10c47a: 68 30 86 12 00 push $0x128630 10c47f: e8 d8 38 00 00 call 10fd5c <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); /* cpu usage += ran */ _Timestamp_Add_to( &used, &ran ); 10c484: 5e pop %esi 10c485: 58 pop %eax 10c486: 57 push %edi 10c487: 8d 75 d8 lea -0x28(%ebp),%esi 10c48a: 56 push %esi 10c48b: e8 d0 37 00 00 call 10fc60 <_Timespec_Add_to> /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) 10c490: 83 c3 44 add $0x44,%ebx 10c493: 5a pop %edx 10c494: 59 pop %ecx 10c495: 53 push %ebx 10c496: 56 push %esi 10c497: e8 9c 38 00 00 call 10fd38 <_Timespec_Less_than> 10c49c: 83 c4 10 add $0x10,%esp 10c49f: 84 c0 test %al,%al 10c4a1: 74 05 je 10c4a8 <_Rate_monotonic_Get_status+0x84> return false; 10c4a3: 31 c0 xor %eax,%eax 10c4a5: eb c4 jmp 10c46b <_Rate_monotonic_Get_status+0x47> 10c4a7: 90 nop <== NOT EXECUTED /* used = current cpu usage - cpu usage at start of period */ _Timestamp_Subtract( 10c4a8: 50 push %eax 10c4a9: ff 75 10 pushl 0x10(%ebp) 10c4ac: 56 push %esi 10c4ad: 53 push %ebx 10c4ae: e8 a9 38 00 00 call 10fd5c <_Timespec_Subtract> 10c4b3: 83 c4 10 add $0x10,%esp if (used < the_period->cpu_usage_period_initiated) return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; 10c4b6: b0 01 mov $0x1,%al 10c4b8: eb b1 jmp 10c46b <_Rate_monotonic_Get_status+0x47> =============================================================================== 0010c4bc <_Rate_monotonic_Initiate_statistics>: } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { 10c4bc: 55 push %ebp 10c4bd: 89 e5 mov %esp,%ebp 10c4bf: 57 push %edi 10c4c0: 56 push %esi 10c4c1: 53 push %ebx 10c4c2: 83 ec 28 sub $0x28,%esp 10c4c5: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *owning_thread = the_period->owner; 10c4c8: 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 ); 10c4cb: 8d 7d e0 lea -0x20(%ebp),%edi 10c4ce: 57 push %edi 10c4cf: e8 c0 17 00 00 call 10dc94 <_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; 10c4d4: 8b 45 e0 mov -0x20(%ebp),%eax 10c4d7: 8b 55 e4 mov -0x1c(%ebp),%edx 10c4da: 89 43 4c mov %eax,0x4c(%ebx) 10c4dd: 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; 10c4e0: 8b 86 84 00 00 00 mov 0x84(%esi),%eax 10c4e6: 8b 96 88 00 00 00 mov 0x88(%esi),%edx 10c4ec: 89 43 44 mov %eax,0x44(%ebx) 10c4ef: 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) { 10c4f2: 83 c4 10 add $0x10,%esp 10c4f5: 39 35 18 88 12 00 cmp %esi,0x128818 10c4fb: 74 0b je 10c508 <_Rate_monotonic_Initiate_statistics+0x4c> ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); } #endif } 10c4fd: 8d 65 f4 lea -0xc(%ebp),%esp 10c500: 5b pop %ebx 10c501: 5e pop %esi 10c502: 5f pop %edi 10c503: c9 leave 10c504: c3 ret 10c505: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 10c508: 50 push %eax &_Thread_Time_of_last_context_switch, &uptime, &ran 10c509: 8d 75 d8 lea -0x28(%ebp),%esi /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 10c50c: 56 push %esi 10c50d: 57 push %edi 10c50e: 68 30 86 12 00 push $0x128630 10c513: e8 44 38 00 00 call 10fd5c <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); 10c518: 59 pop %ecx 10c519: 5f pop %edi 10c51a: 56 push %esi 10c51b: 83 c3 44 add $0x44,%ebx 10c51e: 53 push %ebx 10c51f: e8 3c 37 00 00 call 10fc60 <_Timespec_Add_to> 10c524: 83 c4 10 add $0x10,%esp } #endif } 10c527: 8d 65 f4 lea -0xc(%ebp),%esp 10c52a: 5b pop %ebx 10c52b: 5e pop %esi 10c52c: 5f pop %edi 10c52d: c9 leave 10c52e: c3 ret =============================================================================== 0010ca78 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 10ca78: 55 push %ebp 10ca79: 89 e5 mov %esp,%ebp 10ca7b: 83 ec 2c sub $0x2c,%esp /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); 10ca7e: 8d 45 f4 lea -0xc(%ebp),%eax 10ca81: 50 push %eax 10ca82: ff 75 08 pushl 0x8(%ebp) 10ca85: 68 80 84 12 00 push $0x128480 10ca8a: e8 89 1c 00 00 call 10e718 <_Objects_Get> switch ( location ) { 10ca8f: 83 c4 10 add $0x10,%esp 10ca92: 8b 55 f4 mov -0xc(%ebp),%edx 10ca95: 85 d2 test %edx,%edx 10ca97: 75 29 jne 10cac2 <_Rate_monotonic_Timeout+0x4a><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 10ca99: 8b 50 40 mov 0x40(%eax),%edx if ( _States_Is_waiting_for_period( the_thread->current_state ) && 10ca9c: f6 42 11 40 testb $0x40,0x11(%edx) 10caa0: 74 08 je 10caaa <_Rate_monotonic_Timeout+0x32> 10caa2: 8b 48 08 mov 0x8(%eax),%ecx 10caa5: 39 4a 20 cmp %ecx,0x20(%edx) 10caa8: 74 4e je 10caf8 <_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 ) { 10caaa: 83 78 38 01 cmpl $0x1,0x38(%eax) 10caae: 74 14 je 10cac4 <_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; 10cab0: 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; 10cab7: a1 74 85 12 00 mov 0x128574,%eax 10cabc: 48 dec %eax 10cabd: a3 74 85 12 00 mov %eax,0x128574 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10cac2: c9 leave 10cac3: 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; 10cac4: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax) _Rate_monotonic_Initiate_statistics( the_period ); 10cacb: 83 ec 0c sub $0xc,%esp 10cace: 50 push %eax 10cacf: 89 45 e4 mov %eax,-0x1c(%ebp) 10cad2: e8 e5 f9 ff ff call 10c4bc <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10cad7: 8b 45 e4 mov -0x1c(%ebp),%eax 10cada: 8b 50 3c mov 0x3c(%eax),%edx 10cadd: 89 50 1c mov %edx,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10cae0: 5a pop %edx 10cae1: 59 pop %ecx _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); 10cae2: 83 c0 10 add $0x10,%eax 10cae5: 50 push %eax 10cae6: 68 44 86 12 00 push $0x128644 10caeb: e8 4c 35 00 00 call 11003c <_Watchdog_Insert> 10caf0: 83 c4 10 add $0x10,%esp 10caf3: eb c2 jmp 10cab7 <_Rate_monotonic_Timeout+0x3f> 10caf5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10caf8: 83 ec 08 sub $0x8,%esp 10cafb: 68 f8 ff 03 10 push $0x1003fff8 10cb00: 52 push %edx 10cb01: 89 45 e4 mov %eax,-0x1c(%ebp) 10cb04: e8 af 20 00 00 call 10ebb8 <_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 ); 10cb09: 8b 45 e4 mov -0x1c(%ebp),%eax 10cb0c: 89 04 24 mov %eax,(%esp) 10cb0f: eb c1 jmp 10cad2 <_Rate_monotonic_Timeout+0x5a> =============================================================================== 0010c530 <_Rate_monotonic_Update_statistics>: void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 10c530: 55 push %ebp 10c531: 89 e5 mov %esp,%ebp 10c533: 57 push %edi 10c534: 56 push %esi 10c535: 53 push %ebx 10c536: 83 ec 1c sub $0x1c,%esp 10c539: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 10c53c: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 10c53f: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 10c543: 0f 84 bf 00 00 00 je 10c608 <_Rate_monotonic_Update_statistics+0xd8> stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10c549: 51 push %ecx _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 10c54a: 8d 7d e0 lea -0x20(%ebp),%edi stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10c54d: 57 push %edi _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 10c54e: 8d 75 d8 lea -0x28(%ebp),%esi stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 10c551: 56 push %esi 10c552: 53 push %ebx 10c553: e8 cc fe ff ff call 10c424 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) 10c558: 83 c4 10 add $0x10,%esp 10c55b: 84 c0 test %al,%al 10c55d: 75 09 jne 10c568 <_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 } 10c55f: 8d 65 f4 lea -0xc(%ebp),%esp 10c562: 5b pop %ebx 10c563: 5e pop %esi 10c564: 5f pop %edi 10c565: c9 leave 10c566: c3 ret 10c567: 90 nop <== NOT EXECUTED /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 10c568: 83 ec 08 sub $0x8,%esp 10c56b: 57 push %edi 10c56c: 8d 43 6c lea 0x6c(%ebx),%eax 10c56f: 50 push %eax 10c570: e8 eb 36 00 00 call 10fc60 <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 10c575: 58 pop %eax 10c576: 5a pop %edx 10c577: 8d 43 5c lea 0x5c(%ebx),%eax 10c57a: 50 push %eax 10c57b: 57 push %edi 10c57c: e8 b7 37 00 00 call 10fd38 <_Timespec_Less_than> 10c581: 83 c4 10 add $0x10,%esp 10c584: 84 c0 test %al,%al 10c586: 74 0c je 10c594 <_Rate_monotonic_Update_statistics+0x64> stats->min_cpu_time = executed; 10c588: 8b 45 e0 mov -0x20(%ebp),%eax 10c58b: 8b 55 e4 mov -0x1c(%ebp),%edx 10c58e: 89 43 5c mov %eax,0x5c(%ebx) 10c591: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 10c594: 83 ec 08 sub $0x8,%esp 10c597: 8d 43 64 lea 0x64(%ebx),%eax 10c59a: 50 push %eax 10c59b: 57 push %edi 10c59c: e8 73 37 00 00 call 10fd14 <_Timespec_Greater_than> 10c5a1: 83 c4 10 add $0x10,%esp 10c5a4: 84 c0 test %al,%al 10c5a6: 74 0c je 10c5b4 <_Rate_monotonic_Update_statistics+0x84> stats->max_cpu_time = executed; 10c5a8: 8b 45 e0 mov -0x20(%ebp),%eax 10c5ab: 8b 55 e4 mov -0x1c(%ebp),%edx 10c5ae: 89 43 64 mov %eax,0x64(%ebx) 10c5b1: 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 ); 10c5b4: 83 ec 08 sub $0x8,%esp 10c5b7: 56 push %esi 10c5b8: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10c5be: 50 push %eax 10c5bf: e8 9c 36 00 00 call 10fc60 <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 10c5c4: 5a pop %edx 10c5c5: 59 pop %ecx 10c5c6: 8d 43 74 lea 0x74(%ebx),%eax 10c5c9: 50 push %eax 10c5ca: 56 push %esi 10c5cb: e8 68 37 00 00 call 10fd38 <_Timespec_Less_than> 10c5d0: 83 c4 10 add $0x10,%esp 10c5d3: 84 c0 test %al,%al 10c5d5: 75 39 jne 10c610 <_Rate_monotonic_Update_statistics+0xe0> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 10c5d7: 83 ec 08 sub $0x8,%esp 10c5da: 8d 43 7c lea 0x7c(%ebx),%eax 10c5dd: 50 push %eax 10c5de: 56 push %esi 10c5df: e8 30 37 00 00 call 10fd14 <_Timespec_Greater_than> 10c5e4: 83 c4 10 add $0x10,%esp 10c5e7: 84 c0 test %al,%al 10c5e9: 0f 84 70 ff ff ff je 10c55f <_Rate_monotonic_Update_statistics+0x2f> stats->max_wall_time = since_last_period; 10c5ef: 8b 45 d8 mov -0x28(%ebp),%eax 10c5f2: 8b 55 dc mov -0x24(%ebp),%edx 10c5f5: 89 43 7c mov %eax,0x7c(%ebx) 10c5f8: 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 } 10c5fe: 8d 65 f4 lea -0xc(%ebp),%esp 10c601: 5b pop %ebx 10c602: 5e pop %esi 10c603: 5f pop %edi 10c604: c9 leave 10c605: c3 ret 10c606: 66 90 xchg %ax,%ax <== NOT EXECUTED */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 10c608: ff 43 58 incl 0x58(%ebx) 10c60b: e9 39 ff ff ff jmp 10c549 <_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; 10c610: 8b 45 d8 mov -0x28(%ebp),%eax 10c613: 8b 55 dc mov -0x24(%ebp),%edx 10c616: 89 43 74 mov %eax,0x74(%ebx) 10c619: 89 53 78 mov %edx,0x78(%ebx) 10c61c: eb b9 jmp 10c5d7 <_Rate_monotonic_Update_statistics+0xa7> =============================================================================== 0010d9d0 <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 10d9d0: 55 push %ebp 10d9d1: 89 e5 mov %esp,%ebp 10d9d3: 53 push %ebx 10d9d4: 83 ec 04 sub $0x4,%esp 10d9d7: 8b 5d 08 mov 0x8(%ebp),%ebx 10d9da: a1 94 13 13 00 mov 0x131394,%eax 10d9df: 40 inc %eax 10d9e0: a3 94 13 13 00 mov %eax,0x131394 long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 10d9e5: a1 28 14 13 00 mov 0x131428,%eax if ( time->tv_sec < seconds ) 10d9ea: 8b 13 mov (%ebx),%edx 10d9ec: 39 d0 cmp %edx,%eax 10d9ee: 7f 34 jg 10da24 <_TOD_Set+0x54> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 10d9f0: 51 push %ecx _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); 10d9f1: 29 c2 sub %eax,%edx 10d9f3: 52 push %edx 10d9f4: 6a 00 push $0x0 10d9f6: 68 58 14 13 00 push $0x131458 10d9fb: e8 88 24 00 00 call 10fe88 <_Watchdog_Adjust> 10da00: 83 c4 10 add $0x10,%esp /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 10da03: 8b 03 mov (%ebx),%eax 10da05: a3 28 14 13 00 mov %eax,0x131428 10da0a: 8b 43 04 mov 0x4(%ebx),%eax 10da0d: a3 2c 14 13 00 mov %eax,0x13142c _TOD_Is_set = true; 10da12: c6 05 a8 13 13 00 01 movb $0x1,0x1313a8 _TOD_Activate(); _Thread_Enable_dispatch(); } 10da19: 8b 5d fc mov -0x4(%ebp),%ebx 10da1c: c9 leave _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); 10da1d: e9 d6 12 00 00 jmp 10ecf8 <_Thread_Enable_dispatch> 10da22: 66 90 xchg %ax,%ax <== NOT EXECUTED 10da24: 51 push %ecx _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); if ( time->tv_sec < seconds ) _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); 10da25: 29 d0 sub %edx,%eax 10da27: 50 push %eax 10da28: 6a 01 push $0x1 10da2a: 68 58 14 13 00 push $0x131458 10da2f: e8 54 24 00 00 call 10fe88 <_Watchdog_Adjust> 10da34: 83 c4 10 add $0x10,%esp 10da37: eb ca jmp 10da03 <_TOD_Set+0x33> =============================================================================== 0010c41c <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 10c41c: 55 push %ebp 10c41d: 89 e5 mov %esp,%ebp 10c41f: 53 push %ebx 10c420: 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() ); 10c423: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 10c42a: a1 2c 12 12 00 mov 0x12122c,%eax 10c42f: 8d 04 80 lea (%eax,%eax,4),%eax 10c432: 8d 04 80 lea (%eax,%eax,4),%eax 10c435: 8d 04 80 lea (%eax,%eax,4),%eax 10c438: c1 e0 03 shl $0x3,%eax 10c43b: 89 45 f4 mov %eax,-0xc(%ebp) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 10c43e: a1 84 55 12 00 mov 0x125584,%eax 10c443: 40 inc %eax 10c444: a3 84 55 12 00 mov %eax,0x125584 /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 10c449: 8d 5d f0 lea -0x10(%ebp),%ebx 10c44c: 53 push %ebx 10c44d: 68 b8 54 12 00 push $0x1254b8 10c452: e8 51 1d 00 00 call 10e1a8 <_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 ); 10c457: 58 pop %eax 10c458: 5a pop %edx 10c459: 53 push %ebx 10c45a: 68 c8 54 12 00 push $0x1254c8 10c45f: e8 44 1d 00 00 call 10e1a8 <_Timespec_Add_to> 10c464: 89 c3 mov %eax,%ebx while ( seconds ) { 10c466: 83 c4 10 add $0x10,%esp 10c469: 85 c0 test %eax,%eax 10c46b: 74 16 je 10c483 <_TOD_Tickle_ticks+0x67> 10c46d: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 10c470: 83 ec 0c sub $0xc,%esp 10c473: 68 f8 54 12 00 push $0x1254f8 10c478: e8 eb 21 00 00 call 10e668 <_Watchdog_Tickle> 10c47d: 83 c4 10 add $0x10,%esp 10c480: 4b dec %ebx 10c481: 75 ed jne 10c470 <_TOD_Tickle_ticks+0x54><== NEVER TAKEN _Watchdog_Tickle_seconds(); seconds--; } } 10c483: 8b 5d fc mov -0x4(%ebp),%ebx 10c486: c9 leave 10c487: c3 ret =============================================================================== 0010c1ac <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 10c1ac: 55 push %ebp 10c1ad: 89 e5 mov %esp,%ebp 10c1af: 56 push %esi 10c1b0: 53 push %ebx 10c1b1: 8b 55 08 mov 0x8(%ebp),%edx uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 10c1b4: 8b 72 08 mov 0x8(%edx),%esi 10c1b7: 4e dec %esi year_mod_4 = the_tod->year & 3; 10c1b8: 8b 02 mov (%edx),%eax if ( year_mod_4 == 0 ) 10c1ba: 89 c3 mov %eax,%ebx 10c1bc: 83 e3 03 and $0x3,%ebx 10c1bf: 74 67 je 10c228 <_TOD_To_seconds+0x7c> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 10c1c1: 8b 4a 04 mov 0x4(%edx),%ecx 10c1c4: 0f b7 8c 09 80 25 12 movzwl 0x122580(%ecx,%ecx,1),%ecx 10c1cb: 00 10c1cc: 8d 34 31 lea (%ecx,%esi,1),%esi time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10c1cf: 0f b7 8c 1b b4 25 12 movzwl 0x1225b4(%ebx,%ebx,1),%ecx 10c1d6: 00 if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 10c1d7: 2d c4 07 00 00 sub $0x7c4,%eax 10c1dc: c1 e8 02 shr $0x2,%eax 10c1df: 8d 1c c0 lea (%eax,%eax,8),%ebx 10c1e2: 8d 1c d8 lea (%eax,%ebx,8),%ebx 10c1e5: 8d 1c 9b lea (%ebx,%ebx,4),%ebx 10c1e8: 8d 04 98 lea (%eax,%ebx,4),%eax 10c1eb: 01 c1 add %eax,%ecx ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10c1ed: 01 f1 add %esi,%ecx time *= TOD_SECONDS_PER_DAY; 10c1ef: 8d 04 89 lea (%ecx,%ecx,4),%eax 10c1f2: 8d 04 81 lea (%ecx,%eax,4),%eax 10c1f5: 8d 04 c1 lea (%ecx,%eax,8),%eax 10c1f8: c1 e0 02 shl $0x2,%eax 10c1fb: 29 c8 sub %ecx,%eax 10c1fd: c1 e0 07 shl $0x7,%eax time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 10c200: 8b 5a 14 mov 0x14(%edx),%ebx 10c203: 8b 4a 0c mov 0xc(%edx),%ecx 10c206: 8d 0c 49 lea (%ecx,%ecx,2),%ecx 10c209: 8d 0c 89 lea (%ecx,%ecx,4),%ecx 10c20c: c1 e1 02 shl $0x2,%ecx 10c20f: 03 4a 10 add 0x10(%edx),%ecx * TOD_SECONDS_PER_MINUTE; 10c212: 8d 14 49 lea (%ecx,%ecx,2),%edx 10c215: 8d 14 92 lea (%edx,%edx,4),%edx time += the_tod->second; 10c218: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx time += TOD_SECONDS_1970_THROUGH_1988; 10c21f: 8d 04 02 lea (%edx,%eax,1),%eax return( time ); } 10c222: 5b pop %ebx 10c223: 5e pop %esi 10c224: c9 leave 10c225: c3 ret 10c226: 66 90 xchg %ax,%ax <== NOT EXECUTED 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 ]; 10c228: 8b 4a 04 mov 0x4(%edx),%ecx 10c22b: 0f b7 8c 09 9a 25 12 movzwl 0x12259a(%ecx,%ecx,1),%ecx 10c232: 00 10c233: 8d 34 31 lea (%ecx,%esi,1),%esi 10c236: eb 97 jmp 10c1cf <_TOD_To_seconds+0x23> =============================================================================== 0010c238 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10c238: 55 push %ebp 10c239: 89 e5 mov %esp,%ebp 10c23b: 53 push %ebx 10c23c: 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(); 10c23f: 8b 1d 0c 53 12 00 mov 0x12530c,%ebx if ((!the_tod) || 10c245: 85 c9 test %ecx,%ecx 10c247: 74 53 je 10c29c <_TOD_Validate+0x64> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 10c249: b8 40 42 0f 00 mov $0xf4240,%eax 10c24e: 31 d2 xor %edx,%edx 10c250: f7 f3 div %ebx rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c252: 3b 41 18 cmp 0x18(%ecx),%eax 10c255: 76 45 jbe 10c29c <_TOD_Validate+0x64> (the_tod->ticks >= ticks_per_second) || 10c257: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10c25b: 77 3f ja 10c29c <_TOD_Validate+0x64> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10c25d: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10c261: 77 39 ja 10c29c <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10c263: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10c267: 77 33 ja 10c29c <_TOD_Validate+0x64> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 10c269: 8b 41 04 mov 0x4(%ecx),%eax rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || 10c26c: 85 c0 test %eax,%eax 10c26e: 74 2c je 10c29c <_TOD_Validate+0x64> <== NEVER TAKEN (the_tod->month == 0) || 10c270: 83 f8 0c cmp $0xc,%eax 10c273: 77 27 ja 10c29c <_TOD_Validate+0x64> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10c275: 8b 11 mov (%ecx),%edx (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || 10c277: 81 fa c3 07 00 00 cmp $0x7c3,%edx 10c27d: 76 1d jbe 10c29c <_TOD_Validate+0x64> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10c27f: 8b 49 08 mov 0x8(%ecx),%ecx (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10c282: 85 c9 test %ecx,%ecx 10c284: 74 16 je 10c29c <_TOD_Validate+0x64> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10c286: 83 e2 03 and $0x3,%edx 10c289: 75 16 jne 10c2a1 <_TOD_Validate+0x69> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10c28b: 8b 04 85 f4 25 12 00 mov 0x1225f4(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10c292: 39 c8 cmp %ecx,%eax 10c294: 0f 93 c0 setae %al 10c297: eb 05 jmp 10c29e <_TOD_Validate+0x66> 10c299: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; 10c29c: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10c29e: 5b pop %ebx 10c29f: c9 leave 10c2a0: 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 ]; 10c2a1: 8b 04 85 c0 25 12 00 mov 0x1225c0(,%eax,4),%eax 10c2a8: eb e8 jmp 10c292 <_TOD_Validate+0x5a> =============================================================================== 0010d0a4 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10d0a4: 55 push %ebp 10d0a5: 89 e5 mov %esp,%ebp 10d0a7: 57 push %edi 10d0a8: 56 push %esi 10d0a9: 53 push %ebx 10d0aa: 83 ec 28 sub $0x28,%esp 10d0ad: 8b 5d 08 mov 0x8(%ebp),%ebx 10d0b0: 8b 75 0c mov 0xc(%ebp),%esi 10d0b3: 8a 45 10 mov 0x10(%ebp),%al 10d0b6: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10d0b9: 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 ); 10d0bc: 53 push %ebx 10d0bd: e8 7a 0e 00 00 call 10df3c <_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 ) 10d0c2: 83 c4 10 add $0x10,%esp 10d0c5: 39 73 14 cmp %esi,0x14(%ebx) 10d0c8: 74 0d je 10d0d7 <_Thread_Change_priority+0x33> _Thread_Set_priority( the_thread, new_priority ); 10d0ca: 83 ec 08 sub $0x8,%esp 10d0cd: 56 push %esi 10d0ce: 53 push %ebx 10d0cf: e8 1c 0d 00 00 call 10ddf0 <_Thread_Set_priority> 10d0d4: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10d0d7: 9c pushf 10d0d8: fa cli 10d0d9: 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; 10d0da: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10d0dd: 83 f8 04 cmp $0x4,%eax 10d0e0: 74 26 je 10d108 <_Thread_Change_priority+0x64> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10d0e2: 83 e7 04 and $0x4,%edi 10d0e5: 74 15 je 10d0fc <_Thread_Change_priority+0x58><== ALWAYS TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10d0e7: 52 push %edx 10d0e8: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10d0e9: a9 e0 be 03 00 test $0x3bee0,%eax 10d0ee: 0f 85 bc 00 00 00 jne 10d1b0 <_Thread_Change_priority+0x10c> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 10d0f4: 8d 65 f4 lea -0xc(%ebp),%esp 10d0f7: 5b pop %ebx 10d0f8: 5e pop %esi 10d0f9: 5f pop %edi 10d0fa: c9 leave 10d0fb: c3 ret RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10d0fc: 89 c1 mov %eax,%ecx 10d0fe: 83 e1 fb and $0xfffffffb,%ecx 10d101: 89 4b 10 mov %ecx,0x10(%ebx) 10d104: eb e1 jmp 10d0e7 <_Thread_Change_priority+0x43> 10d106: 66 90 xchg %ax,%ax <== NOT EXECUTED } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10d108: 83 e7 04 and $0x4,%edi 10d10b: 75 45 jne 10d152 <_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 ); 10d10d: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10d114: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10d11a: 66 8b 8b 96 00 00 00 mov 0x96(%ebx),%cx 10d121: 66 09 08 or %cx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d124: 66 a1 e0 54 12 00 mov 0x1254e0,%ax 10d12a: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10d130: 66 a3 e0 54 12 00 mov %ax,0x1254e0 _Priority_bit_map_Add( &the_thread->Priority_map ); if ( prepend_it ) 10d136: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10d13a: 0f 84 88 00 00 00 je 10d1c8 <_Thread_Change_priority+0x124> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10d140: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10d146: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10d149: 8b 08 mov (%eax),%ecx after_node->next = the_node; 10d14b: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10d14d: 89 0b mov %ecx,(%ebx) before_node->previous = the_node; 10d14f: 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 ); 10d152: 52 push %edx 10d153: 9d popf 10d154: fa cli RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10d155: 66 8b 1d e0 54 12 00 mov 0x1254e0,%bx 10d15c: 31 c0 xor %eax,%eax 10d15e: 89 c1 mov %eax,%ecx 10d160: 66 0f bc cb bsf %bx,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10d164: 0f b7 c9 movzwl %cx,%ecx 10d167: 66 8b 9c 09 60 55 12 mov 0x125560(%ecx,%ecx,1),%bx 10d16e: 00 10d16f: 66 0f bc c3 bsf %bx,%ax return (_Priority_Bits_index( major ) << 4) + 10d173: c1 e1 04 shl $0x4,%ecx 10d176: 0f b7 c0 movzwl %ax,%eax */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_bit_map_Get_highest() ].first; 10d179: 8d 04 01 lea (%ecx,%eax,1),%eax 10d17c: 8d 04 40 lea (%eax,%eax,2),%eax 10d17f: c1 e0 02 shl $0x2,%eax 10d182: 03 05 00 54 12 00 add 0x125400,%eax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10d188: 8b 00 mov (%eax),%eax 10d18a: a3 dc 56 12 00 mov %eax,0x1256dc * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10d18f: 8b 0d d8 56 12 00 mov 0x1256d8,%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() && 10d195: 39 c8 cmp %ecx,%eax 10d197: 74 0d je 10d1a6 <_Thread_Change_priority+0x102> 10d199: 80 79 74 00 cmpb $0x0,0x74(%ecx) 10d19d: 74 07 je 10d1a6 <_Thread_Change_priority+0x102> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 10d19f: c6 05 e4 56 12 00 01 movb $0x1,0x1256e4 _ISR_Enable( level ); 10d1a6: 52 push %edx 10d1a7: 9d popf } 10d1a8: 8d 65 f4 lea -0xc(%ebp),%esp 10d1ab: 5b pop %ebx 10d1ac: 5e pop %esi 10d1ad: 5f pop %edi 10d1ae: c9 leave 10d1af: c3 ret /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 10d1b0: 89 5d 0c mov %ebx,0xc(%ebp) 10d1b3: 8b 43 44 mov 0x44(%ebx),%eax 10d1b6: 89 45 08 mov %eax,0x8(%ebp) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 10d1b9: 8d 65 f4 lea -0xc(%ebp),%esp 10d1bc: 5b pop %ebx 10d1bd: 5e pop %esi 10d1be: 5f pop %edi 10d1bf: 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 ); 10d1c0: e9 93 0b 00 00 jmp 10dd58 <_Thread_queue_Requeue> 10d1c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Priority_bit_map_Add( &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 ); 10d1c8: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10d1ce: 8d 48 04 lea 0x4(%eax),%ecx 10d1d1: 89 0b mov %ecx,(%ebx) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 10d1d3: 8b 48 08 mov 0x8(%eax),%ecx the_chain->last = the_node; 10d1d6: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10d1d9: 89 19 mov %ebx,(%ecx) the_node->previous = old_last_node; 10d1db: 89 4b 04 mov %ecx,0x4(%ebx) 10d1de: e9 6f ff ff ff jmp 10d152 <_Thread_Change_priority+0xae> =============================================================================== 0010d1e4 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10d1e4: 55 push %ebp 10d1e5: 89 e5 mov %esp,%ebp 10d1e7: 53 push %ebx 10d1e8: 8b 45 08 mov 0x8(%ebp),%eax 10d1eb: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10d1ee: 9c pushf 10d1ef: fa cli 10d1f0: 5b pop %ebx current_state = the_thread->current_state; 10d1f1: 8b 48 10 mov 0x10(%eax),%ecx if ( current_state & state ) { 10d1f4: 85 ca test %ecx,%edx 10d1f6: 74 70 je 10d268 <_Thread_Clear_state+0x84> 10d1f8: f7 d2 not %edx 10d1fa: 21 ca and %ecx,%edx current_state = the_thread->current_state = _States_Clear( state, current_state ); 10d1fc: 89 50 10 mov %edx,0x10(%eax) if ( _States_Is_ready( current_state ) ) { 10d1ff: 85 d2 test %edx,%edx 10d201: 75 65 jne 10d268 <_Thread_Clear_state+0x84> RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10d203: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10d209: 66 8b 88 96 00 00 00 mov 0x96(%eax),%cx 10d210: 66 09 0a or %cx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d213: 66 8b 15 e0 54 12 00 mov 0x1254e0,%dx 10d21a: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10d220: 66 89 15 e0 54 12 00 mov %dx,0x1254e0 _Priority_bit_map_Add( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10d227: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10d22d: 8d 4a 04 lea 0x4(%edx),%ecx 10d230: 89 08 mov %ecx,(%eax) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 10d232: 8b 4a 08 mov 0x8(%edx),%ecx the_chain->last = the_node; 10d235: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10d238: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10d23a: 89 48 04 mov %ecx,0x4(%eax) _ISR_Flash( level ); 10d23d: 53 push %ebx 10d23e: 9d popf 10d23f: 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 ) { 10d240: 8b 50 14 mov 0x14(%eax),%edx 10d243: 8b 0d dc 56 12 00 mov 0x1256dc,%ecx 10d249: 3b 51 14 cmp 0x14(%ecx),%edx 10d24c: 73 1a jae 10d268 <_Thread_Clear_state+0x84> _Thread_Heir = the_thread; 10d24e: a3 dc 56 12 00 mov %eax,0x1256dc if ( _Thread_Executing->is_preemptible || 10d253: a1 d8 56 12 00 mov 0x1256d8,%eax 10d258: 80 78 74 00 cmpb $0x0,0x74(%eax) 10d25c: 74 12 je 10d270 <_Thread_Clear_state+0x8c> the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 10d25e: c6 05 e4 56 12 00 01 movb $0x1,0x1256e4 10d265: 8d 76 00 lea 0x0(%esi),%esi } } } _ISR_Enable( level ); 10d268: 53 push %ebx 10d269: 9d popf } 10d26a: 5b pop %ebx 10d26b: c9 leave 10d26c: c3 ret 10d26d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * 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 || 10d270: 85 d2 test %edx,%edx 10d272: 74 ea je 10d25e <_Thread_Clear_state+0x7a><== NEVER TAKEN 10d274: eb f2 jmp 10d268 <_Thread_Clear_state+0x84> =============================================================================== 0010d278 <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 10d278: 55 push %ebp 10d279: 89 e5 mov %esp,%ebp 10d27b: 56 push %esi 10d27c: 53 push %ebx 10d27d: 8b 75 08 mov 0x8(%ebp),%esi 10d280: 8b 5d 0c mov 0xc(%ebp),%ebx RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( 10d283: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d287: 8b 46 1c mov 0x1c(%esi),%eax 10d28a: 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; 10d291: a1 34 54 12 00 mov 0x125434,%eax 10d296: 48 dec %eax 10d297: a3 34 54 12 00 mov %eax,0x125434 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 10d29c: 83 ec 0c sub $0xc,%esp 10d29f: 53 push %ebx 10d2a0: e8 5f 11 00 00 call 10e404 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d2a5: a1 34 54 12 00 mov 0x125434,%eax 10d2aa: 40 inc %eax 10d2ab: a3 34 54 12 00 mov %eax,0x125434 /* * 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 ); 10d2b0: 59 pop %ecx 10d2b1: 58 pop %eax 10d2b2: 53 push %ebx 10d2b3: 56 push %esi 10d2b4: e8 4f f6 ff ff call 10c908 <_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 ); 10d2b9: 58 pop %eax 10d2ba: 5a pop %edx 10d2bb: 6a 01 push $0x1 10d2bd: 53 push %ebx 10d2be: e8 99 0b 00 00 call 10de5c <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 10d2c3: 89 1c 24 mov %ebx,(%esp) 10d2c6: e8 d1 09 00 00 call 10dc9c <_Thread_queue_Extract_with_proxy> 10d2cb: 83 c4 10 add $0x10,%esp 10d2ce: 84 c0 test %al,%al 10d2d0: 75 06 jne 10d2d8 <_Thread_Close+0x60> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 10d2d2: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d2d6: 74 68 je 10d340 <_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 ) ) 10d2d8: 3b 1d c0 54 12 00 cmp 0x1254c0,%ebx 10d2de: 74 74 je 10d354 <_Thread_Close+0xdc> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 10d2e0: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx) 10d2e7: 00 00 00 if ( the_thread->Start.fp_context ) 10d2ea: 8b 83 c8 00 00 00 mov 0xc8(%ebx),%eax 10d2f0: 85 c0 test %eax,%eax 10d2f2: 74 0c je 10d300 <_Thread_Close+0x88> (void) _Workspace_Free( the_thread->Start.fp_context ); 10d2f4: 83 ec 0c sub $0xc,%esp 10d2f7: 50 push %eax 10d2f8: e8 43 14 00 00 call 10e740 <_Workspace_Free> 10d2fd: 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 ); 10d300: 83 ec 0c sub $0xc,%esp 10d303: 53 push %ebx 10d304: e8 0f 0d 00 00 call 10e018 <_Thread_Stack_Free> the_thread->Start.stack = NULL; 10d309: c7 83 cc 00 00 00 00 movl $0x0,0xcc(%ebx) 10d310: 00 00 00 if ( the_thread->extensions ) 10d313: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax 10d319: 83 c4 10 add $0x10,%esp 10d31c: 85 c0 test %eax,%eax 10d31e: 74 0c je 10d32c <_Thread_Close+0xb4> (void) _Workspace_Free( the_thread->extensions ); 10d320: 83 ec 0c sub $0xc,%esp 10d323: 50 push %eax 10d324: e8 17 14 00 00 call 10e740 <_Workspace_Free> 10d329: 83 c4 10 add $0x10,%esp the_thread->extensions = NULL; 10d32c: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10d333: 00 00 00 } 10d336: 8d 65 f8 lea -0x8(%ebp),%esp 10d339: 5b pop %ebx 10d33a: 5e pop %esi 10d33b: c9 leave 10d33c: c3 ret 10d33d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ _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 ); 10d340: 83 ec 0c sub $0xc,%esp 10d343: 8d 43 48 lea 0x48(%ebx),%eax 10d346: 50 push %eax 10d347: e8 b0 12 00 00 call 10e5fc <_Watchdog_Remove> 10d34c: 83 c4 10 add $0x10,%esp 10d34f: eb 87 jmp 10d2d8 <_Thread_Close+0x60> 10d351: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 10d354: c7 05 c0 54 12 00 00 movl $0x0,0x1254c0 10d35b: 00 00 00 10d35e: eb 80 jmp 10d2e0 <_Thread_Close+0x68> =============================================================================== 0010d3f4 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10d3f4: 55 push %ebp 10d3f5: 89 e5 mov %esp,%ebp 10d3f7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10d3fa: 8d 45 f4 lea -0xc(%ebp),%eax 10d3fd: 50 push %eax 10d3fe: ff 75 08 pushl 0x8(%ebp) 10d401: e8 c6 01 00 00 call 10d5cc <_Thread_Get> switch ( location ) { 10d406: 83 c4 10 add $0x10,%esp 10d409: 8b 55 f4 mov -0xc(%ebp),%edx 10d40c: 85 d2 test %edx,%edx 10d40e: 75 1c jne 10d42c <_Thread_Delay_ended+0x38><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10d410: 83 ec 08 sub $0x8,%esp 10d413: 68 18 00 00 10 push $0x10000018 10d418: 50 push %eax 10d419: e8 c6 fd ff ff call 10d1e4 <_Thread_Clear_state> 10d41e: a1 34 54 12 00 mov 0x125434,%eax 10d423: 48 dec %eax 10d424: a3 34 54 12 00 mov %eax,0x125434 10d429: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10d42c: c9 leave 10d42d: c3 ret =============================================================================== 0010d430 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10d430: 55 push %ebp 10d431: 89 e5 mov %esp,%ebp 10d433: 57 push %edi 10d434: 56 push %esi 10d435: 53 push %ebx 10d436: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10d439: 8b 1d d8 56 12 00 mov 0x1256d8,%ebx _ISR_Disable( level ); 10d43f: 9c pushf 10d440: fa cli 10d441: 58 pop %eax while ( _Thread_Dispatch_necessary == true ) { 10d442: 8a 15 e4 56 12 00 mov 0x1256e4,%dl 10d448: 84 d2 test %dl,%dl 10d44a: 0f 84 3c 01 00 00 je 10d58c <_Thread_Dispatch+0x15c> heir = _Thread_Heir; 10d450: 8b 35 dc 56 12 00 mov 0x1256dc,%esi _Thread_Dispatch_disable_level = 1; 10d456: c7 05 34 54 12 00 01 movl $0x1,0x125434 10d45d: 00 00 00 _Thread_Dispatch_necessary = false; 10d460: c6 05 e4 56 12 00 00 movb $0x0,0x1256e4 _Thread_Executing = heir; 10d467: 89 35 d8 56 12 00 mov %esi,0x1256d8 /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) 10d46d: 39 f3 cmp %esi,%ebx 10d46f: 0f 84 17 01 00 00 je 10d58c <_Thread_Dispatch+0x15c> 10d475: 8d 7d d8 lea -0x28(%ebp),%edi 10d478: e9 f5 00 00 00 jmp 10d572 <_Thread_Dispatch+0x142> 10d47d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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 ); 10d480: 50 push %eax 10d481: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10d482: 83 ec 0c sub $0xc,%esp 10d485: 8d 45 e0 lea -0x20(%ebp),%eax 10d488: 50 push %eax 10d489: e8 62 31 00 00 call 1105f0 <_TOD_Get_uptime> _Timestamp_Subtract( 10d48e: 83 c4 0c add $0xc,%esp 10d491: 57 push %edi 10d492: 8d 45 e0 lea -0x20(%ebp),%eax 10d495: 50 push %eax 10d496: 68 f0 54 12 00 push $0x1254f0 10d49b: e8 44 0d 00 00 call 10e1e4 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10d4a0: 58 pop %eax 10d4a1: 5a pop %edx 10d4a2: 57 push %edi 10d4a3: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10d4a9: 50 push %eax 10d4aa: e8 f9 0c 00 00 call 10e1a8 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10d4af: 8b 45 e0 mov -0x20(%ebp),%eax 10d4b2: 8b 55 e4 mov -0x1c(%ebp),%edx 10d4b5: a3 f0 54 12 00 mov %eax,0x1254f0 10d4ba: 89 15 f4 54 12 00 mov %edx,0x1254f4 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10d4c0: a1 c4 54 12 00 mov 0x1254c4,%eax 10d4c5: 83 c4 10 add $0x10,%esp 10d4c8: 85 c0 test %eax,%eax 10d4ca: 74 10 je 10d4dc <_Thread_Dispatch+0xac> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10d4cc: 8b 10 mov (%eax),%edx 10d4ce: 89 93 ec 00 00 00 mov %edx,0xec(%ebx) *_Thread_libc_reent = heir->libc_reent; 10d4d4: 8b 96 ec 00 00 00 mov 0xec(%esi),%edx 10d4da: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10d4dc: 83 ec 08 sub $0x8,%esp 10d4df: 56 push %esi 10d4e0: 53 push %ebx 10d4e1: e8 9e 0f 00 00 call 10e484 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10d4e6: 5a pop %edx 10d4e7: 59 pop %ecx 10d4e8: 81 c6 d0 00 00 00 add $0xd0,%esi 10d4ee: 56 push %esi 10d4ef: 8d 83 d0 00 00 00 lea 0xd0(%ebx),%eax 10d4f5: 50 push %eax 10d4f6: e8 95 12 00 00 call 10e790 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10d4fb: 83 c4 10 add $0x10,%esp 10d4fe: 8b 83 e8 00 00 00 mov 0xe8(%ebx),%eax 10d504: 85 c0 test %eax,%eax 10d506: 74 36 je 10d53e <_Thread_Dispatch+0x10e> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 10d508: a1 c0 54 12 00 mov 0x1254c0,%eax 10d50d: 39 c3 cmp %eax,%ebx 10d50f: 74 2d je 10d53e <_Thread_Dispatch+0x10e> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10d511: 85 c0 test %eax,%eax 10d513: 74 11 je 10d526 <_Thread_Dispatch+0xf6> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10d515: 83 ec 0c sub $0xc,%esp 10d518: 05 e8 00 00 00 add $0xe8,%eax 10d51d: 50 push %eax 10d51e: e8 a1 12 00 00 call 10e7c4 <_CPU_Context_save_fp> 10d523: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10d526: 83 ec 0c sub $0xc,%esp 10d529: 8d 83 e8 00 00 00 lea 0xe8(%ebx),%eax 10d52f: 50 push %eax 10d530: e8 99 12 00 00 call 10e7ce <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10d535: 89 1d c0 54 12 00 mov %ebx,0x1254c0 10d53b: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10d53e: 8b 1d d8 56 12 00 mov 0x1256d8,%ebx _ISR_Disable( level ); 10d544: 9c pushf 10d545: fa cli 10d546: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 10d547: 8a 15 e4 56 12 00 mov 0x1256e4,%dl 10d54d: 84 d2 test %dl,%dl 10d54f: 74 3b je 10d58c <_Thread_Dispatch+0x15c> heir = _Thread_Heir; 10d551: 8b 35 dc 56 12 00 mov 0x1256dc,%esi _Thread_Dispatch_disable_level = 1; 10d557: c7 05 34 54 12 00 01 movl $0x1,0x125434 10d55e: 00 00 00 _Thread_Dispatch_necessary = false; 10d561: c6 05 e4 56 12 00 00 movb $0x0,0x1256e4 _Thread_Executing = heir; 10d568: 89 35 d8 56 12 00 mov %esi,0x1256d8 /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) 10d56e: 39 de cmp %ebx,%esi 10d570: 74 1a je 10d58c <_Thread_Dispatch+0x15c><== NEVER TAKEN */ #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) 10d572: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10d576: 0f 85 04 ff ff ff jne 10d480 <_Thread_Dispatch+0x50> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10d57c: 8b 15 04 54 12 00 mov 0x125404,%edx 10d582: 89 56 78 mov %edx,0x78(%esi) 10d585: e9 f6 fe ff ff jmp 10d480 <_Thread_Dispatch+0x50> 10d58a: 66 90 xchg %ax,%ax <== NOT EXECUTED _ISR_Disable( level ); } post_switch: _Thread_Dispatch_disable_level = 0; 10d58c: c7 05 34 54 12 00 00 movl $0x0,0x125434 10d593: 00 00 00 _ISR_Enable( level ); 10d596: 50 push %eax 10d597: 9d popf _API_extensions_Run_postswitch(); 10d598: e8 bb e8 ff ff call 10be58 <_API_extensions_Run_postswitch> } 10d59d: 8d 65 f4 lea -0xc(%ebp),%esp 10d5a0: 5b pop %ebx 10d5a1: 5e pop %esi 10d5a2: 5f pop %edi 10d5a3: c9 leave 10d5a4: c3 ret =============================================================================== 0010d5cc <_Thread_Get>: */ Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10d5cc: 55 push %ebp 10d5cd: 89 e5 mov %esp,%ebp 10d5cf: 53 push %ebx 10d5d0: 83 ec 04 sub $0x4,%esp 10d5d3: 8b 45 08 mov 0x8(%ebp),%eax 10d5d6: 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 ) ) { 10d5d9: 85 c0 test %eax,%eax 10d5db: 74 4b je 10d628 <_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); 10d5dd: 89 c2 mov %eax,%edx 10d5df: c1 ea 18 shr $0x18,%edx 10d5e2: 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 ) 10d5e5: 8d 5a ff lea -0x1(%edx),%ebx 10d5e8: 83 fb 02 cmp $0x2,%ebx 10d5eb: 77 2b ja 10d618 <_Thread_Get+0x4c> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10d5ed: 89 c3 mov %eax,%ebx 10d5ef: c1 eb 1b shr $0x1b,%ebx *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 10d5f2: 4b dec %ebx 10d5f3: 75 23 jne 10d618 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 10d5f5: 8b 14 95 0c 54 12 00 mov 0x12540c(,%edx,4),%edx /* * There is no way for this to happen if POSIX is enabled. */ #if !defined(RTEMS_POSIX_API) if ( !api_information ) { 10d5fc: 85 d2 test %edx,%edx 10d5fe: 74 18 je 10d618 <_Thread_Get+0x4c> <== NEVER TAKEN *location = OBJECTS_ERROR; goto done; } #endif information = api_information[ the_class ]; 10d600: 8b 52 04 mov 0x4(%edx),%edx if ( !information ) { 10d603: 85 d2 test %edx,%edx 10d605: 74 11 je 10d618 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10d607: 53 push %ebx 10d608: 51 push %ecx 10d609: 50 push %eax 10d60a: 52 push %edx 10d60b: e8 34 f7 ff ff call 10cd44 <_Objects_Get> 10d610: 83 c4 10 add $0x10,%esp done: return tp; } 10d613: 8b 5d fc mov -0x4(%ebp),%ebx 10d616: c9 leave 10d617: c3 ret } #endif information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 10d618: c7 01 01 00 00 00 movl $0x1,(%ecx) { uint32_t the_api; uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; 10d61e: 31 c0 xor %eax,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d620: 8b 5d fc mov -0x4(%ebp),%ebx 10d623: c9 leave 10d624: c3 ret 10d625: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d628: a1 34 54 12 00 mov 0x125434,%eax 10d62d: 40 inc %eax 10d62e: a3 34 54 12 00 mov %eax,0x125434 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; 10d633: c7 01 00 00 00 00 movl $0x0,(%ecx) tp = _Thread_Executing; 10d639: a1 d8 56 12 00 mov 0x1256d8,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d63e: 8b 5d fc mov -0x4(%ebp),%ebx 10d641: c9 leave 10d642: c3 ret =============================================================================== 0011213c <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 11213c: 55 push %ebp 11213d: 89 e5 mov %esp,%ebp 11213f: 53 push %ebx 112140: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 112143: 8b 1d d8 56 12 00 mov 0x1256d8,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 112149: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 11214f: 85 c0 test %eax,%eax 112151: 74 79 je 1121cc <_Thread_Handler+0x90> 112153: fa cli #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 112154: a0 ac 50 12 00 mov 0x1250ac,%al 112159: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 11215c: c6 05 ac 50 12 00 01 movb $0x1,0x1250ac #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 112163: 8b 93 e8 00 00 00 mov 0xe8(%ebx),%edx 112169: 85 d2 test %edx,%edx 11216b: 74 24 je 112191 <_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 ); 11216d: a1 c0 54 12 00 mov 0x1254c0,%eax 112172: 39 c3 cmp %eax,%ebx 112174: 74 1b je 112191 <_Thread_Handler+0x55> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 112176: 85 c0 test %eax,%eax 112178: 74 11 je 11218b <_Thread_Handler+0x4f> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 11217a: 83 ec 0c sub $0xc,%esp 11217d: 05 e8 00 00 00 add $0xe8,%eax 112182: 50 push %eax 112183: e8 3c c6 ff ff call 10e7c4 <_CPU_Context_save_fp> 112188: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 11218b: 89 1d c0 54 12 00 mov %ebx,0x1254c0 /* * 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 ); 112191: 83 ec 0c sub $0xc,%esp 112194: 53 push %ebx 112195: e8 4e c1 ff ff call 10e2e8 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 11219a: e8 09 b4 ff ff call 10d5a8 <_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) */ { 11219f: 83 c4 10 add $0x10,%esp 1121a2: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 1121a6: 74 28 je 1121d0 <_Thread_Handler+0x94> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 1121a8: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 1121ae: 85 c0 test %eax,%eax 1121b0: 74 2d je 1121df <_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 ); 1121b2: 83 ec 0c sub $0xc,%esp 1121b5: 53 push %ebx 1121b6: e8 69 c1 ff ff call 10e324 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 1121bb: 83 c4 0c add $0xc,%esp 1121be: 6a 05 push $0x5 1121c0: 6a 01 push $0x1 1121c2: 6a 00 push $0x0 1121c4: e8 33 a6 ff ff call 10c7fc <_Internal_error_Occurred> 1121c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * 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); 1121cc: fb sti 1121cd: eb 85 jmp 112154 <_Thread_Handler+0x18> 1121cf: 90 nop <== NOT EXECUTED * _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 (); 1121d0: e8 1b be 00 00 call 11dff0 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 1121d5: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 1121db: 85 c0 test %eax,%eax 1121dd: 75 d3 jne 1121b2 <_Thread_Handler+0x76> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 1121df: 83 ec 0c sub $0xc,%esp 1121e2: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 1121e8: ff 93 9c 00 00 00 call *0x9c(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 1121ee: 89 43 28 mov %eax,0x28(%ebx) 1121f1: 83 c4 10 add $0x10,%esp 1121f4: eb bc jmp 1121b2 <_Thread_Handler+0x76> =============================================================================== 0010d644 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10d644: 55 push %ebp 10d645: 89 e5 mov %esp,%ebp 10d647: 57 push %edi 10d648: 56 push %esi 10d649: 53 push %ebx 10d64a: 83 ec 24 sub $0x24,%esp 10d64d: 8b 5d 0c mov 0xc(%ebp),%ebx 10d650: 8b 75 14 mov 0x14(%ebp),%esi 10d653: 0f b6 7d 18 movzbl 0x18(%ebp),%edi 10d657: 8a 45 20 mov 0x20(%ebp),%al 10d65a: 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; 10d65d: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10d664: 00 00 00 10d667: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10d66e: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10d671: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10d678: 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 ); 10d67b: 56 push %esi 10d67c: 53 push %ebx 10d67d: e8 32 09 00 00 call 10dfb4 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10d682: 83 c4 10 add $0x10,%esp 10d685: 85 c0 test %eax,%eax 10d687: 0f 84 6b 01 00 00 je 10d7f8 <_Thread_Initialize+0x1b4> 10d68d: 39 c6 cmp %eax,%esi 10d68f: 0f 87 63 01 00 00 ja 10d7f8 <_Thread_Initialize+0x1b4><== NEVER TAKEN Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10d695: 8b 93 cc 00 00 00 mov 0xcc(%ebx),%edx 10d69b: 89 93 c4 00 00 00 mov %edx,0xc4(%ebx) the_stack->size = size; 10d6a1: 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 ) { 10d6a7: 89 f8 mov %edi,%eax 10d6a9: 84 c0 test %al,%al 10d6ab: 0f 85 5f 01 00 00 jne 10d810 <_Thread_Initialize+0x1cc> 10d6b1: 31 c0 xor %eax,%eax extensions_area = NULL; the_thread->libc_reent = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) fp_area = NULL; 10d6b3: 31 ff xor %edi,%edi fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 10d6b5: 89 83 e8 00 00 00 mov %eax,0xe8(%ebx) the_thread->Start.fp_context = fp_area; 10d6bb: 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; 10d6c1: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10d6c8: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10d6cf: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10d6d6: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10d6dd: a1 d0 54 12 00 mov 0x1254d0,%eax 10d6e2: 85 c0 test %eax,%eax 10d6e4: 0f 85 46 01 00 00 jne 10d830 <_Thread_Initialize+0x1ec> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10d6ea: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10d6f1: 00 00 00 * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 10d6f4: 31 f6 xor %esi,%esi /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10d6f6: 8a 45 e7 mov -0x19(%ebp),%al 10d6f9: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10d6ff: 8b 45 24 mov 0x24(%ebp),%eax 10d702: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10d708: 8b 45 28 mov 0x28(%ebp),%eax 10d70b: 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; 10d711: 8b 45 2c mov 0x2c(%ebp),%eax 10d714: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10d71a: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10d721: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10d728: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->real_priority = priority; 10d72f: 8b 45 1c mov 0x1c(%ebp),%eax 10d732: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10d735: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10d73b: 83 ec 08 sub $0x8,%esp 10d73e: 50 push %eax 10d73f: 53 push %ebx 10d740: e8 ab 06 00 00 call 10ddf0 <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10d745: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10d74c: 00 00 00 10d74f: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10d756: 00 00 00 _Thread_Stack_Free( the_thread ); return false; } 10d759: 8b 45 08 mov 0x8(%ebp),%eax 10d75c: 8b 40 1c mov 0x1c(%eax),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10d75f: 0f b7 53 08 movzwl 0x8(%ebx),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d763: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10d766: 8b 45 30 mov 0x30(%ebp),%eax 10d769: 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 ); 10d76c: 89 1c 24 mov %ebx,(%esp) 10d76f: e8 3c 0c 00 00 call 10e3b0 <_User_extensions_Thread_create> if ( extension_status ) 10d774: 83 c4 10 add $0x10,%esp 10d777: 84 c0 test %al,%al 10d779: 0f 85 85 00 00 00 jne 10d804 <_Thread_Initialize+0x1c0> return true; failed: if ( the_thread->libc_reent ) 10d77f: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 10d785: 85 c0 test %eax,%eax 10d787: 74 0c je 10d795 <_Thread_Initialize+0x151> _Workspace_Free( the_thread->libc_reent ); 10d789: 83 ec 0c sub $0xc,%esp 10d78c: 50 push %eax 10d78d: e8 ae 0f 00 00 call 10e740 <_Workspace_Free> 10d792: 83 c4 10 add $0x10,%esp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10d795: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10d79b: 85 c0 test %eax,%eax 10d79d: 74 0c je 10d7ab <_Thread_Initialize+0x167> _Workspace_Free( the_thread->API_Extensions[i] ); 10d79f: 83 ec 0c sub $0xc,%esp 10d7a2: 50 push %eax 10d7a3: e8 98 0f 00 00 call 10e740 <_Workspace_Free> 10d7a8: 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] ) 10d7ab: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax 10d7b1: 85 c0 test %eax,%eax 10d7b3: 74 0c je 10d7c1 <_Thread_Initialize+0x17d><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10d7b5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d7b8: 50 push %eax <== NOT EXECUTED 10d7b9: e8 82 0f 00 00 call 10e740 <_Workspace_Free> <== NOT EXECUTED 10d7be: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( extensions_area ) 10d7c1: 85 f6 test %esi,%esi 10d7c3: 74 0c je 10d7d1 <_Thread_Initialize+0x18d> (void) _Workspace_Free( extensions_area ); 10d7c5: 83 ec 0c sub $0xc,%esp 10d7c8: 56 push %esi 10d7c9: e8 72 0f 00 00 call 10e740 <_Workspace_Free> 10d7ce: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10d7d1: 85 ff test %edi,%edi 10d7d3: 74 0c je 10d7e1 <_Thread_Initialize+0x19d> (void) _Workspace_Free( fp_area ); 10d7d5: 83 ec 0c sub $0xc,%esp 10d7d8: 57 push %edi 10d7d9: e8 62 0f 00 00 call 10e740 <_Workspace_Free> 10d7de: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10d7e1: 83 ec 0c sub $0xc,%esp 10d7e4: 53 push %ebx 10d7e5: e8 2e 08 00 00 call 10e018 <_Thread_Stack_Free> return false; 10d7ea: 83 c4 10 add $0x10,%esp 10d7ed: 31 c0 xor %eax,%eax } 10d7ef: 8d 65 f4 lea -0xc(%ebp),%esp 10d7f2: 5b pop %ebx 10d7f3: 5e pop %esi 10d7f4: 5f pop %edi 10d7f5: c9 leave 10d7f6: c3 ret 10d7f7: 90 nop <== NOT EXECUTED * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ 10d7f8: 31 c0 xor %eax,%eax _Thread_Stack_Free( the_thread ); return false; } 10d7fa: 8d 65 f4 lea -0xc(%ebp),%esp 10d7fd: 5b pop %ebx 10d7fe: 5e pop %esi 10d7ff: 5f pop %edi 10d800: c9 leave 10d801: c3 ret 10d802: 66 90 xchg %ax,%ax <== NOT EXECUTED * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; 10d804: b0 01 mov $0x1,%al _Thread_Stack_Free( the_thread ); return false; } 10d806: 8d 65 f4 lea -0xc(%ebp),%esp 10d809: 5b pop %ebx 10d80a: 5e pop %esi 10d80b: 5f pop %edi 10d80c: c9 leave 10d80d: c3 ret 10d80e: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * 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 ); 10d810: 83 ec 0c sub $0xc,%esp 10d813: 6a 6c push $0x6c 10d815: e8 0a 0f 00 00 call 10e724 <_Workspace_Allocate> 10d81a: 89 c7 mov %eax,%edi if ( !fp_area ) 10d81c: 83 c4 10 add $0x10,%esp 10d81f: 85 c0 test %eax,%eax 10d821: 0f 85 8e fe ff ff jne 10d6b5 <_Thread_Initialize+0x71> * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 10d827: 31 f6 xor %esi,%esi 10d829: e9 51 ff ff ff jmp 10d77f <_Thread_Initialize+0x13b> 10d82e: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 10d830: 83 ec 0c sub $0xc,%esp 10d833: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10d83a: 50 push %eax 10d83b: e8 e4 0e 00 00 call 10e724 <_Workspace_Allocate> 10d840: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10d842: 83 c4 10 add $0x10,%esp 10d845: 85 c0 test %eax,%eax 10d847: 0f 84 32 ff ff ff je 10d77f <_Thread_Initialize+0x13b> goto failed; } the_thread->extensions = (void **) extensions_area; 10d84d: 89 83 f8 00 00 00 mov %eax,0xf8(%ebx) 10d853: 8b 0d d0 54 12 00 mov 0x1254d0,%ecx * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10d859: 31 d2 xor %edx,%edx (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10d85b: 31 c0 xor %eax,%eax 10d85d: 8d 76 00 lea 0x0(%esi),%esi * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) the_thread->extensions[i] = NULL; 10d860: c7 04 96 00 00 00 00 movl $0x0,(%esi,%edx,4) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10d867: 40 inc %eax 10d868: 89 c2 mov %eax,%edx 10d86a: 39 c1 cmp %eax,%ecx 10d86c: 73 f2 jae 10d860 <_Thread_Initialize+0x21c> 10d86e: e9 83 fe ff ff jmp 10d6f6 <_Thread_Initialize+0xb2> =============================================================================== 00111910 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 111910: 55 push %ebp 111911: 89 e5 mov %esp,%ebp 111913: 53 push %ebx 111914: 83 ec 10 sub $0x10,%esp 111917: 8b 5d 08 mov 0x8(%ebp),%ebx the_thread->resource_count = 0; 11191a: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->is_preemptible = the_thread->Start.is_preemptible; 111921: 8a 83 ac 00 00 00 mov 0xac(%ebx),%al 111927: 88 43 74 mov %al,0x74(%ebx) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 11192a: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 111930: 89 43 7c mov %eax,0x7c(%ebx) the_thread->budget_callout = the_thread->Start.budget_callout; 111933: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax 111939: 89 83 80 00 00 00 mov %eax,0x80(%ebx) the_thread->Start.pointer_argument = pointer_argument; 11193f: 8b 45 0c mov 0xc(%ebp),%eax 111942: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 111948: 8b 45 10 mov 0x10(%ebp),%eax 11194b: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 111951: 53 push %ebx 111952: e8 7d ce ff ff call 10e7d4 <_Thread_queue_Extract_with_proxy> 111957: 83 c4 10 add $0x10,%esp 11195a: 84 c0 test %al,%al 11195c: 75 06 jne 111964 <_Thread_Reset+0x54> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 11195e: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 111962: 74 28 je 11198c <_Thread_Reset+0x7c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 111964: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax 11196a: 39 43 14 cmp %eax,0x14(%ebx) 11196d: 74 15 je 111984 <_Thread_Reset+0x74> the_thread->real_priority = the_thread->Start.initial_priority; 11196f: 89 43 18 mov %eax,0x18(%ebx) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 111972: 89 45 0c mov %eax,0xc(%ebp) 111975: 89 5d 08 mov %ebx,0x8(%ebp) } } 111978: 8b 5d fc mov -0x4(%ebp),%ebx 11197b: 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 ); 11197c: e9 2f d0 ff ff jmp 10e9b0 <_Thread_Set_priority> 111981: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } 111984: 8b 5d fc mov -0x4(%ebp),%ebx 111987: c9 leave 111988: c3 ret 111989: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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 ); 11198c: 83 ec 0c sub $0xc,%esp 11198f: 8d 43 48 lea 0x48(%ebx),%eax 111992: 50 push %eax 111993: e8 64 d8 ff ff call 10f1fc <_Watchdog_Remove> 111998: 83 c4 10 add $0x10,%esp 11199b: eb c7 jmp 111964 <_Thread_Reset+0x54> =============================================================================== 0010e928 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10e928: 55 push %ebp 10e929: 89 e5 mov %esp,%ebp 10e92b: 53 push %ebx 10e92c: 83 ec 04 sub $0x4,%esp 10e92f: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !_States_Is_dormant( the_thread->current_state ) ) { 10e932: f6 43 10 01 testb $0x1,0x10(%ebx) 10e936: 74 08 je 10e940 <_Thread_Restart+0x18> _Thread_Restart_self(); return true; } return false; 10e938: 31 c0 xor %eax,%eax } 10e93a: 8b 5d fc mov -0x4(%ebp),%ebx 10e93d: c9 leave 10e93e: c3 ret 10e93f: 90 nop <== NOT EXECUTED Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 10e940: 83 ec 0c sub $0xc,%esp 10e943: 53 push %ebx 10e944: e8 b3 01 00 00 call 10eafc <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 10e949: 83 c4 0c add $0xc,%esp 10e94c: ff 75 10 pushl 0x10(%ebp) 10e94f: ff 75 0c pushl 0xc(%ebp) 10e952: 53 push %ebx 10e953: e8 b8 2f 00 00 call 111910 <_Thread_Reset> _Thread_Load_environment( the_thread ); 10e958: 89 1c 24 mov %ebx,(%esp) 10e95b: e8 98 2c 00 00 call 1115f8 <_Thread_Load_environment> _Thread_Ready( the_thread ); 10e960: 89 1c 24 mov %ebx,(%esp) 10e963: e8 04 2f 00 00 call 11186c <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 10e968: 89 1c 24 mov %ebx,(%esp) 10e96b: e8 94 06 00 00 call 10f004 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 10e970: 83 c4 10 add $0x10,%esp 10e973: 3b 1d 58 77 12 00 cmp 0x127758,%ebx 10e979: 74 07 je 10e982 <_Thread_Restart+0x5a> _Thread_Restart_self(); return true; 10e97b: b0 01 mov $0x1,%al } return false; } 10e97d: 8b 5d fc mov -0x4(%ebp),%ebx 10e980: c9 leave 10e981: c3 ret */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 10e982: 83 bb e8 00 00 00 00 cmpl $0x0,0xe8(%ebx) 10e989: 74 12 je 10e99d <_Thread_Restart+0x75> _Context_Restore_fp( &_Thread_Executing->fp_context ); 10e98b: 83 ec 0c sub $0xc,%esp 10e98e: 81 c3 e8 00 00 00 add $0xe8,%ebx 10e994: 53 push %ebx 10e995: e8 34 0a 00 00 call 10f3ce <_CPU_Context_restore_fp> 10e99a: 83 c4 10 add $0x10,%esp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 10e99d: 83 ec 0c sub $0xc,%esp 10e9a0: a1 58 77 12 00 mov 0x127758,%eax 10e9a5: 05 d0 00 00 00 add $0xd0,%eax 10e9aa: 50 push %eax 10e9ab: e8 0d 0a 00 00 call 10f3bd <_CPU_Context_restore> =============================================================================== 00111104 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 111104: 55 push %ebp 111105: 89 e5 mov %esp,%ebp 111107: 53 push %ebx 111108: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 11110b: 9c pushf 11110c: fa cli 11110d: 59 pop %ecx current_state = the_thread->current_state; 11110e: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 111111: f6 c2 02 test $0x2,%dl 111114: 74 6e je 111184 <_Thread_Resume+0x80> <== NEVER TAKEN 111116: 83 e2 fd and $0xfffffffd,%edx current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); 111119: 89 50 10 mov %edx,0x10(%eax) if ( _States_Is_ready( current_state ) ) { 11111c: 85 d2 test %edx,%edx 11111e: 75 64 jne 111184 <_Thread_Resume+0x80> RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 111120: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 111126: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 11112d: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 111130: 66 8b 15 e0 95 12 00 mov 0x1295e0,%dx 111137: 0b 90 94 00 00 00 or 0x94(%eax),%edx 11113d: 66 89 15 e0 95 12 00 mov %dx,0x1295e0 _Priority_bit_map_Add( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 111144: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11114a: 8d 5a 04 lea 0x4(%edx),%ebx 11114d: 89 18 mov %ebx,(%eax) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 11114f: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 111152: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 111155: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 111157: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 11115a: 51 push %ecx 11115b: 9d popf 11115c: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 11115d: 8b 50 14 mov 0x14(%eax),%edx 111160: 8b 1d dc 97 12 00 mov 0x1297dc,%ebx 111166: 3b 53 14 cmp 0x14(%ebx),%edx 111169: 73 19 jae 111184 <_Thread_Resume+0x80> _Thread_Heir = the_thread; 11116b: a3 dc 97 12 00 mov %eax,0x1297dc if ( _Thread_Executing->is_preemptible || 111170: a1 d8 97 12 00 mov 0x1297d8,%eax 111175: 80 78 74 00 cmpb $0x0,0x74(%eax) 111179: 74 11 je 11118c <_Thread_Resume+0x88> the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 11117b: c6 05 e4 97 12 00 01 movb $0x1,0x1297e4 111182: 66 90 xchg %ax,%ax } } } _ISR_Enable( level ); 111184: 51 push %ecx 111185: 9d popf } 111186: 5b pop %ebx 111187: c9 leave 111188: c3 ret 111189: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 11118c: 85 d2 test %edx,%edx 11118e: 74 eb je 11117b <_Thread_Resume+0x77> <== NEVER TAKEN 111190: eb f2 jmp 111184 <_Thread_Resume+0x80> =============================================================================== 0010de5c <_Thread_Set_state>: void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 10de5c: 55 push %ebp 10de5d: 89 e5 mov %esp,%ebp 10de5f: 56 push %esi 10de60: 53 push %ebx 10de61: 8b 45 08 mov 0x8(%ebp),%eax 10de64: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10de67: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10de6d: 9c pushf 10de6e: fa cli 10de6f: 59 pop %ecx if ( !_States_Is_ready( the_thread->current_state ) ) { 10de70: 8b 58 10 mov 0x10(%eax),%ebx 10de73: 85 db test %ebx,%ebx 10de75: 75 2d jne 10dea4 <_Thread_Set_state+0x48> _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; 10de77: 89 70 10 mov %esi,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 10de7a: 8b 5a 08 mov 0x8(%edx),%ebx 10de7d: 39 1a cmp %ebx,(%edx) 10de7f: 74 3b je 10debc <_Thread_Set_state+0x60> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10de81: 8b 18 mov (%eax),%ebx previous = the_node->previous; 10de83: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10de86: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 10de89: 89 1a mov %ebx,(%edx) _Priority_bit_map_Remove( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 10de8b: 51 push %ecx 10de8c: 9d popf 10de8d: fa cli if ( _Thread_Is_heir( the_thread ) ) 10de8e: 3b 05 dc 56 12 00 cmp 0x1256dc,%eax 10de94: 74 66 je 10defc <_Thread_Set_state+0xa0> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10de96: 3b 05 d8 56 12 00 cmp 0x1256d8,%eax 10de9c: 74 12 je 10deb0 <_Thread_Set_state+0x54> _Thread_Dispatch_necessary = true; _ISR_Enable( level ); 10de9e: 51 push %ecx 10de9f: 9d popf } 10dea0: 5b pop %ebx 10dea1: 5e pop %esi 10dea2: c9 leave 10dea3: c3 ret RTEMS_INLINE_ROUTINE States_Control _States_Set ( States_Control states_to_set, States_Control current_state ) { return (current_state | states_to_set); 10dea4: 09 f3 or %esi,%ebx 10dea6: 89 58 10 mov %ebx,0x10(%eax) ready = the_thread->ready; _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 10dea9: 51 push %ecx 10deaa: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 10deab: 5b pop %ebx 10deac: 5e pop %esi 10dead: c9 leave 10deae: c3 ret 10deaf: 90 nop <== NOT EXECUTED if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 10deb0: c6 05 e4 56 12 00 01 movb $0x1,0x1256e4 10deb7: eb e5 jmp 10de9e <_Thread_Set_state+0x42> 10deb9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10debc: 8d 5a 04 lea 0x4(%edx),%ebx 10debf: 89 1a mov %ebx,(%edx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10dec1: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10dec8: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10decb: 8b 98 90 00 00 00 mov 0x90(%eax),%ebx 10ded1: 66 8b 13 mov (%ebx),%dx 10ded4: 66 23 90 9a 00 00 00 and 0x9a(%eax),%dx 10dedb: 66 89 13 mov %dx,(%ebx) if ( *the_priority_map->minor == 0 ) 10dede: 66 85 d2 test %dx,%dx 10dee1: 75 a8 jne 10de8b <_Thread_Set_state+0x2f> _Priority_Major_bit_map &= the_priority_map->block_major; 10dee3: 66 8b 15 e0 54 12 00 mov 0x1254e0,%dx 10deea: 23 90 98 00 00 00 and 0x98(%eax),%edx 10def0: 66 89 15 e0 54 12 00 mov %dx,0x1254e0 10def7: eb 92 jmp 10de8b <_Thread_Set_state+0x2f> 10def9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10defc: 66 8b 35 e0 54 12 00 mov 0x1254e0,%si 10df03: 31 d2 xor %edx,%edx 10df05: 89 d3 mov %edx,%ebx 10df07: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10df0b: 0f b7 db movzwl %bx,%ebx 10df0e: 66 8b b4 1b 60 55 12 mov 0x125560(%ebx,%ebx,1),%si 10df15: 00 10df16: 66 0f bc d6 bsf %si,%dx return (_Priority_Bits_index( major ) << 4) + 10df1a: c1 e3 04 shl $0x4,%ebx 10df1d: 0f b7 d2 movzwl %dx,%edx */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_bit_map_Get_highest() ].first; 10df20: 8d 14 13 lea (%ebx,%edx,1),%edx 10df23: 8d 14 52 lea (%edx,%edx,2),%edx 10df26: c1 e2 02 shl $0x2,%edx 10df29: 03 15 00 54 12 00 add 0x125400,%edx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10df2f: 8b 12 mov (%edx),%edx 10df31: 89 15 dc 56 12 00 mov %edx,0x1256dc 10df37: e9 5a ff ff ff jmp 10de96 <_Thread_Set_state+0x3a> =============================================================================== 0010df3c <_Thread_Set_transient>: */ void _Thread_Set_transient( Thread_Control *the_thread ) { 10df3c: 55 push %ebp 10df3d: 89 e5 mov %esp,%ebp 10df3f: 56 push %esi 10df40: 53 push %ebx 10df41: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; uint32_t old_state; Chain_Control *ready; ready = the_thread->ready; 10df44: 8b 88 8c 00 00 00 mov 0x8c(%eax),%ecx _ISR_Disable( level ); 10df4a: 9c pushf 10df4b: fa cli 10df4c: 5b pop %ebx old_state = the_thread->current_state; 10df4d: 8b 50 10 mov 0x10(%eax),%edx 10df50: 89 d6 mov %edx,%esi 10df52: 83 ce 04 or $0x4,%esi 10df55: 89 70 10 mov %esi,0x10(%eax) the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state ); if ( _States_Is_ready( old_state ) ) { 10df58: 85 d2 test %edx,%edx 10df5a: 75 11 jne 10df6d <_Thread_Set_transient+0x31> if ( _Chain_Has_only_one_node( ready ) ) { 10df5c: 8b 51 08 mov 0x8(%ecx),%edx 10df5f: 39 11 cmp %edx,(%ecx) 10df61: 74 11 je 10df74 <_Thread_Set_transient+0x38> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10df63: 8b 10 mov (%eax),%edx previous = the_node->previous; 10df65: 8b 40 04 mov 0x4(%eax),%eax next->previous = previous; 10df68: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 10df6b: 89 10 mov %edx,(%eax) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); } _ISR_Enable( level ); 10df6d: 53 push %ebx 10df6e: 9d popf } 10df6f: 5b pop %ebx 10df70: 5e pop %esi 10df71: c9 leave 10df72: c3 ret 10df73: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10df74: 8d 51 04 lea 0x4(%ecx),%edx 10df77: 89 11 mov %edx,(%ecx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10df79: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) the_chain->last = _Chain_Head(the_chain); 10df80: 89 49 08 mov %ecx,0x8(%ecx) RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10df83: 8b 88 90 00 00 00 mov 0x90(%eax),%ecx 10df89: 66 8b 11 mov (%ecx),%dx 10df8c: 66 23 90 9a 00 00 00 and 0x9a(%eax),%dx 10df93: 66 89 11 mov %dx,(%ecx) if ( *the_priority_map->minor == 0 ) 10df96: 66 85 d2 test %dx,%dx 10df99: 75 d2 jne 10df6d <_Thread_Set_transient+0x31> _Priority_Major_bit_map &= the_priority_map->block_major; 10df9b: 66 8b 15 e0 54 12 00 mov 0x1254e0,%dx 10dfa2: 23 90 98 00 00 00 and 0x98(%eax),%edx 10dfa8: 66 89 15 e0 54 12 00 mov %dx,0x1254e0 10dfaf: eb bc jmp 10df6d <_Thread_Set_transient+0x31> =============================================================================== 0010dfb4 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10dfb4: 55 push %ebp 10dfb5: 89 e5 mov %esp,%ebp 10dfb7: 53 push %ebx 10dfb8: 83 ec 04 sub $0x4,%esp the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) the_stack_size = 0; 10dfbb: a1 10 12 12 00 mov 0x121210,%eax 10dfc0: 8b 5d 0c mov 0xc(%ebp),%ebx 10dfc3: 39 c3 cmp %eax,%ebx 10dfc5: 73 02 jae 10dfc9 <_Thread_Stack_Allocate+0x15> 10dfc7: 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 ) { 10dfc9: a1 40 12 12 00 mov 0x121240,%eax 10dfce: 85 c0 test %eax,%eax 10dfd0: 74 32 je 10e004 <_Thread_Stack_Allocate+0x50> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 10dfd2: 83 ec 0c sub $0xc,%esp 10dfd5: 53 push %ebx 10dfd6: ff d0 call *%eax 10dfd8: 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 ) 10dfdb: 85 c0 test %eax,%eax 10dfdd: 74 11 je 10dff0 <_Thread_Stack_Allocate+0x3c> the_stack_size = 0; the_thread->Start.stack = stack_addr; 10dfdf: 8b 55 08 mov 0x8(%ebp),%edx 10dfe2: 89 82 cc 00 00 00 mov %eax,0xcc(%edx) return the_stack_size; } 10dfe8: 89 d8 mov %ebx,%eax 10dfea: 8b 5d fc mov -0x4(%ebp),%ebx 10dfed: c9 leave 10dfee: c3 ret 10dfef: 90 nop <== NOT EXECUTED the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) the_stack_size = 0; 10dff0: 31 db xor %ebx,%ebx the_thread->Start.stack = stack_addr; 10dff2: 8b 55 08 mov 0x8(%ebp),%edx 10dff5: 89 82 cc 00 00 00 mov %eax,0xcc(%edx) return the_stack_size; } 10dffb: 89 d8 mov %ebx,%eax 10dffd: 8b 5d fc mov -0x4(%ebp),%ebx 10e000: c9 leave 10e001: c3 ret 10e002: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 10e004: 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 ); 10e007: 83 ec 0c sub $0xc,%esp 10e00a: 53 push %ebx 10e00b: e8 14 07 00 00 call 10e724 <_Workspace_Allocate> 10e010: 83 c4 10 add $0x10,%esp 10e013: eb c6 jmp 10dfdb <_Thread_Stack_Allocate+0x27> =============================================================================== 0010e018 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10e018: 55 push %ebp 10e019: 89 e5 mov %esp,%ebp 10e01b: 83 ec 08 sub $0x8,%esp 10e01e: 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 ) 10e021: a1 44 12 12 00 mov 0x121244,%eax 10e026: 85 c0 test %eax,%eax 10e028: 74 0e je 10e038 <_Thread_Stack_Free+0x20> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10e02a: 8b 92 c4 00 00 00 mov 0xc4(%edx),%edx 10e030: 89 55 08 mov %edx,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10e033: 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 ); 10e034: ff e0 jmp *%eax 10e036: 66 90 xchg %ax,%ax <== NOT EXECUTED else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10e038: 8b 82 c4 00 00 00 mov 0xc4(%edx),%eax 10e03e: 89 45 08 mov %eax,0x8(%ebp) } 10e041: 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 ); 10e042: e9 f9 06 00 00 jmp 10e740 <_Workspace_Free> =============================================================================== 0010e0a4 <_Thread_Start>: Thread_Start_types the_prototype, void *entry_point, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10e0a4: 55 push %ebp 10e0a5: 89 e5 mov %esp,%ebp 10e0a7: 53 push %ebx 10e0a8: 83 ec 04 sub $0x4,%esp 10e0ab: 8b 5d 08 mov 0x8(%ebp),%ebx if ( _States_Is_dormant( the_thread->current_state ) ) { 10e0ae: f6 43 10 01 testb $0x1,0x10(%ebx) 10e0b2: 75 08 jne 10e0bc <_Thread_Start+0x18> _User_extensions_Thread_start( the_thread ); return true; } return false; 10e0b4: 31 c0 xor %eax,%eax } 10e0b6: 8b 5d fc mov -0x4(%ebp),%ebx 10e0b9: c9 leave 10e0ba: c3 ret 10e0bb: 90 nop <== NOT EXECUTED Thread_Entry_numeric_type numeric_argument ) { if ( _States_Is_dormant( the_thread->current_state ) ) { the_thread->Start.entry_point = (Thread_Entry) entry_point; 10e0bc: 8b 45 10 mov 0x10(%ebp),%eax 10e0bf: 89 83 9c 00 00 00 mov %eax,0x9c(%ebx) the_thread->Start.prototype = the_prototype; 10e0c5: 8b 45 0c mov 0xc(%ebp),%eax 10e0c8: 89 83 a0 00 00 00 mov %eax,0xa0(%ebx) the_thread->Start.pointer_argument = pointer_argument; 10e0ce: 8b 45 14 mov 0x14(%ebp),%eax 10e0d1: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 10e0d7: 8b 45 18 mov 0x18(%ebp),%eax 10e0da: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) _Thread_Load_environment( the_thread ); 10e0e0: 83 ec 0c sub $0xc,%esp 10e0e3: 53 push %ebx 10e0e4: e8 87 28 00 00 call 110970 <_Thread_Load_environment> _Thread_Ready( the_thread ); 10e0e9: 89 1c 24 mov %ebx,(%esp) 10e0ec: e8 f3 2a 00 00 call 110be4 <_Thread_Ready> _User_extensions_Thread_start( the_thread ); 10e0f1: 89 1c 24 mov %ebx,(%esp) 10e0f4: e8 4b 03 00 00 call 10e444 <_User_extensions_Thread_start> return true; 10e0f9: 83 c4 10 add $0x10,%esp 10e0fc: b0 01 mov $0x1,%al } return false; } 10e0fe: 8b 5d fc mov -0x4(%ebp),%ebx 10e101: c9 leave 10e102: c3 ret =============================================================================== 00110c88 <_Thread_Suspend>: */ void _Thread_Suspend( Thread_Control *the_thread ) { 110c88: 55 push %ebp 110c89: 89 e5 mov %esp,%ebp 110c8b: 56 push %esi 110c8c: 53 push %ebx 110c8d: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 110c90: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 110c96: 9c pushf 110c97: fa cli 110c98: 59 pop %ecx if ( !_States_Is_ready( the_thread->current_state ) ) { 110c99: 8b 58 10 mov 0x10(%eax),%ebx 110c9c: 85 db test %ebx,%ebx 110c9e: 75 34 jne 110cd4 <_Thread_Suspend+0x4c> _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 110ca0: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 110ca7: 8b 5a 08 mov 0x8(%edx),%ebx 110caa: 39 1a cmp %ebx,(%edx) 110cac: 74 3e je 110cec <_Thread_Suspend+0x64> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 110cae: 8b 18 mov (%eax),%ebx previous = the_node->previous; 110cb0: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 110cb3: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 110cb6: 89 1a mov %ebx,(%edx) _Priority_bit_map_Remove( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 110cb8: 51 push %ecx 110cb9: 9d popf 110cba: fa cli if ( _Thread_Is_heir( the_thread ) ) 110cbb: 3b 05 dc 56 12 00 cmp 0x1256dc,%eax 110cc1: 74 69 je 110d2c <_Thread_Suspend+0xa4> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 110cc3: 3b 05 d8 56 12 00 cmp 0x1256d8,%eax 110cc9: 74 15 je 110ce0 <_Thread_Suspend+0x58> _Thread_Dispatch_necessary = true; _ISR_Enable( level ); 110ccb: 51 push %ecx 110ccc: 9d popf } 110ccd: 5b pop %ebx 110cce: 5e pop %esi 110ccf: c9 leave 110cd0: c3 ret 110cd1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 110cd4: 83 cb 02 or $0x2,%ebx 110cd7: 89 58 10 mov %ebx,0x10(%eax) ready = the_thread->ready; _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 110cda: 51 push %ecx 110cdb: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 110cdc: 5b pop %ebx 110cdd: 5e pop %esi 110cde: c9 leave 110cdf: c3 ret if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 110ce0: c6 05 e4 56 12 00 01 movb $0x1,0x1256e4 110ce7: eb e2 jmp 110ccb <_Thread_Suspend+0x43> 110ce9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 110cec: 8d 5a 04 lea 0x4(%edx),%ebx 110cef: 89 1a mov %ebx,(%edx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 110cf1: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 110cf8: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 110cfb: 8b 98 90 00 00 00 mov 0x90(%eax),%ebx 110d01: 66 8b 13 mov (%ebx),%dx 110d04: 66 23 90 9a 00 00 00 and 0x9a(%eax),%dx 110d0b: 66 89 13 mov %dx,(%ebx) if ( *the_priority_map->minor == 0 ) 110d0e: 66 85 d2 test %dx,%dx 110d11: 75 a5 jne 110cb8 <_Thread_Suspend+0x30> _Priority_Major_bit_map &= the_priority_map->block_major; 110d13: 66 8b 15 e0 54 12 00 mov 0x1254e0,%dx 110d1a: 23 90 98 00 00 00 and 0x98(%eax),%edx 110d20: 66 89 15 e0 54 12 00 mov %dx,0x1254e0 110d27: eb 8f jmp 110cb8 <_Thread_Suspend+0x30> 110d29: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 110d2c: 66 8b 35 e0 54 12 00 mov 0x1254e0,%si 110d33: 31 d2 xor %edx,%edx 110d35: 89 d3 mov %edx,%ebx 110d37: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 110d3b: 0f b7 db movzwl %bx,%ebx 110d3e: 66 8b b4 1b 60 55 12 mov 0x125560(%ebx,%ebx,1),%si 110d45: 00 110d46: 66 0f bc d6 bsf %si,%dx return (_Priority_Bits_index( major ) << 4) + 110d4a: c1 e3 04 shl $0x4,%ebx 110d4d: 0f b7 d2 movzwl %dx,%edx */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_bit_map_Get_highest() ].first; 110d50: 8d 14 13 lea (%ebx,%edx,1),%edx 110d53: 8d 14 52 lea (%edx,%edx,2),%edx 110d56: c1 e2 02 shl $0x2,%edx 110d59: 03 15 00 54 12 00 add 0x125400,%edx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 110d5f: 8b 12 mov (%edx),%edx 110d61: 89 15 dc 56 12 00 mov %edx,0x1256dc 110d67: e9 57 ff ff ff jmp 110cc3 <_Thread_Suspend+0x3b> =============================================================================== 0010e144 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10e144: 55 push %ebp 10e145: 89 e5 mov %esp,%ebp 10e147: 57 push %edi 10e148: 56 push %esi 10e149: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10e14a: a1 d8 56 12 00 mov 0x1256d8,%eax ready = executing->ready; 10e14f: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10e155: 9c pushf 10e156: fa cli 10e157: 5b pop %ebx } else if ( !_Thread_Is_heir( executing ) ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 10e158: 8b 4a 08 mov 0x8(%edx),%ecx Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( !_Chain_Has_only_one_node( ready ) ) { 10e15b: 39 0a cmp %ecx,(%edx) 10e15d: 74 3d je 10e19c <_Thread_Yield_processor+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10e15f: 8b 38 mov (%eax),%edi previous = the_node->previous; 10e161: 8b 70 04 mov 0x4(%eax),%esi next->previous = previous; 10e164: 89 77 04 mov %esi,0x4(%edi) previous->next = next; 10e167: 89 3e mov %edi,(%esi) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e169: 8d 72 04 lea 0x4(%edx),%esi 10e16c: 89 30 mov %esi,(%eax) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; 10e16e: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10e171: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10e173: 89 48 04 mov %ecx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10e176: 53 push %ebx 10e177: 9d popf 10e178: fa cli if ( _Thread_Is_heir( executing ) ) 10e179: 3b 05 dc 56 12 00 cmp 0x1256dc,%eax 10e17f: 74 0f je 10e190 <_Thread_Yield_processor+0x4c><== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Thread_Dispatch_necessary = true; 10e181: c6 05 e4 56 12 00 01 movb $0x1,0x1256e4 _ISR_Enable( level ); 10e188: 53 push %ebx 10e189: 9d popf } 10e18a: 5b pop %ebx 10e18b: 5e pop %esi 10e18c: 5f pop %edi 10e18d: c9 leave 10e18e: c3 ret 10e18f: 90 nop <== NOT EXECUTED _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 10e190: 8b 02 mov (%edx),%eax 10e192: a3 dc 56 12 00 mov %eax,0x1256dc 10e197: eb e8 jmp 10e181 <_Thread_Yield_processor+0x3d> 10e199: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10e19c: 3b 05 dc 56 12 00 cmp 0x1256dc,%eax 10e1a2: 75 dd jne 10e181 <_Thread_Yield_processor+0x3d><== NEVER TAKEN 10e1a4: eb e2 jmp 10e188 <_Thread_Yield_processor+0x44> =============================================================================== 0010d058 <_Thread_blocking_operation_Cancel>: Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 10d058: 55 push %ebp 10d059: 89 e5 mov %esp,%ebp 10d05b: 53 push %ebx 10d05c: 83 ec 04 sub $0x4,%esp 10d05f: 8b 5d 0c mov 0xc(%ebp),%ebx 10d062: 8b 45 10 mov 0x10(%ebp),%eax #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 10d065: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 10d06c: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d070: 74 16 je 10d088 <_Thread_blocking_operation_Cancel+0x30> _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 10d072: 50 push %eax 10d073: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10d074: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10d07b: 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 } 10d07e: 8b 5d fc mov -0x4(%ebp),%ebx 10d081: c9 leave 10d082: e9 5d 01 00 00 jmp 10d1e4 <_Thread_Clear_state> 10d087: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10d088: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10d08f: 50 push %eax 10d090: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10d091: 83 ec 0c sub $0xc,%esp 10d094: 8d 43 48 lea 0x48(%ebx),%eax 10d097: 50 push %eax 10d098: e8 5f 15 00 00 call 10e5fc <_Watchdog_Remove> 10d09d: 83 c4 10 add $0x10,%esp 10d0a0: eb d2 jmp 10d074 <_Thread_blocking_operation_Cancel+0x1c> =============================================================================== 0010d944 <_Thread_queue_Dequeue>: */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { 10d944: 55 push %ebp 10d945: 89 e5 mov %esp,%ebp 10d947: 53 push %ebx 10d948: 83 ec 04 sub $0x4,%esp 10d94b: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10d94e: 83 7b 34 01 cmpl $0x1,0x34(%ebx) 10d952: 74 1c je 10d970 <_Thread_queue_Dequeue+0x2c> dequeue_p = _Thread_queue_Dequeue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ dequeue_p = _Thread_queue_Dequeue_fifo; 10d954: b8 fc 09 11 00 mov $0x1109fc,%eax the_thread = (*dequeue_p)( the_thread_queue ); 10d959: 83 ec 0c sub $0xc,%esp 10d95c: 53 push %ebx 10d95d: ff d0 call *%eax _ISR_Disable( level ); 10d95f: 9c pushf 10d960: fa cli 10d961: 5a pop %edx if ( !the_thread ) { 10d962: 83 c4 10 add $0x10,%esp 10d965: 85 c0 test %eax,%eax 10d967: 74 0f je 10d978 <_Thread_queue_Dequeue+0x34> (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; the_thread = _Thread_Executing; } } _ISR_Enable( level ); 10d969: 52 push %edx 10d96a: 9d popf return the_thread; } 10d96b: 8b 5d fc mov -0x4(%ebp),%ebx 10d96e: c9 leave 10d96f: c3 ret Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) dequeue_p = _Thread_queue_Dequeue_priority; 10d970: b8 90 d9 10 00 mov $0x10d990,%eax 10d975: eb e2 jmp 10d959 <_Thread_queue_Dequeue+0x15> 10d977: 90 nop <== NOT EXECUTED the_thread = (*dequeue_p)( the_thread_queue ); _ISR_Disable( level ); if ( !the_thread ) { sync_state = the_thread_queue->sync_state; if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 10d978: 8b 4b 30 mov 0x30(%ebx),%ecx 10d97b: 49 dec %ecx 10d97c: 83 f9 01 cmp $0x1,%ecx 10d97f: 77 e8 ja 10d969 <_Thread_queue_Dequeue+0x25> (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10d981: c7 43 30 03 00 00 00 movl $0x3,0x30(%ebx) the_thread = _Thread_Executing; 10d988: a1 d8 56 12 00 mov 0x1256d8,%eax 10d98d: eb da jmp 10d969 <_Thread_queue_Dequeue+0x25> =============================================================================== 0010d990 <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10d990: 55 push %ebp 10d991: 89 e5 mov %esp,%ebp 10d993: 57 push %edi 10d994: 56 push %esi 10d995: 53 push %ebx 10d996: 83 ec 2c sub $0x2c,%esp 10d999: 8b 7d 08 mov 0x8(%ebp),%edi Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 10d99c: 9c pushf 10d99d: fa cli 10d99e: 58 pop %eax 10d99f: 89 f9 mov %edi,%ecx for( index=0 ; 10d9a1: 31 d2 xor %edx,%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10d9a3: 8b 19 mov (%ecx),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10d9a5: 8d 34 52 lea (%edx,%edx,2),%esi 10d9a8: 8d 74 b7 04 lea 0x4(%edi,%esi,4),%esi index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { 10d9ac: 39 f3 cmp %esi,%ebx 10d9ae: 75 18 jne 10d9c8 <_Thread_queue_Dequeue_priority+0x38> Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10d9b0: 42 inc %edx 10d9b1: 83 c1 0c add $0xc,%ecx Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 10d9b4: 83 fa 04 cmp $0x4,%edx 10d9b7: 75 ea jne 10d9a3 <_Thread_queue_Dequeue_priority+0x13> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10d9b9: 50 push %eax 10d9ba: 9d popf return NULL; 10d9bb: 31 f6 xor %esi,%esi #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 10d9bd: 89 f0 mov %esi,%eax 10d9bf: 8d 65 f4 lea -0xc(%ebp),%esp 10d9c2: 5b pop %ebx 10d9c3: 5e pop %esi 10d9c4: 5f pop %edi 10d9c5: c9 leave 10d9c6: c3 ret 10d9c7: 90 nop <== NOT EXECUTED _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 *) 10d9c8: 89 de mov %ebx,%esi */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10d9ca: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) new_first_node = the_thread->Wait.Block2n.first; 10d9d1: 8b 53 38 mov 0x38(%ebx),%edx new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 10d9d4: 8b 0b mov (%ebx),%ecx previous_node = the_thread->Object.Node.previous; 10d9d6: 8b 7b 04 mov 0x4(%ebx),%edi 10d9d9: 89 7d d4 mov %edi,-0x2c(%ebp) 10d9dc: 8d 7b 3c lea 0x3c(%ebx),%edi if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 10d9df: 39 fa cmp %edi,%edx 10d9e1: 74 7b je 10da5e <_Thread_queue_Dequeue_priority+0xce> last_node = the_thread->Wait.Block2n.last; 10d9e3: 8b 7b 40 mov 0x40(%ebx),%edi 10d9e6: 89 7d e4 mov %edi,-0x1c(%ebp) new_second_node = new_first_node->next; 10d9e9: 8b 3a mov (%edx),%edi 10d9eb: 89 7d e0 mov %edi,-0x20(%ebp) previous_node->next = new_first_node; 10d9ee: 8b 7d d4 mov -0x2c(%ebp),%edi 10d9f1: 89 17 mov %edx,(%edi) next_node->previous = new_first_node; 10d9f3: 89 51 04 mov %edx,0x4(%ecx) new_first_node->next = next_node; 10d9f6: 89 0a mov %ecx,(%edx) new_first_node->previous = previous_node; 10d9f8: 89 7a 04 mov %edi,0x4(%edx) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10d9fb: 3b 55 e4 cmp -0x1c(%ebp),%edx 10d9fe: 74 17 je 10da17 <_Thread_queue_Dequeue_priority+0x87> /* > two threads on 2-n */ new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); 10da00: 8d 4a 38 lea 0x38(%edx),%ecx 10da03: 8b 7d e0 mov -0x20(%ebp),%edi 10da06: 89 4f 04 mov %ecx,0x4(%edi) new_first_thread->Wait.Block2n.first = new_second_node; 10da09: 89 7a 38 mov %edi,0x38(%edx) new_first_thread->Wait.Block2n.last = last_node; 10da0c: 8b 4d e4 mov -0x1c(%ebp),%ecx 10da0f: 89 4a 40 mov %ecx,0x40(%edx) 10da12: 83 c2 3c add $0x3c,%edx 10da15: 89 11 mov %edx,(%ecx) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10da17: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10da1b: 74 17 je 10da34 <_Thread_queue_Dequeue_priority+0xa4> _ISR_Enable( level ); 10da1d: 50 push %eax 10da1e: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10da1f: 83 ec 08 sub $0x8,%esp 10da22: 68 f8 ff 03 10 push $0x1003fff8 10da27: 53 push %ebx 10da28: e8 b7 f7 ff ff call 10d1e4 <_Thread_Clear_state> 10da2d: 83 c4 10 add $0x10,%esp 10da30: eb 8b jmp 10d9bd <_Thread_queue_Dequeue_priority+0x2d> 10da32: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10da34: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10da3b: 50 push %eax 10da3c: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10da3d: 83 ec 0c sub $0xc,%esp 10da40: 8d 43 48 lea 0x48(%ebx),%eax 10da43: 50 push %eax 10da44: e8 b3 0b 00 00 call 10e5fc <_Watchdog_Remove> 10da49: 58 pop %eax 10da4a: 5a pop %edx 10da4b: 68 f8 ff 03 10 push $0x1003fff8 10da50: 53 push %ebx 10da51: e8 8e f7 ff ff call 10d1e4 <_Thread_Clear_state> 10da56: 83 c4 10 add $0x10,%esp 10da59: e9 5f ff ff ff jmp 10d9bd <_Thread_queue_Dequeue_priority+0x2d> new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 10da5e: 8b 7d d4 mov -0x2c(%ebp),%edi 10da61: 89 0f mov %ecx,(%edi) next_node->previous = previous_node; 10da63: 89 79 04 mov %edi,0x4(%ecx) 10da66: eb af jmp 10da17 <_Thread_queue_Dequeue_priority+0x87> =============================================================================== 00110a74 <_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 ) { 110a74: 55 push %ebp 110a75: 89 e5 mov %esp,%ebp 110a77: 56 push %esi 110a78: 53 push %ebx 110a79: 8b 55 08 mov 0x8(%ebp),%edx 110a7c: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 110a7f: 9c pushf 110a80: fa cli 110a81: 59 pop %ecx sync_state = the_thread_queue->sync_state; 110a82: 8b 42 30 mov 0x30(%edx),%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 110a85: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 110a8c: 83 f8 01 cmp $0x1,%eax 110a8f: 74 0b je 110a9c <_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; 110a91: 8b 55 10 mov 0x10(%ebp),%edx 110a94: 89 0a mov %ecx,(%edx) return sync_state; } 110a96: 5b pop %ebx 110a97: 5e pop %esi 110a98: c9 leave 110a99: c3 ret 110a9a: 66 90 xchg %ax,%ax <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 110a9c: 8d 72 04 lea 0x4(%edx),%esi 110a9f: 89 33 mov %esi,(%ebx) ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 110aa1: 8b 72 08 mov 0x8(%edx),%esi the_chain->last = the_node; 110aa4: 89 5a 08 mov %ebx,0x8(%edx) old_last_node->next = the_node; 110aa7: 89 1e mov %ebx,(%esi) the_node->previous = old_last_node; 110aa9: 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; 110aac: 89 53 44 mov %edx,0x44(%ebx) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 110aaf: 51 push %ecx 110ab0: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return sync_state; } 110ab1: 5b pop %ebx 110ab2: 5e pop %esi 110ab3: c9 leave 110ab4: c3 ret =============================================================================== 0010db00 <_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 ) { 10db00: 55 push %ebp 10db01: 89 e5 mov %esp,%ebp 10db03: 57 push %edi 10db04: 56 push %esi 10db05: 53 push %ebx 10db06: 83 ec 10 sub $0x10,%esp 10db09: 8b 7d 0c mov 0xc(%ebp),%edi 10db0c: 8d 47 3c lea 0x3c(%edi),%eax 10db0f: 89 47 38 mov %eax,0x38(%edi) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10db12: c7 47 3c 00 00 00 00 movl $0x0,0x3c(%edi) Chain_Node *previous_node; Chain_Node *search_node; Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); 10db19: 8d 47 38 lea 0x38(%edi),%eax 10db1c: 89 47 40 mov %eax,0x40(%edi) priority = the_thread->current_priority; 10db1f: 8b 57 14 mov 0x14(%edi),%edx RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 10db22: 89 d0 mov %edx,%eax 10db24: c1 e8 06 shr $0x6,%eax header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; 10db27: 8b 4d 08 mov 0x8(%ebp),%ecx 10db2a: 8b 59 38 mov 0x38(%ecx),%ebx if ( _Thread_queue_Is_reverse_search( priority ) ) 10db2d: f6 c2 20 test $0x20,%dl 10db30: 75 66 jne 10db98 <_Thread_queue_Enqueue_priority+0x98> goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 10db32: 8d 04 40 lea (%eax,%eax,2),%eax 10db35: 8d 04 81 lea (%ecx,%eax,4),%eax 10db38: 89 45 f0 mov %eax,-0x10(%ebp) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10db3b: 83 c0 04 add $0x4,%eax 10db3e: 89 7d e8 mov %edi,-0x18(%ebp) 10db41: 89 c7 mov %eax,%edi if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10db43: 9c pushf 10db44: fa cli 10db45: 5e pop %esi 10db46: 89 75 ec mov %esi,-0x14(%ebp) search_thread = (Thread_Control *) header->first; 10db49: 8b 4d f0 mov -0x10(%ebp),%ecx 10db4c: 8b 01 mov (%ecx),%eax while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10db4e: 39 f8 cmp %edi,%eax 10db50: 75 18 jne 10db6a <_Thread_queue_Enqueue_priority+0x6a> 10db52: e9 32 01 00 00 jmp 10dc89 <_Thread_queue_Enqueue_priority+0x189> 10db57: 90 nop <== NOT EXECUTED break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10db58: 56 push %esi 10db59: 9d popf 10db5a: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10db5b: 85 58 10 test %ebx,0x10(%eax) 10db5e: 0f 84 d0 00 00 00 je 10dc34 <_Thread_queue_Enqueue_priority+0x134> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10db64: 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 ) ) { 10db66: 39 f8 cmp %edi,%eax 10db68: 74 07 je 10db71 <_Thread_queue_Enqueue_priority+0x71> search_priority = search_thread->current_priority; 10db6a: 8b 48 14 mov 0x14(%eax),%ecx if ( priority <= search_priority ) 10db6d: 39 ca cmp %ecx,%edx 10db6f: 77 e7 ja 10db58 <_Thread_queue_Enqueue_priority+0x58> 10db71: 8b 7d e8 mov -0x18(%ebp),%edi 10db74: 89 75 f0 mov %esi,-0x10(%ebp) } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10db77: 8b 75 08 mov 0x8(%ebp),%esi 10db7a: 8b 5e 30 mov 0x30(%esi),%ebx 10db7d: 83 fb 01 cmp $0x1,%ebx 10db80: 0f 84 b6 00 00 00 je 10dc3c <_Thread_queue_Enqueue_priority+0x13c> * 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; 10db86: 8b 45 10 mov 0x10(%ebp),%eax 10db89: 8b 55 ec mov -0x14(%ebp),%edx 10db8c: 89 10 mov %edx,(%eax) return the_thread_queue->sync_state; } 10db8e: 89 d8 mov %ebx,%eax 10db90: 83 c4 10 add $0x10,%esp 10db93: 5b pop %ebx 10db94: 5e pop %esi 10db95: 5f pop %edi 10db96: c9 leave 10db97: c3 ret _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10db98: 8d 04 40 lea (%eax,%eax,2),%eax 10db9b: 8b 4d 08 mov 0x8(%ebp),%ecx 10db9e: 8d 34 81 lea (%ecx,%eax,4),%esi restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 10dba1: 89 75 f0 mov %esi,-0x10(%ebp) 10dba4: 89 75 e4 mov %esi,-0x1c(%ebp) 10dba7: 89 7d e8 mov %edi,-0x18(%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; 10dbaa: 0f b6 0d 14 12 12 00 movzbl 0x121214,%ecx 10dbb1: 41 inc %ecx _ISR_Disable( level ); 10dbb2: 9c pushf 10dbb3: fa cli 10dbb4: 5f pop %edi 10dbb5: 89 7d ec mov %edi,-0x14(%ebp) search_thread = (Thread_Control *) header->last; 10dbb8: 8b 75 f0 mov -0x10(%ebp),%esi 10dbbb: 8b 46 08 mov 0x8(%esi),%eax while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10dbbe: 3b 45 e4 cmp -0x1c(%ebp),%eax 10dbc1: 74 2b je 10dbee <_Thread_queue_Enqueue_priority+0xee> search_priority = search_thread->current_priority; 10dbc3: 8b 48 14 mov 0x14(%eax),%ecx if ( priority >= search_priority ) 10dbc6: 39 ca cmp %ecx,%edx 10dbc8: 73 24 jae 10dbee <_Thread_queue_Enqueue_priority+0xee> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10dbca: 57 push %edi 10dbcb: 9d popf 10dbcc: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10dbcd: 85 58 10 test %ebx,0x10(%eax) 10dbd0: 74 59 je 10dc2b <_Thread_queue_Enqueue_priority+0x12b> 10dbd2: 8b 75 e4 mov -0x1c(%ebp),%esi 10dbd5: eb 10 jmp 10dbe7 <_Thread_queue_Enqueue_priority+0xe7> 10dbd7: 90 nop <== NOT EXECUTED search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; 10dbd8: 8b 48 14 mov 0x14(%eax),%ecx if ( priority >= search_priority ) 10dbdb: 39 ca cmp %ecx,%edx 10dbdd: 73 0f jae 10dbee <_Thread_queue_Enqueue_priority+0xee> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10dbdf: 57 push %edi 10dbe0: 9d popf 10dbe1: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10dbe2: 85 58 10 test %ebx,0x10(%eax) 10dbe5: 74 41 je 10dc28 <_Thread_queue_Enqueue_priority+0x128><== NEVER TAKEN _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) search_thread->Object.Node.previous; 10dbe7: 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 ) ) { 10dbea: 39 f0 cmp %esi,%eax 10dbec: 75 ea jne 10dbd8 <_Thread_queue_Enqueue_priority+0xd8> 10dbee: 89 7d f0 mov %edi,-0x10(%ebp) 10dbf1: 8b 7d e8 mov -0x18(%ebp),%edi } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10dbf4: 8b 75 08 mov 0x8(%ebp),%esi 10dbf7: 8b 5e 30 mov 0x30(%esi),%ebx 10dbfa: 83 fb 01 cmp $0x1,%ebx 10dbfd: 75 87 jne 10db86 <_Thread_queue_Enqueue_priority+0x86> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10dbff: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) if ( priority == search_priority ) 10dc06: 39 ca cmp %ecx,%edx 10dc08: 74 5b je 10dc65 <_Thread_queue_Enqueue_priority+0x165> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10dc0a: 8b 10 mov (%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10dc0c: 89 17 mov %edx,(%edi) the_node->previous = search_node; 10dc0e: 89 47 04 mov %eax,0x4(%edi) search_node->next = the_node; 10dc11: 89 38 mov %edi,(%eax) next_node->previous = the_node; 10dc13: 89 7a 04 mov %edi,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10dc16: 89 77 44 mov %esi,0x44(%edi) _ISR_Enable( level ); 10dc19: ff 75 f0 pushl -0x10(%ebp) 10dc1c: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10dc1d: 89 d8 mov %ebx,%eax 10dc1f: 83 c4 10 add $0x10,%esp 10dc22: 5b pop %ebx 10dc23: 5e pop %esi 10dc24: 5f pop %edi 10dc25: c9 leave 10dc26: c3 ret 10dc27: 90 nop <== NOT EXECUTED 10dc28: 89 75 e4 mov %esi,-0x1c(%ebp) <== NOT EXECUTED if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10dc2b: 57 push %edi 10dc2c: 9d popf goto restart_reverse_search; 10dc2d: e9 78 ff ff ff jmp 10dbaa <_Thread_queue_Enqueue_priority+0xaa> 10dc32: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10dc34: 56 push %esi 10dc35: 9d popf goto restart_forward_search; 10dc36: e9 08 ff ff ff jmp 10db43 <_Thread_queue_Enqueue_priority+0x43> 10dc3b: 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; 10dc3c: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) if ( priority == search_priority ) 10dc43: 39 ca cmp %ecx,%edx 10dc45: 74 1e je 10dc65 <_Thread_queue_Enqueue_priority+0x165> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10dc47: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10dc4a: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10dc4c: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10dc4f: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10dc51: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10dc54: 89 77 44 mov %esi,0x44(%edi) _ISR_Enable( level ); 10dc57: ff 75 f0 pushl -0x10(%ebp) 10dc5a: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10dc5b: 89 d8 mov %ebx,%eax 10dc5d: 83 c4 10 add $0x10,%esp 10dc60: 5b pop %ebx 10dc61: 5e pop %esi 10dc62: 5f pop %edi 10dc63: c9 leave 10dc64: c3 ret 10dc65: 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; 10dc68: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10dc6b: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10dc6d: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10dc70: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10dc72: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10dc75: 8b 45 08 mov 0x8(%ebp),%eax 10dc78: 89 47 44 mov %eax,0x44(%edi) _ISR_Enable( level ); 10dc7b: ff 75 ec pushl -0x14(%ebp) 10dc7e: 9d popf return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10dc7f: bb 01 00 00 00 mov $0x1,%ebx 10dc84: e9 05 ff ff ff jmp 10db8e <_Thread_queue_Enqueue_priority+0x8e> 10dc89: 8b 7d e8 mov -0x18(%ebp),%edi 10dc8c: 89 75 f0 mov %esi,-0x10(%ebp) if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; 10dc8f: b9 ff ff ff ff mov $0xffffffff,%ecx 10dc94: e9 de fe ff ff jmp 10db77 <_Thread_queue_Enqueue_priority+0x77> =============================================================================== 0010da68 <_Thread_queue_Enqueue_with_handler>: void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { 10da68: 55 push %ebp 10da69: 89 e5 mov %esp,%ebp 10da6b: 57 push %edi 10da6c: 56 push %esi 10da6d: 53 push %ebx 10da6e: 83 ec 24 sub $0x24,%esp 10da71: 8b 75 08 mov 0x8(%ebp),%esi 10da74: 8b 7d 0c mov 0xc(%ebp),%edi Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; 10da77: 8b 1d d8 56 12 00 mov 0x1256d8,%ebx else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 10da7d: ff 76 38 pushl 0x38(%esi) 10da80: 53 push %ebx 10da81: e8 d6 03 00 00 call 10de5c <_Thread_Set_state> /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 10da86: 83 c4 10 add $0x10,%esp 10da89: 85 ff test %edi,%edi 10da8b: 75 33 jne 10dac0 <_Thread_queue_Enqueue_with_handler+0x58> } /* * Now enqueue the thread per the discipline for this thread queue. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10da8d: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10da91: 74 64 je 10daf7 <_Thread_queue_Enqueue_with_handler+0x8f> enqueue_p = _Thread_queue_Enqueue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ enqueue_p = _Thread_queue_Enqueue_fifo; 10da93: b8 74 0a 11 00 mov $0x110a74,%eax sync_state = (*enqueue_p)( the_thread_queue, the_thread, &level ); 10da98: 51 push %ecx 10da99: 8d 55 e4 lea -0x1c(%ebp),%edx 10da9c: 52 push %edx 10da9d: 53 push %ebx 10da9e: 56 push %esi 10da9f: ff d0 call *%eax if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10daa1: 83 c4 10 add $0x10,%esp 10daa4: 83 f8 01 cmp $0x1,%eax 10daa7: 74 0e je 10dab7 <_Thread_queue_Enqueue_with_handler+0x4f> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); 10daa9: 52 push %edx 10daaa: ff 75 e4 pushl -0x1c(%ebp) 10daad: 53 push %ebx 10daae: 50 push %eax 10daaf: e8 a4 f5 ff ff call 10d058 <_Thread_blocking_operation_Cancel> 10dab4: 83 c4 10 add $0x10,%esp } 10dab7: 8d 65 f4 lea -0xc(%ebp),%esp 10daba: 5b pop %ebx 10dabb: 5e pop %esi 10dabc: 5f pop %edi 10dabd: c9 leave 10dabe: c3 ret 10dabf: 90 nop <== NOT EXECUTED /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { _Watchdog_Initialize( 10dac0: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10dac3: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10daca: 8b 55 10 mov 0x10(%ebp),%edx 10dacd: 89 53 64 mov %edx,0x64(%ebx) the_watchdog->id = id; 10dad0: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10dad3: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10dada: 89 7b 54 mov %edi,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10dadd: 83 ec 08 sub $0x8,%esp handler, the_thread->Object.id, NULL ); _Watchdog_Insert_ticks( &the_thread->Timer, timeout ); 10dae0: 8d 43 48 lea 0x48(%ebx),%eax 10dae3: 50 push %eax 10dae4: 68 04 55 12 00 push $0x125504 10dae9: e8 d6 09 00 00 call 10e4c4 <_Watchdog_Insert> 10daee: 83 c4 10 add $0x10,%esp } /* * Now enqueue the thread per the discipline for this thread queue. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10daf1: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10daf5: 75 9c jne 10da93 <_Thread_queue_Enqueue_with_handler+0x2b> enqueue_p = _Thread_queue_Enqueue_priority; 10daf7: b8 00 db 10 00 mov $0x10db00,%eax 10dafc: eb 9a jmp 10da98 <_Thread_queue_Enqueue_with_handler+0x30> =============================================================================== 00110ab8 <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 110ab8: 55 push %ebp 110ab9: 89 e5 mov %esp,%ebp 110abb: 83 ec 08 sub $0x8,%esp 110abe: 8b 45 08 mov 0x8(%ebp),%eax 110ac1: 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 ) 110ac4: 83 78 34 01 cmpl $0x1,0x34(%eax) 110ac8: 74 0e je 110ad8 <_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 ); 110aca: 89 55 0c mov %edx,0xc(%ebp) 110acd: 89 45 08 mov %eax,0x8(%ebp) } 110ad0: 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 ); 110ad1: e9 22 17 00 00 jmp 1121f8 <_Thread_queue_Extract_fifo> 110ad6: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * 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 ); 110ad8: 51 push %ecx 110ad9: 6a 00 push $0x0 110adb: 52 push %edx 110adc: 50 push %eax 110add: e8 06 00 00 00 call 110ae8 <_Thread_queue_Extract_priority_helper> 110ae2: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 110ae5: c9 leave 110ae6: c3 ret =============================================================================== 001121f8 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 1121f8: 55 push %ebp 1121f9: 89 e5 mov %esp,%ebp 1121fb: 53 push %ebx 1121fc: 83 ec 04 sub $0x4,%esp 1121ff: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 112202: 9c pushf 112203: fa cli 112204: 58 pop %eax if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 112205: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 11220c: 74 2e je 11223c <_Thread_queue_Extract_fifo+0x44> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 11220e: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 112210: 8b 53 04 mov 0x4(%ebx),%edx next->previous = previous; 112213: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 112216: 89 0a mov %ecx,(%edx) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 112218: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 11221f: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 112223: 74 1f je 112244 <_Thread_queue_Extract_fifo+0x4c> _ISR_Enable( level ); 112225: 50 push %eax 112226: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 112227: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 11222e: 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 } 112231: 8b 5d fc mov -0x4(%ebp),%ebx 112234: c9 leave 112235: e9 aa af ff ff jmp 10d1e4 <_Thread_Clear_state> 11223a: 66 90 xchg %ax,%ax <== NOT EXECUTED ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 11223c: 50 push %eax 11223d: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 11223e: 8b 5d fc mov -0x4(%ebp),%ebx 112241: c9 leave 112242: c3 ret 112243: 90 nop <== NOT EXECUTED 112244: 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 ); 11224b: 50 push %eax 11224c: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 11224d: 83 ec 0c sub $0xc,%esp 112250: 8d 43 48 lea 0x48(%ebx),%eax 112253: 50 push %eax 112254: e8 a3 c3 ff ff call 10e5fc <_Watchdog_Remove> 112259: 83 c4 10 add $0x10,%esp 11225c: eb c9 jmp 112227 <_Thread_queue_Extract_fifo+0x2f> =============================================================================== 00110ae8 <_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 ) { 110ae8: 55 push %ebp 110ae9: 89 e5 mov %esp,%ebp 110aeb: 57 push %edi 110aec: 56 push %esi 110aed: 53 push %ebx 110aee: 83 ec 1c sub $0x1c,%esp 110af1: 8b 5d 0c mov 0xc(%ebp),%ebx 110af4: 8a 45 10 mov 0x10(%ebp),%al 110af7: 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 ); 110afa: 9c pushf 110afb: fa cli 110afc: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 110aff: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 110b06: 74 68 je 110b70 <_Thread_queue_Extract_priority_helper+0x88> /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 110b08: 8b 0b mov (%ebx),%ecx previous_node = the_node->previous; 110b0a: 8b 73 04 mov 0x4(%ebx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 110b0d: 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; 110b10: 8d 53 3c lea 0x3c(%ebx),%edx if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 110b13: 39 d0 cmp %edx,%eax 110b15: 74 65 je 110b7c <_Thread_queue_Extract_priority_helper+0x94> new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 110b17: 8b 53 40 mov 0x40(%ebx),%edx new_second_node = new_first_node->next; 110b1a: 8b 38 mov (%eax),%edi previous_node->next = new_first_node; 110b1c: 89 06 mov %eax,(%esi) next_node->previous = new_first_node; 110b1e: 89 41 04 mov %eax,0x4(%ecx) new_first_node->next = next_node; 110b21: 89 08 mov %ecx,(%eax) new_first_node->previous = previous_node; 110b23: 89 70 04 mov %esi,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 110b26: 39 c2 cmp %eax,%edx 110b28: 74 11 je 110b3b <_Thread_queue_Extract_priority_helper+0x53> /* > two threads on 2-n */ new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); 110b2a: 8d 48 38 lea 0x38(%eax),%ecx 110b2d: 89 4f 04 mov %ecx,0x4(%edi) new_first_thread->Wait.Block2n.first = new_second_node; 110b30: 89 78 38 mov %edi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 110b33: 89 50 40 mov %edx,0x40(%eax) 110b36: 83 c0 3c add $0x3c,%eax 110b39: 89 02 mov %eax,(%edx) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 110b3b: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 110b3f: 75 23 jne 110b64 <_Thread_queue_Extract_priority_helper+0x7c> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 110b41: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 110b45: 74 3d je 110b84 <_Thread_queue_Extract_priority_helper+0x9c> _ISR_Enable( level ); 110b47: ff 75 e4 pushl -0x1c(%ebp) 110b4a: 9d popf 110b4b: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 110b52: 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 } 110b55: 8d 65 f4 lea -0xc(%ebp),%esp 110b58: 5b pop %ebx 110b59: 5e pop %esi 110b5a: 5f pop %edi 110b5b: c9 leave 110b5c: e9 83 c6 ff ff jmp 10d1e4 <_Thread_Clear_state> 110b61: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 110b64: ff 75 e4 pushl -0x1c(%ebp) 110b67: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 110b68: 8d 65 f4 lea -0xc(%ebp),%esp 110b6b: 5b pop %ebx 110b6c: 5e pop %esi 110b6d: 5f pop %edi 110b6e: c9 leave 110b6f: 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 ); 110b70: ff 75 e4 pushl -0x1c(%ebp) 110b73: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 110b74: 8d 65 f4 lea -0xc(%ebp),%esp 110b77: 5b pop %ebx 110b78: 5e pop %esi 110b79: 5f pop %edi 110b7a: c9 leave 110b7b: 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; 110b7c: 89 0e mov %ecx,(%esi) next_node->previous = previous_node; 110b7e: 89 71 04 mov %esi,0x4(%ecx) 110b81: eb b8 jmp 110b3b <_Thread_queue_Extract_priority_helper+0x53> 110b83: 90 nop <== NOT EXECUTED 110b84: 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 ); 110b8b: ff 75 e4 pushl -0x1c(%ebp) 110b8e: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 110b8f: 83 ec 0c sub $0xc,%esp 110b92: 8d 43 48 lea 0x48(%ebx),%eax 110b95: 50 push %eax 110b96: e8 61 da ff ff call 10e5fc <_Watchdog_Remove> 110b9b: 83 c4 10 add $0x10,%esp 110b9e: eb ab jmp 110b4b <_Thread_queue_Extract_priority_helper+0x63> =============================================================================== 0010dc9c <_Thread_queue_Extract_with_proxy>: */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 10dc9c: 55 push %ebp 10dc9d: 89 e5 mov %esp,%ebp 10dc9f: 83 ec 08 sub $0x8,%esp 10dca2: 8b 45 08 mov 0x8(%ebp),%eax States_Control state; state = the_thread->current_state; if ( _States_Is_waiting_on_thread_queue( state ) ) { 10dca5: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax) 10dcac: 75 06 jne 10dcb4 <_Thread_queue_Extract_with_proxy+0x18> #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); return true; } return false; 10dcae: 31 c0 xor %eax,%eax } 10dcb0: c9 leave 10dcb1: c3 ret 10dcb2: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( proxy_extract_callout ) (*proxy_extract_callout)( the_thread ); } #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 10dcb4: 83 ec 08 sub $0x8,%esp 10dcb7: 50 push %eax 10dcb8: ff 70 44 pushl 0x44(%eax) 10dcbb: e8 f8 2d 00 00 call 110ab8 <_Thread_queue_Extract> return true; 10dcc0: 83 c4 10 add $0x10,%esp 10dcc3: b0 01 mov $0x1,%al } return false; } 10dcc5: c9 leave 10dcc6: c3 ret =============================================================================== 0011efb4 <_Thread_queue_First>: */ Thread_Control *_Thread_queue_First( Thread_queue_Control *the_thread_queue ) { 11efb4: 55 push %ebp 11efb5: 89 e5 mov %esp,%ebp 11efb7: 83 ec 08 sub $0x8,%esp 11efba: 8b 45 08 mov 0x8(%ebp),%eax Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 11efbd: 83 78 34 01 cmpl $0x1,0x34(%eax) 11efc1: 74 0d je 11efd0 <_Thread_queue_First+0x1c> first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; 11efc3: ba d8 03 12 00 mov $0x1203d8,%edx return (*first_p)( the_thread_queue ); 11efc8: 89 45 08 mov %eax,0x8(%ebp) } 11efcb: 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 ); 11efcc: ff e2 jmp *%edx 11efce: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) first_p = _Thread_queue_First_priority; 11efd0: ba dc ef 11 00 mov $0x11efdc,%edx else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 11efd5: 89 45 08 mov %eax,0x8(%ebp) } 11efd8: 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 ); 11efd9: ff e2 jmp *%edx =============================================================================== 001203d8 <_Thread_queue_First_fifo>: */ Thread_Control *_Thread_queue_First_fifo( Thread_queue_Control *the_thread_queue ) { 1203d8: 55 push %ebp 1203d9: 89 e5 mov %esp,%ebp 1203db: 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)); 1203de: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1203e0: 83 c2 04 add $0x4,%edx if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) 1203e3: 39 d0 cmp %edx,%eax 1203e5: 74 05 je 1203ec <_Thread_queue_First_fifo+0x14> return (Thread_Control *) the_thread_queue->Queues.Fifo.first; return NULL; } 1203e7: c9 leave 1203e8: c3 ret 1203e9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) return (Thread_Control *) the_thread_queue->Queues.Fifo.first; return NULL; 1203ec: 31 c0 xor %eax,%eax } 1203ee: c9 leave 1203ef: c3 ret =============================================================================== 0010dcc8 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 10dcc8: 55 push %ebp 10dcc9: 89 e5 mov %esp,%ebp 10dccb: 56 push %esi 10dccc: 53 push %ebx 10dccd: 8b 5d 08 mov 0x8(%ebp),%ebx 10dcd0: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10dcd3: eb 06 jmp 10dcdb <_Thread_queue_Flush+0x13> 10dcd5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #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; 10dcd8: 89 70 34 mov %esi,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10dcdb: 83 ec 0c sub $0xc,%esp 10dcde: 53 push %ebx 10dcdf: e8 60 fc ff ff call 10d944 <_Thread_queue_Dequeue> 10dce4: 83 c4 10 add $0x10,%esp 10dce7: 85 c0 test %eax,%eax 10dce9: 75 ed jne 10dcd8 <_Thread_queue_Flush+0x10> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10dceb: 8d 65 f8 lea -0x8(%ebp),%esp 10dcee: 5b pop %ebx 10dcef: 5e pop %esi 10dcf0: c9 leave 10dcf1: c3 ret =============================================================================== 0010dcf4 <_Thread_queue_Initialize>: Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 10dcf4: 55 push %ebp 10dcf5: 89 e5 mov %esp,%ebp 10dcf7: 56 push %esi 10dcf8: 53 push %ebx 10dcf9: 8b 45 08 mov 0x8(%ebp),%eax 10dcfc: 8b 55 0c mov 0xc(%ebp),%edx the_thread_queue->state = state; 10dcff: 8b 4d 10 mov 0x10(%ebp),%ecx 10dd02: 89 48 38 mov %ecx,0x38(%eax) the_thread_queue->discipline = the_discipline; 10dd05: 89 50 34 mov %edx,0x34(%eax) the_thread_queue->timeout_status = timeout_status; 10dd08: 8b 4d 14 mov 0x14(%ebp),%ecx 10dd0b: 89 48 3c mov %ecx,0x3c(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10dd0e: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10dd15: 83 fa 01 cmp $0x1,%edx 10dd18: 74 16 je 10dd30 <_Thread_queue_Initialize+0x3c> 10dd1a: 8d 50 04 lea 0x4(%eax),%edx 10dd1d: 89 10 mov %edx,(%eax) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10dd1f: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10dd26: 89 40 08 mov %eax,0x8(%eax) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); } else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); } } 10dd29: 5b pop %ebx 10dd2a: 5e pop %esi 10dd2b: c9 leave 10dd2c: c3 ret 10dd2d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10dd30: 89 c1 mov %eax,%ecx 10dd32: 30 d2 xor %dl,%dl */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10dd34: 8d 1c 52 lea (%edx,%edx,2),%ebx 10dd37: 8d 1c 98 lea (%eax,%ebx,4),%ebx 10dd3a: 8d 73 04 lea 0x4(%ebx),%esi 10dd3d: 89 31 mov %esi,(%ecx) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 10dd3f: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 10dd46: 89 59 08 mov %ebx,0x8(%ecx) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) 10dd49: 42 inc %edx 10dd4a: 83 c1 0c add $0xc,%ecx the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 10dd4d: 83 fa 04 cmp $0x4,%edx 10dd50: 75 e2 jne 10dd34 <_Thread_queue_Initialize+0x40> _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); } else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); } } 10dd52: 5b pop %ebx 10dd53: 5e pop %esi 10dd54: c9 leave 10dd55: c3 ret =============================================================================== 00110ba0 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 110ba0: 55 push %ebp 110ba1: 89 e5 mov %esp,%ebp 110ba3: 83 ec 08 sub $0x8,%esp 110ba6: 8b 45 08 mov 0x8(%ebp),%eax Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 110ba9: 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 && 110bac: 8b 4a 30 mov 0x30(%edx),%ecx 110baf: 85 c9 test %ecx,%ecx 110bb1: 74 08 je 110bbb <_Thread_queue_Process_timeout+0x1b> 110bb3: 3b 05 d8 56 12 00 cmp 0x1256d8,%eax 110bb9: 74 15 je 110bd0 <_Thread_queue_Process_timeout+0x30><== 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; 110bbb: 8b 4a 3c mov 0x3c(%edx),%ecx 110bbe: 89 48 34 mov %ecx,0x34(%eax) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 110bc1: 83 ec 08 sub $0x8,%esp 110bc4: 50 push %eax 110bc5: 52 push %edx 110bc6: e8 ed fe ff ff call 110ab8 <_Thread_queue_Extract> 110bcb: 83 c4 10 add $0x10,%esp } } 110bce: c9 leave 110bcf: c3 ret * 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 ) { 110bd0: 83 f9 03 cmp $0x3,%ecx 110bd3: 74 f9 je 110bce <_Thread_queue_Process_timeout+0x2e> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 110bd5: 8b 4a 3c mov 0x3c(%edx),%ecx 110bd8: 89 48 34 mov %ecx,0x34(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 110bdb: 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 ); } } 110be2: c9 leave 110be3: c3 ret =============================================================================== 0010dd58 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10dd58: 55 push %ebp 10dd59: 89 e5 mov %esp,%ebp 10dd5b: 57 push %edi 10dd5c: 56 push %esi 10dd5d: 53 push %ebx 10dd5e: 83 ec 1c sub $0x1c,%esp 10dd61: 8b 75 08 mov 0x8(%ebp),%esi 10dd64: 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 ) 10dd67: 85 f6 test %esi,%esi 10dd69: 74 06 je 10dd71 <_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 ) { 10dd6b: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10dd6f: 74 0b je 10dd7c <_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 ); } } 10dd71: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10dd74: 5b pop %ebx <== NOT EXECUTED 10dd75: 5e pop %esi <== NOT EXECUTED 10dd76: 5f pop %edi <== NOT EXECUTED 10dd77: c9 leave <== NOT EXECUTED 10dd78: c3 ret <== NOT EXECUTED 10dd79: 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 ); 10dd7c: 9c pushf 10dd7d: fa cli 10dd7e: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10dd7f: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10dd86: 75 0c jne 10dd94 <_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 ); 10dd88: 53 push %ebx 10dd89: 9d popf } } 10dd8a: 8d 65 f4 lea -0xc(%ebp),%esp 10dd8d: 5b pop %ebx 10dd8e: 5e pop %esi 10dd8f: 5f pop %edi 10dd90: c9 leave 10dd91: c3 ret 10dd92: 66 90 xchg %ax,%ax <== NOT EXECUTED 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; 10dd94: 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 ); 10dd9b: 50 push %eax 10dd9c: 6a 01 push $0x1 10dd9e: 57 push %edi 10dd9f: 56 push %esi 10dda0: e8 43 2d 00 00 call 110ae8 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10dda5: 83 c4 0c add $0xc,%esp 10dda8: 8d 45 e4 lea -0x1c(%ebp),%eax 10ddab: 50 push %eax 10ddac: 57 push %edi 10ddad: 56 push %esi 10ddae: e8 4d fd ff ff call 10db00 <_Thread_queue_Enqueue_priority> 10ddb3: 83 c4 10 add $0x10,%esp 10ddb6: eb d0 jmp 10dd88 <_Thread_queue_Requeue+0x30> =============================================================================== 0010ddb8 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10ddb8: 55 push %ebp 10ddb9: 89 e5 mov %esp,%ebp 10ddbb: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10ddbe: 8d 45 f4 lea -0xc(%ebp),%eax 10ddc1: 50 push %eax 10ddc2: ff 75 08 pushl 0x8(%ebp) 10ddc5: e8 02 f8 ff ff call 10d5cc <_Thread_Get> switch ( location ) { 10ddca: 83 c4 10 add $0x10,%esp 10ddcd: 8b 55 f4 mov -0xc(%ebp),%edx 10ddd0: 85 d2 test %edx,%edx 10ddd2: 75 17 jne 10ddeb <_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 ); 10ddd4: 83 ec 0c sub $0xc,%esp 10ddd7: 50 push %eax 10ddd8: e8 c3 2d 00 00 call 110ba0 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10dddd: a1 34 54 12 00 mov 0x125434,%eax 10dde2: 48 dec %eax 10dde3: a3 34 54 12 00 mov %eax,0x125434 10dde8: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10ddeb: c9 leave 10ddec: c3 ret =============================================================================== 00118d94 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 118d94: 55 push %ebp 118d95: 89 e5 mov %esp,%ebp 118d97: 57 push %edi 118d98: 56 push %esi 118d99: 53 push %ebx 118d9a: 83 ec 4c sub $0x4c,%esp 118d9d: 8b 5d 08 mov 0x8(%ebp),%ebx 118da0: 8d 45 e0 lea -0x20(%ebp),%eax 118da3: 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); 118da6: 89 45 dc mov %eax,-0x24(%ebp) the_chain->permanent_null = NULL; 118da9: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) Timer_server_Control *ts = (Timer_server_Control *) arg; Chain_Control insert_chain; Chain_Control fire_chain; _Chain_Initialize_empty( &insert_chain ); 118db0: 8d 4d dc lea -0x24(%ebp),%ecx 118db3: 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; 118db6: 8d 7d d0 lea -0x30(%ebp),%edi 118db9: 8d 45 d4 lea -0x2c(%ebp),%eax 118dbc: 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); 118dbf: 89 45 d0 mov %eax,-0x30(%ebp) the_chain->permanent_null = NULL; 118dc2: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 118dc9: 89 7d d8 mov %edi,-0x28(%ebp) 118dcc: 8d 73 30 lea 0x30(%ebx),%esi 118dcf: 8d 4b 68 lea 0x68(%ebx),%ecx 118dd2: 89 4d c4 mov %ecx,-0x3c(%ebp) 118dd5: 8d 43 08 lea 0x8(%ebx),%eax 118dd8: 89 45 c0 mov %eax,-0x40(%ebp) 118ddb: 8d 53 40 lea 0x40(%ebx),%edx 118dde: 89 55 bc mov %edx,-0x44(%ebp) 118de1: 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; 118de4: 8d 4d dc lea -0x24(%ebp),%ecx 118de7: 89 4b 78 mov %ecx,0x78(%ebx) 118dea: 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; 118dec: a1 e4 0a 14 00 mov 0x140ae4,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 118df1: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 118df4: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118df7: 51 push %ecx 118df8: 57 push %edi Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 118df9: 29 d0 sub %edx,%eax watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118dfb: 50 push %eax 118dfc: 56 push %esi 118dfd: e8 c2 3d 00 00 call 11cbc4 <_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(); 118e02: a1 28 0a 14 00 mov 0x140a28,%eax Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 118e07: 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 ) { 118e0a: 83 c4 10 add $0x10,%esp 118e0d: 39 d0 cmp %edx,%eax 118e0f: 77 63 ja 118e74 <_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 ) { 118e11: 72 7d jb 118e90 <_Timer_server_Body+0xfc> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 118e13: 89 43 74 mov %eax,0x74(%ebx) 118e16: 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 ); 118e18: 8b 43 78 mov 0x78(%ebx),%eax 118e1b: 83 ec 0c sub $0xc,%esp 118e1e: 50 push %eax 118e1f: e8 a0 09 00 00 call 1197c4 <_Chain_Get> if ( timer == NULL ) { 118e24: 83 c4 10 add $0x10,%esp 118e27: 85 c0 test %eax,%eax 118e29: 74 35 je 118e60 <_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 ) { 118e2b: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 118e2e: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 118e31: 74 19 je 118e4c <_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 ) { 118e33: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 118e36: 75 e0 jne 118e18 <_Timer_server_Body+0x84><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 118e38: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118e3b: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 118e3e: 50 push %eax <== NOT EXECUTED 118e3f: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 118e42: e8 09 3e 00 00 call 11cc50 <_Watchdog_Insert> <== NOT EXECUTED 118e47: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118e4a: eb cc jmp 118e18 <_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 ); 118e4c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118e4f: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 118e52: 50 push %eax <== NOT EXECUTED 118e53: 56 push %esi <== NOT EXECUTED 118e54: e8 f7 3d 00 00 call 11cc50 <_Watchdog_Insert> <== NOT EXECUTED 118e59: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118e5c: eb ba jmp 118e18 <_Timer_server_Body+0x84><== NOT EXECUTED 118e5e: 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 ); 118e60: 9c pushf 118e61: fa cli 118e62: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 118e63: 8b 55 b4 mov -0x4c(%ebp),%edx 118e66: 3b 55 dc cmp -0x24(%ebp),%edx 118e69: 74 41 je 118eac <_Timer_server_Body+0x118><== ALWAYS TAKEN ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 118e6b: 50 push %eax <== NOT EXECUTED 118e6c: 9d popf <== NOT EXECUTED 118e6d: e9 7a ff ff ff jmp 118dec <_Timer_server_Body+0x58><== NOT EXECUTED 118e72: 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 ); 118e74: 51 push %ecx 118e75: 57 push %edi if ( snapshot > last_snapshot ) { /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; 118e76: 89 c1 mov %eax,%ecx 118e78: 29 d1 sub %edx,%ecx _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118e7a: 51 push %ecx 118e7b: ff 75 c4 pushl -0x3c(%ebp) 118e7e: 89 45 b8 mov %eax,-0x48(%ebp) 118e81: e8 3e 3d 00 00 call 11cbc4 <_Watchdog_Adjust_to_chain> 118e86: 83 c4 10 add $0x10,%esp 118e89: 8b 45 b8 mov -0x48(%ebp),%eax 118e8c: eb 85 jmp 118e13 <_Timer_server_Body+0x7f> 118e8e: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * 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 ); 118e90: 51 push %ecx } else if ( snapshot < last_snapshot ) { /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; 118e91: 29 c2 sub %eax,%edx _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 118e93: 52 push %edx 118e94: 6a 01 push $0x1 118e96: ff 75 c4 pushl -0x3c(%ebp) 118e99: 89 45 b8 mov %eax,-0x48(%ebp) 118e9c: e8 ab 3c 00 00 call 11cb4c <_Watchdog_Adjust> 118ea1: 83 c4 10 add $0x10,%esp 118ea4: 8b 45 b8 mov -0x48(%ebp),%eax 118ea7: e9 67 ff ff ff jmp 118e13 <_Timer_server_Body+0x7f> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 118eac: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 118eb3: 50 push %eax 118eb4: 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 ) ) { 118eb5: 8b 4d b0 mov -0x50(%ebp),%ecx 118eb8: 3b 4d d0 cmp -0x30(%ebp),%ecx 118ebb: 75 23 jne 118ee0 <_Timer_server_Body+0x14c> 118ebd: eb 33 jmp 118ef2 <_Timer_server_Body+0x15e> 118ebf: 90 nop <== NOT EXECUTED { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 118ec0: 8b 10 mov (%eax),%edx the_chain->first = new_first; 118ec2: 89 55 d0 mov %edx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 118ec5: 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; 118ec8: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 118ecf: 51 push %ecx 118ed0: 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 ); 118ed1: 83 ec 08 sub $0x8,%esp 118ed4: ff 70 24 pushl 0x24(%eax) 118ed7: ff 70 20 pushl 0x20(%eax) 118eda: ff 50 1c call *0x1c(%eax) } 118edd: 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 ); 118ee0: 9c pushf 118ee1: fa cli 118ee2: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118ee3: 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)) 118ee6: 39 45 b0 cmp %eax,-0x50(%ebp) 118ee9: 75 d5 jne 118ec0 <_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 ); 118eeb: 51 push %ecx 118eec: 9d popf 118eed: e9 f2 fe ff ff jmp 118de4 <_Timer_server_Body+0x50> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 118ef2: c6 43 7c 00 movb $0x0,0x7c(%ebx) 118ef6: a1 94 09 14 00 mov 0x140994,%eax 118efb: 40 inc %eax 118efc: a3 94 09 14 00 mov %eax,0x140994 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 118f01: 83 ec 08 sub $0x8,%esp 118f04: 6a 08 push $0x8 118f06: ff 33 pushl (%ebx) 118f08: e8 6b 34 00 00 call 11c378 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 118f0d: 89 d8 mov %ebx,%eax 118f0f: e8 e0 fd ff ff call 118cf4 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 118f14: 89 d8 mov %ebx,%eax 118f16: e8 29 fe ff ff call 118d44 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 118f1b: e8 8c 2a 00 00 call 11b9ac <_Thread_Enable_dispatch> ts->active = true; 118f20: 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 ); 118f24: 5a pop %edx 118f25: ff 75 c0 pushl -0x40(%ebp) 118f28: e8 5b 3e 00 00 call 11cd88 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 118f2d: 58 pop %eax 118f2e: ff 75 bc pushl -0x44(%ebp) 118f31: e8 52 3e 00 00 call 11cd88 <_Watchdog_Remove> 118f36: 83 c4 10 add $0x10,%esp 118f39: e9 a6 fe ff ff jmp 118de4 <_Timer_server_Body+0x50> =============================================================================== 00118cf4 <_Timer_server_Reset_interval_system_watchdog>: } static void _Timer_server_Reset_interval_system_watchdog( Timer_server_Control *ts ) { 118cf4: 55 push %ebp 118cf5: 89 e5 mov %esp,%ebp 118cf7: 56 push %esi 118cf8: 53 push %ebx 118cf9: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 118cfb: 8d 70 08 lea 0x8(%eax),%esi 118cfe: 83 ec 0c sub $0xc,%esp 118d01: 56 push %esi 118d02: e8 81 40 00 00 call 11cd88 <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_interval_system_watchdog( ts ); _ISR_Disable( level ); 118d07: 9c pushf 118d08: fa cli 118d09: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118d0a: 8b 43 30 mov 0x30(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 118d0d: 8d 53 34 lea 0x34(%ebx),%edx if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 118d10: 83 c4 10 add $0x10,%esp 118d13: 39 d0 cmp %edx,%eax 118d15: 74 21 je 118d38 <_Timer_server_Reset_interval_system_watchdog+0x44> Watchdog_Interval delta_interval = 118d17: 8b 40 10 mov 0x10(%eax),%eax _Watchdog_First( &ts->Interval_watchdogs.Chain )->delta_interval; _ISR_Enable( level ); 118d1a: 51 push %ecx 118d1b: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118d1c: 89 43 14 mov %eax,0x14(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 118d1f: 83 ec 08 sub $0x8,%esp 118d22: 56 push %esi 118d23: 68 64 0a 14 00 push $0x140a64 118d28: e8 23 3f 00 00 call 11cc50 <_Watchdog_Insert> 118d2d: 83 c4 10 add $0x10,%esp delta_interval ); } else { _ISR_Enable( level ); } } 118d30: 8d 65 f8 lea -0x8(%ebp),%esp 118d33: 5b pop %ebx 118d34: 5e pop %esi 118d35: c9 leave 118d36: c3 ret 118d37: 90 nop <== NOT EXECUTED _Watchdog_Insert_ticks( &ts->Interval_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 118d38: 51 push %ecx 118d39: 9d popf } } 118d3a: 8d 65 f8 lea -0x8(%ebp),%esp 118d3d: 5b pop %ebx 118d3e: 5e pop %esi 118d3f: c9 leave 118d40: c3 ret =============================================================================== 00118d44 <_Timer_server_Reset_tod_system_watchdog>: } static void _Timer_server_Reset_tod_system_watchdog( Timer_server_Control *ts ) { 118d44: 55 push %ebp 118d45: 89 e5 mov %esp,%ebp 118d47: 56 push %esi 118d48: 53 push %ebx 118d49: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 118d4b: 8d 70 40 lea 0x40(%eax),%esi 118d4e: 83 ec 0c sub $0xc,%esp 118d51: 56 push %esi 118d52: e8 31 40 00 00 call 11cd88 <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_tod_system_watchdog( ts ); _ISR_Disable( level ); 118d57: 9c pushf 118d58: fa cli 118d59: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118d5a: 8b 43 68 mov 0x68(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 118d5d: 8d 53 6c lea 0x6c(%ebx),%edx if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 118d60: 83 c4 10 add $0x10,%esp 118d63: 39 d0 cmp %edx,%eax 118d65: 74 21 je 118d88 <_Timer_server_Reset_tod_system_watchdog+0x44> Watchdog_Interval delta_interval = 118d67: 8b 40 10 mov 0x10(%eax),%eax _Watchdog_First( &ts->TOD_watchdogs.Chain )->delta_interval; _ISR_Enable( level ); 118d6a: 51 push %ecx 118d6b: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118d6c: 89 43 4c mov %eax,0x4c(%ebx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 118d6f: 83 ec 08 sub $0x8,%esp 118d72: 56 push %esi 118d73: 68 58 0a 14 00 push $0x140a58 118d78: e8 d3 3e 00 00 call 11cc50 <_Watchdog_Insert> 118d7d: 83 c4 10 add $0x10,%esp delta_interval ); } else { _ISR_Enable( level ); } } 118d80: 8d 65 f8 lea -0x8(%ebp),%esp 118d83: 5b pop %ebx 118d84: 5e pop %esi 118d85: c9 leave 118d86: c3 ret 118d87: 90 nop <== NOT EXECUTED _Watchdog_Insert_seconds( &ts->TOD_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 118d88: 51 push %ecx 118d89: 9d popf } } 118d8a: 8d 65 f8 lea -0x8(%ebp),%esp 118d8d: 5b pop %ebx 118d8e: 5e pop %esi 118d8f: c9 leave 118d90: c3 ret =============================================================================== 00118f40 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 118f40: 55 push %ebp 118f41: 89 e5 mov %esp,%ebp 118f43: 57 push %edi 118f44: 56 push %esi 118f45: 53 push %ebx 118f46: 83 ec 2c sub $0x2c,%esp 118f49: 8b 5d 08 mov 0x8(%ebp),%ebx 118f4c: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 118f4f: 8b 53 78 mov 0x78(%ebx),%edx 118f52: 85 d2 test %edx,%edx 118f54: 74 16 je 118f6c <_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 ); 118f56: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 118f59: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 118f5c: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 118f5f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 118f62: 5b pop %ebx <== NOT EXECUTED 118f63: 5e pop %esi <== NOT EXECUTED 118f64: 5f pop %edi <== NOT EXECUTED 118f65: 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 ); 118f66: e9 1d 08 00 00 jmp 119788 <_Chain_Append> <== NOT EXECUTED 118f6b: 90 nop <== NOT EXECUTED 118f6c: 8b 15 94 09 14 00 mov 0x140994,%edx 118f72: 42 inc %edx 118f73: 89 15 94 09 14 00 mov %edx,0x140994 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118f79: 8b 50 38 mov 0x38(%eax),%edx 118f7c: 83 fa 01 cmp $0x1,%edx 118f7f: 74 7b je 118ffc <_Timer_server_Schedule_operation_method+0xbc> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 118f81: 83 fa 03 cmp $0x3,%edx 118f84: 74 0e je 118f94 <_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 ); } } 118f86: 8d 65 f4 lea -0xc(%ebp),%esp 118f89: 5b pop %ebx 118f8a: 5e pop %esi 118f8b: 5f pop %edi 118f8c: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 118f8d: e9 1a 2a 00 00 jmp 11b9ac <_Thread_Enable_dispatch> 118f92: 66 90 xchg %ax,%ax <== NOT EXECUTED } 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 ); 118f94: 9c pushf 118f95: fa cli 118f96: 8f 45 e4 popl -0x1c(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 118f99: 8b 0d 28 0a 14 00 mov 0x140a28,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 118f9f: 8b 53 74 mov 0x74(%ebx),%edx 118fa2: 89 55 d4 mov %edx,-0x2c(%ebp) */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118fa5: 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; 118fa8: 8d 7b 6c lea 0x6c(%ebx),%edi if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 118fab: 39 fa cmp %edi,%edx 118fad: 74 21 je 118fd0 <_Timer_server_Schedule_operation_method+0x90> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 118faf: 8b 7a 10 mov 0x10(%edx),%edi if ( snapshot > last_snapshot ) { 118fb2: 3b 4d d4 cmp -0x2c(%ebp),%ecx 118fb5: 0f 86 a1 00 00 00 jbe 11905c <_Timer_server_Schedule_operation_method+0x11c> /* * We advanced in time. */ delta = snapshot - last_snapshot; 118fbb: 89 ce mov %ecx,%esi 118fbd: 2b 75 d4 sub -0x2c(%ebp),%esi 118fc0: 89 75 d4 mov %esi,-0x2c(%ebp) if (delta_interval > delta) { 118fc3: 39 f7 cmp %esi,%edi 118fc5: 0f 86 9b 00 00 00 jbe 119066 <_Timer_server_Schedule_operation_method+0x126><== NEVER TAKEN delta_interval -= delta; 118fcb: 29 f7 sub %esi,%edi * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 118fcd: 89 7a 10 mov %edi,0x10(%edx) } ts->TOD_watchdogs.last_snapshot = snapshot; 118fd0: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 118fd3: ff 75 e4 pushl -0x1c(%ebp) 118fd6: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 118fd7: 83 ec 08 sub $0x8,%esp 118fda: 83 c0 10 add $0x10,%eax 118fdd: 50 push %eax 118fde: 8d 43 68 lea 0x68(%ebx),%eax 118fe1: 50 push %eax 118fe2: e8 69 3c 00 00 call 11cc50 <_Watchdog_Insert> if ( !ts->active ) { 118fe7: 8a 43 7c mov 0x7c(%ebx),%al 118fea: 83 c4 10 add $0x10,%esp 118fed: 84 c0 test %al,%al 118fef: 75 95 jne 118f86 <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_tod_system_watchdog( ts ); 118ff1: 89 d8 mov %ebx,%eax 118ff3: e8 4c fd ff ff call 118d44 <_Timer_server_Reset_tod_system_watchdog> 118ff8: eb 8c jmp 118f86 <_Timer_server_Schedule_operation_method+0x46> 118ffa: 66 90 xchg %ax,%ax <== NOT EXECUTED 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 ); 118ffc: 9c pushf 118ffd: fa cli 118ffe: 8f 45 e4 popl -0x1c(%ebp) snapshot = _Watchdog_Ticks_since_boot; 119001: 8b 0d e4 0a 14 00 mov 0x140ae4,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 119007: 8b 7b 3c mov 0x3c(%ebx),%edi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11900a: 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; 11900d: 8d 73 34 lea 0x34(%ebx),%esi if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 119010: 39 f2 cmp %esi,%edx 119012: 74 10 je 119024 <_Timer_server_Schedule_operation_method+0xe4> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 119014: 89 ce mov %ecx,%esi 119016: 29 fe sub %edi,%esi delta_interval = first_watchdog->delta_interval; 119018: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 11901b: 39 fe cmp %edi,%esi 11901d: 73 39 jae 119058 <_Timer_server_Schedule_operation_method+0x118> delta_interval -= delta; 11901f: 29 f7 sub %esi,%edi } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 119021: 89 7a 10 mov %edi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 119024: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 119027: ff 75 e4 pushl -0x1c(%ebp) 11902a: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 11902b: 83 ec 08 sub $0x8,%esp 11902e: 83 c0 10 add $0x10,%eax 119031: 50 push %eax 119032: 8d 43 30 lea 0x30(%ebx),%eax 119035: 50 push %eax 119036: e8 15 3c 00 00 call 11cc50 <_Watchdog_Insert> if ( !ts->active ) { 11903b: 8a 43 7c mov 0x7c(%ebx),%al 11903e: 83 c4 10 add $0x10,%esp 119041: 84 c0 test %al,%al 119043: 0f 85 3d ff ff ff jne 118f86 <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_interval_system_watchdog( ts ); 119049: 89 d8 mov %ebx,%eax 11904b: e8 a4 fc ff ff call 118cf4 <_Timer_server_Reset_interval_system_watchdog> 119050: e9 31 ff ff ff jmp 118f86 <_Timer_server_Schedule_operation_method+0x46> 119055: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 119058: 31 ff xor %edi,%edi 11905a: eb c5 jmp 119021 <_Timer_server_Schedule_operation_method+0xe1> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 11905c: 03 7d d4 add -0x2c(%ebp),%edi delta_interval += delta; 11905f: 29 cf sub %ecx,%edi 119061: e9 67 ff ff ff jmp 118fcd <_Timer_server_Schedule_operation_method+0x8d> */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 119066: 31 ff xor %edi,%edi <== NOT EXECUTED 119068: e9 60 ff ff ff jmp 118fcd <_Timer_server_Schedule_operation_method+0x8d><== NOT EXECUTED =============================================================================== 0010e1a8 <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 10e1a8: 55 push %ebp 10e1a9: 89 e5 mov %esp,%ebp 10e1ab: 53 push %ebx 10e1ac: 8b 5d 08 mov 0x8(%ebp),%ebx 10e1af: 8b 55 0c mov 0xc(%ebp),%edx uint32_t seconds = add->tv_sec; 10e1b2: 8b 02 mov (%edx),%eax /* Add the basics */ time->tv_sec += add->tv_sec; 10e1b4: 01 03 add %eax,(%ebx) time->tv_nsec += add->tv_nsec; 10e1b6: 8b 52 04 mov 0x4(%edx),%edx 10e1b9: 03 53 04 add 0x4(%ebx),%edx 10e1bc: 89 53 04 mov %edx,0x4(%ebx) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10e1bf: 81 fa ff c9 9a 3b cmp $0x3b9ac9ff,%edx 10e1c5: 76 1a jbe 10e1e1 <_Timespec_Add_to+0x39> 10e1c7: 8b 0b mov (%ebx),%ecx 10e1c9: 8d 76 00 lea 0x0(%esi),%esi time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 10e1cc: 81 ea 00 ca 9a 3b sub $0x3b9aca00,%edx * * This routines adds two timespecs. The second argument is added * to the first. */ uint32_t _Timespec_Add_to( 10e1d2: 41 inc %ecx /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; time->tv_sec++; seconds++; 10e1d3: 40 inc %eax /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10e1d4: 81 fa ff c9 9a 3b cmp $0x3b9ac9ff,%edx 10e1da: 77 f0 ja 10e1cc <_Timespec_Add_to+0x24> <== NEVER TAKEN 10e1dc: 89 53 04 mov %edx,0x4(%ebx) 10e1df: 89 0b mov %ecx,(%ebx) time->tv_sec++; seconds++; } return seconds; } 10e1e1: 5b pop %ebx 10e1e2: c9 leave 10e1e3: c3 ret =============================================================================== 0010faa8 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 10faa8: 55 push %ebp 10faa9: 89 e5 mov %esp,%ebp 10faab: 57 push %edi 10faac: 56 push %esi 10faad: 53 push %ebx 10faae: 83 ec 2c sub $0x2c,%esp 10fab1: 8b 45 08 mov 0x8(%ebp),%eax 10fab4: 8b 4d 0c mov 0xc(%ebp),%ecx /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10fab7: 8b 38 mov (%eax),%edi left += lhs->tv_nsec; 10fab9: 8b 70 04 mov 0x4(%eax),%esi right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10fabc: bb 00 ca 9a 3b mov $0x3b9aca00,%ebx 10fac1: 8b 01 mov (%ecx),%eax 10fac3: f7 eb imul %ebx 10fac5: 89 45 e0 mov %eax,-0x20(%ebp) 10fac8: 89 55 e4 mov %edx,-0x1c(%ebp) right += rhs->tv_nsec; 10facb: 8b 41 04 mov 0x4(%ecx),%eax 10face: 99 cltd 10facf: 01 45 e0 add %eax,-0x20(%ebp) 10fad2: 11 55 e4 adc %edx,-0x1c(%ebp) if ( right == 0 ) { 10fad5: 8b 55 e4 mov -0x1c(%ebp),%edx 10fad8: 0b 55 e0 or -0x20(%ebp),%edx 10fadb: 74 73 je 10fb50 <_Timespec_Divide+0xa8> /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10fadd: 89 f8 mov %edi,%eax 10fadf: f7 eb imul %ebx 10fae1: 89 45 d0 mov %eax,-0x30(%ebp) 10fae4: 89 55 d4 mov %edx,-0x2c(%ebp) left += lhs->tv_nsec; 10fae7: 89 f7 mov %esi,%edi 10fae9: c1 ff 1f sar $0x1f,%edi 10faec: 01 75 d0 add %esi,-0x30(%ebp) 10faef: 11 7d d4 adc %edi,-0x2c(%ebp) * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 10faf2: 69 4d d4 a0 86 01 00 imul $0x186a0,-0x2c(%ebp),%ecx 10faf9: bb a0 86 01 00 mov $0x186a0,%ebx 10fafe: 8b 45 d0 mov -0x30(%ebp),%eax 10fb01: f7 e3 mul %ebx 10fb03: 8d 34 11 lea (%ecx,%edx,1),%esi 10fb06: ff 75 e4 pushl -0x1c(%ebp) 10fb09: ff 75 e0 pushl -0x20(%ebp) 10fb0c: 56 push %esi 10fb0d: 50 push %eax 10fb0e: e8 49 fb 00 00 call 11f65c <__udivdi3> 10fb13: 83 c4 10 add $0x10,%esp 10fb16: 89 c3 mov %eax,%ebx 10fb18: 89 d6 mov %edx,%esi *ival_percentage = answer / 1000; 10fb1a: 6a 00 push $0x0 10fb1c: 68 e8 03 00 00 push $0x3e8 10fb21: 52 push %edx 10fb22: 50 push %eax 10fb23: e8 34 fb 00 00 call 11f65c <__udivdi3> 10fb28: 83 c4 10 add $0x10,%esp 10fb2b: 8b 55 10 mov 0x10(%ebp),%edx 10fb2e: 89 02 mov %eax,(%edx) *fval_percentage = answer % 1000; 10fb30: 6a 00 push $0x0 10fb32: 68 e8 03 00 00 push $0x3e8 10fb37: 56 push %esi 10fb38: 53 push %ebx 10fb39: e8 2e fc 00 00 call 11f76c <__umoddi3> 10fb3e: 83 c4 10 add $0x10,%esp 10fb41: 8b 55 14 mov 0x14(%ebp),%edx 10fb44: 89 02 mov %eax,(%edx) } 10fb46: 8d 65 f4 lea -0xc(%ebp),%esp 10fb49: 5b pop %ebx 10fb4a: 5e pop %esi 10fb4b: 5f pop %edi 10fb4c: c9 leave 10fb4d: c3 ret 10fb4e: 66 90 xchg %ax,%ax <== NOT EXECUTED left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; if ( right == 0 ) { *ival_percentage = 0; 10fb50: 8b 45 10 mov 0x10(%ebp),%eax 10fb53: c7 00 00 00 00 00 movl $0x0,(%eax) *fval_percentage = 0; 10fb59: 8b 55 14 mov 0x14(%ebp),%edx 10fb5c: c7 02 00 00 00 00 movl $0x0,(%edx) answer = (left * 100000) / right; *ival_percentage = answer / 1000; *fval_percentage = answer % 1000; } 10fb62: 8d 65 f4 lea -0xc(%ebp),%esp 10fb65: 5b pop %ebx 10fb66: 5e pop %esi 10fb67: 5f pop %edi 10fb68: c9 leave 10fb69: c3 ret =============================================================================== 0010fd14 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 10fd14: 55 push %ebp 10fd15: 89 e5 mov %esp,%ebp 10fd17: 8b 55 08 mov 0x8(%ebp),%edx 10fd1a: 8b 45 0c mov 0xc(%ebp),%eax if ( lhs->tv_sec > rhs->tv_sec ) 10fd1d: 8b 08 mov (%eax),%ecx 10fd1f: 39 0a cmp %ecx,(%edx) 10fd21: 7f 11 jg 10fd34 <_Timespec_Greater_than+0x20> return true; if ( lhs->tv_sec < rhs->tv_sec ) 10fd23: 7c 0b jl 10fd30 <_Timespec_Greater_than+0x1c><== NEVER TAKEN #include #include #include bool _Timespec_Greater_than( 10fd25: 8b 48 04 mov 0x4(%eax),%ecx 10fd28: 39 4a 04 cmp %ecx,0x4(%edx) 10fd2b: 0f 9f c0 setg %al /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 10fd2e: c9 leave 10fd2f: c3 ret { if ( lhs->tv_sec > rhs->tv_sec ) return true; if ( lhs->tv_sec < rhs->tv_sec ) return false; 10fd30: 31 c0 xor %eax,%eax <== NOT EXECUTED /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 10fd32: c9 leave <== NOT EXECUTED 10fd33: c3 ret <== NOT EXECUTED const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) return true; 10fd34: b0 01 mov $0x1,%al /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 10fd36: c9 leave 10fd37: c3 ret =============================================================================== 0010edf0 <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 10edf0: 55 push %ebp 10edf1: 89 e5 mov %esp,%ebp 10edf3: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 10edf6: 85 c0 test %eax,%eax 10edf8: 74 1a je 10ee14 <_Timespec_Is_valid+0x24> return false; if ( time->tv_sec < 0 ) 10edfa: 8b 10 mov (%eax),%edx 10edfc: 85 d2 test %edx,%edx 10edfe: 78 14 js 10ee14 <_Timespec_Is_valid+0x24> return false; if ( time->tv_nsec < 0 ) 10ee00: 8b 40 04 mov 0x4(%eax),%eax 10ee03: 85 c0 test %eax,%eax 10ee05: 78 0d js 10ee14 <_Timespec_Is_valid+0x24> #include #include #include bool _Timespec_Is_valid( 10ee07: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10ee0c: 0f 96 c0 setbe %al if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 10ee0f: c9 leave 10ee10: c3 ret 10ee11: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( time->tv_sec < 0 ) return false; if ( time->tv_nsec < 0 ) return false; 10ee14: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 10ee16: c9 leave 10ee17: c3 ret =============================================================================== 0010e1e4 <_Timespec_Subtract>: void _Timespec_Subtract( const struct timespec *start, const struct timespec *end, struct timespec *result ) { 10e1e4: 55 push %ebp 10e1e5: 89 e5 mov %esp,%ebp 10e1e7: 56 push %esi 10e1e8: 53 push %ebx 10e1e9: 8b 5d 08 mov 0x8(%ebp),%ebx 10e1ec: 8b 75 0c mov 0xc(%ebp),%esi 10e1ef: 8b 45 10 mov 0x10(%ebp),%eax if (end->tv_nsec < start->tv_nsec) { 10e1f2: 8b 4e 04 mov 0x4(%esi),%ecx 10e1f5: 8b 53 04 mov 0x4(%ebx),%edx 10e1f8: 39 d1 cmp %edx,%ecx 10e1fa: 7c 10 jl 10e20c <_Timespec_Subtract+0x28> result->tv_sec = end->tv_sec - start->tv_sec - 1; result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; } else { result->tv_sec = end->tv_sec - start->tv_sec; 10e1fc: 8b 36 mov (%esi),%esi 10e1fe: 2b 33 sub (%ebx),%esi 10e200: 89 30 mov %esi,(%eax) result->tv_nsec = end->tv_nsec - start->tv_nsec; 10e202: 29 d1 sub %edx,%ecx 10e204: 89 48 04 mov %ecx,0x4(%eax) } } 10e207: 5b pop %ebx 10e208: 5e pop %esi 10e209: c9 leave 10e20a: c3 ret 10e20b: 90 nop <== NOT EXECUTED struct timespec *result ) { if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; 10e20c: 8b 36 mov (%esi),%esi 10e20e: 4e dec %esi 10e20f: 2b 33 sub (%ebx),%esi 10e211: 89 30 mov %esi,(%eax) result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; 10e213: 81 c1 00 ca 9a 3b add $0x3b9aca00,%ecx 10e219: 29 d1 sub %edx,%ecx 10e21b: 89 48 04 mov %ecx,0x4(%eax) } else { result->tv_sec = end->tv_sec - start->tv_sec; result->tv_nsec = end->tv_nsec - start->tv_nsec; } } 10e21e: 5b pop %ebx 10e21f: 5e pop %esi 10e220: c9 leave 10e221: c3 ret =============================================================================== 0010ee58 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 10ee58: 55 push %ebp 10ee59: 89 e5 mov %esp,%ebp 10ee5b: 56 push %esi 10ee5c: 53 push %ebx 10ee5d: 8b 5d 08 mov 0x8(%ebp),%ebx uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 10ee60: 8b 33 mov (%ebx),%esi 10ee62: 85 f6 test %esi,%esi 10ee64: 75 07 jne 10ee6d <_Timespec_To_ticks+0x15> 10ee66: 8b 43 04 mov 0x4(%ebx),%eax 10ee69: 85 c0 test %eax,%eax 10ee6b: 74 37 je 10eea4 <_Timespec_To_ticks+0x4c> return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 10ee6d: e8 da 24 00 00 call 11134c 10ee72: 89 c1 mov %eax,%ecx 10ee74: 0f af ce imul %esi,%ecx ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 10ee77: a1 2c 32 12 00 mov 0x12322c,%eax 10ee7c: 8d 04 80 lea (%eax,%eax,4),%eax 10ee7f: 8d 04 80 lea (%eax,%eax,4),%eax 10ee82: 8d 34 80 lea (%eax,%eax,4),%esi 10ee85: c1 e6 03 shl $0x3,%esi 10ee88: 8b 43 04 mov 0x4(%ebx),%eax 10ee8b: 31 d2 xor %edx,%edx 10ee8d: f7 f6 div %esi if (ticks) 10ee8f: 01 c8 add %ecx,%eax 10ee91: 74 05 je 10ee98 <_Timespec_To_ticks+0x40> return ticks; return 1; } 10ee93: 5b pop %ebx 10ee94: 5e pop %esi 10ee95: c9 leave 10ee96: c3 ret 10ee97: 90 nop <== NOT EXECUTED ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); if (ticks) return ticks; return 1; 10ee98: b8 01 00 00 00 mov $0x1,%eax } 10ee9d: 5b pop %ebx 10ee9e: 5e pop %esi 10ee9f: c9 leave 10eea0: c3 ret 10eea1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) return 0; 10eea4: 31 c0 xor %eax,%eax if (ticks) return ticks; return 1; } 10eea6: 5b pop %ebx 10eea7: 5e pop %esi 10eea8: c9 leave 10eea9: c3 ret =============================================================================== 0010e360 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10e360: 55 push %ebp 10e361: 89 e5 mov %esp,%ebp 10e363: 57 push %edi 10e364: 56 push %esi 10e365: 53 push %ebx 10e366: 83 ec 1c sub $0x1c,%esp 10e369: 8b 75 08 mov 0x8(%ebp),%esi 10e36c: 8b 7d 10 mov 0x10(%ebp),%edi 10e36f: 8a 45 0c mov 0xc(%ebp),%al Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e372: 8b 1d 74 56 12 00 mov 0x125674,%ebx 10e378: 81 fb 6c 56 12 00 cmp $0x12566c,%ebx 10e37e: 74 25 je 10e3a5 <_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 ); 10e380: 0f b6 c0 movzbl %al,%eax 10e383: 89 45 e4 mov %eax,-0x1c(%ebp) 10e386: 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 ) 10e388: 8b 43 30 mov 0x30(%ebx),%eax 10e38b: 85 c0 test %eax,%eax 10e38d: 74 0b je 10e39a <_User_extensions_Fatal+0x3a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10e38f: 52 push %edx 10e390: 57 push %edi 10e391: ff 75 e4 pushl -0x1c(%ebp) 10e394: 56 push %esi 10e395: ff d0 call *%eax 10e397: 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 ) { 10e39a: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e39d: 81 fb 6c 56 12 00 cmp $0x12566c,%ebx 10e3a3: 75 e3 jne 10e388 <_User_extensions_Fatal+0x28><== ALWAYS TAKEN the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 10e3a5: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10e3a8: 5b pop %ebx <== NOT EXECUTED 10e3a9: 5e pop %esi <== NOT EXECUTED 10e3aa: 5f pop %edi <== NOT EXECUTED 10e3ab: c9 leave <== NOT EXECUTED 10e3ac: c3 ret <== NOT EXECUTED =============================================================================== 0010e224 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10e224: 55 push %ebp 10e225: 89 e5 mov %esp,%ebp 10e227: 57 push %edi 10e228: 56 push %esi 10e229: 53 push %ebx 10e22a: 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; 10e22d: a1 58 12 12 00 mov 0x121258,%eax 10e232: 89 45 dc mov %eax,-0x24(%ebp) initial_extensions = Configuration.User_extension_table; 10e235: 8b 35 5c 12 12 00 mov 0x12125c,%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e23b: c7 05 6c 56 12 00 70 movl $0x125670,0x12566c 10e242: 56 12 00 the_chain->permanent_null = NULL; 10e245: c7 05 70 56 12 00 00 movl $0x0,0x125670 10e24c: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e24f: c7 05 74 56 12 00 6c movl $0x12566c,0x125674 10e256: 56 12 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e259: c7 05 38 54 12 00 3c movl $0x12543c,0x125438 10e260: 54 12 00 the_chain->permanent_null = NULL; 10e263: c7 05 3c 54 12 00 00 movl $0x0,0x12543c 10e26a: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e26d: c7 05 40 54 12 00 38 movl $0x125438,0x125440 10e274: 54 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10e277: 85 f6 test %esi,%esi 10e279: 74 64 je 10e2df <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( 10e27b: 89 c2 mov %eax,%edx 10e27d: 8d 04 40 lea (%eax,%eax,2),%eax 10e280: 8d 0c 82 lea (%edx,%eax,4),%ecx 10e283: c1 e1 02 shl $0x2,%ecx 10e286: 83 ec 0c sub $0xc,%esp 10e289: 51 push %ecx 10e28a: 89 4d d8 mov %ecx,-0x28(%ebp) 10e28d: e8 c6 04 00 00 call 10e758 <_Workspace_Allocate_or_fatal_error> 10e292: 89 c3 mov %eax,%ebx number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10e294: 31 c0 xor %eax,%eax 10e296: 8b 4d d8 mov -0x28(%ebp),%ecx 10e299: 89 df mov %ebx,%edi 10e29b: f3 aa rep stos %al,%es:(%edi) extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e29d: 83 c4 10 add $0x10,%esp 10e2a0: 8b 45 dc mov -0x24(%ebp),%eax 10e2a3: 85 c0 test %eax,%eax 10e2a5: 74 38 je 10e2df <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN 10e2a7: 89 75 e4 mov %esi,-0x1c(%ebp) 10e2aa: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 10e2b1: 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; 10e2b4: 8d 7b 14 lea 0x14(%ebx),%edi 10e2b7: 8b 75 e4 mov -0x1c(%ebp),%esi 10e2ba: b9 08 00 00 00 mov $0x8,%ecx 10e2bf: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10e2c1: 83 ec 0c sub $0xc,%esp 10e2c4: 53 push %ebx 10e2c5: e8 a2 2a 00 00 call 110d6c <_User_extensions_Add_set> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10e2ca: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e2cd: ff 45 e0 incl -0x20(%ebp) 10e2d0: 83 45 e4 20 addl $0x20,-0x1c(%ebp) 10e2d4: 83 c4 10 add $0x10,%esp 10e2d7: 8b 45 e0 mov -0x20(%ebp),%eax 10e2da: 39 45 dc cmp %eax,-0x24(%ebp) 10e2dd: 77 d5 ja 10e2b4 <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10e2df: 8d 65 f4 lea -0xc(%ebp),%esp 10e2e2: 5b pop %ebx 10e2e3: 5e pop %esi 10e2e4: 5f pop %edi 10e2e5: c9 leave 10e2e6: c3 ret =============================================================================== 0010f89c <_User_extensions_Remove_set>: #include void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 10f89c: 55 push %ebp 10f89d: 89 e5 mov %esp,%ebp 10f89f: 53 push %ebx 10f8a0: 83 ec 10 sub $0x10,%esp 10f8a3: 8b 5d 08 mov 0x8(%ebp),%ebx _Chain_Extract( &the_extension->Node ); 10f8a6: 53 push %ebx 10f8a7: e8 70 da ff ff call 10d31c <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 10f8ac: 83 c4 10 add $0x10,%esp 10f8af: 8b 43 24 mov 0x24(%ebx),%eax 10f8b2: 85 c0 test %eax,%eax 10f8b4: 74 12 je 10f8c8 <_User_extensions_Remove_set+0x2c> _Chain_Extract( &the_extension->Switch.Node ); 10f8b6: 83 c3 08 add $0x8,%ebx 10f8b9: 89 5d 08 mov %ebx,0x8(%ebp) } 10f8bc: 8b 5d fc mov -0x4(%ebp),%ebx 10f8bf: c9 leave /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 10f8c0: e9 57 da ff ff jmp 10d31c <_Chain_Extract> 10f8c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } 10f8c8: 8b 5d fc mov -0x4(%ebp),%ebx 10f8cb: c9 leave 10f8cc: c3 ret =============================================================================== 0010e2e8 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 10e2e8: 55 push %ebp 10e2e9: 89 e5 mov %esp,%ebp 10e2eb: 56 push %esi 10e2ec: 53 push %ebx 10e2ed: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e2f0: 8b 1d 6c 56 12 00 mov 0x12566c,%ebx 10e2f6: 81 fb 70 56 12 00 cmp $0x125670,%ebx 10e2fc: 74 1c je 10e31a <_User_extensions_Thread_begin+0x32><== NEVER TAKEN 10e2fe: 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 ) 10e300: 8b 43 28 mov 0x28(%ebx),%eax 10e303: 85 c0 test %eax,%eax 10e305: 74 09 je 10e310 <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 10e307: 83 ec 0c sub $0xc,%esp 10e30a: 56 push %esi 10e30b: ff d0 call *%eax 10e30d: 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 ) { 10e310: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e312: 81 fb 70 56 12 00 cmp $0x125670,%ebx 10e318: 75 e6 jne 10e300 <_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 ); } } 10e31a: 8d 65 f8 lea -0x8(%ebp),%esp 10e31d: 5b pop %ebx 10e31e: 5e pop %esi 10e31f: c9 leave 10e320: c3 ret =============================================================================== 0010e3b0 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 10e3b0: 55 push %ebp 10e3b1: 89 e5 mov %esp,%ebp 10e3b3: 56 push %esi 10e3b4: 53 push %ebx 10e3b5: 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 ; 10e3b8: 8b 1d 6c 56 12 00 mov 0x12566c,%ebx 10e3be: 81 fb 70 56 12 00 cmp $0x125670,%ebx 10e3c4: 74 26 je 10e3ec <_User_extensions_Thread_create+0x3c><== NEVER TAKEN 10e3c6: 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 ) { 10e3c8: 8b 43 14 mov 0x14(%ebx),%eax 10e3cb: 85 c0 test %eax,%eax 10e3cd: 74 13 je 10e3e2 <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 10e3cf: 83 ec 08 sub $0x8,%esp 10e3d2: 56 push %esi 10e3d3: ff 35 d8 56 12 00 pushl 0x1256d8 10e3d9: ff d0 call *%eax _Thread_Executing, the_thread ); if ( !status ) 10e3db: 83 c4 10 add $0x10,%esp 10e3de: 84 c0 test %al,%al 10e3e0: 74 16 je 10e3f8 <_User_extensions_Thread_create+0x48> 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 ) { 10e3e2: 8b 1b mov (%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 10e3e4: 81 fb 70 56 12 00 cmp $0x125670,%ebx 10e3ea: 75 dc jne 10e3c8 <_User_extensions_Thread_create+0x18> if ( !status ) return false; } } return true; 10e3ec: b0 01 mov $0x1,%al } 10e3ee: 8d 65 f8 lea -0x8(%ebp),%esp 10e3f1: 5b pop %ebx 10e3f2: 5e pop %esi 10e3f3: c9 leave 10e3f4: c3 ret 10e3f5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) return false; 10e3f8: 31 c0 xor %eax,%eax } } return true; } 10e3fa: 8d 65 f8 lea -0x8(%ebp),%esp 10e3fd: 5b pop %ebx 10e3fe: 5e pop %esi 10e3ff: c9 leave 10e400: c3 ret =============================================================================== 0010e404 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 10e404: 55 push %ebp 10e405: 89 e5 mov %esp,%ebp 10e407: 56 push %esi 10e408: 53 push %ebx 10e409: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e40c: 8b 1d 74 56 12 00 mov 0x125674,%ebx 10e412: 81 fb 6c 56 12 00 cmp $0x12566c,%ebx 10e418: 74 23 je 10e43d <_User_extensions_Thread_delete+0x39><== NEVER TAKEN 10e41a: 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 ) 10e41c: 8b 43 20 mov 0x20(%ebx),%eax 10e41f: 85 c0 test %eax,%eax 10e421: 74 0f je 10e432 <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 10e423: 83 ec 08 sub $0x8,%esp 10e426: 56 push %esi 10e427: ff 35 d8 56 12 00 pushl 0x1256d8 10e42d: ff d0 call *%eax 10e42f: 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 ) { 10e432: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e435: 81 fb 6c 56 12 00 cmp $0x12566c,%ebx 10e43b: 75 df jne 10e41c <_User_extensions_Thread_delete+0x18> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10e43d: 8d 65 f8 lea -0x8(%ebp),%esp 10e440: 5b pop %ebx 10e441: 5e pop %esi 10e442: c9 leave 10e443: c3 ret =============================================================================== 0010e324 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10e324: 55 push %ebp 10e325: 89 e5 mov %esp,%ebp 10e327: 56 push %esi 10e328: 53 push %ebx 10e329: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e32c: 8b 1d 74 56 12 00 mov 0x125674,%ebx 10e332: 81 fb 6c 56 12 00 cmp $0x12566c,%ebx 10e338: 74 1d je 10e357 <_User_extensions_Thread_exitted+0x33><== NEVER TAKEN 10e33a: 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 ) 10e33c: 8b 43 2c mov 0x2c(%ebx),%eax 10e33f: 85 c0 test %eax,%eax 10e341: 74 09 je 10e34c <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 10e343: 83 ec 0c sub $0xc,%esp 10e346: 56 push %esi 10e347: ff d0 call *%eax 10e349: 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 ) { 10e34c: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e34f: 81 fb 6c 56 12 00 cmp $0x12566c,%ebx 10e355: 75 e5 jne 10e33c <_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 ); } } 10e357: 8d 65 f8 lea -0x8(%ebp),%esp 10e35a: 5b pop %ebx 10e35b: 5e pop %esi 10e35c: c9 leave 10e35d: c3 ret =============================================================================== 0010f004 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 10f004: 55 push %ebp 10f005: 89 e5 mov %esp,%ebp 10f007: 56 push %esi 10f008: 53 push %ebx 10f009: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f00c: 8b 1d ec 76 12 00 mov 0x1276ec,%ebx 10f012: 81 fb f0 76 12 00 cmp $0x1276f0,%ebx 10f018: 74 22 je 10f03c <_User_extensions_Thread_restart+0x38><== NEVER TAKEN 10f01a: 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 ) 10f01c: 8b 43 1c mov 0x1c(%ebx),%eax 10f01f: 85 c0 test %eax,%eax 10f021: 74 0f je 10f032 <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 10f023: 83 ec 08 sub $0x8,%esp 10f026: 56 push %esi 10f027: ff 35 58 77 12 00 pushl 0x127758 10f02d: ff d0 call *%eax 10f02f: 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 ) { 10f032: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f034: 81 fb f0 76 12 00 cmp $0x1276f0,%ebx 10f03a: 75 e0 jne 10f01c <_User_extensions_Thread_restart+0x18> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10f03c: 8d 65 f8 lea -0x8(%ebp),%esp 10f03f: 5b pop %ebx 10f040: 5e pop %esi 10f041: c9 leave 10f042: c3 ret =============================================================================== 0010e444 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 10e444: 55 push %ebp 10e445: 89 e5 mov %esp,%ebp 10e447: 56 push %esi 10e448: 53 push %ebx 10e449: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e44c: 8b 1d 6c 56 12 00 mov 0x12566c,%ebx 10e452: 81 fb 70 56 12 00 cmp $0x125670,%ebx 10e458: 74 22 je 10e47c <_User_extensions_Thread_start+0x38><== NEVER TAKEN 10e45a: 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 ) 10e45c: 8b 43 18 mov 0x18(%ebx),%eax 10e45f: 85 c0 test %eax,%eax 10e461: 74 0f je 10e472 <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 10e463: 83 ec 08 sub $0x8,%esp 10e466: 56 push %esi 10e467: ff 35 d8 56 12 00 pushl 0x1256d8 10e46d: ff d0 call *%eax 10e46f: 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 ) { 10e472: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e474: 81 fb 70 56 12 00 cmp $0x125670,%ebx 10e47a: 75 e0 jne 10e45c <_User_extensions_Thread_start+0x18> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10e47c: 8d 65 f8 lea -0x8(%ebp),%esp 10e47f: 5b pop %ebx 10e480: 5e pop %esi 10e481: c9 leave 10e482: c3 ret =============================================================================== 0010e484 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 10e484: 55 push %ebp 10e485: 89 e5 mov %esp,%ebp 10e487: 57 push %edi 10e488: 56 push %esi 10e489: 53 push %ebx 10e48a: 83 ec 0c sub $0xc,%esp 10e48d: 8b 7d 08 mov 0x8(%ebp),%edi 10e490: 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 ; 10e493: 8b 1d 38 54 12 00 mov 0x125438,%ebx 10e499: 81 fb 3c 54 12 00 cmp $0x12543c,%ebx 10e49f: 74 18 je 10e4b9 <_User_extensions_Thread_switch+0x35><== NEVER TAKEN 10e4a1: 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 ); 10e4a4: 83 ec 08 sub $0x8,%esp 10e4a7: 56 push %esi 10e4a8: 57 push %edi 10e4a9: 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 ) { 10e4ac: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 10e4ae: 83 c4 10 add $0x10,%esp 10e4b1: 81 fb 3c 54 12 00 cmp $0x12543c,%ebx 10e4b7: 75 eb jne 10e4a4 <_User_extensions_Thread_switch+0x20> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10e4b9: 8d 65 f4 lea -0xc(%ebp),%esp 10e4bc: 5b pop %ebx 10e4bd: 5e pop %esi 10e4be: 5f pop %edi 10e4bf: c9 leave 10e4c0: c3 ret =============================================================================== 0010fe88 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10fe88: 55 push %ebp 10fe89: 89 e5 mov %esp,%ebp 10fe8b: 57 push %edi 10fe8c: 56 push %esi 10fe8d: 53 push %ebx 10fe8e: 83 ec 1c sub $0x1c,%esp 10fe91: 8b 75 08 mov 0x8(%ebp),%esi 10fe94: 8b 4d 0c mov 0xc(%ebp),%ecx 10fe97: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10fe9a: 9c pushf 10fe9b: fa cli 10fe9c: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10fe9d: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10fe9f: 8d 7e 04 lea 0x4(%esi),%edi 10fea2: 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 ) ) { 10fea5: 39 fa cmp %edi,%edx 10fea7: 74 3d je 10fee6 <_Watchdog_Adjust+0x5e> switch ( direction ) { 10fea9: 85 c9 test %ecx,%ecx 10feab: 75 43 jne 10fef0 <_Watchdog_Adjust+0x68> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10fead: 85 db test %ebx,%ebx 10feaf: 74 35 je 10fee6 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 10feb1: 8b 7a 10 mov 0x10(%edx),%edi 10feb4: 39 fb cmp %edi,%ebx 10feb6: 73 0f jae 10fec7 <_Watchdog_Adjust+0x3f> <== ALWAYS TAKEN 10feb8: eb 3e jmp 10fef8 <_Watchdog_Adjust+0x70> <== NOT EXECUTED 10feba: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10febc: 29 fb sub %edi,%ebx 10febe: 74 26 je 10fee6 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 10fec0: 8b 7a 10 mov 0x10(%edx),%edi 10fec3: 39 df cmp %ebx,%edi 10fec5: 77 31 ja 10fef8 <_Watchdog_Adjust+0x70> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10fec7: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10fece: 50 push %eax 10fecf: 9d popf _Watchdog_Tickle( header ); 10fed0: 83 ec 0c sub $0xc,%esp 10fed3: 56 push %esi 10fed4: e8 cb 01 00 00 call 1100a4 <_Watchdog_Tickle> _ISR_Disable( level ); 10fed9: 9c pushf 10feda: fa cli 10fedb: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10fedc: 8b 16 mov (%esi),%edx if ( _Chain_Is_empty( header ) ) 10fede: 83 c4 10 add $0x10,%esp 10fee1: 39 55 e4 cmp %edx,-0x1c(%ebp) 10fee4: 75 d6 jne 10febc <_Watchdog_Adjust+0x34> } break; } } _ISR_Enable( level ); 10fee6: 50 push %eax 10fee7: 9d popf } 10fee8: 8d 65 f4 lea -0xc(%ebp),%esp 10feeb: 5b pop %ebx 10feec: 5e pop %esi 10feed: 5f pop %edi 10feee: c9 leave 10feef: c3 ret * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 10fef0: 49 dec %ecx 10fef1: 75 f3 jne 10fee6 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10fef3: 01 5a 10 add %ebx,0x10(%edx) break; 10fef6: eb ee jmp 10fee6 <_Watchdog_Adjust+0x5e> case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 10fef8: 29 df sub %ebx,%edi 10fefa: 89 7a 10 mov %edi,0x10(%edx) break; 10fefd: eb e7 jmp 10fee6 <_Watchdog_Adjust+0x5e> =============================================================================== 0010e4c4 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10e4c4: 55 push %ebp 10e4c5: 89 e5 mov %esp,%ebp 10e4c7: 57 push %edi 10e4c8: 56 push %esi 10e4c9: 53 push %ebx 10e4ca: 83 ec 04 sub $0x4,%esp 10e4cd: 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; 10e4d0: 8b 3d d4 56 12 00 mov 0x1256d4,%edi _ISR_Disable( level ); 10e4d6: 9c pushf 10e4d7: fa cli 10e4d8: 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 ) { 10e4db: 8b 43 08 mov 0x8(%ebx),%eax 10e4de: 85 c0 test %eax,%eax 10e4e0: 0f 85 9e 00 00 00 jne 10e584 <_Watchdog_Insert+0xc0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10e4e6: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx) _Watchdog_Sync_count++; 10e4ed: a1 80 55 12 00 mov 0x125580,%eax 10e4f2: 40 inc %eax 10e4f3: a3 80 55 12 00 mov %eax,0x125580 restart: delta_interval = the_watchdog->initial; 10e4f8: 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 ; 10e4fb: 8b 4d 08 mov 0x8(%ebp),%ecx 10e4fe: 8b 11 mov (%ecx),%edx ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10e500: 85 c0 test %eax,%eax 10e502: 74 5d je 10e561 <_Watchdog_Insert+0x9d> 10e504: 8b 32 mov (%edx),%esi 10e506: 85 f6 test %esi,%esi 10e508: 74 57 je 10e561 <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e50a: 8b 4a 10 mov 0x10(%edx),%ecx 10e50d: 39 c8 cmp %ecx,%eax 10e50f: 73 22 jae 10e533 <_Watchdog_Insert+0x6f> 10e511: eb 49 jmp 10e55c <_Watchdog_Insert+0x98> 10e513: 90 nop <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10e514: 8b 35 e8 54 12 00 mov 0x1254e8,%esi 10e51a: 39 f7 cmp %esi,%edi 10e51c: 72 72 jb 10e590 <_Watchdog_Insert+0xcc> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10e51e: 29 c8 sub %ecx,%eax exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10e520: 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 ) ) 10e522: 85 c0 test %eax,%eax 10e524: 74 3b je 10e561 <_Watchdog_Insert+0x9d> 10e526: 8b 0a mov (%edx),%ecx 10e528: 85 c9 test %ecx,%ecx 10e52a: 74 35 je 10e561 <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e52c: 8b 4a 10 mov 0x10(%edx),%ecx 10e52f: 39 c1 cmp %eax,%ecx 10e531: 77 29 ja 10e55c <_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 ); 10e533: ff 75 f0 pushl -0x10(%ebp) 10e536: 9d popf 10e537: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10e538: 83 7b 08 01 cmpl $0x1,0x8(%ebx) 10e53c: 74 d6 je 10e514 <_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; 10e53e: 89 3d e8 54 12 00 mov %edi,0x1254e8 _Watchdog_Sync_count--; 10e544: a1 80 55 12 00 mov 0x125580,%eax 10e549: 48 dec %eax 10e54a: a3 80 55 12 00 mov %eax,0x125580 _ISR_Enable( level ); 10e54f: ff 75 f0 pushl -0x10(%ebp) 10e552: 9d popf } 10e553: 58 pop %eax 10e554: 5b pop %ebx 10e555: 5e pop %esi 10e556: 5f pop %edi 10e557: c9 leave 10e558: c3 ret 10e559: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 10e55c: 29 c1 sub %eax,%ecx 10e55e: 89 4a 10 mov %ecx,0x10(%edx) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 10e561: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10e568: 89 43 10 mov %eax,0x10(%ebx) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10e56b: 8b 42 04 mov 0x4(%edx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10e56e: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10e571: 8b 10 mov (%eax),%edx after_node->next = the_node; 10e573: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10e575: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10e577: 89 5a 04 mov %ebx,0x4(%edx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10e57a: a1 84 55 12 00 mov 0x125584,%eax 10e57f: 89 43 14 mov %eax,0x14(%ebx) 10e582: eb ba jmp 10e53e <_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 ); 10e584: ff 75 f0 pushl -0x10(%ebp) 10e587: 9d popf exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10e588: 58 pop %eax 10e589: 5b pop %ebx 10e58a: 5e pop %esi 10e58b: 5f pop %edi 10e58c: c9 leave 10e58d: c3 ret 10e58e: 66 90 xchg %ax,%ax <== NOT EXECUTED 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; 10e590: 89 3d e8 54 12 00 mov %edi,0x1254e8 goto restart; 10e596: e9 5d ff ff ff jmp 10e4f8 <_Watchdog_Insert+0x34> =============================================================================== 0010e5fc <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10e5fc: 55 push %ebp 10e5fd: 89 e5 mov %esp,%ebp 10e5ff: 56 push %esi 10e600: 53 push %ebx 10e601: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10e604: 9c pushf 10e605: fa cli 10e606: 59 pop %ecx previous_state = the_watchdog->state; 10e607: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10e60a: 83 f8 01 cmp $0x1,%eax 10e60d: 74 4d je 10e65c <_Watchdog_Remove+0x60> 10e60f: 73 0f jae 10e620 <_Watchdog_Remove+0x24> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10e611: 8b 1d 84 55 12 00 mov 0x125584,%ebx 10e617: 89 5a 18 mov %ebx,0x18(%edx) _ISR_Enable( level ); 10e61a: 51 push %ecx 10e61b: 9d popf return( previous_state ); } 10e61c: 5b pop %ebx 10e61d: 5e pop %esi 10e61e: c9 leave 10e61f: c3 ret Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 10e620: 83 f8 03 cmp $0x3,%eax 10e623: 77 ec ja 10e611 <_Watchdog_Remove+0x15> <== NEVER TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10e625: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } 10e62c: 8b 1a mov (%edx),%ebx case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10e62e: 8b 33 mov (%ebx),%esi 10e630: 85 f6 test %esi,%esi 10e632: 74 06 je 10e63a <_Watchdog_Remove+0x3e> next_watchdog->delta_interval += the_watchdog->delta_interval; 10e634: 8b 72 10 mov 0x10(%edx),%esi 10e637: 01 73 10 add %esi,0x10(%ebx) if ( _Watchdog_Sync_count ) 10e63a: 8b 35 80 55 12 00 mov 0x125580,%esi 10e640: 85 f6 test %esi,%esi 10e642: 74 0c je 10e650 <_Watchdog_Remove+0x54> _Watchdog_Sync_level = _ISR_Nest_level; 10e644: 8b 35 d4 56 12 00 mov 0x1256d4,%esi 10e64a: 89 35 e8 54 12 00 mov %esi,0x1254e8 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10e650: 8b 72 04 mov 0x4(%edx),%esi next->previous = previous; 10e653: 89 73 04 mov %esi,0x4(%ebx) previous->next = next; 10e656: 89 1e mov %ebx,(%esi) 10e658: eb b7 jmp 10e611 <_Watchdog_Remove+0x15> 10e65a: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * 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; 10e65c: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10e663: eb ac jmp 10e611 <_Watchdog_Remove+0x15> =============================================================================== 0010fa90 <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 10fa90: 55 push %ebp 10fa91: 89 e5 mov %esp,%ebp 10fa93: 57 push %edi 10fa94: 56 push %esi 10fa95: 53 push %ebx 10fa96: 83 ec 2c sub $0x2c,%esp 10fa99: 8b 55 08 mov 0x8(%ebp),%edx 10fa9c: 8b 45 0c mov 0xc(%ebp),%eax printk( 10fa9f: 8b 78 24 mov 0x24(%eax),%edi 10faa2: 8b 70 20 mov 0x20(%eax),%esi 10faa5: 8b 58 1c mov 0x1c(%eax),%ebx 10faa8: 8b 48 0c mov 0xc(%eax),%ecx 10faab: 89 4d d4 mov %ecx,-0x2c(%ebp) 10faae: 8b 48 10 mov 0x10(%eax),%ecx 10fab1: 89 4d e4 mov %ecx,-0x1c(%ebp) 10fab4: 85 d2 test %edx,%edx 10fab6: 74 2c je 10fae4 <_Watchdog_Report+0x54> 10fab8: b9 83 17 12 00 mov $0x121783,%ecx 10fabd: 83 ec 0c sub $0xc,%esp 10fac0: 57 push %edi 10fac1: 56 push %esi 10fac2: 53 push %ebx 10fac3: 50 push %eax 10fac4: ff 75 d4 pushl -0x2c(%ebp) 10fac7: ff 75 e4 pushl -0x1c(%ebp) 10faca: 51 push %ecx 10facb: 52 push %edx 10facc: 68 e6 21 12 00 push $0x1221e6 10fad1: e8 8e 9f ff ff call 109a64 10fad6: 83 c4 30 add $0x30,%esp watch, watch->routine, watch->id, watch->user_data ); } 10fad9: 8d 65 f4 lea -0xc(%ebp),%esp 10fadc: 5b pop %ebx 10fadd: 5e pop %esi 10fade: 5f pop %edi 10fadf: c9 leave 10fae0: c3 ret 10fae1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( 10fae4: b9 49 20 12 00 mov $0x122049,%ecx 10fae9: 89 ca mov %ecx,%edx 10faeb: eb d0 jmp 10fabd <_Watchdog_Report+0x2d> =============================================================================== 0010fa20 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10fa20: 55 push %ebp 10fa21: 89 e5 mov %esp,%ebp 10fa23: 57 push %edi 10fa24: 56 push %esi 10fa25: 53 push %ebx 10fa26: 83 ec 20 sub $0x20,%esp 10fa29: 8b 7d 08 mov 0x8(%ebp),%edi 10fa2c: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10fa2f: 9c pushf 10fa30: fa cli 10fa31: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10fa34: 56 push %esi 10fa35: 57 push %edi 10fa36: 68 b0 21 12 00 push $0x1221b0 10fa3b: e8 24 a0 ff ff call 109a64 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10fa40: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10fa42: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10fa45: 83 c4 10 add $0x10,%esp 10fa48: 39 f3 cmp %esi,%ebx 10fa4a: 74 31 je 10fa7d <_Watchdog_Report_chain+0x5d> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10fa4c: 83 ec 08 sub $0x8,%esp 10fa4f: 53 push %ebx 10fa50: 6a 00 push $0x0 10fa52: e8 39 00 00 00 call 10fa90 <_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 ) 10fa57: 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 ; 10fa59: 83 c4 10 add $0x10,%esp 10fa5c: 39 f3 cmp %esi,%ebx 10fa5e: 75 ec jne 10fa4c <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10fa60: 83 ec 08 sub $0x8,%esp 10fa63: 57 push %edi 10fa64: 68 c7 21 12 00 push $0x1221c7 10fa69: e8 f6 9f ff ff call 109a64 10fa6e: 83 c4 10 add $0x10,%esp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 10fa71: ff 75 e4 pushl -0x1c(%ebp) 10fa74: 9d popf } 10fa75: 8d 65 f4 lea -0xc(%ebp),%esp 10fa78: 5b pop %ebx 10fa79: 5e pop %esi 10fa7a: 5f pop %edi 10fa7b: c9 leave 10fa7c: c3 ret _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 10fa7d: 83 ec 0c sub $0xc,%esp 10fa80: 68 d6 21 12 00 push $0x1221d6 10fa85: e8 da 9f ff ff call 109a64 10fa8a: 83 c4 10 add $0x10,%esp 10fa8d: eb e2 jmp 10fa71 <_Watchdog_Report_chain+0x51> =============================================================================== 0010e668 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10e668: 55 push %ebp 10e669: 89 e5 mov %esp,%ebp 10e66b: 57 push %edi 10e66c: 56 push %esi 10e66d: 53 push %ebx 10e66e: 83 ec 1c sub $0x1c,%esp 10e671: 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 ); 10e674: 9c pushf 10e675: fa cli 10e676: 5e pop %esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e677: 8b 1f mov (%edi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e679: 8d 47 04 lea 0x4(%edi),%eax 10e67c: 89 45 e4 mov %eax,-0x1c(%ebp) if ( _Chain_Is_empty( header ) ) 10e67f: 39 c3 cmp %eax,%ebx 10e681: 74 11 je 10e694 <_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) { 10e683: 8b 43 10 mov 0x10(%ebx),%eax 10e686: 85 c0 test %eax,%eax 10e688: 74 34 je 10e6be <_Watchdog_Tickle+0x56> the_watchdog->delta_interval--; 10e68a: 48 dec %eax 10e68b: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10e68e: 85 c0 test %eax,%eax 10e690: 74 2c je 10e6be <_Watchdog_Tickle+0x56> 10e692: 66 90 xchg %ax,%ax the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 10e694: 56 push %esi 10e695: 9d popf } 10e696: 8d 65 f4 lea -0xc(%ebp),%esp 10e699: 5b pop %ebx 10e69a: 5e pop %esi 10e69b: 5f pop %edi 10e69c: c9 leave 10e69d: c3 ret _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10e69e: 83 ec 08 sub $0x8,%esp 10e6a1: ff 73 24 pushl 0x24(%ebx) 10e6a4: ff 73 20 pushl 0x20(%ebx) 10e6a7: ff 53 1c call *0x1c(%ebx) the_watchdog->id, the_watchdog->user_data ); break; 10e6aa: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10e6ad: 9c pushf 10e6ae: fa cli 10e6af: 5e pop %esi } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } 10e6b0: 8b 1f mov (%edi),%ebx _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10e6b2: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10e6b5: 74 dd je 10e694 <_Watchdog_Tickle+0x2c> } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && 10e6b7: 8b 43 10 mov 0x10(%ebx),%eax 10e6ba: 85 c0 test %eax,%eax 10e6bc: 75 d6 jne 10e694 <_Watchdog_Tickle+0x2c> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10e6be: 83 ec 0c sub $0xc,%esp 10e6c1: 53 push %ebx 10e6c2: e8 35 ff ff ff call 10e5fc <_Watchdog_Remove> _ISR_Enable( level ); 10e6c7: 56 push %esi 10e6c8: 9d popf switch( watchdog_state ) { 10e6c9: 83 c4 10 add $0x10,%esp 10e6cc: 83 f8 02 cmp $0x2,%eax 10e6cf: 75 dc jne 10e6ad <_Watchdog_Tickle+0x45> <== NEVER TAKEN 10e6d1: eb cb jmp 10e69e <_Watchdog_Tickle+0x36> =============================================================================== 0010e6d4 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 10e6d4: 55 push %ebp 10e6d5: 89 e5 mov %esp,%ebp 10e6d7: 57 push %edi 10e6d8: 53 push %ebx uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 10e6d9: 8b 1d 20 12 12 00 mov 0x121220,%ebx uintptr_t size = Configuration.work_space_size; 10e6df: 8b 15 24 12 12 00 mov 0x121224,%edx if ( Configuration.do_zero_of_workspace ) 10e6e5: 80 3d 48 12 12 00 00 cmpb $0x0,0x121248 10e6ec: 75 1e jne 10e70c <_Workspace_Handler_initialization+0x38> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 10e6ee: 6a 04 push $0x4 10e6f0: 52 push %edx 10e6f1: 53 push %ebx 10e6f2: 68 60 54 12 00 push $0x125460 10e6f7: e8 f8 de ff ff call 10c5f4 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 10e6fc: 83 c4 10 add $0x10,%esp 10e6ff: 85 c0 test %eax,%eax 10e701: 74 13 je 10e716 <_Workspace_Handler_initialization+0x42> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 10e703: 8d 65 f8 lea -0x8(%ebp),%esp 10e706: 5b pop %ebx 10e707: 5f pop %edi 10e708: c9 leave 10e709: c3 ret 10e70a: 66 90 xchg %ax,%ax <== NOT EXECUTED 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 ); 10e70c: 31 c0 xor %eax,%eax 10e70e: 89 df mov %ebx,%edi 10e710: 89 d1 mov %edx,%ecx 10e712: f3 aa rep stos %al,%es:(%edi) 10e714: eb d8 jmp 10e6ee <_Workspace_Handler_initialization+0x1a> size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 10e716: 50 push %eax 10e717: 6a 02 push $0x2 10e719: 6a 01 push $0x1 10e71b: 6a 00 push $0x0 10e71d: e8 da e0 ff ff call 10c7fc <_Internal_error_Occurred> =============================================================================== 001129c4 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 1129c4: 55 push %ebp 1129c5: 89 e5 mov %esp,%ebp 1129c7: 57 push %edi 1129c8: 56 push %esi 1129c9: 53 push %ebx 1129ca: 83 ec 2c sub $0x2c,%esp 1129cd: 8b 5d 08 mov 0x8(%ebp),%ebx 1129d0: 8b 7d 0c mov 0xc(%ebp),%edi 1129d3: 8b 45 10 mov 0x10(%ebp),%eax 1129d6: 8b 75 14 mov 0x14(%ebp),%esi Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 1129d9: 85 db test %ebx,%ebx 1129db: 0f 84 87 00 00 00 je 112a68 return RTEMS_INVALID_NAME; if ( !id ) 1129e1: 85 f6 test %esi,%esi 1129e3: 0f 84 bf 00 00 00 je 112aa8 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 1129e9: f7 c7 10 00 00 00 test $0x10,%edi 1129ef: 0f 84 83 00 00 00 je 112a78 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 1129f5: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) if ( maximum_waiters == 0 ) 1129fc: 85 c0 test %eax,%eax 1129fe: 0f 84 80 00 00 00 je 112a84 return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 112a04: 89 45 e4 mov %eax,-0x1c(%ebp) 112a07: a1 f4 86 12 00 mov 0x1286f4,%eax 112a0c: 40 inc %eax 112a0d: a3 f4 86 12 00 mov %eax,0x1286f4 * 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 ); 112a12: 83 ec 0c sub $0xc,%esp 112a15: 68 c0 89 12 00 push $0x1289c0 112a1a: e8 a5 bb ff ff call 10e5c4 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 112a1f: 83 c4 10 add $0x10,%esp 112a22: 85 c0 test %eax,%eax 112a24: 74 6e je 112a94 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 112a26: 89 78 10 mov %edi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 112a29: 83 ec 08 sub $0x8,%esp 112a2c: 8d 55 e0 lea -0x20(%ebp),%edx 112a2f: 52 push %edx 112a30: 8d 50 14 lea 0x14(%eax),%edx 112a33: 52 push %edx 112a34: 89 45 d4 mov %eax,-0x2c(%ebp) 112a37: e8 b4 07 00 00 call 1131f0 <_CORE_barrier_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 112a3c: 8b 45 d4 mov -0x2c(%ebp),%eax 112a3f: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 112a42: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 112a45: 8b 0d dc 89 12 00 mov 0x1289dc,%ecx 112a4b: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 112a4e: 89 58 0c mov %ebx,0xc(%eax) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 112a51: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 112a53: e8 b8 c8 ff ff call 10f310 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 112a58: 83 c4 10 add $0x10,%esp 112a5b: 31 c0 xor %eax,%eax } 112a5d: 8d 65 f4 lea -0xc(%ebp),%esp 112a60: 5b pop %ebx 112a61: 5e pop %esi 112a62: 5f pop %edi 112a63: c9 leave 112a64: c3 ret 112a65: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 112a68: b8 03 00 00 00 mov $0x3,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112a6d: 8d 65 f4 lea -0xc(%ebp),%esp 112a70: 5b pop %ebx 112a71: 5e pop %esi 112a72: 5f pop %edi 112a73: c9 leave 112a74: c3 ret 112a75: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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; 112a78: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) 112a7f: eb 83 jmp 112a04 112a81: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; 112a84: b8 0a 00 00 00 mov $0xa,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112a89: 8d 65 f4 lea -0xc(%ebp),%esp 112a8c: 5b pop %ebx 112a8d: 5e pop %esi 112a8e: 5f pop %edi 112a8f: c9 leave 112a90: c3 ret 112a91: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 112a94: e8 77 c8 ff ff call 10f310 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 112a99: b8 05 00 00 00 mov $0x5,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112a9e: 8d 65 f4 lea -0xc(%ebp),%esp 112aa1: 5b pop %ebx 112aa2: 5e pop %esi 112aa3: 5f pop %edi 112aa4: c9 leave 112aa5: c3 ret 112aa6: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 112aa8: b8 09 00 00 00 mov $0x9,%eax 112aad: eb ae jmp 112a5d =============================================================================== 00112ab0 : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 112ab0: 55 push %ebp 112ab1: 89 e5 mov %esp,%ebp 112ab3: 53 push %ebx 112ab4: 83 ec 18 sub $0x18,%esp Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); 112ab7: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) _Objects_Get( &_Barrier_Information, id, location ); 112aba: 50 push %eax 112abb: ff 75 08 pushl 0x8(%ebp) 112abe: 68 c0 89 12 00 push $0x1289c0 112ac3: e8 b4 bf ff ff call 10ea7c <_Objects_Get> 112ac8: 89 c3 mov %eax,%ebx switch ( location ) { 112aca: 83 c4 10 add $0x10,%esp 112acd: 8b 4d f4 mov -0xc(%ebp),%ecx 112ad0: 85 c9 test %ecx,%ecx 112ad2: 75 38 jne 112b0c case OBJECTS_LOCAL: _CORE_barrier_Flush( 112ad4: 52 push %edx 112ad5: 6a 02 push $0x2 112ad7: 6a 00 push $0x0 112ad9: 8d 40 14 lea 0x14(%eax),%eax 112adc: 50 push %eax 112add: e8 4e cf ff ff call 10fa30 <_Thread_queue_Flush> &the_barrier->Barrier, NULL, CORE_BARRIER_WAS_DELETED ); _Objects_Close( &_Barrier_Information, &the_barrier->Object ); 112ae2: 59 pop %ecx 112ae3: 58 pop %eax 112ae4: 53 push %ebx 112ae5: 68 c0 89 12 00 push $0x1289c0 112aea: e8 51 bb ff ff call 10e640 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 112aef: 58 pop %eax 112af0: 5a pop %edx 112af1: 53 push %ebx 112af2: 68 c0 89 12 00 push $0x1289c0 112af7: e8 40 be ff ff call 10e93c <_Objects_Free> _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 112afc: e8 0f c8 ff ff call 10f310 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 112b01: 83 c4 10 add $0x10,%esp 112b04: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112b06: 8b 5d fc mov -0x4(%ebp),%ebx 112b09: c9 leave 112b0a: c3 ret 112b0b: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 112b0c: b8 04 00 00 00 mov $0x4,%eax } 112b11: 8b 5d fc mov -0x4(%ebp),%ebx 112b14: c9 leave 112b15: c3 ret =============================================================================== 00112ba4 : rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout ) { 112ba4: 55 push %ebp 112ba5: 89 e5 mov %esp,%ebp 112ba7: 53 push %ebx 112ba8: 83 ec 18 sub $0x18,%esp 112bab: 8b 5d 08 mov 0x8(%ebp),%ebx Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); 112bae: 8d 45 f4 lea -0xc(%ebp),%eax 112bb1: 50 push %eax 112bb2: 53 push %ebx 112bb3: 68 c0 89 12 00 push $0x1289c0 112bb8: e8 bf be ff ff call 10ea7c <_Objects_Get> switch ( location ) { 112bbd: 83 c4 10 add $0x10,%esp 112bc0: 8b 55 f4 mov -0xc(%ebp),%edx 112bc3: 85 d2 test %edx,%edx 112bc5: 75 35 jne 112bfc case OBJECTS_LOCAL: _CORE_barrier_Wait( 112bc7: 83 ec 0c sub $0xc,%esp 112bca: 6a 00 push $0x0 112bcc: ff 75 0c pushl 0xc(%ebp) 112bcf: 6a 01 push $0x1 112bd1: 53 push %ebx 112bd2: 83 c0 14 add $0x14,%eax 112bd5: 50 push %eax 112bd6: e8 79 06 00 00 call 113254 <_CORE_barrier_Wait> id, true, timeout, NULL ); _Thread_Enable_dispatch(); 112bdb: 83 c4 20 add $0x20,%esp 112bde: e8 2d c7 ff ff call 10f310 <_Thread_Enable_dispatch> return _Barrier_Translate_core_barrier_return_code( 112be3: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code ); 112be6: a1 98 89 12 00 mov 0x128998,%eax true, timeout, NULL ); _Thread_Enable_dispatch(); return _Barrier_Translate_core_barrier_return_code( 112beb: ff 70 34 pushl 0x34(%eax) 112bee: e8 99 10 00 00 call 113c8c <_Barrier_Translate_core_barrier_return_code> 112bf3: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112bf6: 8b 5d fc mov -0x4(%ebp),%ebx 112bf9: c9 leave 112bfa: c3 ret 112bfb: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 112bfc: b8 04 00 00 00 mov $0x4,%eax } 112c01: 8b 5d fc mov -0x4(%ebp),%ebx 112c04: c9 leave 112c05: c3 ret =============================================================================== 0010bff0 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { 10bff0: 55 push %ebp 10bff1: 89 e5 mov %esp,%ebp 10bff3: 56 push %esi 10bff4: 53 push %ebx 10bff5: 8b 5d 10 mov 0x10(%ebp),%ebx 10bff8: 8b 75 14 mov 0x14(%ebp),%esi RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Append_with_empty_check( chain, node ); 10bffb: 83 ec 08 sub $0x8,%esp 10bffe: ff 75 0c pushl 0xc(%ebp) 10c001: ff 75 08 pushl 0x8(%ebp) 10c004: e8 93 04 00 00 call 10c49c <_Chain_Append_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { 10c009: 83 c4 10 add $0x10,%esp 10c00c: 84 c0 test %al,%al 10c00e: 75 0c jne 10c01c <== ALWAYS TAKEN sc = rtems_event_send( task, events ); } return sc; } 10c010: 31 c0 xor %eax,%eax <== NOT EXECUTED 10c012: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10c015: 5b pop %ebx <== NOT EXECUTED 10c016: 5e pop %esi <== NOT EXECUTED 10c017: c9 leave <== NOT EXECUTED 10c018: c3 ret <== NOT EXECUTED 10c019: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { sc = rtems_event_send( task, events ); 10c01c: 89 75 0c mov %esi,0xc(%ebp) 10c01f: 89 5d 08 mov %ebx,0x8(%ebp) } return sc; } 10c022: 8d 65 f8 lea -0x8(%ebp),%esp 10c025: 5b pop %ebx 10c026: 5e pop %esi 10c027: c9 leave { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { sc = rtems_event_send( task, events ); 10c028: e9 af f5 ff ff jmp 10b5dc =============================================================================== 0010c030 : rtems_chain_control *chain, rtems_id task, rtems_event_set events, rtems_chain_node **node ) { 10c030: 55 push %ebp 10c031: 89 e5 mov %esp,%ebp 10c033: 56 push %esi 10c034: 53 push %ebx 10c035: 8b 5d 0c mov 0xc(%ebp),%ebx 10c038: 8b 75 10 mov 0x10(%ebp),%esi RTEMS_INLINE_ROUTINE bool rtems_chain_get_with_empty_check( rtems_chain_control *chain, rtems_chain_node **node ) { return _Chain_Get_with_empty_check( chain, node ); 10c03b: 83 ec 08 sub $0x8,%esp 10c03e: ff 75 14 pushl 0x14(%ebp) 10c041: ff 75 08 pushl 0x8(%ebp) 10c044: e8 bb 04 00 00 call 10c504 <_Chain_Get_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { 10c049: 83 c4 10 add $0x10,%esp 10c04c: 84 c0 test %al,%al 10c04e: 75 0c jne 10c05c <== ALWAYS TAKEN sc = rtems_event_send( task, events ); } return sc; } 10c050: 31 c0 xor %eax,%eax <== NOT EXECUTED 10c052: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10c055: 5b pop %ebx <== NOT EXECUTED 10c056: 5e pop %esi <== NOT EXECUTED 10c057: c9 leave <== NOT EXECUTED 10c058: c3 ret <== NOT EXECUTED 10c059: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { sc = rtems_event_send( task, events ); 10c05c: 89 75 0c mov %esi,0xc(%ebp) 10c05f: 89 5d 08 mov %ebx,0x8(%ebp) } return sc; } 10c062: 8d 65 f8 lea -0x8(%ebp),%esp 10c065: 5b pop %ebx 10c066: 5e pop %esi 10c067: c9 leave { rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { sc = rtems_event_send( task, events ); 10c068: e9 6f f5 ff ff jmp 10b5dc =============================================================================== 0010c070 : rtems_chain_control *chain, rtems_event_set events, rtems_interval timeout, rtems_chain_node **node_ptr ) { 10c070: 55 push %ebp 10c071: 89 e5 mov %esp,%ebp 10c073: 57 push %edi 10c074: 56 push %esi 10c075: 53 push %ebx 10c076: 83 ec 1c sub $0x1c,%esp 10c079: 8b 75 08 mov 0x8(%ebp),%esi while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ) { rtems_event_set out; sc = rtems_event_receive( 10c07c: 8d 7d e4 lea -0x1c(%ebp),%edi 10c07f: 90 nop */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 10c080: 83 ec 0c sub $0xc,%esp 10c083: 56 push %esi 10c084: e8 b7 04 00 00 call 10c540 <_Chain_Get> 10c089: 89 c3 mov %eax,%ebx rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL 10c08b: 83 c4 10 add $0x10,%esp 10c08e: 85 c0 test %eax,%eax 10c090: 75 22 jne 10c0b4 ) { rtems_event_set out; sc = rtems_event_receive( 10c092: 57 push %edi 10c093: ff 75 10 pushl 0x10(%ebp) 10c096: 6a 00 push $0x0 10c098: ff 75 0c pushl 0xc(%ebp) 10c09b: e8 b4 f3 ff ff call 10b454 ) { rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( 10c0a0: 83 c4 10 add $0x10,%esp 10c0a3: 85 c0 test %eax,%eax 10c0a5: 74 d9 je 10c080 <== NEVER TAKEN timeout, &out ); } *node_ptr = node; 10c0a7: 8b 55 14 mov 0x14(%ebp),%edx 10c0aa: 89 1a mov %ebx,(%edx) return sc; } 10c0ac: 8d 65 f4 lea -0xc(%ebp),%esp 10c0af: 5b pop %ebx 10c0b0: 5e pop %esi 10c0b1: 5f pop %edi 10c0b2: c9 leave 10c0b3: c3 ret rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL 10c0b4: 31 c0 xor %eax,%eax timeout, &out ); } *node_ptr = node; 10c0b6: 8b 55 14 mov 0x14(%ebp),%edx 10c0b9: 89 1a mov %ebx,(%edx) return sc; } 10c0bb: 8d 65 f4 lea -0xc(%ebp),%esp 10c0be: 5b pop %ebx 10c0bf: 5e pop %esi 10c0c0: 5f pop %edi 10c0c1: c9 leave 10c0c2: c3 ret =============================================================================== 0010c0c4 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { 10c0c4: 55 push %ebp 10c0c5: 89 e5 mov %esp,%ebp 10c0c7: 56 push %esi 10c0c8: 53 push %ebx 10c0c9: 8b 5d 10 mov 0x10(%ebp),%ebx 10c0cc: 8b 75 14 mov 0x14(%ebp),%esi RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Prepend_with_empty_check( chain, node ); 10c0cf: 83 ec 08 sub $0x8,%esp 10c0d2: ff 75 0c pushl 0xc(%ebp) 10c0d5: ff 75 08 pushl 0x8(%ebp) 10c0d8: e8 a7 04 00 00 call 10c584 <_Chain_Prepend_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { 10c0dd: 83 c4 10 add $0x10,%esp 10c0e0: 84 c0 test %al,%al 10c0e2: 75 0c jne 10c0f0 <== ALWAYS TAKEN sc = rtems_event_send( task, events ); } return sc; } 10c0e4: 31 c0 xor %eax,%eax <== NOT EXECUTED 10c0e6: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10c0e9: 5b pop %ebx <== NOT EXECUTED 10c0ea: 5e pop %esi <== NOT EXECUTED 10c0eb: c9 leave <== NOT EXECUTED 10c0ec: c3 ret <== NOT EXECUTED 10c0ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { sc = rtems_event_send( task, events ); 10c0f0: 89 75 0c mov %esi,0xc(%ebp) 10c0f3: 89 5d 08 mov %ebx,0x8(%ebp) } return sc; } 10c0f6: 8d 65 f8 lea -0x8(%ebp),%esp 10c0f9: 5b pop %ebx 10c0fa: 5e pop %esi 10c0fb: c9 leave { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { sc = rtems_event_send( task, events ); 10c0fc: e9 db f4 ff ff jmp 10b5dc =============================================================================== 00115a3c : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 115a3c: 55 push %ebp 115a3d: 89 e5 mov %esp,%ebp 115a3f: 53 push %ebx 115a40: 83 ec 04 sub $0x4,%esp 115a43: 8b 45 08 mov 0x8(%ebp),%eax 115a46: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !time_buffer ) 115a49: 85 db test %ebx,%ebx 115a4b: 74 3b je 115a88 return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 115a4d: 85 c0 test %eax,%eax 115a4f: 74 2b je 115a7c return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 115a51: 83 f8 01 cmp $0x1,%eax 115a54: 74 3e je 115a94 return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 115a56: 83 f8 02 cmp $0x2,%eax 115a59: 74 45 je 115aa0 *interval = rtems_clock_get_ticks_since_boot(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 115a5b: 83 f8 03 cmp $0x3,%eax 115a5e: 74 4c je 115aac *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 115a60: 83 f8 04 cmp $0x4,%eax 115a63: 74 0b je 115a70 return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; 115a65: b8 0a 00 00 00 mov $0xa,%eax } 115a6a: 5a pop %edx 115a6b: 5b pop %ebx 115a6c: c9 leave 115a6d: c3 ret 115a6e: 66 90 xchg %ax,%ax <== NOT EXECUTED *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 ); 115a70: 89 5d 08 mov %ebx,0x8(%ebp) return RTEMS_INVALID_NUMBER; } 115a73: 59 pop %ecx 115a74: 5b pop %ebx 115a75: 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 ); 115a76: e9 41 01 00 00 jmp 115bbc 115a7b: 90 nop <== NOT EXECUTED { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 115a7c: 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; } 115a7f: 58 pop %eax 115a80: 5b pop %ebx 115a81: 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 ); 115a82: e9 81 00 00 00 jmp 115b08 115a87: 90 nop <== NOT EXECUTED rtems_clock_get_options option, void *time_buffer ) { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 115a88: 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; } 115a8d: 5a pop %edx 115a8e: 5b pop %ebx 115a8f: c9 leave 115a90: c3 ret 115a91: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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); 115a94: 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; } 115a97: 5b pop %ebx 115a98: 5b pop %ebx 115a99: 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); 115a9a: e9 19 00 00 00 jmp 115ab8 115a9f: 90 nop <== NOT EXECUTED if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 115aa0: e8 57 00 00 00 call 115afc 115aa5: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 115aa7: 31 c0 xor %eax,%eax 115aa9: eb bf jmp 115a6a 115aab: 90 nop <== NOT EXECUTED } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 115aac: e8 37 00 00 00 call 115ae8 115ab1: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 115ab3: 31 c0 xor %eax,%eax 115ab5: eb b3 jmp 115a6a =============================================================================== 0010bfc8 : #include rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { 10bfc8: 55 push %ebp 10bfc9: 89 e5 mov %esp,%ebp 10bfcb: 8b 45 08 mov 0x8(%ebp),%eax if ( !the_interval ) 10bfce: 85 c0 test %eax,%eax 10bfd0: 74 1e je 10bff0 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 10bfd2: 80 3d a8 13 13 00 00 cmpb $0x0,0x1313a8 10bfd9: 74 0d je 10bfe8 return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); 10bfdb: 8b 15 28 14 13 00 mov 0x131428,%edx 10bfe1: 89 10 mov %edx,(%eax) return RTEMS_SUCCESSFUL; 10bfe3: 31 c0 xor %eax,%eax } 10bfe5: c9 leave 10bfe6: c3 ret 10bfe7: 90 nop <== NOT EXECUTED { if ( !the_interval ) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 10bfe8: b8 0b 00 00 00 mov $0xb,%eax *the_interval = _TOD_Seconds_since_epoch(); return RTEMS_SUCCESSFUL; } 10bfed: c9 leave 10bfee: c3 ret 10bfef: 90 nop <== NOT EXECUTED rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { if ( !the_interval ) return RTEMS_INVALID_ADDRESS; 10bff0: b8 09 00 00 00 mov $0x9,%eax if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); return RTEMS_SUCCESSFUL; } 10bff5: c9 leave 10bff6: c3 ret =============================================================================== 00115bbc : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 115bbc: 55 push %ebp 115bbd: 89 e5 mov %esp,%ebp 115bbf: 56 push %esi 115bc0: 53 push %ebx 115bc1: 83 ec 10 sub $0x10,%esp 115bc4: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !time ) 115bc7: 85 db test %ebx,%ebx 115bc9: 74 51 je 115c1c return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 115bcb: 80 3d a8 09 14 00 00 cmpb $0x0,0x1409a8 115bd2: 75 0c jne 115be0 return RTEMS_NOT_DEFINED; 115bd4: b8 0b 00 00 00 mov $0xb,%eax _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 115bd9: 8d 65 f8 lea -0x8(%ebp),%esp 115bdc: 5b pop %ebx 115bdd: 5e pop %esi 115bde: c9 leave 115bdf: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 115be0: 9c pushf 115be1: fa cli 115be2: 5e pop %esi _TOD_Get( &now ); 115be3: 83 ec 0c sub $0xc,%esp 115be6: 8d 45 f0 lea -0x10(%ebp),%eax 115be9: 50 push %eax 115bea: e8 b1 42 00 00 call 119ea0 <_TOD_Get> _ISR_Enable(level); 115bef: 56 push %esi 115bf0: 9d popf useconds = (suseconds_t)now.tv_nsec; 115bf1: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 115bf4: 8b 45 f0 mov -0x10(%ebp),%eax 115bf7: 89 03 mov %eax,(%ebx) _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; 115bf9: b8 d3 4d 62 10 mov $0x10624dd3,%eax 115bfe: f7 e9 imul %ecx 115c00: 89 d0 mov %edx,%eax 115c02: c1 f8 06 sar $0x6,%eax 115c05: c1 f9 1f sar $0x1f,%ecx 115c08: 29 c8 sub %ecx,%eax 115c0a: 89 43 04 mov %eax,0x4(%ebx) if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; 115c0d: 83 c4 10 add $0x10,%esp 115c10: 31 c0 xor %eax,%eax } 115c12: 8d 65 f8 lea -0x8(%ebp),%esp 115c15: 5b pop %ebx 115c16: 5e pop %esi 115c17: c9 leave 115c18: c3 ret 115c19: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { if ( !time ) return RTEMS_INVALID_ADDRESS; 115c1c: b8 09 00 00 00 mov $0x9,%eax 115c21: eb b6 jmp 115bd9 =============================================================================== 0010b1d0 : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 10b1d0: 55 push %ebp 10b1d1: 89 e5 mov %esp,%ebp 10b1d3: 83 ec 08 sub $0x8,%esp 10b1d6: 8b 45 08 mov 0x8(%ebp),%eax if ( !uptime ) 10b1d9: 85 c0 test %eax,%eax 10b1db: 74 13 je 10b1f0 return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 10b1dd: 83 ec 0c sub $0xc,%esp 10b1e0: 50 push %eax 10b1e1: e8 9e 15 00 00 call 10c784 <_TOD_Get_uptime_as_timespec> return RTEMS_SUCCESSFUL; 10b1e6: 83 c4 10 add $0x10,%esp 10b1e9: 31 c0 xor %eax,%eax } 10b1eb: c9 leave 10b1ec: c3 ret 10b1ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime ) return RTEMS_INVALID_ADDRESS; 10b1f0: b8 09 00 00 00 mov $0x9,%eax _TOD_Get_uptime_as_timespec( uptime ); return RTEMS_SUCCESSFUL; } 10b1f5: c9 leave 10b1f6: c3 ret =============================================================================== 0010c0e8 : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 10c0e8: 55 push %ebp 10c0e9: 89 e5 mov %esp,%ebp 10c0eb: 53 push %ebx 10c0ec: 83 ec 14 sub $0x14,%esp 10c0ef: 8b 5d 08 mov 0x8(%ebp),%ebx struct timespec newtime; if ( !time_buffer ) 10c0f2: 85 db test %ebx,%ebx 10c0f4: 74 66 je 10c15c return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 10c0f6: 83 ec 0c sub $0xc,%esp 10c0f9: 53 push %ebx 10c0fa: e8 39 01 00 00 call 10c238 <_TOD_Validate> 10c0ff: 83 c4 10 add $0x10,%esp 10c102: 84 c0 test %al,%al 10c104: 75 0a jne 10c110 _Thread_Disable_dispatch(); _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; 10c106: b8 14 00 00 00 mov $0x14,%eax } 10c10b: 8b 5d fc mov -0x4(%ebp),%ebx 10c10e: c9 leave 10c10f: c3 ret if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 10c110: 83 ec 0c sub $0xc,%esp 10c113: 53 push %ebx 10c114: e8 93 00 00 00 call 10c1ac <_TOD_To_seconds> 10c119: 89 45 f0 mov %eax,-0x10(%ebp) newtime.tv_nsec = time_buffer->ticks * 10c11c: 8b 43 18 mov 0x18(%ebx),%eax 10c11f: 0f af 05 0c 53 12 00 imul 0x12530c,%eax 10c126: 8d 04 80 lea (%eax,%eax,4),%eax 10c129: 8d 04 80 lea (%eax,%eax,4),%eax 10c12c: 8d 04 80 lea (%eax,%eax,4),%eax 10c12f: c1 e0 03 shl $0x3,%eax 10c132: 89 45 f4 mov %eax,-0xc(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c135: a1 94 13 13 00 mov 0x131394,%eax 10c13a: 40 inc %eax 10c13b: a3 94 13 13 00 mov %eax,0x131394 rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 10c140: 8d 45 f0 lea -0x10(%ebp),%eax 10c143: 89 04 24 mov %eax,(%esp) 10c146: e8 85 18 00 00 call 10d9d0 <_TOD_Set> _Thread_Enable_dispatch(); 10c14b: e8 a8 2b 00 00 call 10ecf8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c150: 83 c4 10 add $0x10,%esp 10c153: 31 c0 xor %eax,%eax } return RTEMS_INVALID_CLOCK; } 10c155: 8b 5d fc mov -0x4(%ebp),%ebx 10c158: c9 leave 10c159: c3 ret 10c15a: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { struct timespec newtime; if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 10c15c: b8 09 00 00 00 mov $0x9,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10c161: 8b 5d fc mov -0x4(%ebp),%ebx 10c164: c9 leave 10c165: c3 ret =============================================================================== 0010af94 : * error code - if unsuccessful */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { 10af94: 55 push %ebp 10af95: 89 e5 mov %esp,%ebp 10af97: 8b 45 08 mov 0x8(%ebp),%eax if ( !routine ) 10af9a: 85 c0 test %eax,%eax 10af9c: 74 0a je 10afa8 return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; 10af9e: a3 e4 55 12 00 mov %eax,0x1255e4 return RTEMS_SUCCESSFUL; 10afa3: 31 c0 xor %eax,%eax } 10afa5: c9 leave 10afa6: c3 ret 10afa7: 90 nop <== NOT EXECUTED rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { if ( !routine ) return RTEMS_INVALID_ADDRESS; 10afa8: b8 09 00 00 00 mov $0x9,%eax _Watchdog_Nanoseconds_since_tick_handler = routine; return RTEMS_SUCCESSFUL; } 10afad: c9 leave 10afae: c3 ret =============================================================================== 0010afb0 : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { 10afb0: 55 push %ebp 10afb1: 89 e5 mov %esp,%ebp 10afb3: 83 ec 08 sub $0x8,%esp _TOD_Tickle_ticks(); 10afb6: e8 61 14 00 00 call 10c41c <_TOD_Tickle_ticks> */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); 10afbb: 83 ec 0c sub $0xc,%esp 10afbe: 68 04 55 12 00 push $0x125504 10afc3: e8 a0 36 00 00 call 10e668 <_Watchdog_Tickle> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 10afc8: e8 37 31 00 00 call 10e104 <_Thread_Tickle_timeslice> * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void ) { return ( _Thread_Dispatch_necessary ); 10afcd: a0 e4 56 12 00 mov 0x1256e4,%al if ( _Thread_Is_context_switch_necessary() && 10afd2: 83 c4 10 add $0x10,%esp 10afd5: 84 c0 test %al,%al 10afd7: 74 09 je 10afe2 * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); 10afd9: a1 34 54 12 00 mov 0x125434,%eax 10afde: 85 c0 test %eax,%eax 10afe0: 74 06 je 10afe8 _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 10afe2: 31 c0 xor %eax,%eax 10afe4: c9 leave 10afe5: c3 ret 10afe6: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Tickle_timeslice(); if ( _Thread_Is_context_switch_necessary() && _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); 10afe8: e8 43 24 00 00 call 10d430 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; } 10afed: 31 c0 xor %eax,%eax 10afef: c9 leave 10aff0: c3 ret =============================================================================== 0010b17c : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { 10b17c: 55 push %ebp 10b17d: 89 e5 mov %esp,%ebp 10b17f: 53 push %ebx 10b180: 83 ec 1c sub $0x1c,%esp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); 10b183: 8d 45 f4 lea -0xc(%ebp),%eax 10b186: 50 push %eax 10b187: ff 75 08 pushl 0x8(%ebp) 10b18a: e8 3d 24 00 00 call 10d5cc <_Thread_Get> switch ( location ) { 10b18f: 83 c4 10 add $0x10,%esp 10b192: 8b 55 f4 mov -0xc(%ebp),%edx 10b195: 85 d2 test %edx,%edx 10b197: 75 2b jne 10b1c4 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 10b199: 8b 90 f0 00 00 00 mov 0xf0(%eax),%edx rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 10b19f: 9c pushf 10b1a0: fa cli 10b1a1: 59 pop %ecx *the_event_set |= the_new_events; 10b1a2: 8b 5d 0c mov 0xc(%ebp),%ebx 10b1a5: 09 1a or %ebx,(%edx) _ISR_Enable( level ); 10b1a7: 51 push %ecx 10b1a8: 9d popf _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 10b1a9: 83 ec 0c sub $0xc,%esp 10b1ac: 50 push %eax 10b1ad: e8 1e 00 00 00 call 10b1d0 <_Event_Surrender> _Thread_Enable_dispatch(); 10b1b2: e8 f1 23 00 00 call 10d5a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b1b7: 83 c4 10 add $0x10,%esp 10b1ba: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b1bc: 8b 5d fc mov -0x4(%ebp),%ebx 10b1bf: c9 leave 10b1c0: c3 ret 10b1c1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b1c4: b8 04 00 00 00 mov $0x4,%eax } 10b1c9: 8b 5d fc mov -0x4(%ebp),%ebx 10b1cc: c9 leave 10b1cd: c3 ret =============================================================================== 0010d158 : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { 10d158: 55 push %ebp 10d159: 89 e5 mov %esp,%ebp 10d15b: 57 push %edi 10d15c: 56 push %esi 10d15d: 53 push %ebx 10d15e: 83 ec 1c sub $0x1c,%esp 10d161: 8b 75 0c mov 0xc(%ebp),%esi 10d164: 8b 5d 10 mov 0x10(%ebp),%ebx Extension_Control *the_extension; if ( !id ) 10d167: 85 db test %ebx,%ebx 10d169: 0f 84 85 00 00 00 je 10d1f4 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10d16f: 8b 45 08 mov 0x8(%ebp),%eax 10d172: 85 c0 test %eax,%eax 10d174: 75 0e jne 10d184 return RTEMS_INVALID_NAME; 10d176: b8 03 00 00 00 mov $0x3,%eax ); *id = the_extension->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10d17b: 8d 65 f4 lea -0xc(%ebp),%esp 10d17e: 5b pop %ebx 10d17f: 5e pop %esi 10d180: 5f pop %edi 10d181: c9 leave 10d182: c3 ret 10d183: 90 nop <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d184: a1 94 13 13 00 mov 0x131394,%eax 10d189: 40 inc %eax 10d18a: a3 94 13 13 00 mov %eax,0x131394 #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 10d18f: 83 ec 0c sub $0xc,%esp 10d192: 68 00 16 13 00 push $0x131600 10d197: e8 74 0d 00 00 call 10df10 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 10d19c: 83 c4 10 add $0x10,%esp 10d19f: 85 c0 test %eax,%eax 10d1a1: 74 45 je 10d1e8 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 10d1a3: 8d 78 24 lea 0x24(%eax),%edi 10d1a6: b9 08 00 00 00 mov $0x8,%ecx 10d1ab: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10d1ad: 83 ec 0c sub $0xc,%esp _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } _User_extensions_Add_set_with_table( &the_extension->Extension, extension_table ); 10d1b0: 8d 50 10 lea 0x10(%eax),%edx 10d1b3: 52 push %edx 10d1b4: 89 45 e4 mov %eax,-0x1c(%ebp) 10d1b7: e8 f0 29 00 00 call 10fbac <_User_extensions_Add_set> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10d1bc: 8b 45 e4 mov -0x1c(%ebp),%eax 10d1bf: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10d1c2: 0f b7 f2 movzwl %dx,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d1c5: 8b 0d 1c 16 13 00 mov 0x13161c,%ecx 10d1cb: 89 04 b1 mov %eax,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10d1ce: 8b 4d 08 mov 0x8(%ebp),%ecx 10d1d1: 89 48 0c mov %ecx,0xc(%eax) &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 10d1d4: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10d1d6: e8 1d 1b 00 00 call 10ecf8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d1db: 83 c4 10 add $0x10,%esp 10d1de: 31 c0 xor %eax,%eax } 10d1e0: 8d 65 f4 lea -0xc(%ebp),%esp 10d1e3: 5b pop %ebx 10d1e4: 5e pop %esi 10d1e5: 5f pop %edi 10d1e6: c9 leave 10d1e7: c3 ret _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { _Thread_Enable_dispatch(); 10d1e8: e8 0b 1b 00 00 call 10ecf8 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10d1ed: b8 05 00 00 00 mov $0x5,%eax 10d1f2: eb 87 jmp 10d17b ) { Extension_Control *the_extension; if ( !id ) return RTEMS_INVALID_ADDRESS; 10d1f4: b8 09 00 00 00 mov $0x9,%eax 10d1f9: eb 80 jmp 10d17b =============================================================================== 0010cfd4 : #include rtems_status_code rtems_extension_delete( rtems_id id ) { 10cfd4: 55 push %ebp 10cfd5: 89 e5 mov %esp,%ebp 10cfd7: 53 push %ebx 10cfd8: 83 ec 18 sub $0x18,%esp Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); 10cfdb: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) _Objects_Get( &_Extension_Information, id, location ); 10cfde: 50 push %eax 10cfdf: ff 75 08 pushl 0x8(%ebp) 10cfe2: 68 20 05 13 00 push $0x130520 10cfe7: e8 5c 11 00 00 call 10e148 <_Objects_Get> 10cfec: 89 c3 mov %eax,%ebx switch ( location ) { 10cfee: 83 c4 10 add $0x10,%esp 10cff1: 8b 55 f4 mov -0xc(%ebp),%edx 10cff4: 85 d2 test %edx,%edx 10cff6: 75 38 jne 10d030 case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 10cff8: 83 ec 0c sub $0xc,%esp 10cffb: 8d 40 10 lea 0x10(%eax),%eax 10cffe: 50 push %eax 10cfff: e8 98 28 00 00 call 10f89c <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 10d004: 59 pop %ecx 10d005: 58 pop %eax 10d006: 53 push %ebx 10d007: 68 20 05 13 00 push $0x130520 10d00c: e8 fb 0c 00 00 call 10dd0c <_Objects_Close> RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 10d011: 58 pop %eax 10d012: 5a pop %edx 10d013: 53 push %ebx 10d014: 68 20 05 13 00 push $0x130520 10d019: e8 ea 0f 00 00 call 10e008 <_Objects_Free> _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 10d01e: e8 89 19 00 00 call 10e9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d023: 83 c4 10 add $0x10,%esp 10d026: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d028: 8b 5d fc mov -0x4(%ebp),%ebx 10d02b: c9 leave 10d02c: c3 ret 10d02d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d030: b8 04 00 00 00 mov $0x4,%eax } 10d035: 8b 5d fc mov -0x4(%ebp),%ebx 10d038: c9 leave 10d039: c3 ret =============================================================================== 00111ffc : rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 111ffc: 55 push %ebp 111ffd: 89 e5 mov %esp,%ebp 111fff: 53 push %ebx 112000: 83 ec 04 sub $0x4,%esp 112003: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112006: 39 05 80 57 12 00 cmp %eax,0x125780 11200c: 76 1a jbe 112028 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; 11200e: 8d 14 40 lea (%eax,%eax,2),%edx 112011: c1 e2 03 shl $0x3,%edx 112014: 03 15 84 57 12 00 add 0x125784,%edx 11201a: 8b 52 08 mov 0x8(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11201d: 85 d2 test %edx,%edx 11201f: 74 13 je 112034 } 112021: 59 pop %ecx 112022: 5b pop %ebx 112023: 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; 112024: ff e2 jmp *%edx 112026: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 112028: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 11202d: 5a pop %edx 11202e: 5b pop %ebx 11202f: c9 leave 112030: c3 ret 112031: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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; 112034: 31 c0 xor %eax,%eax } 112036: 5a pop %edx 112037: 5b pop %ebx 112038: c9 leave 112039: c3 ret =============================================================================== 0011203c : rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 11203c: 55 push %ebp 11203d: 89 e5 mov %esp,%ebp 11203f: 53 push %ebx 112040: 83 ec 04 sub $0x4,%esp 112043: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112046: 39 05 80 57 12 00 cmp %eax,0x125780 11204c: 76 1a jbe 112068 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; 11204e: 8d 14 40 lea (%eax,%eax,2),%edx 112051: c1 e2 03 shl $0x3,%edx 112054: 03 15 84 57 12 00 add 0x125784,%edx 11205a: 8b 52 14 mov 0x14(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11205d: 85 d2 test %edx,%edx 11205f: 74 13 je 112074 } 112061: 59 pop %ecx 112062: 5b pop %ebx 112063: 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; 112064: ff e2 jmp *%edx 112066: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 112068: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 11206d: 5a pop %edx 11206e: 5b pop %ebx 11206f: c9 leave 112070: c3 ret 112071: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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; 112074: 31 c0 xor %eax,%eax } 112076: 5a pop %edx 112077: 5b pop %ebx 112078: c9 leave 112079: c3 ret =============================================================================== 00110414 : rtems_status_code rtems_io_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 110414: 55 push %ebp 110415: 89 e5 mov %esp,%ebp 110417: 53 push %ebx 110418: 83 ec 04 sub $0x4,%esp 11041b: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 11041e: 39 05 80 57 12 00 cmp %eax,0x125780 110424: 76 1a jbe 110440 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; 110426: 8d 14 40 lea (%eax,%eax,2),%edx 110429: c1 e2 03 shl $0x3,%edx 11042c: 03 15 84 57 12 00 add 0x125784,%edx 110432: 8b 12 mov (%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 110434: 85 d2 test %edx,%edx 110436: 74 14 je 11044c } 110438: 59 pop %ecx 110439: 5b pop %ebx 11043a: 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; 11043b: ff e2 jmp *%edx 11043d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 110440: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 110445: 5a pop %edx 110446: 5b pop %ebx 110447: c9 leave 110448: c3 ret 110449: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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; 11044c: 31 c0 xor %eax,%eax } 11044e: 5a pop %edx 11044f: 5b pop %ebx 110450: c9 leave 110451: c3 ret =============================================================================== 0011207c : rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 11207c: 55 push %ebp 11207d: 89 e5 mov %esp,%ebp 11207f: 53 push %ebx 112080: 83 ec 04 sub $0x4,%esp 112083: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112086: 39 05 80 57 12 00 cmp %eax,0x125780 11208c: 76 1a jbe 1120a8 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; 11208e: 8d 14 40 lea (%eax,%eax,2),%edx 112091: c1 e2 03 shl $0x3,%edx 112094: 03 15 84 57 12 00 add 0x125784,%edx 11209a: 8b 52 04 mov 0x4(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11209d: 85 d2 test %edx,%edx 11209f: 74 13 je 1120b4 } 1120a1: 59 pop %ecx 1120a2: 5b pop %ebx 1120a3: 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; 1120a4: ff e2 jmp *%edx 1120a6: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 1120a8: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 1120ad: 5a pop %edx 1120ae: 5b pop %ebx 1120af: c9 leave 1120b0: c3 ret 1120b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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; 1120b4: 31 c0 xor %eax,%eax } 1120b6: 5a pop %edx 1120b7: 5b pop %ebx 1120b8: c9 leave 1120b9: c3 ret =============================================================================== 001120bc : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 1120bc: 55 push %ebp 1120bd: 89 e5 mov %esp,%ebp 1120bf: 53 push %ebx 1120c0: 83 ec 04 sub $0x4,%esp 1120c3: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 1120c6: 39 05 80 57 12 00 cmp %eax,0x125780 1120cc: 76 1a jbe 1120e8 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; 1120ce: 8d 14 40 lea (%eax,%eax,2),%edx 1120d1: c1 e2 03 shl $0x3,%edx 1120d4: 03 15 84 57 12 00 add 0x125784,%edx 1120da: 8b 52 0c mov 0xc(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 1120dd: 85 d2 test %edx,%edx 1120df: 74 13 je 1120f4 } 1120e1: 59 pop %ecx 1120e2: 5b pop %ebx 1120e3: 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; 1120e4: ff e2 jmp *%edx 1120e6: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 1120e8: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 1120ed: 5a pop %edx 1120ee: 5b pop %ebx 1120ef: c9 leave 1120f0: c3 ret 1120f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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; 1120f4: 31 c0 xor %eax,%eax } 1120f6: 5a pop %edx 1120f7: 5b pop %ebx 1120f8: c9 leave 1120f9: c3 ret =============================================================================== 0010ce88 : 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 ) { 10ce88: 55 push %ebp 10ce89: 89 e5 mov %esp,%ebp 10ce8b: 57 push %edi 10ce8c: 56 push %esi 10ce8d: 53 push %ebx 10ce8e: 83 ec 0c sub $0xc,%esp 10ce91: 8b 5d 08 mov 0x8(%ebp),%ebx 10ce94: 8b 75 0c mov 0xc(%ebp),%esi 10ce97: 8b 55 10 mov 0x10(%ebp),%edx rtems_device_major_number major_limit = _IO_Number_of_drivers; 10ce9a: a1 60 98 12 00 mov 0x129860,%eax if ( rtems_interrupt_is_in_progress() ) 10ce9f: 8b 0d b4 97 12 00 mov 0x1297b4,%ecx 10cea5: 85 c9 test %ecx,%ecx 10cea7: 0f 85 ab 00 00 00 jne 10cf58 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 10cead: 85 d2 test %edx,%edx 10ceaf: 0f 84 e7 00 00 00 je 10cf9c return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 10ceb5: 89 02 mov %eax,(%edx) if ( driver_table == NULL ) 10ceb7: 85 f6 test %esi,%esi 10ceb9: 0f 84 dd 00 00 00 je 10cf9c static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cebf: 8b 3e mov (%esi),%edi 10cec1: 85 ff test %edi,%edi 10cec3: 0f 84 c7 00 00 00 je 10cf90 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10cec9: 39 d8 cmp %ebx,%eax 10cecb: 76 7b jbe 10cf48 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10cecd: a1 14 95 12 00 mov 0x129514,%eax 10ced2: 40 inc %eax 10ced3: a3 14 95 12 00 mov %eax,0x129514 return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 10ced8: 85 db test %ebx,%ebx 10ceda: 0f 85 88 00 00 00 jne 10cf68 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 10cee0: 8b 0d 60 98 12 00 mov 0x129860,%ecx rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 10cee6: 85 c9 test %ecx,%ecx 10cee8: 0f 84 bb 00 00 00 je 10cfa9 <== NEVER TAKEN 10ceee: 8b 3d 64 98 12 00 mov 0x129864,%edi 10cef4: 89 f8 mov %edi,%eax 10cef6: eb 08 jmp 10cf00 10cef8: 43 inc %ebx 10cef9: 83 c0 18 add $0x18,%eax 10cefc: 39 d9 cmp %ebx,%ecx 10cefe: 76 0b jbe 10cf0b static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cf00: 83 38 00 cmpl $0x0,(%eax) 10cf03: 75 f3 jne 10cef8 10cf05: 83 78 04 00 cmpl $0x0,0x4(%eax) 10cf09: 75 ed jne 10cef8 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10cf0b: 89 1a mov %ebx,(%edx) if ( m != n ) 10cf0d: 39 d9 cmp %ebx,%ecx 10cf0f: 0f 84 9b 00 00 00 je 10cfb0 10cf15: 8d 04 5b lea (%ebx,%ebx,2),%eax 10cf18: c1 e0 03 shl $0x3,%eax } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 10cf1b: 01 c7 add %eax,%edi 10cf1d: b9 06 00 00 00 mov $0x6,%ecx 10cf22: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10cf24: e8 8b 19 00 00 call 10e8b4 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 10cf29: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10cf30: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10cf37: 89 5d 08 mov %ebx,0x8(%ebp) } 10cf3a: 83 c4 0c add $0xc,%esp 10cf3d: 5b pop %ebx 10cf3e: 5e pop %esi 10cf3f: 5f pop %edi 10cf40: c9 leave _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10cf41: e9 52 72 00 00 jmp 114198 10cf46: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; 10cf48: 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 ); } 10cf4d: 83 c4 0c add $0xc,%esp 10cf50: 5b pop %ebx 10cf51: 5e pop %esi 10cf52: 5f pop %edi 10cf53: c9 leave 10cf54: c3 ret 10cf55: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; 10cf58: 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 ); } 10cf5d: 83 c4 0c add $0xc,%esp 10cf60: 5b pop %ebx 10cf61: 5e pop %esi 10cf62: 5f pop %edi 10cf63: c9 leave 10cf64: c3 ret 10cf65: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 10cf68: 8d 04 5b lea (%ebx,%ebx,2),%eax 10cf6b: c1 e0 03 shl $0x3,%eax 10cf6e: 8b 0d 64 98 12 00 mov 0x129864,%ecx 10cf74: 01 c1 add %eax,%ecx static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cf76: 8b 39 mov (%ecx),%edi 10cf78: 85 ff test %edi,%edi 10cf7a: 74 40 je 10cfbc 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(); 10cf7c: e8 33 19 00 00 call 10e8b4 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 10cf81: 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 ); } 10cf86: 83 c4 0c add $0xc,%esp 10cf89: 5b pop %ebx 10cf8a: 5e pop %esi 10cf8b: 5f pop %edi 10cf8c: c9 leave 10cf8d: c3 ret 10cf8e: 66 90 xchg %ax,%ax <== NOT EXECUTED static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cf90: 8b 4e 04 mov 0x4(%esi),%ecx 10cf93: 85 c9 test %ecx,%ecx 10cf95: 0f 85 2e ff ff ff jne 10cec9 10cf9b: 90 nop if ( driver_table == NULL ) return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; 10cf9c: b8 09 00 00 00 mov $0x9,%eax _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 10cfa1: 83 c4 0c add $0xc,%esp 10cfa4: 5b pop %ebx 10cfa5: 5e pop %esi 10cfa6: 5f pop %edi 10cfa7: c9 leave 10cfa8: c3 ret if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10cfa9: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED 10cfaf: 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(); 10cfb0: e8 ff 18 00 00 call 10e8b4 <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; 10cfb5: b8 05 00 00 00 mov $0x5,%eax if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); return sc; 10cfba: eb 91 jmp 10cf4d static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10cfbc: 8b 49 04 mov 0x4(%ecx),%ecx 10cfbf: 85 c9 test %ecx,%ecx 10cfc1: 75 b9 jne 10cf7c if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 10cfc3: 89 1a mov %ebx,(%edx) 10cfc5: 8b 3d 64 98 12 00 mov 0x129864,%edi 10cfcb: e9 4b ff ff ff jmp 10cf1b =============================================================================== 0010cfd0 : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 10cfd0: 55 push %ebp 10cfd1: 89 e5 mov %esp,%ebp 10cfd3: 57 push %edi 10cfd4: 83 ec 04 sub $0x4,%esp 10cfd7: 8b 45 08 mov 0x8(%ebp),%eax if ( rtems_interrupt_is_in_progress() ) 10cfda: 8b 0d b4 97 12 00 mov 0x1297b4,%ecx 10cfe0: 85 c9 test %ecx,%ecx 10cfe2: 75 44 jne 10d028 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 10cfe4: 39 05 60 98 12 00 cmp %eax,0x129860 10cfea: 77 0c ja 10cff8 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; 10cfec: b8 0d 00 00 00 mov $0xd,%eax } 10cff1: 5a pop %edx 10cff2: 5f pop %edi 10cff3: c9 leave 10cff4: c3 ret 10cff5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10cff8: 8b 15 14 95 12 00 mov 0x129514,%edx 10cffe: 42 inc %edx 10cfff: 89 15 14 95 12 00 mov %edx,0x129514 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( &_IO_Driver_address_table[major], 10d005: 8d 14 40 lea (%eax,%eax,2),%edx 10d008: c1 e2 03 shl $0x3,%edx if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( 10d00b: 03 15 64 98 12 00 add 0x129864,%edx 10d011: b9 18 00 00 00 mov $0x18,%ecx 10d016: 31 c0 xor %eax,%eax 10d018: 89 d7 mov %edx,%edi 10d01a: f3 aa rep stos %al,%es:(%edi) &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 10d01c: e8 93 18 00 00 call 10e8b4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d021: 31 c0 xor %eax,%eax } return RTEMS_UNSATISFIED; } 10d023: 5a pop %edx 10d024: 5f pop %edi 10d025: c9 leave 10d026: c3 ret 10d027: 90 nop <== NOT EXECUTED rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; 10d028: b8 12 00 00 00 mov $0x12,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d02d: 5a pop %edx 10d02e: 5f pop %edi 10d02f: c9 leave 10d030: c3 ret =============================================================================== 001120fc : rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 1120fc: 55 push %ebp 1120fd: 89 e5 mov %esp,%ebp 1120ff: 53 push %ebx 112100: 83 ec 04 sub $0x4,%esp 112103: 8b 45 08 mov 0x8(%ebp),%eax rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112106: 39 05 80 57 12 00 cmp %eax,0x125780 11210c: 76 1a jbe 112128 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; 11210e: 8d 14 40 lea (%eax,%eax,2),%edx 112111: c1 e2 03 shl $0x3,%edx 112114: 03 15 84 57 12 00 add 0x125784,%edx 11211a: 8b 52 10 mov 0x10(%edx),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11211d: 85 d2 test %edx,%edx 11211f: 74 13 je 112134 } 112121: 59 pop %ecx 112122: 5b pop %ebx 112123: 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; 112124: ff e2 jmp *%edx 112126: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; 112128: b8 0a 00 00 00 mov $0xa,%eax callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 11212d: 5a pop %edx 11212e: 5b pop %ebx 11212f: c9 leave 112130: c3 ret 112131: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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; 112134: 31 c0 xor %eax,%eax } 112136: 5a pop %edx 112137: 5b pop %ebx 112138: c9 leave 112139: c3 ret =============================================================================== 0010deac : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10deac: 55 push %ebp 10dead: 89 e5 mov %esp,%ebp 10deaf: 57 push %edi 10deb0: 56 push %esi 10deb1: 53 push %ebx 10deb2: 83 ec 1c sub $0x1c,%esp 10deb5: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10deb8: 85 ff test %edi,%edi 10deba: 74 49 je 10df05 <== NEVER TAKEN 10debc: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp) #if defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; 10dec3: 8b 55 e4 mov -0x1c(%ebp),%edx 10dec6: 8b 04 95 6c 13 13 00 mov 0x13136c(,%edx,4),%eax 10decd: 8b 70 04 mov 0x4(%eax),%esi if ( !information ) 10ded0: 85 f6 test %esi,%esi 10ded2: 74 28 je 10defc continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10ded4: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 10ded9: 74 21 je 10defc <== NEVER TAKEN 10dedb: bb 01 00 00 00 mov $0x1,%ebx the_thread = (Thread_Control *)information->local_table[ i ]; 10dee0: 8b 46 1c mov 0x1c(%esi),%eax 10dee3: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !the_thread ) 10dee6: 85 c0 test %eax,%eax 10dee8: 74 09 je 10def3 continue; (*routine)(the_thread); 10deea: 83 ec 0c sub $0xc,%esp 10deed: 50 push %eax 10deee: ff d7 call *%edi 10def0: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10def3: 43 inc %ebx 10def4: 0f b7 46 10 movzwl 0x10(%esi),%eax 10def8: 39 d8 cmp %ebx,%eax 10defa: 73 e4 jae 10dee0 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10defc: ff 45 e4 incl -0x1c(%ebp) 10deff: 83 7d e4 04 cmpl $0x4,-0x1c(%ebp) 10df03: 75 be jne 10dec3 (*routine)(the_thread); } } } 10df05: 8d 65 f4 lea -0xc(%ebp),%esp 10df08: 5b pop %ebx 10df09: 5e pop %esi 10df0a: 5f pop %edi 10df0b: c9 leave 10df0c: c3 ret =============================================================================== 00116398 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 116398: 55 push %ebp 116399: 89 e5 mov %esp,%ebp 11639b: 57 push %edi 11639c: 56 push %esi 11639d: 53 push %ebx 11639e: 83 ec 1c sub $0x1c,%esp 1163a1: 8b 7d 08 mov 0x8(%ebp),%edi 1163a4: 8b 5d 0c mov 0xc(%ebp),%ebx 1163a7: 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 ) 1163aa: 85 db test %ebx,%ebx 1163ac: 74 62 je 116410 return RTEMS_INVALID_ADDRESS; if ( !count ) 1163ae: 85 f6 test %esi,%esi 1163b0: 74 5e je 116410 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 1163b2: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 1163b3: 8d 45 e4 lea -0x1c(%ebp),%eax 1163b6: 50 push %eax 1163b7: 57 push %edi 1163b8: 68 60 0c 14 00 push $0x140c60 1163bd: e8 86 4d 00 00 call 11b148 <_Objects_Get> switch ( location ) { 1163c2: 83 c4 10 add $0x10,%esp 1163c5: 8b 55 e4 mov -0x1c(%ebp),%edx 1163c8: 85 d2 test %edx,%edx 1163ca: 74 10 je 1163dc #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1163cc: b8 04 00 00 00 mov $0x4,%eax } 1163d1: 8d 65 f4 lea -0xc(%ebp),%esp 1163d4: 5b pop %ebx 1163d5: 5e pop %esi 1163d6: 5f pop %edi 1163d7: c9 leave 1163d8: c3 ret 1163d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( 1163dc: 83 ec 08 sub $0x8,%esp 1163df: 56 push %esi 1163e0: 6a 00 push $0x0 1163e2: 57 push %edi 1163e3: ff 75 10 pushl 0x10(%ebp) 1163e6: 53 push %ebx 1163e7: 83 c0 14 add $0x14,%eax 1163ea: 50 push %eax 1163eb: e8 48 34 00 00 call 119838 <_CORE_message_queue_Broadcast> 1163f0: 89 c3 mov %eax,%ebx NULL, #endif count ); _Thread_Enable_dispatch(); 1163f2: 83 c4 20 add $0x20,%esp 1163f5: e8 b2 55 00 00 call 11b9ac <_Thread_Enable_dispatch> return 1163fa: 83 ec 0c sub $0xc,%esp 1163fd: 53 push %ebx 1163fe: e8 69 03 00 00 call 11676c <_Message_queue_Translate_core_message_queue_return_code> 116403: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116406: 8d 65 f4 lea -0xc(%ebp),%esp 116409: 5b pop %ebx 11640a: 5e pop %esi 11640b: 5f pop %edi 11640c: c9 leave 11640d: c3 ret 11640e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !buffer ) return RTEMS_INVALID_ADDRESS; if ( !count ) return RTEMS_INVALID_ADDRESS; 116410: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116415: 8d 65 f4 lea -0xc(%ebp),%esp 116418: 5b pop %ebx 116419: 5e pop %esi 11641a: 5f pop %edi 11641b: c9 leave 11641c: c3 ret =============================================================================== 00113824 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { 113824: 55 push %ebp 113825: 89 e5 mov %esp,%ebp 113827: 57 push %edi 113828: 56 push %esi 113829: 53 push %ebx 11382a: 83 ec 2c sub $0x2c,%esp 11382d: 8b 5d 08 mov 0x8(%ebp),%ebx 113830: 8b 75 0c mov 0xc(%ebp),%esi 113833: 8b 4d 10 mov 0x10(%ebp),%ecx 113836: 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 ) ) 113839: 85 db test %ebx,%ebx 11383b: 74 2f je 11386c return RTEMS_INVALID_NAME; if ( !id ) 11383d: 85 ff test %edi,%edi 11383f: 0f 84 a3 00 00 00 je 1138e8 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 113845: 85 f6 test %esi,%esi 113847: 74 13 je 11385c return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 113849: 85 c9 test %ecx,%ecx 11384b: 75 2f jne 11387c return RTEMS_INVALID_SIZE; 11384d: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113852: 8d 65 f4 lea -0xc(%ebp),%esp 113855: 5b pop %ebx 113856: 5e pop %esi 113857: 5f pop %edi 113858: c9 leave 113859: c3 ret 11385a: 66 90 xchg %ax,%ax <== NOT EXECUTED !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) return RTEMS_INVALID_NUMBER; 11385c: b8 0a 00 00 00 mov $0xa,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113861: 8d 65 f4 lea -0xc(%ebp),%esp 113864: 5b pop %ebx 113865: 5e pop %esi 113866: 5f pop %edi 113867: c9 leave 113868: c3 ret 113869: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 11386c: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113871: 8d 65 f4 lea -0xc(%ebp),%esp 113874: 5b pop %ebx 113875: 5e pop %esi 113876: 5f pop %edi 113877: c9 leave 113878: c3 ret 113879: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 11387c: a1 54 f8 12 00 mov 0x12f854,%eax 113881: 40 inc %eax 113882: a3 54 f8 12 00 mov %eax,0x12f854 #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 113887: 89 4d d4 mov %ecx,-0x2c(%ebp) 11388a: e8 8d 53 00 00 call 118c1c <_Message_queue_Allocate> 11388f: 89 c2 mov %eax,%edx if ( !the_message_queue ) { 113891: 85 c0 test %eax,%eax 113893: 8b 4d d4 mov -0x2c(%ebp),%ecx 113896: 74 7c je 113914 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 113898: 8b 45 14 mov 0x14(%ebp),%eax 11389b: 89 42 10 mov %eax,0x10(%edx) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 11389e: a8 04 test $0x4,%al 1138a0: 0f 95 c0 setne %al 1138a3: 0f b6 c0 movzbl %al,%eax 1138a6: 89 45 e4 mov %eax,-0x1c(%ebp) else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 1138a9: 51 push %ecx 1138aa: 56 push %esi 1138ab: 8d 45 e4 lea -0x1c(%ebp),%eax 1138ae: 50 push %eax 1138af: 8d 42 14 lea 0x14(%edx),%eax 1138b2: 50 push %eax 1138b3: 89 55 d4 mov %edx,-0x2c(%ebp) 1138b6: e8 d5 10 00 00 call 114990 <_CORE_message_queue_Initialize> 1138bb: 83 c4 10 add $0x10,%esp 1138be: 84 c0 test %al,%al 1138c0: 8b 55 d4 mov -0x2c(%ebp),%edx 1138c3: 75 2f jne 1138f4 */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 1138c5: 83 ec 08 sub $0x8,%esp 1138c8: 52 push %edx 1138c9: 68 20 fb 12 00 push $0x12fb20 1138ce: e8 79 1e 00 00 call 11574c <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 1138d3: e8 98 28 00 00 call 116170 <_Thread_Enable_dispatch> return RTEMS_UNSATISFIED; 1138d8: 83 c4 10 add $0x10,%esp 1138db: b8 0d 00 00 00 mov $0xd,%eax 1138e0: e9 6d ff ff ff jmp 113852 1138e5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 1138e8: b8 09 00 00 00 mov $0x9,%eax 1138ed: e9 60 ff ff ff jmp 113852 1138f2: 66 90 xchg %ax,%ax <== NOT EXECUTED Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 1138f4: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 1138f7: 0f b7 f0 movzwl %ax,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1138fa: 8b 0d 3c fb 12 00 mov 0x12fb3c,%ecx 113900: 89 14 b1 mov %edx,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 113903: 89 5a 0c mov %ebx,0xc(%edx) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 113906: 89 07 mov %eax,(%edi) name, 0 ); #endif _Thread_Enable_dispatch(); 113908: e8 63 28 00 00 call 116170 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11390d: 31 c0 xor %eax,%eax 11390f: e9 3e ff ff ff jmp 113852 _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); if ( !the_message_queue ) { _Thread_Enable_dispatch(); 113914: e8 57 28 00 00 call 116170 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 113919: b8 05 00 00 00 mov $0x5,%eax 11391e: e9 2f ff ff ff jmp 113852 =============================================================================== 00116520 : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 116520: 55 push %ebp 116521: 89 e5 mov %esp,%ebp 116523: 53 push %ebx 116524: 83 ec 18 sub $0x18,%esp register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); 116527: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 11652a: 50 push %eax 11652b: ff 75 08 pushl 0x8(%ebp) 11652e: 68 60 0c 14 00 push $0x140c60 116533: e8 10 4c 00 00 call 11b148 <_Objects_Get> 116538: 89 c3 mov %eax,%ebx switch ( location ) { 11653a: 83 c4 10 add $0x10,%esp 11653d: 8b 4d f4 mov -0xc(%ebp),%ecx 116540: 85 c9 test %ecx,%ecx 116542: 75 3c jne 116580 case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 116544: 83 ec 08 sub $0x8,%esp 116547: 50 push %eax 116548: 68 60 0c 14 00 push $0x140c60 11654d: e8 7e 47 00 00 call 11acd0 <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 116552: 83 c4 0c add $0xc,%esp 116555: 6a 05 push $0x5 116557: 6a 00 push $0x0 116559: 8d 43 14 lea 0x14(%ebx),%eax 11655c: 50 push %eax 11655d: e8 5a 33 00 00 call 1198bc <_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 ); 116562: 58 pop %eax 116563: 5a pop %edx 116564: 53 push %ebx 116565: 68 60 0c 14 00 push $0x140c60 11656a: e8 5d 4a 00 00 call 11afcc <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 11656f: e8 38 54 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116574: 83 c4 10 add $0x10,%esp 116577: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116579: 8b 5d fc mov -0x4(%ebp),%ebx 11657c: c9 leave 11657d: c3 ret 11657e: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116580: b8 04 00 00 00 mov $0x4,%eax } 116585: 8b 5d fc mov -0x4(%ebp),%ebx 116588: c9 leave 116589: c3 ret =============================================================================== 0011658c : rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { 11658c: 55 push %ebp 11658d: 89 e5 mov %esp,%ebp 11658f: 53 push %ebx 116590: 83 ec 14 sub $0x14,%esp 116593: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116596: 85 db test %ebx,%ebx 116598: 74 46 je 1165e0 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 11659a: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 11659b: 8d 45 f4 lea -0xc(%ebp),%eax 11659e: 50 push %eax 11659f: ff 75 08 pushl 0x8(%ebp) 1165a2: 68 60 0c 14 00 push $0x140c60 1165a7: e8 9c 4b 00 00 call 11b148 <_Objects_Get> switch ( location ) { 1165ac: 83 c4 10 add $0x10,%esp 1165af: 8b 55 f4 mov -0xc(%ebp),%edx 1165b2: 85 d2 test %edx,%edx 1165b4: 74 0a je 1165c0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1165b6: b8 04 00 00 00 mov $0x4,%eax } 1165bb: 8b 5d fc mov -0x4(%ebp),%ebx 1165be: c9 leave 1165bf: 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 ); 1165c0: 83 ec 0c sub $0xc,%esp 1165c3: 83 c0 14 add $0x14,%eax 1165c6: 50 push %eax 1165c7: e8 2c 33 00 00 call 1198f8 <_CORE_message_queue_Flush> 1165cc: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 1165ce: e8 d9 53 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1165d3: 83 c4 10 add $0x10,%esp 1165d6: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1165d8: 8b 5d fc mov -0x4(%ebp),%ebx 1165db: c9 leave 1165dc: c3 ret 1165dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) return RTEMS_INVALID_ADDRESS; 1165e0: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1165e5: 8b 5d fc mov -0x4(%ebp),%ebx 1165e8: c9 leave 1165e9: c3 ret =============================================================================== 001165ec : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { 1165ec: 55 push %ebp 1165ed: 89 e5 mov %esp,%ebp 1165ef: 53 push %ebx 1165f0: 83 ec 14 sub $0x14,%esp 1165f3: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 1165f6: 85 db test %ebx,%ebx 1165f8: 74 3a je 116634 1165fa: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 1165fb: 8d 45 f4 lea -0xc(%ebp),%eax 1165fe: 50 push %eax 1165ff: ff 75 08 pushl 0x8(%ebp) 116602: 68 60 0c 14 00 push $0x140c60 116607: e8 3c 4b 00 00 call 11b148 <_Objects_Get> switch ( location ) { 11660c: 83 c4 10 add $0x10,%esp 11660f: 8b 55 f4 mov -0xc(%ebp),%edx 116612: 85 d2 test %edx,%edx 116614: 74 0a je 116620 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116616: b8 04 00 00 00 mov $0x4,%eax } 11661b: 8b 5d fc mov -0x4(%ebp),%ebx 11661e: c9 leave 11661f: 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; 116620: 8b 40 5c mov 0x5c(%eax),%eax 116623: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 116625: e8 82 53 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11662a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11662c: 8b 5d fc mov -0x4(%ebp),%ebx 11662f: c9 leave 116630: c3 ret 116631: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) return RTEMS_INVALID_ADDRESS; 116634: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116639: 8b 5d fc mov -0x4(%ebp),%ebx 11663c: c9 leave 11663d: c3 ret =============================================================================== 00113948 : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 113948: 55 push %ebp 113949: 89 e5 mov %esp,%ebp 11394b: 56 push %esi 11394c: 53 push %ebx 11394d: 83 ec 10 sub $0x10,%esp 113950: 8b 5d 0c mov 0xc(%ebp),%ebx 113953: 8b 75 10 mov 0x10(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 113956: 85 db test %ebx,%ebx 113958: 74 6e je 1139c8 return RTEMS_INVALID_ADDRESS; if ( !size ) 11395a: 85 f6 test %esi,%esi 11395c: 74 6a je 1139c8 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 11395e: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 11395f: 8d 45 f4 lea -0xc(%ebp),%eax 113962: 50 push %eax 113963: ff 75 08 pushl 0x8(%ebp) 113966: 68 20 fb 12 00 push $0x12fb20 11396b: e8 1c 1f 00 00 call 11588c <_Objects_Get> switch ( location ) { 113970: 83 c4 10 add $0x10,%esp 113973: 8b 55 f4 mov -0xc(%ebp),%edx 113976: 85 d2 test %edx,%edx 113978: 75 42 jne 1139bc if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 11397a: 83 ec 08 sub $0x8,%esp 11397d: ff 75 18 pushl 0x18(%ebp) */ RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait ( rtems_option option_set ) { return (option_set & RTEMS_NO_WAIT) ? true : false; 113980: 8b 55 14 mov 0x14(%ebp),%edx 113983: 83 e2 01 and $0x1,%edx 113986: 83 f2 01 xor $0x1,%edx 113989: 52 push %edx 11398a: 56 push %esi 11398b: 53 push %ebx 11398c: ff 70 08 pushl 0x8(%eax) 11398f: 83 c0 14 add $0x14,%eax 113992: 50 push %eax 113993: e8 98 10 00 00 call 114a30 <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 113998: 83 c4 20 add $0x20,%esp 11399b: e8 d0 27 00 00 call 116170 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 1139a0: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code 1139a3: a1 f8 fa 12 00 mov 0x12faf8,%eax size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 1139a8: ff 70 34 pushl 0x34(%eax) 1139ab: e8 a0 00 00 00 call 113a50 <_Message_queue_Translate_core_message_queue_return_code> 1139b0: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1139b3: 8d 65 f8 lea -0x8(%ebp),%esp 1139b6: 5b pop %ebx 1139b7: 5e pop %esi 1139b8: c9 leave 1139b9: c3 ret 1139ba: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1139bc: b8 04 00 00 00 mov $0x4,%eax } 1139c1: 8d 65 f8 lea -0x8(%ebp),%esp 1139c4: 5b pop %ebx 1139c5: 5e pop %esi 1139c6: c9 leave 1139c7: c3 ret if ( !buffer ) return RTEMS_INVALID_ADDRESS; if ( !size ) return RTEMS_INVALID_ADDRESS; 1139c8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1139cd: 8d 65 f8 lea -0x8(%ebp),%esp 1139d0: 5b pop %ebx 1139d1: 5e pop %esi 1139d2: c9 leave 1139d3: c3 ret =============================================================================== 0010b388 : rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { 10b388: 55 push %ebp 10b389: 89 e5 mov %esp,%ebp 10b38b: 56 push %esi 10b38c: 53 push %ebx 10b38d: 83 ec 10 sub $0x10,%esp 10b390: 8b 75 08 mov 0x8(%ebp),%esi 10b393: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10b396: 85 db test %ebx,%ebx 10b398: 74 5e je 10b3f8 Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) _Objects_Get( &_Message_queue_Information, id, location ); 10b39a: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 10b39b: 8d 45 f4 lea -0xc(%ebp),%eax 10b39e: 50 push %eax 10b39f: 56 push %esi 10b3a0: 68 00 57 12 00 push $0x125700 10b3a5: e8 9a 19 00 00 call 10cd44 <_Objects_Get> switch ( location ) { 10b3aa: 83 c4 10 add $0x10,%esp 10b3ad: 8b 55 f4 mov -0xc(%ebp),%edx 10b3b0: 85 d2 test %edx,%edx 10b3b2: 74 0c je 10b3c0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b3b4: b8 04 00 00 00 mov $0x4,%eax } 10b3b9: 8d 65 f8 lea -0x8(%ebp),%esp 10b3bc: 5b pop %ebx 10b3bd: 5e pop %esi 10b3be: c9 leave 10b3bf: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 10b3c0: 6a 00 push $0x0 10b3c2: 6a 00 push $0x0 10b3c4: 68 ff ff ff 7f push $0x7fffffff 10b3c9: 6a 00 push $0x0 10b3cb: 56 push %esi 10b3cc: ff 75 10 pushl 0x10(%ebp) 10b3cf: 53 push %ebx the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_message_queue_Send( 10b3d0: 83 c0 14 add $0x14,%eax 10b3d3: 50 push %eax 10b3d4: e8 e7 0b 00 00 call 10bfc0 <_CORE_message_queue_Submit> 10b3d9: 89 c3 mov %eax,%ebx MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 10b3db: 83 c4 20 add $0x20,%esp 10b3de: e8 c5 21 00 00 call 10d5a8 <_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); 10b3e3: 83 ec 0c sub $0xc,%esp 10b3e6: 53 push %ebx 10b3e7: e8 18 00 00 00 call 10b404 <_Message_queue_Translate_core_message_queue_return_code> 10b3ec: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b3ef: 8d 65 f8 lea -0x8(%ebp),%esp 10b3f2: 5b pop %ebx 10b3f3: 5e pop %esi 10b3f4: c9 leave 10b3f5: c3 ret 10b3f6: 66 90 xchg %ax,%ax <== NOT EXECUTED register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) return RTEMS_INVALID_ADDRESS; 10b3f8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b3fd: 8d 65 f8 lea -0x8(%ebp),%esp 10b400: 5b pop %ebx 10b401: 5e pop %esi 10b402: c9 leave 10b403: c3 ret =============================================================================== 0011677c : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { 11677c: 55 push %ebp 11677d: 89 e5 mov %esp,%ebp 11677f: 56 push %esi 116780: 53 push %ebx 116781: 83 ec 10 sub $0x10,%esp 116784: 8b 75 08 mov 0x8(%ebp),%esi 116787: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 11678a: 85 db test %ebx,%ebx 11678c: 74 5e je 1167ec 11678e: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); 11678f: 8d 45 f4 lea -0xc(%ebp),%eax 116792: 50 push %eax 116793: 56 push %esi 116794: 68 60 0c 14 00 push $0x140c60 116799: e8 aa 49 00 00 call 11b148 <_Objects_Get> switch ( location ) { 11679e: 83 c4 10 add $0x10,%esp 1167a1: 8b 55 f4 mov -0xc(%ebp),%edx 1167a4: 85 d2 test %edx,%edx 1167a6: 74 0c je 1167b4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1167a8: b8 04 00 00 00 mov $0x4,%eax } 1167ad: 8d 65 f8 lea -0x8(%ebp),%esp 1167b0: 5b pop %ebx 1167b1: 5e pop %esi 1167b2: c9 leave 1167b3: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 1167b4: 6a 00 push $0x0 1167b6: 6a 00 push $0x0 1167b8: 68 00 00 00 80 push $0x80000000 1167bd: 6a 00 push $0x0 1167bf: 56 push %esi 1167c0: ff 75 10 pushl 0x10(%ebp) 1167c3: 53 push %ebx the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_message_queue_Urgent( 1167c4: 83 c0 14 add $0x14,%eax 1167c7: 50 push %eax 1167c8: e8 07 33 00 00 call 119ad4 <_CORE_message_queue_Submit> 1167cd: 89 c3 mov %eax,%ebx id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 1167cf: 83 c4 20 add $0x20,%esp 1167d2: e8 d5 51 00 00 call 11b9ac <_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); 1167d7: 83 ec 0c sub $0xc,%esp 1167da: 53 push %ebx 1167db: e8 8c ff ff ff call 11676c <_Message_queue_Translate_core_message_queue_return_code> 1167e0: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1167e3: 8d 65 f8 lea -0x8(%ebp),%esp 1167e6: 5b pop %ebx 1167e7: 5e pop %esi 1167e8: c9 leave 1167e9: c3 ret 1167ea: 66 90 xchg %ax,%ax <== NOT EXECUTED register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) return RTEMS_INVALID_ADDRESS; 1167ec: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1167f1: 8d 65 f8 lea -0x8(%ebp),%esp 1167f4: 5b pop %ebx 1167f5: 5e pop %esi 1167f6: c9 leave 1167f7: c3 ret =============================================================================== 0010ce80 : const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 10ce80: 55 push %ebp 10ce81: 89 e5 mov %esp,%ebp 10ce83: 83 ec 08 sub $0x8,%esp 10ce86: 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 ) 10ce89: 83 f8 01 cmp $0x1,%eax 10ce8c: 74 2a je 10ceb8 api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 10ce8e: 83 f8 02 cmp $0x2,%eax 10ce91: 74 09 je 10ce9c #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; 10ce93: b8 bb 2f 12 00 mov $0x122fbb,%eax class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; } 10ce98: c9 leave 10ce99: c3 ret 10ce9a: 66 90 xchg %ax,%ax <== NOT EXECUTED const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) api_assoc = rtems_object_api_classic_assoc; 10ce9c: b8 80 71 12 00 mov $0x127180,%eax else if ( the_api == OBJECTS_POSIX_API ) api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); 10cea1: 83 ec 08 sub $0x8,%esp 10cea4: ff 75 0c pushl 0xc(%ebp) 10cea7: 50 push %eax 10cea8: e8 7f 49 00 00 call 11182c if ( class_assoc ) 10cead: 83 c4 10 add $0x10,%esp 10ceb0: 85 c0 test %eax,%eax 10ceb2: 74 0c je 10cec0 return class_assoc->name; 10ceb4: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10ceb6: c9 leave 10ceb7: c3 ret { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; 10ceb8: b8 60 71 12 00 mov $0x127160,%eax 10cebd: eb e2 jmp 10cea1 10cebf: 90 nop <== NOT EXECUTED else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; 10cec0: b8 c3 2f 12 00 mov $0x122fc3,%eax } 10cec5: c9 leave 10cec6: c3 ret =============================================================================== 0010cec8 : }; const char *rtems_object_get_api_name( int api ) { 10cec8: 55 push %ebp 10cec9: 89 e5 mov %esp,%ebp 10cecb: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); 10cece: ff 75 08 pushl 0x8(%ebp) 10ced1: 68 00 72 12 00 push $0x127200 10ced6: e8 51 49 00 00 call 11182c if ( api_assoc ) 10cedb: 83 c4 10 add $0x10,%esp 10cede: 85 c0 test %eax,%eax 10cee0: 74 06 je 10cee8 return api_assoc->name; 10cee2: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10cee4: c9 leave 10cee5: c3 ret 10cee6: 66 90 xchg %ax,%ax <== NOT EXECUTED const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); if ( api_assoc ) return api_assoc->name; return "BAD CLASS"; 10cee8: b8 c3 2f 12 00 mov $0x122fc3,%eax } 10ceed: c9 leave 10ceee: c3 ret =============================================================================== 0010cf30 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 10cf30: 55 push %ebp 10cf31: 89 e5 mov %esp,%ebp 10cf33: 57 push %edi 10cf34: 56 push %esi 10cf35: 53 push %ebx 10cf36: 83 ec 0c sub $0xc,%esp 10cf39: 8b 5d 10 mov 0x10(%ebp),%ebx int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10cf3c: 85 db test %ebx,%ebx 10cf3e: 74 60 je 10cfa0 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 10cf40: 83 ec 08 sub $0x8,%esp 10cf43: 0f b7 45 0c movzwl 0xc(%ebp),%eax 10cf47: 50 push %eax 10cf48: ff 75 08 pushl 0x8(%ebp) 10cf4b: e8 78 1a 00 00 call 10e9c8 <_Objects_Get_information> if ( !obj_info ) 10cf50: 83 c4 10 add $0x10,%esp 10cf53: 85 c0 test %eax,%eax 10cf55: 74 59 je 10cfb0 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 10cf57: 8b 50 08 mov 0x8(%eax),%edx 10cf5a: 89 13 mov %edx,(%ebx) info->maximum_id = obj_info->maximum_id; 10cf5c: 8b 50 0c mov 0xc(%eax),%edx 10cf5f: 89 53 04 mov %edx,0x4(%ebx) info->auto_extend = obj_info->auto_extend; 10cf62: 8a 50 12 mov 0x12(%eax),%dl 10cf65: 88 53 0c mov %dl,0xc(%ebx) info->maximum = obj_info->maximum; 10cf68: 0f b7 70 10 movzwl 0x10(%eax),%esi 10cf6c: 89 73 08 mov %esi,0x8(%ebx) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10cf6f: 85 f6 test %esi,%esi 10cf71: 74 44 je 10cfb7 <== NEVER TAKEN 10cf73: 8b 78 1c mov 0x1c(%eax),%edi 10cf76: b9 01 00 00 00 mov $0x1,%ecx 10cf7b: b8 01 00 00 00 mov $0x1,%eax 10cf80: 31 d2 xor %edx,%edx 10cf82: 66 90 xchg %ax,%ax if ( !obj_info->local_table[i] ) unallocated++; 10cf84: 83 3c 8f 01 cmpl $0x1,(%edi,%ecx,4) 10cf88: 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++ ) 10cf8b: 40 inc %eax 10cf8c: 89 c1 mov %eax,%ecx 10cf8e: 39 c6 cmp %eax,%esi 10cf90: 73 f2 jae 10cf84 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 10cf92: 89 53 10 mov %edx,0x10(%ebx) return RTEMS_SUCCESSFUL; 10cf95: 31 c0 xor %eax,%eax } 10cf97: 8d 65 f4 lea -0xc(%ebp),%esp 10cf9a: 5b pop %ebx 10cf9b: 5e pop %esi 10cf9c: 5f pop %edi 10cf9d: c9 leave 10cf9e: c3 ret 10cf9f: 90 nop <== NOT EXECUTED /* * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; 10cfa0: b8 09 00 00 00 mov $0x9,%eax unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 10cfa5: 8d 65 f4 lea -0xc(%ebp),%esp 10cfa8: 5b pop %ebx 10cfa9: 5e pop %esi 10cfaa: 5f pop %edi 10cfab: c9 leave 10cfac: c3 ret 10cfad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) return RTEMS_INVALID_NUMBER; 10cfb0: b8 0a 00 00 00 mov $0xa,%eax 10cfb5: eb e0 jmp 10cf97 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++ ) 10cfb7: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cfb9: eb d7 jmp 10cf92 <== NOT EXECUTED =============================================================================== 0010c4fc : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { 10c4fc: 55 push %ebp 10c4fd: 89 e5 mov %esp,%ebp 10c4ff: 53 push %ebx 10c500: 83 ec 14 sub $0x14,%esp 10c503: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10c506: 85 db test %ebx,%ebx 10c508: 74 26 je 10c530 return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); 10c50a: 83 ec 08 sub $0x8,%esp 10c50d: 8d 45 f4 lea -0xc(%ebp),%eax 10c510: 50 push %eax 10c511: ff 75 08 pushl 0x8(%ebp) 10c514: e8 d3 1a 00 00 call 10dfec <_Objects_Id_to_name> *name = name_u.name_u32; 10c519: 8b 55 f4 mov -0xc(%ebp),%edx 10c51c: 89 13 mov %edx,(%ebx) return _Status_Object_name_errors_to_status[ status ]; 10c51e: 8b 04 85 cc 1a 12 00 mov 0x121acc(,%eax,4),%eax 10c525: 83 c4 10 add $0x10,%esp } 10c528: 8b 5d fc mov -0x4(%ebp),%ebx 10c52b: c9 leave 10c52c: c3 ret 10c52d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) return RTEMS_INVALID_ADDRESS; 10c530: 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 ]; } 10c535: 8b 5d fc mov -0x4(%ebp),%ebx 10c538: c9 leave 10c539: c3 ret =============================================================================== 0010d014 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 10d014: 55 push %ebp 10d015: 89 e5 mov %esp,%ebp 10d017: 57 push %edi 10d018: 56 push %esi 10d019: 53 push %ebx 10d01a: 83 ec 1c sub $0x1c,%esp 10d01d: 8b 75 08 mov 0x8(%ebp),%esi 10d020: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10d023: 85 ff test %edi,%edi 10d025: 74 61 je 10d088 return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10d027: 85 f6 test %esi,%esi 10d029: 74 35 je 10d060 information = _Objects_Get_information_id( tmpId ); 10d02b: 83 ec 0c sub $0xc,%esp 10d02e: 56 push %esi 10d02f: e8 74 19 00 00 call 10e9a8 <_Objects_Get_information_id> 10d034: 89 c3 mov %eax,%ebx if ( !information ) 10d036: 83 c4 10 add $0x10,%esp 10d039: 85 c0 test %eax,%eax 10d03b: 74 16 je 10d053 return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10d03d: 50 push %eax 10d03e: 8d 45 e4 lea -0x1c(%ebp),%eax 10d041: 50 push %eax 10d042: 56 push %esi 10d043: 53 push %ebx 10d044: e8 fb 1a 00 00 call 10eb44 <_Objects_Get> switch ( location ) { 10d049: 83 c4 10 add $0x10,%esp 10d04c: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d04f: 85 c9 test %ecx,%ecx 10d051: 74 19 je 10d06c #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d053: b8 04 00 00 00 mov $0x4,%eax } 10d058: 8d 65 f4 lea -0xc(%ebp),%esp 10d05b: 5b pop %ebx 10d05c: 5e pop %esi 10d05d: 5f pop %edi 10d05e: c9 leave 10d05f: c3 ret Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10d060: a1 18 98 12 00 mov 0x129818,%eax 10d065: 8b 70 08 mov 0x8(%eax),%esi 10d068: eb c1 jmp 10d02b 10d06a: 66 90 xchg %ax,%ax <== NOT EXECUTED the_object = _Objects_Get( information, tmpId, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 10d06c: 52 push %edx 10d06d: 57 push %edi 10d06e: 50 push %eax 10d06f: 53 push %ebx 10d070: e8 07 1d 00 00 call 10ed7c <_Objects_Set_name> _Thread_Enable_dispatch(); 10d075: e8 16 24 00 00 call 10f490 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d07a: 83 c4 10 add $0x10,%esp 10d07d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d07f: 8d 65 f4 lea -0xc(%ebp),%esp 10d082: 5b pop %ebx 10d083: 5e pop %esi 10d084: 5f pop %edi 10d085: c9 leave 10d086: c3 ret 10d087: 90 nop <== NOT EXECUTED Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; 10d088: b8 09 00 00 00 mov $0x9,%eax 10d08d: eb c9 jmp 10d058 =============================================================================== 001167f8 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 1167f8: 55 push %ebp 1167f9: 89 e5 mov %esp,%ebp 1167fb: 57 push %edi 1167fc: 56 push %esi 1167fd: 53 push %ebx 1167fe: 83 ec 1c sub $0x1c,%esp 116801: 8b 5d 08 mov 0x8(%ebp),%ebx 116804: 8b 75 0c mov 0xc(%ebp),%esi 116807: 8b 55 10 mov 0x10(%ebp),%edx 11680a: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 11680d: 85 db test %ebx,%ebx 11680f: 74 47 je 116858 return RTEMS_INVALID_NAME; if ( !starting_address ) 116811: 85 f6 test %esi,%esi 116813: 74 23 je 116838 return RTEMS_INVALID_ADDRESS; if ( !id ) 116815: 8b 45 1c mov 0x1c(%ebp),%eax 116818: 85 c0 test %eax,%eax 11681a: 74 1c je 116838 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 11681c: 85 d2 test %edx,%edx 11681e: 74 28 je 116848 116820: 85 ff test %edi,%edi 116822: 74 24 je 116848 116824: 39 fa cmp %edi,%edx 116826: 72 20 jb 116848 116828: f7 c7 03 00 00 00 test $0x3,%edi 11682e: 75 18 jne 116848 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 116830: f7 c6 03 00 00 00 test $0x3,%esi 116836: 74 30 je 116868 return RTEMS_INVALID_ADDRESS; 116838: b8 09 00 00 00 mov $0x9,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11683d: 8d 65 f4 lea -0xc(%ebp),%esp 116840: 5b pop %ebx 116841: 5e pop %esi 116842: 5f pop %edi 116843: c9 leave 116844: c3 ret 116845: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !id ) return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; 116848: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11684d: 8d 65 f4 lea -0xc(%ebp),%esp 116850: 5b pop %ebx 116851: 5e pop %esi 116852: 5f pop %edi 116853: c9 leave 116854: c3 ret 116855: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 116858: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11685d: 8d 65 f4 lea -0xc(%ebp),%esp 116860: 5b pop %ebx 116861: 5e pop %esi 116862: 5f pop %edi 116863: c9 leave 116864: c3 ret 116865: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 116868: a1 94 09 14 00 mov 0x140994,%eax 11686d: 40 inc %eax 11686e: a3 94 09 14 00 mov %eax,0x140994 * 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 ); 116873: 83 ec 0c sub $0xc,%esp 116876: 68 20 08 14 00 push $0x140820 11687b: 89 55 e0 mov %edx,-0x20(%ebp) 11687e: e8 d1 43 00 00 call 11ac54 <_Objects_Allocate> 116883: 89 45 e4 mov %eax,-0x1c(%ebp) _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 116886: 83 c4 10 add $0x10,%esp 116889: 85 c0 test %eax,%eax 11688b: 8b 55 e0 mov -0x20(%ebp),%edx 11688e: 74 58 je 1168e8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 116890: 8b 45 e4 mov -0x1c(%ebp),%eax 116893: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 116896: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 116899: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 11689c: 8b 4d 18 mov 0x18(%ebp),%ecx 11689f: 89 48 1c mov %ecx,0x1c(%eax) the_partition->number_of_used_blocks = 0; 1168a2: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) _Chain_Initialize( &the_partition->Memory, starting_address, 1168a9: 57 push %edi 1168aa: 89 d0 mov %edx,%eax 1168ac: 31 d2 xor %edx,%edx 1168ae: f7 f7 div %edi 1168b0: 50 push %eax 1168b1: 56 push %esi 1168b2: 8b 45 e4 mov -0x1c(%ebp),%eax 1168b5: 83 c0 24 add $0x24,%eax 1168b8: 50 push %eax 1168b9: e8 2a 2f 00 00 call 1197e8 <_Chain_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 1168be: 8b 7d e4 mov -0x1c(%ebp),%edi 1168c1: 8b 47 08 mov 0x8(%edi),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 1168c4: 0f b7 f0 movzwl %ax,%esi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1168c7: 8b 15 3c 08 14 00 mov 0x14083c,%edx 1168cd: 89 3c b2 mov %edi,(%edx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1168d0: 89 5f 0c mov %ebx,0xc(%edi) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 1168d3: 8b 55 1c mov 0x1c(%ebp),%edx 1168d6: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 1168d8: e8 cf 50 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1168dd: 83 c4 10 add $0x10,%esp 1168e0: 31 c0 xor %eax,%eax 1168e2: e9 66 ff ff ff jmp 11684d 1168e7: 90 nop <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 1168e8: e8 bf 50 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 1168ed: b8 05 00 00 00 mov $0x5,%eax 1168f2: e9 56 ff ff ff jmp 11684d =============================================================================== 001168f8 : */ rtems_status_code rtems_partition_delete( rtems_id id ) { 1168f8: 55 push %ebp 1168f9: 89 e5 mov %esp,%ebp 1168fb: 83 ec 2c sub $0x2c,%esp register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); 1168fe: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 116901: 50 push %eax 116902: ff 75 08 pushl 0x8(%ebp) 116905: 68 20 08 14 00 push $0x140820 11690a: e8 39 48 00 00 call 11b148 <_Objects_Get> switch ( location ) { 11690f: 83 c4 10 add $0x10,%esp 116912: 8b 55 f4 mov -0xc(%ebp),%edx 116915: 85 d2 test %edx,%edx 116917: 74 07 je 116920 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116919: b8 04 00 00 00 mov $0x4,%eax } 11691e: c9 leave 11691f: c3 ret the_partition = _Partition_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { 116920: 8b 48 20 mov 0x20(%eax),%ecx 116923: 85 c9 test %ecx,%ecx 116925: 74 0d je 116934 #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 116927: e8 80 50 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 11692c: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116931: c9 leave 116932: c3 ret 116933: 90 nop <== NOT EXECUTED the_partition = _Partition_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { _Objects_Close( &_Partition_Information, &the_partition->Object ); 116934: 83 ec 08 sub $0x8,%esp 116937: 50 push %eax 116938: 68 20 08 14 00 push $0x140820 11693d: 89 45 e4 mov %eax,-0x1c(%ebp) 116940: e8 8b 43 00 00 call 11acd0 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); 116945: 58 pop %eax 116946: 5a pop %edx 116947: 8b 45 e4 mov -0x1c(%ebp),%eax 11694a: 50 push %eax 11694b: 68 20 08 14 00 push $0x140820 116950: e8 77 46 00 00 call 11afcc <_Objects_Free> 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 116955: e8 52 50 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11695a: 83 c4 10 add $0x10,%esp 11695d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11695f: c9 leave 116960: c3 ret =============================================================================== 00116964 : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 116964: 55 push %ebp 116965: 89 e5 mov %esp,%ebp 116967: 56 push %esi 116968: 53 push %ebx 116969: 83 ec 20 sub $0x20,%esp 11696c: 8b 5d 0c mov 0xc(%ebp),%ebx register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 11696f: 85 db test %ebx,%ebx 116971: 74 59 je 1169cc Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 116973: 52 push %edx return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); 116974: 8d 45 f4 lea -0xc(%ebp),%eax 116977: 50 push %eax 116978: ff 75 08 pushl 0x8(%ebp) 11697b: 68 20 08 14 00 push $0x140820 116980: e8 c3 47 00 00 call 11b148 <_Objects_Get> 116985: 89 c6 mov %eax,%esi switch ( location ) { 116987: 83 c4 10 add $0x10,%esp 11698a: 8b 45 f4 mov -0xc(%ebp),%eax 11698d: 85 c0 test %eax,%eax 11698f: 75 2f jne 1169c0 */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 116991: 83 ec 0c sub $0xc,%esp 116994: 8d 46 24 lea 0x24(%esi),%eax 116997: 50 push %eax 116998: e8 27 2e 00 00 call 1197c4 <_Chain_Get> case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 11699d: 83 c4 10 add $0x10,%esp 1169a0: 85 c0 test %eax,%eax 1169a2: 74 34 je 1169d8 the_partition->number_of_used_blocks += 1; 1169a4: ff 46 20 incl 0x20(%esi) _Thread_Enable_dispatch(); 1169a7: 89 45 e4 mov %eax,-0x1c(%ebp) 1169aa: e8 fd 4f 00 00 call 11b9ac <_Thread_Enable_dispatch> *buffer = the_buffer; 1169af: 8b 45 e4 mov -0x1c(%ebp),%eax 1169b2: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 1169b4: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1169b6: 8d 65 f8 lea -0x8(%ebp),%esp 1169b9: 5b pop %ebx 1169ba: 5e pop %esi 1169bb: c9 leave 1169bc: c3 ret 1169bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1169c0: b8 04 00 00 00 mov $0x4,%eax } 1169c5: 8d 65 f8 lea -0x8(%ebp),%esp 1169c8: 5b pop %ebx 1169c9: 5e pop %esi 1169ca: c9 leave 1169cb: c3 ret register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) return RTEMS_INVALID_ADDRESS; 1169cc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1169d1: 8d 65 f8 lea -0x8(%ebp),%esp 1169d4: 5b pop %ebx 1169d5: 5e pop %esi 1169d6: c9 leave 1169d7: c3 ret the_partition->number_of_used_blocks += 1; _Thread_Enable_dispatch(); *buffer = the_buffer; return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 1169d8: e8 cf 4f 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_UNSATISFIED; 1169dd: b8 0d 00 00 00 mov $0xd,%eax 1169e2: eb e1 jmp 1169c5 =============================================================================== 00116a08 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 116a08: 55 push %ebp 116a09: 89 e5 mov %esp,%ebp 116a0b: 56 push %esi 116a0c: 53 push %ebx 116a0d: 83 ec 14 sub $0x14,%esp 116a10: 8b 75 0c mov 0xc(%ebp),%esi register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); 116a13: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 116a16: 50 push %eax 116a17: ff 75 08 pushl 0x8(%ebp) 116a1a: 68 20 08 14 00 push $0x140820 116a1f: e8 24 47 00 00 call 11b148 <_Objects_Get> 116a24: 89 c3 mov %eax,%ebx switch ( location ) { 116a26: 83 c4 10 add $0x10,%esp 116a29: 8b 45 f4 mov -0xc(%ebp),%eax 116a2c: 85 c0 test %eax,%eax 116a2e: 74 0c je 116a3c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116a30: b8 04 00 00 00 mov $0x4,%eax } 116a35: 8d 65 f8 lea -0x8(%ebp),%esp 116a38: 5b pop %ebx 116a39: 5e pop %esi 116a3a: c9 leave 116a3b: c3 ret ) { void *starting; void *ending; starting = the_partition->starting_address; 116a3c: 8b 43 10 mov 0x10(%ebx),%eax ending = _Addresses_Add_offset( starting, the_partition->length ); 116a3f: 8b 53 14 mov 0x14(%ebx),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 116a42: 39 c6 cmp %eax,%esi 116a44: 72 3a jb 116a80 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 116a46: 8d 14 10 lea (%eax,%edx,1),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 116a49: 39 d6 cmp %edx,%esi 116a4b: 77 33 ja 116a80 <== NEVER TAKEN RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 116a4d: 89 f2 mov %esi,%edx 116a4f: 29 c2 sub %eax,%edx 116a51: 89 d0 mov %edx,%eax offset = (uint32_t) _Addresses_Subtract( the_buffer, the_partition->starting_address ); return ((offset % the_partition->buffer_size) == 0); 116a53: 31 d2 xor %edx,%edx 116a55: f7 73 18 divl 0x18(%ebx) starting = the_partition->starting_address; ending = _Addresses_Add_offset( starting, the_partition->length ); return ( _Addresses_Is_in_range( the_buffer, starting, ending ) && 116a58: 85 d2 test %edx,%edx 116a5a: 75 24 jne 116a80 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 116a5c: 83 ec 08 sub $0x8,%esp 116a5f: 56 push %esi 116a60: 8d 43 24 lea 0x24(%ebx),%eax 116a63: 50 push %eax 116a64: e8 1f 2d 00 00 call 119788 <_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; 116a69: ff 4b 20 decl 0x20(%ebx) _Thread_Enable_dispatch(); 116a6c: e8 3b 4f 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116a71: 83 c4 10 add $0x10,%esp 116a74: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116a76: 8d 65 f8 lea -0x8(%ebp),%esp 116a79: 5b pop %ebx 116a7a: 5e pop %esi 116a7b: c9 leave 116a7c: c3 ret 116a7d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 116a80: e8 27 4f 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 116a85: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116a8a: 8d 65 f8 lea -0x8(%ebp),%esp 116a8d: 5b pop %ebx 116a8e: 5e pop %esi 116a8f: c9 leave 116a90: c3 ret =============================================================================== 00115e2c : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 115e2c: 55 push %ebp 115e2d: 89 e5 mov %esp,%ebp 115e2f: 57 push %edi 115e30: 56 push %esi 115e31: 53 push %ebx 115e32: 83 ec 1c sub $0x1c,%esp 115e35: 8b 5d 08 mov 0x8(%ebp),%ebx 115e38: 8b 55 0c mov 0xc(%ebp),%edx 115e3b: 8b 7d 10 mov 0x10(%ebp),%edi 115e3e: 8b 75 18 mov 0x18(%ebp),%esi register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 115e41: 85 db test %ebx,%ebx 115e43: 74 1b je 115e60 return RTEMS_INVALID_NAME; if ( !id ) 115e45: 85 f6 test %esi,%esi 115e47: 74 08 je 115e51 * id - port id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_port_create( 115e49: 89 f8 mov %edi,%eax 115e4b: 09 d0 or %edx,%eax return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 115e4d: a8 03 test $0x3,%al 115e4f: 74 1f je 115e70 !_Addresses_Is_aligned( external_start ) ) return RTEMS_INVALID_ADDRESS; 115e51: b8 09 00 00 00 mov $0x9,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 115e56: 8d 65 f4 lea -0xc(%ebp),%esp 115e59: 5b pop %ebx 115e5a: 5e pop %esi 115e5b: 5f pop %edi 115e5c: c9 leave 115e5d: c3 ret 115e5e: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 115e60: b8 03 00 00 00 mov $0x3,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 115e65: 8d 65 f4 lea -0xc(%ebp),%esp 115e68: 5b pop %ebx 115e69: 5e pop %esi 115e6a: 5f pop %edi 115e6b: c9 leave 115e6c: c3 ret 115e6d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 115e70: a1 94 09 14 00 mov 0x140994,%eax 115e75: 40 inc %eax 115e76: a3 94 09 14 00 mov %eax,0x140994 */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) _Objects_Allocate( &_Dual_ported_memory_Information ); 115e7b: 83 ec 0c sub $0xc,%esp 115e7e: 68 e0 07 14 00 push $0x1407e0 115e83: 89 55 e4 mov %edx,-0x1c(%ebp) 115e86: e8 c9 4d 00 00 call 11ac54 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 115e8b: 83 c4 10 add $0x10,%esp 115e8e: 85 c0 test %eax,%eax 115e90: 8b 55 e4 mov -0x1c(%ebp),%edx 115e93: 74 33 je 115ec8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 115e95: 89 50 10 mov %edx,0x10(%eax) the_port->external_base = external_start; 115e98: 89 78 14 mov %edi,0x14(%eax) the_port->length = length - 1; 115e9b: 8b 55 14 mov 0x14(%ebp),%edx 115e9e: 4a dec %edx 115e9f: 89 50 18 mov %edx,0x18(%eax) Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 115ea2: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 115ea5: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 115ea8: 8b 0d fc 07 14 00 mov 0x1407fc,%ecx 115eae: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 115eb1: 89 58 0c mov %ebx,0xc(%eax) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 115eb4: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 115eb6: e8 f1 5a 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115ebb: 31 c0 xor %eax,%eax } 115ebd: 8d 65 f4 lea -0xc(%ebp),%esp 115ec0: 5b pop %ebx 115ec1: 5e pop %esi 115ec2: 5f pop %edi 115ec3: c9 leave 115ec4: c3 ret 115ec5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { _Thread_Enable_dispatch(); 115ec8: e8 df 5a 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 115ecd: b8 05 00 00 00 mov $0x5,%eax 115ed2: eb 82 jmp 115e56 =============================================================================== 00115ed4 : */ rtems_status_code rtems_port_delete( rtems_id id ) { 115ed4: 55 push %ebp 115ed5: 89 e5 mov %esp,%ebp 115ed7: 83 ec 2c sub $0x2c,%esp register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); 115eda: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) _Objects_Get( &_Dual_ported_memory_Information, id, location ); 115edd: 50 push %eax 115ede: ff 75 08 pushl 0x8(%ebp) 115ee1: 68 e0 07 14 00 push $0x1407e0 115ee6: e8 5d 52 00 00 call 11b148 <_Objects_Get> switch ( location ) { 115eeb: 83 c4 10 add $0x10,%esp 115eee: 8b 4d f4 mov -0xc(%ebp),%ecx 115ef1: 85 c9 test %ecx,%ecx 115ef3: 75 2f jne 115f24 case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); 115ef5: 83 ec 08 sub $0x8,%esp 115ef8: 50 push %eax 115ef9: 68 e0 07 14 00 push $0x1407e0 115efe: 89 45 e4 mov %eax,-0x1c(%ebp) 115f01: e8 ca 4d 00 00 call 11acd0 <_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 ); 115f06: 58 pop %eax 115f07: 5a pop %edx 115f08: 8b 45 e4 mov -0x1c(%ebp),%eax 115f0b: 50 push %eax 115f0c: 68 e0 07 14 00 push $0x1407e0 115f11: e8 b6 50 00 00 call 11afcc <_Objects_Free> _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 115f16: e8 91 5a 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115f1b: 83 c4 10 add $0x10,%esp 115f1e: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115f20: c9 leave 115f21: c3 ret 115f22: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115f24: b8 04 00 00 00 mov $0x4,%eax } 115f29: c9 leave 115f2a: c3 ret =============================================================================== 00115f2c : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 115f2c: 55 push %ebp 115f2d: 89 e5 mov %esp,%ebp 115f2f: 56 push %esi 115f30: 53 push %ebx 115f31: 83 ec 10 sub $0x10,%esp 115f34: 8b 75 0c mov 0xc(%ebp),%esi 115f37: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 115f3a: 85 db test %ebx,%ebx 115f3c: 74 4e je 115f8c Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) _Objects_Get( &_Dual_ported_memory_Information, id, location ); 115f3e: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); 115f3f: 8d 45 f4 lea -0xc(%ebp),%eax 115f42: 50 push %eax 115f43: ff 75 08 pushl 0x8(%ebp) 115f46: 68 e0 07 14 00 push $0x1407e0 115f4b: e8 f8 51 00 00 call 11b148 <_Objects_Get> switch ( location ) { 115f50: 83 c4 10 add $0x10,%esp 115f53: 8b 55 f4 mov -0xc(%ebp),%edx 115f56: 85 d2 test %edx,%edx 115f58: 74 0e je 115f68 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115f5a: b8 04 00 00 00 mov $0x4,%eax } 115f5f: 8d 65 f8 lea -0x8(%ebp),%esp 115f62: 5b pop %ebx 115f63: 5e pop %esi 115f64: c9 leave 115f65: c3 ret 115f66: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 115f68: 89 f2 mov %esi,%edx 115f6a: 2b 50 14 sub 0x14(%eax),%edx the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); if ( ending > the_port->length ) 115f6d: 3b 50 18 cmp 0x18(%eax),%edx 115f70: 77 16 ja 115f88 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 115f72: 03 50 10 add 0x10(%eax),%edx 115f75: 89 13 mov %edx,(%ebx) *internal = external; else *internal = _Addresses_Add_offset( the_port->internal_base, ending ); _Thread_Enable_dispatch(); 115f77: e8 30 5a 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115f7c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115f7e: 8d 65 f8 lea -0x8(%ebp),%esp 115f81: 5b pop %ebx 115f82: 5e pop %esi 115f83: c9 leave 115f84: c3 ret 115f85: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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; 115f88: 89 33 mov %esi,(%ebx) 115f8a: eb eb jmp 115f77 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) return RTEMS_INVALID_ADDRESS; 115f8c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115f91: 8d 65 f8 lea -0x8(%ebp),%esp 115f94: 5b pop %ebx 115f95: 5e pop %esi 115f96: c9 leave 115f97: c3 ret =============================================================================== 00115fbc : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 115fbc: 55 push %ebp 115fbd: 89 e5 mov %esp,%ebp 115fbf: 56 push %esi 115fc0: 53 push %ebx 115fc1: 83 ec 10 sub $0x10,%esp 115fc4: 8b 75 0c mov 0xc(%ebp),%esi 115fc7: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 115fca: 85 db test %ebx,%ebx 115fcc: 74 4e je 11601c <== NEVER TAKEN 115fce: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); 115fcf: 8d 45 f4 lea -0xc(%ebp),%eax 115fd2: 50 push %eax 115fd3: ff 75 08 pushl 0x8(%ebp) 115fd6: 68 e0 07 14 00 push $0x1407e0 115fdb: e8 68 51 00 00 call 11b148 <_Objects_Get> switch ( location ) { 115fe0: 83 c4 10 add $0x10,%esp 115fe3: 8b 55 f4 mov -0xc(%ebp),%edx 115fe6: 85 d2 test %edx,%edx 115fe8: 74 0e je 115ff8 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115fea: b8 04 00 00 00 mov $0x4,%eax } 115fef: 8d 65 f8 lea -0x8(%ebp),%esp 115ff2: 5b pop %ebx 115ff3: 5e pop %esi 115ff4: c9 leave 115ff5: c3 ret 115ff6: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 115ff8: 89 f2 mov %esi,%edx 115ffa: 2b 50 10 sub 0x10(%eax),%edx the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) 115ffd: 3b 50 18 cmp 0x18(%eax),%edx 116000: 77 16 ja 116018 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 116002: 03 50 14 add 0x14(%eax),%edx 116005: 89 13 mov %edx,(%ebx) *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, ending ); _Thread_Enable_dispatch(); 116007: e8 a0 59 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11600c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11600e: 8d 65 f8 lea -0x8(%ebp),%esp 116011: 5b pop %ebx 116012: 5e pop %esi 116013: c9 leave 116014: c3 ret 116015: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) *external = internal; 116018: 89 33 mov %esi,(%ebx) 11601a: eb eb jmp 116007 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) return RTEMS_INVALID_ADDRESS; 11601c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116021: 8d 65 f8 lea -0x8(%ebp),%esp 116024: 5b pop %ebx 116025: 5e pop %esi 116026: c9 leave 116027: c3 ret =============================================================================== 00116a94 : */ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { 116a94: 55 push %ebp 116a95: 89 e5 mov %esp,%ebp 116a97: 53 push %ebx 116a98: 83 ec 18 sub $0x18,%esp Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); 116a9b: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 116a9e: 50 push %eax 116a9f: ff 75 08 pushl 0x8(%ebp) 116aa2: 68 60 08 14 00 push $0x140860 116aa7: e8 9c 46 00 00 call 11b148 <_Objects_Get> 116aac: 89 c3 mov %eax,%ebx switch ( location ) { 116aae: 83 c4 10 add $0x10,%esp 116ab1: 8b 45 f4 mov -0xc(%ebp),%eax 116ab4: 85 c0 test %eax,%eax 116ab6: 74 0c je 116ac4 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116ab8: b8 04 00 00 00 mov $0x4,%eax } 116abd: 8b 5d fc mov -0x4(%ebp),%ebx 116ac0: c9 leave 116ac1: c3 ret 116ac2: 66 90 xchg %ax,%ax <== NOT EXECUTED the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 116ac4: a1 38 0c 14 00 mov 0x140c38,%eax 116ac9: 39 43 40 cmp %eax,0x40(%ebx) 116acc: 74 12 je 116ae0 _Thread_Enable_dispatch(); 116ace: e8 d9 4e 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 116ad3: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116ad8: 8b 5d fc mov -0x4(%ebp),%ebx 116adb: c9 leave 116adc: c3 ret 116add: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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 ); 116ae0: 83 ec 0c sub $0xc,%esp 116ae3: 8d 43 10 lea 0x10(%ebx),%eax 116ae6: 50 push %eax 116ae7: e8 9c 62 00 00 call 11cd88 <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 116aec: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) _Thread_Enable_dispatch(); 116af3: e8 b4 4e 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116af8: 83 c4 10 add $0x10,%esp 116afb: 31 c0 xor %eax,%eax 116afd: eb be jmp 116abd =============================================================================== 0010c30c : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 10c30c: 55 push %ebp 10c30d: 89 e5 mov %esp,%ebp 10c30f: 57 push %edi 10c310: 56 push %esi 10c311: 53 push %ebx 10c312: 83 ec 1c sub $0x1c,%esp 10c315: 8b 5d 08 mov 0x8(%ebp),%ebx 10c318: 8b 75 0c mov 0xc(%ebp),%esi Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10c31b: 85 db test %ebx,%ebx 10c31d: 0f 84 a9 00 00 00 je 10c3cc return RTEMS_INVALID_NAME; if ( !id ) 10c323: 85 f6 test %esi,%esi 10c325: 0f 84 c5 00 00 00 je 10c3f0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c32b: a1 74 85 12 00 mov 0x128574,%eax 10c330: 40 inc %eax 10c331: a3 74 85 12 00 mov %eax,0x128574 * the inactive chain of free period control blocks. */ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void ) { return (Rate_monotonic_Control *) _Objects_Allocate( &_Rate_monotonic_Information ); 10c336: 83 ec 0c sub $0xc,%esp 10c339: 68 80 84 12 00 push $0x128480 10c33e: e8 51 1e 00 00 call 10e194 <_Objects_Allocate> 10c343: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 10c345: 83 c4 10 add $0x10,%esp 10c348: 85 c0 test %eax,%eax 10c34a: 0f 84 8c 00 00 00 je 10c3dc _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 10c350: a1 18 88 12 00 mov 0x128818,%eax 10c355: 89 42 40 mov %eax,0x40(%edx) the_period->state = RATE_MONOTONIC_INACTIVE; 10c358: 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; 10c35f: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 10c366: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx) the_watchdog->id = id; 10c36d: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) the_watchdog->user_data = user_data; 10c374: 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 ); 10c37b: 8d 42 54 lea 0x54(%edx),%eax 10c37e: 89 45 e4 mov %eax,-0x1c(%ebp) 10c381: b9 38 00 00 00 mov $0x38,%ecx 10c386: 31 c0 xor %eax,%eax 10c388: 8b 7d e4 mov -0x1c(%ebp),%edi 10c38b: f3 aa rep stos %al,%es:(%edi) 10c38d: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10c394: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10c39b: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10c3a2: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10c3a9: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10c3ac: 0f b7 f8 movzwl %ax,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c3af: 8b 0d 9c 84 12 00 mov 0x12849c,%ecx 10c3b5: 89 14 b9 mov %edx,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c3b8: 89 5a 0c mov %ebx,0xc(%edx) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 10c3bb: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10c3bd: e8 ba 2b 00 00 call 10ef7c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c3c2: 31 c0 xor %eax,%eax } 10c3c4: 8d 65 f4 lea -0xc(%ebp),%esp 10c3c7: 5b pop %ebx 10c3c8: 5e pop %esi 10c3c9: 5f pop %edi 10c3ca: c9 leave 10c3cb: c3 ret ) { Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10c3cc: b8 03 00 00 00 mov $0x3,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c3d1: 8d 65 f4 lea -0xc(%ebp),%esp 10c3d4: 5b pop %ebx 10c3d5: 5e pop %esi 10c3d6: 5f pop %edi 10c3d7: c9 leave 10c3d8: c3 ret 10c3d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { _Thread_Enable_dispatch(); 10c3dc: e8 9b 2b 00 00 call 10ef7c <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10c3e1: b8 05 00 00 00 mov $0x5,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c3e6: 8d 65 f4 lea -0xc(%ebp),%esp 10c3e9: 5b pop %ebx 10c3ea: 5e pop %esi 10c3eb: 5f pop %edi 10c3ec: c9 leave 10c3ed: c3 ret 10c3ee: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10c3f0: b8 09 00 00 00 mov $0x9,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c3f5: 8d 65 f4 lea -0xc(%ebp),%esp 10c3f8: 5b pop %ebx 10c3f9: 5e pop %esi 10c3fa: 5f pop %edi 10c3fb: c9 leave 10c3fc: c3 ret =============================================================================== 00111d40 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 111d40: 55 push %ebp 111d41: 89 e5 mov %esp,%ebp 111d43: 53 push %ebx 111d44: 83 ec 24 sub $0x24,%esp 111d47: 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 ) 111d4a: 85 db test %ebx,%ebx 111d4c: 0f 84 92 00 00 00 je 111de4 111d52: 50 push %eax return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); 111d53: 8d 45 f4 lea -0xc(%ebp),%eax 111d56: 50 push %eax 111d57: ff 75 08 pushl 0x8(%ebp) 111d5a: 68 80 84 12 00 push $0x128480 111d5f: e8 b4 c9 ff ff call 10e718 <_Objects_Get> switch ( location ) { 111d64: 83 c4 10 add $0x10,%esp 111d67: 8b 4d f4 mov -0xc(%ebp),%ecx 111d6a: 85 c9 test %ecx,%ecx 111d6c: 74 0a je 111d78 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 111d6e: b8 04 00 00 00 mov $0x4,%eax } 111d73: 8b 5d fc mov -0x4(%ebp),%ebx 111d76: c9 leave 111d77: c3 ret the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 111d78: 8b 50 40 mov 0x40(%eax),%edx 111d7b: 8b 52 08 mov 0x8(%edx),%edx 111d7e: 89 13 mov %edx,(%ebx) status->state = the_period->state; 111d80: 8b 50 38 mov 0x38(%eax),%edx 111d83: 89 53 04 mov %edx,0x4(%ebx) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 111d86: 85 d2 test %edx,%edx 111d88: 75 2a jne 111db4 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 111d8a: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 111d91: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Timespec_Set_to_zero( &status->executed_since_last_period ); 111d98: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) 111d9f: 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(); 111da6: e8 d1 d1 ff ff call 10ef7c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 111dab: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111dad: 8b 5d fc mov -0x4(%ebp),%ebx 111db0: c9 leave 111db1: c3 ret 111db2: 66 90 xchg %ax,%ax <== NOT EXECUTED } else { /* * Grab the current status. */ valid_status = 111db4: 52 push %edx _Rate_monotonic_Get_status( 111db5: 8d 55 ec lea -0x14(%ebp),%edx } else { /* * Grab the current status. */ valid_status = 111db8: 52 push %edx _Rate_monotonic_Get_status( 111db9: 8d 55 e4 lea -0x1c(%ebp),%edx } else { /* * Grab the current status. */ valid_status = 111dbc: 52 push %edx 111dbd: 50 push %eax 111dbe: e8 61 a6 ff ff call 10c424 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { 111dc3: 83 c4 10 add $0x10,%esp 111dc6: 84 c0 test %al,%al 111dc8: 74 26 je 111df0 _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 111dca: 8b 45 e4 mov -0x1c(%ebp),%eax 111dcd: 8b 55 e8 mov -0x18(%ebp),%edx 111dd0: 89 43 08 mov %eax,0x8(%ebx) 111dd3: 89 53 0c mov %edx,0xc(%ebx) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 111dd6: 8b 45 ec mov -0x14(%ebp),%eax 111dd9: 8b 55 f0 mov -0x10(%ebp),%edx 111ddc: 89 43 10 mov %eax,0x10(%ebx) 111ddf: 89 53 14 mov %edx,0x14(%ebx) 111de2: eb c2 jmp 111da6 Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) return RTEMS_INVALID_ADDRESS; 111de4: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111de9: 8b 5d fc mov -0x4(%ebp),%ebx 111dec: c9 leave 111ded: c3 ret 111dee: 66 90 xchg %ax,%ax <== NOT EXECUTED valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { _Thread_Enable_dispatch(); 111df0: e8 87 d1 ff ff call 10ef7c <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 111df5: b8 0b 00 00 00 mov $0xb,%eax 111dfa: e9 74 ff ff ff jmp 111d73 =============================================================================== 0010c620 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 10c620: 55 push %ebp 10c621: 89 e5 mov %esp,%ebp 10c623: 57 push %edi 10c624: 56 push %esi 10c625: 53 push %ebx 10c626: 83 ec 30 sub $0x30,%esp 10c629: 8b 5d 08 mov 0x8(%ebp),%ebx 10c62c: 8b 75 0c mov 0xc(%ebp),%esi Objects_Locations location; rtems_status_code return_value; rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); 10c62f: 8d 45 e4 lea -0x1c(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 10c632: 50 push %eax 10c633: 53 push %ebx 10c634: 68 80 84 12 00 push $0x128480 10c639: e8 da 20 00 00 call 10e718 <_Objects_Get> switch ( location ) { 10c63e: 83 c4 10 add $0x10,%esp 10c641: 8b 55 e4 mov -0x1c(%ebp),%edx 10c644: 85 d2 test %edx,%edx 10c646: 74 10 je 10c658 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c648: b8 04 00 00 00 mov $0x4,%eax } 10c64d: 8d 65 f4 lea -0xc(%ebp),%esp 10c650: 5b pop %ebx 10c651: 5e pop %esi 10c652: 5f pop %edi 10c653: c9 leave 10c654: c3 ret 10c655: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 10c658: 8b 15 18 88 12 00 mov 0x128818,%edx 10c65e: 39 50 40 cmp %edx,0x40(%eax) 10c661: 74 15 je 10c678 _Thread_Enable_dispatch(); 10c663: e8 14 29 00 00 call 10ef7c <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 10c668: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c66d: 8d 65 f4 lea -0xc(%ebp),%esp 10c670: 5b pop %ebx 10c671: 5e pop %esi 10c672: 5f pop %edi 10c673: c9 leave 10c674: c3 ret 10c675: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 10c678: 85 f6 test %esi,%esi 10c67a: 75 1c jne 10c698 switch ( the_period->state ) { 10c67c: 8b 40 38 mov 0x38(%eax),%eax 10c67f: 83 f8 04 cmp $0x4,%eax 10c682: 77 6c ja 10c6f0 <== NEVER TAKEN 10c684: 8b 04 85 7c 1f 12 00 mov 0x121f7c(,%eax,4),%eax case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 10c68b: 89 45 d4 mov %eax,-0x2c(%ebp) 10c68e: e8 e9 28 00 00 call 10ef7c <_Thread_Enable_dispatch> return( return_value ); 10c693: 8b 45 d4 mov -0x2c(%ebp),%eax 10c696: eb b5 jmp 10c64d } _ISR_Disable( level ); 10c698: 9c pushf 10c699: fa cli 10c69a: 5f pop %edi if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { 10c69b: 8b 50 38 mov 0x38(%eax),%edx 10c69e: 85 d2 test %edx,%edx 10c6a0: 74 52 je 10c6f4 _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { 10c6a2: 83 fa 02 cmp $0x2,%edx 10c6a5: 0f 84 9e 00 00 00 je 10c749 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { 10c6ab: 83 fa 04 cmp $0x4,%edx 10c6ae: 75 98 jne 10c648 <== NEVER TAKEN /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 10c6b0: 83 ec 0c sub $0xc,%esp 10c6b3: 50 push %eax 10c6b4: 89 45 d4 mov %eax,-0x2c(%ebp) 10c6b7: e8 74 fe ff ff call 10c530 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 10c6bc: 57 push %edi 10c6bd: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 10c6be: 8b 45 d4 mov -0x2c(%ebp),%eax 10c6c1: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) the_period->next_length = length; 10c6c8: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c6cb: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c6ce: 5b pop %ebx 10c6cf: 5e pop %esi _Watchdog_Insert_ticks( &the_period->Timer, length ); 10c6d0: 83 c0 10 add $0x10,%eax 10c6d3: 50 push %eax 10c6d4: 68 44 86 12 00 push $0x128644 10c6d9: e8 5e 39 00 00 call 11003c <_Watchdog_Insert> _Thread_Enable_dispatch(); 10c6de: e8 99 28 00 00 call 10ef7c <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 10c6e3: 83 c4 10 add $0x10,%esp 10c6e6: b8 06 00 00 00 mov $0x6,%eax 10c6eb: e9 5d ff ff ff jmp 10c64d _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 10c6f0: 31 c0 xor %eax,%eax <== NOT EXECUTED 10c6f2: eb 97 jmp 10c68b <== NOT EXECUTED return( return_value ); } _ISR_Disable( level ); if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { _ISR_Enable( level ); 10c6f4: 57 push %edi 10c6f5: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 10c6f6: 83 ec 0c sub $0xc,%esp 10c6f9: 50 push %eax 10c6fa: 89 45 d4 mov %eax,-0x2c(%ebp) 10c6fd: e8 ba fd ff ff call 10c4bc <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 10c702: 8b 45 d4 mov -0x2c(%ebp),%eax 10c705: 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; 10c70c: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10c713: c7 40 2c 78 ca 10 00 movl $0x10ca78,0x2c(%eax) the_watchdog->id = id; 10c71a: 89 58 30 mov %ebx,0x30(%eax) the_watchdog->user_data = user_data; 10c71d: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 10c724: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c727: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c72a: 5e pop %esi 10c72b: 5f pop %edi _Watchdog_Insert_ticks( &the_period->Timer, length ); 10c72c: 83 c0 10 add $0x10,%eax 10c72f: 50 push %eax 10c730: 68 44 86 12 00 push $0x128644 10c735: e8 02 39 00 00 call 11003c <_Watchdog_Insert> _Thread_Enable_dispatch(); 10c73a: e8 3d 28 00 00 call 10ef7c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c73f: 83 c4 10 add $0x10,%esp 10c742: 31 c0 xor %eax,%eax 10c744: e9 04 ff ff ff jmp 10c64d if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 10c749: 83 ec 0c sub $0xc,%esp 10c74c: 50 push %eax 10c74d: 89 45 d4 mov %eax,-0x2c(%ebp) 10c750: e8 db fd ff ff call 10c530 <_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; 10c755: 8b 45 d4 mov -0x2c(%ebp),%eax 10c758: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) the_period->next_length = length; 10c75f: 89 70 3c mov %esi,0x3c(%eax) _ISR_Enable( level ); 10c762: 57 push %edi 10c763: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 10c764: 8b 15 18 88 12 00 mov 0x128818,%edx 10c76a: 8b 48 08 mov 0x8(%eax),%ecx 10c76d: 89 4a 20 mov %ecx,0x20(%edx) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10c770: 59 pop %ecx 10c771: 5b pop %ebx 10c772: 68 00 40 00 00 push $0x4000 10c777: 52 push %edx 10c778: 89 45 d4 mov %eax,-0x2c(%ebp) 10c77b: e8 b0 30 00 00 call 10f830 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 10c780: 9c pushf 10c781: fa cli 10c782: 59 pop %ecx local_state = the_period->state; 10c783: 8b 45 d4 mov -0x2c(%ebp),%eax 10c786: 8b 50 38 mov 0x38(%eax),%edx the_period->state = RATE_MONOTONIC_ACTIVE; 10c789: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) _ISR_Enable( level ); 10c790: 51 push %ecx 10c791: 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 ) 10c792: 83 c4 10 add $0x10,%esp 10c795: 83 fa 03 cmp $0x3,%edx 10c798: 74 0c je 10c7a6 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 10c79a: e8 dd 27 00 00 call 10ef7c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c79f: 31 c0 xor %eax,%eax 10c7a1: e9 a7 fe ff ff jmp 10c64d /* * 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 ); 10c7a6: 57 push %edi 10c7a7: 57 push %edi 10c7a8: 68 00 40 00 00 push $0x4000 10c7ad: ff 35 18 88 12 00 pushl 0x128818 10c7b3: e8 00 24 00 00 call 10ebb8 <_Thread_Clear_state> 10c7b8: 83 c4 10 add $0x10,%esp 10c7bb: eb dd jmp 10c79a =============================================================================== 0010c7c0 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 10c7c0: 55 push %ebp 10c7c1: 89 e5 mov %esp,%ebp 10c7c3: 57 push %edi 10c7c4: 56 push %esi 10c7c5: 53 push %ebx 10c7c6: 81 ec 8c 00 00 00 sub $0x8c,%esp 10c7cc: 8b 75 08 mov 0x8(%ebp),%esi rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 10c7cf: 8b 7d 0c mov 0xc(%ebp),%edi 10c7d2: 85 ff test %edi,%edi 10c7d4: 0f 84 be 00 00 00 je 10c898 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 10c7da: 83 ec 08 sub $0x8,%esp 10c7dd: 68 90 1f 12 00 push $0x121f90 10c7e2: 56 push %esi 10c7e3: ff 55 0c call *0xc(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 10c7e6: 59 pop %ecx 10c7e7: 5b pop %ebx 10c7e8: 68 c8 1f 12 00 push $0x121fc8 10c7ed: 56 push %esi 10c7ee: ff 55 0c call *0xc(%ebp) (*print)( context, "--- Wall times are in seconds ---\n" ); 10c7f1: 58 pop %eax 10c7f2: 5a pop %edx 10c7f3: 68 ec 1f 12 00 push $0x121fec 10c7f8: 56 push %esi 10c7f9: ff 55 0c call *0xc(%ebp) Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 10c7fc: 5b pop %ebx 10c7fd: 5f pop %edi 10c7fe: 68 10 20 12 00 push $0x122010 10c803: 56 push %esi 10c804: ff 55 0c call *0xc(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 10c807: 5a pop %edx 10c808: 59 pop %ecx 10c809: 68 5c 20 12 00 push $0x12205c 10c80e: 56 push %esi 10c80f: ff 55 0c call *0xc(%ebp) /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 10c812: 8b 1d 88 84 12 00 mov 0x128488,%ebx 10c818: 83 c4 10 add $0x10,%esp 10c81b: 3b 1d 8c 84 12 00 cmp 0x12848c,%ebx 10c821: 77 75 ja 10c898 <== NEVER TAKEN 10c823: 8d 7d 88 lea -0x78(%ebp),%edi 10c826: eb 09 jmp 10c831 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 10c828: 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 ; 10c829: 39 1d 8c 84 12 00 cmp %ebx,0x12848c 10c82f: 72 67 jb 10c898 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 10c831: 83 ec 08 sub $0x8,%esp 10c834: 57 push %edi 10c835: 53 push %ebx 10c836: e8 59 54 00 00 call 111c94 if ( status != RTEMS_SUCCESSFUL ) 10c83b: 83 c4 10 add $0x10,%esp 10c83e: 85 c0 test %eax,%eax 10c840: 75 e6 jne 10c828 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 10c842: 83 ec 08 sub $0x8,%esp 10c845: 8d 45 c0 lea -0x40(%ebp),%eax 10c848: 50 push %eax 10c849: 53 push %ebx 10c84a: e8 f1 54 00 00 call 111d40 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 10c84f: 83 c4 0c add $0xc,%esp 10c852: 8d 55 e3 lea -0x1d(%ebp),%edx 10c855: 52 push %edx 10c856: 6a 05 push $0x5 10c858: ff 75 c0 pushl -0x40(%ebp) 10c85b: e8 b4 02 00 00 call 10cb14 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 10c860: 59 pop %ecx 10c861: 58 pop %eax 10c862: ff 75 8c pushl -0x74(%ebp) 10c865: ff 75 88 pushl -0x78(%ebp) 10c868: 8d 45 e3 lea -0x1d(%ebp),%eax 10c86b: 50 push %eax 10c86c: 53 push %ebx 10c86d: 68 ae 1f 12 00 push $0x121fae 10c872: 56 push %esi 10c873: ff 55 0c call *0xc(%ebp) ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 10c876: 8b 45 88 mov -0x78(%ebp),%eax 10c879: 83 c4 20 add $0x20,%esp 10c87c: 85 c0 test %eax,%eax 10c87e: 75 20 jne 10c8a0 (*print)( context, "\n" ); 10c880: 83 ec 08 sub $0x8,%esp 10c883: 68 b1 00 12 00 push $0x1200b1 10c888: 56 push %esi 10c889: ff 55 0c call *0xc(%ebp) continue; 10c88c: 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++ ) { 10c88f: 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 ; 10c890: 39 1d 8c 84 12 00 cmp %ebx,0x12848c 10c896: 73 99 jae 10c831 <== ALWAYS TAKEN the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 10c898: 8d 65 f4 lea -0xc(%ebp),%esp 10c89b: 5b pop %ebx 10c89c: 5e pop %esi 10c89d: 5f pop %edi 10c89e: c9 leave 10c89f: 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 ); 10c8a0: 52 push %edx 10c8a1: 8d 55 d8 lea -0x28(%ebp),%edx 10c8a4: 52 push %edx 10c8a5: 50 push %eax 10c8a6: 8d 45 a0 lea -0x60(%ebp),%eax 10c8a9: 50 push %eax 10c8aa: e8 ed 33 00 00 call 10fc9c <_Timespec_Divide_by_integer> (*print)( context, 10c8af: b9 d3 4d 62 10 mov $0x10624dd3,%ecx 10c8b4: 8b 45 dc mov -0x24(%ebp),%eax 10c8b7: f7 e9 imul %ecx 10c8b9: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c8bf: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c8c5: c1 f8 06 sar $0x6,%eax 10c8c8: 8b 55 dc mov -0x24(%ebp),%edx 10c8cb: c1 fa 1f sar $0x1f,%edx 10c8ce: 29 d0 sub %edx,%eax 10c8d0: 50 push %eax 10c8d1: ff 75 d8 pushl -0x28(%ebp) 10c8d4: 8b 45 9c mov -0x64(%ebp),%eax 10c8d7: f7 e9 imul %ecx 10c8d9: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c8df: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c8e5: c1 f8 06 sar $0x6,%eax 10c8e8: 8b 55 9c mov -0x64(%ebp),%edx 10c8eb: c1 fa 1f sar $0x1f,%edx 10c8ee: 29 d0 sub %edx,%eax 10c8f0: 50 push %eax 10c8f1: ff 75 98 pushl -0x68(%ebp) 10c8f4: 8b 45 94 mov -0x6c(%ebp),%eax 10c8f7: f7 e9 imul %ecx 10c8f9: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) 10c8ff: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c905: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c90b: c1 f8 06 sar $0x6,%eax 10c90e: 8b 55 94 mov -0x6c(%ebp),%edx 10c911: c1 fa 1f sar $0x1f,%edx 10c914: 29 d0 sub %edx,%eax 10c916: 50 push %eax 10c917: ff 75 90 pushl -0x70(%ebp) 10c91a: 68 a8 20 12 00 push $0x1220a8 10c91f: 56 push %esi 10c920: 89 4d 84 mov %ecx,-0x7c(%ebp) 10c923: ff 55 0c call *0xc(%ebp) struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 10c926: 83 c4 2c add $0x2c,%esp 10c929: 8d 55 d8 lea -0x28(%ebp),%edx 10c92c: 52 push %edx 10c92d: ff 75 88 pushl -0x78(%ebp) 10c930: 8d 45 b8 lea -0x48(%ebp),%eax 10c933: 50 push %eax 10c934: e8 63 33 00 00 call 10fc9c <_Timespec_Divide_by_integer> (*print)( context, 10c939: 8b 4d 84 mov -0x7c(%ebp),%ecx 10c93c: 8b 45 dc mov -0x24(%ebp),%eax 10c93f: f7 e9 imul %ecx 10c941: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c947: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c94d: c1 f8 06 sar $0x6,%eax 10c950: 8b 55 dc mov -0x24(%ebp),%edx 10c953: c1 fa 1f sar $0x1f,%edx 10c956: 29 d0 sub %edx,%eax 10c958: 50 push %eax 10c959: ff 75 d8 pushl -0x28(%ebp) 10c95c: 8b 45 b4 mov -0x4c(%ebp),%eax 10c95f: f7 e9 imul %ecx 10c961: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c967: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c96d: c1 f8 06 sar $0x6,%eax 10c970: 8b 55 b4 mov -0x4c(%ebp),%edx 10c973: c1 fa 1f sar $0x1f,%edx 10c976: 29 d0 sub %edx,%eax 10c978: 50 push %eax 10c979: ff 75 b0 pushl -0x50(%ebp) 10c97c: 8b 45 ac mov -0x54(%ebp),%eax 10c97f: f7 e9 imul %ecx 10c981: 89 85 70 ff ff ff mov %eax,-0x90(%ebp) 10c987: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp) 10c98d: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax 10c993: c1 f8 06 sar $0x6,%eax 10c996: 8b 55 ac mov -0x54(%ebp),%edx 10c999: c1 fa 1f sar $0x1f,%edx 10c99c: 29 d0 sub %edx,%eax 10c99e: 50 push %eax 10c99f: ff 75 a8 pushl -0x58(%ebp) 10c9a2: 68 c8 20 12 00 push $0x1220c8 10c9a7: 56 push %esi 10c9a8: ff 55 0c call *0xc(%ebp) 10c9ab: 83 c4 30 add $0x30,%esp 10c9ae: e9 75 fe ff ff jmp 10c828 =============================================================================== 0010c9cc : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 10c9cc: 55 push %ebp 10c9cd: 89 e5 mov %esp,%ebp 10c9cf: 53 push %ebx 10c9d0: 83 ec 04 sub $0x4,%esp 10c9d3: a1 74 85 12 00 mov 0x128574,%eax 10c9d8: 40 inc %eax 10c9d9: a3 74 85 12 00 mov %eax,0x128574 /* * 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 ; 10c9de: 8b 1d 88 84 12 00 mov 0x128488,%ebx 10c9e4: 3b 1d 8c 84 12 00 cmp 0x12848c,%ebx 10c9ea: 77 15 ja 10ca01 <== NEVER TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 10c9ec: 83 ec 0c sub $0xc,%esp 10c9ef: 53 push %ebx 10c9f0: e8 17 00 00 00 call 10ca0c * 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++ ) { 10c9f5: 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 ; 10c9f6: 83 c4 10 add $0x10,%esp 10c9f9: 39 1d 8c 84 12 00 cmp %ebx,0x12848c 10c9ff: 73 eb jae 10c9ec /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 10ca01: 8b 5d fc mov -0x4(%ebp),%ebx 10ca04: c9 leave } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 10ca05: e9 72 25 00 00 jmp 10ef7c <_Thread_Enable_dispatch> =============================================================================== 0010ca0c : */ rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id ) { 10ca0c: 55 push %ebp 10ca0d: 89 e5 mov %esp,%ebp 10ca0f: 57 push %edi 10ca10: 53 push %ebx 10ca11: 83 ec 14 sub $0x14,%esp Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); 10ca14: 8d 45 f4 lea -0xc(%ebp),%eax 10ca17: 50 push %eax 10ca18: ff 75 08 pushl 0x8(%ebp) 10ca1b: 68 80 84 12 00 push $0x128480 10ca20: e8 f3 1c 00 00 call 10e718 <_Objects_Get> 10ca25: 89 c2 mov %eax,%edx switch ( location ) { 10ca27: 83 c4 10 add $0x10,%esp 10ca2a: 8b 45 f4 mov -0xc(%ebp),%eax 10ca2d: 85 c0 test %eax,%eax 10ca2f: 75 3b jne 10ca6c case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 10ca31: 8d 5a 54 lea 0x54(%edx),%ebx 10ca34: b9 38 00 00 00 mov $0x38,%ecx 10ca39: 31 c0 xor %eax,%eax 10ca3b: 89 df mov %ebx,%edi 10ca3d: f3 aa rep stos %al,%es:(%edi) 10ca3f: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10ca46: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10ca4d: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10ca54: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) _Thread_Enable_dispatch(); 10ca5b: e8 1c 25 00 00 call 10ef7c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ca60: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ca62: 8d 65 f8 lea -0x8(%ebp),%esp 10ca65: 5b pop %ebx 10ca66: 5f pop %edi 10ca67: c9 leave 10ca68: c3 ret 10ca69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10ca6c: b8 04 00 00 00 mov $0x4,%eax } 10ca71: 8d 65 f8 lea -0x8(%ebp),%esp 10ca74: 5b pop %ebx 10ca75: 5f pop %edi 10ca76: c9 leave 10ca77: c3 ret =============================================================================== 00117228 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 117228: 55 push %ebp 117229: 89 e5 mov %esp,%ebp 11722b: 57 push %edi 11722c: 56 push %esi 11722d: 53 push %ebx 11722e: 83 ec 1c sub $0x1c,%esp 117231: 8b 7d 08 mov 0x8(%ebp),%edi 117234: 8b 75 0c mov 0xc(%ebp),%esi rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 117237: 85 ff test %edi,%edi 117239: 0f 84 c1 00 00 00 je 117300 return RTEMS_INVALID_NAME; if ( !starting_address ) 11723f: 85 f6 test %esi,%esi 117241: 0f 84 e1 00 00 00 je 117328 return RTEMS_INVALID_ADDRESS; if ( !id ) 117247: 8b 45 1c mov 0x1c(%ebp),%eax 11724a: 85 c0 test %eax,%eax 11724c: 0f 84 d6 00 00 00 je 117328 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 117252: 83 ec 0c sub $0xc,%esp 117255: ff 35 44 0a 14 00 pushl 0x140a44 11725b: e8 b0 24 00 00 call 119710 <_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 ); 117260: c7 04 24 a0 08 14 00 movl $0x1408a0,(%esp) 117267: e8 e8 39 00 00 call 11ac54 <_Objects_Allocate> 11726c: 89 c3 mov %eax,%ebx the_region = _Region_Allocate(); if ( !the_region ) 11726e: 83 c4 10 add $0x10,%esp 117271: 85 c0 test %eax,%eax 117273: 0f 84 bf 00 00 00 je 117338 return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 117279: ff 75 14 pushl 0x14(%ebp) 11727c: ff 75 10 pushl 0x10(%ebp) 11727f: 56 push %esi 117280: 8d 40 68 lea 0x68(%eax),%eax 117283: 50 push %eax 117284: e8 d7 35 00 00 call 11a860 <_Heap_Initialize> 117289: 89 43 5c mov %eax,0x5c(%ebx) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 11728c: 83 c4 10 add $0x10,%esp 11728f: 85 c0 test %eax,%eax 117291: 74 7d je 117310 return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 117293: 89 73 50 mov %esi,0x50(%ebx) the_region->length = length; 117296: 8b 45 10 mov 0x10(%ebp),%eax 117299: 89 43 54 mov %eax,0x54(%ebx) the_region->page_size = page_size; 11729c: 8b 55 14 mov 0x14(%ebp),%edx 11729f: 89 53 58 mov %edx,0x58(%ebx) the_region->attribute_set = attribute_set; 1172a2: 8b 45 18 mov 0x18(%ebp),%eax 1172a5: 89 43 60 mov %eax,0x60(%ebx) the_region->number_of_used_blocks = 0; 1172a8: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) _Thread_queue_Initialize( 1172af: 6a 06 push $0x6 1172b1: 6a 40 push $0x40 1172b3: a8 04 test $0x4,%al 1172b5: 0f 95 c0 setne %al 1172b8: 0f b6 c0 movzbl %al,%eax 1172bb: 50 push %eax 1172bc: 8d 43 10 lea 0x10(%ebx),%eax 1172bf: 50 push %eax 1172c0: e8 33 4e 00 00 call 11c0f8 <_Thread_queue_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 1172c5: 8b 43 08 mov 0x8(%ebx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 1172c8: 0f b7 c8 movzwl %ax,%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1172cb: 8b 15 bc 08 14 00 mov 0x1408bc,%edx 1172d1: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1172d4: 89 7b 0c mov %edi,0xc(%ebx) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 1172d7: 8b 55 1c mov 0x1c(%ebp),%edx 1172da: 89 02 mov %eax,(%edx) 1172dc: 83 c4 10 add $0x10,%esp return_status = RTEMS_SUCCESSFUL; 1172df: 31 c0 xor %eax,%eax } } _RTEMS_Unlock_allocator(); 1172e1: 83 ec 0c sub $0xc,%esp 1172e4: ff 35 44 0a 14 00 pushl 0x140a44 1172ea: 89 45 e4 mov %eax,-0x1c(%ebp) 1172ed: e8 66 24 00 00 call 119758 <_API_Mutex_Unlock> return return_status; 1172f2: 83 c4 10 add $0x10,%esp 1172f5: 8b 45 e4 mov -0x1c(%ebp),%eax } 1172f8: 8d 65 f4 lea -0xc(%ebp),%esp 1172fb: 5b pop %ebx 1172fc: 5e pop %esi 1172fd: 5f pop %edi 1172fe: c9 leave 1172ff: c3 ret { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 117300: b8 03 00 00 00 mov $0x3,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 117305: 8d 65 f4 lea -0xc(%ebp),%esp 117308: 5b pop %ebx 117309: 5e pop %esi 11730a: 5f pop %edi 11730b: c9 leave 11730c: c3 ret 11730d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 117310: 83 ec 08 sub $0x8,%esp 117313: 53 push %ebx 117314: 68 a0 08 14 00 push $0x1408a0 117319: e8 ae 3c 00 00 call 11afcc <_Objects_Free> 11731e: 83 c4 10 add $0x10,%esp &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { _Region_Free( the_region ); return_status = RTEMS_INVALID_SIZE; 117321: b8 08 00 00 00 mov $0x8,%eax 117326: eb b9 jmp 1172e1 if ( !starting_address ) return RTEMS_INVALID_ADDRESS; if ( !id ) return RTEMS_INVALID_ADDRESS; 117328: b8 09 00 00 00 mov $0x9,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 11732d: 8d 65 f4 lea -0xc(%ebp),%esp 117330: 5b pop %ebx 117331: 5e pop %esi 117332: 5f pop %edi 117333: c9 leave 117334: c3 ret 117335: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region ) return_status = RTEMS_TOO_MANY; 117338: b8 05 00 00 00 mov $0x5,%eax 11733d: eb a2 jmp 1172e1 =============================================================================== 00117340 : */ rtems_status_code rtems_region_delete( rtems_id id ) { 117340: 55 push %ebp 117341: 89 e5 mov %esp,%ebp 117343: 53 push %ebx 117344: 83 ec 30 sub $0x30,%esp Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 117347: ff 35 44 0a 14 00 pushl 0x140a44 11734d: e8 be 23 00 00 call 119710 <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 117352: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 117355: 8d 45 f4 lea -0xc(%ebp),%eax 117358: 50 push %eax 117359: ff 75 08 pushl 0x8(%ebp) 11735c: 68 a0 08 14 00 push $0x1408a0 117361: e8 a6 3d 00 00 call 11b10c <_Objects_Get_no_protection> switch ( location ) { 117366: 83 c4 10 add $0x10,%esp 117369: 8b 5d f4 mov -0xc(%ebp),%ebx 11736c: 85 db test %ebx,%ebx 11736e: 74 1c je 11738c break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 117370: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 117375: 83 ec 0c sub $0xc,%esp 117378: ff 35 44 0a 14 00 pushl 0x140a44 11737e: e8 d5 23 00 00 call 119758 <_API_Mutex_Unlock> return return_status; } 117383: 89 d8 mov %ebx,%eax 117385: 8b 5d fc mov -0x4(%ebp),%ebx 117388: c9 leave 117389: c3 ret 11738a: 66 90 xchg %ax,%ax <== NOT EXECUTED 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 ) 11738c: 8b 48 64 mov 0x64(%eax),%ecx 11738f: 85 c9 test %ecx,%ecx 117391: 74 09 je 11739c return_status = RTEMS_RESOURCE_IN_USE; 117393: bb 0c 00 00 00 mov $0xc,%ebx 117398: eb db jmp 117375 11739a: 66 90 xchg %ax,%ax <== NOT EXECUTED else { _Objects_Close( &_Region_Information, &the_region->Object ); 11739c: 83 ec 08 sub $0x8,%esp 11739f: 50 push %eax 1173a0: 68 a0 08 14 00 push $0x1408a0 1173a5: 89 45 e4 mov %eax,-0x1c(%ebp) 1173a8: e8 23 39 00 00 call 11acd0 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 1173ad: 58 pop %eax 1173ae: 5a pop %edx 1173af: 8b 45 e4 mov -0x1c(%ebp),%eax 1173b2: 50 push %eax 1173b3: 68 a0 08 14 00 push $0x1408a0 1173b8: e8 0f 3c 00 00 call 11afcc <_Objects_Free> 1173bd: 83 c4 10 add $0x10,%esp _Region_Free( the_region ); return_status = RTEMS_SUCCESSFUL; 1173c0: 31 db xor %ebx,%ebx 1173c2: eb b1 jmp 117375 =============================================================================== 001173c4 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 1173c4: 55 push %ebp 1173c5: 89 e5 mov %esp,%ebp 1173c7: 56 push %esi 1173c8: 53 push %ebx 1173c9: 83 ec 10 sub $0x10,%esp 1173cc: 8b 5d 0c mov 0xc(%ebp),%ebx bool extend_ok; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 1173cf: 85 db test %ebx,%ebx 1173d1: 74 75 je 117448 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 1173d3: 83 ec 0c sub $0xc,%esp 1173d6: ff 35 44 0a 14 00 pushl 0x140a44 1173dc: e8 2f 23 00 00 call 119710 <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 1173e1: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1173e4: 8d 45 f0 lea -0x10(%ebp),%eax 1173e7: 50 push %eax 1173e8: ff 75 08 pushl 0x8(%ebp) 1173eb: 68 a0 08 14 00 push $0x1408a0 1173f0: e8 17 3d 00 00 call 11b10c <_Objects_Get_no_protection> 1173f5: 89 c6 mov %eax,%esi switch ( location ) { 1173f7: 83 c4 10 add $0x10,%esp 1173fa: 8b 45 f0 mov -0x10(%ebp),%eax 1173fd: 85 c0 test %eax,%eax 1173ff: 74 1f je 117420 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 117401: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 117406: 83 ec 0c sub $0xc,%esp 117409: ff 35 44 0a 14 00 pushl 0x140a44 11740f: e8 44 23 00 00 call 119758 <_API_Mutex_Unlock> return return_status; 117414: 83 c4 10 add $0x10,%esp } 117417: 89 d8 mov %ebx,%eax 117419: 8d 65 f8 lea -0x8(%ebp),%esp 11741c: 5b pop %ebx 11741d: 5e pop %esi 11741e: c9 leave 11741f: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: extend_ok = _Heap_Extend( 117420: 8d 45 f4 lea -0xc(%ebp),%eax 117423: 50 push %eax 117424: ff 75 10 pushl 0x10(%ebp) 117427: 53 push %ebx 117428: 8d 46 68 lea 0x68(%esi),%eax 11742b: 50 push %eax 11742c: e8 3b 2e 00 00 call 11a26c <_Heap_Extend> starting_address, length, &amount_extended ); if ( extend_ok ) { 117431: 83 c4 10 add $0x10,%esp 117434: 84 c0 test %al,%al 117436: 74 20 je 117458 the_region->length += amount_extended; 117438: 8b 45 f4 mov -0xc(%ebp),%eax 11743b: 01 46 54 add %eax,0x54(%esi) the_region->maximum_segment_size += amount_extended; 11743e: 01 46 5c add %eax,0x5c(%esi) return_status = RTEMS_SUCCESSFUL; 117441: 31 db xor %ebx,%ebx 117443: eb c1 jmp 117406 117445: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) return RTEMS_INVALID_ADDRESS; 117448: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 11744d: 89 d8 mov %ebx,%eax 11744f: 8d 65 f8 lea -0x8(%ebp),%esp 117452: 5b pop %ebx 117453: 5e pop %esi 117454: c9 leave 117455: c3 ret 117456: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( extend_ok ) { the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else { return_status = RTEMS_INVALID_ADDRESS; 117458: bb 09 00 00 00 mov $0x9,%ebx 11745d: eb a7 jmp 117406 =============================================================================== 00117460 : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { 117460: 55 push %ebp 117461: 89 e5 mov %esp,%ebp 117463: 53 push %ebx 117464: 83 ec 14 sub $0x14,%esp 117467: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 11746a: 85 db test %ebx,%ebx 11746c: 74 76 je 1174e4 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 11746e: 83 ec 0c sub $0xc,%esp 117471: ff 35 44 0a 14 00 pushl 0x140a44 117477: e8 94 22 00 00 call 119710 <_API_Mutex_Lock> 11747c: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 11747f: 8d 45 f4 lea -0xc(%ebp),%eax 117482: 50 push %eax 117483: ff 75 08 pushl 0x8(%ebp) 117486: 68 a0 08 14 00 push $0x1408a0 11748b: e8 7c 3c 00 00 call 11b10c <_Objects_Get_no_protection> switch ( location ) { 117490: 83 c4 10 add $0x10,%esp 117493: 8b 55 f4 mov -0xc(%ebp),%edx 117496: 85 d2 test %edx,%edx 117498: 74 1e je 1174b8 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 11749a: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 11749f: 83 ec 0c sub $0xc,%esp 1174a2: ff 35 44 0a 14 00 pushl 0x140a44 1174a8: e8 ab 22 00 00 call 119758 <_API_Mutex_Unlock> return return_status; 1174ad: 83 c4 10 add $0x10,%esp } 1174b0: 89 d8 mov %ebx,%eax 1174b2: 8b 5d fc mov -0x4(%ebp),%ebx 1174b5: c9 leave 1174b6: c3 ret 1174b7: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; 1174b8: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) the_info->Used.total = 0; 1174bf: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) the_info->Used.largest = 0; 1174c6: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 1174cd: 83 ec 08 sub $0x8,%esp 1174d0: 53 push %ebx 1174d1: 83 c0 68 add $0x68,%eax 1174d4: 50 push %eax 1174d5: e8 6e 31 00 00 call 11a648 <_Heap_Get_free_information> return_status = RTEMS_SUCCESSFUL; break; 1174da: 83 c4 10 add $0x10,%esp the_info->Used.total = 0; the_info->Used.largest = 0; _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); return_status = RTEMS_SUCCESSFUL; 1174dd: 31 db xor %ebx,%ebx break; 1174df: eb be jmp 11749f 1174e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) return RTEMS_INVALID_ADDRESS; 1174e4: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 1174e9: 89 d8 mov %ebx,%eax 1174eb: 8b 5d fc mov -0x4(%ebp),%ebx 1174ee: c9 leave 1174ef: c3 ret =============================================================================== 001174f0 : rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { 1174f0: 55 push %ebp 1174f1: 89 e5 mov %esp,%ebp 1174f3: 53 push %ebx 1174f4: 83 ec 14 sub $0x14,%esp 1174f7: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 1174fa: 85 db test %ebx,%ebx 1174fc: 74 5e je 11755c return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 1174fe: 83 ec 0c sub $0xc,%esp 117501: ff 35 44 0a 14 00 pushl 0x140a44 117507: e8 04 22 00 00 call 119710 <_API_Mutex_Lock> 11750c: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 11750f: 8d 45 f4 lea -0xc(%ebp),%eax 117512: 50 push %eax 117513: ff 75 08 pushl 0x8(%ebp) 117516: 68 a0 08 14 00 push $0x1408a0 11751b: e8 ec 3b 00 00 call 11b10c <_Objects_Get_no_protection> switch ( location ) { 117520: 83 c4 10 add $0x10,%esp 117523: 8b 55 f4 mov -0xc(%ebp),%edx 117526: 85 d2 test %edx,%edx 117528: 74 1e je 117548 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 11752a: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 11752f: 83 ec 0c sub $0xc,%esp 117532: ff 35 44 0a 14 00 pushl 0x140a44 117538: e8 1b 22 00 00 call 119758 <_API_Mutex_Unlock> return return_status; 11753d: 83 c4 10 add $0x10,%esp } 117540: 89 d8 mov %ebx,%eax 117542: 8b 5d fc mov -0x4(%ebp),%ebx 117545: c9 leave 117546: c3 ret 117547: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); 117548: 83 ec 08 sub $0x8,%esp 11754b: 53 push %ebx 11754c: 83 c0 68 add $0x68,%eax 11754f: 50 push %eax 117550: e8 53 31 00 00 call 11a6a8 <_Heap_Get_information> return_status = RTEMS_SUCCESSFUL; break; 117555: 83 c4 10 add $0x10,%esp the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); return_status = RTEMS_SUCCESSFUL; 117558: 31 db xor %ebx,%ebx break; 11755a: eb d3 jmp 11752f Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) return RTEMS_INVALID_ADDRESS; 11755c: bb 09 00 00 00 mov $0x9,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 117561: 89 d8 mov %ebx,%eax 117563: 8b 5d fc mov -0x4(%ebp),%ebx 117566: c9 leave 117567: c3 ret =============================================================================== 00117568 : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 117568: 55 push %ebp 117569: 89 e5 mov %esp,%ebp 11756b: 57 push %edi 11756c: 56 push %esi 11756d: 53 push %ebx 11756e: 83 ec 2c sub $0x2c,%esp 117571: 8b 75 0c mov 0xc(%ebp),%esi 117574: 8b 5d 18 mov 0x18(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 117577: 85 db test %ebx,%ebx 117579: 0f 84 a1 00 00 00 je 117620 return RTEMS_INVALID_ADDRESS; *segment = NULL; 11757f: c7 03 00 00 00 00 movl $0x0,(%ebx) if ( size == 0 ) 117585: 85 f6 test %esi,%esi 117587: 75 0f jne 117598 return RTEMS_INVALID_SIZE; 117589: b8 08 00 00 00 mov $0x8,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 11758e: 8d 65 f4 lea -0xc(%ebp),%esp 117591: 5b pop %ebx 117592: 5e pop %esi 117593: 5f pop %edi 117594: c9 leave 117595: c3 ret 117596: 66 90 xchg %ax,%ax <== NOT EXECUTED *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 117598: 83 ec 0c sub $0xc,%esp 11759b: ff 35 44 0a 14 00 pushl 0x140a44 1175a1: e8 6a 21 00 00 call 119710 <_API_Mutex_Lock> executing = _Thread_Executing; 1175a6: a1 38 0c 14 00 mov 0x140c38,%eax 1175ab: 89 45 d4 mov %eax,-0x2c(%ebp) 1175ae: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1175b1: 8d 45 e4 lea -0x1c(%ebp),%eax 1175b4: 50 push %eax 1175b5: ff 75 08 pushl 0x8(%ebp) 1175b8: 68 a0 08 14 00 push $0x1408a0 1175bd: e8 4a 3b 00 00 call 11b10c <_Objects_Get_no_protection> 1175c2: 89 c7 mov %eax,%edi switch ( location ) { 1175c4: 83 c4 10 add $0x10,%esp 1175c7: 8b 45 e4 mov -0x1c(%ebp),%eax 1175ca: 85 c0 test %eax,%eax 1175cc: 75 2a jne 1175f8 case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 1175ce: 3b 77 5c cmp 0x5c(%edi),%esi 1175d1: 76 2d jbe 117600 return_status = RTEMS_INVALID_SIZE; 1175d3: b8 08 00 00 00 mov $0x8,%eax default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1175d8: 83 ec 0c sub $0xc,%esp 1175db: ff 35 44 0a 14 00 pushl 0x140a44 1175e1: 89 45 d0 mov %eax,-0x30(%ebp) 1175e4: e8 6f 21 00 00 call 119758 <_API_Mutex_Unlock> return return_status; 1175e9: 83 c4 10 add $0x10,%esp 1175ec: 8b 45 d0 mov -0x30(%ebp),%eax } 1175ef: 8d 65 f4 lea -0xc(%ebp),%esp 1175f2: 5b pop %ebx 1175f3: 5e pop %esi 1175f4: 5f pop %edi 1175f5: c9 leave 1175f6: c3 ret 1175f7: 90 nop <== NOT EXECUTED break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 1175f8: b8 04 00 00 00 mov $0x4,%eax 1175fd: eb d9 jmp 1175d8 1175ff: 90 nop <== NOT EXECUTED * @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 ); 117600: 6a 00 push $0x0 117602: 6a 00 push $0x0 117604: 56 push %esi RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uintptr_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 117605: 8d 47 68 lea 0x68(%edi),%eax 117608: 50 push %eax 117609: e8 8a 2a 00 00 call 11a098 <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 11760e: 83 c4 10 add $0x10,%esp 117611: 85 c0 test %eax,%eax 117613: 74 17 je 11762c the_region->number_of_used_blocks += 1; 117615: ff 47 64 incl 0x64(%edi) *segment = the_segment; 117618: 89 03 mov %eax,(%ebx) return_status = RTEMS_SUCCESSFUL; 11761a: 31 c0 xor %eax,%eax 11761c: eb ba jmp 1175d8 11761e: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) return RTEMS_INVALID_ADDRESS; 117620: b8 09 00 00 00 mov $0x9,%eax 117625: e9 64 ff ff ff jmp 11758e 11762a: 66 90 xchg %ax,%ax <== NOT EXECUTED 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 ) ) { 11762c: f6 45 10 01 testb $0x1,0x10(%ebp) 117630: 74 07 je 117639 return_status = RTEMS_UNSATISFIED; 117632: b8 0d 00 00 00 mov $0xd,%eax 117637: eb 9f jmp 1175d8 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 117639: a1 94 09 14 00 mov 0x140994,%eax 11763e: 40 inc %eax 11763f: a3 94 09 14 00 mov %eax,0x140994 * 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(); 117644: 83 ec 0c sub $0xc,%esp 117647: ff 35 44 0a 14 00 pushl 0x140a44 11764d: e8 06 21 00 00 call 119758 <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 117652: 8d 47 10 lea 0x10(%edi),%eax 117655: 8b 55 d4 mov -0x2c(%ebp),%edx 117658: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 11765b: 8b 4d 08 mov 0x8(%ebp),%ecx 11765e: 89 4a 20 mov %ecx,0x20(%edx) executing->Wait.count = size; 117661: 89 72 24 mov %esi,0x24(%edx) executing->Wait.return_argument = segment; 117664: 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; 117667: 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 ); 11766e: 83 c4 0c add $0xc,%esp 117671: 68 bc c1 11 00 push $0x11c1bc 117676: ff 75 14 pushl 0x14(%ebp) 117679: 50 push %eax 11767a: e8 ed 47 00 00 call 11be6c <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 11767f: e8 28 43 00 00 call 11b9ac <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 117684: 8b 55 d4 mov -0x2c(%ebp),%edx 117687: 8b 42 34 mov 0x34(%edx),%eax 11768a: 83 c4 10 add $0x10,%esp 11768d: e9 fc fe ff ff jmp 11758e =============================================================================== 00117694 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 117694: 55 push %ebp 117695: 89 e5 mov %esp,%ebp 117697: 56 push %esi 117698: 53 push %ebx 117699: 83 ec 20 sub $0x20,%esp 11769c: 8b 5d 0c mov 0xc(%ebp),%ebx 11769f: 8b 75 10 mov 0x10(%ebp),%esi Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 1176a2: 85 db test %ebx,%ebx 1176a4: 74 72 je 117718 return RTEMS_INVALID_ADDRESS; if ( !size ) 1176a6: 85 f6 test %esi,%esi 1176a8: 74 6e je 117718 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 1176aa: 83 ec 0c sub $0xc,%esp 1176ad: ff 35 44 0a 14 00 pushl 0x140a44 1176b3: e8 58 20 00 00 call 119710 <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 1176b8: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 1176bb: 8d 45 f4 lea -0xc(%ebp),%eax 1176be: 50 push %eax 1176bf: ff 75 08 pushl 0x8(%ebp) 1176c2: 68 a0 08 14 00 push $0x1408a0 1176c7: e8 40 3a 00 00 call 11b10c <_Objects_Get_no_protection> switch ( location ) { 1176cc: 83 c4 10 add $0x10,%esp 1176cf: 8b 55 f4 mov -0xc(%ebp),%edx 1176d2: 85 d2 test %edx,%edx 1176d4: 74 2a je 117700 void *segment, uintptr_t *size ) { Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; 1176d6: 31 c0 xor %eax,%eax 1176d8: 83 fa 01 cmp $0x1,%edx 1176db: 0f 94 c0 sete %al 1176de: c1 e0 02 shl $0x2,%eax case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1176e1: 83 ec 0c sub $0xc,%esp 1176e4: ff 35 44 0a 14 00 pushl 0x140a44 1176ea: 89 45 e4 mov %eax,-0x1c(%ebp) 1176ed: e8 66 20 00 00 call 119758 <_API_Mutex_Unlock> return return_status; 1176f2: 83 c4 10 add $0x10,%esp 1176f5: 8b 45 e4 mov -0x1c(%ebp),%eax } 1176f8: 8d 65 f8 lea -0x8(%ebp),%esp 1176fb: 5b pop %ebx 1176fc: 5e pop %esi 1176fd: c9 leave 1176fe: c3 ret 1176ff: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 117700: 52 push %edx 117701: 56 push %esi 117702: 53 push %ebx 117703: 83 c0 68 add $0x68,%eax 117706: 50 push %eax 117707: e8 64 34 00 00 call 11ab70 <_Heap_Size_of_alloc_area> 11770c: 83 c4 10 add $0x10,%esp void *segment, uintptr_t *size ) { Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; 11770f: 3c 01 cmp $0x1,%al 117711: 19 c0 sbb %eax,%eax 117713: 83 e0 09 and $0x9,%eax 117716: eb c9 jmp 1176e1 if ( !segment ) return RTEMS_INVALID_ADDRESS; if ( !size ) return RTEMS_INVALID_ADDRESS; 117718: b8 09 00 00 00 mov $0x9,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 11771d: 8d 65 f8 lea -0x8(%ebp),%esp 117720: 5b pop %ebx 117721: 5e pop %esi 117722: c9 leave 117723: c3 ret =============================================================================== 00117748 : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 117748: 55 push %ebp 117749: 89 e5 mov %esp,%ebp 11774b: 56 push %esi 11774c: 53 push %ebx 11774d: 83 ec 20 sub $0x20,%esp 117750: 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 ) 117753: 85 db test %ebx,%ebx 117755: 0f 84 89 00 00 00 je 1177e4 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 11775b: 83 ec 0c sub $0xc,%esp 11775e: ff 35 44 0a 14 00 pushl 0x140a44 117764: e8 a7 1f 00 00 call 119710 <_API_Mutex_Lock> 117769: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 11776c: 8d 45 f0 lea -0x10(%ebp),%eax 11776f: 50 push %eax 117770: ff 75 08 pushl 0x8(%ebp) 117773: 68 a0 08 14 00 push $0x1408a0 117778: e8 8f 39 00 00 call 11b10c <_Objects_Get_no_protection> 11777d: 89 c6 mov %eax,%esi switch ( location ) { 11777f: 83 c4 10 add $0x10,%esp 117782: 8b 45 f0 mov -0x10(%ebp),%eax 117785: 85 c0 test %eax,%eax 117787: 74 1f je 1177a8 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117789: 83 ec 0c sub $0xc,%esp 11778c: ff 35 44 0a 14 00 pushl 0x140a44 117792: e8 c1 1f 00 00 call 119758 <_API_Mutex_Unlock> return return_status; 117797: 83 c4 10 add $0x10,%esp 11779a: b8 04 00 00 00 mov $0x4,%eax } 11779f: 8d 65 f8 lea -0x8(%ebp),%esp 1177a2: 5b pop %ebx 1177a3: 5e pop %esi 1177a4: c9 leave 1177a5: c3 ret 1177a6: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 1177a8: 83 ec 0c sub $0xc,%esp 1177ab: 8d 45 f4 lea -0xc(%ebp),%eax 1177ae: 50 push %eax 1177af: 8d 45 ec lea -0x14(%ebp),%eax 1177b2: 50 push %eax 1177b3: ff 75 10 pushl 0x10(%ebp) 1177b6: ff 75 0c pushl 0xc(%ebp) 1177b9: 8d 46 68 lea 0x68(%esi),%eax 1177bc: 50 push %eax 1177bd: e8 a6 32 00 00 call 11aa68 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 1177c2: 8b 55 ec mov -0x14(%ebp),%edx 1177c5: 89 13 mov %edx,(%ebx) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 1177c7: 83 c4 20 add $0x20,%esp 1177ca: 85 c0 test %eax,%eax 1177cc: 75 22 jne 1177f0 _Region_Process_queue( the_region ); /* unlocks allocator */ 1177ce: 83 ec 0c sub $0xc,%esp 1177d1: 56 push %esi 1177d2: e8 19 71 00 00 call 11e8f0 <_Region_Process_queue> 1177d7: 83 c4 10 add $0x10,%esp else _RTEMS_Unlock_allocator(); if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; 1177da: 31 c0 xor %eax,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 1177dc: 8d 65 f8 lea -0x8(%ebp),%esp 1177df: 5b pop %ebx 1177e0: 5e pop %esi 1177e1: c9 leave 1177e2: c3 ret 1177e3: 90 nop <== NOT EXECUTED rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) return RTEMS_INVALID_ADDRESS; 1177e4: b8 09 00 00 00 mov $0x9,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 1177e9: 8d 65 f8 lea -0x8(%ebp),%esp 1177ec: 5b pop %ebx 1177ed: 5e pop %esi 1177ee: c9 leave 1177ef: c3 ret _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 1177f0: 83 ec 0c sub $0xc,%esp 1177f3: ff 35 44 0a 14 00 pushl 0x140a44 1177f9: 89 45 e4 mov %eax,-0x1c(%ebp) 1177fc: e8 57 1f 00 00 call 119758 <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 117801: 83 c4 10 add $0x10,%esp return RTEMS_UNSATISFIED; 117804: 8b 45 e4 mov -0x1c(%ebp),%eax 117807: 48 dec %eax 117808: 0f 94 c0 sete %al 11780b: 0f b6 c0 movzbl %al,%eax 11780e: 8d 04 85 09 00 00 00 lea 0x9(,%eax,4),%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117815: 8d 65 f8 lea -0x8(%ebp),%esp 117818: 5b pop %ebx 117819: 5e pop %esi 11781a: c9 leave 11781b: c3 ret =============================================================================== 0011781c : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 11781c: 55 push %ebp 11781d: 89 e5 mov %esp,%ebp 11781f: 53 push %ebx 117820: 83 ec 20 sub $0x20,%esp uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 117823: ff 35 44 0a 14 00 pushl 0x140a44 117829: e8 e2 1e 00 00 call 119710 <_API_Mutex_Lock> 11782e: 83 c4 0c add $0xc,%esp the_region = _Region_Get( id, &location ); 117831: 8d 45 f4 lea -0xc(%ebp),%eax 117834: 50 push %eax 117835: ff 75 08 pushl 0x8(%ebp) 117838: 68 a0 08 14 00 push $0x1408a0 11783d: e8 ca 38 00 00 call 11b10c <_Objects_Get_no_protection> 117842: 89 c3 mov %eax,%ebx switch ( location ) { 117844: 83 c4 10 add $0x10,%esp 117847: 8b 45 f4 mov -0xc(%ebp),%eax 11784a: 85 c0 test %eax,%eax 11784c: 75 1e jne 11786c RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 11784e: 83 ec 08 sub $0x8,%esp 117851: ff 75 0c pushl 0xc(%ebp) 117854: 8d 43 68 lea 0x68(%ebx),%eax 117857: 50 push %eax 117858: e8 9b 2c 00 00 call 11a4f8 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 11785d: 83 c4 10 add $0x10,%esp 117860: 84 c0 test %al,%al 117862: 75 28 jne 11788c return_status = RTEMS_INVALID_ADDRESS; 117864: bb 09 00 00 00 mov $0x9,%ebx 117869: eb 06 jmp 117871 11786b: 90 nop <== NOT EXECUTED break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 11786c: bb 04 00 00 00 mov $0x4,%ebx break; } _RTEMS_Unlock_allocator(); 117871: 83 ec 0c sub $0xc,%esp 117874: ff 35 44 0a 14 00 pushl 0x140a44 11787a: e8 d9 1e 00 00 call 119758 <_API_Mutex_Unlock> return return_status; 11787f: 83 c4 10 add $0x10,%esp } 117882: 89 d8 mov %ebx,%eax 117884: 8b 5d fc mov -0x4(%ebp),%ebx 117887: c9 leave 117888: c3 ret 117889: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Region_Debug_Walk( the_region, 4 ); if ( !status ) return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; 11788c: ff 4b 64 decl 0x64(%ebx) _Region_Process_queue(the_region); /* unlocks allocator */ 11788f: 83 ec 0c sub $0xc,%esp 117892: 53 push %ebx 117893: e8 58 70 00 00 call 11e8f0 <_Region_Process_queue> return RTEMS_SUCCESSFUL; 117898: 83 c4 10 add $0x10,%esp 11789b: 31 db xor %ebx,%ebx break; } _RTEMS_Unlock_allocator(); return return_status; } 11789d: 89 d8 mov %ebx,%eax 11789f: 8b 5d fc mov -0x4(%ebp),%ebx 1178a2: c9 leave 1178a3: c3 ret =============================================================================== 0010b414 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 10b414: 55 push %ebp 10b415: 89 e5 mov %esp,%ebp 10b417: 57 push %edi 10b418: 56 push %esi 10b419: 53 push %ebx 10b41a: 83 ec 3c sub $0x3c,%esp 10b41d: 8b 75 08 mov 0x8(%ebp),%esi 10b420: 8b 5d 10 mov 0x10(%ebp),%ebx 10b423: 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 ) ) 10b426: 85 f6 test %esi,%esi 10b428: 74 4a je 10b474 return RTEMS_INVALID_NAME; if ( !id ) 10b42a: 85 ff test %edi,%edi 10b42c: 0f 84 f6 00 00 00 je 10b528 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 10b432: 89 da mov %ebx,%edx 10b434: 81 e2 c0 00 00 00 and $0xc0,%edx 10b43a: 74 48 je 10b484 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); 10b43c: 89 d8 mov %ebx,%eax 10b43e: 83 e0 30 and $0x30,%eax _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10b441: 83 f8 10 cmp $0x10,%eax 10b444: 74 0e je 10b454 } if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; 10b446: b8 0b 00 00 00 mov $0xb,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b44b: 8d 65 f4 lea -0xc(%ebp),%esp 10b44e: 5b pop %ebx 10b44f: 5e pop %esi 10b450: 5f pop %edi 10b451: c9 leave 10b452: c3 ret 10b453: 90 nop <== NOT EXECUTED #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10b454: f6 c3 04 test $0x4,%bl 10b457: 74 ed je 10b446 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 10b459: 81 fa c0 00 00 00 cmp $0xc0,%edx 10b45f: 74 e5 je 10b446 10b461: 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 ) ) 10b466: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b46a: 76 1f jbe 10b48b return RTEMS_INVALID_NUMBER; 10b46c: b8 0a 00 00 00 mov $0xa,%eax 10b471: eb d8 jmp 10b44b 10b473: 90 nop <== NOT EXECUTED CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10b474: b8 03 00 00 00 mov $0x3,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b479: 8d 65 f4 lea -0xc(%ebp),%esp 10b47c: 5b pop %ebx 10b47d: 5e pop %esi 10b47e: 5f pop %edi 10b47f: c9 leave 10b480: c3 ret 10b481: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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 ) ) 10b484: 89 d9 mov %ebx,%ecx 10b486: 83 e1 30 and $0x30,%ecx 10b489: 75 db jne 10b466 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b48b: a1 34 54 12 00 mov 0x125434,%eax 10b490: 40 inc %eax 10b491: a3 34 54 12 00 mov %eax,0x125434 * 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 ); 10b496: 83 ec 0c sub $0xc,%esp 10b499: 68 80 53 12 00 push $0x125380 10b49e: 89 4d c4 mov %ecx,-0x3c(%ebp) 10b4a1: e8 e6 13 00 00 call 10c88c <_Objects_Allocate> 10b4a6: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 10b4a8: 83 c4 10 add $0x10,%esp 10b4ab: 85 c0 test %eax,%eax 10b4ad: 8b 4d c4 mov -0x3c(%ebp),%ecx 10b4b0: 0f 84 ba 00 00 00 je 10b570 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 10b4b6: 89 58 10 mov %ebx,0x10(%eax) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 10b4b9: 85 c9 test %ecx,%ecx 10b4bb: 74 77 je 10b534 /* * 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; 10b4bd: 31 c0 xor %eax,%eax 10b4bf: f6 c3 04 test $0x4,%bl 10b4c2: 0f 95 c0 setne %al 10b4c5: 89 45 d8 mov %eax,-0x28(%ebp) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 10b4c8: 83 f9 10 cmp $0x10,%ecx 10b4cb: 0f 84 ae 00 00 00 je 10b57f 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; 10b4d1: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b4d8: c6 45 d4 00 movb $0x0,-0x2c(%ebp) } mutex_status = _CORE_mutex_Initialize( 10b4dc: 50 push %eax 10b4dd: 31 c0 xor %eax,%eax 10b4df: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b4e3: 0f 94 c0 sete %al 10b4e6: 50 push %eax 10b4e7: 8d 45 d0 lea -0x30(%ebp),%eax 10b4ea: 50 push %eax 10b4eb: 8d 42 14 lea 0x14(%edx),%eax 10b4ee: 50 push %eax 10b4ef: 89 55 c4 mov %edx,-0x3c(%ebp) 10b4f2: e8 85 0b 00 00 call 10c07c <_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 ) { 10b4f7: 83 c4 10 add $0x10,%esp 10b4fa: 83 f8 06 cmp $0x6,%eax 10b4fd: 8b 55 c4 mov -0x3c(%ebp),%edx 10b500: 0f 84 a9 00 00 00 je 10b5af Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10b506: 8b 42 08 mov 0x8(%edx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10b509: 0f b7 d8 movzwl %ax,%ebx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b50c: 8b 0d 9c 53 12 00 mov 0x12539c,%ecx 10b512: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10b515: 89 72 0c mov %esi,0xc(%edx) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 10b518: 89 07 mov %eax,(%edi) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 10b51a: e8 89 20 00 00 call 10d5a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b51f: 31 c0 xor %eax,%eax 10b521: e9 25 ff ff ff jmp 10b44b 10b526: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10b528: b8 09 00 00 00 mov $0x9,%eax 10b52d: e9 19 ff ff ff jmp 10b44b 10b532: 66 90 xchg %ax,%ax <== NOT EXECUTED */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 10b534: 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; 10b53b: 31 c0 xor %eax,%eax 10b53d: f6 c3 04 test $0x4,%bl 10b540: 0f 95 c0 setne %al 10b543: 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; 10b546: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 10b54d: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) _CORE_semaphore_Initialize( 10b554: 51 push %ecx 10b555: ff 75 0c pushl 0xc(%ebp) 10b558: 8d 45 e0 lea -0x20(%ebp),%eax 10b55b: 50 push %eax 10b55c: 8d 42 14 lea 0x14(%edx),%eax 10b55f: 50 push %eax 10b560: 89 55 c4 mov %edx,-0x3c(%ebp) 10b563: e8 a4 0d 00 00 call 10c30c <_CORE_semaphore_Initialize> 10b568: 83 c4 10 add $0x10,%esp 10b56b: 8b 55 c4 mov -0x3c(%ebp),%edx 10b56e: eb 96 jmp 10b506 _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 10b570: e8 33 20 00 00 call 10d5a8 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10b575: b8 05 00 00 00 mov $0x5,%eax 10b57a: e9 cc fe ff ff jmp 10b44b 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; 10b57f: 8b 45 14 mov 0x14(%ebp),%eax 10b582: 89 45 dc mov %eax,-0x24(%ebp) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10b585: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b58c: c6 45 d4 00 movb $0x0,-0x2c(%ebp) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 10b590: 83 7d d8 01 cmpl $0x1,-0x28(%ebp) 10b594: 0f 85 42 ff ff ff jne 10b4dc if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 10b59a: f6 c3 40 test $0x40,%bl 10b59d: 74 30 je 10b5cf the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10b59f: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b5a6: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b5aa: e9 2d ff ff ff jmp 10b4dc */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b5af: 83 ec 08 sub $0x8,%esp 10b5b2: 52 push %edx 10b5b3: 68 80 53 12 00 push $0x125380 10b5b8: e8 47 16 00 00 call 10cc04 <_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(); 10b5bd: e8 e6 1f 00 00 call 10d5a8 <_Thread_Enable_dispatch> return RTEMS_INVALID_PRIORITY; 10b5c2: 83 c4 10 add $0x10,%esp 10b5c5: b8 13 00 00 00 mov $0x13,%eax 10b5ca: e9 7c fe ff ff jmp 10b44b 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 ) ) { 10b5cf: 81 e3 80 00 00 00 and $0x80,%ebx 10b5d5: 0f 84 01 ff ff ff je 10b4dc the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 10b5db: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b5e2: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b5e6: e9 f1 fe ff ff jmp 10b4dc =============================================================================== 0010b5ec : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 10b5ec: 55 push %ebp 10b5ed: 89 e5 mov %esp,%ebp 10b5ef: 53 push %ebx 10b5f0: 83 ec 18 sub $0x18,%esp register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); 10b5f3: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) _Objects_Get( &_Semaphore_Information, id, location ); 10b5f6: 50 push %eax 10b5f7: ff 75 08 pushl 0x8(%ebp) 10b5fa: 68 80 53 12 00 push $0x125380 10b5ff: e8 40 17 00 00 call 10cd44 <_Objects_Get> 10b604: 89 c3 mov %eax,%ebx switch ( location ) { 10b606: 83 c4 10 add $0x10,%esp 10b609: 8b 4d f4 mov -0xc(%ebp),%ecx 10b60c: 85 c9 test %ecx,%ecx 10b60e: 74 0c je 10b61c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b610: b8 04 00 00 00 mov $0x4,%eax } 10b615: 8b 5d fc mov -0x4(%ebp),%ebx 10b618: c9 leave 10b619: c3 ret 10b61a: 66 90 xchg %ax,%ax <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); 10b61c: 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) ) { 10b61f: 83 e0 30 and $0x30,%eax 10b622: 74 58 je 10b67c if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 10b624: 8b 53 64 mov 0x64(%ebx),%edx 10b627: 85 d2 test %edx,%edx 10b629: 75 15 jne 10b640 10b62b: 83 f8 20 cmp $0x20,%eax 10b62e: 74 10 je 10b640 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 10b630: e8 73 1f 00 00 call 10d5a8 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 10b635: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b63a: 8b 5d fc mov -0x4(%ebp),%ebx 10b63d: c9 leave 10b63e: c3 ret 10b63f: 90 nop <== NOT EXECUTED !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 10b640: 50 push %eax 10b641: 6a 04 push $0x4 10b643: 6a 00 push $0x0 10b645: 8d 43 14 lea 0x14(%ebx),%eax 10b648: 50 push %eax 10b649: e8 22 0a 00 00 call 10c070 <_CORE_mutex_Flush> 10b64e: 83 c4 10 add $0x10,%esp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 10b651: 83 ec 08 sub $0x8,%esp 10b654: 53 push %ebx 10b655: 68 80 53 12 00 push $0x125380 10b65a: e8 a9 12 00 00 call 10c908 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b65f: 58 pop %eax 10b660: 5a pop %edx 10b661: 53 push %ebx 10b662: 68 80 53 12 00 push $0x125380 10b667: e8 98 15 00 00 call 10cc04 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 10b66c: e8 37 1f 00 00 call 10d5a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b671: 83 c4 10 add $0x10,%esp 10b674: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b676: 8b 5d fc mov -0x4(%ebp),%ebx 10b679: c9 leave 10b67a: c3 ret 10b67b: 90 nop <== NOT EXECUTED &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 10b67c: 51 push %ecx 10b67d: 6a 02 push $0x2 10b67f: 6a 00 push $0x0 10b681: 8d 43 14 lea 0x14(%ebx),%eax 10b684: 50 push %eax 10b685: e8 76 0c 00 00 call 10c300 <_CORE_semaphore_Flush> 10b68a: 83 c4 10 add $0x10,%esp 10b68d: eb c2 jmp 10b651 =============================================================================== 0010b690 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 10b690: 55 push %ebp 10b691: 89 e5 mov %esp,%ebp 10b693: 57 push %edi 10b694: 56 push %esi 10b695: 53 push %ebx 10b696: 83 ec 1c sub $0x1c,%esp 10b699: 8b 5d 08 mov 0x8(%ebp),%ebx 10b69c: 8b 75 0c mov 0xc(%ebp),%esi 10b69f: 8b 7d 10 mov 0x10(%ebp),%edi register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); 10b6a2: 8d 45 e0 lea -0x20(%ebp),%eax Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) _Objects_Get_isr_disable( &_Semaphore_Information, id, location, level ); 10b6a5: 50 push %eax 10b6a6: 8d 45 e4 lea -0x1c(%ebp),%eax 10b6a9: 50 push %eax 10b6aa: 53 push %ebx 10b6ab: 68 80 53 12 00 push $0x125380 10b6b0: e8 37 16 00 00 call 10ccec <_Objects_Get_isr_disable> switch ( location ) { 10b6b5: 83 c4 10 add $0x10,%esp 10b6b8: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b6bb: 85 c9 test %ecx,%ecx 10b6bd: 74 0d je 10b6cc case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b6bf: b8 04 00 00 00 mov $0x4,%eax } 10b6c4: 8d 65 f4 lea -0xc(%ebp),%esp 10b6c7: 5b pop %ebx 10b6c8: 5e pop %esi 10b6c9: 5f pop %edi 10b6ca: c9 leave 10b6cb: 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) ) { 10b6cc: f6 40 10 30 testb $0x30,0x10(%eax) 10b6d0: 74 36 je 10b708 _CORE_mutex_Seize( 10b6d2: 83 ec 0c sub $0xc,%esp 10b6d5: ff 75 e0 pushl -0x20(%ebp) 10b6d8: 57 push %edi */ RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait ( rtems_option option_set ) { return (option_set & RTEMS_NO_WAIT) ? true : false; 10b6d9: 83 e6 01 and $0x1,%esi 10b6dc: 83 f6 01 xor $0x1,%esi 10b6df: 56 push %esi 10b6e0: 53 push %ebx 10b6e1: 83 c0 14 add $0x14,%eax 10b6e4: 50 push %eax 10b6e5: e8 8a 0a 00 00 call 10c174 <_CORE_mutex_Seize> id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10b6ea: 83 c4 14 add $0x14,%esp _Thread_Executing->Wait.return_code ); 10b6ed: a1 d8 56 12 00 mov 0x1256d8,%eax id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10b6f2: ff 70 34 pushl 0x34(%eax) 10b6f5: e8 12 01 00 00 call 10b80c <_Semaphore_Translate_core_mutex_return_code> 10b6fa: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b6fd: 8d 65 f4 lea -0xc(%ebp),%esp 10b700: 5b pop %ebx 10b701: 5e pop %esi 10b702: 5f pop %edi 10b703: c9 leave 10b704: c3 ret 10b705: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10b708: 8b 15 d8 56 12 00 mov 0x1256d8,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10b70e: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( the_semaphore->count != 0 ) { 10b715: 8b 48 5c mov 0x5c(%eax),%ecx 10b718: 85 c9 test %ecx,%ecx 10b71a: 75 2c jne 10b748 the_semaphore->count -= 1; _ISR_Enable( *level_p ); return; } if ( !wait ) { 10b71c: 83 e6 01 and $0x1,%esi 10b71f: 74 33 je 10b754 _ISR_Enable( *level_p ); 10b721: ff 75 e0 pushl -0x20(%ebp) 10b724: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 10b725: 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( 10b72c: 83 ec 0c sub $0xc,%esp _Thread_Executing->Wait.return_code ); 10b72f: a1 d8 56 12 00 mov 0x1256d8,%eax id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 10b734: ff 70 34 pushl 0x34(%eax) 10b737: e8 e0 00 00 00 call 10b81c <_Semaphore_Translate_core_semaphore_return_code> 10b73c: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b73f: 8d 65 f4 lea -0xc(%ebp),%esp 10b742: 5b pop %ebx 10b743: 5e pop %esi 10b744: 5f pop %edi 10b745: c9 leave 10b746: c3 ret 10b747: 90 nop <== NOT EXECUTED /* 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; 10b748: 49 dec %ecx 10b749: 89 48 5c mov %ecx,0x5c(%eax) _ISR_Enable( *level_p ); 10b74c: ff 75 e0 pushl -0x20(%ebp) 10b74f: 9d popf 10b750: eb da jmp 10b72c 10b752: 66 90 xchg %ax,%ax <== NOT EXECUTED 10b754: 8b 0d 34 54 12 00 mov 0x125434,%ecx 10b75a: 41 inc %ecx 10b75b: 89 0d 34 54 12 00 mov %ecx,0x125434 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; 10b761: 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; 10b768: 83 c0 14 add $0x14,%eax 10b76b: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10b76e: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( *level_p ); 10b771: ff 75 e0 pushl -0x20(%ebp) 10b774: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 10b775: 52 push %edx 10b776: 68 b8 dd 10 00 push $0x10ddb8 10b77b: 57 push %edi 10b77c: 50 push %eax 10b77d: e8 e6 22 00 00 call 10da68 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10b782: e8 21 1e 00 00 call 10d5a8 <_Thread_Enable_dispatch> 10b787: 83 c4 10 add $0x10,%esp 10b78a: eb a0 jmp 10b72c =============================================================================== 0010b78c : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 10b78c: 55 push %ebp 10b78d: 89 e5 mov %esp,%ebp 10b78f: 53 push %ebx 10b790: 83 ec 18 sub $0x18,%esp 10b793: 8b 5d 08 mov 0x8(%ebp),%ebx register Semaphore_Control *the_semaphore; Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); 10b796: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) _Objects_Get( &_Semaphore_Information, id, location ); 10b799: 50 push %eax 10b79a: 53 push %ebx 10b79b: 68 80 53 12 00 push $0x125380 10b7a0: e8 9f 15 00 00 call 10cd44 <_Objects_Get> switch ( location ) { 10b7a5: 83 c4 10 add $0x10,%esp 10b7a8: 8b 55 f4 mov -0xc(%ebp),%edx 10b7ab: 85 d2 test %edx,%edx 10b7ad: 74 0d je 10b7bc case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b7af: b8 04 00 00 00 mov $0x4,%eax } 10b7b4: 8b 5d fc mov -0x4(%ebp),%ebx 10b7b7: c9 leave 10b7b8: c3 ret 10b7b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10b7bc: f6 40 10 30 testb $0x30,0x10(%eax) 10b7c0: 75 26 jne 10b7e8 MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); } else { semaphore_status = _CORE_semaphore_Surrender( 10b7c2: 52 push %edx 10b7c3: 6a 00 push $0x0 10b7c5: 53 push %ebx 10b7c6: 83 c0 14 add $0x14,%eax 10b7c9: 50 push %eax 10b7ca: e8 7d 0b 00 00 call 10c34c <_CORE_semaphore_Surrender> 10b7cf: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b7d1: e8 d2 1d 00 00 call 10d5a8 <_Thread_Enable_dispatch> return 10b7d6: 89 1c 24 mov %ebx,(%esp) 10b7d9: e8 3e 00 00 00 call 10b81c <_Semaphore_Translate_core_semaphore_return_code> 10b7de: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b7e1: 8b 5d fc mov -0x4(%ebp),%ebx 10b7e4: c9 leave 10b7e5: c3 ret 10b7e6: 66 90 xchg %ax,%ax <== NOT EXECUTED 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( 10b7e8: 51 push %ecx 10b7e9: 6a 00 push $0x0 10b7eb: 53 push %ebx 10b7ec: 83 c0 14 add $0x14,%eax 10b7ef: 50 push %eax 10b7f0: e8 1f 0a 00 00 call 10c214 <_CORE_mutex_Surrender> 10b7f5: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b7f7: e8 ac 1d 00 00 call 10d5a8 <_Thread_Enable_dispatch> return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 10b7fc: 89 1c 24 mov %ebx,(%esp) 10b7ff: e8 08 00 00 00 call 10b80c <_Semaphore_Translate_core_mutex_return_code> 10b804: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b807: 8b 5d fc mov -0x4(%ebp),%ebx 10b80a: c9 leave 10b80b: c3 ret =============================================================================== 0011da60 : */ void rtems_shutdown_executive( uint32_t result ) { 11da60: 55 push %ebp 11da61: 89 e5 mov %esp,%ebp 11da63: 83 ec 08 sub $0x8,%esp if ( _System_state_Is_up( _System_state_Get() ) ) { 11da66: 83 3d e0 55 12 00 03 cmpl $0x3,0x1255e0 11da6d: 74 0d je 11da7c _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } _Internal_error_Occurred( 11da6f: 50 push %eax 11da70: 6a 14 push $0x14 11da72: 6a 01 push $0x1 11da74: 6a 00 push $0x0 11da76: e8 81 ed fe ff call 10c7fc <_Internal_error_Occurred> 11da7b: 90 nop <== NOT EXECUTED 11da7c: c7 05 e0 55 12 00 04 movl $0x4,0x1255e0 11da83: 00 00 00 * if we were running within the same context, it would work. * * And we will not return to this thread, so there is no point of * saving the context. */ _Context_Restart_self( &_Thread_BSP_context ); 11da86: 83 ec 0c sub $0xc,%esp 11da89: 68 1c 54 12 00 push $0x12541c 11da8e: e8 2a 0d ff ff call 10e7bd <_CPU_Context_restore> =============================================================================== 0010c7a4 : rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { 10c7a4: 55 push %ebp 10c7a5: 89 e5 mov %esp,%ebp 10c7a7: 83 ec 08 sub $0x8,%esp 10c7aa: 8b 55 08 mov 0x8(%ebp),%edx RTEMS_API_Control *api; ASR_Information *asr; /* XXX normalize mode */ executing = _Thread_Executing; api = (RTEMS_API_Control*)executing->API_Extensions[ THREAD_API_RTEMS ]; 10c7ad: a1 38 8b 12 00 mov 0x128b38,%eax 10c7b2: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10c7b8: 8b 0d 94 88 12 00 mov 0x128894,%ecx 10c7be: 41 inc %ecx 10c7bf: 89 0d 94 88 12 00 mov %ecx,0x128894 asr = &api->Signal; _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { 10c7c5: 85 d2 test %edx,%edx 10c7c7: 74 13 je 10c7dc asr->mode_set = mode_set; 10c7c9: 8b 4d 0c mov 0xc(%ebp),%ecx 10c7cc: 89 48 10 mov %ecx,0x10(%eax) asr->handler = asr_handler; 10c7cf: 89 50 0c mov %edx,0xc(%eax) } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 10c7d2: e8 2d 21 00 00 call 10e904 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10c7d7: 31 c0 xor %eax,%eax 10c7d9: c9 leave 10c7da: c3 ret 10c7db: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 10c7dc: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 10c7e0: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 10c7e7: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 10c7ee: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 10c7f5: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 10c7fc: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) asr->mode_set = mode_set; asr->handler = asr_handler; } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 10c803: e8 fc 20 00 00 call 10e904 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10c808: 31 c0 xor %eax,%eax 10c80a: c9 leave 10c80b: c3 ret =============================================================================== 00117d3c : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 117d3c: 55 push %ebp 117d3d: 89 e5 mov %esp,%ebp 117d3f: 53 push %ebx 117d40: 83 ec 14 sub $0x14,%esp 117d43: 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 ) 117d46: 85 db test %ebx,%ebx 117d48: 75 0a jne 117d54 return RTEMS_INVALID_NUMBER; 117d4a: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117d4f: 8b 5d fc mov -0x4(%ebp),%ebx 117d52: c9 leave 117d53: c3 ret ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 117d54: 83 ec 08 sub $0x8,%esp 117d57: 8d 45 f4 lea -0xc(%ebp),%eax 117d5a: 50 push %eax 117d5b: ff 75 08 pushl 0x8(%ebp) 117d5e: e8 6d 3c 00 00 call 11b9d0 <_Thread_Get> switch ( location ) { 117d63: 83 c4 10 add $0x10,%esp 117d66: 8b 55 f4 mov -0xc(%ebp),%edx 117d69: 85 d2 test %edx,%edx 117d6b: 74 0b je 117d78 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 117d6d: b8 04 00 00 00 mov $0x4,%eax } 117d72: 8b 5d fc mov -0x4(%ebp),%ebx 117d75: c9 leave 117d76: c3 ret 117d77: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 117d78: 8b 90 f0 00 00 00 mov 0xf0(%eax),%edx asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 117d7e: 8b 4a 0c mov 0xc(%edx),%ecx 117d81: 85 c9 test %ecx,%ecx 117d83: 74 3f je 117dc4 if ( asr->is_enabled ) { 117d85: 80 7a 08 00 cmpb $0x0,0x8(%edx) 117d89: 74 25 je 117db0 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 117d8b: 9c pushf 117d8c: fa cli 117d8d: 59 pop %ecx *signal_set |= signals; 117d8e: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 117d91: 51 push %ecx 117d92: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 117d93: 8b 15 34 0c 14 00 mov 0x140c34,%edx 117d99: 85 d2 test %edx,%edx 117d9b: 74 1b je 117db8 117d9d: 3b 05 38 0c 14 00 cmp 0x140c38,%eax 117da3: 75 13 jne 117db8 <== NEVER TAKEN _Thread_Dispatch_necessary = true; 117da5: c6 05 44 0c 14 00 01 movb $0x1,0x140c44 117dac: eb 0a jmp 117db8 117dae: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 117db0: 9c pushf 117db1: fa cli 117db2: 58 pop %eax *signal_set |= signals; 117db3: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 117db6: 50 push %eax 117db7: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 117db8: e8 ef 3b 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 117dbd: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117dbf: 8b 5d fc mov -0x4(%ebp),%ebx 117dc2: c9 leave 117dc3: c3 ret _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 117dc4: e8 e3 3b 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 117dc9: b8 0b 00 00 00 mov $0xb,%eax 117dce: e9 7c ff ff ff jmp 117d4f =============================================================================== 0010b82c : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { 10b82c: 55 push %ebp 10b82d: 89 e5 mov %esp,%ebp 10b82f: 57 push %edi 10b830: 56 push %esi 10b831: 53 push %ebx 10b832: 83 ec 1c sub $0x1c,%esp 10b835: 8b 5d 08 mov 0x8(%ebp),%ebx 10b838: 8b 7d 0c mov 0xc(%ebp),%edi 10b83b: 8b 75 1c mov 0x1c(%ebp),%esi Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10b83e: 85 f6 test %esi,%esi 10b840: 0f 84 3e 01 00 00 je 10b984 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10b846: 85 db test %ebx,%ebx 10b848: 0f 84 d2 00 00 00 je 10b920 /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 10b84e: f7 45 18 00 80 00 00 testl $0x8000,0x18(%ebp) 10b855: 75 17 jne 10b86e */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10b857: 85 ff test %edi,%edi 10b859: 0f 84 b1 00 00 00 je 10b910 ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 10b85f: 0f b6 05 14 12 12 00 movzbl 0x121214,%eax */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10b866: 39 c7 cmp %eax,%edi 10b868: 0f 87 a2 00 00 00 ja 10b910 */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10b86e: 83 ec 0c sub $0xc,%esp 10b871: ff 35 e4 54 12 00 pushl 0x1254e4 10b877: e8 6c 06 00 00 call 10bee8 <_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 ); 10b87c: c7 04 24 c0 53 12 00 movl $0x1253c0,(%esp) 10b883: e8 04 10 00 00 call 10c88c <_Objects_Allocate> 10b888: 89 c2 mov %eax,%edx * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 10b88a: 83 c4 10 add $0x10,%esp 10b88d: 85 c0 test %eax,%eax 10b88f: 0f 84 cf 00 00 00 je 10b964 /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 10b895: 50 push %eax 10b896: 53 push %ebx */ RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level ( Modes_Control mode_set ) { return ( mode_set & RTEMS_INTERRUPT_MASK ); 10b897: 8b 45 14 mov 0x14(%ebp),%eax 10b89a: 83 e0 01 and $0x1,%eax 10b89d: 50 push %eax 10b89e: 6a 00 push $0x0 10b8a0: 31 c0 xor %eax,%eax 10b8a2: f7 45 14 00 02 00 00 testl $0x200,0x14(%ebp) 10b8a9: 0f 95 c0 setne %al 10b8ac: 50 push %eax 10b8ad: 31 c0 xor %eax,%eax 10b8af: f7 45 14 00 01 00 00 testl $0x100,0x14(%ebp) 10b8b6: 0f 94 c0 sete %al 10b8b9: 50 push %eax 10b8ba: 57 push %edi */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_floating_point( rtems_attribute attribute_set ) { return ( attribute_set & RTEMS_FLOATING_POINT ) ? true : false; 10b8bb: 8b 45 18 mov 0x18(%ebp),%eax 10b8be: 83 e0 01 and $0x1,%eax 10b8c1: 50 push %eax 10b8c2: ff 75 10 pushl 0x10(%ebp) 10b8c5: 6a 00 push $0x0 10b8c7: 52 push %edx 10b8c8: 68 c0 53 12 00 push $0x1253c0 10b8cd: 89 55 e4 mov %edx,-0x1c(%ebp) 10b8d0: e8 6f 1d 00 00 call 10d644 <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 10b8d5: 83 c4 30 add $0x30,%esp 10b8d8: 84 c0 test %al,%al 10b8da: 8b 55 e4 mov -0x1c(%ebp),%edx 10b8dd: 74 51 je 10b930 _RTEMS_Unlock_allocator(); return RTEMS_UNSATISFIED; } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 10b8df: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax * id - thread id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_task_create( 10b8e5: f7 45 14 00 04 00 00 testl $0x400,0x14(%ebp) } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 10b8ec: 0f 94 40 08 sete 0x8(%eax) *id = the_thread->Object.id; 10b8f0: 8b 42 08 mov 0x8(%edx),%eax 10b8f3: 89 06 mov %eax,(%esi) ); } #endif _RTEMS_Unlock_allocator(); 10b8f5: 83 ec 0c sub $0xc,%esp 10b8f8: ff 35 e4 54 12 00 pushl 0x1254e4 10b8fe: e8 2d 06 00 00 call 10bf30 <_API_Mutex_Unlock> return RTEMS_SUCCESSFUL; 10b903: 83 c4 10 add $0x10,%esp 10b906: 31 c0 xor %eax,%eax } 10b908: 8d 65 f4 lea -0xc(%ebp),%esp 10b90b: 5b pop %ebx 10b90c: 5e pop %esi 10b90d: 5f pop %edi 10b90e: c9 leave 10b90f: c3 ret * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { if ( !_RTEMS_tasks_Priority_is_valid( initial_priority ) ) return RTEMS_INVALID_PRIORITY; 10b910: b8 13 00 00 00 mov $0x13,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b915: 8d 65 f4 lea -0xc(%ebp),%esp 10b918: 5b pop %ebx 10b919: 5e pop %esi 10b91a: 5f pop %edi 10b91b: c9 leave 10b91c: c3 ret 10b91d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10b920: b8 03 00 00 00 mov $0x3,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b925: 8d 65 f4 lea -0xc(%ebp),%esp 10b928: 5b pop %ebx 10b929: 5e pop %esi 10b92a: 5f pop %edi 10b92b: c9 leave 10b92c: c3 ret 10b92d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 10b930: 83 ec 0c sub $0xc,%esp 10b933: ff 72 08 pushl 0x8(%edx) 10b936: e8 39 13 00 00 call 10cc74 <_Objects_Get_information_id> 10b93b: 5a pop %edx 10b93c: 59 pop %ecx 10b93d: 8b 55 e4 mov -0x1c(%ebp),%edx 10b940: 52 push %edx 10b941: 50 push %eax 10b942: e8 bd 12 00 00 call 10cc04 <_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(); 10b947: 58 pop %eax 10b948: ff 35 e4 54 12 00 pushl 0x1254e4 10b94e: e8 dd 05 00 00 call 10bf30 <_API_Mutex_Unlock> return RTEMS_UNSATISFIED; 10b953: 83 c4 10 add $0x10,%esp 10b956: b8 0d 00 00 00 mov $0xd,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b95b: 8d 65 f4 lea -0xc(%ebp),%esp 10b95e: 5b pop %ebx 10b95f: 5e pop %esi 10b960: 5f pop %edi 10b961: c9 leave 10b962: c3 ret 10b963: 90 nop <== NOT EXECUTED */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10b964: 83 ec 0c sub $0xc,%esp 10b967: ff 35 e4 54 12 00 pushl 0x1254e4 10b96d: e8 be 05 00 00 call 10bf30 <_API_Mutex_Unlock> return RTEMS_TOO_MANY; 10b972: 83 c4 10 add $0x10,%esp 10b975: b8 05 00 00 00 mov $0x5,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b97a: 8d 65 f4 lea -0xc(%ebp),%esp 10b97d: 5b pop %ebx 10b97e: 5e pop %esi 10b97f: 5f pop %edi 10b980: c9 leave 10b981: c3 ret 10b982: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) return RTEMS_INVALID_ADDRESS; 10b984: b8 09 00 00 00 mov $0x9,%eax 10b989: eb 8a jmp 10b915 =============================================================================== 0010b98c : */ rtems_status_code rtems_task_delete( rtems_id id ) { 10b98c: 55 push %ebp 10b98d: 89 e5 mov %esp,%ebp 10b98f: 53 push %ebx 10b990: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 10b993: ff 35 e4 54 12 00 pushl 0x1254e4 10b999: e8 4a 05 00 00 call 10bee8 <_API_Mutex_Lock> the_thread = _Thread_Get( id, &location ); 10b99e: 5a pop %edx 10b99f: 59 pop %ecx 10b9a0: 8d 45 f4 lea -0xc(%ebp),%eax 10b9a3: 50 push %eax 10b9a4: ff 75 08 pushl 0x8(%ebp) 10b9a7: e8 20 1c 00 00 call 10d5cc <_Thread_Get> 10b9ac: 89 c3 mov %eax,%ebx switch ( location ) { 10b9ae: 83 c4 10 add $0x10,%esp 10b9b1: 8b 45 f4 mov -0xc(%ebp),%eax 10b9b4: 85 c0 test %eax,%eax 10b9b6: 75 44 jne 10b9fc case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 10b9b8: 83 ec 0c sub $0xc,%esp 10b9bb: ff 73 08 pushl 0x8(%ebx) 10b9be: e8 b1 12 00 00 call 10cc74 <_Objects_Get_information_id> 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 10b9c3: 5a pop %edx 10b9c4: 59 pop %ecx 10b9c5: 53 push %ebx 10b9c6: 50 push %eax 10b9c7: e8 ac 18 00 00 call 10d278 <_Thread_Close> 10b9cc: 58 pop %eax 10b9cd: ff 73 08 pushl 0x8(%ebx) 10b9d0: e8 9f 12 00 00 call 10cc74 <_Objects_Get_information_id> 10b9d5: 5a pop %edx 10b9d6: 59 pop %ecx 10b9d7: 53 push %ebx 10b9d8: 50 push %eax 10b9d9: e8 26 12 00 00 call 10cc04 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10b9de: 58 pop %eax 10b9df: ff 35 e4 54 12 00 pushl 0x1254e4 10b9e5: e8 46 05 00 00 call 10bf30 <_API_Mutex_Unlock> _Thread_Enable_dispatch(); 10b9ea: e8 b9 1b 00 00 call 10d5a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b9ef: 83 c4 10 add $0x10,%esp 10b9f2: 31 c0 xor %eax,%eax break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } 10b9f4: 8b 5d fc mov -0x4(%ebp),%ebx 10b9f7: c9 leave 10b9f8: c3 ret 10b9f9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 10b9fc: 83 ec 0c sub $0xc,%esp 10b9ff: ff 35 e4 54 12 00 pushl 0x1254e4 10ba05: e8 26 05 00 00 call 10bf30 <_API_Mutex_Unlock> return RTEMS_INVALID_ID; 10ba0a: 83 c4 10 add $0x10,%esp 10ba0d: b8 04 00 00 00 mov $0x4,%eax } 10ba12: 8b 5d fc mov -0x4(%ebp),%ebx 10ba15: c9 leave 10ba16: c3 ret =============================================================================== 0010d4b0 : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 10d4b0: 55 push %ebp 10d4b1: 89 e5 mov %esp,%ebp 10d4b3: 56 push %esi 10d4b4: 53 push %ebx 10d4b5: 83 ec 10 sub $0x10,%esp 10d4b8: 8b 45 08 mov 0x8(%ebp),%eax 10d4bb: 8b 75 0c mov 0xc(%ebp),%esi 10d4be: 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() ) 10d4c1: 80 3d e4 51 12 00 00 cmpb $0x0,0x1251e4 10d4c8: 74 6e je 10d538 return RTEMS_NOT_CONFIGURED; if ( !note ) 10d4ca: 85 db test %ebx,%ebx 10d4cc: 74 7e je 10d54c <== NEVER TAKEN /* * 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 ) 10d4ce: 83 fe 0f cmp $0xf,%esi 10d4d1: 77 3d ja 10d510 <== NEVER TAKEN /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d4d3: 85 c0 test %eax,%eax 10d4d5: 74 45 je 10d51c _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d4d7: 8b 15 18 9a 12 00 mov 0x129a18,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d4dd: 3b 42 08 cmp 0x8(%edx),%eax 10d4e0: 74 40 je 10d522 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d4e2: 83 ec 08 sub $0x8,%esp 10d4e5: 8d 55 f4 lea -0xc(%ebp),%edx 10d4e8: 52 push %edx 10d4e9: 50 push %eax 10d4ea: e8 11 1f 00 00 call 10f400 <_Thread_Get> switch ( location ) { 10d4ef: 83 c4 10 add $0x10,%esp 10d4f2: 8b 55 f4 mov -0xc(%ebp),%edx 10d4f5: 85 d2 test %edx,%edx 10d4f7: 75 4b jne 10d544 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d4f9: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10d4ff: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d503: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10d505: e8 d2 1e 00 00 call 10f3dc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d50a: 31 c0 xor %eax,%eax 10d50c: eb 07 jmp 10d515 10d50e: 66 90 xchg %ax,%ax <== NOT EXECUTED * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) return RTEMS_INVALID_NUMBER; 10d510: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d515: 8d 65 f8 lea -0x8(%ebp),%esp 10d518: 5b pop %ebx 10d519: 5e pop %esi 10d51a: c9 leave 10d51b: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d51c: 8b 15 18 9a 12 00 mov 0x129a18,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d522: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax 10d528: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d52c: 89 03 mov %eax,(%ebx) return RTEMS_SUCCESSFUL; 10d52e: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d530: 8d 65 f8 lea -0x8(%ebp),%esp 10d533: 5b pop %ebx 10d534: 5e pop %esi 10d535: c9 leave 10d536: c3 ret 10d537: 90 nop <== NOT EXECUTED register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; 10d538: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d53d: 8d 65 f8 lea -0x8(%ebp),%esp 10d540: 5b pop %ebx 10d541: 5e pop %esi 10d542: c9 leave 10d543: c3 ret case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d544: b8 04 00 00 00 mov $0x4,%eax 10d549: eb ca jmp 10d515 10d54b: 90 nop <== NOT EXECUTED if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; if ( !note ) return RTEMS_INVALID_ADDRESS; 10d54c: b8 09 00 00 00 mov $0x9,%eax 10d551: eb c2 jmp 10d515 =============================================================================== 0010ba18 : rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, rtems_id *id ) { 10ba18: 55 push %ebp 10ba19: 89 e5 mov %esp,%ebp 10ba1b: 83 ec 08 sub $0x8,%esp 10ba1e: 8b 55 08 mov 0x8(%ebp),%edx 10ba21: 8b 45 10 mov 0x10(%ebp),%eax Objects_Name_or_id_lookup_errors status; if ( !id ) 10ba24: 85 c0 test %eax,%eax 10ba26: 74 30 je 10ba58 return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { 10ba28: 85 d2 test %edx,%edx 10ba2a: 75 10 jne 10ba3c *id = _Thread_Executing->Object.id; 10ba2c: 8b 15 d8 56 12 00 mov 0x1256d8,%edx 10ba32: 8b 52 08 mov 0x8(%edx),%edx 10ba35: 89 10 mov %edx,(%eax) return RTEMS_SUCCESSFUL; 10ba37: 31 c0 xor %eax,%eax } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; } 10ba39: c9 leave 10ba3a: c3 ret 10ba3b: 90 nop <== NOT EXECUTED if ( name == OBJECTS_ID_OF_SELF ) { *id = _Thread_Executing->Object.id; return RTEMS_SUCCESSFUL; } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); 10ba3c: 50 push %eax 10ba3d: ff 75 0c pushl 0xc(%ebp) 10ba40: 52 push %edx 10ba41: 68 c0 53 12 00 push $0x1253c0 10ba46: e8 51 14 00 00 call 10ce9c <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; 10ba4b: 8b 04 85 ec fb 11 00 mov 0x11fbec(,%eax,4),%eax 10ba52: 83 c4 10 add $0x10,%esp } 10ba55: c9 leave 10ba56: c3 ret 10ba57: 90 nop <== NOT EXECUTED ) { Objects_Name_or_id_lookup_errors status; if ( !id ) return RTEMS_INVALID_ADDRESS; 10ba58: b8 09 00 00 00 mov $0x9,%eax } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; } 10ba5d: c9 leave 10ba5e: c3 ret =============================================================================== 00118120 : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { 118120: 55 push %ebp 118121: 89 e5 mov %esp,%ebp 118123: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 118126: 8d 45 f4 lea -0xc(%ebp),%eax 118129: 50 push %eax 11812a: ff 75 08 pushl 0x8(%ebp) 11812d: e8 9e 38 00 00 call 11b9d0 <_Thread_Get> switch ( location ) { 118132: 83 c4 10 add $0x10,%esp 118135: 8b 55 f4 mov -0xc(%ebp),%edx 118138: 85 d2 test %edx,%edx 11813a: 74 08 je 118144 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 11813c: b8 04 00 00 00 mov $0x4,%eax } 118141: c9 leave 118142: c3 ret 118143: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 118144: f6 40 10 02 testb $0x2,0x10(%eax) 118148: 74 0e je 118158 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 11814a: e8 5d 38 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_ALREADY_SUSPENDED; 11814f: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118154: c9 leave 118155: c3 ret 118156: 66 90 xchg %ax,%ax <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Enable_dispatch(); 118158: e8 4f 38 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 11815d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11815f: c9 leave 118160: c3 ret =============================================================================== 00111e98 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 111e98: 55 push %ebp 111e99: 89 e5 mov %esp,%ebp 111e9b: 57 push %edi 111e9c: 56 push %esi 111e9d: 53 push %ebx 111e9e: 83 ec 1c sub $0x1c,%esp 111ea1: 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 ) 111ea4: 85 c9 test %ecx,%ecx 111ea6: 0f 84 40 01 00 00 je 111fec return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 111eac: 8b 1d d8 56 12 00 mov 0x1256d8,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 111eb2: 8b bb f0 00 00 00 mov 0xf0(%ebx),%edi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 111eb8: 80 7b 74 01 cmpb $0x1,0x74(%ebx) 111ebc: 19 f6 sbb %esi,%esi 111ebe: 81 e6 00 01 00 00 and $0x100,%esi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 111ec4: 8b 53 7c mov 0x7c(%ebx),%edx 111ec7: 85 d2 test %edx,%edx 111ec9: 0f 85 f1 00 00 00 jne 111fc0 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 111ecf: 80 7f 08 01 cmpb $0x1,0x8(%edi) 111ed3: 19 d2 sbb %edx,%edx 111ed5: 81 e2 00 04 00 00 and $0x400,%edx old_mode |= _ISR_Get_level(); 111edb: 89 55 e4 mov %edx,-0x1c(%ebp) 111ede: 89 4d e0 mov %ecx,-0x20(%ebp) 111ee1: e8 46 cc ff ff call 10eb2c <_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; 111ee6: 8b 55 e4 mov -0x1c(%ebp),%edx 111ee9: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); 111eeb: 09 f0 or %esi,%eax 111eed: 8b 4d e0 mov -0x20(%ebp),%ecx 111ef0: 89 01 mov %eax,(%ecx) *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 111ef2: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 111ef9: 74 0b je 111f06 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 111efb: f7 45 08 00 01 00 00 testl $0x100,0x8(%ebp) 111f02: 0f 94 43 74 sete 0x74(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 111f06: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 111f0d: 74 1c je 111f2b if ( _Modes_Is_timeslice(mode_set) ) { 111f0f: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 111f16: 0f 84 b8 00 00 00 je 111fd4 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 111f1c: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 111f23: a1 04 54 12 00 mov 0x125404,%eax 111f28: 89 43 78 mov %eax,0x78(%ebx) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 111f2b: f6 45 0c 01 testb $0x1,0xc(%ebp) 111f2f: 74 0b je 111f3c */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 111f31: f6 45 08 01 testb $0x1,0x8(%ebp) 111f35: 0f 84 91 00 00 00 je 111fcc 111f3b: fa cli * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 111f3c: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 111f43: 74 3f je 111f84 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 111f45: f7 45 08 00 04 00 00 testl $0x400,0x8(%ebp) 111f4c: 0f 94 c0 sete %al is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { 111f4f: 38 47 08 cmp %al,0x8(%edi) 111f52: 74 30 je 111f84 asr->is_enabled = is_asr_enabled; 111f54: 88 47 08 mov %al,0x8(%edi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 111f57: 9c pushf 111f58: fa cli 111f59: 58 pop %eax _signals = information->signals_pending; 111f5a: 8b 57 18 mov 0x18(%edi),%edx information->signals_pending = information->signals_posted; 111f5d: 8b 4f 14 mov 0x14(%edi),%ecx 111f60: 89 4f 18 mov %ecx,0x18(%edi) information->signals_posted = _signals; 111f63: 89 57 14 mov %edx,0x14(%edi) _ISR_Enable( _level ); 111f66: 50 push %eax 111f67: 9d popf /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 111f68: 8b 47 14 mov 0x14(%edi),%eax 111f6b: 85 c0 test %eax,%eax 111f6d: 0f 95 c0 setne %al needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 111f70: 83 3d e0 55 12 00 03 cmpl $0x3,0x1255e0 111f77: 74 16 je 111f8f <== ALWAYS TAKEN if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; 111f79: 31 c0 xor %eax,%eax } 111f7b: 83 c4 1c add $0x1c,%esp 111f7e: 5b pop %ebx 111f7f: 5e pop %esi 111f80: 5f pop %edi 111f81: c9 leave 111f82: c3 ret 111f83: 90 nop <== NOT EXECUTED /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 111f84: 31 c0 xor %eax,%eax needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 111f86: 83 3d e0 55 12 00 03 cmpl $0x3,0x1255e0 111f8d: 75 ea jne 111f79 <== NEVER TAKEN bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; 111f8f: 8b 15 d8 56 12 00 mov 0x1256d8,%edx if ( are_signals_pending || 111f95: 84 c0 test %al,%al 111f97: 75 0e jne 111fa7 111f99: 3b 15 dc 56 12 00 cmp 0x1256dc,%edx 111f9f: 74 d8 je 111f79 (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { 111fa1: 80 7a 74 00 cmpb $0x0,0x74(%edx) 111fa5: 74 d2 je 111f79 <== NEVER TAKEN _Thread_Dispatch_necessary = true; 111fa7: c6 05 e4 56 12 00 01 movb $0x1,0x1256e4 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); 111fae: e8 7d b4 ff ff call 10d430 <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; 111fb3: 31 c0 xor %eax,%eax } 111fb5: 83 c4 1c add $0x1c,%esp 111fb8: 5b pop %ebx 111fb9: 5e pop %esi 111fba: 5f pop %edi 111fbb: c9 leave 111fbc: c3 ret 111fbd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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; 111fc0: 81 ce 00 02 00 00 or $0x200,%esi 111fc6: e9 04 ff ff ff jmp 111ecf 111fcb: 90 nop <== NOT EXECUTED 111fcc: fb sti 111fcd: e9 6a ff ff ff jmp 111f3c 111fd2: 66 90 xchg %ax,%ax <== NOT EXECUTED 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; 111fd4: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 111fdb: f6 45 0c 01 testb $0x1,0xc(%ebp) 111fdf: 0f 84 57 ff ff ff je 111f3c 111fe5: e9 47 ff ff ff jmp 111f31 111fea: 66 90 xchg %ax,%ax <== NOT EXECUTED bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; 111fec: b8 09 00 00 00 mov $0x9,%eax if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; } 111ff1: 83 c4 1c add $0x1c,%esp 111ff4: 5b pop %ebx 111ff5: 5e pop %esi 111ff6: 5f pop %edi 111ff7: c9 leave 111ff8: c3 ret =============================================================================== 0010c4f4 : rtems_status_code rtems_task_restart( rtems_id id, uint32_t argument ) { 10c4f4: 55 push %ebp 10c4f5: 89 e5 mov %esp,%ebp 10c4f7: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c4fa: 8d 45 f4 lea -0xc(%ebp),%eax 10c4fd: 50 push %eax 10c4fe: ff 75 08 pushl 0x8(%ebp) 10c501: e8 fe 1b 00 00 call 10e104 <_Thread_Get> switch ( location ) { 10c506: 83 c4 10 add $0x10,%esp 10c509: 8b 4d f4 mov -0xc(%ebp),%ecx 10c50c: 85 c9 test %ecx,%ecx 10c50e: 75 20 jne 10c530 case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { 10c510: 52 push %edx 10c511: ff 75 0c pushl 0xc(%ebp) 10c514: 6a 00 push $0x0 10c516: 50 push %eax 10c517: e8 0c 24 00 00 call 10e928 <_Thread_Restart> 10c51c: 83 c4 10 add $0x10,%esp 10c51f: 84 c0 test %al,%al 10c521: 75 15 jne 10c538 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10c523: e8 b8 1b 00 00 call 10e0e0 <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10c528: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c52d: c9 leave 10c52e: c3 ret 10c52f: 90 nop <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c530: b8 04 00 00 00 mov $0x4,%eax } 10c535: c9 leave 10c536: c3 ret 10c537: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { _Thread_Enable_dispatch(); 10c538: e8 a3 1b 00 00 call 10e0e0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c53d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c53f: c9 leave 10c540: c3 ret =============================================================================== 0010ec98 : */ rtems_status_code rtems_task_resume( rtems_id id ) { 10ec98: 55 push %ebp 10ec99: 89 e5 mov %esp,%ebp 10ec9b: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10ec9e: 8d 45 f4 lea -0xc(%ebp),%eax 10eca1: 50 push %eax 10eca2: ff 75 08 pushl 0x8(%ebp) 10eca5: e8 36 1c 00 00 call 1108e0 <_Thread_Get> switch ( location ) { 10ecaa: 83 c4 10 add $0x10,%esp 10ecad: 8b 55 f4 mov -0xc(%ebp),%edx 10ecb0: 85 d2 test %edx,%edx 10ecb2: 74 08 je 10ecbc case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10ecb4: b8 04 00 00 00 mov $0x4,%eax } 10ecb9: c9 leave 10ecba: c3 ret 10ecbb: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 10ecbc: f6 40 10 02 testb $0x2,0x10(%eax) 10ecc0: 75 0e jne 10ecd0 _Thread_Resume( the_thread, true ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10ecc2: e8 f5 1b 00 00 call 1108bc <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10ecc7: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10eccc: c9 leave 10eccd: c3 ret 10ecce: 66 90 xchg %ax,%ax <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { _Thread_Resume( the_thread, true ); 10ecd0: 83 ec 08 sub $0x8,%esp 10ecd3: 6a 01 push $0x1 10ecd5: 50 push %eax 10ecd6: e8 29 24 00 00 call 111104 <_Thread_Resume> _Thread_Enable_dispatch(); 10ecdb: e8 dc 1b 00 00 call 1108bc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ece0: 83 c4 10 add $0x10,%esp 10ece3: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ece5: c9 leave 10ece6: c3 ret =============================================================================== 0010d628 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 10d628: 55 push %ebp 10d629: 89 e5 mov %esp,%ebp 10d62b: 56 push %esi 10d62c: 53 push %ebx 10d62d: 83 ec 10 sub $0x10,%esp 10d630: 8b 45 08 mov 0x8(%ebp),%eax 10d633: 8b 5d 0c mov 0xc(%ebp),%ebx 10d636: 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() ) 10d639: 80 3d e4 51 12 00 00 cmpb $0x0,0x1251e4 10d640: 74 66 je 10d6a8 /* * 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 ) 10d642: 83 fb 0f cmp $0xf,%ebx 10d645: 77 39 ja 10d680 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d647: 85 c0 test %eax,%eax 10d649: 74 41 je 10d68c _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d64b: 8b 15 18 9a 12 00 mov 0x129a18,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d651: 3b 42 08 cmp 0x8(%edx),%eax 10d654: 74 3c je 10d692 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d656: 83 ec 08 sub $0x8,%esp 10d659: 8d 55 f4 lea -0xc(%ebp),%edx 10d65c: 52 push %edx 10d65d: 50 push %eax 10d65e: e8 9d 1d 00 00 call 10f400 <_Thread_Get> switch ( location ) { 10d663: 83 c4 10 add $0x10,%esp 10d666: 8b 55 f4 mov -0xc(%ebp),%edx 10d669: 85 d2 test %edx,%edx 10d66b: 75 47 jne 10d6b4 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d66d: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10d673: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) _Thread_Enable_dispatch(); 10d677: e8 60 1d 00 00 call 10f3dc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10d67c: 31 c0 xor %eax,%eax 10d67e: eb 05 jmp 10d685 * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) return RTEMS_INVALID_NUMBER; 10d680: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d685: 8d 65 f8 lea -0x8(%ebp),%esp 10d688: 5b pop %ebx 10d689: 5e pop %esi 10d68a: c9 leave 10d68b: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d68c: 8b 15 18 9a 12 00 mov 0x129a18,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d692: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax 10d698: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) return RTEMS_SUCCESSFUL; 10d69c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d69e: 8d 65 f8 lea -0x8(%ebp),%esp 10d6a1: 5b pop %ebx 10d6a2: 5e pop %esi 10d6a3: c9 leave 10d6a4: c3 ret 10d6a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; 10d6a8: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d6ad: 8d 65 f8 lea -0x8(%ebp),%esp 10d6b0: 5b pop %ebx 10d6b1: 5e pop %esi 10d6b2: c9 leave 10d6b3: c3 ret case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10d6b4: b8 04 00 00 00 mov $0x4,%eax } 10d6b9: 8d 65 f8 lea -0x8(%ebp),%esp 10d6bc: 5b pop %ebx 10d6bd: 5e pop %esi 10d6be: c9 leave 10d6bf: c3 ret =============================================================================== 0010f96c : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10f96c: 55 push %ebp 10f96d: 89 e5 mov %esp,%ebp 10f96f: 56 push %esi 10f970: 53 push %ebx 10f971: 83 ec 10 sub $0x10,%esp 10f974: 8b 5d 0c mov 0xc(%ebp),%ebx 10f977: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10f97a: 85 db test %ebx,%ebx 10f97c: 74 0b je 10f989 RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 10f97e: 0f b6 05 14 52 12 00 movzbl 0x125214,%eax */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10f985: 39 c3 cmp %eax,%ebx 10f987: 77 5f ja 10f9e8 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10f989: 85 f6 test %esi,%esi 10f98b: 74 67 je 10f9f4 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10f98d: 83 ec 08 sub $0x8,%esp 10f990: 8d 45 f4 lea -0xc(%ebp),%eax 10f993: 50 push %eax 10f994: ff 75 08 pushl 0x8(%ebp) 10f997: e8 94 1d 00 00 call 111730 <_Thread_Get> switch ( location ) { 10f99c: 83 c4 10 add $0x10,%esp 10f99f: 8b 55 f4 mov -0xc(%ebp),%edx 10f9a2: 85 d2 test %edx,%edx 10f9a4: 75 36 jne 10f9dc case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10f9a6: 8b 50 14 mov 0x14(%eax),%edx 10f9a9: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10f9ab: 85 db test %ebx,%ebx 10f9ad: 74 1c je 10f9cb the_thread->real_priority = new_priority; 10f9af: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10f9b2: 8b 48 1c mov 0x1c(%eax),%ecx 10f9b5: 85 c9 test %ecx,%ecx 10f9b7: 74 05 je 10f9be 10f9b9: 3b 58 14 cmp 0x14(%eax),%ebx 10f9bc: 73 0d jae 10f9cb <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); 10f9be: 52 push %edx 10f9bf: 6a 00 push $0x0 10f9c1: 53 push %ebx 10f9c2: 50 push %eax 10f9c3: e8 40 18 00 00 call 111208 <_Thread_Change_priority> 10f9c8: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10f9cb: e8 3c 1d 00 00 call 11170c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10f9d0: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f9d2: 8d 65 f8 lea -0x8(%ebp),%esp 10f9d5: 5b pop %ebx 10f9d6: 5e pop %esi 10f9d7: c9 leave 10f9d8: c3 ret 10f9d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10f9dc: b8 04 00 00 00 mov $0x4,%eax } 10f9e1: 8d 65 f8 lea -0x8(%ebp),%esp 10f9e4: 5b pop %ebx 10f9e5: 5e pop %esi 10f9e6: c9 leave 10f9e7: c3 ret register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; 10f9e8: b8 13 00 00 00 mov $0x13,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f9ed: 8d 65 f8 lea -0x8(%ebp),%esp 10f9f0: 5b pop %ebx 10f9f1: 5e pop %esi 10f9f2: c9 leave 10f9f3: c3 ret if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) return RTEMS_INVALID_ADDRESS; 10f9f4: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f9f9: 8d 65 f8 lea -0x8(%ebp),%esp 10f9fc: 5b pop %ebx 10f9fd: 5e pop %esi 10f9fe: c9 leave 10f9ff: c3 ret =============================================================================== 0010bad4 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 10bad4: 55 push %ebp 10bad5: 89 e5 mov %esp,%ebp 10bad7: 53 push %ebx 10bad8: 83 ec 14 sub $0x14,%esp 10badb: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10bade: 85 db test %ebx,%ebx 10bae0: 74 4e je 10bb30 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10bae2: 83 ec 08 sub $0x8,%esp 10bae5: 8d 45 f4 lea -0xc(%ebp),%eax 10bae8: 50 push %eax 10bae9: ff 75 08 pushl 0x8(%ebp) 10baec: e8 db 1a 00 00 call 10d5cc <_Thread_Get> switch ( location ) { 10baf1: 83 c4 10 add $0x10,%esp 10baf4: 8b 55 f4 mov -0xc(%ebp),%edx 10baf7: 85 d2 test %edx,%edx 10baf9: 75 29 jne 10bb24 case OBJECTS_LOCAL: if ( _Thread_Start( 10bafb: 83 ec 0c sub $0xc,%esp 10bafe: ff 75 10 pushl 0x10(%ebp) 10bb01: 6a 00 push $0x0 10bb03: 53 push %ebx 10bb04: 6a 00 push $0x0 10bb06: 50 push %eax 10bb07: e8 98 25 00 00 call 10e0a4 <_Thread_Start> 10bb0c: 83 c4 20 add $0x20,%esp 10bb0f: 84 c0 test %al,%al 10bb11: 75 29 jne 10bb3c the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10bb13: e8 90 1a 00 00 call 10d5a8 <_Thread_Enable_dispatch> return RTEMS_INCORRECT_STATE; 10bb18: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bb1d: 8b 5d fc mov -0x4(%ebp),%ebx 10bb20: c9 leave 10bb21: c3 ret 10bb22: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10bb24: b8 04 00 00 00 mov $0x4,%eax } 10bb29: 8b 5d fc mov -0x4(%ebp),%ebx 10bb2c: c9 leave 10bb2d: c3 ret 10bb2e: 66 90 xchg %ax,%ax <== NOT EXECUTED { register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; 10bb30: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bb35: 8b 5d fc mov -0x4(%ebp),%ebx 10bb38: c9 leave 10bb39: c3 ret 10bb3a: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Start( the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); 10bb3c: e8 67 1a 00 00 call 10d5a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10bb41: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bb43: 8b 5d fc mov -0x4(%ebp),%ebx 10bb46: c9 leave 10bb47: c3 ret =============================================================================== 00110340 : */ rtems_status_code rtems_task_suspend( rtems_id id ) { 110340: 55 push %ebp 110341: 89 e5 mov %esp,%ebp 110343: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 110346: 8d 45 f4 lea -0xc(%ebp),%eax 110349: 50 push %eax 11034a: ff 75 08 pushl 0x8(%ebp) 11034d: e8 7a d2 ff ff call 10d5cc <_Thread_Get> switch ( location ) { 110352: 83 c4 10 add $0x10,%esp 110355: 8b 55 f4 mov -0xc(%ebp),%edx 110358: 85 d2 test %edx,%edx 11035a: 74 08 je 110364 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 11035c: b8 04 00 00 00 mov $0x4,%eax } 110361: c9 leave 110362: c3 ret 110363: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 110364: f6 40 10 02 testb $0x2,0x10(%eax) 110368: 74 0e je 110378 _Thread_Suspend( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 11036a: e8 39 d2 ff ff call 10d5a8 <_Thread_Enable_dispatch> return RTEMS_ALREADY_SUSPENDED; 11036f: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110374: c9 leave 110375: c3 ret 110376: 66 90 xchg %ax,%ax <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Suspend( the_thread ); 110378: 83 ec 0c sub $0xc,%esp 11037b: 50 push %eax 11037c: e8 07 09 00 00 call 110c88 <_Thread_Suspend> _Thread_Enable_dispatch(); 110381: e8 22 d2 ff ff call 10d5a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 110386: 83 c4 10 add $0x10,%esp 110389: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11038b: c9 leave 11038c: c3 ret =============================================================================== 0010c618 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 10c618: 55 push %ebp 10c619: 89 e5 mov %esp,%ebp 10c61b: 57 push %edi 10c61c: 56 push %esi 10c61d: 53 push %ebx 10c61e: 83 ec 1c sub $0x1c,%esp 10c621: 8b 5d 0c mov 0xc(%ebp),%ebx 10c624: 8b 7d 10 mov 0x10(%ebp),%edi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 10c627: 85 db test %ebx,%ebx 10c629: 0f 84 9d 00 00 00 je 10c6cc return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10c62f: 83 ec 08 sub $0x8,%esp 10c632: 8d 45 e4 lea -0x1c(%ebp),%eax 10c635: 50 push %eax 10c636: ff 75 08 pushl 0x8(%ebp) 10c639: e8 86 1c 00 00 call 10e2c4 <_Thread_Get> 10c63e: 89 c6 mov %eax,%esi switch (location) { 10c640: 83 c4 10 add $0x10,%esp 10c643: 8b 45 e4 mov -0x1c(%ebp),%eax 10c646: 85 c0 test %eax,%eax 10c648: 74 0e je 10c658 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c64a: b8 04 00 00 00 mov $0x4,%eax } 10c64f: 8d 65 f4 lea -0xc(%ebp),%esp 10c652: 5b pop %ebx 10c653: 5e pop %esi 10c654: 5f pop %edi 10c655: c9 leave 10c656: c3 ret 10c657: 90 nop <== NOT EXECUTED case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 10c658: 8b 86 fc 00 00 00 mov 0xfc(%esi),%eax while (tvp) { 10c65e: 85 c0 test %eax,%eax 10c660: 75 44 jne 10c6a6 10c662: 66 90 xchg %ax,%ax /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); 10c664: 83 ec 0c sub $0xc,%esp 10c667: 6a 14 push $0x14 10c669: e8 ae 2d 00 00 call 10f41c <_Workspace_Allocate> if (new == NULL) { 10c66e: 83 c4 10 add $0x10,%esp 10c671: 85 c0 test %eax,%eax 10c673: 74 4b je 10c6c0 _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 10c675: 8b 13 mov (%ebx),%edx 10c677: 89 50 08 mov %edx,0x8(%eax) new->ptr = ptr; 10c67a: 89 58 04 mov %ebx,0x4(%eax) new->dtor = dtor; 10c67d: 89 78 10 mov %edi,0x10(%eax) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 10c680: 8b 96 fc 00 00 00 mov 0xfc(%esi),%edx 10c686: 89 10 mov %edx,(%eax) the_thread->task_variables = new; 10c688: 89 86 fc 00 00 00 mov %eax,0xfc(%esi) _Thread_Enable_dispatch(); 10c68e: e8 0d 1c 00 00 call 10e2a0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c693: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c695: 8d 65 f4 lea -0xc(%ebp),%esp 10c698: 5b pop %ebx 10c699: 5e pop %esi 10c69a: 5f pop %edi 10c69b: c9 leave 10c69c: c3 ret 10c69d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (tvp->ptr == ptr) { tvp->dtor = dtor; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 10c6a0: 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) { 10c6a2: 85 c0 test %eax,%eax 10c6a4: 74 be je 10c664 if (tvp->ptr == ptr) { 10c6a6: 39 58 04 cmp %ebx,0x4(%eax) 10c6a9: 75 f5 jne 10c6a0 tvp->dtor = dtor; 10c6ab: 89 78 10 mov %edi,0x10(%eax) _Thread_Enable_dispatch(); 10c6ae: e8 ed 1b 00 00 call 10e2a0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c6b3: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c6b5: 8d 65 f4 lea -0xc(%ebp),%esp 10c6b8: 5b pop %ebx 10c6b9: 5e pop %esi 10c6ba: 5f pop %edi 10c6bb: c9 leave 10c6bc: c3 ret 10c6bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * 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(); 10c6c0: e8 db 1b 00 00 call 10e2a0 <_Thread_Enable_dispatch> return RTEMS_NO_MEMORY; 10c6c5: b8 1a 00 00 00 mov $0x1a,%eax 10c6ca: eb 83 jmp 10c64f Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) return RTEMS_INVALID_ADDRESS; 10c6cc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c6d1: 8d 65 f4 lea -0xc(%ebp),%esp 10c6d4: 5b pop %ebx 10c6d5: 5e pop %esi 10c6d6: 5f pop %edi 10c6d7: c9 leave 10c6d8: c3 ret =============================================================================== 0010c6dc : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 10c6dc: 55 push %ebp 10c6dd: 89 e5 mov %esp,%ebp 10c6df: 53 push %ebx 10c6e0: 83 ec 14 sub $0x14,%esp 10c6e3: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 10c6e6: 85 db test %ebx,%ebx 10c6e8: 74 76 je 10c760 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 10c6ea: 83 ec 08 sub $0x8,%esp 10c6ed: 8d 45 f4 lea -0xc(%ebp),%eax 10c6f0: 50 push %eax 10c6f1: ff 75 08 pushl 0x8(%ebp) 10c6f4: e8 cb 1b 00 00 call 10e2c4 <_Thread_Get> switch (location) { 10c6f9: 83 c4 10 add $0x10,%esp 10c6fc: 8b 55 f4 mov -0xc(%ebp),%edx 10c6ff: 85 d2 test %edx,%edx 10c701: 74 0d je 10c710 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c703: b8 04 00 00 00 mov $0x4,%eax } 10c708: 8b 5d fc mov -0x4(%ebp),%ebx 10c70b: c9 leave 10c70c: c3 ret 10c70d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; 10c710: 8b 88 fc 00 00 00 mov 0xfc(%eax),%ecx while (tvp) { 10c716: 85 c9 test %ecx,%ecx 10c718: 74 17 je 10c731 if (tvp->ptr == ptr) { 10c71a: 39 59 04 cmp %ebx,0x4(%ecx) 10c71d: 75 0c jne 10c72b 10c71f: eb 49 jmp 10c76a 10c721: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c724: 39 5a 04 cmp %ebx,0x4(%edx) 10c727: 74 17 je 10c740 10c729: 89 d1 mov %edx,%ecx _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 10c72b: 8b 11 mov (%ecx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 10c72d: 85 d2 test %edx,%edx 10c72f: 75 f3 jne 10c724 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10c731: e8 6a 1b 00 00 call 10e2a0 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 10c736: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c73b: 8b 5d fc mov -0x4(%ebp),%ebx 10c73e: c9 leave 10c73f: c3 ret case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 10c740: 8b 1a mov (%edx),%ebx 10c742: 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 ); 10c744: 83 ec 08 sub $0x8,%esp 10c747: 52 push %edx 10c748: 50 push %eax 10c749: e8 b2 00 00 00 call 10c800 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 10c74e: e8 4d 1b 00 00 call 10e2a0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c753: 83 c4 10 add $0x10,%esp 10c756: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c758: 8b 5d fc mov -0x4(%ebp),%ebx 10c75b: c9 leave 10c75c: c3 ret 10c75d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) return RTEMS_INVALID_ADDRESS; 10c760: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c765: 8b 5d fc mov -0x4(%ebp),%ebx 10c768: c9 leave 10c769: 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; 10c76a: 8b 11 mov (%ecx),%edx 10c76c: 89 90 fc 00 00 00 mov %edx,0xfc(%eax) 10c772: 89 ca mov %ecx,%edx 10c774: eb ce jmp 10c744 =============================================================================== 0010c778 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 10c778: 55 push %ebp 10c779: 89 e5 mov %esp,%ebp 10c77b: 56 push %esi 10c77c: 53 push %ebx 10c77d: 83 ec 10 sub $0x10,%esp 10c780: 8b 5d 0c mov 0xc(%ebp),%ebx 10c783: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 10c786: 85 db test %ebx,%ebx 10c788: 74 56 je 10c7e0 return RTEMS_INVALID_ADDRESS; if ( !result ) 10c78a: 85 f6 test %esi,%esi 10c78c: 74 52 je 10c7e0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10c78e: 83 ec 08 sub $0x8,%esp 10c791: 8d 45 f4 lea -0xc(%ebp),%eax 10c794: 50 push %eax 10c795: ff 75 08 pushl 0x8(%ebp) 10c798: e8 27 1b 00 00 call 10e2c4 <_Thread_Get> switch (location) { 10c79d: 83 c4 10 add $0x10,%esp 10c7a0: 8b 55 f4 mov -0xc(%ebp),%edx 10c7a3: 85 d2 test %edx,%edx 10c7a5: 75 2d jne 10c7d4 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 10c7a7: 8b 80 fc 00 00 00 mov 0xfc(%eax),%eax while (tvp) { 10c7ad: 85 c0 test %eax,%eax 10c7af: 75 09 jne 10c7ba 10c7b1: eb 39 jmp 10c7ec 10c7b3: 90 nop <== NOT EXECUTED */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 10c7b4: 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) { 10c7b6: 85 c0 test %eax,%eax 10c7b8: 74 32 je 10c7ec <== NEVER TAKEN if (tvp->ptr == ptr) { 10c7ba: 39 58 04 cmp %ebx,0x4(%eax) 10c7bd: 75 f5 jne 10c7b4 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 10c7bf: 8b 40 0c mov 0xc(%eax),%eax 10c7c2: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10c7c4: e8 d7 1a 00 00 call 10e2a0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c7c9: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c7cb: 8d 65 f8 lea -0x8(%ebp),%esp 10c7ce: 5b pop %ebx 10c7cf: 5e pop %esi 10c7d0: c9 leave 10c7d1: c3 ret 10c7d2: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c7d4: b8 04 00 00 00 mov $0x4,%eax } 10c7d9: 8d 65 f8 lea -0x8(%ebp),%esp 10c7dc: 5b pop %ebx 10c7dd: 5e pop %esi 10c7de: c9 leave 10c7df: c3 ret if ( !ptr ) return RTEMS_INVALID_ADDRESS; if ( !result ) return RTEMS_INVALID_ADDRESS; 10c7e0: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c7e5: 8d 65 f8 lea -0x8(%ebp),%esp 10c7e8: 5b pop %ebx 10c7e9: 5e pop %esi 10c7ea: c9 leave 10c7eb: c3 ret _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10c7ec: e8 af 1a 00 00 call 10e2a0 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 10c7f1: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c7f6: 8d 65 f8 lea -0x8(%ebp),%esp 10c7f9: 5b pop %ebx 10c7fa: 5e pop %esi 10c7fb: c9 leave 10c7fc: c3 ret =============================================================================== 0010bb48 : */ rtems_status_code rtems_task_wake_after( rtems_interval ticks ) { 10bb48: 55 push %ebp 10bb49: 89 e5 mov %esp,%ebp 10bb4b: 53 push %ebx 10bb4c: 83 ec 04 sub $0x4,%esp 10bb4f: 8b 5d 08 mov 0x8(%ebp),%ebx 10bb52: a1 34 54 12 00 mov 0x125434,%eax 10bb57: 40 inc %eax 10bb58: a3 34 54 12 00 mov %eax,0x125434 _Thread_Disable_dispatch(); if ( ticks == 0 ) { 10bb5d: 85 db test %ebx,%ebx 10bb5f: 74 53 je 10bbb4 _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); 10bb61: 83 ec 08 sub $0x8,%esp 10bb64: 6a 08 push $0x8 10bb66: ff 35 d8 56 12 00 pushl 0x1256d8 10bb6c: e8 eb 22 00 00 call 10de5c <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10bb71: a1 d8 56 12 00 mov 0x1256d8,%eax _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); _Watchdog_Initialize( 10bb76: 8b 50 08 mov 0x8(%eax),%edx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10bb79: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_watchdog->routine = routine; 10bb80: c7 40 64 f4 d3 10 00 movl $0x10d3f4,0x64(%eax) the_watchdog->id = id; 10bb87: 89 50 68 mov %edx,0x68(%eax) the_watchdog->user_data = user_data; 10bb8a: c7 40 6c 00 00 00 00 movl $0x0,0x6c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10bb91: 89 58 54 mov %ebx,0x54(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10bb94: 5a pop %edx 10bb95: 59 pop %ecx &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); 10bb96: 83 c0 48 add $0x48,%eax 10bb99: 50 push %eax 10bb9a: 68 04 55 12 00 push $0x125504 10bb9f: e8 20 29 00 00 call 10e4c4 <_Watchdog_Insert> 10bba4: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10bba7: e8 fc 19 00 00 call 10d5a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10bbac: 31 c0 xor %eax,%eax 10bbae: 8b 5d fc mov -0x4(%ebp),%ebx 10bbb1: c9 leave 10bbb2: c3 ret 10bbb3: 90 nop <== NOT EXECUTED rtems_interval ticks ) { _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); 10bbb4: e8 8b 25 00 00 call 10e144 <_Thread_Yield_processor> _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 10bbb9: e8 ea 19 00 00 call 10d5a8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10bbbe: 31 c0 xor %eax,%eax 10bbc0: 8b 5d fc mov -0x4(%ebp),%ebx 10bbc3: c9 leave 10bbc4: c3 ret =============================================================================== 0010c98c : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 10c98c: 55 push %ebp 10c98d: 89 e5 mov %esp,%ebp 10c98f: 53 push %ebx 10c990: 83 ec 14 sub $0x14,%esp 10c993: 8b 5d 08 mov 0x8(%ebp),%ebx Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10c996: 80 3d 68 8a 12 00 00 cmpb $0x0,0x128a68 10c99d: 0f 84 a9 00 00 00 je 10ca4c return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10c9a3: 85 db test %ebx,%ebx 10c9a5: 0f 84 ad 00 00 00 je 10ca58 return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 10c9ab: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) if ( !_TOD_Validate( time_buffer ) ) 10c9b2: 83 ec 0c sub $0xc,%esp 10c9b5: 53 push %ebx 10c9b6: e8 d1 f3 ff ff call 10bd8c <_TOD_Validate> 10c9bb: 83 c4 10 add $0x10,%esp 10c9be: 84 c0 test %al,%al 10c9c0: 75 0a jne 10c9cc return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; 10c9c2: b8 14 00 00 00 mov $0x14,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c9c7: 8b 5d fc mov -0x4(%ebp),%ebx 10c9ca: c9 leave 10c9cb: c3 ret time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 10c9cc: 83 ec 0c sub $0xc,%esp 10c9cf: 53 push %ebx 10c9d0: e8 2b f3 ff ff call 10bd00 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 10c9d5: 83 c4 10 add $0x10,%esp 10c9d8: 3b 05 e8 8a 12 00 cmp 0x128ae8,%eax 10c9de: 76 e2 jbe 10c9c2 10c9e0: 8b 15 54 8a 12 00 mov 0x128a54,%edx 10c9e6: 42 inc %edx 10c9e7: 89 15 54 8a 12 00 mov %edx,0x128a54 return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 10c9ed: 83 ec 08 sub $0x8,%esp 10c9f0: 6a 10 push $0x10 10c9f2: ff 35 f8 8c 12 00 pushl 0x128cf8 10c9f8: 89 45 f4 mov %eax,-0xc(%ebp) 10c9fb: e8 98 23 00 00 call 10ed98 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10ca00: 8b 15 f8 8c 12 00 mov 0x128cf8,%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( 10ca06: 8b 4a 08 mov 0x8(%edx),%ecx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10ca09: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 10ca10: c7 42 64 30 e3 10 00 movl $0x10e330,0x64(%edx) the_watchdog->id = id; 10ca17: 89 4a 68 mov %ecx,0x68(%edx) the_watchdog->user_data = user_data; 10ca1a: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_seconds( 10ca21: 8b 45 f4 mov -0xc(%ebp),%eax 10ca24: 2b 05 e8 8a 12 00 sub 0x128ae8,%eax 10ca2a: 89 42 54 mov %eax,0x54(%edx) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 10ca2d: 58 pop %eax 10ca2e: 59 pop %ecx 10ca2f: 83 c2 48 add $0x48,%edx 10ca32: 52 push %edx 10ca33: 68 18 8b 12 00 push $0x128b18 10ca38: e8 3b 2a 00 00 call 10f478 <_Watchdog_Insert> &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 10ca3d: e8 a2 1a 00 00 call 10e4e4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ca42: 83 c4 10 add $0x10,%esp 10ca45: 31 c0 xor %eax,%eax 10ca47: e9 7b ff ff ff jmp 10c9c7 ) { Watchdog_Interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 10ca4c: b8 0b 00 00 00 mov $0xb,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10ca51: 8b 5d fc mov -0x4(%ebp),%ebx 10ca54: c9 leave 10ca55: c3 ret 10ca56: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; 10ca58: b8 09 00 00 00 mov $0x9,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10ca5d: 8b 5d fc mov -0x4(%ebp),%ebx 10ca60: c9 leave 10ca61: c3 ret =============================================================================== 001186b0 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 1186b0: 55 push %ebp 1186b1: 89 e5 mov %esp,%ebp 1186b3: 83 ec 1c sub $0x1c,%esp Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); 1186b6: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 1186b9: 50 push %eax 1186ba: ff 75 08 pushl 0x8(%ebp) 1186bd: 68 a0 0c 14 00 push $0x140ca0 1186c2: e8 81 2a 00 00 call 11b148 <_Objects_Get> switch ( location ) { 1186c7: 83 c4 10 add $0x10,%esp 1186ca: 8b 55 f4 mov -0xc(%ebp),%edx 1186cd: 85 d2 test %edx,%edx 1186cf: 74 07 je 1186d8 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1186d1: b8 04 00 00 00 mov $0x4,%eax } 1186d6: c9 leave 1186d7: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 1186d8: 83 78 38 04 cmpl $0x4,0x38(%eax) 1186dc: 74 0f je 1186ed <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 1186de: 83 ec 0c sub $0xc,%esp 1186e1: 83 c0 10 add $0x10,%eax 1186e4: 50 push %eax 1186e5: e8 9e 46 00 00 call 11cd88 <_Watchdog_Remove> 1186ea: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 1186ed: e8 ba 32 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1186f2: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1186f4: c9 leave 1186f5: c3 ret =============================================================================== 0010bfbc : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 10bfbc: 55 push %ebp 10bfbd: 89 e5 mov %esp,%ebp 10bfbf: 57 push %edi 10bfc0: 56 push %esi 10bfc1: 53 push %ebx 10bfc2: 83 ec 0c sub $0xc,%esp 10bfc5: 8b 5d 08 mov 0x8(%ebp),%ebx 10bfc8: 8b 75 0c mov 0xc(%ebp),%esi Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 10bfcb: 85 db test %ebx,%ebx 10bfcd: 74 6d je 10c03c return RTEMS_INVALID_NAME; if ( !id ) 10bfcf: 85 f6 test %esi,%esi 10bfd1: 0f 84 89 00 00 00 je 10c060 10bfd7: a1 94 77 12 00 mov 0x127794,%eax 10bfdc: 40 inc %eax 10bfdd: a3 94 77 12 00 mov %eax,0x127794 * 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 ); 10bfe2: 83 ec 0c sub $0xc,%esp 10bfe5: 68 a0 7a 12 00 push $0x127aa0 10bfea: e8 59 0e 00 00 call 10ce48 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 10bfef: 83 c4 10 add $0x10,%esp 10bff2: 85 c0 test %eax,%eax 10bff4: 74 56 je 10c04c _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 10bff6: 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; 10bffd: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10c004: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10c00b: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10c012: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10c019: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10c01c: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c01f: 8b 0d bc 7a 12 00 mov 0x127abc,%ecx 10c025: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c028: 89 58 0c mov %ebx,0xc(%eax) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 10c02b: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10c02d: e8 32 1b 00 00 call 10db64 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c032: 31 c0 xor %eax,%eax } 10c034: 8d 65 f4 lea -0xc(%ebp),%esp 10c037: 5b pop %ebx 10c038: 5e pop %esi 10c039: 5f pop %edi 10c03a: c9 leave 10c03b: c3 ret ) { Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 10c03c: b8 03 00 00 00 mov $0x3,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c041: 8d 65 f4 lea -0xc(%ebp),%esp 10c044: 5b pop %ebx 10c045: 5e pop %esi 10c046: 5f pop %edi 10c047: c9 leave 10c048: c3 ret 10c049: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { _Thread_Enable_dispatch(); 10c04c: e8 13 1b 00 00 call 10db64 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 10c051: b8 05 00 00 00 mov $0x5,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c056: 8d 65 f4 lea -0xc(%ebp),%esp 10c059: 5b pop %ebx 10c05a: 5e pop %esi 10c05b: 5f pop %edi 10c05c: c9 leave 10c05d: c3 ret 10c05e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 10c060: b8 09 00 00 00 mov $0x9,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c065: 8d 65 f4 lea -0xc(%ebp),%esp 10c068: 5b pop %ebx 10c069: 5e pop %esi 10c06a: 5f pop %edi 10c06b: c9 leave 10c06c: c3 ret =============================================================================== 001187ac : */ rtems_status_code rtems_timer_delete( rtems_id id ) { 1187ac: 55 push %ebp 1187ad: 89 e5 mov %esp,%ebp 1187af: 53 push %ebx 1187b0: 83 ec 18 sub $0x18,%esp Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); 1187b3: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 1187b6: 50 push %eax 1187b7: ff 75 08 pushl 0x8(%ebp) 1187ba: 68 a0 0c 14 00 push $0x140ca0 1187bf: e8 84 29 00 00 call 11b148 <_Objects_Get> 1187c4: 89 c3 mov %eax,%ebx switch ( location ) { 1187c6: 83 c4 10 add $0x10,%esp 1187c9: 8b 4d f4 mov -0xc(%ebp),%ecx 1187cc: 85 c9 test %ecx,%ecx 1187ce: 75 38 jne 118808 case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); 1187d0: 83 ec 08 sub $0x8,%esp 1187d3: 50 push %eax 1187d4: 68 a0 0c 14 00 push $0x140ca0 1187d9: e8 f2 24 00 00 call 11acd0 <_Objects_Close> (void) _Watchdog_Remove( &the_timer->Ticker ); 1187de: 8d 43 10 lea 0x10(%ebx),%eax 1187e1: 89 04 24 mov %eax,(%esp) 1187e4: e8 9f 45 00 00 call 11cd88 <_Watchdog_Remove> */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 1187e9: 58 pop %eax 1187ea: 5a pop %edx 1187eb: 53 push %ebx 1187ec: 68 a0 0c 14 00 push $0x140ca0 1187f1: e8 d6 27 00 00 call 11afcc <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 1187f6: e8 b1 31 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1187fb: 83 c4 10 add $0x10,%esp 1187fe: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118800: 8b 5d fc mov -0x4(%ebp),%ebx 118803: c9 leave 118804: c3 ret 118805: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118808: b8 04 00 00 00 mov $0x4,%eax } 11880d: 8b 5d fc mov -0x4(%ebp),%ebx 118810: c9 leave 118811: c3 ret =============================================================================== 0010c070 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 10c070: 55 push %ebp 10c071: 89 e5 mov %esp,%ebp 10c073: 57 push %edi 10c074: 56 push %esi 10c075: 53 push %ebx 10c076: 83 ec 2c sub $0x2c,%esp 10c079: 8b 5d 0c mov 0xc(%ebp),%ebx 10c07c: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 10c07f: 85 db test %ebx,%ebx 10c081: 0f 84 99 00 00 00 je 10c120 return RTEMS_INVALID_NUMBER; if ( !routine ) 10c087: 85 f6 test %esi,%esi 10c089: 0f 84 b1 00 00 00 je 10c140 Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 10c08f: 57 push %edi return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); 10c090: 8d 45 e4 lea -0x1c(%ebp),%eax 10c093: 50 push %eax 10c094: ff 75 08 pushl 0x8(%ebp) 10c097: 68 a0 7a 12 00 push $0x127aa0 10c09c: e8 5f 12 00 00 call 10d300 <_Objects_Get> 10c0a1: 89 c7 mov %eax,%edi switch ( location ) { 10c0a3: 83 c4 10 add $0x10,%esp 10c0a6: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c0a9: 85 c9 test %ecx,%ecx 10c0ab: 74 0f je 10c0bc #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10c0ad: b8 04 00 00 00 mov $0x4,%eax } 10c0b2: 8d 65 f4 lea -0xc(%ebp),%esp 10c0b5: 5b pop %ebx 10c0b6: 5e pop %esi 10c0b7: 5f pop %edi 10c0b8: c9 leave 10c0b9: c3 ret 10c0ba: 66 90 xchg %ax,%ax <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 10c0bc: 8d 50 10 lea 0x10(%eax),%edx 10c0bf: 83 ec 0c sub $0xc,%esp 10c0c2: 52 push %edx 10c0c3: 89 55 d4 mov %edx,-0x2c(%ebp) 10c0c6: e8 ed 2a 00 00 call 10ebb8 <_Watchdog_Remove> _ISR_Disable( level ); 10c0cb: 9c pushf 10c0cc: fa cli 10c0cd: 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 ) { 10c0ce: 83 c4 10 add $0x10,%esp 10c0d1: 8b 57 18 mov 0x18(%edi),%edx 10c0d4: 85 d2 test %edx,%edx 10c0d6: 8b 55 d4 mov -0x2c(%ebp),%edx 10c0d9: 75 55 jne 10c130 /* * 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; 10c0db: 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; 10c0e2: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 10c0e9: 89 77 2c mov %esi,0x2c(%edi) the_watchdog->id = id; 10c0ec: 8b 4d 08 mov 0x8(%ebp),%ecx 10c0ef: 89 4f 30 mov %ecx,0x30(%edi) the_watchdog->user_data = user_data; 10c0f2: 8b 4d 14 mov 0x14(%ebp),%ecx 10c0f5: 89 4f 34 mov %ecx,0x34(%edi) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 10c0f8: 50 push %eax 10c0f9: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c0fa: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c0fd: 83 ec 08 sub $0x8,%esp 10c100: 52 push %edx 10c101: 68 64 78 12 00 push $0x127864 10c106: e8 75 29 00 00 call 10ea80 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 10c10b: e8 54 1a 00 00 call 10db64 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c110: 83 c4 10 add $0x10,%esp 10c113: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c115: 8d 65 f4 lea -0xc(%ebp),%esp 10c118: 5b pop %ebx 10c119: 5e pop %esi 10c11a: 5f pop %edi 10c11b: c9 leave 10c11c: c3 ret 10c11d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; 10c120: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c125: 8d 65 f4 lea -0xc(%ebp),%esp 10c128: 5b pop %ebx 10c129: 5e pop %esi 10c12a: 5f pop %edi 10c12b: c9 leave 10c12c: c3 ret 10c12d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * 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 ); 10c130: 50 push %eax 10c131: 9d popf _Thread_Enable_dispatch(); 10c132: e8 2d 1a 00 00 call 10db64 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10c137: 31 c0 xor %eax,%eax 10c139: e9 74 ff ff ff jmp 10c0b2 10c13e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) return RTEMS_INVALID_ADDRESS; 10c140: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c145: 8d 65 f4 lea -0xc(%ebp),%esp 10c148: 5b pop %ebx 10c149: 5e pop %esi 10c14a: 5f pop %edi 10c14b: c9 leave 10c14c: c3 ret =============================================================================== 001188f4 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 1188f4: 55 push %ebp 1188f5: 89 e5 mov %esp,%ebp 1188f7: 57 push %edi 1188f8: 56 push %esi 1188f9: 53 push %ebx 1188fa: 83 ec 2c sub $0x2c,%esp 1188fd: 8b 75 08 mov 0x8(%ebp),%esi 118900: 8b 7d 0c mov 0xc(%ebp),%edi 118903: 8b 5d 10 mov 0x10(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 118906: 80 3d a8 09 14 00 00 cmpb $0x0,0x1409a8 11890d: 75 0d jne 11891c return RTEMS_NOT_DEFINED; 11890f: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118914: 8d 65 f4 lea -0xc(%ebp),%esp 118917: 5b pop %ebx 118918: 5e pop %esi 118919: 5f pop %edi 11891a: c9 leave 11891b: c3 ret rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 11891c: 83 ec 0c sub $0xc,%esp 11891f: 57 push %edi 118920: e8 93 d4 ff ff call 115db8 <_TOD_Validate> 118925: 83 c4 10 add $0x10,%esp 118928: 84 c0 test %al,%al 11892a: 74 1e je 11894a return RTEMS_INVALID_CLOCK; if ( !routine ) 11892c: 85 db test %ebx,%ebx 11892e: 0f 84 a4 00 00 00 je 1189d8 return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 118934: 83 ec 0c sub $0xc,%esp 118937: 57 push %edi 118938: e8 ef d3 ff ff call 115d2c <_TOD_To_seconds> 11893d: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 11893f: 83 c4 10 add $0x10,%esp 118942: 3b 05 28 0a 14 00 cmp 0x140a28,%eax 118948: 77 0e ja 118958 return RTEMS_INVALID_CLOCK; 11894a: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11894f: 8d 65 f4 lea -0xc(%ebp),%esp 118952: 5b pop %ebx 118953: 5e pop %esi 118954: 5f pop %edi 118955: c9 leave 118956: c3 ret 118957: 90 nop <== NOT EXECUTED 118958: 50 push %eax seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); 118959: 8d 45 e4 lea -0x1c(%ebp),%eax 11895c: 50 push %eax 11895d: 56 push %esi 11895e: 68 a0 0c 14 00 push $0x140ca0 118963: e8 e0 27 00 00 call 11b148 <_Objects_Get> switch ( location ) { 118968: 83 c4 10 add $0x10,%esp 11896b: 8b 4d e4 mov -0x1c(%ebp),%ecx 11896e: 85 c9 test %ecx,%ecx 118970: 75 5a jne 1189cc case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118972: 8d 48 10 lea 0x10(%eax),%ecx 118975: 83 ec 0c sub $0xc,%esp 118978: 51 push %ecx 118979: 89 45 d0 mov %eax,-0x30(%ebp) 11897c: 89 4d d4 mov %ecx,-0x2c(%ebp) 11897f: e8 04 44 00 00 call 11cd88 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY; 118984: 8b 55 d0 mov -0x30(%ebp),%edx 118987: 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; 11898e: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118995: 89 5a 2c mov %ebx,0x2c(%edx) the_watchdog->id = id; 118998: 89 72 30 mov %esi,0x30(%edx) the_watchdog->user_data = user_data; 11899b: 8b 45 14 mov 0x14(%ebp),%eax 11899e: 89 42 34 mov %eax,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( 1189a1: 2b 3d 28 0a 14 00 sub 0x140a28,%edi 1189a7: 89 7a 1c mov %edi,0x1c(%edx) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 1189aa: 58 pop %eax 1189ab: 5a pop %edx 1189ac: 8b 4d d4 mov -0x2c(%ebp),%ecx 1189af: 51 push %ecx 1189b0: 68 58 0a 14 00 push $0x140a58 1189b5: e8 96 42 00 00 call 11cc50 <_Watchdog_Insert> &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 1189ba: e8 ed 2f 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1189bf: 83 c4 10 add $0x10,%esp 1189c2: 31 c0 xor %eax,%eax 1189c4: e9 4b ff ff ff jmp 118914 1189c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1189cc: b8 04 00 00 00 mov $0x4,%eax 1189d1: e9 3e ff ff ff jmp 118914 1189d6: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) return RTEMS_INVALID_ADDRESS; 1189d8: b8 09 00 00 00 mov $0x9,%eax 1189dd: e9 32 ff ff ff jmp 118914 =============================================================================== 001189e4 : rtems_status_code rtems_timer_get_information( rtems_id id, rtems_timer_information *the_info ) { 1189e4: 55 push %ebp 1189e5: 89 e5 mov %esp,%ebp 1189e7: 53 push %ebx 1189e8: 83 ec 14 sub $0x14,%esp 1189eb: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 1189ee: 85 db test %ebx,%ebx 1189f0: 74 4a je 118a3c 1189f2: 51 push %ecx return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); 1189f3: 8d 45 f4 lea -0xc(%ebp),%eax 1189f6: 50 push %eax 1189f7: ff 75 08 pushl 0x8(%ebp) 1189fa: 68 a0 0c 14 00 push $0x140ca0 1189ff: e8 44 27 00 00 call 11b148 <_Objects_Get> switch ( location ) { 118a04: 83 c4 10 add $0x10,%esp 118a07: 8b 55 f4 mov -0xc(%ebp),%edx 118a0a: 85 d2 test %edx,%edx 118a0c: 74 0a je 118a18 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118a0e: b8 04 00 00 00 mov $0x4,%eax } 118a13: 8b 5d fc mov -0x4(%ebp),%ebx 118a16: c9 leave 118a17: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 118a18: 8b 50 38 mov 0x38(%eax),%edx 118a1b: 89 13 mov %edx,(%ebx) the_info->initial = the_timer->Ticker.initial; 118a1d: 8b 50 1c mov 0x1c(%eax),%edx 118a20: 89 53 04 mov %edx,0x4(%ebx) the_info->start_time = the_timer->Ticker.start_time; 118a23: 8b 50 24 mov 0x24(%eax),%edx 118a26: 89 53 08 mov %edx,0x8(%ebx) the_info->stop_time = the_timer->Ticker.stop_time; 118a29: 8b 40 28 mov 0x28(%eax),%eax 118a2c: 89 43 0c mov %eax,0xc(%ebx) _Thread_Enable_dispatch(); 118a2f: e8 78 2f 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118a34: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a36: 8b 5d fc mov -0x4(%ebp),%ebx 118a39: c9 leave 118a3a: c3 ret 118a3b: 90 nop <== NOT EXECUTED { Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) return RTEMS_INVALID_ADDRESS; 118a3c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a41: 8b 5d fc mov -0x4(%ebp),%ebx 118a44: c9 leave 118a45: c3 ret =============================================================================== 00119070 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 119070: 55 push %ebp 119071: 89 e5 mov %esp,%ebp 119073: 56 push %esi 119074: 53 push %ebx 119075: 83 ec 10 sub $0x10,%esp 119078: 8b 45 08 mov 0x8(%ebp),%eax 11907b: 85 c0 test %eax,%eax 11907d: 74 41 je 1190c0 ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 11907f: 0f b6 15 34 83 13 00 movzbl 0x138334,%edx */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 119086: 39 d0 cmp %edx,%eax 119088: 76 42 jbe 1190cc * 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 ) 11908a: 40 inc %eax 11908b: 75 33 jne 1190c0 return RTEMS_INVALID_PRIORITY; _priority = 0; 11908d: 31 f6 xor %esi,%esi 11908f: 8b 15 94 09 14 00 mov 0x140994,%edx 119095: 42 inc %edx 119096: 89 15 94 09 14 00 mov %edx,0x140994 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 11909c: 8a 1d c0 c2 13 00 mov 0x13c2c0,%bl initialized = true; 1190a2: c6 05 c0 c2 13 00 01 movb $0x1,0x13c2c0 _Thread_Enable_dispatch(); 1190a9: e8 fe 28 00 00 call 11b9ac <_Thread_Enable_dispatch> if ( tmpInitialized ) 1190ae: 84 db test %bl,%bl 1190b0: 74 1e je 1190d0 return RTEMS_INCORRECT_STATE; 1190b2: b8 0e 00 00 00 mov $0xe,%eax initialized = false; } #endif return status; } 1190b7: 8d 65 f8 lea -0x8(%ebp),%esp 1190ba: 5b pop %ebx 1190bb: 5e pop %esi 1190bc: c9 leave 1190bd: c3 ret 1190be: 66 90 xchg %ax,%ax <== NOT EXECUTED * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) return RTEMS_INVALID_PRIORITY; 1190c0: b8 13 00 00 00 mov $0x13,%eax initialized = false; } #endif return status; } 1190c5: 8d 65 f8 lea -0x8(%ebp),%esp 1190c8: 5b pop %ebx 1190c9: 5e pop %esi 1190ca: c9 leave 1190cb: c3 ret 1190cc: 89 c6 mov %eax,%esi 1190ce: eb bf jmp 11908f * 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( 1190d0: 83 ec 08 sub $0x8,%esp 1190d3: 8d 45 f4 lea -0xc(%ebp),%eax 1190d6: 50 push %eax 1190d7: 8b 45 10 mov 0x10(%ebp),%eax 1190da: 80 cc 80 or $0x80,%ah 1190dd: 50 push %eax 1190de: 68 00 01 00 00 push $0x100 1190e3: ff 75 0c pushl 0xc(%ebp) 1190e6: 56 push %esi 1190e7: 68 45 4d 49 54 push $0x54494d45 1190ec: e8 e3 ec ff ff call 117dd4 /* 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) { 1190f1: 83 c4 20 add $0x20,%esp 1190f4: 85 c0 test %eax,%eax 1190f6: 74 10 je 119108 initialized = false; 1190f8: c6 05 c0 c2 13 00 00 movb $0x0,0x13c2c0 initialized = false; } #endif return status; } 1190ff: 8d 65 f8 lea -0x8(%ebp),%esp 119102: 5b pop %ebx 119103: 5e pop %esi 119104: c9 leave 119105: c3 ret 119106: 66 90 xchg %ax,%ax <== NOT EXECUTED * 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) 119108: 8b 45 f4 mov -0xc(%ebp),%eax */ #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return NULL; #endif return information->local_table[ index ]; 11910b: 0f b7 c8 movzwl %ax,%ecx 11910e: 8b 15 3c 09 14 00 mov 0x14093c,%edx /* * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( 119114: 8b 14 8a mov (%edx,%ecx,4),%edx 119117: 89 15 40 c2 13 00 mov %edx,0x13c240 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11911d: c7 05 70 c2 13 00 74 movl $0x13c274,0x13c270 119124: c2 13 00 the_chain->permanent_null = NULL; 119127: c7 05 74 c2 13 00 00 movl $0x0,0x13c274 11912e: 00 00 00 the_chain->last = _Chain_Head(the_chain); 119131: c7 05 78 c2 13 00 70 movl $0x13c270,0x13c278 119138: c2 13 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11913b: c7 05 a8 c2 13 00 ac movl $0x13c2ac,0x13c2a8 119142: c2 13 00 the_chain->permanent_null = NULL; 119145: c7 05 ac c2 13 00 00 movl $0x0,0x13c2ac 11914c: 00 00 00 the_chain->last = _Chain_Head(the_chain); 11914f: c7 05 b0 c2 13 00 a8 movl $0x13c2a8,0x13c2b0 119156: c2 13 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 119159: c7 05 50 c2 13 00 00 movl $0x0,0x13c250 119160: 00 00 00 the_watchdog->routine = routine; 119163: c7 05 64 c2 13 00 f8 movl $0x11b7f8,0x13c264 11916a: b7 11 00 the_watchdog->id = id; 11916d: a3 68 c2 13 00 mov %eax,0x13c268 the_watchdog->user_data = user_data; 119172: c7 05 6c c2 13 00 00 movl $0x0,0x13c26c 119179: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11917c: c7 05 88 c2 13 00 00 movl $0x0,0x13c288 119183: 00 00 00 the_watchdog->routine = routine; 119186: c7 05 9c c2 13 00 f8 movl $0x11b7f8,0x13c29c 11918d: b7 11 00 the_watchdog->id = id; 119190: a3 a0 c2 13 00 mov %eax,0x13c2a0 the_watchdog->user_data = user_data; 119195: c7 05 a4 c2 13 00 00 movl $0x0,0x13c2a4 11919c: 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; 11919f: c7 05 44 c2 13 00 40 movl $0x118f40,0x13c244 1191a6: 8f 11 00 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 1191a9: 8b 15 e4 0a 14 00 mov 0x140ae4,%edx 1191af: 89 15 7c c2 13 00 mov %edx,0x13c27c ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 1191b5: 8b 15 28 0a 14 00 mov 0x140a28,%edx 1191bb: 89 15 b4 c2 13 00 mov %edx,0x13c2b4 ts->insert_chain = NULL; 1191c1: c7 05 b8 c2 13 00 00 movl $0x0,0x13c2b8 1191c8: 00 00 00 ts->active = false; 1191cb: c6 05 bc c2 13 00 00 movb $0x0,0x13c2bc /* * The default timer server is now available. */ _Timer_server = ts; 1191d2: c7 05 e0 0c 14 00 40 movl $0x13c240,0x140ce0 1191d9: c2 13 00 /* * Start the timer server */ status = rtems_task_start( 1191dc: 53 push %ebx 1191dd: 68 40 c2 13 00 push $0x13c240 1191e2: 68 94 8d 11 00 push $0x118d94 1191e7: 50 push %eax 1191e8: e8 a7 f2 ff ff call 118494 if (status) { initialized = false; } #endif return status; 1191ed: 83 c4 10 add $0x10,%esp 1191f0: e9 d0 fe ff ff jmp 1190c5 =============================================================================== 00118a6c : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 118a6c: 55 push %ebp 118a6d: 89 e5 mov %esp,%ebp 118a6f: 56 push %esi 118a70: 53 push %ebx 118a71: 83 ec 24 sub $0x24,%esp Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); 118a74: 8d 45 f4 lea -0xc(%ebp),%eax 118a77: 50 push %eax 118a78: ff 75 08 pushl 0x8(%ebp) 118a7b: 68 a0 0c 14 00 push $0x140ca0 118a80: e8 c3 26 00 00 call 11b148 <_Objects_Get> 118a85: 89 c3 mov %eax,%ebx switch ( location ) { 118a87: 83 c4 10 add $0x10,%esp 118a8a: 8b 45 f4 mov -0xc(%ebp),%eax 118a8d: 85 c0 test %eax,%eax 118a8f: 74 0f je 118aa0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118a91: b8 04 00 00 00 mov $0x4,%eax } 118a96: 8d 65 f8 lea -0x8(%ebp),%esp 118a99: 5b pop %ebx 118a9a: 5e pop %esi 118a9b: c9 leave 118a9c: c3 ret 118a9d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { 118aa0: 8b 43 38 mov 0x38(%ebx),%eax 118aa3: 85 c0 test %eax,%eax 118aa5: 74 1d je 118ac4 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118aa7: 48 dec %eax 118aa8: 74 3a je 118ae4 /* * Must be dormant or time of day timer (e.g. TIMER_DORMANT, * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; 118aaa: b8 0b 00 00 00 mov $0xb,%eax } _Thread_Enable_dispatch(); 118aaf: 89 45 e4 mov %eax,-0x1c(%ebp) 118ab2: e8 f5 2e 00 00 call 11b9ac <_Thread_Enable_dispatch> return status; 118ab7: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118aba: 8d 65 f8 lea -0x8(%ebp),%esp 118abd: 5b pop %ebx 118abe: 5e pop %esi 118abf: c9 leave 118ac0: c3 ret 118ac1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); 118ac4: 83 c3 10 add $0x10,%ebx 118ac7: 83 ec 0c sub $0xc,%esp 118aca: 53 push %ebx 118acb: e8 b8 42 00 00 call 11cd88 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 118ad0: 59 pop %ecx 118ad1: 5e pop %esi 118ad2: 53 push %ebx 118ad3: 68 64 0a 14 00 push $0x140a64 118ad8: e8 73 41 00 00 call 11cc50 <_Watchdog_Insert> 118add: 83 c4 10 add $0x10,%esp rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 118ae0: 31 c0 xor %eax,%eax 118ae2: eb cb jmp 118aaf case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { Timer_server_Control *timer_server = _Timer_server; 118ae4: 8b 35 e0 0c 14 00 mov 0x140ce0,%esi if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 118aea: 83 ec 0c sub $0xc,%esp 118aed: 8d 43 10 lea 0x10(%ebx),%eax 118af0: 50 push %eax 118af1: e8 92 42 00 00 call 11cd88 <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 118af6: 58 pop %eax 118af7: 5a pop %edx 118af8: 53 push %ebx 118af9: 56 push %esi 118afa: ff 56 04 call *0x4(%esi) 118afd: 83 c4 10 add $0x10,%esp rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 118b00: 31 c0 xor %eax,%eax 118b02: eb ab jmp 118aaf =============================================================================== 00118b04 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 118b04: 55 push %ebp 118b05: 89 e5 mov %esp,%ebp 118b07: 57 push %edi 118b08: 56 push %esi 118b09: 53 push %ebx 118b0a: 83 ec 2c sub $0x2c,%esp 118b0d: 8b 7d 0c mov 0xc(%ebp),%edi 118b10: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 118b13: 8b 1d e0 0c 14 00 mov 0x140ce0,%ebx if ( !timer_server ) 118b19: 85 db test %ebx,%ebx 118b1b: 0f 84 9f 00 00 00 je 118bc0 return RTEMS_INCORRECT_STATE; if ( !routine ) 118b21: 85 f6 test %esi,%esi 118b23: 0f 84 a3 00 00 00 je 118bcc return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 118b29: 85 ff test %edi,%edi 118b2b: 75 0f jne 118b3c return RTEMS_INVALID_NUMBER; 118b2d: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118b32: 8d 65 f4 lea -0xc(%ebp),%esp 118b35: 5b pop %ebx 118b36: 5e pop %esi 118b37: 5f pop %edi 118b38: c9 leave 118b39: c3 ret 118b3a: 66 90 xchg %ax,%ax <== NOT EXECUTED 118b3c: 52 push %edx return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); 118b3d: 8d 45 e4 lea -0x1c(%ebp),%eax 118b40: 50 push %eax 118b41: ff 75 08 pushl 0x8(%ebp) 118b44: 68 a0 0c 14 00 push $0x140ca0 118b49: e8 fa 25 00 00 call 11b148 <_Objects_Get> 118b4e: 89 c2 mov %eax,%edx switch ( location ) { 118b50: 83 c4 10 add $0x10,%esp 118b53: 8b 45 e4 mov -0x1c(%ebp),%eax 118b56: 85 c0 test %eax,%eax 118b58: 75 56 jne 118bb0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118b5a: 83 ec 0c sub $0xc,%esp 118b5d: 8d 42 10 lea 0x10(%edx),%eax 118b60: 50 push %eax 118b61: 89 55 d4 mov %edx,-0x2c(%ebp) 118b64: e8 1f 42 00 00 call 11cd88 <_Watchdog_Remove> _ISR_Disable( level ); 118b69: 9c pushf 118b6a: fa cli 118b6b: 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 ) { 118b6c: 83 c4 10 add $0x10,%esp 118b6f: 8b 55 d4 mov -0x2c(%ebp),%edx 118b72: 8b 4a 18 mov 0x18(%edx),%ecx 118b75: 85 c9 test %ecx,%ecx 118b77: 75 5f jne 118bd8 /* * 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; 118b79: 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; 118b80: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118b87: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118b8a: 8b 4d 08 mov 0x8(%ebp),%ecx 118b8d: 89 4a 30 mov %ecx,0x30(%edx) the_watchdog->user_data = user_data; 118b90: 8b 4d 14 mov 0x14(%ebp),%ecx 118b93: 89 4a 34 mov %ecx,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 118b96: 89 7a 1c mov %edi,0x1c(%edx) _ISR_Enable( level ); 118b99: 50 push %eax 118b9a: 9d popf (*timer_server->schedule_operation)( timer_server, the_timer ); 118b9b: 83 ec 08 sub $0x8,%esp 118b9e: 52 push %edx 118b9f: 53 push %ebx 118ba0: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 118ba3: e8 04 2e 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118ba8: 83 c4 10 add $0x10,%esp 118bab: 31 c0 xor %eax,%eax 118bad: eb 83 jmp 118b32 118baf: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118bb0: b8 04 00 00 00 mov $0x4,%eax } 118bb5: 8d 65 f4 lea -0xc(%ebp),%esp 118bb8: 5b pop %ebx 118bb9: 5e pop %esi 118bba: 5f pop %edi 118bbb: c9 leave 118bbc: c3 ret 118bbd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; 118bc0: b8 0e 00 00 00 mov $0xe,%eax 118bc5: e9 68 ff ff ff jmp 118b32 118bca: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !routine ) return RTEMS_INVALID_ADDRESS; 118bcc: b8 09 00 00 00 mov $0x9,%eax 118bd1: e9 5c ff ff ff jmp 118b32 118bd6: 66 90 xchg %ax,%ax <== NOT EXECUTED * 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 ); 118bd8: 50 push %eax 118bd9: 9d popf _Thread_Enable_dispatch(); 118bda: e8 cd 2d 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118bdf: 31 c0 xor %eax,%eax 118be1: e9 4c ff ff ff jmp 118b32 =============================================================================== 00118be8 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 118be8: 55 push %ebp 118be9: 89 e5 mov %esp,%ebp 118beb: 57 push %edi 118bec: 56 push %esi 118bed: 53 push %ebx 118bee: 83 ec 2c sub $0x2c,%esp 118bf1: 8b 7d 0c mov 0xc(%ebp),%edi 118bf4: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 118bf7: 8b 1d e0 0c 14 00 mov 0x140ce0,%ebx if ( !timer_server ) 118bfd: 85 db test %ebx,%ebx 118bff: 0f 84 d7 00 00 00 je 118cdc return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 118c05: 80 3d a8 09 14 00 00 cmpb $0x0,0x1409a8 118c0c: 0f 84 aa 00 00 00 je 118cbc <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 118c12: 85 f6 test %esi,%esi 118c14: 0f 84 b2 00 00 00 je 118ccc return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 118c1a: 83 ec 0c sub $0xc,%esp 118c1d: 57 push %edi 118c1e: e8 95 d1 ff ff call 115db8 <_TOD_Validate> 118c23: 83 c4 10 add $0x10,%esp 118c26: 84 c0 test %al,%al 118c28: 75 0e jne 118c38 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; 118c2a: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118c2f: 8d 65 f4 lea -0xc(%ebp),%esp 118c32: 5b pop %ebx 118c33: 5e pop %esi 118c34: 5f pop %edi 118c35: c9 leave 118c36: c3 ret 118c37: 90 nop <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 118c38: 83 ec 0c sub $0xc,%esp 118c3b: 57 push %edi 118c3c: e8 eb d0 ff ff call 115d2c <_TOD_To_seconds> 118c41: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 118c43: 83 c4 10 add $0x10,%esp 118c46: 3b 05 28 0a 14 00 cmp 0x140a28,%eax 118c4c: 76 dc jbe 118c2a 118c4e: 52 push %edx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); 118c4f: 8d 45 e4 lea -0x1c(%ebp),%eax 118c52: 50 push %eax 118c53: ff 75 08 pushl 0x8(%ebp) 118c56: 68 a0 0c 14 00 push $0x140ca0 118c5b: e8 e8 24 00 00 call 11b148 <_Objects_Get> 118c60: 89 c2 mov %eax,%edx switch ( location ) { 118c62: 83 c4 10 add $0x10,%esp 118c65: 8b 45 e4 mov -0x1c(%ebp),%eax 118c68: 85 c0 test %eax,%eax 118c6a: 75 7c jne 118ce8 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118c6c: 83 ec 0c sub $0xc,%esp 118c6f: 8d 42 10 lea 0x10(%edx),%eax 118c72: 50 push %eax 118c73: 89 55 d4 mov %edx,-0x2c(%ebp) 118c76: e8 0d 41 00 00 call 11cd88 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 118c7b: 8b 55 d4 mov -0x2c(%ebp),%edx 118c7e: 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; 118c85: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118c8c: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118c8f: 8b 45 08 mov 0x8(%ebp),%eax 118c92: 89 42 30 mov %eax,0x30(%edx) the_watchdog->user_data = user_data; 118c95: 8b 45 14 mov 0x14(%ebp),%eax 118c98: 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(); 118c9b: 2b 3d 28 0a 14 00 sub 0x140a28,%edi 118ca1: 89 7a 1c mov %edi,0x1c(%edx) (*timer_server->schedule_operation)( timer_server, the_timer ); 118ca4: 58 pop %eax 118ca5: 59 pop %ecx 118ca6: 52 push %edx 118ca7: 53 push %ebx 118ca8: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 118cab: e8 fc 2c 00 00 call 11b9ac <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 118cb0: 83 c4 10 add $0x10,%esp 118cb3: 31 c0 xor %eax,%eax 118cb5: e9 75 ff ff ff jmp 118c2f 118cba: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 118cbc: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118cc1: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 118cc4: 5b pop %ebx <== NOT EXECUTED 118cc5: 5e pop %esi <== NOT EXECUTED 118cc6: 5f pop %edi <== NOT EXECUTED 118cc7: c9 leave <== NOT EXECUTED 118cc8: c3 ret <== NOT EXECUTED 118cc9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; 118ccc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118cd1: 8d 65 f4 lea -0xc(%ebp),%esp 118cd4: 5b pop %ebx 118cd5: 5e pop %esi 118cd6: 5f pop %edi 118cd7: c9 leave 118cd8: c3 ret 118cd9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; 118cdc: b8 0e 00 00 00 mov $0xe,%eax 118ce1: e9 49 ff ff ff jmp 118c2f 118ce6: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 118ce8: b8 04 00 00 00 mov $0x4,%eax 118ced: e9 3d ff ff ff jmp 118c2f