0010a670 <_API_Mutex_Allocate>: #include void _API_Mutex_Allocate( API_Mutex_Control **the_mutex ) { 10a670: 55 push %ebp 10a671: 89 e5 mov %esp,%ebp 10a673: 57 push %edi 10a674: 56 push %esi 10a675: 83 ec 1c sub $0x1c,%esp CORE_mutex_Attributes attr = { CORE_MUTEX_NESTING_IS_ERROR, false, CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT, 0 }; 10a678: 8d 7d e8 lea -0x18(%ebp),%edi 10a67b: be 40 d5 11 00 mov $0x11d540,%esi 10a680: b9 04 00 00 00 mov $0x4,%ecx 10a685: f3 a5 rep movsl %ds:(%esi),%es:(%edi) mutex = (API_Mutex_Control *) _Objects_Allocate( &_API_Mutex_Information ); 10a687: 68 5c 39 12 00 push $0x12395c 10a68c: e8 ab 08 00 00 call 10af3c <_Objects_Allocate> <== ALWAYS TAKEN 10a691: 89 c6 mov %eax,%esi _CORE_mutex_Initialize( &mutex->Mutex, &attr, CORE_MUTEX_UNLOCKED ); 10a693: 83 c4 0c add $0xc,%esp 10a696: 6a 01 push $0x1 10a698: 8d 45 e8 lea -0x18(%ebp),%eax 10a69b: 50 push %eax 10a69c: 8d 46 10 lea 0x10(%esi),%eax 10a69f: 50 push %eax 10a6a0: e8 87 01 00 00 call 10a82c <_CORE_mutex_Initialize> <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10a6a5: 0f b7 56 08 movzwl 0x8(%esi),%edx 10a6a9: a1 78 39 12 00 mov 0x123978,%eax 10a6ae: 89 34 90 mov %esi,(%eax,%edx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10a6b1: c7 46 0c 01 00 00 00 movl $0x1,0xc(%esi) _Objects_Open_u32( &_API_Mutex_Information, &mutex->Object, 1 ); *the_mutex = mutex; 10a6b8: 8b 45 08 mov 0x8(%ebp),%eax 10a6bb: 89 30 mov %esi,(%eax) 10a6bd: 83 c4 10 add $0x10,%esp } 10a6c0: 8d 65 f8 lea -0x8(%ebp),%esp 10a6c3: 5e pop %esi 10a6c4: 5f pop %edi 10a6c5: c9 leave 10a6c6: c3 ret 0010a6ec <_API_Mutex_Initialization>: #include void _API_Mutex_Initialization( uint32_t maximum_mutexes ) { 10a6ec: 55 push %ebp 10a6ed: 89 e5 mov %esp,%ebp 10a6ef: 83 ec 0c sub $0xc,%esp _Objects_Initialize_information( 10a6f2: 6a 00 push $0x0 10a6f4: 6a 00 push $0x0 10a6f6: 6a 74 push $0x74 10a6f8: ff 75 08 pushl 0x8(%ebp) 10a6fb: 6a 02 push $0x2 10a6fd: 6a 01 push $0x1 10a6ff: 68 5c 39 12 00 push $0x12395c 10a704: e8 9f 0c 00 00 call 10b3a8 <_Objects_Initialize_information> <== ALWAYS TAKEN 10a709: 83 c4 20 add $0x20,%esp , true, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 10a70c: c9 leave 10a70d: c3 ret 0010a6c8 <_API_Mutex_Lock>: #include void _API_Mutex_Lock( API_Mutex_Control *the_mutex ) { 10a6c8: 55 push %ebp 10a6c9: 89 e5 mov %esp,%ebp 10a6cb: 83 ec 14 sub $0x14,%esp 10a6ce: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; _ISR_Disable( level ); 10a6d1: 9c pushf 10a6d2: fa cli 10a6d3: 5a pop %edx _CORE_mutex_Seize( 10a6d4: 52 push %edx 10a6d5: 6a 00 push $0x0 10a6d7: 6a 01 push $0x1 10a6d9: ff 70 08 pushl 0x8(%eax) 10a6dc: 83 c0 10 add $0x10,%eax 10a6df: 50 push %eax 10a6e0: e8 30 02 00 00 call 10a915 <_CORE_mutex_Seize> <== ALWAYS TAKEN 10a6e5: 83 c4 20 add $0x20,%esp the_mutex->Object.id, true, 0, level ); } 10a6e8: c9 leave 10a6e9: c3 ret 0010a710 <_API_Mutex_Unlock>: #include void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { 10a710: 55 push %ebp 10a711: 89 e5 mov %esp,%ebp 10a713: 83 ec 0c sub $0xc,%esp 10a716: 8b 45 08 mov 0x8(%ebp),%eax rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a719: 8b 15 74 38 12 00 mov 0x123874,%edx 10a71f: 42 inc %edx 10a720: 89 15 74 38 12 00 mov %edx,0x123874 _Thread_Disable_dispatch(); _CORE_mutex_Surrender( 10a726: 6a 00 push $0x0 10a728: ff 70 08 pushl 0x8(%eax) 10a72b: 83 c0 10 add $0x10,%eax 10a72e: 50 push %eax 10a72f: e8 78 02 00 00 call 10a9ac <_CORE_mutex_Surrender> <== ALWAYS TAKEN &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10a734: 83 c4 10 add $0x10,%esp } 10a737: c9 leave _CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10a738: e9 d8 13 00 00 jmp 10bb15 <_Thread_Enable_dispatch> 0010a658 <_API_extensions_Add>: */ void _API_extensions_Add( API_extensions_Control *the_extension ) { 10a658: 55 push %ebp 10a659: 89 e5 mov %esp,%ebp 10a65b: 83 ec 10 sub $0x10,%esp _Chain_Append( &_API_extensions_List, &the_extension->Node ); 10a65e: ff 75 08 pushl 0x8(%ebp) 10a661: 68 90 3a 12 00 push $0x123a90 10a666: e8 d5 00 00 00 call 10a740 <_Chain_Append> <== ALWAYS TAKEN 10a66b: 83 c4 10 add $0x10,%esp } 10a66e: c9 leave 10a66f: c3 ret 0010a60b <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 10a60b: 55 push %ebp 10a60c: 89 e5 mov %esp,%ebp 10a60e: 53 push %ebx 10a60f: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10a612: 8b 1d 90 3a 12 00 mov 0x123a90,%ebx 10a618: eb 05 jmp 10a61f <_API_extensions_Run_postdriver+0x14> <== ALWAYS TAKEN * 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)(); 10a61a: 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 ) { 10a61d: 8b 1b mov (%ebx),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10a61f: 81 fb 94 3a 12 00 cmp $0x123a94,%ebx 10a625: 75 f3 jne 10a61a <_API_extensions_Run_postdriver+0xf> #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 10a627: 58 pop %eax 10a628: 5b pop %ebx 10a629: c9 leave 10a62a: c3 ret 0010a62b <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 10a62b: 55 push %ebp 10a62c: 89 e5 mov %esp,%ebp 10a62e: 53 push %ebx 10a62f: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10a632: 8b 1d 90 3a 12 00 mov 0x123a90,%ebx 10a638: eb 11 jmp 10a64b <_API_extensions_Run_postswitch+0x20> <== ALWAYS TAKEN * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); 10a63a: 83 ec 0c sub $0xc,%esp 10a63d: ff 35 30 39 12 00 pushl 0x123930 10a643: 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 ) { 10a646: 8b 1b mov (%ebx),%ebx 10a648: 83 c4 10 add $0x10,%esp 10a64b: 81 fb 94 3a 12 00 cmp $0x123a94,%ebx 10a651: 75 e7 jne 10a63a <_API_extensions_Run_postswitch+0xf> #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10a653: 8b 5d fc mov -0x4(%ebp),%ebx 10a656: c9 leave 10a657: c3 ret 0010fc40 <_CORE_barrier_Release>: #else Objects_Id id __attribute__((unused)), CORE_barrier_API_mp_support_callout api_barrier_mp_support __attribute__((unused)) #endif ) { 10fc40: 55 push %ebp 10fc41: 89 e5 mov %esp,%ebp 10fc43: 56 push %esi 10fc44: 53 push %ebx 10fc45: 8b 75 08 mov 0x8(%ebp),%esi Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { 10fc48: 31 db xor %ebx,%ebx 10fc4a: eb 01 jmp 10fc4d <_CORE_barrier_Release+0xd> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_barrier_mp_support) ( the_thread, id ); #endif count++; 10fc4c: 43 inc %ebx { Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { 10fc4d: 83 ec 0c sub $0xc,%esp 10fc50: 56 push %esi 10fc51: e8 26 c2 ff ff call 10be7c <_Thread_queue_Dequeue> 10fc56: 83 c4 10 add $0x10,%esp 10fc59: 85 c0 test %eax,%eax 10fc5b: 75 ef jne 10fc4c <_CORE_barrier_Release+0xc> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_barrier_mp_support) ( the_thread, id ); #endif count++; } the_barrier->number_of_waiting_threads = 0; 10fc5d: c7 46 48 00 00 00 00 movl $0x0,0x48(%esi) return count; } 10fc64: 89 d8 mov %ebx,%eax 10fc66: 8d 65 f8 lea -0x8(%ebp),%esp 10fc69: 5b pop %ebx 10fc6a: 5e pop %esi 10fc6b: c9 leave 10fc6c: c3 ret 0010fc70 <_CORE_barrier_Wait>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 10fc70: 55 push %ebp 10fc71: 89 e5 mov %esp,%ebp 10fc73: 57 push %edi 10fc74: 56 push %esi 10fc75: 53 push %ebx 10fc76: 83 ec 1c sub $0x1c,%esp 10fc79: 8b 45 08 mov 0x8(%ebp),%eax 10fc7c: 8b 4d 0c mov 0xc(%ebp),%ecx 10fc7f: 8b 75 14 mov 0x14(%ebp),%esi 10fc82: 8b 7d 18 mov 0x18(%ebp),%edi Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 10fc85: 8b 15 30 39 12 00 mov 0x123930,%edx executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 10fc8b: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 10fc92: 9c pushf 10fc93: fa cli 10fc94: 8f 45 e4 popl -0x1c(%ebp) the_barrier->number_of_waiting_threads++; 10fc97: 8b 58 48 mov 0x48(%eax),%ebx 10fc9a: 43 inc %ebx 10fc9b: 89 58 48 mov %ebx,0x48(%eax) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 10fc9e: 83 78 40 00 cmpl $0x0,0x40(%eax) 10fca2: 75 25 jne 10fcc9 <_CORE_barrier_Wait+0x59> if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { 10fca4: 3b 58 44 cmp 0x44(%eax),%ebx 10fca7: 75 20 jne 10fcc9 <_CORE_barrier_Wait+0x59> executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 10fca9: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) _ISR_Enable( level ); 10fcb0: ff 75 e4 pushl -0x1c(%ebp) 10fcb3: 9d popf _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 10fcb4: 89 7d 10 mov %edi,0x10(%ebp) 10fcb7: 89 4d 0c mov %ecx,0xc(%ebp) 10fcba: 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 ); } 10fcbd: 83 c4 1c add $0x1c,%esp 10fcc0: 5b pop %ebx 10fcc1: 5e pop %esi 10fcc2: 5f pop %edi 10fcc3: 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 ); 10fcc4: e9 77 ff ff ff jmp 10fc40 <_CORE_barrier_Release> <== ALWAYS TAKEN 10fcc9: 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; 10fcd0: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10fcd3: 89 4a 20 mov %ecx,0x20(%edx) _ISR_Enable( level ); 10fcd6: ff 75 e4 pushl -0x1c(%ebp) 10fcd9: 9d popf _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 10fcda: c7 45 10 3c c2 10 00 movl $0x10c23c,0x10(%ebp) 10fce1: 89 75 0c mov %esi,0xc(%ebp) 10fce4: 89 45 08 mov %eax,0x8(%ebp) } 10fce7: 83 c4 1c add $0x1c,%esp 10fcea: 5b pop %ebx 10fceb: 5e pop %esi 10fcec: 5f pop %edi 10fced: 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 ); 10fcee: e9 8d c2 ff ff jmp 10bf80 <_Thread_queue_Enqueue_with_handler> 00116d70 <_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 ) { 116d70: 55 push %ebp 116d71: 89 e5 mov %esp,%ebp 116d73: 57 push %edi 116d74: 56 push %esi 116d75: 53 push %ebx 116d76: 83 ec 1c sub $0x1c,%esp 116d79: 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 ) { 116d7c: b8 01 00 00 00 mov $0x1,%eax 116d81: 8b 55 10 mov 0x10(%ebp),%edx 116d84: 3b 53 4c cmp 0x4c(%ebx),%edx 116d87: 77 4c ja 116dd5 <_CORE_message_queue_Broadcast+0x65> <== ALWAYS TAKEN * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 116d89: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) * 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 ) { 116d90: 83 7b 48 00 cmpl $0x0,0x48(%ebx) 116d94: 74 23 je 116db9 <_CORE_message_queue_Broadcast+0x49> *count = 0; 116d96: 8b 45 1c mov 0x1c(%ebp),%eax 116d99: c7 00 00 00 00 00 movl $0x0,(%eax) 116d9f: eb 32 jmp 116dd3 <_CORE_message_queue_Broadcast+0x63> <== ALWAYS TAKEN */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 116da1: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 116da4: 8b 42 2c mov 0x2c(%edx),%eax 116da7: 89 c7 mov %eax,%edi 116da9: 8b 75 0c mov 0xc(%ebp),%esi 116dac: 8b 4d 10 mov 0x10(%ebp),%ecx 116daf: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 116db1: 8b 42 28 mov 0x28(%edx),%eax 116db4: 8b 55 10 mov 0x10(%ebp),%edx 116db7: 89 10 mov %edx,(%eax) * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 116db9: 83 ec 0c sub $0xc,%esp 116dbc: 53 push %ebx 116dbd: e8 8e 20 00 00 call 118e50 <_Thread_queue_Dequeue> 116dc2: 89 c2 mov %eax,%edx /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 116dc4: 83 c4 10 add $0x10,%esp 116dc7: 85 c0 test %eax,%eax 116dc9: 75 d6 jne 116da1 <_CORE_message_queue_Broadcast+0x31> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 116dcb: 8b 55 e4 mov -0x1c(%ebp),%edx 116dce: 8b 45 1c mov 0x1c(%ebp),%eax 116dd1: 89 10 mov %edx,(%eax) 116dd3: 31 c0 xor %eax,%eax return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 116dd5: 8d 65 f4 lea -0xc(%ebp),%esp 116dd8: 5b pop %ebx 116dd9: 5e pop %esi 116dda: 5f pop %edi 116ddb: c9 leave 116ddc: c3 ret 00113cfc <_CORE_message_queue_Close>: void _CORE_message_queue_Close( CORE_message_queue_Control *the_message_queue, Thread_queue_Flush_callout remote_extract_callout, uint32_t status ) { 113cfc: 55 push %ebp 113cfd: 89 e5 mov %esp,%ebp 113cff: 53 push %ebx 113d00: 83 ec 08 sub $0x8,%esp 113d03: 8b 5d 08 mov 0x8(%ebp),%ebx /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 113d06: ff 75 10 pushl 0x10(%ebp) 113d09: ff 75 0c pushl 0xc(%ebp) 113d0c: 53 push %ebx 113d0d: e8 e6 ba ff ff call 10f7f8 <_Thread_queue_Flush> * This removes all messages from the pending message queue. Since * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) 113d12: 83 c4 10 add $0x10,%esp 113d15: 83 7b 48 00 cmpl $0x0,0x48(%ebx) 113d19: 74 0c je 113d27 <_CORE_message_queue_Close+0x2b> (void) _CORE_message_queue_Flush_support( the_message_queue ); 113d1b: 83 ec 0c sub $0xc,%esp 113d1e: 53 push %ebx 113d1f: e8 14 00 00 00 call 113d38 <_CORE_message_queue_Flush_support> <== ALWAYS TAKEN 113d24: 83 c4 10 add $0x10,%esp (void) _Workspace_Free( the_message_queue->message_buffers ); 113d27: 8b 43 5c mov 0x5c(%ebx),%eax 113d2a: 89 45 08 mov %eax,0x8(%ebp) } 113d2d: 8b 5d fc mov -0x4(%ebp),%ebx 113d30: c9 leave */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 113d31: e9 63 c4 ff ff jmp 110199 <_Workspace_Free> 00116e1c <_CORE_message_queue_Flush>: */ uint32_t _CORE_message_queue_Flush( CORE_message_queue_Control *the_message_queue ) { 116e1c: 55 push %ebp 116e1d: 89 e5 mov %esp,%ebp 116e1f: 83 ec 08 sub $0x8,%esp 116e22: 8b 45 08 mov 0x8(%ebp),%eax if ( the_message_queue->number_of_pending_messages != 0 ) 116e25: 83 78 48 00 cmpl $0x0,0x48(%eax) 116e29: 75 04 jne 116e2f <_CORE_message_queue_Flush+0x13> return _CORE_message_queue_Flush_support( the_message_queue ); else return 0; } 116e2b: 31 c0 xor %eax,%eax 116e2d: c9 leave 116e2e: c3 ret uint32_t _CORE_message_queue_Flush( CORE_message_queue_Control *the_message_queue ) { if ( the_message_queue->number_of_pending_messages != 0 ) return _CORE_message_queue_Flush_support( the_message_queue ); 116e2f: 89 45 08 mov %eax,0x8(%ebp) else return 0; } 116e32: c9 leave uint32_t _CORE_message_queue_Flush( CORE_message_queue_Control *the_message_queue ) { if ( the_message_queue->number_of_pending_messages != 0 ) return _CORE_message_queue_Flush_support( the_message_queue ); 116e33: e9 00 00 00 00 jmp 116e38 <_CORE_message_queue_Flush_support> <== ALWAYS TAKEN 001121b4 <_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 ) { 1121b4: 55 push %ebp 1121b5: 89 e5 mov %esp,%ebp 1121b7: 57 push %edi 1121b8: 56 push %esi 1121b9: 53 push %ebx 1121ba: 83 ec 0c sub $0xc,%esp 1121bd: 8b 5d 08 mov 0x8(%ebp),%ebx 1121c0: 8b 75 10 mov 0x10(%ebp),%esi 1121c3: 8b 55 14 mov 0x14(%ebp),%edx size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 1121c6: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 1121c9: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 1121d0: 89 53 4c mov %edx,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)) { 1121d3: 89 d0 mov %edx,%eax 1121d5: f6 c2 03 test $0x3,%dl 1121d8: 74 0a je 1121e4 <_CORE_message_queue_Initialize+0x30> allocated_message_size += sizeof(uint32_t); 1121da: 8d 42 04 lea 0x4(%edx),%eax allocated_message_size &= ~(sizeof(uint32_t) - 1); 1121dd: 83 e0 fc and $0xfffffffc,%eax } if (allocated_message_size < maximum_message_size) 1121e0: 39 d0 cmp %edx,%eax 1121e2: 72 5f jb 112243 <_CORE_message_queue_Initialize+0x8f> <== ALWAYS TAKEN /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 1121e4: 8d 78 10 lea 0x10(%eax),%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 * 1121e7: 89 fa mov %edi,%edx 1121e9: 0f af d6 imul %esi,%edx (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 1121ec: 39 c2 cmp %eax,%edx 1121ee: 72 53 jb 112243 <_CORE_message_queue_Initialize+0x8f> <== ALWAYS TAKEN return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 1121f0: 83 ec 0c sub $0xc,%esp 1121f3: 52 push %edx 1121f4: e8 e3 24 00 00 call 1146dc <_Workspace_Allocate> 1121f9: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 1121fc: 83 c4 10 add $0x10,%esp 1121ff: 85 c0 test %eax,%eax 112201: 74 40 je 112243 <_CORE_message_queue_Initialize+0x8f> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 112203: 57 push %edi 112204: 56 push %esi 112205: 50 push %eax 112206: 8d 43 60 lea 0x60(%ebx),%eax 112209: 50 push %eax 11220a: e8 d1 3c 00 00 call 115ee0 <_Chain_Initialize> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11220f: 8d 43 54 lea 0x54(%ebx),%eax 112212: 89 43 50 mov %eax,0x50(%ebx) the_chain->permanent_null = NULL; 112215: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_chain->last = _Chain_Head(the_chain); 11221c: 8d 43 50 lea 0x50(%ebx),%eax 11221f: 89 43 58 mov %eax,0x58(%ebx) allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 112222: 6a 06 push $0x6 112224: 68 80 00 00 00 push $0x80 112229: 8b 45 0c mov 0xc(%ebp),%eax 11222c: 83 38 01 cmpl $0x1,(%eax) 11222f: 0f 94 c0 sete %al 112232: 0f b6 c0 movzbl %al,%eax 112235: 50 push %eax 112236: 53 push %ebx 112237: e8 ac 1b 00 00 call 113de8 <_Thread_queue_Initialize> 11223c: b0 01 mov $0x1,%al THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 11223e: 83 c4 20 add $0x20,%esp 112241: eb 02 jmp 112245 <_CORE_message_queue_Initialize+0x91> <== ALWAYS TAKEN 112243: 31 c0 xor %eax,%eax } 112245: 8d 65 f4 lea -0xc(%ebp),%esp 112248: 5b pop %ebx 112249: 5e pop %esi 11224a: 5f pop %edi 11224b: c9 leave 11224c: c3 ret 0010e308 <_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 ) { 10e308: 55 push %ebp 10e309: 89 e5 mov %esp,%ebp 10e30b: 53 push %ebx 10e30c: 8b 55 08 mov 0x8(%ebp),%edx 10e30f: 8b 45 0c mov 0xc(%ebp),%eax #endif _CORE_message_queue_Set_message_priority( the_message, submit_type ); #if !defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) _ISR_Disable( level ); 10e312: 9c pushf 10e313: fa cli 10e314: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 10e315: ff 42 48 incl 0x48(%edx) if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) 10e318: 81 7d 10 ff ff ff 7f cmpl $0x7fffffff,0x10(%ebp) 10e31f: 75 12 jne 10e333 <_CORE_message_queue_Insert_message+0x2b> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10e321: 8d 4a 54 lea 0x54(%edx),%ecx 10e324: 89 08 mov %ecx,(%eax) old_last_node = the_chain->last; 10e326: 8b 4a 58 mov 0x58(%edx),%ecx the_chain->last = the_node; 10e329: 89 42 58 mov %eax,0x58(%edx) old_last_node->next = the_node; 10e32c: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10e32e: 89 48 04 mov %ecx,0x4(%eax) 10e331: eb 11 jmp 10e344 <_CORE_message_queue_Insert_message+0x3c> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10e333: 8d 4a 50 lea 0x50(%edx),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10e336: 89 48 04 mov %ecx,0x4(%eax) before_node = after_node->next; 10e339: 8b 4a 50 mov 0x50(%edx),%ecx after_node->next = the_node; 10e33c: 89 42 50 mov %eax,0x50(%edx) the_node->next = before_node; 10e33f: 89 08 mov %ecx,(%eax) before_node->previous = the_node; 10e341: 89 41 04 mov %eax,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 ); 10e344: 53 push %ebx 10e345: 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 } 10e346: 5b pop %ebx 10e347: c9 leave 10e348: c3 ret 00112250 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 112250: 55 push %ebp 112251: 89 e5 mov %esp,%ebp 112253: 57 push %edi 112254: 56 push %esi 112255: 53 push %ebx 112256: 83 ec 2c sub $0x2c,%esp 112259: 8b 45 08 mov 0x8(%ebp),%eax 11225c: 8b 55 0c mov 0xc(%ebp),%edx 11225f: 89 55 dc mov %edx,-0x24(%ebp) 112262: 8b 55 10 mov 0x10(%ebp),%edx 112265: 89 55 e0 mov %edx,-0x20(%ebp) 112268: 8b 7d 14 mov 0x14(%ebp),%edi 11226b: 8b 55 1c mov 0x1c(%ebp),%edx 11226e: 89 55 d4 mov %edx,-0x2c(%ebp) 112271: 8a 55 18 mov 0x18(%ebp),%dl 112274: 88 55 db mov %dl,-0x25(%ebp) ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 112277: 8b 0d 78 b3 12 00 mov 0x12b378,%ecx executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 11227d: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) _ISR_Disable( level ); 112284: 9c pushf 112285: fa cli 112286: 8f 45 e4 popl -0x1c(%ebp) */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 112289: 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; 11228c: 8d 58 54 lea 0x54(%eax),%ebx 11228f: 39 da cmp %ebx,%edx 112291: 74 47 je 1122da <_CORE_message_queue_Seize+0x8a> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 112293: 8b 32 mov (%edx),%esi the_chain->first = new_first; 112295: 89 70 50 mov %esi,0x50(%eax) new_first->previous = _Chain_Head(the_chain); 112298: 8d 58 50 lea 0x50(%eax),%ebx 11229b: 89 5e 04 mov %ebx,0x4(%esi) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 11229e: 85 d2 test %edx,%edx 1122a0: 74 38 je 1122da <_CORE_message_queue_Seize+0x8a> <== ALWAYS TAKEN the_message_queue->number_of_pending_messages -= 1; 1122a2: ff 48 48 decl 0x48(%eax) _ISR_Enable( level ); 1122a5: ff 75 e4 pushl -0x1c(%ebp) 1122a8: 9d popf *size_p = the_message->Contents.size; 1122a9: 8b 4a 08 mov 0x8(%edx),%ecx 1122ac: 89 0f mov %ecx,(%edi) _Thread_Executing->Wait.count = 1122ae: 8b 0d 78 b3 12 00 mov 0x12b378,%ecx 1122b4: c7 41 24 00 00 00 00 movl $0x0,0x24(%ecx) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 1122bb: 8d 72 0c lea 0xc(%edx),%esi 1122be: 8b 0f mov (%edi),%ecx 1122c0: 8b 7d e0 mov -0x20(%ebp),%edi 1122c3: 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 ); 1122c5: 89 55 0c mov %edx,0xc(%ebp) 1122c8: 83 c0 60 add $0x60,%eax 1122cb: 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 ); } 1122ce: 83 c4 2c add $0x2c,%esp 1122d1: 5b pop %ebx 1122d2: 5e pop %esi 1122d3: 5f pop %edi 1122d4: c9 leave 1122d5: e9 5a fe ff ff jmp 112134 <_Chain_Append> <== ALWAYS TAKEN return; } #endif } if ( !wait ) { 1122da: 80 7d db 00 cmpb $0x0,-0x25(%ebp) 1122de: 75 13 jne 1122f3 <_CORE_message_queue_Seize+0xa3> _ISR_Enable( level ); 1122e0: ff 75 e4 pushl -0x1c(%ebp) 1122e3: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 1122e4: 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 ); } 1122eb: 83 c4 2c add $0x2c,%esp 1122ee: 5b pop %ebx 1122ef: 5e pop %esi 1122f0: 5f pop %edi 1122f1: c9 leave 1122f2: c3 ret 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; 1122f3: 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; 1122fa: 89 41 44 mov %eax,0x44(%ecx) executing->Wait.id = id; 1122fd: 8b 55 dc mov -0x24(%ebp),%edx 112300: 89 51 20 mov %edx,0x20(%ecx) executing->Wait.return_argument_second.mutable_object = buffer; 112303: 8b 55 e0 mov -0x20(%ebp),%edx 112306: 89 51 2c mov %edx,0x2c(%ecx) executing->Wait.return_argument = size_p; 112309: 89 79 28 mov %edi,0x28(%ecx) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 11230c: ff 75 e4 pushl -0x1c(%ebp) 11230f: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 112310: c7 45 10 8c 3e 11 00 movl $0x113e8c,0x10(%ebp) 112317: 8b 55 d4 mov -0x2c(%ebp),%edx 11231a: 89 55 0c mov %edx,0xc(%ebp) 11231d: 89 45 08 mov %eax,0x8(%ebp) } 112320: 83 c4 2c add $0x2c,%esp 112323: 5b pop %ebx 112324: 5e pop %esi 112325: 5f pop %edi 112326: 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 ); 112327: e9 a4 18 00 00 jmp 113bd0 <_Thread_queue_Enqueue_with_handler> 0010a788 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 10a788: 55 push %ebp 10a789: 89 e5 mov %esp,%ebp 10a78b: 57 push %edi 10a78c: 56 push %esi 10a78d: 53 push %ebx 10a78e: 83 ec 0c sub $0xc,%esp 10a791: 8b 5d 08 mov 0x8(%ebp),%ebx 10a794: 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 ) { 10a797: b8 01 00 00 00 mov $0x1,%eax 10a79c: 8b 55 10 mov 0x10(%ebp),%edx 10a79f: 3b 53 4c cmp 0x4c(%ebx),%edx 10a7a2: 77 71 ja 10a815 <_CORE_message_queue_Submit+0x8d> <== ALWAYS TAKEN } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 10a7a4: 83 7b 48 00 cmpl $0x0,0x48(%ebx) 10a7a8: 75 2e jne 10a7d8 <_CORE_message_queue_Submit+0x50> the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 10a7aa: 83 ec 0c sub $0xc,%esp 10a7ad: 53 push %ebx 10a7ae: e8 c9 16 00 00 call 10be7c <_Thread_queue_Dequeue> 10a7b3: 89 c2 mov %eax,%edx if ( the_thread ) { 10a7b5: 83 c4 10 add $0x10,%esp 10a7b8: 85 c0 test %eax,%eax 10a7ba: 74 1c je 10a7d8 <_CORE_message_queue_Submit+0x50> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10a7bc: 8b 40 2c mov 0x2c(%eax),%eax 10a7bf: 89 c7 mov %eax,%edi 10a7c1: 8b 4d 10 mov 0x10(%ebp),%ecx 10a7c4: 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; 10a7c6: 8b 42 28 mov 0x28(%edx),%eax 10a7c9: 8b 4d 10 mov 0x10(%ebp),%ecx 10a7cc: 89 08 mov %ecx,(%eax) the_thread->Wait.count = (uint32_t) submit_type; 10a7ce: 8b 45 1c mov 0x1c(%ebp),%eax 10a7d1: 89 42 24 mov %eax,0x24(%edx) 10a7d4: 31 c0 xor %eax,%eax #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10a7d6: eb 3d jmp 10a815 <_CORE_message_queue_Submit+0x8d> <== ALWAYS TAKEN /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < the_message_queue->maximum_pending_messages ) { 10a7d8: 8b 53 48 mov 0x48(%ebx),%edx 10a7db: b8 02 00 00 00 mov $0x2,%eax 10a7e0: 3b 53 44 cmp 0x44(%ebx),%edx 10a7e3: 73 30 jae 10a815 <_CORE_message_queue_Submit+0x8d> RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 10a7e5: 83 ec 0c sub $0xc,%esp 10a7e8: 8d 43 60 lea 0x60(%ebx),%eax 10a7eb: 50 push %eax 10a7ec: e8 73 ff ff ff call 10a764 <_Chain_Get> <== ALWAYS TAKEN 10a7f1: 89 c2 mov %eax,%edx const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10a7f3: 8d 40 0c lea 0xc(%eax),%eax 10a7f6: 89 c7 mov %eax,%edi 10a7f8: 8b 4d 10 mov 0x10(%ebp),%ecx 10a7fb: f3 a4 rep movsb %ds:(%esi),%es:(%edi) _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 10a7fd: 8b 4d 10 mov 0x10(%ebp),%ecx 10a800: 89 4a 08 mov %ecx,0x8(%edx) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 10a803: 83 c4 0c add $0xc,%esp 10a806: ff 75 1c pushl 0x1c(%ebp) 10a809: 52 push %edx 10a80a: 53 push %ebx 10a80b: e8 f8 3a 00 00 call 10e308 <_CORE_message_queue_Insert_message> 10a810: 31 c0 xor %eax,%eax the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10a812: 83 c4 10 add $0x10,%esp _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10a815: 8d 65 f4 lea -0xc(%ebp),%esp 10a818: 5b pop %ebx 10a819: 5e pop %esi 10a81a: 5f pop %edi 10a81b: c9 leave 10a81c: c3 ret 0010a82c <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10a82c: 55 push %ebp 10a82d: 89 e5 mov %esp,%ebp 10a82f: 57 push %edi 10a830: 56 push %esi 10a831: 53 push %ebx 10a832: 83 ec 0c sub $0xc,%esp 10a835: 8b 55 08 mov 0x8(%ebp),%edx 10a838: 8b 5d 0c mov 0xc(%ebp),%ebx 10a83b: 8b 45 10 mov 0x10(%ebp),%eax /* 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; 10a83e: 8d 7a 40 lea 0x40(%edx),%edi 10a841: b9 04 00 00 00 mov $0x4,%ecx 10a846: 89 de mov %ebx,%esi 10a848: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10a84a: 89 42 50 mov %eax,0x50(%edx) the_mutex->blocked_count = 0; 10a84d: c7 42 58 00 00 00 00 movl $0x0,0x58(%edx) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10a854: 85 c0 test %eax,%eax 10a856: 75 35 jne 10a88d <_CORE_mutex_Initialize+0x61> the_mutex->nest_count = 1; 10a858: c7 42 54 01 00 00 00 movl $0x1,0x54(%edx) the_mutex->holder = _Thread_Executing; 10a85f: 8b 0d 30 39 12 00 mov 0x123930,%ecx 10a865: 89 4a 5c mov %ecx,0x5c(%edx) the_mutex->holder_id = _Thread_Executing->Object.id; 10a868: 8b 41 08 mov 0x8(%ecx),%eax 10a86b: 89 42 60 mov %eax,0x60(%edx) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10a86e: 8b 42 48 mov 0x48(%edx),%eax if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10a871: 83 f8 02 cmp $0x2,%eax 10a874: 74 05 je 10a87b <_CORE_mutex_Initialize+0x4f> 10a876: 83 f8 03 cmp $0x3,%eax 10a879: 75 27 jne 10a8a2 <_CORE_mutex_Initialize+0x76> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 10a87b: 8b 71 14 mov 0x14(%ecx),%esi 10a87e: b8 06 00 00 00 mov $0x6,%eax 10a883: 3b 72 4c cmp 0x4c(%edx),%esi 10a886: 72 36 jb 10a8be <_CORE_mutex_Initialize+0x92> _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++; 10a888: ff 41 1c incl 0x1c(%ecx) 10a88b: eb 15 jmp 10a8a2 <_CORE_mutex_Initialize+0x76> <== ALWAYS TAKEN } } else { the_mutex->nest_count = 0; 10a88d: c7 42 54 00 00 00 00 movl $0x0,0x54(%edx) the_mutex->holder = NULL; 10a894: c7 42 5c 00 00 00 00 movl $0x0,0x5c(%edx) the_mutex->holder_id = 0; 10a89b: c7 42 60 00 00 00 00 movl $0x0,0x60(%edx) } _Thread_queue_Initialize( 10a8a2: 6a 05 push $0x5 10a8a4: 68 00 04 00 00 push $0x400 10a8a9: 31 c0 xor %eax,%eax 10a8ab: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10a8af: 0f 95 c0 setne %al 10a8b2: 50 push %eax 10a8b3: 52 push %edx 10a8b4: e8 df 18 00 00 call 10c198 <_Thread_queue_Initialize> 10a8b9: 31 c0 xor %eax,%eax THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 10a8bb: 83 c4 10 add $0x10,%esp } 10a8be: 8d 65 f4 lea -0xc(%ebp),%esp 10a8c1: 5b pop %ebx 10a8c2: 5e pop %esi 10a8c3: 5f pop %edi 10a8c4: c9 leave 10a8c5: c3 ret 0010a915 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10a915: 55 push %ebp 10a916: 89 e5 mov %esp,%ebp 10a918: 53 push %ebx 10a919: 83 ec 14 sub $0x14,%esp 10a91c: 8b 5d 08 mov 0x8(%ebp),%ebx 10a91f: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10a922: a1 74 38 12 00 mov 0x123874,%eax 10a927: 85 c0 test %eax,%eax 10a929: 74 19 je 10a944 <_CORE_mutex_Seize+0x2f> 10a92b: 84 d2 test %dl,%dl 10a92d: 74 15 je 10a944 <_CORE_mutex_Seize+0x2f> <== ALWAYS TAKEN 10a92f: 83 3d 0c 3a 12 00 01 cmpl $0x1,0x123a0c 10a936: 76 0c jbe 10a944 <_CORE_mutex_Seize+0x2f> 10a938: 53 push %ebx 10a939: 6a 13 push $0x13 10a93b: 6a 00 push $0x0 10a93d: 6a 00 push $0x0 10a93f: e8 60 05 00 00 call 10aea4 <_Internal_error_Occurred> 10a944: 51 push %ecx 10a945: 51 push %ecx 10a946: 8d 45 18 lea 0x18(%ebp),%eax 10a949: 50 push %eax 10a94a: 53 push %ebx 10a94b: 88 55 f4 mov %dl,-0xc(%ebp) 10a94e: e8 f9 39 00 00 call 10e34c <_CORE_mutex_Seize_interrupt_trylock> 10a953: 83 c4 10 add $0x10,%esp 10a956: 85 c0 test %eax,%eax 10a958: 8a 55 f4 mov -0xc(%ebp),%dl 10a95b: 74 48 je 10a9a5 <_CORE_mutex_Seize+0x90> 10a95d: 84 d2 test %dl,%dl 10a95f: 75 12 jne 10a973 <_CORE_mutex_Seize+0x5e> 10a961: ff 75 18 pushl 0x18(%ebp) 10a964: 9d popf 10a965: a1 30 39 12 00 mov 0x123930,%eax 10a96a: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) 10a971: eb 32 jmp 10a9a5 <_CORE_mutex_Seize+0x90> <== ALWAYS TAKEN 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; 10a973: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10a97a: a1 30 39 12 00 mov 0x123930,%eax 10a97f: 89 58 44 mov %ebx,0x44(%eax) 10a982: 8b 55 0c mov 0xc(%ebp),%edx 10a985: 89 50 20 mov %edx,0x20(%eax) 10a988: a1 74 38 12 00 mov 0x123874,%eax 10a98d: 40 inc %eax 10a98e: a3 74 38 12 00 mov %eax,0x123874 10a993: ff 75 18 pushl 0x18(%ebp) 10a996: 9d popf 10a997: 50 push %eax 10a998: 50 push %eax 10a999: ff 75 14 pushl 0x14(%ebp) 10a99c: 53 push %ebx 10a99d: e8 26 ff ff ff call 10a8c8 <_CORE_mutex_Seize_interrupt_blocking> <== ALWAYS TAKEN 10a9a2: 83 c4 10 add $0x10,%esp } 10a9a5: 8b 5d fc mov -0x4(%ebp),%ebx 10a9a8: c9 leave 10a9a9: c3 ret 0010a8c8 <_CORE_mutex_Seize_interrupt_blocking>: void _CORE_mutex_Seize_interrupt_blocking( CORE_mutex_Control *the_mutex, Watchdog_Interval timeout ) { 10a8c8: 55 push %ebp 10a8c9: 89 e5 mov %esp,%ebp 10a8cb: 56 push %esi 10a8cc: 53 push %ebx 10a8cd: 8b 5d 08 mov 0x8(%ebp),%ebx 10a8d0: 8b 75 0c mov 0xc(%ebp),%esi Thread_Control *executing; executing = _Thread_Executing; 10a8d3: 8b 15 30 39 12 00 mov 0x123930,%edx if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { 10a8d9: 83 7b 48 02 cmpl $0x2,0x48(%ebx) 10a8dd: 75 18 jne 10a8f7 <_CORE_mutex_Seize_interrupt_blocking+0x2f> if ( the_mutex->holder->current_priority > executing->current_priority ) { 10a8df: 8b 43 5c mov 0x5c(%ebx),%eax 10a8e2: 8b 52 14 mov 0x14(%edx),%edx 10a8e5: 39 50 14 cmp %edx,0x14(%eax) 10a8e8: 76 0d jbe 10a8f7 <_CORE_mutex_Seize_interrupt_blocking+0x2f> _Thread_Change_priority( 10a8ea: 51 push %ecx 10a8eb: 6a 00 push $0x0 10a8ed: 52 push %edx 10a8ee: 50 push %eax 10a8ef: e8 84 0d 00 00 call 10b678 <_Thread_Change_priority> <== ALWAYS TAKEN 10a8f4: 83 c4 10 add $0x10,%esp false ); } } the_mutex->blocked_count++; 10a8f7: ff 43 58 incl 0x58(%ebx) _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); 10a8fa: 50 push %eax 10a8fb: 68 3c c2 10 00 push $0x10c23c 10a900: 56 push %esi 10a901: 53 push %ebx 10a902: e8 79 16 00 00 call 10bf80 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10a907: 83 c4 10 add $0x10,%esp } 10a90a: 8d 65 f8 lea -0x8(%ebp),%esp 10a90d: 5b pop %ebx 10a90e: 5e pop %esi 10a90f: c9 leave } the_mutex->blocked_count++; _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); _Thread_Enable_dispatch(); 10a910: e9 00 12 00 00 jmp 10bb15 <_Thread_Enable_dispatch> 0010e34c <_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 ) { 10e34c: 55 push %ebp 10e34d: 89 e5 mov %esp,%ebp 10e34f: 53 push %ebx 10e350: 83 ec 04 sub $0x4,%esp 10e353: 8b 45 08 mov 0x8(%ebp),%eax 10e356: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10e359: 8b 15 30 39 12 00 mov 0x123930,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 10e35f: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 10e366: 83 78 50 00 cmpl $0x0,0x50(%eax) 10e36a: 0f 84 87 00 00 00 je 10e3f7 <_CORE_mutex_Seize_interrupt_trylock+0xab> the_mutex->lock = CORE_MUTEX_LOCKED; 10e370: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 10e377: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 10e37a: 8b 5a 08 mov 0x8(%edx),%ebx 10e37d: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 10e380: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10e387: 8b 58 48 mov 0x48(%eax),%ebx if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10e38a: 83 fb 02 cmp $0x2,%ebx 10e38d: 74 05 je 10e394 <_CORE_mutex_Seize_interrupt_trylock+0x48> 10e38f: 83 fb 03 cmp $0x3,%ebx 10e392: 75 08 jne 10e39c <_CORE_mutex_Seize_interrupt_trylock+0x50> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 10e394: ff 42 1c incl 0x1c(%edx) } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 10e397: 83 fb 03 cmp $0x3,%ebx 10e39a: 74 05 je 10e3a1 <_CORE_mutex_Seize_interrupt_trylock+0x55> _ISR_Enable( *level_p ); 10e39c: ff 31 pushl (%ecx) 10e39e: 9d popf 10e39f: eb 7b jmp 10e41c <_CORE_mutex_Seize_interrupt_trylock+0xd0> <== ALWAYS TAKEN { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 10e3a1: 8b 5a 14 mov 0x14(%edx),%ebx if ( current == ceiling ) { 10e3a4: 3b 58 4c cmp 0x4c(%eax),%ebx 10e3a7: 75 05 jne 10e3ae <_CORE_mutex_Seize_interrupt_trylock+0x62> _ISR_Enable( *level_p ); 10e3a9: ff 31 pushl (%ecx) 10e3ab: 9d popf 10e3ac: eb 6e jmp 10e41c <_CORE_mutex_Seize_interrupt_trylock+0xd0> <== ALWAYS TAKEN return 0; } if ( current > ceiling ) { 10e3ae: 76 2a jbe 10e3da <_CORE_mutex_Seize_interrupt_trylock+0x8e> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10e3b0: 8b 15 74 38 12 00 mov 0x123874,%edx 10e3b6: 42 inc %edx 10e3b7: 89 15 74 38 12 00 mov %edx,0x123874 _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 10e3bd: ff 31 pushl (%ecx) 10e3bf: 9d popf _Thread_Change_priority( 10e3c0: 52 push %edx 10e3c1: 6a 00 push $0x0 10e3c3: ff 70 4c pushl 0x4c(%eax) 10e3c6: ff 70 5c pushl 0x5c(%eax) 10e3c9: e8 aa d2 ff ff call 10b678 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 10e3ce: e8 42 d7 ff ff call 10bb15 <_Thread_Enable_dispatch> 10e3d3: 31 c0 xor %eax,%eax 10e3d5: 83 c4 10 add $0x10,%esp 10e3d8: eb 4b jmp 10e425 <_CORE_mutex_Seize_interrupt_trylock+0xd9> <== ALWAYS TAKEN return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 10e3da: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 10e3e1: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 10e3e8: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 10e3ef: ff 4a 1c decl 0x1c(%edx) _ISR_Enable( *level_p ); 10e3f2: ff 31 pushl (%ecx) 10e3f4: 9d popf 10e3f5: eb 25 jmp 10e41c <_CORE_mutex_Seize_interrupt_trylock+0xd0> <== ALWAYS TAKEN /* * 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 ) ) { 10e3f7: 8b 58 5c mov 0x5c(%eax),%ebx 10e3fa: 39 d3 cmp %edx,%ebx 10e3fc: 75 22 jne 10e420 <_CORE_mutex_Seize_interrupt_trylock+0xd4> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 10e3fe: 8b 50 40 mov 0x40(%eax),%edx 10e401: 85 d2 test %edx,%edx 10e403: 74 05 je 10e40a <_CORE_mutex_Seize_interrupt_trylock+0xbe> 10e405: 4a dec %edx 10e406: 75 18 jne 10e420 <_CORE_mutex_Seize_interrupt_trylock+0xd4> <== NEVER TAKEN 10e408: eb 08 jmp 10e412 <_CORE_mutex_Seize_interrupt_trylock+0xc6> <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 10e40a: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 10e40d: ff 31 pushl (%ecx) 10e40f: 9d popf 10e410: eb 0a jmp 10e41c <_CORE_mutex_Seize_interrupt_trylock+0xd0> <== ALWAYS TAKEN return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 10e412: c7 43 34 02 00 00 00 movl $0x2,0x34(%ebx) <== NOT EXECUTED _ISR_Enable( *level_p ); 10e419: ff 31 pushl (%ecx) <== NOT EXECUTED 10e41b: 9d popf <== NOT EXECUTED 10e41c: 31 c0 xor %eax,%eax 10e41e: eb 05 jmp 10e425 <_CORE_mutex_Seize_interrupt_trylock+0xd9> <== ALWAYS TAKEN 10e420: b8 01 00 00 00 mov $0x1,%eax return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 10e425: 8b 5d fc mov -0x4(%ebp),%ebx 10e428: c9 leave 10e429: c3 ret 0010a9ac <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 10a9ac: 55 push %ebp 10a9ad: 89 e5 mov %esp,%ebp 10a9af: 53 push %ebx 10a9b0: 83 ec 04 sub $0x4,%esp 10a9b3: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; Thread_Control *holder; #ifdef __RTEMS_STRICT_ORDER_MUTEX__ Chain_Node *first_node; #endif holder = the_mutex->holder; 10a9b6: 8b 53 5c mov 0x5c(%ebx),%edx * 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 ) { 10a9b9: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10a9bd: 74 11 je 10a9d0 <_CORE_mutex_Surrender+0x24> if ( !_Thread_Is_executing( holder ) ) 10a9bf: b8 03 00 00 00 mov $0x3,%eax 10a9c4: 3b 15 30 39 12 00 cmp 0x123930,%edx 10a9ca: 0f 85 b6 00 00 00 jne 10aa86 <_CORE_mutex_Surrender+0xda> return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 10a9d0: 8b 43 54 mov 0x54(%ebx),%eax 10a9d3: 85 c0 test %eax,%eax 10a9d5: 0f 84 a9 00 00 00 je 10aa84 <_CORE_mutex_Surrender+0xd8> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10a9db: 48 dec %eax 10a9dc: 89 43 54 mov %eax,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10a9df: 85 c0 test %eax,%eax 10a9e1: 0f 85 9d 00 00 00 jne 10aa84 <_CORE_mutex_Surrender+0xd8> 10a9e7: 8b 43 48 mov 0x48(%ebx),%eax /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10a9ea: 83 f8 02 cmp $0x2,%eax 10a9ed: 74 05 je 10a9f4 <_CORE_mutex_Surrender+0x48> 10a9ef: 83 f8 03 cmp $0x3,%eax 10a9f2: 75 03 jne 10a9f7 <_CORE_mutex_Surrender+0x4b> the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 10a9f4: ff 4a 1c decl 0x1c(%edx) } the_mutex->holder = NULL; 10a9f7: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10a9fe: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) 10aa05: 8b 43 48 mov 0x48(%ebx),%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 ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10aa08: 83 f8 02 cmp $0x2,%eax 10aa0b: 74 05 je 10aa12 <_CORE_mutex_Surrender+0x66> 10aa0d: 83 f8 03 cmp $0x3,%eax 10aa10: 75 1b jne 10aa2d <_CORE_mutex_Surrender+0x81> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,true); #endif if ( holder->resource_count == 0 && 10aa12: 83 7a 1c 00 cmpl $0x0,0x1c(%edx) 10aa16: 75 15 jne 10aa2d <_CORE_mutex_Surrender+0x81> holder->real_priority != holder->current_priority ) { 10aa18: 8b 42 18 mov 0x18(%edx),%eax 10aa1b: 3b 42 14 cmp 0x14(%edx),%eax 10aa1e: 74 0d je 10aa2d <_CORE_mutex_Surrender+0x81> _Thread_Change_priority( holder, holder->real_priority, true ); 10aa20: 51 push %ecx 10aa21: 6a 01 push $0x1 10aa23: 50 push %eax 10aa24: 52 push %edx 10aa25: e8 4e 0c 00 00 call 10b678 <_Thread_Change_priority> <== ALWAYS TAKEN 10aa2a: 83 c4 10 add $0x10,%esp /* * 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 ) ) ) { 10aa2d: 83 ec 0c sub $0xc,%esp 10aa30: 53 push %ebx 10aa31: e8 46 14 00 00 call 10be7c <_Thread_queue_Dequeue> 10aa36: 83 c4 10 add $0x10,%esp 10aa39: 85 c0 test %eax,%eax 10aa3b: 74 40 je 10aa7d <_CORE_mutex_Surrender+0xd1> } else #endif { the_mutex->holder = the_thread; 10aa3d: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10aa40: 8b 50 08 mov 0x8(%eax),%edx 10aa43: 89 53 60 mov %edx,0x60(%ebx) the_mutex->nest_count = 1; 10aa46: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10aa4d: 8b 53 48 mov 0x48(%ebx),%edx 10aa50: 83 fa 02 cmp $0x2,%edx 10aa53: 74 07 je 10aa5c <_CORE_mutex_Surrender+0xb0> 10aa55: 83 fa 03 cmp $0x3,%edx 10aa58: 75 2a jne 10aa84 <_CORE_mutex_Surrender+0xd8> 10aa5a: eb 05 jmp 10aa61 <_CORE_mutex_Surrender+0xb5> <== ALWAYS TAKEN case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 10aa5c: ff 40 1c incl 0x1c(%eax) 10aa5f: eb 23 jmp 10aa84 <_CORE_mutex_Surrender+0xd8> <== ALWAYS TAKEN case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 10aa61: ff 40 1c incl 0x1c(%eax) if (the_mutex->Attributes.priority_ceiling < 10aa64: 8b 53 4c mov 0x4c(%ebx),%edx the_thread->current_priority){ 10aa67: 3b 50 14 cmp 0x14(%eax),%edx 10aa6a: 73 18 jae 10aa84 <_CORE_mutex_Surrender+0xd8> _Thread_Change_priority( 10aa6c: 51 push %ecx 10aa6d: 6a 00 push $0x0 10aa6f: 52 push %edx 10aa70: 50 push %eax 10aa71: e8 02 0c 00 00 call 10b678 <_Thread_Change_priority> 10aa76: 31 c0 xor %eax,%eax 10aa78: 83 c4 10 add $0x10,%esp 10aa7b: eb 09 jmp 10aa86 <_CORE_mutex_Surrender+0xda> <== ALWAYS TAKEN } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10aa7d: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) 10aa84: 31 c0 xor %eax,%eax return CORE_MUTEX_STATUS_SUCCESSFUL; } 10aa86: 8b 5d fc mov -0x4(%ebp),%ebx 10aa89: c9 leave 10aa8a: c3 ret 0010aad8 <_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 ) { 10aad8: 55 push %ebp 10aad9: 89 e5 mov %esp,%ebp 10aadb: 53 push %ebx 10aadc: 83 ec 10 sub $0x10,%esp 10aadf: 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)) ) { 10aae2: 53 push %ebx 10aae3: e8 94 13 00 00 call 10be7c <_Thread_queue_Dequeue> 10aae8: 89 c2 mov %eax,%edx 10aaea: 83 c4 10 add $0x10,%esp 10aaed: 31 c0 xor %eax,%eax 10aaef: 85 d2 test %edx,%edx 10aaf1: 75 15 jne 10ab08 <_CORE_semaphore_Surrender+0x30> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 10aaf3: 9c pushf 10aaf4: fa cli 10aaf5: 59 pop %ecx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10aaf6: 8b 53 48 mov 0x48(%ebx),%edx 10aaf9: b0 04 mov $0x4,%al 10aafb: 3b 53 40 cmp 0x40(%ebx),%edx 10aafe: 73 06 jae 10ab06 <_CORE_semaphore_Surrender+0x2e> <== ALWAYS TAKEN the_semaphore->count += 1; 10ab00: 42 inc %edx 10ab01: 89 53 48 mov %edx,0x48(%ebx) 10ab04: 30 c0 xor %al,%al else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10ab06: 51 push %ecx 10ab07: 9d popf } return status; } 10ab08: 8b 5d fc mov -0x4(%ebp),%ebx 10ab0b: c9 leave 10ab0c: c3 ret 0010a764 <_Chain_Get>: */ Chain_Node *_Chain_Get( Chain_Control *the_chain ) { 10a764: 55 push %ebp 10a765: 89 e5 mov %esp,%ebp 10a767: 53 push %ebx 10a768: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 10a76b: 9c pushf 10a76c: fa cli 10a76d: 5b pop %ebx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10a76e: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10a770: 8d 4a 04 lea 0x4(%edx),%ecx 10a773: 39 c8 cmp %ecx,%eax 10a775: 75 04 jne 10a77b <_Chain_Get+0x17> 10a777: 31 c0 xor %eax,%eax 10a779: eb 07 jmp 10a782 <_Chain_Get+0x1e> <== ALWAYS TAKEN { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 10a77b: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 10a77d: 89 0a mov %ecx,(%edx) new_first->previous = _Chain_Head(the_chain); 10a77f: 89 51 04 mov %edx,0x4(%ecx) if ( !_Chain_Is_empty( the_chain ) ) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level ); 10a782: 53 push %ebx 10a783: 9d popf return return_node; } 10a784: 5b pop %ebx 10a785: c9 leave 10a786: c3 ret 0010e2d0 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 10e2d0: 55 push %ebp 10e2d1: 89 e5 mov %esp,%ebp 10e2d3: 56 push %esi 10e2d4: 53 push %ebx 10e2d5: 8b 4d 08 mov 0x8(%ebp),%ecx 10e2d8: 8b 5d 10 mov 0x10(%ebp),%ebx 10e2db: 8b 75 14 mov 0x14(%ebp),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10e2de: 89 c8 mov %ecx,%eax Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 10e2e0: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) next = starting_address; 10e2e7: 8b 55 0c mov 0xc(%ebp),%edx while ( count-- ) { 10e2ea: eb 0a jmp 10e2f6 <_Chain_Initialize+0x26> <== ALWAYS TAKEN current->next = next; 10e2ec: 89 10 mov %edx,(%eax) next->previous = current; 10e2ee: 89 42 04 mov %eax,0x4(%edx) current = next; next = (Chain_Node *) 10e2f1: 4b dec %ebx 10e2f2: 89 d0 mov %edx,%eax 10e2f4: 01 f2 add %esi,%edx count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 10e2f6: 85 db test %ebx,%ebx 10e2f8: 75 f2 jne 10e2ec <_Chain_Initialize+0x1c> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 10e2fa: 8d 51 04 lea 0x4(%ecx),%edx 10e2fd: 89 10 mov %edx,(%eax) the_chain->last = current; 10e2ff: 89 41 08 mov %eax,0x8(%ecx) } 10e302: 5b pop %ebx 10e303: 5e pop %esi 10e304: c9 leave 10e305: c3 ret 001099b8 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 1099b8: 55 push %ebp 1099b9: 89 e5 mov %esp,%ebp 1099bb: 57 push %edi 1099bc: 56 push %esi 1099bd: 53 push %ebx 1099be: 83 ec 1c sub $0x1c,%esp 1099c1: 8b 45 08 mov 0x8(%ebp),%eax 1099c4: 8b 75 0c mov 0xc(%ebp),%esi 1099c7: 8b 55 10 mov 0x10(%ebp),%edx 1099ca: 89 55 dc mov %edx,-0x24(%ebp) 1099cd: 8b 4d 14 mov 0x14(%ebp),%ecx rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 1099d0: 8b 1d 30 39 12 00 mov 0x123930,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 1099d6: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 1099dd: 8b bb f0 00 00 00 mov 0xf0(%ebx),%edi _ISR_Disable( level ); 1099e3: 9c pushf 1099e4: fa cli 1099e5: 8f 45 e4 popl -0x1c(%ebp) pending_events = api->pending_events; 1099e8: 8b 17 mov (%edi),%edx 1099ea: 89 55 e0 mov %edx,-0x20(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 1099ed: 21 c2 and %eax,%edx 1099ef: 74 1b je 109a0c <_Event_Seize+0x54> 1099f1: 39 c2 cmp %eax,%edx 1099f3: 74 08 je 1099fd <_Event_Seize+0x45> 1099f5: f7 c6 02 00 00 00 test $0x2,%esi 1099fb: 74 0f je 109a0c <_Event_Seize+0x54> <== ALWAYS TAKEN (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 1099fd: 89 d0 mov %edx,%eax 1099ff: f7 d0 not %eax 109a01: 23 45 e0 and -0x20(%ebp),%eax 109a04: 89 07 mov %eax,(%edi) _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 109a06: ff 75 e4 pushl -0x1c(%ebp) 109a09: 9d popf 109a0a: eb 13 jmp 109a1f <_Event_Seize+0x67> <== ALWAYS TAKEN *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 109a0c: f7 c6 01 00 00 00 test $0x1,%esi 109a12: 74 12 je 109a26 <_Event_Seize+0x6e> _ISR_Enable( level ); 109a14: ff 75 e4 pushl -0x1c(%ebp) 109a17: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 109a18: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 109a1f: 89 11 mov %edx,(%ecx) return; 109a21: e9 91 00 00 00 jmp 109ab7 <_Event_Seize+0xff> <== ALWAYS TAKEN * 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; 109a26: 89 73 30 mov %esi,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 109a29: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 109a2c: 89 4b 28 mov %ecx,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 109a2f: c7 05 c8 3a 12 00 01 movl $0x1,0x123ac8 109a36: 00 00 00 _ISR_Enable( level ); 109a39: ff 75 e4 pushl -0x1c(%ebp) 109a3c: 9d popf if ( ticks ) { 109a3d: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) 109a41: 74 34 je 109a77 <_Event_Seize+0xbf> _Watchdog_Initialize( 109a43: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 109a46: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 109a4d: c7 43 64 f4 9b 10 00 movl $0x109bf4,0x64(%ebx) the_watchdog->id = id; 109a54: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 109a57: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 109a5e: 8b 45 dc mov -0x24(%ebp),%eax 109a61: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 109a64: 52 push %edx 109a65: 52 push %edx 109a66: 8d 43 48 lea 0x48(%ebx),%eax 109a69: 50 push %eax 109a6a: 68 50 39 12 00 push $0x123950 109a6f: e8 04 2e 00 00 call 10c878 <_Watchdog_Insert> 109a74: 83 c4 10 add $0x10,%esp NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 109a77: 50 push %eax 109a78: 50 push %eax 109a79: 68 00 01 00 00 push $0x100 109a7e: 53 push %ebx 109a7f: e8 54 28 00 00 call 10c2d8 <_Thread_Set_state> _ISR_Disable( level ); 109a84: 9c pushf 109a85: fa cli 109a86: 5a pop %edx sync_state = _Event_Sync_state; 109a87: a1 c8 3a 12 00 mov 0x123ac8,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 109a8c: c7 05 c8 3a 12 00 00 movl $0x0,0x123ac8 109a93: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 109a96: 83 c4 10 add $0x10,%esp 109a99: 83 f8 01 cmp $0x1,%eax 109a9c: 75 04 jne 109aa2 <_Event_Seize+0xea> _ISR_Enable( level ); 109a9e: 52 push %edx 109a9f: 9d popf 109aa0: eb 15 jmp 109ab7 <_Event_Seize+0xff> <== ALWAYS TAKEN * 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 ); 109aa2: 89 55 10 mov %edx,0x10(%ebp) 109aa5: 89 5d 0c mov %ebx,0xc(%ebp) 109aa8: 89 45 08 mov %eax,0x8(%ebp) } 109aab: 8d 65 f4 lea -0xc(%ebp),%esp 109aae: 5b pop %ebx 109aaf: 5e pop %esi 109ab0: 5f pop %edi 109ab1: 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 ); 109ab2: e9 75 1b 00 00 jmp 10b62c <_Thread_blocking_operation_Cancel> } 109ab7: 8d 65 f4 lea -0xc(%ebp),%esp 109aba: 5b pop %ebx 109abb: 5e pop %esi 109abc: 5f pop %edi 109abd: c9 leave 109abe: c3 ret 00109b0c <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 109b0c: 55 push %ebp 109b0d: 89 e5 mov %esp,%ebp 109b0f: 57 push %edi 109b10: 56 push %esi 109b11: 53 push %ebx 109b12: 83 ec 2c sub $0x2c,%esp 109b15: 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 ]; 109b18: 8b bb f0 00 00 00 mov 0xf0(%ebx),%edi option_set = (rtems_option) the_thread->Wait.option; 109b1e: 8b 43 30 mov 0x30(%ebx),%eax 109b21: 89 45 e0 mov %eax,-0x20(%ebp) _ISR_Disable( level ); 109b24: 9c pushf 109b25: fa cli 109b26: 58 pop %eax pending_events = api->pending_events; 109b27: 8b 17 mov (%edi),%edx 109b29: 89 55 d4 mov %edx,-0x2c(%ebp) event_condition = (rtems_event_set) the_thread->Wait.count; 109b2c: 8b 73 24 mov 0x24(%ebx),%esi seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 109b2f: 21 f2 and %esi,%edx 109b31: 75 07 jne 109b3a <_Event_Surrender+0x2e> _ISR_Enable( level ); 109b33: 50 push %eax 109b34: 9d popf return; 109b35: e9 b0 00 00 00 jmp 109bea <_Event_Surrender+0xde> <== ALWAYS TAKEN /* * 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() && 109b3a: 8b 0d 0c 39 12 00 mov 0x12390c,%ecx 109b40: 85 c9 test %ecx,%ecx 109b42: 74 49 je 109b8d <_Event_Surrender+0x81> 109b44: 3b 1d 30 39 12 00 cmp 0x123930,%ebx 109b4a: 75 41 jne 109b8d <_Event_Surrender+0x81> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 109b4c: 8b 0d c8 3a 12 00 mov 0x123ac8,%ecx /* * 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() && 109b52: 83 f9 02 cmp $0x2,%ecx 109b55: 74 09 je 109b60 <_Event_Surrender+0x54> <== ALWAYS TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 109b57: 8b 0d c8 3a 12 00 mov 0x123ac8,%ecx /* * 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() && 109b5d: 49 dec %ecx 109b5e: 75 2d jne 109b8d <_Event_Surrender+0x81> <== ALWAYS TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 109b60: 39 f2 cmp %esi,%edx 109b62: 74 06 je 109b6a <_Event_Surrender+0x5e> 109b64: f6 45 e0 02 testb $0x2,-0x20(%ebp) 109b68: 74 1f je 109b89 <_Event_Surrender+0x7d> <== ALWAYS TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 109b6a: 89 d6 mov %edx,%esi 109b6c: f7 d6 not %esi 109b6e: 23 75 d4 and -0x2c(%ebp),%esi 109b71: 89 37 mov %esi,(%edi) the_thread->Wait.count = 0; 109b73: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 109b7a: 8b 4b 28 mov 0x28(%ebx),%ecx 109b7d: 89 11 mov %edx,(%ecx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 109b7f: c7 05 c8 3a 12 00 03 movl $0x3,0x123ac8 109b86: 00 00 00 } _ISR_Enable( level ); 109b89: 50 push %eax 109b8a: 9d popf return; 109b8b: eb 5d jmp 109bea <_Event_Surrender+0xde> <== ALWAYS TAKEN } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 109b8d: f6 43 11 01 testb $0x1,0x11(%ebx) 109b91: 74 55 je 109be8 <_Event_Surrender+0xdc> <== ALWAYS TAKEN if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 109b93: 39 f2 cmp %esi,%edx 109b95: 74 06 je 109b9d <_Event_Surrender+0x91> 109b97: f6 45 e0 02 testb $0x2,-0x20(%ebp) 109b9b: 74 4b je 109be8 <_Event_Surrender+0xdc> <== ALWAYS TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 109b9d: 89 d6 mov %edx,%esi 109b9f: f7 d6 not %esi 109ba1: 23 75 d4 and -0x2c(%ebp),%esi 109ba4: 89 37 mov %esi,(%edi) the_thread->Wait.count = 0; 109ba6: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 109bad: 8b 4b 28 mov 0x28(%ebx),%ecx 109bb0: 89 11 mov %edx,(%ecx) _ISR_Flash( level ); 109bb2: 50 push %eax 109bb3: 9d popf 109bb4: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 109bb5: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 109bb9: 74 06 je 109bc1 <_Event_Surrender+0xb5> _ISR_Enable( level ); 109bbb: 50 push %eax 109bbc: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 109bbd: 51 push %ecx 109bbe: 51 push %ecx 109bbf: eb 17 jmp 109bd8 <_Event_Surrender+0xcc> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 109bc1: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 109bc8: 50 push %eax 109bc9: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 109bca: 83 ec 0c sub $0xc,%esp 109bcd: 8d 43 48 lea 0x48(%ebx),%eax 109bd0: 50 push %eax 109bd1: e8 ba 2d 00 00 call 10c990 <_Watchdog_Remove> 109bd6: 58 pop %eax 109bd7: 5a pop %edx 109bd8: 68 f8 ff 03 10 push $0x1003fff8 109bdd: 53 push %ebx 109bde: e8 b5 1b 00 00 call 10b798 <_Thread_Clear_state> 109be3: 83 c4 10 add $0x10,%esp 109be6: eb 02 jmp 109bea <_Event_Surrender+0xde> <== ALWAYS TAKEN _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 109be8: 50 push %eax <== NOT EXECUTED 109be9: 9d popf <== NOT EXECUTED } 109bea: 8d 65 f4 lea -0xc(%ebp),%esp 109bed: 5b pop %ebx 109bee: 5e pop %esi 109bef: 5f pop %edi 109bf0: c9 leave 109bf1: c3 ret 00109bf4 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 109bf4: 55 push %ebp 109bf5: 89 e5 mov %esp,%ebp 109bf7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 109bfa: 8d 45 f4 lea -0xc(%ebp),%eax 109bfd: 50 push %eax 109bfe: ff 75 08 pushl 0x8(%ebp) 109c01: e8 32 1f 00 00 call 10bb38 <_Thread_Get> switch ( location ) { 109c06: 83 c4 10 add $0x10,%esp 109c09: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 109c0d: 75 49 jne 109c58 <_Event_Timeout+0x64> <== ALWAYS 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 ); 109c0f: 9c pushf 109c10: fa cli 109c11: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 109c12: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 109c19: 3b 05 30 39 12 00 cmp 0x123930,%eax 109c1f: 75 13 jne 109c34 <_Event_Timeout+0x40> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 109c21: 8b 0d c8 3a 12 00 mov 0x123ac8,%ecx 109c27: 49 dec %ecx 109c28: 75 0a jne 109c34 <_Event_Timeout+0x40> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 109c2a: c7 05 c8 3a 12 00 02 movl $0x2,0x123ac8 109c31: 00 00 00 } the_thread->Wait.return_code = RTEMS_TIMEOUT; 109c34: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 109c3b: 52 push %edx 109c3c: 9d popf 109c3d: 52 push %edx 109c3e: 52 push %edx 109c3f: 68 f8 ff 03 10 push $0x1003fff8 109c44: 50 push %eax 109c45: e8 4e 1b 00 00 call 10b798 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 109c4a: a1 74 38 12 00 mov 0x123874,%eax 109c4f: 48 dec %eax 109c50: a3 74 38 12 00 mov %eax,0x123874 109c55: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 109c58: c9 leave 109c59: c3 ret 0010a4bc <_Extension_Manager_initialization>: * * Output parameters: NONE */ void _Extension_Manager_initialization(void) { 10a4bc: 55 push %ebp 10a4bd: 89 e5 mov %esp,%ebp 10a4bf: 83 ec 0c sub $0xc,%esp _Objects_Initialize_information( 10a4c2: 6a 04 push $0x4 10a4c4: 6a 00 push $0x0 10a4c6: 6a 44 push $0x44 10a4c8: ff 35 20 f9 11 00 pushl 0x11f920 10a4ce: 6a 09 push $0x9 10a4d0: 6a 02 push $0x2 10a4d2: 68 0c 3b 12 00 push $0x123b0c 10a4d7: e8 cc 0e 00 00 call 10b3a8 <_Objects_Initialize_information> <== ALWAYS TAKEN 10a4dc: 83 c4 20 add $0x20,%esp , false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 10a4df: c9 leave 10a4e0: c3 ret 0010e4e4 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 10e4e4: 55 push %ebp 10e4e5: 89 e5 mov %esp,%ebp 10e4e7: 57 push %edi 10e4e8: 56 push %esi 10e4e9: 53 push %ebx 10e4ea: 83 ec 2c sub $0x2c,%esp 10e4ed: 8b 75 08 mov 0x8(%ebp),%esi return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10e4f0: 8b 4e 08 mov 0x8(%esi),%ecx Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; 10e4f3: 8b 46 10 mov 0x10(%esi),%eax 10e4f6: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 10e4f9: 8b 45 0c mov 0xc(%ebp),%eax 10e4fc: 83 c0 04 add $0x4,%eax 10e4ff: 89 45 cc mov %eax,-0x34(%ebp) 10e502: 0f 82 2f 01 00 00 jb 10e637 <_Heap_Allocate_aligned_with_boundary+0x153> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 10e508: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10e50c: 74 18 je 10e526 <_Heap_Allocate_aligned_with_boundary+0x42> if ( boundary < alloc_size ) { 10e50e: 8b 45 0c mov 0xc(%ebp),%eax 10e511: 39 45 14 cmp %eax,0x14(%ebp) 10e514: 0f 82 1d 01 00 00 jb 10e637 <_Heap_Allocate_aligned_with_boundary+0x153> return NULL; } if ( alignment == 0 ) { 10e51a: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10e51e: 75 06 jne 10e526 <_Heap_Allocate_aligned_with_boundary+0x42> 10e520: 8b 45 e0 mov -0x20(%ebp),%eax 10e523: 89 45 10 mov %eax,0x10(%ebp) 10e526: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 10e52d: 8b 45 e0 mov -0x20(%ebp),%eax 10e530: 83 c0 07 add $0x7,%eax 10e533: 89 45 c8 mov %eax,-0x38(%ebp) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 10e536: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp) 10e53d: 8b 45 0c mov 0xc(%ebp),%eax 10e540: 29 45 d8 sub %eax,-0x28(%ebp) 10e543: 89 f7 mov %esi,%edi 10e545: e9 ba 00 00 00 jmp 10e604 <_Heap_Allocate_aligned_with_boundary+0x120> <== ALWAYS TAKEN while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 10e54a: ff 45 e4 incl -0x1c(%ebp) /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 10e54d: 8b 59 04 mov 0x4(%ecx),%ebx 10e550: 3b 5d cc cmp -0x34(%ebp),%ebx 10e553: 0f 86 a8 00 00 00 jbe 10e601 <_Heap_Allocate_aligned_with_boundary+0x11d> if ( alignment == 0 ) { 10e559: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10e55d: 8d 41 08 lea 0x8(%ecx),%eax 10e560: 89 45 dc mov %eax,-0x24(%ebp) 10e563: 75 07 jne 10e56c <_Heap_Allocate_aligned_with_boundary+0x88> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10e565: 89 c3 mov %eax,%ebx 10e567: e9 91 00 00 00 jmp 10e5fd <_Heap_Allocate_aligned_with_boundary+0x119> <== ALWAYS TAKEN uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 10e56c: 8b 47 14 mov 0x14(%edi),%eax 10e56f: 89 45 d4 mov %eax,-0x2c(%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; 10e572: 83 e3 fe and $0xfffffffe,%ebx 10e575: 8d 1c 19 lea (%ecx,%ebx,1),%ebx 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; 10e578: 8b 75 c8 mov -0x38(%ebp),%esi 10e57b: 29 c6 sub %eax,%esi 10e57d: 01 de add %ebx,%esi uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 10e57f: 03 5d d8 add -0x28(%ebp),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10e582: 89 d8 mov %ebx,%eax 10e584: 31 d2 xor %edx,%edx 10e586: f7 75 10 divl 0x10(%ebp) 10e589: 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 ) { 10e58b: 39 f3 cmp %esi,%ebx 10e58d: 76 0b jbe 10e59a <_Heap_Allocate_aligned_with_boundary+0xb6> 10e58f: 89 f0 mov %esi,%eax 10e591: 31 d2 xor %edx,%edx 10e593: f7 75 10 divl 0x10(%ebp) 10e596: 89 f3 mov %esi,%ebx 10e598: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 10e59a: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10e59e: 74 3f je 10e5df <_Heap_Allocate_aligned_with_boundary+0xfb> /* 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; 10e5a0: 8b 45 0c mov 0xc(%ebp),%eax 10e5a3: 8d 34 03 lea (%ebx,%eax,1),%esi /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 10e5a6: 8b 45 dc mov -0x24(%ebp),%eax 10e5a9: 03 45 0c add 0xc(%ebp),%eax 10e5ac: 89 45 d0 mov %eax,-0x30(%ebp) 10e5af: eb 19 jmp 10e5ca <_Heap_Allocate_aligned_with_boundary+0xe6> <== ALWAYS TAKEN uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 10e5b1: 3b 55 d0 cmp -0x30(%ebp),%edx 10e5b4: 72 4b jb 10e601 <_Heap_Allocate_aligned_with_boundary+0x11d> return 0; } alloc_begin = boundary_line - alloc_size; 10e5b6: 89 d3 mov %edx,%ebx 10e5b8: 2b 5d 0c sub 0xc(%ebp),%ebx 10e5bb: 89 d8 mov %ebx,%eax 10e5bd: 31 d2 xor %edx,%edx 10e5bf: f7 75 10 divl 0x10(%ebp) 10e5c2: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 10e5c4: 8b 45 0c mov 0xc(%ebp),%eax 10e5c7: 8d 34 03 lea (%ebx,%eax,1),%esi 10e5ca: 89 f0 mov %esi,%eax 10e5cc: 31 d2 xor %edx,%edx 10e5ce: f7 75 14 divl 0x14(%ebp) 10e5d1: 89 f0 mov %esi,%eax 10e5d3: 29 d0 sub %edx,%eax 10e5d5: 89 c2 mov %eax,%edx /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 10e5d7: 39 f0 cmp %esi,%eax 10e5d9: 73 04 jae 10e5df <_Heap_Allocate_aligned_with_boundary+0xfb> 10e5db: 39 c3 cmp %eax,%ebx 10e5dd: 72 d2 jb 10e5b1 <_Heap_Allocate_aligned_with_boundary+0xcd> 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 ) { 10e5df: 3b 5d dc cmp -0x24(%ebp),%ebx 10e5e2: 72 1d jb 10e601 <_Heap_Allocate_aligned_with_boundary+0x11d> 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; 10e5e4: be f8 ff ff ff mov $0xfffffff8,%esi 10e5e9: 29 ce sub %ecx,%esi 10e5eb: 01 de add %ebx,%esi 10e5ed: 89 d8 mov %ebx,%eax 10e5ef: 31 d2 xor %edx,%edx 10e5f1: f7 75 e0 divl -0x20(%ebp) if ( free_size >= min_block_size || free_size == 0 ) { 10e5f4: 29 d6 sub %edx,%esi 10e5f6: 74 05 je 10e5fd <_Heap_Allocate_aligned_with_boundary+0x119> 10e5f8: 3b 75 d4 cmp -0x2c(%ebp),%esi 10e5fb: 72 04 jb 10e601 <_Heap_Allocate_aligned_with_boundary+0x11d> boundary ); } } if ( alloc_begin != 0 ) { 10e5fd: 85 db test %ebx,%ebx 10e5ff: 75 11 jne 10e612 <_Heap_Allocate_aligned_with_boundary+0x12e> <== NEVER TAKEN break; } block = block->next; 10e601: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 10e604: 39 f9 cmp %edi,%ecx 10e606: 0f 85 3e ff ff ff jne 10e54a <_Heap_Allocate_aligned_with_boundary+0x66> 10e60c: 89 fe mov %edi,%esi 10e60e: 31 db xor %ebx,%ebx 10e610: eb 16 jmp 10e628 <_Heap_Allocate_aligned_with_boundary+0x144> <== ALWAYS TAKEN 10e612: 89 fe mov %edi,%esi block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 10e614: 8b 45 e4 mov -0x1c(%ebp),%eax 10e617: 01 47 4c add %eax,0x4c(%edi) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 10e61a: ff 75 0c pushl 0xc(%ebp) 10e61d: 53 push %ebx 10e61e: 51 push %ecx 10e61f: 57 push %edi 10e620: e8 a3 c7 ff ff call 10adc8 <_Heap_Block_allocate> <== ALWAYS TAKEN 10e625: 83 c4 10 add $0x10,%esp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 10e628: 8b 45 e4 mov -0x1c(%ebp),%eax 10e62b: 39 46 44 cmp %eax,0x44(%esi) 10e62e: 73 03 jae 10e633 <_Heap_Allocate_aligned_with_boundary+0x14f> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 10e630: 89 46 44 mov %eax,0x44(%esi) } return (void *) alloc_begin; 10e633: 89 d8 mov %ebx,%eax 10e635: eb 02 jmp 10e639 <_Heap_Allocate_aligned_with_boundary+0x155> <== ALWAYS TAKEN 10e637: 31 c0 xor %eax,%eax } 10e639: 8d 65 f4 lea -0xc(%ebp),%esp 10e63c: 5b pop %ebx 10e63d: 5e pop %esi 10e63e: 5f pop %edi 10e63f: c9 leave 10e640: c3 ret 0010adc8 <_Heap_Block_allocate>: Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 10adc8: 55 push %ebp 10adc9: 89 e5 mov %esp,%ebp 10adcb: 57 push %edi 10adcc: 56 push %esi 10adcd: 53 push %ebx 10adce: 83 ec 10 sub $0x10,%esp 10add1: 8b 75 08 mov 0x8(%ebp),%esi 10add4: 8b 5d 0c mov 0xc(%ebp),%ebx 10add7: 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; 10adda: 89 5d e8 mov %ebx,-0x18(%ebp) 10addd: 8d 50 f8 lea -0x8(%eax),%edx 10ade0: 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; 10ade3: 89 d7 mov %edx,%edi 10ade5: 29 df sub %ebx,%edi Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 10ade7: 8b 53 04 mov 0x4(%ebx),%edx 10adea: 83 e2 fe and $0xfffffffe,%edx /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); 10aded: 89 f1 mov %esi,%ecx Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 10adef: f6 44 13 04 01 testb $0x1,0x4(%ebx,%edx,1) 10adf4: 75 1b jne 10ae11 <_Heap_Block_allocate+0x49> free_list_anchor = block->prev; 10adf6: 8b 4b 0c mov 0xc(%ebx),%ecx return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 10adf9: 8b 53 08 mov 0x8(%ebx),%edx Heap_Block *prev = block->prev; prev->next = next; 10adfc: 89 51 08 mov %edx,0x8(%ecx) next->prev = prev; 10adff: 89 4a 0c mov %ecx,0xc(%edx) _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 10ae02: ff 4e 38 decl 0x38(%esi) ++stats->used_blocks; 10ae05: ff 46 40 incl 0x40(%esi) stats->free_size -= _Heap_Block_size( block ); 10ae08: 8b 53 04 mov 0x4(%ebx),%edx 10ae0b: 83 e2 fe and $0xfffffffe,%edx 10ae0e: 29 56 30 sub %edx,0x30(%esi) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 10ae11: 8b 56 10 mov 0x10(%esi),%edx 10ae14: 89 55 e4 mov %edx,-0x1c(%ebp) 10ae17: 39 d7 cmp %edx,%edi 10ae19: 73 0e jae 10ae29 <_Heap_Block_allocate+0x61> Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); 10ae1b: 03 7d 14 add 0x14(%ebp),%edi 10ae1e: 57 push %edi 10ae1f: 51 push %ecx 10ae20: 53 push %ebx 10ae21: 56 push %esi 10ae22: e8 cc fe ff ff call 10acf3 <_Heap_Block_split> <== ALWAYS TAKEN 10ae27: eb 62 jmp 10ae8b <_Heap_Block_allocate+0xc3> <== ALWAYS 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; 10ae29: 8b 7b 04 mov 0x4(%ebx),%edi 10ae2c: 89 7d ec mov %edi,-0x14(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 10ae2f: 31 d2 xor %edx,%edx 10ae31: f7 75 e4 divl -0x1c(%ebp) 10ae34: 8b 45 f0 mov -0x10(%ebp),%eax 10ae37: 29 d0 sub %edx,%eax 10ae39: 89 c7 mov %eax,%edi _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); uintptr_t const new_block_begin = (uintptr_t) new_block; uintptr_t const new_block_size = block_end - new_block_begin; block_end = new_block_begin; block_size = block_end - block_begin; 10ae3b: 29 d8 sub %ebx,%eax _HAssert( block_size >= heap->min_block_size ); _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; 10ae3d: 01 46 30 add %eax,0x30(%esi) if ( _Heap_Is_prev_used( block ) ) { 10ae40: f6 43 04 01 testb $0x1,0x4(%ebx) 10ae44: 74 16 je 10ae5c <_Heap_Block_allocate+0x94> RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10ae46: 8b 51 08 mov 0x8(%ecx),%edx new_block->next = next; 10ae49: 89 53 08 mov %edx,0x8(%ebx) new_block->prev = block_before; 10ae4c: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10ae4f: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10ae52: 89 5a 0c mov %ebx,0xc(%edx) _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 10ae55: ff 46 38 incl 0x38(%esi) 10ae58: 89 d9 mov %ebx,%ecx 10ae5a: eb 0a jmp 10ae66 <_Heap_Block_allocate+0x9e> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); 10ae5c: 2b 1b sub (%ebx),%ebx Heap_Block *const prev_block = _Heap_Prev_block( block ); uintptr_t const prev_block_size = _Heap_Block_size( prev_block ); block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; 10ae5e: 8b 53 04 mov 0x4(%ebx),%edx 10ae61: 83 e2 fe and $0xfffffffe,%edx 10ae64: 01 d0 add %edx,%eax } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 10ae66: 89 c2 mov %eax,%edx 10ae68: 83 ca 01 or $0x1,%edx 10ae6b: 89 53 04 mov %edx,0x4(%ebx) new_block->prev_size = block_size; 10ae6e: 89 07 mov %eax,(%edi) new_block->size_and_flag = new_block_size; 10ae70: 8b 45 ec mov -0x14(%ebp),%eax 10ae73: 83 e0 fe and $0xfffffffe,%eax 10ae76: 03 45 e8 add -0x18(%ebp),%eax 10ae79: 29 f8 sub %edi,%eax 10ae7b: 89 47 04 mov %eax,0x4(%edi) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 10ae7e: ff 75 14 pushl 0x14(%ebp) 10ae81: 51 push %ecx 10ae82: 57 push %edi 10ae83: 56 push %esi 10ae84: e8 6a fe ff ff call 10acf3 <_Heap_Block_split> <== ALWAYS TAKEN 10ae89: 89 fb mov %edi,%ebx 10ae8b: 83 c4 10 add $0x10,%esp alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 10ae8e: 8b 46 30 mov 0x30(%esi),%eax Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 10ae91: 39 46 34 cmp %eax,0x34(%esi) 10ae94: 76 03 jbe 10ae99 <_Heap_Block_allocate+0xd1> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 10ae96: 89 46 34 mov %eax,0x34(%esi) } return block; } 10ae99: 89 d8 mov %ebx,%eax 10ae9b: 8d 65 f4 lea -0xc(%ebp),%esp 10ae9e: 5b pop %ebx 10ae9f: 5e pop %esi 10aea0: 5f pop %edi 10aea1: c9 leave 10aea2: c3 ret 0010acf3 <_Heap_Block_split>: Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 10acf3: 55 push %ebp 10acf4: 89 e5 mov %esp,%ebp 10acf6: 57 push %edi 10acf7: 56 push %esi 10acf8: 53 push %ebx 10acf9: 83 ec 10 sub $0x10,%esp 10acfc: 8b 4d 08 mov 0x8(%ebp),%ecx Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; 10acff: 8b 71 10 mov 0x10(%ecx),%esi uintptr_t const min_block_size = heap->min_block_size; 10ad02: 8b 41 14 mov 0x14(%ecx),%eax 10ad05: 89 45 e4 mov %eax,-0x1c(%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; 10ad08: 8b 55 0c mov 0xc(%ebp),%edx 10ad0b: 8b 52 04 mov 0x4(%edx),%edx 10ad0e: 89 55 e8 mov %edx,-0x18(%ebp) 10ad11: 83 e2 fe and $0xfffffffe,%edx 10ad14: 89 55 ec mov %edx,-0x14(%ebp) uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const used_size = _Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE; 10ad17: 89 c2 mov %eax,%edx 10ad19: 83 ea 08 sub $0x8,%edx 10ad1c: 8b 45 14 mov 0x14(%ebp),%eax 10ad1f: 39 d0 cmp %edx,%eax 10ad21: 73 02 jae 10ad25 <_Heap_Block_split+0x32> 10ad23: 89 d0 mov %edx,%eax 10ad25: 83 c0 08 add $0x8,%eax 10ad28: 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; 10ad2b: 31 d2 xor %edx,%edx 10ad2d: f7 f6 div %esi if ( remainder != 0 ) { 10ad2f: 8b 7d f0 mov -0x10(%ebp),%edi 10ad32: 85 d2 test %edx,%edx 10ad34: 74 04 je 10ad3a <_Heap_Block_split+0x47> return value - remainder + alignment; 10ad36: 01 f7 add %esi,%edi 10ad38: 29 d7 sub %edx,%edi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10ad3a: 8b 45 0c mov 0xc(%ebp),%eax 10ad3d: 03 45 ec add -0x14(%ebp),%eax 10ad40: 89 c2 mov %eax,%edx Heap_Block *next_block = _Heap_Block_at( block, block_size ); _HAssert( used_size <= block_size + HEAP_BLOCK_SIZE_OFFSET ); _HAssert( used_size + free_size == block_size + HEAP_BLOCK_SIZE_OFFSET ); if ( free_size >= free_size_limit ) { 10ad42: 8b 5d ec mov -0x14(%ebp),%ebx 10ad45: 83 c3 04 add $0x4,%ebx 10ad48: 2b 5d f0 sub -0x10(%ebp),%ebx 10ad4b: 8b 75 e4 mov -0x1c(%ebp),%esi 10ad4e: 83 c6 04 add $0x4,%esi 10ad51: 39 f3 cmp %esi,%ebx 10ad53: 72 67 jb 10adbc <_Heap_Block_split+0xc9> 10ad55: 8b 5d 0c mov 0xc(%ebp),%ebx 10ad58: 8d 04 1f lea (%edi,%ebx,1),%eax Heap_Block *const free_block = _Heap_Block_at( block, used_block_size ); uintptr_t free_block_size = block_size - used_block_size; 10ad5b: 8b 75 ec mov -0x14(%ebp),%esi 10ad5e: 29 fe sub %edi,%esi uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 10ad60: 8b 5d e8 mov -0x18(%ebp),%ebx 10ad63: 83 e3 01 and $0x1,%ebx 10ad66: 09 fb or %edi,%ebx 10ad68: 8b 7d 0c mov 0xc(%ebp),%edi 10ad6b: 89 5f 04 mov %ebx,0x4(%edi) _HAssert( used_block_size + free_block_size == block_size ); _Heap_Block_set_size( block, used_block_size ); /* Statistics */ stats->free_size += free_block_size; 10ad6e: 01 71 30 add %esi,0x30(%ecx) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10ad71: 8b 5a 04 mov 0x4(%edx),%ebx 10ad74: 83 e3 fe and $0xfffffffe,%ebx if ( _Heap_Is_used( next_block ) ) { 10ad77: f6 44 1a 04 01 testb $0x1,0x4(%edx,%ebx,1) 10ad7c: 74 17 je 10ad95 <_Heap_Block_split+0xa2> RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10ad7e: 8b 7d 10 mov 0x10(%ebp),%edi 10ad81: 8b 5f 08 mov 0x8(%edi),%ebx new_block->next = next; 10ad84: 89 58 08 mov %ebx,0x8(%eax) new_block->prev = block_before; 10ad87: 89 78 0c mov %edi,0xc(%eax) block_before->next = new_block; 10ad8a: 89 47 08 mov %eax,0x8(%edi) next->prev = new_block; 10ad8d: 89 43 0c mov %eax,0xc(%ebx) _Heap_Free_list_insert_after( free_list_anchor, free_block ); /* Statistics */ ++stats->free_blocks; 10ad90: ff 41 38 incl 0x38(%ecx) 10ad93: eb 17 jmp 10adac <_Heap_Block_split+0xb9> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 10ad95: 8b 4a 08 mov 0x8(%edx),%ecx Heap_Block *prev = old_block->prev; 10ad98: 8b 52 0c mov 0xc(%edx),%edx new_block->next = next; 10ad9b: 89 48 08 mov %ecx,0x8(%eax) new_block->prev = prev; 10ad9e: 89 50 0c mov %edx,0xc(%eax) next->prev = new_block; 10ada1: 89 41 0c mov %eax,0xc(%ecx) prev->next = new_block; 10ada4: 89 42 08 mov %eax,0x8(%edx) } 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; 10ada7: 01 de add %ebx,%esi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10ada9: 8d 14 06 lea (%esi,%eax,1),%edx next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; 10adac: 89 f1 mov %esi,%ecx 10adae: 83 c9 01 or $0x1,%ecx 10adb1: 89 48 04 mov %ecx,0x4(%eax) next_block->prev_size = free_block_size; 10adb4: 89 32 mov %esi,(%edx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10adb6: 83 62 04 fe andl $0xfffffffe,0x4(%edx) 10adba: eb 04 jmp 10adc0 <_Heap_Block_split+0xcd> <== ALWAYS TAKEN } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 10adbc: 83 48 04 01 orl $0x1,0x4(%eax) } } 10adc0: 83 c4 10 add $0x10,%esp 10adc3: 5b pop %ebx 10adc4: 5e pop %esi 10adc5: 5f pop %edi 10adc6: c9 leave 10adc7: c3 ret 00111880 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 111880: 55 push %ebp 111881: 89 e5 mov %esp,%ebp 111883: 56 push %esi 111884: 53 push %ebx 111885: 8b 4d 08 mov 0x8(%ebp),%ecx 111888: 8b 55 0c mov 0xc(%ebp),%edx Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; 11188b: 8b 71 1c mov 0x1c(%ecx),%esi uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block; 11188e: 8b 59 24 mov 0x24(%ecx),%ebx * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { 111891: 39 f2 cmp %esi,%edx 111893: 73 0a jae 11189f <_Heap_Extend+0x1f> uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; 111895: b8 01 00 00 00 mov $0x1,%eax 11189a: 3b 51 18 cmp 0x18(%ecx),%edx 11189d: 73 5f jae 1118fe <_Heap_Extend+0x7e> * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 11189f: b8 02 00 00 00 mov $0x2,%eax 1118a4: 39 f2 cmp %esi,%edx 1118a6: 75 56 jne 1118fe <_Heap_Extend+0x7e> { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; 1118a8: 03 55 10 add 0x10(%ebp),%edx * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ heap->area_end = new_heap_area_end; 1118ab: 89 51 1c mov %edx,0x1c(%ecx) extend_size = new_heap_area_end 1118ae: 29 da sub %ebx,%edx 1118b0: 8d 72 f8 lea -0x8(%edx),%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 1118b3: 89 f0 mov %esi,%eax 1118b5: 31 d2 xor %edx,%edx 1118b7: f7 71 10 divl 0x10(%ecx) 1118ba: 29 d6 sub %edx,%esi - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; 1118bc: 8b 45 14 mov 0x14(%ebp),%eax 1118bf: 89 30 mov %esi,(%eax) if( extend_size >= heap->min_block_size ) { 1118c1: 31 c0 xor %eax,%eax 1118c3: 3b 71 14 cmp 0x14(%ecx),%esi 1118c6: 72 36 jb 1118fe <_Heap_Extend+0x7e> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 1118c8: 8d 14 1e lea (%esi,%ebx,1),%edx uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 1118cb: 8b 43 04 mov 0x4(%ebx),%eax 1118ce: 83 e0 01 and $0x1,%eax 1118d1: 09 f0 or %esi,%eax 1118d3: 89 43 04 mov %eax,0x4(%ebx) Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 1118d6: 8b 41 20 mov 0x20(%ecx),%eax 1118d9: 29 d0 sub %edx,%eax 1118db: 83 c8 01 or $0x1,%eax 1118de: 89 42 04 mov %eax,0x4(%edx) ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 1118e1: 89 51 24 mov %edx,0x24(%ecx) /* Statistics */ stats->size += extend_size; 1118e4: 01 71 2c add %esi,0x2c(%ecx) ++stats->used_blocks; 1118e7: ff 41 40 incl 0x40(%ecx) --stats->frees; /* Do not count subsequent call as actual free() */ 1118ea: ff 49 50 decl 0x50(%ecx) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 1118ed: 50 push %eax 1118ee: 50 push %eax 1118ef: 83 c3 08 add $0x8,%ebx 1118f2: 53 push %ebx 1118f3: 51 push %ecx 1118f4: e8 7b be ff ff call 10d774 <_Heap_Free> <== ALWAYS TAKEN 1118f9: 31 c0 xor %eax,%eax 1118fb: 83 c4 10 add $0x10,%esp } return HEAP_EXTEND_SUCCESSFUL; } 1118fe: 8d 65 f8 lea -0x8(%ebp),%esp 111901: 5b pop %ebx 111902: 5e pop %esi 111903: c9 leave 111904: c3 ret 0010e644 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 10e644: 55 push %ebp 10e645: 89 e5 mov %esp,%ebp 10e647: 57 push %edi 10e648: 56 push %esi 10e649: 53 push %ebx 10e64a: 83 ec 14 sub $0x14,%esp 10e64d: 8b 4d 08 mov 0x8(%ebp),%ecx 10e650: 8b 45 0c mov 0xc(%ebp),%eax RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 10e653: 8d 58 f8 lea -0x8(%eax),%ebx 10e656: 31 d2 xor %edx,%edx 10e658: f7 71 10 divl 0x10(%ecx) 10e65b: 29 d3 sub %edx,%ebx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 10e65d: 8b 41 20 mov 0x20(%ecx),%eax 10e660: 89 45 f0 mov %eax,-0x10(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10e663: 31 c0 xor %eax,%eax 10e665: 3b 5d f0 cmp -0x10(%ebp),%ebx 10e668: 72 08 jb 10e672 <_Heap_Free+0x2e> 10e66a: 31 c0 xor %eax,%eax 10e66c: 39 59 24 cmp %ebx,0x24(%ecx) 10e66f: 0f 93 c0 setae %al Heap_Block *next_block = NULL; uintptr_t block_size = 0; uintptr_t next_block_size = 0; bool next_is_free = false; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 10e672: 85 c0 test %eax,%eax 10e674: 0f 84 2d 01 00 00 je 10e7a7 <_Heap_Free+0x163> - 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; 10e67a: 8b 7b 04 mov 0x4(%ebx),%edi 10e67d: 89 fa mov %edi,%edx 10e67f: 83 e2 fe and $0xfffffffe,%edx 10e682: 89 55 e0 mov %edx,-0x20(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10e685: 8d 04 13 lea (%ebx,%edx,1),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10e688: 31 f6 xor %esi,%esi 10e68a: 3b 45 f0 cmp -0x10(%ebp),%eax 10e68d: 72 0e jb 10e69d <_Heap_Free+0x59> <== ALWAYS TAKEN 10e68f: 39 41 24 cmp %eax,0x24(%ecx) 10e692: 0f 93 c2 setae %dl 10e695: 89 d6 mov %edx,%esi 10e697: 81 e6 ff 00 00 00 and $0xff,%esi } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 10e69d: 85 f6 test %esi,%esi 10e69f: 0f 84 02 01 00 00 je 10e7a7 <_Heap_Free+0x163> <== ALWAYS TAKEN block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 10e6a5: 8b 70 04 mov 0x4(%eax),%esi _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10e6a8: f7 c6 01 00 00 00 test $0x1,%esi 10e6ae: 0f 84 f3 00 00 00 je 10e7a7 <_Heap_Free+0x163> <== ALWAYS 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; 10e6b4: 83 e6 fe and $0xfffffffe,%esi 10e6b7: 89 75 e8 mov %esi,-0x18(%ebp) return false; } 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 )); 10e6ba: 8b 51 24 mov 0x24(%ecx),%edx 10e6bd: 89 55 e4 mov %edx,-0x1c(%ebp) _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 10e6c0: 31 f6 xor %esi,%esi 10e6c2: 39 d0 cmp %edx,%eax 10e6c4: 74 0d je 10e6d3 <_Heap_Free+0x8f> 10e6c6: 8b 55 e8 mov -0x18(%ebp),%edx 10e6c9: 8b 74 10 04 mov 0x4(%eax,%edx,1),%esi 10e6cd: 83 e6 01 and $0x1,%esi 10e6d0: 83 f6 01 xor $0x1,%esi && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 10e6d3: 83 e7 01 and $0x1,%edi 10e6d6: 75 64 jne 10e73c <_Heap_Free+0xf8> uintptr_t const prev_size = block->prev_size; 10e6d8: 8b 13 mov (%ebx),%edx 10e6da: 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); 10e6dd: 29 d3 sub %edx,%ebx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10e6df: 31 ff xor %edi,%edi 10e6e1: 3b 5d f0 cmp -0x10(%ebp),%ebx 10e6e4: 72 0e jb 10e6f4 <_Heap_Free+0xb0> <== ALWAYS TAKEN 10e6e6: 39 5d e4 cmp %ebx,-0x1c(%ebp) 10e6e9: 0f 93 c2 setae %dl 10e6ec: 89 d7 mov %edx,%edi 10e6ee: 81 e7 ff 00 00 00 and $0xff,%edi Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { 10e6f4: 85 ff test %edi,%edi 10e6f6: 0f 84 ab 00 00 00 je 10e7a7 <_Heap_Free+0x163> <== ALWAYS 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) ) { 10e6fc: f6 43 04 01 testb $0x1,0x4(%ebx) 10e700: 0f 84 a1 00 00 00 je 10e7a7 <_Heap_Free+0x163> <== ALWAYS TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 10e706: 89 f2 mov %esi,%edx 10e708: 84 d2 test %dl,%dl 10e70a: 74 1a je 10e726 <_Heap_Free+0xe2> uintptr_t const size = block_size + prev_size + next_block_size; 10e70c: 8b 75 e0 mov -0x20(%ebp),%esi 10e70f: 03 75 e8 add -0x18(%ebp),%esi 10e712: 03 75 ec add -0x14(%ebp),%esi return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 10e715: 8b 78 08 mov 0x8(%eax),%edi Heap_Block *prev = block->prev; 10e718: 8b 40 0c mov 0xc(%eax),%eax prev->next = next; 10e71b: 89 78 08 mov %edi,0x8(%eax) next->prev = prev; 10e71e: 89 47 0c mov %eax,0xc(%edi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 10e721: ff 49 38 decl 0x38(%ecx) 10e724: eb 34 jmp 10e75a <_Heap_Free+0x116> <== ALWAYS TAKEN 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; 10e726: 8b 75 e0 mov -0x20(%ebp),%esi 10e729: 03 75 ec add -0x14(%ebp),%esi prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10e72c: 89 f7 mov %esi,%edi 10e72e: 83 cf 01 or $0x1,%edi 10e731: 89 7b 04 mov %edi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10e734: 83 60 04 fe andl $0xfffffffe,0x4(%eax) next_block->prev_size = size; 10e738: 89 30 mov %esi,(%eax) 10e73a: eb 5b jmp 10e797 <_Heap_Free+0x153> <== ALWAYS TAKEN } } else if ( next_is_free ) { /* coalesce next */ 10e73c: 89 f2 mov %esi,%edx 10e73e: 84 d2 test %dl,%dl 10e740: 74 25 je 10e767 <_Heap_Free+0x123> uintptr_t const size = block_size + next_block_size; 10e742: 8b 75 e8 mov -0x18(%ebp),%esi 10e745: 03 75 e0 add -0x20(%ebp),%esi RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 10e748: 8b 78 08 mov 0x8(%eax),%edi Heap_Block *prev = old_block->prev; 10e74b: 8b 40 0c mov 0xc(%eax),%eax new_block->next = next; 10e74e: 89 7b 08 mov %edi,0x8(%ebx) new_block->prev = prev; 10e751: 89 43 0c mov %eax,0xc(%ebx) next->prev = new_block; 10e754: 89 5f 0c mov %ebx,0xc(%edi) prev->next = new_block; 10e757: 89 58 08 mov %ebx,0x8(%eax) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10e75a: 89 f0 mov %esi,%eax 10e75c: 83 c8 01 or $0x1,%eax 10e75f: 89 43 04 mov %eax,0x4(%ebx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 10e762: 89 34 33 mov %esi,(%ebx,%esi,1) 10e765: eb 30 jmp 10e797 <_Heap_Free+0x153> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10e767: 8b 71 08 mov 0x8(%ecx),%esi new_block->next = next; 10e76a: 89 73 08 mov %esi,0x8(%ebx) new_block->prev = block_before; 10e76d: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10e770: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10e773: 89 5e 0c mov %ebx,0xc(%esi) } 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; 10e776: 8b 75 e0 mov -0x20(%ebp),%esi 10e779: 83 ce 01 or $0x1,%esi 10e77c: 89 73 04 mov %esi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10e77f: 83 60 04 fe andl $0xfffffffe,0x4(%eax) next_block->prev_size = block_size; 10e783: 8b 55 e0 mov -0x20(%ebp),%edx 10e786: 89 10 mov %edx,(%eax) /* Statistics */ ++stats->free_blocks; 10e788: 8b 41 38 mov 0x38(%ecx),%eax 10e78b: 40 inc %eax 10e78c: 89 41 38 mov %eax,0x38(%ecx) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 10e78f: 39 41 3c cmp %eax,0x3c(%ecx) 10e792: 73 03 jae 10e797 <_Heap_Free+0x153> next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 10e794: 89 41 3c mov %eax,0x3c(%ecx) } } /* Statistics */ --stats->used_blocks; 10e797: ff 49 40 decl 0x40(%ecx) ++stats->frees; 10e79a: ff 41 50 incl 0x50(%ecx) stats->free_size += block_size; 10e79d: 8b 45 e0 mov -0x20(%ebp),%eax 10e7a0: 01 41 30 add %eax,0x30(%ecx) 10e7a3: b0 01 mov $0x1,%al return( true ); 10e7a5: eb 02 jmp 10e7a9 <_Heap_Free+0x165> <== ALWAYS TAKEN 10e7a7: 31 c0 xor %eax,%eax } 10e7a9: 83 c4 14 add $0x14,%esp 10e7ac: 5b pop %ebx 10e7ad: 5e pop %esi 10e7ae: 5f pop %edi 10e7af: c9 leave 10e7b0: c3 ret 00127e18 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 127e18: 55 push %ebp 127e19: 89 e5 mov %esp,%ebp 127e1b: 53 push %ebx 127e1c: 8b 5d 08 mov 0x8(%ebp),%ebx 127e1f: 8b 45 0c mov 0xc(%ebp),%eax Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 127e22: c7 00 00 00 00 00 movl $0x0,(%eax) info->largest = 0; 127e28: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) info->total = 0; 127e2f: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 127e36: 8b 4b 08 mov 0x8(%ebx),%ecx for(the_block = _Heap_Free_list_first(the_heap); 127e39: eb 16 jmp 127e51 <_Heap_Get_free_information+0x39> <== ALWAYS 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; 127e3b: 8b 51 04 mov 0x4(%ecx),%edx 127e3e: 83 e2 fe and $0xfffffffe,%edx uint32_t const the_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; 127e41: ff 00 incl (%eax) info->total += the_size; 127e43: 01 50 08 add %edx,0x8(%eax) if ( info->largest < the_size ) 127e46: 39 50 04 cmp %edx,0x4(%eax) 127e49: 73 03 jae 127e4e <_Heap_Get_free_information+0x36> info->largest = the_size; 127e4b: 89 50 04 mov %edx,0x4(%eax) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 127e4e: 8b 49 08 mov 0x8(%ecx),%ecx info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 127e51: 39 d9 cmp %ebx,%ecx 127e53: 75 e6 jne 127e3b <_Heap_Get_free_information+0x23> info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 127e55: 5b pop %ebx 127e56: c9 leave 127e57: c3 ret 00134404 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 134404: 55 push %ebp 134405: 89 e5 mov %esp,%ebp 134407: 57 push %edi 134408: 56 push %esi 134409: 53 push %ebx 13440a: 8b 4d 08 mov 0x8(%ebp),%ecx 13440d: 8b 45 0c mov 0xc(%ebp),%eax Heap_Block *the_block = the_heap->first_block; 134410: 8b 51 20 mov 0x20(%ecx),%edx Heap_Block *const end = the_heap->last_block; 134413: 8b 71 24 mov 0x24(%ecx),%esi _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 134416: c7 00 00 00 00 00 movl $0x0,(%eax) the_info->Free.total = 0; 13441c: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) the_info->Free.largest = 0; 134423: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_info->Used.number = 0; 13442a: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) the_info->Used.total = 0; 134431: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) the_info->Used.largest = 0; 134438: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) 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; 13443f: 8d 58 0c lea 0xc(%eax),%ebx the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 134442: eb 22 jmp 134466 <_Heap_Get_information+0x62> <== ALWAYS 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; 134444: 8b 4a 04 mov 0x4(%edx),%ecx 134447: 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); 13444a: 8d 3c 0a lea (%edx,%ecx,1),%edi 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) ) 13444d: 89 c2 mov %eax,%edx 13444f: f6 47 04 01 testb $0x1,0x4(%edi) 134453: 74 02 je 134457 <_Heap_Get_information+0x53> 134455: 89 da mov %ebx,%edx info = &the_info->Used; else info = &the_info->Free; info->number++; 134457: ff 02 incl (%edx) info->total += the_size; 134459: 01 4a 08 add %ecx,0x8(%edx) if ( info->largest < the_size ) 13445c: 39 4a 04 cmp %ecx,0x4(%edx) 13445f: 73 03 jae 134464 <_Heap_Get_information+0x60> info->largest = the_size; 134461: 89 4a 04 mov %ecx,0x4(%edx) 134464: 89 fa mov %edi,%edx the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 134466: 39 f2 cmp %esi,%edx 134468: 75 da jne 134444 <_Heap_Get_information+0x40> /* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE; 13446a: 83 40 14 08 addl $0x8,0x14(%eax) } 13446e: 5b pop %ebx 13446f: 5e pop %esi 134470: 5f pop %edi 134471: c9 leave 134472: c3 ret 0010abb4 <_Heap_Initialize>: Heap_Control *heap, void *heap_area_begin_ptr, uintptr_t heap_area_size, uintptr_t page_size ) { 10abb4: 55 push %ebp 10abb5: 89 e5 mov %esp,%ebp 10abb7: 57 push %edi 10abb8: 56 push %esi 10abb9: 53 push %ebx 10abba: 83 ec 0c sub $0xc,%esp 10abbd: 8b 4d 08 mov 0x8(%ebp),%ecx 10abc0: 8b 5d 14 mov 0x14(%ebp),%ebx uintptr_t min_block_size = 0; uintptr_t overhead = 0; Heap_Block *first_block = NULL; Heap_Block *last_block = NULL; if ( page_size == 0 ) { 10abc3: 85 db test %ebx,%ebx 10abc5: 75 04 jne 10abcb <_Heap_Initialize+0x17> 10abc7: b3 04 mov $0x4,%bl 10abc9: eb 15 jmp 10abe0 <_Heap_Initialize+0x2c> <== ALWAYS TAKEN uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { 10abcb: 89 d8 mov %ebx,%eax 10abcd: 83 e0 03 and $0x3,%eax 10abd0: 74 05 je 10abd7 <_Heap_Initialize+0x23> return value - remainder + alignment; 10abd2: 83 c3 04 add $0x4,%ebx 10abd5: 29 c3 sub %eax,%ebx page_size = CPU_ALIGNMENT; } else { page_size = _Heap_Align_up( page_size, CPU_ALIGNMENT ); if ( page_size < CPU_ALIGNMENT ) { 10abd7: 83 fb 03 cmp $0x3,%ebx 10abda: 0f 86 01 01 00 00 jbe 10ace1 <_Heap_Initialize+0x12d> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10abe0: b8 10 00 00 00 mov $0x10,%eax 10abe5: 31 d2 xor %edx,%edx 10abe7: f7 f3 div %ebx if ( remainder != 0 ) { 10abe9: c7 45 f0 10 00 00 00 movl $0x10,-0x10(%ebp) 10abf0: 85 d2 test %edx,%edx 10abf2: 74 08 je 10abfc <_Heap_Initialize+0x48> return value - remainder + alignment; 10abf4: 8d 43 10 lea 0x10(%ebx),%eax 10abf7: 29 d0 sub %edx,%eax 10abf9: 89 45 f0 mov %eax,-0x10(%ebp) ) { 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; uintptr_t alloc_area_begin = heap_area_begin + HEAP_BLOCK_HEADER_SIZE; 10abfc: 8b 7d 0c mov 0xc(%ebp),%edi 10abff: 83 c7 08 add $0x8,%edi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10ac02: 89 f8 mov %edi,%eax 10ac04: 31 d2 xor %edx,%edx 10ac06: f7 f3 div %ebx if ( remainder != 0 ) { 10ac08: 85 d2 test %edx,%edx 10ac0a: 74 05 je 10ac11 <_Heap_Initialize+0x5d> return value - remainder + alignment; 10ac0c: 8d 3c 3b lea (%ebx,%edi,1),%edi 10ac0f: 29 d7 sub %edx,%edi 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; 10ac11: 8b 45 0c mov 0xc(%ebp),%eax 10ac14: 03 45 10 add 0x10(%ebp),%eax 10ac17: 89 45 ec mov %eax,-0x14(%ebp) } min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); 10ac1a: 8d 77 f8 lea -0x8(%edi),%esi 10ac1d: 2b 7d 0c sub 0xc(%ebp),%edi first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( 10ac20: 39 7d 10 cmp %edi,0x10(%ebp) 10ac23: 0f 86 b8 00 00 00 jbe 10ace1 <_Heap_Initialize+0x12d> 10ac29: 8b 45 0c mov 0xc(%ebp),%eax 10ac2c: 39 45 ec cmp %eax,-0x14(%ebp) 10ac2f: 0f 82 ac 00 00 00 jb 10ace1 <_Heap_Initialize+0x12d> min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; 10ac35: 8b 45 10 mov 0x10(%ebp),%eax 10ac38: 29 f8 sub %edi,%eax 10ac3a: 89 c7 mov %eax,%edi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10ac3c: 31 d2 xor %edx,%edx 10ac3e: f7 f3 div %ebx 10ac40: 29 d7 sub %edx,%edi first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( 10ac42: 3b 7d f0 cmp -0x10(%ebp),%edi 10ac45: 0f 82 96 00 00 00 jb 10ace1 <_Heap_Initialize+0x12d> alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; 10ac4b: 8d 47 f8 lea -0x8(%edi),%eax 10ac4e: 89 45 e8 mov %eax,-0x18(%ebp) return 0; } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; 10ac51: 89 1e mov %ebx,(%esi) first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 10ac53: 89 fa mov %edi,%edx 10ac55: 83 ca 01 or $0x1,%edx 10ac58: 89 56 04 mov %edx,0x4(%esi) first_block->next = _Heap_Free_list_tail( heap ); 10ac5b: 89 4e 08 mov %ecx,0x8(%esi) first_block->prev = _Heap_Free_list_head( heap ); 10ac5e: 89 4e 0c mov %ecx,0xc(%esi) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10ac61: 8d 14 37 lea (%edi,%esi,1),%edx * block indicates that the previous block is used, this ensures that the * last block appears as used for the _Heap_Is_used() and _Heap_Is_free() * functions. */ last_block = _Heap_Block_at( first_block, first_block_size ); last_block->prev_size = first_block_size; 10ac64: 89 3a mov %edi,(%edx) last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; 10ac66: 89 f0 mov %esi,%eax 10ac68: 29 d0 sub %edx,%eax 10ac6a: 89 42 04 mov %eax,0x4(%edx) /* Heap control */ heap->page_size = page_size; 10ac6d: 89 59 10 mov %ebx,0x10(%ecx) heap->min_block_size = min_block_size; 10ac70: 8b 45 f0 mov -0x10(%ebp),%eax 10ac73: 89 41 14 mov %eax,0x14(%ecx) heap->area_begin = heap_area_begin; 10ac76: 8b 45 0c mov 0xc(%ebp),%eax 10ac79: 89 41 18 mov %eax,0x18(%ecx) heap->area_end = heap_area_end; 10ac7c: 8b 45 ec mov -0x14(%ebp),%eax 10ac7f: 89 41 1c mov %eax,0x1c(%ecx) heap->first_block = first_block; 10ac82: 89 71 20 mov %esi,0x20(%ecx) heap->last_block = last_block; 10ac85: 89 51 24 mov %edx,0x24(%ecx) _Heap_Free_list_head( heap )->next = first_block; 10ac88: 89 71 08 mov %esi,0x8(%ecx) _Heap_Free_list_tail( heap )->prev = first_block; 10ac8b: 89 71 0c mov %esi,0xc(%ecx) /* Statistics */ stats->size = first_block_size; 10ac8e: 89 79 2c mov %edi,0x2c(%ecx) stats->free_size = first_block_size; 10ac91: 89 79 30 mov %edi,0x30(%ecx) stats->min_free_size = first_block_size; 10ac94: 89 79 34 mov %edi,0x34(%ecx) stats->free_blocks = 1; 10ac97: c7 41 38 01 00 00 00 movl $0x1,0x38(%ecx) stats->max_free_blocks = 1; 10ac9e: c7 41 3c 01 00 00 00 movl $0x1,0x3c(%ecx) stats->used_blocks = 0; 10aca5: c7 41 40 00 00 00 00 movl $0x0,0x40(%ecx) stats->max_search = 0; 10acac: c7 41 44 00 00 00 00 movl $0x0,0x44(%ecx) stats->allocs = 0; 10acb3: c7 41 48 00 00 00 00 movl $0x0,0x48(%ecx) stats->searches = 0; 10acba: c7 41 4c 00 00 00 00 movl $0x0,0x4c(%ecx) stats->frees = 0; 10acc1: c7 41 50 00 00 00 00 movl $0x0,0x50(%ecx) stats->resizes = 0; 10acc8: c7 41 54 00 00 00 00 movl $0x0,0x54(%ecx) stats->instance = instance++; 10accf: 8b 15 0c 35 12 00 mov 0x12350c,%edx 10acd5: 89 51 28 mov %edx,0x28(%ecx) 10acd8: 42 inc %edx 10acd9: 89 15 0c 35 12 00 mov %edx,0x12350c ); _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; 10acdf: eb 07 jmp 10ace8 <_Heap_Initialize+0x134> <== ALWAYS TAKEN 10ace1: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%ebp) } 10ace8: 8b 45 e8 mov -0x18(%ebp),%eax 10aceb: 83 c4 0c add $0xc,%esp 10acee: 5b pop %ebx 10acef: 5e pop %esi 10acf0: 5f pop %edi 10acf1: c9 leave 10acf2: c3 ret 0011ba08 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 11ba08: 55 push %ebp 11ba09: 89 e5 mov %esp,%ebp 11ba0b: 57 push %edi 11ba0c: 56 push %esi 11ba0d: 53 push %ebx 11ba0e: 83 ec 2c sub $0x2c,%esp 11ba11: 8b 5d 08 mov 0x8(%ebp),%ebx 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 ) 11ba14: 8b 4d 0c mov 0xc(%ebp),%ecx 11ba17: 83 e9 08 sub $0x8,%ecx 11ba1a: 8b 45 0c mov 0xc(%ebp),%eax 11ba1d: 31 d2 xor %edx,%edx 11ba1f: f7 73 10 divl 0x10(%ebx) 11ba22: 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; 11ba24: 8b 45 14 mov 0x14(%ebp),%eax 11ba27: c7 00 00 00 00 00 movl $0x0,(%eax) *new_size = 0; 11ba2d: 8b 55 18 mov 0x18(%ebp),%edx 11ba30: c7 02 00 00 00 00 movl $0x0,(%edx) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11ba36: 39 4b 20 cmp %ecx,0x20(%ebx) 11ba39: 0f 87 ac 00 00 00 ja 11baeb <_Heap_Resize_block+0xe3> 11ba3f: 39 4b 24 cmp %ecx,0x24(%ebx) 11ba42: 0f 82 a3 00 00 00 jb 11baeb <_Heap_Resize_block+0xe3> - 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; 11ba48: 8b 51 04 mov 0x4(%ecx),%edx 11ba4b: 83 e2 fe and $0xfffffffe,%edx { 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; 11ba4e: 8d 3c 11 lea (%ecx,%edx,1),%edi uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 11ba51: 89 f8 mov %edi,%eax 11ba53: 2b 45 0c sub 0xc(%ebp),%eax 11ba56: 83 c0 04 add $0x4,%eax 11ba59: 89 45 e4 mov %eax,-0x1c(%ebp) 11ba5c: 8b 77 04 mov 0x4(%edi),%esi 11ba5f: 83 e6 fe and $0xfffffffe,%esi 11ba62: 89 75 d4 mov %esi,-0x2c(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 11ba65: 8b 44 37 04 mov 0x4(%edi,%esi,1),%eax 11ba69: 83 e0 01 and $0x1,%eax 11ba6c: 89 45 d0 mov %eax,-0x30(%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; 11ba6f: 8b 45 e4 mov -0x1c(%ebp),%eax 11ba72: 8b 75 14 mov 0x14(%ebp),%esi 11ba75: 89 06 mov %eax,(%esi) if ( next_block_is_free ) { 11ba77: 8a 45 d0 mov -0x30(%ebp),%al 11ba7a: 34 01 xor $0x1,%al 11ba7c: 88 45 e3 mov %al,-0x1d(%ebp) 11ba7f: 74 09 je 11ba8a <_Heap_Resize_block+0x82> block_size += next_block_size; 11ba81: 03 55 d4 add -0x2c(%ebp),%edx alloc_size += next_block_size; 11ba84: 8b 75 d4 mov -0x2c(%ebp),%esi 11ba87: 01 75 e4 add %esi,-0x1c(%ebp) } if ( new_alloc_size > alloc_size ) { 11ba8a: b8 01 00 00 00 mov $0x1,%eax 11ba8f: 8b 75 e4 mov -0x1c(%ebp),%esi 11ba92: 39 75 10 cmp %esi,0x10(%ebp) 11ba95: 77 59 ja 11baf0 <_Heap_Resize_block+0xe8> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 11ba97: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 11ba9b: 74 25 je 11bac2 <_Heap_Resize_block+0xba> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 11ba9d: 8b 41 04 mov 0x4(%ecx),%eax 11baa0: 83 e0 01 and $0x1,%eax 11baa3: 09 d0 or %edx,%eax 11baa5: 89 41 04 mov %eax,0x4(%ecx) return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 11baa8: 8b 47 08 mov 0x8(%edi),%eax Heap_Block *prev = block->prev; 11baab: 8b 7f 0c mov 0xc(%edi),%edi prev->next = next; 11baae: 89 47 08 mov %eax,0x8(%edi) next->prev = prev; 11bab1: 89 78 0c mov %edi,0xc(%eax) _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; 11bab4: 83 4c 0a 04 01 orl $0x1,0x4(%edx,%ecx,1) /* Statistics */ --stats->free_blocks; 11bab9: ff 4b 38 decl 0x38(%ebx) stats->free_size -= next_block_size; 11babc: 8b 45 d4 mov -0x2c(%ebp),%eax 11babf: 29 43 30 sub %eax,0x30(%ebx) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 11bac2: ff 75 10 pushl 0x10(%ebp) 11bac5: ff 75 0c pushl 0xc(%ebp) 11bac8: 51 push %ecx 11bac9: 53 push %ebx 11baca: e8 f9 f2 fe ff call 10adc8 <_Heap_Block_allocate> <== ALWAYS TAKEN block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 11bacf: 8b 50 04 mov 0x4(%eax),%edx 11bad2: 83 e2 fe and $0xfffffffe,%edx 11bad5: 2b 45 0c sub 0xc(%ebp),%eax 11bad8: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 11badc: 8b 55 18 mov 0x18(%ebp),%edx 11badf: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->resizes; 11bae1: ff 43 54 incl 0x54(%ebx) 11bae4: 31 c0 xor %eax,%eax 11bae6: 83 c4 10 add $0x10,%esp 11bae9: eb 05 jmp 11baf0 <_Heap_Resize_block+0xe8> <== ALWAYS TAKEN 11baeb: b8 02 00 00 00 mov $0x2,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11baf0: 8d 65 f4 lea -0xc(%ebp),%esp 11baf3: 5b pop %ebx 11baf4: 5e pop %esi 11baf5: 5f pop %edi 11baf6: c9 leave 11baf7: c3 ret 0011baf8 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11baf8: 55 push %ebp 11baf9: 89 e5 mov %esp,%ebp 11bafb: 56 push %esi 11bafc: 53 push %ebx 11bafd: 8b 5d 08 mov 0x8(%ebp),%ebx 11bb00: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 11bb03: 8d 4e f8 lea -0x8(%esi),%ecx 11bb06: 89 f0 mov %esi,%eax 11bb08: 31 d2 xor %edx,%edx 11bb0a: f7 73 10 divl 0x10(%ebx) 11bb0d: 29 d1 sub %edx,%ecx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 11bb0f: 8b 53 20 mov 0x20(%ebx),%edx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11bb12: 31 c0 xor %eax,%eax 11bb14: 39 d1 cmp %edx,%ecx 11bb16: 72 08 jb 11bb20 <_Heap_Size_of_alloc_area+0x28> 11bb18: 31 c0 xor %eax,%eax 11bb1a: 39 4b 24 cmp %ecx,0x24(%ebx) 11bb1d: 0f 93 c0 setae %al uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 11bb20: 85 c0 test %eax,%eax 11bb22: 74 2e je 11bb52 <_Heap_Size_of_alloc_area+0x5a> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11bb24: 8b 41 04 mov 0x4(%ecx),%eax 11bb27: 83 e0 fe and $0xfffffffe,%eax 11bb2a: 01 c1 add %eax,%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 11bb2c: 31 c0 xor %eax,%eax 11bb2e: 39 d1 cmp %edx,%ecx 11bb30: 72 08 jb 11bb3a <_Heap_Size_of_alloc_area+0x42> <== ALWAYS TAKEN 11bb32: 31 c0 xor %eax,%eax 11bb34: 39 4b 24 cmp %ecx,0x24(%ebx) 11bb37: 0f 93 c0 setae %al } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 11bb3a: 85 c0 test %eax,%eax 11bb3c: 74 14 je 11bb52 <_Heap_Size_of_alloc_area+0x5a> <== ALWAYS TAKEN 11bb3e: f6 41 04 01 testb $0x1,0x4(%ecx) 11bb42: 74 0e je 11bb52 <_Heap_Size_of_alloc_area+0x5a> <== ALWAYS TAKEN || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 11bb44: 29 f1 sub %esi,%ecx 11bb46: 8d 51 04 lea 0x4(%ecx),%edx 11bb49: 8b 45 10 mov 0x10(%ebp),%eax 11bb4c: 89 10 mov %edx,(%eax) 11bb4e: b0 01 mov $0x1,%al return true; 11bb50: eb 02 jmp 11bb54 <_Heap_Size_of_alloc_area+0x5c> <== ALWAYS TAKEN 11bb52: 31 c0 xor %eax,%eax } 11bb54: 5b pop %ebx 11bb55: 5e pop %esi 11bb56: c9 leave 11bb57: c3 ret 0010b8b5 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10b8b5: 55 push %ebp 10b8b6: 89 e5 mov %esp,%ebp 10b8b8: 57 push %edi 10b8b9: 56 push %esi 10b8ba: 53 push %ebx 10b8bb: 83 ec 4c sub $0x4c,%esp 10b8be: 8b 7d 08 mov 0x8(%ebp),%edi 10b8c1: 8b 75 0c mov 0xc(%ebp),%esi uintptr_t const page_size = heap->page_size; 10b8c4: 8b 4f 10 mov 0x10(%edi),%ecx uintptr_t const min_block_size = heap->min_block_size; 10b8c7: 8b 47 14 mov 0x14(%edi),%eax 10b8ca: 89 45 dc mov %eax,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10b8cd: 8b 57 24 mov 0x24(%edi),%edx 10b8d0: 89 55 d0 mov %edx,-0x30(%ebp) Heap_Block *block = heap->first_block; 10b8d3: 8b 5f 20 mov 0x20(%edi),%ebx Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10b8d6: c7 45 e4 c7 bb 10 00 movl $0x10bbc7,-0x1c(%ebp) 10b8dd: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10b8e1: 75 07 jne 10b8ea <_Heap_Walk+0x35> 10b8e3: c7 45 e4 b0 b8 10 00 movl $0x10b8b0,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10b8ea: 83 3d 74 53 12 00 03 cmpl $0x3,0x125374 10b8f1: 0f 85 c6 02 00 00 jne 10bbbd <_Heap_Walk+0x308> 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)( 10b8f7: 50 push %eax 10b8f8: ff 77 0c pushl 0xc(%edi) 10b8fb: ff 77 08 pushl 0x8(%edi) 10b8fe: ff 75 d0 pushl -0x30(%ebp) 10b901: 53 push %ebx 10b902: ff 77 1c pushl 0x1c(%edi) 10b905: ff 77 18 pushl 0x18(%edi) 10b908: ff 75 dc pushl -0x24(%ebp) 10b90b: 51 push %ecx 10b90c: 68 e8 e4 11 00 push $0x11e4e8 10b911: 6a 00 push $0x0 10b913: 56 push %esi 10b914: 89 4d bc mov %ecx,-0x44(%ebp) 10b917: ff 55 e4 call *-0x1c(%ebp) heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 10b91a: 83 c4 30 add $0x30,%esp 10b91d: 8b 4d bc mov -0x44(%ebp),%ecx 10b920: 85 c9 test %ecx,%ecx 10b922: 75 0b jne 10b92f <_Heap_Walk+0x7a> (*printer)( source, true, "page size is zero\n" ); 10b924: 53 push %ebx 10b925: 68 79 e5 11 00 push $0x11e579 10b92a: e9 5b 02 00 00 jmp 10bb8a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10b92f: f6 c1 03 test $0x3,%cl 10b932: 74 0b je 10b93f <_Heap_Walk+0x8a> (*printer)( 10b934: 51 push %ecx 10b935: 68 8c e5 11 00 push $0x11e58c 10b93a: e9 4b 02 00 00 jmp 10bb8a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10b93f: 8b 45 dc mov -0x24(%ebp),%eax 10b942: 31 d2 xor %edx,%edx 10b944: f7 f1 div %ecx 10b946: 85 d2 test %edx,%edx 10b948: 74 0d je 10b957 <_Heap_Walk+0xa2> (*printer)( 10b94a: ff 75 dc pushl -0x24(%ebp) 10b94d: 68 aa e5 11 00 push $0x11e5aa 10b952: e9 33 02 00 00 jmp 10bb8a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( 10b957: 8d 43 08 lea 0x8(%ebx),%eax 10b95a: 31 d2 xor %edx,%edx 10b95c: f7 f1 div %ecx 10b95e: 85 d2 test %edx,%edx 10b960: 74 0b je 10b96d <_Heap_Walk+0xb8> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10b962: 53 push %ebx 10b963: 68 ce e5 11 00 push $0x11e5ce 10b968: e9 1d 02 00 00 jmp 10bb8a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10b96d: f6 43 04 01 testb $0x1,0x4(%ebx) 10b971: 75 0b jne 10b97e <_Heap_Walk+0xc9> (*printer)( 10b973: 51 push %ecx 10b974: 68 ff e5 11 00 push $0x11e5ff 10b979: e9 0c 02 00 00 jmp 10bb8a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( first_block->prev_size != page_size ) { 10b97e: 8b 03 mov (%ebx),%eax 10b980: 89 45 d4 mov %eax,-0x2c(%ebp) 10b983: 39 c8 cmp %ecx,%eax 10b985: 74 0f je 10b996 <_Heap_Walk+0xe1> (*printer)( 10b987: 83 ec 0c sub $0xc,%esp 10b98a: 51 push %ecx 10b98b: 50 push %eax 10b98c: 68 2d e6 11 00 push $0x11e62d 10b991: e9 3d 01 00 00 jmp 10bad3 <_Heap_Walk+0x21e> <== ALWAYS TAKEN ); return false; } if ( _Heap_Is_free( last_block ) ) { 10b996: 8b 55 d0 mov -0x30(%ebp),%edx 10b999: 8b 42 04 mov 0x4(%edx),%eax 10b99c: 83 e0 fe and $0xfffffffe,%eax 10b99f: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1) 10b9a4: 75 0b jne 10b9b1 <_Heap_Walk+0xfc> (*printer)( 10b9a6: 52 push %edx 10b9a7: 68 58 e6 11 00 push $0x11e658 10b9ac: e9 d9 01 00 00 jmp 10bb8a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10b9b1: 8b 4f 10 mov 0x10(%edi),%ecx 10b9b4: 89 4d d8 mov %ecx,-0x28(%ebp) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10b9b7: 8b 4f 08 mov 0x8(%edi),%ecx 10b9ba: 89 7d e0 mov %edi,-0x20(%ebp) 10b9bd: eb 6a jmp 10ba29 <_Heap_Walk+0x174> <== ALWAYS TAKEN 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 10b9bf: 31 c0 xor %eax,%eax 10b9c1: 39 4f 20 cmp %ecx,0x20(%edi) 10b9c4: 77 08 ja 10b9ce <_Heap_Walk+0x119> 10b9c6: 31 c0 xor %eax,%eax 10b9c8: 39 4f 24 cmp %ecx,0x24(%edi) 10b9cb: 0f 93 c0 setae %al 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 ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { 10b9ce: 85 c0 test %eax,%eax 10b9d0: 75 0b jne 10b9dd <_Heap_Walk+0x128> (*printer)( 10b9d2: 51 push %ecx 10b9d3: 68 6d e6 11 00 push $0x11e66d 10b9d8: e9 ad 01 00 00 jmp 10bb8a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( 10b9dd: 8d 41 08 lea 0x8(%ecx),%eax 10b9e0: 31 d2 xor %edx,%edx 10b9e2: f7 75 d8 divl -0x28(%ebp) 10b9e5: 85 d2 test %edx,%edx 10b9e7: 74 0b je 10b9f4 <_Heap_Walk+0x13f> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10b9e9: 51 push %ecx 10b9ea: 68 8d e6 11 00 push $0x11e68d 10b9ef: e9 96 01 00 00 jmp 10bb8a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( _Heap_Is_used( free_block ) ) { 10b9f4: 8b 41 04 mov 0x4(%ecx),%eax 10b9f7: 83 e0 fe and $0xfffffffe,%eax 10b9fa: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10b9ff: 74 0b je 10ba0c <_Heap_Walk+0x157> (*printer)( 10ba01: 51 push %ecx 10ba02: 68 bd e6 11 00 push $0x11e6bd 10ba07: e9 7e 01 00 00 jmp 10bb8a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ); return false; } if ( free_block->prev != prev_block ) { 10ba0c: 8b 41 0c mov 0xc(%ecx),%eax 10ba0f: 3b 45 e0 cmp -0x20(%ebp),%eax 10ba12: 74 0f je 10ba23 <_Heap_Walk+0x16e> (*printer)( 10ba14: 83 ec 0c sub $0xc,%esp 10ba17: 50 push %eax 10ba18: 51 push %ecx 10ba19: 68 d9 e6 11 00 push $0x11e6d9 10ba1e: e9 b0 00 00 00 jmp 10bad3 <_Heap_Walk+0x21e> <== ALWAYS TAKEN return false; } prev_block = free_block; free_block = free_block->next; 10ba23: 89 4d e0 mov %ecx,-0x20(%ebp) 10ba26: 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 ) { 10ba29: 39 f9 cmp %edi,%ecx 10ba2b: 75 92 jne 10b9bf <_Heap_Walk+0x10a> 10ba2d: 89 75 e0 mov %esi,-0x20(%ebp) 10ba30: e9 7f 01 00 00 jmp 10bbb4 <_Heap_Walk+0x2ff> <== ALWAYS 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; 10ba35: 8b 43 04 mov 0x4(%ebx),%eax 10ba38: 89 c1 mov %eax,%ecx 10ba3a: 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); 10ba3d: 8d 34 0b lea (%ebx,%ecx,1),%esi uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { 10ba40: a8 01 test $0x1,%al 10ba42: 74 0c je 10ba50 <_Heap_Walk+0x19b> (*printer)( 10ba44: 83 ec 0c sub $0xc,%esp 10ba47: 51 push %ecx 10ba48: 53 push %ebx 10ba49: 68 0b e7 11 00 push $0x11e70b 10ba4e: eb 0b jmp 10ba5b <_Heap_Walk+0x1a6> <== ALWAYS TAKEN "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10ba50: 50 push %eax 10ba51: 50 push %eax 10ba52: ff 33 pushl (%ebx) 10ba54: 51 push %ecx 10ba55: 53 push %ebx 10ba56: 68 22 e7 11 00 push $0x11e722 10ba5b: 6a 00 push $0x0 10ba5d: ff 75 e0 pushl -0x20(%ebp) 10ba60: 89 4d bc mov %ecx,-0x44(%ebp) 10ba63: ff 55 e4 call *-0x1c(%ebp) 10ba66: 83 c4 20 add $0x20,%esp 10ba69: 8b 4d bc mov -0x44(%ebp),%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10ba6c: 31 c0 xor %eax,%eax 10ba6e: 39 77 20 cmp %esi,0x20(%edi) 10ba71: 77 08 ja 10ba7b <_Heap_Walk+0x1c6> <== ALWAYS TAKEN 10ba73: 31 c0 xor %eax,%eax 10ba75: 39 77 24 cmp %esi,0x24(%edi) 10ba78: 0f 93 c0 setae %al block_size, block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 10ba7b: 85 c0 test %eax,%eax 10ba7d: 75 11 jne 10ba90 <_Heap_Walk+0x1db> 10ba7f: 89 f1 mov %esi,%ecx 10ba81: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10ba84: 83 ec 0c sub $0xc,%esp 10ba87: 51 push %ecx 10ba88: 53 push %ebx 10ba89: 68 47 e7 11 00 push $0x11e747 10ba8e: eb 43 jmp 10bad3 <_Heap_Walk+0x21e> <== ALWAYS TAKEN ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 10ba90: 89 c8 mov %ecx,%eax 10ba92: 31 d2 xor %edx,%edx 10ba94: f7 75 d4 divl -0x2c(%ebp) 10ba97: 85 d2 test %edx,%edx 10ba99: 74 0f je 10baaa <_Heap_Walk+0x1f5> 10ba9b: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10ba9e: 83 ec 0c sub $0xc,%esp 10baa1: 51 push %ecx 10baa2: 53 push %ebx 10baa3: 68 74 e7 11 00 push $0x11e774 10baa8: eb 29 jmp 10bad3 <_Heap_Walk+0x21e> <== ALWAYS TAKEN ); return false; } if ( block_size < min_block_size ) { 10baaa: 3b 4d dc cmp -0x24(%ebp),%ecx 10baad: 73 11 jae 10bac0 <_Heap_Walk+0x20b> 10baaf: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bab2: 57 push %edi 10bab3: 57 push %edi 10bab4: ff 75 dc pushl -0x24(%ebp) 10bab7: 51 push %ecx 10bab8: 53 push %ebx 10bab9: 68 a2 e7 11 00 push $0x11e7a2 10babe: eb 13 jmp 10bad3 <_Heap_Walk+0x21e> <== ALWAYS TAKEN ); return false; } if ( next_block_begin <= block_begin ) { 10bac0: 39 de cmp %ebx,%esi 10bac2: 77 1f ja 10bae3 <_Heap_Walk+0x22e> 10bac4: 89 f1 mov %esi,%ecx 10bac6: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bac9: 83 ec 0c sub $0xc,%esp 10bacc: 51 push %ecx 10bacd: 53 push %ebx 10bace: 68 cd e7 11 00 push $0x11e7cd 10bad3: 6a 01 push $0x1 10bad5: 56 push %esi 10bad6: ff 55 e4 call *-0x1c(%ebp) 10bad9: 31 c0 xor %eax,%eax "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 10badb: 83 c4 20 add $0x20,%esp 10bade: e9 dc 00 00 00 jmp 10bbbf <_Heap_Walk+0x30a> <== ALWAYS TAKEN } if ( !_Heap_Is_prev_used( next_block ) ) { 10bae3: f6 46 04 01 testb $0x1,0x4(%esi) 10bae7: 0f 85 c5 00 00 00 jne 10bbb2 <_Heap_Walk+0x2fd> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10baed: 8b 47 08 mov 0x8(%edi),%eax 10baf0: 89 45 c0 mov %eax,-0x40(%ebp) 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; 10baf3: 8b 53 04 mov 0x4(%ebx),%edx 10baf6: 89 55 c4 mov %edx,-0x3c(%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; 10baf9: 83 e2 fe and $0xfffffffe,%edx 10bafc: 89 55 cc mov %edx,-0x34(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10baff: 01 da add %ebx,%edx 10bb01: 89 55 c8 mov %edx,-0x38(%ebp) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10bb04: 8b 4b 08 mov 0x8(%ebx),%ecx 10bb07: 89 4d b4 mov %ecx,-0x4c(%ebp) return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 10bb0a: ba 01 e8 11 00 mov $0x11e801,%edx 10bb0f: 3b 4f 0c cmp 0xc(%edi),%ecx 10bb12: 74 0e je 10bb22 <_Heap_Walk+0x26d> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10bb14: ba 0b e8 11 00 mov $0x11e80b,%edx 10bb19: 39 f9 cmp %edi,%ecx 10bb1b: 74 05 je 10bb22 <_Heap_Walk+0x26d> 10bb1d: ba 35 e4 11 00 mov $0x11e435,%edx 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)( 10bb22: 8b 43 0c mov 0xc(%ebx),%eax 10bb25: 89 45 d8 mov %eax,-0x28(%ebp) 10bb28: b8 15 e8 11 00 mov $0x11e815,%eax 10bb2d: 8b 4d c0 mov -0x40(%ebp),%ecx 10bb30: 39 4d d8 cmp %ecx,-0x28(%ebp) 10bb33: 74 0f je 10bb44 <_Heap_Walk+0x28f> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 10bb35: b8 20 e8 11 00 mov $0x11e820,%eax 10bb3a: 39 7d d8 cmp %edi,-0x28(%ebp) 10bb3d: 74 05 je 10bb44 <_Heap_Walk+0x28f> 10bb3f: b8 35 e4 11 00 mov $0x11e435,%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)( 10bb44: 52 push %edx 10bb45: ff 75 b4 pushl -0x4c(%ebp) 10bb48: 50 push %eax 10bb49: ff 75 d8 pushl -0x28(%ebp) 10bb4c: 53 push %ebx 10bb4d: 68 2a e8 11 00 push $0x11e82a 10bb52: 6a 00 push $0x0 10bb54: ff 75 e0 pushl -0x20(%ebp) 10bb57: ff 55 e4 call *-0x1c(%ebp) block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 10bb5a: 8b 55 c8 mov -0x38(%ebp),%edx 10bb5d: 8b 02 mov (%edx),%eax 10bb5f: 83 c4 20 add $0x20,%esp 10bb62: 39 45 cc cmp %eax,-0x34(%ebp) 10bb65: 74 14 je 10bb7b <_Heap_Walk+0x2c6> 10bb67: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bb6a: 51 push %ecx 10bb6b: 52 push %edx 10bb6c: 50 push %eax 10bb6d: ff 75 cc pushl -0x34(%ebp) 10bb70: 53 push %ebx 10bb71: 68 56 e8 11 00 push $0x11e856 10bb76: e9 58 ff ff ff jmp 10bad3 <_Heap_Walk+0x21e> <== ALWAYS TAKEN ); return false; } if ( !prev_used ) { 10bb7b: f6 45 c4 01 testb $0x1,-0x3c(%ebp) 10bb7f: 75 16 jne 10bb97 <_Heap_Walk+0x2e2> 10bb81: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10bb84: 53 push %ebx 10bb85: 68 8f e8 11 00 push $0x11e88f 10bb8a: 6a 01 push $0x1 10bb8c: 56 push %esi 10bb8d: ff 55 e4 call *-0x1c(%ebp) 10bb90: 31 c0 xor %eax,%eax 10bb92: 83 c4 10 add $0x10,%esp 10bb95: eb 28 jmp 10bbbf <_Heap_Walk+0x30a> <== ALWAYS TAKEN return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10bb97: 8b 47 08 mov 0x8(%edi),%eax 10bb9a: eb 07 jmp 10bba3 <_Heap_Walk+0x2ee> <== ALWAYS TAKEN { 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 ) { if ( free_block == block ) { 10bb9c: 39 d8 cmp %ebx,%eax 10bb9e: 74 12 je 10bbb2 <_Heap_Walk+0x2fd> return true; } free_block = free_block->next; 10bba0: 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 ) { 10bba3: 39 f8 cmp %edi,%eax 10bba5: 75 f5 jne 10bb9c <_Heap_Walk+0x2e7> 10bba7: 8b 75 e0 mov -0x20(%ebp),%esi return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10bbaa: 53 push %ebx 10bbab: 68 be e8 11 00 push $0x11e8be 10bbb0: eb d8 jmp 10bb8a <_Heap_Walk+0x2d5> <== ALWAYS TAKEN ) { 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 ) { 10bbb2: 89 f3 mov %esi,%ebx if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10bbb4: 3b 5d d0 cmp -0x30(%ebp),%ebx 10bbb7: 0f 85 78 fe ff ff jne 10ba35 <_Heap_Walk+0x180> 10bbbd: b0 01 mov $0x1,%al block = next_block; } return true; } 10bbbf: 8d 65 f4 lea -0xc(%ebp),%esp 10bbc2: 5b pop %ebx 10bbc3: 5e pop %esi 10bbc4: 5f pop %edi 10bbc5: c9 leave 10bbc6: c3 ret 0010bbc7 <_Heap_Walk_print>: { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { 10bbc7: 55 push %ebp 10bbc8: 89 e5 mov %esp,%ebp 10bbca: 83 ec 08 sub $0x8,%esp 10bbcd: 8b 45 08 mov 0x8(%ebp),%eax va_list ap; if ( error ) { 10bbd0: 80 7d 0c 00 cmpb $0x0,0xc(%ebp) 10bbd4: 74 0a je 10bbe0 <_Heap_Walk_print+0x19> printk( "FAIL[%d]: ", source ); 10bbd6: 51 push %ecx 10bbd7: 51 push %ecx 10bbd8: 50 push %eax 10bbd9: 68 e9 e8 11 00 push $0x11e8e9 10bbde: eb 08 jmp 10bbe8 <_Heap_Walk_print+0x21> <== ALWAYS TAKEN } else { printk( "PASS[%d]: ", source ); 10bbe0: 52 push %edx 10bbe1: 52 push %edx 10bbe2: 50 push %eax 10bbe3: 68 f4 e8 11 00 push $0x11e8f4 10bbe8: e8 c7 c8 ff ff call 1084b4 10bbed: 5a pop %edx 10bbee: 59 pop %ecx ) { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) 10bbef: 8d 45 14 lea 0x14(%ebp),%eax } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); vprintk( fmt, ap ); 10bbf2: 50 push %eax 10bbf3: ff 75 10 pushl 0x10(%ebp) 10bbf6: e8 ed e1 ff ff call 109de8 10bbfb: 83 c4 10 add $0x10,%esp va_end( ap ); } 10bbfe: c9 leave 10bbff: c3 ret 0010a4f8 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 10a4f8: 55 push %ebp 10a4f9: 89 e5 mov %esp,%ebp 10a4fb: 53 push %ebx 10a4fc: 83 ec 04 sub $0x4,%esp 10a4ff: 31 db xor %ebx,%ebx rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10a501: eb 0f jmp 10a512 <_IO_Initialize_all_drivers+0x1a> <== ALWAYS TAKEN (void) rtems_io_initialize( major, 0, NULL ); 10a503: 50 push %eax 10a504: 6a 00 push $0x0 10a506: 6a 00 push $0x0 10a508: 53 push %ebx 10a509: e8 7a 3d 00 00 call 10e288 <== ALWAYS TAKEN void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10a50e: 43 inc %ebx 10a50f: 83 c4 10 add $0x10,%esp 10a512: 3b 1d 4c 3b 12 00 cmp 0x123b4c,%ebx 10a518: 72 e9 jb 10a503 <_IO_Initialize_all_drivers+0xb> (void) rtems_io_initialize( major, 0, NULL ); } 10a51a: 8b 5d fc mov -0x4(%ebp),%ebx 10a51d: c9 leave 10a51e: c3 ret 0010a51f <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 10a51f: 55 push %ebp 10a520: 89 e5 mov %esp,%ebp 10a522: 57 push %edi 10a523: 56 push %esi 10a524: 53 push %ebx 10a525: 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; 10a528: 8b 35 4c f9 11 00 mov 0x11f94c,%esi drivers_in_table = Configuration.number_of_device_drivers; 10a52e: a1 48 f9 11 00 mov 0x11f948,%eax 10a533: 89 45 e4 mov %eax,-0x1c(%ebp) number_of_drivers = Configuration.maximum_drivers; 10a536: 8b 3d 44 f9 11 00 mov 0x11f944,%edi /* * 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 ) 10a53c: 39 c7 cmp %eax,%edi 10a53e: 76 30 jbe 10a570 <_IO_Manager_initialization+0x51> /* * 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 *) 10a540: 6b df 18 imul $0x18,%edi,%ebx 10a543: 83 ec 0c sub $0xc,%esp 10a546: 53 push %ebx 10a547: e8 14 25 00 00 call 10ca60 <_Workspace_Allocate_or_fatal_error> 10a54c: 89 c2 mov %eax,%edx 10a54e: a3 50 3b 12 00 mov %eax,0x123b50 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 10a553: 89 3d 4c 3b 12 00 mov %edi,0x123b4c memset( 10a559: 31 c0 xor %eax,%eax 10a55b: 89 d7 mov %edx,%edi 10a55d: 89 d9 mov %ebx,%ecx 10a55f: f3 aa rep stos %al,%es:(%edi) 10a561: 89 f0 mov %esi,%eax 10a563: 8b 15 50 3b 12 00 mov 0x123b50,%edx 10a569: 31 db xor %ebx,%ebx _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 10a56b: 83 c4 10 add $0x10,%esp 10a56e: eb 22 jmp 10a592 <_IO_Manager_initialization+0x73> <== ALWAYS TAKEN * 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; 10a570: 89 35 50 3b 12 00 mov %esi,0x123b50 _IO_Number_of_drivers = number_of_drivers; 10a576: 8b 45 e4 mov -0x1c(%ebp),%eax 10a579: a3 4c 3b 12 00 mov %eax,0x123b4c return; 10a57e: eb 17 jmp 10a597 <_IO_Manager_initialization+0x78> <== ALWAYS TAKEN _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; 10a580: 89 d7 mov %edx,%edi 10a582: 89 c6 mov %eax,%esi 10a584: b9 06 00 00 00 mov $0x6,%ecx 10a589: 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++ ) 10a58b: 43 inc %ebx 10a58c: 83 c0 18 add $0x18,%eax 10a58f: 83 c2 18 add $0x18,%edx 10a592: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10a595: 72 e9 jb 10a580 <_IO_Manager_initialization+0x61> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10a597: 8d 65 f4 lea -0xc(%ebp),%esp 10a59a: 5b pop %ebx 10a59b: 5e pop %esi 10a59c: 5f pop %edi 10a59d: c9 leave 10a59e: c3 ret 0010aee4 <_ISR_Handler_initialization>: * * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { 10aee4: 55 push %ebp 10aee5: 89 e5 mov %esp,%ebp 10aee7: 83 ec 08 sub $0x8,%esp _ISR_Signals_to_thread_executing = false; 10aeea: c6 05 c4 39 12 00 00 movb $0x0,0x1239c4 _ISR_Nest_level = 0; 10aef1: c7 05 0c 39 12 00 00 movl $0x0,0x12390c 10aef8: 00 00 00 _CPU_Initialize_vectors(); #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) ) 10aefb: a1 34 f9 11 00 mov 0x11f934,%eax 10af00: 3b 05 10 f9 11 00 cmp 0x11f910,%eax 10af06: 73 0c jae 10af14 <_ISR_Handler_initialization+0x30> _Internal_error_Occurred( 10af08: 50 push %eax 10af09: 6a 05 push $0x5 10af0b: 6a 01 push $0x1 10af0d: 6a 00 push $0x0 10af0f: e8 90 ff ff ff call 10aea4 <_Internal_error_Occurred> <== ALWAYS TAKEN INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error( 10af14: 83 ec 0c sub $0xc,%esp 10af17: 50 push %eax 10af18: e8 43 1b 00 00 call 10ca60 <_Workspace_Allocate_or_fatal_error> 10af1d: a3 84 38 12 00 mov %eax,0x123884 /* Interrupt stack might have to be aligned and/or setup * in a specific way. */ #if defined(_CPU_Interrupt_stack_setup) _CPU_Interrupt_stack_setup(_CPU_Interrupt_stack_low, _CPU_Interrupt_stack_high); 10af22: 8b 15 34 f9 11 00 mov 0x11f934,%edx 10af28: 8d 44 10 fc lea -0x4(%eax,%edx,1),%eax 10af2c: 83 e0 f0 and $0xfffffff0,%eax 10af2f: a3 44 38 12 00 mov %eax,0x123844 10af34: 83 c4 10 add $0x10,%esp #if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE ) _CPU_Install_interrupt_stack(); #endif } 10af37: c9 leave 10af38: c3 ret 0010aea4 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10aea4: 55 push %ebp 10aea5: 89 e5 mov %esp,%ebp 10aea7: 53 push %ebx 10aea8: 83 ec 08 sub $0x8,%esp 10aeab: 8b 45 08 mov 0x8(%ebp),%eax 10aeae: 8b 55 0c mov 0xc(%ebp),%edx 10aeb1: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10aeb4: a3 18 39 12 00 mov %eax,0x123918 _Internal_errors_What_happened.is_internal = is_internal; 10aeb9: 88 15 1c 39 12 00 mov %dl,0x12391c _Internal_errors_What_happened.the_error = the_error; 10aebf: 89 1d 20 39 12 00 mov %ebx,0x123920 _User_extensions_Fatal( the_source, is_internal, the_error ); 10aec5: 53 push %ebx 10aec6: 0f b6 d2 movzbl %dl,%edx 10aec9: 52 push %edx 10aeca: 50 push %eax 10aecb: e8 8b 18 00 00 call 10c75b <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10aed0: c7 05 0c 3a 12 00 05 movl $0x5,0x123a0c <== NOT EXECUTED 10aed7: 00 00 00 <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10aeda: fa cli <== NOT EXECUTED 10aedb: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10aedd: f4 hlt <== NOT EXECUTED 10aede: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10aee1: eb fe jmp 10aee1 <_Internal_error_Occurred+0x3d> <== NOT EXECUTED 0010af3c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10af3c: 55 push %ebp 10af3d: 89 e5 mov %esp,%ebp 10af3f: 56 push %esi 10af40: 53 push %ebx 10af41: 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 ) 10af44: 31 c9 xor %ecx,%ecx 10af46: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 10af4a: 74 53 je 10af9f <_Objects_Allocate+0x63> <== ALWAYS TAKEN /* * 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 ); 10af4c: 8d 73 20 lea 0x20(%ebx),%esi 10af4f: 83 ec 0c sub $0xc,%esp 10af52: 56 push %esi 10af53: e8 0c f8 ff ff call 10a764 <_Chain_Get> <== ALWAYS TAKEN 10af58: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10af5a: 83 c4 10 add $0x10,%esp 10af5d: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10af61: 74 3c je 10af9f <_Objects_Allocate+0x63> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10af63: 85 c0 test %eax,%eax 10af65: 75 1a jne 10af81 <_Objects_Allocate+0x45> _Objects_Extend_information( information ); 10af67: 83 ec 0c sub $0xc,%esp 10af6a: 53 push %ebx 10af6b: e8 60 00 00 00 call 10afd0 <_Objects_Extend_information> <== ALWAYS TAKEN the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10af70: 89 34 24 mov %esi,(%esp) 10af73: e8 ec f7 ff ff call 10a764 <_Chain_Get> <== ALWAYS TAKEN 10af78: 89 c1 mov %eax,%ecx } if ( the_object ) { 10af7a: 83 c4 10 add $0x10,%esp 10af7d: 85 c0 test %eax,%eax 10af7f: 74 1e je 10af9f <_Objects_Allocate+0x63> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10af81: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10af85: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10af89: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 10af8b: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10af8f: 31 d2 xor %edx,%edx 10af91: f7 f6 div %esi 10af93: c1 e0 02 shl $0x2,%eax 10af96: 03 43 30 add 0x30(%ebx),%eax 10af99: ff 08 decl (%eax) information->inactive--; 10af9b: 66 ff 4b 2c decw 0x2c(%ebx) } } return the_object; } 10af9f: 89 c8 mov %ecx,%eax 10afa1: 8d 65 f8 lea -0x8(%ebp),%esp 10afa4: 5b pop %ebx 10afa5: 5e pop %esi 10afa6: c9 leave 10afa7: c3 ret 0010afa8 <_Objects_Close>: void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 10afa8: 55 push %ebp 10afa9: 89 e5 mov %esp,%ebp 10afab: 53 push %ebx 10afac: 83 ec 04 sub $0x4,%esp 10afaf: 8b 45 08 mov 0x8(%ebp),%eax 10afb2: 8b 55 0c mov 0xc(%ebp),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10afb5: 0f b7 5a 08 movzwl 0x8(%edx),%ebx 10afb9: 8b 48 1c mov 0x1c(%eax),%ecx 10afbc: c7 04 99 00 00 00 00 movl $0x0,(%ecx,%ebx,4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 10afc3: 89 55 0c mov %edx,0xc(%ebp) } 10afc6: 58 pop %eax 10afc7: 5b pop %ebx 10afc8: c9 leave Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 10afc9: e9 be 04 00 00 jmp 10b48c <_Objects_Namespace_remove> <== ALWAYS TAKEN 0010afd0 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10afd0: 55 push %ebp 10afd1: 89 e5 mov %esp,%ebp 10afd3: 57 push %edi 10afd4: 56 push %esi 10afd5: 53 push %ebx 10afd6: 83 ec 4c sub $0x4c,%esp 10afd9: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); 10afdc: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10afe0: 89 45 c8 mov %eax,-0x38(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10afe3: 8b 4b 34 mov 0x34(%ebx),%ecx 10afe6: 85 c9 test %ecx,%ecx 10afe8: 75 0e jne 10aff8 <_Objects_Extend_information+0x28> 10afea: 89 45 d4 mov %eax,-0x2c(%ebp) 10afed: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10aff4: 31 d2 xor %edx,%edx 10aff6: eb 31 jmp 10b029 <_Objects_Extend_information+0x59> <== ALWAYS TAKEN block_count = 0; else { block_count = information->maximum / information->allocation_size; 10aff8: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10affc: 8b 43 10 mov 0x10(%ebx),%eax 10afff: 31 d2 xor %edx,%edx 10b001: 66 f7 f6 div %si 10b004: 0f b7 d0 movzwl %ax,%edx 10b007: 8b 7d c8 mov -0x38(%ebp),%edi 10b00a: 89 7d d4 mov %edi,-0x2c(%ebp) 10b00d: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10b014: 31 c0 xor %eax,%eax for ( ; block < block_count; block++ ) { 10b016: eb 0a jmp 10b022 <_Objects_Extend_information+0x52> <== ALWAYS TAKEN if ( information->object_blocks[ block ] == NULL ) 10b018: 83 3c 81 00 cmpl $0x0,(%ecx,%eax,4) 10b01c: 74 08 je 10b026 <_Objects_Extend_information+0x56> 10b01e: 01 75 d4 add %esi,-0x2c(%ebp) if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10b021: 40 inc %eax 10b022: 39 d0 cmp %edx,%eax 10b024: 72 f2 jb 10b018 <_Objects_Extend_information+0x48> 10b026: 89 45 cc mov %eax,-0x34(%ebp) else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10b029: 0f b7 43 14 movzwl 0x14(%ebx),%eax 10b02d: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10b031: 8d 0c 08 lea (%eax,%ecx,1),%ecx 10b034: 89 4d b8 mov %ecx,-0x48(%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 ) { 10b037: 81 f9 ff ff 00 00 cmp $0xffff,%ecx 10b03d: 0f 87 db 01 00 00 ja 10b21e <_Objects_Extend_information+0x24e> <== ALWAYS TAKEN /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 10b043: 0f af 43 18 imul 0x18(%ebx),%eax if ( information->auto_extend ) { 10b047: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b04b: 74 1e je 10b06b <_Objects_Extend_information+0x9b> new_object_block = _Workspace_Allocate( block_size ); 10b04d: 83 ec 0c sub $0xc,%esp 10b050: 50 push %eax 10b051: 89 55 b4 mov %edx,-0x4c(%ebp) 10b054: e8 33 1a 00 00 call 10ca8c <_Workspace_Allocate> 10b059: 89 45 bc mov %eax,-0x44(%ebp) if ( !new_object_block ) 10b05c: 83 c4 10 add $0x10,%esp 10b05f: 85 c0 test %eax,%eax 10b061: 8b 55 b4 mov -0x4c(%ebp),%edx 10b064: 75 1a jne 10b080 <_Objects_Extend_information+0xb0> 10b066: e9 b3 01 00 00 jmp 10b21e <_Objects_Extend_information+0x24e> <== ALWAYS TAKEN return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 10b06b: 83 ec 0c sub $0xc,%esp 10b06e: 50 push %eax 10b06f: 89 55 b4 mov %edx,-0x4c(%ebp) 10b072: e8 e9 19 00 00 call 10ca60 <_Workspace_Allocate_or_fatal_error> 10b077: 89 45 bc mov %eax,-0x44(%ebp) 10b07a: 83 c4 10 add $0x10,%esp 10b07d: 8b 55 b4 mov -0x4c(%ebp),%edx } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 10b080: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10b084: 39 45 d4 cmp %eax,-0x2c(%ebp) 10b087: 0f 82 14 01 00 00 jb 10b1a1 <_Objects_Extend_information+0x1d1> */ /* * Up the block count and maximum */ block_count++; 10b08d: 8d 72 01 lea 0x1(%edx),%esi * 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 ); 10b090: 83 ec 0c sub $0xc,%esp 10b093: 8b 4d b8 mov -0x48(%ebp),%ecx 10b096: 03 4d c8 add -0x38(%ebp),%ecx 10b099: 8d 04 76 lea (%esi,%esi,2),%eax 10b09c: 8d 04 01 lea (%ecx,%eax,1),%eax 10b09f: c1 e0 02 shl $0x2,%eax 10b0a2: 50 push %eax 10b0a3: 89 55 b4 mov %edx,-0x4c(%ebp) 10b0a6: e8 e1 19 00 00 call 10ca8c <_Workspace_Allocate> if ( !object_blocks ) { 10b0ab: 83 c4 10 add $0x10,%esp 10b0ae: 85 c0 test %eax,%eax 10b0b0: 8b 55 b4 mov -0x4c(%ebp),%edx 10b0b3: 75 13 jne 10b0c8 <_Objects_Extend_information+0xf8> _Workspace_Free( new_object_block ); 10b0b5: 83 ec 0c sub $0xc,%esp 10b0b8: ff 75 bc pushl -0x44(%ebp) 10b0bb: e8 e5 19 00 00 call 10caa5 <_Workspace_Free> return; 10b0c0: 83 c4 10 add $0x10,%esp 10b0c3: e9 56 01 00 00 jmp 10b21e <_Objects_Extend_information+0x24e> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 10b0c8: 8d 0c b0 lea (%eax,%esi,4),%ecx 10b0cb: 89 4d c0 mov %ecx,-0x40(%ebp) 10b0ce: 8d 34 f0 lea (%eax,%esi,8),%esi 10b0d1: 89 75 c4 mov %esi,-0x3c(%ebp) * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 10b0d4: 0f b7 73 10 movzwl 0x10(%ebx),%esi 10b0d8: 31 c9 xor %ecx,%ecx 10b0da: 3b 75 c8 cmp -0x38(%ebp),%esi 10b0dd: 76 3e jbe 10b11d <_Objects_Extend_information+0x14d> /* * 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, 10b0df: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi 10b0e6: 89 75 d0 mov %esi,-0x30(%ebp) 10b0e9: 8b 73 34 mov 0x34(%ebx),%esi 10b0ec: 89 c7 mov %eax,%edi 10b0ee: 8b 4d d0 mov -0x30(%ebp),%ecx 10b0f1: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10b0f3: 8b 73 30 mov 0x30(%ebx),%esi 10b0f6: 8b 7d c0 mov -0x40(%ebp),%edi 10b0f9: 8b 4d d0 mov -0x30(%ebp),%ecx 10b0fc: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10b0fe: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10b102: 03 4d c8 add -0x38(%ebp),%ecx 10b105: c1 e1 02 shl $0x2,%ecx 10b108: 8b 73 1c mov 0x1c(%ebx),%esi 10b10b: 8b 7d c4 mov -0x3c(%ebp),%edi 10b10e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10b110: eb 10 jmp 10b122 <_Objects_Extend_information+0x152> <== ALWAYS TAKEN /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 10b112: 8b 7d c4 mov -0x3c(%ebp),%edi 10b115: c7 04 8f 00 00 00 00 movl $0x0,(%edi,%ecx,4) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10b11c: 41 inc %ecx 10b11d: 3b 4d c8 cmp -0x38(%ebp),%ecx 10b120: 72 f0 jb 10b112 <_Objects_Extend_information+0x142> } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10b122: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) inactive_per_block[block_count] = 0; 10b129: 8b 4d c0 mov -0x40(%ebp),%ecx 10b12c: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,4) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10b133: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b137: 8b 75 d4 mov -0x2c(%ebp),%esi 10b13a: 01 d6 add %edx,%esi 10b13c: 8b 7d d4 mov -0x2c(%ebp),%edi 10b13f: 8b 55 c4 mov -0x3c(%ebp),%edx 10b142: 8d 0c ba lea (%edx,%edi,4),%ecx 10b145: 89 fa mov %edi,%edx * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10b147: eb 0a jmp 10b153 <_Objects_Extend_information+0x183> <== ALWAYS TAKEN index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10b149: c7 01 00 00 00 00 movl $0x0,(%ecx) object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 10b14f: 42 inc %edx 10b150: 83 c1 04 add $0x4,%ecx * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10b153: 39 f2 cmp %esi,%edx 10b155: 72 f2 jb 10b149 <_Objects_Extend_information+0x179> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10b157: 9c pushf 10b158: fa cli 10b159: 5e pop %esi old_tables = information->object_blocks; 10b15a: 8b 53 34 mov 0x34(%ebx),%edx information->object_blocks = object_blocks; 10b15d: 89 43 34 mov %eax,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10b160: 8b 4d c0 mov -0x40(%ebp),%ecx 10b163: 89 4b 30 mov %ecx,0x30(%ebx) information->local_table = local_table; 10b166: 8b 7d c4 mov -0x3c(%ebp),%edi 10b169: 89 7b 1c mov %edi,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10b16c: 8b 45 b8 mov -0x48(%ebp),%eax 10b16f: 66 89 43 10 mov %ax,0x10(%ebx) information->maximum_id = _Objects_Build_id( 10b173: 8b 03 mov (%ebx),%eax 10b175: c1 e0 18 shl $0x18,%eax 10b178: 0d 00 00 01 00 or $0x10000,%eax 10b17d: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10b181: c1 e1 1b shl $0x1b,%ecx 10b184: 09 c8 or %ecx,%eax 10b186: 0f b7 4d b8 movzwl -0x48(%ebp),%ecx 10b18a: 09 c8 or %ecx,%eax 10b18c: 89 43 0c mov %eax,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10b18f: 56 push %esi 10b190: 9d popf if ( old_tables ) 10b191: 85 d2 test %edx,%edx 10b193: 74 0c je 10b1a1 <_Objects_Extend_information+0x1d1> _Workspace_Free( old_tables ); 10b195: 83 ec 0c sub $0xc,%esp 10b198: 52 push %edx 10b199: e8 07 19 00 00 call 10caa5 <_Workspace_Free> 10b19e: 83 c4 10 add $0x10,%esp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10b1a1: 8b 55 cc mov -0x34(%ebp),%edx 10b1a4: c1 e2 02 shl $0x2,%edx 10b1a7: 89 55 d0 mov %edx,-0x30(%ebp) 10b1aa: 8b 43 34 mov 0x34(%ebx),%eax 10b1ad: 8b 75 bc mov -0x44(%ebp),%esi 10b1b0: 8b 4d cc mov -0x34(%ebp),%ecx 10b1b3: 89 34 88 mov %esi,(%eax,%ecx,4) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10b1b6: ff 73 18 pushl 0x18(%ebx) 10b1b9: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b1bd: 52 push %edx 10b1be: ff 34 88 pushl (%eax,%ecx,4) 10b1c1: 8d 45 dc lea -0x24(%ebp),%eax 10b1c4: 50 push %eax 10b1c5: 89 45 b4 mov %eax,-0x4c(%ebp) 10b1c8: e8 03 31 00 00 call 10e2d0 <_Chain_Initialize> <== ALWAYS TAKEN information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b1cd: 8d 7b 20 lea 0x20(%ebx),%edi 10b1d0: 8b 75 d4 mov -0x2c(%ebp),%esi 10b1d3: eb 23 jmp 10b1f8 <_Objects_Extend_information+0x228> <== ALWAYS TAKEN */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 10b1d5: 8b 13 mov (%ebx),%edx 10b1d7: c1 e2 18 shl $0x18,%edx 10b1da: 81 ca 00 00 01 00 or $0x10000,%edx 10b1e0: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10b1e4: c1 e1 1b shl $0x1b,%ecx 10b1e7: 09 ca or %ecx,%edx 10b1e9: 09 f2 or %esi,%edx 10b1eb: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b1ee: 52 push %edx 10b1ef: 52 push %edx 10b1f0: 50 push %eax 10b1f1: 57 push %edi 10b1f2: e8 49 f5 ff ff call 10a740 <_Chain_Append> <== ALWAYS TAKEN index++; 10b1f7: 46 inc %esi /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10b1f8: 8d 45 dc lea -0x24(%ebp),%eax 10b1fb: 89 04 24 mov %eax,(%esp) 10b1fe: e8 61 f5 ff ff call 10a764 <_Chain_Get> <== ALWAYS TAKEN 10b203: 83 c4 10 add $0x10,%esp 10b206: 85 c0 test %eax,%eax 10b208: 75 cb jne 10b1d5 <_Objects_Extend_information+0x205> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10b20a: 8b 43 30 mov 0x30(%ebx),%eax 10b20d: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b211: 8b 4d d0 mov -0x30(%ebp),%ecx 10b214: 89 14 08 mov %edx,(%eax,%ecx,1) information->inactive = 10b217: 8b 43 14 mov 0x14(%ebx),%eax 10b21a: 66 01 43 2c add %ax,0x2c(%ebx) (Objects_Maximum)(information->inactive + information->allocation_size); } 10b21e: 8d 65 f4 lea -0xc(%ebp),%esp 10b221: 5b pop %ebx 10b222: 5e pop %esi 10b223: 5f pop %edi 10b224: c9 leave 10b225: c3 ret 0010b228 <_Objects_Free>: void _Objects_Free( Objects_Information *information, Objects_Control *the_object ) { 10b228: 55 push %ebp 10b229: 89 e5 mov %esp,%ebp 10b22b: 57 push %edi 10b22c: 56 push %esi 10b22d: 53 push %ebx 10b22e: 83 ec 14 sub $0x14,%esp 10b231: 8b 5d 08 mov 0x8(%ebp),%ebx 10b234: 8b 75 0c mov 0xc(%ebp),%esi uint32_t allocation_size = information->allocation_size; 10b237: 8b 7b 14 mov 0x14(%ebx),%edi _Chain_Append( &information->Inactive, &the_object->Node ); 10b23a: 56 push %esi 10b23b: 8d 43 20 lea 0x20(%ebx),%eax 10b23e: 50 push %eax 10b23f: e8 fc f4 ff ff call 10a740 <_Chain_Append> <== ALWAYS TAKEN if ( information->auto_extend ) { 10b244: 83 c4 10 add $0x10,%esp 10b247: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b24b: 74 42 je 10b28f <_Objects_Free+0x67> void _Objects_Free( Objects_Information *information, Objects_Control *the_object ) { uint32_t allocation_size = information->allocation_size; 10b24d: 0f b7 cf movzwl %di,%ecx _Chain_Append( &information->Inactive, &the_object->Node ); if ( information->auto_extend ) { uint32_t block; block = (uint32_t) (_Objects_Get_index( the_object->id ) - 10b250: 0f b7 46 08 movzwl 0x8(%esi),%eax 10b254: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10b258: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id )); block /= information->allocation_size; information->inactive_per_block[ block ]++; 10b25a: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10b25e: 31 d2 xor %edx,%edx 10b260: f7 f6 div %esi 10b262: c1 e0 02 shl $0x2,%eax 10b265: 03 43 30 add 0x30(%ebx),%eax 10b268: ff 00 incl (%eax) information->inactive++; 10b26a: 8b 43 2c mov 0x2c(%ebx),%eax 10b26d: 40 inc %eax 10b26e: 66 89 43 2c mov %ax,0x2c(%ebx) /* * Check if the threshold level has been met of * 1.5 x allocation_size are free. */ if ( information->inactive > ( allocation_size + ( allocation_size >> 1 ) ) ) { 10b272: 0f b7 c0 movzwl %ax,%eax 10b275: 89 ca mov %ecx,%edx 10b277: d1 ea shr %edx 10b279: 8d 0c 0a lea (%edx,%ecx,1),%ecx 10b27c: 39 c8 cmp %ecx,%eax 10b27e: 76 0f jbe 10b28f <_Objects_Free+0x67> _Objects_Shrink_information( information ); 10b280: 89 5d 08 mov %ebx,0x8(%ebp) } } } 10b283: 8d 65 f4 lea -0xc(%ebp),%esp 10b286: 5b pop %ebx 10b287: 5e pop %esi 10b288: 5f pop %edi 10b289: c9 leave * Check if the threshold level has been met of * 1.5 x allocation_size are free. */ if ( information->inactive > ( allocation_size + ( allocation_size >> 1 ) ) ) { _Objects_Shrink_information( information ); 10b28a: e9 79 02 00 00 jmp 10b508 <_Objects_Shrink_information> <== ALWAYS TAKEN } } } 10b28f: 8d 65 f4 lea -0xc(%ebp),%esp 10b292: 5b pop %ebx 10b293: 5e pop %esi 10b294: 5f pop %edi 10b295: c9 leave 10b296: c3 ret 0010b350 <_Objects_Get>: Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 10b350: 55 push %ebp 10b351: 89 e5 mov %esp,%ebp 10b353: 56 push %esi 10b354: 53 push %ebx 10b355: 8b 55 08 mov 0x8(%ebp),%edx 10b358: 8b 75 10 mov 0x10(%ebp),%esi * 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; 10b35b: b8 01 00 00 00 mov $0x1,%eax 10b360: 2b 42 08 sub 0x8(%edx),%eax 10b363: 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 ) { 10b366: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10b36a: 39 c8 cmp %ecx,%eax 10b36c: 77 2c ja 10b39a <_Objects_Get+0x4a> 10b36e: 8b 0d 74 38 12 00 mov 0x123874,%ecx 10b374: 41 inc %ecx 10b375: 89 0d 74 38 12 00 mov %ecx,0x123874 _Thread_Disable_dispatch(); if ( (the_object = information->local_table[ index ]) != NULL ) { 10b37b: 8b 52 1c mov 0x1c(%edx),%edx 10b37e: 8b 1c 82 mov (%edx,%eax,4),%ebx 10b381: 85 db test %ebx,%ebx 10b383: 74 08 je 10b38d <_Objects_Get+0x3d> *location = OBJECTS_LOCAL; 10b385: c7 06 00 00 00 00 movl $0x0,(%esi) return the_object; 10b38b: eb 15 jmp 10b3a2 <_Objects_Get+0x52> <== ALWAYS TAKEN /* * Valid Id for this API, Class and Node but the object has not * been allocated yet. */ _Thread_Enable_dispatch(); 10b38d: e8 83 07 00 00 call 10bb15 <_Thread_Enable_dispatch> <== ALWAYS TAKEN *location = OBJECTS_ERROR; 10b392: c7 06 01 00 00 00 movl $0x1,(%esi) return NULL; 10b398: eb 08 jmp 10b3a2 <_Objects_Get+0x52> <== ALWAYS TAKEN /* * 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; 10b39a: c7 06 01 00 00 00 movl $0x1,(%esi) 10b3a0: 31 db xor %ebx,%ebx _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10b3a2: 89 d8 mov %ebx,%eax 10b3a4: 5b pop %ebx 10b3a5: 5e pop %esi 10b3a6: c9 leave 10b3a7: c3 ret 0010b2b8 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10b2b8: 55 push %ebp 10b2b9: 89 e5 mov %esp,%ebp 10b2bb: 56 push %esi 10b2bc: 53 push %ebx 10b2bd: 8b 75 08 mov 0x8(%ebp),%esi 10b2c0: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10b2c3: 85 db test %ebx,%ebx 10b2c5: 74 2d je 10b2f4 <_Objects_Get_information+0x3c> /* * 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 ); 10b2c7: 83 ec 0c sub $0xc,%esp 10b2ca: 56 push %esi 10b2cb: e8 e4 34 00 00 call 10e7b4 <_Objects_API_maximum_class> <== ALWAYS TAKEN if ( the_class_api_maximum == 0 ) 10b2d0: 83 c4 10 add $0x10,%esp 10b2d3: 85 c0 test %eax,%eax 10b2d5: 74 1d je 10b2f4 <_Objects_Get_information+0x3c> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10b2d7: 39 c3 cmp %eax,%ebx 10b2d9: 77 19 ja 10b2f4 <_Objects_Get_information+0x3c> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10b2db: 8b 04 b5 48 38 12 00 mov 0x123848(,%esi,4),%eax 10b2e2: 85 c0 test %eax,%eax 10b2e4: 74 0e je 10b2f4 <_Objects_Get_information+0x3c> <== ALWAYS TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10b2e6: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !info ) 10b2e9: 85 c0 test %eax,%eax 10b2eb: 74 09 je 10b2f6 <_Objects_Get_information+0x3e> <== ALWAYS TAKEN * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 10b2ed: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10b2f2: 75 02 jne 10b2f6 <_Objects_Get_information+0x3e> 10b2f4: 31 c0 xor %eax,%eax return NULL; #endif return info; } 10b2f6: 8d 65 f8 lea -0x8(%ebp),%esp 10b2f9: 5b pop %ebx 10b2fa: 5e pop %esi 10b2fb: c9 leave 10b2fc: c3 ret 0010b298 <_Objects_Get_information_id>: #include Objects_Information *_Objects_Get_information_id( Objects_Id id ) { 10b298: 55 push %ebp 10b299: 89 e5 mov %esp,%ebp 10b29b: 83 ec 10 sub $0x10,%esp 10b29e: 8b 45 08 mov 0x8(%ebp),%eax return _Objects_Get_information( 10b2a1: 89 c2 mov %eax,%edx 10b2a3: c1 ea 1b shr $0x1b,%edx 10b2a6: 52 push %edx 10b2a7: c1 e8 18 shr $0x18,%eax 10b2aa: 83 e0 07 and $0x7,%eax 10b2ad: 50 push %eax 10b2ae: e8 05 00 00 00 call 10b2b8 <_Objects_Get_information> <== ALWAYS TAKEN _Objects_Get_API( id ), _Objects_Get_class( id ) ); } 10b2b3: c9 leave 10b2b4: c3 ret 0010b300 <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10b300: 55 push %ebp 10b301: 89 e5 mov %esp,%ebp 10b303: 56 push %esi 10b304: 53 push %ebx 10b305: 8b 5d 08 mov 0x8(%ebp),%ebx 10b308: 8b 55 10 mov 0x10(%ebp),%edx Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 10b30b: b8 01 00 00 00 mov $0x1,%eax 10b310: 2b 43 08 sub 0x8(%ebx),%eax 10b313: 03 45 0c add 0xc(%ebp),%eax _ISR_Disable( level ); 10b316: 9c pushf 10b317: fa cli 10b318: 59 pop %ecx if ( information->maximum >= index ) { 10b319: 0f b7 73 10 movzwl 0x10(%ebx),%esi 10b31d: 39 c6 cmp %eax,%esi 10b31f: 72 21 jb 10b342 <_Objects_Get_isr_disable+0x42> if ( (the_object = information->local_table[ index ]) != NULL ) { 10b321: 8b 5b 1c mov 0x1c(%ebx),%ebx 10b324: 8b 04 83 mov (%ebx,%eax,4),%eax 10b327: 85 c0 test %eax,%eax 10b329: 74 0d je 10b338 <_Objects_Get_isr_disable+0x38> *location = OBJECTS_LOCAL; 10b32b: c7 02 00 00 00 00 movl $0x0,(%edx) *level_p = level; 10b331: 8b 55 14 mov 0x14(%ebp),%edx 10b334: 89 0a mov %ecx,(%edx) return the_object; 10b336: eb 14 jmp 10b34c <_Objects_Get_isr_disable+0x4c> <== ALWAYS TAKEN } _ISR_Enable( level ); 10b338: 51 push %ecx 10b339: 9d popf *location = OBJECTS_ERROR; 10b33a: c7 02 01 00 00 00 movl $0x1,(%edx) return NULL; 10b340: eb 0a jmp 10b34c <_Objects_Get_isr_disable+0x4c> <== ALWAYS TAKEN } _ISR_Enable( level ); 10b342: 51 push %ecx 10b343: 9d popf *location = OBJECTS_ERROR; 10b344: c7 02 01 00 00 00 movl $0x1,(%edx) 10b34a: 31 c0 xor %eax,%eax _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10b34c: 5b pop %ebx 10b34d: 5e pop %esi 10b34e: c9 leave 10b34f: c3 ret 00114320 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 114320: 55 push %ebp 114321: 89 e5 mov %esp,%ebp 114323: 57 push %edi 114324: 56 push %esi 114325: 53 push %ebx 114326: 83 ec 2c sub $0x2c,%esp 114329: 8b 75 0c mov 0xc(%ebp),%esi 11432c: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 11432f: 85 f6 test %esi,%esi 114331: 0f 84 95 00 00 00 je 1143cc <_Objects_Get_name_as_string+0xac> return NULL; if ( name == NULL ) 114337: 85 db test %ebx,%ebx 114339: 0f 84 8f 00 00 00 je 1143ce <_Objects_Get_name_as_string+0xae> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 11433f: 8b 7d 08 mov 0x8(%ebp),%edi 114342: 85 ff test %edi,%edi 114344: 75 08 jne 11434e <_Objects_Get_name_as_string+0x2e> 114346: a1 0c eb 12 00 mov 0x12eb0c,%eax 11434b: 8b 78 08 mov 0x8(%eax),%edi information = _Objects_Get_information_id( tmpId ); 11434e: 83 ec 0c sub $0xc,%esp 114351: 57 push %edi 114352: e8 31 a5 ff ff call 10e888 <_Objects_Get_information_id> <== ALWAYS TAKEN if ( !information ) 114357: 83 c4 10 add $0x10,%esp 11435a: 85 c0 test %eax,%eax 11435c: 74 6e je 1143cc <_Objects_Get_name_as_string+0xac> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 11435e: 52 push %edx 11435f: 8d 55 e4 lea -0x1c(%ebp),%edx 114362: 52 push %edx 114363: 57 push %edi 114364: 50 push %eax 114365: e8 d6 a5 ff ff call 10e940 <_Objects_Get> <== ALWAYS TAKEN switch ( location ) { 11436a: 83 c4 10 add $0x10,%esp 11436d: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 114371: 75 59 jne 1143cc <_Objects_Get_name_as_string+0xac> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 114373: 8b 40 0c mov 0xc(%eax),%eax lname[ 0 ] = (u32_name >> 24) & 0xff; 114376: 89 c2 mov %eax,%edx 114378: c1 ea 18 shr $0x18,%edx 11437b: 88 55 df mov %dl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 11437e: 89 c2 mov %eax,%edx 114380: c1 ea 10 shr $0x10,%edx 114383: 88 55 e0 mov %dl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 114386: 89 c2 mov %eax,%edx 114388: c1 ea 08 shr $0x8,%edx 11438b: 88 55 e1 mov %dl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 11438e: 88 45 e2 mov %al,-0x1e(%ebp) lname[ 4 ] = '\0'; 114391: c6 45 e3 00 movb $0x0,-0x1d(%ebp) 114395: 89 d8 mov %ebx,%eax 114397: 31 d2 xor %edx,%edx s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 114399: 4e dec %esi 11439a: 89 75 d4 mov %esi,-0x2c(%ebp) 11439d: eb 16 jmp 1143b5 <_Objects_Get_name_as_string+0x95> <== ALWAYS TAKEN *d = (isprint((unsigned char)*s)) ? *s : '*'; 11439f: 0f b6 f1 movzbl %cl,%esi 1143a2: 8b 3d a4 c1 12 00 mov 0x12c1a4,%edi 1143a8: f6 44 37 01 97 testb $0x97,0x1(%edi,%esi,1) 1143ad: 75 02 jne 1143b1 <_Objects_Get_name_as_string+0x91> 1143af: b1 2a mov $0x2a,%cl 1143b1: 88 08 mov %cl,(%eax) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 1143b3: 42 inc %edx 1143b4: 40 inc %eax 1143b5: 3b 55 d4 cmp -0x2c(%ebp),%edx 1143b8: 73 08 jae 1143c2 <_Objects_Get_name_as_string+0xa2> 1143ba: 8a 4c 15 df mov -0x21(%ebp,%edx,1),%cl 1143be: 84 c9 test %cl,%cl 1143c0: 75 dd jne 11439f <_Objects_Get_name_as_string+0x7f> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 1143c2: c6 00 00 movb $0x0,(%eax) _Thread_Enable_dispatch(); 1143c5: e8 a7 ad ff ff call 10f171 <_Thread_Enable_dispatch> return name; 1143ca: eb 02 jmp 1143ce <_Objects_Get_name_as_string+0xae> <== ALWAYS TAKEN 1143cc: 31 db xor %ebx,%ebx } return NULL; /* unreachable path */ } 1143ce: 89 d8 mov %ebx,%eax 1143d0: 8d 65 f4 lea -0xc(%ebp),%esp 1143d3: 5b pop %ebx 1143d4: 5e pop %esi 1143d5: 5f pop %edi 1143d6: c9 leave 1143d7: c3 ret 00116534 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 116534: 55 push %ebp 116535: 89 e5 mov %esp,%ebp 116537: 57 push %edi 116538: 56 push %esi 116539: 53 push %ebx 11653a: 83 ec 1c sub $0x1c,%esp 11653d: 8b 7d 08 mov 0x8(%ebp),%edi 116540: 8b 75 10 mov 0x10(%ebp),%esi 116543: 8b 55 14 mov 0x14(%ebp),%edx Objects_Control *object; Objects_Id next_id; if ( !information ) 116546: 85 ff test %edi,%edi 116548: 74 43 je 11658d <_Objects_Get_next+0x59> return NULL; if ( !location_p ) 11654a: 85 f6 test %esi,%esi 11654c: 74 3f je 11658d <_Objects_Get_next+0x59> return NULL; if ( !next_id_p ) 11654e: 85 d2 test %edx,%edx 116550: 74 3b je 11658d <_Objects_Get_next+0x59> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 116552: 8b 5d 0c mov 0xc(%ebp),%ebx 116555: 66 85 db test %bx,%bx 116558: 75 03 jne 11655d <_Objects_Get_next+0x29> next_id = information->minimum_id; 11655a: 8b 5f 08 mov 0x8(%edi),%ebx else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 11655d: 66 39 5f 10 cmp %bx,0x10(%edi) 116561: 73 0e jae 116571 <_Objects_Get_next+0x3d> { *location_p = OBJECTS_ERROR; 116563: c7 06 01 00 00 00 movl $0x1,(%esi) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 116569: c7 02 ff ff ff ff movl $0xffffffff,(%edx) 11656f: eb 1c jmp 11658d <_Objects_Get_next+0x59> <== ALWAYS TAKEN *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 116571: 50 push %eax 116572: 56 push %esi 116573: 53 push %ebx 116574: 57 push %edi 116575: 89 55 e4 mov %edx,-0x1c(%ebp) 116578: e8 c3 83 ff ff call 10e940 <_Objects_Get> <== ALWAYS TAKEN next_id++; 11657d: 43 inc %ebx } while (*location_p != OBJECTS_LOCAL); 11657e: 83 c4 10 add $0x10,%esp 116581: 83 3e 00 cmpl $0x0,(%esi) 116584: 8b 55 e4 mov -0x1c(%ebp),%edx 116587: 75 d4 jne 11655d <_Objects_Get_next+0x29> *next_id_p = next_id; 116589: 89 1a mov %ebx,(%edx) return object; 11658b: eb 02 jmp 11658f <_Objects_Get_next+0x5b> <== ALWAYS TAKEN final: *next_id_p = OBJECTS_ID_FINAL; return 0; 11658d: 31 c0 xor %eax,%eax } 11658f: 8d 65 f4 lea -0xc(%ebp),%esp 116592: 5b pop %ebx 116593: 5e pop %esi 116594: 5f pop %edi 116595: c9 leave 116596: c3 ret 00118250 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 118250: 55 push %ebp 118251: 89 e5 mov %esp,%ebp 118253: 53 push %ebx 118254: 8b 55 08 mov 0x8(%ebp),%edx 118257: 8b 4d 10 mov 0x10(%ebp),%ecx /* * 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; 11825a: b8 01 00 00 00 mov $0x1,%eax 11825f: 2b 42 08 sub 0x8(%edx),%eax 118262: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 118265: 0f b7 5a 10 movzwl 0x10(%edx),%ebx 118269: 39 c3 cmp %eax,%ebx 11826b: 72 12 jb 11827f <_Objects_Get_no_protection+0x2f> if ( (the_object = information->local_table[ index ]) != NULL ) { 11826d: 8b 52 1c mov 0x1c(%edx),%edx 118270: 8b 04 82 mov (%edx,%eax,4),%eax 118273: 85 c0 test %eax,%eax 118275: 74 08 je 11827f <_Objects_Get_no_protection+0x2f> <== ALWAYS TAKEN *location = OBJECTS_LOCAL; 118277: c7 01 00 00 00 00 movl $0x0,(%ecx) return the_object; 11827d: eb 08 jmp 118287 <_Objects_Get_no_protection+0x37> <== ALWAYS TAKEN /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 11827f: c7 01 01 00 00 00 movl $0x1,(%ecx) 118285: 31 c0 xor %eax,%eax return NULL; } 118287: 5b pop %ebx 118288: c9 leave 118289: c3 ret 0010e998 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10e998: 55 push %ebp 10e999: 89 e5 mov %esp,%ebp 10e99b: 83 ec 18 sub $0x18,%esp /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10e99e: 8b 45 08 mov 0x8(%ebp),%eax 10e9a1: 85 c0 test %eax,%eax 10e9a3: 75 08 jne 10e9ad <_Objects_Id_to_name+0x15> 10e9a5: a1 0c eb 12 00 mov 0x12eb0c,%eax 10e9aa: 8b 40 08 mov 0x8(%eax),%eax */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 10e9ad: 89 c2 mov %eax,%edx 10e9af: c1 ea 18 shr $0x18,%edx 10e9b2: 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 ) 10e9b5: 8d 4a ff lea -0x1(%edx),%ecx 10e9b8: 83 f9 03 cmp $0x3,%ecx 10e9bb: 77 32 ja 10e9ef <_Objects_Id_to_name+0x57> 10e9bd: eb 37 jmp 10e9f6 <_Objects_Id_to_name+0x5e> <== ALWAYS TAKEN if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10e9bf: 89 c1 mov %eax,%ecx 10e9c1: c1 e9 1b shr $0x1b,%ecx 10e9c4: 8b 14 8a mov (%edx,%ecx,4),%edx if ( !information ) 10e9c7: 85 d2 test %edx,%edx 10e9c9: 74 24 je 10e9ef <_Objects_Id_to_name+0x57> <== ALWAYS 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 ); 10e9cb: 51 push %ecx 10e9cc: 8d 4d f4 lea -0xc(%ebp),%ecx 10e9cf: 51 push %ecx 10e9d0: 50 push %eax 10e9d1: 52 push %edx 10e9d2: e8 69 ff ff ff call 10e940 <_Objects_Get> <== ALWAYS TAKEN if ( !the_object ) 10e9d7: 83 c4 10 add $0x10,%esp 10e9da: 85 c0 test %eax,%eax 10e9dc: 74 11 je 10e9ef <_Objects_Id_to_name+0x57> return OBJECTS_INVALID_ID; *name = the_object->name; 10e9de: 8b 50 0c mov 0xc(%eax),%edx 10e9e1: 8b 45 0c mov 0xc(%ebp),%eax 10e9e4: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10e9e6: e8 86 07 00 00 call 10f171 <_Thread_Enable_dispatch> <== ALWAYS TAKEN 10e9eb: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10e9ed: eb 05 jmp 10e9f4 <_Objects_Id_to_name+0x5c> <== ALWAYS TAKEN 10e9ef: b8 03 00 00 00 mov $0x3,%eax } 10e9f4: c9 leave 10e9f5: 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 ] ) 10e9f6: 8b 14 95 24 ea 12 00 mov 0x12ea24(,%edx,4),%edx 10e9fd: 85 d2 test %edx,%edx 10e9ff: 75 be jne 10e9bf <_Objects_Id_to_name+0x27> 10ea01: eb ec jmp 10e9ef <_Objects_Id_to_name+0x57> <== ALWAYS TAKEN 0010b3a8 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10b3a8: 55 push %ebp 10b3a9: 89 e5 mov %esp,%ebp 10b3ab: 57 push %edi 10b3ac: 56 push %esi 10b3ad: 53 push %ebx 10b3ae: 83 ec 1c sub $0x1c,%esp 10b3b1: 8b 45 08 mov 0x8(%ebp),%eax 10b3b4: 8b 55 0c mov 0xc(%ebp),%edx 10b3b7: 8b 75 10 mov 0x10(%ebp),%esi 10b3ba: 8b 5d 14 mov 0x14(%ebp),%ebx 10b3bd: 8b 4d 20 mov 0x20(%ebp),%ecx 10b3c0: 89 4d e4 mov %ecx,-0x1c(%ebp) 10b3c3: 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; 10b3c7: 89 10 mov %edx,(%eax) information->the_class = the_class; 10b3c9: 66 89 70 04 mov %si,0x4(%eax) information->size = size; 10b3cd: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10b3d0: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10b3d7: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10b3de: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10b3e5: 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; 10b3eb: 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; 10b3f1: 8b 3c 95 48 38 12 00 mov 0x123848(,%edx,4),%edi 10b3f8: 89 04 b7 mov %eax,(%edi,%esi,4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 10b3fb: 89 df mov %ebx,%edi 10b3fd: 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 = 10b400: 89 f9 mov %edi,%ecx 10b402: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10b405: 89 d9 mov %ebx,%ecx 10b407: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10b40d: 85 ff test %edi,%edi 10b40f: 74 10 je 10b421 <_Objects_Initialize_information+0x79> 10b411: 85 c9 test %ecx,%ecx 10b413: 75 0c jne 10b421 <_Objects_Initialize_information+0x79> _Internal_error_Occurred( 10b415: 50 push %eax 10b416: 6a 14 push $0x14 10b418: 6a 01 push $0x1 10b41a: 6a 00 push $0x0 10b41c: e8 83 fa ff ff call 10aea4 <_Internal_error_Occurred> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10b421: 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; 10b425: c7 40 1c 10 35 12 00 movl $0x123510,0x1c(%eax) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 10b42c: c1 e2 18 shl $0x18,%edx 10b42f: 81 ca 00 00 01 00 or $0x10000,%edx 10b435: c1 e6 1b shl $0x1b,%esi 10b438: 09 f2 or %esi,%edx 10b43a: 85 c9 test %ecx,%ecx 10b43c: 0f 95 c3 setne %bl 10b43f: 89 de mov %ebx,%esi 10b441: 81 e6 ff 00 00 00 and $0xff,%esi 10b447: 09 f2 or %esi,%edx 10b449: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10b44c: 8b 55 e4 mov -0x1c(%ebp),%edx 10b44f: f6 c2 03 test $0x3,%dl 10b452: 74 06 je 10b45a <_Objects_Initialize_information+0xb2> <== NEVER TAKEN name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 10b454: 83 c2 04 add $0x4,%edx <== NOT EXECUTED 10b457: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10b45a: 66 89 50 38 mov %dx,0x38(%eax) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10b45e: 8d 50 24 lea 0x24(%eax),%edx 10b461: 89 50 20 mov %edx,0x20(%eax) the_chain->permanent_null = NULL; 10b464: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) the_chain->last = _Chain_Head(the_chain); 10b46b: 8d 50 20 lea 0x20(%eax),%edx 10b46e: 89 50 28 mov %edx,0x28(%eax) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10b471: 85 c9 test %ecx,%ecx 10b473: 74 0f je 10b484 <_Objects_Initialize_information+0xdc> /* * 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 ); 10b475: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10b478: 8d 65 f4 lea -0xc(%ebp),%esp 10b47b: 5b pop %ebx 10b47c: 5e pop %esi 10b47d: 5f pop %edi 10b47e: 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 ); 10b47f: e9 4c fb ff ff jmp 10afd0 <_Objects_Extend_information> <== ALWAYS TAKEN _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10b484: 8d 65 f4 lea -0xc(%ebp),%esp 10b487: 5b pop %ebx 10b488: 5e pop %esi 10b489: 5f pop %edi 10b48a: c9 leave 10b48b: c3 ret 0010b49c <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10b49c: 55 push %ebp 10b49d: 89 e5 mov %esp,%ebp 10b49f: 57 push %edi 10b4a0: 56 push %esi 10b4a1: 53 push %ebx 10b4a2: 8b 4d 08 mov 0x8(%ebp),%ecx 10b4a5: 8b 5d 0c mov 0xc(%ebp),%ebx 10b4a8: 8b 55 10 mov 0x10(%ebp),%edx 10b4ab: 8b 75 14 mov 0x14(%ebp),%esi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10b4ae: b8 02 00 00 00 mov $0x2,%eax 10b4b3: 85 f6 test %esi,%esi 10b4b5: 74 49 je 10b500 <_Objects_Name_to_id_u32+0x64> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10b4b7: 85 db test %ebx,%ebx 10b4b9: 74 40 je 10b4fb <_Objects_Name_to_id_u32+0x5f> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10b4bb: 8b 79 10 mov 0x10(%ecx),%edi 10b4be: 66 85 ff test %di,%di 10b4c1: 74 38 je 10b4fb <_Objects_Name_to_id_u32+0x5f> 10b4c3: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10b4c9: 74 24 je 10b4ef <_Objects_Name_to_id_u32+0x53> 10b4cb: 85 d2 test %edx,%edx 10b4cd: 74 20 je 10b4ef <_Objects_Name_to_id_u32+0x53> 10b4cf: 4a dec %edx 10b4d0: 75 29 jne 10b4fb <_Objects_Name_to_id_u32+0x5f> 10b4d2: eb 1b jmp 10b4ef <_Objects_Name_to_id_u32+0x53> <== ALWAYS TAKEN if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; 10b4d4: 8b 51 1c mov 0x1c(%ecx),%edx 10b4d7: 8b 14 82 mov (%edx,%eax,4),%edx if ( !the_object ) 10b4da: 85 d2 test %edx,%edx 10b4dc: 74 0e je 10b4ec <_Objects_Name_to_id_u32+0x50> continue; if ( name == the_object->name.name_u32 ) { 10b4de: 3b 5a 0c cmp 0xc(%edx),%ebx 10b4e1: 75 09 jne 10b4ec <_Objects_Name_to_id_u32+0x50> *id = the_object->id; 10b4e3: 8b 42 08 mov 0x8(%edx),%eax 10b4e6: 89 06 mov %eax,(%esi) 10b4e8: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10b4ea: eb 14 jmp 10b500 <_Objects_Name_to_id_u32+0x64> <== ALWAYS TAKEN search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10b4ec: 40 inc %eax 10b4ed: eb 08 jmp 10b4f7 <_Objects_Name_to_id_u32+0x5b> <== ALWAYS TAKEN 10b4ef: b8 01 00 00 00 mov $0x1,%eax 10b4f4: 0f b7 ff movzwl %di,%edi 10b4f7: 39 f8 cmp %edi,%eax 10b4f9: 76 d9 jbe 10b4d4 <_Objects_Name_to_id_u32+0x38> 10b4fb: b8 01 00 00 00 mov $0x1,%eax name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 10b500: 5b pop %ebx 10b501: 5e pop %esi 10b502: 5f pop %edi 10b503: c9 leave 10b504: c3 ret 0010d170 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10d170: 55 push %ebp 10d171: 89 e5 mov %esp,%ebp 10d173: 57 push %edi 10d174: 56 push %esi 10d175: 53 push %ebx 10d176: 83 ec 14 sub $0x14,%esp 10d179: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10d17c: 8b 45 08 mov 0x8(%ebp),%eax 10d17f: 0f b7 40 38 movzwl 0x38(%eax),%eax 10d183: 50 push %eax 10d184: 53 push %ebx 10d185: e8 ba 5d 00 00 call 112f44 d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10d18a: 0f b6 3b movzbl (%ebx),%edi 10d18d: 83 c4 10 add $0x10,%esp 10d190: 83 f8 01 cmp $0x1,%eax 10d193: 76 3c jbe 10d1d1 <_Objects_Set_name+0x61> 10d195: 0f be 4b 01 movsbl 0x1(%ebx),%ecx 10d199: c1 e1 10 shl $0x10,%ecx 10d19c: 83 f8 02 cmp $0x2,%eax 10d19f: 76 35 jbe 10d1d6 <_Objects_Set_name+0x66> 10d1a1: 0f be 53 02 movsbl 0x2(%ebx),%edx 10d1a5: c1 e2 08 shl $0x8,%edx 10d1a8: be 20 00 00 00 mov $0x20,%esi 10d1ad: 83 f8 03 cmp $0x3,%eax 10d1b0: 76 04 jbe 10d1b6 <_Objects_Set_name+0x46> 10d1b2: 0f be 73 03 movsbl 0x3(%ebx),%esi 10d1b6: 89 f8 mov %edi,%eax 10d1b8: c1 e0 18 shl $0x18,%eax 10d1bb: 09 c8 or %ecx,%eax 10d1bd: 09 d0 or %edx,%eax 10d1bf: 09 f0 or %esi,%eax 10d1c1: 8b 55 0c mov 0xc(%ebp),%edx 10d1c4: 89 42 0c mov %eax,0xc(%edx) ); } return true; } 10d1c7: b0 01 mov $0x1,%al 10d1c9: 8d 65 f4 lea -0xc(%ebp),%esp 10d1cc: 5b pop %ebx 10d1cd: 5e pop %esi 10d1ce: 5f pop %edi 10d1cf: c9 leave 10d1d0: c3 ret d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10d1d1: b9 00 00 20 00 mov $0x200000,%ecx 10d1d6: ba 00 20 00 00 mov $0x2000,%edx 10d1db: be 20 00 00 00 mov $0x20,%esi 10d1e0: eb d4 jmp 10d1b6 <_Objects_Set_name+0x46> <== ALWAYS TAKEN 0010b508 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10b508: 55 push %ebp 10b509: 89 e5 mov %esp,%ebp 10b50b: 57 push %edi 10b50c: 56 push %esi 10b50d: 53 push %ebx 10b50e: 83 ec 1c sub $0x1c,%esp 10b511: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 10b514: 0f b7 73 08 movzwl 0x8(%ebx),%esi block_count = (information->maximum - index_base) / 10b518: 0f b7 4b 14 movzwl 0x14(%ebx),%ecx 10b51c: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10b520: 29 f0 sub %esi,%eax 10b522: 31 d2 xor %edx,%edx 10b524: f7 f1 div %ecx 10b526: 89 45 e4 mov %eax,-0x1c(%ebp) 10b529: 31 c0 xor %eax,%eax information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10b52b: eb 77 jmp 10b5a4 <_Objects_Shrink_information+0x9c> <== ALWAYS TAKEN 10b52d: 8d 3c 85 00 00 00 00 lea 0x0(,%eax,4),%edi if ( information->inactive_per_block[ block ] == 10b534: 8b 53 30 mov 0x30(%ebx),%edx 10b537: 39 0c 82 cmp %ecx,(%edx,%eax,4) 10b53a: 75 65 jne 10b5a1 <_Objects_Shrink_information+0x99> information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 10b53c: 8b 43 20 mov 0x20(%ebx),%eax do { index = _Objects_Get_index( the_object->id ); 10b53f: 0f b7 50 08 movzwl 0x8(%eax),%edx 10b543: 89 55 e4 mov %edx,-0x1c(%ebp) /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 10b546: 8b 10 mov (%eax),%edx if ((index >= index_base) && 10b548: 39 75 e4 cmp %esi,-0x1c(%ebp) 10b54b: 72 1e jb 10b56b <_Objects_Shrink_information+0x63> (index < (index_base + information->allocation_size))) { 10b54d: 0f b7 4b 14 movzwl 0x14(%ebx),%ecx 10b551: 8d 0c 0e lea (%esi,%ecx,1),%ecx 10b554: 39 4d e4 cmp %ecx,-0x1c(%ebp) 10b557: 73 12 jae 10b56b <_Objects_Shrink_information+0x63> _Chain_Extract( &extract_me->Node ); 10b559: 83 ec 0c sub $0xc,%esp 10b55c: 50 push %eax 10b55d: 89 55 e0 mov %edx,-0x20(%ebp) 10b560: e8 53 2d 00 00 call 10e2b8 <_Chain_Extract> 10b565: 83 c4 10 add $0x10,%esp 10b568: 8b 55 e0 mov -0x20(%ebp),%edx } } while ( the_object ); 10b56b: 85 d2 test %edx,%edx 10b56d: 74 04 je 10b573 <_Objects_Shrink_information+0x6b> 10b56f: 89 d0 mov %edx,%eax 10b571: eb cc jmp 10b53f <_Objects_Shrink_information+0x37> <== ALWAYS TAKEN /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10b573: 83 ec 0c sub $0xc,%esp 10b576: 8b 43 34 mov 0x34(%ebx),%eax 10b579: ff 34 38 pushl (%eax,%edi,1) 10b57c: e8 24 15 00 00 call 10caa5 <_Workspace_Free> information->object_blocks[ block ] = NULL; 10b581: 8b 43 34 mov 0x34(%ebx),%eax 10b584: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) information->inactive_per_block[ block ] = 0; 10b58b: 8b 43 30 mov 0x30(%ebx),%eax 10b58e: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) information->inactive -= information->allocation_size; 10b595: 8b 43 14 mov 0x14(%ebx),%eax 10b598: 66 29 43 2c sub %ax,0x2c(%ebx) return; 10b59c: 83 c4 10 add $0x10,%esp 10b59f: eb 08 jmp 10b5a9 <_Objects_Shrink_information+0xa1> <== ALWAYS TAKEN } index_base += information->allocation_size; 10b5a1: 01 ce add %ecx,%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++ ) { 10b5a3: 40 inc %eax 10b5a4: 3b 45 e4 cmp -0x1c(%ebp),%eax 10b5a7: 72 84 jb 10b52d <_Objects_Shrink_information+0x25> return; } index_base += information->allocation_size; } } 10b5a9: 8d 65 f4 lea -0xc(%ebp),%esp 10b5ac: 5b pop %ebx 10b5ad: 5e pop %esi 10b5ae: 5f pop %edi 10b5af: c9 leave 10b5b0: c3 ret 0010b5b4 <_Protected_heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t size, uintptr_t alignment, uintptr_t boundary ) { 10b5b4: 55 push %ebp 10b5b5: 89 e5 mov %esp,%ebp 10b5b7: 83 ec 24 sub $0x24,%esp void *p; _RTEMS_Lock_allocator(); 10b5ba: ff 35 28 39 12 00 pushl 0x123928 10b5c0: e8 03 f1 ff ff call 10a6c8 <_API_Mutex_Lock> <== ALWAYS TAKEN p = _Heap_Allocate_aligned_with_boundary( 10b5c5: ff 75 14 pushl 0x14(%ebp) 10b5c8: ff 75 10 pushl 0x10(%ebp) 10b5cb: ff 75 0c pushl 0xc(%ebp) 10b5ce: ff 75 08 pushl 0x8(%ebp) 10b5d1: e8 0e 2f 00 00 call 10e4e4 <_Heap_Allocate_aligned_with_boundary> <== ALWAYS TAKEN heap, size, alignment, boundary ); _RTEMS_Unlock_allocator(); 10b5d6: 83 c4 14 add $0x14,%esp 10b5d9: ff 35 28 39 12 00 pushl 0x123928 10b5df: 89 45 f4 mov %eax,-0xc(%ebp) 10b5e2: e8 29 f1 ff ff call 10a710 <_API_Mutex_Unlock> <== ALWAYS TAKEN return p; } 10b5e7: 8b 45 f4 mov -0xc(%ebp),%eax 10b5ea: c9 leave 10b5eb: c3 ret 0010b5ec <_Protected_heap_Free>: bool _Protected_heap_Free( Heap_Control *the_heap, void *start_address ) { 10b5ec: 55 push %ebp 10b5ed: 89 e5 mov %esp,%ebp 10b5ef: 83 ec 24 sub $0x24,%esp bool status; _RTEMS_Lock_allocator(); 10b5f2: ff 35 28 39 12 00 pushl 0x123928 10b5f8: e8 cb f0 ff ff call 10a6c8 <_API_Mutex_Lock> <== ALWAYS TAKEN status = _Heap_Free( the_heap, start_address ); 10b5fd: 59 pop %ecx 10b5fe: 58 pop %eax 10b5ff: ff 75 0c pushl 0xc(%ebp) 10b602: ff 75 08 pushl 0x8(%ebp) 10b605: e8 3a 30 00 00 call 10e644 <_Heap_Free> <== ALWAYS TAKEN _RTEMS_Unlock_allocator(); 10b60a: 5a pop %edx 10b60b: ff 35 28 39 12 00 pushl 0x123928 10b611: 88 45 f4 mov %al,-0xc(%ebp) 10b614: e8 f7 f0 ff ff call 10a710 <_API_Mutex_Unlock> <== ALWAYS TAKEN return status; } 10b619: 8a 45 f4 mov -0xc(%ebp),%al 10b61c: c9 leave 10b61d: c3 ret 00127fc0 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 127fc0: 55 push %ebp 127fc1: 89 e5 mov %esp,%ebp 127fc3: 56 push %esi 127fc4: 53 push %ebx 127fc5: 8b 5d 08 mov 0x8(%ebp),%ebx 127fc8: 8b 75 0c mov 0xc(%ebp),%esi if ( !the_heap ) 127fcb: 85 db test %ebx,%ebx 127fcd: 74 2e je 127ffd <_Protected_heap_Get_information+0x3d> return false; if ( !the_info ) 127fcf: 85 f6 test %esi,%esi 127fd1: 74 2a je 127ffd <_Protected_heap_Get_information+0x3d> return false; _RTEMS_Lock_allocator(); 127fd3: 83 ec 0c sub $0xc,%esp 127fd6: ff 35 00 36 16 00 pushl 0x163600 127fdc: e8 5b 7c fe ff call 10fc3c <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 127fe1: 5a pop %edx 127fe2: 59 pop %ecx 127fe3: 56 push %esi 127fe4: 53 push %ebx 127fe5: e8 1a c4 00 00 call 134404 <_Heap_Get_information> _RTEMS_Unlock_allocator(); 127fea: 58 pop %eax 127feb: ff 35 00 36 16 00 pushl 0x163600 127ff1: e8 8e 7c fe ff call 10fc84 <_API_Mutex_Unlock> 127ff6: b0 01 mov $0x1,%al return true; 127ff8: 83 c4 10 add $0x10,%esp 127ffb: eb 02 jmp 127fff <_Protected_heap_Get_information+0x3f> <== ALWAYS TAKEN 127ffd: 31 c0 xor %eax,%eax } 127fff: 8d 65 f8 lea -0x8(%ebp),%esp 128002: 5b pop %ebx 128003: 5e pop %esi 128004: c9 leave 128005: c3 ret 0010e208 <_RTEMS_Tasks_Invoke_task_variable_dtor>: void _RTEMS_Tasks_Invoke_task_variable_dtor( Thread_Control *the_thread, rtems_task_variable_t *tvp ) { 10e208: 55 push %ebp 10e209: 89 e5 mov %esp,%ebp 10e20b: 56 push %esi 10e20c: 53 push %ebx 10e20d: 8b 5d 0c mov 0xc(%ebp),%ebx void (*dtor)(void *); void *value; dtor = tvp->dtor; 10e210: 8b 43 10 mov 0x10(%ebx),%eax if (_Thread_Is_executing(the_thread)) { 10e213: 8b 55 08 mov 0x8(%ebp),%edx 10e216: 3b 15 30 39 12 00 cmp 0x123930,%edx 10e21c: 75 0c jne 10e22a <_RTEMS_Tasks_Invoke_task_variable_dtor+0x22> value = *tvp->ptr; 10e21e: 8b 4b 04 mov 0x4(%ebx),%ecx 10e221: 8b 11 mov (%ecx),%edx *tvp->ptr = tvp->gval; 10e223: 8b 73 08 mov 0x8(%ebx),%esi 10e226: 89 31 mov %esi,(%ecx) 10e228: eb 03 jmp 10e22d <_RTEMS_Tasks_Invoke_task_variable_dtor+0x25> <== ALWAYS TAKEN } else { value = tvp->tval; 10e22a: 8b 53 0c mov 0xc(%ebx),%edx } if ( dtor ) 10e22d: 85 c0 test %eax,%eax 10e22f: 74 09 je 10e23a <_RTEMS_Tasks_Invoke_task_variable_dtor+0x32> (*dtor)(value); 10e231: 83 ec 0c sub $0xc,%esp 10e234: 52 push %edx 10e235: ff d0 call *%eax 10e237: 83 c4 10 add $0x10,%esp _Workspace_Free(tvp); 10e23a: 89 5d 08 mov %ebx,0x8(%ebp) } 10e23d: 8d 65 f8 lea -0x8(%ebp),%esp 10e240: 5b pop %ebx 10e241: 5e pop %esi 10e242: c9 leave } if ( dtor ) (*dtor)(value); _Workspace_Free(tvp); 10e243: e9 5d e8 ff ff jmp 10caa5 <_Workspace_Free> 0010e0dd <_RTEMS_tasks_Delete_extension>: void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { 10e0dd: 55 push %ebp 10e0de: 89 e5 mov %esp,%ebp 10e0e0: 56 push %esi 10e0e1: 53 push %ebx 10e0e2: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Free per task variable memory */ tvp = deleted->task_variables; 10e0e5: 8b 83 00 01 00 00 mov 0x100(%ebx),%eax deleted->task_variables = NULL; 10e0eb: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx) 10e0f2: 00 00 00 while (tvp) { 10e0f5: eb 10 jmp 10e107 <_RTEMS_tasks_Delete_extension+0x2a> <== ALWAYS TAKEN next = (rtems_task_variable_t *)tvp->next; 10e0f7: 8b 30 mov (%eax),%esi _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 10e0f9: 52 push %edx 10e0fa: 52 push %edx 10e0fb: 50 push %eax 10e0fc: 53 push %ebx 10e0fd: e8 06 01 00 00 call 10e208 <_RTEMS_Tasks_Invoke_task_variable_dtor> 10e102: 89 f0 mov %esi,%eax 10e104: 83 c4 10 add $0x10,%esp * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 10e107: 85 c0 test %eax,%eax 10e109: 75 ec jne 10e0f7 <_RTEMS_tasks_Delete_extension+0x1a> /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); 10e10b: 83 ec 0c sub $0xc,%esp 10e10e: ff b3 f0 00 00 00 pushl 0xf0(%ebx) 10e114: e8 8c e9 ff ff call 10caa5 <_Workspace_Free> deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; 10e119: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10e120: 00 00 00 10e123: 83 c4 10 add $0x10,%esp } 10e126: 8d 65 f8 lea -0x8(%ebp),%esp 10e129: 5b pop %ebx 10e12a: 5e pop %esi 10e12b: c9 leave 10e12c: c3 ret 0010a2a0 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 10a2a0: 55 push %ebp 10a2a1: 89 e5 mov %esp,%ebp 10a2a3: 57 push %edi 10a2a4: 56 push %esi 10a2a5: 53 push %ebx 10a2a6: 83 ec 2c sub $0x2c,%esp rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; 10a2a9: 8b 1d 0c f9 11 00 mov 0x11f90c,%ebx maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 10a2af: a1 08 f9 11 00 mov 0x11f908,%eax 10a2b4: 89 45 d4 mov %eax,-0x2c(%ebp) /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 10a2b7: 85 db test %ebx,%ebx 10a2b9: 74 4e je 10a309 <_RTEMS_tasks_Initialize_user_tasks_body+0x69> 10a2bb: 31 f6 xor %esi,%esi /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 10a2bd: 8d 7d e4 lea -0x1c(%ebp),%edi 10a2c0: eb 42 jmp 10a304 <_RTEMS_tasks_Initialize_user_tasks_body+0x64> <== ALWAYS TAKEN 10a2c2: 50 push %eax 10a2c3: 50 push %eax 10a2c4: 57 push %edi 10a2c5: ff 73 0c pushl 0xc(%ebx) 10a2c8: ff 73 14 pushl 0x14(%ebx) 10a2cb: ff 73 04 pushl 0x4(%ebx) 10a2ce: ff 73 08 pushl 0x8(%ebx) 10a2d1: ff 33 pushl (%ebx) 10a2d3: e8 d0 fd ff ff call 10a0a8 <== ALWAYS TAKEN user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 10a2d8: 83 c4 20 add $0x20,%esp 10a2db: 85 c0 test %eax,%eax 10a2dd: 75 19 jne 10a2f8 <_RTEMS_tasks_Initialize_user_tasks_body+0x58> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 10a2df: 51 push %ecx 10a2e0: ff 73 18 pushl 0x18(%ebx) 10a2e3: ff 73 10 pushl 0x10(%ebx) 10a2e6: ff 75 e4 pushl -0x1c(%ebp) 10a2e9: e8 26 00 00 00 call 10a314 <== ALWAYS TAKEN 10a2ee: 83 c3 1c add $0x1c,%ebx id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 10a2f1: 83 c4 10 add $0x10,%esp 10a2f4: 85 c0 test %eax,%eax 10a2f6: 74 0b je 10a303 <_RTEMS_tasks_Initialize_user_tasks_body+0x63> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); 10a2f8: 52 push %edx 10a2f9: 50 push %eax 10a2fa: 6a 01 push $0x1 10a2fc: 6a 01 push $0x1 10a2fe: e8 a1 0b 00 00 call 10aea4 <_Internal_error_Occurred> <== ALWAYS TAKEN return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10a303: 46 inc %esi 10a304: 3b 75 d4 cmp -0x2c(%ebp),%esi 10a307: 72 b9 jb 10a2c2 <_RTEMS_tasks_Initialize_user_tasks_body+0x22> user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } 10a309: 8d 65 f4 lea -0xc(%ebp),%esp 10a30c: 5b pop %ebx 10a30d: 5e pop %esi 10a30e: 5f pop %edi 10a30f: c9 leave 10a310: c3 ret 0010e039 <_RTEMS_tasks_Manager_initialization>: * * Output parameters: NONE */ void _RTEMS_tasks_Manager_initialization(void) { 10e039: 55 push %ebp 10e03a: 89 e5 mov %esp,%ebp 10e03c: 83 ec 0c sub $0xc,%esp _Objects_Initialize_information( 10e03f: 6a 04 push $0x4 10e041: 6a 00 push $0x0 10e043: 68 04 01 00 00 push $0x104 10e048: ff 35 e0 f8 11 00 pushl 0x11f8e0 10e04e: 6a 01 push $0x1 10e050: 6a 02 push $0x2 10e052: 68 fc 37 12 00 push $0x1237fc 10e057: e8 4c d3 ff ff call 10b3a8 <_Objects_Initialize_information> RTEMS_INLINE_ROUTINE void _User_extensions_Add_API_set( User_extensions_Control *extension ) { _User_extensions_Add_set( extension ); 10e05c: 83 c4 14 add $0x14,%esp 10e05f: 68 94 16 12 00 push $0x121694 10e064: e8 93 0b 00 00 call 10ebfc <_User_extensions_Add_set> <== ALWAYS TAKEN * Add all the extensions for this API */ _User_extensions_Add_API_set( &_RTEMS_tasks_User_extensions ); _API_extensions_Add( &_RTEMS_tasks_API_extensions ); 10e069: c7 04 24 84 16 12 00 movl $0x121684,(%esp) 10e070: e8 e3 c5 ff ff call 10a658 <_API_extensions_Add> 10e075: 83 c4 10 add $0x10,%esp MP_PACKET_TASKS, _RTEMS_tasks_MP_Process_packet ); #endif } 10e078: c9 leave 10e079: c3 ret 0010e07a <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 10e07a: 55 push %ebp 10e07b: 89 e5 mov %esp,%ebp 10e07d: 57 push %edi 10e07e: 56 push %esi 10e07f: 53 push %ebx 10e080: 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 ]; 10e083: 8b 45 08 mov 0x8(%ebp),%eax 10e086: 8b 98 f0 00 00 00 mov 0xf0(%eax),%ebx if ( !api ) 10e08c: 85 db test %ebx,%ebx 10e08e: 74 45 je 10e0d5 <_RTEMS_tasks_Post_switch_extension+0x5b> <== ALWAYS TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 10e090: 9c pushf 10e091: fa cli 10e092: 58 pop %eax signal_set = asr->signals_posted; 10e093: 8b 7b 14 mov 0x14(%ebx),%edi asr->signals_posted = 0; 10e096: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 10e09d: 50 push %eax 10e09e: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 10e09f: 85 ff test %edi,%edi 10e0a1: 74 32 je 10e0d5 <_RTEMS_tasks_Post_switch_extension+0x5b> <== ALWAYS TAKEN return; asr->nest_level += 1; 10e0a3: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10e0a6: 50 push %eax 10e0a7: 8d 75 e4 lea -0x1c(%ebp),%esi 10e0aa: 56 push %esi 10e0ab: 68 ff ff 00 00 push $0xffff 10e0b0: ff 73 10 pushl 0x10(%ebx) 10e0b3: e8 4c 19 00 00 call 10fa04 (*asr->handler)( signal_set ); 10e0b8: 89 3c 24 mov %edi,(%esp) 10e0bb: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 10e0be: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10e0c1: 83 c4 0c add $0xc,%esp 10e0c4: 56 push %esi 10e0c5: 68 ff ff 00 00 push $0xffff 10e0ca: ff 75 e4 pushl -0x1c(%ebp) 10e0cd: e8 32 19 00 00 call 10fa04 10e0d2: 83 c4 10 add $0x10,%esp } 10e0d5: 8d 65 f4 lea -0xc(%ebp),%esp 10e0d8: 5b pop %ebx 10e0d9: 5e pop %esi 10e0da: 5f pop %edi 10e0db: c9 leave 10e0dc: c3 ret 0010dfe4 <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 10dfe4: 55 push %ebp 10dfe5: 89 e5 mov %esp,%ebp /* * Per Task Variables */ tvp = executing->task_variables; 10dfe7: 8b 45 08 mov 0x8(%ebp),%eax 10dfea: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 10dff0: eb 0f jmp 10e001 <_RTEMS_tasks_Switch_extension+0x1d> <== ALWAYS TAKEN tvp->tval = *tvp->ptr; 10dff2: 8b 50 04 mov 0x4(%eax),%edx 10dff5: 8b 0a mov (%edx),%ecx 10dff7: 89 48 0c mov %ecx,0xc(%eax) *tvp->ptr = tvp->gval; 10dffa: 8b 48 08 mov 0x8(%eax),%ecx 10dffd: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 10dfff: 8b 00 mov (%eax),%eax /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 10e001: 85 c0 test %eax,%eax 10e003: 75 ed jne 10dff2 <_RTEMS_tasks_Switch_extension+0xe> tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 10e005: 8b 45 0c mov 0xc(%ebp),%eax 10e008: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 10e00e: eb 0f jmp 10e01f <_RTEMS_tasks_Switch_extension+0x3b> <== ALWAYS TAKEN tvp->gval = *tvp->ptr; 10e010: 8b 50 04 mov 0x4(%eax),%edx 10e013: 8b 0a mov (%edx),%ecx 10e015: 89 48 08 mov %ecx,0x8(%eax) *tvp->ptr = tvp->tval; 10e018: 8b 48 0c mov 0xc(%eax),%ecx 10e01b: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 10e01d: 8b 00 mov (%eax),%eax *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 10e01f: 85 c0 test %eax,%eax 10e021: 75 ed jne 10e010 <_RTEMS_tasks_Switch_extension+0x2c> tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 10e023: c9 leave 10e024: c3 ret 00134274 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 134274: 55 push %ebp 134275: 89 e5 mov %esp,%ebp 134277: 53 push %ebx 134278: 83 ec 18 sub $0x18,%esp 13427b: 8d 45 f4 lea -0xc(%ebp),%eax 13427e: 50 push %eax 13427f: ff 75 08 pushl 0x8(%ebp) 134282: 68 24 3a 16 00 push $0x163a24 134287: e8 b8 c9 fd ff call 110c44 <_Objects_Get> 13428c: 89 c3 mov %eax,%ebx /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 13428e: 83 c4 10 add $0x10,%esp 134291: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 134295: 75 64 jne 1342fb <_Rate_monotonic_Timeout+0x87> <== ALWAYS TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 134297: 8b 40 40 mov 0x40(%eax),%eax if ( _States_Is_waiting_for_period( the_thread->current_state ) && 13429a: f6 40 11 40 testb $0x40,0x11(%eax) 13429e: 74 18 je 1342b8 <_Rate_monotonic_Timeout+0x44> the_thread->Wait.id == the_period->Object.id ) { 1342a0: 8b 50 20 mov 0x20(%eax),%edx 1342a3: 3b 53 08 cmp 0x8(%ebx),%edx 1342a6: 75 10 jne 1342b8 <_Rate_monotonic_Timeout+0x44> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 1342a8: 52 push %edx 1342a9: 52 push %edx 1342aa: 68 f8 ff 03 10 push $0x1003fff8 1342af: 50 push %eax 1342b0: e8 87 ce fd ff call 11113c <_Thread_Clear_state> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 1342b5: 59 pop %ecx 1342b6: eb 10 jmp 1342c8 <_Rate_monotonic_Timeout+0x54> <== ALWAYS TAKEN _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 1342b8: 83 7b 38 01 cmpl $0x1,0x38(%ebx) 1342bc: 75 2b jne 1342e9 <_Rate_monotonic_Timeout+0x75> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 1342be: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) _Rate_monotonic_Initiate_statistics( the_period ); 1342c5: 83 ec 0c sub $0xc,%esp 1342c8: 53 push %ebx 1342c9: e8 52 fc ff ff call 133f20 <_Rate_monotonic_Initiate_statistics> <== ALWAYS TAKEN Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1342ce: 8b 43 3c mov 0x3c(%ebx),%eax 1342d1: 89 43 1c mov %eax,0x1c(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 1342d4: 58 pop %eax 1342d5: 5a pop %edx 1342d6: 83 c3 10 add $0x10,%ebx 1342d9: 53 push %ebx 1342da: 68 28 36 16 00 push $0x163628 1342df: e8 38 df fd ff call 11221c <_Watchdog_Insert> 1342e4: 83 c4 10 add $0x10,%esp 1342e7: eb 07 jmp 1342f0 <_Rate_monotonic_Timeout+0x7c> <== ALWAYS TAKEN _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 1342e9: c7 43 38 04 00 00 00 movl $0x4,0x38(%ebx) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 1342f0: a1 4c 35 16 00 mov 0x16354c,%eax 1342f5: 48 dec %eax 1342f6: a3 4c 35 16 00 mov %eax,0x16354c case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 1342fb: 8b 5d fc mov -0x4(%ebp),%ebx 1342fe: c9 leave 1342ff: c3 ret 0013401a <_Rate_monotonic_Update_statistics>: } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 13401a: 55 push %ebp 13401b: 89 e5 mov %esp,%ebp 13401d: 56 push %esi 13401e: 53 push %ebx 13401f: 83 ec 10 sub $0x10,%esp 134022: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 134025: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 134028: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 13402c: 75 03 jne 134031 <_Rate_monotonic_Update_statistics+0x17> stats->missed_count++; 13402e: ff 43 58 incl 0x58(%ebx) /* * Grab status for time statistics. */ valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 134031: 52 push %edx 134032: 8d 75 f0 lea -0x10(%ebp),%esi 134035: 56 push %esi 134036: 8d 45 e8 lea -0x18(%ebp),%eax 134039: 50 push %eax 13403a: 53 push %ebx 13403b: e8 48 ff ff ff call 133f88 <_Rate_monotonic_Get_status> <== ALWAYS TAKEN if (!valid_status) 134040: 83 c4 10 add $0x10,%esp 134043: 84 c0 test %al,%al 134045: 0f 84 a3 00 00 00 je 1340ee <_Rate_monotonic_Update_statistics+0xd4> /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 13404b: 50 push %eax 13404c: 50 push %eax 13404d: 56 push %esi 13404e: 8d 43 6c lea 0x6c(%ebx),%eax 134051: 50 push %eax 134052: e8 31 df fd ff call 111f88 <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 134057: 5a pop %edx 134058: 59 pop %ecx 134059: 8d 43 5c lea 0x5c(%ebx),%eax 13405c: 50 push %eax 13405d: 56 push %esi 13405e: e8 41 05 00 00 call 1345a4 <_Timespec_Less_than> 134063: 83 c4 10 add $0x10,%esp 134066: 84 c0 test %al,%al 134068: 74 0c je 134076 <_Rate_monotonic_Update_statistics+0x5c> stats->min_cpu_time = executed; 13406a: 8b 45 f0 mov -0x10(%ebp),%eax 13406d: 8b 55 f4 mov -0xc(%ebp),%edx 134070: 89 43 5c mov %eax,0x5c(%ebx) 134073: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 134076: 50 push %eax 134077: 50 push %eax 134078: 8d 43 64 lea 0x64(%ebx),%eax 13407b: 50 push %eax 13407c: 8d 45 f0 lea -0x10(%ebp),%eax 13407f: 50 push %eax 134080: e8 fb 04 00 00 call 134580 <_Timespec_Greater_than> 134085: 83 c4 10 add $0x10,%esp 134088: 84 c0 test %al,%al 13408a: 74 0c je 134098 <_Rate_monotonic_Update_statistics+0x7e> stats->max_cpu_time = executed; 13408c: 8b 45 f0 mov -0x10(%ebp),%eax 13408f: 8b 55 f4 mov -0xc(%ebp),%edx 134092: 89 43 64 mov %eax,0x64(%ebx) 134095: 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 ); 134098: 56 push %esi 134099: 56 push %esi 13409a: 8d 75 e8 lea -0x18(%ebp),%esi 13409d: 56 push %esi 13409e: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 1340a4: 50 push %eax 1340a5: e8 de de fd ff call 111f88 <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 1340aa: 5a pop %edx 1340ab: 59 pop %ecx 1340ac: 8d 43 74 lea 0x74(%ebx),%eax 1340af: 50 push %eax 1340b0: 56 push %esi 1340b1: e8 ee 04 00 00 call 1345a4 <_Timespec_Less_than> 1340b6: 83 c4 10 add $0x10,%esp 1340b9: 84 c0 test %al,%al 1340bb: 74 0c je 1340c9 <_Rate_monotonic_Update_statistics+0xaf> stats->min_wall_time = since_last_period; 1340bd: 8b 45 e8 mov -0x18(%ebp),%eax 1340c0: 8b 55 ec mov -0x14(%ebp),%edx 1340c3: 89 43 74 mov %eax,0x74(%ebx) 1340c6: 89 53 78 mov %edx,0x78(%ebx) if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 1340c9: 50 push %eax 1340ca: 50 push %eax 1340cb: 8d 43 7c lea 0x7c(%ebx),%eax 1340ce: 50 push %eax 1340cf: 8d 45 e8 lea -0x18(%ebp),%eax 1340d2: 50 push %eax 1340d3: e8 a8 04 00 00 call 134580 <_Timespec_Greater_than> 1340d8: 83 c4 10 add $0x10,%esp 1340db: 84 c0 test %al,%al 1340dd: 74 0f je 1340ee <_Rate_monotonic_Update_statistics+0xd4> stats->max_wall_time = since_last_period; 1340df: 8b 45 e8 mov -0x18(%ebp),%eax 1340e2: 8b 55 ec mov -0x14(%ebp),%edx 1340e5: 89 43 7c mov %eax,0x7c(%ebx) 1340e8: 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 } 1340ee: 8d 65 f8 lea -0x8(%ebp),%esp 1340f1: 5b pop %ebx 1340f2: 5e pop %esi 1340f3: c9 leave 1340f4: c3 ret 0011b31c <_Region_Process_queue>: */ void _Region_Process_queue( Region_Control *the_region ) { 11b31c: 55 push %ebp 11b31d: 89 e5 mov %esp,%ebp 11b31f: 57 push %edi 11b320: 56 push %esi 11b321: 53 push %ebx 11b322: 83 ec 28 sub $0x28,%esp 11b325: 8b 75 08 mov 0x8(%ebp),%esi 11b328: a1 e8 ca 13 00 mov 0x13cae8,%eax 11b32d: 40 inc %eax 11b32e: a3 e8 ca 13 00 mov %eax,0x13cae8 * NOTE: Be sure to disable dispatching before unlocking the mutex * since we do not want to open a window where a context * switch could occur. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 11b333: ff 35 9c cb 13 00 pushl 0x13cb9c 11b339: e8 82 b9 ff ff call 116cc0 <_API_Mutex_Unlock> /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 11b33e: 8d 7e 10 lea 0x10(%esi),%edi RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uintptr_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 11b341: 8d 46 68 lea 0x68(%esi),%eax 11b344: 89 45 e4 mov %eax,-0x1c(%ebp) 11b347: 89 3c 24 mov %edi,(%esp) 11b34a: e8 41 06 00 00 call 11b990 <_Thread_queue_First> <== ALWAYS TAKEN 11b34f: 89 c3 mov %eax,%ebx if ( the_thread == NULL ) 11b351: 83 c4 10 add $0x10,%esp 11b354: 85 c0 test %eax,%eax 11b356: 74 30 je 11b388 <_Region_Process_queue+0x6c> 11b358: 6a 00 push $0x0 11b35a: 6a 00 push $0x0 11b35c: ff 70 24 pushl 0x24(%eax) 11b35f: ff 75 e4 pushl -0x1c(%ebp) 11b362: e8 f5 c1 ff ff call 11755c <_Heap_Allocate_aligned_with_boundary> the_segment = (void **) _Region_Allocate_segment( the_region, the_thread->Wait.count ); if ( the_segment == NULL ) 11b367: 83 c4 10 add $0x10,%esp 11b36a: 85 c0 test %eax,%eax 11b36c: 74 1a je 11b388 <_Region_Process_queue+0x6c> break; *(void **)the_thread->Wait.return_argument = the_segment; 11b36e: 8b 53 28 mov 0x28(%ebx),%edx 11b371: 89 02 mov %eax,(%edx) the_region->number_of_used_blocks += 1; 11b373: ff 46 64 incl 0x64(%esi) _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 11b376: 50 push %eax 11b377: 50 push %eax 11b378: 53 push %ebx 11b379: 57 push %edi 11b37a: e8 29 05 00 00 call 11b8a8 <_Thread_queue_Extract> <== ALWAYS TAKEN the_thread->Wait.return_code = RTEMS_SUCCESSFUL; 11b37f: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) 11b386: eb bf jmp 11b347 <_Region_Process_queue+0x2b> <== ALWAYS TAKEN } _Thread_Enable_dispatch(); } 11b388: 8d 65 f4 lea -0xc(%ebp),%esp 11b38b: 5b pop %ebx 11b38c: 5e pop %esi 11b38d: 5f pop %edi 11b38e: c9 leave *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); the_thread->Wait.return_code = RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 11b38f: e9 29 d7 ff ff jmp 118abd <_Thread_Enable_dispatch> 0010bf1c <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 10bf1c: 55 push %ebp 10bf1d: 89 e5 mov %esp,%ebp 10bf1f: 53 push %ebx 10bf20: 83 ec 04 sub $0x4,%esp 10bf23: 8b 5d 08 mov 0x8(%ebp),%ebx 10bf26: a1 78 e7 12 00 mov 0x12e778,%eax 10bf2b: 40 inc %eax 10bf2c: a3 78 e7 12 00 mov %eax,0x12e778 long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 10bf31: a1 08 e8 12 00 mov 0x12e808,%eax if ( time->tv_sec < seconds ) 10bf36: 8b 13 mov (%ebx),%edx 10bf38: 39 c2 cmp %eax,%edx 10bf3a: 7d 08 jge 10bf44 <_TOD_Set+0x28> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 10bf3c: 51 push %ecx 10bf3d: 29 d0 sub %edx,%eax 10bf3f: 50 push %eax 10bf40: 6a 01 push $0x1 10bf42: eb 06 jmp 10bf4a <_TOD_Set+0x2e> <== ALWAYS TAKEN 10bf44: 51 push %ecx 10bf45: 29 c2 sub %eax,%edx 10bf47: 52 push %edx 10bf48: 6a 00 push $0x0 10bf4a: 68 48 e8 12 00 push $0x12e848 10bf4f: e8 f4 20 00 00 call 10e048 <_Watchdog_Adjust> 10bf54: 83 c4 10 add $0x10,%esp _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 10bf57: 8b 03 mov (%ebx),%eax 10bf59: a3 08 e8 12 00 mov %eax,0x12e808 10bf5e: 8b 43 04 mov 0x4(%ebx),%eax 10bf61: a3 0c e8 12 00 mov %eax,0x12e80c _TOD_Is_set = true; 10bf66: c6 05 8c e7 12 00 01 movb $0x1,0x12e78c _TOD_Activate(); _Thread_Enable_dispatch(); } 10bf6d: 8b 5d fc mov -0x4(%ebp),%ebx 10bf70: c9 leave _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); 10bf71: e9 e3 10 00 00 jmp 10d059 <_Thread_Enable_dispatch> <== ALWAYS TAKEN 0010ab44 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 10ab44: 55 push %ebp 10ab45: 89 e5 mov %esp,%ebp 10ab47: 53 push %ebx 10ab48: 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() ); 10ab4b: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 10ab52: 69 05 24 f9 11 00 e8 imul $0x3e8,0x11f924,%eax 10ab59: 03 00 00 10ab5c: 89 45 f4 mov %eax,-0xc(%ebp) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 10ab5f: a1 c0 39 12 00 mov 0x1239c0,%eax 10ab64: 40 inc %eax 10ab65: a3 c0 39 12 00 mov %eax,0x1239c0 /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 10ab6a: 8d 5d f0 lea -0x10(%ebp),%ebx 10ab6d: 53 push %ebx 10ab6e: 68 f0 38 12 00 push $0x1238f0 10ab73: e8 6c 1a 00 00 call 10c5e4 <_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 ); 10ab78: 58 pop %eax 10ab79: 5a pop %edx 10ab7a: 53 push %ebx 10ab7b: 68 04 39 12 00 push $0x123904 10ab80: e8 5f 1a 00 00 call 10c5e4 <_Timespec_Add_to> 10ab85: 89 c3 mov %eax,%ebx 10ab87: eb 0e jmp 10ab97 <_TOD_Tickle_ticks+0x53> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 10ab89: 83 ec 0c sub $0xc,%esp 10ab8c: 68 44 39 12 00 push $0x123944 10ab91: e8 62 1e 00 00 call 10c9f8 <_Watchdog_Tickle> while ( seconds ) { _Watchdog_Tickle_seconds(); seconds--; 10ab96: 4b dec %ebx 10ab97: 83 c4 10 add $0x10,%esp _Timestamp_Add_to( &_TOD_Uptime, &tick ); /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); while ( seconds ) { 10ab9a: 85 db test %ebx,%ebx 10ab9c: 75 eb jne 10ab89 <_TOD_Tickle_ticks+0x45> _Watchdog_Tickle_seconds(); seconds--; } } 10ab9e: 8b 5d fc mov -0x4(%ebp),%ebx 10aba1: c9 leave 10aba2: c3 ret 0010a978 <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 10a978: 55 push %ebp 10a979: 89 e5 mov %esp,%ebp 10a97b: 56 push %esi 10a97c: 53 push %ebx 10a97d: 8b 45 08 mov 0x8(%ebp),%eax uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 10a980: 8b 58 08 mov 0x8(%eax),%ebx 10a983: 4b dec %ebx year_mod_4 = the_tod->year & 3; 10a984: 8b 08 mov (%eax),%ecx if ( year_mod_4 == 0 ) 10a986: 89 ce mov %ecx,%esi 10a988: 83 e6 03 and $0x3,%esi 10a98b: 8b 50 04 mov 0x4(%eax),%edx 10a98e: 75 0a jne 10a99a <_TOD_To_seconds+0x22> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; 10a990: 0f b7 94 12 ce fc 11 movzwl 0x11fcce(%edx,%edx,1),%edx 10a997: 00 10a998: eb 08 jmp 10a9a2 <_TOD_To_seconds+0x2a> <== ALWAYS TAKEN else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 10a99a: 0f b7 94 12 b4 fc 11 movzwl 0x11fcb4(%edx,%edx,1),%edx 10a9a1: 00 10a9a2: 8d 1c 1a lea (%edx,%ebx,1),%ebx time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 10a9a5: 0f b7 94 36 e8 fc 11 movzwl 0x11fce8(%esi,%esi,1),%edx 10a9ac: 00 10a9ad: 81 e9 c4 07 00 00 sub $0x7c4,%ecx 10a9b3: c1 e9 02 shr $0x2,%ecx 10a9b6: 69 c9 b5 05 00 00 imul $0x5b5,%ecx,%ecx 10a9bc: 01 ca add %ecx,%edx ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10a9be: 01 da add %ebx,%edx time *= TOD_SECONDS_PER_DAY; 10a9c0: 69 d2 80 51 01 00 imul $0x15180,%edx,%edx time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 10a9c6: 6b 48 0c 3c imul $0x3c,0xc(%eax),%ecx 10a9ca: 03 48 10 add 0x10(%eax),%ecx 10a9cd: 6b c9 3c imul $0x3c,%ecx,%ecx 10a9d0: 03 50 14 add 0x14(%eax),%edx 10a9d3: 8d 84 0a 00 e5 da 21 lea 0x21dae500(%edx,%ecx,1),%eax time += TOD_SECONDS_1970_THROUGH_1988; return( time ); } 10a9da: 5b pop %ebx 10a9db: 5e pop %esi 10a9dc: c9 leave 10a9dd: c3 ret 0010a9e0 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10a9e0: 55 push %ebp 10a9e1: 89 e5 mov %esp,%ebp 10a9e3: 53 push %ebx 10a9e4: 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(); 10a9e7: 8b 1d 24 2a 12 00 mov 0x122a24,%ebx if ((!the_tod) || 10a9ed: 85 c9 test %ecx,%ecx 10a9ef: 74 59 je 10aa4a <_TOD_Validate+0x6a> <== ALWAYS TAKEN (the_tod->ticks >= ticks_per_second) || 10a9f1: b8 40 42 0f 00 mov $0xf4240,%eax 10a9f6: 31 d2 xor %edx,%edx 10a9f8: f7 f3 div %ebx 10a9fa: 39 41 18 cmp %eax,0x18(%ecx) 10a9fd: 73 4b jae 10aa4a <_TOD_Validate+0x6a> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10a9ff: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10aa03: 77 45 ja 10aa4a <_TOD_Validate+0x6a> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10aa05: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10aa09: 77 3f ja 10aa4a <_TOD_Validate+0x6a> (the_tod->hour >= TOD_HOURS_PER_DAY) || 10aa0b: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10aa0f: 77 39 ja 10aa4a <_TOD_Validate+0x6a> (the_tod->month == 0) || 10aa11: 8b 41 04 mov 0x4(%ecx),%eax uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10aa14: 85 c0 test %eax,%eax 10aa16: 74 32 je 10aa4a <_TOD_Validate+0x6a> <== ALWAYS TAKEN 10aa18: 83 f8 0c cmp $0xc,%eax 10aa1b: 77 2d ja 10aa4a <_TOD_Validate+0x6a> (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) || 10aa1d: 8b 19 mov (%ecx),%ebx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10aa1f: 81 fb c3 07 00 00 cmp $0x7c3,%ebx 10aa25: 76 23 jbe 10aa4a <_TOD_Validate+0x6a> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10aa27: 8b 51 08 mov 0x8(%ecx),%edx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10aa2a: 85 d2 test %edx,%edx 10aa2c: 74 1c je 10aa4a <_TOD_Validate+0x6a> <== ALWAYS TAKEN (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10aa2e: 80 e3 03 and $0x3,%bl 10aa31: 75 09 jne 10aa3c <_TOD_Validate+0x5c> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10aa33: 8b 04 85 24 fd 11 00 mov 0x11fd24(,%eax,4),%eax 10aa3a: eb 07 jmp 10aa43 <_TOD_Validate+0x63> <== ALWAYS TAKEN else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 10aa3c: 8b 04 85 f0 fc 11 00 mov 0x11fcf0(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10aa43: 39 c2 cmp %eax,%edx 10aa45: 0f 96 c0 setbe %al 10aa48: eb 02 jmp 10aa4c <_TOD_Validate+0x6c> <== ALWAYS TAKEN 10aa4a: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10aa4c: 5b pop %ebx 10aa4d: c9 leave 10aa4e: c3 ret 0010b678 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10b678: 55 push %ebp 10b679: 89 e5 mov %esp,%ebp 10b67b: 57 push %edi 10b67c: 56 push %esi 10b67d: 53 push %ebx 10b67e: 83 ec 28 sub $0x28,%esp 10b681: 8b 5d 08 mov 0x8(%ebp),%ebx 10b684: 8b 7d 0c mov 0xc(%ebp),%edi 10b687: 8a 45 10 mov 0x10(%ebp),%al 10b68a: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10b68d: 8b 73 10 mov 0x10(%ebx),%esi /* * 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 ); 10b690: 53 push %ebx 10b691: e8 12 0d 00 00 call 10c3a8 <_Thread_Set_transient> <== ALWAYS TAKEN /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 10b696: 83 c4 10 add $0x10,%esp 10b699: 39 7b 14 cmp %edi,0x14(%ebx) 10b69c: 74 0c je 10b6aa <_Thread_Change_priority+0x32> _Thread_Set_priority( the_thread, new_priority ); 10b69e: 50 push %eax 10b69f: 50 push %eax 10b6a0: 57 push %edi 10b6a1: 53 push %ebx 10b6a2: e8 c9 0b 00 00 call 10c270 <_Thread_Set_priority> <== ALWAYS TAKEN 10b6a7: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10b6aa: 9c pushf 10b6ab: fa cli 10b6ac: 59 pop %ecx /* * 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; 10b6ad: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10b6b0: 83 f8 04 cmp $0x4,%eax 10b6b3: 74 2f je 10b6e4 <_Thread_Change_priority+0x6c> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10b6b5: 83 e6 04 and $0x4,%esi 10b6b8: 75 08 jne 10b6c2 <_Thread_Change_priority+0x4a> <== ALWAYS TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10b6ba: 89 c2 mov %eax,%edx 10b6bc: 83 e2 fb and $0xfffffffb,%edx 10b6bf: 89 53 10 mov %edx,0x10(%ebx) _ISR_Enable( level ); 10b6c2: 51 push %ecx 10b6c3: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10b6c4: a9 e0 be 03 00 test $0x3bee0,%eax 10b6c9: 0f 84 c0 00 00 00 je 10b78f <_Thread_Change_priority+0x117> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 10b6cf: 89 5d 0c mov %ebx,0xc(%ebp) 10b6d2: 8b 43 44 mov 0x44(%ebx),%eax 10b6d5: 89 45 08 mov %eax,0x8(%ebp) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10b6d8: 8d 65 f4 lea -0xc(%ebp),%esp 10b6db: 5b pop %ebx 10b6dc: 5e pop %esi 10b6dd: 5f pop %edi 10b6de: 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 ); 10b6df: e9 04 0b 00 00 jmp 10c1e8 <_Thread_queue_Requeue> <== ALWAYS TAKEN } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10b6e4: 83 e6 04 and $0x4,%esi 10b6e7: 75 53 jne 10b73c <_Thread_Change_priority+0xc4> <== ALWAYS 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 ); 10b6e9: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10b6f0: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10b6f6: 66 8b 93 96 00 00 00 mov 0x96(%ebx),%dx 10b6fd: 66 09 10 or %dx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10b700: 66 a1 24 39 12 00 mov 0x123924,%ax 10b706: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10b70c: 66 a3 24 39 12 00 mov %ax,0x123924 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10b712: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10b716: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax 10b71c: 74 0e je 10b72c <_Thread_Change_priority+0xb4> Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10b71e: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10b721: 8b 10 mov (%eax),%edx after_node->next = the_node; 10b723: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10b725: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10b727: 89 5a 04 mov %ebx,0x4(%edx) 10b72a: eb 10 jmp 10b73c <_Thread_Change_priority+0xc4> <== ALWAYS TAKEN Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10b72c: 8d 50 04 lea 0x4(%eax),%edx 10b72f: 89 13 mov %edx,(%ebx) old_last_node = the_chain->last; 10b731: 8b 50 08 mov 0x8(%eax),%edx the_chain->last = the_node; 10b734: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10b737: 89 1a mov %ebx,(%edx) the_node->previous = old_last_node; 10b739: 89 53 04 mov %edx,0x4(%ebx) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 10b73c: 51 push %ecx 10b73d: 9d popf 10b73e: fa cli RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10b73f: 66 8b 1d 24 39 12 00 mov 0x123924,%bx 10b746: 31 c0 xor %eax,%eax 10b748: 89 c2 mov %eax,%edx 10b74a: 66 0f bc d3 bsf %bx,%dx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10b74e: 0f b7 d2 movzwl %dx,%edx 10b751: 66 8b 9c 12 9c 39 12 mov 0x12399c(%edx,%edx,1),%bx 10b758: 00 10b759: 66 0f bc c3 bsf %bx,%ax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10b75d: c1 e2 04 shl $0x4,%edx 10b760: 0f b7 c0 movzwl %ax,%eax 10b763: 01 c2 add %eax,%edx 10b765: 6b d2 0c imul $0xc,%edx,%edx 10b768: 8b 1d 3c 38 12 00 mov 0x12383c,%ebx 10b76e: 8b 14 1a mov (%edx,%ebx,1),%edx 10b771: 89 15 00 39 12 00 mov %edx,0x123900 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10b777: a1 30 39 12 00 mov 0x123930,%eax * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 10b77c: 39 d0 cmp %edx,%eax 10b77e: 74 0d je 10b78d <_Thread_Change_priority+0x115> _Thread_Executing->is_preemptible ) 10b780: 80 78 75 00 cmpb $0x0,0x75(%eax) 10b784: 74 07 je 10b78d <_Thread_Change_priority+0x115> _Context_Switch_necessary = true; 10b786: c6 05 40 39 12 00 01 movb $0x1,0x123940 _ISR_Enable( level ); 10b78d: 51 push %ecx 10b78e: 9d popf } 10b78f: 8d 65 f4 lea -0xc(%ebp),%esp 10b792: 5b pop %ebx 10b793: 5e pop %esi 10b794: 5f pop %edi 10b795: c9 leave 10b796: c3 ret 0010b798 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10b798: 55 push %ebp 10b799: 89 e5 mov %esp,%ebp 10b79b: 53 push %ebx 10b79c: 8b 45 08 mov 0x8(%ebp),%eax 10b79f: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10b7a2: 9c pushf 10b7a3: fa cli 10b7a4: 59 pop %ecx current_state = the_thread->current_state; 10b7a5: 8b 58 10 mov 0x10(%eax),%ebx if ( current_state & state ) { 10b7a8: 85 da test %ebx,%edx 10b7aa: 74 71 je 10b81d <_Thread_Clear_state+0x85> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10b7ac: f7 d2 not %edx 10b7ae: 21 da and %ebx,%edx current_state = 10b7b0: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 10b7b3: 85 d2 test %edx,%edx 10b7b5: 75 66 jne 10b81d <_Thread_Clear_state+0x85> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10b7b7: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10b7bd: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 10b7c4: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10b7c7: 66 8b 15 24 39 12 00 mov 0x123924,%dx 10b7ce: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10b7d4: 66 89 15 24 39 12 00 mov %dx,0x123924 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10b7db: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10b7e1: 8d 5a 04 lea 0x4(%edx),%ebx 10b7e4: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10b7e6: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10b7e9: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10b7ec: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10b7ee: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 10b7f1: 51 push %ecx 10b7f2: 9d popf 10b7f3: 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 ) { 10b7f4: 8b 50 14 mov 0x14(%eax),%edx 10b7f7: 8b 1d 00 39 12 00 mov 0x123900,%ebx 10b7fd: 3b 53 14 cmp 0x14(%ebx),%edx 10b800: 73 1b jae 10b81d <_Thread_Clear_state+0x85> _Thread_Heir = the_thread; 10b802: a3 00 39 12 00 mov %eax,0x123900 if ( _Thread_Executing->is_preemptible || 10b807: a1 30 39 12 00 mov 0x123930,%eax 10b80c: 80 78 75 00 cmpb $0x0,0x75(%eax) 10b810: 75 04 jne 10b816 <_Thread_Clear_state+0x7e> 10b812: 85 d2 test %edx,%edx 10b814: 75 07 jne 10b81d <_Thread_Clear_state+0x85> <== NEVER TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10b816: c6 05 40 39 12 00 01 movb $0x1,0x123940 } } } _ISR_Enable( level ); 10b81d: 51 push %ecx 10b81e: 9d popf } 10b81f: 5b pop %ebx 10b820: c9 leave 10b821: c3 ret 0010b824 <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 10b824: 55 push %ebp 10b825: 89 e5 mov %esp,%ebp 10b827: 56 push %esi 10b828: 53 push %ebx 10b829: 8b 75 08 mov 0x8(%ebp),%esi 10b82c: 8b 5d 0c mov 0xc(%ebp),%ebx 10b82f: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10b833: 8b 46 1c mov 0x1c(%esi),%eax 10b836: 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; 10b83d: a1 74 38 12 00 mov 0x123874,%eax 10b842: 48 dec %eax 10b843: a3 74 38 12 00 mov %eax,0x123874 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 10b848: 83 ec 0c sub $0xc,%esp 10b84b: 53 push %ebx 10b84c: e8 83 0f 00 00 call 10c7d4 <_User_extensions_Thread_delete> <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b851: a1 74 38 12 00 mov 0x123874,%eax 10b856: 40 inc %eax 10b857: a3 74 38 12 00 mov %eax,0x123874 /* * 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 ); 10b85c: 59 pop %ecx 10b85d: 58 pop %eax 10b85e: 53 push %ebx 10b85f: 56 push %esi 10b860: e8 43 f7 ff ff call 10afa8 <_Objects_Close> <== ALWAYS TAKEN /* * 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 ); 10b865: 58 pop %eax 10b866: 5a pop %edx 10b867: 6a 01 push $0x1 10b869: 53 push %ebx 10b86a: e8 69 0a 00 00 call 10c2d8 <_Thread_Set_state> <== ALWAYS TAKEN if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 10b86f: 89 1c 24 mov %ebx,(%esp) 10b872: e8 d1 08 00 00 call 10c148 <_Thread_queue_Extract_with_proxy> <== ALWAYS TAKEN 10b877: 83 c4 10 add $0x10,%esp 10b87a: 84 c0 test %al,%al 10b87c: 75 15 jne 10b893 <_Thread_Close+0x6f> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 10b87e: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b882: 75 0f jne 10b893 <_Thread_Close+0x6f> (void) _Watchdog_Remove( &the_thread->Timer ); 10b884: 83 ec 0c sub $0xc,%esp 10b887: 8d 43 48 lea 0x48(%ebx),%eax 10b88a: 50 push %eax 10b88b: e8 00 11 00 00 call 10c990 <_Watchdog_Remove> 10b890: 83 c4 10 add $0x10,%esp /* * 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 ) ) 10b893: 3b 1d f8 38 12 00 cmp 0x1238f8,%ebx 10b899: 75 0a jne 10b8a5 <_Thread_Close+0x81> */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 10b89b: c7 05 f8 38 12 00 00 movl $0x0,0x1238f8 10b8a2: 00 00 00 _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 10b8a5: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx) 10b8ac: 00 00 00 if ( the_thread->Start.fp_context ) 10b8af: 8b 83 c8 00 00 00 mov 0xc8(%ebx),%eax 10b8b5: 85 c0 test %eax,%eax 10b8b7: 74 0c je 10b8c5 <_Thread_Close+0xa1> (void) _Workspace_Free( the_thread->Start.fp_context ); 10b8b9: 83 ec 0c sub $0xc,%esp 10b8bc: 50 push %eax 10b8bd: e8 e3 11 00 00 call 10caa5 <_Workspace_Free> 10b8c2: 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 ); 10b8c5: 83 ec 0c sub $0xc,%esp 10b8c8: 53 push %ebx 10b8c9: e8 9e 0b 00 00 call 10c46c <_Thread_Stack_Free> <== ALWAYS TAKEN the_thread->Start.stack = NULL; 10b8ce: c7 83 cc 00 00 00 00 movl $0x0,0xcc(%ebx) 10b8d5: 00 00 00 if ( the_thread->extensions ) 10b8d8: 8b 83 fc 00 00 00 mov 0xfc(%ebx),%eax 10b8de: 83 c4 10 add $0x10,%esp 10b8e1: 85 c0 test %eax,%eax 10b8e3: 74 0c je 10b8f1 <_Thread_Close+0xcd> (void) _Workspace_Free( the_thread->extensions ); 10b8e5: 83 ec 0c sub $0xc,%esp 10b8e8: 50 push %eax 10b8e9: e8 b7 11 00 00 call 10caa5 <_Workspace_Free> 10b8ee: 83 c4 10 add $0x10,%esp the_thread->extensions = NULL; 10b8f1: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10b8f8: 00 00 00 } 10b8fb: 8d 65 f8 lea -0x8(%ebp),%esp 10b8fe: 5b pop %ebx 10b8ff: 5e pop %esi 10b900: c9 leave 10b901: c3 ret 0010b904 <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 10b904: 55 push %ebp 10b905: 89 e5 mov %esp,%ebp 10b907: 83 ec 14 sub $0x14,%esp * This routine allocates an internal thread. */ RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Internal_allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_Thread_Internal_information ); 10b90a: 68 cc 39 12 00 push $0x1239cc 10b90f: e8 28 f6 ff ff call 10af3c <_Objects_Allocate> <== ALWAYS TAKEN /* * The entire workspace is zeroed during its initialization. Thus, all * fields not explicitly assigned were explicitly zeroed by * _Workspace_Initialization. */ _Thread_Idle = _Thread_Internal_allocate(); 10b914: a3 14 3a 12 00 mov %eax,0x123a14 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b919: a1 74 38 12 00 mov 0x123874,%eax 10b91e: 40 inc %eax 10b91f: a3 74 38 12 00 mov %eax,0x123874 * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 10b924: 8b 15 30 f9 11 00 mov 0x11f930,%edx 10b92a: 83 c4 0c add $0xc,%esp 10b92d: 68 45 4c 44 49 push $0x49444c45 10b932: 6a 00 push $0x0 10b934: 6a 00 push $0x0 10b936: 6a 00 push $0x0 10b938: 6a 01 push $0x1 10b93a: 0f b6 05 14 f9 11 00 movzbl 0x11f914,%eax 10b941: 50 push %eax 10b942: 6a 00 push $0x0 10b944: a1 10 f9 11 00 mov 0x11f910,%eax 10b949: 39 d0 cmp %edx,%eax 10b94b: 73 02 jae 10b94f <_Thread_Create_idle+0x4b> 10b94d: 89 d0 mov %edx,%eax 10b94f: 50 push %eax 10b950: 6a 00 push $0x0 10b952: ff 35 14 3a 12 00 pushl 0x123a14 10b958: 68 cc 39 12 00 push $0x1239cc 10b95d: e8 4a 02 00 00 call 10bbac <_Thread_Initialize> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b962: a1 74 38 12 00 mov 0x123874,%eax 10b967: 48 dec %eax 10b968: a3 74 38 12 00 mov %eax,0x123874 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; 10b96d: a1 14 3a 12 00 mov 0x123a14,%eax /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 10b972: a3 30 39 12 00 mov %eax,0x123930 10b977: a3 00 39 12 00 mov %eax,0x123900 _Thread_Executing = _Thread_Idle; _Thread_Start( 10b97c: 83 c4 24 add $0x24,%esp 10b97f: 6a 00 push $0x0 10b981: 6a 00 push $0x0 10b983: ff 35 2c f9 11 00 pushl 0x11f92c 10b989: 6a 00 push $0x0 10b98b: 50 push %eax 10b98c: e8 5b 0b 00 00 call 10c4ec <_Thread_Start> <== ALWAYS TAKEN 10b991: 83 c4 20 add $0x20,%esp Configuration.idle_task, NULL, 0 ); } 10b994: c9 leave 10b995: c3 ret 0010b998 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10b998: 55 push %ebp 10b999: 89 e5 mov %esp,%ebp 10b99b: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10b99e: 8d 45 f4 lea -0xc(%ebp),%eax 10b9a1: 50 push %eax 10b9a2: ff 75 08 pushl 0x8(%ebp) 10b9a5: e8 8e 01 00 00 call 10bb38 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { 10b9aa: 83 c4 10 add $0x10,%esp 10b9ad: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10b9b1: 75 1b jne 10b9ce <_Thread_Delay_ended+0x36> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10b9b3: 52 push %edx 10b9b4: 52 push %edx 10b9b5: 68 18 00 00 10 push $0x10000018 10b9ba: 50 push %eax 10b9bb: e8 d8 fd ff ff call 10b798 <_Thread_Clear_state> <== ALWAYS TAKEN 10b9c0: a1 74 38 12 00 mov 0x123874,%eax 10b9c5: 48 dec %eax 10b9c6: a3 74 38 12 00 mov %eax,0x123874 10b9cb: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10b9ce: c9 leave 10b9cf: c3 ret 0010b9d0 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10b9d0: 55 push %ebp 10b9d1: 89 e5 mov %esp,%ebp 10b9d3: 57 push %edi 10b9d4: 56 push %esi 10b9d5: 53 push %ebx 10b9d6: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10b9d9: 8b 1d 30 39 12 00 mov 0x123930,%ebx _ISR_Disable( level ); 10b9df: 9c pushf 10b9e0: fa cli 10b9e1: 58 pop %eax #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 10b9e2: 8d 7d d8 lea -0x28(%ebp),%edi Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10b9e5: e9 f1 00 00 00 jmp 10badb <_Thread_Dispatch+0x10b> <== ALWAYS TAKEN heir = _Thread_Heir; 10b9ea: 8b 35 00 39 12 00 mov 0x123900,%esi _Thread_Dispatch_disable_level = 1; 10b9f0: c7 05 74 38 12 00 01 movl $0x1,0x123874 10b9f7: 00 00 00 _Context_Switch_necessary = false; 10b9fa: c6 05 40 39 12 00 00 movb $0x0,0x123940 _Thread_Executing = heir; 10ba01: 89 35 30 39 12 00 mov %esi,0x123930 #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 ) 10ba07: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10ba0b: 75 09 jne 10ba16 <_Thread_Dispatch+0x46> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10ba0d: 8b 15 40 38 12 00 mov 0x123840,%edx 10ba13: 89 56 78 mov %edx,0x78(%esi) _ISR_Enable( level ); 10ba16: 50 push %eax 10ba17: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10ba18: 83 ec 0c sub $0xc,%esp 10ba1b: 8d 45 e0 lea -0x20(%ebp),%eax 10ba1e: 50 push %eax 10ba1f: e8 64 2a 00 00 call 10e488 <_TOD_Get_uptime> _Timestamp_Subtract( 10ba24: 83 c4 0c add $0xc,%esp 10ba27: 57 push %edi 10ba28: 8d 45 e0 lea -0x20(%ebp),%eax 10ba2b: 50 push %eax 10ba2c: 68 38 39 12 00 push $0x123938 10ba31: e8 de 0b 00 00 call 10c614 <_Timespec_Subtract> <== ALWAYS TAKEN &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10ba36: 58 pop %eax 10ba37: 5a pop %edx 10ba38: 57 push %edi 10ba39: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10ba3f: 50 push %eax 10ba40: e8 9f 0b 00 00 call 10c5e4 <_Timespec_Add_to> <== ALWAYS TAKEN _Thread_Time_of_last_context_switch = uptime; 10ba45: 8b 45 e0 mov -0x20(%ebp),%eax 10ba48: 8b 55 e4 mov -0x1c(%ebp),%edx 10ba4b: a3 38 39 12 00 mov %eax,0x123938 10ba50: 89 15 3c 39 12 00 mov %edx,0x12393c #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10ba56: a1 fc 38 12 00 mov 0x1238fc,%eax 10ba5b: 83 c4 10 add $0x10,%esp 10ba5e: 85 c0 test %eax,%eax 10ba60: 74 10 je 10ba72 <_Thread_Dispatch+0xa2> <== ALWAYS TAKEN executing->libc_reent = *_Thread_libc_reent; 10ba62: 8b 10 mov (%eax),%edx 10ba64: 89 93 ec 00 00 00 mov %edx,0xec(%ebx) *_Thread_libc_reent = heir->libc_reent; 10ba6a: 8b 96 ec 00 00 00 mov 0xec(%esi),%edx 10ba70: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10ba72: 51 push %ecx 10ba73: 51 push %ecx 10ba74: 56 push %esi 10ba75: 53 push %ebx 10ba76: e8 c9 0d 00 00 call 10c844 <_User_extensions_Thread_switch> <== ALWAYS TAKEN if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10ba7b: 58 pop %eax 10ba7c: 5a pop %edx 10ba7d: 81 c6 d0 00 00 00 add $0xd0,%esi 10ba83: 56 push %esi 10ba84: 8d 83 d0 00 00 00 lea 0xd0(%ebx),%eax 10ba8a: 50 push %eax 10ba8b: e8 80 10 00 00 call 10cb10 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10ba90: 83 c4 10 add $0x10,%esp 10ba93: 83 bb e8 00 00 00 00 cmpl $0x0,0xe8(%ebx) 10ba9a: 74 36 je 10bad2 <_Thread_Dispatch+0x102> #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 ); 10ba9c: a1 f8 38 12 00 mov 0x1238f8,%eax 10baa1: 39 c3 cmp %eax,%ebx 10baa3: 74 2d je 10bad2 <_Thread_Dispatch+0x102> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10baa5: 85 c0 test %eax,%eax 10baa7: 74 11 je 10baba <_Thread_Dispatch+0xea> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10baa9: 83 ec 0c sub $0xc,%esp 10baac: 05 e8 00 00 00 add $0xe8,%eax 10bab1: 50 push %eax 10bab2: e8 8d 10 00 00 call 10cb44 <_CPU_Context_save_fp> 10bab7: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10baba: 83 ec 0c sub $0xc,%esp 10babd: 8d 83 e8 00 00 00 lea 0xe8(%ebx),%eax 10bac3: 50 push %eax 10bac4: e8 85 10 00 00 call 10cb4e <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10bac9: 89 1d f8 38 12 00 mov %ebx,0x1238f8 10bacf: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10bad2: 8b 1d 30 39 12 00 mov 0x123930,%ebx _ISR_Disable( level ); 10bad8: 9c pushf 10bad9: fa cli 10bada: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10badb: 8a 15 40 39 12 00 mov 0x123940,%dl 10bae1: 84 d2 test %dl,%dl 10bae3: 0f 85 01 ff ff ff jne 10b9ea <_Thread_Dispatch+0x1a> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 10bae9: c7 05 74 38 12 00 00 movl $0x0,0x123874 10baf0: 00 00 00 _ISR_Enable( level ); 10baf3: 50 push %eax 10baf4: 9d popf if ( _Thread_Do_post_task_switch_extension || 10baf5: 83 3d 14 39 12 00 00 cmpl $0x0,0x123914 10bafc: 75 06 jne 10bb04 <_Thread_Dispatch+0x134> <== ALWAYS TAKEN executing->do_post_task_switch_extension ) { 10bafe: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10bb02: 74 09 je 10bb0d <_Thread_Dispatch+0x13d> executing->do_post_task_switch_extension = false; 10bb04: c6 43 74 00 movb $0x0,0x74(%ebx) _API_extensions_Run_postswitch(); 10bb08: e8 1e eb ff ff call 10a62b <_API_extensions_Run_postswitch> } } 10bb0d: 8d 65 f4 lea -0xc(%ebp),%esp 10bb10: 5b pop %ebx 10bb11: 5e pop %esi 10bb12: 5f pop %edi 10bb13: c9 leave 10bb14: c3 ret 0010bb15 <_Thread_Enable_dispatch>: #if ( (defined(CPU_INLINE_ENABLE_DISPATCH) && \ (CPU_INLINE_ENABLE_DISPATCH == FALSE)) || \ (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) ) void _Thread_Enable_dispatch( void ) { 10bb15: 55 push %ebp 10bb16: 89 e5 mov %esp,%ebp 10bb18: 83 ec 08 sub $0x8,%esp if ( --_Thread_Dispatch_disable_level ) 10bb1b: a1 74 38 12 00 mov 0x123874,%eax 10bb20: 48 dec %eax 10bb21: a3 74 38 12 00 mov %eax,0x123874 10bb26: a1 74 38 12 00 mov 0x123874,%eax 10bb2b: 85 c0 test %eax,%eax 10bb2d: 75 06 jne 10bb35 <_Thread_Enable_dispatch+0x20> return; _Thread_Dispatch(); } 10bb2f: c9 leave (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) ) void _Thread_Enable_dispatch( void ) { if ( --_Thread_Dispatch_disable_level ) return; _Thread_Dispatch(); 10bb30: e9 9b fe ff ff jmp 10b9d0 <_Thread_Dispatch> <== ALWAYS TAKEN } 10bb35: c9 leave 10bb36: c3 ret 0010fcf4 <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 10fcf4: 55 push %ebp 10fcf5: 89 e5 mov %esp,%ebp Thread_Control *executing; executing = _Thread_Executing; 10fcf7: a1 30 39 12 00 mov 0x123930,%eax if ( !_States_Is_ready( executing->current_state ) || 10fcfc: 83 78 10 00 cmpl $0x0,0x10(%eax) 10fd00: 75 0e jne 10fd10 <_Thread_Evaluate_mode+0x1c> <== ALWAYS TAKEN 10fd02: 3b 05 00 39 12 00 cmp 0x123900,%eax 10fd08: 74 11 je 10fd1b <_Thread_Evaluate_mode+0x27> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 10fd0a: 80 78 75 00 cmpb $0x0,0x75(%eax) 10fd0e: 74 0b je 10fd1b <_Thread_Evaluate_mode+0x27> <== ALWAYS TAKEN _Context_Switch_necessary = true; 10fd10: c6 05 40 39 12 00 01 movb $0x1,0x123940 10fd17: b0 01 mov $0x1,%al return true; 10fd19: eb 02 jmp 10fd1d <_Thread_Evaluate_mode+0x29> <== ALWAYS TAKEN 10fd1b: 31 c0 xor %eax,%eax } return false; } 10fd1d: c9 leave 10fd1e: c3 ret 0010bb38 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10bb38: 55 push %ebp 10bb39: 89 e5 mov %esp,%ebp 10bb3b: 53 push %ebx 10bb3c: 83 ec 04 sub $0x4,%esp 10bb3f: 8b 55 08 mov 0x8(%ebp),%edx 10bb42: 8b 45 0c mov 0xc(%ebp),%eax 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 ) ) { 10bb45: 85 d2 test %edx,%edx 10bb47: 75 1a jne 10bb63 <_Thread_Get+0x2b> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10bb49: 8b 15 74 38 12 00 mov 0x123874,%edx 10bb4f: 42 inc %edx 10bb50: 89 15 74 38 12 00 mov %edx,0x123874 _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 10bb56: c7 00 00 00 00 00 movl $0x0,(%eax) tp = _Thread_Executing; 10bb5c: a1 30 39 12 00 mov 0x123930,%eax goto done; 10bb61: eb 3a jmp 10bb9d <_Thread_Get+0x65> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 10bb63: 89 d1 mov %edx,%ecx 10bb65: c1 e9 18 shr $0x18,%ecx 10bb68: 83 e1 07 and $0x7,%ecx */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 10bb6b: 8d 59 ff lea -0x1(%ecx),%ebx 10bb6e: 83 fb 03 cmp $0x3,%ebx 10bb71: 76 2f jbe 10bba2 <_Thread_Get+0x6a> 10bb73: eb 12 jmp 10bb87 <_Thread_Get+0x4f> <== ALWAYS TAKEN if ( the_class != 1 ) { /* threads are always first class :) */ *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 10bb75: 8b 0c 8d 48 38 12 00 mov 0x123848(,%ecx,4),%ecx if ( !api_information ) { 10bb7c: 85 c9 test %ecx,%ecx 10bb7e: 74 07 je 10bb87 <_Thread_Get+0x4f> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 10bb80: 8b 49 04 mov 0x4(%ecx),%ecx if ( !information ) { 10bb83: 85 c9 test %ecx,%ecx 10bb85: 75 0a jne 10bb91 <_Thread_Get+0x59> *location = OBJECTS_ERROR; 10bb87: c7 00 01 00 00 00 movl $0x1,(%eax) 10bb8d: 31 c0 xor %eax,%eax goto done; 10bb8f: eb 0c jmp 10bb9d <_Thread_Get+0x65> <== ALWAYS TAKEN } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10bb91: 53 push %ebx 10bb92: 50 push %eax 10bb93: 52 push %edx 10bb94: 51 push %ecx 10bb95: e8 b6 f7 ff ff call 10b350 <_Objects_Get> <== ALWAYS TAKEN 10bb9a: 83 c4 10 add $0x10,%esp done: return tp; } 10bb9d: 8b 5d fc mov -0x4(%ebp),%ebx 10bba0: c9 leave 10bba1: c3 ret *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 10bba2: 89 d3 mov %edx,%ebx 10bba4: c1 eb 1b shr $0x1b,%ebx 10bba7: 4b dec %ebx 10bba8: 74 cb je 10bb75 <_Thread_Get+0x3d> 10bbaa: eb db jmp 10bb87 <_Thread_Get+0x4f> <== ALWAYS TAKEN 0010fd20 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 10fd20: 55 push %ebp 10fd21: 89 e5 mov %esp,%ebp 10fd23: 53 push %ebx 10fd24: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 10fd27: 8b 1d 30 39 12 00 mov 0x123930,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 10fd2d: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 10fd33: 85 c0 test %eax,%eax 10fd35: 74 03 je 10fd3a <_Thread_Handler+0x1a> 10fd37: fa cli 10fd38: eb 01 jmp 10fd3b <_Thread_Handler+0x1b> <== ALWAYS TAKEN 10fd3a: fb sti #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 10fd3b: a0 1c 35 12 00 mov 0x12351c,%al 10fd40: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 10fd43: c6 05 1c 35 12 00 01 movb $0x1,0x12351c #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10fd4a: 83 bb e8 00 00 00 00 cmpl $0x0,0xe8(%ebx) 10fd51: 74 24 je 10fd77 <_Thread_Handler+0x57> #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 ); 10fd53: a1 f8 38 12 00 mov 0x1238f8,%eax 10fd58: 39 c3 cmp %eax,%ebx 10fd5a: 74 1b je 10fd77 <_Thread_Handler+0x57> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10fd5c: 85 c0 test %eax,%eax 10fd5e: 74 11 je 10fd71 <_Thread_Handler+0x51> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10fd60: 83 ec 0c sub $0xc,%esp 10fd63: 05 e8 00 00 00 add $0xe8,%eax 10fd68: 50 push %eax 10fd69: e8 d6 cd ff ff call 10cb44 <_CPU_Context_save_fp> 10fd6e: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 10fd71: 89 1d f8 38 12 00 mov %ebx,0x1238f8 /* * 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 ); 10fd77: 83 ec 0c sub $0xc,%esp 10fd7a: 53 push %ebx 10fd7b: e8 78 c9 ff ff call 10c6f8 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 10fd80: e8 90 bd ff ff call 10bb15 <_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) */ { 10fd85: 83 c4 10 add $0x10,%esp 10fd88: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 10fd8c: 75 05 jne 10fd93 <_Thread_Handler+0x73> INIT_NAME (); 10fd8e: e8 cd bf 00 00 call 11bd60 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 10fd93: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx) 10fd9a: 75 15 jne 10fdb1 <_Thread_Handler+0x91> <== ALWAYS TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 10fd9c: 83 ec 0c sub $0xc,%esp 10fd9f: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 10fda5: ff 93 9c 00 00 00 call *0x9c(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 10fdab: 89 43 28 mov %eax,0x28(%ebx) 10fdae: 83 c4 10 add $0x10,%esp * 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 ); 10fdb1: 83 ec 0c sub $0xc,%esp 10fdb4: 53 push %ebx 10fdb5: e8 6f c9 ff ff call 10c729 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 10fdba: 83 c4 0c add $0xc,%esp 10fdbd: 6a 06 push $0x6 10fdbf: 6a 01 push $0x1 10fdc1: 6a 00 push $0x0 10fdc3: e8 dc b0 ff ff call 10aea4 <_Internal_error_Occurred> 0010bdac <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 10bdac: 55 push %ebp 10bdad: 89 e5 mov %esp,%ebp 10bdaf: 53 push %ebx 10bdb0: 83 ec 04 sub $0x4,%esp uint32_t maximum_extensions; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; 10bdb3: a1 28 f9 11 00 mov 0x11f928,%eax maximum_extensions = Configuration.maximum_extensions; 10bdb8: 8b 15 20 f9 11 00 mov 0x11f920,%edx #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 10bdbe: 83 3d 3c f9 11 00 00 cmpl $0x0,0x11f93c 10bdc5: 0f 94 c3 sete %bl 10bdc8: 83 3d 38 f9 11 00 00 cmpl $0x0,0x11f938 10bdcf: 0f 94 c1 sete %cl 10bdd2: 38 cb cmp %cl,%bl 10bdd4: 74 0c je 10bde2 <_Thread_Handler_initialization+0x36> == (!Configuration.stack_free_hook) ) ) _Internal_error_Occurred( 10bdd6: 52 push %edx 10bdd7: 6a 0f push $0xf 10bdd9: 6a 01 push $0x1 10bddb: 6a 00 push $0x0 10bddd: e8 c2 f0 ff ff call 10aea4 <_Internal_error_Occurred> INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 10bde2: c6 05 40 39 12 00 00 movb $0x0,0x123940 _Thread_Executing = NULL; 10bde9: c7 05 30 39 12 00 00 movl $0x0,0x123930 10bdf0: 00 00 00 _Thread_Heir = NULL; 10bdf3: c7 05 00 39 12 00 00 movl $0x0,0x123900 10bdfa: 00 00 00 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 10bdfd: c7 05 f8 38 12 00 00 movl $0x0,0x1238f8 10be04: 00 00 00 #endif _Thread_Do_post_task_switch_extension = 0; 10be07: c7 05 14 39 12 00 00 movl $0x0,0x123914 10be0e: 00 00 00 _Thread_Maximum_extensions = maximum_extensions; 10be11: 89 15 10 39 12 00 mov %edx,0x123910 _Thread_Ticks_per_timeslice = ticks_per_timeslice; 10be17: a3 40 38 12 00 mov %eax,0x123840 _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 10be1c: 83 ec 0c sub $0xc,%esp 10be1f: 0f b6 05 14 f9 11 00 movzbl 0x11f914,%eax 10be26: 40 inc %eax 10be27: 6b c0 0c imul $0xc,%eax,%eax 10be2a: 50 push %eax 10be2b: e8 30 0c 00 00 call 10ca60 <_Workspace_Allocate_or_fatal_error> <== ALWAYS TAKEN 10be30: a3 3c 38 12 00 mov %eax,0x12383c (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 10be35: 0f b6 0d 14 f9 11 00 movzbl 0x11f914,%ecx 10be3c: 31 d2 xor %edx,%edx 10be3e: 83 c4 10 add $0x10,%esp */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10be41: 8d 58 04 lea 0x4(%eax),%ebx 10be44: 89 18 mov %ebx,(%eax) the_chain->permanent_null = NULL; 10be46: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10be4d: 89 40 08 mov %eax,0x8(%eax) 10be50: 42 inc %edx 10be51: 83 c0 0c add $0xc,%eax 10be54: 39 ca cmp %ecx,%edx 10be56: 76 e9 jbe 10be41 <_Thread_Handler_initialization+0x95> /* * Initialize this class of objects. */ _Objects_Initialize_information( 10be58: 50 push %eax 10be59: 6a 08 push $0x8 10be5b: 6a 00 push $0x0 10be5d: 68 04 01 00 00 push $0x104 10be62: 6a 01 push $0x1 10be64: 6a 01 push $0x1 10be66: 6a 01 push $0x1 10be68: 68 cc 39 12 00 push $0x1239cc 10be6d: e8 36 f5 ff ff call 10b3a8 <_Objects_Initialize_information> <== ALWAYS TAKEN 10be72: 83 c4 20 add $0x20,%esp false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 10be75: 8b 5d fc mov -0x4(%ebp),%ebx 10be78: c9 leave 10be79: c3 ret 0010bbac <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10bbac: 55 push %ebp 10bbad: 89 e5 mov %esp,%ebp 10bbaf: 57 push %edi 10bbb0: 56 push %esi 10bbb1: 53 push %ebx 10bbb2: 83 ec 24 sub $0x24,%esp 10bbb5: 8b 5d 0c mov 0xc(%ebp),%ebx 10bbb8: 8b 75 14 mov 0x14(%ebp),%esi 10bbbb: 8a 55 18 mov 0x18(%ebp),%dl 10bbbe: 8a 45 20 mov 0x20(%ebp),%al 10bbc1: 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; 10bbc4: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10bbcb: 00 00 00 10bbce: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10bbd5: 00 00 00 10bbd8: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10bbdf: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10bbe2: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10bbe9: 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 ); 10bbec: 56 push %esi 10bbed: 53 push %ebx 10bbee: 88 55 e0 mov %dl,-0x20(%ebp) 10bbf1: e8 26 08 00 00 call 10c41c <_Thread_Stack_Allocate> <== ALWAYS TAKEN if ( !actual_stack_size || actual_stack_size < stack_size ) 10bbf6: 83 c4 10 add $0x10,%esp 10bbf9: 39 f0 cmp %esi,%eax 10bbfb: 8a 55 e0 mov -0x20(%ebp),%dl 10bbfe: 72 04 jb 10bc04 <_Thread_Initialize+0x58> 10bc00: 85 c0 test %eax,%eax 10bc02: 75 07 jne 10bc0b <_Thread_Initialize+0x5f> <== NEVER TAKEN 10bc04: 31 c0 xor %eax,%eax 10bc06: e9 98 01 00 00 jmp 10bda3 <_Thread_Initialize+0x1f7> <== ALWAYS TAKEN Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10bc0b: 8b 8b cc 00 00 00 mov 0xcc(%ebx),%ecx 10bc11: 89 8b c4 00 00 00 mov %ecx,0xc4(%ebx) the_stack->size = size; 10bc17: 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 ) { 10bc1d: 31 ff xor %edi,%edi 10bc1f: 84 d2 test %dl,%dl 10bc21: 74 19 je 10bc3c <_Thread_Initialize+0x90> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10bc23: 83 ec 0c sub $0xc,%esp 10bc26: 6a 6c push $0x6c 10bc28: e8 5f 0e 00 00 call 10ca8c <_Workspace_Allocate> <== ALWAYS TAKEN 10bc2d: 89 c7 mov %eax,%edi if ( !fp_area ) 10bc2f: 83 c4 10 add $0x10,%esp 10bc32: 31 f6 xor %esi,%esi 10bc34: 85 c0 test %eax,%eax 10bc36: 0f 84 fe 00 00 00 je 10bd3a <_Thread_Initialize+0x18e> goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 10bc3c: 89 bb e8 00 00 00 mov %edi,0xe8(%ebx) the_thread->Start.fp_context = fp_area; 10bc42: 89 bb c8 00 00 00 mov %edi,0xc8(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10bc48: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10bc4f: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10bc56: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10bc5d: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10bc64: a1 10 39 12 00 mov 0x123910,%eax 10bc69: 31 f6 xor %esi,%esi 10bc6b: 85 c0 test %eax,%eax 10bc6d: 74 1d je 10bc8c <_Thread_Initialize+0xe0> extensions_area = _Workspace_Allocate( 10bc6f: 83 ec 0c sub $0xc,%esp 10bc72: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10bc79: 50 push %eax 10bc7a: e8 0d 0e 00 00 call 10ca8c <_Workspace_Allocate> <== ALWAYS TAKEN 10bc7f: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10bc81: 83 c4 10 add $0x10,%esp 10bc84: 85 c0 test %eax,%eax 10bc86: 0f 84 ae 00 00 00 je 10bd3a <_Thread_Initialize+0x18e> goto failed; } the_thread->extensions = (void **) extensions_area; 10bc8c: 89 b3 fc 00 00 00 mov %esi,0xfc(%ebx) * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 10bc92: 85 f6 test %esi,%esi 10bc94: 74 1c je 10bcb2 <_Thread_Initialize+0x106> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10bc96: 8b 0d 10 39 12 00 mov 0x123910,%ecx 10bc9c: 31 c0 xor %eax,%eax 10bc9e: eb 0e jmp 10bcae <_Thread_Initialize+0x102> <== ALWAYS TAKEN the_thread->extensions[i] = NULL; 10bca0: 8b 93 fc 00 00 00 mov 0xfc(%ebx),%edx 10bca6: c7 04 82 00 00 00 00 movl $0x0,(%edx,%eax,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++ ) 10bcad: 40 inc %eax 10bcae: 39 c8 cmp %ecx,%eax 10bcb0: 76 ee jbe 10bca0 <_Thread_Initialize+0xf4> /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10bcb2: 8a 45 e7 mov -0x19(%ebp),%al 10bcb5: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10bcbb: 8b 45 24 mov 0x24(%ebp),%eax 10bcbe: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10bcc4: 8b 45 28 mov 0x28(%ebp),%eax 10bcc7: 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; 10bccd: 8b 45 2c mov 0x2c(%ebp),%eax 10bcd0: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10bcd6: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10bcdd: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10bce4: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 10bceb: 8b 45 1c mov 0x1c(%ebp),%eax 10bcee: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10bcf1: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10bcf7: 52 push %edx 10bcf8: 52 push %edx 10bcf9: 50 push %eax 10bcfa: 53 push %ebx 10bcfb: e8 70 05 00 00 call 10c270 <_Thread_Set_priority> <== ALWAYS TAKEN /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10bd00: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10bd07: 00 00 00 10bd0a: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10bd11: 00 00 00 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10bd14: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10bd18: 8b 45 08 mov 0x8(%ebp),%eax 10bd1b: 8b 40 1c mov 0x1c(%eax),%eax 10bd1e: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10bd21: 8b 45 30 mov 0x30(%ebp),%eax 10bd24: 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 ); 10bd27: 89 1c 24 mov %ebx,(%esp) 10bd2a: e8 69 0a 00 00 call 10c798 <_User_extensions_Thread_create> <== ALWAYS TAKEN 10bd2f: 88 c2 mov %al,%dl if ( extension_status ) 10bd31: 83 c4 10 add $0x10,%esp 10bd34: b0 01 mov $0x1,%al 10bd36: 84 d2 test %dl,%dl 10bd38: 75 69 jne 10bda3 <_Thread_Initialize+0x1f7> return true; failed: if ( the_thread->libc_reent ) 10bd3a: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 10bd40: 85 c0 test %eax,%eax 10bd42: 74 0c je 10bd50 <_Thread_Initialize+0x1a4> _Workspace_Free( the_thread->libc_reent ); 10bd44: 83 ec 0c sub $0xc,%esp 10bd47: 50 push %eax 10bd48: e8 58 0d 00 00 call 10caa5 <_Workspace_Free> <== ALWAYS TAKEN 10bd4d: 83 c4 10 add $0x10,%esp 10bd50: 31 d2 xor %edx,%edx for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10bd52: 8b 84 93 f0 00 00 00 mov 0xf0(%ebx,%edx,4),%eax 10bd59: 85 c0 test %eax,%eax 10bd5b: 74 12 je 10bd6f <_Thread_Initialize+0x1c3> _Workspace_Free( the_thread->API_Extensions[i] ); 10bd5d: 83 ec 0c sub $0xc,%esp 10bd60: 50 push %eax 10bd61: 89 55 e0 mov %edx,-0x20(%ebp) 10bd64: e8 3c 0d 00 00 call 10caa5 <_Workspace_Free> <== ALWAYS TAKEN 10bd69: 83 c4 10 add $0x10,%esp 10bd6c: 8b 55 e0 mov -0x20(%ebp),%edx failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) 10bd6f: 42 inc %edx 10bd70: 83 fa 03 cmp $0x3,%edx 10bd73: 75 dd jne 10bd52 <_Thread_Initialize+0x1a6> if ( the_thread->API_Extensions[i] ) _Workspace_Free( the_thread->API_Extensions[i] ); if ( extensions_area ) 10bd75: 85 f6 test %esi,%esi 10bd77: 74 0c je 10bd85 <_Thread_Initialize+0x1d9> (void) _Workspace_Free( extensions_area ); 10bd79: 83 ec 0c sub $0xc,%esp 10bd7c: 56 push %esi 10bd7d: e8 23 0d 00 00 call 10caa5 <_Workspace_Free> <== ALWAYS TAKEN 10bd82: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10bd85: 85 ff test %edi,%edi 10bd87: 74 0c je 10bd95 <_Thread_Initialize+0x1e9> (void) _Workspace_Free( fp_area ); 10bd89: 83 ec 0c sub $0xc,%esp 10bd8c: 57 push %edi 10bd8d: e8 13 0d 00 00 call 10caa5 <_Workspace_Free> <== ALWAYS TAKEN 10bd92: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10bd95: 83 ec 0c sub $0xc,%esp 10bd98: 53 push %ebx 10bd99: e8 ce 06 00 00 call 10c46c <_Thread_Stack_Free> <== ALWAYS TAKEN 10bd9e: 31 c0 xor %eax,%eax return false; 10bda0: 83 c4 10 add $0x10,%esp } 10bda3: 8d 65 f4 lea -0xc(%ebp),%esp 10bda6: 5b pop %ebx 10bda7: 5e pop %esi 10bda8: 5f pop %edi 10bda9: c9 leave 10bdaa: c3 ret 0010ead4 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 10ead4: 55 push %ebp 10ead5: 89 e5 mov %esp,%ebp 10ead7: 56 push %esi 10ead8: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10ead9: a1 30 39 12 00 mov 0x123930,%eax ready = executing->ready; 10eade: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10eae4: 9c pushf 10eae5: fa cli 10eae6: 59 pop %ecx if ( _Chain_Has_only_one_node( ready ) ) { 10eae7: 8b 1a mov (%edx),%ebx 10eae9: 3b 5a 08 cmp 0x8(%edx),%ebx 10eaec: 75 04 jne 10eaf2 <_Thread_Reset_timeslice+0x1e> _ISR_Enable( level ); 10eaee: 51 push %ecx 10eaef: 9d popf return; 10eaf0: eb 35 jmp 10eb27 <_Thread_Reset_timeslice+0x53> <== ALWAYS TAKEN ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10eaf2: 8b 30 mov (%eax),%esi previous = the_node->previous; 10eaf4: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10eaf7: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10eafa: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10eafc: 8d 5a 04 lea 0x4(%edx),%ebx 10eaff: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10eb01: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10eb04: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10eb07: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10eb09: 89 58 04 mov %ebx,0x4(%eax) } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10eb0c: 51 push %ecx 10eb0d: 9d popf 10eb0e: fa cli if ( _Thread_Is_heir( executing ) ) 10eb0f: 3b 05 00 39 12 00 cmp 0x123900,%eax 10eb15: 75 07 jne 10eb1e <_Thread_Reset_timeslice+0x4a> <== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; 10eb17: 8b 02 mov (%edx),%eax 10eb19: a3 00 39 12 00 mov %eax,0x123900 _Context_Switch_necessary = true; 10eb1e: c6 05 40 39 12 00 01 movb $0x1,0x123940 _ISR_Enable( level ); 10eb25: 51 push %ecx 10eb26: 9d popf } 10eb27: 5b pop %ebx 10eb28: 5e pop %esi 10eb29: c9 leave 10eb2a: c3 ret 0010cc70 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10cc70: 55 push %ebp 10cc71: 89 e5 mov %esp,%ebp 10cc73: 53 push %ebx 10cc74: 83 ec 04 sub $0x4,%esp 10cc77: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !_States_Is_dormant( the_thread->current_state ) ) { 10cc7a: 31 c0 xor %eax,%eax 10cc7c: f6 43 10 01 testb $0x1,0x10(%ebx) 10cc80: 75 6b jne 10cced <_Thread_Restart+0x7d> _Thread_Set_transient( the_thread ); 10cc82: 83 ec 0c sub $0xc,%esp 10cc85: 53 push %ebx 10cc86: e8 a1 01 00 00 call 10ce2c <_Thread_Set_transient> <== ALWAYS TAKEN _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 10cc8b: 83 c4 0c add $0xc,%esp 10cc8e: ff 75 10 pushl 0x10(%ebp) 10cc91: ff 75 0c pushl 0xc(%ebp) 10cc94: 53 push %ebx 10cc95: e8 62 29 00 00 call 10f5fc <_Thread_Reset> _Thread_Load_environment( the_thread ); 10cc9a: 89 1c 24 mov %ebx,(%esp) 10cc9d: e8 52 26 00 00 call 10f2f4 <_Thread_Load_environment> _Thread_Ready( the_thread ); 10cca2: 89 1c 24 mov %ebx,(%esp) 10cca5: e8 ae 28 00 00 call 10f558 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 10ccaa: 89 1c 24 mov %ebx,(%esp) 10ccad: e8 de 05 00 00 call 10d290 <_User_extensions_Thread_restart> <== ALWAYS TAKEN if ( _Thread_Is_executing ( the_thread ) ) 10ccb2: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) _Context_Restore_fp( &_Thread_Executing->fp_context ); #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 10ccb5: b0 01 mov $0x1,%al 10ccb7: 3b 1d dc 55 12 00 cmp 0x1255dc,%ebx 10ccbd: 75 2e jne 10cced <_Thread_Restart+0x7d> */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 10ccbf: 83 bb e8 00 00 00 00 cmpl $0x0,0xe8(%ebx) 10ccc6: 74 12 je 10ccda <_Thread_Restart+0x6a> _Context_Restore_fp( &_Thread_Executing->fp_context ); 10ccc8: 83 ec 0c sub $0xc,%esp 10cccb: 81 c3 e8 00 00 00 add $0xe8,%ebx 10ccd1: 53 push %ebx 10ccd2: e8 27 09 00 00 call 10d5fe <_CPU_Context_restore_fp> 10ccd7: 83 c4 10 add $0x10,%esp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 10ccda: 83 ec 0c sub $0xc,%esp 10ccdd: a1 dc 55 12 00 mov 0x1255dc,%eax 10cce2: 05 d0 00 00 00 add $0xd0,%eax 10cce7: 50 push %eax 10cce8: e8 00 09 00 00 call 10d5ed <_CPU_Context_restore> return true; } return false; } 10cced: 8b 5d fc mov -0x4(%ebp),%ebx 10ccf0: c9 leave 10ccf1: c3 ret 0010f4f0 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 10f4f0: 55 push %ebp 10f4f1: 89 e5 mov %esp,%ebp 10f4f3: 53 push %ebx 10f4f4: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10f4f7: 9c pushf 10f4f8: fa cli 10f4f9: 59 pop %ecx _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 10f4fa: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 10f4fd: f6 c2 02 test $0x2,%dl 10f500: 74 70 je 10f572 <_Thread_Resume+0x82> <== ALWAYS TAKEN 10f502: 83 e2 fd and $0xfffffffd,%edx current_state = 10f505: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 10f508: 85 d2 test %edx,%edx 10f50a: 75 66 jne 10f572 <_Thread_Resume+0x82> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10f50c: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10f512: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 10f519: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10f51c: 66 8b 15 d4 72 12 00 mov 0x1272d4,%dx 10f523: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10f529: 66 89 15 d4 72 12 00 mov %dx,0x1272d4 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10f530: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10f536: 8d 5a 04 lea 0x4(%edx),%ebx 10f539: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10f53b: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10f53e: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10f541: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10f543: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 10f546: 51 push %ecx 10f547: 9d popf 10f548: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 10f549: 8b 50 14 mov 0x14(%eax),%edx 10f54c: 8b 1d b0 72 12 00 mov 0x1272b0,%ebx 10f552: 3b 53 14 cmp 0x14(%ebx),%edx 10f555: 73 1b jae 10f572 <_Thread_Resume+0x82> _Thread_Heir = the_thread; 10f557: a3 b0 72 12 00 mov %eax,0x1272b0 if ( _Thread_Executing->is_preemptible || 10f55c: a1 e0 72 12 00 mov 0x1272e0,%eax 10f561: 80 78 75 00 cmpb $0x0,0x75(%eax) 10f565: 75 04 jne 10f56b <_Thread_Resume+0x7b> 10f567: 85 d2 test %edx,%edx 10f569: 75 07 jne 10f572 <_Thread_Resume+0x82> <== NEVER TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10f56b: c6 05 f0 72 12 00 01 movb $0x1,0x1272f0 } } } _ISR_Enable( level ); 10f572: 51 push %ecx 10f573: 9d popf } 10f574: 5b pop %ebx 10f575: c9 leave 10f576: c3 ret 0010c2d8 <_Thread_Set_state>: void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 10c2d8: 55 push %ebp 10c2d9: 89 e5 mov %esp,%ebp 10c2db: 56 push %esi 10c2dc: 53 push %ebx 10c2dd: 8b 45 08 mov 0x8(%ebp),%eax 10c2e0: 8b 4d 0c mov 0xc(%ebp),%ecx ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10c2e3: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10c2e9: 9c pushf 10c2ea: fa cli 10c2eb: 5b pop %ebx if ( !_States_Is_ready( the_thread->current_state ) ) { 10c2ec: 8b 70 10 mov 0x10(%eax),%esi 10c2ef: 85 f6 test %esi,%esi 10c2f1: 74 0c je 10c2ff <_Thread_Set_state+0x27> the_thread->current_state = 10c2f3: 09 f1 or %esi,%ecx 10c2f5: 89 48 10 mov %ecx,0x10(%eax) _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 10c2f8: 53 push %ebx 10c2f9: 9d popf return; 10c2fa: e9 a3 00 00 00 jmp 10c3a2 <_Thread_Set_state+0xca> <== ALWAYS TAKEN } the_thread->current_state = state; 10c2ff: 89 48 10 mov %ecx,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 10c302: 8b 0a mov (%edx),%ecx 10c304: 3b 4a 08 cmp 0x8(%edx),%ecx 10c307: 75 3b jne 10c344 <_Thread_Set_state+0x6c> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c309: 8d 4a 04 lea 0x4(%edx),%ecx 10c30c: 89 0a mov %ecx,(%edx) the_chain->permanent_null = NULL; 10c30e: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10c315: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10c318: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10c31e: 66 8b 88 9a 00 00 00 mov 0x9a(%eax),%cx 10c325: 66 21 0a and %cx,(%edx) _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 10c328: 66 83 3a 00 cmpw $0x0,(%edx) 10c32c: 75 20 jne 10c34e <_Thread_Set_state+0x76> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10c32e: 66 8b 15 24 39 12 00 mov 0x123924,%dx 10c335: 23 90 98 00 00 00 and 0x98(%eax),%edx 10c33b: 66 89 15 24 39 12 00 mov %dx,0x123924 10c342: eb 0a jmp 10c34e <_Thread_Set_state+0x76> <== ALWAYS TAKEN ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10c344: 8b 08 mov (%eax),%ecx previous = the_node->previous; 10c346: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10c349: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 10c34c: 89 0a mov %ecx,(%edx) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 10c34e: 53 push %ebx 10c34f: 9d popf 10c350: fa cli if ( _Thread_Is_heir( the_thread ) ) 10c351: 3b 05 00 39 12 00 cmp 0x123900,%eax 10c357: 75 38 jne 10c391 <_Thread_Set_state+0xb9> RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10c359: 66 8b 35 24 39 12 00 mov 0x123924,%si 10c360: 31 d2 xor %edx,%edx 10c362: 89 d1 mov %edx,%ecx 10c364: 66 0f bc ce bsf %si,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10c368: 0f b7 c9 movzwl %cx,%ecx 10c36b: 66 8b b4 09 9c 39 12 mov 0x12399c(%ecx,%ecx,1),%si 10c372: 00 10c373: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10c377: c1 e1 04 shl $0x4,%ecx 10c37a: 0f b7 d2 movzwl %dx,%edx 10c37d: 01 d1 add %edx,%ecx 10c37f: 6b c9 0c imul $0xc,%ecx,%ecx 10c382: 8b 35 3c 38 12 00 mov 0x12383c,%esi 10c388: 8b 14 31 mov (%ecx,%esi,1),%edx 10c38b: 89 15 00 39 12 00 mov %edx,0x123900 _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10c391: 3b 05 30 39 12 00 cmp 0x123930,%eax 10c397: 75 07 jne 10c3a0 <_Thread_Set_state+0xc8> _Context_Switch_necessary = true; 10c399: c6 05 40 39 12 00 01 movb $0x1,0x123940 _ISR_Enable( level ); 10c3a0: 53 push %ebx 10c3a1: 9d popf } 10c3a2: 5b pop %ebx 10c3a3: 5e pop %esi 10c3a4: c9 leave 10c3a5: c3 ret 0010c3a8 <_Thread_Set_transient>: */ void _Thread_Set_transient( Thread_Control *the_thread ) { 10c3a8: 55 push %ebp 10c3a9: 89 e5 mov %esp,%ebp 10c3ab: 56 push %esi 10c3ac: 53 push %ebx 10c3ad: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; uint32_t old_state; Chain_Control *ready; ready = the_thread->ready; 10c3b0: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10c3b6: 9c pushf 10c3b7: fa cli 10c3b8: 59 pop %ecx old_state = the_thread->current_state; 10c3b9: 8b 58 10 mov 0x10(%eax),%ebx the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state ); 10c3bc: 89 de mov %ebx,%esi 10c3be: 83 ce 04 or $0x4,%esi 10c3c1: 89 70 10 mov %esi,0x10(%eax) if ( _States_Is_ready( old_state ) ) { 10c3c4: 85 db test %ebx,%ebx 10c3c6: 75 4c jne 10c414 <_Thread_Set_transient+0x6c> if ( _Chain_Has_only_one_node( ready ) ) { 10c3c8: 8b 1a mov (%edx),%ebx 10c3ca: 3b 5a 08 cmp 0x8(%edx),%ebx 10c3cd: 75 3b jne 10c40a <_Thread_Set_transient+0x62> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c3cf: 8d 5a 04 lea 0x4(%edx),%ebx 10c3d2: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 10c3d4: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10c3db: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10c3de: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10c3e4: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 10c3eb: 66 21 1a and %bx,(%edx) _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 10c3ee: 66 83 3a 00 cmpw $0x0,(%edx) 10c3f2: 75 20 jne 10c414 <_Thread_Set_transient+0x6c> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10c3f4: 66 8b 15 24 39 12 00 mov 0x123924,%dx 10c3fb: 23 90 98 00 00 00 and 0x98(%eax),%edx 10c401: 66 89 15 24 39 12 00 mov %dx,0x123924 10c408: eb 0a jmp 10c414 <_Thread_Set_transient+0x6c> <== ALWAYS TAKEN ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10c40a: 8b 10 mov (%eax),%edx previous = the_node->previous; 10c40c: 8b 40 04 mov 0x4(%eax),%eax next->previous = previous; 10c40f: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 10c412: 89 10 mov %edx,(%eax) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); } _ISR_Enable( level ); 10c414: 51 push %ecx 10c415: 9d popf } 10c416: 5b pop %ebx 10c417: 5e pop %esi 10c418: c9 leave 10c419: c3 ret 0010c41c <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10c41c: 55 push %ebp 10c41d: 89 e5 mov %esp,%ebp 10c41f: 53 push %ebx 10c420: 83 ec 04 sub $0x4,%esp 10c423: a1 10 f9 11 00 mov 0x11f910,%eax 10c428: 8b 5d 0c mov 0xc(%ebp),%ebx 10c42b: 39 c3 cmp %eax,%ebx 10c42d: 73 02 jae 10c431 <_Thread_Stack_Allocate+0x15> 10c42f: 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 ) { 10c431: a1 38 f9 11 00 mov 0x11f938,%eax 10c436: 85 c0 test %eax,%eax 10c438: 74 08 je 10c442 <_Thread_Stack_Allocate+0x26> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 10c43a: 83 ec 0c sub $0xc,%esp 10c43d: 53 push %ebx 10c43e: ff d0 call *%eax 10c440: eb 0c jmp 10c44e <_Thread_Stack_Allocate+0x32> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 10c442: 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 ); 10c445: 83 ec 0c sub $0xc,%esp 10c448: 53 push %ebx 10c449: e8 3e 06 00 00 call 10ca8c <_Workspace_Allocate> <== ALWAYS TAKEN 10c44e: 83 c4 10 add $0x10,%esp } if ( !stack_addr ) 10c451: 31 d2 xor %edx,%edx 10c453: 85 c0 test %eax,%eax 10c455: 0f 95 c2 setne %dl 10c458: f7 da neg %edx 10c45a: 21 d3 and %edx,%ebx the_stack_size = 0; the_thread->Start.stack = stack_addr; 10c45c: 8b 55 08 mov 0x8(%ebp),%edx 10c45f: 89 82 cc 00 00 00 mov %eax,0xcc(%edx) return the_stack_size; } 10c465: 89 d8 mov %ebx,%eax 10c467: 8b 5d fc mov -0x4(%ebp),%ebx 10c46a: c9 leave 10c46b: c3 ret 0010c46c <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10c46c: 55 push %ebp 10c46d: 89 e5 mov %esp,%ebp 10c46f: 83 ec 08 sub $0x8,%esp * 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 ) 10c472: 8b 15 3c f9 11 00 mov 0x11f93c,%edx 10c478: 85 d2 test %edx,%edx 10c47a: 8b 45 08 mov 0x8(%ebp),%eax 10c47d: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax 10c483: 74 06 je 10c48b <_Thread_Stack_Free+0x1f> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10c485: 89 45 08 mov %eax,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10c488: 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 ); 10c489: ff e2 jmp *%edx else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10c48b: 89 45 08 mov %eax,0x8(%ebp) } 10c48e: 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 ); 10c48f: e9 11 06 00 00 jmp 10caa5 <_Workspace_Free> <== ALWAYS TAKEN 0010c4ec <_Thread_Start>: Thread_Start_types the_prototype, void *entry_point, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10c4ec: 55 push %ebp 10c4ed: 89 e5 mov %esp,%ebp 10c4ef: 53 push %ebx 10c4f0: 83 ec 04 sub $0x4,%esp 10c4f3: 8b 5d 08 mov 0x8(%ebp),%ebx if ( _States_Is_dormant( the_thread->current_state ) ) { 10c4f6: 31 c0 xor %eax,%eax 10c4f8: f6 43 10 01 testb $0x1,0x10(%ebx) 10c4fc: 74 42 je 10c540 <_Thread_Start+0x54> the_thread->Start.entry_point = (Thread_Entry) entry_point; 10c4fe: 8b 45 10 mov 0x10(%ebp),%eax 10c501: 89 83 9c 00 00 00 mov %eax,0x9c(%ebx) the_thread->Start.prototype = the_prototype; 10c507: 8b 45 0c mov 0xc(%ebp),%eax 10c50a: 89 83 a0 00 00 00 mov %eax,0xa0(%ebx) the_thread->Start.pointer_argument = pointer_argument; 10c510: 8b 45 14 mov 0x14(%ebp),%eax 10c513: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 10c519: 8b 45 18 mov 0x18(%ebp),%eax 10c51c: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) _Thread_Load_environment( the_thread ); 10c522: 83 ec 0c sub $0xc,%esp 10c525: 53 push %ebx 10c526: e8 a1 22 00 00 call 10e7cc <_Thread_Load_environment> _Thread_Ready( the_thread ); 10c52b: 89 1c 24 mov %ebx,(%esp) 10c52e: e8 fd 24 00 00 call 10ea30 <_Thread_Ready> <== ALWAYS TAKEN _User_extensions_Thread_start( the_thread ); 10c533: 89 1c 24 mov %ebx,(%esp) 10c536: e8 d1 02 00 00 call 10c80c <_User_extensions_Thread_start> <== ALWAYS TAKEN 10c53b: b0 01 mov $0x1,%al return true; 10c53d: 83 c4 10 add $0x10,%esp } return false; } 10c540: 8b 5d fc mov -0x4(%ebp),%ebx 10c543: c9 leave 10c544: c3 ret 0010c494 <_Thread_Start_multitasking>: * ready chain * select heir */ void _Thread_Start_multitasking( void ) { 10c494: 55 push %ebp 10c495: 89 e5 mov %esp,%ebp 10c497: 83 ec 08 sub $0x8,%esp 10c49a: c7 05 0c 3a 12 00 03 movl $0x3,0x123a0c 10c4a1: 00 00 00 * the system is shut down. */ _System_state_Set( SYSTEM_STATE_UP ); _Context_Switch_necessary = false; 10c4a4: c6 05 40 39 12 00 00 movb $0x0,0x123940 _Thread_Executing = _Thread_Heir; 10c4ab: a1 00 39 12 00 mov 0x123900,%eax 10c4b0: a3 30 39 12 00 mov %eax,0x123930 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) /* * don't need to worry about saving BSP's floating point state */ if ( _Thread_Heir->fp_context != NULL ) 10c4b5: 83 b8 e8 00 00 00 00 cmpl $0x0,0xe8(%eax) 10c4bc: 74 11 je 10c4cf <_Thread_Start_multitasking+0x3b> _Context_Restore_fp( &_Thread_Heir->fp_context ); 10c4be: 83 ec 0c sub $0xc,%esp 10c4c1: 05 e8 00 00 00 add $0xe8,%eax 10c4c6: 50 push %eax 10c4c7: e8 82 06 00 00 call 10cb4e <_CPU_Context_restore_fp> <== ALWAYS TAKEN 10c4cc: 83 c4 10 add $0x10,%esp #endif _Context_Switch( &_Thread_BSP_context, &_Thread_Heir->Registers ); 10c4cf: 50 push %eax 10c4d0: 50 push %eax 10c4d1: a1 00 39 12 00 mov 0x123900,%eax 10c4d6: 05 d0 00 00 00 add $0xd0,%eax 10c4db: 50 push %eax 10c4dc: 68 5c 38 12 00 push $0x12385c 10c4e1: e8 2a 06 00 00 call 10cb10 <_CPU_Context_switch> <== ALWAYS TAKEN 10c4e6: 83 c4 10 add $0x10,%esp } 10c4e9: c9 leave 10c4ea: c3 ret 0010eb2c <_Thread_Suspend>: */ void _Thread_Suspend( Thread_Control *the_thread ) { 10eb2c: 55 push %ebp 10eb2d: 89 e5 mov %esp,%ebp 10eb2f: 56 push %esi 10eb30: 53 push %ebx 10eb31: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10eb34: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10eb3a: 9c pushf 10eb3b: fa cli 10eb3c: 5b pop %ebx #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { 10eb3d: 8b 48 10 mov 0x10(%eax),%ecx 10eb40: 85 c9 test %ecx,%ecx 10eb42: 74 0d je 10eb51 <_Thread_Suspend+0x25> the_thread->current_state = 10eb44: 83 c9 02 or $0x2,%ecx 10eb47: 89 48 10 mov %ecx,0x10(%eax) _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 10eb4a: 53 push %ebx 10eb4b: 9d popf return; 10eb4c: e9 a7 00 00 00 jmp 10ebf8 <_Thread_Suspend+0xcc> <== ALWAYS TAKEN } the_thread->current_state = STATES_SUSPENDED; 10eb51: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 10eb58: 8b 0a mov (%edx),%ecx 10eb5a: 3b 4a 08 cmp 0x8(%edx),%ecx 10eb5d: 75 3b jne 10eb9a <_Thread_Suspend+0x6e> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10eb5f: 8d 4a 04 lea 0x4(%edx),%ecx 10eb62: 89 0a mov %ecx,(%edx) the_chain->permanent_null = NULL; 10eb64: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10eb6b: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10eb6e: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10eb74: 66 8b 88 9a 00 00 00 mov 0x9a(%eax),%cx 10eb7b: 66 21 0a and %cx,(%edx) _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 10eb7e: 66 83 3a 00 cmpw $0x0,(%edx) 10eb82: 75 20 jne 10eba4 <_Thread_Suspend+0x78> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10eb84: 66 8b 15 24 39 12 00 mov 0x123924,%dx 10eb8b: 23 90 98 00 00 00 and 0x98(%eax),%edx 10eb91: 66 89 15 24 39 12 00 mov %dx,0x123924 10eb98: eb 0a jmp 10eba4 <_Thread_Suspend+0x78> <== ALWAYS TAKEN ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10eb9a: 8b 08 mov (%eax),%ecx previous = the_node->previous; 10eb9c: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10eb9f: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 10eba2: 89 0a mov %ecx,(%edx) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 10eba4: 53 push %ebx 10eba5: 9d popf 10eba6: fa cli if ( _Thread_Is_heir( the_thread ) ) 10eba7: 3b 05 00 39 12 00 cmp 0x123900,%eax 10ebad: 75 38 jne 10ebe7 <_Thread_Suspend+0xbb> RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10ebaf: 66 8b 35 24 39 12 00 mov 0x123924,%si 10ebb6: 31 d2 xor %edx,%edx 10ebb8: 89 d1 mov %edx,%ecx 10ebba: 66 0f bc ce bsf %si,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10ebbe: 0f b7 c9 movzwl %cx,%ecx 10ebc1: 66 8b b4 09 9c 39 12 mov 0x12399c(%ecx,%ecx,1),%si 10ebc8: 00 10ebc9: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10ebcd: c1 e1 04 shl $0x4,%ecx 10ebd0: 0f b7 d2 movzwl %dx,%edx 10ebd3: 01 d1 add %edx,%ecx 10ebd5: 6b c9 0c imul $0xc,%ecx,%ecx 10ebd8: 8b 35 3c 38 12 00 mov 0x12383c,%esi 10ebde: 8b 14 31 mov (%ecx,%esi,1),%edx 10ebe1: 89 15 00 39 12 00 mov %edx,0x123900 _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10ebe7: 3b 05 30 39 12 00 cmp 0x123930,%eax 10ebed: 75 07 jne 10ebf6 <_Thread_Suspend+0xca> _Context_Switch_necessary = true; 10ebef: c6 05 40 39 12 00 01 movb $0x1,0x123940 _ISR_Enable( level ); 10ebf6: 53 push %ebx 10ebf7: 9d popf } 10ebf8: 5b pop %ebx 10ebf9: 5e pop %esi 10ebfa: c9 leave 10ebfb: c3 ret 0010c584 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10c584: 55 push %ebp 10c585: 89 e5 mov %esp,%ebp 10c587: 56 push %esi 10c588: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10c589: a1 30 39 12 00 mov 0x123930,%eax ready = executing->ready; 10c58e: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10c594: 9c pushf 10c595: fa cli 10c596: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10c597: 8b 1a mov (%edx),%ebx 10c599: 3b 5a 08 cmp 0x8(%edx),%ebx 10c59c: 74 2e je 10c5cc <_Thread_Yield_processor+0x48> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10c59e: 8b 30 mov (%eax),%esi previous = the_node->previous; 10c5a0: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10c5a3: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10c5a6: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10c5a8: 8d 5a 04 lea 0x4(%edx),%ebx 10c5ab: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10c5ad: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10c5b0: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10c5b3: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10c5b5: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10c5b8: 51 push %ecx 10c5b9: 9d popf 10c5ba: fa cli if ( _Thread_Is_heir( executing ) ) 10c5bb: 3b 05 00 39 12 00 cmp 0x123900,%eax 10c5c1: 75 11 jne 10c5d4 <_Thread_Yield_processor+0x50> <== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; 10c5c3: 8b 02 mov (%edx),%eax 10c5c5: a3 00 39 12 00 mov %eax,0x123900 10c5ca: eb 08 jmp 10c5d4 <_Thread_Yield_processor+0x50> <== ALWAYS TAKEN _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10c5cc: 3b 05 00 39 12 00 cmp 0x123900,%eax 10c5d2: 74 07 je 10c5db <_Thread_Yield_processor+0x57> <== NEVER TAKEN _Context_Switch_necessary = true; 10c5d4: c6 05 40 39 12 00 01 movb $0x1,0x123940 _ISR_Enable( level ); 10c5db: 51 push %ecx 10c5dc: 9d popf } 10c5dd: 5b pop %ebx 10c5de: 5e pop %esi 10c5df: c9 leave 10c5e0: c3 ret 0010b62c <_Thread_blocking_operation_Cancel>: Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 10b62c: 55 push %ebp 10b62d: 89 e5 mov %esp,%ebp 10b62f: 53 push %ebx 10b630: 83 ec 04 sub $0x4,%esp 10b633: 8b 5d 0c mov 0xc(%ebp),%ebx 10b636: 8b 45 10 mov 0x10(%ebp),%eax #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 10b639: 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 ) ) { 10b640: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b644: 75 1a jne 10b660 <_Thread_blocking_operation_Cancel+0x34> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10b646: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10b64d: 50 push %eax 10b64e: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10b64f: 83 ec 0c sub $0xc,%esp 10b652: 8d 43 48 lea 0x48(%ebx),%eax 10b655: 50 push %eax 10b656: e8 35 13 00 00 call 10c990 <_Watchdog_Remove> 10b65b: 83 c4 10 add $0x10,%esp 10b65e: eb 02 jmp 10b662 <_Thread_blocking_operation_Cancel+0x36> <== ALWAYS TAKEN } else _ISR_Enable( level ); 10b660: 50 push %eax 10b661: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b662: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10b669: 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 } 10b66c: 8b 5d fc mov -0x4(%ebp),%ebx 10b66f: c9 leave 10b670: e9 23 01 00 00 jmp 10b798 <_Thread_Clear_state> <== ALWAYS TAKEN 0010e85c <_Thread_queue_Dequeue_fifo>: */ Thread_Control *_Thread_queue_Dequeue_fifo( Thread_queue_Control *the_thread_queue ) { 10e85c: 55 push %ebp 10e85d: 89 e5 mov %esp,%ebp 10e85f: 53 push %ebx 10e860: 83 ec 04 sub $0x4,%esp 10e863: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level ); 10e866: 9c pushf 10e867: fa cli 10e868: 5a pop %edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e869: 8b 18 mov (%eax),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e86b: 8d 48 04 lea 0x4(%eax),%ecx 10e86e: 39 cb cmp %ecx,%ebx 10e870: 74 41 je 10e8b3 <_Thread_queue_Dequeue_fifo+0x57> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 10e872: 8b 0b mov (%ebx),%ecx the_chain->first = new_first; 10e874: 89 08 mov %ecx,(%eax) new_first->previous = _Chain_Head(the_chain); 10e876: 89 41 04 mov %eax,0x4(%ecx) if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { the_thread = (Thread_Control *) _Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo ); the_thread->Wait.queue = NULL; 10e879: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10e880: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10e884: 74 06 je 10e88c <_Thread_queue_Dequeue_fifo+0x30> _ISR_Enable( level ); 10e886: 52 push %edx 10e887: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10e888: 51 push %ecx 10e889: 51 push %ecx 10e88a: eb 17 jmp 10e8a3 <_Thread_queue_Dequeue_fifo+0x47> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10e88c: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10e893: 52 push %edx 10e894: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10e895: 83 ec 0c sub $0xc,%esp 10e898: 8d 43 48 lea 0x48(%ebx),%eax 10e89b: 50 push %eax 10e89c: e8 ef e0 ff ff call 10c990 <_Watchdog_Remove> 10e8a1: 58 pop %eax 10e8a2: 5a pop %edx 10e8a3: 68 f8 ff 03 10 push $0x1003fff8 10e8a8: 53 push %ebx 10e8a9: e8 ea ce ff ff call 10b798 <_Thread_Clear_state> 10e8ae: 83 c4 10 add $0x10,%esp 10e8b1: eb 04 jmp 10e8b7 <_Thread_queue_Dequeue_fifo+0x5b> <== ALWAYS TAKEN #endif return the_thread; } _ISR_Enable( level ); 10e8b3: 52 push %edx 10e8b4: 9d popf 10e8b5: 31 db xor %ebx,%ebx return NULL; } 10e8b7: 89 d8 mov %ebx,%eax 10e8b9: 8b 5d fc mov -0x4(%ebp),%ebx 10e8bc: c9 leave 10e8bd: c3 ret 0010bec4 <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10bec4: 55 push %ebp 10bec5: 89 e5 mov %esp,%ebp 10bec7: 57 push %edi 10bec8: 56 push %esi 10bec9: 53 push %ebx 10beca: 83 ec 1c sub $0x1c,%esp 10becd: 8b 4d 08 mov 0x8(%ebp),%ecx Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 10bed0: 9c pushf 10bed1: fa cli 10bed2: 8f 45 e4 popl -0x1c(%ebp) 10bed5: 89 ca mov %ecx,%edx 10bed7: 31 c0 xor %eax,%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10bed9: 8d 5a 04 lea 0x4(%edx),%ebx 10bedc: 39 1a cmp %ebx,(%edx) 10bede: 74 1e je 10befe <_Thread_queue_Dequeue_priority+0x3a> 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 *) 10bee0: 6b c0 0c imul $0xc,%eax,%eax 10bee3: 8b 1c 08 mov (%eax,%ecx,1),%ebx */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10bee6: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) new_first_node = the_thread->Wait.Block2n.first; 10beed: 8b 43 38 mov 0x38(%ebx),%eax new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 10bef0: 8b 13 mov (%ebx),%edx previous_node = the_thread->Object.Node.previous; 10bef2: 8b 4b 04 mov 0x4(%ebx),%ecx 10bef5: 8d 73 3c lea 0x3c(%ebx),%esi 10bef8: 39 f0 cmp %esi,%eax 10befa: 75 13 jne 10bf0f <_Thread_queue_Dequeue_priority+0x4b> 10befc: eb 3b jmp 10bf39 <_Thread_queue_Dequeue_priority+0x75> <== ALWAYS TAKEN Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10befe: 40 inc %eax 10beff: 83 c2 0c add $0xc,%edx Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 10bf02: 83 f8 04 cmp $0x4,%eax 10bf05: 75 d2 jne 10bed9 <_Thread_queue_Dequeue_priority+0x15> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10bf07: ff 75 e4 pushl -0x1c(%ebp) 10bf0a: 9d popf 10bf0b: 31 db xor %ebx,%ebx return NULL; 10bf0d: eb 64 jmp 10bf73 <_Thread_queue_Dequeue_priority+0xaf> <== ALWAYS TAKEN new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; previous_node = the_thread->Object.Node.previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; 10bf0f: 8b 73 40 mov 0x40(%ebx),%esi new_second_node = new_first_node->next; 10bf12: 8b 38 mov (%eax),%edi previous_node->next = new_first_node; 10bf14: 89 01 mov %eax,(%ecx) next_node->previous = new_first_node; 10bf16: 89 42 04 mov %eax,0x4(%edx) new_first_node->next = next_node; 10bf19: 89 10 mov %edx,(%eax) new_first_node->previous = previous_node; 10bf1b: 89 48 04 mov %ecx,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10bf1e: 8b 53 38 mov 0x38(%ebx),%edx 10bf21: 3b 53 40 cmp 0x40(%ebx),%edx 10bf24: 74 18 je 10bf3e <_Thread_queue_Dequeue_priority+0x7a> /* > two threads on 2-n */ new_second_node->previous = 10bf26: 8d 50 38 lea 0x38(%eax),%edx 10bf29: 89 57 04 mov %edx,0x4(%edi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 10bf2c: 89 78 38 mov %edi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 10bf2f: 89 70 40 mov %esi,0x40(%eax) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 10bf32: 83 c0 3c add $0x3c,%eax 10bf35: 89 06 mov %eax,(%esi) 10bf37: eb 05 jmp 10bf3e <_Thread_queue_Dequeue_priority+0x7a> <== ALWAYS TAKEN } } else { previous_node->next = next_node; 10bf39: 89 11 mov %edx,(%ecx) next_node->previous = previous_node; 10bf3b: 89 4a 04 mov %ecx,0x4(%edx) } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10bf3e: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10bf42: 74 08 je 10bf4c <_Thread_queue_Dequeue_priority+0x88> _ISR_Enable( level ); 10bf44: ff 75 e4 pushl -0x1c(%ebp) 10bf47: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10bf48: 51 push %ecx 10bf49: 51 push %ecx 10bf4a: eb 19 jmp 10bf65 <_Thread_queue_Dequeue_priority+0xa1> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10bf4c: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10bf53: ff 75 e4 pushl -0x1c(%ebp) 10bf56: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10bf57: 83 ec 0c sub $0xc,%esp 10bf5a: 8d 43 48 lea 0x48(%ebx),%eax 10bf5d: 50 push %eax 10bf5e: e8 2d 0a 00 00 call 10c990 <_Watchdog_Remove> 10bf63: 58 pop %eax 10bf64: 5a pop %edx 10bf65: 68 f8 ff 03 10 push $0x1003fff8 10bf6a: 53 push %ebx 10bf6b: e8 28 f8 ff ff call 10b798 <_Thread_Clear_state> <== ALWAYS TAKEN 10bf70: 83 c4 10 add $0x10,%esp #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 10bf73: 89 d8 mov %ebx,%eax 10bf75: 8d 65 f4 lea -0xc(%ebp),%esp 10bf78: 5b pop %ebx 10bf79: 5e pop %esi 10bf7a: 5f pop %edi 10bf7b: c9 leave 10bf7c: c3 ret 0010e8c0 <_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 ) { 10e8c0: 55 push %ebp 10e8c1: 89 e5 mov %esp,%ebp 10e8c3: 56 push %esi 10e8c4: 53 push %ebx 10e8c5: 8b 55 08 mov 0x8(%ebp),%edx 10e8c8: 8b 4d 0c mov 0xc(%ebp),%ecx Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 10e8cb: 9c pushf 10e8cc: fa cli 10e8cd: 5b pop %ebx sync_state = the_thread_queue->sync_state; 10e8ce: 8b 42 30 mov 0x30(%edx),%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10e8d1: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 10e8d8: 83 f8 01 cmp $0x1,%eax 10e8db: 75 17 jne 10e8f4 <_Thread_queue_Enqueue_fifo+0x34> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10e8dd: 8d 72 04 lea 0x4(%edx),%esi 10e8e0: 89 31 mov %esi,(%ecx) old_last_node = the_chain->last; 10e8e2: 8b 72 08 mov 0x8(%edx),%esi the_chain->last = the_node; 10e8e5: 89 4a 08 mov %ecx,0x8(%edx) old_last_node->next = the_node; 10e8e8: 89 0e mov %ecx,(%esi) the_node->previous = old_last_node; 10e8ea: 89 71 04 mov %esi,0x4(%ecx) _Chain_Append_unprotected( &the_thread_queue->Queues.Fifo, &the_thread->Object.Node ); the_thread->Wait.queue = the_thread_queue; 10e8ed: 89 51 44 mov %edx,0x44(%ecx) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 10e8f0: 53 push %ebx 10e8f1: 9d popf return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10e8f2: eb 05 jmp 10e8f9 <_Thread_queue_Enqueue_fifo+0x39> <== ALWAYS TAKEN * 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; 10e8f4: 8b 55 10 mov 0x10(%ebp),%edx 10e8f7: 89 1a mov %ebx,(%edx) return sync_state; } 10e8f9: 5b pop %ebx 10e8fa: 5e pop %esi 10e8fb: c9 leave 10e8fc: c3 ret 0010c00c <_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 ) { 10c00c: 55 push %ebp 10c00d: 89 e5 mov %esp,%ebp 10c00f: 57 push %edi 10c010: 56 push %esi 10c011: 53 push %ebx 10c012: 83 ec 10 sub $0x10,%esp 10c015: 8b 4d 08 mov 0x8(%ebp),%ecx 10c018: 8b 45 0c mov 0xc(%ebp),%eax */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c01b: 8d 50 3c lea 0x3c(%eax),%edx 10c01e: 89 50 38 mov %edx,0x38(%eax) the_chain->permanent_null = NULL; 10c021: c7 40 3c 00 00 00 00 movl $0x0,0x3c(%eax) the_chain->last = _Chain_Head(the_chain); 10c028: 8d 50 38 lea 0x38(%eax),%edx 10c02b: 89 50 40 mov %edx,0x40(%eax) Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 10c02e: 8b 58 14 mov 0x14(%eax),%ebx header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10c031: 89 de mov %ebx,%esi 10c033: c1 ee 06 shr $0x6,%esi 10c036: 6b f6 0c imul $0xc,%esi,%esi 10c039: 8d 34 31 lea (%ecx,%esi,1),%esi block_state = the_thread_queue->state; 10c03c: 8b 79 38 mov 0x38(%ecx),%edi if ( _Thread_queue_Is_reverse_search( priority ) ) 10c03f: f6 c3 20 test $0x20,%bl 10c042: 75 70 jne 10c0b4 <_Thread_queue_Enqueue_priority+0xa8> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10c044: 8d 56 04 lea 0x4(%esi),%edx 10c047: 89 55 e8 mov %edx,-0x18(%ebp) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10c04a: 9c pushf 10c04b: fa cli 10c04c: 8f 45 f0 popl -0x10(%ebp) search_thread = (Thread_Control *) header->first; 10c04f: 8b 16 mov (%esi),%edx 10c051: c7 45 ec ff ff ff ff movl $0xffffffff,-0x14(%ebp) 10c058: 89 75 e4 mov %esi,-0x1c(%ebp) while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10c05b: eb 1f jmp 10c07c <_Thread_queue_Enqueue_priority+0x70> <== ALWAYS TAKEN search_priority = search_thread->current_priority; 10c05d: 8b 72 14 mov 0x14(%edx),%esi 10c060: 89 75 ec mov %esi,-0x14(%ebp) if ( priority <= search_priority ) 10c063: 39 f3 cmp %esi,%ebx 10c065: 76 1a jbe 10c081 <_Thread_queue_Enqueue_priority+0x75> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10c067: ff 75 f0 pushl -0x10(%ebp) 10c06a: 9d popf 10c06b: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c06c: 85 7a 10 test %edi,0x10(%edx) 10c06f: 75 09 jne 10c07a <_Thread_queue_Enqueue_priority+0x6e> <== NEVER TAKEN 10c071: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED _ISR_Enable( level ); 10c074: ff 75 f0 pushl -0x10(%ebp) <== NOT EXECUTED 10c077: 9d popf <== NOT EXECUTED goto restart_forward_search; 10c078: eb d0 jmp 10c04a <_Thread_queue_Enqueue_priority+0x3e> <== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10c07a: 8b 12 mov (%edx),%edx 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 ) ) { 10c07c: 3b 55 e8 cmp -0x18(%ebp),%edx 10c07f: 75 dc jne 10c05d <_Thread_queue_Enqueue_priority+0x51> 10c081: 8b 75 f0 mov -0x10(%ebp),%esi } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10c084: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10c088: 0f 85 a9 00 00 00 jne 10c137 <_Thread_queue_Enqueue_priority+0x12b> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c08e: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10c095: 3b 5d ec cmp -0x14(%ebp),%ebx 10c098: 0f 84 82 00 00 00 je 10c120 <_Thread_queue_Enqueue_priority+0x114> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10c09e: 8b 5a 04 mov 0x4(%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10c0a1: 89 10 mov %edx,(%eax) the_node->previous = previous_node; 10c0a3: 89 58 04 mov %ebx,0x4(%eax) previous_node->next = the_node; 10c0a6: 89 03 mov %eax,(%ebx) search_node->previous = the_node; 10c0a8: 89 42 04 mov %eax,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10c0ab: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c0ae: ff 75 f0 pushl -0x10(%ebp) 10c0b1: 9d popf 10c0b2: eb 65 jmp 10c119 <_Thread_queue_Enqueue_priority+0x10d> <== ALWAYS TAKEN return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 10c0b4: 0f b6 15 14 f9 11 00 movzbl 0x11f914,%edx 10c0bb: 42 inc %edx 10c0bc: 89 55 ec mov %edx,-0x14(%ebp) _ISR_Disable( level ); 10c0bf: 9c pushf 10c0c0: fa cli 10c0c1: 8f 45 f0 popl -0x10(%ebp) search_thread = (Thread_Control *) header->last; 10c0c4: 8b 56 08 mov 0x8(%esi),%edx 10c0c7: 89 75 e8 mov %esi,-0x18(%ebp) while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10c0ca: eb 20 jmp 10c0ec <_Thread_queue_Enqueue_priority+0xe0> <== ALWAYS TAKEN search_priority = search_thread->current_priority; 10c0cc: 8b 72 14 mov 0x14(%edx),%esi 10c0cf: 89 75 ec mov %esi,-0x14(%ebp) if ( priority >= search_priority ) 10c0d2: 39 f3 cmp %esi,%ebx 10c0d4: 73 1b jae 10c0f1 <_Thread_queue_Enqueue_priority+0xe5> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10c0d6: ff 75 f0 pushl -0x10(%ebp) 10c0d9: 9d popf 10c0da: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c0db: 85 7a 10 test %edi,0x10(%edx) 10c0de: 75 09 jne 10c0e9 <_Thread_queue_Enqueue_priority+0xdd> 10c0e0: 8b 75 e8 mov -0x18(%ebp),%esi _ISR_Enable( level ); 10c0e3: ff 75 f0 pushl -0x10(%ebp) 10c0e6: 9d popf goto restart_reverse_search; 10c0e7: eb cb jmp 10c0b4 <_Thread_queue_Enqueue_priority+0xa8> <== ALWAYS TAKEN } search_thread = (Thread_Control *) 10c0e9: 8b 52 04 mov 0x4(%edx),%edx 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 ) ) { 10c0ec: 3b 55 e8 cmp -0x18(%ebp),%edx 10c0ef: 75 db jne 10c0cc <_Thread_queue_Enqueue_priority+0xc0> 10c0f1: 8b 75 f0 mov -0x10(%ebp),%esi } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10c0f4: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10c0f8: 75 3d jne 10c137 <_Thread_queue_Enqueue_priority+0x12b> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c0fa: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10c101: 3b 5d ec cmp -0x14(%ebp),%ebx 10c104: 74 1a je 10c120 <_Thread_queue_Enqueue_priority+0x114> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10c106: 8b 1a mov (%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10c108: 89 18 mov %ebx,(%eax) the_node->previous = search_node; 10c10a: 89 50 04 mov %edx,0x4(%eax) search_node->next = the_node; 10c10d: 89 02 mov %eax,(%edx) next_node->previous = the_node; 10c10f: 89 43 04 mov %eax,0x4(%ebx) the_thread->Wait.queue = the_thread_queue; 10c112: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c115: ff 75 f0 pushl -0x10(%ebp) 10c118: 9d popf 10c119: b8 01 00 00 00 mov $0x1,%eax return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10c11e: eb 1f jmp 10c13f <_Thread_queue_Enqueue_priority+0x133> <== ALWAYS TAKEN 10c120: 83 c2 3c add $0x3c,%edx equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 10c123: 8b 5a 04 mov 0x4(%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10c126: 89 10 mov %edx,(%eax) the_node->previous = previous_node; 10c128: 89 58 04 mov %ebx,0x4(%eax) previous_node->next = the_node; 10c12b: 89 03 mov %eax,(%ebx) search_node->previous = the_node; 10c12d: 89 42 04 mov %eax,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10c130: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c133: 56 push %esi 10c134: 9d popf 10c135: eb e2 jmp 10c119 <_Thread_queue_Enqueue_priority+0x10d> <== ALWAYS TAKEN * 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; 10c137: 8b 45 10 mov 0x10(%ebp),%eax 10c13a: 89 30 mov %esi,(%eax) return the_thread_queue->sync_state; 10c13c: 8b 41 30 mov 0x30(%ecx),%eax } 10c13f: 83 c4 10 add $0x10,%esp 10c142: 5b pop %ebx 10c143: 5e pop %esi 10c144: 5f pop %edi 10c145: c9 leave 10c146: c3 ret 0010bf80 <_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 ) { 10bf80: 55 push %ebp 10bf81: 89 e5 mov %esp,%ebp 10bf83: 57 push %edi 10bf84: 56 push %esi 10bf85: 53 push %ebx 10bf86: 83 ec 24 sub $0x24,%esp 10bf89: 8b 75 08 mov 0x8(%ebp),%esi 10bf8c: 8b 7d 0c mov 0xc(%ebp),%edi Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; 10bf8f: 8b 1d 30 39 12 00 mov 0x123930,%ebx else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 10bf95: ff 76 38 pushl 0x38(%esi) 10bf98: 53 push %ebx 10bf99: e8 3a 03 00 00 call 10c2d8 <_Thread_Set_state> <== ALWAYS TAKEN /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 10bf9e: 83 c4 10 add $0x10,%esp 10bfa1: 85 ff test %edi,%edi 10bfa3: 74 30 je 10bfd5 <_Thread_queue_Enqueue_with_handler+0x55> _Watchdog_Initialize( 10bfa5: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10bfa8: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10bfaf: 8b 55 10 mov 0x10(%ebp),%edx 10bfb2: 89 53 64 mov %edx,0x64(%ebx) the_watchdog->id = id; 10bfb5: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10bfb8: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10bfbf: 89 7b 54 mov %edi,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10bfc2: 57 push %edi 10bfc3: 57 push %edi 10bfc4: 8d 43 48 lea 0x48(%ebx),%eax 10bfc7: 50 push %eax 10bfc8: 68 50 39 12 00 push $0x123950 10bfcd: e8 a6 08 00 00 call 10c878 <_Watchdog_Insert> <== ALWAYS TAKEN 10bfd2: 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 ) 10bfd5: b8 0c c0 10 00 mov $0x10c00c,%eax 10bfda: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10bfde: 74 05 je 10bfe5 <_Thread_queue_Enqueue_with_handler+0x65> 10bfe0: b8 c0 e8 10 00 mov $0x10e8c0,%eax enqueue_p = _Thread_queue_Enqueue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ enqueue_p = _Thread_queue_Enqueue_fifo; sync_state = (*enqueue_p)( the_thread_queue, the_thread, &level ); 10bfe5: 51 push %ecx 10bfe6: 8d 55 e4 lea -0x1c(%ebp),%edx 10bfe9: 52 push %edx 10bfea: 53 push %ebx 10bfeb: 56 push %esi 10bfec: ff d0 call *%eax if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10bfee: 83 c4 10 add $0x10,%esp 10bff1: 83 f8 01 cmp $0x1,%eax 10bff4: 74 0e je 10c004 <_Thread_queue_Enqueue_with_handler+0x84> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); 10bff6: 52 push %edx 10bff7: ff 75 e4 pushl -0x1c(%ebp) 10bffa: 53 push %ebx 10bffb: 50 push %eax 10bffc: e8 2b f6 ff ff call 10b62c <_Thread_blocking_operation_Cancel> 10c001: 83 c4 10 add $0x10,%esp } 10c004: 8d 65 f4 lea -0xc(%ebp),%esp 10c007: 5b pop %ebx 10c008: 5e pop %esi 10c009: 5f pop %edi 10c00a: c9 leave 10c00b: c3 ret 0010e900 <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10e900: 55 push %ebp 10e901: 89 e5 mov %esp,%ebp 10e903: 83 ec 08 sub $0x8,%esp 10e906: 8b 45 08 mov 0x8(%ebp),%eax 10e909: 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 ) 10e90c: 83 78 34 01 cmpl $0x1,0x34(%eax) 10e910: 75 0f jne 10e921 <_Thread_queue_Extract+0x21> _Thread_queue_Extract_priority( the_thread_queue, the_thread ); 10e912: 51 push %ecx 10e913: 6a 00 push $0x0 10e915: 52 push %edx 10e916: 50 push %eax 10e917: e8 14 00 00 00 call 10e930 <_Thread_queue_Extract_priority_helper> <== ALWAYS TAKEN 10e91c: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 10e91f: c9 leave 10e920: c3 ret * 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 ); 10e921: 89 55 0c mov %edx,0xc(%ebp) 10e924: 89 45 08 mov %eax,0x8(%ebp) } 10e927: 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 ); 10e928: e9 9b 14 00 00 jmp 10fdc8 <_Thread_queue_Extract_fifo> 0010fdc8 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 10fdc8: 55 push %ebp 10fdc9: 89 e5 mov %esp,%ebp 10fdcb: 53 push %ebx 10fdcc: 83 ec 04 sub $0x4,%esp 10fdcf: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10fdd2: 9c pushf 10fdd3: fa cli 10fdd4: 58 pop %eax if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10fdd5: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 10fddc: 75 07 jne 10fde5 <_Thread_queue_Extract_fifo+0x1d> _ISR_Enable( level ); 10fdde: 50 push %eax 10fddf: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 10fde0: 8b 5d fc mov -0x4(%ebp),%ebx 10fde3: c9 leave 10fde4: c3 ret ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10fde5: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 10fde7: 8b 53 04 mov 0x4(%ebx),%edx next->previous = previous; 10fdea: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 10fded: 89 0a mov %ecx,(%edx) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 10fdef: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10fdf6: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10fdfa: 74 04 je 10fe00 <_Thread_queue_Extract_fifo+0x38> _ISR_Enable( level ); 10fdfc: 50 push %eax 10fdfd: 9d popf 10fdfe: eb 18 jmp 10fe18 <_Thread_queue_Extract_fifo+0x50> <== ALWAYS TAKEN 10fe00: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10fe07: 50 push %eax 10fe08: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10fe09: 83 ec 0c sub $0xc,%esp 10fe0c: 8d 43 48 lea 0x48(%ebx),%eax 10fe0f: 50 push %eax 10fe10: e8 7b cb ff ff call 10c990 <_Watchdog_Remove> 10fe15: 83 c4 10 add $0x10,%esp RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10fe18: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10fe1f: 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 } 10fe22: 8b 5d fc mov -0x4(%ebp),%ebx 10fe25: c9 leave 10fe26: e9 6d b9 ff ff jmp 10b798 <_Thread_Clear_state> 0010e930 <_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 ) { 10e930: 55 push %ebp 10e931: 89 e5 mov %esp,%ebp 10e933: 57 push %edi 10e934: 56 push %esi 10e935: 53 push %ebx 10e936: 83 ec 1c sub $0x1c,%esp 10e939: 8b 5d 0c mov 0xc(%ebp),%ebx 10e93c: 8a 45 10 mov 0x10(%ebp),%al 10e93f: 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 ); 10e942: 9c pushf 10e943: fa cli 10e944: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10e947: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 10e94e: 75 09 jne 10e959 <_Thread_queue_Extract_priority_helper+0x29> _ISR_Enable( level ); 10e950: ff 75 e4 pushl -0x1c(%ebp) 10e953: 9d popf return; 10e954: e9 86 00 00 00 jmp 10e9df <_Thread_queue_Extract_priority_helper+0xaf> <== ALWAYS TAKEN /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 10e959: 8b 13 mov (%ebx),%edx previous_node = the_node->previous; 10e95b: 8b 4b 04 mov 0x4(%ebx),%ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e95e: 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; 10e961: 8d 73 3c lea 0x3c(%ebx),%esi 10e964: 39 f0 cmp %esi,%eax 10e966: 74 2a je 10e992 <_Thread_queue_Extract_priority_helper+0x62> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 10e968: 8b 73 40 mov 0x40(%ebx),%esi new_second_node = new_first_node->next; 10e96b: 8b 38 mov (%eax),%edi previous_node->next = new_first_node; 10e96d: 89 01 mov %eax,(%ecx) next_node->previous = new_first_node; 10e96f: 89 42 04 mov %eax,0x4(%edx) new_first_node->next = next_node; 10e972: 89 10 mov %edx,(%eax) new_first_node->previous = previous_node; 10e974: 89 48 04 mov %ecx,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10e977: 8b 53 38 mov 0x38(%ebx),%edx 10e97a: 3b 53 40 cmp 0x40(%ebx),%edx 10e97d: 74 18 je 10e997 <_Thread_queue_Extract_priority_helper+0x67> /* > two threads on 2-n */ new_second_node->previous = 10e97f: 8d 50 38 lea 0x38(%eax),%edx 10e982: 89 57 04 mov %edx,0x4(%edi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 10e985: 89 78 38 mov %edi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 10e988: 89 70 40 mov %esi,0x40(%eax) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 10e98b: 83 c0 3c add $0x3c,%eax 10e98e: 89 06 mov %eax,(%esi) 10e990: eb 05 jmp 10e997 <_Thread_queue_Extract_priority_helper+0x67> <== ALWAYS TAKEN } } else { previous_node->next = next_node; 10e992: 89 11 mov %edx,(%ecx) next_node->previous = previous_node; 10e994: 89 4a 04 mov %ecx,0x4(%edx) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 10e997: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 10e99b: 74 06 je 10e9a3 <_Thread_queue_Extract_priority_helper+0x73> _ISR_Enable( level ); 10e99d: ff 75 e4 pushl -0x1c(%ebp) 10e9a0: 9d popf 10e9a1: eb 3c jmp 10e9df <_Thread_queue_Extract_priority_helper+0xaf> <== ALWAYS TAKEN return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10e9a3: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10e9a7: 74 06 je 10e9af <_Thread_queue_Extract_priority_helper+0x7f> _ISR_Enable( level ); 10e9a9: ff 75 e4 pushl -0x1c(%ebp) 10e9ac: 9d popf 10e9ad: eb 1a jmp 10e9c9 <_Thread_queue_Extract_priority_helper+0x99> <== ALWAYS TAKEN 10e9af: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10e9b6: ff 75 e4 pushl -0x1c(%ebp) 10e9b9: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10e9ba: 83 ec 0c sub $0xc,%esp 10e9bd: 8d 43 48 lea 0x48(%ebx),%eax 10e9c0: 50 push %eax 10e9c1: e8 ca df ff ff call 10c990 <_Watchdog_Remove> 10e9c6: 83 c4 10 add $0x10,%esp 10e9c9: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10e9d0: 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 } 10e9d3: 8d 65 f4 lea -0xc(%ebp),%esp 10e9d6: 5b pop %ebx 10e9d7: 5e pop %esi 10e9d8: 5f pop %edi 10e9d9: c9 leave 10e9da: e9 b9 cd ff ff jmp 10b798 <_Thread_Clear_state> 10e9df: 8d 65 f4 lea -0xc(%ebp),%esp 10e9e2: 5b pop %ebx 10e9e3: 5e pop %esi 10e9e4: 5f pop %edi 10e9e5: c9 leave 10e9e6: c3 ret 0011b9b0 <_Thread_queue_First_priority>: */ Thread_Control *_Thread_queue_First_priority ( Thread_queue_Control *the_thread_queue ) { 11b9b0: 55 push %ebp 11b9b1: 89 e5 mov %esp,%ebp 11b9b3: 53 push %ebx 11b9b4: 8b 4d 08 mov 0x8(%ebp),%ecx 11b9b7: 89 ca mov %ecx,%edx 11b9b9: 31 c0 xor %eax,%eax 11b9bb: 8d 5a 04 lea 0x4(%edx),%ebx 11b9be: 39 1a cmp %ebx,(%edx) 11b9c0: 74 08 je 11b9ca <_Thread_queue_First_priority+0x1a> for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) return (Thread_Control *) 11b9c2: 6b c0 0c imul $0xc,%eax,%eax 11b9c5: 8b 04 08 mov (%eax,%ecx,1),%eax 11b9c8: eb 0b jmp 11b9d5 <_Thread_queue_First_priority+0x25> <== ALWAYS TAKEN { uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 11b9ca: 40 inc %eax 11b9cb: 83 c2 0c add $0xc,%edx Thread_queue_Control *the_thread_queue ) { uint32_t index; for( index=0 ; 11b9ce: 83 f8 04 cmp $0x4,%eax 11b9d1: 75 e8 jne 11b9bb <_Thread_queue_First_priority+0xb> 11b9d3: 30 c0 xor %al,%al if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) return (Thread_Control *) the_thread_queue->Queues.Priority[ index ].first; } return NULL; } 11b9d5: 5b pop %ebx 11b9d6: c9 leave 11b9d7: c3 ret 0010c170 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 10c170: 55 push %ebp 10c171: 89 e5 mov %esp,%ebp 10c173: 56 push %esi 10c174: 53 push %ebx 10c175: 8b 75 08 mov 0x8(%ebp),%esi 10c178: 8b 5d 10 mov 0x10(%ebp),%ebx Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10c17b: eb 03 jmp 10c180 <_Thread_queue_Flush+0x10> <== ALWAYS TAKEN #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; 10c17d: 89 58 34 mov %ebx,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10c180: 83 ec 0c sub $0xc,%esp 10c183: 56 push %esi 10c184: e8 f3 fc ff ff call 10be7c <_Thread_queue_Dequeue> <== ALWAYS TAKEN 10c189: 83 c4 10 add $0x10,%esp 10c18c: 85 c0 test %eax,%eax 10c18e: 75 ed jne 10c17d <_Thread_queue_Flush+0xd> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10c190: 8d 65 f8 lea -0x8(%ebp),%esp 10c193: 5b pop %ebx 10c194: 5e pop %esi 10c195: c9 leave 10c196: c3 ret 0010c198 <_Thread_queue_Initialize>: Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 10c198: 55 push %ebp 10c199: 89 e5 mov %esp,%ebp 10c19b: 8b 45 08 mov 0x8(%ebp),%eax 10c19e: 8b 55 0c mov 0xc(%ebp),%edx the_thread_queue->state = state; 10c1a1: 8b 4d 10 mov 0x10(%ebp),%ecx 10c1a4: 89 48 38 mov %ecx,0x38(%eax) the_thread_queue->discipline = the_discipline; 10c1a7: 89 50 34 mov %edx,0x34(%eax) the_thread_queue->timeout_status = timeout_status; 10c1aa: 8b 4d 14 mov 0x14(%ebp),%ecx 10c1ad: 89 48 3c mov %ecx,0x3c(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c1b0: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10c1b7: 4a dec %edx 10c1b8: 75 1b jne 10c1d5 <_Thread_queue_Initialize+0x3d> * timeout_status - return on a timeout * * Output parameters: NONE */ void _Thread_queue_Initialize( 10c1ba: 8d 50 30 lea 0x30(%eax),%edx */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c1bd: 8d 48 04 lea 0x4(%eax),%ecx 10c1c0: 89 08 mov %ecx,(%eax) the_chain->permanent_null = NULL; 10c1c2: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10c1c9: 89 40 08 mov %eax,0x8(%eax) 10c1cc: 83 c0 0c add $0xc,%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 10c1cf: 39 d0 cmp %edx,%eax 10c1d1: 75 ea jne 10c1bd <_Thread_queue_Initialize+0x25> 10c1d3: eb 0f jmp 10c1e4 <_Thread_queue_Initialize+0x4c> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c1d5: 8d 50 04 lea 0x4(%eax),%edx 10c1d8: 89 10 mov %edx,(%eax) the_chain->permanent_null = NULL; 10c1da: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10c1e1: 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 ); } } 10c1e4: c9 leave 10c1e5: c3 ret 0010e9e8 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 10e9e8: 55 push %ebp 10e9e9: 89 e5 mov %esp,%ebp 10e9eb: 83 ec 08 sub $0x8,%esp 10e9ee: 8b 45 08 mov 0x8(%ebp),%eax Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 10e9f1: 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 && 10e9f4: 8b 4a 30 mov 0x30(%edx),%ecx 10e9f7: 85 c9 test %ecx,%ecx 10e9f9: 74 1c je 10ea17 <_Thread_queue_Process_timeout+0x2f> 10e9fb: 3b 05 30 39 12 00 cmp 0x123930,%eax 10ea01: 75 14 jne 10ea17 <_Thread_queue_Process_timeout+0x2f> _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 10ea03: 83 f9 03 cmp $0x3,%ecx 10ea06: 74 23 je 10ea2b <_Thread_queue_Process_timeout+0x43> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 10ea08: 8b 4a 3c mov 0x3c(%edx),%ecx 10ea0b: 89 48 34 mov %ecx,0x34(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10ea0e: c7 42 30 02 00 00 00 movl $0x2,0x30(%edx) 10ea15: eb 14 jmp 10ea2b <_Thread_queue_Process_timeout+0x43> <== ALWAYS TAKEN } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 10ea17: 8b 52 3c mov 0x3c(%edx),%edx 10ea1a: 89 50 34 mov %edx,0x34(%eax) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 10ea1d: 52 push %edx 10ea1e: 52 push %edx 10ea1f: 50 push %eax 10ea20: ff 70 44 pushl 0x44(%eax) 10ea23: e8 d8 fe ff ff call 10e900 <_Thread_queue_Extract> <== ALWAYS TAKEN 10ea28: 83 c4 10 add $0x10,%esp } } 10ea2b: c9 leave 10ea2c: c3 ret 0010c1e8 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10c1e8: 55 push %ebp 10c1e9: 89 e5 mov %esp,%ebp 10c1eb: 57 push %edi 10c1ec: 56 push %esi 10c1ed: 53 push %ebx 10c1ee: 83 ec 1c sub $0x1c,%esp 10c1f1: 8b 75 08 mov 0x8(%ebp),%esi 10c1f4: 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 ) 10c1f7: 85 f6 test %esi,%esi 10c1f9: 74 36 je 10c231 <_Thread_queue_Requeue+0x49> <== ALWAYS 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 ) { 10c1fb: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10c1ff: 75 30 jne 10c231 <_Thread_queue_Requeue+0x49> <== ALWAYS TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10c201: 9c pushf 10c202: fa cli 10c203: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10c204: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10c20b: 74 22 je 10c22f <_Thread_queue_Requeue+0x47> <== ALWAYS TAKEN 10c20d: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi) _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 10c214: 50 push %eax 10c215: 6a 01 push $0x1 10c217: 57 push %edi 10c218: 56 push %esi 10c219: e8 12 27 00 00 call 10e930 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10c21e: 83 c4 0c add $0xc,%esp 10c221: 8d 45 e4 lea -0x1c(%ebp),%eax 10c224: 50 push %eax 10c225: 57 push %edi 10c226: 56 push %esi 10c227: e8 e0 fd ff ff call 10c00c <_Thread_queue_Enqueue_priority> <== ALWAYS TAKEN 10c22c: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10c22f: 53 push %ebx 10c230: 9d popf } } 10c231: 8d 65 f4 lea -0xc(%ebp),%esp 10c234: 5b pop %ebx 10c235: 5e pop %esi 10c236: 5f pop %edi 10c237: c9 leave 10c238: c3 ret 0010c23c <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10c23c: 55 push %ebp 10c23d: 89 e5 mov %esp,%ebp 10c23f: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c242: 8d 45 f4 lea -0xc(%ebp),%eax 10c245: 50 push %eax 10c246: ff 75 08 pushl 0x8(%ebp) 10c249: e8 ea f8 ff ff call 10bb38 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { 10c24e: 83 c4 10 add $0x10,%esp 10c251: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10c255: 75 17 jne 10c26e <_Thread_queue_Timeout+0x32> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10c257: 83 ec 0c sub $0xc,%esp 10c25a: 50 push %eax 10c25b: e8 88 27 00 00 call 10e9e8 <_Thread_queue_Process_timeout> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10c260: a1 74 38 12 00 mov 0x123874,%eax 10c265: 48 dec %eax 10c266: a3 74 38 12 00 mov %eax,0x123874 10c26b: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10c26e: c9 leave 10c26f: c3 ret 00116570 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 116570: 55 push %ebp 116571: 89 e5 mov %esp,%ebp 116573: 57 push %edi 116574: 56 push %esi 116575: 53 push %ebx 116576: 83 ec 4c sub $0x4c,%esp 116579: 8b 5d 08 mov 0x8(%ebp),%ebx 11657c: 8d 45 dc lea -0x24(%ebp),%eax 11657f: 8d 55 e0 lea -0x20(%ebp),%edx 116582: 89 55 b4 mov %edx,-0x4c(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 116585: 89 55 dc mov %edx,-0x24(%ebp) the_chain->permanent_null = NULL; 116588: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_chain->last = _Chain_Head(the_chain); 11658f: 89 45 e4 mov %eax,-0x1c(%ebp) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 116592: 8d 75 d0 lea -0x30(%ebp),%esi 116595: 8d 55 d4 lea -0x2c(%ebp),%edx 116598: 89 55 b0 mov %edx,-0x50(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11659b: 89 55 d0 mov %edx,-0x30(%ebp) the_chain->permanent_null = NULL; 11659e: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 1165a5: 89 75 d8 mov %esi,-0x28(%ebp) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1165a8: 8d 53 30 lea 0x30(%ebx),%edx 1165ab: 89 55 c0 mov %edx,-0x40(%ebp) /* * 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 ); 1165ae: 8d 7b 68 lea 0x68(%ebx),%edi static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 1165b1: 8d 4b 08 lea 0x8(%ebx),%ecx 1165b4: 89 4d b8 mov %ecx,-0x48(%ebp) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 1165b7: 8d 53 40 lea 0x40(%ebx),%edx 1165ba: 89 55 bc mov %edx,-0x44(%ebp) { /* * 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; 1165bd: 8d 4d dc lea -0x24(%ebp),%ecx 1165c0: 89 4b 78 mov %ecx,0x78(%ebx) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 1165c3: a1 34 cc 13 00 mov 0x13cc34,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 1165c8: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 1165cb: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1165ce: 51 push %ecx 1165cf: 8d 4d d0 lea -0x30(%ebp),%ecx 1165d2: 51 push %ecx 1165d3: 29 d0 sub %edx,%eax 1165d5: 50 push %eax 1165d6: ff 75 c0 pushl -0x40(%ebp) 1165d9: e8 36 35 00 00 call 119b14 <_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(); 1165de: a1 78 cb 13 00 mov 0x13cb78,%eax 1165e3: 89 45 c4 mov %eax,-0x3c(%ebp) Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 1165e6: 8b 43 74 mov 0x74(%ebx),%eax /* * 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 ) { 1165e9: 83 c4 10 add $0x10,%esp 1165ec: 39 45 c4 cmp %eax,-0x3c(%ebp) 1165ef: 76 13 jbe 116604 <_Timer_server_Body+0x94> /* * 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 ); 1165f1: 52 push %edx 1165f2: 8d 55 d0 lea -0x30(%ebp),%edx 1165f5: 52 push %edx 1165f6: 8b 4d c4 mov -0x3c(%ebp),%ecx 1165f9: 29 c1 sub %eax,%ecx 1165fb: 51 push %ecx 1165fc: 57 push %edi 1165fd: e8 12 35 00 00 call 119b14 <_Watchdog_Adjust_to_chain> 116602: eb 0f jmp 116613 <_Timer_server_Body+0xa3> <== ALWAYS TAKEN } else if ( snapshot < last_snapshot ) { 116604: 73 10 jae 116616 <_Timer_server_Body+0xa6> /* * 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 ); 116606: 51 push %ecx 116607: 2b 45 c4 sub -0x3c(%ebp),%eax 11660a: 50 push %eax 11660b: 6a 01 push $0x1 11660d: 57 push %edi 11660e: e8 95 34 00 00 call 119aa8 <_Watchdog_Adjust> 116613: 83 c4 10 add $0x10,%esp } watchdogs->last_snapshot = snapshot; 116616: 8b 45 c4 mov -0x3c(%ebp),%eax 116619: 89 43 74 mov %eax,0x74(%ebx) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 11661c: 8b 43 78 mov 0x78(%ebx),%eax 11661f: 83 ec 0c sub $0xc,%esp 116622: 50 push %eax 116623: e8 ec 06 00 00 call 116d14 <_Chain_Get> <== ALWAYS TAKEN if ( timer == NULL ) { 116628: 83 c4 10 add $0x10,%esp 11662b: 85 c0 test %eax,%eax 11662d: 74 29 je 116658 <_Timer_server_Body+0xe8> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 11662f: 8b 50 38 mov 0x38(%eax),%edx 116632: 83 fa 01 cmp $0x1,%edx 116635: 75 0b jne 116642 <_Timer_server_Body+0xd2> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 116637: 52 push %edx 116638: 52 push %edx 116639: 83 c0 10 add $0x10,%eax 11663c: 50 push %eax 11663d: ff 75 c0 pushl -0x40(%ebp) 116640: eb 0c jmp 11664e <_Timer_server_Body+0xde> <== ALWAYS TAKEN } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 116642: 83 fa 03 cmp $0x3,%edx 116645: 75 d5 jne 11661c <_Timer_server_Body+0xac> <== ALWAYS TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 116647: 51 push %ecx 116648: 51 push %ecx 116649: 83 c0 10 add $0x10,%eax 11664c: 50 push %eax 11664d: 57 push %edi 11664e: e8 49 35 00 00 call 119b9c <_Watchdog_Insert> 116653: 83 c4 10 add $0x10,%esp 116656: eb c4 jmp 11661c <_Timer_server_Body+0xac> <== ALWAYS TAKEN * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 116658: 9c pushf 116659: fa cli 11665a: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 11665b: 8b 55 b4 mov -0x4c(%ebp),%edx 11665e: 39 55 dc cmp %edx,-0x24(%ebp) 116661: 75 13 jne 116676 <_Timer_server_Body+0x106> <== ALWAYS TAKEN ts->insert_chain = NULL; 116663: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 11666a: 50 push %eax 11666b: 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 ) ) { 11666c: 8b 4d b0 mov -0x50(%ebp),%ecx 11666f: 39 4d d0 cmp %ecx,-0x30(%ebp) 116672: 75 09 jne 11667d <_Timer_server_Body+0x10d> 116674: eb 3e jmp 1166b4 <_Timer_server_Body+0x144> <== ALWAYS TAKEN ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 116676: 50 push %eax <== NOT EXECUTED 116677: 9d popf <== NOT EXECUTED 116678: e9 46 ff ff ff jmp 1165c3 <_Timer_server_Body+0x53> <== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 11667d: 9c pushf 11667e: fa cli 11667f: 5a pop %edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 116680: 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)) 116683: 3b 45 b0 cmp -0x50(%ebp),%eax 116686: 74 25 je 1166ad <_Timer_server_Body+0x13d> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 116688: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 11668a: 89 4d d0 mov %ecx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 11668d: 89 71 04 mov %esi,0x4(%ecx) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 116690: 85 c0 test %eax,%eax 116692: 74 19 je 1166ad <_Timer_server_Body+0x13d> <== ALWAYS TAKEN watchdog->state = WATCHDOG_INACTIVE; 116694: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 11669b: 52 push %edx 11669c: 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 ); 11669d: 52 push %edx 11669e: 52 push %edx 11669f: ff 70 24 pushl 0x24(%eax) 1166a2: ff 70 20 pushl 0x20(%eax) 1166a5: ff 50 1c call *0x1c(%eax) } 1166a8: 83 c4 10 add $0x10,%esp 1166ab: eb d0 jmp 11667d <_Timer_server_Body+0x10d> <== ALWAYS TAKEN watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 1166ad: 52 push %edx 1166ae: 9d popf 1166af: e9 09 ff ff ff jmp 1165bd <_Timer_server_Body+0x4d> <== ALWAYS TAKEN * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 1166b4: c6 43 7c 00 movb $0x0,0x7c(%ebx) 1166b8: a1 e8 ca 13 00 mov 0x13cae8,%eax 1166bd: 40 inc %eax 1166be: a3 e8 ca 13 00 mov %eax,0x13cae8 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 1166c3: 50 push %eax 1166c4: 50 push %eax 1166c5: 6a 08 push $0x8 1166c7: ff 33 pushl (%ebx) 1166c9: e8 ea 2c 00 00 call 1193b8 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 1166ce: 89 d8 mov %ebx,%eax 1166d0: e8 0f fe ff ff call 1164e4 <_Timer_server_Reset_interval_system_watchdog> <== ALWAYS TAKEN _Timer_server_Reset_tod_system_watchdog( ts ); 1166d5: 89 d8 mov %ebx,%eax 1166d7: e8 4e fe ff ff call 11652a <_Timer_server_Reset_tod_system_watchdog> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 1166dc: e8 dc 23 00 00 call 118abd <_Thread_Enable_dispatch> ts->active = true; 1166e1: 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 ); 1166e5: 59 pop %ecx 1166e6: ff 75 b8 pushl -0x48(%ebp) 1166e9: e8 c6 35 00 00 call 119cb4 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 1166ee: 5a pop %edx 1166ef: ff 75 bc pushl -0x44(%ebp) 1166f2: e8 bd 35 00 00 call 119cb4 <_Watchdog_Remove> 1166f7: 83 c4 10 add $0x10,%esp 1166fa: e9 be fe ff ff jmp 1165bd <_Timer_server_Body+0x4d> <== ALWAYS TAKEN 001164e4 <_Timer_server_Reset_interval_system_watchdog>: } static void _Timer_server_Reset_interval_system_watchdog( Timer_server_Control *ts ) { 1164e4: 55 push %ebp 1164e5: 89 e5 mov %esp,%ebp 1164e7: 56 push %esi 1164e8: 53 push %ebx 1164e9: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 1164eb: 8d 70 08 lea 0x8(%eax),%esi 1164ee: 83 ec 0c sub $0xc,%esp 1164f1: 56 push %esi 1164f2: e8 bd 37 00 00 call 119cb4 <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_interval_system_watchdog( ts ); _ISR_Disable( level ); 1164f7: 9c pushf 1164f8: fa cli 1164f9: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1164fa: 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; 1164fd: 8d 4b 34 lea 0x34(%ebx),%ecx 116500: 83 c4 10 add $0x10,%esp 116503: 39 ca cmp %ecx,%edx 116505: 74 1a je 116521 <_Timer_server_Reset_interval_system_watchdog+0x3d> if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { Watchdog_Interval delta_interval = _Watchdog_First( &ts->Interval_watchdogs.Chain )->delta_interval; 116507: 8b 52 10 mov 0x10(%edx),%edx _ISR_Enable( level ); 11650a: 50 push %eax 11650b: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 11650c: 89 53 14 mov %edx,0x14(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 11650f: 53 push %ebx 116510: 53 push %ebx 116511: 56 push %esi 116512: 68 c4 cb 13 00 push $0x13cbc4 116517: e8 80 36 00 00 call 119b9c <_Watchdog_Insert> 11651c: 83 c4 10 add $0x10,%esp 11651f: eb 02 jmp 116523 <_Timer_server_Reset_interval_system_watchdog+0x3f> <== ALWAYS TAKEN _Watchdog_Insert_ticks( &ts->Interval_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 116521: 50 push %eax 116522: 9d popf } } 116523: 8d 65 f8 lea -0x8(%ebp),%esp 116526: 5b pop %ebx 116527: 5e pop %esi 116528: c9 leave 116529: c3 ret 0011652a <_Timer_server_Reset_tod_system_watchdog>: } static void _Timer_server_Reset_tod_system_watchdog( Timer_server_Control *ts ) { 11652a: 55 push %ebp 11652b: 89 e5 mov %esp,%ebp 11652d: 56 push %esi 11652e: 53 push %ebx 11652f: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 116531: 8d 70 40 lea 0x40(%eax),%esi 116534: 83 ec 0c sub $0xc,%esp 116537: 56 push %esi 116538: e8 77 37 00 00 call 119cb4 <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_tod_system_watchdog( ts ); _ISR_Disable( level ); 11653d: 9c pushf 11653e: fa cli 11653f: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 116540: 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; 116543: 8d 4b 6c lea 0x6c(%ebx),%ecx 116546: 83 c4 10 add $0x10,%esp 116549: 39 ca cmp %ecx,%edx 11654b: 74 1a je 116567 <_Timer_server_Reset_tod_system_watchdog+0x3d> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { Watchdog_Interval delta_interval = _Watchdog_First( &ts->TOD_watchdogs.Chain )->delta_interval; 11654d: 8b 52 10 mov 0x10(%edx),%edx _ISR_Enable( level ); 116550: 50 push %eax 116551: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 116552: 89 53 4c mov %edx,0x4c(%ebx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 116555: 50 push %eax 116556: 50 push %eax 116557: 56 push %esi 116558: 68 b8 cb 13 00 push $0x13cbb8 11655d: e8 3a 36 00 00 call 119b9c <_Watchdog_Insert> 116562: 83 c4 10 add $0x10,%esp 116565: eb 02 jmp 116569 <_Timer_server_Reset_tod_system_watchdog+0x3f> <== ALWAYS TAKEN _Watchdog_Insert_seconds( &ts->TOD_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 116567: 50 push %eax 116568: 9d popf } } 116569: 8d 65 f8 lea -0x8(%ebp),%esp 11656c: 5b pop %ebx 11656d: 5e pop %esi 11656e: c9 leave 11656f: c3 ret 001166ff <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 1166ff: 55 push %ebp 116700: 89 e5 mov %esp,%ebp 116702: 57 push %edi 116703: 56 push %esi 116704: 53 push %ebx 116705: 83 ec 2c sub $0x2c,%esp 116708: 8b 5d 08 mov 0x8(%ebp),%ebx 11670b: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 11670e: 8b 53 78 mov 0x78(%ebx),%edx 116711: 85 d2 test %edx,%edx 116713: 0f 85 e6 00 00 00 jne 1167ff <_Timer_server_Schedule_operation_method+0x100> 116719: 8b 15 e8 ca 13 00 mov 0x13cae8,%edx 11671f: 42 inc %edx 116720: 89 15 e8 ca 13 00 mov %edx,0x13cae8 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 116726: 8b 50 38 mov 0x38(%eax),%edx 116729: 83 fa 01 cmp $0x1,%edx 11672c: 75 5a jne 116788 <_Timer_server_Schedule_operation_method+0x89> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 11672e: 9c pushf 11672f: fa cli 116730: 8f 45 e0 popl -0x20(%ebp) snapshot = _Watchdog_Ticks_since_boot; 116733: 8b 0d 34 cc 13 00 mov 0x13cc34,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 116739: 8b 73 3c mov 0x3c(%ebx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11673c: 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; 11673f: 8d 7b 34 lea 0x34(%ebx),%edi 116742: 39 fa cmp %edi,%edx 116744: 74 19 je 11675f <_Timer_server_Schedule_operation_method+0x60> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 116746: 89 cf mov %ecx,%edi 116748: 29 f7 sub %esi,%edi 11674a: 89 7d e4 mov %edi,-0x1c(%ebp) delta_interval = first_watchdog->delta_interval; 11674d: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 116750: 31 f6 xor %esi,%esi 116752: 3b 7d e4 cmp -0x1c(%ebp),%edi 116755: 76 05 jbe 11675c <_Timer_server_Schedule_operation_method+0x5d> delta_interval -= delta; 116757: 89 fe mov %edi,%esi 116759: 2b 75 e4 sub -0x1c(%ebp),%esi } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 11675c: 89 72 10 mov %esi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 11675f: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 116762: ff 75 e0 pushl -0x20(%ebp) 116765: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 116766: 57 push %edi 116767: 57 push %edi 116768: 83 c0 10 add $0x10,%eax 11676b: 50 push %eax 11676c: 8d 43 30 lea 0x30(%ebx),%eax 11676f: 50 push %eax 116770: e8 27 34 00 00 call 119b9c <_Watchdog_Insert> if ( !ts->active ) { 116775: 8a 43 7c mov 0x7c(%ebx),%al 116778: 83 c4 10 add $0x10,%esp 11677b: 84 c0 test %al,%al 11677d: 75 74 jne 1167f3 <_Timer_server_Schedule_operation_method+0xf4> _Timer_server_Reset_interval_system_watchdog( ts ); 11677f: 89 d8 mov %ebx,%eax 116781: e8 5e fd ff ff call 1164e4 <_Timer_server_Reset_interval_system_watchdog> <== ALWAYS TAKEN 116786: eb 6b jmp 1167f3 <_Timer_server_Schedule_operation_method+0xf4> <== ALWAYS TAKEN } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 116788: 83 fa 03 cmp $0x3,%edx 11678b: 75 66 jne 1167f3 <_Timer_server_Schedule_operation_method+0xf4> <== ALWAYS TAKEN /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 11678d: 9c pushf 11678e: fa cli 11678f: 8f 45 e0 popl -0x20(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 116792: 8b 0d 78 cb 13 00 mov 0x13cb78,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 116798: 8b 53 74 mov 0x74(%ebx),%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11679b: 8b 73 68 mov 0x68(%ebx),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11679e: 8d 7b 6c lea 0x6c(%ebx),%edi 1167a1: 39 fe cmp %edi,%esi 1167a3: 74 27 je 1167cc <_Timer_server_Schedule_operation_method+0xcd> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 1167a5: 8b 7e 10 mov 0x10(%esi),%edi 1167a8: 89 7d d4 mov %edi,-0x2c(%ebp) if ( snapshot > last_snapshot ) { 1167ab: 39 d1 cmp %edx,%ecx 1167ad: 76 15 jbe 1167c4 <_Timer_server_Schedule_operation_method+0xc5> /* * We advanced in time. */ delta = snapshot - last_snapshot; 1167af: 89 cf mov %ecx,%edi 1167b1: 29 d7 sub %edx,%edi 1167b3: 89 7d e4 mov %edi,-0x1c(%ebp) if (delta_interval > delta) { 1167b6: 31 d2 xor %edx,%edx 1167b8: 39 7d d4 cmp %edi,-0x2c(%ebp) 1167bb: 76 0c jbe 1167c9 <_Timer_server_Schedule_operation_method+0xca> <== ALWAYS TAKEN delta_interval -= delta; 1167bd: 8b 55 d4 mov -0x2c(%ebp),%edx 1167c0: 29 fa sub %edi,%edx 1167c2: eb 05 jmp 1167c9 <_Timer_server_Schedule_operation_method+0xca> <== ALWAYS TAKEN } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 1167c4: 03 55 d4 add -0x2c(%ebp),%edx delta_interval += delta; 1167c7: 29 ca sub %ecx,%edx } first_watchdog->delta_interval = delta_interval; 1167c9: 89 56 10 mov %edx,0x10(%esi) } ts->TOD_watchdogs.last_snapshot = snapshot; 1167cc: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 1167cf: ff 75 e0 pushl -0x20(%ebp) 1167d2: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 1167d3: 56 push %esi 1167d4: 56 push %esi 1167d5: 83 c0 10 add $0x10,%eax 1167d8: 50 push %eax 1167d9: 8d 43 68 lea 0x68(%ebx),%eax 1167dc: 50 push %eax 1167dd: e8 ba 33 00 00 call 119b9c <_Watchdog_Insert> if ( !ts->active ) { 1167e2: 8a 43 7c mov 0x7c(%ebx),%al 1167e5: 83 c4 10 add $0x10,%esp 1167e8: 84 c0 test %al,%al 1167ea: 75 07 jne 1167f3 <_Timer_server_Schedule_operation_method+0xf4> _Timer_server_Reset_tod_system_watchdog( ts ); 1167ec: 89 d8 mov %ebx,%eax 1167ee: e8 37 fd ff ff call 11652a <_Timer_server_Reset_tod_system_watchdog> <== ALWAYS TAKEN * 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 ); } } 1167f3: 8d 65 f4 lea -0xc(%ebp),%esp 1167f6: 5b pop %ebx 1167f7: 5e pop %esi 1167f8: 5f pop %edi 1167f9: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 1167fa: e9 be 22 00 00 jmp 118abd <_Thread_Enable_dispatch> * 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 ); 1167ff: 8b 53 78 mov 0x78(%ebx),%edx 116802: 89 45 0c mov %eax,0xc(%ebp) 116805: 89 55 08 mov %edx,0x8(%ebp) } } 116808: 8d 65 f4 lea -0xc(%ebp),%esp 11680b: 5b pop %ebx 11680c: 5e pop %esi 11680d: 5f pop %edi 11680e: c9 leave * 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 ); 11680f: e9 dc 04 00 00 jmp 116cf0 <_Chain_Append> <== ALWAYS TAKEN 0010c5e4 <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 10c5e4: 55 push %ebp 10c5e5: 89 e5 mov %esp,%ebp 10c5e7: 8b 55 08 mov 0x8(%ebp),%edx 10c5ea: 8b 4d 0c mov 0xc(%ebp),%ecx uint32_t seconds = add->tv_sec; 10c5ed: 8b 01 mov (%ecx),%eax /* Add the basics */ time->tv_sec += add->tv_sec; 10c5ef: 01 02 add %eax,(%edx) time->tv_nsec += add->tv_nsec; 10c5f1: 8b 49 04 mov 0x4(%ecx),%ecx 10c5f4: 03 4a 04 add 0x4(%edx),%ecx 10c5f7: 89 4a 04 mov %ecx,0x4(%edx) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10c5fa: eb 09 jmp 10c605 <_Timespec_Add_to+0x21> <== ALWAYS TAKEN time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; time->tv_sec++; 10c5fc: ff 02 incl (%edx) seconds++; 10c5fe: 40 inc %eax 10c5ff: 81 e9 00 ca 9a 3b sub $0x3b9aca00,%ecx /* 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 ) { 10c605: 81 f9 ff c9 9a 3b cmp $0x3b9ac9ff,%ecx 10c60b: 77 ef ja 10c5fc <_Timespec_Add_to+0x18> 10c60d: 89 4a 04 mov %ecx,0x4(%edx) time->tv_sec++; seconds++; } return seconds; } 10c610: c9 leave 10c611: c3 ret 0010dcdc <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 10dcdc: 55 push %ebp 10dcdd: 89 e5 mov %esp,%ebp 10dcdf: 57 push %edi 10dce0: 56 push %esi 10dce1: 53 push %ebx 10dce2: 83 ec 2c sub $0x2c,%esp 10dce5: 8b 45 08 mov 0x8(%ebp),%eax 10dce8: 8b 75 0c mov 0xc(%ebp),%esi /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10dceb: 8b 10 mov (%eax),%edx 10dced: 89 55 e0 mov %edx,-0x20(%ebp) left += lhs->tv_nsec; 10dcf0: 8b 58 04 mov 0x4(%eax),%ebx right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10dcf3: b9 00 ca 9a 3b mov $0x3b9aca00,%ecx 10dcf8: 8b 06 mov (%esi),%eax 10dcfa: f7 e9 imul %ecx 10dcfc: 89 45 d0 mov %eax,-0x30(%ebp) 10dcff: 89 55 d4 mov %edx,-0x2c(%ebp) right += rhs->tv_nsec; 10dd02: 8b 76 04 mov 0x4(%esi),%esi 10dd05: 89 f7 mov %esi,%edi 10dd07: c1 ff 1f sar $0x1f,%edi 10dd0a: 01 75 d0 add %esi,-0x30(%ebp) 10dd0d: 11 7d d4 adc %edi,-0x2c(%ebp) if ( right == 0 ) { 10dd10: 8b 55 d4 mov -0x2c(%ebp),%edx 10dd13: 0b 55 d0 or -0x30(%ebp),%edx 10dd16: 75 14 jne 10dd2c <_Timespec_Divide+0x50> *ival_percentage = 0; 10dd18: 8b 45 10 mov 0x10(%ebp),%eax 10dd1b: c7 00 00 00 00 00 movl $0x0,(%eax) *fval_percentage = 0; 10dd21: 8b 55 14 mov 0x14(%ebp),%edx 10dd24: c7 02 00 00 00 00 movl $0x0,(%edx) return; 10dd2a: eb 73 jmp 10dd9f <_Timespec_Divide+0xc3> <== ALWAYS TAKEN /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10dd2c: 8b 45 e0 mov -0x20(%ebp),%eax 10dd2f: f7 e9 imul %ecx 10dd31: 89 45 e0 mov %eax,-0x20(%ebp) 10dd34: 89 55 e4 mov %edx,-0x1c(%ebp) * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 10dd37: 89 de mov %ebx,%esi 10dd39: c1 fe 1f sar $0x1f,%esi 10dd3c: 01 5d e0 add %ebx,-0x20(%ebp) 10dd3f: 11 75 e4 adc %esi,-0x1c(%ebp) 10dd42: 69 5d e4 a0 86 01 00 imul $0x186a0,-0x1c(%ebp),%ebx 10dd49: b9 a0 86 01 00 mov $0x186a0,%ecx 10dd4e: 8b 45 e0 mov -0x20(%ebp),%eax 10dd51: f7 e1 mul %ecx 10dd53: 89 45 e0 mov %eax,-0x20(%ebp) 10dd56: 01 da add %ebx,%edx 10dd58: 89 55 e4 mov %edx,-0x1c(%ebp) 10dd5b: ff 75 d4 pushl -0x2c(%ebp) 10dd5e: ff 75 d0 pushl -0x30(%ebp) 10dd61: ff 75 e4 pushl -0x1c(%ebp) 10dd64: ff 75 e0 pushl -0x20(%ebp) 10dd67: e8 90 f4 00 00 call 11d1fc <__udivdi3> 10dd6c: 83 c4 10 add $0x10,%esp 10dd6f: 89 c3 mov %eax,%ebx 10dd71: 89 d6 mov %edx,%esi *ival_percentage = answer / 1000; 10dd73: 6a 00 push $0x0 10dd75: 68 e8 03 00 00 push $0x3e8 10dd7a: 52 push %edx 10dd7b: 50 push %eax 10dd7c: e8 7b f4 00 00 call 11d1fc <__udivdi3> 10dd81: 83 c4 10 add $0x10,%esp 10dd84: 8b 55 10 mov 0x10(%ebp),%edx 10dd87: 89 02 mov %eax,(%edx) *fval_percentage = answer % 1000; 10dd89: 6a 00 push $0x0 10dd8b: 68 e8 03 00 00 push $0x3e8 10dd90: 56 push %esi 10dd91: 53 push %ebx 10dd92: e8 75 f5 00 00 call 11d30c <__umoddi3> 10dd97: 83 c4 10 add $0x10,%esp 10dd9a: 8b 55 14 mov 0x14(%ebp),%edx 10dd9d: 89 02 mov %eax,(%edx) } 10dd9f: 8d 65 f4 lea -0xc(%ebp),%esp 10dda2: 5b pop %ebx 10dda3: 5e pop %esi 10dda4: 5f pop %edi 10dda5: c9 leave 10dda6: c3 ret 00134580 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 134580: 55 push %ebp 134581: 89 e5 mov %esp,%ebp 134583: 53 push %ebx 134584: 8b 4d 08 mov 0x8(%ebp),%ecx 134587: 8b 55 0c mov 0xc(%ebp),%edx if ( lhs->tv_sec > rhs->tv_sec ) 13458a: 8b 1a mov (%edx),%ebx 13458c: b0 01 mov $0x1,%al 13458e: 39 19 cmp %ebx,(%ecx) 134590: 7f 0f jg 1345a1 <_Timespec_Greater_than+0x21> return true; if ( lhs->tv_sec < rhs->tv_sec ) 134592: 7d 04 jge 134598 <_Timespec_Greater_than+0x18> <== NEVER TAKEN 134594: 31 c0 xor %eax,%eax <== NOT EXECUTED 134596: eb 09 jmp 1345a1 <_Timespec_Greater_than+0x21> <== NOT EXECUTED #include #include #include bool _Timespec_Greater_than( 134598: 8b 41 04 mov 0x4(%ecx),%eax 13459b: 3b 42 04 cmp 0x4(%edx),%eax 13459e: 0f 9f c0 setg %al /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 1345a1: 5b pop %ebx 1345a2: c9 leave 1345a3: c3 ret 00123ca0 <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 123ca0: 55 push %ebp 123ca1: 89 e5 mov %esp,%ebp 123ca3: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 123ca6: 85 c0 test %eax,%eax 123ca8: 74 16 je 123cc0 <_Timespec_Is_valid+0x20> return false; if ( time->tv_sec < 0 ) 123caa: 83 38 00 cmpl $0x0,(%eax) 123cad: 78 11 js 123cc0 <_Timespec_Is_valid+0x20> return false; if ( time->tv_nsec < 0 ) 123caf: 8b 40 04 mov 0x4(%eax),%eax 123cb2: 85 c0 test %eax,%eax 123cb4: 78 0a js 123cc0 <_Timespec_Is_valid+0x20> #include #include #include bool _Timespec_Is_valid( 123cb6: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 123cbb: 0f 96 c0 setbe %al 123cbe: eb 02 jmp 123cc2 <_Timespec_Is_valid+0x22> <== ALWAYS TAKEN 123cc0: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 123cc2: c9 leave 123cc3: c3 ret 001345a4 <_Timespec_Less_than>: bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { 1345a4: 55 push %ebp 1345a5: 89 e5 mov %esp,%ebp 1345a7: 53 push %ebx 1345a8: 8b 4d 08 mov 0x8(%ebp),%ecx 1345ab: 8b 55 0c mov 0xc(%ebp),%edx if ( lhs->tv_sec < rhs->tv_sec ) 1345ae: 8b 1a mov (%edx),%ebx 1345b0: b0 01 mov $0x1,%al 1345b2: 39 19 cmp %ebx,(%ecx) 1345b4: 7c 0f jl 1345c5 <_Timespec_Less_than+0x21> return true; if ( lhs->tv_sec > rhs->tv_sec ) 1345b6: 7e 04 jle 1345bc <_Timespec_Less_than+0x18> 1345b8: 31 c0 xor %eax,%eax 1345ba: eb 09 jmp 1345c5 <_Timespec_Less_than+0x21> <== ALWAYS TAKEN #include #include #include bool _Timespec_Less_than( 1345bc: 8b 41 04 mov 0x4(%ecx),%eax 1345bf: 3b 42 04 cmp 0x4(%edx),%eax 1345c2: 0f 9c c0 setl %al /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } 1345c5: 5b pop %ebx 1345c6: c9 leave 1345c7: c3 ret 0010c614 <_Timespec_Subtract>: void _Timespec_Subtract( const struct timespec *start, const struct timespec *end, struct timespec *result ) { 10c614: 55 push %ebp 10c615: 89 e5 mov %esp,%ebp 10c617: 53 push %ebx 10c618: 8b 45 08 mov 0x8(%ebp),%eax 10c61b: 8b 5d 0c mov 0xc(%ebp),%ebx 10c61e: 8b 55 10 mov 0x10(%ebp),%edx if (end->tv_nsec < start->tv_nsec) { 10c621: 8b 4b 04 mov 0x4(%ebx),%ecx 10c624: 3b 48 04 cmp 0x4(%eax),%ecx 10c627: 8b 1b mov (%ebx),%ebx 10c629: 7d 0d jge 10c638 <_Timespec_Subtract+0x24> result->tv_sec = end->tv_sec - start->tv_sec - 1; 10c62b: 4b dec %ebx 10c62c: 2b 18 sub (%eax),%ebx 10c62e: 89 1a mov %ebx,(%edx) result->tv_nsec = 10c630: 81 c1 00 ca 9a 3b add $0x3b9aca00,%ecx 10c636: eb 04 jmp 10c63c <_Timespec_Subtract+0x28> <== ALWAYS TAKEN (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; } else { result->tv_sec = end->tv_sec - start->tv_sec; 10c638: 2b 18 sub (%eax),%ebx 10c63a: 89 1a mov %ebx,(%edx) result->tv_nsec = end->tv_nsec - start->tv_nsec; 10c63c: 2b 48 04 sub 0x4(%eax),%ecx 10c63f: 89 4a 04 mov %ecx,0x4(%edx) } } 10c642: 5b pop %ebx 10c643: c9 leave 10c644: c3 ret 0010c75b <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10c75b: 55 push %ebp 10c75c: 89 e5 mov %esp,%ebp 10c75e: 57 push %edi 10c75f: 56 push %esi 10c760: 53 push %ebx 10c761: 83 ec 0c sub $0xc,%esp 10c764: 8b 7d 10 mov 0x10(%ebp),%edi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10c767: 8b 1d 8c 3a 12 00 mov 0x123a8c,%ebx 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 ); 10c76d: 0f b6 75 0c movzbl 0xc(%ebp),%esi ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10c771: eb 15 jmp 10c788 <_User_extensions_Fatal+0x2d> <== ALWAYS TAKEN !_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 ) 10c773: 8b 43 30 mov 0x30(%ebx),%eax 10c776: 85 c0 test %eax,%eax 10c778: 74 0b je 10c785 <_User_extensions_Fatal+0x2a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10c77a: 52 push %edx 10c77b: 57 push %edi 10c77c: 56 push %esi 10c77d: ff 75 08 pushl 0x8(%ebp) 10c780: ff d0 call *%eax 10c782: 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 ) { 10c785: 8b 5b 04 mov 0x4(%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 10c788: 81 fb 84 3a 12 00 cmp $0x123a84,%ebx 10c78e: 75 e3 jne 10c773 <_User_extensions_Fatal+0x18> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 10c790: 8d 65 f4 lea -0xc(%ebp),%esp 10c793: 5b pop %ebx 10c794: 5e pop %esi 10c795: 5f pop %edi 10c796: c9 leave 10c797: c3 ret 0010c648 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10c648: 55 push %ebp 10c649: 89 e5 mov %esp,%ebp 10c64b: 57 push %edi 10c64c: 56 push %esi 10c64d: 53 push %ebx 10c64e: 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; 10c651: a1 50 f9 11 00 mov 0x11f950,%eax 10c656: 89 45 e4 mov %eax,-0x1c(%ebp) initial_extensions = Configuration.User_extension_table; 10c659: 8b 35 54 f9 11 00 mov 0x11f954,%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c65f: c7 05 84 3a 12 00 88 movl $0x123a88,0x123a84 10c666: 3a 12 00 the_chain->permanent_null = NULL; 10c669: c7 05 88 3a 12 00 00 movl $0x0,0x123a88 10c670: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10c673: c7 05 8c 3a 12 00 84 movl $0x123a84,0x123a8c 10c67a: 3a 12 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c67d: c7 05 78 38 12 00 7c movl $0x12387c,0x123878 10c684: 38 12 00 the_chain->permanent_null = NULL; 10c687: c7 05 7c 38 12 00 00 movl $0x0,0x12387c 10c68e: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10c691: c7 05 80 38 12 00 78 movl $0x123878,0x123880 10c698: 38 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10c69b: 85 f6 test %esi,%esi 10c69d: 74 50 je 10c6ef <_User_extensions_Handler_initialization+0xa7> extension = (User_extensions_Control *) 10c69f: 6b c8 34 imul $0x34,%eax,%ecx 10c6a2: 83 ec 0c sub $0xc,%esp 10c6a5: 51 push %ecx 10c6a6: 89 4d e0 mov %ecx,-0x20(%ebp) 10c6a9: e8 b2 03 00 00 call 10ca60 <_Workspace_Allocate_or_fatal_error> <== ALWAYS TAKEN 10c6ae: 89 c3 mov %eax,%ebx _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10c6b0: 31 c0 xor %eax,%eax 10c6b2: 8b 4d e0 mov -0x20(%ebp),%ecx 10c6b5: 89 df mov %ebx,%edi 10c6b7: f3 aa rep stos %al,%es:(%edi) 10c6b9: 89 f0 mov %esi,%eax 10c6bb: 31 d2 xor %edx,%edx 10c6bd: eb 28 jmp 10c6e7 <_User_extensions_Handler_initialization+0x9f> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 10c6bf: 8d 7b 14 lea 0x14(%ebx),%edi 10c6c2: 89 c6 mov %eax,%esi 10c6c4: b9 08 00 00 00 mov $0x8,%ecx 10c6c9: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10c6cb: 83 ec 0c sub $0xc,%esp 10c6ce: 53 push %ebx 10c6cf: 89 45 e0 mov %eax,-0x20(%ebp) 10c6d2: 89 55 dc mov %edx,-0x24(%ebp) 10c6d5: e8 22 25 00 00 call 10ebfc <_User_extensions_Add_set> <== ALWAYS TAKEN number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10c6da: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10c6dd: 8b 55 dc mov -0x24(%ebp),%edx 10c6e0: 42 inc %edx 10c6e1: 8b 45 e0 mov -0x20(%ebp),%eax 10c6e4: 83 c0 20 add $0x20,%eax 10c6e7: 83 c4 10 add $0x10,%esp 10c6ea: 3b 55 e4 cmp -0x1c(%ebp),%edx 10c6ed: 72 d0 jb 10c6bf <_User_extensions_Handler_initialization+0x77> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10c6ef: 8d 65 f4 lea -0xc(%ebp),%esp 10c6f2: 5b pop %ebx 10c6f3: 5e pop %esi 10c6f4: 5f pop %edi 10c6f5: c9 leave 10c6f6: c3 ret 0010c6f8 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 10c6f8: 55 push %ebp 10c6f9: 89 e5 mov %esp,%ebp 10c6fb: 56 push %esi 10c6fc: 53 push %ebx 10c6fd: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10c700: 8b 1d 84 3a 12 00 mov 0x123a84,%ebx 10c706: eb 12 jmp 10c71a <_User_extensions_Thread_begin+0x22> <== ALWAYS TAKEN !_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 ) 10c708: 8b 43 28 mov 0x28(%ebx),%eax 10c70b: 85 c0 test %eax,%eax 10c70d: 74 09 je 10c718 <_User_extensions_Thread_begin+0x20> (*the_extension->Callouts.thread_begin)( executing ); 10c70f: 83 ec 0c sub $0xc,%esp 10c712: 56 push %esi 10c713: ff d0 call *%eax 10c715: 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 ) { 10c718: 8b 1b mov (%ebx),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10c71a: 81 fb 88 3a 12 00 cmp $0x123a88,%ebx 10c720: 75 e6 jne 10c708 <_User_extensions_Thread_begin+0x10> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) (*the_extension->Callouts.thread_begin)( executing ); } } 10c722: 8d 65 f8 lea -0x8(%ebp),%esp 10c725: 5b pop %ebx 10c726: 5e pop %esi 10c727: c9 leave 10c728: c3 ret 0010c798 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 10c798: 55 push %ebp 10c799: 89 e5 mov %esp,%ebp 10c79b: 56 push %esi 10c79c: 53 push %ebx 10c79d: 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 ; 10c7a0: 8b 1d 84 3a 12 00 mov 0x123a84,%ebx 10c7a6: eb 1b jmp 10c7c3 <_User_extensions_Thread_create+0x2b> <== ALWAYS TAKEN !_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 ) { 10c7a8: 8b 43 14 mov 0x14(%ebx),%eax 10c7ab: 85 c0 test %eax,%eax 10c7ad: 74 12 je 10c7c1 <_User_extensions_Thread_create+0x29> status = (*the_extension->Callouts.thread_create)( 10c7af: 52 push %edx 10c7b0: 52 push %edx 10c7b1: 56 push %esi 10c7b2: ff 35 30 39 12 00 pushl 0x123930 10c7b8: ff d0 call *%eax _Thread_Executing, the_thread ); if ( !status ) 10c7ba: 83 c4 10 add $0x10,%esp 10c7bd: 84 c0 test %al,%al 10c7bf: 74 0c je 10c7cd <_User_extensions_Thread_create+0x35> 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 ) { 10c7c1: 8b 1b mov (%ebx),%ebx 10c7c3: 81 fb 88 3a 12 00 cmp $0x123a88,%ebx 10c7c9: 75 dd jne 10c7a8 <_User_extensions_Thread_create+0x10> 10c7cb: b0 01 mov $0x1,%al return false; } } return true; } 10c7cd: 8d 65 f8 lea -0x8(%ebp),%esp 10c7d0: 5b pop %ebx 10c7d1: 5e pop %esi 10c7d2: c9 leave 10c7d3: c3 ret 0010c7d4 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 10c7d4: 55 push %ebp 10c7d5: 89 e5 mov %esp,%ebp 10c7d7: 56 push %esi 10c7d8: 53 push %ebx 10c7d9: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10c7dc: 8b 1d 8c 3a 12 00 mov 0x123a8c,%ebx 10c7e2: eb 18 jmp 10c7fc <_User_extensions_Thread_delete+0x28> <== ALWAYS TAKEN !_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 ) 10c7e4: 8b 43 20 mov 0x20(%ebx),%eax 10c7e7: 85 c0 test %eax,%eax 10c7e9: 74 0e je 10c7f9 <_User_extensions_Thread_delete+0x25> (*the_extension->Callouts.thread_delete)( 10c7eb: 52 push %edx 10c7ec: 52 push %edx 10c7ed: 56 push %esi 10c7ee: ff 35 30 39 12 00 pushl 0x123930 10c7f4: ff d0 call *%eax 10c7f6: 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 ) { 10c7f9: 8b 5b 04 mov 0x4(%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 10c7fc: 81 fb 84 3a 12 00 cmp $0x123a84,%ebx 10c802: 75 e0 jne 10c7e4 <_User_extensions_Thread_delete+0x10> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10c804: 8d 65 f8 lea -0x8(%ebp),%esp 10c807: 5b pop %ebx 10c808: 5e pop %esi 10c809: c9 leave 10c80a: c3 ret 0010c729 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10c729: 55 push %ebp 10c72a: 89 e5 mov %esp,%ebp 10c72c: 56 push %esi 10c72d: 53 push %ebx 10c72e: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10c731: 8b 1d 8c 3a 12 00 mov 0x123a8c,%ebx 10c737: eb 13 jmp 10c74c <_User_extensions_Thread_exitted+0x23> <== ALWAYS TAKEN !_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 ) 10c739: 8b 43 2c mov 0x2c(%ebx),%eax 10c73c: 85 c0 test %eax,%eax 10c73e: 74 09 je 10c749 <_User_extensions_Thread_exitted+0x20> (*the_extension->Callouts.thread_exitted)( executing ); 10c740: 83 ec 0c sub $0xc,%esp 10c743: 56 push %esi 10c744: ff d0 call *%eax 10c746: 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 ) { 10c749: 8b 5b 04 mov 0x4(%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 10c74c: 81 fb 84 3a 12 00 cmp $0x123a84,%ebx 10c752: 75 e5 jne 10c739 <_User_extensions_Thread_exitted+0x10> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 10c754: 8d 65 f8 lea -0x8(%ebp),%esp 10c757: 5b pop %ebx 10c758: 5e pop %esi 10c759: c9 leave 10c75a: c3 ret 0010d290 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 10d290: 55 push %ebp 10d291: 89 e5 mov %esp,%ebp 10d293: 56 push %esi 10d294: 53 push %ebx 10d295: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10d298: 8b 1d 30 57 12 00 mov 0x125730,%ebx 10d29e: eb 17 jmp 10d2b7 <_User_extensions_Thread_restart+0x27> <== ALWAYS TAKEN !_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 ) 10d2a0: 8b 43 1c mov 0x1c(%ebx),%eax 10d2a3: 85 c0 test %eax,%eax 10d2a5: 74 0e je 10d2b5 <_User_extensions_Thread_restart+0x25> (*the_extension->Callouts.thread_restart)( 10d2a7: 52 push %edx 10d2a8: 52 push %edx 10d2a9: 56 push %esi 10d2aa: ff 35 dc 55 12 00 pushl 0x1255dc 10d2b0: ff d0 call *%eax 10d2b2: 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 ) { 10d2b5: 8b 1b mov (%ebx),%ebx 10d2b7: 81 fb 34 57 12 00 cmp $0x125734,%ebx 10d2bd: 75 e1 jne 10d2a0 <_User_extensions_Thread_restart+0x10> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10d2bf: 8d 65 f8 lea -0x8(%ebp),%esp 10d2c2: 5b pop %ebx 10d2c3: 5e pop %esi 10d2c4: c9 leave 10d2c5: c3 ret 0010c80c <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 10c80c: 55 push %ebp 10c80d: 89 e5 mov %esp,%ebp 10c80f: 56 push %esi 10c810: 53 push %ebx 10c811: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10c814: 8b 1d 84 3a 12 00 mov 0x123a84,%ebx 10c81a: eb 17 jmp 10c833 <_User_extensions_Thread_start+0x27> <== ALWAYS TAKEN !_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 ) 10c81c: 8b 43 18 mov 0x18(%ebx),%eax 10c81f: 85 c0 test %eax,%eax 10c821: 74 0e je 10c831 <_User_extensions_Thread_start+0x25> (*the_extension->Callouts.thread_start)( 10c823: 52 push %edx 10c824: 52 push %edx 10c825: 56 push %esi 10c826: ff 35 30 39 12 00 pushl 0x123930 10c82c: ff d0 call *%eax 10c82e: 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 ) { 10c831: 8b 1b mov (%ebx),%ebx 10c833: 81 fb 88 3a 12 00 cmp $0x123a88,%ebx 10c839: 75 e1 jne 10c81c <_User_extensions_Thread_start+0x10> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10c83b: 8d 65 f8 lea -0x8(%ebp),%esp 10c83e: 5b pop %ebx 10c83f: 5e pop %esi 10c840: c9 leave 10c841: c3 ret 0010c844 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 10c844: 55 push %ebp 10c845: 89 e5 mov %esp,%ebp 10c847: 57 push %edi 10c848: 56 push %esi 10c849: 53 push %ebx 10c84a: 83 ec 0c sub $0xc,%esp 10c84d: 8b 7d 08 mov 0x8(%ebp),%edi 10c850: 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 ; 10c853: 8b 1d 78 38 12 00 mov 0x123878,%ebx 10c859: eb 0c jmp 10c867 <_User_extensions_Thread_switch+0x23> <== ALWAYS TAKEN !_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 ); 10c85b: 50 push %eax 10c85c: 50 push %eax 10c85d: 56 push %esi 10c85e: 57 push %edi 10c85f: 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 ) { 10c862: 8b 1b mov (%ebx),%ebx 10c864: 83 c4 10 add $0x10,%esp 10c867: 81 fb 7c 38 12 00 cmp $0x12387c,%ebx 10c86d: 75 ec jne 10c85b <_User_extensions_Thread_switch+0x17> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10c86f: 8d 65 f4 lea -0xc(%ebp),%esp 10c872: 5b pop %ebx 10c873: 5e pop %esi 10c874: 5f pop %edi 10c875: c9 leave 10c876: c3 ret 0010e048 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10e048: 55 push %ebp 10e049: 89 e5 mov %esp,%ebp 10e04b: 57 push %edi 10e04c: 56 push %esi 10e04d: 53 push %ebx 10e04e: 83 ec 1c sub $0x1c,%esp 10e051: 8b 75 08 mov 0x8(%ebp),%esi 10e054: 8b 7d 0c mov 0xc(%ebp),%edi 10e057: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10e05a: 9c pushf 10e05b: fa cli 10e05c: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e05d: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e05f: 8d 4e 04 lea 0x4(%esi),%ecx * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 10e062: 39 ca cmp %ecx,%edx 10e064: 74 44 je 10e0aa <_Watchdog_Adjust+0x62> switch ( direction ) { 10e066: 85 ff test %edi,%edi 10e068: 74 3c je 10e0a6 <_Watchdog_Adjust+0x5e> 10e06a: 4f dec %edi 10e06b: 75 3d jne 10e0aa <_Watchdog_Adjust+0x62> <== ALWAYS TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10e06d: 01 5a 10 add %ebx,0x10(%edx) break; 10e070: eb 38 jmp 10e0aa <_Watchdog_Adjust+0x62> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10e072: 8b 16 mov (%esi),%edx case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 10e074: 8b 7a 10 mov 0x10(%edx),%edi 10e077: 39 fb cmp %edi,%ebx 10e079: 73 07 jae 10e082 <_Watchdog_Adjust+0x3a> _Watchdog_First( header )->delta_interval -= units; 10e07b: 29 df sub %ebx,%edi 10e07d: 89 7a 10 mov %edi,0x10(%edx) break; 10e080: eb 28 jmp 10e0aa <_Watchdog_Adjust+0x62> <== ALWAYS TAKEN } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10e082: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10e089: 50 push %eax 10e08a: 9d popf _Watchdog_Tickle( header ); 10e08b: 83 ec 0c sub $0xc,%esp 10e08e: 56 push %esi 10e08f: 89 4d e4 mov %ecx,-0x1c(%ebp) 10e092: e8 9d 01 00 00 call 10e234 <_Watchdog_Tickle> <== ALWAYS TAKEN _ISR_Disable( level ); 10e097: 9c pushf 10e098: fa cli 10e099: 58 pop %eax if ( _Chain_Is_empty( header ) ) 10e09a: 83 c4 10 add $0x10,%esp 10e09d: 8b 4d e4 mov -0x1c(%ebp),%ecx 10e0a0: 39 0e cmp %ecx,(%esi) 10e0a2: 74 06 je 10e0aa <_Watchdog_Adjust+0x62> while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 10e0a4: 29 fb sub %edi,%ebx switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10e0a6: 85 db test %ebx,%ebx 10e0a8: 75 c8 jne 10e072 <_Watchdog_Adjust+0x2a> <== NEVER TAKEN } break; } } _ISR_Enable( level ); 10e0aa: 50 push %eax 10e0ab: 9d popf } 10e0ac: 8d 65 f4 lea -0xc(%ebp),%esp 10e0af: 5b pop %ebx 10e0b0: 5e pop %esi 10e0b1: 5f pop %edi 10e0b2: c9 leave 10e0b3: c3 ret 00119b14 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 119b14: 55 push %ebp 119b15: 89 e5 mov %esp,%ebp 119b17: 57 push %edi 119b18: 56 push %esi 119b19: 53 push %ebx 119b1a: 83 ec 0c sub $0xc,%esp 119b1d: 8b 7d 08 mov 0x8(%ebp),%edi 119b20: 8b 4d 0c mov 0xc(%ebp),%ecx 119b23: 8b 75 10 mov 0x10(%ebp),%esi Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { 119b26: 85 c9 test %ecx,%ecx 119b28: 74 69 je 119b93 <_Watchdog_Adjust_to_chain+0x7f> return; } _ISR_Disable( level ); 119b2a: 9c pushf 119b2b: fa cli 119b2c: 8f 45 ec popl -0x14(%ebp) 119b2f: 8d 47 04 lea 0x4(%edi),%eax 119b32: 89 45 f0 mov %eax,-0x10(%ebp) 119b35: 8d 56 04 lea 0x4(%esi),%edx 119b38: 89 55 e8 mov %edx,-0x18(%ebp) 119b3b: eb 04 jmp 119b41 <_Watchdog_Adjust_to_chain+0x2d> <== ALWAYS TAKEN while ( 1 ) { if ( units <= 0 ) { 119b3d: 85 c9 test %ecx,%ecx 119b3f: 74 4e je 119b8f <_Watchdog_Adjust_to_chain+0x7b> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 119b41: 8b 17 mov (%edi),%edx break; } if ( _Chain_Is_empty( header ) ) { 119b43: 3b 55 f0 cmp -0x10(%ebp),%edx 119b46: 74 47 je 119b8f <_Watchdog_Adjust_to_chain+0x7b> 119b48: 89 d0 mov %edx,%eax /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { 119b4a: 8b 5a 10 mov 0x10(%edx),%ebx 119b4d: 39 d9 cmp %ebx,%ecx 119b4f: 73 07 jae 119b58 <_Watchdog_Adjust_to_chain+0x44> first->delta_interval -= units; 119b51: 29 cb sub %ecx,%ebx 119b53: 89 5a 10 mov %ebx,0x10(%edx) break; 119b56: eb 37 jmp 119b8f <_Watchdog_Adjust_to_chain+0x7b> <== ALWAYS TAKEN /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; 119b58: 29 d9 sub %ebx,%ecx first->delta_interval = 0; 119b5a: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 119b61: 8b 18 mov (%eax),%ebx previous = the_node->previous; 119b63: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 119b66: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 119b69: 89 1a mov %ebx,(%edx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 119b6b: 8b 55 e8 mov -0x18(%ebp),%edx 119b6e: 89 10 mov %edx,(%eax) old_last_node = the_chain->last; 119b70: 8b 56 08 mov 0x8(%esi),%edx the_chain->last = the_node; 119b73: 89 46 08 mov %eax,0x8(%esi) old_last_node->next = the_node; 119b76: 89 02 mov %eax,(%edx) the_node->previous = old_last_node; 119b78: 89 50 04 mov %edx,0x4(%eax) while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 119b7b: ff 75 ec pushl -0x14(%ebp) 119b7e: 9d popf 119b7f: fa cli */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 119b80: 8b 07 mov (%edi),%eax if ( _Chain_Is_empty( header ) ) 119b82: 3b 45 f0 cmp -0x10(%ebp),%eax 119b85: 74 b6 je 119b3d <_Watchdog_Adjust_to_chain+0x29> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 119b87: 83 78 10 00 cmpl $0x0,0x10(%eax) 119b8b: 74 d4 je 119b61 <_Watchdog_Adjust_to_chain+0x4d> 119b8d: eb ae jmp 119b3d <_Watchdog_Adjust_to_chain+0x29> <== ALWAYS TAKEN break; } } _ISR_Enable( level ); 119b8f: ff 75 ec pushl -0x14(%ebp) 119b92: 9d popf } 119b93: 83 c4 0c add $0xc,%esp 119b96: 5b pop %ebx 119b97: 5e pop %esi 119b98: 5f pop %edi 119b99: c9 leave 119b9a: c3 ret 0010c878 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10c878: 55 push %ebp 10c879: 89 e5 mov %esp,%ebp 10c87b: 57 push %edi 10c87c: 56 push %esi 10c87d: 53 push %ebx 10c87e: 83 ec 08 sub $0x8,%esp 10c881: 8b 45 0c mov 0xc(%ebp),%eax Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 10c884: 8b 35 0c 39 12 00 mov 0x12390c,%esi _ISR_Disable( level ); 10c88a: 9c pushf 10c88b: fa cli 10c88c: 5b pop %ebx /* * 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 ) { 10c88d: 83 78 08 00 cmpl $0x0,0x8(%eax) 10c891: 74 07 je 10c89a <_Watchdog_Insert+0x22> _ISR_Enable( level ); 10c893: 53 push %ebx 10c894: 9d popf return; 10c895: e9 8d 00 00 00 jmp 10c927 <_Watchdog_Insert+0xaf> <== ALWAYS TAKEN } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10c89a: c7 40 08 01 00 00 00 movl $0x1,0x8(%eax) _Watchdog_Sync_count++; 10c8a1: 8b 15 bc 39 12 00 mov 0x1239bc,%edx 10c8a7: 42 inc %edx 10c8a8: 89 15 bc 39 12 00 mov %edx,0x1239bc restart: delta_interval = the_watchdog->initial; 10c8ae: 8b 48 0c mov 0xc(%eax),%ecx * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 10c8b1: 8b 7d 08 mov 0x8(%ebp),%edi 10c8b4: 8b 17 mov (%edi),%edx ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10c8b6: 85 c9 test %ecx,%ecx 10c8b8: 74 38 je 10c8f2 <_Watchdog_Insert+0x7a> 10c8ba: 83 3a 00 cmpl $0x0,(%edx) 10c8bd: 74 33 je 10c8f2 <_Watchdog_Insert+0x7a> break; if ( delta_interval < after->delta_interval ) { 10c8bf: 8b 7a 10 mov 0x10(%edx),%edi 10c8c2: 89 7d ec mov %edi,-0x14(%ebp) 10c8c5: 39 f9 cmp %edi,%ecx 10c8c7: 73 07 jae 10c8d0 <_Watchdog_Insert+0x58> after->delta_interval -= delta_interval; 10c8c9: 29 cf sub %ecx,%edi 10c8cb: 89 7a 10 mov %edi,0x10(%edx) break; 10c8ce: eb 22 jmp 10c8f2 <_Watchdog_Insert+0x7a> <== ALWAYS TAKEN * 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 ); 10c8d0: 53 push %ebx 10c8d1: 9d popf 10c8d2: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10c8d3: 83 78 08 01 cmpl $0x1,0x8(%eax) 10c8d7: 75 3b jne 10c914 <_Watchdog_Insert+0x9c> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10c8d9: 8b 3d 2c 39 12 00 mov 0x12392c,%edi 10c8df: 39 f7 cmp %esi,%edi 10c8e1: 76 08 jbe 10c8eb <_Watchdog_Insert+0x73> _Watchdog_Sync_level = insert_isr_nest_level; 10c8e3: 89 35 2c 39 12 00 mov %esi,0x12392c goto restart; 10c8e9: eb c3 jmp 10c8ae <_Watchdog_Insert+0x36> <== ALWAYS TAKEN if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10c8eb: 2b 4d ec sub -0x14(%ebp),%ecx RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 10c8ee: 8b 12 mov (%edx),%edx if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; goto restart; } } 10c8f0: eb c4 jmp 10c8b6 <_Watchdog_Insert+0x3e> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 10c8f2: c7 40 08 02 00 00 00 movl $0x2,0x8(%eax) _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10c8f9: 89 48 10 mov %ecx,0x10(%eax) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10c8fc: 8b 52 04 mov 0x4(%edx),%edx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10c8ff: 89 50 04 mov %edx,0x4(%eax) before_node = after_node->next; 10c902: 8b 0a mov (%edx),%ecx after_node->next = the_node; 10c904: 89 02 mov %eax,(%edx) the_node->next = before_node; 10c906: 89 08 mov %ecx,(%eax) before_node->previous = the_node; 10c908: 89 41 04 mov %eax,0x4(%ecx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10c90b: 8b 15 c0 39 12 00 mov 0x1239c0,%edx 10c911: 89 50 14 mov %edx,0x14(%eax) exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 10c914: 89 35 2c 39 12 00 mov %esi,0x12392c _Watchdog_Sync_count--; 10c91a: a1 bc 39 12 00 mov 0x1239bc,%eax 10c91f: 48 dec %eax 10c920: a3 bc 39 12 00 mov %eax,0x1239bc _ISR_Enable( level ); 10c925: 53 push %ebx 10c926: 9d popf } 10c927: 58 pop %eax 10c928: 5a pop %edx 10c929: 5b pop %ebx 10c92a: 5e pop %esi 10c92b: 5f pop %edi 10c92c: c9 leave 10c92d: c3 ret 0010c990 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10c990: 55 push %ebp 10c991: 89 e5 mov %esp,%ebp 10c993: 56 push %esi 10c994: 53 push %ebx 10c995: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10c998: 9c pushf 10c999: fa cli 10c99a: 5e pop %esi previous_state = the_watchdog->state; 10c99b: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10c99e: 83 f8 01 cmp $0x1,%eax 10c9a1: 74 09 je 10c9ac <_Watchdog_Remove+0x1c> 10c9a3: 72 44 jb 10c9e9 <_Watchdog_Remove+0x59> 10c9a5: 83 f8 03 cmp $0x3,%eax 10c9a8: 77 3f ja 10c9e9 <_Watchdog_Remove+0x59> <== ALWAYS TAKEN 10c9aa: eb 09 jmp 10c9b5 <_Watchdog_Remove+0x25> <== ALWAYS TAKEN /* * 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; 10c9ac: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10c9b3: eb 34 jmp 10c9e9 <_Watchdog_Remove+0x59> <== ALWAYS TAKEN case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10c9b5: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 10c9bc: 8b 0a mov (%edx),%ecx next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10c9be: 83 39 00 cmpl $0x0,(%ecx) 10c9c1: 74 06 je 10c9c9 <_Watchdog_Remove+0x39> next_watchdog->delta_interval += the_watchdog->delta_interval; 10c9c3: 8b 5a 10 mov 0x10(%edx),%ebx 10c9c6: 01 59 10 add %ebx,0x10(%ecx) if ( _Watchdog_Sync_count ) 10c9c9: 8b 0d bc 39 12 00 mov 0x1239bc,%ecx 10c9cf: 85 c9 test %ecx,%ecx 10c9d1: 74 0c je 10c9df <_Watchdog_Remove+0x4f> _Watchdog_Sync_level = _ISR_Nest_level; 10c9d3: 8b 0d 0c 39 12 00 mov 0x12390c,%ecx 10c9d9: 89 0d 2c 39 12 00 mov %ecx,0x12392c ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10c9df: 8b 1a mov (%edx),%ebx previous = the_node->previous; 10c9e1: 8b 4a 04 mov 0x4(%edx),%ecx next->previous = previous; 10c9e4: 89 4b 04 mov %ecx,0x4(%ebx) previous->next = next; 10c9e7: 89 19 mov %ebx,(%ecx) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10c9e9: 8b 0d c0 39 12 00 mov 0x1239c0,%ecx 10c9ef: 89 4a 18 mov %ecx,0x18(%edx) _ISR_Enable( level ); 10c9f2: 56 push %esi 10c9f3: 9d popf return( previous_state ); } 10c9f4: 5b pop %ebx 10c9f5: 5e pop %esi 10c9f6: c9 leave 10c9f7: c3 ret 0010dbf4 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10dbf4: 55 push %ebp 10dbf5: 89 e5 mov %esp,%ebp 10dbf7: 57 push %edi 10dbf8: 56 push %esi 10dbf9: 53 push %ebx 10dbfa: 83 ec 20 sub $0x20,%esp 10dbfd: 8b 7d 08 mov 0x8(%ebp),%edi 10dc00: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10dc03: 9c pushf 10dc04: fa cli 10dc05: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10dc08: 56 push %esi 10dc09: 57 push %edi 10dc0a: 68 c4 f8 11 00 push $0x11f8c4 10dc0f: e8 04 ac ff ff call 108818 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10dc14: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10dc16: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10dc19: 83 c4 10 add $0x10,%esp 10dc1c: 39 f3 cmp %esi,%ebx 10dc1e: 74 1d je 10dc3d <_Watchdog_Report_chain+0x49> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10dc20: 52 push %edx 10dc21: 52 push %edx 10dc22: 53 push %ebx 10dc23: 6a 00 push $0x0 10dc25: e8 32 00 00 00 call 10dc5c <_Watchdog_Report> <== ALWAYS TAKEN _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 ) 10dc2a: 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 ; 10dc2c: 83 c4 10 add $0x10,%esp 10dc2f: 39 f3 cmp %esi,%ebx 10dc31: 75 ed jne 10dc20 <_Watchdog_Report_chain+0x2c> <== ALWAYS TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10dc33: 50 push %eax 10dc34: 50 push %eax 10dc35: 57 push %edi 10dc36: 68 db f8 11 00 push $0x11f8db 10dc3b: eb 08 jmp 10dc45 <_Watchdog_Report_chain+0x51> <== ALWAYS TAKEN } else { printk( "Chain is empty\n" ); 10dc3d: 83 ec 0c sub $0xc,%esp 10dc40: 68 ea f8 11 00 push $0x11f8ea 10dc45: e8 ce ab ff ff call 108818 10dc4a: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10dc4d: ff 75 e4 pushl -0x1c(%ebp) 10dc50: 9d popf } 10dc51: 8d 65 f4 lea -0xc(%ebp),%esp 10dc54: 5b pop %ebx 10dc55: 5e pop %esi 10dc56: 5f pop %edi 10dc57: c9 leave 10dc58: c3 ret 0010c9f8 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10c9f8: 55 push %ebp 10c9f9: 89 e5 mov %esp,%ebp 10c9fb: 57 push %edi 10c9fc: 56 push %esi 10c9fd: 53 push %ebx 10c9fe: 83 ec 1c sub $0x1c,%esp 10ca01: 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 ); 10ca04: 9c pushf 10ca05: fa cli 10ca06: 5e pop %esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10ca07: 8b 1f mov (%edi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ca09: 8d 47 04 lea 0x4(%edi),%eax 10ca0c: 89 45 e4 mov %eax,-0x1c(%ebp) if ( _Chain_Is_empty( header ) ) 10ca0f: 39 c3 cmp %eax,%ebx 10ca11: 74 40 je 10ca53 <_Watchdog_Tickle+0x5b> * 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) { 10ca13: 8b 43 10 mov 0x10(%ebx),%eax 10ca16: 85 c0 test %eax,%eax 10ca18: 74 08 je 10ca22 <_Watchdog_Tickle+0x2a> the_watchdog->delta_interval--; 10ca1a: 48 dec %eax 10ca1b: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10ca1e: 85 c0 test %eax,%eax 10ca20: 75 31 jne 10ca53 <_Watchdog_Tickle+0x5b> goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10ca22: 83 ec 0c sub $0xc,%esp 10ca25: 53 push %ebx 10ca26: e8 65 ff ff ff call 10c990 <_Watchdog_Remove> <== ALWAYS TAKEN _ISR_Enable( level ); 10ca2b: 56 push %esi 10ca2c: 9d popf switch( watchdog_state ) { 10ca2d: 83 c4 10 add $0x10,%esp 10ca30: 83 f8 02 cmp $0x2,%eax 10ca33: 75 0e jne 10ca43 <_Watchdog_Tickle+0x4b> case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10ca35: 50 push %eax 10ca36: 50 push %eax 10ca37: ff 73 24 pushl 0x24(%ebx) 10ca3a: ff 73 20 pushl 0x20(%ebx) 10ca3d: ff 53 1c call *0x1c(%ebx) 10ca40: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10ca43: 9c pushf 10ca44: fa cli 10ca45: 5e pop %esi RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10ca46: 8b 1f mov (%edi),%ebx the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10ca48: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10ca4b: 74 06 je 10ca53 <_Watchdog_Tickle+0x5b> 10ca4d: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10ca51: eb cd jmp 10ca20 <_Watchdog_Tickle+0x28> <== ALWAYS TAKEN leave: _ISR_Enable(level); 10ca53: 56 push %esi 10ca54: 9d popf } 10ca55: 8d 65 f4 lea -0xc(%ebp),%esp 10ca58: 5b pop %ebx 10ca59: 5e pop %esi 10ca5a: 5f pop %edi 10ca5b: c9 leave 10ca5c: c3 ret 0010f834 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 10f834: 55 push %ebp 10f835: 89 e5 mov %esp,%ebp 10f837: 57 push %edi 10f838: 56 push %esi 10f839: 53 push %ebx 10f83a: 83 ec 2c sub $0x2c,%esp 10f83d: 8b 75 08 mov 0x8(%ebp),%esi 10f840: 8b 7d 0c mov 0xc(%ebp),%edi 10f843: 8b 55 10 mov 0x10(%ebp),%edx 10f846: 8b 5d 14 mov 0x14(%ebp),%ebx Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 10f849: b8 03 00 00 00 mov $0x3,%eax 10f84e: 85 f6 test %esi,%esi 10f850: 0f 84 8c 00 00 00 je 10f8e2 return RTEMS_INVALID_NAME; if ( !id ) 10f856: b0 09 mov $0x9,%al 10f858: 85 db test %ebx,%ebx 10f85a: 0f 84 82 00 00 00 je 10f8e2 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 10f860: f7 c7 10 00 00 00 test $0x10,%edi 10f866: 74 0f je 10f877 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 10f868: b0 0a mov $0xa,%al 10f86a: 85 d2 test %edx,%edx 10f86c: 74 74 je 10f8e2 if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 10f86e: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 10f875: eb 07 jmp 10f87e <== ALWAYS TAKEN if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 10f877: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) the_attributes.maximum_count = maximum_waiters; 10f87e: 89 55 e4 mov %edx,-0x1c(%ebp) 10f881: a1 74 38 12 00 mov 0x123874,%eax 10f886: 40 inc %eax 10f887: a3 74 38 12 00 mov %eax,0x123874 * 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 ); 10f88c: 83 ec 0c sub $0xc,%esp 10f88f: 68 54 3b 12 00 push $0x123b54 10f894: e8 a3 b6 ff ff call 10af3c <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 10f899: 83 c4 10 add $0x10,%esp 10f89c: 85 c0 test %eax,%eax 10f89e: 75 0c jne 10f8ac _Thread_Enable_dispatch(); 10f8a0: e8 70 c2 ff ff call 10bb15 <_Thread_Enable_dispatch> 10f8a5: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10f8aa: eb 36 jmp 10f8e2 <== ALWAYS TAKEN } the_barrier->attribute_set = attribute_set; 10f8ac: 89 78 10 mov %edi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 10f8af: 52 push %edx 10f8b0: 52 push %edx 10f8b1: 8d 55 e0 lea -0x20(%ebp),%edx 10f8b4: 52 push %edx 10f8b5: 8d 50 14 lea 0x14(%eax),%edx 10f8b8: 52 push %edx 10f8b9: 89 45 d4 mov %eax,-0x2c(%ebp) 10f8bc: e8 4b 03 00 00 call 10fc0c <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10f8c1: 8b 45 d4 mov -0x2c(%ebp),%eax 10f8c4: 8b 50 08 mov 0x8(%eax),%edx 10f8c7: 0f b7 fa movzwl %dx,%edi 10f8ca: 8b 0d 70 3b 12 00 mov 0x123b70,%ecx 10f8d0: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10f8d3: 89 70 0c mov %esi,0xc(%eax) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 10f8d6: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10f8d8: e8 38 c2 ff ff call 10bb15 <_Thread_Enable_dispatch> 10f8dd: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f8df: 83 c4 10 add $0x10,%esp } 10f8e2: 8d 65 f4 lea -0xc(%ebp),%esp 10f8e5: 5b pop %ebx 10f8e6: 5e pop %esi 10f8e7: 5f pop %edi 10f8e8: c9 leave 10f8e9: c3 ret 0010eb64 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 10eb64: 55 push %ebp 10eb65: 89 e5 mov %esp,%ebp 10eb67: 53 push %ebx 10eb68: 83 ec 04 sub $0x4,%esp 10eb6b: 8b 55 08 mov 0x8(%ebp),%edx 10eb6e: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !time_buffer ) 10eb71: b8 09 00 00 00 mov $0x9,%eax 10eb76: 85 db test %ebx,%ebx 10eb78: 74 50 je 10ebca return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 10eb7a: 85 d2 test %edx,%edx 10eb7c: 75 0b jne 10eb89 return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 10eb7e: 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; } 10eb81: 58 pop %eax 10eb82: 5b pop %ebx 10eb83: 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 ); 10eb84: e9 8f 00 00 00 jmp 10ec18 <== ALWAYS TAKEN if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 10eb89: 83 fa 01 cmp $0x1,%edx 10eb8c: 75 0b jne 10eb99 return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 10eb8e: 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; } 10eb91: 5b pop %ebx 10eb92: 5b pop %ebx 10eb93: 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); 10eb94: e9 37 00 00 00 jmp 10ebd0 <== ALWAYS TAKEN if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 10eb99: 83 fa 02 cmp $0x2,%edx 10eb9c: 75 07 jne 10eba5 rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 10eb9e: e8 69 00 00 00 call 10ec0c <== ALWAYS TAKEN 10eba3: eb 0a jmp 10ebaf <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 10eba5: 83 fa 03 cmp $0x3,%edx 10eba8: 75 0b jne 10ebb5 rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 10ebaa: e8 49 00 00 00 call 10ebf8 <== ALWAYS TAKEN 10ebaf: 89 03 mov %eax,(%ebx) 10ebb1: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10ebb3: eb 15 jmp 10ebca <== ALWAYS TAKEN } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 10ebb5: b8 0a 00 00 00 mov $0xa,%eax 10ebba: 83 fa 04 cmp $0x4,%edx 10ebbd: 75 0b jne 10ebca return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 10ebbf: 89 5d 08 mov %ebx,0x8(%ebp) return RTEMS_INVALID_NUMBER; } 10ebc2: 59 pop %ecx 10ebc3: 5b pop %ebx 10ebc4: 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 ); 10ebc5: e9 e6 00 00 00 jmp 10ecb0 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; } 10ebca: 5a pop %edx 10ebcb: 5b pop %ebx 10ebcc: c9 leave 10ebcd: c3 ret 0010a8cc : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 10a8cc: 55 push %ebp 10a8cd: 89 e5 mov %esp,%ebp 10a8cf: 53 push %ebx 10a8d0: 83 ec 14 sub $0x14,%esp 10a8d3: 8b 5d 08 mov 0x8(%ebp),%ebx struct timespec newtime; if ( !time_buffer ) 10a8d6: b8 09 00 00 00 mov $0x9,%eax 10a8db: 85 db test %ebx,%ebx 10a8dd: 74 56 je 10a935 return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 10a8df: 83 ec 0c sub $0xc,%esp 10a8e2: 53 push %ebx 10a8e3: e8 f8 00 00 00 call 10a9e0 <_TOD_Validate> <== ALWAYS TAKEN 10a8e8: 88 c2 mov %al,%dl 10a8ea: 83 c4 10 add $0x10,%esp 10a8ed: b8 14 00 00 00 mov $0x14,%eax 10a8f2: 84 d2 test %dl,%dl 10a8f4: 74 3f je 10a935 newtime.tv_sec = _TOD_To_seconds( time_buffer ); 10a8f6: 83 ec 0c sub $0xc,%esp 10a8f9: 53 push %ebx 10a8fa: e8 79 00 00 00 call 10a978 <_TOD_To_seconds> <== ALWAYS TAKEN 10a8ff: 89 45 f0 mov %eax,-0x10(%ebp) newtime.tv_nsec = time_buffer->ticks * 10a902: 8b 43 18 mov 0x18(%ebx),%eax 10a905: 0f af 05 24 2a 12 00 imul 0x122a24,%eax 10a90c: 69 c0 e8 03 00 00 imul $0x3e8,%eax,%eax 10a912: 89 45 f4 mov %eax,-0xc(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a915: a1 78 e7 12 00 mov 0x12e778,%eax 10a91a: 40 inc %eax 10a91b: a3 78 e7 12 00 mov %eax,0x12e778 rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 10a920: 8d 45 f0 lea -0x10(%ebp),%eax 10a923: 89 04 24 mov %eax,(%esp) 10a926: e8 f1 15 00 00 call 10bf1c <_TOD_Set> _Thread_Enable_dispatch(); 10a92b: e8 29 27 00 00 call 10d059 <_Thread_Enable_dispatch> 10a930: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10a932: 83 c4 10 add $0x10,%esp } return RTEMS_INVALID_CLOCK; } 10a935: 8b 5d fc mov -0x4(%ebp),%ebx 10a938: c9 leave 10a939: c3 ret 00109960 : rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 109960: 55 push %ebp 109961: 89 e5 mov %esp,%ebp 109963: 83 ec 08 sub $0x8,%esp 109966: 8b 4d 08 mov 0x8(%ebp),%ecx 109969: 8b 55 14 mov 0x14(%ebp),%edx RTEMS_API_Control *api; if ( !event_out ) 10996c: b8 09 00 00 00 mov $0x9,%eax 109971: 85 d2 test %edx,%edx 109973: 74 3f je 1099b4 return RTEMS_INVALID_ADDRESS; api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; 109975: a1 30 39 12 00 mov 0x123930,%eax 10997a: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax if ( _Event_sets_Is_empty( event_in ) ) { 109980: 85 c9 test %ecx,%ecx 109982: 75 08 jne 10998c *event_out = api->pending_events; 109984: 8b 00 mov (%eax),%eax 109986: 89 02 mov %eax,(%edx) 109988: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10998a: eb 28 jmp 1099b4 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10998c: a1 74 38 12 00 mov 0x123874,%eax 109991: 40 inc %eax 109992: a3 74 38 12 00 mov %eax,0x123874 } _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); 109997: 52 push %edx 109998: ff 75 10 pushl 0x10(%ebp) 10999b: ff 75 0c pushl 0xc(%ebp) 10999e: 51 push %ecx 10999f: e8 14 00 00 00 call 1099b8 <_Event_Seize> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 1099a4: e8 6c 21 00 00 call 10bb15 <_Thread_Enable_dispatch> return( _Thread_Executing->Wait.return_code ); 1099a9: a1 30 39 12 00 mov 0x123930,%eax 1099ae: 8b 40 34 mov 0x34(%eax),%eax 1099b1: 83 c4 10 add $0x10,%esp } 1099b4: c9 leave 1099b5: c3 ret 00109ac0 : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { 109ac0: 55 push %ebp 109ac1: 89 e5 mov %esp,%ebp 109ac3: 53 push %ebx 109ac4: 83 ec 1c sub $0x1c,%esp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); 109ac7: 8d 45 f4 lea -0xc(%ebp),%eax 109aca: 50 push %eax 109acb: ff 75 08 pushl 0x8(%ebp) 109ace: e8 65 20 00 00 call 10bb38 <_Thread_Get> 109ad3: 89 c2 mov %eax,%edx switch ( location ) { 109ad5: 83 c4 10 add $0x10,%esp 109ad8: b8 04 00 00 00 mov $0x4,%eax 109add: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 109ae1: 75 23 jne 109b06 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 109ae3: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 109ae9: 9c pushf 109aea: fa cli 109aeb: 59 pop %ecx *the_event_set |= the_new_events; 109aec: 8b 5d 0c mov 0xc(%ebp),%ebx 109aef: 09 18 or %ebx,(%eax) _ISR_Enable( level ); 109af1: 51 push %ecx 109af2: 9d popf _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 109af3: 83 ec 0c sub $0xc,%esp 109af6: 52 push %edx 109af7: e8 10 00 00 00 call 109b0c <_Event_Surrender> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 109afc: e8 14 20 00 00 call 10bb15 <_Thread_Enable_dispatch> 109b01: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 109b03: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 109b06: 8b 5d fc mov -0x4(%ebp),%ebx 109b09: c9 leave 109b0a: c3 ret 0010d9bc : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { 10d9bc: 55 push %ebp 10d9bd: 89 e5 mov %esp,%ebp 10d9bf: 57 push %edi 10d9c0: 56 push %esi 10d9c1: 53 push %ebx 10d9c2: 83 ec 0c sub $0xc,%esp 10d9c5: 8b 75 0c mov 0xc(%ebp),%esi Extension_Control *the_extension; if ( !id ) 10d9c8: b8 09 00 00 00 mov $0x9,%eax 10d9cd: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10d9d1: 74 6f je 10da42 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10d9d3: b0 03 mov $0x3,%al 10d9d5: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 10d9d9: 74 67 je 10da42 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d9db: a1 50 ea 12 00 mov 0x12ea50,%eax 10d9e0: 40 inc %eax 10d9e1: a3 50 ea 12 00 mov %eax,0x12ea50 #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 10d9e6: 83 ec 0c sub $0xc,%esp 10d9e9: 68 78 ec 12 00 push $0x12ec78 10d9ee: e8 39 0b 00 00 call 10e52c <_Objects_Allocate> 10d9f3: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 10d9f5: 83 c4 10 add $0x10,%esp 10d9f8: 85 c0 test %eax,%eax 10d9fa: 75 0c jne 10da08 _Thread_Enable_dispatch(); 10d9fc: e8 70 17 00 00 call 10f171 <_Thread_Enable_dispatch> 10da01: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10da06: eb 3a jmp 10da42 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 10da08: 8d 78 24 lea 0x24(%eax),%edi 10da0b: b9 08 00 00 00 mov $0x8,%ecx 10da10: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10da12: 83 ec 0c sub $0xc,%esp 10da15: 8d 40 10 lea 0x10(%eax),%eax 10da18: 50 push %eax 10da19: e8 b2 22 00 00 call 10fcd0 <_User_extensions_Add_set> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10da1e: 8b 43 08 mov 0x8(%ebx),%eax 10da21: 0f b7 c8 movzwl %ax,%ecx 10da24: 8b 15 94 ec 12 00 mov 0x12ec94,%edx 10da2a: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10da2d: 8b 55 08 mov 0x8(%ebp),%edx 10da30: 89 53 0c mov %edx,0xc(%ebx) &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 10da33: 8b 55 10 mov 0x10(%ebp),%edx 10da36: 89 02 mov %eax,(%edx) _Thread_Enable_dispatch(); 10da38: e8 34 17 00 00 call 10f171 <_Thread_Enable_dispatch> 10da3d: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10da3f: 83 c4 10 add $0x10,%esp } 10da42: 8d 65 f4 lea -0xc(%ebp),%esp 10da45: 5b pop %ebx 10da46: 5e pop %esi 10da47: 5f pop %edi 10da48: c9 leave 10da49: c3 ret 0010a4e4 : */ void rtems_fatal_error_occurred( uint32_t the_error ) { 10a4e4: 55 push %ebp 10a4e5: 89 e5 mov %esp,%ebp 10a4e7: 83 ec 0c sub $0xc,%esp _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, FALSE, the_error ); 10a4ea: ff 75 08 pushl 0x8(%ebp) 10a4ed: 6a 00 push $0x0 10a4ef: 6a 01 push $0x1 10a4f1: e8 ae 09 00 00 call 10aea4 <_Internal_error_Occurred> <== ALWAYS TAKEN 0010a418 : #endif Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ]; void rtems_initialize_data_structures(void) { 10a418: 55 push %ebp 10a419: 89 e5 mov %esp,%ebp 10a41b: 83 ec 08 sub $0x8,%esp 10a41e: c7 05 0c 3a 12 00 00 movl $0x0,0x123a0c 10a425: 00 00 00 #endif /* * Initialize any target architecture specific support as early as possible */ _CPU_Initialize(); 10a428: e8 b3 28 00 00 call 10cce0 <_CPU_Initialize> /* * Do this as early as possible to ensure no debugging output * is even attempted to be printed. */ _Debug_Manager_initialization(); 10a42d: e8 16 3e 00 00 call 10e248 <_Debug_Manager_initialization> <== ALWAYS TAKEN _API_extensions_Initialization(); 10a432: e8 b1 01 00 00 call 10a5e8 <_API_extensions_Initialization> <== ALWAYS TAKEN * This routine initializes the thread dispatching subsystem. */ RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void ) { _Thread_Dispatch_disable_level = 1; 10a437: c7 05 74 38 12 00 01 movl $0x1,0x123874 10a43e: 00 00 00 /* * Before this is called, we are not allowed to allocate memory * from the Workspace because it is not initialized. */ _Workspace_Handler_initialization(); 10a441: e8 74 26 00 00 call 10caba <_Workspace_Handler_initialization> _User_extensions_Handler_initialization(); 10a446: e8 fd 21 00 00 call 10c648 <_User_extensions_Handler_initialization> _ISR_Handler_initialization(); 10a44b: e8 94 0a 00 00 call 10aee4 <_ISR_Handler_initialization> <== ALWAYS TAKEN /* * Initialize the internal support API and allocator Mutex */ _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; 10a450: c7 05 4c 38 12 00 8c movl $0x12388c,0x12384c 10a457: 38 12 00 _API_Mutex_Initialization( 1 ); 10a45a: 83 ec 0c sub $0xc,%esp 10a45d: 6a 01 push $0x1 10a45f: e8 88 02 00 00 call 10a6ec <_API_Mutex_Initialization> <== ALWAYS TAKEN _API_Mutex_Allocate( &_RTEMS_Allocator_Mutex ); 10a464: c7 04 24 28 39 12 00 movl $0x123928,(%esp) 10a46b: e8 00 02 00 00 call 10a670 <_API_Mutex_Allocate> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { int index; _Priority_Major_bit_map = 0; 10a470: 66 c7 05 24 39 12 00 movw $0x0,0x123924 10a477: 00 00 10a479: 31 c0 xor %eax,%eax 10a47b: 83 c4 10 add $0x10,%esp for ( index=0 ; index <16 ; index++ ) _Priority_Bit_map[ index ] = 0; 10a47e: 66 c7 84 00 9c 39 12 movw $0x0,0x12399c(%eax,%eax,1) 10a485: 00 00 00 RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { int index; _Priority_Major_bit_map = 0; for ( index=0 ; index <16 ; index++ ) 10a488: 40 inc %eax 10a489: 83 f8 10 cmp $0x10,%eax 10a48c: 75 f0 jne 10a47e _Priority_Handler_initialization(); _Watchdog_Handler_initialization(); 10a48e: e8 9d 24 00 00 call 10c930 <_Watchdog_Handler_initialization> _TOD_Handler_initialization(); 10a493: e8 78 06 00 00 call 10ab10 <_TOD_Handler_initialization> <== ALWAYS TAKEN _Thread_Handler_initialization(); 10a498: e8 0f 19 00 00 call 10bdac <_Thread_Handler_initialization> _MPCI_Handler_initialization( RTEMS_TIMEOUT ); #endif /* MANAGERS */ _RTEMS_API_Initialize(); 10a49d: e8 fe 00 00 00 call 10a5a0 <_RTEMS_API_Initialize> <== ALWAYS TAKEN _Extension_Manager_initialization(); 10a4a2: e8 15 00 00 00 call 10a4bc <_Extension_Manager_initialization> <== ALWAYS TAKEN _IO_Manager_initialization(); 10a4a7: e8 73 00 00 00 call 10a51f <_IO_Manager_initialization> <== ALWAYS TAKEN 10a4ac: c7 05 0c 3a 12 00 01 movl $0x1,0x123a0c 10a4b3: 00 00 00 _Thread_Create_idle(); /* * Scheduling can properly occur now as long as we avoid dispatching. */ } 10a4b6: c9 leave * _Thread_Executing and _Thread_Heir are not set. * * At this point all API extensions are in place. After the call to * _Thread_Create_idle() _Thread_Executing and _Thread_Heir will be set. */ _Thread_Create_idle(); 10a4b7: e9 48 14 00 00 jmp 10b904 <_Thread_Create_idle> 0010a407 : _API_extensions_Run_predriver(); #endif } void rtems_initialize_device_drivers(void) { 10a407: 55 push %ebp 10a408: 89 e5 mov %esp,%ebp 10a40a: 83 ec 08 sub $0x8,%esp * Initialize all the device drivers and initialize the MPCI layer. * * NOTE: The MPCI may be build upon a device driver. */ _IO_Initialize_all_drivers(); 10a40d: e8 e6 00 00 00 call 10a4f8 <_IO_Initialize_all_drivers> <== ALWAYS TAKEN * Run the APIs and BSPs postdriver hooks. * * The API extensions are supposed to create user initialization tasks. */ _API_extensions_Run_postdriver(); } 10a412: c9 leave /* * Run the APIs and BSPs postdriver hooks. * * The API extensions are supposed to create user initialization tasks. */ _API_extensions_Run_postdriver(); 10a413: e9 f3 01 00 00 jmp 10a60b <_API_extensions_Run_postdriver> <== ALWAYS TAKEN 0010ba18 : 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 ) { 10ba18: 55 push %ebp 10ba19: 89 e5 mov %esp,%ebp 10ba1b: 57 push %edi 10ba1c: 56 push %esi 10ba1d: 53 push %ebx 10ba1e: 83 ec 0c sub $0xc,%esp 10ba21: 8b 5d 08 mov 0x8(%ebp),%ebx 10ba24: 8b 75 0c mov 0xc(%ebp),%esi 10ba27: 8b 55 10 mov 0x10(%ebp),%edx rtems_device_major_number major_limit = _IO_Number_of_drivers; 10ba2a: 8b 0d 0c 87 12 00 mov 0x12870c,%ecx if ( rtems_interrupt_is_in_progress() ) 10ba30: 8b 3d 8c 84 12 00 mov 0x12848c,%edi 10ba36: b8 12 00 00 00 mov $0x12,%eax 10ba3b: 85 ff test %edi,%edi 10ba3d: 0f 85 cc 00 00 00 jne 10bb0f return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 10ba43: 85 d2 test %edx,%edx 10ba45: 0f 84 bf 00 00 00 je 10bb0a return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 10ba4b: 89 0a mov %ecx,(%edx) if ( driver_table == NULL ) 10ba4d: 85 f6 test %esi,%esi 10ba4f: 0f 84 b5 00 00 00 je 10bb0a static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10ba55: 83 3e 00 cmpl $0x0,(%esi) 10ba58: 0f 85 b9 00 00 00 jne 10bb17 10ba5e: 83 7e 04 00 cmpl $0x0,0x4(%esi) 10ba62: 0f 85 af 00 00 00 jne 10bb17 10ba68: e9 9d 00 00 00 jmp 10bb0a <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10ba6d: a1 f4 83 12 00 mov 0x1283f4,%eax 10ba72: 40 inc %eax 10ba73: a3 f4 83 12 00 mov %eax,0x1283f4 if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 10ba78: 85 db test %ebx,%ebx 10ba7a: 75 31 jne 10baad static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 10ba7c: 8b 0d 0c 87 12 00 mov 0x12870c,%ecx 10ba82: a1 10 87 12 00 mov 0x128710,%eax 10ba87: eb 15 jmp 10ba9e <== ALWAYS TAKEN static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10ba89: 83 38 00 cmpl $0x0,(%eax) 10ba8c: 0f 85 94 00 00 00 jne 10bb26 10ba92: 83 78 04 00 cmpl $0x0,0x4(%eax) 10ba96: 0f 85 8a 00 00 00 jne 10bb26 10ba9c: eb 04 jmp 10baa2 <== ALWAYS TAKEN rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 10ba9e: 39 cb cmp %ecx,%ebx 10baa0: 72 e7 jb 10ba89 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10baa2: 89 1a mov %ebx,(%edx) if ( m != n ) 10baa4: 39 cb cmp %ecx,%ebx 10baa6: 75 30 jne 10bad8 10baa8: e9 82 00 00 00 jmp 10bb2f <== ALWAYS TAKEN _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 10baad: 6b c3 18 imul $0x18,%ebx,%eax 10bab0: 03 05 10 87 12 00 add 0x128710,%eax static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10bab6: 31 c9 xor %ecx,%ecx 10bab8: 83 38 00 cmpl $0x0,(%eax) 10babb: 75 09 jne 10bac6 10babd: 31 c9 xor %ecx,%ecx 10babf: 83 78 04 00 cmpl $0x0,0x4(%eax) 10bac3: 0f 94 c1 sete %cl } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { 10bac6: 85 c9 test %ecx,%ecx 10bac8: 75 0c jne 10bad6 _Thread_Enable_dispatch(); 10baca: e8 26 17 00 00 call 10d1f5 <_Thread_Enable_dispatch> 10bacf: b8 0c 00 00 00 mov $0xc,%eax return RTEMS_RESOURCE_IN_USE; 10bad4: eb 39 jmp 10bb0f <== ALWAYS TAKEN } *registered_major = major; 10bad6: 89 1a mov %ebx,(%edx) } _IO_Driver_address_table [major] = *driver_table; 10bad8: 6b fb 18 imul $0x18,%ebx,%edi 10badb: 03 3d 10 87 12 00 add 0x128710,%edi 10bae1: b9 06 00 00 00 mov $0x6,%ecx 10bae6: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10bae8: e8 08 17 00 00 call 10d1f5 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 10baed: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10baf4: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10bafb: 89 5d 08 mov %ebx,0x8(%ebp) } 10bafe: 83 c4 0c add $0xc,%esp 10bb01: 5b pop %ebx 10bb02: 5e pop %esi 10bb03: 5f pop %edi 10bb04: c9 leave _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10bb05: e9 42 6d 00 00 jmp 11284c <== ALWAYS TAKEN 10bb0a: b8 09 00 00 00 mov $0x9,%eax } 10bb0f: 83 c4 0c add $0xc,%esp 10bb12: 5b pop %ebx 10bb13: 5e pop %esi 10bb14: 5f pop %edi 10bb15: c9 leave 10bb16: c3 ret return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10bb17: b8 0a 00 00 00 mov $0xa,%eax 10bb1c: 39 cb cmp %ecx,%ebx 10bb1e: 0f 82 49 ff ff ff jb 10ba6d 10bb24: eb e9 jmp 10bb0f <== ALWAYS TAKEN rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 10bb26: 43 inc %ebx 10bb27: 83 c0 18 add $0x18,%eax 10bb2a: e9 6f ff ff ff jmp 10ba9e <== ALWAYS TAKEN if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 10bb2f: e8 c1 16 00 00 call 10d1f5 <_Thread_Enable_dispatch> 10bb34: b8 05 00 00 00 mov $0x5,%eax return sc; 10bb39: eb d4 jmp 10bb0f <== ALWAYS TAKEN 0010c370 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10c370: 55 push %ebp 10c371: 89 e5 mov %esp,%ebp 10c373: 57 push %edi 10c374: 56 push %esi 10c375: 53 push %ebx 10c376: 83 ec 0c sub $0xc,%esp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10c379: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 10c37d: 74 41 je 10c3c0 <== ALWAYS TAKEN 10c37f: bb 01 00 00 00 mov $0x1,%ebx return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 10c384: 8b 04 9d 4c e7 12 00 mov 0x12e74c(,%ebx,4),%eax 10c38b: 85 c0 test %eax,%eax 10c38d: 74 2b je 10c3ba continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10c38f: 8b 78 04 mov 0x4(%eax),%edi if ( !information ) 10c392: be 01 00 00 00 mov $0x1,%esi 10c397: 85 ff test %edi,%edi 10c399: 75 17 jne 10c3b2 10c39b: eb 1d jmp 10c3ba <== ALWAYS TAKEN continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 10c39d: 8b 47 1c mov 0x1c(%edi),%eax 10c3a0: 8b 04 b0 mov (%eax,%esi,4),%eax if ( !the_thread ) 10c3a3: 85 c0 test %eax,%eax 10c3a5: 74 0a je 10c3b1 <== ALWAYS TAKEN continue; (*routine)(the_thread); 10c3a7: 83 ec 0c sub $0xc,%esp 10c3aa: 50 push %eax 10c3ab: ff 55 08 call *0x8(%ebp) 10c3ae: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10c3b1: 46 inc %esi 10c3b2: 0f b7 47 10 movzwl 0x10(%edi),%eax 10c3b6: 39 c6 cmp %eax,%esi 10c3b8: 76 e3 jbe 10c39d Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10c3ba: 43 inc %ebx 10c3bb: 83 fb 05 cmp $0x5,%ebx 10c3be: 75 c4 jne 10c384 (*routine)(the_thread); } } } 10c3c0: 8d 65 f4 lea -0xc(%ebp),%esp 10c3c3: 5b pop %ebx 10c3c4: 5e pop %esi 10c3c5: 5f pop %edi 10c3c6: c9 leave 10c3c7: c3 ret 00113e58 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 113e58: 55 push %ebp 113e59: 89 e5 mov %esp,%ebp 113e5b: 57 push %edi 113e5c: 56 push %esi 113e5d: 53 push %ebx 113e5e: 83 ec 1c sub $0x1c,%esp 113e61: 8b 75 08 mov 0x8(%ebp),%esi 113e64: 8b 5d 0c mov 0xc(%ebp),%ebx 113e67: 8b 7d 14 mov 0x14(%ebp),%edi register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer ) 113e6a: 85 db test %ebx,%ebx 113e6c: 74 4f je 113ebd return RTEMS_INVALID_ADDRESS; if ( !count ) 113e6e: 85 ff test %edi,%edi 113e70: 74 4b je 113ebd RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 113e72: 52 push %edx 113e73: 8d 45 e4 lea -0x1c(%ebp),%eax 113e76: 50 push %eax 113e77: 56 push %esi 113e78: 68 48 cd 13 00 push $0x13cd48 113e7d: e8 0a 44 00 00 call 11828c <_Objects_Get> 113e82: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 113e84: 83 c4 10 add $0x10,%esp 113e87: b8 04 00 00 00 mov $0x4,%eax 113e8c: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 113e90: 75 30 jne 113ec2 case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( 113e92: 50 push %eax 113e93: 50 push %eax 113e94: 57 push %edi 113e95: 6a 00 push $0x0 113e97: 56 push %esi 113e98: ff 75 10 pushl 0x10(%ebp) 113e9b: 53 push %ebx 113e9c: 8d 42 14 lea 0x14(%edx),%eax 113e9f: 50 push %eax 113ea0: e8 cb 2e 00 00 call 116d70 <_CORE_message_queue_Broadcast> <== ALWAYS TAKEN 113ea5: 89 c3 mov %eax,%ebx NULL, #endif count ); _Thread_Enable_dispatch(); 113ea7: 83 c4 20 add $0x20,%esp 113eaa: e8 0e 4c 00 00 call 118abd <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( core_status ); 113eaf: 83 ec 0c sub $0xc,%esp 113eb2: 53 push %ebx 113eb3: e8 f8 02 00 00 call 1141b0 <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN #endif count ); _Thread_Enable_dispatch(); return 113eb8: 83 c4 10 add $0x10,%esp 113ebb: eb 05 jmp 113ec2 <== ALWAYS TAKEN 113ebd: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113ec2: 8d 65 f4 lea -0xc(%ebp),%esp 113ec5: 5b pop %ebx 113ec6: 5e pop %esi 113ec7: 5f pop %edi 113ec8: c9 leave 113ec9: c3 ret 00111228 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { 111228: 55 push %ebp 111229: 89 e5 mov %esp,%ebp 11122b: 57 push %edi 11122c: 56 push %esi 11122d: 53 push %ebx 11122e: 83 ec 2c sub $0x2c,%esp 111231: 8b 75 08 mov 0x8(%ebp),%esi 111234: 8b 7d 0c mov 0xc(%ebp),%edi 111237: 8b 55 10 mov 0x10(%ebp),%edx CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) 11123a: b8 03 00 00 00 mov $0x3,%eax 11123f: 85 f6 test %esi,%esi 111241: 0f 84 a9 00 00 00 je 1112f0 return RTEMS_INVALID_NAME; if ( !id ) 111247: b0 09 mov $0x9,%al 111249: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 11124d: 0f 84 9d 00 00 00 je 1112f0 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 111253: b0 0a mov $0xa,%al 111255: 85 ff test %edi,%edi 111257: 0f 84 93 00 00 00 je 1112f0 return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 11125d: b0 08 mov $0x8,%al 11125f: 85 d2 test %edx,%edx 111261: 0f 84 89 00 00 00 je 1112f0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 111267: a1 bc b2 12 00 mov 0x12b2bc,%eax 11126c: 40 inc %eax 11126d: a3 bc b2 12 00 mov %eax,0x12b2bc #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 111272: 89 55 d4 mov %edx,-0x2c(%ebp) 111275: e8 92 48 00 00 call 115b0c <_Message_queue_Allocate> 11127a: 89 c3 mov %eax,%ebx if ( !the_message_queue ) { 11127c: 85 c0 test %eax,%eax 11127e: 8b 55 d4 mov -0x2c(%ebp),%edx 111281: 75 0c jne 11128f _Thread_Enable_dispatch(); 111283: e8 b1 24 00 00 call 113739 <_Thread_Enable_dispatch> 111288: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 11128d: eb 61 jmp 1112f0 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 11128f: 8b 45 14 mov 0x14(%ebp),%eax 111292: 89 43 10 mov %eax,0x10(%ebx) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 111295: a8 04 test $0x4,%al 111297: 0f 95 c0 setne %al 11129a: 0f b6 c0 movzbl %al,%eax 11129d: 89 45 e4 mov %eax,-0x1c(%ebp) else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 1112a0: 52 push %edx 1112a1: 57 push %edi 1112a2: 8d 45 e4 lea -0x1c(%ebp),%eax 1112a5: 50 push %eax 1112a6: 8d 43 14 lea 0x14(%ebx),%eax 1112a9: 50 push %eax 1112aa: e8 05 0f 00 00 call 1121b4 <_CORE_message_queue_Initialize> <== ALWAYS TAKEN 1112af: 83 c4 10 add $0x10,%esp 1112b2: 84 c0 test %al,%al 1112b4: 75 1c jne 1112d2 */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 1112b6: 50 push %eax 1112b7: 50 push %eax 1112b8: 53 push %ebx 1112b9: 68 14 b5 12 00 push $0x12b514 1112be: e8 09 1b 00 00 call 112dcc <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 1112c3: e8 71 24 00 00 call 113739 <_Thread_Enable_dispatch> 1112c8: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 1112cd: 83 c4 10 add $0x10,%esp 1112d0: eb 1e jmp 1112f0 <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1112d2: 8b 43 08 mov 0x8(%ebx),%eax 1112d5: 0f b7 c8 movzwl %ax,%ecx 1112d8: 8b 15 30 b5 12 00 mov 0x12b530,%edx 1112de: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1112e1: 89 73 0c mov %esi,0xc(%ebx) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 1112e4: 8b 55 18 mov 0x18(%ebp),%edx 1112e7: 89 02 mov %eax,(%edx) name, 0 ); #endif _Thread_Enable_dispatch(); 1112e9: e8 4b 24 00 00 call 113739 <_Thread_Enable_dispatch> 1112ee: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 1112f0: 8d 65 f4 lea -0xc(%ebp),%esp 1112f3: 5b pop %ebx 1112f4: 5e pop %esi 1112f5: 5f pop %edi 1112f6: c9 leave 1112f7: c3 ret 001137fc : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 1137fc: 55 push %ebp 1137fd: 89 e5 mov %esp,%ebp 1137ff: 53 push %ebx 113800: 83 ec 18 sub $0x18,%esp 113803: 8d 45 f4 lea -0xc(%ebp),%eax 113806: 50 push %eax 113807: ff 75 08 pushl 0x8(%ebp) 11380a: 68 08 ed 12 00 push $0x12ed08 11380f: e8 2c b1 ff ff call 10e940 <_Objects_Get> 113814: 89 c3 mov %eax,%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 113816: 83 c4 10 add $0x10,%esp 113819: b8 04 00 00 00 mov $0x4,%eax 11381e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 113822: 75 34 jne 113858 case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 113824: 51 push %ecx 113825: 51 push %ecx 113826: 53 push %ebx 113827: 68 08 ed 12 00 push $0x12ed08 11382c: e8 67 ad ff ff call 10e598 <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 113831: 83 c4 0c add $0xc,%esp 113834: 6a 05 push $0x5 113836: 6a 00 push $0x0 113838: 8d 43 14 lea 0x14(%ebx),%eax 11383b: 50 push %eax 11383c: e8 bb 04 00 00 call 113cfc <_CORE_message_queue_Close> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 113841: 58 pop %eax 113842: 5a pop %edx 113843: 53 push %ebx 113844: 68 08 ed 12 00 push $0x12ed08 113849: e8 ca af ff ff call 10e818 <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 11384e: e8 1e b9 ff ff call 10f171 <_Thread_Enable_dispatch> 113853: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 113855: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113858: 8b 5d fc mov -0x4(%ebp),%ebx 11385b: c9 leave 11385c: c3 ret 00114000 : rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { 114000: 55 push %ebp 114001: 89 e5 mov %esp,%ebp 114003: 53 push %ebx 114004: 83 ec 14 sub $0x14,%esp 114007: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 11400a: b8 09 00 00 00 mov $0x9,%eax 11400f: 85 db test %ebx,%ebx 114011: 74 3a je 11404d RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 114013: 50 push %eax 114014: 8d 45 f4 lea -0xc(%ebp),%eax 114017: 50 push %eax 114018: ff 75 08 pushl 0x8(%ebp) 11401b: 68 48 cd 13 00 push $0x13cd48 114020: e8 67 42 00 00 call 11828c <_Objects_Get> 114025: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 114027: 83 c4 10 add $0x10,%esp 11402a: b8 04 00 00 00 mov $0x4,%eax 11402f: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 114033: 75 18 jne 11404d case OBJECTS_LOCAL: *count = _CORE_message_queue_Flush( &the_message_queue->message_queue ); 114035: 83 ec 0c sub $0xc,%esp 114038: 8d 42 14 lea 0x14(%edx),%eax 11403b: 50 push %eax 11403c: e8 db 2d 00 00 call 116e1c <_CORE_message_queue_Flush> <== ALWAYS TAKEN 114041: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 114043: e8 75 4a 00 00 call 118abd <_Thread_Enable_dispatch> 114048: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11404a: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11404d: 8b 5d fc mov -0x4(%ebp),%ebx 114050: c9 leave 114051: c3 ret 0011131c : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 11131c: 55 push %ebp 11131d: 89 e5 mov %esp,%ebp 11131f: 56 push %esi 111320: 53 push %ebx 111321: 83 ec 10 sub $0x10,%esp 111324: 8b 5d 0c mov 0xc(%ebp),%ebx 111327: 8b 75 10 mov 0x10(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 11132a: 85 db test %ebx,%ebx 11132c: 74 60 je 11138e return RTEMS_INVALID_ADDRESS; if ( !size ) 11132e: 85 f6 test %esi,%esi 111330: 74 5c je 11138e RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 111332: 52 push %edx 111333: 8d 45 f4 lea -0xc(%ebp),%eax 111336: 50 push %eax 111337: ff 75 08 pushl 0x8(%ebp) 11133a: 68 14 b5 12 00 push $0x12b514 11133f: e8 b0 1b 00 00 call 112ef4 <_Objects_Get> 111344: 89 c1 mov %eax,%ecx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 111346: 83 c4 10 add $0x10,%esp 111349: b8 04 00 00 00 mov $0x4,%eax 11134e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 111352: 75 3f jne 111393 if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 111354: 50 push %eax 111355: 50 push %eax 111356: ff 75 18 pushl 0x18(%ebp) 111359: 8b 55 14 mov 0x14(%ebp),%edx 11135c: 83 e2 01 and $0x1,%edx 11135f: 83 f2 01 xor $0x1,%edx 111362: 52 push %edx 111363: 56 push %esi 111364: 53 push %ebx 111365: ff 71 08 pushl 0x8(%ecx) 111368: 83 c1 14 add $0x14,%ecx 11136b: 51 push %ecx 11136c: e8 df 0e 00 00 call 112250 <_CORE_message_queue_Seize> <== ALWAYS TAKEN buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 111371: 83 c4 20 add $0x20,%esp 111374: e8 c0 23 00 00 call 113739 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 111379: 83 ec 0c sub $0xc,%esp 11137c: a1 78 b3 12 00 mov 0x12b378,%eax 111381: ff 70 34 pushl 0x34(%eax) 111384: e8 83 00 00 00 call 11140c <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN 111389: 83 c4 10 add $0x10,%esp 11138c: eb 05 jmp 111393 <== ALWAYS TAKEN 11138e: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111393: 8d 65 f8 lea -0x8(%ebp),%esp 111396: 5b pop %ebx 111397: 5e pop %esi 111398: c9 leave 111399: c3 ret 00109c80 : rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { 109c80: 55 push %ebp 109c81: 89 e5 mov %esp,%ebp 109c83: 56 push %esi 109c84: 53 push %ebx 109c85: 83 ec 10 sub $0x10,%esp 109c88: 8b 75 08 mov 0x8(%ebp),%esi 109c8b: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 109c8e: b8 09 00 00 00 mov $0x9,%eax 109c93: 85 db test %ebx,%ebx 109c95: 74 4f je 109ce6 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 109c97: 50 push %eax 109c98: 8d 45 f4 lea -0xc(%ebp),%eax 109c9b: 50 push %eax 109c9c: 56 push %esi 109c9d: 68 cc 3a 12 00 push $0x123acc 109ca2: e8 a9 16 00 00 call 10b350 <_Objects_Get> 109ca7: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 109ca9: 83 c4 10 add $0x10,%esp 109cac: b8 04 00 00 00 mov $0x4,%eax 109cb1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 109cb5: 75 2f jne 109ce6 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 109cb7: 6a 00 push $0x0 109cb9: 6a 00 push $0x0 109cbb: 68 ff ff ff 7f push $0x7fffffff 109cc0: 6a 00 push $0x0 109cc2: 56 push %esi 109cc3: ff 75 10 pushl 0x10(%ebp) 109cc6: 53 push %ebx 109cc7: 8d 42 14 lea 0x14(%edx),%eax 109cca: 50 push %eax 109ccb: e8 b8 0a 00 00 call 10a788 <_CORE_message_queue_Submit> <== ALWAYS TAKEN 109cd0: 89 c3 mov %eax,%ebx MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 109cd2: 83 c4 20 add $0x20,%esp 109cd5: e8 3b 1e 00 00 call 10bb15 <_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); 109cda: 83 ec 0c sub $0xc,%esp 109cdd: 53 push %ebx 109cde: e8 0d 00 00 00 call 109cf0 <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN 109ce3: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 109ce6: 8d 65 f8 lea -0x8(%ebp),%esp 109ce9: 5b pop %ebx 109cea: 5e pop %esi 109ceb: c9 leave 109cec: c3 ret 001141c0 : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { 1141c0: 55 push %ebp 1141c1: 89 e5 mov %esp,%ebp 1141c3: 56 push %esi 1141c4: 53 push %ebx 1141c5: 83 ec 10 sub $0x10,%esp 1141c8: 8b 75 08 mov 0x8(%ebp),%esi 1141cb: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 1141ce: b8 09 00 00 00 mov $0x9,%eax 1141d3: 85 db test %ebx,%ebx 1141d5: 74 4f je 114226 1141d7: 50 push %eax 1141d8: 8d 45 f4 lea -0xc(%ebp),%eax 1141db: 50 push %eax 1141dc: 56 push %esi 1141dd: 68 48 cd 13 00 push $0x13cd48 1141e2: e8 a5 40 00 00 call 11828c <_Objects_Get> 1141e7: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 1141e9: 83 c4 10 add $0x10,%esp 1141ec: b8 04 00 00 00 mov $0x4,%eax 1141f1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 1141f5: 75 2f jne 114226 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 1141f7: 6a 00 push $0x0 1141f9: 6a 00 push $0x0 1141fb: 68 00 00 00 80 push $0x80000000 114200: 6a 00 push $0x0 114202: 56 push %esi 114203: ff 75 10 pushl 0x10(%ebp) 114206: 53 push %ebx 114207: 8d 42 14 lea 0x14(%edx),%eax 11420a: 50 push %eax 11420b: e8 e8 2d 00 00 call 116ff8 <_CORE_message_queue_Submit> <== ALWAYS TAKEN 114210: 89 c3 mov %eax,%ebx id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 114212: 83 c4 20 add $0x20,%esp 114215: e8 a3 48 00 00 call 118abd <_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); 11421a: 83 ec 0c sub $0xc,%esp 11421d: 53 push %ebx 11421e: e8 8d ff ff ff call 1141b0 <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN 114223: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 114226: 8d 65 f8 lea -0x8(%ebp),%esp 114229: 5b pop %ebx 11422a: 5e pop %esi 11422b: c9 leave 11422c: c3 ret 0010b678 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 10b678: 55 push %ebp 10b679: 89 e5 mov %esp,%ebp 10b67b: 57 push %edi 10b67c: 56 push %esi 10b67d: 53 push %ebx 10b67e: 83 ec 0c sub $0xc,%esp 10b681: 8b 5d 10 mov 0x10(%ebp),%ebx int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10b684: ba 09 00 00 00 mov $0x9,%edx 10b689: 85 db test %ebx,%ebx 10b68b: 74 4e je 10b6db return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 10b68d: 50 push %eax 10b68e: 50 push %eax 10b68f: ff 75 0c pushl 0xc(%ebp) 10b692: ff 75 08 pushl 0x8(%ebp) 10b695: e8 62 17 00 00 call 10cdfc <_Objects_Get_information> if ( !obj_info ) 10b69a: 83 c4 10 add $0x10,%esp 10b69d: ba 0a 00 00 00 mov $0xa,%edx 10b6a2: 85 c0 test %eax,%eax 10b6a4: 74 35 je 10b6db return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 10b6a6: 8b 50 08 mov 0x8(%eax),%edx 10b6a9: 89 13 mov %edx,(%ebx) info->maximum_id = obj_info->maximum_id; 10b6ab: 8b 50 0c mov 0xc(%eax),%edx 10b6ae: 89 53 04 mov %edx,0x4(%ebx) info->auto_extend = obj_info->auto_extend; 10b6b1: 8a 50 12 mov 0x12(%eax),%dl 10b6b4: 88 53 0c mov %dl,0xc(%ebx) info->maximum = obj_info->maximum; 10b6b7: 0f b7 70 10 movzwl 0x10(%eax),%esi 10b6bb: 89 73 08 mov %esi,0x8(%ebx) 10b6be: ba 01 00 00 00 mov $0x1,%edx 10b6c3: 31 c9 xor %ecx,%ecx for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10b6c5: eb 0b jmp 10b6d2 <== ALWAYS TAKEN if ( !obj_info->local_table[i] ) 10b6c7: 8b 78 1c mov 0x1c(%eax),%edi unallocated++; 10b6ca: 83 3c 97 01 cmpl $0x1,(%edi,%edx,4) 10b6ce: 83 d1 00 adc $0x0,%ecx 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++ ) 10b6d1: 42 inc %edx 10b6d2: 39 f2 cmp %esi,%edx 10b6d4: 76 f1 jbe 10b6c7 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 10b6d6: 89 4b 10 mov %ecx,0x10(%ebx) 10b6d9: 31 d2 xor %edx,%edx return RTEMS_SUCCESSFUL; } 10b6db: 89 d0 mov %edx,%eax 10b6dd: 8d 65 f4 lea -0xc(%ebp),%esp 10b6e0: 5b pop %ebx 10b6e1: 5e pop %esi 10b6e2: 5f pop %edi 10b6e3: c9 leave 10b6e4: c3 ret 0010b740 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 10b740: 55 push %ebp 10b741: 89 e5 mov %esp,%ebp 10b743: 57 push %edi 10b744: 56 push %esi 10b745: 53 push %ebx 10b746: 83 ec 1c sub $0x1c,%esp 10b749: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10b74c: b8 09 00 00 00 mov $0x9,%eax 10b751: 85 ff test %edi,%edi 10b753: 74 50 je 10b7a5 return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10b755: 8b 5d 08 mov 0x8(%ebp),%ebx 10b758: 85 db test %ebx,%ebx 10b75a: 75 08 jne 10b764 10b75c: a1 fc 74 12 00 mov 0x1274fc,%eax 10b761: 8b 58 08 mov 0x8(%eax),%ebx information = _Objects_Get_information_id( tmpId ); 10b764: 83 ec 0c sub $0xc,%esp 10b767: 53 push %ebx 10b768: e8 6f 16 00 00 call 10cddc <_Objects_Get_information_id> 10b76d: 89 c6 mov %eax,%esi if ( !information ) 10b76f: 83 c4 10 add $0x10,%esp 10b772: 85 c0 test %eax,%eax 10b774: 74 2a je 10b7a0 return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10b776: 51 push %ecx 10b777: 8d 45 e4 lea -0x1c(%ebp),%eax 10b77a: 50 push %eax 10b77b: 53 push %ebx 10b77c: 56 push %esi 10b77d: e8 ca 17 00 00 call 10cf4c <_Objects_Get> switch ( location ) { 10b782: 83 c4 10 add $0x10,%esp 10b785: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10b789: 75 15 jne 10b7a0 case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 10b78b: 52 push %edx 10b78c: 57 push %edi 10b78d: 50 push %eax 10b78e: 56 push %esi 10b78f: e8 dc 19 00 00 call 10d170 <_Objects_Set_name> _Thread_Enable_dispatch(); 10b794: e8 58 20 00 00 call 10d7f1 <_Thread_Enable_dispatch> 10b799: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b79b: 83 c4 10 add $0x10,%esp 10b79e: eb 05 jmp 10b7a5 <== ALWAYS TAKEN 10b7a0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b7a5: 8d 65 f4 lea -0xc(%ebp),%esp 10b7a8: 5b pop %ebx 10b7a9: 5e pop %esi 10b7aa: 5f pop %edi 10b7ab: c9 leave 10b7ac: c3 ret 00114230 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 114230: 55 push %ebp 114231: 89 e5 mov %esp,%ebp 114233: 57 push %edi 114234: 56 push %esi 114235: 53 push %ebx 114236: 83 ec 1c sub $0x1c,%esp 114239: 8b 75 0c mov 0xc(%ebp),%esi 11423c: 8b 55 10 mov 0x10(%ebp),%edx 11423f: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 114242: b8 03 00 00 00 mov $0x3,%eax 114247: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 11424b: 0f 84 cf 00 00 00 je 114320 return RTEMS_INVALID_NAME; if ( !starting_address ) 114251: 85 f6 test %esi,%esi 114253: 0f 84 bb 00 00 00 je 114314 return RTEMS_INVALID_ADDRESS; if ( !id ) 114259: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp) 11425d: 0f 84 b1 00 00 00 je 114314 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 114263: 85 ff test %edi,%edi 114265: 0f 84 b0 00 00 00 je 11431b 11426b: 85 d2 test %edx,%edx 11426d: 0f 84 a8 00 00 00 je 11431b 114273: 39 fa cmp %edi,%edx 114275: 0f 82 a0 00 00 00 jb 11431b 11427b: f7 c7 03 00 00 00 test $0x3,%edi 114281: 0f 85 94 00 00 00 jne 11431b !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 114287: f7 c6 03 00 00 00 test $0x3,%esi 11428d: 0f 85 81 00 00 00 jne 114314 114293: a1 e8 ca 13 00 mov 0x13cae8,%eax 114298: 40 inc %eax 114299: a3 e8 ca 13 00 mov %eax,0x13cae8 * 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 ); 11429e: 83 ec 0c sub $0xc,%esp 1142a1: 68 70 c9 13 00 push $0x13c970 1142a6: 89 55 e4 mov %edx,-0x1c(%ebp) 1142a9: e8 8e 3b 00 00 call 117e3c <_Objects_Allocate> 1142ae: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 1142b0: 83 c4 10 add $0x10,%esp 1142b3: 85 c0 test %eax,%eax 1142b5: 8b 55 e4 mov -0x1c(%ebp),%edx 1142b8: 75 0c jne 1142c6 _Thread_Enable_dispatch(); 1142ba: e8 fe 47 00 00 call 118abd <_Thread_Enable_dispatch> 1142bf: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 1142c4: eb 5a jmp 114320 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 1142c6: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 1142c9: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 1142cc: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 1142cf: 8b 45 18 mov 0x18(%ebp),%eax 1142d2: 89 43 1c mov %eax,0x1c(%ebx) the_partition->number_of_used_blocks = 0; 1142d5: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) _Chain_Initialize( &the_partition->Memory, starting_address, 1142dc: 57 push %edi 1142dd: 89 d0 mov %edx,%eax 1142df: 31 d2 xor %edx,%edx 1142e1: f7 f7 div %edi 1142e3: 50 push %eax 1142e4: 56 push %esi 1142e5: 8d 43 24 lea 0x24(%ebx),%eax 1142e8: 50 push %eax 1142e9: e8 4a 2a 00 00 call 116d38 <_Chain_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1142ee: 8b 43 08 mov 0x8(%ebx),%eax 1142f1: 0f b7 c8 movzwl %ax,%ecx 1142f4: 8b 15 8c c9 13 00 mov 0x13c98c,%edx 1142fa: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1142fd: 8b 55 08 mov 0x8(%ebp),%edx 114300: 89 53 0c mov %edx,0xc(%ebx) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 114303: 8b 55 1c mov 0x1c(%ebp),%edx 114306: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 114308: e8 b0 47 00 00 call 118abd <_Thread_Enable_dispatch> 11430d: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11430f: 83 c4 10 add $0x10,%esp 114312: eb 0c jmp 114320 <== ALWAYS TAKEN 114314: b8 09 00 00 00 mov $0x9,%eax 114319: eb 05 jmp 114320 <== ALWAYS TAKEN 11431b: b8 08 00 00 00 mov $0x8,%eax } 114320: 8d 65 f4 lea -0xc(%ebp),%esp 114323: 5b pop %ebx 114324: 5e pop %esi 114325: 5f pop %edi 114326: c9 leave 114327: c3 ret 00114328 : */ rtems_status_code rtems_partition_delete( rtems_id id ) { 114328: 55 push %ebp 114329: 89 e5 mov %esp,%ebp 11432b: 53 push %ebx 11432c: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 11432f: 8d 45 f4 lea -0xc(%ebp),%eax 114332: 50 push %eax 114333: ff 75 08 pushl 0x8(%ebp) 114336: 68 70 c9 13 00 push $0x13c970 11433b: e8 4c 3f 00 00 call 11828c <_Objects_Get> 114340: 89 c3 mov %eax,%ebx register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 114342: 83 c4 10 add $0x10,%esp 114345: b8 04 00 00 00 mov $0x4,%eax 11434a: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 11434e: 75 36 jne 114386 case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { 114350: 83 7b 20 00 cmpl $0x0,0x20(%ebx) 114354: 75 26 jne 11437c _Objects_Close( &_Partition_Information, &the_partition->Object ); 114356: 51 push %ecx 114357: 51 push %ecx 114358: 53 push %ebx 114359: 68 70 c9 13 00 push $0x13c970 11435e: e8 45 3b 00 00 call 117ea8 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); 114363: 58 pop %eax 114364: 5a pop %edx 114365: 53 push %ebx 114366: 68 70 c9 13 00 push $0x13c970 11436b: e8 b8 3d 00 00 call 118128 <_Objects_Free> 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 114370: e8 48 47 00 00 call 118abd <_Thread_Enable_dispatch> 114375: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 114377: 83 c4 10 add $0x10,%esp 11437a: eb 0a jmp 114386 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 11437c: e8 3c 47 00 00 call 118abd <_Thread_Enable_dispatch> 114381: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 114386: 8b 5d fc mov -0x4(%ebp),%ebx 114389: c9 leave 11438a: c3 ret 0011438c : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 11438c: 55 push %ebp 11438d: 89 e5 mov %esp,%ebp 11438f: 57 push %edi 114390: 56 push %esi 114391: 53 push %ebx 114392: 83 ec 1c sub $0x1c,%esp 114395: 8b 75 0c mov 0xc(%ebp),%esi register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 114398: b8 09 00 00 00 mov $0x9,%eax 11439d: 85 f6 test %esi,%esi 11439f: 74 4f je 1143f0 RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 1143a1: 50 push %eax 1143a2: 8d 45 e4 lea -0x1c(%ebp),%eax 1143a5: 50 push %eax 1143a6: ff 75 08 pushl 0x8(%ebp) 1143a9: 68 70 c9 13 00 push $0x13c970 1143ae: e8 d9 3e 00 00 call 11828c <_Objects_Get> 1143b3: 89 c3 mov %eax,%ebx return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 1143b5: 83 c4 10 add $0x10,%esp 1143b8: b8 04 00 00 00 mov $0x4,%eax 1143bd: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 1143c1: 75 2d jne 1143f0 */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 1143c3: 83 ec 0c sub $0xc,%esp 1143c6: 8d 43 24 lea 0x24(%ebx),%eax 1143c9: 50 push %eax 1143ca: e8 45 29 00 00 call 116d14 <_Chain_Get> 1143cf: 89 c7 mov %eax,%edi case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 1143d1: 83 c4 10 add $0x10,%esp 1143d4: 85 c0 test %eax,%eax 1143d6: 74 0e je 1143e6 the_partition->number_of_used_blocks += 1; 1143d8: ff 43 20 incl 0x20(%ebx) _Thread_Enable_dispatch(); 1143db: e8 dd 46 00 00 call 118abd <_Thread_Enable_dispatch> *buffer = the_buffer; 1143e0: 89 3e mov %edi,(%esi) 1143e2: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1143e4: eb 0a jmp 1143f0 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 1143e6: e8 d2 46 00 00 call 118abd <_Thread_Enable_dispatch> 1143eb: b8 0d 00 00 00 mov $0xd,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1143f0: 8d 65 f4 lea -0xc(%ebp),%esp 1143f3: 5b pop %ebx 1143f4: 5e pop %esi 1143f5: 5f pop %edi 1143f6: c9 leave 1143f7: c3 ret 0011441c : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 11441c: 55 push %ebp 11441d: 89 e5 mov %esp,%ebp 11441f: 56 push %esi 114420: 53 push %ebx 114421: 83 ec 14 sub $0x14,%esp 114424: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 114427: 8d 45 f4 lea -0xc(%ebp),%eax 11442a: 50 push %eax 11442b: ff 75 08 pushl 0x8(%ebp) 11442e: 68 70 c9 13 00 push $0x13c970 114433: e8 54 3e 00 00 call 11828c <_Objects_Get> 114438: 89 c3 mov %eax,%ebx register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 11443a: 83 c4 10 add $0x10,%esp 11443d: b8 04 00 00 00 mov $0x4,%eax 114442: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 114446: 75 40 jne 114488 ) { void *starting; void *ending; starting = the_partition->starting_address; 114448: 8b 43 10 mov 0x10(%ebx),%eax ending = _Addresses_Add_offset( starting, the_partition->length ); 11444b: 8b 53 14 mov 0x14(%ebx),%edx 11444e: 01 c2 add %eax,%edx 114450: 39 d6 cmp %edx,%esi 114452: 0f 96 c2 setbe %dl 114455: 31 c9 xor %ecx,%ecx 114457: 39 c6 cmp %eax,%esi 114459: 0f 93 c1 setae %cl 11445c: 85 d1 test %edx,%ecx 11445e: 74 2f je 11448f return ( 114460: 89 f2 mov %esi,%edx 114462: 29 c2 sub %eax,%edx 114464: 89 d0 mov %edx,%eax 114466: 31 d2 xor %edx,%edx 114468: f7 73 18 divl 0x18(%ebx) 11446b: 85 d2 test %edx,%edx 11446d: 75 20 jne 11448f RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 11446f: 50 push %eax 114470: 50 push %eax 114471: 56 push %esi 114472: 8d 43 24 lea 0x24(%ebx),%eax 114475: 50 push %eax 114476: e8 75 28 00 00 call 116cf0 <_Chain_Append> case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; 11447b: ff 4b 20 decl 0x20(%ebx) _Thread_Enable_dispatch(); 11447e: e8 3a 46 00 00 call 118abd <_Thread_Enable_dispatch> 114483: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 114485: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 114488: 8d 65 f8 lea -0x8(%ebp),%esp 11448b: 5b pop %ebx 11448c: 5e pop %esi 11448d: c9 leave 11448e: c3 ret _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 11448f: e8 29 46 00 00 call 118abd <_Thread_Enable_dispatch> 114494: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_ADDRESS; 114499: eb ed jmp 114488 <== ALWAYS TAKEN 0011399c : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 11399c: 55 push %ebp 11399d: 89 e5 mov %esp,%ebp 11399f: 57 push %edi 1139a0: 56 push %esi 1139a1: 53 push %ebx 1139a2: 83 ec 0c sub $0xc,%esp 1139a5: 8b 75 08 mov 0x8(%ebp),%esi 1139a8: 8b 7d 10 mov 0x10(%ebp),%edi 1139ab: 8b 5d 18 mov 0x18(%ebp),%ebx register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 1139ae: b8 03 00 00 00 mov $0x3,%eax 1139b3: 85 f6 test %esi,%esi 1139b5: 74 6a je 113a21 return RTEMS_INVALID_NAME; if ( !id ) 1139b7: 85 db test %ebx,%ebx 1139b9: 74 61 je 113a1c return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 1139bb: 8b 45 0c mov 0xc(%ebp),%eax 1139be: 09 f8 or %edi,%eax 1139c0: a8 03 test $0x3,%al 1139c2: 75 58 jne 113a1c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1139c4: a1 e8 ca 13 00 mov 0x13cae8,%eax 1139c9: 40 inc %eax 1139ca: a3 e8 ca 13 00 mov %eax,0x13cae8 * of free port control blocks. */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) 1139cf: 83 ec 0c sub $0xc,%esp 1139d2: 68 30 c9 13 00 push $0x13c930 1139d7: e8 60 44 00 00 call 117e3c <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 1139dc: 83 c4 10 add $0x10,%esp 1139df: 85 c0 test %eax,%eax 1139e1: 75 0c jne 1139ef _Thread_Enable_dispatch(); 1139e3: e8 d5 50 00 00 call 118abd <_Thread_Enable_dispatch> 1139e8: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 1139ed: eb 32 jmp 113a21 <== ALWAYS TAKEN } the_port->internal_base = internal_start; 1139ef: 8b 55 0c mov 0xc(%ebp),%edx 1139f2: 89 50 10 mov %edx,0x10(%eax) the_port->external_base = external_start; 1139f5: 89 78 14 mov %edi,0x14(%eax) the_port->length = length - 1; 1139f8: 8b 55 14 mov 0x14(%ebp),%edx 1139fb: 4a dec %edx 1139fc: 89 50 18 mov %edx,0x18(%eax) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1139ff: 8b 50 08 mov 0x8(%eax),%edx 113a02: 0f b7 fa movzwl %dx,%edi 113a05: 8b 0d 4c c9 13 00 mov 0x13c94c,%ecx 113a0b: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 113a0e: 89 70 0c mov %esi,0xc(%eax) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 113a11: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 113a13: e8 a5 50 00 00 call 118abd <_Thread_Enable_dispatch> 113a18: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 113a1a: eb 05 jmp 113a21 <== ALWAYS TAKEN 113a1c: b8 09 00 00 00 mov $0x9,%eax } 113a21: 8d 65 f4 lea -0xc(%ebp),%esp 113a24: 5b pop %ebx 113a25: 5e pop %esi 113a26: 5f pop %edi 113a27: c9 leave 113a28: c3 ret 00113a80 : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 113a80: 55 push %ebp 113a81: 89 e5 mov %esp,%ebp 113a83: 56 push %esi 113a84: 53 push %ebx 113a85: 83 ec 10 sub $0x10,%esp 113a88: 8b 75 0c mov 0xc(%ebp),%esi 113a8b: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 113a8e: b8 09 00 00 00 mov $0x9,%eax 113a93: 85 db test %ebx,%ebx 113a95: 74 3c je 113ad3 RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 113a97: 50 push %eax 113a98: 8d 45 f4 lea -0xc(%ebp),%eax 113a9b: 50 push %eax 113a9c: ff 75 08 pushl 0x8(%ebp) 113a9f: 68 30 c9 13 00 push $0x13c930 113aa4: e8 e3 47 00 00 call 11828c <_Objects_Get> 113aa9: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 113aab: 83 c4 10 add $0x10,%esp 113aae: b8 04 00 00 00 mov $0x4,%eax 113ab3: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 113ab7: 75 1a jne 113ad3 case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); 113ab9: 89 f0 mov %esi,%eax 113abb: 2b 42 14 sub 0x14(%edx),%eax if ( ending > the_port->length ) 113abe: 3b 42 18 cmp 0x18(%edx),%eax 113ac1: 76 04 jbe 113ac7 *internal = external; 113ac3: 89 33 mov %esi,(%ebx) 113ac5: eb 05 jmp 113acc <== ALWAYS TAKEN else *internal = _Addresses_Add_offset( the_port->internal_base, 113ac7: 03 42 10 add 0x10(%edx),%eax 113aca: 89 03 mov %eax,(%ebx) ending ); _Thread_Enable_dispatch(); 113acc: e8 ec 4f 00 00 call 118abd <_Thread_Enable_dispatch> 113ad1: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113ad3: 8d 65 f8 lea -0x8(%ebp),%esp 113ad6: 5b pop %ebx 113ad7: 5e pop %esi 113ad8: c9 leave 113ad9: c3 ret 00113b00 : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 113b00: 55 push %ebp 113b01: 89 e5 mov %esp,%ebp 113b03: 56 push %esi 113b04: 53 push %ebx 113b05: 83 ec 10 sub $0x10,%esp 113b08: 8b 75 0c mov 0xc(%ebp),%esi 113b0b: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 113b0e: b8 09 00 00 00 mov $0x9,%eax 113b13: 85 db test %ebx,%ebx 113b15: 74 3c je 113b53 113b17: 50 push %eax 113b18: 8d 45 f4 lea -0xc(%ebp),%eax 113b1b: 50 push %eax 113b1c: ff 75 08 pushl 0x8(%ebp) 113b1f: 68 30 c9 13 00 push $0x13c930 113b24: e8 63 47 00 00 call 11828c <_Objects_Get> 113b29: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 113b2b: 83 c4 10 add $0x10,%esp 113b2e: b8 04 00 00 00 mov $0x4,%eax 113b33: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 113b37: 75 1a jne 113b53 case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); 113b39: 89 f0 mov %esi,%eax 113b3b: 2b 42 10 sub 0x10(%edx),%eax if ( ending > the_port->length ) 113b3e: 3b 42 18 cmp 0x18(%edx),%eax 113b41: 76 04 jbe 113b47 *external = internal; 113b43: 89 33 mov %esi,(%ebx) 113b45: eb 05 jmp 113b4c <== ALWAYS TAKEN else *external = _Addresses_Add_offset( the_port->external_base, 113b47: 03 42 14 add 0x14(%edx),%eax 113b4a: 89 03 mov %eax,(%ebx) ending ); _Thread_Enable_dispatch(); 113b4c: e8 6c 4f 00 00 call 118abd <_Thread_Enable_dispatch> 113b51: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113b53: 8d 65 f8 lea -0x8(%ebp),%esp 113b56: 5b pop %ebx 113b57: 5e pop %esi 113b58: c9 leave 113b59: c3 ret 0011449c : */ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { 11449c: 55 push %ebp 11449d: 89 e5 mov %esp,%ebp 11449f: 53 push %ebx 1144a0: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 1144a3: 8d 45 f4 lea -0xc(%ebp),%eax 1144a6: 50 push %eax 1144a7: ff 75 08 pushl 0x8(%ebp) 1144aa: 68 b0 c9 13 00 push $0x13c9b0 1144af: e8 d8 3d 00 00 call 11828c <_Objects_Get> 1144b4: 89 c3 mov %eax,%ebx Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 1144b6: 83 c4 10 add $0x10,%esp 1144b9: b8 04 00 00 00 mov $0x4,%eax 1144be: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 1144c2: 75 34 jne 1144f8 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 1144c4: 8b 43 40 mov 0x40(%ebx),%eax 1144c7: 3b 05 a4 cb 13 00 cmp 0x13cba4,%eax 1144cd: 74 0c je 1144db _Thread_Enable_dispatch(); 1144cf: e8 e9 45 00 00 call 118abd <_Thread_Enable_dispatch> 1144d4: b8 17 00 00 00 mov $0x17,%eax return RTEMS_NOT_OWNER_OF_RESOURCE; 1144d9: eb 1d jmp 1144f8 <== ALWAYS TAKEN } (void) _Watchdog_Remove( &the_period->Timer ); 1144db: 83 ec 0c sub $0xc,%esp 1144de: 8d 43 10 lea 0x10(%ebx),%eax 1144e1: 50 push %eax 1144e2: e8 cd 57 00 00 call 119cb4 <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 1144e7: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) _Thread_Enable_dispatch(); 1144ee: e8 ca 45 00 00 call 118abd <_Thread_Enable_dispatch> 1144f3: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1144f5: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1144f8: 8b 5d fc mov -0x4(%ebp),%ebx 1144fb: c9 leave 1144fc: c3 ret 0010aaa4 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 10aaa4: 55 push %ebp 10aaa5: 89 e5 mov %esp,%ebp 10aaa7: 57 push %edi 10aaa8: 56 push %esi 10aaa9: 53 push %ebx 10aaaa: 83 ec 0c sub $0xc,%esp 10aaad: 8b 75 08 mov 0x8(%ebp),%esi Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10aab0: b8 03 00 00 00 mov $0x3,%eax 10aab5: 85 f6 test %esi,%esi 10aab7: 0f 84 ac 00 00 00 je 10ab69 return RTEMS_INVALID_NAME; if ( !id ) 10aabd: b0 09 mov $0x9,%al 10aabf: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 10aac3: 0f 84 a0 00 00 00 je 10ab69 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10aac9: a1 18 64 12 00 mov 0x126418,%eax 10aace: 40 inc %eax 10aacf: a3 18 64 12 00 mov %eax,0x126418 * This function allocates a period control block from * the inactive chain of free period control blocks. */ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void ) { return (Rate_monotonic_Control *) 10aad4: 83 ec 0c sub $0xc,%esp 10aad7: 68 20 63 12 00 push $0x126320 10aadc: e8 7f 1a 00 00 call 10c560 <_Objects_Allocate> 10aae1: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 10aae3: 83 c4 10 add $0x10,%esp 10aae6: 85 c0 test %eax,%eax 10aae8: 75 0c jne 10aaf6 _Thread_Enable_dispatch(); 10aaea: e8 02 27 00 00 call 10d1f1 <_Thread_Enable_dispatch> 10aaef: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10aaf4: eb 73 jmp 10ab69 <== ALWAYS TAKEN } the_period->owner = _Thread_Executing; 10aaf6: a1 d4 64 12 00 mov 0x1264d4,%eax 10aafb: 89 42 40 mov %eax,0x40(%edx) the_period->state = RATE_MONOTONIC_INACTIVE; 10aafe: 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; 10ab05: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 10ab0c: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx) the_watchdog->id = id; 10ab13: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) the_watchdog->user_data = user_data; 10ab1a: 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 ); 10ab21: 8d 5a 54 lea 0x54(%edx),%ebx 10ab24: b9 0e 00 00 00 mov $0xe,%ecx 10ab29: 31 c0 xor %eax,%eax 10ab2b: 89 df mov %ebx,%edi 10ab2d: f3 ab rep stos %eax,%es:(%edi) 10ab2f: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10ab36: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10ab3d: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10ab44: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10ab4b: 8b 42 08 mov 0x8(%edx),%eax 10ab4e: 0f b7 d8 movzwl %ax,%ebx 10ab51: 8b 0d 3c 63 12 00 mov 0x12633c,%ecx 10ab57: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10ab5a: 89 72 0c mov %esi,0xc(%edx) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 10ab5d: 8b 55 0c mov 0xc(%ebp),%edx 10ab60: 89 02 mov %eax,(%edx) _Thread_Enable_dispatch(); 10ab62: e8 8a 26 00 00 call 10d1f1 <_Thread_Enable_dispatch> 10ab67: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10ab69: 8d 65 f4 lea -0xc(%ebp),%esp 10ab6c: 5b pop %ebx 10ab6d: 5e pop %esi 10ab6e: 5f pop %edi 10ab6f: c9 leave 10ab70: c3 ret 00133e70 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 133e70: 55 push %ebp 133e71: 89 e5 mov %esp,%ebp 133e73: 53 push %ebx 133e74: 83 ec 24 sub $0x24,%esp 133e77: 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 ) 133e7a: b8 09 00 00 00 mov $0x9,%eax 133e7f: 85 db test %ebx,%ebx 133e81: 0f 84 93 00 00 00 je 133f1a 133e87: 52 push %edx 133e88: 8d 45 f4 lea -0xc(%ebp),%eax 133e8b: 50 push %eax 133e8c: ff 75 08 pushl 0x8(%ebp) 133e8f: 68 24 3a 16 00 push $0x163a24 133e94: e8 ab cd fd ff call 110c44 <_Objects_Get> 133e99: 89 c2 mov %eax,%edx return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 133e9b: 83 c4 10 add $0x10,%esp 133e9e: b8 04 00 00 00 mov $0x4,%eax 133ea3: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 133ea7: 75 71 jne 133f1a case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 133ea9: 8b 42 40 mov 0x40(%edx),%eax 133eac: 8b 40 08 mov 0x8(%eax),%eax 133eaf: 89 03 mov %eax,(%ebx) status->state = the_period->state; 133eb1: 8b 42 38 mov 0x38(%edx),%eax 133eb4: 89 43 04 mov %eax,0x4(%ebx) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 133eb7: 85 c0 test %eax,%eax 133eb9: 75 1e jne 133ed9 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 133ebb: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 133ec2: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Timespec_Set_to_zero( &status->executed_since_last_period ); 133ec9: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) 133ed0: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) 133ed7: eb 3a jmp 133f13 <== ALWAYS TAKEN /* * Grab the current status. */ valid_status = _Rate_monotonic_Get_status( 133ed9: 50 push %eax 133eda: 8d 45 ec lea -0x14(%ebp),%eax 133edd: 50 push %eax 133ede: 8d 45 e4 lea -0x1c(%ebp),%eax 133ee1: 50 push %eax 133ee2: 52 push %edx 133ee3: e8 a0 00 00 00 call 133f88 <_Rate_monotonic_Get_status> <== ALWAYS TAKEN the_period, &since_last_period, &executed ); if (!valid_status) { 133ee8: 83 c4 10 add $0x10,%esp 133eeb: 84 c0 test %al,%al 133eed: 75 0c jne 133efb _Thread_Enable_dispatch(); 133eef: e8 c5 d5 fd ff call 1114b9 <_Thread_Enable_dispatch> 133ef4: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; 133ef9: eb 1f jmp 133f1a <== ALWAYS TAKEN } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 133efb: 8b 45 e4 mov -0x1c(%ebp),%eax 133efe: 8b 55 e8 mov -0x18(%ebp),%edx 133f01: 89 43 08 mov %eax,0x8(%ebx) 133f04: 89 53 0c mov %edx,0xc(%ebx) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 133f07: 8b 45 ec mov -0x14(%ebp),%eax 133f0a: 8b 55 f0 mov -0x10(%ebp),%edx 133f0d: 89 43 10 mov %eax,0x10(%ebx) 133f10: 89 53 14 mov %edx,0x14(%ebx) status->since_last_period = since_last_period; status->executed_since_last_period = executed; #endif } _Thread_Enable_dispatch(); 133f13: e8 a1 d5 fd ff call 1114b9 <_Thread_Enable_dispatch> 133f18: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 133f1a: 8b 5d fc mov -0x4(%ebp),%ebx 133f1d: c9 leave 133f1e: c3 ret 001340f5 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 1340f5: 55 push %ebp 1340f6: 89 e5 mov %esp,%ebp 1340f8: 57 push %edi 1340f9: 56 push %esi 1340fa: 53 push %ebx 1340fb: 83 ec 30 sub $0x30,%esp 1340fe: 8b 75 08 mov 0x8(%ebp),%esi 134101: 8b 5d 0c mov 0xc(%ebp),%ebx 134104: 8d 45 e4 lea -0x1c(%ebp),%eax 134107: 50 push %eax 134108: 56 push %esi 134109: 68 24 3a 16 00 push $0x163a24 13410e: e8 31 cb fd ff call 110c44 <_Objects_Get> 134113: 89 c7 mov %eax,%edi rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 134115: 83 c4 10 add $0x10,%esp 134118: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 13411c: 0f 85 40 01 00 00 jne 134262 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 134122: 8b 40 40 mov 0x40(%eax),%eax 134125: 3b 05 08 36 16 00 cmp 0x163608,%eax 13412b: 74 0f je 13413c _Thread_Enable_dispatch(); 13412d: e8 87 d3 fd ff call 1114b9 <_Thread_Enable_dispatch> 134132: bb 17 00 00 00 mov $0x17,%ebx return RTEMS_NOT_OWNER_OF_RESOURCE; 134137: e9 2b 01 00 00 jmp 134267 <== ALWAYS TAKEN } if ( length == RTEMS_PERIOD_STATUS ) { 13413c: 85 db test %ebx,%ebx 13413e: 75 19 jne 134159 switch ( the_period->state ) { 134140: 8b 47 38 mov 0x38(%edi),%eax 134143: 83 f8 04 cmp $0x4,%eax 134146: 77 07 ja 13414f <== ALWAYS TAKEN 134148: 8b 1c 85 04 82 15 00 mov 0x158204(,%eax,4),%ebx case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 13414f: e8 65 d3 fd ff call 1114b9 <_Thread_Enable_dispatch> return( return_value ); 134154: e9 0e 01 00 00 jmp 134267 <== ALWAYS TAKEN } _ISR_Disable( level ); 134159: 9c pushf 13415a: fa cli 13415b: 8f 45 d4 popl -0x2c(%ebp) switch ( the_period->state ) { 13415e: 8b 47 38 mov 0x38(%edi),%eax 134161: 83 f8 02 cmp $0x2,%eax 134164: 74 5f je 1341c5 134166: 83 f8 04 cmp $0x4,%eax 134169: 0f 84 ba 00 00 00 je 134229 13416f: 85 c0 test %eax,%eax 134171: 0f 85 eb 00 00 00 jne 134262 <== ALWAYS TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 134177: ff 75 d4 pushl -0x2c(%ebp) 13417a: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 13417b: 83 ec 0c sub $0xc,%esp 13417e: 57 push %edi 13417f: e8 9c fd ff ff call 133f20 <_Rate_monotonic_Initiate_statistics> <== ALWAYS TAKEN the_period->state = RATE_MONOTONIC_ACTIVE; 134184: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 13418b: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 134192: c7 47 2c 74 42 13 00 movl $0x134274,0x2c(%edi) the_watchdog->id = id; 134199: 89 77 30 mov %esi,0x30(%edi) the_watchdog->user_data = user_data; 13419c: c7 47 34 00 00 00 00 movl $0x0,0x34(%edi) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 1341a3: 89 5f 3c mov %ebx,0x3c(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1341a6: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 1341a9: 5b pop %ebx 1341aa: 5e pop %esi 1341ab: 83 c7 10 add $0x10,%edi 1341ae: 57 push %edi 1341af: 68 28 36 16 00 push $0x163628 1341b4: e8 63 e0 fd ff call 11221c <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 1341b9: e8 fb d2 fd ff call 1114b9 <_Thread_Enable_dispatch> 1341be: 31 db xor %ebx,%ebx 1341c0: e9 98 00 00 00 jmp 13425d <== ALWAYS TAKEN case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 1341c5: 83 ec 0c sub $0xc,%esp 1341c8: 57 push %edi 1341c9: e8 4c fe ff ff call 13401a <_Rate_monotonic_Update_statistics> <== ALWAYS TAKEN /* * 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; 1341ce: c7 47 38 01 00 00 00 movl $0x1,0x38(%edi) the_period->next_length = length; 1341d5: 89 5f 3c mov %ebx,0x3c(%edi) _ISR_Enable( level ); 1341d8: ff 75 d4 pushl -0x2c(%ebp) 1341db: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 1341dc: a1 08 36 16 00 mov 0x163608,%eax 1341e1: 8b 57 08 mov 0x8(%edi),%edx 1341e4: 89 50 20 mov %edx,0x20(%eax) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 1341e7: 5a pop %edx 1341e8: 59 pop %ecx 1341e9: 68 00 40 00 00 push $0x4000 1341ee: 50 push %eax 1341ef: e8 88 da fd ff call 111c7c <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 1341f4: 9c pushf 1341f5: fa cli 1341f6: 5a pop %edx local_state = the_period->state; 1341f7: 8b 47 38 mov 0x38(%edi),%eax the_period->state = RATE_MONOTONIC_ACTIVE; 1341fa: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) _ISR_Enable( level ); 134201: 52 push %edx 134202: 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 ) 134203: 83 c4 10 add $0x10,%esp 134206: 83 f8 03 cmp $0x3,%eax 134209: 75 15 jne 134220 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 13420b: 56 push %esi 13420c: 56 push %esi 13420d: 68 00 40 00 00 push $0x4000 134212: ff 35 08 36 16 00 pushl 0x163608 134218: e8 1f cf fd ff call 11113c <_Thread_Clear_state> 13421d: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 134220: e8 94 d2 fd ff call 1114b9 <_Thread_Enable_dispatch> 134225: 31 db xor %ebx,%ebx return RTEMS_SUCCESSFUL; 134227: eb 3e jmp 134267 <== ALWAYS TAKEN case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 134229: 83 ec 0c sub $0xc,%esp 13422c: 57 push %edi 13422d: e8 e8 fd ff ff call 13401a <_Rate_monotonic_Update_statistics> <== ALWAYS TAKEN _ISR_Enable( level ); 134232: ff 75 d4 pushl -0x2c(%ebp) 134235: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 134236: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) the_period->next_length = length; 13423d: 89 5f 3c mov %ebx,0x3c(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 134240: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 134243: 59 pop %ecx 134244: 5b pop %ebx 134245: 83 c7 10 add $0x10,%edi 134248: 57 push %edi 134249: 68 28 36 16 00 push $0x163628 13424e: e8 c9 df fd ff call 11221c <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 134253: e8 61 d2 fd ff call 1114b9 <_Thread_Enable_dispatch> 134258: bb 06 00 00 00 mov $0x6,%ebx return RTEMS_TIMEOUT; 13425d: 83 c4 10 add $0x10,%esp 134260: eb 05 jmp 134267 <== ALWAYS TAKEN 134262: bb 04 00 00 00 mov $0x4,%ebx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 134267: 89 d8 mov %ebx,%eax 134269: 8d 65 f4 lea -0xc(%ebp),%esp 13426c: 5b pop %ebx 13426d: 5e pop %esi 13426e: 5f pop %edi 13426f: c9 leave 134270: c3 ret 00126f3c : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 126f3c: 55 push %ebp 126f3d: 89 e5 mov %esp,%ebp 126f3f: 57 push %edi 126f40: 56 push %esi 126f41: 53 push %ebx 126f42: 83 ec 7c sub $0x7c,%esp 126f45: 8b 5d 08 mov 0x8(%ebp),%ebx 126f48: 8b 7d 0c mov 0xc(%ebp),%edi rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 126f4b: 85 ff test %edi,%edi 126f4d: 0f 84 2b 01 00 00 je 12707e <== ALWAYS TAKEN return; (*print)( context, "Period information by period\n" ); 126f53: 52 push %edx 126f54: 52 push %edx 126f55: 68 c8 4c 15 00 push $0x154cc8 126f5a: 53 push %ebx 126f5b: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 126f5d: 5e pop %esi 126f5e: 58 pop %eax 126f5f: 68 e6 4c 15 00 push $0x154ce6 126f64: 53 push %ebx 126f65: ff d7 call *%edi (*print)( context, "--- Wall times are in seconds ---\n" ); 126f67: 5a pop %edx 126f68: 59 pop %ecx 126f69: 68 08 4d 15 00 push $0x154d08 126f6e: 53 push %ebx 126f6f: ff d7 call *%edi Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 126f71: 5e pop %esi 126f72: 58 pop %eax 126f73: 68 2b 4d 15 00 push $0x154d2b 126f78: 53 push %ebx 126f79: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 126f7b: 5a pop %edx 126f7c: 59 pop %ecx 126f7d: 68 76 4d 15 00 push $0x154d76 126f82: 53 push %ebx 126f83: ff d7 call *%edi /* * 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 ; 126f85: 8b 35 2c 3a 16 00 mov 0x163a2c,%esi 126f8b: 83 c4 10 add $0x10,%esp 126f8e: e9 df 00 00 00 jmp 127072 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 126f93: 50 push %eax 126f94: 50 push %eax 126f95: 8d 45 88 lea -0x78(%ebp),%eax 126f98: 50 push %eax 126f99: 56 push %esi 126f9a: e8 2d ce 00 00 call 133dcc if ( status != RTEMS_SUCCESSFUL ) 126f9f: 83 c4 10 add $0x10,%esp 126fa2: 85 c0 test %eax,%eax 126fa4: 0f 85 c7 00 00 00 jne 127071 <== ALWAYS TAKEN continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 126faa: 51 push %ecx 126fab: 51 push %ecx 126fac: 8d 55 c0 lea -0x40(%ebp),%edx 126faf: 52 push %edx 126fb0: 56 push %esi 126fb1: e8 ba ce 00 00 call 133e70 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 126fb6: 83 c4 0c add $0xc,%esp 126fb9: 8d 45 e3 lea -0x1d(%ebp),%eax 126fbc: 50 push %eax 126fbd: 6a 05 push $0x5 126fbf: ff 75 c0 pushl -0x40(%ebp) 126fc2: e8 e5 82 fe ff call 10f2ac /* * Print part of report line that is not dependent on granularity */ (*print)( context, 126fc7: 58 pop %eax 126fc8: 5a pop %edx 126fc9: ff 75 8c pushl -0x74(%ebp) 126fcc: ff 75 88 pushl -0x78(%ebp) 126fcf: 8d 55 e3 lea -0x1d(%ebp),%edx 126fd2: 52 push %edx 126fd3: 56 push %esi 126fd4: 68 c2 4d 15 00 push $0x154dc2 126fd9: 53 push %ebx 126fda: ff d7 call *%edi ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 126fdc: 8b 45 88 mov -0x78(%ebp),%eax 126fdf: 83 c4 20 add $0x20,%esp 126fe2: 85 c0 test %eax,%eax 126fe4: 75 0f jne 126ff5 (*print)( context, "\n" ); 126fe6: 51 push %ecx 126fe7: 51 push %ecx 126fe8: 68 7d 67 15 00 push $0x15677d 126fed: 53 push %ebx 126fee: ff d7 call *%edi continue; 126ff0: 83 c4 10 add $0x10,%esp 126ff3: eb 7c jmp 127071 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 ); 126ff5: 52 push %edx 126ff6: 8d 55 d8 lea -0x28(%ebp),%edx 126ff9: 52 push %edx 126ffa: 50 push %eax 126ffb: 8d 45 a0 lea -0x60(%ebp),%eax 126ffe: 50 push %eax 126fff: e8 60 14 00 00 call 128464 <_Timespec_Divide_by_integer> (*print)( context, 127004: 8b 45 dc mov -0x24(%ebp),%eax 127007: b9 e8 03 00 00 mov $0x3e8,%ecx 12700c: 99 cltd 12700d: f7 f9 idiv %ecx 12700f: 50 push %eax 127010: ff 75 d8 pushl -0x28(%ebp) 127013: 8b 45 9c mov -0x64(%ebp),%eax 127016: 99 cltd 127017: f7 f9 idiv %ecx 127019: 50 push %eax 12701a: ff 75 98 pushl -0x68(%ebp) 12701d: 8b 45 94 mov -0x6c(%ebp),%eax 127020: 99 cltd 127021: f7 f9 idiv %ecx 127023: 50 push %eax 127024: ff 75 90 pushl -0x70(%ebp) 127027: 68 d9 4d 15 00 push $0x154dd9 12702c: 53 push %ebx 12702d: 89 4d 84 mov %ecx,-0x7c(%ebp) 127030: ff d7 call *%edi 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); 127032: 83 c4 2c add $0x2c,%esp 127035: 8d 55 d8 lea -0x28(%ebp),%edx 127038: 52 push %edx 127039: ff 75 88 pushl -0x78(%ebp) 12703c: 8d 45 b8 lea -0x48(%ebp),%eax 12703f: 50 push %eax 127040: e8 1f 14 00 00 call 128464 <_Timespec_Divide_by_integer> (*print)( context, 127045: 8b 45 dc mov -0x24(%ebp),%eax 127048: 8b 4d 84 mov -0x7c(%ebp),%ecx 12704b: 99 cltd 12704c: f7 f9 idiv %ecx 12704e: 50 push %eax 12704f: ff 75 d8 pushl -0x28(%ebp) 127052: 8b 45 b4 mov -0x4c(%ebp),%eax 127055: 99 cltd 127056: f7 f9 idiv %ecx 127058: 50 push %eax 127059: ff 75 b0 pushl -0x50(%ebp) 12705c: 8b 45 ac mov -0x54(%ebp),%eax 12705f: 99 cltd 127060: f7 f9 idiv %ecx 127062: 50 push %eax 127063: ff 75 a8 pushl -0x58(%ebp) 127066: 68 f8 4d 15 00 push $0x154df8 12706b: 53 push %ebx 12706c: ff d7 call *%edi 12706e: 83 c4 30 add $0x30,%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++ ) { 127071: 46 inc %esi /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 127072: 3b 35 30 3a 16 00 cmp 0x163a30,%esi 127078: 0f 86 15 ff ff ff jbe 126f93 <== ALWAYS TAKEN the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 12707e: 8d 65 f4 lea -0xc(%ebp),%esp 127081: 5b pop %ebx 127082: 5e pop %esi 127083: 5f pop %edi 127084: c9 leave 127085: c3 ret 001270a0 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 1270a0: 55 push %ebp 1270a1: 89 e5 mov %esp,%ebp 1270a3: 53 push %ebx 1270a4: 83 ec 04 sub $0x4,%esp 1270a7: a1 4c 35 16 00 mov 0x16354c,%eax 1270ac: 40 inc %eax 1270ad: a3 4c 35 16 00 mov %eax,0x16354c /* * 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 ; 1270b2: 8b 1d 2c 3a 16 00 mov 0x163a2c,%ebx 1270b8: eb 0d jmp 1270c7 <== ALWAYS TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 1270ba: 83 ec 0c sub $0xc,%esp 1270bd: 53 push %ebx 1270be: e8 15 00 00 00 call 1270d8 <== ALWAYS TAKEN * 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++ ) { 1270c3: 43 inc %ebx 1270c4: 83 c4 10 add $0x10,%esp /* * 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 ; 1270c7: 3b 1d 30 3a 16 00 cmp 0x163a30,%ebx 1270cd: 76 eb jbe 1270ba /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 1270cf: 8b 5d fc mov -0x4(%ebp),%ebx 1270d2: c9 leave } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 1270d3: e9 e1 a3 fe ff jmp 1114b9 <_Thread_Enable_dispatch> 00114b8c : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 114b8c: 55 push %ebp 114b8d: 89 e5 mov %esp,%ebp 114b8f: 57 push %edi 114b90: 56 push %esi 114b91: 53 push %ebx 114b92: 83 ec 1c sub $0x1c,%esp 114b95: 8b 75 0c mov 0xc(%ebp),%esi 114b98: 8b 7d 14 mov 0x14(%ebp),%edi rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 114b9b: b8 03 00 00 00 mov $0x3,%eax 114ba0: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 114ba4: 0f 84 de 00 00 00 je 114c88 return RTEMS_INVALID_NAME; if ( !starting_address ) 114baa: 85 f6 test %esi,%esi 114bac: 0f 84 d1 00 00 00 je 114c83 return RTEMS_INVALID_ADDRESS; if ( !id ) 114bb2: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp) 114bb6: 0f 84 c7 00 00 00 je 114c83 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 114bbc: f7 c6 03 00 00 00 test $0x3,%esi 114bc2: 0f 85 bb 00 00 00 jne 114c83 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 114bc8: 83 ec 0c sub $0xc,%esp 114bcb: ff 35 9c cb 13 00 pushl 0x13cb9c 114bd1: e8 a2 20 00 00 call 116c78 <_API_Mutex_Lock> <== ALWAYS TAKEN * 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 ); 114bd6: c7 04 24 f0 c9 13 00 movl $0x13c9f0,(%esp) 114bdd: e8 5a 32 00 00 call 117e3c <_Objects_Allocate> 114be2: 89 c3 mov %eax,%ebx the_region = _Region_Allocate(); if ( !the_region ) 114be4: 83 c4 10 add $0x10,%esp 114be7: b8 05 00 00 00 mov $0x5,%eax 114bec: 85 db test %ebx,%ebx 114bee: 74 7a je 114c6a return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 114bf0: 57 push %edi 114bf1: ff 75 10 pushl 0x10(%ebp) 114bf4: 56 push %esi 114bf5: 8d 43 68 lea 0x68(%ebx),%eax 114bf8: 50 push %eax 114bf9: e8 66 2d 00 00 call 117964 <_Heap_Initialize> 114bfe: 89 43 5c mov %eax,0x5c(%ebx) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 114c01: 83 c4 10 add $0x10,%esp 114c04: 85 c0 test %eax,%eax 114c06: 75 14 jne 114c1c */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 114c08: 50 push %eax 114c09: 50 push %eax 114c0a: 53 push %ebx 114c0b: 68 f0 c9 13 00 push $0x13c9f0 114c10: e8 13 35 00 00 call 118128 <_Objects_Free> 114c15: b8 08 00 00 00 mov $0x8,%eax 114c1a: eb 4b jmp 114c67 <== ALWAYS TAKEN return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 114c1c: 89 73 50 mov %esi,0x50(%ebx) the_region->length = length; 114c1f: 8b 45 10 mov 0x10(%ebp),%eax 114c22: 89 43 54 mov %eax,0x54(%ebx) the_region->page_size = page_size; 114c25: 89 7b 58 mov %edi,0x58(%ebx) the_region->attribute_set = attribute_set; 114c28: 8b 55 18 mov 0x18(%ebp),%edx 114c2b: 89 53 60 mov %edx,0x60(%ebx) the_region->number_of_used_blocks = 0; 114c2e: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) _Thread_queue_Initialize( 114c35: 6a 06 push $0x6 114c37: 6a 40 push $0x40 114c39: 89 d0 mov %edx,%eax 114c3b: c1 e8 02 shr $0x2,%eax 114c3e: 83 e0 01 and $0x1,%eax 114c41: 50 push %eax 114c42: 8d 43 10 lea 0x10(%ebx),%eax 114c45: 50 push %eax 114c46: e8 21 45 00 00 call 11916c <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 114c4b: 8b 43 08 mov 0x8(%ebx),%eax 114c4e: 0f b7 c8 movzwl %ax,%ecx 114c51: 8b 15 0c ca 13 00 mov 0x13ca0c,%edx 114c57: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 114c5a: 8b 55 08 mov 0x8(%ebp),%edx 114c5d: 89 53 0c mov %edx,0xc(%ebx) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 114c60: 8b 55 1c mov 0x1c(%ebp),%edx 114c63: 89 02 mov %eax,(%edx) 114c65: 31 c0 xor %eax,%eax 114c67: 83 c4 10 add $0x10,%esp return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 114c6a: 83 ec 0c sub $0xc,%esp 114c6d: ff 35 9c cb 13 00 pushl 0x13cb9c 114c73: 89 45 e4 mov %eax,-0x1c(%ebp) 114c76: e8 45 20 00 00 call 116cc0 <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; 114c7b: 83 c4 10 add $0x10,%esp 114c7e: 8b 45 e4 mov -0x1c(%ebp),%eax 114c81: eb 05 jmp 114c88 <== ALWAYS TAKEN 114c83: b8 09 00 00 00 mov $0x9,%eax } 114c88: 8d 65 f4 lea -0xc(%ebp),%esp 114c8b: 5b pop %ebx 114c8c: 5e pop %esi 114c8d: 5f pop %edi 114c8e: c9 leave 114c8f: c3 ret 00114c90 : */ rtems_status_code rtems_region_delete( rtems_id id ) { 114c90: 55 push %ebp 114c91: 89 e5 mov %esp,%ebp 114c93: 56 push %esi 114c94: 53 push %ebx 114c95: 83 ec 1c sub $0x1c,%esp Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 114c98: ff 35 9c cb 13 00 pushl 0x13cb9c 114c9e: e8 d5 1f 00 00 call 116c78 <_API_Mutex_Lock> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 114ca3: 83 c4 0c add $0xc,%esp 114ca6: 8d 45 f4 lea -0xc(%ebp),%eax 114ca9: 50 push %eax 114caa: ff 75 08 pushl 0x8(%ebp) 114cad: 68 f0 c9 13 00 push $0x13c9f0 114cb2: e8 99 35 00 00 call 118250 <_Objects_Get_no_protection> 114cb7: 89 c6 mov %eax,%esi the_region = _Region_Get( id, &location ); switch ( location ) { 114cb9: 83 c4 10 add $0x10,%esp 114cbc: bb 04 00 00 00 mov $0x4,%ebx 114cc1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 114cc5: 75 27 jne 114cee case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 ) 114cc7: b3 0c mov $0xc,%bl 114cc9: 83 78 64 00 cmpl $0x0,0x64(%eax) 114ccd: 75 1f jne 114cee return_status = RTEMS_RESOURCE_IN_USE; else { _Objects_Close( &_Region_Information, &the_region->Object ); 114ccf: 51 push %ecx 114cd0: 51 push %ecx 114cd1: 50 push %eax 114cd2: 68 f0 c9 13 00 push $0x13c9f0 114cd7: e8 cc 31 00 00 call 117ea8 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 114cdc: 58 pop %eax 114cdd: 5a pop %edx 114cde: 56 push %esi 114cdf: 68 f0 c9 13 00 push $0x13c9f0 114ce4: e8 3f 34 00 00 call 118128 <_Objects_Free> 114ce9: 30 db xor %bl,%bl 114ceb: 83 c4 10 add $0x10,%esp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 114cee: 83 ec 0c sub $0xc,%esp 114cf1: ff 35 9c cb 13 00 pushl 0x13cb9c 114cf7: e8 c4 1f 00 00 call 116cc0 <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; } 114cfc: 89 d8 mov %ebx,%eax 114cfe: 8d 65 f8 lea -0x8(%ebp),%esp 114d01: 5b pop %ebx 114d02: 5e pop %esi 114d03: c9 leave 114d04: c3 ret 00114d08 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 114d08: 55 push %ebp 114d09: 89 e5 mov %esp,%ebp 114d0b: 57 push %edi 114d0c: 56 push %esi 114d0d: 53 push %ebx 114d0e: 83 ec 1c sub $0x1c,%esp 114d11: 8b 75 0c mov 0xc(%ebp),%esi Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 114d14: bf 09 00 00 00 mov $0x9,%edi 114d19: 85 f6 test %esi,%esi 114d1b: 74 76 je 114d93 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 114d1d: 83 ec 0c sub $0xc,%esp 114d20: ff 35 9c cb 13 00 pushl 0x13cb9c 114d26: e8 4d 1f 00 00 call 116c78 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 114d2b: 83 c4 0c add $0xc,%esp 114d2e: 8d 45 e0 lea -0x20(%ebp),%eax 114d31: 50 push %eax 114d32: ff 75 08 pushl 0x8(%ebp) 114d35: 68 f0 c9 13 00 push $0x13c9f0 114d3a: e8 11 35 00 00 call 118250 <_Objects_Get_no_protection> 114d3f: 89 c3 mov %eax,%ebx the_region = _Region_Get( id, &location ); switch ( location ) { 114d41: 83 c4 10 add $0x10,%esp 114d44: 66 bf 04 00 mov $0x4,%di 114d48: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) 114d4c: 75 34 jne 114d82 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 114d4e: 8d 45 e4 lea -0x1c(%ebp),%eax 114d51: 50 push %eax 114d52: ff 75 10 pushl 0x10(%ebp) 114d55: 56 push %esi 114d56: 8d 43 68 lea 0x68(%ebx),%eax 114d59: 50 push %eax 114d5a: e8 5d 29 00 00 call 1176bc <_Heap_Extend> starting_address, length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { 114d5f: 83 c4 10 add $0x10,%esp 114d62: 85 c0 test %eax,%eax 114d64: 75 0e jne 114d74 the_region->length += amount_extended; 114d66: 8b 45 e4 mov -0x1c(%ebp),%eax 114d69: 01 43 54 add %eax,0x54(%ebx) the_region->maximum_segment_size += amount_extended; 114d6c: 01 43 5c add %eax,0x5c(%ebx) 114d6f: 66 31 ff xor %di,%di 114d72: eb 0e jmp 114d82 <== ALWAYS TAKEN return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 114d74: 48 dec %eax 114d75: 0f 95 c0 setne %al 114d78: 0f b6 f8 movzbl %al,%edi 114d7b: 4f dec %edi 114d7c: 83 e7 f1 and $0xfffffff1,%edi 114d7f: 83 c7 18 add $0x18,%edi default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 114d82: 83 ec 0c sub $0xc,%esp 114d85: ff 35 9c cb 13 00 pushl 0x13cb9c 114d8b: e8 30 1f 00 00 call 116cc0 <_API_Mutex_Unlock> return return_status; 114d90: 83 c4 10 add $0x10,%esp } 114d93: 89 f8 mov %edi,%eax 114d95: 8d 65 f4 lea -0xc(%ebp),%esp 114d98: 5b pop %ebx 114d99: 5e pop %esi 114d9a: 5f pop %edi 114d9b: c9 leave 114d9c: c3 ret 00114e94 : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 114e94: 55 push %ebp 114e95: 89 e5 mov %esp,%ebp 114e97: 57 push %edi 114e98: 56 push %esi 114e99: 53 push %ebx 114e9a: 83 ec 2c sub $0x2c,%esp 114e9d: 8b 7d 18 mov 0x18(%ebp),%edi Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 114ea0: b8 09 00 00 00 mov $0x9,%eax 114ea5: 85 ff test %edi,%edi 114ea7: 0f 84 eb 00 00 00 je 114f98 return RTEMS_INVALID_ADDRESS; *segment = NULL; 114ead: c7 07 00 00 00 00 movl $0x0,(%edi) if ( size == 0 ) 114eb3: b0 08 mov $0x8,%al 114eb5: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 114eb9: 0f 84 d9 00 00 00 je 114f98 return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 114ebf: 83 ec 0c sub $0xc,%esp 114ec2: ff 35 9c cb 13 00 pushl 0x13cb9c 114ec8: e8 ab 1d 00 00 call 116c78 <_API_Mutex_Lock> <== ALWAYS TAKEN executing = _Thread_Executing; 114ecd: 8b 35 a4 cb 13 00 mov 0x13cba4,%esi 114ed3: 83 c4 0c add $0xc,%esp 114ed6: 8d 45 e4 lea -0x1c(%ebp),%eax 114ed9: 50 push %eax 114eda: ff 75 08 pushl 0x8(%ebp) 114edd: 68 f0 c9 13 00 push $0x13c9f0 114ee2: e8 69 33 00 00 call 118250 <_Objects_Get_no_protection> 114ee7: 89 c3 mov %eax,%ebx the_region = _Region_Get( id, &location ); switch ( location ) { 114ee9: 83 c4 10 add $0x10,%esp _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; 114eec: b8 04 00 00 00 mov $0x4,%eax _RTEMS_Lock_allocator(); executing = _Thread_Executing; the_region = _Region_Get( id, &location ); switch ( location ) { 114ef1: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 114ef5: 0f 85 86 00 00 00 jne 114f81 case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 114efb: b0 08 mov $0x8,%al 114efd: 8b 55 0c mov 0xc(%ebp),%edx 114f00: 3b 53 5c cmp 0x5c(%ebx),%edx 114f03: 77 7c ja 114f81 * @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 ); 114f05: 6a 00 push $0x0 114f07: 6a 00 push $0x0 114f09: 52 push %edx 114f0a: 8d 43 68 lea 0x68(%ebx),%eax 114f0d: 50 push %eax 114f0e: e8 49 26 00 00 call 11755c <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 114f13: 83 c4 10 add $0x10,%esp 114f16: 85 c0 test %eax,%eax 114f18: 74 09 je 114f23 the_region->number_of_used_blocks += 1; 114f1a: ff 43 64 incl 0x64(%ebx) *segment = the_segment; 114f1d: 89 07 mov %eax,(%edi) 114f1f: 31 c0 xor %eax,%eax 114f21: eb 5e jmp 114f81 <== ALWAYS TAKEN return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) { 114f23: b8 0d 00 00 00 mov $0xd,%eax 114f28: f6 45 10 01 testb $0x1,0x10(%ebp) 114f2c: 75 53 jne 114f81 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 114f2e: a1 e8 ca 13 00 mov 0x13cae8,%eax 114f33: 40 inc %eax 114f34: a3 e8 ca 13 00 mov %eax,0x13cae8 * 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(); 114f39: 83 ec 0c sub $0xc,%esp 114f3c: ff 35 9c cb 13 00 pushl 0x13cb9c 114f42: e8 79 1d 00 00 call 116cc0 <_API_Mutex_Unlock> <== ALWAYS TAKEN executing->Wait.queue = &the_region->Wait_queue; 114f47: 8d 43 10 lea 0x10(%ebx),%eax 114f4a: 89 46 44 mov %eax,0x44(%esi) executing->Wait.id = id; 114f4d: 8b 55 08 mov 0x8(%ebp),%edx 114f50: 89 56 20 mov %edx,0x20(%esi) executing->Wait.count = size; 114f53: 8b 55 0c mov 0xc(%ebp),%edx 114f56: 89 56 24 mov %edx,0x24(%esi) executing->Wait.return_argument = segment; 114f59: 89 7e 28 mov %edi,0x28(%esi) RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 114f5c: c7 43 40 01 00 00 00 movl $0x1,0x40(%ebx) _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 114f63: 83 c4 0c add $0xc,%esp 114f66: 68 10 92 11 00 push $0x119210 114f6b: ff 75 14 pushl 0x14(%ebp) 114f6e: 50 push %eax 114f6f: e8 e0 3f 00 00 call 118f54 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 114f74: e8 44 3b 00 00 call 118abd <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 114f79: 8b 46 34 mov 0x34(%esi),%eax 114f7c: 83 c4 10 add $0x10,%esp 114f7f: eb 17 jmp 114f98 <== ALWAYS TAKEN default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 114f81: 83 ec 0c sub $0xc,%esp 114f84: ff 35 9c cb 13 00 pushl 0x13cb9c 114f8a: 89 45 d4 mov %eax,-0x2c(%ebp) 114f8d: e8 2e 1d 00 00 call 116cc0 <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; 114f92: 83 c4 10 add $0x10,%esp 114f95: 8b 45 d4 mov -0x2c(%ebp),%eax } 114f98: 8d 65 f4 lea -0xc(%ebp),%esp 114f9b: 5b pop %ebx 114f9c: 5e pop %esi 114f9d: 5f pop %edi 114f9e: c9 leave 114f9f: c3 ret 00114fa0 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 114fa0: 55 push %ebp 114fa1: 89 e5 mov %esp,%ebp 114fa3: 56 push %esi 114fa4: 53 push %ebx 114fa5: 83 ec 10 sub $0x10,%esp 114fa8: 8b 5d 0c mov 0xc(%ebp),%ebx 114fab: 8b 75 10 mov 0x10(%ebp),%esi Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 114fae: 85 db test %ebx,%ebx 114fb0: 74 65 je 115017 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( !size ) 114fb2: 85 f6 test %esi,%esi 114fb4: 74 61 je 115017 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 114fb6: 83 ec 0c sub $0xc,%esp 114fb9: ff 35 9c cb 13 00 pushl 0x13cb9c 114fbf: e8 b4 1c 00 00 call 116c78 <_API_Mutex_Lock> <== ALWAYS TAKEN 114fc4: 83 c4 0c add $0xc,%esp 114fc7: 8d 45 f4 lea -0xc(%ebp),%eax 114fca: 50 push %eax 114fcb: ff 75 08 pushl 0x8(%ebp) 114fce: 68 f0 c9 13 00 push $0x13c9f0 114fd3: e8 78 32 00 00 call 118250 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 114fd8: 83 c4 10 add $0x10,%esp 114fdb: 8b 55 f4 mov -0xc(%ebp),%edx 114fde: 85 d2 test %edx,%edx 114fe0: 74 08 je 114fea 114fe2: bb 04 00 00 00 mov $0x4,%ebx 114fe7: 4a dec %edx 114fe8: eb 16 jmp 115000 case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 114fea: 52 push %edx 114feb: 56 push %esi 114fec: 53 push %ebx 114fed: 83 c0 68 add $0x68,%eax 114ff0: 50 push %eax 114ff1: e8 4e 2d 00 00 call 117d44 <_Heap_Size_of_alloc_area> 114ff6: 83 c4 10 add $0x10,%esp 114ff9: bb 09 00 00 00 mov $0x9,%ebx 114ffe: 84 c0 test %al,%al 115000: 74 02 je 115004 115002: 31 db xor %ebx,%ebx case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 115004: 83 ec 0c sub $0xc,%esp 115007: ff 35 9c cb 13 00 pushl 0x13cb9c 11500d: e8 ae 1c 00 00 call 116cc0 <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; 115012: 83 c4 10 add $0x10,%esp 115015: eb 05 jmp 11501c <== ALWAYS TAKEN 115017: bb 09 00 00 00 mov $0x9,%ebx } 11501c: 89 d8 mov %ebx,%eax 11501e: 8d 65 f8 lea -0x8(%ebp),%esp 115021: 5b pop %ebx 115022: 5e pop %esi 115023: c9 leave 115024: c3 ret 0011504c : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 11504c: 55 push %ebp 11504d: 89 e5 mov %esp,%ebp 11504f: 57 push %edi 115050: 56 push %esi 115051: 53 push %ebx 115052: 83 ec 1c sub $0x1c,%esp 115055: 8b 75 14 mov 0x14(%ebp),%esi uintptr_t osize; rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 115058: 85 f6 test %esi,%esi 11505a: 0f 84 95 00 00 00 je 1150f5 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 115060: 83 ec 0c sub $0xc,%esp 115063: ff 35 9c cb 13 00 pushl 0x13cb9c 115069: e8 0a 1c 00 00 call 116c78 <_API_Mutex_Lock> 11506e: 83 c4 0c add $0xc,%esp 115071: 8d 45 e0 lea -0x20(%ebp),%eax 115074: 50 push %eax 115075: ff 75 08 pushl 0x8(%ebp) 115078: 68 f0 c9 13 00 push $0x13c9f0 11507d: e8 ce 31 00 00 call 118250 <_Objects_Get_no_protection> 115082: 89 c3 mov %eax,%ebx the_region = _Region_Get( id, &location ); switch ( location ) { 115084: 83 c4 10 add $0x10,%esp 115087: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) 11508b: 75 50 jne 1150dd case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 11508d: 83 ec 0c sub $0xc,%esp 115090: 8d 45 e4 lea -0x1c(%ebp),%eax 115093: 50 push %eax 115094: 8d 45 dc lea -0x24(%ebp),%eax 115097: 50 push %eax 115098: ff 75 10 pushl 0x10(%ebp) 11509b: ff 75 0c pushl 0xc(%ebp) 11509e: 8d 43 68 lea 0x68(%ebx),%eax 1150a1: 50 push %eax 1150a2: e8 ad 2b 00 00 call 117c54 <_Heap_Resize_block> 1150a7: 89 c7 mov %eax,%edi segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 1150a9: 8b 45 dc mov -0x24(%ebp),%eax 1150ac: 89 06 mov %eax,(%esi) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 1150ae: 83 c4 20 add $0x20,%esp 1150b1: 85 ff test %edi,%edi 1150b3: 75 0d jne 1150c2 _Region_Process_queue( the_region ); /* unlocks allocator */ 1150b5: 83 ec 0c sub $0xc,%esp 1150b8: 53 push %ebx 1150b9: e8 5e 62 00 00 call 11b31c <_Region_Process_queue> 1150be: 31 c0 xor %eax,%eax 1150c0: eb 2e jmp 1150f0 <== ALWAYS TAKEN else _RTEMS_Unlock_allocator(); 1150c2: 83 ec 0c sub $0xc,%esp 1150c5: ff 35 9c cb 13 00 pushl 0x13cb9c 1150cb: e8 f0 1b 00 00 call 116cc0 <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 1150d0: 83 c4 10 add $0x10,%esp 1150d3: b8 0d 00 00 00 mov $0xd,%eax 1150d8: 4f dec %edi 1150d9: 75 1a jne 1150f5 1150db: eb 1d jmp 1150fa <== ALWAYS TAKEN default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1150dd: 83 ec 0c sub $0xc,%esp 1150e0: ff 35 9c cb 13 00 pushl 0x13cb9c 1150e6: e8 d5 1b 00 00 call 116cc0 <_API_Mutex_Unlock> 1150eb: b8 04 00 00 00 mov $0x4,%eax return return_status; 1150f0: 83 c4 10 add $0x10,%esp 1150f3: eb 05 jmp 1150fa <== ALWAYS TAKEN 1150f5: b8 09 00 00 00 mov $0x9,%eax } 1150fa: 8d 65 f4 lea -0xc(%ebp),%esp 1150fd: 5b pop %ebx 1150fe: 5e pop %esi 1150ff: 5f pop %edi 115100: c9 leave 115101: c3 ret 00115104 : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 115104: 55 push %ebp 115105: 89 e5 mov %esp,%ebp 115107: 56 push %esi 115108: 53 push %ebx 115109: 83 ec 1c sub $0x1c,%esp uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 11510c: ff 35 9c cb 13 00 pushl 0x13cb9c 115112: e8 61 1b 00 00 call 116c78 <_API_Mutex_Lock> <== ALWAYS TAKEN 115117: 83 c4 0c add $0xc,%esp 11511a: 8d 45 f4 lea -0xc(%ebp),%eax 11511d: 50 push %eax 11511e: ff 75 08 pushl 0x8(%ebp) 115121: 68 f0 c9 13 00 push $0x13c9f0 115126: e8 25 31 00 00 call 118250 <_Objects_Get_no_protection> 11512b: 89 c3 mov %eax,%ebx the_region = _Region_Get( id, &location ); switch ( location ) { 11512d: 83 c4 10 add $0x10,%esp 115130: be 04 00 00 00 mov $0x4,%esi 115135: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 115139: 75 2a jne 115165 RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 11513b: 50 push %eax 11513c: 50 push %eax 11513d: ff 75 0c pushl 0xc(%ebp) 115140: 8d 43 68 lea 0x68(%ebx),%eax 115143: 50 push %eax 115144: e8 fb 25 00 00 call 117744 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 115149: 83 c4 10 add $0x10,%esp else { the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator */ return RTEMS_SUCCESSFUL; 11514c: 66 be 09 00 mov $0x9,%si #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 115150: 84 c0 test %al,%al 115152: 74 11 je 115165 return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; 115154: ff 4b 64 decl 0x64(%ebx) _Region_Process_queue(the_region); /* unlocks allocator */ 115157: 83 ec 0c sub $0xc,%esp 11515a: 53 push %ebx 11515b: e8 bc 61 00 00 call 11b31c <_Region_Process_queue> 115160: 66 31 f6 xor %si,%si 115163: eb 0e jmp 115173 <== ALWAYS TAKEN default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 115165: 83 ec 0c sub $0xc,%esp 115168: ff 35 9c cb 13 00 pushl 0x13cb9c 11516e: e8 4d 1b 00 00 call 116cc0 <_API_Mutex_Unlock> return return_status; 115173: 83 c4 10 add $0x10,%esp } 115176: 89 f0 mov %esi,%eax 115178: 8d 65 f8 lea -0x8(%ebp),%esp 11517b: 5b pop %ebx 11517c: 5e pop %esi 11517d: c9 leave 11517e: c3 ret 00109d00 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 109d00: 55 push %ebp 109d01: 89 e5 mov %esp,%ebp 109d03: 57 push %edi 109d04: 56 push %esi 109d05: 53 push %ebx 109d06: 83 ec 3c sub $0x3c,%esp 109d09: 8b 7d 0c mov 0xc(%ebp),%edi 109d0c: 8b 5d 10 mov 0x10(%ebp),%ebx 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 ) ) 109d0f: b8 03 00 00 00 mov $0x3,%eax 109d14: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 109d18: 0f 84 74 01 00 00 je 109e92 return RTEMS_INVALID_NAME; if ( !id ) 109d1e: b0 09 mov $0x9,%al 109d20: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 109d24: 0f 84 68 01 00 00 je 109e92 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 109d2a: 89 d8 mov %ebx,%eax 109d2c: 25 c0 00 00 00 and $0xc0,%eax 109d31: 74 22 je 109d55 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 109d33: 89 da mov %ebx,%edx 109d35: 83 e2 30 and $0x30,%edx 109d38: 83 fa 10 cmp $0x10,%edx 109d3b: 0f 85 4c 01 00 00 jne 109e8d 109d41: f6 c3 04 test $0x4,%bl 109d44: 0f 84 43 01 00 00 je 109e8d _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 109d4a: 3d c0 00 00 00 cmp $0xc0,%eax 109d4f: 0f 84 38 01 00 00 je 109e8d _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 109d55: 89 da mov %ebx,%edx 109d57: 83 e2 30 and $0x30,%edx 109d5a: 74 0e je 109d6a 109d5c: b8 0a 00 00 00 mov $0xa,%eax 109d61: 83 ff 01 cmp $0x1,%edi 109d64: 0f 87 28 01 00 00 ja 109e92 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 109d6a: a1 74 38 12 00 mov 0x123874,%eax 109d6f: 40 inc %eax 109d70: a3 74 38 12 00 mov %eax,0x123874 * 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 ); 109d75: 83 ec 0c sub $0xc,%esp 109d78: 68 bc 37 12 00 push $0x1237bc 109d7d: 89 55 c4 mov %edx,-0x3c(%ebp) 109d80: e8 b7 11 00 00 call 10af3c <_Objects_Allocate> 109d85: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 109d87: 83 c4 10 add $0x10,%esp 109d8a: 85 c0 test %eax,%eax 109d8c: 8b 55 c4 mov -0x3c(%ebp),%edx 109d8f: 75 0f jne 109da0 _Thread_Enable_dispatch(); 109d91: e8 7f 1d 00 00 call 10bb15 <_Thread_Enable_dispatch> 109d96: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 109d9b: e9 f2 00 00 00 jmp 109e92 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 109da0: 89 58 10 mov %ebx,0x10(%eax) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 109da3: 85 d2 test %edx,%edx 109da5: 75 37 jne 109dde /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 109da7: 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; 109dae: 31 c0 xor %eax,%eax 109db0: f6 c3 04 test $0x4,%bl 109db3: 0f 95 c0 setne %al 109db6: 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; 109db9: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 109dc0: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) _CORE_semaphore_Initialize( 109dc7: 51 push %ecx 109dc8: 57 push %edi 109dc9: 8d 45 e0 lea -0x20(%ebp),%eax 109dcc: 50 push %eax 109dcd: 8d 46 14 lea 0x14(%esi),%eax 109dd0: 50 push %eax 109dd1: e8 c2 0c 00 00 call 10aa98 <_CORE_semaphore_Initialize> <== ALWAYS TAKEN 109dd6: 83 c4 10 add $0x10,%esp 109dd9: e9 8c 00 00 00 jmp 109e6a <== ALWAYS TAKEN /* * 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; 109dde: 31 c0 xor %eax,%eax 109de0: f6 c3 04 test $0x4,%bl 109de3: 0f 95 c0 setne %al 109de6: 89 45 d8 mov %eax,-0x28(%ebp) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 109de9: 83 fa 10 cmp $0x10,%edx 109dec: 75 36 jne 109e24 the_mutex_attr.priority_ceiling = priority_ceiling; 109dee: 8b 45 14 mov 0x14(%ebp),%eax 109df1: 89 45 dc mov %eax,-0x24(%ebp) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 109df4: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 109dfb: c6 45 d4 00 movb $0x0,-0x2c(%ebp) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 109dff: 83 7d d8 01 cmpl $0x1,-0x28(%ebp) 109e03: 75 2a jne 109e2f if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 109e05: f6 c3 40 test $0x40,%bl 109e08: 74 09 je 109e13 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 109e0a: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp) 109e11: eb 0b jmp 109e1e <== ALWAYS TAKEN the_mutex_attr.only_owner_release = true; } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { 109e13: 84 db test %bl,%bl 109e15: 79 18 jns 109e2f the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 109e17: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 109e1e: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 109e22: eb 0b jmp 109e2f <== ALWAYS TAKEN } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 109e24: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 109e2b: c6 45 d4 00 movb $0x0,-0x2c(%ebp) } mutex_status = _CORE_mutex_Initialize( 109e2f: 52 push %edx 109e30: 31 c0 xor %eax,%eax 109e32: 83 ff 01 cmp $0x1,%edi 109e35: 0f 94 c0 sete %al 109e38: 50 push %eax 109e39: 8d 45 d0 lea -0x30(%ebp),%eax 109e3c: 50 push %eax 109e3d: 8d 46 14 lea 0x14(%esi),%eax 109e40: 50 push %eax 109e41: e8 e6 09 00 00 call 10a82c <_CORE_mutex_Initialize> <== ALWAYS TAKEN &the_semaphore->Core_control.mutex, &the_mutex_attr, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 109e46: 83 c4 10 add $0x10,%esp 109e49: 83 f8 06 cmp $0x6,%eax 109e4c: 75 1c jne 109e6a */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 109e4e: 50 push %eax 109e4f: 50 push %eax 109e50: 56 push %esi 109e51: 68 bc 37 12 00 push $0x1237bc 109e56: e8 cd 13 00 00 call 10b228 <_Objects_Free> _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 109e5b: e8 b5 1c 00 00 call 10bb15 <_Thread_Enable_dispatch> 109e60: b8 13 00 00 00 mov $0x13,%eax return RTEMS_INVALID_PRIORITY; 109e65: 83 c4 10 add $0x10,%esp 109e68: eb 28 jmp 109e92 <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 109e6a: 8b 46 08 mov 0x8(%esi),%eax 109e6d: 0f b7 c8 movzwl %ax,%ecx 109e70: 8b 15 d8 37 12 00 mov 0x1237d8,%edx 109e76: 89 34 8a mov %esi,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 109e79: 8b 55 08 mov 0x8(%ebp),%edx 109e7c: 89 56 0c mov %edx,0xc(%esi) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 109e7f: 8b 55 18 mov 0x18(%ebp),%edx 109e82: 89 02 mov %eax,(%edx) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 109e84: e8 8c 1c 00 00 call 10bb15 <_Thread_Enable_dispatch> 109e89: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 109e8b: eb 05 jmp 109e92 <== ALWAYS TAKEN 109e8d: b8 0b 00 00 00 mov $0xb,%eax } 109e92: 8d 65 f4 lea -0xc(%ebp),%esp 109e95: 5b pop %ebx 109e96: 5e pop %esi 109e97: 5f pop %edi 109e98: c9 leave 109e99: c3 ret 00109e9c : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 109e9c: 55 push %ebp 109e9d: 89 e5 mov %esp,%ebp 109e9f: 53 push %ebx 109ea0: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 109ea3: 8d 45 f4 lea -0xc(%ebp),%eax 109ea6: 50 push %eax 109ea7: ff 75 08 pushl 0x8(%ebp) 109eaa: 68 bc 37 12 00 push $0x1237bc 109eaf: e8 9c 14 00 00 call 10b350 <_Objects_Get> 109eb4: 89 c3 mov %eax,%ebx register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 109eb6: 83 c4 10 add $0x10,%esp 109eb9: b8 04 00 00 00 mov $0x4,%eax 109ebe: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 109ec2: 75 61 jne 109f25 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); 109ec4: 8b 43 10 mov 0x10(%ebx),%eax case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 109ec7: 83 e0 30 and $0x30,%eax 109eca: 74 27 je 109ef3 if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 109ecc: 83 7b 64 00 cmpl $0x0,0x64(%ebx) 109ed0: 75 11 jne 109ee3 109ed2: 83 f8 20 cmp $0x20,%eax 109ed5: 74 0c je 109ee3 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 109ed7: e8 39 1c 00 00 call 10bb15 <_Thread_Enable_dispatch> 109edc: b8 0c 00 00 00 mov $0xc,%eax return RTEMS_RESOURCE_IN_USE; 109ee1: eb 42 jmp 109f25 <== ALWAYS TAKEN } _CORE_mutex_Flush( 109ee3: 51 push %ecx 109ee4: 6a 04 push $0x4 109ee6: 6a 00 push $0x0 109ee8: 8d 43 14 lea 0x14(%ebx),%eax 109eeb: 50 push %eax 109eec: e8 2f 09 00 00 call 10a820 <_CORE_mutex_Flush> <== ALWAYS TAKEN 109ef1: eb 0e jmp 109f01 <== ALWAYS TAKEN &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 109ef3: 52 push %edx 109ef4: 6a 02 push $0x2 109ef6: 6a 00 push $0x0 109ef8: 8d 43 14 lea 0x14(%ebx),%eax 109efb: 50 push %eax 109efc: e8 8b 0b 00 00 call 10aa8c <_CORE_semaphore_Flush> <== ALWAYS TAKEN 109f01: 59 pop %ecx 109f02: 58 pop %eax SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 109f03: 53 push %ebx 109f04: 68 bc 37 12 00 push $0x1237bc 109f09: e8 9a 10 00 00 call 10afa8 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 109f0e: 58 pop %eax 109f0f: 5a pop %edx 109f10: 53 push %ebx 109f11: 68 bc 37 12 00 push $0x1237bc 109f16: e8 0d 13 00 00 call 10b228 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 109f1b: e8 f5 1b 00 00 call 10bb15 <_Thread_Enable_dispatch> 109f20: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 109f22: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 109f25: 8b 5d fc mov -0x4(%ebp),%ebx 109f28: c9 leave 109f29: c3 ret 001123e8 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 1123e8: 55 push %ebp 1123e9: 89 e5 mov %esp,%ebp 1123eb: 83 ec 1c sub $0x1c,%esp 1123ee: 8d 45 f4 lea -0xc(%ebp),%eax 1123f1: 50 push %eax 1123f2: ff 75 08 pushl 0x8(%ebp) 1123f5: 68 3c 83 12 00 push $0x12833c 1123fa: e8 b1 a5 ff ff call 10c9b0 <_Objects_Get> 1123ff: 89 c2 mov %eax,%edx register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 112401: 83 c4 10 add $0x10,%esp 112404: b8 04 00 00 00 mov $0x4,%eax 112409: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 11240d: 75 2b jne 11243a case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 11240f: f6 42 10 30 testb $0x30,0x10(%edx) 112413: 8d 42 14 lea 0x14(%edx),%eax 112416: 74 0d je 112425 _CORE_mutex_Flush( 112418: 51 push %ecx 112419: 6a 01 push $0x1 11241b: 6a 00 push $0x0 11241d: 50 push %eax 11241e: e8 01 9a ff ff call 10be24 <_CORE_mutex_Flush> <== ALWAYS TAKEN 112423: eb 0b jmp 112430 <== ALWAYS TAKEN &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 112425: 52 push %edx 112426: 6a 01 push $0x1 112428: 6a 00 push $0x0 11242a: 50 push %eax 11242b: e8 60 9c ff ff call 10c090 <_CORE_semaphore_Flush> 112430: 83 c4 10 add $0x10,%esp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 112433: e8 bd ad ff ff call 10d1f5 <_Thread_Enable_dispatch> 112438: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11243a: c9 leave 11243b: c3 ret 00109f2c : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 109f2c: 55 push %ebp 109f2d: 89 e5 mov %esp,%ebp 109f2f: 57 push %edi 109f30: 56 push %esi 109f31: 53 push %ebx 109f32: 83 ec 1c sub $0x1c,%esp 109f35: 8b 5d 08 mov 0x8(%ebp),%ebx 109f38: 8b 7d 0c mov 0xc(%ebp),%edi 109f3b: 8b 75 10 mov 0x10(%ebp),%esi Objects_Id id, Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) 109f3e: 8d 45 e0 lea -0x20(%ebp),%eax 109f41: 50 push %eax 109f42: 8d 45 e4 lea -0x1c(%ebp),%eax 109f45: 50 push %eax 109f46: 53 push %ebx 109f47: 68 bc 37 12 00 push $0x1237bc 109f4c: e8 af 13 00 00 call 10b300 <_Objects_Get_isr_disable> 109f51: 89 c2 mov %eax,%edx register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { 109f53: 83 c4 10 add $0x10,%esp 109f56: b8 04 00 00 00 mov $0x4,%eax 109f5b: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 109f5f: 0f 85 a8 00 00 00 jne 10a00d case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 109f65: f6 42 10 30 testb $0x30,0x10(%edx) 109f69: 74 2a je 109f95 _CORE_mutex_Seize( 109f6b: 83 ec 0c sub $0xc,%esp 109f6e: ff 75 e0 pushl -0x20(%ebp) 109f71: 56 push %esi 109f72: 83 e7 01 and $0x1,%edi 109f75: 83 f7 01 xor $0x1,%edi 109f78: 57 push %edi 109f79: 53 push %ebx 109f7a: 83 c2 14 add $0x14,%edx 109f7d: 52 push %edx 109f7e: e8 92 09 00 00 call 10a915 <_CORE_mutex_Seize> <== ALWAYS TAKEN id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 109f83: 83 c4 14 add $0x14,%esp 109f86: a1 30 39 12 00 mov 0x123930,%eax 109f8b: ff 70 34 pushl 0x34(%eax) 109f8e: e8 f5 00 00 00 call 10a088 <_Semaphore_Translate_core_mutex_return_code> <== ALWAYS TAKEN 109f93: eb 75 jmp 10a00a <== ALWAYS TAKEN { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 109f95: a1 30 39 12 00 mov 0x123930,%eax executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 109f9a: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) if ( the_semaphore->count != 0 ) { 109fa1: 8b 4a 5c mov 0x5c(%edx),%ecx 109fa4: 85 c9 test %ecx,%ecx 109fa6: 74 0a je 109fb2 the_semaphore->count -= 1; 109fa8: 49 dec %ecx 109fa9: 89 4a 5c mov %ecx,0x5c(%edx) _ISR_Enable( *level_p ); 109fac: ff 75 e0 pushl -0x20(%ebp) 109faf: 9d popf 109fb0: eb 48 jmp 109ffa <== ALWAYS TAKEN return; } if ( !wait ) { 109fb2: 83 e7 01 and $0x1,%edi 109fb5: 74 0d je 109fc4 _ISR_Enable( *level_p ); 109fb7: ff 75 e0 pushl -0x20(%ebp) 109fba: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 109fbb: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) 109fc2: eb 36 jmp 109ffa <== ALWAYS TAKEN 109fc4: 8b 0d 74 38 12 00 mov 0x123874,%ecx 109fca: 41 inc %ecx 109fcb: 89 0d 74 38 12 00 mov %ecx,0x123874 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; 109fd1: c7 42 44 01 00 00 00 movl $0x1,0x44(%edx) return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 109fd8: 83 c2 14 add $0x14,%edx 109fdb: 89 50 44 mov %edx,0x44(%eax) executing->Wait.id = id; 109fde: 89 58 20 mov %ebx,0x20(%eax) _ISR_Enable( *level_p ); 109fe1: ff 75 e0 pushl -0x20(%ebp) 109fe4: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 109fe5: 50 push %eax 109fe6: 68 3c c2 10 00 push $0x10c23c 109feb: 56 push %esi 109fec: 52 push %edx 109fed: e8 8e 1f 00 00 call 10bf80 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 109ff2: e8 1e 1b 00 00 call 10bb15 <_Thread_Enable_dispatch> 109ff7: 83 c4 10 add $0x10,%esp id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 109ffa: 83 ec 0c sub $0xc,%esp 109ffd: a1 30 39 12 00 mov 0x123930,%eax 10a002: ff 70 34 pushl 0x34(%eax) 10a005: e8 8d 00 00 00 call 10a097 <_Semaphore_Translate_core_semaphore_return_code> <== ALWAYS TAKEN 10a00a: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10a00d: 8d 65 f4 lea -0xc(%ebp),%esp 10a010: 5b pop %ebx 10a011: 5e pop %esi 10a012: 5f pop %edi 10a013: c9 leave 10a014: c3 ret 0010a018 : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 10a018: 55 push %ebp 10a019: 89 e5 mov %esp,%ebp 10a01b: 53 push %ebx 10a01c: 83 ec 18 sub $0x18,%esp 10a01f: 8b 5d 08 mov 0x8(%ebp),%ebx RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 10a022: 8d 45 f4 lea -0xc(%ebp),%eax 10a025: 50 push %eax 10a026: 53 push %ebx 10a027: 68 bc 37 12 00 push $0x1237bc 10a02c: e8 1f 13 00 00 call 10b350 <_Objects_Get> 10a031: 89 c2 mov %eax,%edx Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 10a033: 83 c4 10 add $0x10,%esp 10a036: b8 04 00 00 00 mov $0x4,%eax 10a03b: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a03f: 75 40 jne 10a081 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10a041: f6 42 10 30 testb $0x30,0x10(%edx) 10a045: 8d 42 14 lea 0x14(%edx),%eax 10a048: 74 1b je 10a065 mutex_status = _CORE_mutex_Surrender( 10a04a: 51 push %ecx 10a04b: 6a 00 push $0x0 10a04d: 53 push %ebx 10a04e: 50 push %eax 10a04f: e8 58 09 00 00 call 10a9ac <_CORE_mutex_Surrender> <== ALWAYS TAKEN 10a054: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10a056: e8 ba 1a 00 00 call 10bb15 <_Thread_Enable_dispatch> return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 10a05b: 89 1c 24 mov %ebx,(%esp) 10a05e: e8 25 00 00 00 call 10a088 <_Semaphore_Translate_core_mutex_return_code> <== ALWAYS TAKEN 10a063: eb 19 jmp 10a07e <== ALWAYS TAKEN } else { semaphore_status = _CORE_semaphore_Surrender( 10a065: 52 push %edx 10a066: 6a 00 push $0x0 10a068: 53 push %ebx 10a069: 50 push %eax 10a06a: e8 69 0a 00 00 call 10aad8 <_CORE_semaphore_Surrender> 10a06f: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10a071: e8 9f 1a 00 00 call 10bb15 <_Thread_Enable_dispatch> return _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); 10a076: 89 1c 24 mov %ebx,(%esp) 10a079: e8 19 00 00 00 call 10a097 <_Semaphore_Translate_core_semaphore_return_code> <== ALWAYS TAKEN &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return 10a07e: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a081: 8b 5d fc mov -0x4(%ebp),%ebx 10a084: c9 leave 10a085: c3 ret 0010ae7c : rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { 10ae7c: 55 push %ebp 10ae7d: 89 e5 mov %esp,%ebp 10ae7f: 83 ec 08 sub $0x8,%esp 10ae82: 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 ]; 10ae85: a1 9c 52 12 00 mov 0x12529c,%eax 10ae8a: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10ae90: 8b 0d e0 51 12 00 mov 0x1251e0,%ecx 10ae96: 41 inc %ecx 10ae97: 89 0d e0 51 12 00 mov %ecx,0x1251e0 asr = &api->Signal; _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { 10ae9d: 85 d2 test %edx,%edx 10ae9f: 74 0b je 10aeac asr->mode_set = mode_set; 10aea1: 8b 4d 0c mov 0xc(%ebp),%ecx 10aea4: 89 48 10 mov %ecx,0x10(%eax) asr->handler = asr_handler; 10aea7: 89 50 0c mov %edx,0xc(%eax) 10aeaa: eb 27 jmp 10aed3 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 10aeac: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 10aeb0: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 10aeb7: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 10aebe: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 10aec5: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 10aecc: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 10aed3: e8 35 1d 00 00 call 10cc0d <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10aed8: 31 c0 xor %eax,%eax 10aeda: c9 leave 10aedb: c3 ret 001155d8 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 1155d8: 55 push %ebp 1155d9: 89 e5 mov %esp,%ebp 1155db: 53 push %ebx 1155dc: 83 ec 14 sub $0x14,%esp 1155df: 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 ) 1155e2: b8 0a 00 00 00 mov $0xa,%eax 1155e7: 85 db test %ebx,%ebx 1155e9: 74 71 je 11565c return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 1155eb: 50 push %eax 1155ec: 50 push %eax 1155ed: 8d 45 f4 lea -0xc(%ebp),%eax 1155f0: 50 push %eax 1155f1: ff 75 08 pushl 0x8(%ebp) 1155f4: e8 13 35 00 00 call 118b0c <_Thread_Get> 1155f9: 89 c1 mov %eax,%ecx switch ( location ) { 1155fb: 83 c4 10 add $0x10,%esp 1155fe: b8 04 00 00 00 mov $0x4,%eax 115603: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 115607: 75 53 jne 11565c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 115609: 8b 91 f0 00 00 00 mov 0xf0(%ecx),%edx asr = &api->Signal; 11560f: 83 7a 0c 00 cmpl $0x0,0xc(%edx) 115613: 74 3d je 115652 if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 115615: 80 7a 08 00 cmpb $0x0,0x8(%edx) 115619: 74 26 je 115641 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 11561b: 9c pushf 11561c: fa cli 11561d: 58 pop %eax *signal_set |= signals; 11561e: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 115621: 50 push %eax 115622: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 115623: c6 41 74 01 movb $0x1,0x74(%ecx) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 115627: a1 80 cb 13 00 mov 0x13cb80,%eax 11562c: 85 c0 test %eax,%eax 11562e: 74 19 je 115649 115630: 3b 0d a4 cb 13 00 cmp 0x13cba4,%ecx 115636: 75 11 jne 115649 <== ALWAYS TAKEN _ISR_Signals_to_thread_executing = true; 115638: c6 05 38 cc 13 00 01 movb $0x1,0x13cc38 11563f: eb 08 jmp 115649 <== ALWAYS TAKEN rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 115641: 9c pushf 115642: fa cli 115643: 58 pop %eax *signal_set |= signals; 115644: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 115647: 50 push %eax 115648: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 115649: e8 6f 34 00 00 call 118abd <_Thread_Enable_dispatch> 11564e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 115650: eb 0a jmp 11565c <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 115652: e8 66 34 00 00 call 118abd <_Thread_Enable_dispatch> 115657: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11565c: 8b 5d fc mov -0x4(%ebp),%ebx 11565f: c9 leave 115660: c3 ret 0010a0a8 : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { 10a0a8: 55 push %ebp 10a0a9: 89 e5 mov %esp,%ebp 10a0ab: 57 push %edi 10a0ac: 56 push %esi 10a0ad: 53 push %ebx 10a0ae: 83 ec 1c sub $0x1c,%esp 10a0b1: 8b 55 08 mov 0x8(%ebp),%edx 10a0b4: 8b 7d 0c mov 0xc(%ebp),%edi 10a0b7: 8b 75 14 mov 0x14(%ebp),%esi Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10a0ba: b8 09 00 00 00 mov $0x9,%eax 10a0bf: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp) 10a0c3: 0f 84 07 01 00 00 je 10a1d0 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10a0c9: b0 03 mov $0x3,%al 10a0cb: 85 d2 test %edx,%edx 10a0cd: 0f 84 fd 00 00 00 je 10a1d0 /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 10a0d3: 66 83 7d 18 00 cmpw $0x0,0x18(%ebp) 10a0d8: 78 21 js 10a0fb */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10a0da: 31 c9 xor %ecx,%ecx 10a0dc: 85 ff test %edi,%edi 10a0de: 74 0e je 10a0ee 10a0e0: 0f b6 05 14 f9 11 00 movzbl 0x11f914,%eax 10a0e7: 31 c9 xor %ecx,%ecx 10a0e9: 39 c7 cmp %eax,%edi 10a0eb: 0f 96 c1 setbe %cl if ( !_RTEMS_tasks_Priority_is_valid( initial_priority ) ) 10a0ee: b8 13 00 00 00 mov $0x13,%eax 10a0f3: 85 c9 test %ecx,%ecx 10a0f5: 0f 84 d5 00 00 00 je 10a1d0 */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10a0fb: 83 ec 0c sub $0xc,%esp 10a0fe: ff 35 28 39 12 00 pushl 0x123928 10a104: 89 55 e4 mov %edx,-0x1c(%ebp) 10a107: e8 bc 05 00 00 call 10a6c8 <_API_Mutex_Lock> <== ALWAYS TAKEN * 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 ); 10a10c: c7 04 24 fc 37 12 00 movl $0x1237fc,(%esp) 10a113: e8 24 0e 00 00 call 10af3c <_Objects_Allocate> <== ALWAYS TAKEN 10a118: 89 c3 mov %eax,%ebx * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 10a11a: 83 c4 10 add $0x10,%esp 10a11d: 85 c0 test %eax,%eax 10a11f: 8b 55 e4 mov -0x1c(%ebp),%edx 10a122: 75 18 jne 10a13c _RTEMS_Unlock_allocator(); 10a124: 83 ec 0c sub $0xc,%esp 10a127: ff 35 28 39 12 00 pushl 0x123928 10a12d: e8 de 05 00 00 call 10a710 <_API_Mutex_Unlock> 10a132: b8 05 00 00 00 mov $0x5,%eax 10a137: e9 91 00 00 00 jmp 10a1cd <== ALWAYS TAKEN /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 10a13c: 50 push %eax 10a13d: 52 push %edx 10a13e: 89 f0 mov %esi,%eax 10a140: 83 e0 01 and $0x1,%eax 10a143: 50 push %eax 10a144: 6a 00 push $0x0 10a146: 89 f0 mov %esi,%eax 10a148: c1 e8 09 shr $0x9,%eax 10a14b: 83 e0 01 and $0x1,%eax 10a14e: 50 push %eax 10a14f: 89 f0 mov %esi,%eax 10a151: c1 e8 08 shr $0x8,%eax 10a154: 83 f0 01 xor $0x1,%eax 10a157: 83 e0 01 and $0x1,%eax 10a15a: 50 push %eax 10a15b: 57 push %edi 10a15c: 8b 45 18 mov 0x18(%ebp),%eax 10a15f: 83 e0 01 and $0x1,%eax 10a162: 50 push %eax 10a163: ff 75 10 pushl 0x10(%ebp) 10a166: 6a 00 push $0x0 10a168: 53 push %ebx 10a169: 68 fc 37 12 00 push $0x1237fc 10a16e: e8 39 1a 00 00 call 10bbac <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 10a173: 83 c4 30 add $0x30,%esp 10a176: 84 c0 test %al,%al 10a178: 75 27 jne 10a1a1 */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 10a17a: 83 ec 0c sub $0xc,%esp 10a17d: ff 73 08 pushl 0x8(%ebx) 10a180: e8 13 11 00 00 call 10b298 <_Objects_Get_information_id> 10a185: 5a pop %edx 10a186: 59 pop %ecx 10a187: 53 push %ebx 10a188: 50 push %eax 10a189: e8 9a 10 00 00 call 10b228 <_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(); 10a18e: 58 pop %eax 10a18f: ff 35 28 39 12 00 pushl 0x123928 10a195: e8 76 05 00 00 call 10a710 <_API_Mutex_Unlock> <== ALWAYS TAKEN 10a19a: b8 0d 00 00 00 mov $0xd,%eax 10a19f: eb 2c jmp 10a1cd <== ALWAYS TAKEN } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 10a1a1: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10a1a7: c1 ee 0a shr $0xa,%esi 10a1aa: 83 f6 01 xor $0x1,%esi 10a1ad: 83 e6 01 and $0x1,%esi 10a1b0: 89 f2 mov %esi,%edx 10a1b2: 88 50 08 mov %dl,0x8(%eax) *id = the_thread->Object.id; 10a1b5: 8b 43 08 mov 0x8(%ebx),%eax 10a1b8: 8b 55 1c mov 0x1c(%ebp),%edx 10a1bb: 89 02 mov %eax,(%edx) ); } #endif _RTEMS_Unlock_allocator(); 10a1bd: 83 ec 0c sub $0xc,%esp 10a1c0: ff 35 28 39 12 00 pushl 0x123928 10a1c6: e8 45 05 00 00 call 10a710 <_API_Mutex_Unlock> <== ALWAYS TAKEN 10a1cb: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10a1cd: 83 c4 10 add $0x10,%esp } 10a1d0: 8d 65 f4 lea -0xc(%ebp),%esp 10a1d3: 5b pop %ebx 10a1d4: 5e pop %esi 10a1d5: 5f pop %edi 10a1d6: c9 leave 10a1d7: c3 ret 0010a1d8 : */ rtems_status_code rtems_task_delete( rtems_id id ) { 10a1d8: 55 push %ebp 10a1d9: 89 e5 mov %esp,%ebp 10a1db: 53 push %ebx 10a1dc: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 10a1df: ff 35 28 39 12 00 pushl 0x123928 10a1e5: e8 de 04 00 00 call 10a6c8 <_API_Mutex_Lock> <== ALWAYS TAKEN the_thread = _Thread_Get( id, &location ); 10a1ea: 5b pop %ebx 10a1eb: 58 pop %eax 10a1ec: 8d 45 f4 lea -0xc(%ebp),%eax 10a1ef: 50 push %eax 10a1f0: ff 75 08 pushl 0x8(%ebp) 10a1f3: e8 40 19 00 00 call 10bb38 <_Thread_Get> 10a1f8: 89 c3 mov %eax,%ebx switch ( location ) { 10a1fa: 83 c4 10 add $0x10,%esp 10a1fd: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a201: 75 3b jne 10a23e case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 10a203: 83 ec 0c sub $0xc,%esp 10a206: ff 70 08 pushl 0x8(%eax) 10a209: e8 8a 10 00 00 call 10b298 <_Objects_Get_information_id> 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 10a20e: 5a pop %edx 10a20f: 59 pop %ecx 10a210: 53 push %ebx 10a211: 50 push %eax 10a212: e8 0d 16 00 00 call 10b824 <_Thread_Close> 10a217: 58 pop %eax 10a218: ff 73 08 pushl 0x8(%ebx) 10a21b: e8 78 10 00 00 call 10b298 <_Objects_Get_information_id> 10a220: 5a pop %edx 10a221: 59 pop %ecx 10a222: 53 push %ebx 10a223: 50 push %eax 10a224: e8 ff 0f 00 00 call 10b228 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10a229: 58 pop %eax 10a22a: ff 35 28 39 12 00 pushl 0x123928 10a230: e8 db 04 00 00 call 10a710 <_API_Mutex_Unlock> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 10a235: e8 db 18 00 00 call 10bb15 <_Thread_Enable_dispatch> 10a23a: 31 c0 xor %eax,%eax 10a23c: eb 13 jmp 10a251 <== ALWAYS TAKEN case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 10a23e: 83 ec 0c sub $0xc,%esp 10a241: ff 35 28 39 12 00 pushl 0x123928 10a247: e8 c4 04 00 00 call 10a710 <_API_Mutex_Unlock> 10a24c: b8 04 00 00 00 mov $0x4,%eax return RTEMS_INVALID_ID; 10a251: 83 c4 10 add $0x10,%esp } 10a254: 8b 5d fc mov -0x4(%ebp),%ebx 10a257: c9 leave 10a258: c3 ret 0010ba00 : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 10ba00: 55 push %ebp 10ba01: 89 e5 mov %esp,%ebp 10ba03: 56 push %esi 10ba04: 53 push %ebx 10ba05: 83 ec 10 sub $0x10,%esp 10ba08: 8b 55 08 mov 0x8(%ebp),%edx 10ba0b: 8b 75 0c mov 0xc(%ebp),%esi 10ba0e: 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() ) 10ba11: b8 16 00 00 00 mov $0x16,%eax 10ba16: 80 3d c4 21 12 00 00 cmpb $0x0,0x1221c4 10ba1d: 74 5d je 10ba7c return RTEMS_NOT_CONFIGURED; if ( !note ) 10ba1f: b0 09 mov $0x9,%al 10ba21: 85 db test %ebx,%ebx 10ba23: 74 57 je 10ba7c /* * 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 ) 10ba25: b0 0a mov $0xa,%al 10ba27: 83 fe 0f cmp $0xf,%esi 10ba2a: 77 50 ja 10ba7c /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10ba2c: 85 d2 test %edx,%edx 10ba2e: 74 0a je 10ba3a _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10ba30: a1 c4 64 12 00 mov 0x1264c4,%eax 10ba35: 3b 50 08 cmp 0x8(%eax),%edx 10ba38: 75 13 jne 10ba4d api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10ba3a: a1 c4 64 12 00 mov 0x1264c4,%eax 10ba3f: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10ba45: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10ba49: 89 03 mov %eax,(%ebx) 10ba4b: eb 2d jmp 10ba7a <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10ba4d: 50 push %eax 10ba4e: 50 push %eax 10ba4f: 8d 45 f4 lea -0xc(%ebp),%eax 10ba52: 50 push %eax 10ba53: 52 push %edx 10ba54: e8 9f 1b 00 00 call 10d5f8 <_Thread_Get> 10ba59: 89 c2 mov %eax,%edx switch ( location ) { 10ba5b: 83 c4 10 add $0x10,%esp 10ba5e: b8 04 00 00 00 mov $0x4,%eax 10ba63: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10ba67: 75 13 jne 10ba7c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10ba69: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax 10ba6f: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10ba73: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10ba75: e8 5b 1b 00 00 call 10d5d5 <_Thread_Enable_dispatch> 10ba7a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba7c: 8d 65 f8 lea -0x8(%ebp),%esp 10ba7f: 5b pop %ebx 10ba80: 5e pop %esi 10ba81: c9 leave 10ba82: c3 ret 0010a25c : rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, rtems_id *id ) { 10a25c: 55 push %ebp 10a25d: 89 e5 mov %esp,%ebp 10a25f: 83 ec 08 sub $0x8,%esp 10a262: 8b 4d 08 mov 0x8(%ebp),%ecx 10a265: 8b 55 10 mov 0x10(%ebp),%edx Objects_Name_or_id_lookup_errors status; if ( !id ) 10a268: b8 09 00 00 00 mov $0x9,%eax 10a26d: 85 d2 test %edx,%edx 10a26f: 74 2b je 10a29c return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { 10a271: 85 c9 test %ecx,%ecx 10a273: 75 0e jne 10a283 *id = _Thread_Executing->Object.id; 10a275: a1 30 39 12 00 mov 0x123930,%eax 10a27a: 8b 40 08 mov 0x8(%eax),%eax 10a27d: 89 02 mov %eax,(%edx) 10a27f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10a281: eb 19 jmp 10a29c <== ALWAYS TAKEN } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); 10a283: 52 push %edx 10a284: ff 75 0c pushl 0xc(%ebp) 10a287: 51 push %ecx 10a288: 68 fc 37 12 00 push $0x1237fc 10a28d: e8 0a 12 00 00 call 10b49c <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; 10a292: 8b 04 85 2c d5 11 00 mov 0x11d52c(,%eax,4),%eax 10a299: 83 c4 10 add $0x10,%esp } 10a29c: c9 leave 10a29d: c3 ret 00115954 : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { 115954: 55 push %ebp 115955: 89 e5 mov %esp,%ebp 115957: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 11595a: 8d 45 f4 lea -0xc(%ebp),%eax 11595d: 50 push %eax 11595e: ff 75 08 pushl 0x8(%ebp) 115961: e8 a6 31 00 00 call 118b0c <_Thread_Get> 115966: 89 c2 mov %eax,%edx switch ( location ) { 115968: 83 c4 10 add $0x10,%esp 11596b: b8 04 00 00 00 mov $0x4,%eax 115970: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 115974: 75 19 jne 11598f case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 115976: f6 42 10 02 testb $0x2,0x10(%edx) 11597a: 75 09 jne 115985 _Thread_Enable_dispatch(); 11597c: e8 3c 31 00 00 call 118abd <_Thread_Enable_dispatch> 115981: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 115983: eb 0a jmp 11598f <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 115985: e8 33 31 00 00 call 118abd <_Thread_Enable_dispatch> 11598a: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11598f: c9 leave 115990: c3 ret 0010fa04 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 10fa04: 55 push %ebp 10fa05: 89 e5 mov %esp,%ebp 10fa07: 57 push %edi 10fa08: 56 push %esi 10fa09: 53 push %ebx 10fa0a: 83 ec 1c sub $0x1c,%esp 10fa0d: 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 ) 10fa10: b8 09 00 00 00 mov $0x9,%eax 10fa15: 85 c9 test %ecx,%ecx 10fa17: 0f 84 f4 00 00 00 je 10fb11 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 10fa1d: 8b 1d 30 39 12 00 mov 0x123930,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10fa23: 8b b3 f0 00 00 00 mov 0xf0(%ebx),%esi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 10fa29: 80 7b 75 01 cmpb $0x1,0x75(%ebx) 10fa2d: 19 ff sbb %edi,%edi 10fa2f: 81 e7 00 01 00 00 and $0x100,%edi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 10fa35: 83 7b 7c 00 cmpl $0x0,0x7c(%ebx) 10fa39: 74 06 je 10fa41 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 10fa3b: 81 cf 00 02 00 00 or $0x200,%edi if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 10fa41: 80 7e 08 01 cmpb $0x1,0x8(%esi) 10fa45: 19 d2 sbb %edx,%edx 10fa47: 81 e2 00 04 00 00 and $0x400,%edx old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); 10fa4d: 89 55 e4 mov %edx,-0x1c(%ebp) 10fa50: 89 4d e0 mov %ecx,-0x20(%ebp) 10fa53: e8 a3 d2 ff ff call 10ccfb <_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; 10fa58: 8b 55 e4 mov -0x1c(%ebp),%edx 10fa5b: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 10fa5d: 09 f8 or %edi,%eax 10fa5f: 8b 4d e0 mov -0x20(%ebp),%ecx 10fa62: 89 01 mov %eax,(%ecx) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 10fa64: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 10fa6b: 74 0f je 10fa7c executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 10fa6d: 8b 45 08 mov 0x8(%ebp),%eax 10fa70: c1 e8 08 shr $0x8,%eax 10fa73: 83 f0 01 xor $0x1,%eax 10fa76: 83 e0 01 and $0x1,%eax 10fa79: 88 43 75 mov %al,0x75(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 10fa7c: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 10fa83: 74 21 je 10faa6 if ( _Modes_Is_timeslice(mode_set) ) { 10fa85: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 10fa8c: 74 11 je 10fa9f executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 10fa8e: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10fa95: a1 40 38 12 00 mov 0x123840,%eax 10fa9a: 89 43 78 mov %eax,0x78(%ebx) 10fa9d: eb 07 jmp 10faa6 <== ALWAYS TAKEN } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 10fa9f: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 10faa6: f6 45 0c 01 testb $0x1,0xc(%ebp) 10faaa: 74 0a je 10fab6 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 10faac: f6 45 08 01 testb $0x1,0x8(%ebp) 10fab0: 74 03 je 10fab5 10fab2: fa cli 10fab3: eb 01 jmp 10fab6 <== ALWAYS TAKEN 10fab5: fb sti */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 10fab6: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 10fabd: 74 33 je 10faf2 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 10fabf: 8b 45 08 mov 0x8(%ebp),%eax 10fac2: c1 e8 0a shr $0xa,%eax 10fac5: 83 f0 01 xor $0x1,%eax 10fac8: 83 e0 01 and $0x1,%eax if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 10facb: 3a 46 08 cmp 0x8(%esi),%al 10face: 74 22 je 10faf2 needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; 10fad0: 88 46 08 mov %al,0x8(%esi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 10fad3: 9c pushf 10fad4: fa cli 10fad5: 58 pop %eax _signals = information->signals_pending; 10fad6: 8b 56 18 mov 0x18(%esi),%edx information->signals_pending = information->signals_posted; 10fad9: 8b 4e 14 mov 0x14(%esi),%ecx 10fadc: 89 4e 18 mov %ecx,0x18(%esi) information->signals_posted = _signals; 10fadf: 89 56 14 mov %edx,0x14(%esi) _ISR_Enable( _level ); 10fae2: 50 push %eax 10fae3: 9d popf if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 10fae4: 83 7e 14 00 cmpl $0x0,0x14(%esi) 10fae8: 74 08 je 10faf2 if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; 10faea: c6 43 74 01 movb $0x1,0x74(%ebx) 10faee: b3 01 mov $0x1,%bl 10faf0: eb 02 jmp 10faf4 <== ALWAYS TAKEN 10faf2: 31 db xor %ebx,%ebx } } } if ( _System_state_Is_up( _System_state_Get() ) ) 10faf4: 83 3d 0c 3a 12 00 03 cmpl $0x3,0x123a0c 10fafb: 75 12 jne 10fb0f <== ALWAYS TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 10fafd: e8 f2 01 00 00 call 10fcf4 <_Thread_Evaluate_mode> <== ALWAYS TAKEN 10fb02: 84 c0 test %al,%al 10fb04: 75 04 jne 10fb0a 10fb06: 84 db test %bl,%bl 10fb08: 74 05 je 10fb0f _Thread_Dispatch(); 10fb0a: e8 c1 be ff ff call 10b9d0 <_Thread_Dispatch> 10fb0f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10fb11: 83 c4 1c add $0x1c,%esp 10fb14: 5b pop %ebx 10fb15: 5e pop %esi 10fb16: 5f pop %edi 10fb17: c9 leave 10fb18: c3 ret 0010ac24 : rtems_status_code rtems_task_restart( rtems_id id, uint32_t argument ) { 10ac24: 55 push %ebp 10ac25: 89 e5 mov %esp,%ebp 10ac27: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10ac2a: 8d 45 f4 lea -0xc(%ebp),%eax 10ac2d: 50 push %eax 10ac2e: ff 75 08 pushl 0x8(%ebp) 10ac31: e8 02 19 00 00 call 10c538 <_Thread_Get> 10ac36: 89 c2 mov %eax,%edx switch ( location ) { 10ac38: 83 c4 10 add $0x10,%esp 10ac3b: b8 04 00 00 00 mov $0x4,%eax 10ac40: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10ac44: 75 26 jne 10ac6c case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { 10ac46: 50 push %eax 10ac47: ff 75 0c pushl 0xc(%ebp) 10ac4a: 6a 00 push $0x0 10ac4c: 52 push %edx 10ac4d: e8 1e 20 00 00 call 10cc70 <_Thread_Restart> 10ac52: 83 c4 10 add $0x10,%esp 10ac55: 84 c0 test %al,%al 10ac57: 74 09 je 10ac62 _Thread_Enable_dispatch(); 10ac59: e8 b7 18 00 00 call 10c515 <_Thread_Enable_dispatch> 10ac5e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10ac60: eb 0a jmp 10ac6c <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 10ac62: e8 ae 18 00 00 call 10c515 <_Thread_Enable_dispatch> 10ac67: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ac6c: c9 leave 10ac6d: c3 ret 0010d3ac : */ rtems_status_code rtems_task_resume( rtems_id id ) { 10d3ac: 55 push %ebp 10d3ad: 89 e5 mov %esp,%ebp 10d3af: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10d3b2: 8d 45 f4 lea -0xc(%ebp),%eax 10d3b5: 50 push %eax 10d3b6: ff 75 08 pushl 0x8(%ebp) 10d3b9: e8 fa 19 00 00 call 10edb8 <_Thread_Get> 10d3be: 89 c2 mov %eax,%edx switch ( location ) { 10d3c0: 83 c4 10 add $0x10,%esp 10d3c3: b8 04 00 00 00 mov $0x4,%eax 10d3c8: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10d3cc: 75 26 jne 10d3f4 case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 10d3ce: f6 42 10 02 testb $0x2,0x10(%edx) 10d3d2: 74 16 je 10d3ea _Thread_Resume( the_thread, true ); 10d3d4: 50 push %eax 10d3d5: 50 push %eax 10d3d6: 6a 01 push $0x1 10d3d8: 52 push %edx 10d3d9: e8 12 21 00 00 call 10f4f0 <_Thread_Resume> _Thread_Enable_dispatch(); 10d3de: e8 86 19 00 00 call 10ed69 <_Thread_Enable_dispatch> 10d3e3: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10d3e5: 83 c4 10 add $0x10,%esp 10d3e8: eb 0a jmp 10d3f4 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 10d3ea: e8 7a 19 00 00 call 10ed69 <_Thread_Enable_dispatch> 10d3ef: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d3f4: c9 leave 10d3f5: c3 ret 0010bb54 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 10bb54: 55 push %ebp 10bb55: 89 e5 mov %esp,%ebp 10bb57: 56 push %esi 10bb58: 53 push %ebx 10bb59: 83 ec 10 sub $0x10,%esp 10bb5c: 8b 55 08 mov 0x8(%ebp),%edx 10bb5f: 8b 5d 0c mov 0xc(%ebp),%ebx 10bb62: 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() ) 10bb65: b8 16 00 00 00 mov $0x16,%eax 10bb6a: 80 3d c4 21 12 00 00 cmpb $0x0,0x1221c4 10bb71: 74 53 je 10bbc6 /* * 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 ) 10bb73: b0 0a mov $0xa,%al 10bb75: 83 fb 0f cmp $0xf,%ebx 10bb78: 77 4c ja 10bbc6 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10bb7a: 85 d2 test %edx,%edx 10bb7c: 74 0a je 10bb88 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10bb7e: a1 c4 64 12 00 mov 0x1264c4,%eax 10bb83: 3b 50 08 cmp 0x8(%eax),%edx 10bb86: 75 11 jne 10bb99 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10bb88: a1 c4 64 12 00 mov 0x1264c4,%eax 10bb8d: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10bb93: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) 10bb97: eb 2b jmp 10bbc4 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10bb99: 50 push %eax 10bb9a: 50 push %eax 10bb9b: 8d 45 f4 lea -0xc(%ebp),%eax 10bb9e: 50 push %eax 10bb9f: 52 push %edx 10bba0: e8 53 1a 00 00 call 10d5f8 <_Thread_Get> 10bba5: 89 c2 mov %eax,%edx switch ( location ) { 10bba7: 83 c4 10 add $0x10,%esp 10bbaa: b8 04 00 00 00 mov $0x4,%eax 10bbaf: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10bbb3: 75 11 jne 10bbc6 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10bbb5: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax 10bbbb: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) _Thread_Enable_dispatch(); 10bbbf: e8 11 1a 00 00 call 10d5d5 <_Thread_Enable_dispatch> 10bbc4: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bbc6: 8d 65 f8 lea -0x8(%ebp),%esp 10bbc9: 5b pop %ebx 10bbca: 5e pop %esi 10bbcb: c9 leave 10bbcc: c3 ret 0010dfe8 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10dfe8: 55 push %ebp 10dfe9: 89 e5 mov %esp,%ebp 10dfeb: 56 push %esi 10dfec: 53 push %ebx 10dfed: 83 ec 10 sub $0x10,%esp 10dff0: 8b 5d 0c mov 0xc(%ebp),%ebx 10dff3: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10dff6: 85 db test %ebx,%ebx 10dff8: 74 10 je 10e00a 10dffa: 0f b6 05 94 47 12 00 movzbl 0x124794,%eax 10e001: ba 13 00 00 00 mov $0x13,%edx 10e006: 39 c3 cmp %eax,%ebx 10e008: 77 50 ja 10e05a !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10e00a: ba 09 00 00 00 mov $0x9,%edx 10e00f: 85 f6 test %esi,%esi 10e011: 74 47 je 10e05a return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10e013: 51 push %ecx 10e014: 51 push %ecx 10e015: 8d 45 f4 lea -0xc(%ebp),%eax 10e018: 50 push %eax 10e019: ff 75 08 pushl 0x8(%ebp) 10e01c: e8 17 1b 00 00 call 10fb38 <_Thread_Get> switch ( location ) { 10e021: 83 c4 10 add $0x10,%esp 10e024: ba 04 00 00 00 mov $0x4,%edx 10e029: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10e02d: 75 2b jne 10e05a case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10e02f: 8b 50 14 mov 0x14(%eax),%edx 10e032: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10e034: 85 db test %ebx,%ebx 10e036: 74 1b je 10e053 the_thread->real_priority = new_priority; 10e038: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10e03b: 83 78 1c 00 cmpl $0x0,0x1c(%eax) 10e03f: 74 05 je 10e046 the_thread->current_priority > new_priority ) 10e041: 39 58 14 cmp %ebx,0x14(%eax) 10e044: 76 0d jbe 10e053 <== NEVER TAKEN _Thread_Change_priority( the_thread, new_priority, false ); 10e046: 52 push %edx 10e047: 6a 00 push $0x0 10e049: 53 push %ebx 10e04a: 50 push %eax 10e04b: e8 fc 15 00 00 call 10f64c <_Thread_Change_priority> 10e050: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10e053: e8 91 1a 00 00 call 10fae9 <_Thread_Enable_dispatch> 10e058: 31 d2 xor %edx,%edx case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10e05a: 89 d0 mov %edx,%eax 10e05c: 8d 65 f8 lea -0x8(%ebp),%esp 10e05f: 5b pop %ebx 10e060: 5e pop %esi 10e061: c9 leave 10e062: c3 ret 0010a314 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 10a314: 55 push %ebp 10a315: 89 e5 mov %esp,%ebp 10a317: 53 push %ebx 10a318: 83 ec 14 sub $0x14,%esp 10a31b: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10a31e: b8 09 00 00 00 mov $0x9,%eax 10a323: 85 db test %ebx,%ebx 10a325: 74 49 je 10a370 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10a327: 50 push %eax 10a328: 50 push %eax 10a329: 8d 45 f4 lea -0xc(%ebp),%eax 10a32c: 50 push %eax 10a32d: ff 75 08 pushl 0x8(%ebp) 10a330: e8 03 18 00 00 call 10bb38 <_Thread_Get> 10a335: 89 c2 mov %eax,%edx switch ( location ) { 10a337: 83 c4 10 add $0x10,%esp 10a33a: b8 04 00 00 00 mov $0x4,%eax 10a33f: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a343: 75 2b jne 10a370 case OBJECTS_LOCAL: if ( _Thread_Start( 10a345: 83 ec 0c sub $0xc,%esp 10a348: ff 75 10 pushl 0x10(%ebp) 10a34b: 6a 00 push $0x0 10a34d: 53 push %ebx 10a34e: 6a 00 push $0x0 10a350: 52 push %edx 10a351: e8 96 21 00 00 call 10c4ec <_Thread_Start> 10a356: 83 c4 20 add $0x20,%esp 10a359: 84 c0 test %al,%al 10a35b: 74 09 je 10a366 the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); 10a35d: e8 b3 17 00 00 call 10bb15 <_Thread_Enable_dispatch> 10a362: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10a364: eb 0a jmp 10a370 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 10a366: e8 aa 17 00 00 call 10bb15 <_Thread_Enable_dispatch> 10a36b: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a370: 8b 5d fc mov -0x4(%ebp),%ebx 10a373: c9 leave 10a374: c3 ret 0010e1bc : */ rtems_status_code rtems_task_suspend( rtems_id id ) { 10e1bc: 55 push %ebp 10e1bd: 89 e5 mov %esp,%ebp 10e1bf: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10e1c2: 8d 45 f4 lea -0xc(%ebp),%eax 10e1c5: 50 push %eax 10e1c6: ff 75 08 pushl 0x8(%ebp) 10e1c9: e8 6a d9 ff ff call 10bb38 <_Thread_Get> 10e1ce: 89 c2 mov %eax,%edx switch ( location ) { 10e1d0: 83 c4 10 add $0x10,%esp 10e1d3: b8 04 00 00 00 mov $0x4,%eax 10e1d8: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10e1dc: 75 25 jne 10e203 case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 10e1de: f6 42 10 02 testb $0x2,0x10(%edx) 10e1e2: 75 15 jne 10e1f9 _Thread_Suspend( the_thread ); 10e1e4: 83 ec 0c sub $0xc,%esp 10e1e7: 52 push %edx 10e1e8: e8 3f 09 00 00 call 10eb2c <_Thread_Suspend> _Thread_Enable_dispatch(); 10e1ed: e8 23 d9 ff ff call 10bb15 <_Thread_Enable_dispatch> 10e1f2: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10e1f4: 83 c4 10 add $0x10,%esp 10e1f7: eb 0a jmp 10e203 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 10e1f9: e8 17 d9 ff ff call 10bb15 <_Thread_Enable_dispatch> 10e1fe: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10e203: c9 leave 10e204: c3 ret 001275b8 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 1275b8: 55 push %ebp 1275b9: 89 e5 mov %esp,%ebp 1275bb: 57 push %edi 1275bc: 56 push %esi 1275bd: 53 push %ebx 1275be: 83 ec 1c sub $0x1c,%esp 1275c1: 8b 5d 0c mov 0xc(%ebp),%ebx 1275c4: 8b 7d 10 mov 0x10(%ebp),%edi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 1275c7: b8 09 00 00 00 mov $0x9,%eax 1275cc: 85 db test %ebx,%ebx 1275ce: 74 73 je 127643 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 1275d0: 50 push %eax 1275d1: 50 push %eax 1275d2: 8d 45 e4 lea -0x1c(%ebp),%eax 1275d5: 50 push %eax 1275d6: ff 75 08 pushl 0x8(%ebp) 1275d9: e8 fe 9e fe ff call 1114dc <_Thread_Get> 1275de: 89 c6 mov %eax,%esi switch (location) { 1275e0: 83 c4 10 add $0x10,%esp 1275e3: b8 04 00 00 00 mov $0x4,%eax 1275e8: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 1275ec: 75 55 jne 127643 case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 1275ee: 8b 86 00 01 00 00 mov 0x100(%esi),%eax while (tvp) { 1275f4: eb 0c jmp 127602 <== ALWAYS TAKEN if (tvp->ptr == ptr) { 1275f6: 39 58 04 cmp %ebx,0x4(%eax) 1275f9: 75 05 jne 127600 tvp->dtor = dtor; 1275fb: 89 78 10 mov %edi,0x10(%eax) 1275fe: eb 3c jmp 12763c <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 127600: 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) { 127602: 85 c0 test %eax,%eax 127604: 75 f0 jne 1275f6 } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 127606: 83 ec 0c sub $0xc,%esp 127609: 6a 14 push $0x14 12760b: e8 20 ae fe ff call 112430 <_Workspace_Allocate> _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 127610: 83 c4 10 add $0x10,%esp 127613: 85 c0 test %eax,%eax 127615: 75 0c jne 127623 _Thread_Enable_dispatch(); 127617: e8 9d 9e fe ff call 1114b9 <_Thread_Enable_dispatch> 12761c: b8 1a 00 00 00 mov $0x1a,%eax return RTEMS_NO_MEMORY; 127621: eb 20 jmp 127643 <== ALWAYS TAKEN } new->gval = *ptr; 127623: 8b 13 mov (%ebx),%edx 127625: 89 50 08 mov %edx,0x8(%eax) new->ptr = ptr; 127628: 89 58 04 mov %ebx,0x4(%eax) new->dtor = dtor; 12762b: 89 78 10 mov %edi,0x10(%eax) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 12762e: 8b 96 00 01 00 00 mov 0x100(%esi),%edx 127634: 89 10 mov %edx,(%eax) the_thread->task_variables = new; 127636: 89 86 00 01 00 00 mov %eax,0x100(%esi) _Thread_Enable_dispatch(); 12763c: e8 78 9e fe ff call 1114b9 <_Thread_Enable_dispatch> 127641: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 127643: 8d 65 f4 lea -0xc(%ebp),%esp 127646: 5b pop %ebx 127647: 5e pop %esi 127648: 5f pop %edi 127649: c9 leave 12764a: c3 ret 0012764c : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 12764c: 55 push %ebp 12764d: 89 e5 mov %esp,%ebp 12764f: 53 push %ebx 127650: 83 ec 14 sub $0x14,%esp 127653: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 127656: b8 09 00 00 00 mov $0x9,%eax 12765b: 85 db test %ebx,%ebx 12765d: 74 64 je 1276c3 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 12765f: 52 push %edx 127660: 52 push %edx 127661: 8d 45 f4 lea -0xc(%ebp),%eax 127664: 50 push %eax 127665: ff 75 08 pushl 0x8(%ebp) 127668: e8 6f 9e fe ff call 1114dc <_Thread_Get> 12766d: 89 c1 mov %eax,%ecx switch (location) { 12766f: 83 c4 10 add $0x10,%esp 127672: b8 04 00 00 00 mov $0x4,%eax 127677: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 12767b: 75 46 jne 1276c3 case OBJECTS_LOCAL: tvp = the_thread->task_variables; 12767d: 8b 91 00 01 00 00 mov 0x100(%ecx),%edx 127683: 30 c0 xor %al,%al while (tvp) { 127685: eb 2e jmp 1276b5 <== ALWAYS TAKEN if (tvp->ptr == ptr) { 127687: 39 5a 04 cmp %ebx,0x4(%edx) 12768a: 75 25 jne 1276b1 if (prev) 12768c: 85 c0 test %eax,%eax 12768e: 8b 1a mov (%edx),%ebx 127690: 74 04 je 127696 prev->next = tvp->next; 127692: 89 18 mov %ebx,(%eax) 127694: eb 06 jmp 12769c <== ALWAYS TAKEN else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 127696: 89 99 00 01 00 00 mov %ebx,0x100(%ecx) _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 12769c: 50 push %eax 12769d: 50 push %eax 12769e: 52 push %edx 12769f: 51 push %ecx 1276a0: e8 8b 00 00 00 call 127730 <_RTEMS_Tasks_Invoke_task_variable_dtor> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 1276a5: e8 0f 9e fe ff call 1114b9 <_Thread_Enable_dispatch> 1276aa: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1276ac: 83 c4 10 add $0x10,%esp 1276af: eb 12 jmp 1276c3 <== ALWAYS TAKEN } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 1276b1: 89 d0 mov %edx,%eax 1276b3: 8b 12 mov (%edx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 1276b5: 85 d2 test %edx,%edx 1276b7: 75 ce jne 127687 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 1276b9: e8 fb 9d fe ff call 1114b9 <_Thread_Enable_dispatch> 1276be: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1276c3: 8b 5d fc mov -0x4(%ebp),%ebx 1276c6: c9 leave 1276c7: c3 ret 001276c8 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 1276c8: 55 push %ebp 1276c9: 89 e5 mov %esp,%ebp 1276cb: 56 push %esi 1276cc: 53 push %ebx 1276cd: 83 ec 10 sub $0x10,%esp 1276d0: 8b 75 0c mov 0xc(%ebp),%esi 1276d3: 8b 5d 10 mov 0x10(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 1276d6: 85 f6 test %esi,%esi 1276d8: 74 48 je 127722 return RTEMS_INVALID_ADDRESS; if ( !result ) 1276da: 85 db test %ebx,%ebx 1276dc: 74 44 je 127722 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 1276de: 50 push %eax 1276df: 50 push %eax 1276e0: 8d 45 f4 lea -0xc(%ebp),%eax 1276e3: 50 push %eax 1276e4: ff 75 08 pushl 0x8(%ebp) 1276e7: e8 f0 9d fe ff call 1114dc <_Thread_Get> 1276ec: 89 c2 mov %eax,%edx switch (location) { 1276ee: 83 c4 10 add $0x10,%esp 1276f1: b8 04 00 00 00 mov $0x4,%eax 1276f6: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 1276fa: 75 2b jne 127727 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 1276fc: 8b 82 00 01 00 00 mov 0x100(%edx),%eax while (tvp) { 127702: eb 15 jmp 127719 <== ALWAYS TAKEN if (tvp->ptr == ptr) { 127704: 39 70 04 cmp %esi,0x4(%eax) 127707: 75 0e jne 127717 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 127709: 8b 40 0c mov 0xc(%eax),%eax 12770c: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 12770e: e8 a6 9d fe ff call 1114b9 <_Thread_Enable_dispatch> 127713: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 127715: eb 10 jmp 127727 <== ALWAYS TAKEN } tvp = (rtems_task_variable_t *)tvp->next; 127717: 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) { 127719: 85 c0 test %eax,%eax 12771b: 75 e7 jne 127704 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 12771d: e8 97 9d fe ff call 1114b9 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 127722: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 127727: 8d 65 f8 lea -0x8(%ebp),%esp 12772a: 5b pop %ebx 12772b: 5e pop %esi 12772c: c9 leave 12772d: c3 ret 0010a378 : */ rtems_status_code rtems_task_wake_after( rtems_interval ticks ) { 10a378: 55 push %ebp 10a379: 89 e5 mov %esp,%ebp 10a37b: 53 push %ebx 10a37c: 83 ec 04 sub $0x4,%esp 10a37f: 8b 5d 08 mov 0x8(%ebp),%ebx 10a382: a1 74 38 12 00 mov 0x123874,%eax 10a387: 40 inc %eax 10a388: a3 74 38 12 00 mov %eax,0x123874 _Thread_Disable_dispatch(); if ( ticks == 0 ) { 10a38d: 85 db test %ebx,%ebx 10a38f: 75 07 jne 10a398 _Thread_Yield_processor(); 10a391: e8 ee 21 00 00 call 10c584 <_Thread_Yield_processor> 10a396: eb 45 jmp 10a3dd <== ALWAYS TAKEN } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); 10a398: 50 push %eax 10a399: 50 push %eax 10a39a: 6a 08 push $0x8 10a39c: ff 35 30 39 12 00 pushl 0x123930 10a3a2: e8 31 1f 00 00 call 10c2d8 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10a3a7: a1 30 39 12 00 mov 0x123930,%eax _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); _Watchdog_Initialize( 10a3ac: 8b 50 08 mov 0x8(%eax),%edx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10a3af: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_watchdog->routine = routine; 10a3b6: c7 40 64 98 b9 10 00 movl $0x10b998,0x64(%eax) the_watchdog->id = id; 10a3bd: 89 50 68 mov %edx,0x68(%eax) the_watchdog->user_data = user_data; 10a3c0: c7 40 6c 00 00 00 00 movl $0x0,0x6c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10a3c7: 89 58 54 mov %ebx,0x54(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10a3ca: 5a pop %edx 10a3cb: 59 pop %ecx 10a3cc: 83 c0 48 add $0x48,%eax 10a3cf: 50 push %eax 10a3d0: 68 50 39 12 00 push $0x123950 10a3d5: e8 9e 24 00 00 call 10c878 <_Watchdog_Insert> 10a3da: 83 c4 10 add $0x10,%esp _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 10a3dd: e8 33 17 00 00 call 10bb15 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10a3e2: 31 c0 xor %eax,%eax 10a3e4: 8b 5d fc mov -0x4(%ebp),%ebx 10a3e7: c9 leave 10a3e8: c3 ret 0010b04c : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 10b04c: 55 push %ebp 10b04d: 89 e5 mov %esp,%ebp 10b04f: 53 push %ebx 10b050: 83 ec 04 sub $0x4,%esp 10b053: 8b 5d 08 mov 0x8(%ebp),%ebx Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10b056: b8 0b 00 00 00 mov $0xb,%eax 10b05b: 80 3d 14 52 12 00 00 cmpb $0x0,0x125214 10b062: 0f 84 9c 00 00 00 je 10b104 return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10b068: b0 09 mov $0x9,%al 10b06a: 85 db test %ebx,%ebx 10b06c: 0f 84 92 00 00 00 je 10b104 return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 10b072: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) if ( !_TOD_Validate( time_buffer ) ) 10b079: 83 ec 0c sub $0xc,%esp 10b07c: 53 push %ebx 10b07d: e8 12 f5 ff ff call 10a594 <_TOD_Validate> <== ALWAYS TAKEN 10b082: 83 c4 10 add $0x10,%esp 10b085: 84 c0 test %al,%al 10b087: 74 76 je 10b0ff return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 10b089: 83 ec 0c sub $0xc,%esp 10b08c: 53 push %ebx 10b08d: e8 9a f4 ff ff call 10a52c <_TOD_To_seconds> <== ALWAYS TAKEN 10b092: 89 c3 mov %eax,%ebx if ( seconds <= _TOD_Seconds_since_epoch() ) 10b094: 83 c4 10 add $0x10,%esp 10b097: 3b 05 90 52 12 00 cmp 0x125290,%eax 10b09d: 76 60 jbe 10b0ff 10b09f: a1 00 52 12 00 mov 0x125200,%eax 10b0a4: 40 inc %eax 10b0a5: a3 00 52 12 00 mov %eax,0x125200 return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 10b0aa: 50 push %eax 10b0ab: 50 push %eax 10b0ac: 6a 10 push $0x10 10b0ae: ff 35 bc 52 12 00 pushl 0x1252bc 10b0b4: e8 1f 20 00 00 call 10d0d8 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10b0b9: 8b 15 bc 52 12 00 mov 0x1252bc,%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( 10b0bf: 8b 42 08 mov 0x8(%edx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b0c2: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 10b0c9: c7 42 64 98 c7 10 00 movl $0x10c798,0x64(%edx) the_watchdog->id = id; 10b0d0: 89 42 68 mov %eax,0x68(%edx) the_watchdog->user_data = user_data; 10b0d3: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b0da: 2b 1d 90 52 12 00 sub 0x125290,%ebx 10b0e0: 89 5a 54 mov %ebx,0x54(%edx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 10b0e3: 58 pop %eax 10b0e4: 59 pop %ecx 10b0e5: 83 c2 48 add $0x48,%edx 10b0e8: 52 push %edx 10b0e9: 68 d0 52 12 00 push $0x1252d0 10b0ee: e8 f1 25 00 00 call 10d6e4 <_Watchdog_Insert> ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 10b0f3: e8 1d 18 00 00 call 10c915 <_Thread_Enable_dispatch> 10b0f8: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b0fa: 83 c4 10 add $0x10,%esp 10b0fd: eb 05 jmp 10b104 <== ALWAYS TAKEN 10b0ff: b8 14 00 00 00 mov $0x14,%eax } 10b104: 8b 5d fc mov -0x4(%ebp),%ebx 10b107: c9 leave 10b108: c3 ret 00115e20 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 115e20: 55 push %ebp 115e21: 89 e5 mov %esp,%ebp 115e23: 83 ec 1c sub $0x1c,%esp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 115e26: 8d 45 f4 lea -0xc(%ebp),%eax 115e29: 50 push %eax 115e2a: ff 75 08 pushl 0x8(%ebp) 115e2d: 68 88 cd 13 00 push $0x13cd88 115e32: e8 55 24 00 00 call 11828c <_Objects_Get> 115e37: 89 c2 mov %eax,%edx Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 115e39: 83 c4 10 add $0x10,%esp 115e3c: b8 04 00 00 00 mov $0x4,%eax 115e41: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 115e45: 75 1c jne 115e63 case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 115e47: 83 7a 38 04 cmpl $0x4,0x38(%edx) 115e4b: 74 0f je 115e5c <== ALWAYS TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 115e4d: 83 ec 0c sub $0xc,%esp 115e50: 83 c2 10 add $0x10,%edx 115e53: 52 push %edx 115e54: e8 5b 3e 00 00 call 119cb4 <_Watchdog_Remove> 115e59: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 115e5c: e8 5c 2c 00 00 call 118abd <_Thread_Enable_dispatch> 115e61: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115e63: c9 leave 115e64: c3 ret 00115e68 : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 115e68: 55 push %ebp 115e69: 89 e5 mov %esp,%ebp 115e6b: 57 push %edi 115e6c: 56 push %esi 115e6d: 53 push %ebx 115e6e: 83 ec 0c sub $0xc,%esp 115e71: 8b 75 08 mov 0x8(%ebp),%esi 115e74: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 115e77: b8 03 00 00 00 mov $0x3,%eax 115e7c: 85 f6 test %esi,%esi 115e7e: 74 6f je 115eef return RTEMS_INVALID_NAME; if ( !id ) 115e80: b0 09 mov $0x9,%al 115e82: 85 db test %ebx,%ebx 115e84: 74 69 je 115eef 115e86: a1 e8 ca 13 00 mov 0x13cae8,%eax 115e8b: 40 inc %eax 115e8c: a3 e8 ca 13 00 mov %eax,0x13cae8 * 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 ); 115e91: 83 ec 0c sub $0xc,%esp 115e94: 68 88 cd 13 00 push $0x13cd88 115e99: e8 9e 1f 00 00 call 117e3c <_Objects_Allocate> <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 115e9e: 83 c4 10 add $0x10,%esp 115ea1: 85 c0 test %eax,%eax 115ea3: 75 0c jne 115eb1 _Thread_Enable_dispatch(); 115ea5: e8 13 2c 00 00 call 118abd <_Thread_Enable_dispatch> 115eaa: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 115eaf: eb 3e jmp 115eef <== ALWAYS TAKEN } the_timer->the_class = TIMER_DORMANT; 115eb1: 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; 115eb8: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 115ebf: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 115ec6: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 115ecd: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 115ed4: 8b 50 08 mov 0x8(%eax),%edx 115ed7: 0f b7 fa movzwl %dx,%edi 115eda: 8b 0d a4 cd 13 00 mov 0x13cda4,%ecx 115ee0: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 115ee3: 89 70 0c mov %esi,0xc(%eax) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 115ee6: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 115ee8: e8 d0 2b 00 00 call 118abd <_Thread_Enable_dispatch> 115eed: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 115eef: 8d 65 f4 lea -0xc(%ebp),%esp 115ef2: 5b pop %ebx 115ef3: 5e pop %esi 115ef4: 5f pop %edi 115ef5: c9 leave 115ef6: c3 ret 00115ef8 : */ rtems_status_code rtems_timer_delete( rtems_id id ) { 115ef8: 55 push %ebp 115ef9: 89 e5 mov %esp,%ebp 115efb: 53 push %ebx 115efc: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 115eff: 8d 45 f4 lea -0xc(%ebp),%eax 115f02: 50 push %eax 115f03: ff 75 08 pushl 0x8(%ebp) 115f06: 68 88 cd 13 00 push $0x13cd88 115f0b: e8 7c 23 00 00 call 11828c <_Objects_Get> 115f10: 89 c3 mov %eax,%ebx Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 115f12: 83 c4 10 add $0x10,%esp 115f15: b8 04 00 00 00 mov $0x4,%eax 115f1a: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 115f1e: 75 2f jne 115f4f case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); 115f20: 51 push %ecx 115f21: 51 push %ecx 115f22: 53 push %ebx 115f23: 68 88 cd 13 00 push $0x13cd88 115f28: e8 7b 1f 00 00 call 117ea8 <_Objects_Close> <== ALWAYS TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 115f2d: 8d 43 10 lea 0x10(%ebx),%eax 115f30: 89 04 24 mov %eax,(%esp) 115f33: e8 7c 3d 00 00 call 119cb4 <_Watchdog_Remove> */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 115f38: 58 pop %eax 115f39: 5a pop %edx 115f3a: 53 push %ebx 115f3b: 68 88 cd 13 00 push $0x13cd88 115f40: e8 e3 21 00 00 call 118128 <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 115f45: e8 73 2b 00 00 call 118abd <_Thread_Enable_dispatch> 115f4a: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 115f4c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115f4f: 8b 5d fc mov -0x4(%ebp),%ebx 115f52: c9 leave 115f53: c3 ret 00115f54 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 115f54: 55 push %ebp 115f55: 89 e5 mov %esp,%ebp 115f57: 57 push %edi 115f58: 56 push %esi 115f59: 53 push %ebx 115f5a: 83 ec 1c sub $0x1c,%esp 115f5d: 8b 7d 08 mov 0x8(%ebp),%edi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 115f60: b8 0a 00 00 00 mov $0xa,%eax 115f65: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 115f69: 0f 84 87 00 00 00 je 115ff6 return RTEMS_INVALID_NUMBER; if ( !routine ) 115f6f: b0 09 mov $0x9,%al 115f71: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 115f75: 74 7f je 115ff6 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 115f77: 52 push %edx 115f78: 8d 45 e4 lea -0x1c(%ebp),%eax 115f7b: 50 push %eax 115f7c: 57 push %edi 115f7d: 68 88 cd 13 00 push $0x13cd88 115f82: e8 05 23 00 00 call 11828c <_Objects_Get> 115f87: 89 c3 mov %eax,%ebx return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 115f89: 83 c4 10 add $0x10,%esp 115f8c: b8 04 00 00 00 mov $0x4,%eax 115f91: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 115f95: 75 5f jne 115ff6 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 115f97: 8d 73 10 lea 0x10(%ebx),%esi 115f9a: 83 ec 0c sub $0xc,%esp 115f9d: 56 push %esi 115f9e: e8 11 3d 00 00 call 119cb4 <_Watchdog_Remove> _ISR_Disable( level ); 115fa3: 9c pushf 115fa4: fa cli 115fa5: 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 ) { 115fa6: 83 c4 10 add $0x10,%esp 115fa9: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 115fad: 74 0b je 115fba _ISR_Enable( level ); 115faf: 50 push %eax 115fb0: 9d popf _Thread_Enable_dispatch(); 115fb1: e8 07 2b 00 00 call 118abd <_Thread_Enable_dispatch> 115fb6: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 115fb8: eb 3c jmp 115ff6 <== ALWAYS TAKEN /* * 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; 115fba: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 115fc1: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) the_watchdog->routine = routine; 115fc8: 8b 55 10 mov 0x10(%ebp),%edx 115fcb: 89 53 2c mov %edx,0x2c(%ebx) the_watchdog->id = id; 115fce: 89 7b 30 mov %edi,0x30(%ebx) the_watchdog->user_data = user_data; 115fd1: 8b 55 14 mov 0x14(%ebp),%edx 115fd4: 89 53 34 mov %edx,0x34(%ebx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 115fd7: 50 push %eax 115fd8: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 115fd9: 8b 45 0c mov 0xc(%ebp),%eax 115fdc: 89 43 1c mov %eax,0x1c(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 115fdf: 50 push %eax 115fe0: 50 push %eax 115fe1: 56 push %esi 115fe2: 68 c4 cb 13 00 push $0x13cbc4 115fe7: e8 b0 3b 00 00 call 119b9c <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 115fec: e8 cc 2a 00 00 call 118abd <_Thread_Enable_dispatch> 115ff1: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 115ff3: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115ff6: 8d 65 f4 lea -0xc(%ebp),%esp 115ff9: 5b pop %ebx 115ffa: 5e pop %esi 115ffb: 5f pop %edi 115ffc: c9 leave 115ffd: c3 ret 00116000 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 116000: 55 push %ebp 116001: 89 e5 mov %esp,%ebp 116003: 57 push %edi 116004: 56 push %esi 116005: 53 push %ebx 116006: 83 ec 1c sub $0x1c,%esp 116009: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 11600c: b8 0b 00 00 00 mov $0xb,%eax 116011: 80 3d fc ca 13 00 00 cmpb $0x0,0x13cafc 116018: 0f 84 ae 00 00 00 je 1160cc return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 11601e: 83 ec 0c sub $0xc,%esp 116021: 53 push %ebx 116022: e8 05 d9 ff ff call 11392c <_TOD_Validate> 116027: 83 c4 10 add $0x10,%esp 11602a: 84 c0 test %al,%al 11602c: 0f 84 95 00 00 00 je 1160c7 return RTEMS_INVALID_CLOCK; if ( !routine ) 116032: b8 09 00 00 00 mov $0x9,%eax 116037: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 11603b: 0f 84 8b 00 00 00 je 1160cc return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 116041: 83 ec 0c sub $0xc,%esp 116044: 53 push %ebx 116045: e8 7a d8 ff ff call 1138c4 <_TOD_To_seconds> 11604a: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 11604c: 83 c4 10 add $0x10,%esp 11604f: 3b 05 78 cb 13 00 cmp 0x13cb78,%eax 116055: 76 70 jbe 1160c7 116057: 51 push %ecx 116058: 8d 45 e4 lea -0x1c(%ebp),%eax 11605b: 50 push %eax 11605c: ff 75 08 pushl 0x8(%ebp) 11605f: 68 88 cd 13 00 push $0x13cd88 116064: e8 23 22 00 00 call 11828c <_Objects_Get> 116069: 89 c3 mov %eax,%ebx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 11606b: 83 c4 10 add $0x10,%esp 11606e: b8 04 00 00 00 mov $0x4,%eax 116073: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 116077: 75 53 jne 1160cc case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 116079: 8d 73 10 lea 0x10(%ebx),%esi 11607c: 83 ec 0c sub $0xc,%esp 11607f: 56 push %esi 116080: e8 2f 3c 00 00 call 119cb4 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY; 116085: c7 43 38 02 00 00 00 movl $0x2,0x38(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11608c: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) the_watchdog->routine = routine; 116093: 8b 45 10 mov 0x10(%ebp),%eax 116096: 89 43 2c mov %eax,0x2c(%ebx) the_watchdog->id = id; 116099: 8b 45 08 mov 0x8(%ebp),%eax 11609c: 89 43 30 mov %eax,0x30(%ebx) the_watchdog->user_data = user_data; 11609f: 8b 45 14 mov 0x14(%ebp),%eax 1160a2: 89 43 34 mov %eax,0x34(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1160a5: 2b 3d 78 cb 13 00 sub 0x13cb78,%edi 1160ab: 89 7b 1c mov %edi,0x1c(%ebx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 1160ae: 58 pop %eax 1160af: 5a pop %edx 1160b0: 56 push %esi 1160b1: 68 b8 cb 13 00 push $0x13cbb8 1160b6: e8 e1 3a 00 00 call 119b9c <_Watchdog_Insert> _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 1160bb: e8 fd 29 00 00 call 118abd <_Thread_Enable_dispatch> 1160c0: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1160c2: 83 c4 10 add $0x10,%esp 1160c5: eb 05 jmp 1160cc <== ALWAYS TAKEN 1160c7: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1160cc: 8d 65 f4 lea -0xc(%ebp),%esp 1160cf: 5b pop %ebx 1160d0: 5e pop %esi 1160d1: 5f pop %edi 1160d2: c9 leave 1160d3: c3 ret 00116364 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 116364: 55 push %ebp 116365: 89 e5 mov %esp,%ebp 116367: 53 push %ebx 116368: 83 ec 24 sub $0x24,%esp 11636b: 8b 55 08 mov 0x8(%ebp),%edx */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 11636e: 31 c0 xor %eax,%eax 116370: 85 d2 test %edx,%edx 116372: 74 0f je 116383 116374: 0f b6 05 94 47 13 00 movzbl 0x134794,%eax 11637b: 39 c2 cmp %eax,%edx 11637d: 0f 96 c0 setbe %al 116380: 0f b6 c0 movzbl %al,%eax * Make sure the requested priority is valid. The if is * 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 ) ) { 116383: 89 d3 mov %edx,%ebx 116385: 85 c0 test %eax,%eax 116387: 75 0b jne 116394 if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 116389: b0 13 mov $0x13,%al 11638b: 42 inc %edx 11638c: 0f 85 4d 01 00 00 jne 1164df 116392: 31 db xor %ebx,%ebx 116394: a1 e8 ca 13 00 mov 0x13cae8,%eax 116399: 40 inc %eax 11639a: a3 e8 ca 13 00 mov %eax,0x13cae8 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 11639f: 8a 15 0c 84 13 00 mov 0x13840c,%dl initialized = true; 1163a5: c6 05 0c 84 13 00 01 movb $0x1,0x13840c _Thread_Enable_dispatch(); 1163ac: 88 55 e4 mov %dl,-0x1c(%ebp) 1163af: e8 09 27 00 00 call 118abd <_Thread_Enable_dispatch> if ( tmpInitialized ) 1163b4: b8 0e 00 00 00 mov $0xe,%eax 1163b9: 8a 55 e4 mov -0x1c(%ebp),%dl 1163bc: 84 d2 test %dl,%dl 1163be: 0f 85 1b 01 00 00 jne 1164df * 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( 1163c4: 51 push %ecx 1163c5: 51 push %ecx 1163c6: 8d 45 f4 lea -0xc(%ebp),%eax 1163c9: 50 push %eax 1163ca: 8b 45 10 mov 0x10(%ebp),%eax 1163cd: 80 cc 80 or $0x80,%ah 1163d0: 50 push %eax 1163d1: 68 00 01 00 00 push $0x100 1163d6: ff 75 0c pushl 0xc(%ebp) 1163d9: 53 push %ebx 1163da: 68 45 4d 49 54 push $0x54494d45 1163df: e8 80 f2 ff ff call 115664 <== ALWAYS TAKEN /* 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) { 1163e4: 83 c4 20 add $0x20,%esp 1163e7: 85 c0 test %eax,%eax 1163e9: 74 0c je 1163f7 initialized = false; 1163eb: c6 05 0c 84 13 00 00 movb $0x0,0x13840c return status; 1163f2: e9 e8 00 00 00 jmp 1164df <== ALWAYS TAKEN * 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) 1163f7: 8b 45 f4 mov -0xc(%ebp),%eax /* * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( 1163fa: 0f b7 c8 movzwl %ax,%ecx 1163fd: 8b 15 8c ca 13 00 mov 0x13ca8c,%edx 116403: 8b 14 8a mov (%edx,%ecx,4),%edx 116406: 89 15 10 84 13 00 mov %edx,0x138410 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11640c: c7 05 40 84 13 00 44 movl $0x138444,0x138440 116413: 84 13 00 the_chain->permanent_null = NULL; 116416: c7 05 44 84 13 00 00 movl $0x0,0x138444 11641d: 00 00 00 the_chain->last = _Chain_Head(the_chain); 116420: c7 05 48 84 13 00 40 movl $0x138440,0x138448 116427: 84 13 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11642a: c7 05 78 84 13 00 7c movl $0x13847c,0x138478 116431: 84 13 00 the_chain->permanent_null = NULL; 116434: c7 05 7c 84 13 00 00 movl $0x0,0x13847c 11643b: 00 00 00 the_chain->last = _Chain_Head(the_chain); 11643e: c7 05 80 84 13 00 78 movl $0x138478,0x138480 116445: 84 13 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 116448: c7 05 20 84 13 00 00 movl $0x0,0x138420 11644f: 00 00 00 the_watchdog->routine = routine; 116452: c7 05 34 84 13 00 40 movl $0x118940,0x138434 116459: 89 11 00 the_watchdog->id = id; 11645c: a3 38 84 13 00 mov %eax,0x138438 the_watchdog->user_data = user_data; 116461: c7 05 3c 84 13 00 00 movl $0x0,0x13843c 116468: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11646b: c7 05 58 84 13 00 00 movl $0x0,0x138458 116472: 00 00 00 the_watchdog->routine = routine; 116475: c7 05 6c 84 13 00 40 movl $0x118940,0x13846c 11647c: 89 11 00 the_watchdog->id = id; 11647f: a3 70 84 13 00 mov %eax,0x138470 the_watchdog->user_data = user_data; 116484: c7 05 74 84 13 00 00 movl $0x0,0x138474 11648b: 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; 11648e: c7 05 14 84 13 00 ff movl $0x1166ff,0x138414 116495: 66 11 00 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 116498: 8b 15 34 cc 13 00 mov 0x13cc34,%edx 11649e: 89 15 4c 84 13 00 mov %edx,0x13844c ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 1164a4: 8b 15 78 cb 13 00 mov 0x13cb78,%edx 1164aa: 89 15 84 84 13 00 mov %edx,0x138484 ts->insert_chain = NULL; 1164b0: c7 05 88 84 13 00 00 movl $0x0,0x138488 1164b7: 00 00 00 ts->active = false; 1164ba: c6 05 8c 84 13 00 00 movb $0x0,0x13848c /* * The default timer server is now available. */ _Timer_server = ts; 1164c1: c7 05 c8 cd 13 00 10 movl $0x138410,0x13cdc8 1164c8: 84 13 00 /* * Start the timer server */ status = rtems_task_start( 1164cb: 52 push %edx 1164cc: 68 10 84 13 00 push $0x138410 1164d1: 68 70 65 11 00 push $0x116570 1164d6: 50 push %eax 1164d7: e8 60 f7 ff ff call 115c3c <== ALWAYS TAKEN if (status) { initialized = false; } #endif return status; 1164dc: 83 c4 10 add $0x10,%esp } 1164df: 8b 5d fc mov -0x4(%ebp),%ebx 1164e2: c9 leave 1164e3: c3 ret 00116150 : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 116150: 55 push %ebp 116151: 89 e5 mov %esp,%ebp 116153: 56 push %esi 116154: 53 push %ebx 116155: 83 ec 14 sub $0x14,%esp 116158: 8d 45 f4 lea -0xc(%ebp),%eax 11615b: 50 push %eax 11615c: ff 75 08 pushl 0x8(%ebp) 11615f: 68 88 cd 13 00 push $0x13cd88 116164: e8 23 21 00 00 call 11828c <_Objects_Get> 116169: 89 c3 mov %eax,%ebx Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); switch ( location ) { 11616b: 83 c4 10 add $0x10,%esp 11616e: be 04 00 00 00 mov $0x4,%esi 116173: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 116177: 75 50 jne 1161c9 case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { 116179: 8b 40 38 mov 0x38(%eax),%eax 11617c: 85 c0 test %eax,%eax 11617e: 75 1e jne 11619e _Watchdog_Remove( &the_timer->Ticker ); 116180: 83 c3 10 add $0x10,%ebx 116183: 83 ec 0c sub $0xc,%esp 116186: 53 push %ebx 116187: e8 28 3b 00 00 call 119cb4 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 11618c: 59 pop %ecx 11618d: 58 pop %eax 11618e: 53 push %ebx 11618f: 68 c4 cb 13 00 push $0x13cbc4 116194: e8 03 3a 00 00 call 119b9c <_Watchdog_Insert> 116199: 66 31 f6 xor %si,%si 11619c: eb 23 jmp 1161c1 <== ALWAYS TAKEN } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 11619e: be 0b 00 00 00 mov $0xb,%esi 1161a3: 48 dec %eax 1161a4: 75 1e jne 1161c4 Timer_server_Control *timer_server = _Timer_server; 1161a6: 8b 35 c8 cd 13 00 mov 0x13cdc8,%esi if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 1161ac: 83 ec 0c sub $0xc,%esp 1161af: 8d 43 10 lea 0x10(%ebx),%eax 1161b2: 50 push %eax 1161b3: e8 fc 3a 00 00 call 119cb4 <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 1161b8: 58 pop %eax 1161b9: 5a pop %edx 1161ba: 53 push %ebx 1161bb: 56 push %esi 1161bc: ff 56 04 call *0x4(%esi) 1161bf: 31 f6 xor %esi,%esi 1161c1: 83 c4 10 add $0x10,%esp * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 1161c4: e8 f4 28 00 00 call 118abd <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1161c9: 89 f0 mov %esi,%eax 1161cb: 8d 65 f8 lea -0x8(%ebp),%esp 1161ce: 5b pop %ebx 1161cf: 5e pop %esi 1161d0: c9 leave 1161d1: c3 ret 001161d4 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 1161d4: 55 push %ebp 1161d5: 89 e5 mov %esp,%ebp 1161d7: 57 push %edi 1161d8: 56 push %esi 1161d9: 53 push %ebx 1161da: 83 ec 1c sub $0x1c,%esp 1161dd: 8b 7d 08 mov 0x8(%ebp),%edi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 1161e0: 8b 35 c8 cd 13 00 mov 0x13cdc8,%esi if ( !timer_server ) 1161e6: b8 0e 00 00 00 mov $0xe,%eax 1161eb: 85 f6 test %esi,%esi 1161ed: 0f 84 8d 00 00 00 je 116280 return RTEMS_INCORRECT_STATE; if ( !routine ) 1161f3: b0 09 mov $0x9,%al 1161f5: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 1161f9: 0f 84 81 00 00 00 je 116280 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 1161ff: b0 0a mov $0xa,%al 116201: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 116205: 74 79 je 116280 116207: 52 push %edx 116208: 8d 45 e4 lea -0x1c(%ebp),%eax 11620b: 50 push %eax 11620c: 57 push %edi 11620d: 68 88 cd 13 00 push $0x13cd88 116212: e8 75 20 00 00 call 11828c <_Objects_Get> 116217: 89 c3 mov %eax,%ebx return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 116219: 83 c4 10 add $0x10,%esp 11621c: b8 04 00 00 00 mov $0x4,%eax 116221: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 116225: 75 59 jne 116280 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 116227: 83 ec 0c sub $0xc,%esp 11622a: 8d 43 10 lea 0x10(%ebx),%eax 11622d: 50 push %eax 11622e: e8 81 3a 00 00 call 119cb4 <_Watchdog_Remove> _ISR_Disable( level ); 116233: 9c pushf 116234: fa cli 116235: 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 ) { 116236: 83 c4 10 add $0x10,%esp 116239: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 11623d: 74 0b je 11624a _ISR_Enable( level ); 11623f: 50 push %eax 116240: 9d popf _Thread_Enable_dispatch(); 116241: e8 77 28 00 00 call 118abd <_Thread_Enable_dispatch> 116246: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116248: eb 36 jmp 116280 <== ALWAYS TAKEN /* * 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; 11624a: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 116251: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) the_watchdog->routine = routine; 116258: 8b 55 10 mov 0x10(%ebp),%edx 11625b: 89 53 2c mov %edx,0x2c(%ebx) the_watchdog->id = id; 11625e: 89 7b 30 mov %edi,0x30(%ebx) the_watchdog->user_data = user_data; 116261: 8b 55 14 mov 0x14(%ebp),%edx 116264: 89 53 34 mov %edx,0x34(%ebx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 116267: 8b 55 0c mov 0xc(%ebp),%edx 11626a: 89 53 1c mov %edx,0x1c(%ebx) _ISR_Enable( level ); 11626d: 50 push %eax 11626e: 9d popf (*timer_server->schedule_operation)( timer_server, the_timer ); 11626f: 50 push %eax 116270: 50 push %eax 116271: 53 push %ebx 116272: 56 push %esi 116273: ff 56 04 call *0x4(%esi) _Thread_Enable_dispatch(); 116276: e8 42 28 00 00 call 118abd <_Thread_Enable_dispatch> 11627b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11627d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116280: 8d 65 f4 lea -0xc(%ebp),%esp 116283: 5b pop %ebx 116284: 5e pop %esi 116285: 5f pop %edi 116286: c9 leave 116287: c3 ret 00116288 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 116288: 55 push %ebp 116289: 89 e5 mov %esp,%ebp 11628b: 57 push %edi 11628c: 56 push %esi 11628d: 53 push %ebx 11628e: 83 ec 1c sub $0x1c,%esp 116291: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 116294: 8b 35 c8 cd 13 00 mov 0x13cdc8,%esi if ( !timer_server ) 11629a: b8 0e 00 00 00 mov $0xe,%eax 11629f: 85 f6 test %esi,%esi 1162a1: 0f 84 b4 00 00 00 je 11635b return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 1162a7: b0 0b mov $0xb,%al 1162a9: 80 3d fc ca 13 00 00 cmpb $0x0,0x13cafc 1162b0: 0f 84 a5 00 00 00 je 11635b <== ALWAYS TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 1162b6: b0 09 mov $0x9,%al 1162b8: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 1162bc: 0f 84 99 00 00 00 je 11635b return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 1162c2: 83 ec 0c sub $0xc,%esp 1162c5: 53 push %ebx 1162c6: e8 61 d6 ff ff call 11392c <_TOD_Validate> 1162cb: 83 c4 10 add $0x10,%esp 1162ce: 84 c0 test %al,%al 1162d0: 0f 84 80 00 00 00 je 116356 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 1162d6: 83 ec 0c sub $0xc,%esp 1162d9: 53 push %ebx 1162da: e8 e5 d5 ff ff call 1138c4 <_TOD_To_seconds> 1162df: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 1162e1: 83 c4 10 add $0x10,%esp 1162e4: 3b 05 78 cb 13 00 cmp 0x13cb78,%eax 1162ea: 76 6a jbe 116356 1162ec: 51 push %ecx 1162ed: 8d 45 e4 lea -0x1c(%ebp),%eax 1162f0: 50 push %eax 1162f1: ff 75 08 pushl 0x8(%ebp) 1162f4: 68 88 cd 13 00 push $0x13cd88 1162f9: e8 8e 1f 00 00 call 11828c <_Objects_Get> 1162fe: 89 c3 mov %eax,%ebx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 116300: 83 c4 10 add $0x10,%esp 116303: b8 04 00 00 00 mov $0x4,%eax 116308: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 11630c: 75 4d jne 11635b case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 11630e: 83 ec 0c sub $0xc,%esp 116311: 8d 43 10 lea 0x10(%ebx),%eax 116314: 50 push %eax 116315: e8 9a 39 00 00 call 119cb4 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 11631a: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 116321: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) the_watchdog->routine = routine; 116328: 8b 45 10 mov 0x10(%ebp),%eax 11632b: 89 43 2c mov %eax,0x2c(%ebx) the_watchdog->id = id; 11632e: 8b 45 08 mov 0x8(%ebp),%eax 116331: 89 43 30 mov %eax,0x30(%ebx) the_watchdog->user_data = user_data; 116334: 8b 45 14 mov 0x14(%ebp),%eax 116337: 89 43 34 mov %eax,0x34(%ebx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 11633a: 2b 3d 78 cb 13 00 sub 0x13cb78,%edi 116340: 89 7b 1c mov %edi,0x1c(%ebx) (*timer_server->schedule_operation)( timer_server, the_timer ); 116343: 58 pop %eax 116344: 5a pop %edx 116345: 53 push %ebx 116346: 56 push %esi 116347: ff 56 04 call *0x4(%esi) _Thread_Enable_dispatch(); 11634a: e8 6e 27 00 00 call 118abd <_Thread_Enable_dispatch> 11634f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116351: 83 c4 10 add $0x10,%esp 116354: eb 05 jmp 11635b <== ALWAYS TAKEN 116356: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11635b: 8d 65 f4 lea -0xc(%ebp),%esp 11635e: 5b pop %ebx 11635f: 5e pop %esi 116360: 5f pop %edi 116361: c9 leave 116362: c3 ret 0010a801 : */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { 10a801: 55 push %ebp 10a802: 89 e5 mov %esp,%ebp 10a804: 53 push %ebx 10a805: 83 ec 04 sub $0x4,%esp 10a808: 8b 45 08 mov 0x8(%ebp),%eax 10a80b: 8b 5d 0c mov 0xc(%ebp),%ebx void *ptr; /* * check the arguments */ if ( !pointer ) 10a80e: 85 db test %ebx,%ebx 10a810: 74 20 je 10a832 return false; if ( !bytes ) 10a812: 85 c0 test %eax,%eax 10a814: 74 1c je 10a832 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 10a816: 6a 00 push $0x0 10a818: 6a 00 push $0x0 10a81a: 50 push %eax 10a81b: 68 9c 41 12 00 push $0x12419c 10a820: e8 27 12 00 00 call 10ba4c <_Protected_heap_Allocate_aligned_with_boundary> /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); if (!ptr) 10a825: 83 c4 10 add $0x10,%esp 10a828: 85 c0 test %eax,%eax 10a82a: 74 06 je 10a832 return false; *pointer = ptr; 10a82c: 89 03 mov %eax,(%ebx) 10a82e: b0 01 mov $0x1,%al return true; 10a830: eb 02 jmp 10a834 <== ALWAYS TAKEN 10a832: 31 c0 xor %eax,%eax } 10a834: 8b 5d fc mov -0x4(%ebp),%ebx 10a837: c9 leave 10a838: c3 ret